Browse Source

勋章获取

h5_css
yanyan 3 years ago
parent
commit
0ac0628ce8
  1. 2
      pages/my/my.vue
  2. 19
      subpkg/complete/complete.vue
  3. 3
      subpkg/medal/medal.vue

2
pages/my/my.vue

@ -189,7 +189,7 @@
this.active = 1; this.active = 1;
} }
uni.navigateTo({ uni.navigateTo({
url:'/subpkg/medal/medal' url:'/subpkg/medal/medal?medalNum='+this.medalNum
}) })
}, },
navClickHandler(item) { navClickHandler(item) {

19
subpkg/complete/complete.vue

@ -6,7 +6,7 @@
</view> </view>
<view class="marsk" v-if="showLayer"></view> <view class="marsk" v-if="showLayer"></view>
<view class="popup-layer" v-if="showMedal"> <view class="popup-layer" v-if="showMedal">
<image class="animg" src="/static/images/joy.png"></image> <image class="animg" :src="achieveMedalImg"></image>
</view> </view>
<view class="mainwrap2"> <view class="mainwrap2">
@ -88,7 +88,8 @@
return { return {
"questionFreId":"8eefa1161f4643ccaed9404949911a39", "questionFreId":"8eefa1161f4643ccaed9404949911a39",
"roleId":"8ad2af376ec64f519147030497086a96", "roleId":"8ad2af376ec64f519147030497086a96",
"sceneId": "", "sceneId": "d6b424abc2d44f2888a4d9a3d52f9f09",
achieveMedalImg:"",
questionList: [], questionList: [],
recordList: [], recordList: [],
"ask":"", "ask":"",
@ -131,7 +132,7 @@
}, 2000) }, 2000)
this.roleId = options.roleId !=null ? options.roleId : this.roleId this.roleId = options.roleId !=null ? options.roleId : this.roleId
this.questionFreId = options.questionFreId!=null ? options.questionFreId : this.questionFreId this.questionFreId = options.questionFreId!=null ? options.questionFreId : this.questionFreId
this.sceneId = options.sceneId; this.sceneId = options.sceneId!=null ? options.sceneId : this.sceneId;
this.getQuestionList() this.getQuestionList()
this.getRecordList() this.getRecordList()
this.editUserMedal(); this.editUserMedal();
@ -192,14 +193,14 @@
data: res data: res
} = await uni.$http.post('/small/wechat/editUserMedal', { } = await uni.$http.post('/small/wechat/editUserMedal', {
medal: this.sceneId, medal: this.sceneId,
guid: this.userId, guid: this.userId
// guid: "2752c89b6ca843558991f888f8949da2",
}) })
if (!res.success) return uni.$showMsg() if (!res.success) return uni.$showMsg()
// this.recordList = res.data this.achieveMedalImg = uni.$http.baseUrl + res.data
if (res.data == null || res.data =="") {
this.recordList = res.data this.showMedal = false
this.showLayer = false
}
//uni.$showMsg('') //uni.$showMsg('')
}, },
async getQR() { async getQR() {

3
subpkg/medal/medal.vue

@ -106,7 +106,8 @@
computed: { computed: {
...mapState('m_user', ['userinfo','userId']) ...mapState('m_user', ['userinfo','userId'])
}, },
onLoad() { onLoad(options) {
this.medalNum = options.medalNum
this.prefix = uni.$http.baseUrl this.prefix = uni.$http.baseUrl
this.name = this.userinfo.nickName; this.name = this.userinfo.nickName;
this.avatarUrl = this.userinfo.avatarUrl; this.avatarUrl = this.userinfo.avatarUrl;

Loading…
Cancel
Save