49d94eb2 by 张猛

个人中心

1 parent 59468e57
1 <template> 1 <template>
2 <view> 2 <view>
3 <uni-segmented-control class="whitebg" :current="current" :values="items" @clickItem="onClickItem" 3 <uni-segmented-control :current="current" :values="items" activeColor="#C40F18" class="whitebg"
4 styleType="text" activeColor="#C40F18"></uni-segmented-control> 4 styleType="text" @clickItem="onClickItem"></uni-segmented-control>
5 <view class="hasfixedbottom"> 5 <view class="hasfixedbottom">
6 <view> 6 <view>
7 <uni-forms ref="baseForm" :border="true" :modelValue="baseFormData" label-width="80"> 7 <uni-forms ref="baseForm" :border="true" :modelValue="baseFormData" label-width="80">
8 <view class="nolineform"> 8 <view class="nolineform">
9 <uni-forms-item label="姓名" required name="name" v-show="current === 0"> 9 <uni-forms-item v-show="current === 0" label="姓名" name="name" required>
10 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle" 10 <uni-easyinput v-model="baseFormData.name" :clearable='false' :placeholderStyle="placeholderStyle"
11 v-model="baseFormData.name" placeholder="请输入姓名" /> 11 :styles="inputstyle" placeholder="请输入姓名"/>
12 </uni-forms-item> 12 </uni-forms-item>
13 <uni-forms-item label="证件类型" required name="idcType"> 13 <uni-forms-item label="证件类型" name="idcType" required>
14 <uni-data-select v-model="baseFormData.idcType" style="width: 360rpx;" 14 <uni-data-select v-model="baseFormData.idcType" :clear="false"
15 @change="changeIdcType" :clear="false" :disabled="current === 0" 15 :disabled="current === 0" :localdata="idcTypeList" style="width: 360rpx;"
16 :localdata="idcTypeList"></uni-data-select> 16 @change="changeIdcType"></uni-data-select>
17 </uni-forms-item> 17 </uni-forms-item>
18 <uni-forms-item label="证件照" required v-show="current === 1"> 18 <uni-forms-item v-show="current === 1" label="证件照" required>
19 <view class="upCard"> 19 <view class="upCard">
20 <uni-file-picker v-model="cardObj" @delete="delimgFont" return-type="object" limit="1" 20 <uni-file-picker v-model="cardObj" :image-styles="imageStylesZJ" limit="1" return-type="object"
21 @select="upIdCardImgFront" :image-styles="imageStylesZJ"> 21 @delete="delimgFont" @select="upIdCardImgFront">
22 <image v-if="!baseFormData.card" class="sfz" 22 <image v-if="!baseFormData.card" :src="config.baseUrl_api+'/fs/static/login/sfz.png'"
23 :src="config.baseUrl_api+'/fs/static/login/sfz.png'"> 23 class="sfz">
24 </image> 24 </image>
25 </uni-file-picker> 25 </uni-file-picker>
26 </view> 26 </view>
27 </uni-forms-item> 27 </uni-forms-item>
28 <uni-forms-item label="姓名" required name="name" v-show="current === 1"> 28 <uni-forms-item v-show="current === 1" label="姓名" name="name" required>
29 <text v-if="disabledName">{{baseFormData.name}}</text> 29 <text v-if="disabledName">{{ baseFormData.name }}</text>
30 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle" 30 <uni-easyinput v-else v-model="baseFormData.name" :clearable='false'
31 v-model="baseFormData.name" v-else placeholder="请输入姓名" /> 31 :placeholderStyle="placeholderStyle" :styles="inputstyle" placeholder="请输入姓名"/>
32 </uni-forms-item> 32 </uni-forms-item>
33 <uni-forms-item label="证件号码" required name="idcCode" v-show="current === 0"> 33 <uni-forms-item v-show="current === 0" label="证件号码" name="idcCode" required>
34 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle" 34 <uni-easyinput v-model="baseFormData.idcCode" :clearable='false' :placeholderStyle="placeholderStyle"
35 v-model="baseFormData.idcCode" @blur="giveBirthDay" placeholder="请输入证件号码" /> 35 :styles="inputstyle" placeholder="请输入证件号码" @blur="giveBirthDay"/>
36 </uni-forms-item> 36 </uni-forms-item>
37 <uni-forms-item label="证件号码" required name="idcCode" v-show="current === 1"> 37 <uni-forms-item v-show="current === 1" label="证件号码" name="idcCode" required>
38 <text>{{baseFormData.idcCode}}</text> 38 <text>{{ baseFormData.idcCode }}</text>
39 </uni-forms-item> 39 </uni-forms-item>
40 <uni-forms-item label="性别" required name="sex"> 40 <uni-forms-item label="性别" name="sex" required>
41 <text v-if="baseFormData.sex=='0'"></text> 41 <text v-if="baseFormData.sex=='0'"></text>
42 <text v-else-if="baseFormData.sex=='1'"></text> 42 <text v-else-if="baseFormData.sex=='1'"></text>
43 <!-- <uni-data-checkbox v-model="baseFormData.sex" @change="changeSex" :localdata="sexs" /> --> 43 <!-- <uni-data-checkbox v-model="baseFormData.sex" @change="changeSex" :localdata="sexs" /> -->
44 </uni-forms-item> 44 </uni-forms-item>
45 <uni-forms-item label="出生日期" required name="birth"> 45 <uni-forms-item label="出生日期" name="birth" required>
46 {{baseFormData.birth?.slice(0,10)}} 46 {{ baseFormData.birth?.slice(0, 10) }}
47 <!-- <uni-datetime-picker type="date" placeholder="YYYY-MM-DD" :border='false' 47 <!-- <uni-datetime-picker type="date" placeholder="YYYY-MM-DD" :border='false'
48 :clear-icon="false" v-model="baseFormData.birth" /> --> 48 :clear-icon="false" v-model="baseFormData.birth" /> -->
49 </uni-forms-item> 49 </uni-forms-item>
50 <uni-forms-item label="联系方式" name="phone"> 50 <uni-forms-item label="联系方式" name="phone">
51 <uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle" 51 <uni-easyinput v-model="baseFormData.phone" :placeholderStyle="placeholderStyle"
52 v-model="baseFormData.phone" placeholder="请输入联系方式" /> 52 :styles="inputstyle" placeholder="请输入联系方式"/>
53 </uni-forms-item> 53 </uni-forms-item>
54 <uni-forms-item label="会员编号" name="perCode" v-if="baseFormData.perCode"> 54 <uni-forms-item v-if="baseFormData.perCode" label="会员编号" name="perCode">
55 <uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle" 55 <uni-easyinput v-model="baseFormData.perCode" :placeholderStyle="placeholderStyle"
56 v-model="baseFormData.perCode" placeholder="请输入会员编号" /> 56 :styles="inputstyle" placeholder="请输入会员编号"/>
57 </uni-forms-item> 57 </uni-forms-item>
58 <uni-forms-item label="会员有效期" name="validityDate" v-if="baseFormData.validityDate"> 58 <uni-forms-item v-if="baseFormData.validityDate" label="会员有效期" name="validityDate">
59 <uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle" 59 <uni-easyinput v-model="baseFormData.validityDate" :placeholderStyle="placeholderStyle"
60 v-model="baseFormData.validityDate" placeholder="请输入会员有效期" /> 60 :styles="inputstyle" placeholder="请输入会员有效期"/>
61 </uni-forms-item> 61 </uni-forms-item>
62 62
63 63
...@@ -80,47 +80,51 @@ ...@@ -80,47 +80,51 @@
80 </view> 80 </view>
81 <view class="fixed-agreeline"> 81 <view class="fixed-agreeline">
82 <view class="agreeline"> 82 <view class="agreeline">
83 <image @click="changeAgree(agree)" v-if="agree" 83 <image v-if="agree" :src="config.baseUrl_api+'/fs/static/login/xz_dwn@2x.png'"
84 :src="config.baseUrl_api+'/fs/static/login/xz_dwn@2x.png'"></image> 84 @click="changeAgree(agree)"></image>
85 <image @click="changeAgree(agree)" v-else :src="config.baseUrl_api+'/fs/static/login/xz@2x.png'"> 85 <image v-else :src="config.baseUrl_api+'/fs/static/login/xz@2x.png'" @click="changeAgree(agree)">
86 </image> 86 </image>
87 <view>我已阅读<text @click="openpopup">《入会须知》</text></view> 87 <view>我已阅读
88 <text @click="openpopup">《入会须知》</text>
88 </view> 89 </view>
89 </view> 90 </view>
90 <view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view> 91 </view>
92 <view class="fixedBottom">
93 <button class="btn-red" @click="goSubmit">确 定</button>
94 </view>
91 95
92 <!-- 会员须知 --> 96 <!-- 会员须知 -->
93 <uni-popup ref="popup" type="bottom" background-color="#fff" animation :disable-scroll="true" 97 <uni-popup ref="popup" :disable-scroll="true" :mask-click="false" animation background-color="#fff"
94 :mask-click="false"> 98 type="bottom">
95 <view class="tt">入会须知</view> 99 <view class="tt">入会须知</view>
96 <view class="popBody"> 100 <view class="popBody">
97 _{{baseFormData.name}}_欢迎您申请成为中国跆拳道协会(以下简称中国跆协)会员,请确保本次申请是经过您本人或监护人授权同意后的自愿行为,请您务必仔细阅读本入会须知。 101 _{{ baseFormData.name }}_欢迎您申请成为中国跆拳道协会(以下简称中国跆协)会员,请确保本次申请是经过您本人或监护人授权同意后的自愿行为,请您务必仔细阅读本入会须知。
98 <br /> 102 <br/>
99 一、中国跆协会员分为个人会员和单位会员。 103 一、中国跆协会员分为个人会员和单位会员。
100 <br /> 104 <br/>
101 二、成为本协会会员条件:遵守中国跆协章程和协会各项规章制度及相关决议,按期交纳会费,积极支持和参与中国跆拳道事业发展的社会各届人士或地方跆拳道协会、俱乐部、培训机构等,均可自愿申请成为中国跆协会员。<br /> 105 二、成为本协会会员条件:遵守中国跆协章程和协会各项规章制度及相关决议,按期交纳会费,积极支持和参与中国跆拳道事业发展的社会各届人士或地方跆拳道协会、俱乐部、培训机构等,均可自愿申请成为中国跆协会员。<br/>
102 三、个人会员为在中国工作和生活的跆拳道爱好者,16 周岁以下应有监护人协助申请,会员须为中国公民。<br /> 106 三、个人会员为在中国工作和生活的跆拳道爱好者,16 周岁以下应有监护人协助申请,会员须为中国公民。<br/>
103 四、会员入会需向所在区域内中国跆协单位会员提出入会申请,并按程序报中国跆协批准,按规定交纳会费。<br /> 107 四、会员入会需向所在区域内中国跆协单位会员提出入会申请,并按程序报中国跆协批准,按规定交纳会费。<br/>
104 五、会员享有《中国跆拳道协会会员管理办法》规定的会员权利。 108 五、会员享有《中国跆拳道协会会员管理办法》规定的会员权利。
105 <br /> 109 <br/>
106 六、会员应履行《中国跆拳道协会会员管理办法》规定的会员义务。 110 六、会员应履行《中国跆拳道协会会员管理办法》规定的会员义务。
107 <br /> 111 <br/>
108 七、凡中国跆协会员,须按照《中国跆拳道协会会员会费标准(2021 版)》按时交纳年度会费。<br /> 112 七、凡中国跆协会员,须按照《中国跆拳道协会会员会费标准(2021 版)》按时交纳年度会费。<br/>
109 八、会员行为违反《中国跆拳道协会会员管理办法》中规定的,按照相关处罚规定进行处理。<br /> 113 八、会员行为违反《中国跆拳道协会会员管理办法》中规定的,按照相关处罚规定进行处理。<br/>
110 九、其它会员相关内容请查看《中国跆拳道协会章程》《中国跆拳道协会会员管理办法》。<br /> 114 九、其它会员相关内容请查看《中国跆拳道协会章程》《中国跆拳道协会会员管理办法》。<br/>
111 115
112 <button @click="closepopup" class="btn-red">我已阅读</button> 116 <button class="btn-red" @click="closepopup">我已阅读</button>
113 </view> 117 </view>
114 </uni-popup> 118 </uni-popup>
115 119
116 <uni-popup ref="infoConfirm" type="center" :disable-scroll="true" :mask-click="false"> 120 <uni-popup ref="infoConfirm" :disable-scroll="true" :mask-click="false" type="center">
117 <view class="tt">确认信息</view> 121 <view class="tt">确认信息</view>
118 <view class="popBody"> 122 <view class="popBody">
119 <view> 123 <view>
120 124
121 </view> 125 </view>
122 126
123 <button @click="closepopup" class="btn-red">已确认</button> 127 <button class="btn-red" @click="closepopup">已确认</button>
124 </view> 128 </view>
125 </uni-popup> 129 </uni-popup>
126 130
...@@ -128,44 +132,44 @@ ...@@ -128,44 +132,44 @@
128 </template> 132 </template>
129 133
130 <script setup> 134 <script setup>
131 import { 135 import {
132 onMounted, 136 onMounted,
133 ref 137 ref
134 } from 'vue' 138 } from 'vue'
135 import * as api from '@/common/api.js' 139 import * as api from '@/common/api.js'
136 import { 140 import {
137 onLoad 141 onLoad
138 } from '@dcloudio/uni-app' 142 } from '@dcloudio/uni-app'
139 import config from '@/config.js' 143 import config from '@/config.js'
140 import { 144 import {
141 wxLogin 145 wxLogin
142 } from '@/common/login.js'; 146 } from '@/common/login.js';
143 import * as aes2 from '@/common/utils.js' 147 import * as aes2 from '@/common/utils.js'
144 148
145 const current = ref(0) 149 const current = ref(0)
146 const popup = ref(null) 150 const popup = ref(null)
147 const infoConfirm = ref(null) 151 const infoConfirm = ref(null)
148 const agree = ref(false) 152 const agree = ref(false)
149 const perId = ref() 153 const perId = ref()
150 const photoArr = ref({}) 154 const photoArr = ref({})
151 const regionsList = ref([]) 155 const regionsList = ref([])
152 const cardObj = ref({}) 156 const cardObj = ref({})
153 const disabledName = ref(true) 157 const disabledName = ref(true)
154 const baseFormData = ref({ 158 const baseFormData = ref({
155 photo: '', 159 photo: '',
156 sex: '', 160 sex: '',
157 idcType: '0', 161 idcType: '0',
158 perType: '1', // (1:个人会员;2:教练;3:考官;4:裁判;5:临时会员;) 162 perType: '1', // (1:个人会员;2:教练;3:考官;4:裁判;5:临时会员;)
159 perCode:'', 163 perCode: '',
160 validityDate:'', 164 validityDate: '',
161 // multiDeptFlag: 1, 165 // multiDeptFlag: 1,
162 // isBlack: '1' 166 // isBlack: '1'
163 }) 167 })
164 const items = ref(['身份证添加', '证件照录入']) 168 const items = ref(['身份证添加', '证件照录入'])
165 const idcTypeList = ref([{ 169 const idcTypeList = ref([{
166 value: '0', 170 value: '0',
167 text: "身份证" 171 text: "身份证"
168 }, 172 },
169 { 173 {
170 value: '1', 174 value: '1',
171 text: "来往大陆(内地)通行证" 175 text: "来往大陆(内地)通行证"
...@@ -182,20 +186,20 @@ ...@@ -182,20 +186,20 @@
182 value: '5', 186 value: '5',
183 text: '香港身份证' 187 text: '香港身份证'
184 } 188 }
185 ]) 189 ])
186 const sexs = ref([{ 190 const sexs = ref([{
187 text: '女', 191 text: '女',
188 value: '1' 192 value: '1'
189 }, { 193 }, {
190 text: '男', 194 text: '男',
191 value: '0' 195 value: '0'
192 }]) 196 }])
193 const placeholderStyle = ref('text-align: right;font-size:30rpx') 197 const placeholderStyle = ref('text-align: right;font-size:30rpx')
194 const inputstyle = ref({ 198 const inputstyle = ref({
195 borderColor: '#fff', 199 borderColor: '#fff',
196 fontSize: '30rpx' 200 fontSize: '30rpx'
197 }) 201 })
198 const imageStylesTx = ref({ 202 const imageStylesTx = ref({
199 width: '210rpx', 203 width: '210rpx',
200 height: '280rpx', 204 height: '280rpx',
201 background: { 205 background: {
...@@ -204,18 +208,25 @@ ...@@ -204,18 +208,25 @@
204 border: { 208 border: {
205 radius: '2px' 209 radius: '2px'
206 } 210 }
207 }); 211 });
208 212
209 const imageStylesZJ = ref({ 213 const imageStylesZJ = ref({
210 width: '500rpx', 214 width: '500rpx',
211 height: '316rpx' 215 height: '316rpx'
212 }); 216 });
217
218 onLoad(async (option) => {
219 if (option.name && option.idcCode) {
220 baseFormData.value.name = option.name
221 baseFormData.value.idcCode = option.idcCode
222 giveBirthDay()
223 }
213 224
214 onLoad(async (option) => {
215 if (option.tab == '1') { 225 if (option.tab == '1') {
216 current.value = 1 226 current.value = 1
217 baseFormData.value.sourceFlag = 1 227 baseFormData.value.sourceFlag = 1
218 baseFormData.value.idcType = option.idcType || 0 228 baseFormData.value.idcType = option.idcType || 0
229
219 if (baseFormData.value.idcType == '3') { 230 if (baseFormData.value.idcType == '3') {
220 disabledName.value = false 231 disabledName.value = false
221 } else { 232 } else {
...@@ -227,25 +238,25 @@ ...@@ -227,25 +238,25 @@
227 perId.value = option.perId 238 perId.value = option.perId
228 await fetchMemberInfo(option.perId) 239 await fetchMemberInfo(option.perId)
229 } 240 }
230 }) 241 })
231 242
232 onMounted(() => { 243 onMounted(() => {
233 let openId = uni.getStorageSync('openId') 244 let openId = uni.getStorageSync('openId')
234 if (!openId) { 245 if (!openId) {
235 wxLogin() 246 wxLogin()
236 } 247 }
237 }) 248 })
238 249
239 function getRegionsList() { 250 function getRegionsList() {
240 api.regionsList().then(res => { 251 api.regionsList().then(res => {
241 regionsList.value = res.data 252 regionsList.value = res.data
242 }) 253 })
243 } 254 }
244 255
245 // 根据 perId 获取会员信息预填表单 256 // 根据 perId 获取会员信息预填表单
246 async function fetchMemberInfo(id) { 257 async function fetchMemberInfo(id) {
247 if (!id) return 258 if (!id) return
248 uni.showLoading({ title: '加载中...' }) 259 uni.showLoading({title: '加载中...'})
249 try { 260 try {
250 const res = await api.getInfo(id) 261 const res = await api.getInfo(id)
251 const data = res.data || {} 262 const data = res.data || {}
...@@ -274,9 +285,9 @@ ...@@ -274,9 +285,9 @@
274 } finally { 285 } finally {
275 uni.hideLoading() 286 uni.hideLoading()
276 } 287 }
277 } 288 }
278 289
279 function onClickItem(e) { 290 function onClickItem(e) {
280 if (current.value != e.currentIndex) { 291 if (current.value != e.currentIndex) {
281 current.value = e.currentIndex 292 current.value = e.currentIndex
282 } 293 }
...@@ -296,15 +307,15 @@ ...@@ -296,15 +307,15 @@
296 sourceFlag: 1 307 sourceFlag: 1
297 } 308 }
298 } 309 }
299 } 310 }
300 311
301 312
302 function changeAgree(item) { 313 function changeAgree(item) {
303 agree.value = !item 314 agree.value = !item
304 } 315 }
305 316
306 //身份证识别 317 //身份证识别
307 function upIdCardImgFront(e) { 318 function upIdCardImgFront(e) {
308 let file = e.tempFiles[0] 319 let file = e.tempFiles[0]
309 if (!file) { 320 if (!file) {
310 return 321 return
...@@ -326,8 +337,8 @@ ...@@ -326,8 +337,8 @@
326 baseFormData.value.idcCode = res.data.code 337 baseFormData.value.idcCode = res.data.code
327 baseFormData.value.name = res.data.name 338 baseFormData.value.name = res.data.name
328 baseFormData.value.uuid = res.data.uuid 339 baseFormData.value.uuid = res.data.uuid
329 baseFormData.value.perCode = res.data.perCode ||'' 340 baseFormData.value.perCode = res.data.perCode || ''
330 baseFormData.value.validityDate = res.data.validityDate?.slice(0,10) //去掉时分秒 341 baseFormData.value.validityDate = res.data.validityDate?.slice(0, 10) //去掉时分秒
331 // baseFormData.value.cityId = res.data.cityId 342 // baseFormData.value.cityId = res.data.cityId
332 // baseFormData.value.address = res.data.address 343 // baseFormData.value.address = res.data.address
333 } else { 344 } else {
...@@ -339,9 +350,9 @@ ...@@ -339,9 +350,9 @@
339 } 350 }
340 351
341 }) 352 })
342 } 353 }
343 354
344 function upPhoto(e) { 355 function upPhoto(e) {
345 const tempFilePaths = e.tempFilePaths; 356 const tempFilePaths = e.tempFilePaths;
346 const imgUrl = tempFilePaths[0] 357 const imgUrl = tempFilePaths[0]
347 if (!imgUrl) { 358 if (!imgUrl) {
...@@ -350,7 +361,7 @@ ...@@ -350,7 +361,7 @@
350 wx.cropImage({ 361 wx.cropImage({
351 src: imgUrl, 362 src: imgUrl,
352 cropScale: '4:5', 363 cropScale: '4:5',
353 success: function(resp) { 364 success: function (resp) {
354 uni.showLoading({ 365 uni.showLoading({
355 title: '加载中' 366 title: '加载中'
356 }); 367 });
...@@ -365,16 +376,16 @@ ...@@ -365,16 +376,16 @@
365 } 376 }
366 }); 377 });
367 }, 378 },
368 fail: function(err) { 379 fail: function (err) {
369 photoArr.value = {} 380 photoArr.value = {}
370 } 381 }
371 }) 382 })
372 383
373 384
374 } 385 }
375 386
376 387
377 function delimgFont(n) { 388 function delimgFont(n) {
378 photoArr.value = {} 389 photoArr.value = {}
379 cardObj.value = {} 390 cardObj.value = {}
380 baseFormData.value = { 391 baseFormData.value = {
...@@ -383,17 +394,17 @@ ...@@ -383,17 +394,17 @@
383 perType: '1', 394 perType: '1',
384 sourceFlag: 1 395 sourceFlag: 1
385 }; 396 };
386 } 397 }
387 398
388 399
389 function delPhoto(n) { 400 function delPhoto(n) {
390 photoArr.value = {}; 401 photoArr.value = {};
391 baseFormData.value.photo = ''; 402 baseFormData.value.photo = '';
392 baseFormData.value.photo2 = ''; 403 baseFormData.value.photo2 = '';
393 } 404 }
394 405
395 406
396 function getExtractInfo(obj) { 407 function getExtractInfo(obj) {
397 photoArr.value = {} 408 photoArr.value = {}
398 // baseFormData.value = { 409 // baseFormData.value = {
399 // photo: '', 410 // photo: '',
...@@ -414,8 +425,8 @@ ...@@ -414,8 +425,8 @@
414 baseFormData.value.birth = res.data.birth 425 baseFormData.value.birth = res.data.birth
415 baseFormData.value.name = res.data.name 426 baseFormData.value.name = res.data.name
416 baseFormData.value.phone = res.data.phone 427 baseFormData.value.phone = res.data.phone
417 baseFormData.value.perCode = res.data.perCode ||'' 428 baseFormData.value.perCode = res.data.perCode || ''
418 baseFormData.value.validityDate = res.data.validityDate?.slice(0,10) //去掉时分秒 429 baseFormData.value.validityDate = res.data.validityDate?.slice(0, 10) //去掉时分秒
419 // baseFormData.value.cityId = res.data.cityId 430 // baseFormData.value.cityId = res.data.cityId
420 // baseFormData.value.address = res.data.address 431 // baseFormData.value.address = res.data.address
421 if (res.data.photo) { 432 if (res.data.photo) {
...@@ -458,10 +469,10 @@ ...@@ -458,10 +469,10 @@
458 return 469 return
459 } 470 }
460 }) 471 })
461 } 472 }
462 473
463 474
464 function giveBirthDay() { 475 function giveBirthDay() {
465 if (!baseFormData.value.idcCode) { 476 if (!baseFormData.value.idcCode) {
466 return 477 return
467 } 478 }
...@@ -495,21 +506,21 @@ ...@@ -495,21 +506,21 @@
495 // return 506 // return
496 // } 507 // }
497 // } 508 // }
498 } 509 }
499 510
500 511
501 function openpopup() { 512 function openpopup() {
502 popup.value.open() 513 popup.value.open()
503 } 514 }
504 515
505 516
506 function closepopup() { 517 function closepopup() {
507 agree.value = true 518 agree.value = true
508 popup.value.close() 519 popup.value.close()
509 } 520 }
510 521
511 522
512 function changeIdcType(e) { 523 function changeIdcType(e) {
513 // 切换证件照类型把当前页面数据清空 524 // 切换证件照类型把当前页面数据清空
514 cardObj.value = {} 525 cardObj.value = {}
515 photoArr.value = {} 526 photoArr.value = {}
...@@ -519,10 +530,10 @@ ...@@ -519,10 +530,10 @@
519 perType: '1', 530 perType: '1',
520 sourceFlag: 1 531 sourceFlag: 1
521 } 532 }
522 } 533 }
523 534
524 535
525 function goSubmit() { 536 function goSubmit() {
526 537
527 if (!agree.value) { 538 if (!agree.value) {
528 uni.showToast({ 539 uni.showToast({
...@@ -570,7 +581,7 @@ ...@@ -570,7 +581,7 @@
570 //信息确认弹出 581 //信息确认弹出
571 uni.showModal({ 582 uni.showModal({
572 content: '请确认信息正确', 583 content: '请确认信息正确',
573 success: function(res) { 584 success: function (res) {
574 if (res.confirm) { 585 if (res.confirm) {
575 if (baseFormData.value.idcType == '4') { 586 if (baseFormData.value.idcType == '4') {
576 baseFormData.value.idcType = '0' 587 baseFormData.value.idcType = '0'
...@@ -625,82 +636,82 @@ ...@@ -625,82 +636,82 @@
625 } 636 }
626 } 637 }
627 }); 638 });
628 } 639 }
629 640
630 function getUserInfo() { 641 function getUserInfo() {
631 api.getInfo(perId.value).then(res => { 642 api.getInfo(perId.value).then(res => {
632 baseFormData.value = res.data 643 baseFormData.value = res.data
633 if (baseFormData.areaAssName) baseFormData.ancestorNameList = baseFormData.value.ancestorNameList.join( 644 if (baseFormData.areaAssName) baseFormData.ancestorNameList = baseFormData.value.ancestorNameList.join(
634 ',').replaceAll(',', '/') 645 ',').replaceAll(',', '/')
635 }) 646 })
636 } 647 }
637 </script> 648 </script>
638 649
639 <style lang="scss"> 650 <style lang="scss">
640 /* 字段名左对齐 */ 651 /* 字段名左对齐 */
641 .uni-forms-item .uni-forms-item__label { 652 .uni-forms-item .uni-forms-item__label {
642 text-align: left !important; 653 text-align: left !important;
643 justify-content: flex-start !important; 654 justify-content: flex-start !important;
644 padding-left: 0 !important; 655 padding-left: 0 !important;
645 width: auto !important; 656 width: auto !important;
646 } 657 }
647 658
648 /* 内容右对齐 */ 659 /* 内容右对齐 */
649 .uni-forms-item .uni-forms-item__content { 660 .uni-forms-item .uni-forms-item__content {
650 display: flex !important; 661 display: flex !important;
651 align-items: center !important; 662 align-items: center !important;
652 justify-content: flex-end !important; 663 justify-content: flex-end !important;
653 text-align: right !important; 664 text-align: right !important;
654 flex-wrap: nowrap !important; 665 flex-wrap: nowrap !important;
655 } 666 }
656 667
657 /* 输入框内容右对齐 */ 668 /* 输入框内容右对齐 */
658 .uni-forms-item .uni-easyinput .uni-easyinput__content-input, 669 .uni-forms-item .uni-easyinput .uni-easyinput__content-input,
659 .uni-forms-item .uni-easyinput input, 670 .uni-forms-item .uni-easyinput input,
660 .uni-forms-item input, 671 .uni-forms-item input,
661 .uni-forms-item .uni-data-select .uni-select__input-box, 672 .uni-forms-item .uni-data-select .uni-select__input-box,
662 .uni-forms-item .uni-data-picker .uni-data-picker__input-box { 673 .uni-forms-item .uni-data-picker .uni-data-picker__input-box {
663 text-align: right !important; 674 text-align: right !important;
664 } 675 }
665 676
666 /* 文本内容右对齐 */ 677 /* 文本内容右对齐 */
667 .uni-forms-item .uni-forms-item__content text, 678 .uni-forms-item .uni-forms-item__content text,
668 .uni-forms-item .uni-forms-item__content>text { 679 .uni-forms-item .uni-forms-item__content > text {
669 display: inline-block !important; 680 display: inline-block !important;
670 white-space: nowrap !important; 681 white-space: nowrap !important;
671 } 682 }
672 </style> 683 </style>
673 684
674 <style lang="scss" scoped> 685 <style lang="scss" scoped>
675 :deep(.uni-popup__mask) { 686 :deep(.uni-popup__mask) {
676 overflow: hidden !important; 687 overflow: hidden !important;
677 position: fixed !important; 688 position: fixed !important;
678 top: 0; 689 top: 0;
679 left: 0; 690 left: 0;
680 right: 0; 691 right: 0;
681 bottom: 0; 692 bottom: 0;
682 } 693 }
683 694
684 :deep(.uni-popup) { 695 :deep(.uni-popup) {
685 overflow: hidden !important; 696 overflow: hidden !important;
686 } 697 }
687 698
688 :deep(.segmented-control) { 699 :deep(.segmented-control) {
689 height: 100rpx; 700 height: 100rpx;
690 } 701 }
691 702
692 :deep(.segmented-control__text) { 703 :deep(.segmented-control__text) {
693 line-height: 2; 704 line-height: 2;
694 font-size: 30rpx; 705 font-size: 30rpx;
695 } 706 }
696 707
697 .tt { 708 .tt {
698 text-align: center; 709 text-align: center;
699 font-size: 30rpx; 710 font-size: 30rpx;
700 padding: 40rpx 0 0; 711 padding: 40rpx 0 0;
701 } 712 }
702 713
703 .popBody { 714 .popBody {
704 font-size: 28rpx; 715 font-size: 28rpx;
705 line-height: 1.5; 716 line-height: 1.5;
706 height: 70vh; 717 height: 70vh;
...@@ -713,21 +724,21 @@ ...@@ -713,21 +724,21 @@
713 .btn-red { 724 .btn-red {
714 margin: 50rpx 0 30rpx; 725 margin: 50rpx 0 30rpx;
715 } 726 }
716 } 727 }
717 728
718 .hasfixedbottom { 729 .hasfixedbottom {
719 padding-bottom: 200rpx; 730 padding-bottom: 200rpx;
720 } 731 }
721 732
722 .fixed-agreeline { 733 .fixed-agreeline {
723 position: fixed; 734 position: fixed;
724 bottom: 150rpx; 735 bottom: 150rpx;
725 left: 0; 736 left: 0;
726 right: 0; 737 right: 0;
727 z-index: 1; 738 z-index: 1;
728 } 739 }
729 740
730 .agreeline { 741 .agreeline {
731 padding: 20rpx 40rpx; 742 padding: 20rpx 40rpx;
732 box-sizing: border-box; 743 box-sizing: border-box;
733 display: flex; 744 display: flex;
...@@ -742,9 +753,9 @@ ...@@ -742,9 +753,9 @@
742 height: 40rpx; 753 height: 40rpx;
743 margin-right: 20rpx; 754 margin-right: 20rpx;
744 } 755 }
745 } 756 }
746 757
747 .upCard { 758 .upCard {
748 position: relative; 759 position: relative;
749 width: 500rpx; 760 width: 500rpx;
750 height: 316rpx; 761 height: 316rpx;
...@@ -761,24 +772,24 @@ ...@@ -761,24 +772,24 @@
761 left: 0; 772 left: 0;
762 height: 293rpx; 773 height: 293rpx;
763 } 774 }
764 } 775 }
765 776
766 .op0 { 777 .op0 {
767 opacity: 0; 778 opacity: 0;
768 } 779 }
769 780
770 781
771 :deep(.item-text-overflow) { 782 :deep(.item-text-overflow) {
772 text-align: left; 783 text-align: left;
773 } 784 }
774 785
775 :deep(.fixUniFormItemStyle .uni-data-picker__input-box) { 786 :deep(.fixUniFormItemStyle .uni-data-picker__input-box) {
776 justify-content: flex-start !important; 787 justify-content: flex-start !important;
777 text-align: left !important; 788 text-align: left !important;
778 } 789 }
779 790
780 /* 让地区选择器的文本左对齐 */ 791 /* 让地区选择器的文本左对齐 */
781 :deep(.fixUniFormItemStyle .uni-data-picker__text) { 792 :deep(.fixUniFormItemStyle .uni-data-picker__text) {
782 text-align: left !important; 793 text-align: left !important;
783 } 794 }
784 </style> 795 </style>
......
...@@ -2,46 +2,63 @@ ...@@ -2,46 +2,63 @@
2 <view class="page-container"> 2 <view class="page-container">
3 <!-- 会员卡区域 --> 3 <!-- 会员卡区域 -->
4 <view class="member-card"> 4 <view class="member-card">
5 <image class="card-bg" :src="config.baseUrl_api + '/fs/static/user_01@2x.png'" mode="aspectFill"> 5 <image :src="config.baseUrl_api + '/fs/static/user_01@2x.png'" class="card-bg" mode="aspectFill">
6 </image> 6 </image>
7 7
8 <!-- 绑定/解绑学员 --> 8
9 <!-- &lt;!&ndash; 绑定/解绑学员 &ndash;&gt;-->
10 <!-- <view class="bind-student" @click="handleBindAction">-->
11 <!-- <text>{{ isBound ? '切换学员' : '绑定学员' }}</text>-->
12 <!-- <image :src="config.baseUrl_api + '/fs/static/bd@2x.png'" class="bind-icon" mode="aspectFit"></image>-->
13 <!-- </view>-->
14
15 <!-- 用户信息 -->
16 <view class="user-section">
17 <view class="member-title">
18 <view class="member-id">{{ userInfo?.userName }}</view>
9 <view class="bind-student" @click="handleBindAction"> 19 <view class="bind-student" @click="handleBindAction">
10 <text>{{ isBound ? '切换学员' : '绑定学员' }}</text> 20 <text>{{ isBound ? '切换学员' : '绑定学员' }}</text>
11 <image :src="config.baseUrl_api + '/fs/static/bd@2x.png'" class="bind-icon" mode="aspectFit"></image> 21 <image :src="config.baseUrl_api + '/fs/static/bd@2x.png'" class="bind-icon" mode="aspectFit"></image>
12 </view> 22 </view>
23 </view>
13 24
14 <!-- 用户信息 -->
15 <view class="user-section">
16 <view class="user-top"> 25 <view class="user-top">
17 <view class="avatar-wrap" @click="showLogoutConfirm"> 26 <view class="avatar-wrap" @click="showLogoutConfirm">
18 <!-- <image class="avatar" v-if="perInfo.photo" :src="config.baseUrl_api + perInfo.photo" 27 <!-- <image class="avatar" v-if="perInfo.photo" :src="config.baseUrl_api + perInfo.photo"
19 mode="aspectFill"> 28 mode="aspectFill">
20 </image> --> 29 </image> -->
21 <image class="avatar" :src="config.baseUrl_api + '/fs/static/tx@2x.png'" 30 <image :src="config.baseUrl_api + '/fs/static/tx@2x.png'" class="avatar"
22 mode="aspectFill"> 31 mode="aspectFill">
23 </image> 32 </image>
24 </view> 33 </view>
25 <view class="member-id">{{ userInfo?.userName }}</view> 34 <!-- <view class="member-id">{{ userInfo?.userName }}</view>-->
35 <view class="user-name">{{ perInfo?.perName }}</view>
26 </view> 36 </view>
37
27 <view class="user-bottom"> 38 <view class="user-bottom">
28 <view class="user-name">{{ perInfo?.perName }}</view> 39 <!-- <view class="user-name">{{ perInfo?.perName }}</view>-->
29 <view class="card-info"> 40 <view class="card-info">
30 <view class="info-row">会员卡号:{{ perInfo?.perCode }}</view> 41 <view class="info-row">
31 <view class="info-row">会员有效期:{{ perInfo?.perValidDate }}</view> 42 <text>会员卡号</text>
43 <text>{{ perInfo?.perCode }}</text>
44 </view>
45 <view class="info-row">
46 <text>会员有效期</text>
47 <text>{{ perInfo?.perValidDate }}</text>
48 </view>
32 </view> 49 </view>
33 </view> 50 </view>
34 </view> 51 </view>
35 52
36 <!-- 已过期印章 --> 53 <!-- 已过期印章 -->
37 <image v-if="perInfo?.perValidDateFlag == 0" class="expired-stamp" 54 <image v-if="perInfo?.perValidDateFlag == 0" :src="config.baseUrl_api + '/fs/static/end@2x.png'"
38 :src="config.baseUrl_api + '/fs/static/end@2x.png'" mode="aspectFit"> 55 class="expired-stamp" mode="aspectFit">
39 </image> 56 </image>
40 57
41 <!-- 卡片右下角按钮 --> 58 <!-- 卡片右下角按钮 -->
42 <view class="card-btns"> 59 <view class="card-btns">
43 <view class="card-btn" @click="goToPay"> 60 <view class="card-btn" @click="goToPay">
44 <text>缴费</text> 61 <text>认证缴费</text>
45 </view> 62 </view>
46 <view class="card-btn" @click="downCert"> 63 <view class="card-btn" @click="downCert">
47 <text>电子会员证</text> 64 <text>电子会员证</text>
...@@ -83,7 +100,7 @@ ...@@ -83,7 +100,7 @@
83 <image :src="config.baseUrl_api + '/fs/static/user_icon01@2x.png'" class="query-item-icon"></image> 100 <image :src="config.baseUrl_api + '/fs/static/user_icon01@2x.png'" class="query-item-icon"></image>
84 <text class="query-item-text">我的订单</text> 101 <text class="query-item-text">我的订单</text>
85 </view> 102 </view>
86 <uni-icons type="arrowright" size="20" color="#999"></uni-icons> 103 <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
87 </view> 104 </view>
88 <!-- <view class="query-item" @click="goToWebView(1)"> 105 <!-- <view class="query-item" @click="goToWebView(1)">
89 <view class="query-item-left"> 106 <view class="query-item-left">
...@@ -132,61 +149,66 @@ ...@@ -132,61 +149,66 @@
132 <image :src="config.baseUrl_api + '/fs/static/user_icon02@2x.png'" class="query-item-icon"></image> 149 <image :src="config.baseUrl_api + '/fs/static/user_icon02@2x.png'" class="query-item-icon"></image>
133 <text class="query-item-text">我的段位</text> 150 <text class="query-item-text">我的段位</text>
134 </view> 151 </view>
135 <uni-icons type="arrowright" size="20" color="#999"></uni-icons> 152 <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
136 </view> 153 </view>
137 <view class="query-item" @click="goToWebView(8)"> 154 <view class="query-item" @click="goToWebView(8)">
138 <view class="query-item-left"> 155 <view class="query-item-left">
139 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image> 156 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
140 <text class="query-item-text">级位考官</text> 157 <text class="query-item-text">级位考官</text>
141 </view> 158 </view>
142 <uni-icons type="arrowright" size="20" color="#999"></uni-icons> 159 <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
143 </view> 160 </view>
144 <view class="query-item" @click="goToWebView(9)"> 161 <view class="query-item" @click="goToWebView(9)">
145 <view class="query-item-left"> 162 <view class="query-item-left">
146 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image> 163 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
147 <text class="query-item-text">段位考官</text> 164 <text class="query-item-text">段位考官</text>
148 </view> 165 </view>
149 <uni-icons type="arrowright" size="20" color="#999"></uni-icons> 166 <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
150 </view> 167 </view>
151 <view class="query-item" @click="goToWebView(10)"> 168 <view class="query-item" @click="goToWebView(10)">
152 <view class="query-item-left"> 169 <view class="query-item-left">
153 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image> 170 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
154 <text class="query-item-text">大众教练员</text> 171 <text class="query-item-text">大众教练员</text>
155 </view> 172 </view>
156 <uni-icons type="arrowright" size="20" color="#999"></uni-icons> 173 <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
157 </view> 174 </view>
158 <view class="query-item" @click="goToWebView(11)"> 175 <view class="query-item" @click="goToWebView(11)">
159 <view class="query-item-left"> 176 <view class="query-item-left">
160 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image> 177 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
161 <text class="query-item-text">大众裁判员</text> 178 <text class="query-item-text">大众裁判员</text>
162 </view> 179 </view>
163 <uni-icons type="arrowright" size="20" color="#999"></uni-icons> 180 <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
164 </view> 181 </view>
165 <view class="query-item" @click="goToWebView(12)"> 182 <view class="query-item" @click="goToWebView(12)">
166 <view class="query-item-left"> 183 <view class="query-item-left">
167 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image> 184 <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
168 <text class="query-item-text">培训讲师</text> 185 <text class="query-item-text">培训讲师</text>
169 </view> 186 </view>
170 <uni-icons type="arrowright" size="20" color="#999"></uni-icons> 187 <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
188 </view>
171 </view> 189 </view>
190
191 <!-- 退出-->
192 <view class="logOut">
193 <view class="logOutBtn" @click="showLogoutConfirm">退出登录</view>
172 </view> 194 </view>
173 195
174 <!-- 绑定学员弹框 --> 196 <!-- 绑定学员弹框 -->
175 <uni-popup ref="bindPopup" type="center" :mask-click="false"> 197 <uni-popup ref="bindPopup" :mask-click="false" type="center">
176 <view class="bind-popup"> 198 <view class="bind-popup">
177 <view class="popup-title">绑定学员</view> 199 <view class="popup-title">绑定学员</view>
178 <view class="popup-content"> 200 <view class="popup-content">
179 <view class="form-item"> 201 <view class="form-item">
180 <view class="form-label">姓名</view> 202 <view class="form-label">姓名</view>
181 <view class="form-input"> 203 <view class="form-input">
182 <input v-model="bindForm.name" placeholder="请输入姓名" placeholder-class="placeholder-class" /> 204 <input v-model="bindForm.name" placeholder="请输入姓名" placeholder-class="placeholder-class"/>
183 </view> 205 </view>
184 </view> 206 </view>
185 <view class="form-item"> 207 <view class="form-item">
186 <view class="form-label">证件号</view> 208 <view class="form-label">证件号</view>
187 <view class="form-input"> 209 <view class="form-input">
188 <input v-model="bindForm.idcCode" placeholder="请输入证件号" 210 <input v-model="bindForm.idcCode" placeholder="请输入证件号"
189 placeholder-class="placeholder-class" /> 211 placeholder-class="placeholder-class"/>
190 </view> 212 </view>
191 </view> 213 </view>
192 </view> 214 </view>
...@@ -214,59 +236,57 @@ ...@@ -214,59 +236,57 @@
214 </template> 236 </template>
215 237
216 <script setup> 238 <script setup>
217 import { 239 import {
218 computed, 240 computed,
219 onMounted, 241 onMounted,
220 ref, 242 ref,
221 watch, 243 watch,
222 nextTick 244 nextTick
223 } from "vue"; 245 } from "vue";
224 import config from "/config.js"; 246 import config from "/config.js";
225 import { 247 import {
226 wxLogin, 248 wxLogin,
227 logout, 249 logout,
228 getWebInfo 250 getWebInfo
229 } from '@/common/login.js'; 251 } from '@/common/login.js';
230 import { 252 import {useUserStore} from "@/store/modules/user.js";
231 useUserStore 253 import to from 'await-to-js'
232 } from "../store/modules/user"; 254 import {
233 import to from 'await-to-js'
234 import {
235 bindUser, 255 bindUser,
236 unbindUser, 256 unbindUser,
237 downStuCertSingle 257 downStuCertSingle
238 } from '@/common/api.js' 258 } from '@/common/api.js'
239 259
240 const userStore = useUserStore() 260 const userStore = useUserStore()
241 const userInfo = computed(() => userStore.user) 261 const userInfo = computed(() => userStore.user ?? {})
242 const perInfo = computed(() => userStore.perInfo) 262 const perInfo = computed(() => userStore.perInfo ?? {})
243 console.log(222,userInfo.value) 263 console.log(222, userInfo.value)
244 console.log(333,perInfo.value) 264 console.log(333, perInfo.value)
245 265
246 // 是否已绑定学员(根据会员卡号判断) 266 // 是否已绑定学员(根据会员卡号判断)
247 const isBound = computed(() => { 267 const isBound = computed(() => {
248 const perCode = perInfo.value?.perCode 268 const perCode = perInfo.value?.perCode
249 return perCode !== undefined && perCode !== null && perCode !== '' 269 return perCode !== undefined && perCode !== null && perCode !== ''
250 }) 270 })
251 271
252 const bindPopup = ref(null) 272 const bindPopup = ref(null)
253 const bindForm = ref({ 273 const bindForm = ref({
254 name: '', 274 name: '',
255 idcCode: '' 275 idcCode: ''
256 }) 276 })
257 const showConfirm = ref(false) 277 const showConfirm = ref(false)
258 278
259 onMounted(() => { 279 onMounted(() => {
260 let webUserName = uni.getStorageSync('webUserName') 280 let webUserName = uni.getStorageSync('webUserName')
261 if (!webUserName) { 281 if (!webUserName) {
262 wxLogin().then(getWebInfo) 282 wxLogin().then(getWebInfo)
263 } 283 }
264 }) 284 })
265 285
266 // 标记是否已经弹出过绑定框(避免重复弹出) 286 // 标记是否已经弹出过绑定框(避免重复弹出)
267 let hasOpenedBindPopup = false 287 let hasOpenedBindPopup = false
268 288
269 watch(() => perInfo.value, (newVal, oldVal) => { 289 watch(() => perInfo.value, (newVal, oldVal) => {
270 console.log(444, newVal?.perCode) 290 console.log(444, newVal?.perCode)
271 291
272 // 只有当 perInfo 数据存在且 perCode 为空时才弹出 292 // 只有当 perInfo 数据存在且 perCode 为空时才弹出
...@@ -276,12 +296,12 @@ const showConfirm = ref(false) ...@@ -276,12 +296,12 @@ const showConfirm = ref(false)
276 openBindPopup() 296 openBindPopup()
277 }) 297 })
278 } 298 }
279 }, { 299 }, {
280 immediate: true 300 immediate: true
281 }) 301 })
282 302
283 // 打开绑定弹框 303 // 打开绑定弹框
284 const openBindPopup = () => { 304 const openBindPopup = () => {
285 if (bindPopup.value) { 305 if (bindPopup.value) {
286 bindForm.value = { 306 bindForm.value = {
287 name: '', 307 name: '',
...@@ -293,34 +313,35 @@ const showConfirm = ref(false) ...@@ -293,34 +313,35 @@ const showConfirm = ref(false)
293 openBindPopup() 313 openBindPopup()
294 }) 314 })
295 } 315 }
296 } 316 }
297 317
298 // 关闭绑定弹框 318 // 关闭绑定弹框
299 const closeBindPopup = () => { 319 const closeBindPopup = () => {
300 bindPopup.value?.close() 320 bindPopup.value?.close()
301 } 321 }
302 322
303 // 处理绑定/切换操作 323 // 处理绑定/切换操作
304 const handleBindAction = async () => { 324 const handleBindAction = async () => {
305 if (isBound.value) { 325 // if (isBound.value) {
306 // 已绑定,先解绑再打开绑定弹框 326 // // 已绑定,先解绑再打开绑定弹框
307 uni.showLoading({ 327 // uni.showLoading({
308 title: '解绑中...', 328 // title: '解绑中...',
309 mask: true 329 // mask: true
310 }) 330 // })
311 const [err] = await to(unbindUser()) 331 // const [err] = await to(unbindUser())
312 uni.hideLoading() 332 // uni.hideLoading()
313 if (err) return 333 // if (err) return
314 getWebInfo() 334 // getWebInfo()
315 openBindPopup() 335 // openBindPopup()
316 } else { 336 // } else {
317 // 未绑定,打开绑定弹框 337 // // 未绑定,打开绑定弹框
338 // openBindPopup()
339 // }
318 openBindPopup() 340 openBindPopup()
319 } 341 }
320 }
321 342
322 // 确认绑定 343 // 确认绑定
323 const confirmBind = async () => { 344 const confirmBind = async () => {
324 if (!bindForm.value.name) { 345 if (!bindForm.value.name) {
325 uni.showToast({ 346 uni.showToast({
326 title: '请输入姓名', 347 title: '请输入姓名',
...@@ -336,6 +357,18 @@ const showConfirm = ref(false) ...@@ -336,6 +357,18 @@ const showConfirm = ref(false)
336 return 357 return
337 } 358 }
338 359
360 if (isBound.value) {
361 // 已绑定,先解绑再打开绑定弹框
362 uni.showLoading({
363 title: '解绑中...',
364 mask: true
365 })
366 const [err] = await to(unbindUser())
367 uni.hideLoading()
368 if (err) return
369 await getWebInfo()
370 }
371
339 uni.showLoading({ 372 uni.showLoading({
340 title: '绑定中...', 373 title: '绑定中...',
341 mask: true 374 mask: true
...@@ -348,19 +381,22 @@ const showConfirm = ref(false) ...@@ -348,19 +381,22 @@ const showConfirm = ref(false)
348 uni.hideLoading() 381 uni.hideLoading()
349 382
350 if (err) { 383 if (err) {
351 uni.showToast({ 384 console.log(err)
352 title: err?.data?.msg || err?.message || '绑定失败,请稍后重试', 385 // uni.showToast({
353 icon: 'none', 386 // title: err?.data?.msg || err?.message || '绑定失败,请稍后重试',
354 duration: 3000 387 // icon: 'none',
355 }) 388 // duration: 3000
356 return 389 // })
357 }else{ 390 // return
391 handelGo()
392 closeBindPopup()
393 } else {
358 uni.showToast({ 394 uni.showToast({
359 title: '绑定成功', 395 title: '绑定成功',
360 icon: 'success' 396 icon: 'success'
361 }) 397 })
362 closeBindPopup() 398 closeBindPopup()
363 getWebInfo() 399 await getWebInfo()
364 } 400 }
365 401
366 // uni.showToast({ 402 // uni.showToast({
...@@ -368,86 +404,105 @@ const showConfirm = ref(false) ...@@ -368,86 +404,105 @@ const showConfirm = ref(false)
368 // icon: 'success' 404 // icon: 'success'
369 // }) 405 // })
370 406
407 }
408
409 const handelGo = () => {
410 uni.showModal({
411 title: "提示",
412 content: "当前账号非中国跆拳道协会有效会员。请先完成认证缴费,即可正常登录使用。",
413 success: function (res) {
414 if (res.confirm) {
415 // closeBindPopup()
416 uni.navigateTo({
417 url: `/personal/addVip_per?name=${bindForm.value.name}&idcCode=${bindForm.value.idcCode}`
418 });
419 } else if (res.cancel) {
420 // closeBindPopup()
371 } 421 }
372 422
373 // 返回上一页 423 },
374 const goBack = () => { 424
425 })
426 }
427
428 // 返回上一页
429 const goBack = () => {
375 uni.navigateBack() 430 uni.navigateBack()
376 } 431 }
377 432
378 const goToAuth = () => { 433 const goToAuth = () => {
379 if (!isBound.value) { 434 if (!isBound.value) {
380 uni.showToast({ title: '请先绑定学员', icon: 'none' }) 435 uni.showToast({title: '请先绑定学员', icon: 'none'})
381 return 436 return
382 } 437 }
383 uni.navigateTo({ 438 uni.navigateTo({
384 url: '/personal/personInfo' 439 url: '/personal/personInfo'
385 }); 440 });
386 }; 441 };
387 442
388 const goToScore = () => { 443 const goToScore = () => {
389 if (!isBound.value) { 444 if (!isBound.value) {
390 uni.showToast({ title: '请先绑定学员', icon: 'none' }) 445 uni.showToast({title: '请先绑定学员', icon: 'none'})
391 return 446 return
392 } 447 }
393 uni.navigateTo({ 448 uni.navigateTo({
394 url: '/personal/memberInfo' 449 url: '/personal/memberInfo'
395 }); 450 });
396 }; 451 };
397 452
398 const goToWebView = (type) => { 453 const goToWebView = (type) => {
399 // const url = "https://member.taekwondo.org.cn/#/authAccurate?type=" + type 454 // const url = "https://member.taekwondo.org.cn/#/authAccurate?type=" + type
400 const url = "https://tk001.wxjylt.com/pc.html#/authAccurate?type=" + type 455 const url = "https://tk001.wxjylt.com/pc.html#/authAccurate?type=" + type
401 uni.navigateTo({ 456 uni.navigateTo({
402 url: "/pages/webview/webview?url=" + encodeURIComponent(url) 457 url: "/pages/webview/webview?url=" + encodeURIComponent(url)
403 }); 458 });
404 }; 459 };
405 460
406 // 导航到级位记录 461 // 导航到级位记录
407 const goToRecord = (type) => { 462 const goToRecord = (type) => {
408 if (!isBound.value) { 463 if (!isBound.value) {
409 uni.showToast({ title: '请先绑定学员', icon: 'none' }) 464 uni.showToast({title: '请先绑定学员', icon: 'none'})
410 return 465 return
411 } 466 }
412 uni.navigateTo({ 467 uni.navigateTo({
413 url: '/personal/levelRecord?type=' + type 468 url: '/personal/levelRecord?type=' + type
414 }); 469 });
415 }; 470 };
416 471
417 // 导航到我的订单 472 // 导航到我的订单
418 const goToOrder = () => { 473 const goToOrder = () => {
419 if (!isBound.value) { 474 if (!isBound.value) {
420 uni.showToast({ title: '请先绑定学员', icon: 'none' }) 475 uni.showToast({title: '请先绑定学员', icon: 'none'})
421 return 476 return
422 } 477 }
423 uni.navigateTo({ 478 uni.navigateTo({
424 url: '/personal/order' 479 url: '/personal/order'
425 }); 480 });
426 }; 481 };
427 482
428 // 导航到缴费 483 // 导航到缴费
429 const goToPay = () => { 484 const goToPay = () => {
430 const perId = userInfo.value?.perId 485 const perId = userInfo.value.perId ?? ''
431 uni.navigateTo({ 486 uni.navigateTo({
432 url: `/personal/addVip_per?perId=${perId}` 487 url: `/personal/addVip_per?perId=${perId}`
433 }); 488 });
434 }; 489 };
435 490
436 // 下载电子会员证 491 // 下载电子会员证
437 const downCert = async () => { 492 const downCert = async () => {
438 if (!isBound.value) { 493 if (!isBound.value) {
439 uni.showToast({ title: '请先绑定学员', icon: 'none' }) 494 uni.showToast({title: '请先绑定学员', icon: 'none'})
440 return 495 return
441 } 496 }
442 const perId = userInfo.value?.perId 497 const perId = userInfo.value?.perId
443 if (!perId) return 498 if (!perId) return
444 499
445 uni.showLoading({ title: '加载中...', mask: true }) 500 uni.showLoading({title: '加载中...', mask: true})
446 const [err, res] = await to(downStuCertSingle(perId)) 501 const [err, res] = await to(downStuCertSingle(perId))
447 uni.hideLoading() 502 uni.hideLoading()
448 503
449 if (err) { 504 if (err) {
450 uni.showToast({ title: err?.data?.msg || '获取会员证失败', icon: 'none' }) 505 uni.showToast({title: err?.data?.msg || '获取会员证失败', icon: 'none'})
451 return 506 return
452 } 507 }
453 const pdfUrl = res?.data 508 const pdfUrl = res?.data
...@@ -456,22 +511,21 @@ const showConfirm = ref(false) ...@@ -456,22 +511,21 @@ const showConfirm = ref(false)
456 url: `/personal/certPreview?url=${encodeURIComponent(pdfUrl)}` 511 url: `/personal/certPreview?url=${encodeURIComponent(pdfUrl)}`
457 }) 512 })
458 } 513 }
459 }; 514 };
460
461 515
462 516
463 // 显示退出登录确认框 517 // 显示退出登录确认框
464 const showLogoutConfirm = () => { 518 const showLogoutConfirm = () => {
465 showConfirm.value = true; 519 showConfirm.value = true;
466 }; 520 };
467 521
468 // 取消退出登录 522 // 取消退出登录
469 const cancelLogout = () => { 523 const cancelLogout = () => {
470 showConfirm.value = false; 524 showConfirm.value = false;
471 }; 525 };
472 526
473 // 确认退出登录 527 // 确认退出登录
474 const confirmLogout = () => { 528 const confirmLogout = () => {
475 // 调用退出登录接口 529 // 调用退出登录接口
476 logout().then(() => { 530 logout().then(() => {
477 // 跳转到登录页 531 // 跳转到登录页
...@@ -479,17 +533,17 @@ const showConfirm = ref(false) ...@@ -479,17 +533,17 @@ const showConfirm = ref(false)
479 url: '/login/login' 533 url: '/login/login'
480 }) 534 })
481 }); 535 });
482 }; 536 };
483 </script> 537 </script>
484 538
485 <style lang="scss" scoped> 539 <style lang="scss" scoped>
486 .page-container { 540 .page-container {
487 min-height: 100vh; 541 min-height: 100vh;
488 background: #f5f5f5; 542 background: #f5f5f5;
489 } 543 }
490 544
491 /* 导航栏 */ 545 /* 导航栏 */
492 .nav-bar { 546 .nav-bar {
493 display: flex; 547 display: flex;
494 align-items: center; 548 align-items: center;
495 justify-content: space-between; 549 justify-content: space-between;
...@@ -500,176 +554,196 @@ const showConfirm = ref(false) ...@@ -500,176 +554,196 @@ const showConfirm = ref(false)
500 position: sticky; 554 position: sticky;
501 top: 0; 555 top: 0;
502 z-index: 100; 556 z-index: 100;
503 } 557 }
504 558
505 .nav-left { 559 .nav-left {
506 width: 44rpx; 560 width: 44rpx;
507 height: 44rpx; 561 height: 44rpx;
508 display: flex; 562 display: flex;
509 align-items: center; 563 align-items: center;
510 justify-content: center; 564 justify-content: center;
511 } 565 }
512 566
513 .nav-title { 567 .nav-title {
514 font-size: 32rpx; 568 font-size: 32rpx;
515 font-weight: 500; 569 font-weight: 500;
516 color: #333; 570 color: #333;
517 } 571 }
518 572
519 .nav-right { 573 .nav-right {
520 width: 44rpx; 574 width: 44rpx;
521 } 575 }
522 576
523 /* 会员卡 */ 577 /* 会员卡 */
524 .member-card { 578 .member-card {
525 position: relative; 579 position: relative;
526 height: 450rpx; 580 height: 450rpx;
527 border-radius: 0; 581 border-radius: 0;
528 overflow: hidden; 582 overflow: hidden;
583 }
584
585 .member-title {
586 width: 100%;
587 display: flex;
588 justify-content: space-between;
589 align-items: center;
590 border-bottom: 1px solid #eff2f8;
591 padding-bottom: 20rpx;
592 margin-bottom: 20rpx;
593
594 .member-id {
595 font-size: 30rpx;
596
529 } 597 }
598 }
530 599
531 .card-bg { 600 .card-bg {
532 position: absolute; 601 position: absolute;
533 top: 0; 602 top: 0;
534 left: 0; 603 left: 0;
535 width: 100%; 604 width: 100%;
536 height: 100%; 605 height: 100%;
537 z-index: 0; 606 z-index: 0;
538 } 607 }
539 608
540 .bind-student { 609 .bind-student {
541 position: absolute; 610 //position: absolute;
542 top: 30rpx; 611 //top: 30rpx;
543 right: 30rpx; 612 //right: 30rpx;
544 display: flex; 613 display: flex;
545 align-items: center; 614 align-items: center;
546 gap: 8rpx; 615 //gap: 8rpx;
547 z-index: 10; 616 z-index: 10;
548 padding: 10rpx 16rpx; 617 padding: 5rpx 16rpx;
549 // background: rgba(255, 255, 255, 0.5);
550 border-radius: 30rpx; 618 border-radius: 30rpx;
551 } 619 //border: 1px solid #fff;
620 background: #dbbf79;
621 }
552 622
553 .bind-student text { 623 .bind-student text {
554 font-size: 26rpx; 624 font-size: 26rpx;
555 color: #5c4b37; 625 color: #5c4b37;
556 } 626 }
557 627
558 .bind-icon { 628 .bind-icon {
559 width: 45rpx; 629 width: 45rpx;
560 height: 45rpx; 630 height: 45rpx;
561 } 631 }
562 632
563 .user-section { 633 .user-section {
564 position: relative; 634 position: relative;
565 z-index: 1; 635 z-index: 1;
566 padding: 50rpx 30rpx 0; 636 padding: 30rpx 30rpx 0;
567 } 637 }
568 638
569 .user-top { 639 .user-top {
570 display: flex; 640 display: flex;
571 align-items: center; 641 align-items: center;
572 gap: 20rpx; 642 gap: 20rpx;
573 margin-bottom: 20rpx; 643 margin-bottom: 10rpx;
574 } 644 }
575 645
576 .avatar-wrap { 646 .avatar-wrap {
577 flex-shrink: 0; 647 flex-shrink: 0;
578 } 648 }
579 649
580 .avatar { 650 .avatar {
581 width: 110rpx; 651 width: 110rpx;
582 height: 110rpx; 652 height: 110rpx;
583 border-radius: 50%; 653 border-radius: 50%;
584 border: 3rpx solid rgba(255, 255, 255, 0.6); 654 border: 3rpx solid rgba(255, 255, 255, 0.6);
585 } 655 }
586 656
587 .member-id { 657 .member-id {
588 font-size: 26rpx; 658 font-size: 26rpx;
589 color: #503000; 659 color: #503000;
590 } 660 }
591 661
592 .user-bottom { 662 .user-bottom {
593 padding-left: 0; 663 //padding-left: 0;
594 } 664 padding: 0 30rpx;
665 }
595 666
596 .user-name { 667 .user-name {
597 font-size: 44rpx; 668 font-size: 50rpx;
598 font-weight: bold; 669 font-weight: bold;
599 color: #5c4b37; 670 color: #5c4b37;
600 margin-bottom: 16rpx; 671 margin-bottom: 16rpx;
601 } 672 margin-left: 16rpx;
673 }
602 674
603 .card-info { 675 .card-info {
604 display: flex; 676 display: flex;
605 flex-direction: column; 677 flex-direction: column;
606 gap: 10rpx; 678 gap: 10rpx;
607 } 679 }
608 680
609 .info-row { 681 .info-row {
610 font-size: 28rpx; 682 font-size: 30rpx;
611 color: #503000; 683 color: #503000;
612 } 684 display: flex;
685 justify-content: space-between;
686 }
613 687
614 /* 已过期印章 */ 688 /* 已过期印章 */
615 .expired-stamp { 689 .expired-stamp {
616 position: absolute; 690 position: absolute;
617 right: 30rpx; 691 right: 30rpx;
618 bottom: 150rpx; 692 bottom: 150rpx;
619 width: 150rpx; 693 width: 150rpx;
620 height: 150rpx; 694 height: 150rpx;
621 z-index: 1; 695 z-index: 1;
622 } 696 }
623 697
624 /* 卡片右下角按钮 */ 698 /* 卡片右下角按钮 */
625 .card-btns { 699 .card-btns {
626 position: absolute; 700 position: absolute;
627 right: 30rpx; 701 left: 50rpx;
628 bottom: 80rpx; 702 bottom: 37rpx;
629 z-index: 10; 703 z-index: 10;
630 display: flex; 704 display: flex;
631 gap: 16rpx; 705 gap: 16rpx;
632 } 706 }
633 707
634 .card-btn { 708 .card-btn {
635 background: rgba(255, 255, 255, 0.9); 709 background: rgba(255, 255, 255, 0.9);
636 border-radius: 30rpx; 710 border-radius: 30rpx;
637 padding: 0rpx 20rpx; 711 padding: 0 30rpx 5rpx 30rpx;
638 padding-bottom: 5rpx; 712 border: 1px solid #e0c36c;
639 } 713 }
640 714
641 .card-btn text { 715 .card-btn text {
642 height: 24rpx; 716 height: 24rpx;
643 line-height: 24rpx; 717 line-height: 24rpx;
644 font-size: 24rpx; 718 font-size: 24rpx;
645 color: #C40F18; 719 color: #c7990f;
646 } 720 }
647 721
648 /* 功能按钮卡片 */ 722 /* 功能按钮卡片 */
649 .func-card { 723 .func-card {
650 margin: -70rpx 30rpx 30rpx; 724 margin: -23rpx 30rpx 30rpx;
651 background: #ffffff; 725 background: #ffffff;
652 border-radius: 20rpx; 726 border-radius: 20rpx;
653 padding: 36rpx 0; 727 padding: 36rpx 0;
654 box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06); 728 box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);
655 position: relative; 729 position: relative;
656 z-index: 2; 730 z-index: 2;
657 } 731 }
658 732
659 .func-list { 733 .func-list {
660 display: flex; 734 display: flex;
661 justify-content: space-around; 735 justify-content: space-around;
662 padding: 0 20rpx; 736 padding: 0 20rpx;
663 } 737 }
664 738
665 .func-item { 739 .func-item {
666 display: flex; 740 display: flex;
667 flex-direction: column; 741 flex-direction: column;
668 align-items: center; 742 align-items: center;
669 gap: 12rpx; 743 gap: 12rpx;
670 } 744 }
671 745
672 .func-icon { 746 .func-icon {
673 width: 72rpx; 747 width: 72rpx;
674 height: 72rpx; 748 height: 72rpx;
675 display: flex; 749 display: flex;
...@@ -677,133 +751,133 @@ const showConfirm = ref(false) ...@@ -677,133 +751,133 @@ const showConfirm = ref(false)
677 justify-content: center; 751 justify-content: center;
678 // background: #f0f7ff; 752 // background: #f0f7ff;
679 // border-radius: 16rpx; 753 // border-radius: 16rpx;
680 image{ 754 image {
681 width: 72rpx; 755 width: 72rpx;
682 height: 72rpx; 756 height: 72rpx;
683 } 757 }
684 } 758 }
685 759
686 .func-text { 760 .func-text {
687 font-size: 24rpx; 761 font-size: 24rpx;
688 color: #333; 762 color: #333;
689 } 763 }
690 764
691 /* 查询功能区域 */ 765 /* 查询功能区域 */
692 .query-section { 766 .query-section {
693 margin: 0 30rpx; 767 margin: 0 30rpx;
694 background: #ffffff; 768 background: #ffffff;
695 border-radius: 20rpx; 769 border-radius: 20rpx;
696 box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06); 770 box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);
697 overflow: hidden; 771 overflow: hidden;
698 } 772 }
699 773
700 .query-item { 774 .query-item {
701 display: flex; 775 display: flex;
702 align-items: center; 776 align-items: center;
703 justify-content: space-between; 777 justify-content: space-between;
704 padding: 32rpx 30rpx; 778 padding: 32rpx 30rpx;
705 border-bottom: 1rpx solid #f5f5f5; 779 border-bottom: 1rpx solid #f5f5f5;
706 } 780 }
707 781
708 .query-item:last-child { 782 .query-item:last-child {
709 border-bottom: none; 783 border-bottom: none;
710 } 784 }
711 785
712 .query-item-left { 786 .query-item-left {
713 display: flex; 787 display: flex;
714 align-items: center; 788 align-items: center;
715 gap: 16rpx; 789 gap: 16rpx;
716 } 790 }
717 791
718 .query-item-icon { 792 .query-item-icon {
719 width: 44rpx; 793 width: 44rpx;
720 height: 48rpx; 794 height: 48rpx;
721 } 795 }
722 796
723 .query-item-text { 797 .query-item-text {
724 font-size: 28rpx; 798 font-size: 28rpx;
725 color: #333; 799 color: #333;
726 } 800 }
727 801
728 /* 绑定学员弹框 */ 802 /* 绑定学员弹框 */
729 .bind-popup { 803 .bind-popup {
730 width: 600rpx; 804 width: 600rpx;
731 background: #ffffff; 805 background: #ffffff;
732 border-radius: 24rpx; 806 border-radius: 24rpx;
733 overflow: hidden; 807 overflow: hidden;
734 } 808 }
735 809
736 .popup-title { 810 .popup-title {
737 font-size: 32rpx; 811 font-size: 32rpx;
738 font-weight: 500; 812 font-weight: 500;
739 color: #333; 813 color: #333;
740 text-align: center; 814 text-align: center;
741 padding: 40rpx 30rpx 20rpx; 815 padding: 40rpx 30rpx 20rpx;
742 } 816 }
743 817
744 .popup-content { 818 .popup-content {
745 padding: 20rpx 30rpx 40rpx; 819 padding: 20rpx 30rpx 40rpx;
746 } 820 }
747 821
748 .form-item { 822 .form-item {
749 display: flex; 823 display: flex;
750 align-items: center; 824 align-items: center;
751 margin-bottom: 24rpx; 825 margin-bottom: 24rpx;
752 } 826 }
753 827
754 .form-item:last-child { 828 .form-item:last-child {
755 margin-bottom: 0; 829 margin-bottom: 0;
756 } 830 }
757 831
758 .form-label { 832 .form-label {
759 width: 120rpx; 833 width: 120rpx;
760 font-size: 28rpx; 834 font-size: 28rpx;
761 color: #333; 835 color: #333;
762 flex-shrink: 0; 836 flex-shrink: 0;
763 } 837 }
764 838
765 .form-input { 839 .form-input {
766 flex: 1; 840 flex: 1;
767 background: #f5f5f5; 841 background: #f5f5f5;
768 border-radius: 12rpx; 842 border-radius: 12rpx;
769 padding: 20rpx 24rpx; 843 padding: 20rpx 24rpx;
770 } 844 }
771 845
772 .form-input input { 846 .form-input input {
773 font-size: 28rpx; 847 font-size: 28rpx;
774 color: #333; 848 color: #333;
775 width: 100%; 849 width: 100%;
776 } 850 }
777 851
778 .placeholder-class { 852 .placeholder-class {
779 color: #999; 853 color: #999;
780 } 854 }
781 855
782 .popup-btns { 856 .popup-btns {
783 display: flex; 857 display: flex;
784 border-top: 1rpx solid #eee; 858 border-top: 1rpx solid #eee;
785 } 859 }
786 860
787 .popup-btn { 861 .popup-btn {
788 flex: 1; 862 flex: 1;
789 height: 100rpx; 863 height: 100rpx;
790 line-height: 100rpx; 864 line-height: 100rpx;
791 text-align: center; 865 text-align: center;
792 font-size: 30rpx; 866 font-size: 30rpx;
793 } 867 }
794 868
795 .popup-btn.cancel { 869 .popup-btn.cancel {
796 color: #666; 870 color: #666;
797 border-right: 1rpx solid #eee; 871 border-right: 1rpx solid #eee;
798 } 872 }
799 873
800 .popup-btn.confirm { 874 .popup-btn.confirm {
801 color: #C40F18; 875 color: #C40F18;
802 font-weight: 500; 876 font-weight: 500;
803 } 877 }
804 878
805 /* 退出登录确认框 */ 879 /* 退出登录确认框 */
806 .confirm-mask { 880 .confirm-mask {
807 position: fixed; 881 position: fixed;
808 top: 0; 882 top: 0;
809 left: 0; 883 left: 0;
...@@ -814,54 +888,78 @@ const showConfirm = ref(false) ...@@ -814,54 +888,78 @@ const showConfirm = ref(false)
814 align-items: center; 888 align-items: center;
815 justify-content: center; 889 justify-content: center;
816 z-index: 1000; 890 z-index: 1000;
817 } 891 }
818 892
819 .confirm-box { 893 .confirm-box {
820 width: 600rpx; 894 width: 600rpx;
821 background: #ffffff; 895 background: #ffffff;
822 border-radius: 20rpx; 896 border-radius: 20rpx;
823 overflow: hidden; 897 overflow: hidden;
824 } 898 }
825 899
826 .confirm-content { 900 .confirm-content {
827 padding: 40rpx; 901 padding: 40rpx;
828 text-align: center; 902 text-align: center;
829 } 903 }
830 904
831 .confirm-title { 905 .confirm-title {
832 font-size: 32rpx; 906 font-size: 32rpx;
833 font-weight: 500; 907 font-weight: 500;
834 color: #333; 908 color: #333;
835 margin-bottom: 20rpx; 909 margin-bottom: 20rpx;
836 } 910 }
837 911
838 .confirm-text { 912 .confirm-text {
839 font-size: 28rpx; 913 font-size: 28rpx;
840 color: #666; 914 color: #666;
841 margin-top: 30rpx; 915 margin-top: 30rpx;
842 color: #C40F18; 916 color: #C40F18;
843 } 917 color: #dbbb69;
844 918
845 .confirm-buttons { 919 }
920
921 .confirm-buttons {
846 display: flex; 922 display: flex;
847 border-top: 1rpx solid #eee; 923 border-top: 1rpx solid #eee;
848 } 924 }
849 925
850 .confirm-btn { 926 .confirm-btn {
851 flex: 1; 927 flex: 1;
852 height: 100rpx; 928 height: 100rpx;
853 line-height: 100rpx; 929 line-height: 100rpx;
854 text-align: center; 930 text-align: center;
855 font-size: 30rpx; 931 font-size: 30rpx;
856 } 932 }
857 933
858 .confirm-btn.cancel { 934 .confirm-btn.cancel {
859 color: #666; 935 color: #666;
860 border-right: 1rpx solid #eee; 936 border-right: 1rpx solid #eee;
861 } 937 }
862 938
863 .confirm-btn.confirm { 939 .confirm-btn.confirm {
864 color: #C40F18; 940 color: #C40F18;
865 font-weight: 500; 941 font-weight: 500;
942 color: #dbbb69;
943 }
944
945 .logOut {
946 display: flex;
947 justify-content: center;
948 margin-top: 16px;
949 padding-bottom: 20rpx;
950
951 .logOutBtn {
952 background-image: linear-gradient(135deg, #dbbb69 10%, #f0deb0 100%);;
953 backdrop-filter: blur(4px);
954 width: 80%;
955 border: 1px solid #dadada;
956 padding: 20rpx 50rpx;
957 border-radius: 50rpx;
958 font-weight: 600;
959 font-size: 30rpx;
960 color: #fff;
961 text-align: center;
962 cursor: pointer;
866 } 963 }
964 }
867 </style> 965 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!