parent
82569ce5a0
commit
d7a7746840
@ -1,3 +1,4 @@
|
||||
<scroll-view class="scroll" scroll-top="scrollTop" refresher-triggered="{{re}}" refresher-enabled="1">
|
||||
<button>撒</button>
|
||||
</scroll-view>
|
||||
|
||||
<view>
|
||||
<button type="{{type}}" plain size="mini">登录</button>
|
||||
</view>
|
@ -1,8 +1,3 @@
|
||||
#cam{
|
||||
width: 100%;
|
||||
height: 40vh;
|
||||
}
|
||||
.scroll{
|
||||
background: red;
|
||||
height: 72vh;
|
||||
page{
|
||||
background: white;
|
||||
}
|
Before Width: | Height: | Size: 236 B |
@ -1,5 +1,5 @@
|
||||
<navigator class="path-item" url="/path/pages/path/path?subject_id={{data.id}}">
|
||||
<image class="image" src="{{eduUrl}}/{{data.image_url}}"></image>
|
||||
<image class="image" lazy-load src="{{eduUrl}}/{{data.image_url}}"></image>
|
||||
<view class="detail">
|
||||
<view class="name">{{data.name}}</view>
|
||||
</view>
|
||||
|
@ -1,14 +1,37 @@
|
||||
|
||||
Component({
|
||||
properties: {
|
||||
data:Object
|
||||
data:Object,
|
||||
select: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
observer: function(v){
|
||||
//console.log("observer select change", v);
|
||||
if(!v){
|
||||
this.setData({value: false});
|
||||
//console.log(this.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
behaviors: ['wx://form-field'],
|
||||
data: {
|
||||
eduUrl: global.config.eduUrl
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
onTap(){
|
||||
if(this.data.select){
|
||||
this.select({from:"body"})
|
||||
}
|
||||
},
|
||||
select({from}){
|
||||
this.setData({value: !this.data.value});
|
||||
let {data:{id:name}, value} = this.data;
|
||||
this.triggerEvent("select", {name, value, from}, {bubbles:true});
|
||||
},
|
||||
onTapRadio(){
|
||||
this.select({from:"radio"})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -1,7 +1,12 @@
|
||||
<navigator class="shixun-item" url="/shixun/pages/shixun/shixun?identifier={{data.identifier}}">
|
||||
<image class="image" src="{{eduUrl}}/{{data.pic}}"></image>
|
||||
<navigator bindtap="onTap" hover-class="{{select?'none':'navigator-hover'}}" class="shixun-item" url="{{select?'':('/shixun/pages/shixun/shixun?identifier='+data.identifier)}}">
|
||||
<image class="image" lazy-load src="{{eduUrl}}/{{data.pic}}"></image>
|
||||
<view class="detail">
|
||||
<view class="name"><rich-text nodes="{{data.title}}"/></view>
|
||||
<view class="level">初级</view>
|
||||
</view>
|
||||
<view class="radio-wrp">
|
||||
<view class="icon-wrp" catchtap="onTapRadio" >
|
||||
<icon class="icon" color="{{select&&value?'#00b0f0':'dimgrey'}}" type="{{value?'success':'circle'}}" size="{{select?20:12}}"></icon>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
Loading…
Reference in new issue