细节修复

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 { ::v-deep .u-navbar-fixed {
background: none !important; background: none !important;
} }
::v-deep .u-empty {
padding: 150rpx 0;
}
.newsshop { .newsshop {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;

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

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

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

Loading…
Cancel
Save