mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 02:46:46 +08:00
我的勋章
This commit is contained in:
@@ -49,16 +49,16 @@
|
|||||||
<view class="medal-info-flex">
|
<view class="medal-info-flex">
|
||||||
<view class="medal-info-index" v-for="(ru,index) in rulesData.rules">
|
<view class="medal-info-index" v-for="(ru,index) in rulesData.rules">
|
||||||
<view class="" style="height: 50upx;">
|
<view class="" style="height: 50upx;">
|
||||||
<image v-if="medalData.medalLevel == index+1" style="width:32upx;height:16upx" src="../../static/images/triangle.png" mode=""></image>
|
<image v-if="showLevel== index+1" style="width:32upx;height:16upx" src="../../static/images/triangle.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="medal-img-index">
|
<view class="medal-img-index">
|
||||||
<image v-if="index+1 < medalData.medalLevel || index+1 == medalData.medalLevel" style="width:104upx;height:120upx" :src="fileBaseUrl+rulesData.icon" mode=""></image>
|
<image v-if="index+1 < medalData.medalLevel || index+1 == medalData.medalLevel" style="width:104upx;height:120upx" :src="fileBaseUrl+rulesData.icon" mode=""></image>
|
||||||
<image v-else style="width:104upx;height:120upx" :src="fileBaseUrl+rulesData.iconGrey" mode=""></image>
|
<image @click="tabQu(ru)" v-else style="width:104upx;height:120upx" :src="fileBaseUrl+rulesData.iconGrey" mode=""></image>
|
||||||
<text v-if="index+1 < medalData.medalLevel || index+1 == medalData.medalLevel" class="img-name">{{medalData.medalName}} </text>
|
<text v-if="index+1 < medalData.medalLevel || index+1 == medalData.medalLevel" class="img-name">{{medalData.medalName}} </text>
|
||||||
<text class="img-level">LV.{{index+1}}</text>
|
<text class="img-level">LV.{{index+1}}</text>
|
||||||
</view>
|
</view>
|
||||||
<text v-if="index+1 < medalData.medalLevel || index+1 == medalData.medalLevel" style="color: #387DF7;font-size: 24upx;">LV.{{index+1}}</text>
|
<text v-if="index+1 < medalData.medalLevel || index+1 == medalData.medalLevel" style="color: #387DF7;font-size: 24upx;">LV.{{index+1}}</text>
|
||||||
<text v-else style="color: color: #666666;font-size: 24upx;">LV.{{index+1}}</text>
|
<text v-else @click="tabQu(ru)" style="color: color: #666666;font-size: 24upx;">LV.{{index+1}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
showLevel:1,
|
||||||
show:false,
|
show:false,
|
||||||
fileBaseUrl:this.$config.fileUrl,
|
fileBaseUrl:this.$config.fileUrl,
|
||||||
medalList:[],
|
medalList:[],
|
||||||
@@ -90,6 +91,10 @@
|
|||||||
this.getConfig();
|
this.getConfig();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
tabQu(ru) {
|
||||||
|
this.medalData.requirement = ru.remark;
|
||||||
|
this.showLevel = ru.level;
|
||||||
|
},
|
||||||
back(){
|
back(){
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
},
|
},
|
||||||
@@ -102,6 +107,7 @@
|
|||||||
},
|
},
|
||||||
handelClick(me) {
|
handelClick(me) {
|
||||||
this.medalData = me;
|
this.medalData = me;
|
||||||
|
this.showLevel = this.medalData.medalLevel;
|
||||||
this.show = true;
|
this.show = true;
|
||||||
let data = this.medalConfig.find(it=>it.id ==me.medalId);
|
let data = this.medalConfig.find(it=>it.id ==me.medalId);
|
||||||
this.rulesData = data;
|
this.rulesData = data;
|
||||||
|
|||||||
Reference in New Issue
Block a user