升级弹窗以及交易申请优化
This commit is contained in:
parent
3ae87e293a
commit
d1366e2425
@ -291,6 +291,7 @@
|
||||
this.getUniMp(data);
|
||||
break;
|
||||
case 2:
|
||||
|
||||
this.navigator(data);
|
||||
break;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="gather">
|
||||
<block v-if="isShow">
|
||||
<block v-if="isShow&&userInfoData.mer_info.mer_name">
|
||||
<view class="" v-if="userInfoData.mer_info.business_status==2">
|
||||
<view class="special_work com" v-if="userInfoData.mer_info.type_code === 'TypeSupplyChain'">
|
||||
<view class="special_work com" v-if="true">
|
||||
@ -363,14 +363,7 @@
|
||||
</view>
|
||||
|
||||
</block>
|
||||
<!-- <m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
<view class="custom_style">
|
||||
<view class="custom_style_icon"></view>
|
||||
</view>
|
||||
</template>
|
||||
</m-tabbar> -->
|
||||
<view class="" style="padding-top: 1px;" v-if='jurisdiction==false&&isShow==false'>
|
||||
<view class="" style="padding-top: 1px;" v-else>
|
||||
<emptyPage title="暂无信息"></emptyPage>
|
||||
</view>
|
||||
|
||||
|
@ -173,7 +173,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
navigateBack,
|
||||
|
||||
Toast
|
||||
} from '@/libs/uniApi.js'
|
||||
import {
|
||||
@ -396,15 +396,20 @@
|
||||
merchantUpdateAPI(data).then(res => {
|
||||
Toast(res.message)
|
||||
setTimeout(() => {
|
||||
// uni.switchTab({
|
||||
// url: '/pages/moreProject/moreProject',
|
||||
// fail: (err) => {
|
||||
// // console.log('err', err);
|
||||
// }
|
||||
// });
|
||||
// uni.navigateTo({
|
||||
// url:'/pages/moreProject/moreProject'
|
||||
// })
|
||||
uni.redirectTo({
|
||||
url:'/pages/moreProject/moreProject'
|
||||
})
|
||||
|
||||
uni.switchTab({
|
||||
url: '/pages/moreProject/moreProject',
|
||||
fail: (err) => {
|
||||
// console.log('err', err);
|
||||
}
|
||||
});
|
||||
|
||||
}, 2000)
|
||||
}, 1000)
|
||||
}).catch(err => {
|
||||
Toast(err)
|
||||
})
|
||||
|
@ -11,15 +11,14 @@
|
||||
</view>
|
||||
|
||||
<view class="content_title_c" v-else-if="item.status==2">
|
||||
申请拒绝
|
||||
已拒绝
|
||||
</view>
|
||||
<view class="content_title_b" v-else-if="item.status==0">
|
||||
审核中
|
||||
</view>
|
||||
|
||||
|
||||
<view class="content_title_d">
|
||||
{{item.type_name}}
|
||||
{{item.mer_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="item.fail_msg" style="margin-top: -50rpx;color: red;">
|
||||
|
@ -125,24 +125,9 @@ const actions = {
|
||||
}).then((res) => {
|
||||
|
||||
if (Object.keys(res.data.appInfo).length > 0) {
|
||||
|
||||
// if(res.data.appInfo.version) uni.showLoading({
|
||||
// title: '检查更新中'
|
||||
// })
|
||||
|
||||
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,
|
||||
@ -153,17 +138,19 @@ const actions = {
|
||||
title: info.title || '发现新版本',
|
||||
content: info.content || '修复了部分BUG',
|
||||
versionName: info.version || '1.0.1',
|
||||
|
||||
brand:res.data.appInfo.phone_brand,
|
||||
downUrl: info.dow_url || '',
|
||||
force: info.force == 1 ? true : false, // 是否强制更新
|
||||
quiet: info.quiet == 1 ? true : false // 是否静默更新
|
||||
}
|
||||
Updater.update(version);
|
||||
|
||||
Updater.update(version,res.data.appInfo);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
// uni.hideLoading();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}).catch((err) => {
|
||||
|
@ -37,7 +37,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { download, install } from "../updater";
|
||||
import {
|
||||
download,
|
||||
install
|
||||
} from "../updater";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -68,6 +71,7 @@ export default {
|
||||
},
|
||||
},
|
||||
onLoad(params) {
|
||||
|
||||
const data = {
|
||||
title: '发现新版本',
|
||||
updateBtnText: '立即升级',
|
||||
@ -84,6 +88,7 @@ export default {
|
||||
return this.updateParams.force;
|
||||
},
|
||||
methods: {
|
||||
|
||||
back() {
|
||||
if (!this.updateParams.force) {
|
||||
uni.navigateBack();
|
||||
@ -96,7 +101,8 @@ export default {
|
||||
}
|
||||
|
||||
// ios 跳转到appstore,.apk、.wgt 直接安装更新
|
||||
const isResource = ['.apk', '.wgt'].some(ext => this.updateParams.downUrl.toLocaleLowerCase().includes(ext));
|
||||
const isResource = ['.apk', '.wgt'].some(ext => this.updateParams.downUrl.toLocaleLowerCase().includes(
|
||||
ext));
|
||||
if (plus.os.name !== "Android" || !isResource) {
|
||||
plus.runtime.openURL(this.updateParams.downUrl);
|
||||
return;
|
||||
@ -123,6 +129,28 @@ export default {
|
||||
});
|
||||
},
|
||||
handleButton() {
|
||||
|
||||
if (this.updateParams.brand.length > 0) {
|
||||
if (plus.os.name == "Android") {
|
||||
// 跳转安卓应用市场
|
||||
let appurl = this.updateParams.downUrl //这个是通用应用市场,如果想指定某个应用商店,需要单独查这个应用商店的包名或scheme及参数
|
||||
plus.runtime.openURL(appurl)
|
||||
|
||||
setTimeout((res) => {
|
||||
this.back()
|
||||
}, 1000)
|
||||
|
||||
|
||||
} else {
|
||||
// 跳转AppStore
|
||||
plus.runtime.launchApplication({
|
||||
action: this.updateParams.downUrl,
|
||||
})
|
||||
setTimeout((res) => {
|
||||
this.back()
|
||||
}, 1000)
|
||||
}
|
||||
} else {
|
||||
if (!this.downloading) {
|
||||
return this.start();
|
||||
}
|
||||
@ -133,6 +161,9 @@ export default {
|
||||
this.downloadError = true;
|
||||
return this.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -301,11 +332,13 @@ page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 3rpx;
|
||||
height: 50rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.close {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user