41acdc68 by simon

版本提交

1 parent 31666554
......@@ -23,7 +23,7 @@ module.exports = {
}
},
// 静态资源CDN 域名,配合CDN 功能实用,线上请确保在mp管理端已经注册域名
"assetsCDN": "https://kdcdn.oss-cn-shenzhen.aliyuncs.com"
// "assetsCDN": "https://kd.cdn.xyiyang.com"
// "assetsCDN": "https://kdcdn.oss-cn-shenzhen.aliyuncs.com"
"assetsCDN": "https://kd.cdn.xyiyang.com"
};
......
......@@ -4,7 +4,7 @@
* ------------------------------------------------------------------
*/
var isFirst = false;
// isFirst = true;
isFirst = true;
var path = require('path');
var gulp = require('gulp');
......
......@@ -10,7 +10,7 @@
.bg {
position: absolute;
width: 654px;
height: 1598px;
height: 1438px;
}
.space1 {
......@@ -23,8 +23,8 @@
position: absolute;
left: 0;
right: 0;
top: 1420px;
// bottom: 100px;
top: 1460px;
// top: 1260px;
margin: 0 auto;
}
......
<scroll-view scroll-y="{{true}}" class="comp-item">
<image class="bg" src="../../image/oss/rule/rule-c1.png" mode="widthFix" />
<view class="space1"></view>
<view bindtap="hideMask" class="btn">我知道了</view>
<!-- <view bindtap="hideMask" class="btn">我知道了</view> -->
</scroll-view>
<view class="close-wrap">
<span bindtap="hideMask" class="iconfont iconclose1"></span>
......
<view class="comp-item">
<image class="notice" mode="widthFix" src="../../image/oss/coupon-detail/cd-c3.png?ver=2" />
<image class="notice" mode="widthFix" src="../../image/oss/coupon-detail/cd-c3.png" />
</view>
......
......@@ -2,7 +2,7 @@ let ENV_CONFIG = require('./env/index');
const APPID = ''
/** ====每次发布版本记得修改此环境配置==== */
const ENV = 'Dev';
const ENV = 'Prod'; // Dev Prod
const NET_CONFIG = ENV_CONFIG[ENV];
const MOCKAPI = ENV_CONFIG.mockApi;
......
......@@ -21,6 +21,7 @@ Page({
wishList: [],
coopInfo: {},
userInfo: {},
indexInfo: {},
canShake: true,
status: 0,
animationShake: {}, // 摇一摇动画
......@@ -58,9 +59,11 @@ Page({
indexInfo: app.globalData.indexInfo,
userInfo: app.globalData.userInfo,
})
this.queryWishbillDetail().then((result) => {
let {
wishInfo
wishInfo,
indexInfo
} = this.data;
// 如果是本人的话,就跳转到我首页
if (wishInfo.isSelfWishBill == 1) {
......@@ -68,8 +71,8 @@ Page({
return;
}
// 判断是否需要显示注册蒙层
// 条件 1.不是本人 2.未为她助力
if (wishInfo.isSelfWishBill == 0 && wishInfo.isAssist != 1) {
// 条件 1.不是本人 2.未为她助力 3.未登陆
if (wishInfo.isSelfWishBill == 0 && wishInfo.isAssist != 1 && indexInfo.isCrmLogin != 1) {
this.setData({
tipsGuideRegisterVisible: true
})
......@@ -200,12 +203,10 @@ Page({
this.setData({
groupMemberCoopVisible: true
})
this.setData({
canShake: true
})
}
this.setData({
canShake: true
})
})
},
// 获取心愿单详情
......
<view class="page">
<view wx:if="{{animationPassVisible}}" class="ani">
<view class="mask"></view>
<image class="gif" mode="widthFix" src="../../image/oss/ani/pass.gif?ver=1" />
<image class="gif" mode="widthFix" src="../../image/oss/ani/pass.gif" />
</view>
<view class="app__bgc bgc"></view>
<image class="bg" src="../../image/oss/coop/coop-bg-1.png" mode="scaleToFill" />
......
......@@ -41,7 +41,7 @@ Page({
let wishInfo = this.data.wishInfo;
let couponInfo = this.data.couponInfo;
if(!couponInfo){
if (!couponInfo) {
return;
}
......@@ -161,19 +161,21 @@ Page({
//获取临时缓存图片路径,存入data中
canvasToTempImage(canvasId) {
let that = this;
wx.canvasToTempFilePath({
canvasId, // 这里canvasId即之前创建的canvas-id
success: function (res) {
let tempFilePath = res.tempFilePath;
console.log(tempFilePath);
that.setData({ // 如果采用mpvue,即 this.imagePath = tempFilePath
qrImagePath: tempFilePath,
});
},
fail: function (res) {
console.log(res);
}
});
setTimeout(() => {
wx.canvasToTempFilePath({
canvasId, // 这里canvasId即之前创建的canvas-id
success: function (res) {
let tempFilePath = res.tempFilePath;
console.log("tempFilePath:", tempFilePath);
that.setData({ // 如果采用mpvue,即 this.imagePath = tempFilePath
qrImagePath: tempFilePath,
});
},
fail: function (res) {
console.log(res);
}
});
}, 50);
},
//适配不同屏幕大小的canvas
setCanvasSize(sz) {
......
......@@ -10,6 +10,7 @@ import {
let app = getApp();
Page({
data: {
authorizeVisible: false,
tipsBorderVisible: false,
tipsRegisterVisible: false,
tipsGroupMemberVisible: false,
......@@ -33,6 +34,11 @@ Page({
guideIndex: 0,
},
onShareAppMessage() {},
showAuth() {
this.setData({
authorizeVisible: true
})
},
onShow() {},
onLoad(options) {
// console.log("cw -- onLoad");
......@@ -498,7 +504,8 @@ Page({
tipsWishVisible: false,
tipsWishVisible: false,
tipsCreateCompleteVisible: false,
tipsCommonVisible: false
tipsCommonVisible: false,
authorizeVisible: false,
})
},
// 子组件事件
......@@ -527,6 +534,11 @@ Page({
})
break;
// 授权成功 重拉用户信息
case "_evt_auth_complete":
this.initData();
break;
default:
break;
}
......
......@@ -11,7 +11,7 @@
<view class="sence">
<!-- 场景1 -->
<view wx:if="{{curStatus==1}}" class="view view1">
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png?ver=1'}}" mode="widthFix" />
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png'}}" mode="widthFix" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000008" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000010" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000009" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
......@@ -21,7 +21,7 @@
</view>
<!-- 场景2 -->
<view wx:if="{{curStatus==2}}" class="view view2">
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-2.png?ver=1'}}" mode="widthFix" />
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-2.png'}}" mode="widthFix" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000007" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000004" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000007"></view>
......@@ -29,7 +29,7 @@
</view>
<!-- 场景3 -->
<view wx:if="{{curStatus==3}}" class="view view3">
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-3.png?ver=1'}}" mode="widthFix" />
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-3.png'}}" mode="widthFix" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
......@@ -39,7 +39,7 @@
</view>
<!-- 场景4 -->
<view wx:if="{{curStatus==4}}" class="view view4">
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-4.png?ver=1'}}" mode="widthFix" />
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-4.png'}}" mode="widthFix" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000006" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000005" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000006"></view>
......@@ -122,3 +122,6 @@
<van-popup show="{{ tipsCommonVisible }}">
<tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp>
</van-popup>
<van-popup show="{{ authorizeVisible }}" bind:click-overlay="hideMask">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
......
<view class="page">
<view class="app__bgc bgc">
<image src="../../image/oss/index/index-c1.png?ver=1" mode="scaleToFill" />
<image src="../../image/oss/index/index-c1.png" mode="scaleToFill" />
</view>
<view class="app__bg bg">
<image src="../../image/oss/index/index-c2.png?ver=1" mode="scaleToFill" />
<image src="../../image/oss/index/index-c2.png" mode="scaleToFill" />
</view>
<view class="decoration">
<image class="d1" src="../../image/oss/index/index-c4.png" mode="widthFix" />
......@@ -27,9 +27,9 @@
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}" bind:click-overlay="hideMask">
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<van-popup show="{{ tipsRuleVisible }}">
<van-popup show="{{ tipsRuleVisible }}" bind:click-overlay="hideMask">
<tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp>
</van-popup>
......
import {
getBindtapData
} from '../../utils/util';
import {
productMap
} from '../../const/custom-data';
let app = getApp();
Page({
data: {
......@@ -30,13 +35,38 @@ Page({
*/
onShowDetailHandler(evt) {
let curData = getBindtapData(evt);
app.globalData.curCoupon = curData;
// app.globalData.giftData = curData;
app.router.push({
path: "couponDetail"
})
console.log("curData:", curData);
console.log(JSON.stringify(curData));
if (curData.instanceCode) {
// 查看奖品
app.post({
url: app.api.wishbillGiftQuery,
data: {
instanceCode: curData.instanceCode
}
}).then((result) => {
// 合并奖品详情数据
curData = Object.assign(curData, result);
// 合并自定义数据
let product = productMap[curData.prizeDefineCode + ""];
curData = Object.assign(curData, product);
app.globalData.giftData = curData;
// console.log("app.globalData.giftData 333:", app.globalData.giftData);
// console.log(JSON.stringify(app.globalData.giftData));
app.router.push({
path: "prizeDetail"
})
})
} else {
app.globalData.curCoupon = curData;
app.router.push({
path: "couponDetail"
})
}
},
// 子组件事件
evtcomp(evt) {
......
......@@ -67,11 +67,21 @@
position: relative;
.name {
// position: absolute;
// left: 40px;
// top: 40px;
// color: #ffffff;
// font-size: 32px;
position: absolute;
left: 40px;
top: 40px;
top: 12px;
color: #ffffff;
font-size: 32px;
width: 360px;
height: 100px;
display: flex;
align-items: center;
}
.detail {
......
......@@ -10,12 +10,12 @@
<view class="top-space"></view>
<view class="content">
<view class="coupon">
<view wx:for="{{prizeInfo}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}">
<view bindtap="onShowDetailHandler" data-data="{{item}}" wx:for="{{prizeInfo}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}">
<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 bindtap="onShowDetailHandler" data-data="{{item}}" class="detail">查看详情</view>
<view class="detail">查看详情</view>
<view class="card-info card-no">劵码:{{item.couponCode}}</view>
<view class="card-info card-date">有效期:即日起至{{item.endDateStr}}</view>
</view>
......
......@@ -33,7 +33,7 @@ Page({
}).then((result) => {
console.log("result:", result);
wx.showLoading({
title: '海报在修图中···',
title: '海报在修图中···',
});
this.initData();
})
......@@ -43,7 +43,8 @@ Page({
let nickname = app.globalData.userInfo && app.globalData.userInfo.nickname || "";
let billCode = app.globalData.indexInfo.wishBillCode;
let wxShareTitle = nickname + `正在参加丸美眼霜节心愿单活动,需要你的倾情相助!`;
let wxCodePath = `/pages/coop/coop?code=${billCode}&s=share`
let wxCodePath = `pages/coop/coop?code=${billCode}&s=share`
console.log("wxCodePath:", wxCodePath);
this.setData({
wxCodePath: wxCodePath,
wxShareTitle: wxShareTitle
......@@ -54,7 +55,8 @@ Page({
loading: false,
url: app.api.wxacodeGet,
data: {
path: encodeURIComponent(wxCodePath)
// path: encodeURIComponent(wxCodePath)
path: wxCodePath
}
}).then((result) => {
this.setData({
......
......@@ -176,19 +176,21 @@ Page({
//获取临时缓存图片路径,存入data中
canvasToTempImage(canvasId) {
let that = this;
wx.canvasToTempFilePath({
canvasId, // 这里canvasId即之前创建的canvas-id
success: function (res) {
let tempFilePath = res.tempFilePath;
console.log(tempFilePath);
that.setData({ // 如果采用mpvue,即 this.imagePath = tempFilePath
qrImagePath: tempFilePath,
});
},
fail: function (res) {
console.log(res);
}
});
setTimeout(() => {
wx.canvasToTempFilePath({
canvasId, // 这里canvasId即之前创建的canvas-id
success: function (res) {
let tempFilePath = res.tempFilePath;
that.setData({ // 如果采用mpvue,即 this.imagePath = tempFilePath
qrImagePath: tempFilePath,
});
},
fail: function (res) {
console.log(res);
}
});
}, 50);
},
//适配不同屏幕大小的canvas
setCanvasSize(sz) {
......
......@@ -301,6 +301,7 @@ Page({
});
},
hideMask() {
// console.log("1111");
this.setData({
tipsRuleVisible: false,
tipsPirzeVisible: false,
......
......@@ -51,11 +51,11 @@
</view>
</view>
<view wx:if="{{item.accessStatus == 0}}" class="btn disable">弹力充值中</view>
<view bindtap="onGetGiftHandler" data-data="{{item}}" wx:if="{{item.accessStatus == 1}}" class="btn">
<view bindtap="onGetGiftHandler" data-data="{{item}}" wx:if="{{item.accessStatus == 1 || (item.accessStatus == 2 && item.acceptType==0)}}" class="btn">
马上领取
</view>
<view bindtap="onCheckGiftHandler" data-data="{{item}}" wx:if="{{item.accessStatus == 2}}" class="btn">
已领取
<view bindtap="onCheckGiftHandler" data-data="{{item}}" wx:if="{{item.accessStatus == 2 && item.acceptType != 0}}" class="btn">
{{item.acceptType == 2 ?"快递邮寄":"门店自提"}}
</view>
</view>
</view>
......@@ -100,6 +100,6 @@
<van-popup show="{{ tipsRuleVisible }}" bind:click-overlay="hideMask">
<tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp>
</van-popup>
<van-popup show="{{ tipsPirzeVisible }}">
<van-popup show="{{ tipsPirzeVisible }}" bind:click-overlay="hideMask">
<tips-prize-comp bind:evtcomp="evtcomp" wish-info="{{curWish}}" status="{{status}}"></tips-prize-comp>
</van-popup>
......