升级弹窗以及交易申请优化
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;">
|
||||
|
@ -120,29 +120,14 @@ const actions = {
|
||||
Appversion({
|
||||
version: os.appWgtVersion,
|
||||
type: apptype,
|
||||
phone_brand: os.brand
|
||||
phone_brand:os.brand
|
||||
|
||||
}).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) => {
|
||||
|
@ -9,7 +9,7 @@
|
||||
<view class="version-name" v-if="updateParams.versionName">V{{ updateParams.versionName }}</view>
|
||||
</view>
|
||||
<view class="title">更新内容:</view>
|
||||
<view class="content" >
|
||||
<view class="content">
|
||||
<rich-text :nodes="content" />
|
||||
</view>
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom" v-if="!updateParams.force" @click="back">
|
||||
<view class="line"/>
|
||||
<view class="line" />
|
||||
<image src="../assets/close.png" class="close" />
|
||||
</view>
|
||||
|
||||
@ -37,9 +37,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { download, install } from "../updater";
|
||||
import {
|
||||
download,
|
||||
install
|
||||
} from "../updater";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
data() {
|
||||
const data = {
|
||||
updateParams: {},
|
||||
@ -54,7 +57,7 @@ export default {
|
||||
content() {
|
||||
return (this.updateParams.content || '').replace(/[\r\n]/gim, '<br/>');
|
||||
},
|
||||
downloadText () {
|
||||
downloadText() {
|
||||
if (this.downloadSucc) {
|
||||
return this.updateParams.downSucTip;
|
||||
}
|
||||
@ -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,19 +161,22 @@ export default {
|
||||
this.downloadError = true;
|
||||
return this.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
page {
|
||||
page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@ -153,16 +184,16 @@ page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
.main {
|
||||
width: 75%;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
.header {
|
||||
position: relative;
|
||||
|
||||
.bg1 {
|
||||
@ -199,9 +230,9 @@ page {
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
.title {
|
||||
background-color: #ff6d42;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
@ -211,18 +242,18 @@ page {
|
||||
line-height: 26rpx;
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.content {
|
||||
margin-top: 12rpx;
|
||||
margin-left: 30rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 2;
|
||||
max-height: 240rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
.button {
|
||||
margin: 20rpx 30rpx;
|
||||
background-color: #ffaa00;
|
||||
color: #fff;
|
||||
@ -241,9 +272,9 @@ page {
|
||||
opacity: 1;
|
||||
pointer-events: initial;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
.progress {
|
||||
padding: 50rpx 50rpx 18rpx;
|
||||
|
||||
.slider {
|
||||
@ -295,21 +326,23 @@ page {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
.bottom {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 3rpx;
|
||||
height: 50rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.close {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
margin-top: -4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user