|
@@ -65,14 +65,15 @@
|
|
|
:animation="4000">
|
|
|
<template v-slot="{line}">
|
|
|
<view @tap="tapOpen" :data-url="'../news/index?id=' + line.id" class="line">
|
|
|
- {{ line.title }}</view>
|
|
|
+ {{ line.title }}
|
|
|
+ </view>
|
|
|
</template>
|
|
|
</maoScroll>
|
|
|
</view>
|
|
|
<image @tap="tapNews" src="/static/img/news-right.png" class="icon-right"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="sysData.is_audit == 0">
|
|
|
+ <view v-if="sysData.is_audit == 0 &&showData">
|
|
|
<!--CBB潮贝抢货通道-->
|
|
|
<view class="team-buy" @tap="tapOpen" data-url="/pages/guild/itemIndex" v-if="guData!= null">
|
|
|
<view class="top fx-r fx-bc">
|
|
@@ -251,7 +252,9 @@
|
|
|
<image src="/static/img/index_bg.png" class="bgimg"></image>
|
|
|
<view class="inner-top"></view>
|
|
|
<view class="inner">
|
|
|
- <view style="text-align: center;color: #FC2D47;padding: 25rpx 0rpx;font-size: 36rpx;font-weight: bold;">{{title}}</view>
|
|
|
+ <view
|
|
|
+ style="text-align: center;color: #FC2D47;padding: 25rpx 0rpx;font-size: 36rpx;font-weight: bold;">
|
|
|
+ {{title}}</view>
|
|
|
<scroll-view scroll-y class="max-he">
|
|
|
<u-parse :content="content" :noData="content" />
|
|
|
</scroll-view>
|
|
@@ -285,6 +288,11 @@
|
|
|
maoScroll,
|
|
|
customerWiget
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ showData(newValue, oldValue) {
|
|
|
+ this.isShowInit(newValue);
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
statusBarHeight: 20,
|
|
@@ -295,23 +303,32 @@
|
|
|
product: []
|
|
|
},
|
|
|
content: "",
|
|
|
- title:'',
|
|
|
+ title: '',
|
|
|
isGg: false,
|
|
|
gGid: 0,
|
|
|
merchantData: [],
|
|
|
guData: null,
|
|
|
- merchantCount:0,
|
|
|
+ merchantCount: 0,
|
|
|
page: {
|
|
|
page: 1,
|
|
|
isLoad: false,
|
|
|
isFoot: false
|
|
|
},
|
|
|
wenAr: {},
|
|
|
- isLoad: false
|
|
|
+ isLoad: false,
|
|
|
+ // #ifdef APP
|
|
|
+ showData:false,
|
|
|
+ // #endif
|
|
|
+ // #ifndef APP
|
|
|
+ showData:true,
|
|
|
+ // #endif
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.initView();
|
|
|
+ // #ifdef APP
|
|
|
+ this.isShowInit(false);
|
|
|
+ // #endif
|
|
|
},
|
|
|
onReachBottom() {
|
|
|
if (this.page.isFoot || this.page.isLoad) {
|
|
@@ -322,6 +339,18 @@
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(['setSys', 'getGps']),
|
|
|
+ // #ifdef APP
|
|
|
+ isShowInit(type){
|
|
|
+ uni.setTabBarItem({
|
|
|
+ index:1,
|
|
|
+ visible:type,
|
|
|
+ });
|
|
|
+ uni.setTabBarItem({
|
|
|
+ index:2,
|
|
|
+ visible:type,
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // #endif
|
|
|
initView: function() {
|
|
|
// #ifdef H5
|
|
|
this.h5Foot = 50;
|
|
@@ -359,8 +388,6 @@
|
|
|
this.utils.Tip("加载失败,重新点击尝试!" + JSON.stringify(error));
|
|
|
uni.hideLoading();
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
// #ifdef APP
|
|
|
this.initSys();
|
|
|
// #endif
|
|
@@ -382,21 +409,24 @@
|
|
|
// #endif
|
|
|
|
|
|
},
|
|
|
+ // #ifdef APP
|
|
|
/**
|
|
|
* 基本逻辑
|
|
|
*/
|
|
|
initSys: function() {
|
|
|
+ const that = this;
|
|
|
const appType = uni.getSystemInfoSync().platform;
|
|
|
if (plus != null) {
|
|
|
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
|
|
|
let versionCode = wgtinfo.versionCode;
|
|
|
let arr1 = wgtinfo.version.split('.');
|
|
|
- uni.setStorageSync("showData", false)
|
|
|
+ uni.setStorageSync("showData", false);
|
|
|
+ that.showData = false
|
|
|
if (appType == "ios") {
|
|
|
const getIosUpAppUrl = 'https://itunes.apple.com/cn/lookup?id=6474850968'
|
|
|
- const iosAppStroeUrl ='https://apps.apple.com/cn/app/%E6%98%93%E8%B6%A3cbb/id6474850968';
|
|
|
- uni.setStorageSync("showData", true)
|
|
|
- uni.request({
|
|
|
+ const iosAppStroeUrl =
|
|
|
+ 'https://apps.apple.com/cn/app/%E6%98%93%E8%B6%A3cbb/id6474850968';
|
|
|
+ uni.request({
|
|
|
url: getIosUpAppUrl,
|
|
|
method: 'POST',
|
|
|
data: {},
|
|
@@ -410,12 +440,14 @@
|
|
|
// 判断线上版本是否小于本地版本
|
|
|
if (x < y) {
|
|
|
// 设置显示数据
|
|
|
- uni.setStorageSync("showData",false)
|
|
|
+ uni.setStorageSync("showData", true);
|
|
|
+ that.showData = true
|
|
|
return
|
|
|
}
|
|
|
// 判断线上版本是否大于本地版本
|
|
|
else if (x > y) {
|
|
|
- uni.setStorageSync("showData",false)
|
|
|
+ uni.setStorageSync("showData", false);
|
|
|
+ that.showData = false
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '请更新应用',
|
|
@@ -427,10 +459,11 @@
|
|
|
}
|
|
|
});
|
|
|
return
|
|
|
- }
|
|
|
+ }
|
|
|
// 判断是否本地版本等于线上版本
|
|
|
else if (x == y && i == arr.length - 1) {
|
|
|
- uni.setStorageSync("showData",true)
|
|
|
+ that.showData = true
|
|
|
+ uni.setStorageSync("showData", true)
|
|
|
return
|
|
|
}
|
|
|
}
|
|
@@ -448,13 +481,15 @@
|
|
|
if (res.code == 200) {
|
|
|
this.setSys(res.data);
|
|
|
if (wgtinfo.versionCode < res.data.app_code) {
|
|
|
- uni.setStorageSync("showData", true)
|
|
|
+ uni.setStorageSync("showData", true);
|
|
|
+ that.showData = false;
|
|
|
const upDater = uni.requireNativePlugin("CL-UpDater");
|
|
|
let options = {
|
|
|
title: "升级",
|
|
|
con: res.data.app_update,
|
|
|
downUrl: this.$device.platform == 'ios' ? encodeURI(res
|
|
|
- .data.ios_url) : encodeURI(res.data.android_url), //必填
|
|
|
+ .data.ios_url) : encodeURI(res.data
|
|
|
+ .android_url), //必填
|
|
|
hidCancelbtn: true, //是否隐藏取消按钮;
|
|
|
btnBgColor: "#ff3300", //设置按钮背景色颜色
|
|
|
updateBtnText: "升级", //升级按钮文字,默认为立即升级
|
|
@@ -468,8 +503,10 @@
|
|
|
//必需提供下载地址;
|
|
|
upDater.startUpdate(options, () => {});
|
|
|
} else if (wgtinfo.versionCode > res.data.app_code) {
|
|
|
+ that.showData = false
|
|
|
uni.setStorageSync("showData", false)
|
|
|
} else {
|
|
|
+ that.showData = true
|
|
|
uni.setStorageSync("showData", true)
|
|
|
}
|
|
|
if (res.data.is_audit == 0) {
|
|
@@ -487,11 +524,12 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ // #endif
|
|
|
/**
|
|
|
* 重要提示
|
|
|
|