Browse Source

修改登录页面

yinyafei 3 years ago
parent
commit
6b6f8f085a

+ 3 - 3
PropertyH5/config/index.js

@@ -12,8 +12,8 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
         '/api': {   
-          target:'http://localhost/wycore/api',    //物业系统webapi
-          //target:'http://m.gaoyuan.com.cn:8015/api',    //物业系统webapi
+          //target:'http://localhost/wycore/api',    //物业系统webapi
+          target:'http://m.gaoyuan.com.cn:8015/api',    //物业系统webapi
           //target: 'http://222.223.237.11:8189/WorkFlowWebService60NodeJS/query.asmx',    //东龙webservice
         
           changeOrigin: true,
@@ -54,7 +54,7 @@ module.exports = {
      */
 
     // https://webpack.js.org/configuration/devtool/#development
-    devtool: 'cheap-module-eval-source-map',
+    devtool: 'cheap-module-inline-source-map',
 
     // If you have problems debugging vue-files in devtools,
     // set this to false - it *may* help

File diff suppressed because it is too large
+ 1 - 1
PropertyH5/dist/index.html


File diff suppressed because it is too large
+ 0 - 5
PropertyH5/dist/static/css/app.3c3cccf5bd8ec06cc780a80f23033149.css


File diff suppressed because it is too large
+ 0 - 1
PropertyH5/dist/static/css/app.3c3cccf5bd8ec06cc780a80f23033149.css.map


File diff suppressed because it is too large
+ 0 - 2
PropertyH5/dist/static/js/app.557b53a8d4dd5d42f80d.js


File diff suppressed because it is too large
+ 0 - 1
PropertyH5/dist/static/js/app.557b53a8d4dd5d42f80d.js.map


File diff suppressed because it is too large
+ 1 - 1
PropertyH5/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


File diff suppressed because it is too large
+ 1 - 1
PropertyH5/dist/static/js/vendor.15e071cadbbd6badcdb1.js.map


+ 11 - 5
PropertyH5/src/common/util.js

@@ -10,14 +10,19 @@ export function persistLogin (_this) {
       console.info('persistLogin result', _this.$store.state.result)
       resetState(_this)
     } else {
-      console.info('persistLogin data', _this.$store.state.data)
-      if (!_this.$store.state.data) {
-        console.info('persistLogin data=null', _this.$store.state.data)
+      if (!_this.$store.state.wxopenid) {
+        console.info('persistLogin wxopenid', _this.$store.state.wxopenid)
         resetState(_this)
       } else {
-        if (isEmpty(_this.$store.state.data.ownerid) || isEmpty(_this.$store.state.data.tel) || isEmpty(_this.$store.state.data.hcode)) {
-          console.info('persistLogin data中某值为空', _this.$store.state.data)
+        console.info('persistLogin data', _this.$store.state.data)
+        if (!_this.$store.state.data) {
+          console.info('persistLogin data=null', _this.$store.state.data)
           resetState(_this)
+        } else {
+          if (isEmpty(_this.$store.state.data.ownerid) || isEmpty(_this.$store.state.data.tel) || isEmpty(_this.$store.state.data.hcode)) {
+            console.info('persistLogin data中某值为空', _this.$store.state.data)
+            resetState(_this)
+          }
         }
       }
     }
@@ -33,6 +38,7 @@ export function resetState (_this) {
     console.info('resetState obj', obj)
     // 设置状态中的各种值
     _this.$store.commit('setResult', obj.isSuccess)
+    _this.$store.commit('setwxopenid', obj.openId)
     _this.$store.commit('setCode', obj.code)
     _this.$store.commit('setMsg', obj.errMsg)
     _this.$store.commit('setData', obj.data)

+ 1 - 0
PropertyH5/src/components/GetCode.vue

@@ -54,6 +54,7 @@ export default {
         // eslint-disable-next-line eqeqeq
         } else if (obj.msg == 'newopenid') {
           this.$store.commit('setwxopenid', obj.openId)
+          this.$store.commit('clearData', '')
           // Indicator.close()
           this.$router.push('/loginbytel')
         }

+ 1 - 1
PropertyH5/src/components/Getfdc_pm_revfare.vue

@@ -37,7 +37,7 @@
             <van-row class="borderTop">
               <van-col span="24">
                 <van-row>
-                  <van-col span="5" class="title1">租户</van-col>
+                  <van-col span="5" class="title1">业主</van-col>
                   <van-col span="19">{{ item.ownername }}</van-col>
                 </van-row>
                  <van-row>

+ 1 - 1
PropertyH5/src/components/Getfdc_pm_unfare.vue

@@ -37,7 +37,7 @@
             <van-row class="borderTop">
               <van-col span="24">
                 <van-row>
-                  <van-col span="5" class="title1">租户</van-col>
+                  <van-col span="5" class="title1">业主</van-col>
                   <van-col span="19">{{ item.ownername }}</van-col>
                 </van-row>
                  <van-row>

+ 30 - 2
PropertyH5/src/components/Insertfdc_pm_fare.vue

@@ -4,12 +4,11 @@
 
 <script>
 // eslint-disable-next-line no-unused-vars
-import { GetJSAPIWxPayData, InsertPay } from '@/common/api/loginApi.js'
+import { InsertPay } from '@/common/api/loginApi.js'
 export default {
   name: 'login',
   data () {
     return {
-      msg: 'Welcome to Your Vue.js App'
     }
   },
   created () {
@@ -19,8 +18,37 @@ export default {
     //   spinnerType: "triple-bounce"
     // });
     // this.getOpenId()
+    this.InsertPayInfo()
   },
   methods: {
+    InsertPayInfo: function () {
+      var that = this
+      let info = JSON.parse(that.$cookie.get('jiaofei'))
+
+      let data = {
+        farwarid: info.farerowid,
+        money: info.nneedpaymny + '',
+        ownername: info.ownername,
+        hname: info.hname,
+        ownerid: 'wx',
+        paytype: '1005'
+      }// 根据后端所需传参数
+
+      InsertPay(data).then(res => {
+        console.info('data', res)
+        if (!res.isSuccess) {
+          that.$toast(res.errMsg)
+        } else {
+          that.$toast({
+            message: '支付成功',
+            duration: 2000
+          })
+          that.$router.push('/Getfdc_pm_revfare')
+        }
+        // this.weChatParameter=res
+        // this.weixinPay()
+      })
+    }
     // getQueryString (name) {
     //   var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
     //   var r = window.location.search.substr(1).match(reg)

+ 16 - 17
PropertyH5/src/components/MakePayUrl.vue

@@ -29,7 +29,7 @@
             <van-row class="borderTop">
               <van-col span="24">
                 <van-row>
-                  <van-col span="5" class="title1">租户</van-col>
+                  <van-col span="5" class="title1">业主</van-col>
                   <van-col span="19">{{ info.ownername }}</van-col>
                 </van-row>
                  <van-row>
@@ -47,7 +47,7 @@
 
                 <van-row>
                   <van-col span="24">
-                         <!-- <van-button type="info" @click="handelPay" :disabled="isDisabledSubmitBtn" >确定缴费</van-button> -->
+                         <van-button type="info" @click="handelPay" :disabled="isDisabledSubmitBtn" >确定缴费</van-button>
                   </van-col>
                 </van-row>
               </van-col>
@@ -60,7 +60,7 @@
 </template>
 
 <script>
-import { GetJSAPIWxPayData, InsertPay, CloseOrder } from '@/common/api/loginApi.js'
+import { GetJSAPIWxPayData, CloseOrder, InsertPay } from '@/common/api/loginApi.js'
 export default {
   name: 'login',
   data () {
@@ -151,18 +151,20 @@ export default {
           // 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
           // eslint-disable-next-line eqeqeq
           if (res.err_msg == 'get_brand_wcpay_request:ok') { // 支付成功后的操作
-            that.isDisabledSubmitBtn = false
-
-            that.$toast({
-              message: this.info.farerowid,
-              duration: 2000
+            // that.isDisabledSubmitBtn = false
+            // 自定义加载图标
+            that.$toast.loading({
+              message: '生成缴费记录中...',
+              forbidClick: true,
+              loadingType: 'spinner'
             })
-
             let data = {
-              farwarid: this.info.farerowid,
-              money: this.info.nneedpaymny + '',
-              ownername: this.info.ownername,
-              hname: this.info.hname
+              farwarid: that.info.farerowid,
+              money: that.info.nneedpaymny + '',
+              ownername: that.info.ownername,
+              hname: that.info.hname,
+              ownerid: that.$store.state.data.ownerid,
+              paytype: '1005'
             }// 根据后端所需传参数
 
             InsertPay(data).then(res => {
@@ -170,15 +172,12 @@ export default {
               if (!res.isSuccess) {
                 that.$toast(res.errMsg)
               } else {
-                that.$toast({
-                  message: '支付成功',
-                  duration: 2000
-                })
                 that.$router.push('/Getfdc_pm_revfare')
               }
               // this.weChatParameter=res
               // this.weixinPay()
             })
+
           // eslint-disable-next-line eqeqeq
           } else if (res.err_msg == 'get_brand_wcpay_request:cancel') { // 取消支付的操作
             CloseOrder(data.outTradeNo).then(res => {

+ 26 - 23
PropertyH5/src/components/loginbytel.vue

@@ -21,9 +21,10 @@
       placeholder="验证码"
       :rules="[{  required: true, message: '请填写验证码' }]"
     >
-    <template #button>
+    <van-button slot="button" size="small" type="primary" @click="sendS" :disabled="isdisabled">{{text}}</van-button>
+    <!-- <template #button>
       <van-button size="small" type="default" @click="sendSms" ref="send" native-type="button"  :disabled="isdisabled">{{text}}</van-button>
-    </template>
+    </template> -->
     </van-field>
     <div style="margin: 16px;">
       <van-button round block type="info" native-type="submit">提交</van-button>
@@ -35,7 +36,7 @@
 <script>
 import {login, sendSms} from '@/common/api/loginApi.js'
 export default {
-  name: 'login',
+  name: 'loginbytel',
   data () {
     return {
       phone: '',
@@ -62,7 +63,7 @@ export default {
           this.$toast(obj.errMsg)
           return
         }
-        // 设置状态中的各种值
+        //设置状态中的各种值
         this.$store.commit('setResult', obj.isSuccess)
         this.$store.commit('setCode', obj.code)
         this.$store.commit('setMsg', obj.errMsg)
@@ -80,8 +81,8 @@ export default {
     onClickRight () {
       // this.$toast('按钮')
     },
-    sendSms () { // 发送手机验证码
-      var selft = this
+    sendS () { // 发送手机验证码
+      // var selft = this
       sendSms(this.phone).then((res) => {
         console.info('sendSms res', res)
         if (!res.isSuccess) {
@@ -90,26 +91,28 @@ export default {
         }
         // eslint-disable-next-line eqeqeq
         if (res.data == 'success') {
-          selft.GetNumber()
+          // selft.GetNumber()
+          selft.isdisabled = true
+          this.$toast('验证码已发送,请查收')
         }
       })
-    },
-    GetNumber () // 发送短信验证码后间隔一定时间才能重新发送
-    // eslint-disable-next-line brace-style
-    {
-      let self = this
-      var timer = setInterval(function () {
-        self.count--
-        self.text = self.count + '秒后重新获取'
-        self.isdisabled = true
-
-        if (self.count <= 0) {
-          self.isdisabled = false
-          self.text = '获取验证码'
-          clearInterval(timer)
-        }
-      }, 1000)
     }
+    // GetNumber () // 发送短信验证码后间隔一定时间才能重新发送
+    // // eslint-disable-next-line brace-style
+    // {
+    //   let self = this
+    //   var timer = setInterval(function () {
+    //     self.count--
+    //     self.text = self.count + '秒后重新获取'
+    //     self.isdisabled = true
+
+    //     if (self.count <= 0) {
+    //       self.isdisabled = false
+    //       self.text = '获取验证码'
+    //       clearInterval(timer)
+    //     }
+    //   }, 1000)
+    // }
 
   }
 }

+ 5 - 0
PropertyH5/src/router/index.js

@@ -43,6 +43,11 @@ export default new Router({
   routes: [
     { // 登录页
       path: '/',
+      name: 'login',
+      component: login
+    },
+    { // 登录页
+      path: '/loginbytel',
       name: 'loginbytel',
       component: loginbytel
     },

+ 9 - 0
PropertyH5/src/store/index.js

@@ -43,6 +43,15 @@ const store = new Vuex.Store({
     },
     setToken (state, token) {
       state.token = token
+    },
+    clearData (state, empty) {
+      state.data.ownerid = empty
+      state.data.ownername = empty
+      state.data.hcode = empty
+      state.data.hname = empty
+      state.data.bcode = empty
+      state.data.bname = empty
+      state.data.tel = empty
     }
   },
   getters: {