@@ -1132,7 +1132,8 @@ | |||
{ | |||
"path": "webView", | |||
"style": { | |||
"navigationBarTitleText": "签署用户协议" | |||
"navigationBarTitleText": "签署用户协议", | |||
"navigationStyle": "custom" | |||
} | |||
}, | |||
{ |
@@ -34,7 +34,7 @@ | |||
</view> | |||
<view class="action" style="margin-bottom: 30rpx;"> | |||
<button type="default" class="ui-btn" @click="savaHandle()" v-if="state.isSign"> | |||
确认办理 | |||
{{state.words}} | |||
</button> | |||
<button type="default" class="ui-btn" @click="sign()" v-else> | |||
去签署协议 | |||
@@ -79,7 +79,8 @@ | |||
vehiclePlateColor:"", | |||
details:{}, | |||
isDetails:false, | |||
orderId:"" | |||
orderId:"", | |||
words:"" | |||
}); | |||
onShow(()=>{ | |||
if(state.orderId){ | |||
@@ -139,6 +140,20 @@ onShow(()=>{ | |||
queryAgreement() | |||
}) | |||
} | |||
const getWrlds=()=>{ | |||
if(state.details['orderStatus']!= OrderStatus.已取消){ | |||
// 去支付 | |||
if(state.details['orderStep']==OrderStatus['完成车辆信息上传/待支付'] || state.details['orderStep']==OrderStatus['待支付2']){ | |||
state.words="去支付" | |||
}else if(state.details['orderStep'] == OrderStatus['已支付/待签约']){ | |||
// 去签约 | |||
state.words="去签约" | |||
}else if(state.details['orderStep'] == OrderStatus['待激活']){ | |||
// 待激活 | |||
state.words="去激活" | |||
} | |||
} | |||
} | |||
const savaHandle=()=>{ | |||
if (state.checked) { | |||
if(state.details['orderStatus']!= OrderStatus.已取消){ | |||
@@ -274,9 +289,13 @@ onShow(()=>{ | |||
requestNew(contractQuery, options).then((res) => { | |||
if(res.contractState==1){ | |||
state.isSign=true | |||
// 协议签署了复选框选上 | |||
state.checked=true | |||
}else{ | |||
state.isSign=false | |||
state.checked=false | |||
} | |||
getWrlds() | |||
console.log("查询是否签署协议", res) | |||
}); | |||
} |
@@ -1,22 +1,47 @@ | |||
<template> | |||
<web-view :src="state.url" @message="back"></web-view> | |||
<!-- <cover-view class="custom-nav" @click="closeWebView"> | |||
<cover-image class="close-icon" src="/static/image/icon-back.png" ></cover-image> | |||
<cover-view>返回</cover-view> | |||
</cover-view> --> | |||
<web-view :src="state.url"></web-view> | |||
</template> | |||
<script setup> | |||
import {onLoad} from "@dcloudio/uni-app"; | |||
import {reactive} from "vue"; | |||
const state = reactive({ | |||
url:"" | |||
url:"", | |||
visitCount:0 | |||
}) | |||
onLoad((option) => { | |||
console.log("option",option) | |||
state.url=option.url | |||
state.visitCount++ | |||
}); | |||
const back=()=>{ | |||
console.log("back") | |||
const closeWebView=()=>{ | |||
uni.navigateBack({ | |||
delta:state.visitCount | |||
}) | |||
} | |||
</script> | |||
<style> | |||
<style scoped> | |||
.custom-nav { | |||
position: fixed; | |||
top: 0; | |||
width: 100%; | |||
height: 44px; | |||
background-color: #fff; | |||
display: flex; | |||
justify-content: flex-start; | |||
align-items: center; | |||
z-index: 999; | |||
box-sizing: border-box; | |||
padding: 0 10rpx; | |||
} | |||
.close-icon{ | |||
width: 30rpx; | |||
height: 30rpx; | |||
transform:rotateX(180deg); | |||
} | |||
</style> |