uniapp/pages/index/index.vue
@@ -132,9 +132,9 @@ } }, onLoad() { this.getCategoryList(); this.getPopBannerInfo(); this.updateCid(); }, onShow() { if(!this.hasshow) @@ -155,6 +155,21 @@ }, watch: {}, methods: { updateCid() { //从缓存获取cid let clientInfo = uni.getStorageSync('clientInfo'); console.log(clientInfo); if(clientInfo&&clientInfo.clientid) { this.$u.api.updateCid({ pushcid:clientInfo.clientid }).then(e => { console.log(e); }).catch(function (err) { }) } }, shShow() { var that=this;