Преглед на файлове

Merge branch 'master' of git.oschina.net:yiguanjia/php

north преди 7 години
родител
ревизия
23bc84801b

+ 2 - 2
www/protected/modules/moonclub/views/web/index.php

@@ -26,8 +26,8 @@
   <!-- vue~资源域名-->
   <?php $host = 'http://common.yiguanjia.me/'; ?>
   <!-- vue~资源版本号 -->
-  <?php $newVersion = time() /*时间戳*/ ?>
-  <?php $newVersion = 2018070103 ?>
+  <?php // $newVersion = time() /*时间戳*/ ?>
+  <?php $newVersion = 2018070202 ?>
   <link rel=stylesheet href=https://res.wx.qq.com/open/libs/weui/1.1.2/weui.min.css>
   <script type=text/javascript src=https://res.wx.qq.com/open/libs/weuijs/1.1.2/weui.min.js></script>
   <link href=<?php echo $host ?>webapp/moonclub_new/home/static/css/app.css?v=<?php echo $newVersion ?> rel=stylesheet>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
www/webapp/moonclub_new/home/static/css/app.css


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
www/webapp/moonclub_new/home/static/js/app.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
www/webapp/moonclub_new/home/static/js/app.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
www/webapp/moonclub_new/home/static/js/manifest.js.map


+ 22 - 14
www/webapp/moonclub_new/src/App.vue

@@ -5,21 +5,29 @@
 </template>
 
 <script>
-  export default {
-    name: 'app'
-  }
+export default {
+  name: "app"
+};
 </script>
 
-<style>
-  #app {
-    font-family: 'Avenir', Helvetica, Arial, sans-serif;
-    -webkit-font-smoothing: antialiased;
-    -moz-osx-font-smoothing: grayscale;
-    /*text-align: center;*/
-    color: #2c3e50;
-    /*margin-top: 60px;*/
-  }
-  .weui-picker__action,.weui-dialog__btn_primary{
-    color: #4e171a;
+<style lang='less'>
+#app {
+  font-family: "Avenir", Helvetica, Arial, sans-serif;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  /*text-align: center;*/
+  color: #2c3e50;
+  /*margin-top: 60px;*/
+}
+.weui-picker__action,
+.weui-dialog__btn_primary {
+  color: #4e171a;
+}
+.s-weui-dialog__bd {
+  .weui-dialog {
+    .weui-dialog__bd {
+      text-align: left !important;
+    }
   }
+}
 </style>

+ 39 - 11
www/webapp/moonclub_new/src/view/exchange/index.vue

@@ -1,9 +1,9 @@
 <template>
-  <div>
-    <div class="header">
-      <span @click='back'>返回</span>兑换专区
-    </div>
-    <scroller style="height:85vh;margin-top:65px;">
+  <div>  
+    <scroller style="">
+      <div class="header">
+        <span @click='back'>返回</span>兑换专区
+      </div>
       <div class="box">
         <!-- name -->
         <div class="weui-cell">
@@ -106,13 +106,18 @@ export default {
       },
       code: {
         num: null,
-        pwd: null
-      }
+        pwd: null,
+        time: ""
+      },
+      exchangeBtn: true
     };
   },
   methods: {
     exchange() {
       let self = this;
+      if (!self.exchangeBtn) {
+        return;
+      }
       // 验证姓名
       if (self.user.name == null) {
         weui.alert("请重新输入姓名!");
@@ -143,6 +148,7 @@ export default {
         weui.alert("您输入的编号有误,请重新输入!");
         return;
       }
+      self.exchangeBtn = false;
       axios
         .get(
           `${_.apiPath}/j/JRecord/Record&user_id=${_.userId}&name=${
@@ -154,18 +160,25 @@ export default {
         .then(data => {
           if (!data.data.success) {
             weui.alert(data.data.message);
+            self.exchangeBtn = true;
             return;
           } else {
+            self.exchangeBtn = false;
             weui.alert(
-              `${data.data.data.gift.desc}`,
-              { title: "您已成功兑换" + data.data.data.gift.title },
+              `礼包名称:${data.data.data.gift.title}。<br/>收货地址:${
+                self.user.address
+              }。<br/>如有疑问请拨打电话400-8800-365`,
               function() {
                 self.$router.push("/");
+              },
+              {
+                title: "兑换成功",
+                className: "s-weui-dialog__bd"
               }
             );
             return;
           }
-          console.log(data);
+          // console.log(data);
           // weui.alert('兑换成功!');
           // console.log(data);
           // console.log(data.data.data.gift.desc);
@@ -182,6 +195,14 @@ export default {
     //sms
     getSMS() {
       let self = this;
+      let newTime = Date.parse(new Date()) / 1000;
+      if (self.code.time !== "" && self.code.time + 60 > newTime) {
+        weui.alert("请您60秒后重试");
+        return;
+      } else {
+        self.code.time = "";
+      }
+      console.log(self.code.time);
       // 检验手机号码
       if (!/^1[34578]\d{9}$/.test(self.user.mobile) || self.user.mobile === 0) {
         weui.alert("输入的手机号码有误,请重新输入");
@@ -192,6 +213,9 @@ export default {
         weui.alert("您输入验证码有误,请重新输入");
         return;
       } else {
+        if (self.code.time === "") {
+          self.code.time = Date.parse(new Date()) / 1000;
+        }
         axios
           .get(
             `${_.apiPath}/moonclub/reserve/code&type=2&mobile=${
@@ -232,7 +256,10 @@ export default {
   line-height: 2.5;
   text-align: center;
   font-weight: 600;
-  position: relative;
+  position: fixed;
+  top: 0;
+  right: 0;
+  left: 0;
   margin-bottom: 15px;
   span {
     font-weight: 100;
@@ -244,6 +271,7 @@ export default {
 }
 .box {
   // margin-top: 60px;
+  padding-top: 60px;
   // padding: 15px;
   .v-code {
     font-size: 16px;

Някои файлове не бяха показани, защото твърде много файлове са промени