sunlupeng преди 1 месец
родител
ревизия
8b806064f2
променени са 3 файла, в които са добавени 12 реда и са изтрити 11 реда
  1. 4 4
      src/components/AppHeader.vue
  2. 1 1
      src/utils/request.js
  3. 7 6
      src/views/Ipay.vue

+ 4 - 4
src/components/AppHeader.vue

@@ -37,12 +37,12 @@
                     <div>姓名: {{ userInfo.userName }}</div>
                     <div style="display: flex;align-items: center;">
                         积分: <span class="blue">{{ userInfo.surplusIntegral }}</span>
-                        <router-link to="/ipay">
+                        <!-- <router-link to="/ipay">
                             <span class="ipay-btn">充值</span>
-                        </router-link>
-                        <!-- <router-link to="/ipay" style="display: flex;">
-                            <img style="height: 24px;margin-left: 10px;" src="@/assets/image/gift.png" alt="返奖">
                         </router-link> -->
+                        <router-link to="/ipay" style="display: flex;">
+                            <img style="height: 24px;margin-left: 10px;" src="@/assets/image/gift.png" alt="返奖">
+                        </router-link>
                     </div>
                     
                 </div>

+ 1 - 1
src/utils/request.js

@@ -6,7 +6,7 @@ let prodBaseURL = 'https://xiaoyou.dgtis.com/admin';//正式地址
 
 // let prodBaseURL = 'https://malltest.dgtis.com/admin';//阿里云地址
 
-let devBaseURL = 'https://malltest.dgtis.com/admin';//测试地址
+let devBaseURL = 'https://xiaoyou.dgtis.com/admin';//测试地址
 
 // create an axios instance
 const service = axios.create({

+ 7 - 6
src/views/Ipay.vue

@@ -5,7 +5,8 @@
         <div class="notification">
           <div class="payBox" v-loading="fullscreenLoading">
             <div class="payBox-title">
-              <div class="title">充值选择</div><span style="color: red;margin-left: 20px;">喜讯:双十一前,购买积分多送10%,即1元可购买11积分。</span>
+              <div class="title">充值选择</div>
+              <span style="color: red;margin-left: 20px;">喜讯:双十一前,购买积分多送10%,即1元可购买11积分。</span>
             </div>
             <div class="payBox-content">
               <div class="payBox-content-list">
@@ -21,7 +22,7 @@
                 </div>
                 <el-popover placement="top" width="300" v-model="visible">
                   <el-input size="small" placeholder="输入充值金额" v-model="money" oninput="value=value.match(/\d+\.?\d{0,1}/,'')" style="margin: 10px 0;"></el-input>
-                  <div style="float: left;" v-if="money">充值{{ money * rate }}积分</div>
+                  <div style="float: left;" v-if="money">充值{{ money * integralMoneyRate }}积分</div>
                   <div style="text-align: right; margin: 0">
                     <el-button size="small" @click="cancel()">取消</el-button>
                     <el-button type="primary" size="small" @click="confirm()">确定</el-button>
@@ -29,7 +30,7 @@
                   <div class="item" :class="{ 'actived': selected == -1 ? true : false }" slot="reference"
                     @click="selected = -1">
                     <div class="itemUp" v-if="money">
-                      <div style="font-size: 24px; color: rgba(22, 24, 35, .75);">{{ money * 10 }}</div>
+                      <div style="font-size: 24px; color: rgba(22, 24, 35, .75);">{{ money * integralMoneyRate }}</div>
                       <div style="font-size: 12px;font-weight: 400;margin-left: 2px; color: rgba(22, 24, 35, .75);">积分
                       </div>
                     </div>
@@ -109,7 +110,6 @@ export default {
       selected: 0,
       orderNo: undefined,
       integralMoneyRate: undefined,
-      rate:undefined,
       payList: [],
       payUrl:'https://dgtmall.dgtis.com/mall'
     };
@@ -144,7 +144,7 @@ export default {
     },
     handlePayWxQRcode() {  // 获取微信支付二维码
       getWxPayCode({    // 这里根据不同的后端接口去修改
-        integral: this.integralMoney*this.rate,
+        integral: this.integralMoney * this.integralMoneyRate,
         totalFee: this.integralMoney*1,
         integralMoneyRate: this.integralMoneyRate
       }).then(res => {
@@ -186,6 +186,8 @@ export default {
     cancel() {
       this.visible = false;
       this.money = '';
+      clearInterval(this.timer);
+      clearInterval(this.timerPayWxQRcode);
     },
     confirm() {
       clearInterval(this.timer);
@@ -207,7 +209,6 @@ export default {
     getPayList() {
       payList().then(response => {
         this.integralMoneyRate = response.data.data.items[0].integralMoneyRate;
-        this.rate = response.data.data.rate;
         this.payList = response.data.data.items;
         this.integralMoney = response.data.data.items[0].integralMoney;
         this.handlePayWxQRcode();