界面更新

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) { onTabItemTap(e) {
uni.pageScrollTo({ uni.pageScrollTo({
selector: ".Circle_friends", selector: ".Circle_friends",
scrollTop: 0 scrollTop: 0
}) })
}, },
onHide() { onHide() {

View File

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

View File

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