e56c47ce by simon

版本提交

1 parent 64dfaf21
Showing 31 changed files with 500 additions and 135 deletions
......@@ -12,7 +12,7 @@
<view class="wish">
<view class="wish-item">
<view class="display">
<image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_3.png" />
<image class="prod" mode="aspectFit" src="../../image/prize/prize-3.png" />
<!-- <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> -->
</view>
<!-- <view class="name">丸美弹力蛋白凝时紧致乳</view> -->
......@@ -23,7 +23,7 @@
</view>
<view class="wish-item">
<view class="display">
<image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_2.png" />
<image class="prod" mode="aspectFit" src="../../image/prize/prize-2.png" />
<!-- <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> -->
</view>
<!-- <view class="name">丸美弹力蛋白凝时紧致乳</view> -->
......@@ -34,7 +34,7 @@
</view>
<view class="wish-item">
<view class="display">
<image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_1.png" />
<image class="prod" mode="aspectFit" src="../../image/prize/prize-1.png" />
<!-- <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> -->
</view>
<!-- <view class="name">丸美弹力蛋白凝时紧致乳</view> -->
......
......@@ -5,11 +5,17 @@ Component({
innerText: {
type: String,
value: 'default value',
},
userInfo:{
type: Object,
value: {
nickname:""
}
}
},
data: {
// 这里是一些组件内部数据
someData: {}
someData: {},
},
methods: {
// 这里是一个自定义方法
......@@ -24,12 +30,8 @@ Component({
this.triggerEvent('_evt_hide_mask', {
name: "_evt_custom"
})
// app.router.push({
// path:"question"
// })
app.router.push({
openType: "reLaunchs",
path: "wish"
path:"question"
})
}
}
......
......@@ -31,5 +31,6 @@
font-weight: 300;
color: #ba3138;
top: 152px;
@include ellipsis(1);
}
}
......
<view class="comp-item">
<image class="bg" src="../../image/oss/tips/tips-new.png" mode="widthFix" />
<view class="nickname">nickname</view>
<view class="nickname">{{userInfo.nickname}}</view>
<view class="space1"></view>
<view bindtap="toQeustionHandler" class="btn">马上答题</view>
</view>
......
......@@ -4,6 +4,10 @@ Component({
innerText: {
type: String,
value: 'default value',
},
wishList: {
type: Object,
value: [],
}
},
data: {
......
......@@ -3,36 +3,36 @@
<view class="cont">
<view class="space1"></view>
<view class="wish">
<view class="row">
<view wx:if="{{wishList[0]}}" class="row">
<view class="wish-item">
<view class="prod">
<image mode="widthFix" src="../../image/oss/prize/prize_1.png" />
<image mode="widthFix" src="../../image/prize/prize-{{wishList[0].tag}}.png" />
</view>
<view class="desc">
<view class="name">丸美弹力蛋白凝时紧致乳</view>
<view class="val">需弹力值:5480</view>
<view class="name">{{wishList[0].productName}}</view>
<view class="val">需弹力值:{{wishList[0].conditionElasticValue}}</view>
</view>
</view>
</view>
<view class="row row2">
<view wx:if="{{wishList[1]}}" class="row row2">
<view class="wish-item ">
<view class="desc">
<view class="name">丸美弹力蛋白凝时紧致乳</view>
<view class="val">需弹力值:5480</view>
<view class="name">{{wishList[1].productName}}</view>
<view class="val">需弹力值:{{wishList[1].conditionElasticValue}}</view>
</view>
<view class="prod">
<image mode="widthFix" src="../../image/oss/prize/prize_2.png" />
<image mode="widthFix" src="../../image/prize/prize-{{wishList[1].tag}}.png" />
</view>
</view>
</view>
<view class="row">
<view class="wish-item">
<view wx:if="{{wishList[2]}}" class="row">
<view class="wish-item">
<view class="prod">
<image mode="widthFix" src="../../image/oss/prize/prize_3.png" />
<image mode="widthFix" src="../../image/prize/prize-{{wishList[2].tag}}.png" />
</view>
<view class="desc">
<view class="name">丸美弹力蛋白凝时紧致乳</view>
<view class="val">需弹力值:5480</view>
<view class="name">{{wishList[2].productName}}</view>
<view class="val">需弹力值:{{wishList[2].conditionElasticValue}}</view>
</view>
</view>
</view>
......
let productMap = {
"P000000000000000000000000000001": {
"name": "丸美白色之恋纯白淡黑眼霜20g",
"tag": "1",
/**
* tips:
* tag:{
* tag-1 top-left top:-20 left:-20
* tag-2 top-right top:-20 left:+20
* tag-2 bottom-left top:+20 left:-20
* tag-4 bottom-right top:+20 left:+20
* }
*/
let mapFix = {
"top-left": {
fixLeft: 20 - 208,
fixTop: 20 - 334,
},
"P000000000000000000000000000002": {
"name": "丸美纯色之恋光透精华液30ml",
"tag": "2",
"top-right": {
fixLeft: 20,
fixTop: 20 - 334,
},
"P000000000000000000000000000003": {
"name": "丸美弹力蛋白眼精华素10g+10g",
"tag": "3",
"bottom-left": {
fixLeft: 20 - 208,
fixTop: 20,
},
"P000000000000000000000000000004": {
"name": "丸美巧克力青春丝滑洁面啫喱120g",
"tag": "4",
"bottom-right": {
fixLeft: 20,
fixTop: 20,
},
"P000000000000000000000000000005": {
"name": "丸美巧克力青春丝滑毛孔隐形精华露35ml",
"tag": "5",
}
let productMap = {
// 场景1
"P000000000000000000000000000002": {
name: "丸美白色之恋纯白淡黑眼霜20g",
tag: 1,
sence: 1,
point: {
left: 111,
top: 258,
},
tips: {
type: "top-right",
point: mapFix["top-right"],
}
},
"P000000000000000000000000000006": {
"name": "丸美巧克力青春丝滑眼乳霜25g",
"tag": "6",
"P000000000000000000000000000003": {
name: "丸美巧克力青春丝滑眼乳霜25g",
tag: 7,
sence: 1,
point: {
left: 337,
top: 350,
},
tips: {
type: "top-right",
point: mapFix["top-right"],
}
},
"P000000000000000000000000000007": {
"name": "丸美巧克力青春丝滑水190ml",
"tag": "7",
"P000000000000000000000000000001": {
name: "丸美弹力蛋白眼精华素10g+10g",
tag: 3,
sence: 1,
point: {
left: 558,
top: 437,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
// 场景2
"P000000000000000000000000000008": {
"name": "丸美雪绒花纯净保湿咕嘟咕嘟菁华露80ml",
"tag": "8",
name: "丸美纯色之恋光透精华液30ml",
tag: 2,
sence: 2,
point: {
left: 0,
top: 0,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000009": {
"name": "丸美雪绒花纯净保湿洁面乳120g",
"tag": "9",
"P000000000000000000000000000007": {
name: "丸美巧克力青春丝滑洁面啫喱120g",
tag: 4,
sence: 2,
point: {
left: 0,
top: 0,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000010": {
"name": "丸美雪绒花纯净保湿深润霜50g",
"tag": "10",
name: "丸美巧克力青春丝滑毛孔隐形精华露35ml",
tag: 5,
sence: 2,
point: {
left: 0,
top: 0,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000004": {
name: "丸美巧克力青春丝滑水190ml",
tag: 6,
sence: 2,
point: {
left: 0,
top: 0,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000006": {
name: "丸美雪绒花纯净保湿咕嘟咕嘟菁华露80ml",
tag: 8,
sence: 3,
point: {
left: 0,
top: 0,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000005": {
name: "丸美雪绒花纯净保湿洁面乳120g",
tag: 9,
sence: 3,
point: {
left: 0,
top: 0,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000009": {
name: "丸美雪绒花纯净保湿深润霜50g",
tag: 10,
sence: 3,
point: {
left: 0,
top: 0,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
}
module.exports = {
productMap: productMap
}
......

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
import {
getBindtapData
} from '../../utils/util';
import {
productMap
} from '../../const/custom-data';
let app = getApp();
Page({
data: {
tipsBorderVisible: false,
tipsRegisterVisible: false,
tipsGroupMemberVisible: false,
tipsNewMemberVisible: false,
tipsWishVisible: false,
tipsShakeVisible: false,
tipsCreateCompleteVisible: false,
tipsCommonVisible: false,
tipsInnerText: "",
curStatus: 1, // 当前场景
candidate: [], // 心愿候选列表
myWishList: [], // 我的心愿列表
valTotal:0, // 心愿单累计需要弹力值
curWish: {}, // 当前选择心愿
userInfo: {}
},
onShareAppMessage() {},
onLoad(options) {
console.log("cwish------");
this.initData();
},
initData() {
// 还原缓存心愿单
let myWishList = app.store.getItem("wish") || [];
this.setData({
myWishList
})
app.queryIndex().then((result) => {
this.setData({
userInfo: app.globalData.userInfo
})
this.queryWishbillPrizeCandidate();
});
},
/**
* 点击提交心愿单按钮
* 首先要根据自身状态判断
*/
onSubmitHandler() {
this.checkSubmit().then((result) => {
}).catch((err) => {
});;
},
/**
* 提交前判断状态
* 判断顺序
......@@ -42,7 +56,6 @@ Page({
checkSubmit() {
return new Promise((resolve, reject) => {
let indexInfo = app.globalData.indexInfo;
console.log("indexInfo:", indexInfo);
let {
isCrmLogin,
isNewMember,
......@@ -52,7 +65,7 @@ Page({
wishBillCode
} = indexInfo;
// 未登陆 出注册弹窗提示
isCrmLogin = 1;
// isCrmLogin = 1;
if (isCrmLogin == 0) {
this.setData({
tipsRegisterVisible: true
......@@ -75,26 +88,34 @@ Page({
// 新会员
if (hadAnswerQuestion) {
// 已经答题,提示创建心愿单
// todo 校验选择
// 校验完成后显示提示
this.setData({
tipsWishVisible: true
});
// this.queryWishbillCreate();
resolve();
} else {
// 未答题,提示答题
this.setData({
tipsNewMemberVisible: true
})
reject();
}
} else {
// 老会员
// 老会员 直接答题
resolve();
}
resolve();
});
},
/**
* 点击提交心愿单按钮
* 首先要根据自身状态判断
*/
onSubmitHandler() {
this.checkSubmit().then((result) => {
let valTotal = 0;
this.setData({
tipsWishVisible: true
})
console.log("wish:",this.data.myWishList);
}).catch((err) => {});;
},
// billCode
// 创建心愿单
queryWishbillCreate() {
......@@ -120,17 +141,115 @@ Page({
console.log("err:", err);
});
},
// 换一批
onChangeStatusHandler() {
/**
* 点击圆点 显示产品提示
* @param {*} evt
*/
onShowTipsBorderHandler(evt) {
let curIndex = getBindtapData(evt, "index");
console.log("curIndex:", curIndex);
let curData = productMap[curIndex + ""];
let product = this.getProductByCode(curIndex);
curData = Object.assign(curData, product)
console.log("product:", product);
console.log("curData:", curData);
this.setData({
curWish: curData,
tipsBorderVisible: true,
});
},
/**
* 隐藏产品提示
* @param {*} evt
*/
onHideTipsBorderHandler(evt) {
console.log("onHideTipsBorderHandler");
this.setData({
// curWish: null,
tipsBorderVisible: false,
})
},
/**
* 加入心愿单
* @param {*} evt
*/
onAddWishHandler(evt) {
let myWishList = this.data.myWishList;
let curWish = this.data.curWish;
// 检查愿望数是否超出
if (myWishList.length >= 3) {
this.setData({
tipsInnerText: "许愿数超出上限啦~",
tipsCommonVisible: true
})
return;
}
// // 查重
let uni = myWishList.some((item) => {
return item.prizeDefineCode == curWish.prizeDefineCode
})
if (uni) {
this.setData({
tipsInnerText: "心愿重复啦~",
tipsCommonVisible: true
})
return;
}
// 写入愿望单
myWishList.push(curWish);
this.setData({
myWishList
})
app.store.setItem("wish", myWishList);
},
/**
* 取消心愿单
* @param {*} evt
*/
onCancelWishHandler(evt) {
let curData = getBindtapData(evt);
console.log("curData:", curData);
let myWishList = this.data.myWishList;
myWishList = myWishList.filter((item) => {
return item.prizeDefineCode != curData.prizeDefineCode
})
console.log("myWishList:", myWishList);
this.setData({
myWishList
})
app.store.setItem("wish", myWishList);
},
/**
* 换一批
* @param {*} evt
*/
onChangeStatusHandler(evt) {
let curStatus = this.data.curStatus;
curStatus++;
if (curStatus > 3) {
curStatus = 1;
}
this.setData({
curStatus
curStatus: curStatus,
tipsBorderVisible: false
})
},
/**
* 根据唯一码/code 索引
*/
getProductByCode(code) {
let result = null;
let candidate = this.data.candidate;
candidate.forEach(element => {
if (element.prizeDefineCode == code) {
result = element;
}
});
return result;
},
// 心愿单产品候选列表
queryWishbillPrizeCandidate() {
return new Promise((resolve, reject) => {
......@@ -141,6 +260,7 @@ Page({
this.setData({
candidate: result
})
console.log("candidate:", this.data.candidate);
resolve();
}).catch((err) => {
reject();
......@@ -163,6 +283,7 @@ Page({
tipsWishVisible: false,
tipsWishVisible: false,
tipsCreateCompleteVisible: false,
tipsCommonVisible: false
})
break;
......
......@@ -7,6 +7,7 @@
"tips-wish-comp": "../../component/tips-wish-comp/tips-wish-comp",
"tips-shake-comp": "../../component/tips-shake-comp/tips-shake-comp",
"tips-create-complete-comp": "../../component/tips-create-complete-comp/tips-create-complete-comp",
"tips-common-comp": "../../component/tips-common-comp/tips-common-comp",
"van-popup": "../../ui/vant-weapp/popup/index"
}
}
......
......@@ -9,15 +9,104 @@
background-color: #ffd5da;
}
.bg {
image {
.bg {}
.sence {
position: relative;
.view {
position: absolute;
width: 750px;
height: 1303px;
.ebg {
width: 750px;
position: absolute;
}
.point {
position: absolute;
z-index: 31;
width: 40px;
height: 40px;
animation: scalelinear 2s linear infinite;
}
}
.view1 {
.ebg {
height: 1303px;
}
.point1 {
left: 111px;
top: 258px;
}
.point2 {
left: 337px;
top: 350px;
}
.point3 {
left: 558px;
top: 437px;
}
}
.tips-border {
position: absolute;
width: 208px;
height: 344px;
top: 100px;
left: 40px;
z-index: 55;
.rel {
position: relative;
}
.ebg {
position: absolute;
width: 208px;
height: 344px;
}
.cont {
position: relative;
width: 208px;
height: 344px;
@extend .bb;
padding: 75px 18px;
color: #ffffff;
.name {
font-size: 24px;
}
.val {
font-size: 20px;
}
.btn {
position: absolute;
left: 0;
right: 0;
bottom: 90px;
margin: 0 auto;
border-radius: 20px;
color: #b93139;
background-color: #ffffff;
@include btc(180px, 40px);
font-size: 24px;
}
}
}
}
.main {
position: relative;
.top-space {
height: 610px;
}
......@@ -59,22 +148,30 @@
margin: 0 auto;
}
.space1 {
height: 116px;
}
// 心愿
.wish {
position: relative;
margin: 0 auto 0;
display: flex;
justify-content: space-between;
// justify-content: center;
@extend .bb;
// padding-top: 116px;
padding: 116px 90px 0;
// height: 140px;
min-height: 238px;
width: 660px;
&-item {
position: relative;
text-align: center;
width: 220px;
.display {
position: relative;
margin: 0 auto;
width: 140px;
height: 140px;
border-radius: 70px;
......@@ -108,6 +205,7 @@
@extend .fcc;
color: #b93138;
font-size: 20px;
margin-top: 4px;
.icon {
margin-left: 6px;
......@@ -133,3 +231,20 @@
}
}
}
@keyframes scalelinear {
/** 第一种写法**/
0% {
transform: scale(1);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
......
<view class="page">
<view class="app__bgc bgc {{curStatus==1?'bgc1':''}}"></view>
<view class="app__bg bg">
<image src="{{'../../image/oss/create-wish/create-wish-'+curStatus+'.png'}}" mode="scaleToFill" />
<view class="app__bg bg"></view>
<!-- 场景 -->
<view class="sence">
<!-- 第一幕 -->
<view class="view view1">
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png'}}" mode="scaleToFill" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
</view>
<!-- 详情 -->
<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;">
<view class="rel">
<image class="ebg" mode="widthFix" src="../../image/oss/create-wish/tips-{{curWish.tips.type}}.png" />
<view class="cont">
<view class="name">{{curWish.productName}}</view>
<view class="val">弹力值:{{curWish.conditionElasticValue}}</view>
<view bindtap="onAddWishHandler" class="btn">加入心愿单</view>
</view>
</view>
</view>
</view>
<view class="app__content main">
<view class="top-space"></view>
<view bindtap="onHideTipsBorderHandler" class="top-space"></view>
<view class="content">
<!-- <view class="btn" bindtap="onWishHandler">提交心愿单</view> -->
<!-- 换一批按钮 -->
......@@ -15,39 +34,18 @@
<!-- 心愿单 -->
<view class="wish-container">
<image class="ebg" mode="widthFix" src="../../image/oss/create-wish/cw-border.png" />
<view class="space1"></view>
<!-- 心愿容器 -->
<view class="wish">
<view class="wish-item">
<view wx:for="{{myWishList}}" wx:key="{{index}}" class="wish-item">
<view class="display">
<image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_3.png" />
<image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" />
<image class="prod" mode="aspectFit" src="../../image/prize/prize-{{item.tag}}.png" />
<image bindtap="onCancelWishHandler" data-data="{{item}}" class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" />
</view>
<view class="name">丸美弹力蛋白凝时紧致乳</view>
<view class="name">{{item.productName}}</view>
<view class="val">
<image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" />
需要弹力值5403
</view>
</view>
<view class="wish-item">
<view class="display">
<image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_2.png" />
<image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" />
</view>
<view class="name">丸美弹力蛋白凝时紧致乳</view>
<view class="val">
<image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" />
需要弹力值5403
</view>
</view>
<view class="wish-item">
<view class="display">
<image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_1.png" />
<image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" />
</view>
<view class="name">丸美弹力蛋白凝时紧致乳</view>
<view class="val">
<image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" />
需要弹力值5403
需要弹力值{{item.conditionElasticValue}}
</view>
</view>
</view>
......@@ -64,10 +62,10 @@
<tips-group-member-comp bind:evtcomp="evtcomp"></tips-group-member-comp>
</van-popup>
<van-popup show="{{ tipsNewMemberVisible }}">
<tips-new-comp bind:evtcomp="evtcomp"></tips-new-comp>
<tips-new-comp bind:evtcomp="evtcomp" user-info="{{userInfo}}"></tips-new-comp>
</van-popup>
<van-popup show="{{ tipsWishVisible }}">
<tips-wish-comp bind:evtcomp="evtcomp"></tips-wish-comp>
<tips-wish-comp bind:evtcomp="evtcomp" wish-list="{{myWishList}}"></tips-wish-comp>
</van-popup>
<van-popup show="{{ tipsShakeVisible }}">
<tips-shake-comp bind:evtcomp="evtcomp"></tips-shake-comp>
......@@ -75,3 +73,6 @@
<van-popup show="{{ tipsCreateCompleteVisible }}">
<tips-create-complete-comp bind:evtcomp="evtcomp"></tips-create-complete-comp>
</van-popup>
<van-popup show="{{ tipsCommonVisible }}">
<tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp>
</van-popup>
......
......@@ -5,27 +5,16 @@ import Date from '../../utils/date';
let app = getApp();
Page({
data: {
hadAnswer:false,
questionList: [], // 题目列表
// questionResult: {
// "status": 1,
// "elasticValue": 50,
// "coupons": [{
// "couponId": "20839",
// "couponCode": "RLLL1IHG",
// "rule": "RLLL1IHG",
// "startDate": 1564479217000,
// "endDate": 1567094399000,
// "type": 4,
// "name": "眼部护理体验券-7月24日",
// "state": 0
// }]
// },
questionResult: {},
// 答题结果
questionNumList: ["A", "B", "C", "D"],
myAnswer: [], //我的答案
},
onShareAppMessage() {},
onShow(){
},
onLoad(options) {
this.initData();
},
......@@ -92,7 +81,8 @@ Page({
element.endDateStr = new Date(element.endDate).toString("yy-MM-dd");
});
_this.setData({
questionResult
hadAnswer:true,
questionResult:questionResult
})
console.log("answerSubmit:", _this.data.questionResult);
})
......@@ -104,7 +94,6 @@ Page({
confirmText: "继续答题",
showCancel: false,
success(res) {
}
})
}
......
......@@ -169,7 +169,8 @@
}
.tips {
margin-top: 40px;
// margin-top: 40px;
margin:24px 0 12px;
text-align: center;
font-size: 24px;
color: #333333;
......
......@@ -17,7 +17,7 @@
{{item.question}}
</view>
<view class="answer">
<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':''}}">
<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' :''}} ">
{{questionNumList[index2]}}.{{item2.answer}}
</view>
</view>
......@@ -43,7 +43,8 @@
<view class="tips">还凭您的盛世美颜获得更多惊喜</view>
<view class="coupon">
<view wx:for="{{questionResult.coupons}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}">
<image class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" />
<image wx:if="{{item.type==4}}" class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-2.png" />
<image wx:else class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" />
<view class="cont">
<view class="name">{{item.name}}</view>
<!-- <view class="detail">查看详情</view> -->
......