no message

This commit is contained in:
2025-08-13 23:18:06 +08:00
parent 6a27d7b04f
commit c8fac3103a
6 changed files with 103 additions and 15 deletions
+2 -1
View File
@@ -4,7 +4,7 @@
<Header title="查看合同" />
<view class="contract-view">
<view class="top-info flex-r-lr">
<image src="../../static/logo.png"></image>
<image src="@/static/new/he.png"></image>
<view class="right-view">
<text class="text-36 text-zu">消费型合伙人协议</text>
<view class="bottom-panel">
@@ -32,6 +32,7 @@
</view>
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
+49 -7
View File
@@ -3,12 +3,14 @@
<TopSafe></TopSafe>
<Header title="我的合同" />
<view class="contract-view">
<ContractItem :type="obj && obj.state" :text="obj && obj.signatureName" :time="obj && obj.time" class="mt-24"
<ContractItem :type="type" :text="obj && obj.signatureName" :time="obj && obj.time" class="mt-24"
@click="onBtn"></ContractItem>
</view>
<down-popup :show="downShow" @ok="onSignContract" @click="downShow = false" />
<u-modal :show="tipsShow" :showCancelButton="true" confirmText="去认证"
@cancel="onTipsCancel" @confirm="onConfirm" confirmColor="#7934F6"
title="提示" content='签署合同需要进行实名认证,请先完成实名认证'></u-modal>
<DownPopup :show="downShow" @ok="onSignContract" @cancel="onCancel" />
<up-toast ref="uToastRef"></up-toast>
<!-- 腾讯电子签H5 → 集成到UniApp -->
<web-view v-if="signUrl" :src="signUrl" @message="handleMessage"></web-view>
</view>
@@ -34,20 +36,48 @@ export default {
signUrl: null,
downShow: false,
selectItem: null,
tipsShow:false,
userInfo:null
};
},
onShow() {
},
onLoad(){
this.init();
this.userinfo();
},
methods: {
init() {
// this.isSignContract()
this.getSignContract()
this.isSignContract()
},
userinfo(){
getUserInfo().then(res=>{
if(res.bizcode == 100){
this.userInfo = res.data;
}
console.log('res',res)
})
},
onConfirm(){
this.onTipsCancel();
uni.navigateTo({
url:'/pages/mine_package/mine_authentication/mine_authentication'
})
},
onTipsCancel(){
this.tipsShow =false;
},
onCancel(){
this.downShow = false;
},
isSignContract() {
signContract().then(res => {
if (res.bizcode == 100) {
this.type = res.data;
if(this.type){
this.getSignContract()
}
} else {
this.$refs.uToastRef.show({
type: 'error',
@@ -58,7 +88,7 @@ export default {
},
getSignContract() {
getContractList().then(res => {
if (res.bizcode == 100) {
if (res.bizcode == 100 && res.data.length) {
this.obj = res.data[0];
this.obj.time = func.formatDate(new Date(res.data[0].signatureTime), 3)
} else {
@@ -82,6 +112,18 @@ export default {
},
// 发起合同签章
async onSignContract() {
if(this.userInfo.certStatus == 0){
this.downShow = false;
this.tipsShow = true;
return;
}else if(this.userInfo.certStatus == 1){
this.downShow = false;
this.$refs.uToastRef.show({
type: 'success',
message: '请耐心等待审核通过',
});
return;
}
const params = {
// 需要的参数
orderId: this.selectItem.id,