소스 검색

[首页][修改][UI]

tags/湖南版5.1.4
luqc 6 년 전
부모
커밋
274c418ecd
9개의 변경된 파일304개의 추가작업 그리고 72개의 파일을 삭제
  1. +1
    -1
      pages/main/coupons/index.wxss
  2. +15
    -26
      pages/main/index.js
  3. +2
    -1
      pages/main/index.json
  4. +2
    -10
      pages/main/index.wxml
  5. +1
    -34
      pages/main/index.wxss
  6. +102
    -0
      pages/main/rushtobyCard/index.js
  7. +3
    -0
      pages/main/rushtobyCard/index.json
  8. +40
    -0
      pages/main/rushtobyCard/index.wxml
  9. +138
    -0
      pages/main/rushtobyCard/index.wxss

+ 1
- 1
pages/main/coupons/index.wxss 파일 보기

@@ -1,6 +1,6 @@
.index-coupons {
/* height: 820rpx; */
margin-top: 30rpx;
/* margin-top: 30rpx; */
background:linear-gradient(0deg,rgba(235,235,235,1) 0%,rgba(255,255,255,1) 100%);
}



+ 15
- 26
pages/main/index.js 파일 보기

@@ -18,10 +18,8 @@ Page({
icon0006: imgurl.icon0006.url,
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,
@@ -74,18 +72,7 @@ Page({
wx.navigateTo({
url: '/pages/couponorder/index/index',
})
},
gotodiscountCardList: function() {
wx.navigateTo({
url: '/pages/discountCardList/discountCardList'
})
},
//跳往限时秒杀
gotoRushBuy: function() {
wx.navigateTo({
url: '/pages/rushToBuy/index',
})
},
},
gotoSpellGroup:function(){
wx.navigateTo({
url: '/pages/spellGroup/spellGroup',
@@ -123,6 +110,18 @@ Page({
showQrcode: false
})
},
//跳往限时秒杀
gotoRushBuy: function () {
wx.navigateTo({
url: '/pages/rushToBuy/index',
})
},
// 跳往卡列表
gotodiscountcard: function () {
wx.navigateTo({
url: '/pages/discountCardList/discountCardList',
})
},
//跳往个人中心
gotouser:function(){
wx.switchTab({
@@ -174,17 +173,6 @@ Page({
swiperCurrent: e.detail.current
});
},
rushtobuy:function(){
wx.navigateTo({
url: '/pages/rushToBuy/index',
})
},
// 跳往卡列表
gotodiscountcard:function(){
wx.navigateTo({
url: '/pages/discountCardList/discountCardList',
})
},
gotogame: function() {
let that = this;
Http.get({
@@ -618,8 +606,9 @@ Page({
wx.stopPullDownRefresh();
};
// 砍价下拉刷新
that.selectComponent("#bargain").getList();
that.selectComponent("#bargain").getList();
that.selectComponent("#spellGroup").getList();
that.selectComponent("#rushtobyCard").getList();
wx.stopPullDownRefresh();
},
//加载更多


+ 2
- 1
pages/main/index.json 파일 보기

@@ -5,7 +5,8 @@
"c-bargain": "./bargain/index",
"c-spellGroup": "./spellGroup/index",
"c-coupons": "./coupons/index",
"g-entry": "../../components/gameentry/gentry"
"g-entry": "../../components/gameentry/gentry",
"c-rushtobyCard": "./rushtobyCard/index"
},
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true


+ 2
- 10
pages/main/index.wxml 파일 보기

@@ -67,16 +67,8 @@
<image src="{{usergift}}" bindtap="gotogame" class='gameimg' mode='widthFix'></image>
</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-rushtobyCard id="rushtobyCard"/>
<c-coupons id="lists" bind:myevent="onGetCode" loadingtext="{{loadingtext}}" loading="{{loading}}" />
<g-entry id="listss" wx:if="{{showGame&&!played&&!havePlayEd}}" gamedata="{{gamedata}}" bind:myevent="" />
</view>


+ 1
- 34
pages/main/index.wxss 파일 보기

@@ -47,40 +47,7 @@ page {
display: block;
width: 100%;
}
.rushtobuyimgs{
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;


+ 102
- 0
pages/main/rushtobyCard/index.js 파일 보기

@@ -0,0 +1,102 @@

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: {
list: [],
cardlist:[],//消费卡列表
total:''
},

/**
* 组件的方法列表
*/
methods: {
rushtobuy: function (e) {
wx.navigateTo({
url: `/pages/coupon/detail/index?couponChannelId=${
e.currentTarget.dataset.couponchannelid
}&couponId=${e.currentTarget.dataset.couponid}`
})
},
gotodiscountCardList: function (e) {
wx.navigateTo({
url: `/pages/coupon/detail/index?couponChannelId=${e.currentTarget.dataset.quancode}&couponId=${e.currentTarget.dataset.couponid}&cardType=${e.currentTarget.dataset.type}`
});
},
//获取限时抢购列表
getList(){
Http.get({
url: config.api.couponChannelList,
data: {
pageNum: 1,
pageSize: 3,
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
});
})
},
//获取消费卡列表
getcardList() {
Http.get({
url: config.api.couponChannelList,
data: {
pageNum: 1,
pageSize: 3,
targetAd: 5
}
}).then(res => {
this.setData({
cardlist: res.data.list,
total: res.data.total
});
})
.catch(err => {
console.log(err)
wx.showToast({
title: err.errMsg,
icon: 'none',
duration: 2000,
mask: false
});
})
}
},
ready() {
app.couponChannelListCallback = token => {
Http.setToken(token);
this.getList();
this.getcardList();
};
if (app.globalData.token && app.globalData.token != null) {
app.couponChannelListCallback(app.globalData.token);
}
}
});

+ 3
- 0
pages/main/rushtobyCard/index.json 파일 보기

@@ -0,0 +1,3 @@
{
"component": true
}

+ 40
- 0
pages/main/rushtobyCard/index.wxml 파일 보기

@@ -0,0 +1,40 @@
<view class="index-rushToBuy" wx:if="{{list.length>0}}">
<view class='clearfix rushtobuyimgs'>
<!-- 限时抢购 -->
<view wx:if="{{list.length!=0}}">
<text class='xianshi'>限时</text><text class='qianggou'>秒杀</text>
<scroll-view scroll-x class="index-scroll-view">
<view class="commodity" wx:for="{{list}}" wx:key="unique">
<view bindtap="rushtobuy" data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" >
<image mode='aspectFill' lazy-load='true' class="commodity-img" src="{{item.coverImg}}" />
<view class="commodity-info">
<view class="commodity-info-name">{{item.title}}</view>
<view class="commodity-info-price">
<text class="commodity-info-price-p">{{item.salePriceStr}}元</text>
<text class="commodity-info-price-o">{{item.priceStr}}元</text>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<!-- 消费卡列表 -->
<view wx:if="{{cardlist.length!=0}}">
<text class='xiaofei'>消费</text> <text class='ka'>卡</text><text class='subtitle'>好物提前购</text>
<scroll-view scroll-x class="index-scroll-view">
<view class="commodity" wx:for="{{cardlist}}" wx:key="unique">
<view bindtap="gotodiscountCardList" data-couponId='{{item.couponId}}' data-type="{{item.type}}" data-quancode="{{item.id}}">
<image mode='aspectFill' lazy-load='true' class="commodity-img" src="{{item.coverImg}}" />
<view class="commodity-info">
<view class="commodity-info-name">{{item.title}}</view>
<view class="commodity-info-price">
<text class="commodity-info-price-p">{{item.salePriceStr}}元</text>
<text class="commodity-info-price-o">{{item.priceStr}}元</text>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</view>

+ 138
- 0
pages/main/rushtobyCard/index.wxss 파일 보기

@@ -0,0 +1,138 @@

.rushtobuyimgs>view{
width: 48%;
display: inline-block;
}
.rushtobuyimgs>view>text{
font-size:34rpx;
font-weight: bold;
}
.xianshi{
color: #F12643;
padding-left:30rpx;
}
.qianggou{
color: #3D3737;
}
.xiaofei{
color: #3D3737;
padding-left:30rpx;
}
.ka{
color: #ED734A
}
.subtitle{
font-size:28rpx !important;
color: #666666;
font-weight:400 !important;
margin-left: 15rpx;
}

.index-rushToBuy {
width: 100%;
font-family: PingFangSC-Semibold;
}

.index-rushToBuy-title {
position: relative;
font-size: 34rpx;
color: #000000;
letter-spacing: 1.16rpx;
padding-top: 0;
padding-left: 30rpx;
font-weight: bold;
}

.index-rushToBuy-title text{
float: right;
margin-right: 20rpx;
color: #999999;
font-size: 24rpx;
margin-top: 8rpx;
font-weight: normal;
}
.index-rushToBuy-title image{
position: absolute;
right: 18rpx;
width: 20px;
top: 40rpx;
}
.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: 334rpx;
/* 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: 335rpx;
height: 200rpx;
border-radius: 10rpx;
border: 1px solid #ebeced;
}

.index-scroll-view .commodity-info {
padding:10rpx 0;
overflow: hidden;
}

.index-scroll-view .commodity-info-name {
font-size: 28rpx;
color: #333;
letter-spacing: 0.7rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width:248px;
font-weight: bold;
}

.index-scroll-view .commodity-info-time {
font-size: 28rpx;
color: #B4B4B4;
letter-spacing: 0.7rpx;
line-height: 42rpx;
font-weight: 500;
}

.index-scroll-view .commodity-info-price-p {
font-size: 28rpx;
color: #FF3232;
line-height: 36rpx;
font-weight:500;
}
.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;
}
.remainingTime {
font-size: 28rpx;
color: #b4b4b4;
}

.realRemainingTime {
color: #ff4949;
font-size: 28rpx;
}

불러오는 중...
취소
저장