feat:订单id
This commit is contained in:
+22
-27
@@ -3,12 +3,11 @@
|
|||||||
<TopSafe></TopSafe>
|
<TopSafe></TopSafe>
|
||||||
<Header title="我的合同" />
|
<Header title="我的合同" />
|
||||||
<view class="contract-view">
|
<view class="contract-view">
|
||||||
<ContractItem :type="type" :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">
|
||||||
@click="onBtn"></ContractItem>
|
</ContractItem>
|
||||||
</view>
|
</view>
|
||||||
<u-modal :show="tipsShow" :showCancelButton="true" confirmText="去认证"
|
<u-modal :show="tipsShow" :showCancelButton="true" confirmText="去认证" @cancel="onTipsCancel" @confirm="onConfirm"
|
||||||
@cancel="onTipsCancel" @confirm="onConfirm" confirmColor="#7934F6"
|
confirmColor="#7934F6" title="提示" content='签署合同需要进行实名认证,请先完成实名认证'></u-modal>
|
||||||
title="提示" content='签署合同需要进行实名认证,请先完成实名认证'></u-modal>
|
|
||||||
<DownPopup :show="downShow" @ok="onSignContract" @cancel="onCancel" />
|
<DownPopup :show="downShow" @ok="onSignContract" @cancel="onCancel" />
|
||||||
<up-toast ref="uToastRef"></up-toast>
|
<up-toast ref="uToastRef"></up-toast>
|
||||||
<!-- 腾讯电子签H5 → 集成到UniApp -->
|
<!-- 腾讯电子签H5 → 集成到UniApp -->
|
||||||
@@ -35,47 +34,46 @@ export default {
|
|||||||
flowId: null,
|
flowId: null,
|
||||||
signUrl: null,
|
signUrl: null,
|
||||||
downShow: false,
|
downShow: false,
|
||||||
selectItem: null,
|
tipsShow: false,
|
||||||
tipsShow:false,
|
userInfo: null
|
||||||
userInfo:null
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad() {
|
||||||
this.init();
|
this.init();
|
||||||
this.userinfo();
|
this.userinfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
this.isSignContract()
|
this.isSignContract()
|
||||||
|
|
||||||
},
|
},
|
||||||
userinfo(){
|
userinfo() {
|
||||||
getUserInfo().then(res=>{
|
getUserInfo().then(res => {
|
||||||
if(res.bizcode == 100){
|
if (res.bizcode == 100) {
|
||||||
this.userInfo = res.data;
|
this.userInfo = res.data;
|
||||||
}
|
}
|
||||||
console.log('res',res)
|
console.log('res', res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onConfirm(){
|
onConfirm() {
|
||||||
this.onTipsCancel();
|
this.onTipsCancel();
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/mine_package/mine_authentication/mine_authentication'
|
url: '/pages/mine_package/mine_authentication/mine_authentication'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onTipsCancel(){
|
onTipsCancel() {
|
||||||
this.tipsShow =false;
|
this.tipsShow = false;
|
||||||
},
|
},
|
||||||
onCancel(){
|
onCancel() {
|
||||||
this.downShow = false;
|
this.downShow = false;
|
||||||
},
|
},
|
||||||
isSignContract() {
|
isSignContract() {
|
||||||
signContract().then(res => {
|
signContract().then(res => {
|
||||||
if (res.bizcode == 100) {
|
if (res.bizcode == 100) {
|
||||||
this.type = res.data;
|
this.type = res.data;
|
||||||
if(this.type){
|
if (this.type) {
|
||||||
this.getSignContract()
|
this.getSignContract()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -112,11 +110,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 发起合同签章
|
// 发起合同签章
|
||||||
async onSignContract() {
|
async onSignContract() {
|
||||||
if(this.userInfo.certStatus == 0){
|
if (this.userInfo.certStatus == 0) {
|
||||||
this.downShow = false;
|
this.downShow = false;
|
||||||
this.tipsShow = true;
|
this.tipsShow = true;
|
||||||
return;
|
return;
|
||||||
}else if(this.userInfo.certStatus == 1){
|
} else if (this.userInfo.certStatus == 1) {
|
||||||
this.downShow = false;
|
this.downShow = false;
|
||||||
this.$refs.uToastRef.show({
|
this.$refs.uToastRef.show({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@@ -124,11 +122,8 @@ export default {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const params = {
|
|
||||||
// 需要的参数
|
const { bizcode, data } = await signContract();
|
||||||
orderId: this.selectItem.id,
|
|
||||||
}
|
|
||||||
const { bizcode, data } = await signContract(params);
|
|
||||||
if (bizcode === 100) {
|
if (bizcode === 100) {
|
||||||
this.flowId = data.flowId;
|
this.flowId = data.flowId;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user