Kaynağa Gözat

[C端首页改版]

tags/湖南版5.1.4
luqc 6 yıl önce
ebeveyn
işleme
9e222fdff6
10 değiştirilmiş dosya ile 209 ekleme ve 47 silme
  1. +6
    -7
      components/coupons/index.wxml
  2. +41
    -24
      components/coupons/index.wxss
  3. +2
    -2
      ext.json
  4. +6
    -4
      pages/main/bargain/index.wxss
  5. +1
    -0
      pages/main/coupons/index.wxss
  6. +28
    -3
      pages/main/index.js
  7. +29
    -1
      pages/main/index.wxml
  8. +65
    -4
      pages/main/index.wxss
  9. +3
    -1
      pages/main/spellGroup/index.wxss
  10. +28
    -1
      utils/imgurl.js

+ 6
- 7
components/coupons/index.wxml Dosyayı Görüntüle

@@ -1,4 +1,4 @@
<navigator url="/pages/coupon/detail/index?couponChannelId={{data.id}}&couponId={{data.couponId}}&title={{data.title}}">
<navigator style='display:inline' url="/pages/coupon/detail/index?couponChannelId={{data.id}}&couponId={{data.couponId}}&title={{data.title}}">
<!-- 首页优惠券列表页面 -->
<view class="coupons">
<view class="coupons-img">
@@ -13,16 +13,16 @@
<view class="coupons-info-manjian" style="margin-top:10rpx;" wx:if="{{data.type == 1}}">
<view class='view01' wx:if="{{data.unit==0}}">{{data.priceStr}}元</view>
<view wx:if="{{data.unit==1}}">{{data.priceStr}}小时</view>
<text class='txt2'>满{{data.usePriceStr}}元可用</text>
<!-- <text class='txt2'>满{{data.usePriceStr}}元可用</text> -->
</view>
<view class="coupons-info-manjian" wx:elif="{{data.type == 2||data.type == 3||data.type==4||data.type==5}}">
<text class='view01' wx:if="{{data.unit==0}}">{{data.priceStr}}元</text>
<text wx:if="{{data.unit==1}}">{{data.priceStr}}小时</text>
<text class='txt2'>仅限本店使用</text>
<!-- <text class='txt2'>仅限本店使用</text> -->
</view>
</view>
<view class="coupons-info-manjian1" wx:if="{{data.merchantVoList.length==1}}">{{data.merchantVoList[0].merchantName}}</view>
<view class="coupons-info-manjian1" wx:if="{{data.merchantVoList.length>1}}">多商户通用</view>
<!-- <view class="coupons-info-manjian1" wx:if="{{data.merchantVoList.length==1}}">{{data.merchantVoList[0].merchantName}}</view>
<view class="coupons-info-manjian1" wx:if="{{data.merchantVoList.length>1}}">多商户通用</view> -->
</view>
</view>
<view class="coupons-btn">
@@ -32,7 +32,6 @@
<i-button i-class="coupons-btn-gms" wx:if="{{data.remainInventory==0}}" data-date='{{data}}'>已售罄</i-button>
<i-button i-class="coupons-btn-gms" wx:if="{{data.status==1}}" data-date='{{data}}'>已下架</i-button>
</view>
<view class="coupons-info-name sy">剩余{{data.remainInventory}}</view>
<view class="coupons-border"></view>
<!-- <view class="coupons-info-name sy">剩余{{data.remainInventory}}</view> -->
</view>
</navigator>

+ 41
- 24
components/coupons/index.wxss Dosyayı Görüntüle

@@ -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;


+ 2
- 2
ext.json Dosyayı Görüntüle

@@ -45,9 +45,9 @@
},
"window": {
"backgroundTextStyle": "dark",
"navigationBarBackgroundColor": "#02C0FF",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "black"
},
"networkTimeout": {
"request": 30000,


+ 6
- 4
pages/main/bargain/index.wxss Dosyayı Görüntüle

@@ -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 {


+ 1
- 0
pages/main/coupons/index.wxss Dosyayı Görüntüle

@@ -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 {


+ 28
- 3
pages/main/index.js Dosyayı Görüntüle

@@ -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();
})
;


+ 29
- 1
pages/main/index.wxml Dosyayı Görüntüle

@@ -33,6 +33,28 @@
优惠劵<text class="score">{{score}}</text>
</view>
</view>
<view class='barcode'>
<image src="{{barcode}}" class='barcodeimg' mode='widthFix'></image>
<image src="{{leftarrows}}" class='leftimg' mode='widthFix'></image>
</view>
</view>
<!-- 营销活动 -->
<view class='sellsection'>
<view bindtap='gobargain'>
<image src='{{newbargain}}'></image>
</view>
<view bindtap='gogroup'>
<image src='{{newgroup}}'></image>
</view>
<view bindtap='gotoRushBuy'>
<image src='{{newseckill}}'></image>
</view>
<view bindtap='gotodiscountcard'>
<image src='{{newcard}}'></image>
</view>
</view>
<view class='product'>
<image src='{{product}}'></image>
</view>
<!-- 砍价专场 -->
<c-bargain id="bargain"/>
@@ -46,8 +68,14 @@
</view>
</view>
<view class='clearfix rushtobuyimgs'>
<view>
<text class='xianshi'>限时</text><text class='qianggou'>秒杀</text>
<image class='fl' src='{{rushtobuy}}' bindtap='rushtobuy' mode='widthFix'></image>
</view>
<view>
<text class='xiaofei'>消费</text> <text class='ka'>卡</text><text class='subtitle'>好物提前购</text>
<image class='fr' src='{{wmcard}}' bindtap='gotodiscountcard' mode='widthFix'></image>
</view>
</view>
<c-coupons id="lists" bind:myevent="onGetCode" loadingtext="{{loadingtext}}" loading="{{loading}}" />
<g-entry id="listss" wx:if="{{showGame&&!played&&!havePlayEd}}" gamedata="{{gamedata}}" bind:myevent="" />
@@ -55,7 +83,7 @@
<view class='showQrcode' bindtap='hideQrcode' wx:if="{{showQrcode}}">
<view class="canvas-box">
<text class='memberIds' wx:if="{{levelName!='无'}}">{{levelName}}</text>
<canvas hidden="{{canvasHidden}}" style="width:500rpx;height:460rpx;background:0 0 0 .6;margin:-10rpx auto;overflow:hidden" canvas-id="mycanvas2" />
<canvas canvas-id="barcode" />
<button class='button' bindtap='mySpecial'>特享礼遇</button>
</view>
</view>

+ 65
- 4
pages/main/index.wxss Dosyayı Görüntüle

@@ -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;
}

+ 3
- 1
pages/main/spellGroup/index.wxss Dosyayı Görüntüle

@@ -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;


+ 28
- 1
utils/imgurl.js Dosyayı Görüntüle

@@ -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产品栏'
},
}

Yükleniyor…
İptal
Kaydet