yuantianjiao il y a 6 ans
Parent
révision
638c1f2b92

BIN
src/common/icon/Line3.png Voir le fichier


BIN
src/common/icon/already.png Voir le fichier


BIN
src/common/icon/cicyle.png Voir le fichier


BIN
src/common/icon/inv.png Voir le fichier


BIN
src/common/icon/logo-t.png Voir le fichier


BIN
src/common/icon/logo.1.png Voir le fichier


+ 45
- 0
src/components/discounts/discounts.vue Voir le fichier

@@ -0,0 +1,45 @@
1
+<template>
2
+  <div class="discounts flex-h">
3
+    <div class="card-left">
4
+      <div class="title">
5
+        <i class="iconfont icon-youhuiquan"></i>
6
+        <div>小小外交官体验卡</div>
7
+      </div>
8
+      <div class="desc">凭此体验券可让一位小朋友体验一次 适用于小小外交官课程</div>
9
+      <div class="time">有效期至2018年8月17日</div>
10
+    </div>
11
+    <div class="card-right">
12
+      <img :src="logo" alt="">
13
+      <div class="btn">去使用</div>
14
+      <div>共享</div>
15
+    </div>
16
+  </div>
17
+</template>
18
+
19
+<script>
20
+import logo from '../../common/icon/logo-t.png'
21
+import used from '../../common/icon/already.png'
22
+import failure from '../../common/icon/inv.png'
23
+export default {
24
+  data () {
25
+    return {
26
+      logo,
27
+      used,
28
+      failure
29
+    }
30
+  }
31
+}
32
+</script>
33
+
34
+<style lang="scss" scoped>
35
+.discounts{
36
+  padding: .15rem .2rem;
37
+  box-sizing: border-box;
38
+  .card-left{
39
+
40
+  }
41
+  .card-right{
42
+    width: .9rem;
43
+  }
44
+}
45
+</style>

+ 3
- 0
src/module/user/bindMobile/bindMobile.vue Voir le fichier

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
   <div class="mainPage">
3 3
     <div class="mask">
4
+      <img :src="logo" class="logo" alt="">
4 5
       <div class="box">
5 6
         <div class="title">绑定</div>
6 7
 
@@ -61,11 +62,13 @@
61 62
 </template>
62 63
 
63 64
 <script>
65
+import logo from '../../../common/icon/logo.png'
64 66
 import { mapState, createNamespacedHelpers } from 'vuex'
65 67
 const { mapActions: actions } = createNamespacedHelpers('userCenter')
