|
@@ -35,7 +35,11 @@
|
|
|
<icon class="list-icon about-icon"></icon>
|
|
|
<text>关于我们</text>
|
|
|
</view>
|
|
|
- <view v-if="loginFlag" class="list-row no-jt" @click="duihuamaDuihuan">
|
|
|
+ <view v-if="appleCode&¤tPlatform=='ios'" class="list-row no-jt" @click="duihuamaDuihuan">
|
|
|
+ <icon class="list-icon duihuanma-icon"></icon>
|
|
|
+ <text>兑换码</text>
|
|
|
+ </view>
|
|
|
+ <view v-if="currentPlatform=='android'" class="list-row no-jt" @click="duihuamaDuihuan">
|
|
|
<icon class="list-icon duihuanma-icon"></icon>
|
|
|
<text>兑换码</text>
|
|
|
</view>
|
|
@@ -131,7 +135,9 @@
|
|
|
credit: '',
|
|
|
vipFlag: '',
|
|
|
});
|
|
|
- let routerOpt = ref(false);
|
|
|
+ let routerOpt = ref(false);
|
|
|
+ let appleCode = ref(null);
|
|
|
+ let currentPlatform = ref(null);
|
|
|
const exitDialogRef = ref(null);
|
|
|
const youkeDialogRef = ref(null);
|
|
|
const zhuxiaoDialogRef = ref(null);
|
|
@@ -365,14 +371,28 @@
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ function isIOSorAndroid(){
|
|
|
+ const systemInfo = uni.getSystemInfoSync();
|
|
|
+
|
|
|
+ console.log('systemInfo', systemInfo);
|
|
|
+
|
|
|
+ if (systemInfo.platform == 'ios') {
|
|
|
+ return currentPlatform.value = 'ios'
|
|
|
+ } else {
|
|
|
+ return currentPlatform.value = 'android'
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
onLoad((options) => {
|
|
|
if (!cacheManager.get('auth')) {
|
|
|
// 游客
|
|
|
routerOpt = options;
|
|
|
- } else {}
|
|
|
+ } else {
|
|
|
+ appleCode.value = cacheManager.get("auth").appleCode
|
|
|
+ isIOSorAndroid()
|
|
|
+ }
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
function checkWrong() {
|
|
|
if (loginFlag.value) {
|
|
|
const AuthCode = getUserIdentity();
|