浏览代码

智慧小区演示版

zhengqiang 5 年之前
父节点
当前提交
5d13795afc
共有 5 个文件被更改,包括 15 次插入9 次删除
  1. 1 1
      config/prod.env.js
  2. 2 2
      src/App.vue
  3. 4 1
      src/components/Home.vue
  4. 1 5
      src/components/Pay.vue
  5. 7 0
      src/components/WXPay.vue

+ 1 - 1
config/prod.env.js

@@ -1,5 +1,5 @@
 'use strict'
 module.exports = {
   NODE_ENV: '"production"',
-  BACKEND_URL:'"http://zldb.xiaoxinda.com:8088/epay-server"'
+  BACKEND_URL:'"http://zldb.xiaoxinda.com:8088/smart-community-server"'
 }

+ 2 - 2
src/App.vue

@@ -19,10 +19,10 @@ export default {
   font-size: 16px;
 }
 .van-nav-bar {
-  background:#243da2;
+  background:#243da2 !important;
 }
 .van-nav-bar__title,
 .van-nav-bar .van-icon {
-  color: #ffffff;
+  color: #ffffff !important;
 }
 </style>

+ 4 - 1
src/components/Home.vue

@@ -102,7 +102,10 @@ export default {
         return self.buildingChange(self.selectedBuildingId);
     }).then((resp)=>{
         self.selectedRoomId = Cookies.get("selectedRoomId");
-        self.queryPower(self.selectedRoomId)
+
+        if(self.selectedRoomId!=null && self.selectedRoomId.length>0){
+          self.queryPower(self.selectedRoomId)
+        }
     });
   },
   methods: {

+ 1 - 5
src/components/Pay.vue

@@ -17,9 +17,6 @@
         </div>
         <p class="fyy-h6">价格标准:<span v-html="price"></span>元/度</p>
       </van-cell-group>
-      <van-cell-group>
-        <van-switch-cell title="电表开关演示" v-model="powerOn"/>
-      </van-cell-group>
       <van-cell-group>
         <van-cell>
           <span class="iconfont color-red fyy-icon">&#xe648;</span>
@@ -79,8 +76,7 @@ export default {
       payType: 'weipay',
       showAlipay: false,
       qrCodeUrl: '',
-      timeoutId : 0,
-      powerOn: false
+      timeoutId : 0
     }
   },
   methods: {

+ 7 - 0
src/components/WXPay.vue

@@ -115,6 +115,13 @@ export default {
                         "signType": data.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
                         "paySign": data.paySign,    // 支付签名
                         success: function (res) {
+                            self.$toast.loading({
+                                message: '订单确认中...',
+                                forbidClick: true,
+                                loadingType: 'spinner',
+                                duration: 10000
+                            });
+
                             // 支付成功后的回调函数,跳转到订单列表
                             self.queryPayResult(self.recordId);
                         }