From 9e222fdff6a19fa1f52e4d8e702913f9394017df Mon Sep 17 00:00:00 2001 From: luqc Date: Fri, 29 Mar 2019 17:56:31 +0800 Subject: [PATCH] =?UTF-8?q?[C=E7=AB=AF=E9=A6=96=E9=A1=B5=E6=94=B9=E7=89=88?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/coupons/index.wxml | 13 +++--- components/coupons/index.wxss | 65 +++++++++++++++++++----------- ext.json | 4 +- pages/main/bargain/index.wxss | 10 +++-- pages/main/coupons/index.wxss | 1 + pages/main/index.js | 31 ++++++++++++-- pages/main/index.wxml | 30 +++++++++++++- pages/main/index.wxss | 69 ++++++++++++++++++++++++++++++-- pages/main/spellGroup/index.wxss | 4 +- utils/imgurl.js | 29 +++++++++++++- 10 files changed, 209 insertions(+), 47 deletions(-) diff --git a/components/coupons/index.wxml b/components/coupons/index.wxml index 466943f..007d323 100644 --- a/components/coupons/index.wxml +++ b/components/coupons/index.wxml @@ -1,4 +1,4 @@ - + @@ -13,16 +13,16 @@ {{data.priceStr}}元 {{data.priceStr}}小时 - 满{{data.usePriceStr}}元可用 + {{data.priceStr}}元 {{data.priceStr}}小时 - 仅限本店使用 + - {{data.merchantVoList[0].merchantName}} - 多商户通用 + @@ -32,7 +32,6 @@ 已售罄 已下架 - 剩余{{data.remainInventory}} - + \ No newline at end of file diff --git a/components/coupons/index.wxss b/components/coupons/index.wxss index e2f2b4a..e00e51f 100644 --- a/components/coupons/index.wxss +++ b/components/coupons/index.wxss @@ -1,11 +1,11 @@ @import "../../app.wxss"; - .coupons { - flex-direction: row; - display: flex; + width: 40%; + height: 492rpx; + display: inline-block; padding: 30rpx; position: relative; - height: 184rpx; + } .coupons-border { height: 1rpx; @@ -27,17 +27,22 @@ .coupons-img image { display: block; - width: 180rpx; - height: 180rpx; - border-radius: 10rpx; + width: 334rpx; + height: 335rpx; } .coupons-info { - padding-left: 20rpx; + width: 335rpx; + height: 157rpx; + position: absolute; + bottom: 30rpx; + background: #fff; + border-radius:0rpx 0rpx 10rpx 10rpx; } .coupons-info-name { - font-size: 30rpx; + font-size: 28rpx; + font-weight: bold; color: #343434; letter-spacing: 0; line-height: 38rpx; @@ -58,7 +63,14 @@ color: #FF4949; } .price{ - line-height: 36rpx; + /* width:48rpx; +height:26rpx; */ +font-size:34rpx; +font-family:PingFang-SC-Bold; +font-weight:bold; +color:rgba(255,50,50,1); +line-height:44rpx; +margin-left: 16rpx; } .tit { overflow: hidden; @@ -70,6 +82,7 @@ color: #000; letter-spacing: 0; font-family: PingFangSC-Medium; + margin: 20rpx 18rpx 13rpx 16rpx; } .coupons-info-price-o { @@ -99,37 +112,39 @@ .coupons-btn { position: absolute; - top: 83rpx; - right: 30rpx; + bottom: 30rpx; + right: 0; } .coupons-btn-gm { - background: #00c0ff !important; - border-radius: 50rpx !important; + background: #AF6E34 !important; + border-radius: 10px 0px 10px 0px !important; margin: 0 !important; padding: 0 !important; font-family: PingFangSC-Semibold; font-size: 26rpx; + font-weight: 400; color: #fff !important; letter-spacing: 0; - height: 48rpx !important; - width: 120rpx !important; - line-height: 48rpx !important; + height: 51rpx !important; + width: 100rpx !important; + line-height: 51rpx !important; } .coupons-btn-gms { - background: #999 !important; - border-radius: 60rpx !important; + background: #b9b9b9 !important; + border-radius: 10px 0px 10px 0px !important; opacity: 0.6; margin: 0 !important; padding: 0 !important; font-family: PingFangSC-Semibold; font-size: 26rpx; + font-weight: 400; color: #fff !important; letter-spacing: 0; - height: 48rpx !important; - width: 120rpx !important; - line-height: 48rpx !important; + height: 51rpx !important; + width: 100rpx !important; + line-height: 51rpx !important; } .subtitle { @@ -139,10 +154,11 @@ white-space: nowrap; text-overflow: ellipsis; width: 300rpx; - /* height: 33rpx; */ - line-height: 33rpx; + height: 23rpx; + line-height: 23rpx; font-weight:lighter; margin-bottom: 18rpx; + margin: 0 37rpx 20rpx 18rpx; } .coupons-info-manjian { @@ -177,6 +193,7 @@ } .view01{ text-decoration:line-through; + color: #999999 !important; } .txt2{ display: block; diff --git a/ext.json b/ext.json index 4f5099c..107b550 100644 --- a/ext.json +++ b/ext.json @@ -45,9 +45,9 @@ }, "window": { "backgroundTextStyle": "dark", - "navigationBarBackgroundColor": "#02C0FF", + "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "WeChat", - "navigationBarTextStyle": "white" + "navigationBarTextStyle": "black" }, "networkTimeout": { "request": 30000, diff --git a/pages/main/bargain/index.wxss b/pages/main/bargain/index.wxss index b8927a2..c404122 100644 --- a/pages/main/bargain/index.wxss +++ b/pages/main/bargain/index.wxss @@ -1,13 +1,14 @@ .index-rushToBuy { width: 100%; font-family: PingFangSC-Semibold; - background:linear-gradient(94deg,rgba(255,143,0,1) 0%,rgba(255,87,0,1) 100%); + /* background:linear-gradient(94deg,rgba(255,143,0,1) 0%,rgba(255,87,0,1) 100%); */ } .index-rushToBuy-title { position: relative; font-size: 34rpx; - color: #fff; + font-weight:bold; + color: #333333; letter-spacing: 1.16rpx; padding-top: 20rpx; padding-left: 30rpx; @@ -18,9 +19,10 @@ .index-rushToBuy-title text{ float: right; margin-right: 20rpx; - color: #fff; + color: #999999; font-size: 24rpx; margin-top: 8rpx; + font-weight: normal; } .index-rushToBuy-title image{ position: absolute; @@ -32,7 +34,7 @@ width: 100%; white-space: nowrap; padding-bottom: 10rpx; - background:linear-gradient(94deg,rgba(255,143,0,1) 0%,rgba(255,87,0,1) 100%); + /* background:linear-gradient(94deg,rgba(255,143,0,1) 0%,rgba(255,87,0,1) 100%); */ } .index-scroll-view .commodity { diff --git a/pages/main/coupons/index.wxss b/pages/main/coupons/index.wxss index 03d4418..2913277 100644 --- a/pages/main/coupons/index.wxss +++ b/pages/main/coupons/index.wxss @@ -1,6 +1,7 @@ .index-coupons { height: 820rpx; margin-top: 30rpx; + background:linear-gradient(0deg,rgba(235,235,235,1) 0%,rgba(255,255,255,1) 100%); } .loading { diff --git a/pages/main/index.js b/pages/main/index.js index 19ae6ef..46da3d5 100644 --- a/pages/main/index.js +++ b/pages/main/index.js @@ -2,6 +2,7 @@ const Http = require("../../utils/HttpBasics"); const imgurl = require("../../utils/imgurl"); const config = require("../../config/config"); const QR = require("../../utils/memberqrcode.js"); +const util = require("../../utils/util"); let app = getApp(); Page({ data: { @@ -17,7 +18,14 @@ Page({ icon0007: imgurl.icon0007.url, icon0008: imgurl.icon0008.url, rushtobuy: imgurl.rushtobuy.url, + barcode: imgurl.barcode.url, + leftarrows: imgurl.leftarrows.url, wmcard: imgurl.wmcard.url, + newcard:imgurl.newcard.url, + newseckill: imgurl.newseckill.url, + newbargain: imgurl.newbargain.url, + newgroup: imgurl.newgroup.url, + product: imgurl.product.url, market: app.globalData.market, list: [], loading: true, @@ -61,6 +69,7 @@ Page({ url: '/pages/discountCardList/discountCardList' }) }, + //跳往限时秒杀 gotoRushBuy: function() { wx.navigateTo({ url: '/pages/rushToBuy/index', @@ -109,6 +118,18 @@ Page({ url: '/pages/user/index', }) }, + //跳往砍价专场 + gobargain: function () { + wx.navigateTo({ + url: '/pages/bargain/bargain', + }) + }, + //跳往拼团专场 + gogroup: function () { + wx.navigateTo({ + url: '/pages/spellGroup/spellGroup', + }) + }, //搜索门店 searchbar:function(){ wx.navigateTo({ @@ -147,6 +168,7 @@ Page({ url: '/pages/rushToBuy/index', }) }, + // 跳往卡列表 gotodiscountcard:function(){ wx.navigateTo({ url: '/pages/discountCardList/discountCardList', @@ -224,6 +246,8 @@ Page({ } else { that.userLogin() } + //获取条形码 + // util.barcode("barcode", optionss.quancode, 510, 100); }, onShow: function() { this.setData({ @@ -318,7 +342,7 @@ Page({ userLogin: function(couponChannelId, couponId, orderId) { var that = this; // 登录 - // that.getmemberId(app.globalData.token); + that.getmemberId(app.globalData.token); // that.checkUserCarStatus(); that.getUserInfo(); that.getBannerlist(); @@ -355,6 +379,7 @@ Page({ showCancel: false }); }); + }, getStaticGame(token) { @@ -427,14 +452,14 @@ Page({ pageSize: 7 } }).then(res => { - // that.getmemberId(app.globalData.token); + that.getmemberId(app.globalData.token); // that.checkUserCarStatus(); that.setData({ list: res.data.list }); }) .catch(err => { - // that.getmemberId(app.globalData.token); + that.getmemberId(app.globalData.token); // that.checkUserCarStatus(); }) ; diff --git a/pages/main/index.wxml b/pages/main/index.wxml index 0d5e77d..11e4f92 100644 --- a/pages/main/index.wxml +++ b/pages/main/index.wxml @@ -33,6 +33,28 @@ 优惠劵{{score}} + + + + + + + + + + + + + + + + + + + + + + @@ -46,8 +68,14 @@ + + 限时秒杀 + + + 消费 好物提前购 + @@ -55,7 +83,7 @@ {{levelName}} - diff --git a/pages/main/index.wxss b/pages/main/index.wxss index 4cd7c37..c183cea 100644 --- a/pages/main/index.wxss +++ b/pages/main/index.wxss @@ -51,10 +51,36 @@ page { padding: 0 30rpx; margin-top:20rpx; } +.rushtobuyimgs>view{ + width: 50%; + display: inline-block; +} +.rushtobuyimgs>view>text{ + font-size:34rpx; + font-weight: bold; +} +.xianshi{ + color: #F12643; +} +.qianggou{ + color: #3D3737; +} .rushtobuyimgs image{ width: 335rpx; height: 161rpx; } +.xiaofei{ + color: #3D3737; +} +.ka{ + color: #ED734A +} +.subtitle{ + font-size:28rpx !important; + color: #666666; + font-weight:400 !important; + margin-left: 15rpx; +} .userinfo{ position:relative; margin: 0 auto 38rpx; @@ -72,12 +98,16 @@ border-radius:50rpx; margin-top: 25rpx; margin-bottom: 30rpx; } -.section >view{ +.sellsection{ + margin-bottom: 37rpx; + padding: 0 38rpx; +} +.section >view,.sellsection>view{ width: 25%; display: inline-block; position: relative; } -.section >view image { +.section >view image,.sellsection>view image{ display: block; margin: 0 auto; } @@ -87,6 +117,10 @@ border-radius:50rpx; margin-top: 20rpx; margin-bottom: 14rpx; } +.sellsection>view image{ + width: 159rpx; + height: 134rpx; +} .section text { font-size: 24rpx; color: rgba(51, 51, 51, 1); @@ -200,13 +234,14 @@ height:100%; line-height: 44rpx; margin-top: 25rpx; font-size: 30rpx; - color: #000; + color: #333; + font-weight: bold; } .chengzhang { font-size: 24rpx; font-weight: 400; color: #AF6E34; - margin-left: 10rpx; + margin-left:9rpx; } .view { font-size: 24rpx; @@ -217,4 +252,30 @@ height:100%; color:#333333; font-size:30rpx; margin-right:23rpx; + font-family:PingFang-SC-Bold; +} +.barcodeimg{ + position: absolute; + right: 80rpx; + top: 60rpx; + margin-top: -31rpx; + width: 80rpx; + height: 62rpx; +} +.leftimg{ + position: absolute; + right: 40rpx; + top: 60rpx; + margin-top: -7rpx; + width: 14rpx; + height: 26rpx; +} +.product{ + padding: 0 30rpx; + margin-bottom: 30rpx; +} +.product image{ + width:690rpx; +height:120rpx; +border-radius:60rpx; } \ No newline at end of file diff --git a/pages/main/spellGroup/index.wxss b/pages/main/spellGroup/index.wxss index 74af763..20e6f0b 100644 --- a/pages/main/spellGroup/index.wxss +++ b/pages/main/spellGroup/index.wxss @@ -11,14 +11,16 @@ letter-spacing: 1.16rpx; padding-top: 0; padding-left: 30rpx; + font-weight: bold; } .index-rushToBuy-title text{ float: right; margin-right: 20rpx; - color: #a8adb4; + color: #999999; font-size: 24rpx; margin-top: 8rpx; + font-weight: normal; } .index-rushToBuy-title image{ position: absolute; diff --git a/utils/imgurl.js b/utils/imgurl.js index 882d0a5..ee62781 100644 --- a/utils/imgurl.js +++ b/utils/imgurl.js @@ -505,5 +505,32 @@ module.exports = { 'url': baseUrl + 'wmspellgroup.png', 'name': '我的拼团' }, - + 'leftarrows': { + 'url': baseUrl + 'leftarrows.png', + 'name': '左箭头' + }, + 'barcode': { + 'url': baseUrl + 'barcode.png', + 'name': '条形码' + }, + 'newgroup': { + 'url': baseUrl + 'newgroup.png', + 'name': '新UI拼团' + }, + 'newbargain': { + 'url': baseUrl + 'newbargain.png', + 'name': '新UI砍价' + }, + 'newseckill': { + 'url': baseUrl + 'newseckill.png', + 'name': '新UI秒杀' + }, + 'newcard': { + 'url': baseUrl + 'newcard.png', + 'name': '新UI消费卡' + }, + 'product': { + 'url': baseUrl + 'product.png', + 'name': '新UI产品栏' + }, } \ No newline at end of file