From fe97f78b9a343ee9fa45a3531d03d73dcd1df31b Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期三, 06 八月 2025 10:15:12 +0800
Subject: [PATCH] :测试提交“

---
 pages/mine/index.vue |  670 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 670 insertions(+), 0 deletions(-)

diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 1ed273b..552471e 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -1,4 +1,658 @@
 <template>
+<<<<<<< HEAD
+  <view class="page">
+    <image class="bg-image" src="/static/images/index/bg.png" mode="scaleToFill"></image>
+    <view class="container">
+      <!-- 鐢ㄦ埛淇℃伅鍖哄煙 -->
+      <view class="user-info">
+        <view class="user-info__left">
+          <view v-if="!avatar">
+            <image class="avatar" src="/static/images/index/tx.png" mode="scaleToFill"></image>
+          </view>
+          <image v-if="avatar" @click="handleToAvatar" :src="avatar" class="avatar" mode="widthFix"></image>
+          <view v-if="!name" @click="handleToLogin" class="user-info">
+            <view class="u_title">鐧诲綍</view>
+          </view>
+          <view class="user-info__content" v-else @click="handleToInfo">
+            <view class="name-wrapper">
+              <text class="name">{{name}}</text>
+              <view class="certified">宸茶璇�</view>
+            </view>
+            <text class="phone">{{phone || '鏈粦瀹氭墜鏈哄彿'}}</text>
+          </view>
+        </view>
+        <view class="user-info__right" @click="handleToInfo">
+          <text class="personal-info">涓汉淇℃伅</text>
+          <uni-icons type="right" size="16" color="#999" />
+        </view>
+      </view>
+
+      <!-- 蹇嵎鍔熻兘鍖� -->
+      <view class="quick-functions">
+        <view class="function-item" @click="history('/pagesA/Examiner/Examiner')">
+          <view class="icon-img">
+            <image class="icon-img" src="/static/images/index/灏辫瘖璁板綍.png" mode="scaleToFill"></image>
+          </view>
+          <text class="function-text">闂瘖璁板綍</text>
+        </view>
+        <view class="function-item" @click="questionnaire">
+          <view class="icon-img">
+            <image class="icon-img" src="/static/images/index/婊℃剰搴�.png" mode="scaleToFill"></image>
+          </view>
+          <text class="function-text">闂嵎璋冩煡</text>
+        </view>
+        <view class="function-item" @click="handleBuilding">
+          <view class="icon-img">
+            <image class="icon-img" src="/static/images/index/妫�鏌ヨ褰�.png" mode="scaleToFill"></image>
+          </view>
+          <text class="function-text">鎴戠殑浣撴</text>
+        </view>
+      </view>
+
+      <!-- 甯哥敤宸ュ叿鍖� -->
+      <view class="tools-section">
+        <view class="tools-title">甯哥敤宸ュ叿</view>
+        <view class="tools-list">
+          <view class="tool-item">
+            <view class="tool-item__left">
+              <image class="rt-image" src="/static/images/tabbar/phone.png" mode="scaleToFill"></image>
+              <text class="tool-text">鎵嬫満鍙风爜</text>
+            </view>
+            <view class="tool-item__right" @click="getcusPhone">
+              <text class="status confirmed">纭</text>
+              <uni-icons type="right" size="16" color="#999" />
+            </view>
+          </view>
+          <view class="tool-item">
+            <view class="tool-item__left">
+              <image class="rt-image" src="/static/images/index/xx.png" mode="scaleToFill"></image>
+              <text class="tool-text">鎺ュ彈娑堟伅閫氱煡</text>
+            </view>
+            <view class="tool-item__right" @tap="subScriptionMessage">
+              <text class="status allowed">鍏佽</text>
+              <uni-icons type="right" size="16" color="#999" />
+            </view>
+          </view>
+          <view class="tool-item" @click="personnel('/pagesA/Examiner/Examiner')">
+            <view class="tool-item__left">
+              <image class="rt-image" src="/static/images/index/ry.png" mode="scaleToFill"></image>
+              <text class="tool-text">浣撴浜哄憳</text>
+            </view>
+            <view class="tool-item__right">
+              <uni-icons type="right" size="16" color="#999" />
+            </view>
+          </view>
+          <view class="tool-item" @click="handleToPwd">
+            <view class="tool-item__left">
+              <image class="rt-image" src="/static/images/index/mm.png" mode="scaleToFill"></image>
+              <text class="tool-text">淇敼瀵嗙爜</text>
+            </view>
+            <view class="tool-item__right">
+              <uni-icons type="right" size="16" color="#999" />
+            </view>
+          </view>
+          <view class="tool-item" @click="handleAbout">
+            <view class="tool-item__left">
+              <image class="rt-image" src="/static/images/index/all.png" mode="scaleToFill"></image>
+              <text class="tool-text">鍏充簬鎴戜滑</text>
+            </view>
+            <view class="tool-item__right">
+              <uni-icons type="right" size="16" color="#999" />
+            </view>
+          </view>
+          <view class="tool-item" @click="handleHelp">
+            <view class="tool-item__left">
+              <image class="rt-image" src="/static/images/index/wt.png" mode="scaleToFill"></image>
+              <text class="tool-text">甯歌闂</text>
+            </view>
+            <view class="tool-item__right">
+              <uni-icons type="right" size="16" color="#999" />
+            </view>
+          </view>
+          <view class="tool-item">
+            <view class="tool-item__left" @click="handleLogout">
+              <image class="rt-image" src="/static/images/tabbar/cart.png" mode="scaleToFill"></image>
+              <text class="tool-text">閫�鍑虹櫥褰�</text>
+            </view>
+            <view class="tool-item__right">
+              <uni-icons type="right" size="16" color="#999" />
+            </view>
+          </view>
+        </view>
+      </view>
+
+      <!-- 鎶�鏈敮鎸佷俊鎭� -->
+      <view class="tech-support">
+        <text>@鎶�鏈敮鎸侊細璺嘲绉戞妧鏈夐檺鍏徃</text>
+      </view>
+
+      <!-- uView 寮圭獥 -->
+      <u-modal
+        :show="showPhonePopup"
+        title="缁戝畾鎵嬫満鍙�"
+        @confirm="confirmPhone"
+        @cancel="closePhonePopup"
+        confirm-color="#3AA0FF"
+        show-cancel-button
+      >
+        <view class="modal-content">
+          <u-input
+            v-model="inputPhone"
+            placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�"
+            type="number"
+            maxlength="11"
+            :border="true"
+            clearable
+          />
+        </view>
+      </u-modal>
+    </view>
+  </view>
+</template>
+
+<script>
+import { getInfoById } from "@/api/system/history";
+import { getWxInfo, bindPhone, wxbindphone, getIdCardByPhone } from "@/api/login";
+import storage from '@/utils/storage';
+var WXBizDataCrypt = require('../../utils/WXBizDataCrypt');
+
+export default {
+  data() {
+    return {
+      phone: "", // 鍒濆鍖栦负绌猴紝鏄剧ず鏈粦瀹氱姸鎬�
+      inputPhone: "", // 寮圭獥杈撳叆鐨勬墜鏈哄彿
+      showPhonePopup: false, // 鎺у埗 uView 寮圭獥鏄剧ず
+      cusPhone: "", // 淇濈暀鍘熸暟鎹紙鍙Щ闄わ級
+      globalData: {
+        codeitem: '',
+        phone: '',
+      },
+      disapley: false,
+      userInfo: {
+        nickName: "",
+        avatar: "",
+      },
+      name: this.$store.state.user.name,
+      token: this.$store.state.user.token,
+      version: getApp().globalData.config.appInfo.version
+    }
+  },
+  computed: {
+    avatar() {
+      return this.$store.state.user.avatar;
+    },
+    windowHeight() {
+      return uni.getSystemInfoSync().windowHeight - 50;
+    }
+  },
+  onLoad() {
+    if (this.token) {
+      this.getList();
+      getWxInfo().then(res => {
+        this.phone = res.data.phone || this.phone; // 鍒濆鍖栨椂鑾峰彇鎵嬫満鍙�
+      });
+    }
+  },
+  methods: {
+    getList() {
+
+    },
+    getcusPhone() {
+      if (!this.token) {
+        this.$tab.reLaunch('/pages/login');
+        return;
+      }
+      this.showPhonePopup = true; // 鏄剧ず uView 寮圭獥
+    },
+    closePhonePopup() {
+      this.inputPhone = ''; // 娓呯┖杈撳叆
+      this.showPhonePopup = false; // 鍏抽棴寮圭獥
+    },
+    confirmPhone() {
+      const phoneRegex = /^1[3-9]\d{9}$/;
+      if (!phoneRegex.test(this.inputPhone)) {
+        this.$u.toast('璇疯緭鍏ユ湁鏁堢殑11浣嶆墜鏈哄彿鐮�');
+        return;
+      }
+      const data = { phone: this.inputPhone };
+      wxbindphone(data).then(res => {
+        this.phone = this.inputPhone; // 鏇存柊鏄剧ず鐨勬墜鏈哄彿
+        this.$u.toast('缁戝畾鎴愬姛~');
+        this.closePhonePopup(); // 鍏抽棴寮圭獥
+      }).catch(err => {
+        this.$u.toast('缁戝畾澶辫触锛岃閲嶈瘯');
+      });
+    },
+    getPhoneNumber(e) {
+      let that = this;
+      wx.login({
+        success(res) {
+          console.log(res, 1111);
+          const sessionKey = uni.getStorageSync('sessionKey');
+          const openId = uni.getStorageSync('openId');
+          const iv = uni.getStorageSync('iv');
+          const encryptedData = uni.getStorageSync('encryptedData');
+          let data = {
+            code: e.detail.code,
+            sessionKey: sessionKey,
+            openId: openId,
+            iv: iv,
+            encryptedData: encryptedData,
+          };
+          bindPhone(data).then(response => {
+            uni.setStorageSync('msg', response.msg);
+            that.phone = response.msg;
+          });
+        }
+      });
+    },
+    getWxToken() {
+      uni.getUserProfile({
+        desc: '鐢ㄤ簬瀹屽杽璧勬枡',
+        success: res => {
+          const sessionKey = uni.getStorageSync('sessionKey');
+          const openId = uni.getStorageSync('openId');
+          const iv = uni.getStorageSync('iv');
+          const encryptedData = uni.getStorageSync('encryptedData');
+          let data = {
+            openId: openId,
+            iv: iv,
+            encryptedData: encryptedData,
+            sessionKey: sessionKey
+          };
+          bindPhone(data).then(response => {});
+        }
+      });
+    },
+subScriptionMessage() {
+  wx.requestSubscribeMessage({
+    tmplIds: [
+      'M4K_BNVG7g4hOAcrIDO18ux8KOTneHeNide5GdPW3kc',
+      'X467Xtd8HnFDNk-IoT0ChcdoBnClLZJQQwP7DMztYQ8',
+      'Gzc2BgzSsEY9uki6FThNQRLD1_An6uqpSve3PaU58PQ',
+    ],
+    success: (res) => {
+      console.log('璁㈤槄娑堟伅缁撴灉:', res);
+      const tmplIds = [
+        'M4K_BNVG7g4hOAcrIDO18ux8KOTneHeNide5GdPW3kc',
+        'X467Xtd8HnFDNk-IoT0ChcdoBnClLZJQQwP7DMztYQ8',
+        'Gzc2BgzSsEY9uki6FThNQRLD1_An6uqpSve3PaU58PQ',
+      ];
+      let acceptedCount = 0;
+      tmplIds.forEach(id => {
+        if (res[id] === 'accept') {
+          acceptedCount++;
+        }
+      });
+      if (acceptedCount > 0) {
+        this.$u.toast(`鎴愬姛璁㈤槄`);
+      } else {
+        this.$u.toast('宸插彇娑�');
+      }
+    },
+    fail: (res) => {
+      console.error('璁㈤槄娑堟伅澶辫触:', res);
+      this.$u.toast('璁㈤槄娑堟伅澶辫触锛岃绋嶅悗閲嶈瘯');
+    }
+  });
+},
+    questionnaire() {
+      const msg = uni.getStorageSync('msg');
+      if (msg) {
+        let phone = msg;
+        getIdCardByPhone(phone).then(response => {
+          if (response.data) {
+            uni.setStorageSync('data', response.data);
+            const cusIdCard = uni.getStorageSync('data');
+            uni.navigateTo({
+              url: `/pages/visitrecord/visitrecord?cusIdCard=${cusIdCard}`
+            });
+          } else {
+            uni.navigateTo({
+              url: `/pages/questionnaire/questionnaire`
+            });
+          }
+        });
+      } else if (this.phone) {
+        let phone = this.phone;
+        getIdCardByPhone(phone).then(response => {
+          if (response.data) {
+            uni.setStorageSync('data', response.data);
+            const cusIdCard = uni.getStorageSync('data');
+            uni.navigateTo({
+              url: `/pages/visitrecord/visitrecord?cusIdCard=${cusIdCard}`
+            });
+          } else {
+            uni.navigateTo({
+              url: `/pages/questionnaire/questionnaire`
+            });
+          }
+        });
+      } else {
+        uni.navigateTo({
+          url: `/pages/questionnaire/questionnaire`
+        });
+      }
+    },
+    history(canshu) {
+      uni.navigateTo({
+        url: `/pagesB/mine/xuanzeyuanqv/xuanzeyuanqv?canshu=${canshu}&id=1`
+      });
+    },
+    handleToInfo() {
+      this.$tab.navigateTo('/pagesB/mine/info/index');
+    },
+    handleToLogin() {
+      this.$tab.reLaunch('/pages/login');
+    },
+    handleToAvatar() {
+      this.$tab.navigateTo('/pagesB/mine/avatar/index');
+    },
+    handleLogout() {
+      this.$u.modal({
+        content: '纭畾娉ㄩ攢骞堕��鍑虹郴缁熷悧锛�',
+        showCancel: true,
+        confirmText: '纭畾',
+        cancelText: '鍙栨秷'
+      }).then(() => {
+        this.$store.dispatch('LogOut').then(() => {
+          this.$store.state.user.name = '';
+          this.phone = ''; // 閫�鍑虹櫥褰曟椂娓呯┖鎵嬫満鍙�
+          this.$tab.reLaunch('/pages/index');
+        });
+      });
+    },
+    handleHelp() {
+      this.$tab.navigateTo('/pagesB/mine/help/index');
+    },
+    handleAbout() {
+      this.$tab.navigateTo('/pagesB/mine/about/index');
+    },
+    handleJiaoLiuQun() {
+      this.$tab.navigateTo('/pagesB/mine/myReservation/myReservation');
+    },
+    handleBuilding() {
+      const msg = uni.getStorageSync('msg');
+      if (msg) {
+        let phone = msg;
+        getIdCardByPhone(phone).then(response => {
+          if (response.data) {
+            uni.setStorageSync('data', response.data);
+            const cusIdCard = uni.getStorageSync('data');
+            uni.navigateTo({
+              url: `/pages/tjrecord/tjrecord?cusIdCard=${cusIdCard}`
+            });
+          } else {
+            uni.navigateTo({
+              url: `/pagesA/Examiner/Examiner?id=2`
+            });
+          }
+        });
+      } else if (this.phone) {
+        let phone = this.phone;
+        getIdCardByPhone(phone).then(response => {
+          if (response.data) {
+            uni.setStorageSync('data', response.data);
+            const cusIdCard = uni.getStorageSync('data');
+            uni.navigateTo({
+              url: `/pages/tjrecord/tjrecord?cusIdCard=${cusIdCard}`
+            });
+          } else {
+            uni.navigateTo({
+              url: `/pagesA/Examiner/Examiner?id=2`
+            });
+          }
+        });
+      } else {
+        uni.navigateTo({
+          url: `/pagesA/Examiner/Examiner?id=2`
+        });
+      }
+    },
+    personnel(canshu) {
+      if (this.token) {
+        uni.navigateTo({
+          url: `/pagesB/mine/xuanzeyuanqv/xuanzeyuanqv?canshu=${canshu}`
+        });
+      } else {
+        this.$tab.reLaunch('/pages/login');
+      }
+    },
+    handleToPwd() {
+      this.$tab.navigateTo('/pagesB/mine/pwd/index');
+    },
+    handleToUpgrade() {
+      this.$u.toast('褰撳墠鏄渶鏂扮増鏈摝~');
+    },
+    handleCleanTmp() {
+      this.$u.toast('妯″潡寤鸿涓瓇');
+    },
+  }
+}
+</script>
+
+<style lang="scss">
+page {
+  height: 100%;
+  background-color: #F5F6FA;
+}
+
+.page {
+  height: 100%;
+}
+
+.bg-image {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100vw;
+  height: 100vh;
+  z-index: -1;
+  left: 50%;
+  transform: translateX(-50%);
+  object-fit: cover;
+}
+
+.container {
+  min-height: 100%;
+  display: flex;
+  flex-direction: column;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  padding-bottom: 120rpx;
+}
+
+/* 鐢ㄦ埛淇℃伅鍖哄煙鏍峰紡 */
+.user-info {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 30rpx 0;
+}
+
+.user-info__left {
+  display: flex;
+  align-items: center;
+}
+
+.avatar {
+  width: 120rpx;
+  height: 120rpx;
+  border-radius: 60rpx;
+  margin-right: 20rpx;
+}
+
+.user-info__content {
+  display: flex;
+  flex-direction: column;
+}
+
+.name-wrapper {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10rpx;
+}
+
+.name {
+  font-size: 32rpx;
+  color: #333;
+  font-weight: 500;
+  margin-right: 16rpx;
+}
+
+.certified {
+  background-color: #FFB442;
+  color: #fff;
+  font-size: 24rpx;
+  padding: 4rpx 12rpx;
+  border-radius: 4rpx;
+}
+
+.phone {
+  font-size: 28rpx;
+  color: #999;
+}
+
+.user-info__right {
+  display: flex;
+  align-items: center;
+}
+
+.personal-info {
+  font-size: 28rpx;
+  color: #3AA0FF;
+  margin-right: 8rpx;
+}
+
+/* 蹇嵎鍔熻兘鍖烘牱寮� */
+.quick-functions {
+  display: flex;
+  justify-content: space-between;
+  padding: 40rpx;
+  background-color: #fff;
+  border-radius: 16rpx;
+  margin-bottom: 30rpx;
+  width: 702rpx;
+  height: 186rpx;
+  background: linear-gradient(90deg, #FFFFFF 0%, #FCFFFE 100%);
+  box-shadow: 0rpx 0rpx 12rpx 1rpx rgba(127,153,177,0.14);
+}
+
+.function-item {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.icon-img {
+  width: 45.03rpx;
+  height: 52rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-bottom: 16rpx;
+}
+
+.function-text {
+  font-size: 28rpx;
+  color: #333;
+}
+
+/* 甯哥敤宸ュ叿鍖烘牱寮� */
+.tools-section {
+  background-color: #fff;
+  border-radius: 16rpx;
+  padding: 30rpx;
+  margin-bottom: 30rpx;
+}
+
+.tools-title {
+  font-size: 32rpx;
+  color: #333;
+  font-weight: 500;
+  margin-bottom: 30rpx;
+}
+
+.tools-list {
+  display: flex;
+  flex-direction: column;
+}
+
+.tool-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 24rpx 0;
+}
+
+.tool-item:last-child {
+  border-bottom: none;
+}
+
+.tool-item__left {
+  display: flex;
+  align-items: center;
+}
+
+.tool-text {
+  font-size: 28rpx;
+  color: #333;
+  margin-left: 20rpx;
+}
+
+.tool-item__right {
+  display: flex;
+  align-items: center;
+}
+
+.status {
+  font-size: 24rpx;
+  margin-right: 8rpx;
+}
+
+.confirmed {
+  width: 38px;
+  line-height: 20px;
+  background-color: #E8F8FA;
+  text-align: center;
+  border-radius: 10rpx;
+  color: #3AA0FF;
+}
+
+.allowed {
+  width: 38px;
+  line-height: 20px;
+  background-color: #E8F8FA;
+  text-align: center;
+  border-radius: 10rpx;
+  color: #3AA0FF;
+}
+
+/* 鎶�鏈敮鎸佷俊鎭牱寮� */
+.tech-support {
+  font-weight: 300;
+  font-size: 24rpx;
+  color: #B4B4B4;
+  line-height: 20rpx;
+  text-align: center;
+}
+
+.rt-image {
+  width: 28rpx;
+  height: 26rpx;
+  margin-left: 10rpx;
+}
+
+.tech-support text {
+  font-size: 24rpx;
+  color: #999;
+}
+
+/* uView 寮圭獥鍐呭鏍峰紡 */
+.modal-content {
+  padding: 20rpx;
+}
+=======
 	<view class="page" >
 		<image class="bg-image" src="/static/images/index/bg.png" mode="scaleToFill"></image>
 		<view class="container">
@@ -131,6 +785,16 @@
 							<!-- <uni-icons type="help" size="20" color="#666" /> -->
 							<image class="rt-image" src="/static/images/index/wt.png" mode="scaleToFill"></image>
 							<text class="tool-text">甯歌闂</text>
+						</view>
+						<view class="tool-item__right">
+							<uni-icons type="right" size="16" color="#999" />
+						</view>
+					</view>
+					<view class="tool-item" @click="handleerweima">
+						<view class="tool-item__left">
+							<!-- <uni-icons type="help" size="20" color="#666" /> -->
+							<image class="rt-image" src="/static/images/index/wt.png" mode="scaleToFill"></image>
+							<text class="tool-text">浜岀淮鐮佹祴璇�</text>
 						</view>
 						<view class="tool-item__right">
 							<uni-icons type="right" size="16" color="#999" />
@@ -531,6 +1195,11 @@
 				}
 
 			},
+			handleerweima(){
+				uni.navigateTo({
+					url: `/pages/mine/erweima`
+				})
+			},
 			personnel(canshu) {
 				if (this.token) {
 					// this.$tab.navigateTo('/pagesA/Examiner/Examiner')
@@ -839,4 +1508,5 @@
 			}
 		}
 	}
+>>>>>>> master
 </style>
\ No newline at end of file

--
Gitblit v1.8.0