Ver código fonte

二维码扫进入支付修改

wt 3 anos atrás
pai
commit
185d16d714

+ 2 - 1
README.md

@@ -1,3 +1,4 @@
+
 # invitation
 
 ## Project setup
@@ -39,7 +40,7 @@ topPayType:A01 支付宝支付
 topPayType:W06 微信支付
 openid:W06 微信身份
 
-
+ Cookies.set("openid57",'o5P6I5tLj-TjrK7leWUT8EFmTCa4')
 外包人员账号wxchenxiangbin 12345678
 ### 用户东信app身份
 userId

+ 60 - 45
src/views/amount/index.vue

@@ -16,7 +16,6 @@
             <van-field
               readonly
               label=" "
-              
               placeholder="请输入充值金额( 元 )"
               label-width="10px"
               clickable
@@ -429,53 +428,70 @@ export default {
     async pay(money,  topPayType, payType, channelId) {
       if(money.toString().indexOf(".")<1){
         money = money + ".00"
-      } 
-      axios.get("dxtop/staff/one",{
-        params:{
-          id:localStorage.getItem("user_wt")
-        }
-      }).then(res =>{
-        if(res.data?.data?.sid){
-          //("erp返回支付宝app支付链接 公众号返回微信支付链接")
-          if(localStorage.getItem("classify")){
-            let type = localStorage.getItem("classify")
-            let channelName =undefined
-            if(type == "1"){
-              channelName = "外包人员充值"
-            }
-            axios.post('/dxtop/order/topScanPayApi', {
-                "money": money,
-                "topPayType": topPayType,
-                "payType": payType,
-                "channelName":channelName,
-                "scene": 6,
-                "userId": res.data.data.sid
-            }).then(res => {
-              this.loading = false;
-              if(res.data.status == "ERROR"){
-                Toast(res.data.msg)
-              }else{
-                window.location.href = res.data.data
-              }
-            })
+      }
+      if(localStorage.getItem("type")){
+        axios.post('/dxtop/order/topScanPayApi', {
+            "money": money,
+            "topPayType": topPayType,
+            "payType": payType,
+            "channelId": channelId,
+            "scene": 2,
+        }).then(res => {
+          this.loading = false;
+          if(res.data.status == "ERROR"){
+            Toast(res.data.msg)
           }else{
-            axios.post('/dxtop/order/topScanPayApi', {
-                "money": money,
-                "topPayType": topPayType,
-                "payType": payType,
-                "channelId": channelId,
-                "scene": 2,
-            }).then(res => {
-              this.loading = false;
-              if(res.data.status == "ERROR"){
-                Toast(res.data.msg)
-              }else{
-                window.location.href = res.data.data
+            window.location.href = res.data.data
+          }
+        })
+      }else{
+        axios.get("dxtop/staff/one",{
+          params:{
+            id:localStorage.getItem("user_wt")
+          }
+        }).then(res =>{
+          if(res.data?.data?.sid){
+            //("erp返回支付宝app支付链接 公众号返回微信支付链接")
+            if(localStorage.getItem("classify")){
+              let type = localStorage.getItem("classify")
+              let channelName =undefined
+              if(type == "1"){
+                channelName = "外包人员充值"
               }
-            })
+              axios.post('/dxtop/order/topScanPayApi', {
+                  "money": money,
+                  "topPayType": topPayType,
+                  "payType": payType,
+                  "channelName":channelName,
+                  "scene": 6,
+                  "userId": res.data.data.sid
+              }).then(res => {
+                this.loading = false;
+                if(res.data.status == "ERROR"){
+                  Toast(res.data.msg)
+                }else{
+                  window.location.href = res.data.data
+                }
+              })
+            }else{
+              axios.post('/dxtop/order/topScanPayApi', {
+                  "money": money,
+                  "topPayType": topPayType,
+                  "payType": payType,
+                  "channelId": channelId,
+                  "scene": 2,
+              }).then(res => {
+                this.loading = false;
+                if(res.data.status == "ERROR"){
+                  Toast(res.data.msg)
+                }else{
+                  window.location.href = res.data.data
+                }
+              })
+            }
           }
+        })
         }
-      })
     },
     jumpMode() {
       if (this.money) {
@@ -541,7 +557,6 @@ export default {
       this.isWeixinOrAlipay();
       this.jumpMode();
       if(this.env == "WeiXin" || this.env == "Alipay"){
-
       }else{
         this.$router.push({
           path: "/recharge",

+ 18 - 18
src/views/function/index.vue

@@ -3,7 +3,7 @@
     <van-row class="headerBox">
       <!-- <van-icon name="arrow-left" @click="$router.go(-1)" /> -->
       <van-image :src="portrait" class="img"  @click="information" />
-      <div style="margin-left:-70px">{{title}}</div>
+      <div class="headerTitle">{{title}}</div>
       
     </van-row>
     <!-- 消息页 -->
@@ -61,11 +61,11 @@
         </van-col> -->
         <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/licence',1)">
           <van-image :src="require('../../assets/image/function/icon2.png')" />
-          <van-col>停车管理</van-col>
+          <div class="title">停车管理</div>
         </van-col>
         <van-col span="6" class="function" @click="ykt">
           <van-image :src="require('../../assets/image/function/icon3.png')" />
-          <van-col >一卡通</van-col>
+          <div class="title">一卡通</div>
         </van-col>
         <!-- <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/Food')">
           <van-image :src="require('../../assets/image/function/icon5.png')" />
@@ -74,7 +74,7 @@
 
         <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/myVisitor',2)">
           <van-image :src="require('../../assets/image/function/icon6.png')" />
-          <van-col>访客申请</van-col>
+          <div class="title">访客申请</div>
         </van-col>
         <!-- <van-col span="6" class="function">
           <van-image :src="require('../../assets/image/function/icon4.png')" />
@@ -316,6 +316,13 @@ export default {
     padding-top: 44px;
     box-sizing: border-box;
     background-color: #F7F7F7;
+    .headerTitle{
+      text-align: center;
+      position: absolute;
+      width:100px;
+      left:50%;
+      margin-left:-50px;
+    }
     .msgWrap{
       width:96%;
       margin:0 auto;
@@ -381,6 +388,7 @@ export default {
         margin-top:20px;
       }
     }
+    
     .functionWrap{
       width: 94%;
       margin:20px 3%;
@@ -393,26 +401,18 @@ export default {
         width:20%;margin:10px 2.5%;
       }
       .van-row{
-        .van-col{
-          .van-col{
-            width:100%;
-            font-size: 10px;
-            color:#323232;
-            display: block;
-            width:100%;
-            text-align: center;
-            margin-top:6px;
-            letter-spacing: 1px;
-            margin-left:-2px;
-          }
-          
-        }
         .van-image{
           width:100%;
           vertical-align: middle;
         }
        
       }
+      .title{
+        text-align: center;
+        color:#323232;
+        font-size: 10px;
+        margin-top:6px;
+      }
     }
     .foot {
         .img{

+ 19 - 17
src/views/information/index.vue

@@ -67,10 +67,10 @@
   </div>
 </template>
 <script>
+import { Dialog } from 'vant';
 import { Toast } from "vant";
 import Cookies from "js-cookie";
 import { encrypt, encrypt2, decrypt } from '../../utils/jsencrypt';
-import qs from "qs"
 import axios2 from "axios";
 export default {
   data() {
@@ -111,10 +111,6 @@ export default {
     if(!Cookies.get("openid57") || !Cookies.get("username57") || !Cookies.get("password57")){
       this.outLogin()
     }
-  },
-  mounted() {
-
-
   },
   methods: {
     afterRead(param) {
@@ -202,16 +198,22 @@ export default {
       }
     },
     outLogin(){
-      Cookies.remove("username57");
-      Cookies.remove("rememberMe57");
-      Cookies.remove("password57");
-      Cookies.remove("portrait57");
-      Cookies.remove("userId57");
-      Cookies.remove("token57");
-      Cookies.remove("nonce57");
-      Cookies.remove("timestamp57");
-      Cookies.remove("openid57")
-      this.$router.push({ path: "/"})
+      Dialog.confirm({
+        title: '提示',
+        message: '确定退出登录吗?',
+      }).then(() => {
+        Cookies.remove("username57");
+        Cookies.remove("rememberMe57");
+        Cookies.remove("password57");
+        Cookies.remove("portrait57");
+        Cookies.remove("userId57");
+        Cookies.remove("token57");
+        Cookies.remove("nonce57");
+        Cookies.remove("timestamp57");
+        Cookies.remove("openid57")
+        this.$router.push({ path: "/"})
+      });
+      
     }
   },
 };
@@ -249,13 +251,13 @@ export default {
           position: relative;
           .upload{
             position: absolute;
-            width:70px;
+            width:100px;
             height:50px;
             overflow: hidden;
             top:0px;
             right:0;
-            background-color: red;
             opacity: 0;
+            z-index: 10;
           }
           .portrait{
             width:30px !important;

+ 20 - 6
src/views/login/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="mianBox" >
-    <el-form class="login-form" auto-complete="on"  ref="loginForm" :model="loginForm" :rules="loginRules" v-if="login" :class="login?opa1:opa0">
+    <el-form class="login-form" auto-complete="on"  ref="loginForm" :model="loginForm" :rules="loginRules" v-if="login" :class="login?'opa1':'opa0'">
       <img src="../../assets/image/login/login.png" alt="" class="login">
       <el-form-item prop="username" width="460px">
         <el-input v-model="loginForm.username"
@@ -112,8 +112,12 @@ export default {
     if(Cookies.get("openid57")){
       if(Cookies.get("username57") && Cookies.get("password57")){
         this.login_info()
+        this.login = false
+      }else{
+        this.login = true
       }
     }else{
+      this.login = true
       let url = window.location.href
       if(url.indexOf("?code")>0){
         let code = this.getRequest("code")
@@ -317,22 +321,32 @@ export default {
   }
   @media screen and (min-width: 300px) and (max-width: 330px){
     .eye{
-      margin-left:18rem;
+      left:250px;
     }
   }
   @media screen and (min-width: 340px) and (max-width: 365px){
     .eye{
-      margin-left:20.5rem;
+      left:290px;
     }
   }
   @media screen and (min-width: 365px) and (max-width: 380px){
     .eye{
-      margin-left:21.5rem;
+      left:300px;
+    }
+  }
+  @media screen and (min-width: 381px) and (max-width: 400px){
+    .eye{
+      left:320px;
+    }
+  }
+  @media screen and (min-width: 401px) and (max-width: 420px){
+    .eye{
+      left:330px;
     }
   }
-  @media screen and (min-width: 399px) and (max-width: 440px){
+  @media screen and (min-width: 421px) and (max-width: 440px){
     .eye{
-      margin-left:24rem;
+      left:350px;
     }
   }
   .el-input__inner{