小程序更新

This commit is contained in:
jia 2023-09-26 16:03:19 +08:00
parent 53a10e90ae
commit 80b7cde0af
4 changed files with 26 additions and 24 deletions

View File

@ -366,6 +366,7 @@
title: 'H5不支持打开小程序'
})
},
changeHandler(e) {
const {
columnIndex,

View File

@ -442,7 +442,6 @@
<view class="userpage-icon" @click="close">
<image src="@/static/images/close.png" mode=""></image>
</view>
<form report-submit='true' style="height: 90%;">
<view class='merchantsSettled' :style="{'height':Fheight}">
<view class="title">填写信息</view>

View File

@ -781,7 +781,7 @@
userinfo(){
getUserInfo().then(res => {
this.business_status=res.data.mer_info.business_status
this.business_status=res.data.mer_info.setting_status
})
},
getProductSpu() {
@ -968,7 +968,7 @@
// this.tabs = this.tabs2
// 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
}else{
this.tabs = this.tabs5

View File

@ -67,11 +67,11 @@ const loadMP = async (id) => {
console.log('初始化完成', wgtFile);
installMP();
},
fail(res) {
clearInterval(timer);
timer = null;
uni.hideLoading();
}
fail(res) {
clearInterval(timer);
timer = null;
uni.hideLoading();
}
});
downloadTask.onProgressUpdate((res) => {
// console.log('初始化进度' + res.progress);
@ -89,6 +89,7 @@ const loadMP = async (id) => {
//加载商城小程序
const loadMPx = async (id) => {
appid = id;
let info = await miniapp();
console.log('最新版本', info.data);
@ -106,7 +107,8 @@ const loadMPx = async (id) => {
} else {
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) {
let count = 0;
timer = setInterval(() => {
@ -119,7 +121,7 @@ const loadMPx = async (id) => {
mask: true
})
}, 600)
let downloadTask = uni.downloadFile({
url: info.data.appInfo.dow_url,
success(res) {
@ -127,11 +129,11 @@ const loadMPx = async (id) => {
console.log('初始化完成', wgtFile);
installMP();
},
fail(res) {
clearInterval(timer);
timer = null;
uni.hideLoading();
}
fail(res) {
clearInterval(timer);
timer = null;
uni.hideLoading();
}
});
downloadTask.onProgressUpdate((res) => {
// console.log('初始化进度' + res.progress);
@ -152,10 +154,10 @@ const loadMPurl = async (e) => {
appid = e.id;
mp.getUniMPVersion(appid, (ret) => {
console.log('当前版本', ret);
wgtFile = e.url;
doInstallMP();
wgtFile = e.url;
doInstallMP();
// if (0 != ret.code) {
// wgtFile = e.url;
// wgtFile = e.url;
// installMP();
// } else {
// open()
@ -188,8 +190,8 @@ const doInstallMP = () => {
open();
} else {
uni.hideLoading();
clearInterval(timer);
timer = null;
clearInterval(timer);
timer = null;
uni.showModal({
title: '初始化失败',
content: JSON.stringify(r),
@ -206,13 +208,13 @@ const open = (id = null) => {
icon: 'none',
title: '请先登录'
})
let avatar = store?.state?.userInfo?.avatar;
let avatar = store?.state?.userInfo?.avatar;
mp.openUniMP({
appid: id || appid,
extraData: {
uniMP: true,
token: token,
avatar: avatar,
avatar: avatar,
}
}, (ret) => {
uni.hideLoading();
@ -229,8 +231,8 @@ const open = (id = null) => {
export default {
loadMP,
loadMPurl,
loadMPx,
loadMPurl,
loadMPx,
installMP,
doInstallMP,
getVersion,