|
@@ -29,6 +29,11 @@ Page({
|
|
fontSize: '',
|
|
fontSize: '',
|
|
height: '',
|
|
height: '',
|
|
width: '',
|
|
width: '',
|
|
|
|
+ },
|
|
|
|
+ box: { // 盒子默认是白色正面
|
|
|
|
+ static: true,
|
|
|
|
+ left: 'box-white-1-left',
|
|
|
|
+ right: 'box-white-1-right'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -130,11 +135,25 @@ Page({
|
|
// data-id== 1正面,2背面,3手柄,4杯底
|
|
// data-id== 1正面,2背面,3手柄,4杯底
|
|
// this.changeCupImg(e.currentTarget.dataset.id);
|
|
// this.changeCupImg(e.currentTarget.dataset.id);
|
|
let that = this;
|
|
let that = this;
|
|
- let cupNum = util.changeCup(e.currentTarget.dataset.id)
|
|
|
|
|
|
+ let cupNum = util.changeCup(e.currentTarget.dataset.id);
|
|
|
|
+ let box = {};
|
|
|
|
+ if (e.currentTarget.dataset.id == 5) {
|
|
|
|
+ box = {
|
|
|
|
+ left: 'box-white-1-left',
|
|
|
|
+ right: 'box-white-1-right'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (e.currentTarget.dataset.id == 6) {
|
|
|
|
+ box = {
|
|
|
|
+ left: 'box-white-2-left',
|
|
|
|
+ right: 'box-white-2-right'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
that.setData({
|
|
that.setData({
|
|
isActive: e.currentTarget.dataset.id,
|
|
isActive: e.currentTarget.dataset.id,
|
|
dataPositionObj: cupNum.dataPositionObj,
|
|
dataPositionObj: cupNum.dataPositionObj,
|
|
- propSize: cupNum.propSize
|
|
|
|
|
|
+ propSize: cupNum.propSize,
|
|
|
|
+ box: box
|
|
})
|
|
})
|
|
that.getDataTouch(that)
|
|
that.getDataTouch(that)
|
|
|
|
|
|
@@ -192,9 +211,9 @@ Page({
|
|
finishDesign() { // 完成设计
|
|
finishDesign() { // 完成设计
|
|
let that = this;
|
|
let that = this;
|
|
let designObj = {
|
|
let designObj = {
|
|
- '5': '正面',
|
|
|
|
- '6': '背面',
|
|
|
|
- },
|
|
|
|
|
|
+ '5': '正面',
|
|
|
|
+ '6': '背面',
|
|
|
|
+ },
|
|
designVal = '',
|
|
designVal = '',
|
|
madeStatic = false;
|
|
madeStatic = false;
|
|
for (let i = 5; i < 7; i++) {
|
|
for (let i = 5; i < 7; i++) {
|