parent
82569ce5a0
commit
d7a7746840
@ -1,3 +1,4 @@
|
|||||||
<scroll-view class="scroll" scroll-top="scrollTop" refresher-triggered="{{re}}" refresher-enabled="1">
|
|
||||||
<button>撒</button>
|
<view>
|
||||||
</scroll-view>
|
<button type="{{type}}" plain size="mini">登录</button>
|
||||||
|
</view>
|
@ -1,8 +1,3 @@
|
|||||||
#cam{
|
page{
|
||||||
width: 100%;
|
background: white;
|
||||||
height: 40vh;
|
|
||||||
}
|
|
||||||
.scroll{
|
|
||||||
background: red;
|
|
||||||
height: 72vh;
|
|
||||||
}
|
}
|
Before Width: | Height: | Size: 236 B |
@ -1,5 +1,5 @@
|
|||||||
<navigator class="path-item" url="/path/pages/path/path?subject_id={{data.id}}">
|
<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="detail">
|
||||||
<view class="name">{{data.name}}</view>
|
<view class="name">{{data.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -1,14 +1,37 @@
|
|||||||
|
|
||||||
Component({
|
Component({
|
||||||
properties: {
|
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: {
|
data: {
|
||||||
eduUrl: global.config.eduUrl
|
eduUrl: global.config.eduUrl
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
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}}">
|
<navigator bindtap="onTap" hover-class="{{select?'none':'navigator-hover'}}" class="shixun-item" url="{{select?'':('/shixun/pages/shixun/shixun?identifier='+data.identifier)}}">
|
||||||
<image class="image" src="{{eduUrl}}/{{data.pic}}"></image>
|
<image class="image" lazy-load src="{{eduUrl}}/{{data.pic}}"></image>
|
||||||
<view class="detail">
|
<view class="detail">
|
||||||
<view class="name"><rich-text nodes="{{data.title}}"/></view>
|
<view class="name"><rich-text nodes="{{data.title}}"/></view>
|
||||||
<view class="level">初级</view>
|
<view class="level">初级</view>
|
||||||
</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>
|
</navigator>
|
Loading…
Reference in new issue