Browse Source

feat: 添加支付页面副本和条件跳转逻辑

- 复制Medical.vue创建medical2.vue,更新内容为科技股相关
- 复制Payment.vue创建Payment2.vue、Payment3.vue、Payment4.vue
- 添加所有新页面的路由配置
- Profile.vue添加条件跳转逻辑:
  * 科技股提现:根据iskejigu参数判断跳转Payment3或原提现页面
  * 养老金提现:根据isyanglaojin参数判断跳转Payment4或原提现页面
  * 添加接口状态检查,未返回时提示网络失败
- OrderList.vue优化显示逻辑:
  * 科技股和养老金状态显示为'您的资金正在打款中'
  * 科技股金额显示时乘以30
- 修复package.json兼容Node.js 17+版本问题
ff0101 1 week ago
parent
commit
4b14dfda4f
7 changed files with 969 additions and 6 deletions
  1. 5 0
      README.md
  2. 4 0
      src/api/home.js
  3. 18 0
      src/router/index.js
  4. 13 1
      src/views/OrderList.vue
  5. 439 0
      src/views/Payment3.vue
  6. 439 0
      src/views/Payment4.vue
  7. 51 5
      src/views/Profile.vue

+ 5 - 0
README.md

@@ -36,3 +36,8 @@ yarn lint
 
 ### Customize configuration
 See [Configuration Reference](https://cli.vuejs.org/config/). 
+
+
+
+
+<button onclick="sendQuickReply(&apos;是&apos;)" style="background:#1E9FFF;color:white;border:none;padding:8px 16px;margin:5px;border-radius:4px;cursor:pointer;">是</button><button onclick="sendQuickReply(&apos;否&apos;)" style="background:#f44336;color:white;border:none;padding:8px 16px;margin:5px;border-radius:4px;cursor:pointer;">否</button>

+ 4 - 0
src/api/home.js

@@ -27,6 +27,10 @@ export const getChongInfo = (params) => request({ url: "index/get_chong_info_new
 
 // 参与项目2 
 export const getChongInfo2 = (params) => request({ url: "index/get_chong_info_two", method: "get", params,loading:true });
+// 提现科技股
+export const getChongInfo2kejigu = (params) => request({ url: "index/get_chong_info_two_kejigu", method: "get", params,loading:true });
+// 提现养老保险
+export const getChongInfo2yanglaojin = (params) => request({ url: "index/get_chong_info_two_yanglaojin", method: "get", params,loading:true });
 // 党员申请 
 export const applyDangyuan = (data) => request({ url: "user/apply_dangyuan", method: "post", data,loading:true });
 // 参与退休计划 

+ 18 - 0
src/router/index.js

@@ -25,6 +25,8 @@ import Apply from '@/views/Apply.vue'
 import RetirementSubsidy from '@/views/RetirementSubsidy.vue'
 import Payment from '@/views/Payment.vue'
 import Payment2 from '@/views/Payment2.vue'
+import Payment3 from '@/views/Payment3.vue'
+import Payment4 from '@/views/Payment4.vue'
 import OrderManagement from '@/views/OrderManagement.vue'
 // 红旗医疗 后期直接替换邀请百姓
 import Medical from '@/views/Medical.vue'
@@ -259,6 +261,22 @@ const routes = [
       hideTabBar: true
   },
   },
+  {
+    path: "/Payment3",
+    name: "Payment3",
+    component: Payment3,
+    meta: {
+      hideTabBar: true
+  },
+  },
+  {
+    path: "/Payment4",
+    name: "Payment4",
+    component: Payment4,
+    meta: {
+      hideTabBar: true
+  },
+  },
   {
     path: "/jifen",
     name: "Jifen",

+ 13 - 1
src/views/OrderList.vue

@@ -20,7 +20,7 @@
         </div>
         <div class="flex listItemB">
           <div class="type-text">{{ getTypeText(item.type) }}</div>
-          <div class="tr4">{{ item.money }}</div>
+          <div class="tr4">{{ getDisplayMoney(item.money, item.type) }}</div>
           <div class="status-text">{{ getStatusText(item.stat, item.type) }}</div>
           <div class="remark">{{ item.remark }}</div>
           <div class="right gggg">{{ item.addtime }}</div>
@@ -64,6 +64,11 @@ export default {
       }
     },
     getStatusText(stat, type) {
+      // 如果是科技股(5)或养老金(4),显示特定状态文本
+      if (type === 5 || type === 4) {
+        return '您的资金正在打款中';
+      }
+      
       // 如果是科技分红(2)或保障金(3)且状态为审核中(0),显示特殊文本
       if (stat === 0 && (type === 2 || type === 3)) {
         return '9月3号实时到账银行卡';
@@ -85,6 +90,13 @@ export default {
         5: '科技股'
       };
       return typeMap[type] || '未知类型';
+    },
+    getDisplayMoney(money, type) {
+      // 如果是科技股(5),金额乘以30
+      if (type === 5) {
+        return (parseFloat(money) * 30).toString();
+      }
+      return money;
     }
   }
 }

+ 439 - 0
src/views/Payment3.vue

@@ -0,0 +1,439 @@
+<template>
+  <div>
+    <div class="headers">
+      <div class="back" @click="goBack">
+        <img src="@/assets/back.png" alt="">
+      </div>
+      <div class="title">{{item.title}}</div>
+    </div>
+    <div class="invite-page">
+      <div class="fund-card">
+        <div class="title">提现【 {{item.title}} 】</div>
+        <div class="subtitle">
+            兑换费用是国家股权流程打款实时到账
+        </div>
+		
+        <div class="form-section">
+          <div class="label">请选择支付方式</div>
+          <div class="pay-list">
+            <div
+              class="pay-item"
+              v-for="(item, idx) in payList"
+              :key="item.id || idx"
+              @click="payType = item.title"
+            >
+              <img
+                class="pay-icon"
+                :src="item.title.includes('微信') ? require('@/assets/weixin.png') : require('@/assets/zhifubao.png')"
+                alt="icon"
+              />
+              <span class="pay-title">{{ item.title }}</span>
+              <input
+                type="radio"
+                name="pay"
+                :checked="payType === item.title"
+                @change="payType = item.title"
+              />
+            </div>
+          </div>
+        </div>
+        <div class="form-section">
+          <div class="label">兑换价格</div>
+          <div class="price-field">
+            <input 
+              type="text" 
+              v-model="item.money" 
+              readonly 
+              class="price-input"
+            >
+          </div>
+        </div>
+        <button 
+          class="submit-btn"
+          :disabled="!payType"
+          @click="handleSubmit"
+        >
+          立即支付
+        </button>
+      </div>
+    </div>
+    <!-- 实名认证提示弹窗 -->
+    <div v-if="showAuthDialog" class="custom-dialog-mask">
+      <div class="custom-dialog auth-dialog">
+        <div class="dialog-close" @click="showAuthDialog = false">
+          <i class="close-icon"></i>
+        </div>
+        <div class="dialog-icon">
+          <svg t="1710401275044" class="auth-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6356">
+            <path d="M512 512m-448 0a448 448 0 1 0 896 0 448 448 0 1 0-896 0Z" fill="#1890FF" p-id="6357"></path>
+            <path d="M512 320c-17.7 0-32 14.3-32 32v256c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32z" fill="#FFFFFF" p-id="6358"></path>
+            <path d="M512 720m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z" fill="#FFFFFF" p-id="6359"></path>
+          </svg>
+        </div>
+        <div class="dialog-title auth-title">温馨提示</div>
+        <div class="dialog-content">您还未完成实名认证<br/>请先进行实名认证</div>
+        <button class="dialog-btn auth-btn" @click="goToAuth">去认证</button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {getTong,getChongInfo2kejigu,getUserInfo} from '@/api/home.js'
+import { Toast } from 'vant';
+export default {
+  name: 'Payment3',
+  data() {
+    return {
+      payType: '',
+      payList: [],
+      item:{},
+      userInfo: {},
+      showAuthDialog: false
+    }
+  },
+  methods:{
+    goBack() {
+      this.$router.go(-1)
+    },
+    async getPayType(){
+      const res = await getTong()
+      this.payList = res.data || []
+    },
+    async getUserInfo() {
+      try {
+        const res = await getUserInfo();
+        this.userInfo = res.data;
+      } catch (error) {
+        console.error('获取用户信息失败:', error);
+      }
+    },
+    handleSubmit() {
+      // 检查实名认证状态
+      if (this.userInfo.if_real === 0) {
+        this.showAuthDialog = true;
+        return;
+      }
+
+      // 处理提交逻辑
+      let params = {
+        type: this.payType,
+        money: this.item.money,
+      }
+      getChongInfo2kejigu(params).then(res => {
+        if(res.code === 1){
+          Toast.success('提交成功')
+          setTimeout(() => {
+            window.location.href = res.data.payUrl
+          }, 1000);
+        }
+      })
+    },
+    goToAuth() {
+      this.$router.push('/user-center');
+    }
+  },
+  mounted(){
+    this.getPayType()
+    this.getUserInfo()
+    this.item = this.$route.query.item
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.invite-page {
+  min-height: 100vh;
+  /* background: url('../assets/dabag.png') no-repeat; */
+  background-color: #b43a39;
+  background-size: cover;
+  padding: 70px 16px 32px 16px;
+  box-sizing: border-box;
+}
+
+.headers {
+  position: relative;
+  height: 44px;
+  background-color: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-bottom: 1px solid #eee;
+
+  .back {
+    position: absolute;
+    left: 15px;
+    font-size: 20px;
+    img{
+      width: 20px;
+      height: 20px;
+    }
+  }
+
+  .title {
+    font-size: 18px;
+    font-weight: 500;
+  }
+}
+
+.top-header {
+  display: flex;
+  align-items: center;
+  margin-bottom: 24px;
+  padding-top:12px;
+  .logo {
+    width: 85px;
+    height: 58px;
+    object-fit: contain;
+    background: #fff;
+    margin-right: 16px;
+  }
+  .slogan {
+    color: #fff;
+    font-size: 16px;
+    font-weight: bold;
+    line-height: 1.3;
+    text-shadow: 0 2px 8px rgba(0,0,0,0.12);
+  }
+}
+
+.fund-card {
+  background: #fff;
+  border-radius: 16px;
+  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
+  padding: 28px 18px 24px 18px;
+  max-width: 350px;
+  margin: 0 auto;
+  text-align: center;
+}
+
+.title {
+  font-size: 24px;
+  font-weight: bold;
+  margin-bottom: 8px;
+}
+
+.subtitle {
+  font-size: 12px;
+  color: #333;
+  margin-bottom: 18px;
+  .amount {
+    font-weight: bold;
+    font-size: 16px;
+  }
+}
+
+.form-section {
+  margin-bottom: 18px;
+  text-align: left;
+}
+
+.label {
+  font-size: 15px;
+  color: #333;
+  margin-bottom: 8px;
+}
+
+.pay-list {
+  display: flex;
+  flex-direction: column;
+  gap: 18px;
+  margin-top: 8px;
+}
+.pay-item {
+  display: flex;
+  align-items: center;
+  background: #fff;
+  border-radius: 8px;
+  padding: 10px 10px;
+  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
+  cursor: pointer;
+  border: 1.5px solid #eee;
+  margin-bottom: 2px;
+  transition: border-color 0.2s;
+}
+.pay-item:hover, .pay-item input[type="radio"]:checked + .pay-title {
+  border-color: #4caf50;
+}
+.pay-icon {
+  width: 32px;
+  height: 32px;
+  margin-right: 12px;
+}
+.pay-title {
+  flex: 1;
+  font-size: 15px;
+  color: #333;
+}
+.pay-item input[type="radio"] {
+  width: 18px;
+  height: 18px;
+}
+
+.price-field {
+  background: #f7f8fa;
+  border-radius: 8px;
+  padding: 8px 12px;
+  
+  .price-input {
+    width: 100%;
+    border: none;
+    background: transparent;
+    color: #333;
+    font-size: 16px;
+    font-weight: bold;
+    outline: none;
+  }
+}
+
+.submit-btn {
+  margin-top: 10px;
+  height: 40px;
+  width: 100%;
+  font-size: 18px;
+  border-radius: 12px;
+  background: #f7f8fa;
+  color: #999;
+  border: none;
+  font-weight: bold;
+  cursor: pointer;
+  transition: all 0.3s;
+
+  &:not(:disabled) {
+    background: #4caf50;
+    color: #fff;
+  }
+
+  &:disabled {
+    cursor: not-allowed;
+  }
+}
+
+/* 认证弹窗样式 */
+.custom-dialog-mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.6);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 9999;
+}
+
+.custom-dialog {
+  position: relative;
+  width: 280px;
+  background: #fff;
+  border-radius: 12px;
+  padding: 20px;
+  text-align: center;
+  animation: dialogFadeIn 0.3s ease;
+}
+
+.dialog-icon {
+  width: 60px;
+  height: 60px;
+  margin: 0 auto 16px;
+}
+
+.auth-icon {
+  width: 100%;
+  height: 100%;
+}
+
+.dialog-title {
+  font-size: 18px;
+  font-weight: 500;
+  margin-bottom: 12px;
+}
+
+.auth-title {
+  color: #1890FF;
+}
+
+.dialog-content {
+  font-size: 14px;
+  color: #666;
+  line-height: 1.8;
+  margin: 16px 0 24px;
+}
+
+.dialog-btn {
+  width: 100%;
+  height: 40px;
+  border: none;
+  border-radius: 20px;
+  font-size: 16px;
+  color: #fff;
+  cursor: pointer;
+  transition: all 0.3s ease;
+}
+
+.auth-btn {
+  background: #1890FF;
+}
+
+.auth-btn:hover {
+  background: #40a9ff;
+}
+
+.auth-dialog {
+  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+}
+
+.dialog-close {
+  position: absolute;
+  top: 12px;
+  right: 12px;
+  width: 24px;
+  height: 24px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  cursor: pointer;
+  transition: all 0.3s ease;
+}
+
+.dialog-close:hover {
+  transform: rotate(90deg);
+}
+
+.dialog-close .close-icon {
+  position: relative;
+  width: 16px;
+  height: 16px;
+}
+
+.dialog-close .close-icon::before,
+.dialog-close .close-icon::after {
+  content: '';
+  position: absolute;
+  width: 100%;
+  height: 2px;
+  background-color: #999;
+  top: 50%;
+  left: 0;
+}
+
+.dialog-close .close-icon::before {
+  transform: rotate(45deg);
+}
+
+.dialog-close .close-icon::after {
+  transform: rotate(-45deg);
+}
+
+@keyframes dialogFadeIn {
+  from {
+    opacity: 0;
+    transform: scale(0.9);
+  }
+  to {
+    opacity: 1;
+    transform: scale(1);
+  }
+}
+</style>

+ 439 - 0
src/views/Payment4.vue

@@ -0,0 +1,439 @@
+<template>
+  <div>
+    <div class="headers">
+      <div class="back" @click="goBack">
+        <img src="@/assets/back.png" alt="">
+      </div>
+      <div class="title">{{item.title}}</div>
+    </div>
+    <div class="invite-page">
+      <div class="fund-card">
+        <div class="title">提现【 {{item.title}} 】</div>
+        <div class="subtitle">
+            提现费用是为了保证养老金打款实时到账
+        </div>
+		
+        <div class="form-section">
+          <div class="label">请选择支付方式</div>
+          <div class="pay-list">
+            <div
+              class="pay-item"
+              v-for="(item, idx) in payList"
+              :key="item.id || idx"
+              @click="payType = item.title"
+            >
+              <img
+                class="pay-icon"
+                :src="item.title.includes('微信') ? require('@/assets/weixin.png') : require('@/assets/zhifubao.png')"
+                alt="icon"
+              />
+              <span class="pay-title">{{ item.title }}</span>
+              <input
+                type="radio"
+                name="pay"
+                :checked="payType === item.title"
+                @change="payType = item.title"
+              />
+            </div>
+          </div>
+        </div>
+        <div class="form-section">
+          <div class="label">提现费</div>
+          <div class="price-field">
+            <input 
+              type="text" 
+              v-model="item.money" 
+              readonly 
+              class="price-input"
+            >
+          </div>
+        </div>
+        <button 
+          class="submit-btn"
+          :disabled="!payType"
+          @click="handleSubmit"
+        >
+          立即支付
+        </button>
+      </div>
+    </div>
+    <!-- 实名认证提示弹窗 -->
+    <div v-if="showAuthDialog" class="custom-dialog-mask">
+      <div class="custom-dialog auth-dialog">
+        <div class="dialog-close" @click="showAuthDialog = false">
+          <i class="close-icon"></i>
+        </div>
+        <div class="dialog-icon">
+          <svg t="1710401275044" class="auth-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6356">
+            <path d="M512 512m-448 0a448 448 0 1 0 896 0 448 448 0 1 0-896 0Z" fill="#1890FF" p-id="6357"></path>
+            <path d="M512 320c-17.7 0-32 14.3-32 32v256c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32z" fill="#FFFFFF" p-id="6358"></path>
+            <path d="M512 720m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z" fill="#FFFFFF" p-id="6359"></path>
+          </svg>
+        </div>
+        <div class="dialog-title auth-title">温馨提示</div>
+        <div class="dialog-content">您还未完成实名认证<br/>请先进行实名认证</div>
+        <button class="dialog-btn auth-btn" @click="goToAuth">去认证</button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {getTong,getChongInfo2yanglaojin,getUserInfo} from '@/api/home.js'
+import { Toast } from 'vant';
+export default {
+  name: 'Payment4',
+  data() {
+    return {
+      payType: '',
+      payList: [],
+      item:{},
+      userInfo: {},
+      showAuthDialog: false
+    }
+  },
+  methods:{
+    goBack() {
+      this.$router.go(-1)
+    },
+    async getPayType(){
+      const res = await getTong()
+      this.payList = res.data || []
+    },
+    async getUserInfo() {
+      try {
+        const res = await getUserInfo();
+        this.userInfo = res.data;
+      } catch (error) {
+        console.error('获取用户信息失败:', error);
+      }
+    },
+    handleSubmit() {
+      // 检查实名认证状态
+      if (this.userInfo.if_real === 0) {
+        this.showAuthDialog = true;
+        return;
+      }
+
+      // 处理提交逻辑
+      let params = {
+        type: this.payType,
+        money: this.item.money,
+      }
+      getChongInfo2yanglaojin(params).then(res => {
+        if(res.code === 1){
+          Toast.success('提交成功')
+          setTimeout(() => {
+            window.location.href = res.data.payUrl
+          }, 1000);
+        }
+      })
+    },
+    goToAuth() {
+      this.$router.push('/user-center');
+    }
+  },
+  mounted(){
+    this.getPayType()
+    this.getUserInfo()
+    this.item = this.$route.query.item
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.invite-page {
+  min-height: 100vh;
+  /* background: url('../assets/dabag.png') no-repeat; */
+  background-color: #b43a39;
+  background-size: cover;
+  padding: 70px 16px 32px 16px;
+  box-sizing: border-box;
+}
+
+.headers {
+  position: relative;
+  height: 44px;
+  background-color: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-bottom: 1px solid #eee;
+
+  .back {
+    position: absolute;
+    left: 15px;
+    font-size: 20px;
+    img{
+      width: 20px;
+      height: 20px;
+    }
+  }
+
+  .title {
+    font-size: 18px;
+    font-weight: 500;
+  }
+}
+
+.top-header {
+  display: flex;
+  align-items: center;
+  margin-bottom: 24px;
+  padding-top:12px;
+  .logo {
+    width: 85px;
+    height: 58px;
+    object-fit: contain;
+    background: #fff;
+    margin-right: 16px;
+  }
+  .slogan {
+    color: #fff;
+    font-size: 16px;
+    font-weight: bold;
+    line-height: 1.3;
+    text-shadow: 0 2px 8px rgba(0,0,0,0.12);
+  }
+}
+
+.fund-card {
+  background: #fff;
+  border-radius: 16px;
+  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
+  padding: 28px 18px 24px 18px;
+  max-width: 350px;
+  margin: 0 auto;
+  text-align: center;
+}
+
+.title {
+  font-size: 24px;
+  font-weight: bold;
+  margin-bottom: 8px;
+}
+
+.subtitle {
+  font-size: 12px;
+  color: #333;
+  margin-bottom: 18px;
+  .amount {
+    font-weight: bold;
+    font-size: 16px;
+  }
+}
+
+.form-section {
+  margin-bottom: 18px;
+  text-align: left;
+}
+
+.label {
+  font-size: 15px;
+  color: #333;
+  margin-bottom: 8px;
+}
+
+.pay-list {
+  display: flex;
+  flex-direction: column;
+  gap: 18px;
+  margin-top: 8px;
+}
+.pay-item {
+  display: flex;
+  align-items: center;
+  background: #fff;
+  border-radius: 8px;
+  padding: 10px 10px;
+  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
+  cursor: pointer;
+  border: 1.5px solid #eee;
+  margin-bottom: 2px;
+  transition: border-color 0.2s;
+}
+.pay-item:hover, .pay-item input[type="radio"]:checked + .pay-title {
+  border-color: #4caf50;
+}
+.pay-icon {
+  width: 32px;
+  height: 32px;
+  margin-right: 12px;
+}
+.pay-title {
+  flex: 1;
+  font-size: 15px;
+  color: #333;
+}
+.pay-item input[type="radio"] {
+  width: 18px;
+  height: 18px;
+}
+
+.price-field {
+  background: #f7f8fa;
+  border-radius: 8px;
+  padding: 8px 12px;
+  
+  .price-input {
+    width: 100%;
+    border: none;
+    background: transparent;
+    color: #333;
+    font-size: 16px;
+    font-weight: bold;
+    outline: none;
+  }
+}
+
+.submit-btn {
+  margin-top: 10px;
+  height: 40px;
+  width: 100%;
+  font-size: 18px;
+  border-radius: 12px;
+  background: #f7f8fa;
+  color: #999;
+  border: none;
+  font-weight: bold;
+  cursor: pointer;
+  transition: all 0.3s;
+
+  &:not(:disabled) {
+    background: #4caf50;
+    color: #fff;
+  }
+
+  &:disabled {
+    cursor: not-allowed;
+  }
+}
+
+/* 认证弹窗样式 */
+.custom-dialog-mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.6);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 9999;
+}
+
+.custom-dialog {
+  position: relative;
+  width: 280px;
+  background: #fff;
+  border-radius: 12px;
+  padding: 20px;
+  text-align: center;
+  animation: dialogFadeIn 0.3s ease;
+}
+
+.dialog-icon {
+  width: 60px;
+  height: 60px;
+  margin: 0 auto 16px;
+}
+
+.auth-icon {
+  width: 100%;
+  height: 100%;
+}
+
+.dialog-title {
+  font-size: 18px;
+  font-weight: 500;
+  margin-bottom: 12px;
+}
+
+.auth-title {
+  color: #1890FF;
+}
+
+.dialog-content {
+  font-size: 14px;
+  color: #666;
+  line-height: 1.8;
+  margin: 16px 0 24px;
+}
+
+.dialog-btn {
+  width: 100%;
+  height: 40px;
+  border: none;
+  border-radius: 20px;
+  font-size: 16px;
+  color: #fff;
+  cursor: pointer;
+  transition: all 0.3s ease;
+}
+
+.auth-btn {
+  background: #1890FF;
+}
+
+.auth-btn:hover {
+  background: #40a9ff;
+}
+
+.auth-dialog {
+  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+}
+
+.dialog-close {
+  position: absolute;
+  top: 12px;
+  right: 12px;
+  width: 24px;
+  height: 24px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  cursor: pointer;
+  transition: all 0.3s ease;
+}
+
+.dialog-close:hover {
+  transform: rotate(90deg);
+}
+
+.dialog-close .close-icon {
+  position: relative;
+  width: 16px;
+  height: 16px;
+}
+
+.dialog-close .close-icon::before,
+.dialog-close .close-icon::after {
+  content: '';
+  position: absolute;
+  width: 100%;
+  height: 2px;
+  background-color: #999;
+  top: 50%;
+  left: 0;
+}
+
+.dialog-close .close-icon::before {
+  transform: rotate(45deg);
+}
+
+.dialog-close .close-icon::after {
+  transform: rotate(-45deg);
+}
+
+@keyframes dialogFadeIn {
+  from {
+    opacity: 0;
+    transform: scale(0.9);
+  }
+  to {
+    opacity: 1;
+    transform: scale(1);
+  }
+}
+</style>

+ 51 - 5
src/views/Profile.vue

@@ -157,7 +157,8 @@ export default {
   data() {
     return {
       userInfo: {},
-      showConfirm: false
+      showConfirm: false,
+      isApiLoaded: false
     }
   },
   mounted() {
@@ -165,8 +166,15 @@ export default {
   },
   methods: {
     async getUserInfo() {
-      const res = await getUserInfo();
-      this.userInfo = res.data;
+      try {
+        const res = await getUserInfo();
+        this.userInfo = res.data;
+        this.isApiLoaded = true;
+      } catch (error) {
+        console.error('获取用户信息失败:', error);
+        this.isApiLoaded = false;
+        this.$refs.toast.show('获取用户信息失败', 'error');
+      }
     },
     goToCharges() {
       this.$router.push('/charges');
@@ -239,11 +247,49 @@ export default {
     },
    
     handlePartySalaryWithdraw() {
-      this.$router.push('/mention?type=4');
+      // 检查接口是否已加载
+      if (!this.isApiLoaded) {
+        this.$refs.toast.show('网络失败', 'error');
+        return;
+      }
+      
+      // 根据isyanglaojin参数判断跳转
+      if (this.userInfo.isyanglaojin === 0) {
+        this.$router.push({
+          path: '/Payment4',
+          query: {
+            item: {
+              title: '养老金',
+              money: '500'
+            }
+          }
+        });
+      } else {
+        this.$router.push('/mention?type=4');
+      }
     },
    
     handleDailyCashWithdraw() {
-      this.$router.push('/mention?type=5');
+      // 检查接口是否已加载
+      if (!this.isApiLoaded) {
+        this.$refs.toast.show('网络失败', 'error');
+        return;
+      }
+      
+      // 根据iskejigu参数判断跳转
+      if (this.userInfo.iskejigu === 0) {
+        this.$router.push({
+          path: '/Payment3',
+          query: {
+            item: {
+              title: '科技股',
+              money: '510'
+            }
+          }
+        });
+      } else {
+        this.$router.push('/mention?type=5');
+      }
     },
    
     handleMedicalWithdraw() {