From 51a35a1cea7a381c33c86e9a9697ecef602c773f Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期日, 24 八月 2025 16:25:37 +0800 Subject: [PATCH] 激活列样式调整 --- src/views/personalCenter/userInfo.vue | 88 +++++++++++++++++++++----------------------- 1 files changed, 42 insertions(+), 46 deletions(-) diff --git a/src/views/personalCenter/userInfo.vue b/src/views/personalCenter/userInfo.vue index c4d4e9b..ef1bb0f 100644 --- a/src/views/personalCenter/userInfo.vue +++ b/src/views/personalCenter/userInfo.vue @@ -39,10 +39,9 @@ </div> </div> </div> - <div class="content-item"> + <!-- <div class="content-item"> <div class="item-title flex jc-sb"> <span>鐢ㄦ埛绫诲瀷</span> - <!-- <span class="change-info hover" @click="userTypeDialog = true">淇敼</span> --> <span class="change-info hover" @click="updateUserInfo()">淇敼</span> </div> <div class="item-box"> @@ -51,7 +50,7 @@ <span class="text">{{ userInfo.userType }}</span> </div> </div> - </div> + </div> --> <div class="content-item"> <div class="item-title flex jc-sb"> <span>鏁欏笀璁よ瘉</span> @@ -199,14 +198,14 @@ > <div> <div class="qrcodeBox"> - <!-- <wxlogin + <wxlogin :redirect_uri="wxLogin.redirectURL" style="width: 300px; height: 400px; margin: -40px auto 0; overflow: hidden" :appid="wxLogin.appid" :scope="wxLogin.scope" state="WeChatScanningCodeBind" > - </wxlogin> --> + </wxlogin> </div> <p class="tips">浣跨敤寰俊鎵竴鎵壂鎻忎簩缁寸爜杩涜缁戝畾</p> </div> @@ -273,19 +272,13 @@ <script setup lang="ts"> import { reactive, ref, inject, onMounted, watch } from 'vue' import type { FormInstance, FormRules } from 'element-plus' -// import verify from '@/components/sliderImg/component/verify.vue' -// import '@/components/sliderImg/sliderImg.js' -// import '@/components/sliderImg/sliderImg.css' import { ElMessage } from 'element-plus' -import tool from '@/assets/js/toolClass.js' -// import { useUserStore } from '@/store' +import { useUserStore } from '@/store' // import wxlogin from 'vue-wxlogin' -// import teacherCertification from '@/views/components/teacherCertification.vue' -// import login from '@/layout/components/login.vue' -// const userStore = useUserStore() -import { useRoute } from 'vue-router' +import teacherCertification from './teacherCertification.vue' +import login from '@/layout/components/login.vue' +const userStore = useUserStore() import moment from 'moment' -const route = useRoute() const MG: any = inject('MG') const config: any = inject('config') @@ -323,13 +316,13 @@ } } -// onMounted(() => { -// getWechatAuthenticationState() -// getIntegral() -// if (localStorage.getItem(config.tokenKey)) { -// getUserRole() -// } -// }) +onMounted(() => { + getWechatAuthenticationState() + getIntegral() + if (localStorage.getItem(config.tokenKey)) { + getUserRole() + } +}) // watch(route, () => { // bindWeChat() @@ -346,28 +339,29 @@ let changeType = ref('password') const imgCode = ref<string>() // 鍥惧舰楠岃瘉鐮乽rl let countDown = ref(0) -// function changeUserInfo(type) { -// changeType.value = type -// if (type == 'password') { -// if (userStore.userInfo?.phoneNumber) { -// getImgCapcha() -// userInfoDialog.value = true -// } else { -// ElMessage({ -// message: '淇敼瀵嗙爜闇�鐭俊楠岃瘉,璇风粦瀹氭墜鏈哄彿鍚庡啀淇敼瀵嗙爜锛�', -// type: 'warning' -// }) -// } -// } else { -// getImgCapcha() -// userInfoDialog.value = true -// } -// } -// const getImgCapcha = () => { -// MG.identity.getImgCode().then((res) => { -// imgCode.value = 'data:image/png;base64,' + res -// }) -// } + +const changeUserInfo = (type) => { + changeType.value = type + if (type == 'password') { + if (userStore.userInfo?.phoneNumber) { + getImgCapcha() + userInfoDialog.value = true + } else { + ElMessage({ + message: '淇敼瀵嗙爜闇�鐭俊楠岃瘉,璇风粦瀹氭墜鏈哄彿鍚庡啀淇敼瀵嗙爜锛�', + type: 'warning', + }) + } + } else { + getImgCapcha() + userInfoDialog.value = true + } +} +const getImgCapcha = () => { + MG.identity.getImgCode().then((res) => { + imgCode.value = 'data:image/png;base64,' + res + }) +} const userFormRef = ref<FormInstance>() const userInfoForm = reactive({ @@ -570,10 +564,11 @@ } //寰俊璁よ瘉 let wxLogin = reactive({ - appid: 'wx5cfe8b007a3c6f8c', + appid: 'wx2b9d4a6308fd03d6', scope: 'snsapi_login', - redirectURL: encodeURIComponent(config.requestCtx + '/home/#/personalCenter'), + redirectURL: encodeURIComponent(config.requestCtx + '/#/personalCenter'), }) +//鑾峰彇寰俊璁よ瘉鐘舵�� const getWechatAuthenticationState = () => { MG.identity.checkBuildingWeChat({}).then((res: any) => { if (res) { @@ -925,6 +920,7 @@ .change-info { color: #019e58; + font-size: 14px; } .record { -- Gitblit v1.9.1