e56c47ce by simon

版本提交

1 parent 64dfaf21
Showing 31 changed files with 500 additions and 135 deletions
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <view class="wish"> 12 <view class="wish">
13 <view class="wish-item"> 13 <view class="wish-item">
14 <view class="display"> 14 <view class="display">
15 <image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_3.png" /> 15 <image class="prod" mode="aspectFit" src="../../image/prize/prize-3.png" />
16 <!-- <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> --> 16 <!-- <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> -->
17 </view> 17 </view>
18 <!-- <view class="name">丸美弹力蛋白凝时紧致乳</view> --> 18 <!-- <view class="name">丸美弹力蛋白凝时紧致乳</view> -->
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 </view> 23 </view>
24 <view class="wish-item"> 24 <view class="wish-item">
25 <view class="display"> 25 <view class="display">
26 <image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_2.png" /> 26 <image class="prod" mode="aspectFit" src="../../image/prize/prize-2.png" />
27 <!-- <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> --> 27 <!-- <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> -->
28 </view> 28 </view>
29 <!-- <view class="name">丸美弹力蛋白凝时紧致乳</view> --> 29 <!-- <view class="name">丸美弹力蛋白凝时紧致乳</view> -->
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
34 </view> 34 </view>
35 <view class="wish-item"> 35 <view class="wish-item">
36 <view class="display"> 36 <view class="display">
37 <image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_1.png" /> 37 <image class="prod" mode="aspectFit" src="../../image/prize/prize-1.png" />
38 <!-- <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> --> 38 <!-- <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> -->
39 </view> 39 </view>
40 <!-- <view class="name">丸美弹力蛋白凝时紧致乳</view> --> 40 <!-- <view class="name">丸美弹力蛋白凝时紧致乳</view> -->
......
...@@ -5,11 +5,17 @@ Component({ ...@@ -5,11 +5,17 @@ Component({
5 innerText: { 5 innerText: {
6 type: String, 6 type: String,
7 value: 'default value', 7 value: 'default value',
8 },
9 userInfo:{
10 type: Object,
11 value: {
12 nickname:""
13 }
8 } 14 }
9 }, 15 },
10 data: { 16 data: {
11 // 这里是一些组件内部数据 17 // 这里是一些组件内部数据
12 someData: {} 18 someData: {},
13 }, 19 },
14 methods: { 20 methods: {
15 // 这里是一个自定义方法 21 // 这里是一个自定义方法
...@@ -24,12 +30,8 @@ Component({ ...@@ -24,12 +30,8 @@ Component({
24 this.triggerEvent('_evt_hide_mask', { 30 this.triggerEvent('_evt_hide_mask', {
25 name: "_evt_custom" 31 name: "_evt_custom"
26 }) 32 })
27 // app.router.push({
28 // path:"question"
29 // })
30 app.router.push({ 33 app.router.push({
31 openType: "reLaunchs", 34 path:"question"
32 path: "wish"
33 }) 35 })
34 } 36 }
35 } 37 }
......
...@@ -31,5 +31,6 @@ ...@@ -31,5 +31,6 @@
31 font-weight: 300; 31 font-weight: 300;
32 color: #ba3138; 32 color: #ba3138;
33 top: 152px; 33 top: 152px;
34 @include ellipsis(1);
34 } 35 }
35 } 36 }
......
1 <view class="comp-item"> 1 <view class="comp-item">
2 <image class="bg" src="../../image/oss/tips/tips-new.png" mode="widthFix" /> 2 <image class="bg" src="../../image/oss/tips/tips-new.png" mode="widthFix" />
3 <view class="nickname">nickname</view> 3 <view class="nickname">{{userInfo.nickname}}</view>
4 <view class="space1"></view> 4 <view class="space1"></view>
5 <view bindtap="toQeustionHandler" class="btn">马上答题</view> 5 <view bindtap="toQeustionHandler" class="btn">马上答题</view>
6 </view> 6 </view>
......
...@@ -4,6 +4,10 @@ Component({ ...@@ -4,6 +4,10 @@ Component({
4 innerText: { 4 innerText: {
5 type: String, 5 type: String,
6 value: 'default value', 6 value: 'default value',
7 },
8 wishList: {
9 type: Object,
10 value: [],
7 } 11 }
8 }, 12 },
9 data: { 13 data: {
......
...@@ -3,36 +3,36 @@ ...@@ -3,36 +3,36 @@
3 <view class="cont"> 3 <view class="cont">
4 <view class="space1"></view> 4 <view class="space1"></view>
5 <view class="wish"> 5 <view class="wish">
6 <view class="row"> 6 <view wx:if="{{wishList[0]}}" class="row">
7 <view class="wish-item"> 7 <view class="wish-item">
8 <view class="prod"> 8 <view class="prod">
9 <image mode="widthFix" src="../../image/oss/prize/prize_1.png" /> 9 <image mode="widthFix" src="../../image/prize/prize-{{wishList[0].tag}}.png" />
10 </view> 10 </view>
11 <view class="desc"> 11 <view class="desc">
12 <view class="name">丸美弹力蛋白凝时紧致乳</view> 12 <view class="name">{{wishList[0].productName}}</view>
13 <view class="val">需弹力值:5480</view> 13 <view class="val">需弹力值:{{wishList[0].conditionElasticValue}}</view>
14 </view> 14 </view>
15 </view> 15 </view>
16 </view> 16 </view>
17 <view class="row row2"> 17 <view wx:if="{{wishList[1]}}" class="row row2">
18 <view class="wish-item "> 18 <view class="wish-item ">
19 <view class="desc"> 19 <view class="desc">
20 <view class="name">丸美弹力蛋白凝时紧致乳</view> 20 <view class="name">{{wishList[1].productName}}</view>
21 <view class="val">需弹力值:5480</view> 21 <view class="val">需弹力值:{{wishList[1].conditionElasticValue}}</view>
22 </view> 22 </view>
23 <view class="prod"> 23 <view class="prod">
24 <image mode="widthFix" src="../../image/oss/prize/prize_2.png" /> 24 <image mode="widthFix" src="../../image/prize/prize-{{wishList[1].tag}}.png" />
25 </view> 25 </view>
26 </view> 26 </view>
27 </view> 27 </view>
28 <view class="row"> 28 <view wx:if="{{wishList[2]}}" class="row">
29 <view class="wish-item"> 29 <view class="wish-item">
30 <view class="prod"> 30 <view class="prod">
31 <image mode="widthFix" src="../../image/oss/prize/prize_3.png" /> 31 <image mode="widthFix" src="../../image/prize/prize-{{wishList[2].tag}}.png" />
32 </view> 32 </view>
33 <view class="desc"> 33 <view class="desc">
34 <view class="name">丸美弹力蛋白凝时紧致乳</view> 34 <view class="name">{{wishList[2].productName}}</view>
35 <view class="val">需弹力值:5480</view> 35 <view class="val">需弹力值:{{wishList[2].conditionElasticValue}}</view>
36 </view> 36 </view>
37 </view> 37 </view>
38 </view> 38 </view>
......
1 let productMap = { 1 /**
2 "P000000000000000000000000000001": { 2 * tips:
3 "name": "丸美白色之恋纯白淡黑眼霜20g", 3 * tag:{
4 "tag": "1", 4 * tag-1 top-left top:-20 left:-20
5 * tag-2 top-right top:-20 left:+20
6 * tag-2 bottom-left top:+20 left:-20
7 * tag-4 bottom-right top:+20 left:+20
8 * }
9 */
10
11 let mapFix = {
12 "top-left": {
13 fixLeft: 20 - 208,
14 fixTop: 20 - 334,
5 }, 15 },
6 "P000000000000000000000000000002": { 16 "top-right": {
7 "name": "丸美纯色之恋光透精华液30ml", 17 fixLeft: 20,
8 "tag": "2", 18 fixTop: 20 - 334,
9 }, 19 },
10 "P000000000000000000000000000003": { 20 "bottom-left": {
11 "name": "丸美弹力蛋白眼精华素10g+10g", 21 fixLeft: 20 - 208,
12 "tag": "3", 22 fixTop: 20,
13 }, 23 },
14 "P000000000000000000000000000004": { 24 "bottom-right": {
15 "name": "丸美巧克力青春丝滑洁面啫喱120g", 25 fixLeft: 20,
16 "tag": "4", 26 fixTop: 20,
17 }, 27 },
18 "P000000000000000000000000000005": { 28 }
19 "name": "丸美巧克力青春丝滑毛孔隐形精华露35ml", 29
20 "tag": "5", 30 let productMap = {
31 // 场景1
32 "P000000000000000000000000000002": {
33 name: "丸美白色之恋纯白淡黑眼霜20g",
34 tag: 1,
35 sence: 1,
36 point: {
37 left: 111,
38 top: 258,
39 },
40 tips: {
41 type: "top-right",
42 point: mapFix["top-right"],
43 }
21 }, 44 },
22 "P000000000000000000000000000006": { 45
23 "name": "丸美巧克力青春丝滑眼乳霜25g", 46 "P000000000000000000000000000003": {
24 "tag": "6", 47 name: "丸美巧克力青春丝滑眼乳霜25g",
48 tag: 7,
49 sence: 1,
50 point: {
51 left: 337,
52 top: 350,
53 },
54 tips: {
55 type: "top-right",
56 point: mapFix["top-right"],
57 }
25 }, 58 },
26 "P000000000000000000000000000007": { 59
27 "name": "丸美巧克力青春丝滑水190ml", 60 "P000000000000000000000000000001": {
28 "tag": "7", 61 name: "丸美弹力蛋白眼精华素10g+10g",
62 tag: 3,
63 sence: 1,
64 point: {
65 left: 558,
66 top: 437,
67 },
68 tips: {
69 type: "top-left",
70 point: mapFix["top-left"],
71 }
29 }, 72 },
73
74 // 场景2
75
30 "P000000000000000000000000000008": { 76 "P000000000000000000000000000008": {
31 "name": "丸美雪绒花纯净保湿咕嘟咕嘟菁华露80ml", 77 name: "丸美纯色之恋光透精华液30ml",
32 "tag": "8", 78 tag: 2,
79 sence: 2,
80 point: {
81 left: 0,
82 top: 0,
83 },
84 tips: {
85 type: "top-left",
86 point: mapFix["top-left"],
87 }
33 }, 88 },
34 "P000000000000000000000000000009": { 89
35 "name": "丸美雪绒花纯净保湿洁面乳120g", 90 "P000000000000000000000000000007": {
36 "tag": "9", 91 name: "丸美巧克力青春丝滑洁面啫喱120g",
92 tag: 4,
93 sence: 2,
94 point: {
95 left: 0,
96 top: 0,
97 },
98 tips: {
99 type: "top-left",
100 point: mapFix["top-left"],
101 }
37 }, 102 },
38 "P000000000000000000000000000010": { 103 "P000000000000000000000000000010": {
39 "name": "丸美雪绒花纯净保湿深润霜50g", 104 name: "丸美巧克力青春丝滑毛孔隐形精华露35ml",
40 "tag": "10", 105 tag: 5,
106 sence: 2,
107 point: {
108 left: 0,
109 top: 0,
110 },
111 tips: {
112 type: "top-left",
113 point: mapFix["top-left"],
114 }
115 },
116 "P000000000000000000000000000004": {
117 name: "丸美巧克力青春丝滑水190ml",
118 tag: 6,
119 sence: 2,
120 point: {
121 left: 0,
122 top: 0,
123 },
124 tips: {
125 type: "top-left",
126 point: mapFix["top-left"],
127 }
41 }, 128 },
42 129
130 "P000000000000000000000000000006": {
131 name: "丸美雪绒花纯净保湿咕嘟咕嘟菁华露80ml",
132 tag: 8,
133 sence: 3,
134 point: {
135 left: 0,
136 top: 0,
137 },
138 tips: {
139 type: "top-left",
140 point: mapFix["top-left"],
141 }
142 },
143 "P000000000000000000000000000005": {
144 name: "丸美雪绒花纯净保湿洁面乳120g",
145 tag: 9,
146 sence: 3,
147 point: {
148 left: 0,
149 top: 0,
150 },
151 tips: {
152 type: "top-left",
153 point: mapFix["top-left"],
154 }
155 },
156 "P000000000000000000000000000009": {
157 name: "丸美雪绒花纯净保湿深润霜50g",
158 tag: 10,
159 sence: 3,
160 point: {
161 left: 0,
162 top: 0,
163 },
164 tips: {
165 type: "top-left",
166 point: mapFix["top-left"],
167 }
168 },
43 169
170 }
44 171
172 module.exports = {
173 productMap: productMap
45 } 174 }
......

2.17 KB | W: | H:

710 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.04 KB | W: | H:

726 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
1 import {
2 getBindtapData
3 } from '../../utils/util';
4
5 import {
6 productMap
7 } from '../../const/custom-data';
8
1 let app = getApp(); 9 let app = getApp();
2 Page({ 10 Page({
3 data: { 11 data: {
12 tipsBorderVisible: false,
4 tipsRegisterVisible: false, 13 tipsRegisterVisible: false,
5 tipsGroupMemberVisible: false, 14 tipsGroupMemberVisible: false,
6 tipsNewMemberVisible: false, 15 tipsNewMemberVisible: false,
7 tipsWishVisible: false, 16 tipsWishVisible: false,
8 tipsShakeVisible: false, 17 tipsShakeVisible: false,
9 tipsCreateCompleteVisible: false, 18 tipsCreateCompleteVisible: false,
19 tipsCommonVisible: false,
20 tipsInnerText: "",
10 curStatus: 1, // 当前场景 21 curStatus: 1, // 当前场景
11 candidate: [], // 心愿候选列表 22 candidate: [], // 心愿候选列表
12 myWishList: [], // 我的心愿列表 23 myWishList: [], // 我的心愿列表
24 valTotal:0, // 心愿单累计需要弹力值
25 curWish: {}, // 当前选择心愿
26 userInfo: {}
13 }, 27 },
14 onShareAppMessage() {}, 28 onShareAppMessage() {},
15 onLoad(options) { 29 onLoad(options) {
30 console.log("cwish------");
16 this.initData(); 31 this.initData();
17 }, 32 },
18 initData() { 33 initData() {
34 // 还原缓存心愿单
35 let myWishList = app.store.getItem("wish") || [];
36 this.setData({
37 myWishList
38 })
39
19 app.queryIndex().then((result) => { 40 app.queryIndex().then((result) => {
41 this.setData({
42 userInfo: app.globalData.userInfo
43 })
20 this.queryWishbillPrizeCandidate(); 44 this.queryWishbillPrizeCandidate();
21 }); 45 });
22 }, 46 },
23 /**
24 * 点击提交心愿单按钮
25 * 首先要根据自身状态判断
26 */
27 onSubmitHandler() {
28 this.checkSubmit().then((result) => {
29 47
30 }).catch((err) => {
31
32 });;
33 },
34 /** 48 /**
35 * 提交前判断状态 49 * 提交前判断状态
36 * 判断顺序 50 * 判断顺序
...@@ -42,7 +56,6 @@ Page({ ...@@ -42,7 +56,6 @@ Page({
42 checkSubmit() { 56 checkSubmit() {
43 return new Promise((resolve, reject) => { 57 return new Promise((resolve, reject) => {
44 let indexInfo = app.globalData.indexInfo; 58 let indexInfo = app.globalData.indexInfo;
45 console.log("indexInfo:", indexInfo);
46 let { 59 let {
47 isCrmLogin, 60 isCrmLogin,
48 isNewMember, 61 isNewMember,
...@@ -52,7 +65,7 @@ Page({ ...@@ -52,7 +65,7 @@ Page({
52 wishBillCode 65 wishBillCode
53 } = indexInfo; 66 } = indexInfo;
54 // 未登陆 出注册弹窗提示 67 // 未登陆 出注册弹窗提示
55 isCrmLogin = 1; 68 // isCrmLogin = 1;
56 if (isCrmLogin == 0) { 69 if (isCrmLogin == 0) {
57 this.setData({ 70 this.setData({
58 tipsRegisterVisible: true 71 tipsRegisterVisible: true
...@@ -75,26 +88,34 @@ Page({ ...@@ -75,26 +88,34 @@ Page({
75 // 新会员 88 // 新会员
76 if (hadAnswerQuestion) { 89 if (hadAnswerQuestion) {
77 // 已经答题,提示创建心愿单 90 // 已经答题,提示创建心愿单
78 // todo 校验选择 91 resolve();
79 // 校验完成后显示提示
80
81 this.setData({
82 tipsWishVisible: true
83 });
84 // this.queryWishbillCreate();
85 } else { 92 } else {
86 // 未答题,提示答题 93 // 未答题,提示答题
87 this.setData({ 94 this.setData({
88 tipsNewMemberVisible: true 95 tipsNewMemberVisible: true
89 }) 96 })
97 reject();
90 } 98 }
91 } else { 99 } else {
92 // 老会员 100 // 老会员 直接答题
93 101 resolve();
94 } 102 }
95 resolve();
96 }); 103 });
97 }, 104 },
105 /**
106 * 点击提交心愿单按钮
107 * 首先要根据自身状态判断
108 */
109 onSubmitHandler() {
110 this.checkSubmit().then((result) => {
111 let valTotal = 0;
112
113 this.setData({
114 tipsWishVisible: true
115 })
116 console.log("wish:",this.data.myWishList);
117 }).catch((err) => {});;
118 },
98 // billCode 119 // billCode
99 // 创建心愿单 120 // 创建心愿单
100 queryWishbillCreate() { 121 queryWishbillCreate() {
...@@ -120,17 +141,115 @@ Page({ ...@@ -120,17 +141,115 @@ Page({
120 console.log("err:", err); 141 console.log("err:", err);
121 }); 142 });
122 }, 143 },
123 // 换一批 144 /**
124 onChangeStatusHandler() { 145 * 点击圆点 显示产品提示
146 * @param {*} evt
147 */
148 onShowTipsBorderHandler(evt) {
149 let curIndex = getBindtapData(evt, "index");
150 console.log("curIndex:", curIndex);
151 let curData = productMap[curIndex + ""];
152 let product = this.getProductByCode(curIndex);
153 curData = Object.assign(curData, product)
154 console.log("product:", product);
155 console.log("curData:", curData);
156 this.setData({
157 curWish: curData,
158 tipsBorderVisible: true,
159 });
160 },
161 /**
162 * 隐藏产品提示
163 * @param {*} evt
164 */
165 onHideTipsBorderHandler(evt) {
166 console.log("onHideTipsBorderHandler");
167 this.setData({
168 // curWish: null,
169 tipsBorderVisible: false,
170 })
171 },
172 /**
173 * 加入心愿单
174 * @param {*} evt
175 */
176 onAddWishHandler(evt) {
177 let myWishList = this.data.myWishList;
178 let curWish = this.data.curWish;
179
180 // 检查愿望数是否超出
181 if (myWishList.length >= 3) {
182 this.setData({
183 tipsInnerText: "许愿数超出上限啦~",
184 tipsCommonVisible: true
185 })
186 return;
187 }
188
189 // // 查重
190 let uni = myWishList.some((item) => {
191 return item.prizeDefineCode == curWish.prizeDefineCode
192 })
193 if (uni) {
194 this.setData({
195 tipsInnerText: "心愿重复啦~",
196 tipsCommonVisible: true
197 })
198 return;
199 }
200
201 // 写入愿望单
202 myWishList.push(curWish);
203 this.setData({
204 myWishList
205 })
206 app.store.setItem("wish", myWishList);
207 },
208 /**
209 * 取消心愿单
210 * @param {*} evt
211 */
212 onCancelWishHandler(evt) {
213 let curData = getBindtapData(evt);
214 console.log("curData:", curData);
215 let myWishList = this.data.myWishList;
216 myWishList = myWishList.filter((item) => {
217 return item.prizeDefineCode != curData.prizeDefineCode
218 })
219 console.log("myWishList:", myWishList);
220 this.setData({
221 myWishList
222 })
223 app.store.setItem("wish", myWishList);
224 },
225 /**
226 * 换一批
227 * @param {*} evt
228 */
229 onChangeStatusHandler(evt) {
125 let curStatus = this.data.curStatus; 230 let curStatus = this.data.curStatus;
126 curStatus++; 231 curStatus++;
127 if (curStatus > 3) { 232 if (curStatus > 3) {
128 curStatus = 1; 233 curStatus = 1;
129 } 234 }
130 this.setData({ 235 this.setData({
131 curStatus 236 curStatus: curStatus,
237 tipsBorderVisible: false
132 }) 238 })
133 }, 239 },
240 /**
241 * 根据唯一码/code 索引
242 */
243 getProductByCode(code) {
244 let result = null;
245 let candidate = this.data.candidate;
246 candidate.forEach(element => {
247 if (element.prizeDefineCode == code) {
248 result = element;
249 }
250 });
251 return result;
252 },
134 // 心愿单产品候选列表 253 // 心愿单产品候选列表
135 queryWishbillPrizeCandidate() { 254 queryWishbillPrizeCandidate() {
136 return new Promise((resolve, reject) => { 255 return new Promise((resolve, reject) => {
...@@ -141,6 +260,7 @@ Page({ ...@@ -141,6 +260,7 @@ Page({
141 this.setData({ 260 this.setData({
142 candidate: result 261 candidate: result
143 }) 262 })
263 console.log("candidate:", this.data.candidate);
144 resolve(); 264 resolve();
145 }).catch((err) => { 265 }).catch((err) => {
146 reject(); 266 reject();
...@@ -163,6 +283,7 @@ Page({ ...@@ -163,6 +283,7 @@ Page({
163 tipsWishVisible: false, 283 tipsWishVisible: false,
164 tipsWishVisible: false, 284 tipsWishVisible: false,
165 tipsCreateCompleteVisible: false, 285 tipsCreateCompleteVisible: false,
286 tipsCommonVisible: false
166 }) 287 })
167 break; 288 break;
168 289
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
7 "tips-wish-comp": "../../component/tips-wish-comp/tips-wish-comp", 7 "tips-wish-comp": "../../component/tips-wish-comp/tips-wish-comp",
8 "tips-shake-comp": "../../component/tips-shake-comp/tips-shake-comp", 8 "tips-shake-comp": "../../component/tips-shake-comp/tips-shake-comp",
9 "tips-create-complete-comp": "../../component/tips-create-complete-comp/tips-create-complete-comp", 9 "tips-create-complete-comp": "../../component/tips-create-complete-comp/tips-create-complete-comp",
10 "tips-common-comp": "../../component/tips-common-comp/tips-common-comp",
10 "van-popup": "../../ui/vant-weapp/popup/index" 11 "van-popup": "../../ui/vant-weapp/popup/index"
11 } 12 }
12 } 13 }
......
...@@ -9,15 +9,104 @@ ...@@ -9,15 +9,104 @@
9 background-color: #ffd5da; 9 background-color: #ffd5da;
10 } 10 }
11 11
12 .bg { 12 .bg {}
13 image { 13
14 .sence {
15 position: relative;
16
17 .view {
14 position: absolute; 18 position: absolute;
15 width: 750px; 19
16 height: 1303px; 20 .ebg {
21 width: 750px;
22 position: absolute;
23 }
24
25 .point {
26 position: absolute;
27 z-index: 31;
28 width: 40px;
29 height: 40px;
30 animation: scalelinear 2s linear infinite;
31 }
32 }
33
34 .view1 {
35 .ebg {
36 height: 1303px;
37 }
38
39 .point1 {
40 left: 111px;
41 top: 258px;
42 }
43
44 .point2 {
45 left: 337px;
46 top: 350px;
47 }
48
49 .point3 {
50 left: 558px;
51 top: 437px;
52 }
53 }
54
55 .tips-border {
56 position: absolute;
57 width: 208px;
58 height: 344px;
59 top: 100px;
60 left: 40px;
61 z-index: 55;
62
63 .rel {
64 position: relative;
65 }
66
67 .ebg {
68 position: absolute;
69 width: 208px;
70 height: 344px;
71 }
72
73 .cont {
74 position: relative;
75 width: 208px;
76 height: 344px;
77 @extend .bb;
78 padding: 75px 18px;
79 color: #ffffff;
80
81 .name {
82 font-size: 24px;
83 }
84
85 .val {
86 font-size: 20px;
87 }
88
89 .btn {
90 position: absolute;
91 left: 0;
92 right: 0;
93 bottom: 90px;
94 margin: 0 auto;
95 border-radius: 20px;
96 color: #b93139;
97 background-color: #ffffff;
98 @include btc(180px, 40px);
99 font-size: 24px;
100 }
101 }
17 } 102 }
18 } 103 }
19 104
105
106
20 .main { 107 .main {
108 position: relative;
109
21 .top-space { 110 .top-space {
22 height: 610px; 111 height: 610px;
23 } 112 }
...@@ -59,22 +148,30 @@ ...@@ -59,22 +148,30 @@
59 margin: 0 auto; 148 margin: 0 auto;
60 } 149 }
61 150
151 .space1 {
152 height: 116px;
153 }
154
62 // 心愿 155 // 心愿
63 .wish { 156 .wish {
64 position: relative; 157 position: relative;
65 margin: 0 auto 0; 158 margin: 0 auto 0;
66 display: flex; 159 display: flex;
67 justify-content: space-between; 160 // justify-content: center;
68 @extend .bb; 161 @extend .bb;
69 // padding-top: 116px; 162 // height: 140px;
70 padding: 116px 90px 0; 163 min-height: 238px;
164 width: 660px;
71 165
72 &-item { 166 &-item {
73 position: relative; 167 position: relative;
74 text-align: center; 168 text-align: center;
169 width: 220px;
75 170
76 .display { 171 .display {
172
77 position: relative; 173 position: relative;
174 margin: 0 auto;
78 width: 140px; 175 width: 140px;
79 height: 140px; 176 height: 140px;
80 border-radius: 70px; 177 border-radius: 70px;
...@@ -108,6 +205,7 @@ ...@@ -108,6 +205,7 @@
108 @extend .fcc; 205 @extend .fcc;
109 color: #b93138; 206 color: #b93138;
110 font-size: 20px; 207 font-size: 20px;
208 margin-top: 4px;
111 209
112 .icon { 210 .icon {
113 margin-left: 6px; 211 margin-left: 6px;
...@@ -133,3 +231,20 @@ ...@@ -133,3 +231,20 @@
133 } 231 }
134 } 232 }
135 } 233 }
234
235
236 @keyframes scalelinear {
237
238 /** 第一种写法**/
239 0% {
240 transform: scale(1);
241 }
242
243 50% {
244 transform: scale(1.2);
245 }
246
247 100% {
248 transform: scale(1);
249 }
250 }
......
1 <view class="page"> 1 <view class="page">
2 <view class="app__bgc bgc {{curStatus==1?'bgc1':''}}"></view> 2 <view class="app__bgc bgc {{curStatus==1?'bgc1':''}}"></view>
3 <view class="app__bg bg"> 3 <view class="app__bg bg"></view>
4 <image src="{{'../../image/oss/create-wish/create-wish-'+curStatus+'.png'}}" mode="scaleToFill" /> 4 <!-- 场景 -->
5 <view class="sence">
6 <!-- 第一幕 -->
7 <view class="view view1">
8 <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png'}}" mode="scaleToFill" />
9 <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
10 <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
11 <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
12 </view>
13 <!-- 详情 -->
14 <view wx:if="{{tipsBorderVisible}}" class="tips-border" style="top:{{curWish.point.top+curWish.tips.point.fixTop}}rpx;left:{{curWish.point.left+curWish.tips.point.fixLeft}}rpx;">
15 <view class="rel">
16 <image class="ebg" mode="widthFix" src="../../image/oss/create-wish/tips-{{curWish.tips.type}}.png" />
17 <view class="cont">
18 <view class="name">{{curWish.productName}}</view>
19 <view class="val">弹力值:{{curWish.conditionElasticValue}}</view>
20 <view bindtap="onAddWishHandler" class="btn">加入心愿单</view>
21 </view>
22 </view>
23 </view>
5 </view> 24 </view>
6 <view class="app__content main"> 25 <view class="app__content main">
7 <view class="top-space"></view> 26 <view bindtap="onHideTipsBorderHandler" class="top-space"></view>
8 <view class="content"> 27 <view class="content">
9 <!-- <view class="btn" bindtap="onWishHandler">提交心愿单</view> --> 28 <!-- <view class="btn" bindtap="onWishHandler">提交心愿单</view> -->
10 <!-- 换一批按钮 --> 29 <!-- 换一批按钮 -->
...@@ -15,39 +34,18 @@ ...@@ -15,39 +34,18 @@
15 <!-- 心愿单 --> 34 <!-- 心愿单 -->
16 <view class="wish-container"> 35 <view class="wish-container">
17 <image class="ebg" mode="widthFix" src="../../image/oss/create-wish/cw-border.png" /> 36 <image class="ebg" mode="widthFix" src="../../image/oss/create-wish/cw-border.png" />
37 <view class="space1"></view>
18 <!-- 心愿容器 --> 38 <!-- 心愿容器 -->
19 <view class="wish"> 39 <view class="wish">
20 <view class="wish-item"> 40 <view wx:for="{{myWishList}}" wx:key="{{index}}" class="wish-item">
21 <view class="display"> 41 <view class="display">
22 <image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_3.png" /> 42 <image class="prod" mode="aspectFit" src="../../image/prize/prize-{{item.tag}}.png" />
23 <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> 43 <image bindtap="onCancelWishHandler" data-data="{{item}}" class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" />
24 </view> 44 </view>
25 <view class="name">丸美弹力蛋白凝时紧致乳</view> 45 <view class="name">{{item.productName}}</view>
26 <view class="val"> 46 <view class="val">
27 <image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" /> 47 <image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" />
28 需要弹力值5403 48 需要弹力值{{item.conditionElasticValue}}
29 </view>
30 </view>
31 <view class="wish-item">
32 <view class="display">
33 <image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_2.png" />
34 <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" />
35 </view>
36 <view class="name">丸美弹力蛋白凝时紧致乳</view>
37 <view class="val">
38 <image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" />
39 需要弹力值5403
40 </view>
41 </view>
42 <view class="wish-item">
43 <view class="display">
44 <image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_1.png" />
45 <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" />
46 </view>
47 <view class="name">丸美弹力蛋白凝时紧致乳</view>
48 <view class="val">
49 <image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" />
50 需要弹力值5403
51 </view> 49 </view>
52 </view> 50 </view>
53 </view> 51 </view>
...@@ -64,10 +62,10 @@ ...@@ -64,10 +62,10 @@
64 <tips-group-member-comp bind:evtcomp="evtcomp"></tips-group-member-comp> 62 <tips-group-member-comp bind:evtcomp="evtcomp"></tips-group-member-comp>
65 </van-popup> 63 </van-popup>
66 <van-popup show="{{ tipsNewMemberVisible }}"> 64 <van-popup show="{{ tipsNewMemberVisible }}">
67 <tips-new-comp bind:evtcomp="evtcomp"></tips-new-comp> 65 <tips-new-comp bind:evtcomp="evtcomp" user-info="{{userInfo}}"></tips-new-comp>
68 </van-popup> 66 </van-popup>
69 <van-popup show="{{ tipsWishVisible }}"> 67 <van-popup show="{{ tipsWishVisible }}">
70 <tips-wish-comp bind:evtcomp="evtcomp"></tips-wish-comp> 68 <tips-wish-comp bind:evtcomp="evtcomp" wish-list="{{myWishList}}"></tips-wish-comp>
71 </van-popup> 69 </van-popup>
72 <van-popup show="{{ tipsShakeVisible }}"> 70 <van-popup show="{{ tipsShakeVisible }}">
73 <tips-shake-comp bind:evtcomp="evtcomp"></tips-shake-comp> 71 <tips-shake-comp bind:evtcomp="evtcomp"></tips-shake-comp>
...@@ -75,3 +73,6 @@ ...@@ -75,3 +73,6 @@
75 <van-popup show="{{ tipsCreateCompleteVisible }}"> 73 <van-popup show="{{ tipsCreateCompleteVisible }}">
76 <tips-create-complete-comp bind:evtcomp="evtcomp"></tips-create-complete-comp> 74 <tips-create-complete-comp bind:evtcomp="evtcomp"></tips-create-complete-comp>
77 </van-popup> 75 </van-popup>
76 <van-popup show="{{ tipsCommonVisible }}">
77 <tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp>
78 </van-popup>
......
...@@ -5,27 +5,16 @@ import Date from '../../utils/date'; ...@@ -5,27 +5,16 @@ import Date from '../../utils/date';
5 let app = getApp(); 5 let app = getApp();
6 Page({ 6 Page({
7 data: { 7 data: {
8 hadAnswer:false,
8 questionList: [], // 题目列表 9 questionList: [], // 题目列表
9 // questionResult: {
10 // "status": 1,
11 // "elasticValue": 50,
12 // "coupons": [{
13 // "couponId": "20839",
14 // "couponCode": "RLLL1IHG",
15 // "rule": "RLLL1IHG",
16 // "startDate": 1564479217000,
17 // "endDate": 1567094399000,
18 // "type": 4,
19 // "name": "眼部护理体验券-7月24日",
20 // "state": 0
21 // }]
22 // },
23 questionResult: {}, 10 questionResult: {},
24 // 答题结果 11 // 答题结果
25 questionNumList: ["A", "B", "C", "D"], 12 questionNumList: ["A", "B", "C", "D"],
26 myAnswer: [], //我的答案 13 myAnswer: [], //我的答案
27 }, 14 },
28 onShareAppMessage() {}, 15 onShareAppMessage() {},
16 onShow(){
17 },
29 onLoad(options) { 18 onLoad(options) {
30 this.initData(); 19 this.initData();
31 }, 20 },
...@@ -92,7 +81,8 @@ Page({ ...@@ -92,7 +81,8 @@ Page({
92 element.endDateStr = new Date(element.endDate).toString("yy-MM-dd"); 81 element.endDateStr = new Date(element.endDate).toString("yy-MM-dd");
93 }); 82 });
94 _this.setData({ 83 _this.setData({
95 questionResult 84 hadAnswer:true,
85 questionResult:questionResult
96 }) 86 })
97 console.log("answerSubmit:", _this.data.questionResult); 87 console.log("answerSubmit:", _this.data.questionResult);
98 }) 88 })
...@@ -104,7 +94,6 @@ Page({ ...@@ -104,7 +94,6 @@ Page({
104 confirmText: "继续答题", 94 confirmText: "继续答题",
105 showCancel: false, 95 showCancel: false,
106 success(res) { 96 success(res) {
107
108 } 97 }
109 }) 98 })
110 } 99 }
......
...@@ -169,7 +169,8 @@ ...@@ -169,7 +169,8 @@
169 } 169 }
170 170
171 .tips { 171 .tips {
172 margin-top: 40px; 172 // margin-top: 40px;
173 margin:24px 0 12px;
173 text-align: center; 174 text-align: center;
174 font-size: 24px; 175 font-size: 24px;
175 color: #333333; 176 color: #333333;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 {{item.question}} 17 {{item.question}}
18 </view> 18 </view>
19 <view class="answer"> 19 <view class="answer">
20 <view bindtap="onSelectAnswerHandler" data-pdata="{{item}}" data-pindex="{{index}}" data-data="{{item2}}" data-index="{{index2}}" wx:for="{{item.answers}}" wx:key="index2" wx:for-index="index2" wx:for-item="item2" class="answer-item {{item2.selected ? 'selected':''}}"> 20 <view bindtap="onSelectAnswerHandler" data-pdata="{{item}}" data-pindex="{{index}}" data-data="{{item2}}" data-index="{{index2}}" wx:for="{{item.answers}}" wx:key="index2" wx:for-index="index2" wx:for-item="item2" class="answer-item {{item2.selected ? 'selected':''}} {{item2.rightAnswer == 1 && hadAnswer ? 'right' :''}} ">
21 {{questionNumList[index2]}}.{{item2.answer}} 21 {{questionNumList[index2]}}.{{item2.answer}}
22 </view> 22 </view>
23 </view> 23 </view>
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
43 <view class="tips">还凭您的盛世美颜获得更多惊喜</view> 43 <view class="tips">还凭您的盛世美颜获得更多惊喜</view>
44 <view class="coupon"> 44 <view class="coupon">
45 <view wx:for="{{questionResult.coupons}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}"> 45 <view wx:for="{{questionResult.coupons}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}">
46 <image class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" /> 46 <image wx:if="{{item.type==4}}" class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-2.png" />
47 <image wx:else class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" />
47 <view class="cont"> 48 <view class="cont">
48 <view class="name">{{item.name}}</view> 49 <view class="name">{{item.name}}</view>
49 <!-- <view class="detail">查看详情</view> --> 50 <!-- <view class="detail">查看详情</view> -->
......