feat(personal): 实现个人中心页面及绑定/解绑学员功能
- 新增个人中心页面,包含会员卡展示、用户信息、功能入口 - 实现绑定学员弹框,支持输入姓名和证件号进行绑定 - 添加绑定状态判断,已绑定时按钮切换为解绑 - 实现解绑功能,调用unbindUser接口 - 新增退出登录按钮 - 添加bindUser和unbindUser API接口
Showing
46 changed files
with
1254 additions
and
704 deletions
| 1 | <script> | 1 | <script> |
| 2 | import config from '@/config.js'; | ||
| 2 | import { | 3 | import { |
| 3 | getInfo | 4 | getInfo, |
| 5 | getWebInfo | ||
| 4 | } from '@/common/login.js'; | 6 | } from '@/common/login.js'; |
| 5 | import * as api from '@/common/api.js'; | ||
| 6 | import config from '@/config.js'; | ||
| 7 | 7 | ||
| 8 | let loginUrl = ['login/login', 'login/register', 'personal/addVip_per'] | ||
| 9 | let firstload = false | ||
| 10 | export default { | 8 | export default { |
| 11 | globalData: { | 9 | globalData: { |
| 12 | isLogin: false, | 10 | isLogin: false, |
| 13 | baseUrl_api: '', | 11 | baseUrl_api: '', |
| 14 | user: null, | 12 | user: null |
| 15 | userType: '', | ||
| 16 | userInfo: null, | ||
| 17 | deptType: '', | ||
| 18 | genFlag: '', | ||
| 19 | authenticationStatus: '', | ||
| 20 | memberInfo: null, | ||
| 21 | isExam: false | ||
| 22 | }, | 13 | }, |
| 23 | onLaunch: function(options) { | 14 | onLaunch: function(options) { |
| 24 | console.log('App Launch', options); | 15 | console.log('App Launch', options); |
| 25 | |||
| 26 | this.globalData.baseUrl_api = config.baseUrl_api; | 16 | this.globalData.baseUrl_api = config.baseUrl_api; |
| 27 | if (loginUrl.indexOf(options.path) == -1) { | 17 | |
| 28 | let userName = uni.getStorageSync('userName') | 18 | let userName = uni.getStorageSync('userName') |
| 29 | if (userName) { | 19 | if (userName) { |
| 30 | getInfo().then(() => { | 20 | getInfo().then(() => { |
| 31 | this.globalData.isLogin = true; | 21 | this.globalData.isLogin = true |
| 32 | firstload = true | 22 | uni.reLaunch({ |
| 33 | let firstLoadCallback = getApp().firstLoadCallback; | 23 | url: '/pages/index/home' |
| 34 | if (firstLoadCallback) { | 24 | }) |
| 35 | firstLoadCallback(); | ||
| 36 | } | ||
| 37 | }).catch(() => { | 25 | }).catch(() => { |
| 38 | firstload = true | 26 | uni.reLaunch({ |
| 39 | uni.redirectTo({ | ||
| 40 | url: '/login/login' | 27 | url: '/login/login' |
| 41 | }) | 28 | }) |
| 42 | }) | 29 | }) |
| 43 | } else { | 30 | return |
| 44 | this.globalData.isLogin = false; | 31 | } |
| 45 | firstload = true | 32 | |
| 46 | uni.redirectTo({ | 33 | let webUserName = uni.getStorageSync('webUserName') |
| 34 | if (webUserName) { | ||
| 35 | getWebInfo().then(() => { | ||
| 36 | uni.reLaunch({ | ||
| 37 | url: '/personal/home' | ||
| 38 | }) | ||
| 39 | }).catch(() => { | ||
| 40 | uni.reLaunch({ | ||
| 47 | url: '/login/login' | 41 | url: '/login/login' |
| 48 | }) | 42 | }) |
| 43 | }) | ||
| 44 | return | ||
| 49 | } | 45 | } |
| 50 | } | 46 | |
| 47 | this.globalData.isLogin = false | ||
| 48 | uni.reLaunch({ | ||
| 49 | url: '/login/login' | ||
| 50 | }) | ||
| 51 | }, | 51 | }, |
| 52 | onShow: function() { | 52 | onShow: function() { |
| 53 | console.log('App Show', firstload, this.globalData.isLogin); | 53 | console.log('App Show'); |
| 54 | // if (firstload && !this.globalData.isLogin) { | ||
| 55 | // uni.redirectTo({ | ||
| 56 | // url: '/login/login' | ||
| 57 | // }) | ||
| 58 | // } | ||
| 59 | }, | 54 | }, |
| 60 | onHide: function() { | 55 | onHide: function() { |
| 61 | console.log('App Hide'); | 56 | console.log('App Hide'); | ... | ... |
| 1 | import request from './request.js' | 1 | import request from './request.js' |
| 2 | import config from '@/config.js' | 2 | import config from '@/config.js' |
| 3 | import * as loginServer from '@/common/login.js'; | ||
| 4 | 3 | ||
| 5 | // 激活 | 4 | // 激活 |
| 6 | export function active(data) { | 5 | export function active(data) { |
| ... | @@ -1415,6 +1414,14 @@ export function createMemberPayRange(data) { | ... | @@ -1415,6 +1414,14 @@ export function createMemberPayRange(data) { |
| 1415 | }) | 1414 | }) |
| 1416 | } | 1415 | } |
| 1417 | 1416 | ||
| 1417 | // 获取最近认证记录 | ||
| 1418 | export function getMyRecent() { | ||
| 1419 | return request({ | ||
| 1420 | url: '/system/certifiedNew/getMyRecent', | ||
| 1421 | method: 'get' | ||
| 1422 | }) | ||
| 1423 | } | ||
| 1424 | |||
| 1418 | // 获取订单详情 | 1425 | // 获取订单详情 |
| 1419 | export function getOrderInfo(orderId) { | 1426 | export function getOrderInfo(orderId) { |
| 1420 | return request({ | 1427 | return request({ |
| ... | @@ -1422,3 +1429,19 @@ export function getOrderInfo(orderId) { | ... | @@ -1422,3 +1429,19 @@ export function getOrderInfo(orderId) { |
| 1422 | method: 'get' | 1429 | method: 'get' |
| 1423 | }) | 1430 | }) |
| 1424 | } | 1431 | } |
| 1432 | |||
| 1433 | // 绑定学员 | ||
| 1434 | export function bindUser(data) { | ||
| 1435 | return request({ | ||
| 1436 | url: `/person/info/bindUser`, | ||
| 1437 | method: 'post', | ||
| 1438 | params: data | ||
| 1439 | }) | ||
| 1440 | } | ||
| 1441 | |||
| 1442 | export function unbindUser() { | ||
| 1443 | return request({ | ||
| 1444 | url: `/person/info/unbindUser`, | ||
| 1445 | method: 'post' | ||
| 1446 | }) | ||
| 1447 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | import { | ||
| 2 | useUserStore | ||
| 3 | } from '../store/modules/user' | ||
| 1 | import request from './request' | 4 | import request from './request' |
| 2 | import * as api from '@/common/api.js' | ||
| 3 | 5 | ||
| 4 | function pcLogin(data) { | 6 | function pcLogin(data) { |
| 5 | return request({ | 7 | return request({ |
| ... | @@ -39,8 +41,15 @@ function logout() { | ... | @@ -39,8 +41,15 @@ function logout() { |
| 39 | url: '/logout', | 41 | url: '/logout', |
| 40 | method: 'post' | 42 | method: 'post' |
| 41 | }).then(() => { | 43 | }).then(() => { |
| 44 | const userStore = useUserStore() | ||
| 45 | const app = getApp() | ||
| 46 | |||
| 42 | uni.removeStorageSync('token') | 47 | uni.removeStorageSync('token') |
| 43 | uni.removeStorageSync('userName') | 48 | uni.removeStorageSync('userName') |
| 49 | uni.removeStorageSync('webUserName') | ||
| 50 | |||
| 51 | userStore.setUser(null) | ||
| 52 | app.globalData.isLogin = false | ||
| 44 | }) | 53 | }) |
| 45 | } | 54 | } |
| 46 | 55 | ||
| ... | @@ -85,15 +94,17 @@ function getInfo() { | ... | @@ -85,15 +94,17 @@ function getInfo() { |
| 85 | url: '/getInfo', | 94 | url: '/getInfo', |
| 86 | method: 'get' | 95 | method: 'get' |
| 87 | }).then(res => { | 96 | }).then(res => { |
| 97 | const userStore = useUserStore() | ||
| 88 | const app = getApp() | 98 | const app = getApp() |
| 89 | const user = res.data.user | 99 | const user = res.data.user |
| 90 | // const personInfo = res.data.personInfo | 100 | |
| 91 | uni.setStorageSync('userName', user.userName) | 101 | uni.setStorageSync('userName', user.userName) |
| 92 | // uni.setStorageSync('perId', personInfo.perId||-1) | 102 | uni.removeStorageSync('webUserName') |
| 93 | app.globalData.user = res.data.user | 103 | userStore.setUser(user) |
| 104 | |||
| 94 | app.globalData.deptType = user.dept.deptType | 105 | app.globalData.deptType = user.dept.deptType |
| 95 | app.globalData.genFlag = user.dept.genFlag | 106 | app.globalData.genFlag = user.dept.genFlag |
| 96 | // user.dept.deptType = '3' | 107 | app.globalData.changePassFlag = user.changePassFlag |
| 97 | switch (user.dept.deptType) { | 108 | switch (user.dept.deptType) { |
| 98 | case '1': // 中跆协 | 109 | case '1': // 中跆协 |
| 99 | app.globalData.userType = '1' | 110 | app.globalData.userType = '1' |
| ... | @@ -109,8 +120,24 @@ function getInfo() { | ... | @@ -109,8 +120,24 @@ function getInfo() { |
| 109 | app.globalData.userType = '3' | 120 | app.globalData.userType = '3' |
| 110 | break | 121 | break |
| 111 | } | 122 | } |
| 123 | }) | ||
| 124 | } | ||
| 112 | 125 | ||
| 113 | app.globalData.userInfo = user | 126 | function getWebInfo() { |
| 127 | return request({ | ||
| 128 | url: '/person/info/getInfo', | ||
| 129 | method: 'get' | ||
| 130 | }).then(res => { | ||
| 131 | const userStore = useUserStore() | ||
| 132 | const user = res.data.user | ||
| 133 | |||
| 134 | delete res.data.user | ||
| 135 | const perInfo = res.data | ||
| 136 | |||
| 137 | uni.setStorageSync('webUserName', user.userName) | ||
| 138 | uni.removeStorageSync('userName') | ||
| 139 | userStore.setUser(user) | ||
| 140 | userStore.setPerInfo(perInfo) | ||
| 114 | }) | 141 | }) |
| 115 | } | 142 | } |
| 116 | 143 | ||
| ... | @@ -134,6 +161,38 @@ function getMyOwnMemberInfo() { | ... | @@ -134,6 +161,38 @@ function getMyOwnMemberInfo() { |
| 134 | app.globalData.isExam = res.data?.memberInfo?.isPoints | 161 | app.globalData.isExam = res.data?.memberInfo?.isPoints |
| 135 | }) | 162 | }) |
| 136 | } | 163 | } |
| 164 | |||
| 165 | |||
| 166 | function wxLogin() { | ||
| 167 | return new Promise((resolve, reject) => { | ||
| 168 | uni.login({ | ||
| 169 | provider: 'weixin', | ||
| 170 | success: (res) => { | ||
| 171 | resolve(res) | ||
| 172 | }, | ||
| 173 | fail: (res) => { | ||
| 174 | uni.showToast({ | ||
| 175 | title: '获取用户信息失败', | ||
| 176 | icon: 'none', | ||
| 177 | duration: 2000 | ||
| 178 | }) | ||
| 179 | reject(res) | ||
| 180 | } | ||
| 181 | }) | ||
| 182 | }).then(res => { | ||
| 183 | return pcLoginByCode(res.code) | ||
| 184 | }) | ||
| 185 | } | ||
| 186 | |||
| 187 | function pcLoginByCode(code) { | ||
| 188 | return request({ | ||
| 189 | url: `/loginByJsCode?jsCode=${code}`, | ||
| 190 | method: "POST" | ||
| 191 | }).then((res) => { | ||
| 192 | uni.setStorageSync('token', 'Bearer ' + res.data); | ||
| 193 | }).then(getWebInfo) | ||
| 194 | } | ||
| 195 | |||
| 137 | export { | 196 | export { |
| 138 | pcLogin, | 197 | pcLogin, |
| 139 | getCodeImg, | 198 | getCodeImg, |
| ... | @@ -144,5 +203,7 @@ export { | ... | @@ -144,5 +203,7 @@ export { |
| 144 | groupMemberRegister, | 203 | groupMemberRegister, |
| 145 | getMyOwnMemberInfo, | 204 | getMyOwnMemberInfo, |
| 146 | logout, | 205 | logout, |
| 147 | getInfo | 206 | getInfo, |
| 207 | getWebInfo, | ||
| 208 | wxLogin | ||
| 148 | } | 209 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -26,7 +26,8 @@ | ... | @@ -26,7 +26,8 @@ |
| 26 | 考试信息 | 26 | 考试信息 |
| 27 | </view> | 27 | </view> |
| 28 | <view class="userlist"> | 28 | <view class="userlist"> |
| 29 | <view class="item" v-for="(n,index) in infoList" :key="index" @click="goDetail(n)" style="background-color: #fffafa;"> | 29 | <view class="item" v-for="(n,index) in infoList" :key="index" @click="goDetail(n)" |
| 30 | style="background-color: #fffafa;"> | ||
| 30 | <view class="w100"> | 31 | <view class="w100"> |
| 31 | <view class="text-primary">{{n.examCode}}</view> | 32 | <view class="text-primary">{{n.examCode}}</view> |
| 32 | <view class="name">{{n.name}}</view> | 33 | <view class="name">{{n.name}}</view> |
| ... | @@ -82,7 +83,6 @@ | ... | @@ -82,7 +83,6 @@ |
| 82 | onLoad((option) => { | 83 | onLoad((option) => { |
| 83 | if ('form' in option) { | 84 | if ('form' in option) { |
| 84 | form.value = JSON.parse(decodeURIComponent(option.form)) | 85 | form.value = JSON.parse(decodeURIComponent(option.form)) |
| 85 | console.log(111,form.value) | ||
| 86 | } | 86 | } |
| 87 | type.value = option.type | 87 | type.value = option.type |
| 88 | // console.log(222,form.value) | 88 | // console.log(222,form.value) |
| ... | @@ -120,13 +120,13 @@ | ... | @@ -120,13 +120,13 @@ |
| 120 | }) | 120 | }) |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | function goDetail(item){ | 123 | function goDetail(item) { |
| 124 | const form = encodeURIComponent(JSON.stringify(item)) | 124 | const form = encodeURIComponent(JSON.stringify(item)) |
| 125 | let path = `/level/applyDetail?examId=${item.examId}&form=${form}` | 125 | let path = `/level/applyDetail?examId=${item.examId}&form=${form}` |
| 126 | uni.navigateTo({ | 126 | uni.navigateTo({ |
| 127 | url: path | 127 | url: path |
| 128 | }); | 128 | }); |
| 129 | } | 129 | } |
| 130 | </script> | 130 | </script> |
| 131 | 131 | ||
| 132 | <style scoped lang="scss"> | 132 | <style scoped lang="scss"> |
| ... | @@ -139,15 +139,25 @@ function goDetail(item){ | ... | @@ -139,15 +139,25 @@ function goDetail(item){ |
| 139 | border-radius: 15rpx; | 139 | border-radius: 15rpx; |
| 140 | 140 | ||
| 141 | .tt { | 141 | .tt { |
| 142 | color: #0A1629;margin: 0 0 30rpx; | 142 | color: #0A1629; |
| 143 | margin: 0 0 30rpx; | ||
| 143 | font-size: 30rpx; | 144 | font-size: 30rpx; |
| 144 | } | 145 | } |
| 145 | 146 | ||
| 146 | .ddd{font-size: 28rpx;color: #333; margin: 0 0 10rpx; | 147 | .ddd { |
| 147 | .lab{color: #999;display: inline-block;text-align: justify; | 148 | font-size: 28rpx; |
| 148 | text{word-break: break-all;} | 149 | color: #333; |
| 150 | margin: 0 0 10rpx; | ||
| 151 | |||
| 152 | .lab { | ||
| 153 | color: #999; | ||
| 154 | display: inline-block; | ||
| 155 | text-align: justify; | ||
| 156 | |||
| 157 | text { | ||
| 158 | word-break: break-all; | ||
| 159 | } | ||
| 149 | } | 160 | } |
| 150 | } | 161 | } |
| 151 | } | 162 | } |
| 152 | |||
| 153 | </style> | 163 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view class="page-bg"> | 2 | <view class="page-bg"> |
| 3 | <view class="nav-bar" style="margin-top:-30px" > | 3 | <view class="nav-bar" style="margin-top:-30px"> |
| 4 | <view class="back-btn" @click="goBack"> | 4 | <view class="back-btn" @click="goBack"> |
| 5 | <uni-icons type="left" size="20" color="#fff"></uni-icons> | 5 | <uni-icons type="left" size="20" color="#fff"></uni-icons> |
| 6 | </view> | 6 | </view> |
| ... | @@ -134,9 +134,11 @@ | ... | @@ -134,9 +134,11 @@ |
| 134 | }); | 134 | }); |
| 135 | } | 135 | } |
| 136 | }) | 136 | }) |
| 137 | function goBack(){ | 137 | |
| 138 | function goBack() { | ||
| 138 | uni.navigateBack() | 139 | uni.navigateBack() |
| 139 | } | 140 | } |
| 141 | |||
| 140 | function changeActive(n) { | 142 | function changeActive(n) { |
| 141 | isActive.value = n | 143 | isActive.value = n |
| 142 | } | 144 | } |
| ... | @@ -173,7 +175,7 @@ | ... | @@ -173,7 +175,7 @@ |
| 173 | pcLogin(form.value).then((res) => { | 175 | pcLogin(form.value).then((res) => { |
| 174 | app.globalData.isLogin = true | 176 | app.globalData.isLogin = true |
| 175 | uni.redirectTo({ | 177 | uni.redirectTo({ |
| 176 | url: '/pages/index/index' | 178 | url: '/pages/index/home' |
| 177 | }) | 179 | }) |
| 178 | }) | 180 | }) |
| 179 | } else if (isActive.value == 1) { | 181 | } else if (isActive.value == 1) { |
| ... | @@ -205,7 +207,7 @@ | ... | @@ -205,7 +207,7 @@ |
| 205 | .then(() => { | 207 | .then(() => { |
| 206 | app.globalData.isLogin = true | 208 | app.globalData.isLogin = true |
| 207 | uni.redirectTo({ | 209 | uni.redirectTo({ |
| 208 | url: '/pages/index/index' | 210 | url: '/pages/index/home' |
| 209 | }) | 211 | }) |
| 210 | }) | 212 | }) |
| 211 | } | 213 | } |
| ... | @@ -286,7 +288,10 @@ | ... | @@ -286,7 +288,10 @@ |
| 286 | </script> | 288 | </script> |
| 287 | 289 | ||
| 288 | <style scoped lang="scss"> | 290 | <style scoped lang="scss"> |
| 289 | .wNumber {position: absolute;width: 100%;bottom:-50rpx; | 291 | .wNumber { |
| 292 | position: absolute; | ||
| 293 | width: 100%; | ||
| 294 | bottom: -50rpx; | ||
| 290 | text-align: center; | 295 | text-align: center; |
| 291 | color: rgba(255, 255, 255, 0.7); | 296 | color: rgba(255, 255, 255, 0.7); |
| 292 | font-size: 24rpx; | 297 | font-size: 24rpx; |
| ... | @@ -330,7 +335,9 @@ | ... | @@ -330,7 +335,9 @@ |
| 330 | position: relative; | 335 | position: relative; |
| 331 | } | 336 | } |
| 332 | 337 | ||
| 333 | .loginbox {position: relative; | 338 | .loginbox { |
| 339 | position: relative; | ||
| 340 | |||
| 334 | .loginNav { | 341 | .loginNav { |
| 335 | width: 700rpx; | 342 | width: 700rpx; |
| 336 | margin: 0 auto -53rpx; | 343 | margin: 0 auto -53rpx; | ... | ... |
| 1 | import App from './App' | 1 | import App from './App' |
| 2 | import store from './store' | ||
| 3 | |||
| 2 | // #ifndef VUE3 | 4 | // #ifndef VUE3 |
| 3 | import Vue from 'vue' | 5 | import Vue from 'vue' |
| 4 | Vue.config.productionTip = false | 6 | Vue.config.productionTip = false |
| ... | @@ -6,6 +8,7 @@ App.mpType = 'app' | ... | @@ -6,6 +8,7 @@ App.mpType = 'app' |
| 6 | const app = new Vue({ | 8 | const app = new Vue({ |
| 7 | ...App | 9 | ...App |
| 8 | }) | 10 | }) |
| 11 | app.use(store) | ||
| 9 | app.$mount() | 12 | app.$mount() |
| 10 | // #endif | 13 | // #endif |
| 11 | 14 | ||
| ... | @@ -15,6 +18,7 @@ import { | ... | @@ -15,6 +18,7 @@ import { |
| 15 | } from 'vue' | 18 | } from 'vue' |
| 16 | export function createApp() { | 19 | export function createApp() { |
| 17 | const app = createSSRApp(App) | 20 | const app = createSSRApp(App) |
| 21 | app.use(store) | ||
| 18 | return { | 22 | return { |
| 19 | app | 23 | app |
| 20 | } | 24 | } | ... | ... |
| ... | @@ -129,10 +129,10 @@ | ... | @@ -129,10 +129,10 @@ |
| 129 | if (orderErr) { | 129 | if (orderErr) { |
| 130 | uni.hideLoading() | 130 | uni.hideLoading() |
| 131 | isPaying.value = false | 131 | isPaying.value = false |
| 132 | uni.showToast({ | 132 | // uni.showToast({ |
| 133 | title: '创建订单失败', | 133 | // title: '创建订单失败', |
| 134 | icon: 'none' | 134 | // icon: 'none' |
| 135 | }) | 135 | // }) |
| 136 | return | 136 | return |
| 137 | } | 137 | } |
| 138 | 138 | ||
| ... | @@ -141,7 +141,7 @@ | ... | @@ -141,7 +141,7 @@ |
| 141 | if (data.payFlag == 0) { | 141 | if (data.payFlag == 0) { |
| 142 | uni.hideLoading() | 142 | uni.hideLoading() |
| 143 | isPaying.value = false | 143 | isPaying.value = false |
| 144 | uni.navigateTo({ | 144 | uni.redirectTo({ |
| 145 | url: `/myCenter/sucPay?orderId=${data.orderId}` | 145 | url: `/myCenter/sucPay?orderId=${data.orderId}` |
| 146 | }) | 146 | }) |
| 147 | return | 147 | return |
| ... | @@ -153,7 +153,7 @@ | ... | @@ -153,7 +153,7 @@ |
| 153 | uni.hideLoading() | 153 | uni.hideLoading() |
| 154 | isPaying.value = false | 154 | isPaying.value = false |
| 155 | 155 | ||
| 156 | uni.navigateTo({ | 156 | uni.redirectTo({ |
| 157 | url: `/myCenter/sucPay?orderId=${data.orderId}` | 157 | url: `/myCenter/sucPay?orderId=${data.orderId}` |
| 158 | }) | 158 | }) |
| 159 | } | 159 | } | ... | ... |
| ... | @@ -49,44 +49,59 @@ | ... | @@ -49,44 +49,59 @@ |
| 49 | </template> | 49 | </template> |
| 50 | 50 | ||
| 51 | <script setup> | 51 | <script setup> |
| 52 | import { ref } from 'vue' | 52 | import { |
| 53 | import { onLoad } from '@dcloudio/uni-app'; | 53 | ref |
| 54 | import * as api from '@/common/api.js' | 54 | } from 'vue' |
| 55 | 55 | import { | |
| 56 | // 核心数据 | 56 | onLoad |
| 57 | const formData = ref({}) // 订单统计数据 | 57 | } from '@dcloudio/uni-app'; |
| 58 | const rangeId = ref('') // 核心业务ID | 58 | import * as api from '@/common/api.js' |
| 59 | const payType = ref('0') // 支付方式(默认0=民生付) | 59 | |
| 60 | const payLoading = ref(false) // 支付按钮加载状态 | 60 | // 核心数据 |
| 61 | 61 | const formData = ref({}) // 订单统计数据 | |
| 62 | // 页面加载接收参数 | 62 | const rangeId = ref('') // 核心业务ID |
| 63 | onLoad(async (options) => { | 63 | const payType = ref('0') // 支付方式(默认0=民生付) |
| 64 | const payLoading = ref(false) // 支付按钮加载状态 | ||
| 65 | |||
| 66 | // 页面加载接收参数 | ||
| 67 | onLoad(async (options) => { | ||
| 64 | console.log('订单ID:', options.rangeId) | 68 | console.log('订单ID:', options.rangeId) |
| 65 | if (options.rangeId) { | 69 | if (options.rangeId) { |
| 66 | rangeId.value = options.rangeId | 70 | rangeId.value = options.rangeId |
| 67 | await getCount() | 71 | await getCount() |
| 68 | } | 72 | } |
| 69 | }) | 73 | }) |
| 70 | 74 | ||
| 71 | async function getCount() { | 75 | async function getCount() { |
| 72 | try { | 76 | try { |
| 73 | const res = await api.getNewCountByRangeId(rangeId.value) | 77 | const res = await api.getNewCountByRangeId(rangeId.value) |
| 74 | formData.value = res.data || { all: 0, new: 0, old: 0 } | 78 | formData.value = res.data || { |
| 79 | all: 0, | ||
| 80 | new: 0, | ||
| 81 | old: 0 | ||
| 82 | } | ||
| 75 | } catch (e) { | 83 | } catch (e) { |
| 76 | formData.value = { all: 0, new: 0, old: 0 } | 84 | formData.value = { |
| 85 | all: 0, | ||
| 86 | new: 0, | ||
| 87 | old: 0 | ||
| 88 | } | ||
| 89 | } | ||
| 77 | } | 90 | } |
| 78 | } | ||
| 79 | 91 | ||
| 80 | // 支付方式切换 | 92 | // 支付方式切换 |
| 81 | function handlePayTypeChange(e) { | 93 | function handlePayTypeChange(e) { |
| 82 | payType.value = e.detail.value | 94 | payType.value = e.detail.value |
| 83 | } | 95 | } |
| 84 | 96 | ||
| 85 | // 立即支付核心逻辑 | 97 | // 立即支付核心逻辑 |
| 86 | async function handlePay() { | 98 | async function handlePay() { |
| 87 | // 基础校验 | 99 | // 基础校验 |
| 88 | if (!rangeId.value || rangeId.value === '-1') { | 100 | if (!rangeId.value || rangeId.value === '-1') { |
| 89 | return uni.showToast({ title: '订单ID异常', icon: 'none' }) | 101 | return uni.showToast({ |
| 102 | title: '订单ID异常', | ||
| 103 | icon: 'none' | ||
| 104 | }) | ||
| 90 | } | 105 | } |
| 91 | 106 | ||
| 92 | try { | 107 | try { |
| ... | @@ -95,7 +110,7 @@ async function handlePay() { | ... | @@ -95,7 +110,7 @@ async function handlePay() { |
| 95 | 110 | ||
| 96 | if (res.data?.orderId) { | 111 | if (res.data?.orderId) { |
| 97 | api.pcallBack2(res.data.orderId) | 112 | api.pcallBack2(res.data.orderId) |
| 98 | uni.navigateTo({ | 113 | uni.redirectTo({ |
| 99 | url: `/myCenter/sucPay?rangeId=${rangeId.value}from=payOrder` | 114 | url: `/myCenter/sucPay?rangeId=${rangeId.value}from=payOrder` |
| 100 | }) | 115 | }) |
| 101 | } | 116 | } |
| ... | @@ -104,25 +119,30 @@ async function handlePay() { | ... | @@ -104,25 +119,30 @@ async function handlePay() { |
| 104 | 119 | ||
| 105 | } catch (err) { | 120 | } catch (err) { |
| 106 | const errMsg = err?.data?.msg || err?.message || '支付失败,请稍后重试' | 121 | const errMsg = err?.data?.msg || err?.message || '支付失败,请稍后重试' |
| 107 | uni.showToast({ title: errMsg, icon: 'none' }) | 122 | uni.showToast({ |
| 123 | title: errMsg, | ||
| 124 | icon: 'none' | ||
| 125 | }) | ||
| 108 | } finally { | 126 | } finally { |
| 109 | payLoading.value = false | 127 | payLoading.value = false |
| 110 | } | 128 | } |
| 111 | } | 129 | } |
| 112 | </script> | 130 | </script> |
| 113 | 131 | ||
| 114 | <style scoped lang="scss"> | 132 | <style scoped lang="scss"> |
| 115 | .pay-order-container { | 133 | .pay-order-container { |
| 116 | padding: 30rpx; | 134 | padding: 30rpx; |
| 117 | background-color: #fff; | 135 | background-color: #fff; |
| 118 | min-height: 100vh; | 136 | min-height: 100vh; |
| 119 | box-sizing: border-box; | 137 | box-sizing: border-box; |
| 120 | } | 138 | } |
| 121 | .icon{ | 139 | |
| 122 | width:30px; | 140 | .icon { |
| 123 | } | 141 | width: 30px; |
| 124 | // 页面头部 | 142 | } |
| 125 | .page-header { | 143 | |
| 144 | // 页面头部 | ||
| 145 | .page-header { | ||
| 126 | text-align: center; | 146 | text-align: center; |
| 127 | padding: 20rpx 0; | 147 | padding: 20rpx 0; |
| 128 | border-bottom: 1px solid #eee; | 148 | border-bottom: 1px solid #eee; |
| ... | @@ -133,10 +153,10 @@ async function handlePay() { | ... | @@ -133,10 +153,10 @@ async function handlePay() { |
| 133 | font-weight: 600; | 153 | font-weight: 600; |
| 134 | color: #333; | 154 | color: #333; |
| 135 | } | 155 | } |
| 136 | } | 156 | } |
| 137 | 157 | ||
| 138 | // 订单信息区域 | 158 | // 订单信息区域 |
| 139 | .order-info { | 159 | .order-info { |
| 140 | margin-bottom: 60rpx; | 160 | margin-bottom: 60rpx; |
| 141 | 161 | ||
| 142 | .info-item { | 162 | .info-item { |
| ... | @@ -174,10 +194,10 @@ async function handlePay() { | ... | @@ -174,10 +194,10 @@ async function handlePay() { |
| 174 | font-size: 38rpx; | 194 | font-size: 38rpx; |
| 175 | } | 195 | } |
| 176 | } | 196 | } |
| 177 | } | 197 | } |
| 178 | 198 | ||
| 179 | // 支付方式区域 | 199 | // 支付方式区域 |
| 180 | .pay-type-section { | 200 | .pay-type-section { |
| 181 | margin-bottom: 80rpx; | 201 | margin-bottom: 80rpx; |
| 182 | 202 | ||
| 183 | .section-title { | 203 | .section-title { |
| ... | @@ -205,10 +225,10 @@ async function handlePay() { | ... | @@ -205,10 +225,10 @@ async function handlePay() { |
| 205 | } | 225 | } |
| 206 | } | 226 | } |
| 207 | } | 227 | } |
| 208 | } | 228 | } |
| 209 | 229 | ||
| 210 | // 底部支付按钮 | 230 | // 底部支付按钮 |
| 211 | .fixed-bottom { | 231 | .fixed-bottom { |
| 212 | position: fixed; | 232 | position: fixed; |
| 213 | bottom: 0; | 233 | bottom: 0; |
| 214 | left: 0; | 234 | left: 0; |
| ... | @@ -230,5 +250,5 @@ async function handlePay() { | ... | @@ -230,5 +250,5 @@ async function handlePay() { |
| 230 | background-color: #E60012; | 250 | background-color: #E60012; |
| 231 | color: #fff; | 251 | color: #fff; |
| 232 | } | 252 | } |
| 233 | } | 253 | } |
| 234 | </style> | 254 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -32,7 +32,8 @@ | ... | @@ -32,7 +32,8 @@ |
| 32 | <uni-easyinput v-model="form.siteTel" /> | 32 | <uni-easyinput v-model="form.siteTel" /> |
| 33 | </uni-forms-item> | 33 | </uni-forms-item> |
| 34 | <uni-forms-item label="认证地址" required> | 34 | <uni-forms-item label="认证地址" required> |
| 35 | <uni-data-picker v-model="form.coordinates1" @change="changeCoordinates1" :localdata="regionsList"></uni-data-picker> | 35 | <uni-data-picker v-model="form.coordinates1" @change="changeCoordinates1" |
| 36 | :localdata="regionsList"></uni-data-picker> | ||
| 36 | </uni-forms-item> | 37 | </uni-forms-item> |
| 37 | <uni-forms-item label="详细地址" required> | 38 | <uni-forms-item label="详细地址" required> |
| 38 | <uni-easyinput v-model="form.adress" placeholder="请输入详细地址" type='textarea' /></uni-forms-item> | 39 | <uni-easyinput v-model="form.adress" placeholder="请输入详细地址" type='textarea' /></uni-forms-item> |
| ... | @@ -101,10 +102,17 @@ | ... | @@ -101,10 +102,17 @@ |
| 101 | </template> | 102 | </template> |
| 102 | 103 | ||
| 103 | <script setup> | 104 | <script setup> |
| 104 | import { ref, reactive, computed } from 'vue'; | 105 | import { |
| 106 | ref, | ||
| 107 | reactive, | ||
| 108 | computed | ||
| 109 | } from 'vue'; | ||
| 105 | import * as api from '@/common/api.js'; | 110 | import * as api from '@/common/api.js'; |
| 106 | import _ from 'underscore' | 111 | import _ from 'underscore' |
| 107 | import { onLoad, onShow } from '@dcloudio/uni-app'; | 112 | import { |
| 113 | onLoad, | ||
| 114 | onShow | ||
| 115 | } from '@dcloudio/uni-app'; | ||
| 108 | import config from '@/config.js' | 116 | import config from '@/config.js' |
| 109 | const app = getApp(); | 117 | const app = getApp(); |
| 110 | 118 | ||
| ... | @@ -119,15 +127,32 @@ | ... | @@ -119,15 +127,32 @@ |
| 119 | legalIdcCode: '' | 127 | legalIdcCode: '' |
| 120 | }); | 128 | }); |
| 121 | const years = ref(['1', '2', '3', '4', '5']) | 129 | const years = ref(['1', '2', '3', '4', '5']) |
| 122 | const yesno = ref([{ value: '0', text: '否' }, { value: '1', text: '是' }]) | 130 | const yesno = ref([{ |
| 131 | value: '0', | ||
| 132 | text: '否' | ||
| 133 | }, { | ||
| 134 | value: '1', | ||
| 135 | text: '是' | ||
| 136 | }]) | ||
| 123 | const memberFee = ref('') | 137 | const memberFee = ref('') |
| 124 | const preferentialPolicy = ref(false) | 138 | const preferentialPolicy = ref(false) |
| 125 | const preferentialData = ref({}) | 139 | const preferentialData = ref({}) |
| 126 | const typeList = ref([ | 140 | const typeList = ref([{ |
| 127 | { value: '1', text: '企业' }, | 141 | value: '1', |
| 128 | { value: '2', text: '国家组织' }, | 142 | text: '企业' |
| 129 | { value: '3', text: '社会组织' }, | 143 | }, |
| 130 | { value: '4', text: '其他' } | 144 | { |
| 145 | value: '2', | ||
| 146 | text: '国家组织' | ||
| 147 | }, | ||
| 148 | { | ||
| 149 | value: '3', | ||
| 150 | text: '社会组织' | ||
| 151 | }, | ||
| 152 | { | ||
| 153 | value: '4', | ||
| 154 | text: '其他' | ||
| 155 | } | ||
| 131 | ]) | 156 | ]) |
| 132 | const regionArr = ref(); | 157 | const regionArr = ref(); |
| 133 | const regionsList = ref([]); | 158 | const regionsList = ref([]); |
| ... | @@ -143,7 +168,9 @@ | ... | @@ -143,7 +168,9 @@ |
| 143 | const type = ref(false) | 168 | const type = ref(false) |
| 144 | const flag = ref(false) | 169 | const flag = ref(false) |
| 145 | const result = ref(false) | 170 | const result = ref(false) |
| 146 | const query = ref({ type: 0 }); | 171 | const query = ref({ |
| 172 | type: 0 | ||
| 173 | }); | ||
| 147 | const activeStatus = ref(0) | 174 | const activeStatus = ref(0) |
| 148 | const active = ref(0) | 175 | const active = ref(0) |
| 149 | const memberInfo = ref({}) | 176 | const memberInfo = ref({}) |
| ... | @@ -154,8 +181,15 @@ | ... | @@ -154,8 +181,15 @@ |
| 154 | const picArr = ref([]) | 181 | const picArr = ref([]) |
| 155 | const picArrR = ref([]) | 182 | const picArrR = ref([]) |
| 156 | const businessLicenseArr = ref([]) | 183 | const businessLicenseArr = ref([]) |
| 157 | const list1 = ref([{ title: '完善信息' }, { title: '会员认证' }]) | 184 | const list1 = ref([{ |
| 158 | const imageStylesZJ = ref({ width: '400rpx', height: '253rpx' }); | 185 | title: '完善信息' |
| 186 | }, { | ||
| 187 | title: '会员认证' | ||
| 188 | }]) | ||
| 189 | const imageStylesZJ = ref({ | ||
| 190 | width: '400rpx', | ||
| 191 | height: '253rpx' | ||
| 192 | }); | ||
| 159 | const indicatorStyle = ref(`height: 50px;`) | 193 | const indicatorStyle = ref(`height: 50px;`) |
| 160 | const imgfront = ref({}) | 194 | const imgfront = ref({}) |
| 161 | const imgBack = ref({}) | 195 | const imgBack = ref({}) |
| ... | @@ -216,7 +250,10 @@ | ... | @@ -216,7 +250,10 @@ |
| 216 | flag.value = newResult.value | 250 | flag.value = newResult.value |
| 217 | } | 251 | } |
| 218 | 252 | ||
| 219 | form.value = { ...res.data.dept, ...res.data.memberInfo } | 253 | form.value = { |
| 254 | ...res.data.dept, | ||
| 255 | ...res.data.memberInfo | ||
| 256 | } | ||
| 220 | getTree() | 257 | getTree() |
| 221 | form.value.deptType = res.data.dept.deptType | 258 | form.value.deptType = res.data.dept.deptType |
| 222 | form.value.parentId = form.value.parentId.toString() | 259 | form.value.parentId = form.value.parentId.toString() |
| ... | @@ -239,7 +276,10 @@ | ... | @@ -239,7 +276,10 @@ |
| 239 | try { | 276 | try { |
| 240 | businessLicenseArr.value = JSON.parse(form.value.businessLicense) || [] | 277 | businessLicenseArr.value = JSON.parse(form.value.businessLicense) || [] |
| 241 | } catch (e) { | 278 | } catch (e) { |
| 242 | businessLicenseArr.value = [{ url: form.value.businessLicense, name: '营业执照' }] | 279 | businessLicenseArr.value = [{ |
| 280 | url: form.value.businessLicense, | ||
| 281 | name: '营业执照' | ||
| 282 | }] | ||
| 243 | } | 283 | } |
| 244 | } | 284 | } |
| 245 | 285 | ||
| ... | @@ -252,8 +292,16 @@ | ... | @@ -252,8 +292,16 @@ |
| 252 | if (legalIdcPhoto2.value.indexOf('http') == -1) { | 292 | if (legalIdcPhoto2.value.indexOf('http') == -1) { |
| 253 | legalIdcPhoto2.value = config.baseUrl_api + legalIdcPhoto2.value | 293 | legalIdcPhoto2.value = config.baseUrl_api + legalIdcPhoto2.value |
| 254 | } | 294 | } |
| 255 | imgfront.value = { url: legalIdcPhoto1.value, name: '身份证正面', extname: 'png' } | 295 | imgfront.value = { |
| 256 | imgBack.value = { url: legalIdcPhoto2.value, name: '身份证反面', extname: 'png' } | 296 | url: legalIdcPhoto1.value, |
| 297 | name: '身份证正面', | ||
| 298 | extname: 'png' | ||
| 299 | } | ||
| 300 | imgBack.value = { | ||
| 301 | url: legalIdcPhoto2.value, | ||
| 302 | name: '身份证反面', | ||
| 303 | extname: 'png' | ||
| 304 | } | ||
| 257 | } | 305 | } |
| 258 | 306 | ||
| 259 | if (form.value.pictures) { | 307 | if (form.value.pictures) { |
| ... | @@ -265,7 +313,11 @@ | ... | @@ -265,7 +313,11 @@ |
| 265 | if (p.indexOf('http') == -1) { | 313 | if (p.indexOf('http') == -1) { |
| 266 | p = config.baseUrl_api + p | 314 | p = config.baseUrl_api + p |
| 267 | } | 315 | } |
| 268 | var obj = { url: p, name: '图片', extname: 'png' } | 316 | var obj = { |
| 317 | url: p, | ||
| 318 | name: '图片', | ||
| 319 | extname: 'png' | ||
| 320 | } | ||
| 269 | picArrR.value.push(obj) | 321 | picArrR.value.push(obj) |
| 270 | picArr.value.push(p) | 322 | picArr.value.push(p) |
| 271 | }) | 323 | }) |
| ... | @@ -279,7 +331,11 @@ | ... | @@ -279,7 +331,11 @@ |
| 279 | 331 | ||
| 280 | function getTree() { | 332 | function getTree() { |
| 281 | if (authenticationStatusa.value == 0 || authenticationStatusa.value == 3 || authenticationStatusa.value == 1) { | 333 | if (authenticationStatusa.value == 0 || authenticationStatusa.value == 3 || authenticationStatusa.value == 1) { |
| 282 | var obj = { selfDeptId: '-1', webSiteShow: 1, showDisabled: 1 } | 334 | var obj = { |
| 335 | selfDeptId: '-1', | ||
| 336 | webSiteShow: 1, | ||
| 337 | showDisabled: 1 | ||
| 338 | } | ||
| 283 | api.certifiedDeptTree(obj).then(res => { | 339 | api.certifiedDeptTree(obj).then(res => { |
| 284 | tree.value = res.data | 340 | tree.value = res.data |
| 285 | }) | 341 | }) |
| ... | @@ -287,7 +343,8 @@ | ... | @@ -287,7 +343,8 @@ |
| 287 | var obj = { | 343 | var obj = { |
| 288 | selfDeptId: '-1', | 344 | selfDeptId: '-1', |
| 289 | showDisabled: 1, | 345 | showDisabled: 1, |
| 290 | showDirect: authenticationStatusa.value == 2 || authenticationStatusa.value == 5 || authenticationStatusa.value == 4 ? 1 : null | 346 | showDirect: authenticationStatusa.value == 2 || authenticationStatusa.value == 5 || |
| 347 | authenticationStatusa.value == 4 ? 1 : null | ||
| 291 | } | 348 | } |
| 292 | api.deptTreeSelect(obj).then(res => { | 349 | api.deptTreeSelect(obj).then(res => { |
| 293 | tree.value = res.data | 350 | tree.value = res.data |
| ... | @@ -305,55 +362,94 @@ | ... | @@ -305,55 +362,94 @@ |
| 305 | async function submit() { | 362 | async function submit() { |
| 306 | // 基础表单验证 | 363 | // 基础表单验证 |
| 307 | if (form.value.name == '') { | 364 | if (form.value.name == '') { |
| 308 | uni.showToast({ title: '请填写机构名称', icon: 'none' }) | 365 | uni.showToast({ |
| 366 | title: '请填写机构名称', | ||
| 367 | icon: 'none' | ||
| 368 | }) | ||
| 309 | return | 369 | return |
| 310 | } | 370 | } |
| 311 | if (form.value.creditCode == '') { | 371 | if (form.value.creditCode == '') { |
| 312 | uni.showToast({ title: '请填写社会信用代码', icon: 'none' }) | 372 | uni.showToast({ |
| 373 | title: '请填写社会信用代码', | ||
| 374 | icon: 'none' | ||
| 375 | }) | ||
| 313 | return | 376 | return |
| 314 | } | 377 | } |
| 315 | if (form.value.companyName == '') { | 378 | if (form.value.companyName == '') { |
| 316 | uni.showToast({ title: '请填写营业执照名称', icon: 'none' }) | 379 | uni.showToast({ |
| 380 | title: '请填写营业执照名称', | ||
| 381 | icon: 'none' | ||
| 382 | }) | ||
| 317 | return | 383 | return |
| 318 | } | 384 | } |
| 319 | if (form.value.legalIdcCode == '') { | 385 | if (form.value.legalIdcCode == '') { |
| 320 | uni.showToast({ title: '请填写法人证件号', icon: 'none' }) | 386 | uni.showToast({ |
| 387 | title: '请填写法人证件号', | ||
| 388 | icon: 'none' | ||
| 389 | }) | ||
| 321 | return | 390 | return |
| 322 | } | 391 | } |
| 323 | if (form.value.siteContact == '') { | 392 | if (form.value.siteContact == '') { |
| 324 | uni.showToast({ title: '请填写联系人', icon: 'none' }) | 393 | uni.showToast({ |
| 394 | title: '请填写联系人', | ||
| 395 | icon: 'none' | ||
| 396 | }) | ||
| 325 | return | 397 | return |
| 326 | } | 398 | } |
| 327 | if (form.value.siteTel == '') { | 399 | if (form.value.siteTel == '') { |
| 328 | uni.showToast({ title: '请填写联系方式', icon: 'none' }) | 400 | uni.showToast({ |
| 401 | title: '请填写联系方式', | ||
| 402 | icon: 'none' | ||
| 403 | }) | ||
| 329 | return | 404 | return |
| 330 | } | 405 | } |
| 331 | if (form.value.coordinates1 == '') { | 406 | if (form.value.coordinates1 == '') { |
| 332 | uni.showToast({ title: '请选择认证地址', icon: 'none' }) | 407 | uni.showToast({ |
| 408 | title: '请选择认证地址', | ||
| 409 | icon: 'none' | ||
| 410 | }) | ||
| 333 | return | 411 | return |
| 334 | } | 412 | } |
| 335 | if (form.value.adress == '') { | 413 | if (form.value.adress == '') { |
| 336 | uni.showToast({ title: '请填写详细地址', icon: 'none' }) | 414 | uni.showToast({ |
| 415 | title: '请填写详细地址', | ||
| 416 | icon: 'none' | ||
| 417 | }) | ||
| 337 | return | 418 | return |
| 338 | } | 419 | } |
| 339 | if (form.value.legal == '') { | 420 | if (form.value.legal == '') { |
| 340 | uni.showToast({ title: '请填写法人姓名', icon: 'none' }) | 421 | uni.showToast({ |
| 422 | title: '请填写法人姓名', | ||
| 423 | icon: 'none' | ||
| 424 | }) | ||
| 341 | return | 425 | return |
| 342 | } | 426 | } |
| 343 | if (legalIdcPhoto1.value == '' || legalIdcPhoto2.value == '') { | 427 | if (legalIdcPhoto1.value == '' || legalIdcPhoto2.value == '') { |
| 344 | uni.showToast({ title: '请上传法人身份证', icon: 'none' }) | 428 | uni.showToast({ |
| 429 | title: '请上传法人身份证', | ||
| 430 | icon: 'none' | ||
| 431 | }) | ||
| 345 | return | 432 | return |
| 346 | } | 433 | } |
| 347 | if (!form.value.businessLicense) { | 434 | if (!form.value.businessLicense) { |
| 348 | uni.showToast({ title: '请上传营业执照', icon: 'none' }) | 435 | uni.showToast({ |
| 436 | title: '请上传营业执照', | ||
| 437 | icon: 'none' | ||
| 438 | }) | ||
| 349 | return | 439 | return |
| 350 | } | 440 | } |
| 351 | if (picArr.value.length == 0) { | 441 | if (picArr.value.length == 0) { |
| 352 | uni.showToast({ title: '请上传机构照片', icon: 'none' }) | 442 | uni.showToast({ |
| 443 | title: '请上传机构照片', | ||
| 444 | icon: 'none' | ||
| 445 | }) | ||
| 353 | return | 446 | return |
| 354 | } | 447 | } |
| 355 | if (form.value.parentId == -1 || form.value.parentId == 0) { | 448 | if (form.value.parentId == -1 || form.value.parentId == 0) { |
| 356 | uni.showToast({ title: '请选择所属协会', icon: 'none' }) | 449 | uni.showToast({ |
| 450 | title: '请选择所属协会', | ||
| 451 | icon: 'none' | ||
| 452 | }) | ||
| 357 | return | 453 | return |
| 358 | } | 454 | } |
| 359 | 455 | ||
| ... | @@ -370,7 +466,10 @@ | ... | @@ -370,7 +466,10 @@ |
| 370 | submitData() | 466 | submitData() |
| 371 | 467 | ||
| 372 | } catch (error) { | 468 | } catch (error) { |
| 373 | uni.showToast({ title: error.message || '验证失败,请重试', icon: 'none' }) | 469 | uni.showToast({ |
| 470 | title: error.message || '验证失败,请重试', | ||
| 471 | icon: 'none' | ||
| 472 | }) | ||
| 374 | } | 473 | } |
| 375 | } | 474 | } |
| 376 | 475 | ||
| ... | @@ -403,7 +502,7 @@ | ... | @@ -403,7 +502,7 @@ |
| 403 | 502 | ||
| 404 | // 企业信息验证 | 503 | // 企业信息验证 |
| 405 | function handelVerify() { | 504 | function handelVerify() { |
| 406 | return new Promise(async(resolve, reject) => { | 505 | return new Promise(async (resolve, reject) => { |
| 407 | if (!form.value.legalIdcCode || !form.value.legal) { | 506 | if (!form.value.legalIdcCode || !form.value.legal) { |
| 408 | return reject(new Error('请重新上传身份证并填写法人证件号')) | 507 | return reject(new Error('请重新上传身份证并填写法人证件号')) |
| 409 | } | 508 | } |
| ... | @@ -458,14 +557,19 @@ | ... | @@ -458,14 +557,19 @@ |
| 458 | content: '激活成功,返回首页', | 557 | content: '激活成功,返回首页', |
| 459 | success: function(resp) { | 558 | success: function(resp) { |
| 460 | if (resp.confirm) { | 559 | if (resp.confirm) { |
| 461 | uni.reLaunch({ url: `/pages/index/index` }) | 560 | uni.reLaunch({ |
| 561 | url: `/pages/index/home` | ||
| 562 | }) | ||
| 462 | } else { | 563 | } else { |
| 463 | uni.navigateBack() | 564 | uni.navigateBack() |
| 464 | } | 565 | } |
| 465 | } | 566 | } |
| 466 | }) | 567 | }) |
| 467 | }).catch(err => { | 568 | }).catch(err => { |
| 468 | uni.showToast({ title: '激活失败,请重试', icon: 'none' }) | 569 | uni.showToast({ |
| 570 | title: '激活失败,请重试', | ||
| 571 | icon: 'none' | ||
| 572 | }) | ||
| 469 | }) | 573 | }) |
| 470 | } else { | 574 | } else { |
| 471 | api.editMyMemberCertifiedInfo(dataInfo).then(res => { | 575 | api.editMyMemberCertifiedInfo(dataInfo).then(res => { |
| ... | @@ -474,7 +578,10 @@ | ... | @@ -474,7 +578,10 @@ |
| 474 | }) | 578 | }) |
| 475 | 579 | ||
| 476 | }).catch(err => { | 580 | }).catch(err => { |
| 477 | uni.showToast({ title: '提交失败,请重试', icon: 'none' }) | 581 | uni.showToast({ |
| 582 | title: '提交失败,请重试', | ||
| 583 | icon: 'none' | ||
| 584 | }) | ||
| 478 | }) | 585 | }) |
| 479 | } | 586 | } |
| 480 | } | 587 | } |
| ... | @@ -489,13 +596,18 @@ | ... | @@ -489,13 +596,18 @@ |
| 489 | const tempFilePaths = e.tempFilePaths; | 596 | const tempFilePaths = e.tempFilePaths; |
| 490 | const imgUrl = tempFilePaths[0] | 597 | const imgUrl = tempFilePaths[0] |
| 491 | if (!imgUrl) return | 598 | if (!imgUrl) return |
| 492 | uni.showLoading({ title: '上传中' }) | 599 | uni.showLoading({ |
| 600 | title: '上传中' | ||
| 601 | }) | ||
| 493 | api.uploadImg(e).then(data => { | 602 | api.uploadImg(e).then(data => { |
| 494 | legalIdcPhoto1.value = data.msg | 603 | legalIdcPhoto1.value = data.msg |
| 495 | uni.hideLoading() | 604 | uni.hideLoading() |
| 496 | }).catch(err => { | 605 | }).catch(err => { |
| 497 | uni.hideLoading() | 606 | uni.hideLoading() |
| 498 | uni.showToast({ title: '上传失败', icon: 'none' }) | 607 | uni.showToast({ |
| 608 | title: '上传失败', | ||
| 609 | icon: 'none' | ||
| 610 | }) | ||
| 499 | }) | 611 | }) |
| 500 | } | 612 | } |
| 501 | 613 | ||
| ... | @@ -503,13 +615,18 @@ | ... | @@ -503,13 +615,18 @@ |
| 503 | const tempFilePaths = e.tempFilePaths; | 615 | const tempFilePaths = e.tempFilePaths; |
| 504 | const imgUrl = tempFilePaths[0] | 616 | const imgUrl = tempFilePaths[0] |
| 505 | if (!imgUrl) return | 617 | if (!imgUrl) return |
| 506 | uni.showLoading({ title: '上传中' }) | 618 | uni.showLoading({ |
| 619 | title: '上传中' | ||
| 620 | }) | ||
| 507 | api.uploadImg(e).then(data => { | 621 | api.uploadImg(e).then(data => { |
| 508 | legalIdcPhoto2.value = data.msg | 622 | legalIdcPhoto2.value = data.msg |
| 509 | uni.hideLoading() | 623 | uni.hideLoading() |
| 510 | }).catch(err => { | 624 | }).catch(err => { |
| 511 | uni.hideLoading() | 625 | uni.hideLoading() |
| 512 | uni.showToast({ title: '上传失败', icon: 'none' }) | 626 | uni.showToast({ |
| 627 | title: '上传失败', | ||
| 628 | icon: 'none' | ||
| 629 | }) | ||
| 513 | }) | 630 | }) |
| 514 | } | 631 | } |
| 515 | 632 | ||
| ... | @@ -524,17 +641,27 @@ | ... | @@ -524,17 +641,27 @@ |
| 524 | } | 641 | } |
| 525 | 642 | ||
| 526 | let selectFileValue = {} | 643 | let selectFileValue = {} |
| 644 | |||
| 527 | function selectFile(e) { | 645 | function selectFile(e) { |
| 528 | let file = e.tempFiles[0] | 646 | let file = e.tempFiles[0] |
| 529 | if (!file) return | 647 | if (!file) return |
| 530 | uni.showLoading({ title: '上传中' }) | 648 | uni.showLoading({ |
| 649 | title: '上传中' | ||
| 650 | }) | ||
| 531 | api.uploadFile(e).then(data => { | 651 | api.uploadFile(e).then(data => { |
| 532 | selectFileValue = { url: data.msg, name: file.name, extname: file.extname } | 652 | selectFileValue = { |
| 653 | url: data.msg, | ||
| 654 | name: file.name, | ||
| 655 | extname: file.extname | ||
| 656 | } | ||
| 533 | form.value.businessLicense = JSON.stringify([selectFileValue]) | 657 | form.value.businessLicense = JSON.stringify([selectFileValue]) |
| 534 | uni.hideLoading() | 658 | uni.hideLoading() |
| 535 | }).catch(err => { | 659 | }).catch(err => { |
| 536 | uni.hideLoading() | 660 | uni.hideLoading() |
| 537 | uni.showToast({ title: '上传失败', icon: 'none' }) | 661 | uni.showToast({ |
| 662 | title: '上传失败', | ||
| 663 | icon: 'none' | ||
| 664 | }) | ||
| 538 | }) | 665 | }) |
| 539 | } | 666 | } |
| 540 | 667 | ||
| ... | @@ -547,13 +674,18 @@ | ... | @@ -547,13 +674,18 @@ |
| 547 | const tempFilePaths = e.tempFilePaths; | 674 | const tempFilePaths = e.tempFilePaths; |
| 548 | const imgUrl = tempFilePaths[0] | 675 | const imgUrl = tempFilePaths[0] |
| 549 | if (!imgUrl) return | 676 | if (!imgUrl) return |
| 550 | uni.showLoading({ title: '上传中' }) | 677 | uni.showLoading({ |
| 678 | title: '上传中' | ||
| 679 | }) | ||
| 551 | api.uploadImg(e).then(data => { | 680 | api.uploadImg(e).then(data => { |
| 552 | picArr.value.push(data.msg) | 681 | picArr.value.push(data.msg) |
| 553 | uni.hideLoading() | 682 | uni.hideLoading() |
| 554 | }).catch(err => { | 683 | }).catch(err => { |
| 555 | uni.hideLoading() | 684 | uni.hideLoading() |
| 556 | uni.showToast({ title: '上传失败', icon: 'none' }) | 685 | uni.showToast({ |
| 686 | title: '上传失败', | ||
| 687 | icon: 'none' | ||
| 688 | }) | ||
| 557 | }) | 689 | }) |
| 558 | } | 690 | } |
| 559 | 691 | ||
| ... | @@ -563,25 +695,47 @@ | ... | @@ -563,25 +695,47 @@ |
| 563 | </script> | 695 | </script> |
| 564 | 696 | ||
| 565 | <style lang="scss" scoped> | 697 | <style lang="scss" scoped> |
| 566 | :deep(.file-picker__progress){ opacity: 0; } | 698 | :deep(.file-picker__progress) { |
| 567 | :deep(.input-value){padding: 0 5px;} | 699 | opacity: 0; |
| 700 | } | ||
| 701 | |||
| 702 | :deep(.input-value) { | ||
| 703 | padding: 0 5px; | ||
| 704 | } | ||
| 705 | |||
| 568 | .picker-view { | 706 | .picker-view { |
| 569 | width: 750rpx; | 707 | width: 750rpx; |
| 570 | height: 600rpx; | 708 | height: 600rpx; |
| 571 | margin-top: 20rpx; | 709 | margin-top: 20rpx; |
| 572 | } | 710 | } |
| 711 | |||
| 573 | .item { | 712 | .item { |
| 574 | line-height: 100rpx; | 713 | line-height: 100rpx; |
| 575 | text-align: center; | 714 | text-align: center; |
| 576 | } | 715 | } |
| 716 | |||
| 577 | :deep(.uni-data-tree) { | 717 | :deep(.uni-data-tree) { |
| 578 | border: 1px solid #dcdfe6; | 718 | border: 1px solid #dcdfe6; |
| 579 | border-radius: 4px; | 719 | border-radius: 4px; |
| 580 | .selected-list { justify-content: start; } | 720 | |
| 721 | .selected-list { | ||
| 722 | justify-content: start; | ||
| 723 | } | ||
| 724 | } | ||
| 725 | |||
| 726 | :deep(.uni-select__input-placeholder) { | ||
| 727 | font-size: 30rpx; | ||
| 728 | } | ||
| 729 | |||
| 730 | :deep(.uni-easyinput__content-input) { | ||
| 731 | font-size: 30rpx; | ||
| 581 | } | 732 | } |
| 582 | :deep(.uni-select__input-placeholder) { font-size: 30rpx; } | 733 | |
| 583 | :deep(.uni-easyinput__content-input) { font-size: 30rpx; } | 734 | :deep(.uni-easyinput__placeholder-class) { |
| 584 | :deep(.uni-easyinput__placeholder-class) { font-size: 30rpx;color: grey; } | 735 | font-size: 30rpx; |
| 736 | color: grey; | ||
| 737 | } | ||
| 738 | |||
| 585 | .wBox { | 739 | .wBox { |
| 586 | width: 700rpx; | 740 | width: 700rpx; |
| 587 | padding: 30rpx; | 741 | padding: 30rpx; |
| ... | @@ -590,12 +744,14 @@ | ... | @@ -590,12 +744,14 @@ |
| 590 | box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1); | 744 | box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1); |
| 591 | border-radius: 15rpx; | 745 | border-radius: 15rpx; |
| 592 | } | 746 | } |
| 747 | |||
| 593 | .imgArea { | 748 | .imgArea { |
| 594 | padding: 1px; | 749 | padding: 1px; |
| 595 | display: flex; | 750 | display: flex; |
| 596 | flex-wrap: wrap; | 751 | flex-wrap: wrap; |
| 597 | flex-direction: column; | 752 | flex-direction: column; |
| 598 | } | 753 | } |
| 754 | |||
| 599 | .btn-red { | 755 | .btn-red { |
| 600 | background-color: #F56C6C; | 756 | background-color: #F56C6C; |
| 601 | color: #fff; | 757 | color: #fff; |
| ... | @@ -605,6 +761,7 @@ | ... | @@ -605,6 +761,7 @@ |
| 605 | font-size: 32rpx; | 761 | font-size: 32rpx; |
| 606 | width: 100%; | 762 | width: 100%; |
| 607 | } | 763 | } |
| 764 | |||
| 608 | .fixedBottom { | 765 | .fixedBottom { |
| 609 | position: fixed; | 766 | position: fixed; |
| 610 | bottom: 0; | 767 | bottom: 0; |
| ... | @@ -614,6 +771,7 @@ | ... | @@ -614,6 +771,7 @@ |
| 614 | background: #fff; | 771 | background: #fff; |
| 615 | z-index: 99; | 772 | z-index: 99; |
| 616 | } | 773 | } |
| 774 | |||
| 617 | .text-warning { | 775 | .text-warning { |
| 618 | font-size: 28rpx; | 776 | font-size: 28rpx; |
| 619 | margin-top: 20rpx; | 777 | margin-top: 20rpx; |
| ... | @@ -628,12 +786,14 @@ | ... | @@ -628,12 +786,14 @@ |
| 628 | box-sizing: border-box; | 786 | box-sizing: border-box; |
| 629 | text-align: center; | 787 | text-align: center; |
| 630 | } | 788 | } |
| 789 | |||
| 631 | .modal-title { | 790 | .modal-title { |
| 632 | font-size: 36rpx; | 791 | font-size: 36rpx; |
| 633 | font-weight: 600; | 792 | font-weight: 600; |
| 634 | color: #333; | 793 | color: #333; |
| 635 | margin-bottom: 30rpx; | 794 | margin-bottom: 30rpx; |
| 636 | } | 795 | } |
| 796 | |||
| 637 | .modal-content { | 797 | .modal-content { |
| 638 | font-size: 30rpx; | 798 | font-size: 30rpx; |
| 639 | color: #666; | 799 | color: #666; |
| ... | @@ -641,17 +801,20 @@ | ... | @@ -641,17 +801,20 @@ |
| 641 | margin-bottom: 20rpx; | 801 | margin-bottom: 20rpx; |
| 642 | text-align: left; | 802 | text-align: left; |
| 643 | } | 803 | } |
| 804 | |||
| 644 | .modal-tip { | 805 | .modal-tip { |
| 645 | font-size: 26rpx; | 806 | font-size: 26rpx; |
| 646 | color: #F56C6C; | 807 | color: #F56C6C; |
| 647 | margin-top: 10rpx; | 808 | margin-top: 10rpx; |
| 648 | margin-bottom: 30rpx; | 809 | margin-bottom: 30rpx; |
| 649 | } | 810 | } |
| 811 | |||
| 650 | .modal-btns { | 812 | .modal-btns { |
| 651 | display: flex; | 813 | display: flex; |
| 652 | justify-content: space-between; | 814 | justify-content: space-between; |
| 653 | gap: 20rpx; | 815 | gap: 20rpx; |
| 654 | } | 816 | } |
| 817 | |||
| 655 | .btn-cancel { | 818 | .btn-cancel { |
| 656 | flex: 1; | 819 | flex: 1; |
| 657 | height: 80rpx; | 820 | height: 80rpx; |
| ... | @@ -662,18 +825,22 @@ | ... | @@ -662,18 +825,22 @@ |
| 662 | font-size: 32rpx; | 825 | font-size: 32rpx; |
| 663 | border: none; | 826 | border: none; |
| 664 | } | 827 | } |
| 828 | |||
| 665 | .btn-confirm { | 829 | .btn-confirm { |
| 666 | flex: 1; | 830 | flex: 1; |
| 667 | height: 80rpx; | 831 | height: 80rpx; |
| 668 | line-height: 80rpx; | 832 | line-height: 80rpx; |
| 669 | background: #C4121B; /* 红色主色调,和图二一致 */ | 833 | background: #C4121B; |
| 834 | /* 红色主色调,和图二一致 */ | ||
| 670 | color: #fff; | 835 | color: #fff; |
| 671 | border-radius: 40rpx; | 836 | border-radius: 40rpx; |
| 672 | font-size: 32rpx; | 837 | font-size: 32rpx; |
| 673 | border: none; | 838 | border: none; |
| 674 | } | 839 | } |
| 840 | |||
| 675 | /* 去掉按钮默认边框 */ | 841 | /* 去掉按钮默认边框 */ |
| 676 | .btn-cancel::after, .btn-confirm::after { | 842 | .btn-cancel::after, |
| 843 | .btn-confirm::after { | ||
| 677 | border: none; | 844 | border: none; |
| 678 | } | 845 | } |
| 679 | 846 | ||
| ... | @@ -681,6 +848,7 @@ | ... | @@ -681,6 +848,7 @@ |
| 681 | .apply-modal { | 848 | .apply-modal { |
| 682 | padding: 40rpx 30rpx 20rpx; | 849 | padding: 40rpx 30rpx 20rpx; |
| 683 | } | 850 | } |
| 851 | |||
| 684 | .apply-btns { | 852 | .apply-btns { |
| 685 | margin-bottom: 20rpx; | 853 | margin-bottom: 20rpx; |
| 686 | } | 854 | } | ... | ... |
| ... | @@ -9,14 +9,12 @@ | ... | @@ -9,14 +9,12 @@ |
| 9 | <view class="time">{{n.auditTime||'待审批'}}</view> | 9 | <view class="time">{{n.auditTime||'待审批'}}</view> |
| 10 | <view class="content"> | 10 | <view class="content"> |
| 11 | <view class="status"> | 11 | <view class="status"> |
| 12 | <text v-if="n.auditResult==0"> 审核中</text> | ||
| 13 | <text v-if="n.auditResult==1" class="text-success">审核通过</text> | 12 | <text v-if="n.auditResult==1" class="text-success">审核通过</text> |
| 14 | <text v-if="n.auditResult==2" class="text-danger"> 审核拒绝</text> | 13 | <text v-if="n.auditResult==0" class="text-danger"> 审核拒绝</text> |
| 15 | <text v-if="n.auditResult==3" class="text-warning"> 已撤回</text> | ||
| 16 | </view> | 14 | </view> |
| 17 | <!-- <view class="name">第 {{index+1}} 步</view> --> | 15 | <!-- <view class="name">第 {{index+1}} 步</view> --> |
| 18 | <view class="deptName">{{n.auditDeptName}}</view> | 16 | <view class="deptName">{{n.auditDeptName}}</view> |
| 19 | <view v-if="n.auditStatus==2"> | 17 | <view v-if="n.auditResult==0"> |
| 20 | 备注:{{n.auditMsg||'/' }} | 18 | 备注:{{n.auditMsg||'/' }} |
| 21 | </view> | 19 | </view> |
| 22 | </view> | 20 | </view> |
| ... | @@ -31,6 +29,7 @@ | ... | @@ -31,6 +29,7 @@ |
| 31 | import * as api from '@/common/api.js' | 29 | import * as api from '@/common/api.js' |
| 32 | import config from '@/config.js' | 30 | import config from '@/config.js' |
| 33 | import _ from 'underscore' | 31 | import _ from 'underscore' |
| 32 | import to from 'await-to-js' | ||
| 34 | import { | 33 | import { |
| 35 | onMounted, | 34 | onMounted, |
| 36 | ref | 35 | ref |
| ... | @@ -42,16 +41,15 @@ | ... | @@ -42,16 +41,15 @@ |
| 42 | const app = getApp(); | 41 | const app = getApp(); |
| 43 | const userType = ref('') | 42 | const userType = ref('') |
| 44 | const recordList = ref([]) | 43 | const recordList = ref([]) |
| 45 | onLoad((option) => { | 44 | onLoad(async (option) => { |
| 46 | getMyCertStageFN() | 45 | await getMyRecentFN() |
| 47 | }) | ||
| 48 | |||
| 49 | function getMyCertStageFN() { | ||
| 50 | api.getMyCertStage().then(res => { | ||
| 51 | recordList.value = res.data | ||
| 52 | console.log(res) | ||
| 53 | }) | 46 | }) |
| 54 | 47 | ||
| 48 | async function getMyRecentFN() { | ||
| 49 | const [err, res] = await to(api.getMyRecent()) | ||
| 50 | if (!err && res.data && res.data.auditLogs) { | ||
| 51 | recordList.value = JSON.parse(res.data.auditLogs) | ||
| 52 | } | ||
| 55 | } | 53 | } |
| 56 | </script> | 54 | </script> |
| 57 | 55 | ... | ... |
| ... | @@ -4,6 +4,7 @@ | ... | @@ -4,6 +4,7 @@ |
| 4 | "crypto-js": "^4.1.1", | 4 | "crypto-js": "^4.1.1", |
| 5 | "dayjs": "^1.11.6", | 5 | "dayjs": "^1.11.6", |
| 6 | "lodash": "^4.17.21", | 6 | "lodash": "^4.17.21", |
| 7 | "pinia": "^3.0.4", | ||
| 7 | "underscore": "^1.13.6" | 8 | "underscore": "^1.13.6" |
| 8 | }, | 9 | }, |
| 9 | "devDependencies": { | 10 | "devDependencies": { | ... | ... |
| 1 | { | 1 | { |
| 2 | "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages | 2 | "pages": [{ |
| 3 | "path": "pages/index/index" | ||
| 4 | }, | ||
| 3 | { | 5 | { |
| 4 | "path": "pages/index/index", | 6 | "path": "pages/index/home", |
| 5 | "style": { | 7 | "style": { |
| 6 | "navigationBarTitleText": "工作台", | 8 | "navigationBarTitleText": "工作台", |
| 7 | "backgroundColor": "#ffffff", | 9 | "backgroundColor": "#ffffff", |
| ... | @@ -94,11 +96,10 @@ | ... | @@ -94,11 +96,10 @@ |
| 94 | 96 | ||
| 95 | }, | 97 | }, |
| 96 | { | 98 | { |
| 97 | "path" : "pages/index/newsDetail", | 99 | "path": "pages/index/newsDetail", |
| 98 | "style" : | 100 | "style": { |
| 99 | { | 101 | "navigationBarTitleText": "通知详情", |
| 100 | "navigationBarTitleText" : "通知详情", | 102 | "enablePullDownRefresh": false |
| 101 | "enablePullDownRefresh" : false | ||
| 102 | } | 103 | } |
| 103 | } | 104 | } |
| 104 | ], | 105 | ], |
| ... | @@ -108,8 +109,7 @@ | ... | @@ -108,8 +109,7 @@ |
| 108 | "navigationBarBackgroundColor": "#ffffff", | 109 | "navigationBarBackgroundColor": "#ffffff", |
| 109 | "navigationBarTitleText": "中跆协-工作台" | 110 | "navigationBarTitleText": "中跆协-工作台" |
| 110 | }, | 111 | }, |
| 111 | "subPackages": [ | 112 | "subPackages": [{ |
| 112 | { | ||
| 113 | "root": "login", | 113 | "root": "login", |
| 114 | "pages": [{ | 114 | "pages": [{ |
| 115 | "path": "login", | 115 | "path": "login", |
| ... | @@ -136,8 +136,7 @@ | ... | @@ -136,8 +136,7 @@ |
| 136 | }, | 136 | }, |
| 137 | { | 137 | { |
| 138 | "root": "personal", | 138 | "root": "personal", |
| 139 | "pages": [ | 139 | "pages": [{ |
| 140 | { | ||
| 141 | "path": "addVip_per", | 140 | "path": "addVip_per", |
| 142 | "style": { | 141 | "style": { |
| 143 | "navigationBarTitleText": "个人会员申请", | 142 | "navigationBarTitleText": "个人会员申请", |
| ... | @@ -145,43 +144,38 @@ | ... | @@ -145,43 +144,38 @@ |
| 145 | } | 144 | } |
| 146 | }, | 145 | }, |
| 147 | { | 146 | { |
| 148 | "path" : "goPay_per", | 147 | "path": "goPay_per", |
| 149 | "style" : | 148 | "style": { |
| 150 | { | 149 | "navigationBarTitleText": "付款详情", |
| 151 | "navigationBarTitleText" : "付款详情", | 150 | "enablePullDownRefresh": false |
| 152 | "enablePullDownRefresh" : false | ||
| 153 | } | 151 | } |
| 154 | }, | 152 | }, |
| 155 | { | 153 | { |
| 156 | "path" : "submitPay", | 154 | "path": "submitPay", |
| 157 | "style" : | 155 | "style": { |
| 158 | { | 156 | "navigationBarTitleText": "确认支付", |
| 159 | "navigationBarTitleText" : "确认支付", | 157 | "enablePullDownRefresh": false |
| 160 | "enablePullDownRefresh" : false | ||
| 161 | } | 158 | } |
| 162 | }, | 159 | }, |
| 163 | { | 160 | { |
| 164 | "path" : "sucPay", | 161 | "path": "sucPay", |
| 165 | "style" : | 162 | "style": { |
| 166 | { | 163 | "navigationBarTitleText": "支付详情", |
| 167 | "navigationBarTitleText" : "支付详情", | 164 | "enablePullDownRefresh": false |
| 168 | "enablePullDownRefresh" : false | ||
| 169 | } | 165 | } |
| 170 | }, | 166 | }, |
| 171 | { | 167 | { |
| 172 | "path" : "home", | 168 | "path": "home", |
| 173 | "style" : | 169 | "style": { |
| 174 | { | 170 | "navigationBarTitleText": "个人会员中心", |
| 175 | "navigationBarTitleText" : "个人会员中心", | 171 | "enablePullDownRefresh": false |
| 176 | "enablePullDownRefresh" : false | ||
| 177 | } | 172 | } |
| 178 | } | 173 | } |
| 179 | ] | 174 | ] |
| 180 | }, | 175 | }, |
| 181 | { | 176 | { |
| 182 | "root": "personalVip", | 177 | "root": "personalVip", |
| 183 | "pages": [ | 178 | "pages": [{ |
| 184 | { | ||
| 185 | "path": "addVip", | 179 | "path": "addVip", |
| 186 | "style": { | 180 | "style": { |
| 187 | "navigationBarTitleText": "添加会员", | 181 | "navigationBarTitleText": "添加会员", |
| ... | @@ -298,141 +292,125 @@ | ... | @@ -298,141 +292,125 @@ |
| 298 | } | 292 | } |
| 299 | }, | 293 | }, |
| 300 | { | 294 | { |
| 301 | "path" : "changeVip", | 295 | "path": "changeVip", |
| 302 | "style" : | 296 | "style": { |
| 303 | { | 297 | "navigationBarTitleText": "会员信息变更", |
| 304 | "navigationBarTitleText" : "会员信息变更", | 298 | "enablePullDownRefresh": false |
| 305 | "enablePullDownRefresh" : false | ||
| 306 | } | 299 | } |
| 307 | }, | 300 | }, |
| 308 | { | 301 | { |
| 309 | "path" : "addChange", | 302 | "path": "addChange", |
| 310 | "style" : | 303 | "style": { |
| 311 | { | 304 | "navigationBarTitleText": "新增变更", |
| 312 | "navigationBarTitleText" : "新增变更", | 305 | "enablePullDownRefresh": false |
| 313 | "enablePullDownRefresh" : false | ||
| 314 | } | 306 | } |
| 315 | }, | 307 | }, |
| 316 | { | 308 | { |
| 317 | "path" : "changeVipDetail", | 309 | "path": "changeVipDetail", |
| 318 | "style" : | 310 | "style": { |
| 319 | { | 311 | "navigationBarTitleText": "详情", |
| 320 | "navigationBarTitleText" : "详情", | 312 | "enablePullDownRefresh": false |
| 321 | "enablePullDownRefresh" : false | ||
| 322 | } | 313 | } |
| 323 | }, | 314 | }, |
| 324 | { | 315 | { |
| 325 | "path" : "changeVipAudit", | 316 | "path": "changeVipAudit", |
| 326 | "style" : | 317 | "style": { |
| 327 | { | 318 | "navigationBarTitleText": "会员信息变更审核", |
| 328 | "navigationBarTitleText" : "会员信息变更审核", | 319 | "enablePullDownRefresh": false |
| 329 | "enablePullDownRefresh" : false | ||
| 330 | } | 320 | } |
| 331 | }, | 321 | }, |
| 332 | { | 322 | { |
| 333 | "path" : "changeLevel", | 323 | "path": "changeLevel", |
| 334 | "style" : | 324 | "style": { |
| 335 | { | 325 | "navigationBarTitleText": "级位变更审核", |
| 336 | "navigationBarTitleText" : "级位变更审核", | 326 | "enablePullDownRefresh": false |
| 337 | "enablePullDownRefresh" : false | ||
| 338 | } | 327 | } |
| 339 | }, | 328 | }, |
| 340 | { | 329 | { |
| 341 | "path" : "addChangeLevel", | 330 | "path": "addChangeLevel", |
| 342 | "style" : | 331 | "style": { |
| 343 | { | 332 | "navigationBarTitleText": "新建级位变更", |
| 344 | "navigationBarTitleText" : "新建级位变更", | 333 | "enablePullDownRefresh": false |
| 345 | "enablePullDownRefresh" : false | ||
| 346 | } | 334 | } |
| 347 | }, | 335 | }, |
| 348 | { | 336 | { |
| 349 | "path" : "changeLevelDetail", | 337 | "path": "changeLevelDetail", |
| 350 | "style" : | 338 | "style": { |
| 351 | { | 339 | "navigationBarTitleText": "级位变更详情", |
| 352 | "navigationBarTitleText" : "级位变更详情", | 340 | "enablePullDownRefresh": false |
| 353 | "enablePullDownRefresh" : false | ||
| 354 | } | 341 | } |
| 355 | }, | 342 | }, |
| 356 | { | 343 | { |
| 357 | "path" : "changeLevelAudit", | 344 | "path": "changeLevelAudit", |
| 358 | "style" : | 345 | "style": { |
| 359 | { | 346 | "navigationBarTitleText": "级位变更审批", |
| 360 | "navigationBarTitleText" : "级位变更审批", | 347 | "enablePullDownRefresh": false |
| 361 | "enablePullDownRefresh" : false | ||
| 362 | } | 348 | } |
| 363 | }, | 349 | }, |
| 364 | { | 350 | { |
| 365 | "path" : "changeVipChoseList", | 351 | "path": "changeVipChoseList", |
| 366 | "style" : | 352 | "style": { |
| 367 | { | 353 | "navigationBarTitleText": "在线选择", |
| 368 | "navigationBarTitleText" : "在线选择", | 354 | "enablePullDownRefresh": false |
| 369 | "enablePullDownRefresh" : false | ||
| 370 | } | 355 | } |
| 371 | }, | 356 | }, |
| 372 | { | 357 | { |
| 373 | "path" : "mergeVip", | 358 | "path": "mergeVip", |
| 374 | "style" : | 359 | "style": { |
| 375 | { | 360 | "navigationBarTitleText": "信息合并", |
| 376 | "navigationBarTitleText" : "信息合并", | 361 | "enablePullDownRefresh": false |
| 377 | "enablePullDownRefresh" : false | ||
| 378 | } | 362 | } |
| 379 | }, | 363 | }, |
| 380 | { | 364 | { |
| 381 | "path" : "addMerge", | 365 | "path": "addMerge", |
| 382 | "style" : | 366 | "style": { |
| 383 | { | 367 | "navigationBarTitleText": "新建信息合并", |
| 384 | "navigationBarTitleText" : "新建信息合并", | 368 | "enablePullDownRefresh": false |
| 385 | "enablePullDownRefresh" : false | ||
| 386 | } | 369 | } |
| 387 | }, | 370 | }, |
| 388 | { | 371 | { |
| 389 | "path" : "mergeVipDetail", | 372 | "path": "mergeVipDetail", |
| 390 | "style" : | 373 | "style": { |
| 391 | { | 374 | "navigationBarTitleText": "合并信息详情", |
| 392 | "navigationBarTitleText" : "合并信息详情", | 375 | "enablePullDownRefresh": false |
| 393 | "enablePullDownRefresh" : false | ||
| 394 | } | 376 | } |
| 395 | }, | 377 | }, |
| 396 | { | 378 | { |
| 397 | "path" : "mergeVipChoseList", | 379 | "path": "mergeVipChoseList", |
| 398 | "style" : | 380 | "style": { |
| 399 | { | 381 | "navigationBarTitleText": "在线选择", |
| 400 | "navigationBarTitleText" : "在线选择", | 382 | "enablePullDownRefresh": false |
| 401 | "enablePullDownRefresh" : false | ||
| 402 | } | 383 | } |
| 403 | }, | 384 | }, |
| 404 | { | 385 | { |
| 405 | "path" : "mergeVipAudit", | 386 | "path": "mergeVipAudit", |
| 406 | "style" : | 387 | "style": { |
| 407 | { | 388 | "navigationBarTitleText": "合并审核", |
| 408 | "navigationBarTitleText" : "合并审核", | 389 | "enablePullDownRefresh": false |
| 409 | "enablePullDownRefresh" : false | ||
| 410 | } | 390 | } |
| 411 | }, | 391 | }, |
| 412 | { | 392 | { |
| 413 | "path" : "monthFee", | 393 | "path": "monthFee", |
| 414 | "style" : | 394 | "style": { |
| 415 | { | 395 | "navigationBarTitleText": "月结缴费", |
| 416 | "navigationBarTitleText" : "月结缴费", | 396 | "enablePullDownRefresh": false |
| 417 | "enablePullDownRefresh" : false | ||
| 418 | } | 397 | } |
| 419 | }, | 398 | }, |
| 420 | { | 399 | { |
| 421 | "path" : "webview/webview", | 400 | "path": "webview/webview", |
| 422 | "style" : | 401 | "style": { |
| 423 | { | 402 | "navigationBarTitleText": "下载", |
| 424 | "navigationBarTitleText" : "下载", | 403 | "enablePullDownRefresh": false |
| 425 | "enablePullDownRefresh" : false | ||
| 426 | } | 404 | } |
| 427 | }, | 405 | }, |
| 428 | { | 406 | { |
| 429 | "path" : "monthFeeDetail", | 407 | "path": "monthFeeDetail", |
| 430 | "style" : | 408 | "style": { |
| 431 | { | 409 | "navigationBarTitleText": "月结详情", |
| 432 | "navigationBarTitleText" : "月结详情", | 410 | "enablePullDownRefresh": false |
| 433 | "enablePullDownRefresh" : false | ||
| 434 | } | 411 | } |
| 435 | }] | 412 | } |
| 413 | ] | ||
| 436 | }, { | 414 | }, { |
| 437 | "root": "group", | 415 | "root": "group", |
| 438 | "pages": [{ | 416 | "pages": [{ |
| ... | @@ -489,7 +467,7 @@ | ... | @@ -489,7 +467,7 @@ |
| 489 | "enablePullDownRefresh": false | 467 | "enablePullDownRefresh": false |
| 490 | } | 468 | } |
| 491 | 469 | ||
| 492 | },{ | 470 | }, { |
| 493 | "path": "list", | 471 | "path": "list", |
| 494 | "style": { | 472 | "style": { |
| 495 | "navigationBarTitleText": "团体会员", | 473 | "navigationBarTitleText": "团体会员", |
| ... | @@ -523,7 +501,7 @@ | ... | @@ -523,7 +501,7 @@ |
| 523 | "enablePullDownRefresh": false | 501 | "enablePullDownRefresh": false |
| 524 | } | 502 | } |
| 525 | 503 | ||
| 526 | },{ | 504 | }, { |
| 527 | "path": "vipList", | 505 | "path": "vipList", |
| 528 | "style": { | 506 | "style": { |
| 529 | "navigationBarTitleText": "会员列表", | 507 | "navigationBarTitleText": "会员列表", |
| ... | @@ -531,56 +509,51 @@ | ... | @@ -531,56 +509,51 @@ |
| 531 | } | 509 | } |
| 532 | }, | 510 | }, |
| 533 | { | 511 | { |
| 534 | "path" : "changeGroupInfo", | 512 | "path": "changeGroupInfo", |
| 535 | "style" : | 513 | "style": { |
| 536 | { | 514 | "navigationBarTitleText": "团体会员信息修改", |
| 537 | "navigationBarTitleText" : "团体会员信息修改", | 515 | "enablePullDownRefresh": false |
| 538 | "enablePullDownRefresh" : false | ||
| 539 | } | 516 | } |
| 540 | }, | 517 | }, |
| 541 | { | 518 | { |
| 542 | "path" : "changeGroupAudit", | 519 | "path": "changeGroupAudit", |
| 543 | "style" : | 520 | "style": { |
| 544 | { | 521 | "navigationBarTitleText": "团体信息变更审核", |
| 545 | "navigationBarTitleText" : "团体信息变更审核", | 522 | "enablePullDownRefresh": false |
| 546 | "enablePullDownRefresh" : false | ||
| 547 | } | 523 | } |
| 548 | }, | 524 | }, |
| 549 | { | 525 | { |
| 550 | "path" : "changeGroupDetail", | 526 | "path": "changeGroupDetail", |
| 551 | "style" : | 527 | "style": { |
| 552 | { | 528 | "navigationBarTitleText": "团体信息变更详情", |
| 553 | "navigationBarTitleText" : "团体信息变更详情", | 529 | "enablePullDownRefresh": false |
| 554 | "enablePullDownRefresh" : false | ||
| 555 | } | 530 | } |
| 556 | }, | 531 | }, |
| 557 | { | 532 | { |
| 558 | "path" : "newChange", | 533 | "path": "newChange", |
| 559 | "style" : | 534 | "style": { |
| 560 | { | 535 | "navigationBarTitleText": "新建团体信息变更", |
| 561 | "navigationBarTitleText" : "新建团体信息变更", | 536 | "enablePullDownRefresh": false |
| 562 | "enablePullDownRefresh" : false | ||
| 563 | } | 537 | } |
| 564 | }, | 538 | }, |
| 565 | { | 539 | { |
| 566 | "path" : "groupInfo", | 540 | "path": "groupInfo", |
| 567 | "style" : | 541 | "style": { |
| 568 | { | 542 | "navigationBarTitleText": "机构资料", |
| 569 | "navigationBarTitleText" : "机构资料", | 543 | "enablePullDownRefresh": false |
| 570 | "enablePullDownRefresh" : false | ||
| 571 | } | 544 | } |
| 572 | }, | 545 | }, |
| 573 | { | 546 | { |
| 574 | "path" : "changeGroupChoseList", | 547 | "path": "changeGroupChoseList", |
| 575 | "style" : | 548 | "style": { |
| 576 | { | 549 | "navigationBarTitleText": "在线选择", |
| 577 | "navigationBarTitleText" : "在线选择", | 550 | "enablePullDownRefresh": false |
| 578 | "enablePullDownRefresh" : false | ||
| 579 | } | 551 | } |
| 580 | }] | 552 | } |
| 581 | },{ | 553 | ] |
| 554 | }, { | ||
| 582 | "root": "level", | 555 | "root": "level", |
| 583 | "pages":[{ | 556 | "pages": [{ |
| 584 | "path": "ztx/examList", | 557 | "path": "ztx/examList", |
| 585 | "style": { | 558 | "style": { |
| 586 | "navigationBarTitleText": "级位考试详情", | 559 | "navigationBarTitleText": "级位考试详情", |
| ... | @@ -601,7 +574,7 @@ | ... | @@ -601,7 +574,7 @@ |
| 601 | "enablePullDownRefresh": false | 574 | "enablePullDownRefresh": false |
| 602 | } | 575 | } |
| 603 | 576 | ||
| 604 | },{ | 577 | }, { |
| 605 | "path": "apply", | 578 | "path": "apply", |
| 606 | "style": { | 579 | "style": { |
| 607 | "navigationBarTitleText": "级位考试申请", | 580 | "navigationBarTitleText": "级位考试申请", |
| ... | @@ -678,104 +651,94 @@ | ... | @@ -678,104 +651,94 @@ |
| 678 | "navigationBarTitleText": "考生信息", | 651 | "navigationBarTitleText": "考生信息", |
| 679 | "enablePullDownRefresh": false | 652 | "enablePullDownRefresh": false |
| 680 | } | 653 | } |
| 681 | }] | 654 | } |
| 682 | },{ | 655 | ] |
| 656 | }, { | ||
| 683 | "root": "myCenter", | 657 | "root": "myCenter", |
| 684 | "pages": [ | 658 | "pages": [{ |
| 685 | { | 659 | "path": "index", |
| 686 | "path" : "index", | 660 | "style": { |
| 687 | "style" : | 661 | "navigationBarTitleText": "个人中心", |
| 688 | { | 662 | "enablePullDownRefresh": false |
| 689 | "navigationBarTitleText" : "个人中心", | ||
| 690 | "enablePullDownRefresh" : false | ||
| 691 | } | 663 | } |
| 692 | }, | 664 | }, |
| 693 | { | 665 | { |
| 694 | "path" : "teamInfo", | 666 | "path": "teamInfo", |
| 695 | "style" : | 667 | "style": { |
| 696 | { | 668 | "navigationBarTitleText": "团体信息", |
| 697 | "navigationBarTitleText" : "团体信息", | 669 | "enablePullDownRefresh": false |
| 698 | "enablePullDownRefresh" : false | ||
| 699 | } | 670 | } |
| 700 | }, | 671 | }, |
| 701 | { | 672 | { |
| 702 | "path" : "auth", | 673 | "path": "auth", |
| 703 | "style" : | 674 | "style": { |
| 704 | { | 675 | "navigationBarTitleText": "会员认证", |
| 705 | "navigationBarTitleText" : "会员认证", | 676 | "enablePullDownRefresh": false |
| 706 | "enablePullDownRefresh" : false | ||
| 707 | } | 677 | } |
| 708 | }, | 678 | }, |
| 709 | { | 679 | { |
| 710 | "path" : "safe", | 680 | "path": "safe", |
| 711 | "style" : | 681 | "style": { |
| 712 | { | 682 | "navigationBarTitleText": "账号与安全", |
| 713 | "navigationBarTitleText" : "账号与安全", | 683 | "enablePullDownRefresh": false |
| 714 | "enablePullDownRefresh" : false | ||
| 715 | } | 684 | } |
| 716 | }, | 685 | }, |
| 717 | { | 686 | { |
| 718 | "path" : "reviewList", | 687 | "path": "reviewList", |
| 719 | "style" : | 688 | "style": { |
| 720 | { | 689 | "navigationBarTitleText": "审核详情", |
| 721 | "navigationBarTitleText" : "审核详情", | 690 | "enablePullDownRefresh": false |
| 722 | "enablePullDownRefresh" : false | ||
| 723 | } | 691 | } |
| 724 | }, | 692 | }, |
| 725 | { | 693 | { |
| 726 | "path" : "perfect", | 694 | "path": "perfect", |
| 727 | "style" : | 695 | "style": { |
| 728 | { | 696 | "navigationBarTitleText": "团体会员缴费", |
| 729 | "navigationBarTitleText" : "团体会员缴费", | 697 | "enablePullDownRefresh": false |
| 730 | "enablePullDownRefresh" : false | ||
| 731 | } | 698 | } |
| 732 | }, | 699 | }, |
| 733 | { | 700 | { |
| 734 | "path" : "goPay", | 701 | "path": "goPay", |
| 735 | "style" : | 702 | "style": { |
| 736 | { | 703 | "navigationBarTitleText": "付款详情", |
| 737 | "navigationBarTitleText" : "付款详情", | 704 | "enablePullDownRefresh": false |
| 738 | "enablePullDownRefresh" : false | ||
| 739 | } | 705 | } |
| 740 | }, | 706 | }, |
| 741 | { | 707 | { |
| 742 | "path" : "examPointApply", | 708 | "path": "examPointApply", |
| 743 | "style" : | 709 | "style": { |
| 744 | { | 710 | "navigationBarTitleText": "申请考点", |
| 745 | "navigationBarTitleText" : "申请考点", | 711 | "enablePullDownRefresh": false |
| 746 | "enablePullDownRefresh" : false | ||
| 747 | } | 712 | } |
| 748 | }, | 713 | }, |
| 749 | { | 714 | { |
| 750 | "path" : "chooseExaminer", | 715 | "path": "chooseExaminer", |
| 751 | "style" : | 716 | "style": { |
| 752 | { | 717 | "navigationBarTitleText": "选择考官", |
| 753 | "navigationBarTitleText" : "选择考官", | 718 | "enablePullDownRefresh": false |
| 754 | "enablePullDownRefresh" : false | ||
| 755 | } | 719 | } |
| 756 | }, | 720 | }, |
| 757 | { | 721 | { |
| 758 | "path" : "sucPay", | 722 | "path": "sucPay", |
| 759 | "style" : | 723 | "style": { |
| 760 | { | 724 | "navigationBarTitleText": "支付成功", |
| 761 | "navigationBarTitleText" : "支付成功", | 725 | "enablePullDownRefresh": false |
| 762 | "enablePullDownRefresh" : false | ||
| 763 | } | 726 | } |
| 764 | }, | 727 | }, |
| 765 | { | 728 | { |
| 766 | "path" : "payOrder", | 729 | "path": "payOrder", |
| 767 | "style" : | 730 | "style": { |
| 768 | { | 731 | "navigationBarTitleText": "支付详情", |
| 769 | "navigationBarTitleText" : "支付详情", | 732 | "enablePullDownRefresh": false |
| 770 | "enablePullDownRefresh" : false | ||
| 771 | } | 733 | } |
| 772 | } | 734 | } |
| 773 | ] | 735 | ] |
| 774 | }], | 736 | } |
| 737 | ], | ||
| 775 | "preloadRule": { | 738 | "preloadRule": { |
| 776 | "pages/index/index": { | 739 | "pages/index/index": { |
| 777 | "network": "all", | 740 | "network": "all", |
| 778 | "packages": ["login","personalVip", "group","level","myCenter","personal"] | 741 | "packages": ["login", "personalVip", "group", "level", "myCenter", "personal"] |
| 779 | } | 742 | } |
| 780 | } | 743 | } |
| 781 | } | 744 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
pages/index/home.vue
0 → 100644
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -10,7 +10,8 @@ | ... | @@ -10,7 +10,8 @@ |
| 10 | <view v-html="form.content"></view> | 10 | <view v-html="form.content"></view> |
| 11 | 11 | ||
| 12 | <view v-if="attachmentMp4.length>0"> | 12 | <view v-if="attachmentMp4.length>0"> |
| 13 | <video v-for="(f,index) in attachmentMp4" :key="index" controls :src="config.baseUrl_api + f.url"></video> | 13 | <video v-for="(f,index) in attachmentMp4" :key="index" controls |
| 14 | :src="config.baseUrl_api + f.url"></video> | ||
| 14 | </view> | 15 | </view> |
| 15 | <view v-if="attachmentFile.length>0" class="mt20"> | 16 | <view v-if="attachmentFile.length>0" class="mt20"> |
| 16 | <!-- 附件--> | 17 | <!-- 附件--> |
| ... | @@ -39,8 +40,8 @@ | ... | @@ -39,8 +40,8 @@ |
| 39 | import _ from 'underscore' | 40 | import _ from 'underscore' |
| 40 | import config from '@/config.js' | 41 | import config from '@/config.js' |
| 41 | const form = ref({}) | 42 | const form = ref({}) |
| 42 | const attachmentFile = ref([]) | 43 | const attachmentFile = ref([]) |
| 43 | const attachmentMp4 = ref([]) | 44 | const attachmentMp4 = ref([]) |
| 44 | 45 | ||
| 45 | onLoad((option) => { | 46 | onLoad((option) => { |
| 46 | getData(option.noteId) | 47 | getData(option.noteId) |
| ... | @@ -58,15 +59,17 @@ const attachmentMp4 = ref([]) | ... | @@ -58,15 +59,17 @@ const attachmentMp4 = ref([]) |
| 58 | 59 | ||
| 59 | if (form.value.attacthJson) { | 60 | if (form.value.attacthJson) { |
| 60 | const attachment = JSON.parse(form.value.attacthJson) | 61 | const attachment = JSON.parse(form.value.attacthJson) |
| 61 | attachmentFile.value = _.filter(attachment, (a) => a.url.toLowerCase().indexOf('.mp4') === -1) || [] | 62 | attachmentFile.value = _.filter(attachment, (a) => a.url.toLowerCase().indexOf('.mp4') === -1) || |
| 63 | [] | ||
| 62 | attachmentMp4.value = _.filter(attachment, (a) => a.url.toLowerCase().indexOf('.mp4') !== -1) || [] | 64 | attachmentMp4.value = _.filter(attachment, (a) => a.url.toLowerCase().indexOf('.mp4') !== -1) || [] |
| 63 | } | 65 | } |
| 64 | }) | 66 | }) |
| 65 | } | 67 | } |
| 66 | function downLoad(url){ | 68 | |
| 69 | function downLoad(url) { | ||
| 67 | console.log(url) | 70 | console.log(url) |
| 68 | var str = config.baseUrl_api + url | 71 | var str = config.baseUrl_api + url |
| 69 | if (url.indexOf('png') > -1 ||url.indexOf('jpg') > -1 ||url.indexOf('jpeg') > -1) { | 72 | if (url.indexOf('png') > -1 || url.indexOf('jpg') > -1 || url.indexOf('jpeg') > -1) { |
| 70 | uni.previewImage({ | 73 | uni.previewImage({ |
| 71 | urls: [str], | 74 | urls: [str], |
| 72 | success: function(res) { | 75 | success: function(res) { |
| ... | @@ -83,6 +86,7 @@ const attachmentMp4 = ref([]) | ... | @@ -83,6 +86,7 @@ const attachmentMp4 = ref([]) |
| 83 | goWebView(str) | 86 | goWebView(str) |
| 84 | } | 87 | } |
| 85 | } | 88 | } |
| 89 | |||
| 86 | function goWebView(url) { | 90 | function goWebView(url) { |
| 87 | url = url.replace("http://", "https://") | 91 | url = url.replace("http://", "https://") |
| 88 | uni.showLoading({ | 92 | uni.showLoading({ |
| ... | @@ -91,7 +95,6 @@ const attachmentMp4 = ref([]) | ... | @@ -91,7 +95,6 @@ const attachmentMp4 = ref([]) |
| 91 | uni.downloadFile({ | 95 | uni.downloadFile({ |
| 92 | url: url, | 96 | url: url, |
| 93 | success: function(res) { | 97 | success: function(res) { |
| 94 | console.log('111') | ||
| 95 | uni.hideLoading(); | 98 | uni.hideLoading(); |
| 96 | var filePath = res.tempFilePath; | 99 | var filePath = res.tempFilePath; |
| 97 | uni.showLoading({ | 100 | uni.showLoading({ |
| ... | @@ -101,14 +104,13 @@ const attachmentMp4 = ref([]) | ... | @@ -101,14 +104,13 @@ const attachmentMp4 = ref([]) |
| 101 | filePath: filePath, | 104 | filePath: filePath, |
| 102 | showMenu: true, | 105 | showMenu: true, |
| 103 | success: function(res) { | 106 | success: function(res) { |
| 104 | console.log('222') | ||
| 105 | uni.hideLoading(); | 107 | uni.hideLoading(); |
| 106 | }, | 108 | }, |
| 107 | fail: function(err) { | 109 | fail: function(err) { |
| 108 | console.log(err.errMsg) | 110 | console.log(err.errMsg) |
| 109 | uni.hideLoading(); | 111 | uni.hideLoading(); |
| 110 | let msg | 112 | let msg |
| 111 | if(err.errMsg.indexOf('not supported')>-1){ | 113 | if (err.errMsg.indexOf('not supported') > -1) { |
| 112 | msg = '不支持该文件类型' | 114 | msg = '不支持该文件类型' |
| 113 | } else { | 115 | } else { |
| 114 | msg = err.errMsg | 116 | msg = err.errMsg |
| ... | @@ -140,6 +142,7 @@ const attachmentMp4 = ref([]) | ... | @@ -140,6 +142,7 @@ const attachmentMp4 = ref([]) |
| 140 | background: #fff; | 142 | background: #fff; |
| 141 | min-height: 100vh; | 143 | min-height: 100vh; |
| 142 | } | 144 | } |
| 145 | |||
| 143 | .title { | 146 | .title { |
| 144 | font-size: 36rpx; | 147 | font-size: 36rpx; |
| 145 | font-weight: 500; | 148 | font-weight: 500; |
| ... | @@ -158,6 +161,7 @@ const attachmentMp4 = ref([]) | ... | @@ -158,6 +161,7 @@ const attachmentMp4 = ref([]) |
| 158 | color: #7B7F83; | 161 | color: #7B7F83; |
| 159 | font-size: 22rpx; | 162 | font-size: 22rpx; |
| 160 | } | 163 | } |
| 164 | |||
| 161 | .content { | 165 | .content { |
| 162 | line-height: 1.6; | 166 | line-height: 1.6; |
| 163 | color: #4C5359; | 167 | color: #4C5359; |
| ... | @@ -178,7 +182,10 @@ const attachmentMp4 = ref([]) | ... | @@ -178,7 +182,10 @@ const attachmentMp4 = ref([]) |
| 178 | word-wrap: break-word !important; | 182 | word-wrap: break-word !important; |
| 179 | white-space: normal !important; | 183 | white-space: normal !important; |
| 180 | } | 184 | } |
| 181 | .content rich-text img{max-width: 100%;} | 185 | |
| 186 | .content rich-text img { | ||
| 187 | max-width: 100%; | ||
| 188 | } | ||
| 182 | 189 | ||
| 183 | image { | 190 | image { |
| 184 | max-width: 100%; | 191 | max-width: 100%; | ... | ... |
| ... | @@ -138,10 +138,10 @@ | ... | @@ -138,10 +138,10 @@ |
| 138 | if (orderErr) { | 138 | if (orderErr) { |
| 139 | uni.hideLoading() | 139 | uni.hideLoading() |
| 140 | isPaying.value = false | 140 | isPaying.value = false |
| 141 | uni.showToast({ | 141 | // uni.showToast({ |
| 142 | title: '创建订单失败', | 142 | // title: '创建订单失败', |
| 143 | icon: 'none' | 143 | // icon: 'none' |
| 144 | }) | 144 | // }) |
| 145 | return | 145 | return |
| 146 | } | 146 | } |
| 147 | 147 | ||
| ... | @@ -161,7 +161,7 @@ | ... | @@ -161,7 +161,7 @@ |
| 161 | isPaying.value = false | 161 | isPaying.value = false |
| 162 | 162 | ||
| 163 | // 支付成功,跳转页面 | 163 | // 支付成功,跳转页面 |
| 164 | uni.navigateTo({ | 164 | uni.redirectTo({ |
| 165 | url: `/personal/sucPay?orderId=${orderRes.data.orderId}` | 165 | url: `/personal/sucPay?orderId=${orderRes.data.orderId}` |
| 166 | }) | 166 | }) |
| 167 | } | 167 | } | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view class="page-container"> | 2 | <view class="page-container"> |
| 3 | <view class="top-section"> | 3 | <!-- 会员卡区域 --> |
| 4 | <view class="member-card"> | ||
| 5 | <image class="card-bg" :src="config.baseUrl_api + '/fs/static/slices/user_01@2x.png'" mode="aspectFill"> | ||
| 6 | </image> | ||
| 7 | |||
| 8 | <!-- 绑定/解绑学员 --> | ||
| 9 | <view v-if="!isBound" class="bind-student" @click="handleBindAction"> | ||
| 10 | <text>{{ isBound ? '解绑' : '绑定学员' }}</text> | ||
| 11 | <image class="arrow-icon" :src="config.baseUrl_api + '/fs/static/slices/bd@2x.png'" mode="aspectFit"> | ||
| 12 | </image> | ||
| 13 | </view> | ||
| 14 | |||
| 4 | <!-- 用户信息 --> | 15 | <!-- 用户信息 --> |
| 5 | <view class="user-info"> | 16 | <view class="user-section"> |
| 6 | <view class="avatar"> | 17 | <view class="user-top"> |
| 7 | <view class="avatar-placeholder">📄</view> | 18 | <view class="avatar-wrap"> |
| 19 | <image class="avatar" :src="config.baseUrl_api + '/fs/static/slices/tx@2x.png'" | ||
| 20 | mode="aspectFill"> | ||
| 21 | </image> | ||
| 8 | </view> | 22 | </view> |
| 9 | <view class="user-desc">注册会员8709745760778985472</view> | 23 | <view class="member-id">{{ userInfo.userName }}</view> |
| 10 | </view> | 24 | </view> |
| 11 | 25 | <view class="user-bottom"> | |
| 12 | <!-- 会员卡片 --> | 26 | <view class="user-name">{{ perInfo?.perName }}</view> |
| 13 | <view class="member-card"> | 27 | <view class="card-info"> |
| 14 | <view class="card-header"> | 28 | <view class="info-row">会员卡号:{{ perInfo?.perCode }}</view> |
| 15 | <view class="card-name">江行知</view> | 29 | <view class="info-row">会员有效期:{{ perInfo?.perValidDate }}</view> |
| 16 | <view class="bind-btn">绑定学员 ⇄</view> | ||
| 17 | </view> | 30 | </view> |
| 18 | <view class="card-id">证件号:360681201804040811</view> | ||
| 19 | |||
| 20 | <view class="card-func"> | ||
| 21 | <view class="func-item" @click="goToInfo"> | ||
| 22 | <view class="func-icon">⿱</view> | ||
| 23 | <view class="func-text">人员信息</view> | ||
| 24 | </view> | 31 | </view> |
| 25 | <view class="func-item"> | ||
| 26 | <view class="func-icon">✓</view> | ||
| 27 | <view class="func-text">参赛能力认证</view> | ||
| 28 | </view> | 32 | </view> |
| 29 | <view class="func-item"> | 33 | |
| 30 | <view class="func-icon">🏆</view> | 34 | <!-- 已过期印章 --> |
| 31 | <view class="func-text">成绩查询</view> | 35 | <image v-if="perInfo?.perValidDateFlag && perInfo?.perValidDateFlag!='1'" class="expired-stamp" |
| 36 | :src="config.baseUrl_api + '/fs/static/slices/end@2x.png'" mode="aspectFit"> | ||
| 37 | </image> | ||
| 32 | </view> | 38 | </view> |
| 33 | <view class="func-item"> | 39 | |
| 34 | <view class="func-icon">↻</view> | 40 | <!-- 功能按钮卡片 --> |
| 35 | <view class="func-text">参赛记录</view> | 41 | <view class="func-card"> |
| 42 | <view class="func-list"> | ||
| 43 | <view class="func-item" @click="goToAuth"> | ||
| 44 | <image class="func-icon" :src="config.baseUrl_api + '/fs/static/slices/btn01@2x.png'" | ||
| 45 | mode="aspectFit"> | ||
| 46 | </image> | ||
| 47 | <text class="func-text">参赛能力认证</text> | ||
| 36 | </view> | 48 | </view> |
| 49 | <view class="func-item" @click="goToScore"> | ||
| 50 | <image class="func-icon" :src="config.baseUrl_api + '/fs/static/slices/btn02@2x.png'" | ||
| 51 | mode="aspectFit"> | ||
| 52 | </image> | ||
| 53 | <text class="func-text">成绩查询</text> | ||
| 37 | </view> | 54 | </view> |
| 55 | <view class="func-item" @click="goToRecord"> | ||
| 56 | <image class="func-icon" :src="config.baseUrl_api + '/fs/static/slices/btn03@2x.png'" | ||
| 57 | mode="aspectFit"> | ||
| 58 | </image> | ||
| 59 | <text class="func-text">参赛记录</text> | ||
| 38 | </view> | 60 | </view> |
| 39 | </view> | 61 | </view> |
| 40 | |||
| 41 | <view class="bottom-section"> | ||
| 42 | <view class="info-title"> | ||
| 43 | <view class="title-line"></view> | ||
| 44 | <text>人员信息</text> | ||
| 45 | </view> | 62 | </view> |
| 46 | 63 | ||
| 47 | <view class="info-list"> | 64 | <!-- 人员信息区域 --> |
| 48 | <view class="info-item"> | 65 | <view class="info-section"> |
| 49 | <view class="item-label">姓名</view> | 66 | <view class="section-title"> |
| 50 | <view class="item-value">江行知</view> | 67 | <view class="title-bar"></view> |
| 68 | <text class="title-text">人员信息</text> | ||
| 51 | </view> | 69 | </view> |
| 70 | <view class="info-card"> | ||
| 52 | <view class="info-item"> | 71 | <view class="info-item"> |
| 53 | <view class="item-label">国籍</view> | 72 | <text class="item-label">姓名</text> |
| 54 | <view class="item-value">中国</view> | 73 | <text class="item-value">{{ perInfo?.perName }}</text> |
| 55 | </view> | 74 | </view> |
| 56 | <view class="info-item"> | 75 | <view class="info-item"> |
| 57 | <view class="item-label">证件类型</view> | 76 | <text class="item-label">证件类型</text> |
| 58 | <view class="item-value">身份证</view> | 77 | <text class="item-value">{{ perInfo?.idcTypeStr }}</text> |
| 59 | </view> | 78 | </view> |
| 60 | <view class="info-item"> | 79 | <view class="info-item"> |
| 61 | <view class="item-label">身份证号</view> | 80 | <text class="item-label">身份证号</text> |
| 62 | <view class="item-value">360681201804040811</view> | 81 | <text class="item-value">{{ perInfo?.perIdcCode }}</text> |
| 63 | </view> | 82 | </view> |
| 64 | <view class="info-item"> | 83 | <view class="info-item"> |
| 65 | <view class="item-label">生日</view> | 84 | <text class="item-label">生日</text> |
| 66 | <view class="item-value">2018-04-04</view> | 85 | <text class="item-value">{{ perInfo?.birth }}</text> |
| 67 | </view> | 86 | </view> |
| 68 | </view> | 87 | </view> |
| 69 | </view> | 88 | </view> |
| 89 | |||
| 90 | <!-- 退出登录按钮 --> | ||
| 91 | <view class="logout-section"> | ||
| 92 | <view class="logout-btn" @click="handleLogout">退出登录</view> | ||
| 93 | </view> | ||
| 94 | |||
| 95 | <!-- 绑定学员弹框 --> | ||
| 96 | <uni-popup ref="bindPopup" type="center" :mask-click="false"> | ||
| 97 | <view class="bind-popup"> | ||
| 98 | <view class="popup-title">绑定学员</view> | ||
| 99 | <view class="popup-content"> | ||
| 100 | <view class="form-item"> | ||
| 101 | <view class="form-label">姓名</view> | ||
| 102 | <view class="form-input"> | ||
| 103 | <input v-model="bindForm.name" placeholder="请输入姓名" placeholder-class="placeholder-class" /> | ||
| 104 | </view> | ||
| 105 | </view> | ||
| 106 | <view class="form-item"> | ||
| 107 | <view class="form-label">证件号</view> | ||
| 108 | <view class="form-input"> | ||
| 109 | <input v-model="bindForm.idcCode" placeholder="请输入证件号" | ||
| 110 | placeholder-class="placeholder-class" /> | ||
| 111 | </view> | ||
| 112 | </view> | ||
| 113 | </view> | ||
| 114 | <view class="popup-btns"> | ||
| 115 | <view class="popup-btn cancel" @click="closeBindPopup">取消</view> | ||
| 116 | <view class="popup-btn confirm" @click="confirmBind">确定</view> | ||
| 117 | </view> | ||
| 118 | </view> | ||
| 119 | </uni-popup> | ||
| 70 | </view> | 120 | </view> |
| 71 | </template> | 121 | </template> |
| 72 | 122 | ||
| 73 | <script setup> | 123 | <script setup> |
| 74 | import { ref } from 'vue' | 124 | import { |
| 75 | 125 | computed, | |
| 76 | const userInfo = ref({ | 126 | onMounted, |
| 77 | memberNo: '8709745760778985472', | 127 | ref, |
| 78 | name: '江行知', | 128 | watch, |
| 79 | idCard: '360681201804040811', | 129 | nextTick |
| 80 | nationality: '中国', | 130 | } from "vue"; |
| 81 | idType: '身份证', | 131 | import config from "/config.js"; |
| 82 | birthday: '2018-04-04' | 132 | import { |
| 83 | }) | 133 | wxLogin, |
| 84 | 134 | logout, | |
| 85 | const goToInfo = () => { | 135 | getWebInfo |
| 86 | console.log('跳转到人员信息页') | 136 | } from '@/common/login.js'; |
| 87 | } | 137 | import { |
| 138 | useUserStore | ||
| 139 | } from "../store/modules/user"; | ||
| 140 | import to from 'await-to-js' | ||
| 141 | import { | ||
| 142 | bindUser, | ||
| 143 | unbindUser | ||
| 144 | } from '@/common/api.js' | ||
| 145 | |||
| 146 | const userStore = useUserStore() | ||
| 147 | const userInfo = computed(() => userStore.user) | ||
| 148 | const perInfo = computed(() => userStore.perInfo) | ||
| 149 | |||
| 150 | // 是否已绑定学员 | ||
| 151 | const isBound = computed(() => { | ||
| 152 | const perId = userInfo.value?.perId | ||
| 153 | return perId !== undefined && perId !== null && perId !== 0 | ||
| 154 | }) | ||
| 155 | |||
| 156 | const bindPopup = ref(null) | ||
| 157 | const bindForm = ref({ | ||
| 158 | name: '', | ||
| 159 | idcCode: '' | ||
| 160 | }) | ||
| 161 | |||
| 162 | onMounted(() => { | ||
| 163 | let webUserName = uni.getStorageSync('webUserName') | ||
| 164 | if (!webUserName) { | ||
| 165 | wxLogin() | ||
| 166 | } | ||
| 167 | }) | ||
| 168 | |||
| 169 | watch(() => userInfo.value.perId, (val) => { | ||
| 170 | if (val !== undefined && val == 0) { | ||
| 171 | nextTick(() => { | ||
| 172 | openBindPopup() | ||
| 173 | }) | ||
| 174 | } | ||
| 175 | }, { | ||
| 176 | immediate: true | ||
| 177 | }) | ||
| 178 | |||
| 179 | // 打开绑定弹框 | ||
| 180 | const openBindPopup = () => { | ||
| 181 | if (bindPopup.value) { | ||
| 182 | bindForm.value = { | ||
| 183 | name: '', | ||
| 184 | idcCode: '' | ||
| 185 | } | ||
| 186 | bindPopup.value.open() | ||
| 187 | } else { | ||
| 188 | nextTick(() => { | ||
| 189 | openBindPopup() | ||
| 190 | }) | ||
| 191 | } | ||
| 192 | } | ||
| 193 | |||
| 194 | // 关闭绑定弹框 | ||
| 195 | const closeBindPopup = () => { | ||
| 196 | bindPopup.value?.close() | ||
| 197 | } | ||
| 198 | |||
| 199 | // 处理绑定/解绑操作 | ||
| 200 | const handleBindAction = () => { | ||
| 201 | if (isBound.value) { | ||
| 202 | // 已绑定,执行解绑 | ||
| 203 | uni.showModal({ | ||
| 204 | content: '确认解绑吗?', | ||
| 205 | success: async (res) => { | ||
| 206 | if (res.confirm) { | ||
| 207 | uni.showLoading({ | ||
| 208 | title: '解绑中...', | ||
| 209 | mask: true | ||
| 210 | }) | ||
| 211 | const [err] = await to(unbindUser()) | ||
| 212 | uni.hideLoading() | ||
| 213 | if (err) return | ||
| 214 | uni.showToast({ | ||
| 215 | title: '解绑成功', | ||
| 216 | icon: 'success' | ||
| 217 | }) | ||
| 218 | // 刷新用户信息 | ||
| 219 | getWebInfo() | ||
| 220 | } | ||
| 221 | } | ||
| 222 | }) | ||
| 223 | } else { | ||
| 224 | // 未绑定,打开绑定弹框 | ||
| 225 | openBindPopup() | ||
| 226 | } | ||
| 227 | } | ||
| 228 | |||
| 229 | // 确认绑定 | ||
| 230 | const confirmBind = async () => { | ||
| 231 | if (!bindForm.value.name) { | ||
| 232 | uni.showToast({ | ||
| 233 | title: '请输入姓名', | ||
| 234 | icon: 'none' | ||
| 235 | }) | ||
| 236 | return | ||
| 237 | } | ||
| 238 | if (!bindForm.value.idcCode) { | ||
| 239 | uni.showToast({ | ||
| 240 | title: '请输入证件号', | ||
| 241 | icon: 'none' | ||
| 242 | }) | ||
| 243 | return | ||
| 244 | } | ||
| 245 | |||
| 246 | uni.showLoading({ | ||
| 247 | title: '绑定中...', | ||
| 248 | mask: true | ||
| 249 | }) | ||
| 250 | |||
| 251 | const [err, res] = await to(bindUser({ | ||
| 252 | name: bindForm.value.name, | ||
| 253 | idcCode: bindForm.value.idcCode | ||
| 254 | })) | ||
| 255 | uni.hideLoading() | ||
| 256 | |||
| 257 | if (err) { | ||
| 258 | // uni.showToast({ | ||
| 259 | // title: '绑定失败', | ||
| 260 | // icon: 'none' | ||
| 261 | // }) | ||
| 262 | return | ||
| 263 | } | ||
| 264 | |||
| 265 | uni.showToast({ | ||
| 266 | title: '绑定成功', | ||
| 267 | icon: 'success' | ||
| 268 | }) | ||
| 269 | closeBindPopup() | ||
| 270 | // 刷新用户信息 | ||
| 271 | getWebInfo() | ||
| 272 | } | ||
| 273 | |||
| 274 | const goToAuth = () => { | ||
| 275 | console.log("参赛能力认证"); | ||
| 276 | }; | ||
| 277 | |||
| 278 | const goToScore = () => { | ||
| 279 | console.log("成绩查询"); | ||
| 280 | }; | ||
| 281 | |||
| 282 | const goToRecord = () => { | ||
| 283 | console.log("参赛记录"); | ||
| 284 | }; | ||
| 285 | |||
| 286 | // 退出登录 | ||
| 287 | const handleLogout = () => { | ||
| 288 | uni.showModal({ | ||
| 289 | content: `确认退出吗?`, | ||
| 290 | success: function(res) { | ||
| 291 | if (res.confirm) { | ||
| 292 | logout().then(() => { | ||
| 293 | uni.reLaunch({ | ||
| 294 | url: '/login/login' | ||
| 295 | }) | ||
| 296 | }) | ||
| 297 | } | ||
| 298 | } | ||
| 299 | }) | ||
| 300 | } | ||
| 88 | </script> | 301 | </script> |
| 89 | 302 | ||
| 90 | <style lang="scss" scoped> | 303 | <style lang="scss" scoped> |
| 91 | .page-container { | 304 | .page-container { |
| 92 | min-height: 100vh; | 305 | min-height: 100vh; |
| 93 | background: linear-gradient(180deg, #FFF9E8 0%, #FFFFFF 100%); | 306 | background: #f5f5f5; |
| 94 | padding: 0 30rpx; | 307 | padding-bottom: 40rpx; |
| 95 | box-sizing: border-box; | 308 | } |
| 96 | } | ||
| 97 | |||
| 98 | .top-section { | ||
| 99 | padding-top: 40rpx; | ||
| 100 | } | ||
| 101 | 309 | ||
| 102 | .header { | 310 | /* 会员卡 */ |
| 103 | display: flex; | 311 | .member-card { |
| 104 | justify-content: space-between; | 312 | position: relative; |
| 105 | align-items: center; | 313 | height: 450rpx; |
| 106 | margin-bottom: 40rpx; | 314 | border-radius: 0; |
| 107 | } | 315 | overflow: hidden; |
| 316 | } | ||
| 108 | 317 | ||
| 109 | .title { | 318 | .card-bg { |
| 110 | font-size: 36rpx; | ||
| 111 | font-weight: 500; | ||
| 112 | color: #333; | ||
| 113 | margin: 0 auto; | ||
| 114 | position: absolute; | 319 | position: absolute; |
| 115 | left: 50%; | 320 | top: 0; |
| 116 | transform: translateX(-50%); | 321 | left: 0; |
| 117 | } | 322 | width: 100%; |
| 323 | height: 100%; | ||
| 324 | z-index: 0; | ||
| 325 | } | ||
| 118 | 326 | ||
| 119 | .more-btn { | 327 | .bind-student { |
| 328 | position: absolute; | ||
| 329 | top: 30rpx; | ||
| 330 | right: 30rpx; | ||
| 120 | display: flex; | 331 | display: flex; |
| 121 | align-items: center; | 332 | align-items: center; |
| 122 | gap: 20rpx; | 333 | gap: 8rpx; |
| 123 | margin-left: auto; | 334 | z-index: 10; |
| 124 | background: #FFFFFF; | 335 | padding: 10rpx 16rpx; |
| 125 | padding: 10rpx 20rpx; | 336 | background: rgba(255, 255, 255, 0.5); |
| 126 | border-radius: 40rpx; | 337 | border-radius: 30rpx; |
| 127 | } | 338 | } |
| 128 | 339 | ||
| 129 | .dots { | 340 | .bind-student text { |
| 130 | font-size: 32rpx; | 341 | font-size: 26rpx; |
| 131 | color: #666; | 342 | color: #8b7355; |
| 132 | line-height: 1; | 343 | } |
| 133 | } | ||
| 134 | 344 | ||
| 135 | .circle { | 345 | .arrow-icon { |
| 136 | width: 40rpx; | 346 | width: 28rpx; |
| 137 | height: 40rpx; | 347 | height: 28rpx; |
| 138 | border-radius: 50%; | 348 | } |
| 139 | border: 2rpx solid #666; | 349 | |
| 350 | .user-section { | ||
| 140 | position: relative; | 351 | position: relative; |
| 141 | &::after { | 352 | z-index: 1; |
| 142 | content: ''; | 353 | padding: 50rpx 30rpx 0; |
| 143 | position: absolute; | ||
| 144 | top: 50%; | ||
| 145 | left: 50%; | ||
| 146 | transform: translate(-50%, -50%); | ||
| 147 | width: 16rpx; | ||
| 148 | height: 16rpx; | ||
| 149 | border-radius: 50%; | ||
| 150 | background: #666; | ||
| 151 | } | 354 | } |
| 152 | } | ||
| 153 | 355 | ||
| 154 | .user-info { | 356 | .user-top { |
| 155 | display: flex; | 357 | display: flex; |
| 156 | align-items: center; | 358 | align-items: center; |
| 157 | gap: 30rpx; | 359 | gap: 20rpx; |
| 158 | margin-bottom: 40rpx; | 360 | margin-bottom: 20rpx; |
| 159 | } | 361 | } |
| 160 | 362 | ||
| 161 | .avatar { | 363 | .avatar-wrap { |
| 162 | width: 120rpx; | 364 | flex-shrink: 0; |
| 163 | height: 120rpx; | 365 | } |
| 164 | border-radius: 50%; | ||
| 165 | background: #F5F5F5; | ||
| 166 | display: flex; | ||
| 167 | align-items: center; | ||
| 168 | justify-content: center; | ||
| 169 | font-size: 48rpx; | ||
| 170 | border: 4rpx solid #E8E8E8; | ||
| 171 | } | ||
| 172 | 366 | ||
| 173 | .avatar-placeholder { | 367 | .avatar { |
| 174 | color: #999; | 368 | width: 110rpx; |
| 175 | } | 369 | height: 110rpx; |
| 370 | border-radius: 50%; | ||
| 371 | border: 3rpx solid rgba(255, 255, 255, 0.6); | ||
| 372 | } | ||
| 176 | 373 | ||
| 177 | .user-desc { | 374 | .member-id { |
| 178 | font-size: 36rpx; | 375 | font-size: 26rpx; |
| 179 | color: #333; | 376 | color: #8b7355; |
| 180 | font-weight: 500; | 377 | } |
| 181 | } | ||
| 182 | 378 | ||
| 183 | /* 会员卡片 */ | 379 | .user-bottom { |
| 184 | .member-card { | 380 | padding-left: 0; |
| 185 | background: linear-gradient(135deg, #F7E090 0%, #E6C560 100%); | 381 | } |
| 186 | border-radius: 24rpx; | ||
| 187 | padding: 40rpx; | ||
| 188 | position: relative; | ||
| 189 | overflow: hidden; | ||
| 190 | margin-bottom: 30rpx; | ||
| 191 | 382 | ||
| 192 | &::before { | 383 | .user-name { |
| 193 | content: ''; | 384 | font-size: 44rpx; |
| 194 | position: absolute; | 385 | font-weight: bold; |
| 195 | top: 0; | 386 | color: #5c4b37; |
| 196 | left: 0; | 387 | margin-bottom: 16rpx; |
| 197 | right: 0; | ||
| 198 | bottom: 0; | ||
| 199 | background-image: url('data:image/svg+xml,%3Csvg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0,50 Q250,20 500,50 T1000,50" fill="none" stroke="%23E6C560" stroke-width="2" opacity="0.3"/%3E%3C/svg%3E'); | ||
| 200 | background-size: cover; | ||
| 201 | z-index: 0; | ||
| 202 | } | 388 | } |
| 203 | } | ||
| 204 | 389 | ||
| 205 | .card-header { | 390 | .card-info { |
| 206 | display: flex; | 391 | display: flex; |
| 207 | justify-content: space-between; | 392 | flex-direction: column; |
| 208 | align-items: center; | 393 | gap: 10rpx; |
| 209 | margin-bottom: 20rpx; | 394 | } |
| 210 | position: relative; | ||
| 211 | z-index: 1; | ||
| 212 | } | ||
| 213 | 395 | ||
| 214 | .card-name { | 396 | .info-row { |
| 215 | font-size: 40rpx; | 397 | font-size: 24rpx; |
| 216 | font-weight: bold; | 398 | color: #8b7355; |
| 217 | color: #222; | 399 | } |
| 218 | } | ||
| 219 | 400 | ||
| 220 | .bind-btn { | 401 | /* 已过期印章 */ |
| 221 | font-size: 28rpx; | 402 | .expired-stamp { |
| 222 | color: #666; | 403 | position: absolute; |
| 223 | } | 404 | right: 30rpx; |
| 405 | bottom: 100rpx; | ||
| 406 | width: 150rpx; | ||
| 407 | height: 150rpx; | ||
| 408 | z-index: 1; | ||
| 409 | } | ||
| 224 | 410 | ||
| 225 | .card-id { | 411 | /* 功能按钮卡片 */ |
| 226 | font-size: 28rpx; | 412 | .func-card { |
| 227 | color: #555; | 413 | margin: -70rpx 30rpx 30rpx; |
| 228 | margin-bottom: 40rpx; | 414 | background: #ffffff; |
| 415 | border-radius: 20rpx; | ||
| 416 | padding: 36rpx 0; | ||
| 417 | box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06); | ||
| 229 | position: relative; | 418 | position: relative; |
| 230 | z-index: 1; | 419 | z-index: 2; |
| 231 | } | 420 | } |
| 232 | 421 | ||
| 233 | /* 功能入口 */ | 422 | .func-list { |
| 234 | .card-func { | ||
| 235 | display: flex; | 423 | display: flex; |
| 236 | justify-content: space-between; | 424 | justify-content: space-around; |
| 237 | position: relative; | 425 | padding: 0 20rpx; |
| 238 | z-index: 1; | 426 | } |
| 239 | } | ||
| 240 | 427 | ||
| 241 | .func-item { | 428 | .func-item { |
| 242 | display: flex; | 429 | display: flex; |
| 243 | flex-direction: column; | 430 | flex-direction: column; |
| 244 | align-items: center; | 431 | align-items: center; |
| 245 | gap: 10rpx; | 432 | gap: 12rpx; |
| 246 | cursor: pointer; | 433 | } |
| 247 | } | ||
| 248 | 434 | ||
| 249 | .func-icon { | 435 | .func-icon { |
| 250 | width: 60rpx; | 436 | width: 72rpx; |
| 251 | height: 60rpx; | 437 | height: 72rpx; |
| 252 | border-radius: 12rpx; | 438 | } |
| 253 | display: flex; | ||
| 254 | align-items: center; | ||
| 255 | justify-content: center; | ||
| 256 | font-size: 32rpx; | ||
| 257 | color: #333; | ||
| 258 | } | ||
| 259 | 439 | ||
| 260 | .func-text { | 440 | .func-text { |
| 261 | font-size: 28rpx; | 441 | font-size: 24rpx; |
| 262 | color: #333; | 442 | color: #333; |
| 263 | font-weight: 500; | 443 | } |
| 264 | } | ||
| 265 | 444 | ||
| 266 | /* ========== 下半部分:人员信息 ========== */ | 445 | /* 人员信息区域 */ |
| 267 | .bottom-section { | 446 | .info-section { |
| 268 | background: #FFFFFF; | 447 | margin: 0 30rpx; |
| 269 | border-radius: 24rpx 24rpx 0 0; | 448 | } |
| 270 | padding: 30rpx; | ||
| 271 | margin-top: 20rpx; | ||
| 272 | } | ||
| 273 | 449 | ||
| 274 | .info-title { | 450 | .section-title { |
| 275 | display: flex; | 451 | display: flex; |
| 276 | align-items: center; | 452 | align-items: center; |
| 277 | gap: 16rpx; | 453 | gap: 12rpx; |
| 278 | margin-bottom: 30rpx; | 454 | margin-bottom: 20rpx; |
| 279 | font-size: 36rpx; | 455 | } |
| 280 | font-weight: 500; | ||
| 281 | color: #333; | ||
| 282 | } | ||
| 283 | 456 | ||
| 284 | .title-line { | 457 | .title-bar { |
| 285 | width: 12rpx; | 458 | width: 6rpx; |
| 286 | height: 32rpx; | 459 | height: 32rpx; |
| 287 | background: #E6C560; | 460 | background: #e6c560; |
| 288 | border-radius: 4rpx; | 461 | border-radius: 3rpx; |
| 289 | } | 462 | } |
| 290 | 463 | ||
| 291 | .info-list { | 464 | .title-text { |
| 292 | display: flex; | 465 | font-size: 30rpx; |
| 293 | flex-direction: column; | 466 | font-weight: 500; |
| 294 | gap: 30rpx; | 467 | color: #333; |
| 295 | } | 468 | } |
| 469 | |||
| 470 | .info-card { | ||
| 471 | background: #ffffff; | ||
| 472 | border-radius: 20rpx; | ||
| 473 | padding: 0 32rpx; | ||
| 474 | } | ||
| 296 | 475 | ||
| 297 | .info-item { | 476 | .info-item { |
| 298 | display: flex; | 477 | display: flex; |
| 299 | justify-content: space-between; | 478 | justify-content: space-between; |
| 300 | align-items: center; | 479 | align-items: center; |
| 301 | padding-bottom: 30rpx; | 480 | padding: 28rpx 0; |
| 302 | border-bottom: 1rpx solid #F0F0F0; | 481 | border-bottom: 1rpx solid #f5f5f5; |
| 482 | } | ||
| 303 | 483 | ||
| 304 | &:last-child { | 484 | .info-item:last-child { |
| 305 | border-bottom: none; | 485 | border-bottom: none; |
| 306 | padding-bottom: 0; | ||
| 307 | } | 486 | } |
| 308 | } | ||
| 309 | 487 | ||
| 310 | .item-label { | 488 | .item-label { |
| 311 | font-size: 32rpx; | 489 | font-size: 28rpx; |
| 312 | color: #333; | 490 | color: #333; |
| 313 | font-weight: 500; | 491 | } |
| 314 | } | ||
| 315 | 492 | ||
| 316 | .item-value { | 493 | .item-value { |
| 317 | font-size: 32rpx; | 494 | font-size: 28rpx; |
| 318 | color: #999; | 495 | color: #999; |
| 319 | } | 496 | } |
| 320 | 497 | ||
| 321 | /* 底部固定按钮(可选) */ | 498 | /* 绑定学员弹框 */ |
| 322 | .fixedBottom { | 499 | .bind-popup { |
| 323 | position: fixed; | 500 | width: 600rpx; |
| 324 | bottom: 0; | 501 | background: #ffffff; |
| 325 | left: 0; | 502 | border-radius: 24rpx; |
| 326 | right: 0; | 503 | overflow: hidden; |
| 327 | padding: 20rpx 30rpx; | 504 | } |
| 328 | background: #FFFFFF; | ||
| 329 | border-top: 1rpx solid #F0F0F0; | ||
| 330 | } | ||
| 331 | 505 | ||
| 332 | .btn-red { | 506 | .popup-title { |
| 507 | font-size: 32rpx; | ||
| 508 | font-weight: 500; | ||
| 509 | color: #333; | ||
| 510 | text-align: center; | ||
| 511 | padding: 40rpx 30rpx 20rpx; | ||
| 512 | } | ||
| 513 | |||
| 514 | .popup-content { | ||
| 515 | padding: 20rpx 30rpx 40rpx; | ||
| 516 | } | ||
| 517 | |||
| 518 | .form-item { | ||
| 519 | display: flex; | ||
| 520 | align-items: center; | ||
| 521 | margin-bottom: 24rpx; | ||
| 522 | } | ||
| 523 | |||
| 524 | .form-item:last-child { | ||
| 525 | margin-bottom: 0; | ||
| 526 | } | ||
| 527 | |||
| 528 | .form-label { | ||
| 529 | width: 120rpx; | ||
| 530 | font-size: 28rpx; | ||
| 531 | color: #333; | ||
| 532 | flex-shrink: 0; | ||
| 533 | } | ||
| 534 | |||
| 535 | .form-input { | ||
| 536 | flex: 1; | ||
| 537 | background: #f5f5f5; | ||
| 538 | border-radius: 12rpx; | ||
| 539 | padding: 20rpx 24rpx; | ||
| 540 | } | ||
| 541 | |||
| 542 | .form-input input { | ||
| 543 | font-size: 28rpx; | ||
| 544 | color: #333; | ||
| 333 | width: 100%; | 545 | width: 100%; |
| 546 | } | ||
| 547 | |||
| 548 | .placeholder-class { | ||
| 549 | color: #999; | ||
| 550 | } | ||
| 551 | |||
| 552 | .popup-btns { | ||
| 553 | display: flex; | ||
| 554 | border-top: 1rpx solid #eee; | ||
| 555 | } | ||
| 556 | |||
| 557 | .popup-btn { | ||
| 558 | flex: 1; | ||
| 559 | height: 100rpx; | ||
| 560 | line-height: 100rpx; | ||
| 561 | text-align: center; | ||
| 562 | font-size: 30rpx; | ||
| 563 | } | ||
| 564 | |||
| 565 | .popup-btn.cancel { | ||
| 566 | color: #666; | ||
| 567 | border-right: 1rpx solid #eee; | ||
| 568 | } | ||
| 569 | |||
| 570 | .popup-btn.confirm { | ||
| 571 | color: #C40F18; | ||
| 572 | font-weight: 500; | ||
| 573 | } | ||
| 574 | |||
| 575 | /* 退出登录 */ | ||
| 576 | .logout-section { | ||
| 577 | margin: 60rpx 30rpx 40rpx; | ||
| 578 | } | ||
| 579 | |||
| 580 | .logout-btn { | ||
| 334 | height: 88rpx; | 581 | height: 88rpx; |
| 335 | line-height: 88rpx; | 582 | line-height: 88rpx; |
| 336 | background: #C40F18; | 583 | text-align: center; |
| 337 | color: #FFFFFF; | 584 | font-size: 30rpx; |
| 338 | border-radius: 12rpx; | 585 | color: #999; |
| 339 | font-size: 32rpx; | 586 | background: #ffffff; |
| 340 | font-weight: 500; | 587 | border-radius: 20rpx; |
| 341 | border: none; | 588 | } |
| 342 | } | ||
| 343 | </style> | 589 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -31,32 +31,36 @@ | ... | @@ -31,32 +31,36 @@ |
| 31 | </template> | 31 | </template> |
| 32 | 32 | ||
| 33 | <script setup> | 33 | <script setup> |
| 34 | import { ref } from 'vue' | 34 | import { |
| 35 | import { onLoad } from '@dcloudio/uni-app'; | 35 | ref |
| 36 | import * as api from '@/common/api.js' | 36 | } from 'vue' |
| 37 | 37 | import { | |
| 38 | // 核心数据 | 38 | onLoad |
| 39 | const formData = ref({}) // 订单统计数据 | 39 | } from '@dcloudio/uni-app'; |
| 40 | const price = ref('') // 核心业务ID | 40 | import * as api from '@/common/api.js' |
| 41 | const payType = ref('0') // 支付方式(默认0=民生付) | 41 | |
| 42 | const payLoading = ref(false) // 支付按钮加载状态 | 42 | // 核心数据 |
| 43 | 43 | const formData = ref({}) // 订单统计数据 | |
| 44 | // 页面加载接收参数 | 44 | const price = ref('') // 核心业务ID |
| 45 | onLoad(async (options) => { | 45 | const payType = ref('0') // 支付方式(默认0=民生付) |
| 46 | const payLoading = ref(false) // 支付按钮加载状态 | ||
| 47 | |||
| 48 | // 页面加载接收参数 | ||
| 49 | onLoad(async (options) => { | ||
| 46 | console.log('订单ID:', options.price) | 50 | console.log('订单ID:', options.price) |
| 47 | if (options.price) { | 51 | if (options.price) { |
| 48 | price.value = options.price | 52 | price.value = options.price |
| 49 | } | 53 | } |
| 50 | }) | 54 | }) |
| 51 | 55 | ||
| 52 | 56 | ||
| 53 | // 支付方式切换 | 57 | // 支付方式切换 |
| 54 | function handlePayTypeChange(e) { | 58 | function handlePayTypeChange(e) { |
| 55 | payType.value = e.detail.value | 59 | payType.value = e.detail.value |
| 56 | } | 60 | } |
| 57 | 61 | ||
| 58 | // 立即支付核心逻辑 | 62 | // 立即支付核心逻辑 |
| 59 | async function handlePay() { | 63 | async function handlePay() { |
| 60 | 64 | ||
| 61 | 65 | ||
| 62 | try { | 66 | try { |
| ... | @@ -65,7 +69,7 @@ async function handlePay() { | ... | @@ -65,7 +69,7 @@ async function handlePay() { |
| 65 | 69 | ||
| 66 | if (res.data?.orderId) { | 70 | if (res.data?.orderId) { |
| 67 | api.pcallBack2(res.data.orderId) | 71 | api.pcallBack2(res.data.orderId) |
| 68 | uni.navigateTo({ | 72 | uni.redirectTo({ |
| 69 | url: `/personal/sucPay` | 73 | url: `/personal/sucPay` |
| 70 | }) | 74 | }) |
| 71 | } | 75 | } |
| ... | @@ -74,25 +78,30 @@ async function handlePay() { | ... | @@ -74,25 +78,30 @@ async function handlePay() { |
| 74 | 78 | ||
| 75 | } catch (err) { | 79 | } catch (err) { |
| 76 | const errMsg = err?.data?.msg || err?.message || '支付失败,请稍后重试' | 80 | const errMsg = err?.data?.msg || err?.message || '支付失败,请稍后重试' |
| 77 | uni.showToast({ title: errMsg, icon: 'none' }) | 81 | uni.showToast({ |
| 82 | title: errMsg, | ||
| 83 | icon: 'none' | ||
| 84 | }) | ||
| 78 | } finally { | 85 | } finally { |
| 79 | payLoading.value = false | 86 | payLoading.value = false |
| 80 | } | 87 | } |
| 81 | } | 88 | } |
| 82 | </script> | 89 | </script> |
| 83 | 90 | ||
| 84 | <style scoped lang="scss"> | 91 | <style scoped lang="scss"> |
| 85 | .pay-order-container { | 92 | .pay-order-container { |
| 86 | padding: 30rpx; | 93 | padding: 30rpx; |
| 87 | background-color: #fff; | 94 | background-color: #fff; |
| 88 | min-height: 100vh; | 95 | min-height: 100vh; |
| 89 | box-sizing: border-box; | 96 | box-sizing: border-box; |
| 90 | } | 97 | } |
| 91 | .icon{ | 98 | |
| 92 | width:30px; | 99 | .icon { |
| 93 | } | 100 | width: 30px; |
| 94 | // 页面头部 | 101 | } |
| 95 | .page-header { | 102 | |
| 103 | // 页面头部 | ||
| 104 | .page-header { | ||
| 96 | text-align: center; | 105 | text-align: center; |
| 97 | padding: 20rpx 0; | 106 | padding: 20rpx 0; |
| 98 | border-bottom: 1px solid #eee; | 107 | border-bottom: 1px solid #eee; |
| ... | @@ -103,10 +112,10 @@ async function handlePay() { | ... | @@ -103,10 +112,10 @@ async function handlePay() { |
| 103 | font-weight: 600; | 112 | font-weight: 600; |
| 104 | color: #333; | 113 | color: #333; |
| 105 | } | 114 | } |
| 106 | } | 115 | } |
| 107 | 116 | ||
| 108 | // 订单信息区域 | 117 | // 订单信息区域 |
| 109 | .order-info { | 118 | .order-info { |
| 110 | margin-bottom: 60rpx; | 119 | margin-bottom: 60rpx; |
| 111 | 120 | ||
| 112 | .info-item { | 121 | .info-item { |
| ... | @@ -144,10 +153,10 @@ async function handlePay() { | ... | @@ -144,10 +153,10 @@ async function handlePay() { |
| 144 | font-size: 38rpx; | 153 | font-size: 38rpx; |
| 145 | } | 154 | } |
| 146 | } | 155 | } |
| 147 | } | 156 | } |
| 148 | 157 | ||
| 149 | // 支付方式区域 | 158 | // 支付方式区域 |
| 150 | .pay-type-section { | 159 | .pay-type-section { |
| 151 | margin-bottom: 80rpx; | 160 | margin-bottom: 80rpx; |
| 152 | 161 | ||
| 153 | .section-title { | 162 | .section-title { |
| ... | @@ -175,10 +184,10 @@ async function handlePay() { | ... | @@ -175,10 +184,10 @@ async function handlePay() { |
| 175 | } | 184 | } |
| 176 | } | 185 | } |
| 177 | } | 186 | } |
| 178 | } | 187 | } |
| 179 | 188 | ||
| 180 | // 底部支付按钮 | 189 | // 底部支付按钮 |
| 181 | .fixed-bottom { | 190 | .fixed-bottom { |
| 182 | position: fixed; | 191 | position: fixed; |
| 183 | bottom: 0; | 192 | bottom: 0; |
| 184 | left: 0; | 193 | left: 0; |
| ... | @@ -200,5 +209,5 @@ async function handlePay() { | ... | @@ -200,5 +209,5 @@ async function handlePay() { |
| 200 | background-color: #E60012; | 209 | background-color: #E60012; |
| 201 | color: #fff; | 210 | color: #fff; |
| 202 | } | 211 | } |
| 203 | } | 212 | } |
| 204 | </style> | 213 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -64,7 +64,8 @@ | ... | @@ -64,7 +64,8 @@ |
| 64 | <uni-forms-item label="头像" required> | 64 | <uni-forms-item label="头像" required> |
| 65 | <uni-file-picker v-model="photoArr" @delete="delPhoto" return-type="object" limit="1" | 65 | <uni-file-picker v-model="photoArr" @delete="delPhoto" return-type="object" limit="1" |
| 66 | @select="upPhoto" :del-ico="false" :image-styles="imageStylesTx"></uni-file-picker> | 66 | @select="upPhoto" :del-ico="false" :image-styles="imageStylesTx"></uni-file-picker> |
| 67 | <image mode="aspectFill" v-if="baseFormData.photo2" style="height:200rpx;width:200rpx;" :src="config.baseUrl_api + baseFormData.photo2"/> | 67 | <image mode="aspectFill" v-if="baseFormData.photo2" style="height:200rpx;width:200rpx;" |
| 68 | :src="config.baseUrl_api + baseFormData.photo2" /> | ||
| 68 | </uni-forms-item> | 69 | </uni-forms-item> |
| 69 | </view> | 70 | </view> |
| 70 | </uni-forms> | 71 | </uni-forms> |
| ... | @@ -80,7 +81,8 @@ | ... | @@ -80,7 +81,8 @@ |
| 80 | <view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view> | 81 | <view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view> |
| 81 | 82 | ||
| 82 | <!-- 会员须知 --> | 83 | <!-- 会员须知 --> |
| 83 | <uni-popup ref="popup" type="bottom" background-color="#fff" animation :disable-scroll="true" :mask-click="false"> | 84 | <uni-popup ref="popup" type="bottom" background-color="#fff" animation :disable-scroll="true" |
| 85 | :mask-click="false"> | ||
| 84 | <view class="tt">入会须知</view> | 86 | <view class="tt">入会须知</view> |
| 85 | <view class="popBody"> | 87 | <view class="popBody"> |
| 86 | _{{baseFormData.name}}_欢迎您申请成为中国跆拳道协会(以下简称中国跆协)会员,请确保本次申请是经过您本人或监护人授权同意后的自愿行为,请您务必仔细阅读本入会须知。 | 88 | _{{baseFormData.name}}_欢迎您申请成为中国跆拳道协会(以下简称中国跆协)会员,请确保本次申请是经过您本人或监护人授权同意后的自愿行为,请您务必仔细阅读本入会须知。 |
| ... | @@ -297,7 +299,7 @@ | ... | @@ -297,7 +299,7 @@ |
| 297 | baseFormData.value.photo = data.data.fang; | 299 | baseFormData.value.photo = data.data.fang; |
| 298 | baseFormData.value.photo2 = data.data.yuan; | 300 | baseFormData.value.photo2 = data.data.yuan; |
| 299 | photoArr.value = { | 301 | photoArr.value = { |
| 300 | url: config.baseUrl_api+baseFormData.value.photo, | 302 | url: config.baseUrl_api + baseFormData.value.photo, |
| 301 | name: '头像', | 303 | name: '头像', |
| 302 | extname: 'jpg' | 304 | extname: 'jpg' |
| 303 | } | 305 | } |
| ... | @@ -492,8 +494,8 @@ | ... | @@ -492,8 +494,8 @@ |
| 492 | content: '请确认信息正确', | 494 | content: '请确认信息正确', |
| 493 | success: function(res) { | 495 | success: function(res) { |
| 494 | if (res.confirm) { | 496 | if (res.confirm) { |
| 495 | if(baseFormData.value.idcType=='4'){ | 497 | if (baseFormData.value.idcType == '4') { |
| 496 | baseFormData.value.idcType='0' | 498 | baseFormData.value.idcType = '0' |
| 497 | } | 499 | } |
| 498 | delete baseFormData.value.card | 500 | delete baseFormData.value.card |
| 499 | 501 | ||
| ... | @@ -523,16 +525,16 @@ | ... | @@ -523,16 +525,16 @@ |
| 523 | uni.showModal({ | 525 | uni.showModal({ |
| 524 | content: '保存成功', | 526 | content: '保存成功', |
| 525 | title: '提示', | 527 | title: '提示', |
| 526 | confirmText:'继续添加', | 528 | confirmText: '继续添加', |
| 527 | cancelColor:'返回首页', | 529 | cancelColor: '返回首页', |
| 528 | success: function(res) { | 530 | success: function(res) { |
| 529 | uni.redirectTo({ | 531 | uni.redirectTo({ |
| 530 | url: `/personalVip/addVip?tab=${current.value}&idcType=${baseFormData.value.idcType}` | 532 | url: `/personalVip/addVip?tab=${current.value}&idcType=${baseFormData.value.idcType}` |
| 531 | }); | 533 | }); |
| 532 | }, | 534 | }, |
| 533 | fail:function(){ | 535 | fail: function() { |
| 534 | uni.reLaunch({ | 536 | uni.reLaunch({ |
| 535 | url:`/pages/index/index` | 537 | url: `/pages/index/home` |
| 536 | }) | 538 | }) |
| 537 | } | 539 | } |
| 538 | }) | 540 | }) |
| ... | @@ -542,6 +544,7 @@ | ... | @@ -542,6 +544,7 @@ |
| 542 | } | 544 | } |
| 543 | }); | 545 | }); |
| 544 | } | 546 | } |
| 547 | |||
| 545 | function getUserInfo() { | 548 | function getUserInfo() { |
| 546 | api.getInfo(perId.value).then(res => { | 549 | api.getInfo(perId.value).then(res => { |
| 547 | baseFormData.value = res.data | 550 | baseFormData.value = res.data |
| ... | @@ -553,7 +556,6 @@ | ... | @@ -553,7 +556,6 @@ |
| 553 | </script> | 556 | </script> |
| 554 | 557 | ||
| 555 | <style lang="scss"> | 558 | <style lang="scss"> |
| 556 | |||
| 557 | /* 字段名左对齐 */ | 559 | /* 字段名左对齐 */ |
| 558 | .uni-forms-item .uni-forms-item__label { | 560 | .uni-forms-item .uni-forms-item__label { |
| 559 | text-align: left !important; | 561 | text-align: left !important; |
| ... | @@ -582,11 +584,10 @@ | ... | @@ -582,11 +584,10 @@ |
| 582 | 584 | ||
| 583 | /* 文本内容右对齐 */ | 585 | /* 文本内容右对齐 */ |
| 584 | .uni-forms-item .uni-forms-item__content text, | 586 | .uni-forms-item .uni-forms-item__content text, |
| 585 | .uni-forms-item .uni-forms-item__content > text { | 587 | .uni-forms-item .uni-forms-item__content>text { |
| 586 | display: inline-block !important; | 588 | display: inline-block !important; |
| 587 | white-space: nowrap !important; | 589 | white-space: nowrap !important; |
| 588 | } | 590 | } |
| 589 | |||
| 590 | </style> | 591 | </style> |
| 591 | 592 | ||
| 592 | <style lang="scss" scoped> | 593 | <style lang="scss" scoped> |
| ... | @@ -598,9 +599,11 @@ | ... | @@ -598,9 +599,11 @@ |
| 598 | right: 0; | 599 | right: 0; |
| 599 | bottom: 0; | 600 | bottom: 0; |
| 600 | } | 601 | } |
| 602 | |||
| 601 | :deep(.uni-popup) { | 603 | :deep(.uni-popup) { |
| 602 | overflow: hidden !important; | 604 | overflow: hidden !important; |
| 603 | } | 605 | } |
| 606 | |||
| 604 | :deep(.segmented-control) { | 607 | :deep(.segmented-control) { |
| 605 | height: 100rpx; | 608 | height: 100rpx; |
| 606 | } | 609 | } |
| ... | @@ -676,6 +679,7 @@ | ... | @@ -676,6 +679,7 @@ |
| 676 | :deep(.item-text-overflow) { | 679 | :deep(.item-text-overflow) { |
| 677 | text-align: left; | 680 | text-align: left; |
| 678 | } | 681 | } |
| 682 | |||
| 679 | :deep(.fixUniFormItemStyle .uni-data-picker__input-box) { | 683 | :deep(.fixUniFormItemStyle .uni-data-picker__input-box) { |
| 680 | justify-content: flex-start !important; | 684 | justify-content: flex-start !important; |
| 681 | text-align: left !important; | 685 | text-align: left !important; | ... | ... |
145 KB
static/temp/slices.zip
0 → 100644
No preview for this file type
static/temp/slices/bd.png
0 → 100644
382 Bytes
static/temp/slices/bd@2x.png
0 → 100644
709 Bytes
static/temp/slices/bd@3x.png
0 → 100644
1.25 KB
static/temp/slices/btn01.png
0 → 100644
1.6 KB
static/temp/slices/btn01@2x.png
0 → 100644
3.31 KB
static/temp/slices/btn01@3x.png
0 → 100644
5.91 KB
static/temp/slices/btn02.png
0 → 100644
1.56 KB
static/temp/slices/btn02@2x.png
0 → 100644
3.12 KB
static/temp/slices/btn02@3x.png
0 → 100644
5.59 KB
static/temp/slices/btn03.png
0 → 100644
1.26 KB
static/temp/slices/btn03@2x.png
0 → 100644
2.31 KB
static/temp/slices/btn03@3x.png
0 → 100644
4.31 KB
static/temp/slices/end.png
0 → 100644
6.89 KB
static/temp/slices/end@2x.png
0 → 100644
18 KB
static/temp/slices/end@3x.png
0 → 100644
35.1 KB
static/temp/slices/tx.png
0 → 100644
3 KB
static/temp/slices/tx@2x.png
0 → 100644
7.21 KB
static/temp/slices/tx@3x.png
0 → 100644
13.2 KB
static/temp/slices/user_01.png
0 → 100644
117 KB
static/temp/slices/user_01@2x.png
0 → 100644
382 KB
static/temp/slices/user_01@3x.png
0 → 100644
737 KB
static/temp/个人中心.png
0 → 100644
309 KB
static/temp/个人中心弹框.png
0 → 100644
281 KB
store/index.js
0 → 100644
store/modules/user.js
0 → 100644
| 1 | import { | ||
| 2 | defineStore | ||
| 3 | } from "pinia"; | ||
| 4 | import { | ||
| 5 | ref | ||
| 6 | } from 'vue' | ||
| 7 | |||
| 8 | export const useUserStore = defineStore('user', () => { | ||
| 9 | const user = ref(null) | ||
| 10 | const perInfo = ref(null) | ||
| 11 | |||
| 12 | const setUser = (value) => { | ||
| 13 | user.value = value | ||
| 14 | } | ||
| 15 | |||
| 16 | const setPerInfo = (value) => { | ||
| 17 | perInfo.value = value | ||
| 18 | } | ||
| 19 | |||
| 20 | return { | ||
| 21 | user, | ||
| 22 | setUser, | ||
| 23 | perInfo, | ||
| 24 | setPerInfo | ||
| 25 | } | ||
| 26 | }) | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or sign in to post a comment