From 22271e641e4505ba906c3770905b7e84e3ad8d85 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 02 四月 2024 17:05:57 +0800
Subject: [PATCH] mrshi
---
wx/pages/addition_subtraction_details/addition_subtraction_details.vue | 126 +++++++++++++++++++++++++++++++++++++-----
1 files changed, 111 insertions(+), 15 deletions(-)
diff --git a/wx/pages/addition_subtraction_details/addition_subtraction_details.vue b/wx/pages/addition_subtraction_details/addition_subtraction_details.vue
index 03fa9b9..13fde07 100644
--- a/wx/pages/addition_subtraction_details/addition_subtraction_details.vue
+++ b/wx/pages/addition_subtraction_details/addition_subtraction_details.vue
@@ -95,15 +95,15 @@
<template v-if="info && info.solutionType === 0">
<!-- 宸茬敓鏁� -->
<view class="details_footer" v-if="info.status === 2">
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鐢宠鍗�"></u-button>
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鐢宠鍗�" @click="seePdf(info.applyFile.fileurlFull)"></u-button>
<view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鎵瑰崟"></u-button>
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鎵瑰崟" @click="seePdf(info.pidanFile.fileurlFull)"></u-button>
</view>
<!-- 寰呭鏍� -->
<view class="details_footer" v-if="info.status === 1">
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�"></u-button>
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�" @click="show = true"></u-button>
<view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" text="鏌ョ湅鐢宠鍗�"></u-button>
+ <u-button type="primary" shape="circle" color="#437CB3" text="鏌ョ湅鐢宠鍗�" @click="seePdf(info.applyFile.fileurlFull)"></u-button>
</view>
<!-- 宸查��鍥� -->
<view class="details_footer" v-if="info.status === 5">
@@ -111,9 +111,9 @@
</view>
<!-- 寰呯缃� -->
<view class="details_footer" v-if="info.status === 0">
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�"></u-button>
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" @click="show = true" text="鐢宠閫�鍥�"></u-button>
<view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" @click="show1 = true" text="绛剧讲鎶曚繚鍗�"></u-button>
+ <u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲鎶曚繚鍗�" @click="openmessage(1)"></u-button>
</view>
</template>
<!-- 濮旀墭淇� -->
@@ -145,11 +145,15 @@
<u-modal :show="show1" title="鑾峰彇楠岃瘉鐮�" :showCancelButton="true" confirmColor="#437CB3" @cancel="cancel1" @confirm="confirm1">
<view class="code">
<view class="code_input">
- <input type="text" placeholder="杈撳叆楠岃瘉鐮�" />
+ <input type="text" v-model="code" placeholder="杈撳叆楠岃瘉鐮�" />
</view>
<view class="code_text">
- <text class="code_text_error">楠岃瘉鐮侀敊璇�</text>
- <text>鑾峰彇楠岃瘉鐮�</text>
+ <text class="code_text_error" v-if="error === 1">楠岃瘉鐮佷笉鑳戒负绌�</text>
+ <text class="code_text_error" v-else-if="error === 2">楠岃瘉鐮侀敊璇�</text>
+ <text v-else></text>
+
+ <text @click="send" v-if="num === 0">鑾峰彇楠岃瘉鐮�</text>
+ <text v-else>{{num}}</text>
</view>
</view>
</u-modal>
@@ -175,7 +179,13 @@
}, {
name: '鍑忎繚浜哄憳',
// id: ['1']
- }]
+ }],
+
+ type: null,
+ code: '',
+ num: 0,
+ error: false,
+ timer: null
};
},
onLoad(options) {
@@ -187,6 +197,50 @@
this.getList()
},
methods: {
+ // 鏌ョ湅pdf
+ seePdf(url) {
+ if(!url) return;
+ uni.downloadFile({
+ url,
+ success: function (res) {
+ var filePath = res.tempFilePath;
+ uni.openDocument({
+ filePath: filePath,
+ success: function (res) {}
+ })
+ }
+ })
+ },
+ send () {
+ this.$u.api.sendSms({
+ phone: this.userInfo.mobile
+ }).then(res => {
+ if (res.code === 200) {
+ this.num = 60
+ this.setTime()
+ }
+ })
+ },
+ setTime () {
+ this.timer = setInterval(() => {
+ if (this.num === 0) {
+ clearInterval(this.timer)
+ this.timer = null
+ return
+ }
+ this.num = this.num - 1
+ }, 1000)
+ },
+ // 鎵撳紑鍙戦�侀獙璇佺爜寮圭獥
+ openmessage(type) {
+ this.code = ''
+ clearInterval(this.timer)
+ this.error = ''
+ this.timer = null
+ this.num = 0
+ this.type = type
+ this.show1 = true
+ },
IdCard(UUserCard) {
let idcard = UUserCard.toString();
//鑾峰彇骞撮緞
@@ -235,26 +289,69 @@
}
})
},
+ // 鐢宠閫�鍥�
confirm() {
- this.show = false
+ this.$u.api.applyChangeOpt({
+ applyId: this.info.id,
+ optType: 3
+ }).then(res => {
+ if (res.code === 200) {
+ this.show = false
+ }
+ })
},
cancel() {
this.show = false
},
+ // 绛剧讲
confirm1() {
- this.show1 = false
+ if (!this.code) {
+ this.error = 1
+ return
+ }
+ // 绛剧讲鐢宠鍗�
+ if (this.type === 1) {
+ console.log('绛剧讲鐢宠鍗�')
+ this.$u.api.validateCode({
+ code: this.code
+ }).then(res => {
+ if (res.code === 200) {
+ this.error = ''
+ this.show1 = false
+ this.$u.api.getJiajianBaoSignLink({ id: this.info.id })
+ .then(url => {
+ if (url.code === 200) {
+ uni.navigateTo({
+ url: `/pages/webView/webView?url=${url.data}`
+ })
+ }
+ })
+ } else {
+ this.error = 2
+ }
+ })
+
+ this.show1 = false
+ }
},
cancel1() {
this.show1 = false
},
+ // 鍏抽棴璁㈠崟
confirm2() {
- this.show2 = false
+ this.$u.api.applyChangeOpt({
+ applyId: this.info.id,
+ optType: 6
+ }).then(res => {
+ if (res.code === 200) {
+ this.show2 = false
+ }
+ })
},
cancel2() {
this.show2 = false
},
returnStyle(type) {
- if (!type) return
if ([2].includes(type)) {
return 'linear-gradient(#97DDC5 0%, #F7F7F7 100%);'
} else if ([0,1].includes(type)) {
@@ -264,7 +361,6 @@
}
},
returnStyle1(type) {
- if (!type) return
if ([2].includes(type)) {
return 'linear-gradient( 180deg, #E5F7F1 0%, rgba(255,255,255,0) 100%)'
} else if ([0,1].includes(type)) {
--
Gitblit v1.9.3