|
@@ -6,9 +6,6 @@
|
|
|
</view>
|
|
|
<view class="atop2"></view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<view class="top" id="mtop">
|
|
|
<view class="top-body">
|
|
|
<view class="statusBar" :style="'height:' + statusBarHeight + 'px'"></view>
|
|
@@ -19,7 +16,6 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<scroll-view scroll-y :style="{height:'calc(100vh - 80rpx - ' + statusBarHeight + 'px - ' + h5Foot + 'px)'}">
|
|
|
<view class="app-body">
|
|
|
<view class="swiper-img">
|
|
@@ -57,7 +53,7 @@
|
|
|
|
|
|
</view>
|
|
|
<!--消息通知-->
|
|
|
- <view class="news-panel fx-r fx-bc">
|
|
|
+ <view class="news-panel fx-r fx-bc" v-if="showData">
|
|
|
<image src="/static/img/news-icon.png" class="icon"></image>
|
|
|
<view class="label">消息通知</view>
|
|
|
<view class="fx-g1" style="height: 30px;">
|
|
@@ -73,7 +69,7 @@
|
|
|
<image @tap="tapNews" src="/static/img/news-right.png" class="icon-right"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="sysData.is_audit == 0 &&showData">
|
|
|
+ <view v-if="sysData.is_audit == 0">
|
|
|
<!--CBB潮贝抢货通道-->
|
|
|
<view class="team-buy" @tap="tapOpen" data-url="/pages/guild/itemIndex" v-if="guData!= null">
|
|
|
<view class="top fx-r fx-bc">
|
|
@@ -103,7 +99,6 @@
|
|
|
<view class="label" style="color: red;" v-else>闭馆中</view>
|
|
|
<view class="name">状态</view>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="halving"></view>
|
|
|
|
|
|
<view class="item fx-h fx-bc fx-ac">
|
|
@@ -125,8 +120,6 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
|
|
|
<!--文票系统-->
|
|
@@ -147,7 +140,6 @@
|
|
|
</view>
|
|
|
</view> -->
|
|
|
</view>
|
|
|
-
|
|
|
<!--提货好物-->
|
|
|
<view class="goods">
|
|
|
<view class="top fx-r fx-bc fx-ac">
|
|
@@ -159,7 +151,6 @@
|
|
|
<image class="prv" src="/static/img/ic-pev.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="goods-items fx-r">
|
|
|
<view @tap="tapOpen" :data-url="'../goods/index?id=' + item.id" class="item"
|
|
|
v-for="(item,index) in topData.product">
|
|
@@ -176,11 +167,8 @@
|
|
|
<view class="fx-g1"></view>
|
|
|
<view class="btn" v-if="sysData.is_audit == 0">提货</view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
<!--最新门店-->
|
|
|
<view class="shop" v-if="sysData.is_audit == 0">
|
|
@@ -193,9 +181,7 @@
|
|
|
<image class="prv" src="/static/img/ic-pev.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="shop-items">
|
|
|
-
|
|
|
<view class="item fx-r" @tap="tapOpen" :data-url="'../merchant/index?id=' + item.id"
|
|
|
v-for="item in merchantData">
|
|
|
<image :src="item.logo" class="img" mode="aspectFill"></image>
|
|
@@ -234,19 +220,15 @@
|
|
|
<image src="/static/img/shop-location.png"></image>
|
|
|
<view class="text">导航</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<customer-wiget ref="customer"></customer-wiget>
|
|
|
- <view class="popwin fx-h fx-bc fx-ac" v-if="isGg">
|
|
|
+ <view class="popwin fx-h fx-bc fx-ac" v-if="isGg && showData">
|
|
|
<view class="bg"></view>
|
|
|
<view class="body fx-h fx-bc fx-ac">
|
|
|
<image src="/static/img/index_bg.png" class="bgimg"></image>
|
|
@@ -254,7 +236,8 @@
|
|
|
<view class="inner">
|
|
|
<view
|
|
|
style="text-align: center;color: #FC2D47;padding: 25rpx 0rpx;font-size: 36rpx;font-weight: bold;">
|
|
|
- {{title}}</view>
|
|
|
+ {{title}}
|
|
|
+ </view>
|
|
|
<scroll-view scroll-y class="max-he">
|
|
|
<u-parse :content="content" :noData="content" />
|
|
|
</scroll-view>
|
|
@@ -266,10 +249,7 @@
|
|
|
<image src="/static/img/btn-close.png" @tap="isGg = false" class="icon"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -317,10 +297,10 @@
|
|
|
wenAr: {},
|
|
|
isLoad: false,
|
|
|
// #ifdef APP
|
|
|
- showData:false,
|
|
|
+ showData: false,
|
|
|
// #endif
|
|
|
// #ifndef APP
|
|
|
- showData:true,
|
|
|
+ showData: true,
|
|
|
// #endif
|
|
|
}
|
|
|
},
|
|
@@ -340,15 +320,15 @@
|
|
|
methods: {
|
|
|
...mapMutations(['setSys', 'getGps']),
|
|
|
// #ifdef APP
|
|
|
- isShowInit(type){
|
|
|
+ isShowInit(type) {
|
|
|
uni.setTabBarItem({
|
|
|
- index:1,
|
|
|
- visible:type,
|
|
|
+ index: 1,
|
|
|
+ visible: type,
|
|
|
});
|
|
|
- uni.setTabBarItem({
|
|
|
- index:2,
|
|
|
- visible:type,
|
|
|
- })
|
|
|
+ // uni.setTabBarItem({
|
|
|
+ // index:2,
|
|
|
+ // visible:type,
|
|
|
+ // })
|
|
|
},
|
|
|
// #endif
|
|
|
initView: function() {
|
|
@@ -421,17 +401,70 @@
|
|
|
let versionCode = wgtinfo.versionCode;
|
|
|
let arr1 = wgtinfo.version.split('.');
|
|
|
uni.setStorageSync("showData", false);
|
|
|
- that.showData = false
|
|
|
+ that.showData = false;
|
|
|
+
|
|
|
+ this.request.post("sysInit", {
|
|
|
+ code: versionCode
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.setSys(res.data);
|
|
|
+ if (appType != "ios") {
|
|
|
+ if (wgtinfo.versionCode < res.data.app_code) {
|
|
|
+ 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), //必填
|
|
|
+ hidCancelbtn: true, //是否隐藏取消按钮;
|
|
|
+ btnBgColor: "#ff3300", //设置按钮背景色颜色
|
|
|
+ updateBtnText: "升级", //升级按钮文字,默认为立即升级
|
|
|
+ topImgBg: "", //非必填,用于自定义;自定义方法请参考demo,
|
|
|
+ hidBackBtn: true, //可选 默认为false(即会显示后台更新按钮), 设置android 整包更新弹框是否显示后台更新按钮,这个只有android整包更新才有这个参数,热更新是是无法设置的。
|
|
|
+ verCode: res.data
|
|
|
+ .app_version, //最新apk版本号 可选 用于Android整包升级,避免用户取消安装apk时,重复下载问题,如果不传的话,apk将会重新下载,
|
|
|
+ downMsgTip: "资源下载中,请稍后...", //可选(android)
|
|
|
+ goBackBtnText: "进入后台", //可选(android)
|
|
|
+ };
|
|
|
+ //必需提供下载地址;
|
|
|
+ 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) {
|
|
|
+ this.getGps({
|
|
|
+ page: this,
|
|
|
+ fn: (res) => {
|
|
|
+ console.log(res);
|
|
|
+ this.getData(true);
|
|
|
+ },
|
|
|
+ err: (err) => {
|
|
|
+ this.getData(true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
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.request({
|
|
|
url: getIosUpAppUrl,
|
|
|
- method: 'get',
|
|
|
+ method: 'POST',
|
|
|
data: {},
|
|
|
success: res => {
|
|
|
- let arr = res.results[0].version.split('.');
|
|
|
+ let arr = res.data.results[0].version.split('.');
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
// 线上版本号
|
|
|
const x = +arr[i];
|
|
@@ -472,59 +505,7 @@
|
|
|
console.log(res, 'shib');
|
|
|
}
|
|
|
});
|
|
|
- } else {
|
|
|
- this.request.post("sysInit", {
|
|
|
- code: versionCode
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.setSys(res.data);
|
|
|
- if (wgtinfo.versionCode < res.data.app_code) {
|
|
|
- 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), //必填
|
|
|
- hidCancelbtn: true, //是否隐藏取消按钮;
|
|
|
- btnBgColor: "#ff3300", //设置按钮背景色颜色
|
|
|
- updateBtnText: "升级", //升级按钮文字,默认为立即升级
|
|
|
- topImgBg: "", //非必填,用于自定义;自定义方法请参考demo,
|
|
|
- hidBackBtn: true, //可选 默认为false(即会显示后台更新按钮), 设置android 整包更新弹框是否显示后台更新按钮,这个只有android整包更新才有这个参数,热更新是是无法设置的。
|
|
|
- verCode: res.data
|
|
|
- .app_version, //最新apk版本号 可选 用于Android整包升级,避免用户取消安装apk时,重复下载问题,如果不传的话,apk将会重新下载,
|
|
|
- downMsgTip: "资源下载中,请稍后...", //可选(android)
|
|
|
- goBackBtnText: "进入后台", //可选(android)
|
|
|
- };
|
|
|
- //必需提供下载地址;
|
|
|
- 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) {
|
|
|
- this.getGps({
|
|
|
- page: this,
|
|
|
- fn: (res) => {
|
|
|
- console.log(res);
|
|
|
- this.getData(true);
|
|
|
- },
|
|
|
- err: (err) => {
|
|
|
- this.getData(true);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
});
|
|
|
}
|
|
|
},
|