diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index ddd32fe..022a6dc 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -366,6 +366,7 @@ title: 'H5不支持打开小程序' }) }, + changeHandler(e) { const { columnIndex, diff --git a/pages/moreProject/moreProject.vue b/pages/moreProject/moreProject.vue index 0be5903..488c047 100644 --- a/pages/moreProject/moreProject.vue +++ b/pages/moreProject/moreProject.vue @@ -442,7 +442,6 @@ -
填写信息 diff --git a/pages/store/home/index.vue b/pages/store/home/index.vue index 17b4b3e..df3f8a3 100644 --- a/pages/store/home/index.vue +++ b/pages/store/home/index.vue @@ -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 diff --git a/utils/uniMP.js b/utils/uniMP.js index bc3827b..173f75e 100644 --- a/utils/uniMP.js +++ b/utils/uniMP.js @@ -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,