细节修复

version/0412
fanfan 12 months ago
parent 63123bb382
commit 77f81ee306
  1. 4
      pages/activity/newsshop.vue
  2. 30
      pages/activity/presaleRule.vue
  3. 65
      pages/news/coupon/index.vue
  4. 14
      pages/news/coupon/list.vue
  5. 7
      pages/news/recycling/index.vue

@ -108,7 +108,9 @@
::v-deep .u-navbar-fixed {
background: none !important;
}
::v-deep .u-empty {
padding: 150rpx 0;
}
.newsshop {
width: 100%;
overflow: hidden;

@ -14,8 +14,18 @@
}
},
onLoad(op) {
let title = ''
if (op.type == 5) {
title = '预售规则'
}
if (op.type == 6) {
title = '排行榜规则'
}
if (op.type == 7) {
title = '优惠券规则'
}
uni.setNavigationBarTitle({
title: op.type == 5 ? '预售规则' : '排行榜规则'
title: title
})
this.type = op.type
this.getCarouselList(op.type)
@ -25,13 +35,24 @@
//
getCarouselList(type) {
const app = this;
let rule=''
if (app.type == 5) {
rule = 'presale_rule'
}
if (app.type == 6) {
rule = 'rank_rule'
}
if (app.type == 7) {
rule = 'coupon_rule'
}
Api.getAgreement({
type: type==5?'presale_rule':"rank_rule"
type: rule
})
.then(result => {
let content = result.data.detail.content;
if(content){
content = content.replace(/style=""/g,'').replace(/<img src=/g,'<img style="width: 100%; display:block" src=')
if (content) {
content = content.replace(/style=""/g, '').replace(/<img src=/g,
'<img style="width: 100%; display:block" src=')
}
this.content = content
})
@ -44,6 +65,7 @@
<style lang="scss" scoped>
.presale {
padding: 40rpx;
.p {
font-size: 26rpx;
line-height: 50rpx;

@ -1,6 +1,6 @@
<template>
<view class="coupon">
<!-- <view class="rule" @click="openPage()">规则</view> -->
<view class="rule" @click="openPage()">规则</view>
<view class="coupon-hd">
<image src="https://www.royaum.com.cn/static/news/coupon-bg.jpg"></image>
</view>
@ -10,15 +10,17 @@
</view>
<view class="coupon-bd">
<view class="item" v-for="(item,index) in couponList" :key="index">
<view class="a" v-if="item.coupon_type==10"><text>{{item.reduce_price}}</text></view>
<view class="a" v-if="item.coupon_type==10"><text>{{ item.reduce_price?Number(item.reduce_price):''}}</text></view>
<view class="a" v-if="item.coupon_type==20"><text>{{item.discount}}</text></view>
<view class="b">{{item.min_price}}元使用</view>
<view class="b">{{item.min_price? Number(item.min_price):''}}元使用</view>
<view class="c">
<text v-if="item.apply_range==10">适用于全场商品</text>
<text v-if="item.apply_range==20">适用于部分商品</text>
</view>
<view class="d" @click="receive(item)">点击领取</view>
<image :src="$picUrl+'/static/news/icon-coupon-01.png'"></image>
<view class="d" @click="toUse(item)" v-if="item.state.value==0">去使用</view>
<view class="d" @click="receive(item)" v-else>点击领取</view>
<image :src="$picUrl+'/static/news/icon-coupon-01.png?t=2'"></image>
<view class="f" v-if="item.start_time&&item.end_time">有效期:{{item.start_time}}-{{item.end_time}}</view>
</view>
</view>
<view class="nolist" v-if="couponList.length==0">
@ -50,10 +52,6 @@
if (index == 0) {
CouponApi.list()
.then(res => {
res.data.list.forEach(item => {
item.min_price = Number(item.min_price);
item.reduce_price = Number(item.reduce_price);
});
that.couponList = res.data.list
})
.finally(() => that.isLoading = false)
@ -67,14 +65,10 @@
},
openPage() {
uni.navigateTo({
url: '/pages/activity/presaleRule?type=6'
})
},
openPage() {
uni.navigateTo({
url: "/pages/news/coupon/list"
})
this.$toast('暂无优惠券规则')
// uni.navigateTo({
// url: '/pages/activity/presaleRule?type=7'
// })
},
tabItem(index) {
this.tabIndex = index;
@ -87,9 +81,17 @@
})
.then(res => {
that.$toast(res.message)
this.getCoupon()
})
.finally(() => that.isLoading = false)
},
// 使
toUse(){
//
uni.switchTab({
url: "/pages/index/index"
})
},
goMyCoupon() {
uni.navigateTo({
url: "/pages/news/coupon/list"
@ -178,7 +180,7 @@
.item {
width: 662rpx;
height: 366rpx;
height: 240rpx;
position: relative;
margin-top: 20rpx;
overflow: hidden;
@ -192,14 +194,14 @@
width: 100%;
position: absolute;
left: 60rpx;
top: 70rpx;
top: 20rpx;
z-index: 2;
font-size: 36rpx;
font-size: 30rpx;
font-weight: 500;
color: #FE6900;
text {
font-size: 68rpx;
font-size: 60rpx;
}
}
@ -207,7 +209,7 @@
width: 100%;
position: absolute;
left: 60rpx;
top: 160rpx;
top: 100rpx;
z-index: 2;
font-size: 32rpx;
font-weight: 500;
@ -218,7 +220,7 @@
width: 100%;
position: absolute;
left: 60rpx;
bottom: 20rpx;
bottom: 22rpx;
z-index: 2;
font-size: 28rpx;
font-weight: 500;
@ -232,13 +234,28 @@
border-radius: 68rpx;
position: absolute;
right: 28rpx;
top: 40rpx;
top: 35rpx;
z-index: 2;
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
text-align: center;
}
.f{
height: 40rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #AFAFAF;
line-height: 40rpx;
text-align: left;
font-style: normal;
text-transform: none;
position: absolute;
right: 28rpx;
bottom: 85rpx;
z-index: 2;
}
}
}
}

@ -15,9 +15,9 @@
<text v-if="item.apply_range==20">适用于部分商品</text>
</view>
<view class="d" v-if="tabIndex == 0" @click="goUse(item)">去使用</view>
<view class="e">{{item.min_price}}元使用</view>
<view class="f" v-if="item.coupon_type==10">{{item.min_price}}元减{{item.reduce_price}}</view>
<view class="f" v-if="item.coupon_type==20">{{item.min_price}}{{item.discount}}</view>
<view class="e">{{item.min_price?Number(item.min_price):''}}元使用</view>
<view class="f" v-if="item.coupon_type==10">{{item.min_price?Number(item.min_price):''}}元减{{item.reduce_price?Number(item.reduce_price):''}}</view>
<view class="f" v-if="item.coupon_type==20">{{item.min_price?Number(item.min_price):''}}{{item.discount}}</view>
<image class="bg" v-if="tabIndex <= 1" :src="$picUrl+'/static/news/icon-coupon-01.png'"></image>
<image class="bg" v-else :src="$picUrl+'/static/news/icon-coupon-02.png'"></image>
<image class="icon" v-if="tabIndex == 1" :src="$picUrl+'/static/news/icon-coupon-use.png'"></image>
@ -76,12 +76,6 @@
}
CouponApi.myCouponList(param)
.then(res => {
if (res.data.list.data.length > 0) {
res.data.list.data.forEach(item => {
item.min_price = Number(item.min_price);
item.reduce_price = Number(item.reduce_price);
});
}
that.couponList = res.data.list.data
})
.finally(() => that.isLoading = false)
@ -136,7 +130,7 @@
.item {
width: 662rpx;
height: 366rpx;
height: 310rpx;
position: relative;
margin-top: 20rpx;
overflow: hidden;

@ -110,6 +110,7 @@
height: 305rpx;
}
&-notice{
border-radius: 35rpx 35rpx 0 0;
background-color: #fff;
display: flex;
align-items: center;
@ -197,7 +198,7 @@
text-overflow: ellipsis;
margin-top: 10rpx;
color: #888888;
height: 110rpx;
height: 124rpx;
}
.price{
display: flex;
@ -207,12 +208,12 @@
font-weight: 400;
color: #888888;
.btn{
width: 134rpx;
width: 140rpx;
line-height: 44rpx;
text-align: center;
background: #FFFFFF;
border-radius: 8rpx;
border: 1px solid #FF4949;
border: 1rpx solid #FF4949;
font-size: 24rpx;
font-weight: 400;
color: #FF4949;

Loading…
Cancel
Save