版本提交
Showing
19 changed files
with
104 additions
and
41 deletions
| ... | @@ -23,7 +23,7 @@ module.exports = { | ... | @@ -23,7 +23,7 @@ module.exports = { |
| 23 | } | 23 | } |
| 24 | }, | 24 | }, |
| 25 | // 静态资源CDN 域名,配合CDN 功能实用,线上请确保在mp管理端已经注册域名 | 25 | // 静态资源CDN 域名,配合CDN 功能实用,线上请确保在mp管理端已经注册域名 |
| 26 | "assetsCDN": "https://kdcdn.oss-cn-shenzhen.aliyuncs.com" | 26 | // "assetsCDN": "https://kdcdn.oss-cn-shenzhen.aliyuncs.com" |
| 27 | // "assetsCDN": "https://kd.cdn.xyiyang.com" | 27 | "assetsCDN": "https://kd.cdn.xyiyang.com" |
| 28 | 28 | ||
| 29 | }; | 29 | }; | ... | ... |
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | * ------------------------------------------------------------------ | 4 | * ------------------------------------------------------------------ |
| 5 | */ | 5 | */ |
| 6 | var isFirst = false; | 6 | var isFirst = false; |
| 7 | // isFirst = true; | 7 | isFirst = true; |
| 8 | 8 | ||
| 9 | var path = require('path'); | 9 | var path = require('path'); |
| 10 | var gulp = require('gulp'); | 10 | var gulp = require('gulp'); | ... | ... |
| ... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
| 10 | .bg { | 10 | .bg { |
| 11 | position: absolute; | 11 | position: absolute; |
| 12 | width: 654px; | 12 | width: 654px; |
| 13 | height: 1598px; | 13 | height: 1438px; |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | .space1 { | 16 | .space1 { |
| ... | @@ -23,8 +23,8 @@ | ... | @@ -23,8 +23,8 @@ |
| 23 | position: absolute; | 23 | position: absolute; |
| 24 | left: 0; | 24 | left: 0; |
| 25 | right: 0; | 25 | right: 0; |
| 26 | top: 1420px; | 26 | top: 1460px; |
| 27 | // bottom: 100px; | 27 | // top: 1260px; |
| 28 | margin: 0 auto; | 28 | margin: 0 auto; |
| 29 | } | 29 | } |
| 30 | 30 | ... | ... |
| 1 | <scroll-view scroll-y="{{true}}" class="comp-item"> | 1 | <scroll-view scroll-y="{{true}}" class="comp-item"> |
| 2 | <image class="bg" src="../../image/oss/rule/rule-c1.png" mode="widthFix" /> | 2 | <image class="bg" src="../../image/oss/rule/rule-c1.png" mode="widthFix" /> |
| 3 | <view class="space1"></view> | 3 | <view class="space1"></view> |
| 4 | <view bindtap="hideMask" class="btn">我知道了</view> | 4 | <!-- <view bindtap="hideMask" class="btn">我知道了</view> --> |
| 5 | </scroll-view> | 5 | </scroll-view> |
| 6 | <view class="close-wrap"> | 6 | <view class="close-wrap"> |
| 7 | <span bindtap="hideMask" class="iconfont iconclose1"></span> | 7 | <span bindtap="hideMask" class="iconfont iconclose1"></span> | ... | ... |
| ... | @@ -2,7 +2,7 @@ let ENV_CONFIG = require('./env/index'); | ... | @@ -2,7 +2,7 @@ let ENV_CONFIG = require('./env/index'); |
| 2 | 2 | ||
| 3 | const APPID = '' | 3 | const APPID = '' |
| 4 | /** ====每次发布版本记得修改此环境配置==== */ | 4 | /** ====每次发布版本记得修改此环境配置==== */ |
| 5 | const ENV = 'Dev'; | 5 | const ENV = 'Prod'; // Dev Prod |
| 6 | const NET_CONFIG = ENV_CONFIG[ENV]; | 6 | const NET_CONFIG = ENV_CONFIG[ENV]; |
| 7 | const MOCKAPI = ENV_CONFIG.mockApi; | 7 | const MOCKAPI = ENV_CONFIG.mockApi; |
| 8 | 8 | ... | ... |
| ... | @@ -21,6 +21,7 @@ Page({ | ... | @@ -21,6 +21,7 @@ Page({ |
| 21 | wishList: [], | 21 | wishList: [], |
| 22 | coopInfo: {}, | 22 | coopInfo: {}, |
| 23 | userInfo: {}, | 23 | userInfo: {}, |
| 24 | indexInfo: {}, | ||
| 24 | canShake: true, | 25 | canShake: true, |
| 25 | status: 0, | 26 | status: 0, |
| 26 | animationShake: {}, // 摇一摇动画 | 27 | animationShake: {}, // 摇一摇动画 |
| ... | @@ -58,9 +59,11 @@ Page({ | ... | @@ -58,9 +59,11 @@ Page({ |
| 58 | indexInfo: app.globalData.indexInfo, | 59 | indexInfo: app.globalData.indexInfo, |
| 59 | userInfo: app.globalData.userInfo, | 60 | userInfo: app.globalData.userInfo, |
| 60 | }) | 61 | }) |
| 62 | |||
| 61 | this.queryWishbillDetail().then((result) => { | 63 | this.queryWishbillDetail().then((result) => { |
| 62 | let { | 64 | let { |
| 63 | wishInfo | 65 | wishInfo, |
| 66 | indexInfo | ||
| 64 | } = this.data; | 67 | } = this.data; |
| 65 | // 如果是本人的话,就跳转到我首页 | 68 | // 如果是本人的话,就跳转到我首页 |
| 66 | if (wishInfo.isSelfWishBill == 1) { | 69 | if (wishInfo.isSelfWishBill == 1) { |
| ... | @@ -68,8 +71,8 @@ Page({ | ... | @@ -68,8 +71,8 @@ Page({ |
| 68 | return; | 71 | return; |
| 69 | } | 72 | } |
| 70 | // 判断是否需要显示注册蒙层 | 73 | // 判断是否需要显示注册蒙层 |
| 71 | // 条件 1.不是本人 2.未为她助力 | 74 | // 条件 1.不是本人 2.未为她助力 3.未登陆 |
| 72 | if (wishInfo.isSelfWishBill == 0 && wishInfo.isAssist != 1) { | 75 | if (wishInfo.isSelfWishBill == 0 && wishInfo.isAssist != 1 && indexInfo.isCrmLogin != 1) { |
| 73 | this.setData({ | 76 | this.setData({ |
| 74 | tipsGuideRegisterVisible: true | 77 | tipsGuideRegisterVisible: true |
| 75 | }) | 78 | }) |
| ... | @@ -200,12 +203,10 @@ Page({ | ... | @@ -200,12 +203,10 @@ Page({ |
| 200 | this.setData({ | 203 | this.setData({ |
| 201 | groupMemberCoopVisible: true | 204 | groupMemberCoopVisible: true |
| 202 | }) | 205 | }) |
| 203 | } | ||
| 204 | |||
| 205 | this.setData({ | 206 | this.setData({ |
| 206 | canShake: true | 207 | canShake: true |
| 207 | }) | 208 | }) |
| 208 | 209 | } | |
| 209 | }) | 210 | }) |
| 210 | }, | 211 | }, |
| 211 | // 获取心愿单详情 | 212 | // 获取心愿单详情 | ... | ... |
| 1 | <view class="page"> | 1 | <view class="page"> |
| 2 | <view wx:if="{{animationPassVisible}}" class="ani"> | 2 | <view wx:if="{{animationPassVisible}}" class="ani"> |
| 3 | <view class="mask"></view> | 3 | <view class="mask"></view> |
| 4 | <image class="gif" mode="widthFix" src="../../image/oss/ani/pass.gif?ver=1" /> | 4 | <image class="gif" mode="widthFix" src="../../image/oss/ani/pass.gif" /> |
| 5 | </view> | 5 | </view> |
| 6 | <view class="app__bgc bgc"></view> | 6 | <view class="app__bgc bgc"></view> |
| 7 | <image class="bg" src="../../image/oss/coop/coop-bg-1.png" mode="scaleToFill" /> | 7 | <image class="bg" src="../../image/oss/coop/coop-bg-1.png" mode="scaleToFill" /> | ... | ... |
| ... | @@ -41,7 +41,7 @@ Page({ | ... | @@ -41,7 +41,7 @@ Page({ |
| 41 | 41 | ||
| 42 | let wishInfo = this.data.wishInfo; | 42 | let wishInfo = this.data.wishInfo; |
| 43 | let couponInfo = this.data.couponInfo; | 43 | let couponInfo = this.data.couponInfo; |
| 44 | if(!couponInfo){ | 44 | if (!couponInfo) { |
| 45 | return; | 45 | return; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| ... | @@ -161,11 +161,12 @@ Page({ | ... | @@ -161,11 +161,12 @@ Page({ |
| 161 | //获取临时缓存图片路径,存入data中 | 161 | //获取临时缓存图片路径,存入data中 |
| 162 | canvasToTempImage(canvasId) { | 162 | canvasToTempImage(canvasId) { |
| 163 | let that = this; | 163 | let that = this; |
| 164 | setTimeout(() => { | ||
| 164 | wx.canvasToTempFilePath({ | 165 | wx.canvasToTempFilePath({ |
| 165 | canvasId, // 这里canvasId即之前创建的canvas-id | 166 | canvasId, // 这里canvasId即之前创建的canvas-id |
| 166 | success: function (res) { | 167 | success: function (res) { |
| 167 | let tempFilePath = res.tempFilePath; | 168 | let tempFilePath = res.tempFilePath; |
| 168 | console.log(tempFilePath); | 169 | console.log("tempFilePath:", tempFilePath); |
| 169 | that.setData({ // 如果采用mpvue,即 this.imagePath = tempFilePath | 170 | that.setData({ // 如果采用mpvue,即 this.imagePath = tempFilePath |
| 170 | qrImagePath: tempFilePath, | 171 | qrImagePath: tempFilePath, |
| 171 | }); | 172 | }); |
| ... | @@ -174,6 +175,7 @@ Page({ | ... | @@ -174,6 +175,7 @@ Page({ |
| 174 | console.log(res); | 175 | console.log(res); |
| 175 | } | 176 | } |
| 176 | }); | 177 | }); |
| 178 | }, 50); | ||
| 177 | }, | 179 | }, |
| 178 | //适配不同屏幕大小的canvas | 180 | //适配不同屏幕大小的canvas |
| 179 | setCanvasSize(sz) { | 181 | setCanvasSize(sz) { | ... | ... |
| ... | @@ -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 | authorizeVisible: false, | ||
| 13 | tipsBorderVisible: false, | 14 | tipsBorderVisible: false, |
| 14 | tipsRegisterVisible: false, | 15 | tipsRegisterVisible: false, |
| 15 | tipsGroupMemberVisible: false, | 16 | tipsGroupMemberVisible: false, |
| ... | @@ -33,6 +34,11 @@ Page({ | ... | @@ -33,6 +34,11 @@ Page({ |
| 33 | guideIndex: 0, | 34 | guideIndex: 0, |
| 34 | }, | 35 | }, |
| 35 | onShareAppMessage() {}, | 36 | onShareAppMessage() {}, |
| 37 | showAuth() { | ||
| 38 | this.setData({ | ||
| 39 | authorizeVisible: true | ||
| 40 | }) | ||
| 41 | }, | ||
| 36 | onShow() {}, | 42 | onShow() {}, |
| 37 | onLoad(options) { | 43 | onLoad(options) { |
| 38 | // console.log("cw -- onLoad"); | 44 | // console.log("cw -- onLoad"); |
| ... | @@ -498,7 +504,8 @@ Page({ | ... | @@ -498,7 +504,8 @@ Page({ |
| 498 | tipsWishVisible: false, | 504 | tipsWishVisible: false, |
| 499 | tipsWishVisible: false, | 505 | tipsWishVisible: false, |
| 500 | tipsCreateCompleteVisible: false, | 506 | tipsCreateCompleteVisible: false, |
| 501 | tipsCommonVisible: false | 507 | tipsCommonVisible: false, |
| 508 | authorizeVisible: false, | ||
| 502 | }) | 509 | }) |
| 503 | }, | 510 | }, |
| 504 | // 子组件事件 | 511 | // 子组件事件 |
| ... | @@ -527,6 +534,11 @@ Page({ | ... | @@ -527,6 +534,11 @@ Page({ |
| 527 | }) | 534 | }) |
| 528 | break; | 535 | break; |
| 529 | 536 | ||
| 537 | // 授权成功 重拉用户信息 | ||
| 538 | case "_evt_auth_complete": | ||
| 539 | this.initData(); | ||
| 540 | break; | ||
| 541 | |||
| 530 | default: | 542 | default: |
| 531 | break; | 543 | break; |
| 532 | } | 544 | } | ... | ... |
| ... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
| 11 | <view class="sence"> | 11 | <view class="sence"> |
| 12 | <!-- 场景1 --> | 12 | <!-- 场景1 --> |
| 13 | <view wx:if="{{curStatus==1}}" class="view view1"> | 13 | <view wx:if="{{curStatus==1}}" class="view view1"> |
| 14 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png?ver=1'}}" mode="widthFix" /> | 14 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png'}}" mode="widthFix" /> |
| 15 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000008" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 15 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000008" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| 16 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000010" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 16 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000010" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| 17 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000009" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 17 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000009" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| ... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
| 21 | </view> | 21 | </view> |
| 22 | <!-- 场景2 --> | 22 | <!-- 场景2 --> |
| 23 | <view wx:if="{{curStatus==2}}" class="view view2"> | 23 | <view wx:if="{{curStatus==2}}" class="view view2"> |
| 24 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-2.png?ver=1'}}" mode="widthFix" /> | 24 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-2.png'}}" mode="widthFix" /> |
| 25 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000007" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 25 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000007" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| 26 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000004" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 26 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000004" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| 27 | <view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000007"></view> | 27 | <view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000007"></view> |
| ... | @@ -29,7 +29,7 @@ | ... | @@ -29,7 +29,7 @@ |
| 29 | </view> | 29 | </view> |
| 30 | <!-- 场景3 --> | 30 | <!-- 场景3 --> |
| 31 | <view wx:if="{{curStatus==3}}" class="view view3"> | 31 | <view wx:if="{{curStatus==3}}" class="view view3"> |
| 32 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-3.png?ver=1'}}" mode="widthFix" /> | 32 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-3.png'}}" mode="widthFix" /> |
| 33 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 33 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| 34 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 34 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| 35 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 35 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| ... | @@ -39,7 +39,7 @@ | ... | @@ -39,7 +39,7 @@ |
| 39 | </view> | 39 | </view> |
| 40 | <!-- 场景4 --> | 40 | <!-- 场景4 --> |
| 41 | <view wx:if="{{curStatus==4}}" class="view view4"> | 41 | <view wx:if="{{curStatus==4}}" class="view view4"> |
| 42 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-4.png?ver=1'}}" mode="widthFix" /> | 42 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-4.png'}}" mode="widthFix" /> |
| 43 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000006" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 43 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000006" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| 44 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000005" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 44 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000005" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
| 45 | <view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000006"></view> | 45 | <view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000006"></view> |
| ... | @@ -122,3 +122,6 @@ | ... | @@ -122,3 +122,6 @@ |
| 122 | <van-popup show="{{ tipsCommonVisible }}"> | 122 | <van-popup show="{{ tipsCommonVisible }}"> |
| 123 | <tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp> | 123 | <tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp> |
| 124 | </van-popup> | 124 | </van-popup> |
| 125 | <van-popup show="{{ authorizeVisible }}" bind:click-overlay="hideMask"> | ||
| 126 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> | ||
| 127 | </van-popup> | ... | ... |
| 1 | <view class="page"> | 1 | <view class="page"> |
| 2 | <view class="app__bgc bgc"> | 2 | <view class="app__bgc bgc"> |
| 3 | <image src="../../image/oss/index/index-c1.png?ver=1" mode="scaleToFill" /> | 3 | <image src="../../image/oss/index/index-c1.png" mode="scaleToFill" /> |
| 4 | </view> | 4 | </view> |
| 5 | <view class="app__bg bg"> | 5 | <view class="app__bg bg"> |
| 6 | <image src="../../image/oss/index/index-c2.png?ver=1" mode="scaleToFill" /> | 6 | <image src="../../image/oss/index/index-c2.png" mode="scaleToFill" /> |
| 7 | </view> | 7 | </view> |
| 8 | <view class="decoration"> | 8 | <view class="decoration"> |
| 9 | <image class="d1" src="../../image/oss/index/index-c4.png" mode="widthFix" /> | 9 | <image class="d1" src="../../image/oss/index/index-c4.png" mode="widthFix" /> |
| ... | @@ -27,9 +27,9 @@ | ... | @@ -27,9 +27,9 @@ |
| 27 | </view> | 27 | </view> |
| 28 | </view> | 28 | </view> |
| 29 | </view> | 29 | </view> |
| 30 | <van-popup show="{{ authorizeVisible }}" bind:click-overlay="hideMask"> | 30 | <van-popup show="{{ authorizeVisible }}"> |
| 31 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> | 31 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> |
| 32 | </van-popup> | 32 | </van-popup> |
| 33 | <van-popup show="{{ tipsRuleVisible }}"> | 33 | <van-popup show="{{ tipsRuleVisible }}" bind:click-overlay="hideMask"> |
| 34 | <tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp> | 34 | <tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp> |
| 35 | </van-popup> | 35 | </van-popup> | ... | ... |
| 1 | import { | 1 | import { |
| 2 | getBindtapData | 2 | getBindtapData |
| 3 | } from '../../utils/util'; | 3 | } from '../../utils/util'; |
| 4 | |||
| 5 | import { | ||
| 6 | productMap | ||
| 7 | } from '../../const/custom-data'; | ||
| 8 | |||
| 4 | let app = getApp(); | 9 | let app = getApp(); |
| 5 | Page({ | 10 | Page({ |
| 6 | data: { | 11 | data: { |
| ... | @@ -30,13 +35,38 @@ Page({ | ... | @@ -30,13 +35,38 @@ Page({ |
| 30 | */ | 35 | */ |
| 31 | onShowDetailHandler(evt) { | 36 | onShowDetailHandler(evt) { |
| 32 | let curData = getBindtapData(evt); | 37 | let curData = getBindtapData(evt); |
| 38 | |||
| 39 | if (curData.instanceCode) { | ||
| 40 | // 查看奖品 | ||
| 41 | app.post({ | ||
| 42 | url: app.api.wishbillGiftQuery, | ||
| 43 | data: { | ||
| 44 | instanceCode: curData.instanceCode | ||
| 45 | } | ||
| 46 | }).then((result) => { | ||
| 47 | |||
| 48 | // 合并奖品详情数据 | ||
| 49 | curData = Object.assign(curData, result); | ||
| 50 | |||
| 51 | // 合并自定义数据 | ||
| 52 | let product = productMap[curData.prizeDefineCode + ""]; | ||
| 53 | curData = Object.assign(curData, product); | ||
| 54 | |||
| 55 | app.globalData.giftData = curData; | ||
| 56 | // console.log("app.globalData.giftData 333:", app.globalData.giftData); | ||
| 57 | // console.log(JSON.stringify(app.globalData.giftData)); | ||
| 58 | app.router.push({ | ||
| 59 | path: "prizeDetail" | ||
| 60 | }) | ||
| 61 | }) | ||
| 62 | |||
| 63 | } else { | ||
| 33 | app.globalData.curCoupon = curData; | 64 | app.globalData.curCoupon = curData; |
| 34 | // app.globalData.giftData = curData; | ||
| 35 | app.router.push({ | 65 | app.router.push({ |
| 36 | path: "couponDetail" | 66 | path: "couponDetail" |
| 37 | }) | 67 | }) |
| 38 | console.log("curData:", curData); | 68 | } |
| 39 | console.log(JSON.stringify(curData)); | 69 | |
| 40 | }, | 70 | }, |
| 41 | // 子组件事件 | 71 | // 子组件事件 |
| 42 | evtcomp(evt) { | 72 | evtcomp(evt) { | ... | ... |
| ... | @@ -67,11 +67,21 @@ | ... | @@ -67,11 +67,21 @@ |
| 67 | position: relative; | 67 | position: relative; |
| 68 | 68 | ||
| 69 | .name { | 69 | .name { |
| 70 | // position: absolute; | ||
| 71 | // left: 40px; | ||
| 72 | // top: 40px; | ||
| 73 | // color: #ffffff; | ||
| 74 | // font-size: 32px; | ||
| 70 | position: absolute; | 75 | position: absolute; |
| 71 | left: 40px; | 76 | left: 40px; |
| 72 | top: 40px; | 77 | top: 12px; |
| 73 | color: #ffffff; | 78 | color: #ffffff; |
| 74 | font-size: 32px; | 79 | font-size: 32px; |
| 80 | width: 360px; | ||
| 81 | height: 100px; | ||
| 82 | display: flex; | ||
| 83 | align-items: center; | ||
| 84 | |||
| 75 | } | 85 | } |
| 76 | 86 | ||
| 77 | .detail { | 87 | .detail { | ... | ... |
| ... | @@ -10,12 +10,12 @@ | ... | @@ -10,12 +10,12 @@ |
| 10 | <view class="top-space"></view> | 10 | <view class="top-space"></view> |
| 11 | <view class="content"> | 11 | <view class="content"> |
| 12 | <view class="coupon"> | 12 | <view class="coupon"> |
| 13 | <view wx:for="{{prizeInfo}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}"> | 13 | <view bindtap="onShowDetailHandler" data-data="{{item}}" wx:for="{{prizeInfo}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}"> |
| 14 | <image wx:if="{{item.type==4}}" class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-2.png" /> | 14 | <image wx:if="{{item.type==4}}" class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-2.png" /> |
| 15 | <image wx:else class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" /> | 15 | <image wx:else class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" /> |
| 16 | <view class="cont"> | 16 | <view class="cont"> |
| 17 | <view class="name">{{item.name}}</view> | 17 | <view class="name">{{item.name}}</view> |
| 18 | <view bindtap="onShowDetailHandler" data-data="{{item}}" class="detail">查看详情</view> | 18 | <view class="detail">查看详情</view> |
| 19 | <view class="card-info card-no">劵码:{{item.couponCode}}</view> | 19 | <view class="card-info card-no">劵码:{{item.couponCode}}</view> |
| 20 | <view class="card-info card-date">有效期:即日起至{{item.endDateStr}}</view> | 20 | <view class="card-info card-date">有效期:即日起至{{item.endDateStr}}</view> |
| 21 | </view> | 21 | </view> | ... | ... |
| ... | @@ -33,7 +33,7 @@ Page({ | ... | @@ -33,7 +33,7 @@ Page({ |
| 33 | }).then((result) => { | 33 | }).then((result) => { |
| 34 | console.log("result:", result); | 34 | console.log("result:", result); |
| 35 | wx.showLoading({ | 35 | wx.showLoading({ |
| 36 | title: '海报在修图中···”', | 36 | title: '海报在修图中···', |
| 37 | }); | 37 | }); |
| 38 | this.initData(); | 38 | this.initData(); |
| 39 | }) | 39 | }) |
| ... | @@ -43,7 +43,8 @@ Page({ | ... | @@ -43,7 +43,8 @@ Page({ |
| 43 | let nickname = app.globalData.userInfo && app.globalData.userInfo.nickname || ""; | 43 | let nickname = app.globalData.userInfo && app.globalData.userInfo.nickname || ""; |
| 44 | let billCode = app.globalData.indexInfo.wishBillCode; | 44 | let billCode = app.globalData.indexInfo.wishBillCode; |
| 45 | let wxShareTitle = nickname + `正在参加丸美眼霜节心愿单活动,需要你的倾情相助!`; | 45 | let wxShareTitle = nickname + `正在参加丸美眼霜节心愿单活动,需要你的倾情相助!`; |
| 46 | let wxCodePath = `/pages/coop/coop?code=${billCode}&s=share` | 46 | let wxCodePath = `pages/coop/coop?code=${billCode}&s=share` |
| 47 | console.log("wxCodePath:", wxCodePath); | ||
| 47 | this.setData({ | 48 | this.setData({ |
| 48 | wxCodePath: wxCodePath, | 49 | wxCodePath: wxCodePath, |
| 49 | wxShareTitle: wxShareTitle | 50 | wxShareTitle: wxShareTitle |
| ... | @@ -54,7 +55,8 @@ Page({ | ... | @@ -54,7 +55,8 @@ Page({ |
| 54 | loading: false, | 55 | loading: false, |
| 55 | url: app.api.wxacodeGet, | 56 | url: app.api.wxacodeGet, |
| 56 | data: { | 57 | data: { |
| 57 | path: encodeURIComponent(wxCodePath) | 58 | // path: encodeURIComponent(wxCodePath) |
| 59 | path: wxCodePath | ||
| 58 | } | 60 | } |
| 59 | }).then((result) => { | 61 | }).then((result) => { |
| 60 | this.setData({ | 62 | this.setData({ | ... | ... |
| ... | @@ -176,11 +176,11 @@ Page({ | ... | @@ -176,11 +176,11 @@ Page({ |
| 176 | //获取临时缓存图片路径,存入data中 | 176 | //获取临时缓存图片路径,存入data中 |
| 177 | canvasToTempImage(canvasId) { | 177 | canvasToTempImage(canvasId) { |
| 178 | let that = this; | 178 | let that = this; |
| 179 | setTimeout(() => { | ||
| 179 | wx.canvasToTempFilePath({ | 180 | wx.canvasToTempFilePath({ |
| 180 | canvasId, // 这里canvasId即之前创建的canvas-id | 181 | canvasId, // 这里canvasId即之前创建的canvas-id |
| 181 | success: function (res) { | 182 | success: function (res) { |
| 182 | let tempFilePath = res.tempFilePath; | 183 | let tempFilePath = res.tempFilePath; |
| 183 | console.log(tempFilePath); | ||
| 184 | that.setData({ // 如果采用mpvue,即 this.imagePath = tempFilePath | 184 | that.setData({ // 如果采用mpvue,即 this.imagePath = tempFilePath |
| 185 | qrImagePath: tempFilePath, | 185 | qrImagePath: tempFilePath, |
| 186 | }); | 186 | }); |
| ... | @@ -189,6 +189,8 @@ Page({ | ... | @@ -189,6 +189,8 @@ Page({ |
| 189 | console.log(res); | 189 | console.log(res); |
| 190 | } | 190 | } |
| 191 | }); | 191 | }); |
| 192 | }, 50); | ||
| 193 | |||
| 192 | }, | 194 | }, |
| 193 | //适配不同屏幕大小的canvas | 195 | //适配不同屏幕大小的canvas |
| 194 | setCanvasSize(sz) { | 196 | setCanvasSize(sz) { | ... | ... |
| ... | @@ -301,6 +301,7 @@ Page({ | ... | @@ -301,6 +301,7 @@ Page({ |
| 301 | }); | 301 | }); |
| 302 | }, | 302 | }, |
| 303 | hideMask() { | 303 | hideMask() { |
| 304 | // console.log("1111"); | ||
| 304 | this.setData({ | 305 | this.setData({ |
| 305 | tipsRuleVisible: false, | 306 | tipsRuleVisible: false, |
| 306 | tipsPirzeVisible: false, | 307 | tipsPirzeVisible: false, | ... | ... |
| ... | @@ -51,11 +51,11 @@ | ... | @@ -51,11 +51,11 @@ |
| 51 | </view> | 51 | </view> |
| 52 | </view> | 52 | </view> |
| 53 | <view wx:if="{{item.accessStatus == 0}}" class="btn disable">弹力充值中</view> | 53 | <view wx:if="{{item.accessStatus == 0}}" class="btn disable">弹力充值中</view> |
| 54 | <view bindtap="onGetGiftHandler" data-data="{{item}}" wx:if="{{item.accessStatus == 1}}" class="btn"> | 54 | <view bindtap="onGetGiftHandler" data-data="{{item}}" wx:if="{{item.accessStatus == 1 || (item.accessStatus == 2 && item.acceptType==0)}}" class="btn"> |
| 55 | 马上领取 | 55 | 马上领取 |
| 56 | </view> | 56 | </view> |
| 57 | <view bindtap="onCheckGiftHandler" data-data="{{item}}" wx:if="{{item.accessStatus == 2}}" class="btn"> | 57 | <view bindtap="onCheckGiftHandler" data-data="{{item}}" wx:if="{{item.accessStatus == 2 && item.acceptType != 0}}" class="btn"> |
| 58 | 已领取 | 58 | {{item.acceptType == 2 ?"快递邮寄":"门店自提"}} |
| 59 | </view> | 59 | </view> |
| 60 | </view> | 60 | </view> |
| 61 | </view> | 61 | </view> |
| ... | @@ -100,6 +100,6 @@ | ... | @@ -100,6 +100,6 @@ |
| 100 | <van-popup show="{{ tipsRuleVisible }}" bind:click-overlay="hideMask"> | 100 | <van-popup show="{{ tipsRuleVisible }}" bind:click-overlay="hideMask"> |
| 101 | <tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp> | 101 | <tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp> |
| 102 | </van-popup> | 102 | </van-popup> |
| 103 | <van-popup show="{{ tipsPirzeVisible }}"> | 103 | <van-popup show="{{ tipsPirzeVisible }}" bind:click-overlay="hideMask"> |
| 104 | <tips-prize-comp bind:evtcomp="evtcomp" wish-info="{{curWish}}" status="{{status}}"></tips-prize-comp> | 104 | <tips-prize-comp bind:evtcomp="evtcomp" wish-info="{{curWish}}" status="{{status}}"></tips-prize-comp> |
| 105 | </van-popup> | 105 | </van-popup> | ... | ... |
-
Please register or sign in to post a comment