66 68
 export default {
67 69
   data () {
68 70
     return {
71
+      logo,
69 72
       showCase: false,
70 73
       showSales: false,
71 74
       columns: [],

+ 7
- 1
src/module/user/bindMobile/page.scss Voir le fichier

@@ -8,8 +8,14 @@
8 8
     display: flex;
9 9
     justify-content: center;
10 10
     align-items: center;
11
-    background: rgba(0,0,0,0.3);
11
+    // background: rgba(0,0,0,0.3);
12 12
     position: relative;
13
+    .logo{
14
+      position: absolute;
15
+      top: .5rem;
16
+      left: .3rem;
17
+      width: 1.8rem;
18
+    }
13 19
     .select {
14 20
       position: absolute;
15 21
       bottom: 0;

+ 147
- 0
src/module/user/card/index.vue Voir le fichier

@@ -0,0 +1,147 @@
1
+<template>
2
+  <div class="mainPage">
3
+    <nav class="flex-h">
4
+      <a class="flex-item" v-for="(item,index) in nav" :key="index" :class="{'active':index==active}" @click="change(item,index)">{{item}}</a>
5
+    </nav>
6
+    <div class="box">
7
+      <div v-if="active == 0">
8
+        <discounts v-for="(item,index) in data[0].list" :key='index'></discounts>
9
+      </div>
10
+      <div v-if="active == 1">
11
+        <div class="fitness-card" v-for="(item,index) in data[1].list" :key='index' :class="{'opacity' : item.useType == '已失效' || item.useType == '已使用', 'gray': item.useType == '已使用'}">
12
+          <div class="card-top">
13
+            <div class="top-left">
14
+              <img :src="logo" alt="">
15
+              <div class="price">
16
+                <span>¥</span>
17
+                <h1>{{item.price}}</h1>
18
+                <span>元</span>
19
+              </div>
20
+            </div>
21
+            <div class="top-right">
22
+              <img :src="Line3" alt="">
23
+              <div>{{item.title}}</div>
24
+              <div>{{item.desc}}</div>
25
+            </div>
26
+          </div>
27
+          <div class="card-bottom">
28
+            <img :src="line" alt="">
29
+            <div class="time">有效期:{{item.time}}</div>
30
+            <div class="status" :class="{'gray-location' : item.useType == '已使用'}">
31
+              <span>次卡</span>
32
+            </div>
33
+          </div>
34
+          <div class="useType">
35
+            <img :src="used" alt="已使用" v-if="item.useType == '已使用'" width="100%" height="100%">
36
+            <img :src="failure" alt="已失效" v-if="item.useType == '已失效'" width="100%" height="100%">
37
+          </div>
38
+        </div>
39
+        <noMore v-if="data[active].hasPic"></noMore>
40
+      </div>
41
+    </div>
42
+  </div>
43
+</template>
44
+
45
+<script>
46
+import line from '../../../common/icon/cicyle.png'
47
+import logo from '../../../common/icon/logo-t.png'
48
+import Line3 from '../../../common/icon/Line3.png'
49
+import used from '../../../common/icon/already.png'
50
+import failure from '../../../common/icon/inv.png'
51
+// 上拉加载组件
52
+import scroll from '../../../components/scroll/scroll'
53
+import noMore from '../../../components/noMore/noMore'
54
+import discounts from '../../../components/discounts/discounts'
55
+export default {
56
+  data () {
57
+    return {
58
+      nav: ['课程体验卡', '健身卡'],
59
+      active: 0,
60
+      logo,
61
+      Line3,
62
+      used,
63
+      failure,
64
+      pullUpLoad: true,
65
+      pullUpLoadThreshold: 40,
66
+      startY: 0,
67
+      isloading: true,
68
+      hasMore: true,
69
+      data: [
70
+        {
71
+          hasPic: false,
72
+          list: [
73
+            {
74
+              title: '会所健身体验卡',
75
+              desc: '适用于游泳',
76
+              time: '2018年02月17日-2018年3月17日',
77
+              price: '120',
78
+              useType: '未使用'
79
+            },
80
+            {
81
+              title: '会所健身体验卡',
82
+              desc: '适用于游泳',
83
+              time: '2018年02月17日-2018年3月17日',
84
+              price: '120',
85
+              useType: '未使用'
86
+            }
87
+          ]
88
+        },
89
+        {
90
+          hasPic: false,
91
+          list: [
92
+            {
93
+              title: '会所健身体验卡',
94
+              desc: '适用于游泳',
95
+              time: '2018年02月17日-2018年3月17日',
96
+              price: '120',
97
+              useType: '未使用'
98
+            },
99
+            {
100
+              title: '会所健身体验卡',
101
+              desc: '适用于游泳',
102
+              time: '2018年02月17日-2018年3月17日',
103
+              price: '120',
104
+              useType: '已使用'
105
+            },
106
+            {
107
+              title: '会所健身体验卡',
108
+              desc: '适用于游泳',
109
+              time: '2018年02月17日-2018年3月17日',
110
+              price: '120',
111
+              useType: '已失效'
112
+            }
113
+          ]
114
+        }
115
+      ],
116
+      line
117
+    }
118
+  },
119
+  components: {
120
+    scroll,
121
+    noMore,
122
+    discounts
123
+  },
124
+  computed: {
125
+    pullUpLoadObj: function () {
126
+      return this.pullUpLoad
127
+        ? {
128
+          threshold: parseInt(this.pullUpLoadThreshold),
129
+          txt: {
130
+            more: this.pullUpLoadMoreTxt,
131
+            noMore: this.pullUpLoadNoMoreTxt
132
+          }
133
+        }
134
+        : false
135
+    }
136
+  },
137
+  methods: {
138
+    change (item, index) {
139
+      this.active = index
140
+    }
141
+  }
142
+}
143
+</script>
144
+
145
+<style lang="scss" scoped>
146
+@import "page.scss";
147
+</style>

+ 163
- 0
src/module/user/card/page.scss Voir le fichier

@@ -0,0 +1,163 @@
1
+.mainPage{
2
+  background: #fff;
3
+  nav{
4
+    white-space: nowrap;
5
+    overflow-x: scroll;
6
+    -webkit-overflow-scrolling: touch;
7
+    font-size: 0;
8
+    padding: .09rem 0;
9
+    background: #fff;
10
+    z-index: 100;
11
+    position: relative;
12
+    a{
13
+      line-height: .32rem;
14
+      text-align: center;
15
+      position: relative;
16
+      &.active::after{
17
+        content: '';
18
+        width: 20%;
19
+        height: .02rem;
20
+        display: block;
21
+        position: absolute;
22
+        left: 50%;
23
+        bottom: 0;
24
+        transform: translateX(-50%);
25
+        -webkit-transform: translateX(-50%);
26
+        background: #fc6243;
27
+      }
28
+    }
29
+  }
30
+  .box{
31
+    padding: .25rem;
32
+    box-sizing: border-box;
33
+    .fitness-card{
34
+      overflow: hidden;
35
+      background: rgba(255,255,255,1);
36
+      box-shadow: 0px 2px .1rem 0px rgba(193,204,217,0.5);
37
+      border-radius: 8px;
38
+      margin-bottom: .2rem;
39
+      position: relative;
40
+      &.opacity {
41
+        opacity: .5;
42
+      }
43
+      &.gray {
44
+        filter: grayscale(100%);
45
+      }
46
+      .card-top{
47
+        display: flex;
48
+        .top-left{
49
+          padding: .09rem;
50
+          position: relative;
51
+          box-sizing: border-box;
52
+          img{
53
+            width: 1.15rem;
54
+            position: absolute;
55
+            top: .09rem;
56
+            left: .09rem;
57
+          }
58
+          .price{
59
+            display: flex;
60
+            width: 1.1rem;
61
+            height: 1.1rem;
62
+            justify-content: center;
63
+            align-items: baseline;
64
+            line-height: 1.1rem;
65
+            span{
66
+              font-size: .14rem;
67
+              color: #FC6243;
68
+            }
69
+            h1{
70
+              font-size: .36rem;
71
+              color: #FC6243;
72
+            }
73
+          }
74
+        }
75
+        .top-right {
76
+          position: relative;
77
+          flex: 1;
78
+          box-sizing: border-box;
79
+          padding: .21rem .14rem;
80
+          img{
81
+            position: absolute;
82
+            left: 0;
83
+            top: 50%;
84
+            height: 60%;
85
+            transform: translateY(-50%);
86
+          }
87
+          div:nth-of-type(1){
88
+            font-size: .18rem;
89
+            font-weight: 600;
90
+            color: rgba(50,54,69,1);
91
+            padding-bottom: .16rem;
92
+          }
93
+          div:nth-of-type(2){
94
+            font-size: .12rem;
95
+            color: rgba(50,54,69,1);
96
+          }
97
+        }
98
+      }
99
+      .card-bottom{
100
+        position: relative;
101
+        padding: .06rem .2rem .12rem;
102
+        box-sizing: border-box;
103
+        img{
104
+          width: 100%;
105
+          height: .07rem;
106
+          position: absolute;
107
+          top: -0.15rem;
108
+          left: 0rem;
109
+        }
110
+        .time {
111
+          font-size: .12rem;
112
+          color: rgba(50,54,69,1);
113
+          overflow: hidden;
114
+        }
115
+        .status{
116
+          position: absolute;
117
+          background:linear-gradient(45deg,rgba(255,105,0,1) 0%,rgba(255,136,0,0.76) 100%);
118
+          opacity:0.85;
119
+          width: .6rem;
120
+          height: .6rem;
121
+          transform: rotate(45deg);
122
+          bottom: -0.3rem;
123
+          right: -0.3rem;
124
+          &.gray-location{
125
+            background: rgba(189,189,189,1);
126
+          }
127
+          span{
128
+            position: absolute;
129
+            top: .22rem;
130
+            left: -0.03rem;
131
+            font-size: .12rem;
132
+            color: #fff;
133
+            transform: rotate(-90deg);
134
+          }
135
+        }
136
+      }
137
+      .useType{
138
+        position: absolute;
139
+        bottom: .25rem;
140
+        right: .25rem;
141
+        width: .76rem;
142
+        height: .76rem;
143
+      }
144
+    }
145
+  }
146
+}
147
+
148
+@media screen and (max-width: 320px) {
149
+  .mainPage{
150
+    .box{
151
+      .fitness-card{
152
+        .card-bottom{
153
+          .status{
154
+            span{
155
+              top: .2rem !important;
156
+              left: -0.05rem !important;
157
+            }
158
+          }
159
+        }
160
+      }
161
+    }
162
+  }
163
+}

+ 15
- 15
src/module/user/lessonOrder/index.vue Voir le fichier

@@ -2,22 +2,22 @@
2 2
   <div class="mainPage">
3 3
     <scroll ref='scroll' :isloading='isloading' class='wrapper' :data='list' :pullUpLoad='pullUpLoadObj' :startY='parseInt(startY)' @pullingUp='getList'>
4 4
       <div class="box">
5
-          <div class="order-card flex-h" v-for="(item,index) in list" :key='index' :class="{'gray' : item.useType == '已失效'}">
6
-            <div class="card-pic">
7
-              <div :class="{'gray-location' : item.useType == '已失效'}"><span>{{item.LocationName}}</span></div>
8
-              <img src="" class="cover" width="100%" height="100%" alt="">
9
-            </div>
10
-            <div class="card-msg">
11
-              <div class="title">{{item.title}}</div>
12
-              <div class="text">付款方式:{{item.payType}}</div>
13
-              <div class="text">下单时间:{{item.time}}</div>
14
-            </div>
15
-            <div class="card-price">
16
-              <div class="price">¥ {{item.price}}</div>
17
-              <div class="type" :class="{'un-use' : item.useType == '未使用'}">{{item.useType}}</div>
18
-            </div>
5
+        <div class="order-card flex-h" v-for="(item,index) in list" :key='index' :class="{'opacity' : item.useType == '已失效'}">
6
+          <div class="card-pic">
7
+            <div :class="{'gray-location' : item.useType == '已失效'}"><span>{{item.LocationName}}</span></div>
8
+            <img src="" class="cover" width="100%" height="100%" alt="">
19 9
           </div>
20
-          <!-- <noMore v-if="hasPic"></noMore> -->
10
+          <div class="card-msg">
11
+            <div class="title">{{item.title}}</div>
12
+            <div class="text">付款方式:{{item.payType}}</div>
13
+            <div class="text">下单时间:{{item.time}}</div>
14
+          </div>
15
+          <div class="card-price">
16
+            <div class="price">¥ {{item.price}}</div>
17
+            <div class="type" :class="{'un-use' : item.useType == '未使用'}">{{item.useType}}</div>
18
+          </div>
19
+        </div>
20
+        <!-- <noMore v-if="hasPic"></noMore> -->
21 21
       </div>
22 22
     </scroll>
23 23
   </div>

+ 1
- 1
src/module/user/lessonOrder/page.scss Voir le fichier

@@ -7,7 +7,7 @@
7 7
     box-shadow:0px 2px 8px 0px rgba(204,204,204,0.5);
8 8
     border-radius:10px;
9 9
     margin-bottom: .2rem;
10
-    &.gray {
10
+    &.opacity {
11 11
       opacity: .5;
12 12
     }
13 13
     .card-pic {

+ 4
- 2
src/module/user/mainPage/userCenter/index.vue Voir le fichier

@@ -25,7 +25,7 @@
25 25
           <span>优惠券</span>
26 26
           <span>2张未使用</span>
27 27
         </div>
28
-        <div class="flex-item privilege-item">
28
+        <div class="flex-item privilege-item"  @click="toCard">
29 29
           <div class="img-box">
30 30
             <img src="../../../../common/icon/userCenter-icon-2.png" width="100%" height="100%" alt="">
31 31
           </div>
@@ -86,7 +86,6 @@ export default {
86 86
       this.user = this.userInfo.customer
87 87
       this.AccountInfo = JSON.parse(this.user.AccountInfo)
88 88
       this.headimgurl = this.AccountInfo.headimgurl
89
-      console.log(this.AccountInfo)
90 89
       if (this.user.Phone) {
91 90
         this.isLoading = false
92 91
       } else {
@@ -101,6 +100,9 @@ export default {
101 100
     },
102 101
     toVip () {
103 102
       this.$router.push({ name: 'vip' })
103
+    },
104
+    toCard () {
105
+      this.$router.push({ name: 'card' })
104 106
     }
105 107
   }
106 108
 }

+ 9
- 3
src/module/user/router.js Voir le fichier

@@ -11,6 +11,7 @@ import userCenter from './mainPage/userCenter/index' // 个人中心
11 11
 import bindMobile from './bindMobile/bindMobile' // 绑定手机号
12 12
 import lessonOrder from './lessonOrder/index' // 我的订单
13 13
 import vip from './vip/index' // vip卡说明
14
+import card from './card/index' // 卡
14 15
 
15 16
 Vue.use(Router)
16 17
 
@@ -61,9 +62,14 @@ const router = new Router({
61 62
     component: lessonOrder,
62 63
     children: []
63 64
   },{ // vip卡说明
64
-    path: '/lessonOrder',
65
-    name: 'lessonOrder',
66
-    component: lessonOrder,
65
+    path: '/vip',
66
+    name: 'vip',
67
+    component: vip,
68
+    children: []
69
+  },{ // 卡
70
+    path: '/card',
71
+    name: 'card',
72
+    component: card,
67 73
     children: []
68 74
   }],
69 75
   linkActiveClass: 'active',

+ 3
- 98
src/module/user/vip/index.vue Voir le fichier

@@ -1,108 +1,13 @@
1 1
 <template>
2 2
   <div class="mainPage">
3
-    vip
3
+    <h5>VIP卡使用说明</h5>
4
+    <div>1、VIP卡属于城的空间专属会员余额,可以在城的空间用于所有消费。</div>
5
+    <div>2、VIP卡内的余额不能提现。</div>
4 6
   </div>
5 7
 </template>
6 8
 
7 9
 <script>
8 10
 export default {
9
-  data () {
10
-    return {
11
-      hasPic: false,
12
-      pullUpLoad: true,
13
-      pullUpLoadThreshold: 40,
14
-      startY: 0,
15
-      isloading: true,
16
-      hasMore: true,
17
-      list: [
18
-        {
19
-          LocationName: '社交',
20
-          title: '小小外交官课程',
21
-          payType: '优惠券抵用',
22
-          time: '2018-7-18 12:19',
23
-          price: 199,
24
-          useType: '未使用'
25
-        },
26
-        {
27
-          LocationName: '社交',
28
-          title: '小小外交官课程',
29
-          payType: '优惠券抵用',
30
-          time: '2018-7-18 12:19',
31
-          price: 199,
32
-          useType: '已使用'
33
-        },
34
-        {
35
-          LocationName: '社交',
36
-          title: '小小外交官课程',
37
-          payType: '优惠券抵用',
38
-          time: '2018-7-18 12:19',
39
-          price: 199,
40
-          useType: '已失效'
41
-        },
42
-        {
43
-          LocationName: '社交',
44
-          title: '小小外交官课程',
45
-          payType: '优惠券抵用',
46
-          time: '2018-7-18 12:19',
47
-          price: 199,
48
-          useType: '已失效'
49
-        },
50
-        {
51
-          LocationName: '社交',
52
-          title: '小小外交官课程',
53
-          payType: '优惠券抵用',
54
-          time: '2018-7-18 12:19',
55
-          price: 199,
56
-          useType: '已失效'
57
-        },
58
-        {
59
-          LocationName: '社交',
60
-          title: '小小外交官课程',
61
-          payType: '优惠券抵用',
62
-          time: '2018-7-18 12:19',
63
-          price: 199,
64
-          useType: '已失效'
65
-        }
66
-      ]
67
-    }
68
-  },
69
-  components: {
70
-    scroll,
71
-    noMore
72
-  },
73
-  computed: {
74
-    pullUpLoadObj: function () {
75
-      return this.pullUpLoad
76
-        ? {
77
-          threshold: parseInt(this.pullUpLoadThreshold),
78
-          txt: {
79
-            more: this.pullUpLoadMoreTxt,
80
-            noMore: this.pullUpLoadNoMoreTxt
81
-          }
82
-        }
83
-        : false
84
-    }
85
-  },
86
-  methods: {
87
-    getList () {
88
-      this.list.length <= 8 ? this.hasMore = true : this.hasMore = false
89
-      if (this.hasMore) {
90
-        setTimeout(() => {
91
-          this.list.push({
92
-            LocationName: '社交',
93
-            title: '小小外交官课程',
94
-            payType: '优惠券抵用',
95
-            time: '2018-7-18 12:19',
96
-            price: 199,
97
-            useType: '已失效'
98
-          })
99
-        }, 1000)
100
-      } else {
101
-        this.$refs.scroll.forceUpdate()
102
-        return false
103
-      }
104
-    }
105
-  }
106 11
 }
107 12
 </script>
108 13
 

+ 12
- 0
src/module/user/vip/page.scss Voir le fichier

@@ -0,0 +1,12 @@
1
+.mainPage{
2
+  padding: .3rem .25rem;
3
+  box-sizing: border-box;
4
+  h5{
5
+    font-size: .16rem;
6
+    text-align: center;
7
+    padding-bottom: .2rem;
8
+  }
9
+  div{
10
+    font-size: .14rem;
11
+  }
12
+}