界面更新

This commit is contained in:
jia 2023-09-13 20:14:05 +08:00
parent 48a3aab41b
commit 573fc2fda0
3 changed files with 39 additions and 26 deletions

View File

@ -221,13 +221,11 @@
},
onTabItemTap(e) {
uni.pageScrollTo({
selector: ".Circle_friends",
scrollTop: 0
})
},
onHide() {

View File

@ -435,7 +435,6 @@
onShow() {
this.cartFn()
},
//
onReachBottom() {
if (this.flag || !this.goodsList.length) return

View File

@ -117,38 +117,54 @@ const actions = {
} else {
apptype = 1
}
console.log(os)
Appversion({
version: os.appWgtVersion,
type: apptype
type: apptype,
phone_brand: os.brand
}).then((res) => {
if (Object.keys(res.data.appInfo).length > 0) {
// if(res.data.appInfo.version) uni.showLoading({
// if(res.data.appInfo.version) uni.showLoading({
// title: '检查更新中'
// })
// 版本更新
if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 &&
compareVersions(res.data.appInfo.version,
wgt_v) == 1) {
try {
let info = res.data.appInfo || {};
let version = {
title: info.title || '发现新版本',
content: info.content || '修复了部分BUG',
versionName: info.version || '1.0.1',
downUrl: info.dow_url || '',
force: info.force == 1 ? true : false, // 是否强制更新
quiet: info.quiet == 1 ? true : false // 是否静默更新
}
Updater.update(version);
} catch (e) {
console.log(e);
if (res.data.appInfo.phone_brand.length > 0) {
if (plus.os.name == "Android") {
// 跳转安卓应用市场
let appurl = res.data.appInfo.
.dow_url //这个是通用应用市场如果想指定某个应用商店需要单独查这个应用商店的包名或scheme及参数
plus.runtime.openURL(appurl)
} else {
// 跳转AppStore
plus.runtime.launchApplication({
action: res.data.appInfo..dow_url,
})
}
} else {
// 版本更新
if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 &&
compareVersions(res.data.appInfo.version,
wgt_v) == 1) {
try {
let info = res.data.appInfo || {};
let version = {
title: info.title || '发现新版本',
content: info.content || '修复了部分BUG',
versionName: info.version || '1.0.1',
downUrl: info.dow_url || '',
force: info.force == 1 ? true : false, // 是否强制更新
quiet: info.quiet == 1 ? true : false // 是否静默更新
}
Updater.update(version);
} catch (e) {
console.log(e);
}
// uni.hideLoading();
}
// uni.hideLoading();
}
}