diff --git a/images/ic_version_contrast.png b/images/ic_version_contrast.png new file mode 100644 index 0000000..8bd77a0 Binary files /dev/null and b/images/ic_version_contrast.png differ diff --git a/packagecard/marketing/marketingposter.js b/packagecard/marketing/marketingposter.js index 426a625..20f0ef4 100644 --- a/packagecard/marketing/marketingposter.js +++ b/packagecard/marketing/marketingposter.js @@ -15,7 +15,7 @@ Page({ tabList: [{ name: '营销模板', }, { - name: '发布历史' + name: '我的海报' }], isRefreshing: false, //是否刷新中 isLoadMore: false, //是否在加载中 @@ -176,12 +176,12 @@ Page({ }) var type = res.target.dataset.sharetype var img = _self.data.imgUrl + _self.data.posterHistoryList[_self.data.curItemIndex].cardTemplateUsePhotoUrl - + var id = _self.data.posterHistoryList[_self.data.curItemIndex].cardTemplateUseId if (type && type == '2') { //转发个人动态 } else { - var param = '/pages/index/index?posterId=' + img; + var param = '/pages/index/index?cardTemplateUseId=' + id; return { title: '活动', path: param, diff --git a/packagecard/paypage/paypage.js b/packagecard/paypage/paypage.js index 19c31bf..dbbedf5 100644 --- a/packagecard/paypage/paypage.js +++ b/packagecard/paypage/paypage.js @@ -36,6 +36,8 @@ Page({ selTypeIndex: 0, //当前选中的类型列表 selTypeId: '', //当前选中的类型id selType: '', //选中的类型type + isShowContrast: false, //是否显示版本对比 + contrastId: '', //版本对比图片ID }, /** @@ -122,7 +124,8 @@ Page({ this.setData({ isShowUseDeal: false, //使用协议 isShowServiceTreaty: false, //会员服务协议 - isShowIntimacyTreaty: false //隐私政策 + isShowIntimacyTreaty: false, //隐私政策 + isShowContrast: false //版本对比 }) }, //提交支付 @@ -294,5 +297,25 @@ Page({ .catch(err => { }) + }, + //显示版本对比 + showContrast() { + var _self = this + wx.showLoading({ + title: '加载中...', + }) + app.http.get(app.urls.getVersionContrast, { + header: { + token: app.globalData.token + } + }) + .then(res => { + wx.hideLoading({}) + _self.setData({ + contrastId: app.urls.baseImgUrl + res.data.data, + isShowContrast: true, + }) + }) + .catch(err => {}) } }) \ No newline at end of file diff --git a/packagecard/paypage/paypage.wxml b/packagecard/paypage/paypage.wxml index 0d1c484..eaea0a3 100644 --- a/packagecard/paypage/paypage.wxml +++ b/packagecard/paypage/paypage.wxml @@ -22,6 +22,7 @@ 邀请码 (选填) + @@ -40,8 +41,7 @@ - - + @@ -53,21 +53,50 @@ + - - - + + + + + + - - - + + + + + + - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packagecard/paypage/paypage.wxss b/packagecard/paypage/paypage.wxss index 02c0580..a9d7f41 100644 --- a/packagecard/paypage/paypage.wxss +++ b/packagecard/paypage/paypage.wxss @@ -107,14 +107,19 @@ font-weight: normal; } +.code-box image { + width: 96rpx; + height: 96rpx; +} + .code-input { - text-align: right; + text-align: left; align-self: center; padding: 15rpx; margin-left: 15rpx; height: 70rpx; border-radius: 10rpx; - width: 70%; + width: 60%; } .treaty-box { @@ -125,6 +130,9 @@ margin-bottom: 40rpx; font-size: 28rpx; margin-top: 15rpx; + background-color: #ffffff; + height: 50%; + width: 90%; } .treaty-content-box { @@ -133,6 +141,9 @@ justify-content: center; align-items: center; padding: 15rpx; + height: 90%; + background-color: #ffffff; + border-radius: 5rpx; } .treaty-content-box .title { diff --git a/pages/index/index.js b/pages/index/index.js index 2a3791f..2f775e6 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -42,7 +42,8 @@ Page({ isBindPhone: false, isNeedRefresh: true, isShowComment: false, //是否显示评论弹框 - posterId: '', //分享过来的海报图片 + posterId: '', //分享过来的海报ID + posterImg: '', //分享过来的海报图片 isShowPoster: false, defaultBtnIcon: '/images/ic_share_img.png' }, @@ -55,15 +56,14 @@ Page({ isMine: 2 }) } - self.buildId() - self.doLogin() - if (options.posterId) { + if (options.cardTemplateUseId) { //展示图片 self.setData({ - posterId: options.posterId, - isShowPoster: true + posterId: options.cardTemplateUseId }) } + self.buildId() + self.doLogin() }, // 登录 doLogin() { @@ -100,6 +100,9 @@ Page({ } self.getOtherCard(2) self.getBtnIcon() //获取首页按钮图片 + if (self.data.posterId != '') { + self.getPosterImg() + } }) .catch(err => { wx.hideLoading({}) @@ -107,6 +110,28 @@ Page({ } }) }, + //获取分享的海报 + getPosterImg() { + var _self = this + app.http.get(app.urls.getMyCardDetail.format({ + cardTemplateUseId: _self.data.posterId + }), { + header: { + token: app.globalData.token + } + }) + .then(res => { + var img = _self.data.imgUrl + res.data.cardTemplateUsePhotoUrl + console.log(img) + _self.setData({ + posterImg: img, + isShowPoster: true + }) + }) + .catch(err => { + + }) + }, //首页按钮图片 getBtnIcon() { var _self = this diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 361557f..0351f2a 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -442,7 +442,7 @@ custom-style="background-color:transparent;height:100%;width:100%;" round> - + diff --git a/project.config.json b/project.config.json index 5cd973a..a69dadf 100644 --- a/project.config.json +++ b/project.config.json @@ -21,9 +21,9 @@ "checkSiteMap": true, "uploadWithSourceMap": true, "compileHotReLoad": false, - "useMultiFrameRuntime": false, - "useApiHook": false, - "useApiHostProcess": false, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, "babelSetting": { "ignore": [], "disablePlugins": [], diff --git a/utils/api.js b/utils/api.js index 2352406..08e8dbf 100644 --- a/utils/api.js +++ b/utils/api.js @@ -1,15 +1,15 @@ var apis = { - // url: 'http://192.168.0.115:8091/systemcard/', - // userCenter: 'http://192.168.0.115:8091/systemcard/', - // baseImgUrl: 'http://192.168.0.115:8091/systemcard/route/file/download/true/', + url: 'http://192.168.0.115:8091/systemcard/', + userCenter: 'http://192.168.0.115:8091/systemcard/', + baseImgUrl: 'http://192.168.0.115:8091/systemcard/route/file/download/true/', // url: 'https://cbc.wgink.ink/systemcard/', // userCenter: 'https://cbc.wgink.ink/systemcard/', // baseImgUrl: 'https://cbc.wgink.ink/systemcard/route/file/download/true/', - url: 'https://www.tenlion.com.cn/systemcard/', - userCenter: 'https://www.tenlion.com.cn/systemcard/', - baseImgUrl: 'https://www.tenlion.com.cn/systemcard/route/file/download/true/', + // url: 'https://www.tenlion.com.cn/systemcard/', + // userCenter: 'https://www.tenlion.com.cn/systemcard/', + // baseImgUrl: 'https://www.tenlion.com.cn/systemcard/route/file/download/true/', // url: 'http://192.168.0.111:8091/systemcard/', // userCenter: 'http://192.168.0.111:8091/systemcard/', @@ -46,6 +46,7 @@ var apis = { getCardPayState: `app/cardcharge/savecharge/{mode}`, //获取开通名片的订单信息 doSaveOrderPayState: `app/cardcharge/checkorder/{cardChargeOrderNumber}`, //保存订单支付状态 getPayHistoryList: `app/cardcharge/listpage`, //获取 + getVersionContrast: `app/projectconfigrelease/file/versionContrastPhoto`, //版本对比图 /*用户 */ /**店铺相关 **/ doSaveShop: `app/shop/save`, //保存商店