diff --git a/pages/contract/index.vue b/pages/contract/index.vue index 4461b37..28e9c70 100644 --- a/pages/contract/index.vue +++ b/pages/contract/index.vue @@ -3,12 +3,11 @@
- + + - + @@ -35,47 +34,46 @@ export default { flowId: null, signUrl: null, downShow: false, - selectItem: null, - tipsShow:false, - userInfo:null + tipsShow: false, + userInfo: null }; }, onShow() { }, - onLoad(){ + onLoad() { this.init(); this.userinfo(); }, methods: { init() { this.isSignContract() - + }, - userinfo(){ - getUserInfo().then(res=>{ - if(res.bizcode == 100){ + userinfo() { + getUserInfo().then(res => { + if (res.bizcode == 100) { this.userInfo = res.data; } - console.log('res',res) + console.log('res', res) }) }, - onConfirm(){ + onConfirm() { this.onTipsCancel(); uni.navigateTo({ - url:'/pages/mine_package/mine_authentication/mine_authentication' + url: '/pages/mine_package/mine_authentication/mine_authentication' }) }, - onTipsCancel(){ - this.tipsShow =false; + onTipsCancel() { + this.tipsShow = false; }, - onCancel(){ + onCancel() { this.downShow = false; }, isSignContract() { signContract().then(res => { if (res.bizcode == 100) { this.type = res.data; - if(this.type){ + if (this.type) { this.getSignContract() } } else { @@ -112,11 +110,11 @@ export default { }, // 发起合同签章 async onSignContract() { - if(this.userInfo.certStatus == 0){ + if (this.userInfo.certStatus == 0) { this.downShow = false; this.tipsShow = true; return; - }else if(this.userInfo.certStatus == 1){ + } else if (this.userInfo.certStatus == 1) { this.downShow = false; this.$refs.uToastRef.show({ type: 'success', @@ -124,11 +122,8 @@ export default { }); return; } - const params = { - // 需要的参数 - orderId: this.selectItem.id, - } - const { bizcode, data } = await signContract(params); + + const { bizcode, data } = await signContract(); if (bizcode === 100) { this.flowId = data.flowId;