Merge pull request '添加拒绝协议按钮' (#395) from zhy into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/395
This commit is contained in:
hansu 2020-11-20 10:22:12 +08:00
commit d552a03ab4

View File

@ -39,7 +39,10 @@
<scroll-view scroll-y class="scroll"> <scroll-view scroll-y class="scroll">
<rich-text class="protocol_content" :nodes="agreement.document_content"></rich-text> <rich-text class="protocol_content" :nodes="agreement.document_content"></rich-text>
</scroll-view> </scroll-view>
<view class="to_agree" @click="to_agree">我同意</view> <view class="agree-btn">
<view class="refuse" @click="refuseAgreement">不同意并退出</view>
<view class="to_agree" @click="to_agree">同意</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -75,7 +78,7 @@
duration: 500, duration: 500,
swiper_index: "", swiper_index: "",
tiaoguo:false, tiaoguo:false,
weizhi:0 weizhi:0,
}; };
}, },
onReady: function(res) { onReady: function(res) {
@ -166,6 +169,21 @@
url: '/pageA/login/login' url: '/pageA/login/login'
}); });
}, },
//
refuseAgreement() {
//退app
// #ifdef APP-PLUS
if (plus.os.name.toLowerCase() === 'android') {
plus.runtime.quit();
} else{
const threadClass = plus.ios.importClass("NSThread");
const mainThread = plus.ios.invoke(threadClass, "mainThread");
plus.ios.invoke(mainThread, "exit");
// ios11
plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
}
// #endif
},
// //
bindInputBlur: function(e) { bindInputBlur: function(e) {
this.inputValue = e.target.value; this.inputValue = e.target.value;
@ -328,15 +346,37 @@
} }
} }
.to_agree { .agree-btn {
width: 558rpx; border-top: #D8D8D8 solid 1rpx;
font-size: 30rpx; // padding-top: 27rpx;
font-weight: bold; display: flex;
color: rgba(255, 121, 16, 1); height: 80rpx;
text-align: center; > view {
padding-top: 27rpx; height: inherit;
border-top: #D8D8D8 solid 1px; flex: 1;
font-size: 30rpx;
font-weight: bold;
text-align: center;
line-height: 80rpx;
}
.refuse {
color: #999;
position: relative;
&:after {
content: "";
height: 80rpx;
width: 1rpx;
background-color: #D8D8D8;
position: absolute;
right: 0;
top: 0;
}
}
.to_agree {
color: rgba(255, 121, 16, 1);
}
} }
} }
} }
</style> </style>