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