小程序更新
This commit is contained in:
parent
53a10e90ae
commit
80b7cde0af
@ -366,6 +366,7 @@
|
|||||||
title: 'H5不支持打开小程序'
|
title: 'H5不支持打开小程序'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
changeHandler(e) {
|
changeHandler(e) {
|
||||||
const {
|
const {
|
||||||
columnIndex,
|
columnIndex,
|
||||||
|
@ -442,7 +442,6 @@
|
|||||||
<view class="userpage-icon" @click="close">
|
<view class="userpage-icon" @click="close">
|
||||||
<image src="@/static/images/close.png" mode=""></image>
|
<image src="@/static/images/close.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<form report-submit='true' style="height: 90%;">
|
<form report-submit='true' style="height: 90%;">
|
||||||
<view class='merchantsSettled' :style="{'height':Fheight}">
|
<view class='merchantsSettled' :style="{'height':Fheight}">
|
||||||
<view class="title">填写信息</view>
|
<view class="title">填写信息</view>
|
||||||
|
@ -781,7 +781,7 @@
|
|||||||
userinfo(){
|
userinfo(){
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
|
|
||||||
this.business_status=res.data.mer_info.business_status
|
this.business_status=res.data.mer_info.setting_status
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getProductSpu() {
|
getProductSpu() {
|
||||||
@ -968,7 +968,7 @@
|
|||||||
// this.tabs = this.tabs2
|
// this.tabs = this.tabs2
|
||||||
// this.service_open = false
|
// this.service_open = false
|
||||||
// }
|
// }
|
||||||
if(this.business_status==2){
|
if(this.business_status==1){
|
||||||
this.isLihaiYun === 'Lihai' ? this.tabs = this.tabs4 : this.tabs = this.tabs3
|
this.isLihaiYun === 'Lihai' ? this.tabs = this.tabs4 : this.tabs = this.tabs3
|
||||||
}else{
|
}else{
|
||||||
this.tabs = this.tabs5
|
this.tabs = this.tabs5
|
||||||
|
@ -67,11 +67,11 @@ const loadMP = async (id) => {
|
|||||||
console.log('初始化完成', wgtFile);
|
console.log('初始化完成', wgtFile);
|
||||||
installMP();
|
installMP();
|
||||||
},
|
},
|
||||||
fail(res) {
|
fail(res) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
timer = null;
|
timer = null;
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
downloadTask.onProgressUpdate((res) => {
|
downloadTask.onProgressUpdate((res) => {
|
||||||
// console.log('初始化进度' + res.progress);
|
// console.log('初始化进度' + res.progress);
|
||||||
@ -89,6 +89,7 @@ const loadMP = async (id) => {
|
|||||||
|
|
||||||
//加载商城小程序
|
//加载商城小程序
|
||||||
const loadMPx = async (id) => {
|
const loadMPx = async (id) => {
|
||||||
|
|
||||||
appid = id;
|
appid = id;
|
||||||
let info = await miniapp();
|
let info = await miniapp();
|
||||||
console.log('最新版本', info.data);
|
console.log('最新版本', info.data);
|
||||||
@ -106,7 +107,8 @@ const loadMPx = async (id) => {
|
|||||||
} else {
|
} else {
|
||||||
flag = true
|
flag = true
|
||||||
}
|
}
|
||||||
if (0 != ret.code || compareVersions(info.data.appInfo.version, ret.versionInfo.name) == 1 || flag ==
|
if (0 != ret.code || compareVersions(info.data.appInfo.version, ret.versionInfo.name) == 1 ||
|
||||||
|
flag ==
|
||||||
true) {
|
true) {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
@ -119,7 +121,7 @@ const loadMPx = async (id) => {
|
|||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
}, 600)
|
}, 600)
|
||||||
|
|
||||||
let downloadTask = uni.downloadFile({
|
let downloadTask = uni.downloadFile({
|
||||||
url: info.data.appInfo.dow_url,
|
url: info.data.appInfo.dow_url,
|
||||||
success(res) {
|
success(res) {
|
||||||
@ -127,11 +129,11 @@ const loadMPx = async (id) => {
|
|||||||
console.log('初始化完成', wgtFile);
|
console.log('初始化完成', wgtFile);
|
||||||
installMP();
|
installMP();
|
||||||
},
|
},
|
||||||
fail(res) {
|
fail(res) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
timer = null;
|
timer = null;
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
downloadTask.onProgressUpdate((res) => {
|
downloadTask.onProgressUpdate((res) => {
|
||||||
// console.log('初始化进度' + res.progress);
|
// console.log('初始化进度' + res.progress);
|
||||||
@ -152,10 +154,10 @@ const loadMPurl = async (e) => {
|
|||||||
appid = e.id;
|
appid = e.id;
|
||||||
mp.getUniMPVersion(appid, (ret) => {
|
mp.getUniMPVersion(appid, (ret) => {
|
||||||
console.log('当前版本', ret);
|
console.log('当前版本', ret);
|
||||||
wgtFile = e.url;
|
wgtFile = e.url;
|
||||||
doInstallMP();
|
doInstallMP();
|
||||||
// if (0 != ret.code) {
|
// if (0 != ret.code) {
|
||||||
// wgtFile = e.url;
|
// wgtFile = e.url;
|
||||||
// installMP();
|
// installMP();
|
||||||
// } else {
|
// } else {
|
||||||
// open()
|
// open()
|
||||||
@ -188,8 +190,8 @@ const doInstallMP = () => {
|
|||||||
open();
|
open();
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
timer = null;
|
timer = null;
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '初始化失败',
|
title: '初始化失败',
|
||||||
content: JSON.stringify(r),
|
content: JSON.stringify(r),
|
||||||
@ -206,13 +208,13 @@ const open = (id = null) => {
|
|||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '请先登录'
|
title: '请先登录'
|
||||||
})
|
})
|
||||||
let avatar = store?.state?.userInfo?.avatar;
|
let avatar = store?.state?.userInfo?.avatar;
|
||||||
mp.openUniMP({
|
mp.openUniMP({
|
||||||
appid: id || appid,
|
appid: id || appid,
|
||||||
extraData: {
|
extraData: {
|
||||||
uniMP: true,
|
uniMP: true,
|
||||||
token: token,
|
token: token,
|
||||||
avatar: avatar,
|
avatar: avatar,
|
||||||
}
|
}
|
||||||
}, (ret) => {
|
}, (ret) => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
@ -229,8 +231,8 @@ const open = (id = null) => {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
loadMP,
|
loadMP,
|
||||||
loadMPurl,
|
loadMPurl,
|
||||||
loadMPx,
|
loadMPx,
|
||||||
installMP,
|
installMP,
|
||||||
doInstallMP,
|
doInstallMP,
|
||||||
getVersion,
|
getVersion,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user