Bladeren bron

[专题][增加]:[增加专题]

tags/湖南版5.1.4
meo 6 jaren geleden
bovenliggende
commit
dd9cc09b7f
5 gewijzigde bestanden met toevoegingen van 661 en 0 verwijderingen
  1. +2
    -0
      pages/main/index.js
  2. +52
    -0
      pages/topicDetail/index.js
  3. +3
    -0
      pages/topicDetail/index.json
  4. +62
    -0
      pages/topicDetail/index.wxml
  5. +542
    -0
      pages/topicDetail/index.wxss

+ 2
- 0
pages/main/index.js Bestand weergeven

@@ -7,6 +7,7 @@ let app = getApp();
Page({
data: {
newUrl: "",
cover:"",
usergift: imgurl.usergift.url,
guanbi1: imgurl.guanbi1.url,
icon0001: imgurl.icon0001.url,
@@ -475,6 +476,7 @@ Page({
}
}).then(res => {
console.log(res);
that.data.cover = res.data.list[0].cover
})
.catch(err => {
console.log(err);


+ 52
- 0
pages/topicDetail/index.js Bestand weergeven

@@ -0,0 +1,52 @@
let config = require("../../config/config.js");
let app = getApp();
const Http = require("../../utils/HttpBasics");
const util = require("../../utils/util");
Page({
data: {
data: {},
couponId: null,
orderId: "",
day: "",
hour: "",
minute: "",
nodes: ''
},
onLoad(options) {
let that = this;
if (options.id){
Http.get({
url: config.api.bannerDetail,
data: {
id: options.id
}
}).then(res => {
if(res.data.type==2){
console.log(res.data.html,33333333)
// console.log(JSON.parse(res.data.html),222222222222)
that.setData({
nodes: res.data.html
})
}
that.setData({
data: res.data
});
}).catch(err => {
wx.showToast({
title: err.errMsg,
icon: 'none',
duration: 2000,
mask: false
});
})
}
},
gotoactdetail:function(){
let that = this;
console.log(that.data.data.detail)
wx.navigateTo({
url: `/pages/actdetail/actdetail?detail=${that.data.data.detail}`,
})
}
});

+ 3
- 0
pages/topicDetail/index.json Bestand weergeven

@@ -0,0 +1,3 @@
{
"navigationBarTitleText": "活动详情"
}

+ 62
- 0
pages/topicDetail/index.wxml Bestand weergeven

@@ -0,0 +1,62 @@
<!-- banner活动详情页面 -->
<view class='coupons'>
<view class="coupons-body">
<view class='banner'>
<image src='{{data.coverImg}}'></image>
</view>
<!-- <image class="orbg" src='./../../assets/img/orbg.png' mode="widthFix"></image> -->
<view class='act'>
<text class='txt001'>{{data.title}}</text>
<text class='txt002'>{{data.subTitle}}</text>
<view class="proct">
<text>活动说明</text>
<text>{{data.detail}}</text>
<!-- <image class="jian" src='../../assets/img/jian.png' mode="widthFix"></image> -->
</view>
</view>
<view class='notes' style='display:none;'>
<view>
<text>活动详情</text>
</view>
<view>
<text><text class='spot'></text>{{data.detail}}</text>
</view>
</view>
</view>
<!-- <view class="buy-view app-border-top">
<button bindtap='orderFunc' class='buy'>立即购买</button>
</view> -->

<view class='contain clearfix'>
<!-- 优惠券 -->
<navigator wx:for="{{data.coupons}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId={{item.id}}&couponId={{item.couponId}}">
<!-- 首页优惠券列表页面 -->
<view class="coupons1">
<view class="coupons1-img">
<image src="{{item.coverImg}}"></image>
</view>
<view class="coupons1-info">
<view class="coupons1-info-name tit">{{item.title}}</view>
<view class="coupons1-info-name subtitle">{{item.subTitle}}</view>
<view class="coupons1-info-price-p">
<text class="i">¥</text>{{item.salePriceStr}}
<view class="coupons-info-manjian" style="margin-top:10rpx;font-size:28rpx;" wx:if="{{item.type == 1}}">
满¥{{item.usePriceStr}}可用
</view>
<view class="coupons-info-manjian" style="margin-top:10rpx;font-size:28rpx;" wx:if="{{item.type == 2||item.type == 3||item.type==4||item.type==5||item.type==6||item.type==7}}">
仅限本店使用
</view>
</view>
</view>
<!-- <view class="coupons1-info-name subtitle sy">剩余{{item.remainInventory}}</view> -->
<view class="coupons1-btn">
<!-- 优惠券价格 -->
<i-button class="buy" hover-class='active' wx:if="{{item.salePriceStr==0}}" data-date='{{data}}'>免费领</i-button>
<i-button class="buy" hover-class='active' wx:elif="{{item.salePriceStr!=0}}" data-date='{{data}}'>马上购</i-button>
</view>
<!-- <view class="coupons1-border"></view> -->
</view>
</navigator>
</view>
</view>

+ 542
- 0
pages/topicDetail/index.wxss Bestand weergeven

@@ -0,0 +1,542 @@
@import "../../app.wxss";

page {
background: #eee;
}

.coupons {
width: 100%;
position: relative;
}

.coupons-body {
flex: 1;
/* overflow: auto; */
}

.banner {
position: relative;
width: 750rpx;
height: 280rpx;
overflow: hidden;
}

.banner image {
width: 750rpx;
height: 280rpx;
}

.act {
position: relative;
z-index: 1000000000;
background: #fff;
border-radius: 12rpx;
width: 705rpx;
/* height: 212rpx; */
margin: 24rpx auto 0;
padding-bottom: 20rpx;
}

.act text {
display: block;
padding-left: 4.8%;
padding-right: 4.8%;
}

.txt001 {
display: block;
font-size: 34rpx;
color: #363636;
letter-spacing: 0;
text-align: left;
line-height: 48rpx;
padding-top: 3.2%;
}

.txt002 {
font-size: 24rpx;
color: #999;
letter-spacing: 0;
text-align: left;
line-height: 33rpx;
}

.proct {
position: relative;
/* height: 60rpx; */
margin-top: 20rpx;
}

.proct text:nth-of-type(1) {
display: block;
font-size: 30rpx;
color: #ff4949;
letter-spacing: 0;
line-height: 32rpx;
margin-bottom: 20rpx;
/* width: 60rpx; */
/* height: 64rpx; */
}

.proct text:nth-of-type(2) {
display: block;
/* width: 498rpx; */
/* height: 63rpx; */
/* overflow: hidden; */
word-wrap:break-word;
/* text-overflow: ellipsis; */
font-size: 22rpx;
color: #6f6f6f;
letter-spacing: 0;
margin: 0 auto;
}

.orbg {
position: absolute;
top: 256rpx;
z-index: 1000000;
}

.banner text {
position: absolute;
right: 0;
top: 0;
bottom: 0;
margin: auto;
width: 122rpx;
height: 48rpx;
line-height: 48rpx;
opacity: 0.8;
background: #000;
font-size: 24rpx;
color: #fff;
letter-spacing: 0;
text-indent: 0.5em;
border-top-left-radius: 50rpx;
border-bottom-left-radius: 50rpx;
}

.coupons_info {
width: 92%;
height: 120rpx;
display: flex;
justify-content: space-between;
padding: 0 4% 4%;
background: #fff;
}

.coupons_info view {
display: flex;
flex-direction: column;
}

.coupons_info view:nth-child(1) text {
font-size: 30rpx;
line-height: 32rpx;
margin-top: 10%;
}

.coupons_info view:nth-child(1) text:nth-child(1) text {
color: #ff3434;
font-size: 24rpx;
border: 1px solid #ff3434;
border-radius: 6rpx;
margin-left: 2%;
padding: 0 5rpx;
}

.coupons_info view:nth-child(1) text:nth-child(2),
.coupons_info view:nth-child(1) text:nth-child(3) {
color: #b8b8b8;
font-size: 24rpx;
margin-top: 4%;
}

.coupons_info view:nth-child(1) text:nth-child(2) text,
.coupons_info view:nth-child(1) text:nth-child(3) text {
color: #ff3434;
font-size: 24rpx;
}

.coupons_info view:nth-child(2) text:nth-child(1) {
font-size: 36rpx;
color: #ff3434;
margin-top: 40rpx;
font-weight: bold;
}

.coupons_info view:nth-child(2) text:nth-child(2) {
font-size: 24rpx;
color: #b4b4b4;
text-decoration: line-through;
padding-left: 10rpx;
padding-top: 4rpx;
}

navigator {
display: block;
margin-bottom: 24rpx;
width: 344rpx;
}

.navigator-hover{
opacity: 1!important;
background: #fff!important;
border-radius:16rpx;
}
.active{
opacity: .6;
}
navigator:nth-of-type(2n) {
float: right;
}

navigator:nth-of-type(2n+1) {
float: left;
}

.contain {
padding: 24rpx 25rpx 0;
}

.posi {
width: 92%;
display: flex;
flex-direction: column;
padding: 0 4%;
background: #fff;
margin-top: 2%;
}

.posi>view:nth-child(2) {
width: 100%;
height: 87rpx;
display: flex;
justify-content: space-between;
border-top: 1px solid #f6f6f6;
line-height: 87rpx;
}

.posi>view:nth-child(2) text:nth-child(1) {
font-size: 30rpx;
color: #a9a9a9;
}

.posi>view:nth-child(2) text:nth-child(2) {
font-size: 30rpx;
color: #a9a9a9;
}

.posi_logo {
width: 100%;
height: 156rpx;
display: flex;
margin-top: 30rpx;
}

.posi_logo view:nth-child(1) {
width: 126rpx;
height: 126rpx;
border-radius: 50%;
overflow: hidden;
flex: 2;
}

.posi_logo view:nth-child(1) image {
width: 100%;
height: 100%;
}

.posi_logo view:nth-child(2) {
display: flex;
flex-direction: column;
flex: 8;
padding-top: 20rpx;
padding-left: 30rpx;
}

.posi_logo view:nth-child(2) text:nth-child(1) {
font-size: 30rpx;
}

.posi_logo view:nth-child(2) text:nth-child(2) {
font-size: 24rpx;
color: #b8b8b8;
padding-top: 10rpx;
}

.notes view:nth-child(1) {
width: 92%;
height: 87rpx;
padding: 0 4%;
line-height: 87rpx;
background: #fff;
/* border-top: 1rpx solid #f5f5f5; */
}

.notes view:nth-child(1) text {
font-size: 30rpx;
font-weight: bold;
}

.notes view:nth-child(2) {
width: 92%;
height: auto;
padding: 0 4% 4%;
background: #fff;
/* border-bottom: 1rpx solid #f5f5f5; */
display: flex;
flex-direction: column;
}

.notes view:nth-child(2)>text {
font-size: 28rpx;
color: #a9a9a9;
line-height: 45rpx;
}

.spot {
width: 12rpx;
height: 12rpx;
display: inline-block;
background: #a9a9a9;
margin-right: 16rpx;
position: relative;
bottom: 4rpx;
border-radius: 50%;
}

.buy-view {
background: #fff;
position: fixed;
padding-top: 10rpx;
height: 98rpx;
bottom: 0rpx;
left: 0;
right: 0;
}

.buy {
display: block;
background: #ff4949;
border-radius: 30rpx;
height: 48rpx;
width: 112rpx;
margin: 0 auto;
color: #fff;
font-size: 26rpx;
line-height: 48rpx;
text-align: center;
}

.coupons1-btn-gm {
background: #00c0ff !important;
border-radius: 10rpx !important;
margin: 0 !important;
padding: 0 !important;
font-family: PingFangSC-Semibold;
font-size: 28rpx;
color: #fff !important;
letter-spacing: 0;
height: 50rpx !important;
width: 138rpx !important;
line-height: 50rpx !important;
}

.coupons1 {
position: relative;
background: #fff;
border-radius: 16rpx;
padding-bottom: 21rpx;
overflow: hidden;
}

/* .coupons1-border {
height: 1rpx;
left: 30rpx;
right: 30rpx;
background: #f5f5f5;
position: absolute;
bottom: 0;
} */

.coupons1-img {
width: 344rpx;
height: 258rpx;
overflow: hidden;
}

.coupons1-img image {
display: block;
width: 100%;
height: 100%;
}

.coupons1-info {
padding-left: 20rpx;
}

.coupons1-info-name {
font-size: 28rpx;
color: #000;
letter-spacing: 0;
}

.i {
font-size: 20rpx;
font-style: normal;
}

.coupons1-info-price-p {
display: inline-block;
font-size: 36rpx;
color: #f96563;
line-height: 50rpx;
margin-top: 21rpx;
}

.tit {
font-size: 30rpx;
color: #000;
letter-spacing: 0;
line-height: 42rpx;
width: 270rpx;
height: 42rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-top: 16rpx;
}

.coupons1-info-price-o {
display: block;
text-align: center;
font-size: 26rpx;
color: #b4b4b4;
letter-spacing: 0.96rpx;
text-decoration: line-through;
line-height: 24rpx;
}

.coupons1-info-distance {
font-size: 22rpx;
color: #c0c0c0;
letter-spacing: 0;
padding-bottom: 10rpx;
line-height: 30rpx;
}

.coupons1-info-address {
font-size: 22rpx;
color: #585858;
letter-spacing: 0;
line-height: 30rpx;
}

.coupons1-btn {
position: absolute;
width: 120rpx;
bottom: 25rpx;
right: 13rpx;
}

.coupons1-btn-gm {
background: #00c0ff !important;
border-radius: 10rpx !important;
margin: 0 !important;
padding: 0 !important;
font-family: PingFangSC-Semibold;
font-size: 28rpx;
color: #fff !important;
letter-spacing: 0;
height: 50rpx !important;
width: 138rpx !important;
line-height: 50rpx !important;
}

.subtitle {
font-size: 24rpx;
font-weight: 100;
text-align: left;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 300rpx;
color: #999;
letter-spacing: 0;
}

.coupons1-info-manjian {
color: #fa7c7a;
font-size: 20rpx;
line-height: 34rpx;
display: inline-block;
}

.jian {
width: 44rpx;
position: absolute;
bottom: 1.7%;
right: 3.5%;
}

/**上拉加载更多**/

.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}

.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}

.userinfo-nickname {
color: #aaa;
}

.sy {
display: block;
text-align: center;
width: 120rpx !important;
margin-top: 6rpx;
}

.usermotto {
margin-top: 200px;
}

/**/

scroll-view {
width: 100%;
}

.item {
width: 90%;
height: 300rpx;
margin: 20rpx auto;
background: brown;
overflow: hidden;
}

.item .img {
width: 430rpx;
margin-right: 20rpx;
float: left;
}

.title {
font-size: 30rpx;
display: block;
margin: 30rpx auto;
}

.description {
font-size: 26rpx;
line-height: 15rpx;
}

Laden…
Annuleren
Opslaan