123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- <template>
- <!-- <view class="container">
- <view class="check-content">
- <view class="posi">
- <u-checkbox-group>
- <u-checkbox v-model="checked" shape="circle">
- </u-checkbox>
- </u-checkbox-group>
-
- <view class="content">
- 我已阅读并同意 <text class="item-line" @click="handleDialog('etc')">《ETC用户协议》</text>和<text class="item-line"
- @click="handleDialog('risk')">《风险提示告知书》</text>
- </view>
- </view>
-
- </view>
- <view class='btn-buttom'>
- <button class="btn btn-text as-gravity-center nav-bg as-weight" @click='handleNext'>下一步
- </button>
- </view>
- <u-modal v-model="isShow" width='700rpx' mask-close-able :show-title='false' :show-confirm-button='false'>
- <view class="slot-content">
- <ETCUserAgreement v-if='type=="etc"'/>
- <Risk v-else/>
- </view>
- </u-modal>
- </view> -->
- </template>
- <script setup lang='ts'>
- import {
- ref
- } from 'vue'
- import {
- unifyTemplate
- } from '@/hooks/unifyTemplate'
- import {
- onLoad
- } from '@dcloudio/uni-app';
- import {
- request
- } from '@/utils/network/request'
- import ETCUserAgreement from '@/components/ETCUserAgreement.vue'
- import Risk from '@/components/Risk.vue'
- const {
- initData, //初始化数据
- qdOrderVal //qdOrder中数据 ref
- } = unifyTemplate() //初始化数据
- //获取页面配置
- onLoad((opin) => {
- initData(opin, 3).then(data => {
- // contractTesting(data.qdOrder.qdOrderNo, data.config.jumpPage)
- // contractQuery(data.qdOrder.qdOrderNo, data.config.jumpPage,data)
- uni.navigateTo({
- url: '/' + data.config.jumpPage,
- animationType: 'pop-in',
- animationDuration: 500
- })
- })
- })
- const checked = ref(false)
- // 合同查询
- function contractQuery(qdOrderNo, jumpPage,orderData) {
- const data = {
- orderId: qdOrderVal.value.qtOrderNo //订单id
- }
- request('7e039f28efcb4ff6ae7e3a2111339b87', {
- data,
- }).then((res) => {
- if (res.statusCode === 0) {
- const data = JSON.parse(res.bizContent)
- if (data.signmentState !== 1 || data.contractState !== 1) {
- // 合同处理
- handleContract(orderData)
- } else {
- uni.navigateTo({
- url: '/' + jumpPage,
- animationType: 'pop-in',
- animationDuration: 500
- })
- // 都为1说明可以进行签约检测
- // contractTesting(qdOrderNo, jumpPage)
- }
- }
- })
- }
- const isShow = ref(false)
- const type = ref('')
-
- function handleDialog(types) {
- isShow.value = true
- if (types == 'etc') {
- type.value = 'etc'
- } else {
- type.value = 'risk'
- }
- }
-
- function handleNext() {
- console.log(checked.value);
-
- }
- // 合同处理
- function handleContract(orderData) {
- console.log(qdOrderVal.value);
- let ifCode: any
- if (orderData.order.userType === 'PERSONAL_USER') {
- // 个人合同
- ifCode = 'ec36c36b501341b19407990265a36313'
- } else {
- ifCode = 'b808a5b65cec4fe4b4a873874f9541e8'
- }
- const data = {
- orderId: qdOrderVal.value.qtOrderNo //订单id
- }
- request(ifCode, {
- data,
- }).then((res) => {
- if (res.statusCode === 0) {
- const data = JSON.parse(res.bizContent)
- window.open(data.shortUrl, '_self')
- }
- })
- }
- </script>
- <!-- 签约管理 -->
- <style lang='scss' scoped>
- .sig-manage {
- height: 100vh;
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- }
-
- .container {
- height: 100%;
- width: 100%;
- display: flex;
- flex-direction: column;
- }
-
- :deep(.u-checkbox__label) {
- margin: 0;
- margin-right: 5rpx;
- }
-
- .check-content {
- flex: 1 1 auto;
- position: relative;
-
- .posi {
- position: absolute;
- padding: 20rpx;
- bottom: 30rpx;
- left: 0;
- width: 100%;
- }
- }
-
- .content {
- display: inline;
- word-wrap: break-word;
-
- }
-
- .item-line {
- color: $u-type-primary;
- cursor: pointer;
- }
-
- .btn {
- height: 80rpx;
- opacity: 1;
- border-radius: 100rpx;
- margin: 20rpx;
- }
-
- .btn-text {
- color: #FFFFFF;
- font-size: 28rpx;
- }
-
- .nav-bg {
- /* background: linear-gradient(to right, #13E7C1, #43A1E0); */
- border: 1px solid #FFFFFF;
- background: #1AAC1B;
- }
-
- .btn-buttom {
- flex: 0 0 auto;
- }
-
- .slot-content {
- height: 82vh;
- overflow-y: auto;
- }
- </style>
|