|
|
@ -23,7 +23,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<!-- 任务奖章区域 --> |
|
|
<!-- 任务奖章区域 --> |
|
|
<view class="nav-list" v-else="showMedal == false"> |
|
|
<view class="nav-list" v-else="showMedal == false"> |
|
|
<view class="nav-item" v-for="(item, i) in medalList" :key="i"> |
|
|
<view class="nav-item" v-for="(item, i) in myMedalList" :key="i"> |
|
|
<image :src="item" class="nav-img"></image> |
|
|
<image :src="item" class="nav-img"></image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -42,7 +42,8 @@ |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
this.getMedalList() |
|
|
this.getMedalList(); |
|
|
|
|
|
this.getMyMedalList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
@ -50,12 +51,26 @@ |
|
|
|
|
|
|
|
|
const { |
|
|
const { |
|
|
data: res |
|
|
data: res |
|
|
} = await uni.$http.post('/small/scene/manage/listAll',{name:this.name}) |
|
|
} = await uni.$http.post('/small/project/medal/listAll') |
|
|
if (!res.success) return uni.$showMsg() |
|
|
if (!res.success) return uni.$showMsg() |
|
|
|
|
|
|
|
|
res.data.forEach(item=>{ |
|
|
res.data.forEach(item=>{ |
|
|
item.uploadPath = uni.$http.baseUrl +item.uploadPath |
|
|
item.iconPath = uni.$http.baseUrl +item.iconPath |
|
|
this.taskMedalList.push(item.uploadPath) |
|
|
this.taskMedalList.push(item.iconPath) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
uni.$showMsg('数据请求成功!') |
|
|
|
|
|
}, |
|
|
|
|
|
async getMyMedalList() { |
|
|
|
|
|
|
|
|
|
|
|
const { |
|
|
|
|
|
data: res |
|
|
|
|
|
} = await uni.$http.post('/small/wechat/showMyMedal',{openId:"cpqKnCOSsO+0mWqJI/T1MQ=="}) |
|
|
|
|
|
if (!res.success) return uni.$showMsg() |
|
|
|
|
|
|
|
|
|
|
|
res.data.forEach(item=>{ |
|
|
|
|
|
item.iconPath = uni.$http.baseUrl +item.iconPath |
|
|
|
|
|
this.myMedalList.push(item.iconPath) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
uni.$showMsg('数据请求成功!') |
|
|
uni.$showMsg('数据请求成功!') |
|
|
|