Commit d0a2fcd2 authored by Facius's avatar Facius

feat: 隐藏兑换码

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