提交细节

version/0412
fanfan 11 months ago
parent 0353e05205
commit 8668b510e5
  1. 2
      pages.json
  2. 10
      pages/activity/charts.vue
  3. 660
      pages/activity/intimate.vue
  4. 18
      pages/activity/newGoods.vue
  5. 24
      pages/activity/newPeople.vue
  6. 34
      pages/activity/newsshop.vue
  7. 37
      pages/activity/presale.vue
  8. 10
      pages/activity/ranking.vue
  9. 4
      pages/index/index.vue
  10. 31
      pages/invite/index.vue
  11. 22
      pages/news/coupon/index.vue
  12. 45
      pages/news/coupon/list.vue

@ -939,7 +939,7 @@
{
"path": "newsshop",
"style": {
"navigationBarTitleText": "新年换新",
"navigationBarTitleText": "活动",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}

@ -293,12 +293,12 @@
.rule {
width: 130rpx;
height: 50rpx;
height: 60rpx;
background-color: rgba(0, 0, 0, 0.3);
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 50rpx;
line-height: 60rpx;
text-align: center;
position: absolute;
right: 0;
@ -309,16 +309,16 @@
.all {
width: 130rpx;
height: 50rpx;
height: 60rpx;
background-color: rgba(0, 0, 0, 0.3);
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 50rpx;
line-height: 60rpx;
text-align: center;
position: absolute;
right: 0;
top: 120rpx;
top: 160rpx;
border-radius: 50rpx 0 0 50rpx;
z-index: 22;
}

@ -5,7 +5,9 @@
</view>
<view class="intimate-hd" @click="openPage(1)">
<image :src="storeInfo.imageList?storeInfo.imageList[0]:''"></image>
<view class="a">{{storeInfo.shop_name}}<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon></view>
<view class="a">{{storeInfo.shop_name}}
<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon>
</view>
<view class="b">{{storeInfo.summary}}</view>
</view>
<!-- <scroll-view scroll-x class="intimate-menu">
@ -17,7 +19,8 @@
<view class="intimate-bd">
<scroll-view scroll-y class="a">
<view class="item" @click="tabItem(-1)" :class="tabIndex==-1?'item-on':''">全部商品</view>
<view class="item" @click="tabItem(i)" v-for="(a,i) in list" :key="i" :class="tabIndex==i?'item-on':''">{{a.name}}</view>
<view class="item" @click="tabItem(i)" v-for="(a,i) in list" :key="i" :class="tabIndex==i?'item-on':''">
{{a.name}}</view>
</scroll-view>
<view class="b">
<view class="t">
@ -49,7 +52,7 @@
</template>
<script>
import * as newFunApi from '@/api/newFun'
import * as newFunApi from '@/api/newFun'
export default {
data() {
return {
@ -73,14 +76,14 @@
}
},
onLoad(o) {
this.tabIndex = o.index?(o.index): -1
this.tabIndex = o.index ? (o.index) : -1
this.getList();
this.storeInfo = uni.getStorageSync("cityInfo")
},
onPageScroll(e){
if(e.scrollTop <= 44){
onPageScroll(e) {
if (e.scrollTop <= 44) {
this.isScroll = true;
}else{
} else {
this.isScroll = false;
}
},
@ -89,8 +92,12 @@
* 获取列表
*/
async getList() {
let {status, message, data} = await newFunApi.serverCategoryList({});
if(status == 200){
let {
status,
message,
data
} = await newFunApi.serverCategoryList({});
if (status == 200) {
this.list = data.list
this.getGoodsList();
}
@ -99,42 +106,50 @@
* 获取商品列表
*/
async getGoodsList() {
let {status, message, data} = await newFunApi.serverList({
let {
status,
message,
data
} = await newFunApi.serverList({
server_name: "",
category_id: this.tabIndex == -1?"":(this.list.length > 0?this.list[this.tabIndex].category_id:""),
order_field: this.filterIndex == 0?"server_price":this.filterIndex == 1?"line_price":this.filterIndex == 2?"sold":"",
order_sort: this.filterFlag?"desc":"asc"
category_id: this.tabIndex == -1 ? "" : (this.list.length > 0 ? this.list[this.tabIndex]
.category_id : ""),
order_field: this.filterIndex == 0 ? "server_price" : this.filterIndex == 1 ?
"line_price" : this.filterIndex == 2 ? "sold" : "",
order_sort: this.filterFlag ? "desc" : "asc"
});
if(status == 200){
data.list.map(a => {
a.server_price = Number(a.server_price);
a.line_price = Number(a.line_price)
})
this.list1 = data.list
this.isShow = data.total == 0?true:false
if (status == 200) {
if (data.list.length > 0) {
data.list.map(a => {
a.server_price = Number(a.server_price);
a.line_price = Number(a.line_price)
})
this.list1 = data.list
this.isShow = data.total == 0 ? true : false
}
}
},
openPage(index,a){
if(index == 1){
},
openPage(index, a) {
if (index == 1) {
uni.navigateTo({
url: "/pages/user/vip/goods"
})
}else if(index == 2){
uni.setStorageSync("getInfo",a)
} else if (index == 2) {
uni.setStorageSync("getInfo", a)
uni.navigateTo({
url: "/pages/news/recycling/detail?type=1"
})
}
},
tabItem(index){
tabItem(index) {
this.tabIndex = index;
this.filterIndex = 0;
this.getGoodsList();
},
tabFilter(index){
if(index == this.filterIndex){
tabFilter(index) {
if (index == this.filterIndex) {
this.filterFlag = !this.filterFlag
}else{
} else {
this.filterFlag = true
}
this.filterIndex = index;
@ -145,322 +160,367 @@
</script>
<style lang="scss" scoped>
.intimate{
background: url(https://www.royaum.com.cn/static/news/refund-bg1.png) center top no-repeat;
background-size: 100% auto;
&-hd{
width: 686rpx;
height: 170rpx;
background: rgba(255,255,255,0.86);
border-radius: 12rpx;
margin: 0 auto;
padding-top: 30rpx;
box-sizing: border-box;
margin-top: 30rpx;
position: relative;
image{
position: absolute;
width: 162rpx;
height: 162rpx;
border-radius: 162rpx;
left: 18rpx;
top: -20rpx;
}
.a{
font-size: 32rpx;
color: #212121;
margin-left: 220rpx;
}
.b{
margin-left: 220rpx;
font-size: 28rpx;
color: #646464;
margin-top: 10rpx;
}
}
&-menu{
height: 180rpx;
white-space: nowrap;
margin-top: 30rpx;
padding: 0 20rpx;
.item{
width: 150rpx;
height: 180rpx;
background: #FFFFFF;
display: inline-block;
padding: 16rpx;
.intimate {
background: url(https://www.royaum.com.cn/static/news/refund-bg1.png) center top no-repeat;
background-size: 100% auto;
&-hd {
width: 686rpx;
height: 170rpx;
background: rgba(255, 255, 255, 0.86);
border-radius: 12rpx;
margin: 0 auto;
padding-top: 30rpx;
box-sizing: border-box;
border: 1px solid #FFFFFF;
text-align: center;
margin-left: 12rpx;
border-radius: 8rpx;
image{
width: 112rpx;
height: 112rpx;
margin-top: 30rpx;
position: relative;
image {
position: absolute;
width: 162rpx;
height: 162rpx;
border-radius: 162rpx;
left: 18rpx;
top: -20rpx;
}
.p{
white-space: nowrap;
overflow: hidden;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
.a {
font-size: 32rpx;
color: #212121;
margin-left: 220rpx;
}
&-on{
border: 1px solid #F21A1C;
.b {
margin-left: 220rpx;
font-size: 28rpx;
color: #646464;
margin-top: 10rpx;
}
}
}
&-bd{
padding: 30rpx 0 0;
display: flex;
height: calc(100vh - 340rpx);
box-sizing: border-box;
overflow: hidden;
.a{
width: 150rpx;
height: 100%;
.item{
padding: 20rpx 35rpx;
border-left: 3px solid #FFFFFF;
line-height: 50rpx;
text-align: center;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
&-menu {
height: 180rpx;
white-space: nowrap;
margin-top: 30rpx;
padding: 0 20rpx;
.item {
width: 150rpx;
height: 180rpx;
background: #FFFFFF;
display: inline-block;
padding: 16rpx;
box-sizing: border-box;
&-on{
background-color: #FFFFFF;
border-left-color: #F34A40;
border: 1px solid #FFFFFF;
text-align: center;
margin-left: 12rpx;
border-radius: 8rpx;
image {
width: 112rpx;
height: 112rpx;
}
.p {
white-space: nowrap;
overflow: hidden;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
}
&-on {
border: 1px solid #F21A1C;
}
}
}
.b{
width: 600rpx;
height: 100%;
background-color: #FFFFFF;
.t{
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
line-height: 100rpx;
.item{
flex: 1;
&-bd {
padding: 30rpx 0 0;
display: flex;
height: calc(100vh - 340rpx);
box-sizing: border-box;
overflow: hidden;
.a {
width: 150rpx;
height: 100%;
.item {
padding: 20rpx 35rpx;
border-left: 3px solid #FFFFFF;
line-height: 50rpx;
text-align: center;
&-on{
color: #F34A40;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
box-sizing: border-box;
&-on {
background-color: #FFFFFF;
border-left-color: #F34A40;
}
}
}
.l{
height: calc(100% - 120rpx);
box-sizing: border-box;
overflow: hidden;
.item{
width: 270rpx;
height: 389rpx;
background: #FFFFFF;
border-radius: 7rpx;
opacity: 1;
border: 1px solid #ECECEC;
padding: 10rpx 15rpx;
box-sizing: border-box;
float: left;
margin-left: 20rpx;
margin-bottom: 20rpx;
image{
width: 230rpx;
height: 230rpx;
display: block;
margin: 0 auto;
.b {
width: 600rpx;
height: 100%;
background-color: #FFFFFF;
.t {
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
line-height: 100rpx;
.item {
flex: 1;
text-align: center;
&-on {
color: #F34A40;
}
}
.title{
padding: 10rpx 0;
line-height: 40rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #1E1E1E;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text{
background-color: #F34A40;
font-size: 20rpx;
padding: 0 10rpx;
height: 40rpx;
}
.l {
height: calc(100% - 120rpx);
box-sizing: border-box;
overflow: hidden;
.item {
width: 270rpx;
height: 389rpx;
background: #FFFFFF;
border-radius: 7rpx;
opacity: 1;
border: 1px solid #ECECEC;
padding: 10rpx 15rpx;
box-sizing: border-box;
float: left;
margin-left: 20rpx;
margin-bottom: 20rpx;
image {
width: 230rpx;
height: 230rpx;
display: block;
margin: 0 auto;
}
.title {
padding: 10rpx 0;
line-height: 40rpx;
text-align: center;
border-radius: 4rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
margin-right: 5rpx;
display: inline-block;
color: #1E1E1E;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text {
background-color: #F34A40;
font-size: 20rpx;
padding: 0 10rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
border-radius: 4rpx;
font-weight: 400;
color: #FFFFFF;
margin-right: 5rpx;
display: inline-block;
}
}
}
.price{
display: flex;
align-items: center;
white-space: nowrap;
.n{
.price {
display: flex;
align-items: baseline;
font-size: 11px;
font-weight: 500;
color: #F21A1C;
text{
font-size: 29rpx;
align-items: center;
white-space: nowrap;
.n {
display: flex;
align-items: baseline;
font-size: 11px;
font-weight: 500;
color: #F21A1C;
text {
font-size: 29rpx;
}
}
.o {
font-size: 12px;
color: #949494;
text-decoration: line-through;
}
}
.o{
font-size: 12px;
.desc {
font-size: 10px;
font-weight: 400;
color: #949494;
text-decoration: line-through;
}
}
.desc{
font-size: 10px;
font-weight: 400;
color: #949494;
white-space: nowrap;
margin-top: 10rpx;
white-space: nowrap;
margin-top: 10rpx;
}
}
}
}
}
}
&-share{
width: 548rpx;
height: 810rpx;
overflow: hidden;
.l{
&-share {
width: 548rpx;
background: #FFFFFF;
margin: 0 auto;
height: 810rpx;
overflow: hidden;
position: relative;
.a{
width: 490rpx;
height: 243rpx;
.l {
width: 548rpx;
background: #FFFFFF;
margin: 0 auto;
padding-top: 24rpx;
image{
width: 100%;
height: 100%;
}
}
.b{
padding: 20rpx 20rpx;
overflow: hidden;
.item{
width: 220rpx;
height: 369rpx;
background: #FFFFFF;
border-radius: 7rpx;
opacity: 1;
border: 1px solid #ECECEC;
padding: 10rpx 0;
box-sizing: border-box;
float: left;
margin-left: 20rpx;
margin-bottom: 10rpx;
image{
width: 180rpx;
height: 180rpx;
display: block;
margin: 0 auto;
position: relative;
.a {
width: 490rpx;
height: 243rpx;
margin: 0 auto;
padding-top: 24rpx;
image {
width: 100%;
height: 100%;
}
.title{
}
.b {
padding: 20rpx 20rpx;
overflow: hidden;
.item {
width: 220rpx;
height: 369rpx;
background: #FFFFFF;
border-radius: 7rpx;
opacity: 1;
border: 1px solid #ECECEC;
padding: 10rpx 0;
line-height: 40rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #1E1E1E;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text{
background-color: #F34A40;
font-size: 20rpx;
padding: 0 10rpx;
height: 40rpx;
box-sizing: border-box;
float: left;
margin-left: 20rpx;
margin-bottom: 10rpx;
image {
width: 180rpx;
height: 180rpx;
display: block;
margin: 0 auto;
}
.title {
padding: 10rpx 0;
line-height: 40rpx;
text-align: center;
border-radius: 4rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
margin-right: 5rpx;
display: inline-block;
color: #1E1E1E;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text {
background-color: #F34A40;
font-size: 20rpx;
padding: 0 10rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
border-radius: 4rpx;
font-weight: 400;
color: #FFFFFF;
margin-right: 5rpx;
display: inline-block;
}
}
}
.price{
display: flex;
align-items: center;
white-space: nowrap;
padding: 0 5rpx;
.n{
.price {
display: flex;
align-items: baseline;
font-size: 11px;
font-weight: 500;
color: #F21A1C;
text{
font-size: 29rpx;
align-items: center;
white-space: nowrap;
padding: 0 5rpx;
.n {
display: flex;
align-items: baseline;
font-size: 11px;
font-weight: 500;
color: #F21A1C;
text {
font-size: 29rpx;
}
}
.o {
font-size: 12px;
color: #949494;
text-decoration: line-through;
}
}
.o{
font-size: 12px;
.desc {
padding: 0 5rpx;
font-size: 10px;
font-weight: 400;
color: #949494;
text-decoration: line-through;
white-space: nowrap;
margin-top: 10rpx;
overflow: hidden;
}
}
.desc{
padding: 0 5rpx;
font-size: 10px;
font-weight: 400;
color: #949494;
white-space: nowrap;
margin-top: 10rpx;overflow: hidden;
}
.c {
background-color: #F1F1F1;
height: 150rpx;
display: flex;
justify-content: flex-end;
align-items: center;
image {
width: 140rpx;
height: 122rpx;
margin-right: 30rpx;
}
}
}
.c{
background-color: #F1F1F1;
height: 150rpx;
display: flex;
justify-content: flex-end;
align-items: center;
image{
width: 140rpx;
height: 122rpx;
margin-right: 30rpx;
}
.btn {
width: 640rpx;
line-height: 80rpx;
text-align: center;
background: #F34A40;
position: fixed;
left: 50%;
margin-left: -320rpx;
top: 50%;
z-index: 2;
border-radius: 8rpx;
font-size: 28rpx;
font-weight: 600;
color: #FFFFFF;
margin-top: 450rpx;
}
}
.btn{
width: 640rpx;
line-height: 80rpx;
text-align: center;
background: #F34A40;
position: fixed;
left: 50%;
margin-left: -320rpx;
top: 50%;
z-index: 2;
border-radius: 8rpx;
font-size: 28rpx;
font-weight: 600;
color: #FFFFFF;
margin-top: 450rpx;
}
}
}
</style>
<style>
.goods .uni-scroll-view .uni-scroll-view{
overflow: auto!important;
}
</style>
.goods .uni-scroll-view .uni-scroll-view {
overflow: auto !important;
}
</style>

@ -59,7 +59,7 @@
},
backgroundImg: '',
list:[]
list: []
}
},
/**
@ -83,10 +83,12 @@
}
Api.brandList(pamars)
.then(result => {
result.data.data.map(a => {
a.goods_price_min = Number(a.goods_price_min)
})
app.list = result.data.data;
if (result.data.data.length > 0) {
result.data.data.map(a => {
a.goods_price_min = Number(a.goods_price_min)
})
app.list = result.data.data;
}
})
.finally(() => app.isLoading = false)
},
@ -137,8 +139,10 @@
.topLine {
display: flex;
justify-content: center;
.left {
margin-top: 132rpx;
.goodsName {
height: 58rpx;
font-size: 40rpx;
@ -206,6 +210,7 @@
background-image: url('https://www.royaum.com.cn/static/newGoods/bot.png');
background-repeat: no-repeat;
background-size: 100% 100%;
.goodsItem {
margin-bottom: 32rpx;
}
@ -270,7 +275,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
-webkit-line-clamp: 2;
-webkit-line-clamp: 2;
max-width: 350rpx;
height: 88rpx;
font-size: 32rpx;
@ -313,6 +318,7 @@
justify-content: flex-end;
margin-top: 50rpx;
margin-right: 30rpx;
.lowPrice {
height: 50rpx;
font-size: 36rpx;

@ -95,11 +95,13 @@
data
} = await Api.couponList();
if (status == 200) {
data.list.forEach(item => {
item.reduce_price = Number(item.reduce_price)
item.min_price = Number(item.min_price)
});
this.couList = data.list
if (data.list.length > 0) {
data.list.forEach(item => {
item.reduce_price = Number(item.reduce_price)
item.min_price = Number(item.min_price)
});
this.couList = data.list
}
}
},
//
@ -111,11 +113,13 @@
}
Api.chartsGoodsList(pamars)
.then(result => {
result.data.data.map(a => {
a.goods_price_min = Number(a.goods_price_min);
a.line_price_min = Number(a.line_price_min)
})
app.goodList = result.data.data;
if (result.data.data.length > 0) {
result.data.data.map(a => {
a.goods_price_min = Number(a.goods_price_min);
a.line_price_min = Number(a.line_price_min)
})
app.goodList = result.data.data;
}
})
.finally(() => app.isLoading = false)
},

@ -1,5 +1,5 @@
<template>
<view class="newsshop" v-if="shopItem" :style="{backgroundImage:'url('+shopItem.index_icon+')'}">
<view class="newsshop" :style="{backgroundImage:'url('+shopItem.index_icon+')'}">
<view class="newsshop-navbar">
<u-navbar :title="shopItem.title" back-icon-color="#fff" :border-bottom="false" title-color="#fff"
:background="background"></u-navbar>
@ -31,6 +31,7 @@
</view>
</view>
</view>
<u-empty text="暂无活动数据显示哦~" v-else mode="list"></u-empty>
</view>
</template>
@ -41,11 +42,18 @@
return {
current: 0,
shopItem: '',
shopList: []
shopList: [],
type: 2,
}
},
onLoad() {
this.getInfo()
onLoad(op) {
this.type = op.type ? op.type : 2
if (this.type == 2) {
this.getInfo()
}
if (this.type == 1) {
this.getShopList(op.activeid)
}
},
methods: {
goDetails(goodsId) {
@ -64,7 +72,9 @@
//
getInfo() {
const app = this;
Api.info()
Api.info({
type: 'other-item'
})
.then(result => {
this.shopItem = result.data;
this.getShopList(result.data.id)
@ -79,11 +89,15 @@
}
Api.detail(pamars)
.then(result => {
result.data.col.forEach(item => {
item.sliceIndex = 6;
item.goods_price_min = Number(item.goods_price_min);
});
this.shopList = result.data.col.length>0?result.data.col:[];
if (result.data.length>0) {
result.data.col.forEach(item => {
item.sliceIndex = 6;
item.goods_price_min = Number(item.goods_price_min);
});
this.shopList = result.data.col.length > 0 ? result.data.col : [];
}else{
this.shopList=[]
}
})
.finally()
},

@ -1,7 +1,7 @@
<template>
<view class="presale">
<view class="presale-hd">
<view class="rule" @click="openPage()"></view>
<view class="rule" @click="openPage()">规则</view>
</view>
<view class="presale-bd">
<view class="tab">
@ -20,7 +20,8 @@
<view class="info">
<view class="t">{{item.goods_name}}</view>
<view class="d">
<u-count-down :timestamp="item.end_time*1000" format="HH:mm:ss"></u-count-down><text></text>
<u-count-down :timestamp="item.end_time*1000" format="HH:mm:ss"></u-count-down>
<text>后失效</text>
</view>
<view class="p">
<image :src="$picUrl+'/static/news/newPresale-2.png'"></image>
@ -58,7 +59,8 @@
methods: {
goPre(item) {
uni.navigateTo({
url: '/pages/goods/detail?goodsId=' + item.goods_id + '&isPre=' + true+'&pre_id='+this.info.id+'&isBuy='+this.info.end_time
url: '/pages/goods/detail?goodsId=' + item.goods_id + '&isPre=' + true + '&pre_id=' + this.info
.id + '&isBuy=' + this.info.end_time
})
},
openPage() {
@ -73,10 +75,12 @@
}
Api.presaleGoodsList(pamars)
.then(result => {
result.data.list.map(a => {
a.goods_price_min = Number(a.goods_price_min);
})
app.goodList = result.data.list;
if (result.data.list.length > 0) {
result.data.list.map(a => {
a.goods_price_min = Number(a.goods_price_min);
})
app.goodList = result.data.list;
}
})
.finally(() => app.isLoading = false)
},
@ -93,8 +97,8 @@
const hour = now.getHours();
const minute = now.getMinutes();
const second = now.getSeconds();
let start= year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
return (Date.parse(end.replace(/-/g, '/'))-Date.parse(start.replace(/-/g, '/')))
let start = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
return (Date.parse(end.replace(/-/g, '/')) - Date.parse(start.replace(/-/g, '/')))
},
//
getListCharts() {
@ -138,12 +142,19 @@
height: 380rpx;
.rule {
right: 0;
top: 74rpx;
z-index: 999;
width: 100rpx;
height: 60rpx;
background-color: rgba(0, 0, 0, 0.3);
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 60rpx;
text-align: center;
position: absolute;
right: 0;
top: 74rpx;
z-index: 2;
border-radius: 50rpx 0 0 50rpx;
}
}
@ -267,4 +278,4 @@
}
}
}
</style>
</style>

@ -148,10 +148,12 @@
}
Api.chartsGoodsList(pamars)
.then(result => {
result.data.data.forEach(item => {
item.goods_price_min = Number(item.goods_price_min);
});
app.goodList = result.data.data;
if (result.data.data.length > 0) {
result.data.data.forEach(item => {
item.goods_price_min = Number(item.goods_price_min);
});
app.goodList = result.data.data;
}
})
.finally(() => app.isLoading = false)
},

@ -809,6 +809,10 @@
uni.navigateTo({
url: '/pages/goods/detail?goodsId=' + this.bannerList[index].redirect_url
})
} else {
uni.navigateTo({
url: '/pages/activity/newsshop?activeid=' + this.bannerList[index].id + '&type=1'
})
}
},
goDetails(item) {

@ -30,28 +30,35 @@
<view class="invite-bd-b">
<image :src="$picUrl+'/static/news/invite-bg2.png'"></image>
<view class="a">
<view class="l">
可得{{info.integral}}积分<br />{{info.coupon_name}}
<view class="l">
可得188积分
<!-- 可得{{info.integral}}积分
<br />{{info.coupon_name}} -->
</view>
<view class="l">
可返现{{info.one_order_rate}}%
<view class="l">
可返现3-5%
<!-- 可返现{{info.one_order_rate}}% -->
</view>
<view class="l">
{{info.one_order_rate}}{{info.coupon_name}}
<view class="l">
新人首单礼
<!-- {{info.one_order_rate}}{{info.coupon_name}} -->
</view>
</view>
</view>
<view class="invite-bd-c">
<image :src="$picUrl+'/static/news/invite-bg3.png'"></image>
<view class="a">
<view class="l">
{{info.one_order_rate}}{{info.coupon_name}}
<view class="l">
优惠券
<!-- {{info.one_order_rate}}{{info.coupon_name}} -->
</view>
<view class="l">
{{info.integral}}积分
<view class="l">
积分
<!-- {{info.integral}}积分 -->
</view>
<view class="l">
首单返{{info.one_order_rate}}%
<view class="l">
长期返现
<!-- 首单返{{info.one_order_rate}}% -->
</view>
</view>
</view>

@ -1,5 +1,6 @@
<template>
<view class="coupon">
<!-- <view class="rule" @click="openPage()">规则</view> -->
<view class="coupon-hd">
<image src="https://www.royaum.com.cn/static/news/coupon-bg.jpg"></image>
</view>
@ -65,6 +66,11 @@
}
},
openPage() {
uni.navigateTo({
url: '/pages/activity/presaleRule?type=6'
})
},
openPage() {
uni.navigateTo({
url: "/pages/news/coupon/list"
@ -99,6 +105,22 @@
overflow: hidden;
min-height: 100vh;
.rule {
right: 0;
top: 74rpx;
z-index: 999;
width: 100rpx;
height: 60rpx;
background-color: rgba(0, 0, 0, 0.3);
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 60rpx;
text-align: center;
position: absolute;
border-radius: 50rpx 0 0 50rpx;
}
.nolist {
width: 100%;
display: block;

@ -5,7 +5,8 @@
:is-scroll="false" v-model="tabIndex" @change="change"></u-tabs>
</view>
<view class="coupon-bd">
<view class="item" :class="tabIndex == 2?'item-on':''" v-for="(item,index) in couponList" :key="index" @click="choseItem(item)" :style="{'border':item.user_coupon_id==choseId?'2rpx solid red':none}">
<view class="item" :class="tabIndex == 2?'item-on':''" v-for="(item,index) in couponList" :key="index"
@click="choseItem(item)" :style="{'border':item.user_coupon_id==choseId?'2rpx solid red':none}">
<view class="a" v-if="item.coupon_type==10"><text>{{item.reduce_price}}</text></view>
<view class="a" v-if="item.coupon_type==20"><text>{{item.discount}}</text></view>
<view class="b">有效期{{item.end_time}}</view>
@ -15,8 +16,8 @@
</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="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>
<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>
@ -39,56 +40,62 @@
export default {
data() {
return {
choseId:'',
choseId: '',
list: [{
name: '未使用',
val:'isUsable'
val: 'isUsable'
}, {
name: '已使用',
val:'isUse'
val: 'isUse'
}, {
name: '已过期',
val:'isExpire'
val: 'isExpire'
}],
tabIndex: 0,
couponList:[],
isChose:false
couponList: [],
isChose: false
}
},
onLoad(o){
onLoad(o) {
this.isChose = o.chose
},
onShow() {
this.getCoupon(this.tabIndex)
},
methods: {
choseItem(item){
if(this.isChose){
uni.setStorageSync('couponId',item.coupon_id)
choseItem(item) {
if (this.isChose) {
uni.setStorageSync('couponId', item.coupon_id)
uni.navigateBack()
}
},
getCoupon(e) {
const that = this
let param={
dataType:that.list[e].val
let param = {
dataType: that.list[e].val
}
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)
},
change(e) {
this.couponList=[]
this.couponList = []
this.getCoupon(e)
},
tabItem(index) {
this.tabIndex = index
},
goUse(item){
goUse(item) {
// 使
if(item.coupon_case==10){
if (item.coupon_case == 10) {
//
uni.switchTab({
url: "/pages/index/index"
@ -241,4 +248,4 @@
}
}
}
</style>
</style>

Loading…
Cancel
Save