da367509 by simon

版本提交

1 parent a616f0f9
Showing 36 changed files with 790 additions and 56 deletions
1 let app = getApp();
2 Component({
3 properties: {
4 // 这里定义了innerText属性,属性值可以在组件使用时指定
5 innerText: {
6 type: String,
7 value: 'default value',
8 }
9 },
10 data: {
11 // 这里是一些组件内部数据
12 someData: {}
13 },
14 methods: {
15 // 这里是一个自定义方法
16 customMethod() {
17 this.triggerEvent('evtcomp', {
18 name: "_evt_custom"
19 })
20 },
21 // 隐藏蒙层
22 hideMask() {
23 this.triggerEvent('evtcomp', {
24 name: "_evt_hide_mask"
25 });
26 },
27 // 打电话
28 onPlayTooHandler() {
29 app.router.push({
30 openType: "reLaunch",
31 path: "index",
32 })
33 }
34 }
35 })
1 @import '../../assets/scss/mixins';
2 @import '../../assets/scss/utils';
3
4 .comp-item {
5 position: relative;
6 width: 654px;
7 height: 588px;
8
9 // background-color: wheat;
10 .bg {
11 position: absolute;
12 width: 654px;
13 height: 588px;
14 }
15
16 .space1 {
17 height: 400px;
18 }
19
20 .btn {
21 position: relative;
22 margin: 0 auto;
23 @include cb(300px, 80px);
24 }
25
26 .call{
27 width: 170px;
28 height: 40px;
29 position: absolute;
30 // background-color: wheat;
31 left: 300px;
32 top: 294px;
33 }
34 }
1 <view class="comp-item">
2 <image class="bg" src="../../image/oss/tips/tips-group-member-coop.png" mode="widthFix" />
3 <view class="space1"></view>
4 <view bindtap="onPlayTooHandler" class="btn">我也要玩</view>
5 <!-- <view bindtap="onCallHandler" class="call"></view> -->
6 </view>
1 Component({
2 properties: {
3 // 这里定义了innerText属性,属性值可以在组件使用时指定
4 innerText: {
5 type: String,
6 value: 'default value',
7 }
8 },
9 data: {
10 // 这里是一些组件内部数据
11 someData: {}
12 },
13 methods: {
14 // 这里是一个自定义方法
15 customMethod() {
16 this.triggerEvent('evtcomp', {
17 name: "_evt_custom"
18 })
19 },
20 // 隐藏蒙层
21 hideMask() {
22 this.triggerEvent('evtcomp', {
23 name: "_evt_hide_mask"
24 });
25 }
26 }
27 })
1 @import '../../assets/scss/mixins';
2 @import '../../assets/scss/utils';
3
4 $contentWidth:690px;
5
6 .comp-item {
7 @include border-top-radius(32px);
8 position: relative;
9 background-color: #fff;
10 // width: 750px;
11 max-height: 860px;
12
13 .cont {
14 // width: 750px;
15
16
17 .nav {
18 width: 690px;
19 height: 108px;
20 margin: 0 auto;
21 border-bottom: solid 1px #e0e0e0;
22 display: flex;
23 justify-content: space-between;
24 align-items: center;
25
26 .place {
27 padding: 0 12px 0 12px;
28 color: #333333;
29 font-size: 28px;
30
31 .city {
32 color: #b83138;
33 }
34 }
35
36 .area {
37
38 display: flex;
39 align-items: center;
40
41 &-item {
42 @include ellipsis(1);
43 display: flex;
44 justify-content: space-between;
45 align-items: center;
46 width: 168px;
47 height: 62px;
48 border-radius: 10px;
49 border: solid 1px #b83138;
50 color: #b93138;
51 font-size: 24px;
52 @extend .bb;
53 padding: 0 20px;
54 margin-right: 10px;
55
56 .icon {
57 width: 30px;
58 height: 17px;
59 }
60 }
61 }
62
63 .btn {
64 height: 42px;
65 line-height: 42px;
66 border-radius: 21px;
67 background-color: #f7eaeb;
68 color: #b83138;
69 padding: 0 20px;
70 font-size: 26px;
71 @extend .bb;
72 }
73 }
74
75 .nav1 {}
76
77 .nav2 {}
78
79 // 门店坐标
80 .pos {
81 max-height: 600px;
82
83 &-item {
84 margin: 0 auto;
85 padding: 0 30px;
86 @extend .bb;
87 min-height: 196px;
88 display: flex;
89 justify-content: space-between;
90 align-items: center;
91 border-bottom: solid 1px #e0e0e0;
92
93 .check {
94 width: 26px;
95 height: 20px;
96 padding-right: 24px;
97 @extend .fcc;
98 // @extend .bb;
99
100 .icon {
101 width: 26px;
102 height: 20px;
103 }
104 }
105
106 .info {
107 flex: 1;
108 @extend .bb;
109 padding: 0 40px 0 20px;
110
111 .tit {
112 display: flex;
113 align-items: center;
114 font-size: 32px;
115 color: #333333;
116
117 .name {}
118
119 .distance {
120 margin-left: 16px;
121 color: #999999;
122 font-size: 24px;
123 }
124 }
125
126 .address {
127 font-size: 20px;
128 color: #999999;
129 margin-top: 10px;
130 font-size: 28px;
131 }
132 }
133
134 .loc {
135 width: 80px;
136 text-align: center;
137 color: #b83138;
138 font-size: 24px;
139
140 .icon {
141 width: 40px;
142 height: 49px;
143 }
144 }
145
146
147 }
148 }
149
150 .btn-wrap {
151 padding: 36px 0;
152
153 // 按钮
154 .store-btn {
155 margin: 0 auto;
156 @include cb();
157 }
158 }
159
160 }
161 }
1 <view class="comp-item">
2 <view class="cont">
3 <!-- 导航 -->
4 <view wx:if="{{1>10}}" class="nav nav1">
5 <view class="place">
6 您当前所在城市:
7 <span class="city">深圳市</span>
8 </view>
9 <view class="btn">切换城市</view>
10 </view>
11 <view wx:else class="nav nav2">
12 <view class="area">
13 <view class="area-item">
14
15 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
16 </view>
17 <view class="area-item">
18
19 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
20 </view>
21 <view class="area-item">
22
23 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
24 </view>
25 </view>
26 <view class="btn">切换城市</view>
27 </view>
28 <!-- 门店列表 -->
29 <scroll-view scroll-y="{{true}}" class="pos">
30 <view class="pos-item">
31 <view wx:if="{{1>10}}" class="check">
32 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-check.png" />
33 </view>
34 <view class="info">
35 <view class="tit">
36 <view class="name">坂田天虹店</view>
37 <view class="distance">距您1.2公里</view>
38 </view>
39 <view class="address">地址:安徽省安庆市大观区集贤南路43号八佰伴购物中心一楼</view>
40 </view>
41 <view class="loc">
42 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-loc.png" />
43 <view class="txt">导航</view>
44 </view>
45 </view>
46 <view class="pos-item">
47 <view class="check">
48 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-check.png" />
49 </view>
50 <view class="info">
51 <view class="tit">
52 <view class="name">坂田天虹店</view>
53 <view class="distance">距您1.2公里</view>
54 </view>
55 <view class="address">地址:安徽省安庆市大观区集贤南路43号八佰伴购物中心一楼</view>
56 </view>
57 <view class="loc">
58 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-loc.png" />
59 <view class="txt">导航</view>
60 </view>
61 </view>
62 </scroll-view>
63 <!-- 按钮 -->
64 <view wx:if="{{1>10}}" class="btn-wrap">
65 <view bindtap="onSelectHandler" class="store-btn">选择门店</view>
66 </view>
67 </view>
68 </view>
1 let app = getApp();
2 Component({
3 properties: {
4 // 这里定义了innerText属性,属性值可以在组件使用时指定
5 innerText: {
6 type: String,
7 value: 'default value',
8 },
9 eleList: {
10 type: Object,
11 value: [],
12 },
13 eleVal: {
14 type: Number,
15 value: 0,
16 },
17 wishBillInfo: {
18 type: Object,
19 value: {},
20 },
21 wishInfo: {
22 type: Object,
23 value: {},
24 },
25 wishList: {
26 type: Object,
27 value: [],
28 },
29 // 1正常(有库存) 2无库存
30 status: {
31 type: Number,
32 status: 2
33 }
34 },
35 data: {
36 // 这里是一些组件内部数据
37 someData: {}
38 },
39 methods: {
40 // 这里是一个自定义方法
41 customMethod() {
42 this.triggerEvent('evtcomp', {
43 name: "_evt_custom"
44 })
45 },
46 // 隐藏蒙层
47 hideMask() {
48 this.triggerEvent('evtcomp', {
49 name: "_evt_hide_mask"
50 });
51 },
52 // 自提 要带上参数
53 toSelfLiftHandler() {
54 this.hideMask();
55 app.router.push({
56 path: "prizeDetail",
57 query: this.properties.wishInfo
58 })
59 },
60 // 邮寄
61 toUserTableHandler() {
62 this.hideMask();
63 app.router.push({
64 path: "userTable",
65 })
66 },
67
68 }
69 })
1 @import '../../assets/scss/mixins';
2 @import '../../assets/scss/utils';
3
4 .comp-item {
5 position: relative;
6 width: 654px;
7 height: 732px;
8
9 font-weight: 300;
10
11 // background-color: wheat;
12 .bg {
13 position: absolute;
14 width: 654px;
15 height: 732px;
16 }
17
18 .cont {
19 position: relative;
20 text-align: center;
21 color: #333333;
22
23 .space1 {
24 height: 80px;
25 }
26
27 .tit {
28 color: #ba3038;
29 font-size: 36px;
30 }
31
32 .name {
33 margin-top: 8px;
34 font-size: 28px;
35 color: #333333;
36 }
37
38 .stock {
39 text-align: center;
40 margin-top: 24px;
41 }
42
43 // 有库存
44 .stock1 {
45 margin: 22px auto 0;
46 font-size: 24px;
47 width: 410px;
48 .tips {
49 color: #333333;
50 }
51
52 .tips2 {
53 color: #999999;
54 margin-top: 16px;
55 }
56 }
57
58 // 无库存
59 .stock2 {
60 .tips {
61 height: auto;
62 color: #999999;
63 font-size: 24px;
64 }
65 }
66
67 }
68
69
70 .btn-wrap {
71 position: absolute;
72 left: 0;
73 right: 0;
74 bottom: 100px;
75 display: flex;
76 justify-content: center;
77 padding: 0 50px;
78 @extend .bb;
79
80 .btn {
81 margin: 0 auto;
82 @include cb(234px, 64px);
83 }
84
85 .btn2 {
86 border: solid 1px #b83138;
87 background: transparent;
88 color: #ba3039;
89 }
90 }
91 }
92
93 // 心愿
94 .wish {
95 position: relative;
96 margin: 0 auto 0;
97 display: flex;
98 // justify-content: space-between;
99 justify-content: center;
100 @extend .bb;
101 // padding-top: 116px;
102 padding: 40px 80px 0;
103
104 &-item {
105 position: relative;
106 text-align: center;
107
108 .display {
109 position: relative;
110 height: 180px;
111 height: 180px;
112 border-radius: 90px;
113 background-image: radial-gradient(circle at 0 0, #ffffff, #f2e6e6);
114 @extend .fcc;
115
116 .prod {
117 max-width: 200px;
118 max-height: 200px;
119 // margin-bottom: 10px;
120 }
121
122 .close {
123 width: 30px;
124 height: 30px;
125 position: absolute;
126 bottom: 0;
127 right: 0;
128 }
129 }
130
131 .name {
132 width: 160px;
133 margin: 8px auto 0;
134 color: #333333;
135 font-size: 20px;
136 // font-weight: 300;
137 }
138
139 .val {
140 @extend .fcc;
141 color: #b93138;
142 font-size: 20px;
143 margin-top: 12px;
144
145 .icon {
146 margin-left: 6px;
147 width: 11px;
148 height: 18px;
149 }
150 }
151 }
152 }
1 <view class="comp-item">
2 <image class="bg" src="../../image/oss/tips/tips-border-big.png" mode="widthFix" />
3 <view class="cont">
4 <view class="space1"></view>
5 <view class="tit">· 恭喜获得 ·</view>
6 <view class="name">{{wishInfo.prizeName}}</view>
7 <!-- 心愿容器 -->
8 <view wx:if="{{wishInfo}}" class="wish">
9 <view class="wish-item">
10 <view class="display">
11 <image wx:if="{{wishInfo.tag}}" class="prod" mode="aspectFit" src="../../image/prize/prize-{{wishInfo.tag}}.png" />
12 </view>
13 </view>
14 </view>
15 <!-- 有库存 -->
16 <view wx:if="{{status == 1}}" class="stock stock1">
17 <view class="tips">您可选择直接邮寄到家,或到附近丸美柜台自提</view>
18 <view class="tips2">ps:选择之后不可修改哦!</view>
19 </view>
20 <!-- 无库存 -->
21 <view wx:else class="stock stock2">
22 <text class="tips">目前线上库存已不足\n需要女神亲自到丸美柜台领取哦!</text>
23 </view>
24 </view>
25 <view class="btn-wrap">
26 <view bindtap="toSelfLiftHandler" class="btn">门店自提</view>
27 <view bindtap="toUserTableHandler" wx:if="{{status == 1}}" class="btn">直接邮寄</view>
28 </view>
29 </view>

2.99 KB | W: | H:

4.44 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
10 let app = getApp(); 10 let app = getApp();
11 Page({ 11 Page({
12 data: { 12 data: {
13 groupMemberCoopVisible: true,
13 options: null, 14 options: null,
14 wishInfo: {}, 15 wishInfo: {},
15 wishList: [] 16 wishList: []
......
1 { 1 {
2 "navigationBarTitleText": "好友助力" 2 "navigationBarTitleText": "好友助力",
3 "usingComponents": {
4 "tips-group-member-coop-comp": "../../component/tips-group-member-coop-comp/tips-group-member-coop-comp",
5 "van-popup": "../../ui/vant-weapp/popup/index"
6 }
3 } 7 }
......
...@@ -68,3 +68,6 @@ ...@@ -68,3 +68,6 @@
68 </view> 68 </view>
69 </view> 69 </view>
70 </view> 70 </view>
71 <van-popup show="{{ groupMemberCoopVisible }}">
72 <tips-group-member-coop-comp bind:evtcomp="evtcomp"></tips-group-member-coop-comp>
73 </van-popup>
......
...@@ -5,6 +5,7 @@ import Date from '../../utils/date'; ...@@ -5,6 +5,7 @@ import Date from '../../utils/date';
5 let app = getApp(); 5 let app = getApp();
6 Page({ 6 Page({
7 data: { 7 data: {
8 nearbyStoreVisible: true,
8 userInfo: {}, 9 userInfo: {},
9 used: false, //优惠券已使用,另外的样式 10 used: false, //优惠券已使用,另外的样式
10 couponInfo: { 11 couponInfo: {
...@@ -31,7 +32,6 @@ Page({ ...@@ -31,7 +32,6 @@ Page({
31 }) 32 })
32 this.initData(); 33 this.initData();
33 }) 34 })
34
35 }, 35 },
36 initData() { 36 initData() {
37 // this.setData({ 37 // this.setData({
...@@ -42,6 +42,11 @@ Page({ ...@@ -42,6 +42,11 @@ Page({
42 onNearbyStoreHandler() { 42 onNearbyStoreHandler() {
43 43
44 }, 44 },
45 hideMask() {
46 this.setData({
47 nearbyStoreVisible: false
48 })
49 },
45 // 子组件事件 50 // 子组件事件
46 evtcomp(evt) { 51 evtcomp(evt) {
47 let { 52 let {
......
1 { 1 {
2 "navigationBarTitleText": "券详情", 2 "navigationBarTitleText": "券详情",
3 "usingComponents": { 3 "usingComponents": {
4 "use-notice-comp": "../../component/use-notice-comp/use-notice-comp" 4 "use-notice-comp": "../../component/use-notice-comp/use-notice-comp",
5 "tips-nearby-store-comp": "../../component/tips-nearby-store-comp/tips-nearby-store-comp",
6 "van-popup": "../../ui/vant-weapp/popup/index"
5 } 7 }
6 } 8 }
......
...@@ -35,3 +35,6 @@ ...@@ -35,3 +35,6 @@
35 </view> 35 </view>
36 </view> 36 </view>
37 </view> 37 </view>
38 <van-popup show="{{ nearbyStoreVisible }}" position="bottom" bind:click-overlay="hideMask">
39 <tips-nearby-store-comp bind:evtcomp="evtcomp" wish-info="{{curWish}}" status="{{status}}"></tips-nearby-store-comp>
40 </van-popup>
......
...@@ -17,7 +17,7 @@ Page({ ...@@ -17,7 +17,7 @@ Page({
17 tipsWishVisible: false, 17 tipsWishVisible: false,
18 tipsShakeVisible: false, 18 tipsShakeVisible: false,
19 tipsCommonVisible: false, 19 tipsCommonVisible: false,
20 tipsCreateCompleteVisible: true, 20 tipsCreateCompleteVisible: false,
21 tipsInnerText: "", 21 tipsInnerText: "",
22 curStatus: 1, // 当前场景 22 curStatus: 1, // 当前场景
23 candidate: [], // 心愿候选列表 23 candidate: [], // 心愿候选列表
......
...@@ -21,26 +21,25 @@ Page({ ...@@ -21,26 +21,25 @@ Page({
21 }, 21 },
22 onShareAppMessage() {}, 22 onShareAppMessage() {},
23 onLoad(options) { 23 onLoad(options) {
24 let couponInfo = options;
25 couponInfo.startDateStr = new Date(couponInfo.startDate).toString("yyyy.MM.dd");
26 couponInfo.endDateStr = new Date(couponInfo.endDate).toString("yyyy.MM.dd");
27 this.setData({
28 couponInfo: couponInfo
29 })
30 console.log("couponInfo:", couponInfo);
31 this.initData();
32 },
33 initData() {
24 app.queryIndex().then((result) => { 34 app.queryIndex().then((result) => {
25 let couponInfo = this.data.couponInfo;
26 couponInfo.startDateStr = new Date(couponInfo.startDate).toString("yyyy.MM.dd");
27 couponInfo.endDateStr = new Date(couponInfo.endDate).toString("yyyy.MM.dd");
28 this.setData({ 35 this.setData({
29 userInfo: app.globalData.userInfo, 36 userInfo: app.globalData.userInfo
30 couponInfo: couponInfo
31 }) 37 })
32 this.initData();
33 }) 38 })
34
35 },
36 initData() {
37 // this.setData({
38 // couponInfo: app.globalData.curCoupon
39 // })
40 }, 39 },
41 // 查看可用门店 40 // 查看可用门店
42 onNearbyStoreHandler() { 41 onNearbyStoreHandler(evt) {
43 42 console.log("onNearbyStoreHandler couponInfo:", this.data.couponInfo);
44 }, 43 },
45 // 子组件事件 44 // 子组件事件
46 evtcomp(evt) { 45 evtcomp(evt) {
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
41 41
42 .main { 42 .main {
43 .top-space { 43 .top-space {
44 height: 52px; 44 height: 40px;
45 } 45 }
46 46
47 .content { 47 .content {
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
59 position: relative; 59 position: relative;
60 margin: 32px auto 0; 60 margin: 32px auto 0;
61 width: 620px; 61 width: 620px;
62 height: 722px; 62 height: 859px;
63 63
64 .ebg { 64 .ebg {
65 position: absolute; 65 position: absolute;
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
68 top: 0; 68 top: 0;
69 margin: 0 auto; 69 margin: 0 auto;
70 width: 620px; 70 width: 620px;
71 height: 722px; 71 height: 859px;
72 } 72 }
73 73
74 .cont { 74 .cont {
...@@ -80,12 +80,13 @@ ...@@ -80,12 +80,13 @@
80 80
81 // 二维码 81 // 二维码
82 .qrcode { 82 .qrcode {
83 width: 340px; 83 width: 300px;
84 height: 340px; 84 height: 300px;
85 background-color: wheat; 85 background-color: wheat;
86 margin: 0 auto; 86 margin: 0 auto;
87 } 87 }
88 88
89 // 数字码
89 .code { 90 .code {
90 margin: 24px auto 0; 91 margin: 24px auto 0;
91 border-radius: 30px; 92 border-radius: 30px;
...@@ -95,6 +96,76 @@ ...@@ -95,6 +96,76 @@
95 font-size: 38px; 96 font-size: 38px;
96 } 97 }
97 98
99 // 预约按钮
100 .reservation-btn {
101 @include cb(300px, 80px);
102 margin: 74px auto 0;
103 font-size: 32px;
104 }
105
106 // 预约成功
107 .reservation-complete {
108 position: relative;
109 width: 520px;
110 margin: 32px auto 0;
111
112 .tips {
113 text-align: center;
114 font-size: 24px;
115 color: #ba373e;
116 }
117
118 .line {
119 margin: 24px auto 0;
120 width: 100%;
121 height: 1px;
122 background-color: #f0d6d7;
123 }
124
125 .pos {
126 margin: 20px auto 0;
127 display: flex;
128 justify-content: space-between;
129
130 .info {
131 @extend .bb;
132 padding: 0 40px 0 20px;
133
134 .tit {
135 display: flex;
136 align-items: center;
137 font-size: 24px;
138 color: #333333;
139
140 .name {}
141
142 .distance {
143 margin-left: 16px;
144 color: #999999;
145 }
146 }
147
148 .address {
149 font-size: 20px;
150 color: #999999;
151 margin-top: 10px;
152 }
153 }
154
155 .loc {
156 width: 80px;
157 text-align: center;
158 color: #b83138;
159 font-size: 24px;
160
161 .icon {
162 width: 40px;
163 height: 49px;
164 }
165 }
166 }
167 }
168
98 .top { 169 .top {
99 display: flex; 170 display: flex;
100 margin: 0 auto 36px; 171 margin: 0 auto 36px;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
11 <view class="content"> 11 <view class="content">
12 <!-- 奖品 --> 12 <!-- 奖品 -->
13 <view class="prize"> 13 <view class="prize">
14 <image class="ebg" mode="widthFix" src="../../image/oss/coupon-detail/cd-c1.png" /> 14 <image class="ebg" mode="widthFix" src="../../image/oss/coupon-detail/cd-c2.png" />
15 <view class="cont {{used?'used':''}}"> 15 <view class="cont {{used?'used':''}}">
16 <view class="space1"></view> 16 <view class="space1"></view>
17 <view class="top"> 17 <view class="top">
...@@ -26,16 +26,34 @@ ...@@ -26,16 +26,34 @@
26 </view> 26 </view>
27 </view> 27 </view>
28 <!-- 二维码 --> 28 <!-- 二维码 -->
29 <view class="qrcode"></view> 29 <view class="qrcode"></view>
30 <view class="code">{{couponInfo.couponCode}}</view> 30 <view class="code">{{couponInfo.couponCode}}</view>
31 <!-- 预约自提按钮 -->
32 <view wx:if="{{1<10}}" bindtap="onNearbyStoreHandler" class="reservation-btn">预约自提门店</view>
33 <!-- 预约成功 -->
34 <view wx:else class="reservation-complete">
35 <view class="tips">您已成功预约,请在有效期内前往领取</view>
36 <view class="line"></view>
37 <view class="pos">
38 <view class="info">
39 <view class="tit">
40 <view class="name">坂田天虹店</view>
41 <view class="distance">距您1.2公里</view>
42 </view>
43 <view class="address">地址:安徽省安庆市大观区集贤南路43号八佰伴购物中心一楼</view>
44 </view>
45 <view class="loc">
46 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-loc.png" />
47 <view class="txt">导航</view>
48 </view>
49 </view>
50 </view>
31 </view> 51 </view>
32 </view> 52 </view>
33 <!-- 使用说明 --> 53 <!-- 使用说明 -->
34 <view class="use-notice"> 54 <view class="use-notice">
35 <use-notice-comp></use-notice-comp> 55 <use-notice-comp></use-notice-comp>
36 </view> 56 </view>
37 <!-- 查看门店 -->
38 <view bindtap="onNearbyStoreHandler" class="store-btn">查看可用门店</view>
39 </view> 57 </view>
40 </view> 58 </view>
41 </view> 59 </view>
......
1 let app = getApp(); 1 let app = getApp();
2 Page({ 2 Page({
3 data: {}, 3 data: {
4 tableIndex: 0, //0填写 1回显
5 receiverName: "",
6 receiverMobile: "",
7 receiverAddress: "",
8 region: [],
9 regionStr: "",
10 prize: {}
11 },
4 onShareAppMessage() {}, 12 onShareAppMessage() {},
5 onLoad(options) {}, 13 onLoad(options) {},
6
7 /** 14 /**
8 * 提交表单 15 * 提交表单
9 * @param {*} evt 16 * @param {*} evt
10 */ 17 */
11 onSubmitHandler(evt) { 18 onSubmitHandler(evt) {},
12
13 },
14 /** 19 /**
15 * 返回心愿单页面 20 * 返回心愿单页面
16 * @param {*} evt 21 * @param {*} evt
...@@ -21,6 +26,17 @@ Page({ ...@@ -21,6 +26,17 @@ Page({
21 path: "wish" 26 path: "wish"
22 }) 27 })
23 }, 28 },
29 bindRegionChange(e) {
30 let region = e.detail.value;
31 let regionStr = "";
32 if (region.length > 0) {
33 regionStr = region.join(",");
34 }
35 this.setData({
36 region,
37 regionStr
38 })
39 },
24 // 子组件事件 40 // 子组件事件
25 evtcomp(evt) { 41 evtcomp(evt) {
26 let { 42 let {
......
...@@ -163,7 +163,7 @@ $iptHeight:80px; ...@@ -163,7 +163,7 @@ $iptHeight:80px;
163 display: flex; 163 display: flex;
164 justify-content: center; 164 justify-content: center;
165 align-items: center; 165 align-items: center;
166 width: 150px; 166 width: 140px;
167 @extend .bb; 167 @extend .bb;
168 padding: 0 20px; 168 padding: 0 20px;
169 169
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 <view class="table"> 22 <view class="table">
23 <image class="ebg" mode="widthFix" src="../../image/oss/user-table/user-table-c2.png" /> 23 <image class="ebg" mode="widthFix" src="../../image/oss/user-table/user-table-c2.png" />
24 <!-- 编辑框 --> 24 <!-- 编辑框 -->
25 <view wx:if="{{1>10}}" class="border edit"> 25 <view wx:if="{{tableIndex == 0}}" class="border edit">
26 <view class="space1"></view> 26 <view class="space1"></view>
27 <view class="tips">*请填写您的邮寄地址,我们将为您送出以上礼品</view> 27 <view class="tips">*请填写您的邮寄地址,我们将为您送出以上礼品</view>
28 <view class="form"> 28 <view class="form">
...@@ -36,29 +36,31 @@ ...@@ -36,29 +36,31 @@
36 </view> 36 </view>
37 <view class="ipt"> 37 <view class="ipt">
38 <view class="label">区域</view> 38 <view class="label">区域</view>
39 <view class="input area"> 39 <picker class="form-detail-item-label" mode="region" bindchange="bindRegionChange" value="{{region}}">
40 <view class="area-item area-item2"> 40 <view class="input area">
41 41 <view class="area-item area-item2">
42 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" /> 42
43 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
44 </view>
45 <view class="line"></view>
46 <view class="area-item area-item2">
47
48 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
49 </view>
50 <view class="line"></view>
51 <view class="area-item area-item2">
52
53 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
54 </view>
43 </view> 55 </view>
44 <view class="line"></view> 56 </picker>
45 <view class="area-item area-item2">
46
47 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
48 </view>
49 <view class="line"></view>
50 <view class="area-item area-item2">
51
52 <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
53 </view>
54 </view>
55 </view> 57 </view>
56 <view class="ipt ipt2"> 58 <view class="ipt ipt2">
57 <view class="label">地址</view> 59 <view class="label">地址</view>
58 <textarea class="input textarea" placeholder="请输入"></textarea> 60 <textarea class="input textarea" placeholder="请输入"></textarea>
59 </view> 61 </view>
60 </view> 62 </view>
61 <view bindtap="onSubmitHandler" class="submit-btn">确认提交</view> 63 <view bindtap="onSubmitHandler" class="submit-btn">确认提交</view>
62 </view> 64 </view>
63 <!-- 结果显示 --> 65 <!-- 结果显示 -->
64 <view wx:else class="border result"> 66 <view wx:else class="border result">
......
...@@ -11,10 +11,13 @@ let app = getApp(); ...@@ -11,10 +11,13 @@ let app = getApp();
11 Page({ 11 Page({
12 data: { 12 data: {
13 tipsRuleVisible: false, 13 tipsRuleVisible: false,
14 tipsPirzeVisible: false,
14 userInfo: {}, 15 userInfo: {},
15 wishInfo: {}, 16 wishInfo: {},
16 wishList: [], 17 wishList: [],
17 helperInfo: {} 18 helperInfo: {},
19 curWish: {},
20 status: 1, // 1正常(有库存) 2无库存
18 }, 21 },
19 onShareAppMessage() {}, 22 onShareAppMessage() {},
20 onLoad(options) { 23 onLoad(options) {
...@@ -35,11 +38,20 @@ Page({ ...@@ -35,11 +38,20 @@ Page({
35 onGetGiftHandler(evt) { 38 onGetGiftHandler(evt) {
36 let curData = getBindtapData(evt); 39 let curData = getBindtapData(evt);
37 console.log("curData:", curData); 40 console.log("curData:", curData);
41 this.setData({
42 curWish: curData,
43 tipsPirzeVisible: true,
44 })
45 return;
38 app.poster({ 46 app.poster({
39 url: app.api.wishbillGiftAccept, 47 url: app.api.wishbillGiftAccept,
40 data: curData 48 data: curData
41 }).then((result) => { 49 }).then((result) => {
42 // let curData 50 // let curData
51 this.setData({
52 curWish: curData,
53 tipsPirzeVisible: true,
54 })
43 }); 55 });
44 }, 56 },
45 /** 57 /**
...@@ -121,6 +133,12 @@ Page({ ...@@ -121,6 +133,12 @@ Page({
121 }) 133 })
122 }); 134 });
123 }, 135 },
136 hideMask() {
137 this.setData({
138 tipsRuleVisible: false,
139 tipsPirzeVisible: false,
140 })
141 },
124 // 子组件事件 142 // 子组件事件
125 evtcomp(evt) { 143 evtcomp(evt) {
126 let { 144 let {
...@@ -130,9 +148,7 @@ Page({ ...@@ -130,9 +148,7 @@ Page({
130 switch (name) { 148 switch (name) {
131 149
132 case "_evt_hide_mask": 150 case "_evt_hide_mask":
133 this.setData({ 151 this.hideMask();
134 tipsRuleVisible: false
135 })
136 break; 152 break;
137 153
138 default: 154 default:
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
3 "usingComponents": { 3 "usingComponents": {
4 "authorize-comp": "../../component/authorize-comp/authorize-comp", 4 "authorize-comp": "../../component/authorize-comp/authorize-comp",
5 "tips-rule-comp": "../../component/tips-rule-comp/tips-rule-comp", 5 "tips-rule-comp": "../../component/tips-rule-comp/tips-rule-comp",
6 "tips-prize-comp": "../../component/tips-prize-comp/tips-prize-comp",
6 "van-popup": "../../ui/vant-weapp/popup/index" 7 "van-popup": "../../ui/vant-weapp/popup/index"
7 } 8 }
8 } 9 }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 <view class="number">{{wishInfo.member.mobile}}</view> 20 <view class="number">{{wishInfo.member.mobile}}</view>
21 <view bindtap="onMyCardHandler" class="mycard">我的卡券</view> 21 <view bindtap="onMyCardHandler" class="mycard">我的卡券</view>
22 </view> 22 </view>
23 <!-- jiangp1 --> 23 <!-- 奖品 -->
24 <view class="wish"> 24 <view class="wish">
25 <view wx:for="{{wishList}}" wx:key="{{index}}" class="wish-item"> 25 <view wx:for="{{wishList}}" wx:key="{{index}}" class="wish-item">
26 <view class="display"> 26 <view class="display">
...@@ -88,3 +88,6 @@ ...@@ -88,3 +88,6 @@
88 <van-popup show="{{ tipsRuleVisible }}"> 88 <van-popup show="{{ tipsRuleVisible }}">
89 <tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp> 89 <tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp>
90 </van-popup> 90 </van-popup>
91 <van-popup show="{{ tipsPirzeVisible }}">
92 <tips-prize-comp bind:evtcomp="evtcomp" wish-info="{{curWish}}" status="{{status}}"></tips-prize-comp>
93 </van-popup>
......