From 8882a3642314137ded85ae9bc2cb4428b76908a4 Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Tue, 19 Mar 2019 14:58:58 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=A6=96=E9=A1=B5][=E5=A2=9E=E5=8A=A0]:[?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=A2=9E=E5=8A=A0=E9=A2=91=E9=81=93]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/gameentry/gentry.wxss | 1 + pages/bargain/bargain.json | 1 + pages/bargain/bargain.wxss | 15 ++- pages/main/{rushToBuy => bargain}/index.js | 4 +- pages/main/{rushToBuy => bargain}/index.json | 0 pages/main/bargain/index.wxml | 16 ++++ pages/main/bargain/index.wxss | 92 +++++++++++++++++++ pages/main/index.js | 5 +- pages/main/index.json | 3 +- pages/main/index.wxml | 23 +++-- pages/main/index.wxss | 7 +- pages/main/spellGroup/index.js | 73 +++++++++++++++ pages/main/spellGroup/index.json | 6 ++ .../main/{rushToBuy => spellGroup}/index.wxml | 4 +- .../main/{rushToBuy => spellGroup}/index.wxss | 0 15 files changed, 228 insertions(+), 22 deletions(-) rename pages/main/{rushToBuy => bargain}/index.js (96%) rename pages/main/{rushToBuy => bargain}/index.json (100%) create mode 100644 pages/main/bargain/index.wxml create mode 100644 pages/main/bargain/index.wxss create mode 100644 pages/main/spellGroup/index.js create mode 100644 pages/main/spellGroup/index.json rename pages/main/{rushToBuy => spellGroup}/index.wxml (83%) rename pages/main/{rushToBuy => spellGroup}/index.wxss (100%) diff --git a/components/gameentry/gentry.wxss b/components/gameentry/gentry.wxss index 7e04d61..9f5d6c5 100644 --- a/components/gameentry/gentry.wxss +++ b/components/gameentry/gentry.wxss @@ -5,6 +5,7 @@ top:0px; background:rgba(0,0,0,0.8); overflow: hidden; + z-index: 1000; } .t_w{ position:relative; diff --git a/pages/bargain/bargain.json b/pages/bargain/bargain.json index e3bbdb7..ca5bf7a 100644 --- a/pages/bargain/bargain.json +++ b/pages/bargain/bargain.json @@ -1,6 +1,7 @@ { "navigationBarTitleText": "砍价专场", "enablePullDownRefresh": true, + "navigationBarBackgroundColor": "#F13C42", "usingComponents": { "c-banner": "../../components/banner/index", "i-tab": "../../../dist/tab/index", diff --git a/pages/bargain/bargain.wxss b/pages/bargain/bargain.wxss index 19ae8f3..bf7b63c 100644 --- a/pages/bargain/bargain.wxss +++ b/pages/bargain/bargain.wxss @@ -1,5 +1,7 @@ page{ height: auto!important; + background:#f89132; + background-image:url('https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/spell-bg.png'); } .banner .bg { display: block; @@ -77,12 +79,14 @@ page{ } .listitem{ position: relative; - padding: 21rpx 0; - border-bottom: 1rpx solid #ededed; -} + padding: 21rpx; + background: #fff; + border-radius: 20rpx; + margin-bottom: 20rpx; + } .botton{ position: absolute; - right: 0; + right: 18rpx; text-align: center; bottom: 40rpx; width:186rpx; @@ -419,4 +423,7 @@ page{ } .banner{ margin-bottom: 20rpx; + background:#F13C42; + position: relative; + z-index: 100; } \ No newline at end of file diff --git a/pages/main/rushToBuy/index.js b/pages/main/bargain/index.js similarity index 96% rename from pages/main/rushToBuy/index.js rename to pages/main/bargain/index.js index ca51a95..8452255 100644 --- a/pages/main/rushToBuy/index.js +++ b/pages/main/bargain/index.js @@ -25,7 +25,7 @@ Component({ methods: { gotomore: function() { wx.navigateTo({ - url: "/pages/rushToBuy/index" + url: "/pages/bargain/bargain" }); }, gotodetail: function(e) { @@ -48,7 +48,7 @@ Component({ data: { pageNum: 1, pageSize: 5, - targetAd: 2 + targetAd: 6 } }).then(res => { this.setData({ diff --git a/pages/main/rushToBuy/index.json b/pages/main/bargain/index.json similarity index 100% rename from pages/main/rushToBuy/index.json rename to pages/main/bargain/index.json diff --git a/pages/main/bargain/index.wxml b/pages/main/bargain/index.wxml new file mode 100644 index 0000000..e5cd313 --- /dev/null +++ b/pages/main/bargain/index.wxml @@ -0,0 +1,16 @@ + + 砍价专场更多砍价 + + + + + + {{item.title}} + + 可砍至{{item.salePriceStr}}元 + + + + + + \ No newline at end of file diff --git a/pages/main/bargain/index.wxss b/pages/main/bargain/index.wxss new file mode 100644 index 0000000..55bc137 --- /dev/null +++ b/pages/main/bargain/index.wxss @@ -0,0 +1,92 @@ +.index-rushToBuy { + width: 100%; + font-family: PingFangSC-Semibold; +} + +.index-rushToBuy-title { + position: relative; + font-size: 34rpx; + color: #000000; + letter-spacing: 1.16rpx; + padding-top: 34rpx; + padding-left: 30rpx; +} +.useprice{ + font-size: 28rpx; +} +.index-rushToBuy-title text{ + float: right; + margin-right: 53rpx; + color: #a8adb4; + font-size: 28rpx; + margin-top: 8rpx; +} +.index-rushToBuy-title image{ + position: absolute; + right: 18rpx; + width: 20px; + top: 44rpx; +} +.index-scroll-view { + width: 100%; + white-space: nowrap; +} + +.index-scroll-view .commodity { + display: inline-block; + margin: 16rpx 30rpx 16rpx; + margin-right: 0; + position: relative; + background: #fff; + /* border: 1rpx solid #dddee1; */ + width: 263rpx; + box-shadow: 0 0 10px 0 rgba(211,211,211,0.30); + border-radius: 10rpx; + overflow: hidden; +} +.index-scroll-view .commodity:last-child{ + margin-right: 30rpx; +} +.commodity-img{ + display: block; + width: 100%; + height:200rpx; +} + +.index-scroll-view .commodity-info { + padding:10rpx 20rpx; + overflow: hidden; +} + +.index-scroll-view .commodity-info-name { + font-size: 30rpx; + color: #000000; + letter-spacing: 0.7rpx; + overflow: hidden; +} + +.index-scroll-view .commodity-info-time { + font-size: 22rpx; + color: #B4B4B4; + letter-spacing: 0.7rpx; + line-height: 42rpx; +} + +.index-scroll-view .commodity-info-price-p { + font-size: 30rpx; + color: #f96563; + line-height: 36rpx; +} +.index-scroll-view .commodity-info-price-o { + display: inline-block; + padding-left: 20rpx; + font-size: 24rpx; + color: #B4B4B4; + letter-spacing: 0.96rpx; + text-decoration:line-through; + line-height: 36rpx; +} +.commodity-info-price{ + line-height: 36rpx; +} + diff --git a/pages/main/index.js b/pages/main/index.js index b2d03eb..94405d2 100644 --- a/pages/main/index.js +++ b/pages/main/index.js @@ -5,7 +5,7 @@ const QR = require("../../utils/memberqrcode.js"); let app = getApp(); Page({ data: { - newUrl: imgurl.new1.url, + newUrl: "", icon0001: imgurl.icon0001.url, icon0002: imgurl.icon0002.url, icon0003: imgurl.icon0003.url, @@ -332,7 +332,8 @@ Page({ }).then(res => { if (res.data.id) { _this.setData({ - showIf: true + showIf: true, + newUrl: res.data.imgUrl }) }else{ _this.setData({ diff --git a/pages/main/index.json b/pages/main/index.json index a1eae9a..47e7d94 100644 --- a/pages/main/index.json +++ b/pages/main/index.json @@ -2,7 +2,8 @@ "usingComponents": { "c-banner": "../../components/banner/index", "discount-card": "../../components/discountCard/index", - "c-rushToBuy": "./rushToBuy/index", + "c-bargain": "./bargain/index", + "c-spellGroup": "./spellGroup/index", "c-coupons": "./coupons/index", "g-entry": "../../components/gameentry/gentry" }, diff --git a/pages/main/index.wxml b/pages/main/index.wxml index 1b80b0e..508c6a8 100644 --- a/pages/main/index.wxml +++ b/pages/main/index.wxml @@ -2,22 +2,22 @@ - + + + + 品牌门店 @@ -37,12 +37,17 @@ 我的券包 + + + + + diff --git a/pages/main/index.wxss b/pages/main/index.wxss index e1fea21..d3ecec2 100644 --- a/pages/main/index.wxss +++ b/pages/main/index.wxss @@ -35,14 +35,17 @@ page { } .game-entry { - width: 690rpx; + position: fixed; + right: 0; + top:300rpx; + width: 170rpx; margin: 37rpx auto 0; + z-index: 10; } .gameimg { display: block; width: 100%; - height: 140rpx; } .section { diff --git a/pages/main/spellGroup/index.js b/pages/main/spellGroup/index.js new file mode 100644 index 0000000..a759e79 --- /dev/null +++ b/pages/main/spellGroup/index.js @@ -0,0 +1,73 @@ +// pages/index/sw/index.js +let config = require("../../../config/config.js"); +let Http = require("../../../utils/HttpBasics"); +// let Http = require("../../../utils/HttpBasics"); +const app = getApp(); +const imgurl = require("../../../utils/imgurl"); +Component({ + /** + * 组件的属性列表 + */ + properties: {}, + + /** + * 组件的初始数据 + */ + data: { + jianUrl: imgurl.jian.url, + list: [], + total:'' + }, + + /** + * 组件的方法列表 + */ + methods: { + gotomore: function() { + wx.navigateTo({ + url: "/pages/spellGroup/spellGroup" + }); + }, + gotodetail: function(e) { + wx.navigateTo({ + url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${ + e.currentTarget.dataset.couponchannelid + }&couponId=${ + e.currentTarget.dataset.couponid + }&targetAd=${ + e.currentTarget.dataset.targetad + }` + }); + } + }, + ready() { + app.couponChannelListCallback = token => { + Http.setToken(token); + Http.get({ + url: config.api.couponChannelList, + data: { + pageNum: 1, + pageSize: 5, + targetAd: 2 + } + }).then(res => { + this.setData({ + list: res.data.list, + total:res.data.total + }); + }) + .catch(err => { + console.log(err) + wx.showToast({ + title: err.errMsg, + icon: 'none', + duration: 2000, + mask: false + }); + }) + }; + if (app.globalData.token && app.globalData.token != null) { + app.couponChannelListCallback(app.globalData.token); + } + } +}); diff --git a/pages/main/spellGroup/index.json b/pages/main/spellGroup/index.json new file mode 100644 index 0000000..e66b519 --- /dev/null +++ b/pages/main/spellGroup/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-card": "../../../dist/card/index" + } +} \ No newline at end of file diff --git a/pages/main/rushToBuy/index.wxml b/pages/main/spellGroup/index.wxml similarity index 83% rename from pages/main/rushToBuy/index.wxml rename to pages/main/spellGroup/index.wxml index 84bd708..2896723 100644 --- a/pages/main/rushToBuy/index.wxml +++ b/pages/main/spellGroup/index.wxml @@ -1,9 +1,9 @@ - 限时抢购查看全部 + 拼团专场更多拼团 - + {{item.title}} diff --git a/pages/main/rushToBuy/index.wxss b/pages/main/spellGroup/index.wxss similarity index 100% rename from pages/main/rushToBuy/index.wxss rename to pages/main/spellGroup/index.wxss