diff --git a/assets/images/home-b.png b/assets/images/home-b.png new file mode 100644 index 0000000..5afa798 Binary files /dev/null and b/assets/images/home-b.png differ diff --git a/assets/images/mendian-b.png b/assets/images/mendian-b.png new file mode 100644 index 0000000..62d22bd Binary files /dev/null and b/assets/images/mendian-b.png differ diff --git a/assets/images/park-b.png b/assets/images/park-b.png new file mode 100644 index 0000000..dba1a56 Binary files /dev/null and b/assets/images/park-b.png differ diff --git a/assets/images/user-b.png b/assets/images/user-b.png new file mode 100644 index 0000000..8fdd54e Binary files /dev/null and b/assets/images/user-b.png differ diff --git a/components/hot/index.js b/components/hot/index.js index 11af71b..e9071c6 100644 --- a/components/hot/index.js +++ b/components/hot/index.js @@ -33,26 +33,29 @@ Component({ //获取砍价列表 getList() { let that = this; - let param ={ + let param = { targetAd: 6, } Http.get({ url: config.api.change, data:param, }).then(res => { - that.setData({ - kData:res.data + if(res.data){ + that.setData({ + kData:res.data, + couponId: res.data.couponId + }); + } + }) + .catch(err => { + console.log(err) + wx.showToast({ + title: err.errMsg, + icon: 'none', + duration: 2000, + mask: false }); }) - .catch(err => { - console.log(err) - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); - }) }, //获取拼团列表 getptList() { @@ -63,38 +66,41 @@ Component({ url: config.api.change, data: param1, }).then(res => { - this.setData({ - pData:res.data, - couponId: res.data.couponId - }); - console.log( this.data.couponId) - }) - .catch(err => { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false + if(res.data){ + this.setData({ + pData:res.data, + couponId1: res.data.couponId }); - }) - + } + }) + .catch(err => { + wx.showToast({ + title: err.errMsg, + icon: 'none', + duration: 2000, + mask: false + }); + }) }, // 换一换 getChange(){ - let param1 = { - targetAd: 7, - couponId: this.data.couponId1 - } - Http.get({ - url: config.api.change, - data: param1, - }).then(res => { - this.setData({ - pData: res.data, - couponId1: res.data.couponId - }); - }) + if(this.data.couponId){ + let that = this; + let param = { + targetAd: 6, + couponid:this.data.couponId + } + Http.get({ + url: config.api.change, + data:param, + }).then(res => { + that.setData({ + kData:res.data, + couponId: res.data.couponId + }); + }) .catch(err => { + console.log(err) wx.showToast({ title: err.errMsg, icon: 'none', @@ -102,28 +108,31 @@ Component({ mask: false }); }) - let param = { - targetAd: 6, - couponId: this.data.couponId } - Http.get({ - url: config.api.change, - data: param, - }).then(res => { - this.setData({ - kData: res.data, - couponId: res.data.couponId - }); - }) + if(this.data.couponId1){ + let param1 = { + targetAd: 7, + couponid1:this.data.couponId1 + } + Http.get({ + url: config.api.change, + data: param1, + }).then(res => { + this.setData({ + pData:res.data, + couponId1: res.data.couponId + }); + }) .catch(err => { - console.log(err) wx.showToast({ title: err.errMsg, icon: 'none', duration: 2000, mask: false }); - }) + }) + } + }, //跳转砍价详情 gotokjdetail: function (e) { @@ -155,6 +164,7 @@ Component({ Http.setToken(token); this.getList(); this.getptList(); + // this.getChange(); }; if (app.globalData.token && app.globalData.token != null) { app.couponChannelListCallback(app.globalData.token); diff --git a/ext.json b/ext.json index 6b64b8c..63ccd43 100644 --- a/ext.json +++ b/ext.json @@ -34,29 +34,29 @@ "text": "首页", "iconPath": "assets/images/home.png", "pagePath": "pages/main/index", - "selectedIconPath": "assets/images/home-a.png" + "selectedIconPath": "assets/images/home-b.png" }, { "text": "门店", "iconPath": "assets/images/mendian.png", "pagePath": "pages/index/searchbar/index", - "selectedIconPath": "assets/images/mendian-a.png" + "selectedIconPath": "assets/images/mendian-b.png" }, { "text": "停车", "iconPath": "assets/images/park.png", "pagePath": "pages/passCar/passCar", - "selectedIconPath": "assets/images/park-a.png" + "selectedIconPath": "assets/images/park-b.png" }, { "text": "我的", "iconPath": "assets/images/user.png", "pagePath": "pages/user/index", - "selectedIconPath": "assets/images/user-a.png" + "selectedIconPath": "assets/images/user-b.png" } ], "color": "#abb1be", - "selectedColor": "#b2743d" + "selectedColor": "#FD832D" }, "window": { "backgroundTextStyle": "dark", diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index e2f35ff..f881eaf 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -5,7 +5,6 @@ const util = require("../../../utils/util"); const imgurl = require("../../../utils/imgurl"); Page({ data: { - isshowposter1: true,//是否显示发起砍价 isshowposter:false,//是否显示分享弹框 fenxiangUrl: imgurl.fenxiang.url, clockUrl: imgurl.clock.url, @@ -101,22 +100,7 @@ Page({ isshowposter: false, }) }, - /** - * 显示发起砍价 - */ - showshare1: function () { - this.setData({ - isshowposter1: true, - }) - }, - /** - * 隐藏发起砍价 - */ - hidemodal1: function () { - this.setData({ - isshowposter1: false, - }) - }, + /** * 跳转到门店列表的详情页面 */ diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml index 6ccd833..3678fdb 100644 --- a/pages/coupon/detail/index.wxml +++ b/pages/coupon/detail/index.wxml @@ -151,11 +151,11 @@ 立即购买 - +
- +
@@ -219,6 +219,5 @@ - - + \ No newline at end of file diff --git a/pages/index/searchbar/detail/index.wxss b/pages/index/searchbar/detail/index.wxss index 6fefe80..2b0d238 100644 --- a/pages/index/searchbar/detail/index.wxss +++ b/pages/index/searchbar/detail/index.wxss @@ -1,4 +1,7 @@ @import "../../../../app.wxss"; +page{ + background: #F4F5F9; +} .index-slide, swiper-item .index-slide-image { display: block; @@ -136,7 +139,7 @@ } .merchant-phones { - border-top:8px solid #efefef; + /* border-top:8px solid #efefef; */ padding: 20rpx 0; display: block; font-size: 30rpx; @@ -198,7 +201,7 @@ .merchant-brand { border: none !important; width: 92%; - margin: 20rpx auto 20rpx; + margin: 0 auto 20rpx; } .merchant-brand view:nth-child(2) text:nth-child(1) { margin-top: 20rpx; @@ -345,6 +348,7 @@ /* margin: 30rpx auto 0; */ display:block; text-align:center; + color: #999; } .modal { width: 100%; diff --git a/pages/integralmall/index.js b/pages/integralmall/index.js index f46dd4e..8b0fc28 100644 --- a/pages/integralmall/index.js +++ b/pages/integralmall/index.js @@ -1,6 +1,7 @@ var config = require("../../config/config.js"); const Http = require("../../utils/HttpBasics"); const imgurl = require("../../utils/imgurl"); +const QR = require("../../utils/memberqrcode.js"); Page({ /** * 页面的初始数据 @@ -92,11 +93,60 @@ Page({ .catch(err => { wx.showModal({ title: '提示', - content: err.errMsg, + content: err.message, showCancel: false }) }) }, + //适配不同屏幕大小的canvas + setCanvasSize: function () { + var size = {}; + try { + var res = wx.getSystemInfoSync(); + var scale = 750 / 500; + //不同屏幕下canvas的适配比例;设计稿是750宽 + var width = res.windowWidth / scale; + var height = width; + //canvas画布为正方形 + size.w = width; + size.h = height; + } catch (e) { + // Do something when catch error + console.log("获取设备信息失败" + e); + } + return size; + }, + createQrCode: function (url, canvasId, cavW, cavH) { + //调用插件中的draw方法,绘制二维码图片 + QR.api.draw(url, canvasId, cavW, cavH); + }, + qrcode: function (e) { + var that = this; + that.setData({ + showQrcode: true + }) + wx.showToast({ + title: '生成中...', + icon: 'loading', + duration: 2000 + }); + var st = setTimeout(function () { + wx.hideToast() + var size = that.setCanvasSize(); + var url = JSON.stringify({ + END: "C", + TYPE: "memberCode", + ID: that.data.memberId, + }) + that.createQrCode(url, "mycanvas1", size.w, size.h); + that.setData({ + maskHidden: true + }); + clearTimeout(st); + }, 1000) + }, + + // 获得积分,渲染页面 getPoints(){ let that = this; diff --git a/pages/main/index.js b/pages/main/index.js index 39e408b..3632f46 100644 --- a/pages/main/index.js +++ b/pages/main/index.js @@ -578,9 +578,11 @@ Page({ wx.stopPullDownRefresh(); }; // 砍价下拉刷新 - that.selectComponent("#bargain").getList(); - that.selectComponent("#spellGroup").getList(); - that.selectComponent("#rushtobyCard").getList(); + that.selectComponent("#hot").getList(); + that.selectComponent("#hot").getptList(); + // that.selectComponent("#bargain").getList(); + // that.selectComponent("#spellGroup").getList(); + // that.selectComponent("#rushtobyCard").getList(); wx.stopPullDownRefresh(); }, //加载更多 diff --git a/pages/main/index.wxml b/pages/main/index.wxml index ee21450..c395418 100644 --- a/pages/main/index.wxml +++ b/pages/main/index.wxml @@ -49,7 +49,7 @@ 消费卡 - + 幸运卡牌 diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss index a070f10..ab88068 100644 --- a/pages/order/detail/index.wxss +++ b/pages/order/detail/index.wxss @@ -210,7 +210,7 @@ page { display: block; } .classif > view:nth-child(3) view text:nth-child(2) { - padding-left: 15rpx; + /* padding-left: 15rpx; */ } .classif > view:nth-child(6) text:nth-child(2) { @@ -435,6 +435,7 @@ radio { font-size: 36rpx !important; font-weight: 400 !important; float: right; + margin-left: 10rpx; } .jine1 { @@ -444,7 +445,7 @@ radio { } .buy-view { - background: #fff; + /* background: #fff; */ position: fixed; padding-top: 30rpx; height: 94rpx; @@ -456,12 +457,12 @@ radio { } .buy { - background: #00c0ff; + background: linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); height: 94rpx; width: 670rpx; margin: 0 auto; color: #fff; - font-size: 36rpx; + font-size: 32rpx; line-height: 94rpx; border-radius: 61rpx; } diff --git a/pages/spellGroup/spellGroup.js b/pages/spellGroup/spellGroup.js index 40f3361..85a8d84 100644 --- a/pages/spellGroup/spellGroup.js +++ b/pages/spellGroup/spellGroup.js @@ -7,6 +7,7 @@ Page({ * 页面的初始数据 */ data: { + noCoupon: imgurl.noCoupon.url, bannerUrl: imgurl.banner.url, loadingUrl: imgurl.loading.url, nodata: imgurl.nodata.url, diff --git a/pages/spellGroup/spellGroup.wxml b/pages/spellGroup/spellGroup.wxml index 9938bc1..f5a38f2 100644 --- a/pages/spellGroup/spellGroup.wxml +++ b/pages/spellGroup/spellGroup.wxml @@ -5,12 +5,13 @@ --> - - + + + 暂无数据 - + 暂无数据 diff --git a/pages/spellGroup/spellGroup.wxss b/pages/spellGroup/spellGroup.wxss index 79ff158..85d8e42 100644 --- a/pages/spellGroup/spellGroup.wxss +++ b/pages/spellGroup/spellGroup.wxss @@ -279,7 +279,7 @@ image{ margin: 0 auto; border-radius:15rpx; box-sizing: border-box; - margin-top: 320rpx; + margin-top: 20rpx; } .no-data{ width: 690rpx;