Commit d0a2fcd2 authored by Facius's avatar Facius

feat: 隐藏兑换码

parent 79a39890
......@@ -25,3 +25,13 @@ export async function experienceVip(data) {
noLoading: true
})
}
// 新增更新名片
export async function systemExchange(data) {
return request({
url: `/rest/system/exchange`,
method: 'GET',
data,
noLoading: true
})
}
......@@ -71,7 +71,7 @@
<u-icon name="arrow-right" :size="24" />
</view>
</view>
<view class="service-view" v-if="cdKeySetting">
<view class="service-view" v-if="showCDKey">
<view class="service-left-image">
<image class="warning-image-b" :src="huiyuan1Img" />
<text>会员兑换码</text>
......@@ -101,7 +101,7 @@ import log from '@/utils/log.js';
import BottomPay from '@/components/bottom-pay/index.vue';
import { mineBaseUrl } from '@/utils/config.js';
import { introOptions } from '@/utils/options/mine/pay.js';
import { getGoodsList, getOrderInfo } from '@/api/mine/pay.js';
import { getGoodsList, getOrderInfo, systemExchange } from '@/api/mine/pay.js';
import { mapGetters } from 'vuex';
export default {
components: {
......@@ -117,12 +117,13 @@ export default {
uid: '',
showPayBottom: false,
current: 0,
iap: ''
iap: '',
showCDKey: false
};
},
computed: {
// 'restoreFlag'
...mapGetters(['userInfo', 'platform', 'loginChannel', 'authType', 'isIOS', 'cdKeySetting']),
...mapGetters(['userInfo', 'platform', 'loginChannel', 'authType', 'isIOS']),
hidePay() {
// return this.platform === '4' ? false : this.isIOS;
return false;
......@@ -155,6 +156,7 @@ export default {
}
this.uid = this.userInfo.uid
this.loadProducts()
this.getShowCDKey()
},
/**
* 生命周期函数--监听页面初次渲染完成
......@@ -167,11 +169,11 @@ export default {
*/
onShow() {
// 点分享进入小程序
let fUid = uni.getStorageSync('fUid');
// let fUid = uni.getStorageSync('fUid');
if (fUid) {
this.addShare(fUid);
}
// if (fUid) {
// this.addShare(fUid);
// }
},
/**
* 生命周期函数--监听页面隐藏
......@@ -658,22 +660,34 @@ export default {
);
},
addShare(uid) {
api.request('user/add-share', {
method: 'post',
data: {
uid: uid
},
success(res) {
if (res.status) {
//保存分享关系完成,并删除分享者id
uni.removeStorageSync('fUid');
} else {
}
// addShare(uid) {
// api.request('user/add-share', {
// method: 'post',
// data: {
// uid: uid
// },
// success(res) {
// if (res.status) {
// //保存分享关系完成,并删除分享者id
// uni.removeStorageSync('fUid');
// } else {
// }
// }
// });
// },
getShowCDKey() {
var {appWgtVersion} = uni.getSystemInfoSync()
if (this.platform == '4' && this.isIOS ) {
systemExchange({
version: appWgtVersion
})
.then(res => {
this.showCDKey = res.data
})
.catch(res => {
});
}
});
},
handleService() {
uni.navigateTo({
animationType:'pop-in',
......
......@@ -65,9 +65,6 @@ export default {
avatar() {
return this.mineBaseUrl + 'toxuiang@3x.png';
},
isIOS() {
return uni.getSystemInfoSync().platform === "ios" || 1
}
},
onLoad(options) {
this.getQiniuToken();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment