Răsfoiți Sursa

修改pay.html样式

洪海涛 8 ani în urmă
părinte
comite
bab0eef1a8

+ 2 - 2
www/vue/src/App.vue

@@ -23,8 +23,8 @@
 //          to: to.fullPath,
 //          from: from.fullPath
 //        }
-        console.log('前一页 from = ' + from.name)
-        console.log('准备进入的页面是  to = ' + to.name)
+//        console.log('前一页 from = ' + from.name)
+//        console.log('准备进入的页面是  to = ' + to.name)
       }
     }
   }

+ 7 - 5
www/vue/src/components/mine.vue

@@ -19,7 +19,7 @@
 	</div>
 </template>
 <script type="text/javascript">
-  import {mapActions} from 'vuex'
+  import {mapState, mapActions} from 'vuex'
   import config from '../config/config'
   import {Cell, Group} from 'vux'
   export default({
@@ -62,13 +62,15 @@
       Group,
       Cell
     },
-    beforeCreate () {
-      console.log(this.$store.state.user.userInfo)
-    },
+    beforeCreate () {},
+    computed: mapState({
+      rechargeList: state => state.rechargeList
+    }),
     created () {
+      this.RECHARGELIST()
     },
     methods: {
-      ...mapActions([]),
+      ...mapActions(['RECHARGELIST']),
       btn: function (a) {
       }
     }

+ 13 - 0
www/vue/src/components/pay.vue

@@ -0,0 +1,13 @@
+<template>
+	<div class="brand">
+		<h2>pay</h2>
+	</div>
+</template>
+
+<script type="es6">
+  export default {
+  }
+</script>
+
+<style lang="less" scoped>
+</style>

+ 35 - 32
www/vue/src/components/recharge.vue

@@ -19,7 +19,8 @@
 				</p>
 			</group>
 			<ul class="ad-hide list-content list-recharge" style="padding-top: 5px;padding-bottom: 5px;padding-left: 10%;">
-				<li v-for="(item,index) in rechargeLists" class="media" @click="btnRechargeList(item, index)" v-bind:class="{on: index === isShow}">
+				<li v-for="(item,index) in rechargeLists" class="media" @click="btnRechargeList(item, index)"
+				    v-bind:class="{on: index === isShow}">
 					<div v-if="item.denomination ===1 ">
 						<div class="input-title">其他数额</div>
 						<div class="input-rmb">RMB:</div>
@@ -32,7 +33,8 @@
 			</ul>
 			<div class="ad-hide" style="text-align: center;clear: both;margin-top: 9rem;"><span style="font-size: 0.6rem">点击立即充值,即表示您已经同意壹管家</span><span
 				style="font-size: 0.6rem;font-weight: 600;display: block;"></span><span style="font-size: 0.6rem;">《<span
-				class="pay-agreement" style="text-decoration: underline;color: #0A246A" @click="activity">充返活动协议</span>》</span></div>
+				class="pay-agreement" style="text-decoration: underline;color: #0A246A" @click="activity">充返活动协议</span>》</span>
+			</div>
 			<div class="btn-add-recharge" @click="btnRecharge">立即去充值</div>
 			<div style="width: 100%;padding-bottom: 13%;"></div>
 		</scroller>
@@ -41,60 +43,61 @@
 
 <script type="es6">
   import {Group, Cell} from 'vux'
-  import {mapState, mapActions} from 'vuex'
+  import axios from 'axios'
   export default {
     data () {
       return {
         isActive: false,
-	      isShow: -1,
+        isShow: -1,
         rechargeLists: this.$store.state.recharge.rechargeList,
-	      rechargeItem: {},
+        rechargeItem: {},
         otherAmount: ''
       }
     },
     components: {
       Group, Cell
     },
-    computed: mapState({
-      rechargeList: state => state.rechargeList
-    }),
-	  beforeCreate () {
-      console.log(this.rechargeItem)
-	  },
-	  created () {
-      this.RECHARGELIST()
-	  },
-	  watch: {
-      'otherAmount': function(val) {
-        if(val !==undefined){
+    beforeCreate () {},
+    created () {
+//      console.log(this.rechargeLists)
+    },
+    watch: {
+      'otherAmount': function (val) {
+        if (val !== undefined) {
           if (isNaN(val)) {
             // 弹出提示框
-            $doc.trigger('spa:openpanel', ['simpleAlert', {
-              message: '请输入数字'
-            }]);
-            return;
+            this.otherAmount = ''
+            this.$vux.alert.show({
+              title: '输入错误',
+              content: '请输入数字',
+              onShow () {
+              },
+              onHide () {
+              }
+            })
           }
         }
-	      console.log(val)
       }
-	  },
+    },
     methods: {
-	    ...mapActions([
-	      'RECHARGELIST'
-	    ]),
       btnRechargeList (item, index) {
-	      if (index !== 4){
-	        this.otherAmount = ''
-	      }
-	      if (this.isShow === index) {
+        if (index !== 4) {
+          this.otherAmount = ''
+        }
+        if (this.isShow === index) {
           this.isShow = -1
-	      } else {
+        } else {
           this.isShow = index
         }
         this.rechargeItem = item
       },
       btnRecharge () {
-	     
+        
+        axios.post('o2o/recharge/addRechargeorder').then(res => {
+          console.log(res)
+        })
+        // axios     1.创建充值卡订单  user_id: user.id,        value:inputVal,
+        // 第二步
       },
       show (e) {
         if (this.index !== e) {

+ 12 - 5
www/webapp/o2o/module/pay/index.html

@@ -185,7 +185,7 @@
     }
 
     .spa-page-pay-success .result-content {
-      background: #8bc34a;
+      background: #b89400;
       padding-top: 38px;
     }
 
@@ -220,8 +220,9 @@
       font-size: 16px;
       padding: 10px 25px;
       margin-top: 0;
-      background: #8bc34a;
-      border-color: #8bc34a;
+      color: white;
+      background: #b89400;
+      border-color: #b89400;
     }
 
     .spa-page-pay-success #icon-success {
@@ -277,7 +278,7 @@
           </div>
         </div>
         <div class="box-center btn-group j-pay-btn">
-          <a class="btn btn-positive btn-pay">立即支付</a>
+          <a class="btn btn-positive btn-pay">确认订单</a>
         </div>
         <div class="box-center btn-group j-pay-result">
           <a href="/o2o/web/index#myOrder/1" class="btn btn-positive my-order">我的预约</a>
@@ -336,7 +337,13 @@
     $('#order-result').text(amount + '元');
     // 支付
     $('.btn-pay').click(function () {
-      callpay();
+      var content = $(this).html();
+      if (content === '确认订单') {
+        $(this).html('立即支付')
+      } else if (content === '立即支付') {
+        callpay();
+      }
+      content = null
     });
 
     //调用微信JS api 支付