Commit 62bcb1ab by LJM

bug

parent 7936e972
......@@ -65,6 +65,7 @@
margin-left: 10rpx;
font-size: 60rpx;
color: #ffffff;
font-family: Impact;
}
}
.p2 {
......@@ -97,15 +98,23 @@
color: #1969f9;
}
}
.type-1 {
.type {
position: absolute;
right: 0;
top: 0;
width: 82rpx;
height: 68rpx;
background: url('https://img.ichunt.com/images/ichunt/202305/19/f8fb5d9934fd1227ba807378939a5565.png') no-repeat center;
background: url('https://img.ichunt.com/images/ichunt/202305/22/0aaf37437c984408376b330da3dbf323.png') no-repeat center;
background-size: cover;
z-index: 99;
.tt {
margin-left: 22rpx;
margin-top: 6rpx;
text-align: center;
transform: rotate(45deg);
color: #fff;
font-size: 22rpx;
}
}
&.disabled {
.left {
......
......@@ -4,17 +4,14 @@
<view class="content">
<view class="t1">问题类型</view>
<view class="type row">
<view class="box curr row rowCenter verCenter">购物流程</view>
<view class="box row rowCenter verCenter">物流问题</view>
<view class="box row rowCenter verCenter">售后服务</view>
<view class="box row rowCenter verCenter">其它</view>
<view class="box row rowCenter verCenter" v-for="(item, index) in arr" :key="index" :class="{ curr: index == curr }" @click="tab(index)">{{ item }}</view>
</view>
<view class="suggest column">
<text class="t2">请留下您宝贵的建议:</text>
<textarea></textarea>
<textarea v-model="formParams.content"></textarea>
</view>
</view>
<view class="btn"><view class="btn1 row rowCenter verCenter">提交</view></view>
<view class="btn"><view class="btn1 row rowCenter verCenter" @click="submit()">提交</view></view>
</view>
</template>
......@@ -26,10 +23,59 @@ export default {
navElement
},
data() {
return {};
return {
curr: -1,
arr: ['购物流程', '物流问题', '售后服务', '其它'],
formParams: {
type: '',
content: '',
source: window.location.href
}
};
},
onShow() {},
methods: {}
methods: {
tab(index) {
this.curr = index;
this.formParams.type = index + 1;
},
submit() {
if (!this.formParams.type) {
uni.showToast({
title: '请选择问题类型',
icon: 'none'
});
return false;
}
if (!this.formParams.content) {
uni.showToast({
title: '请填写你的宝贵意见',
icon: 'none'
});
return false;
}
this.request(Api_Url + '/help/help/feedback', 'POST', this.formParams, true, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '谢谢您的反馈',
icon: 'success'
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
}
}
};
</script>
......
......@@ -2,56 +2,52 @@
<view class="page-userCoupon">
<navElement title="我的优惠券">
<template slot="title-bar">
<navigator class="go-coupon" url="/user" hover-class="none">去领券</navigator>
<navigator class="go-coupon" url="/user/activity" hover-class="none">去领券</navigator>
</template>
</navElement>
<view class="tab row avarage verCenter">
<view class="box row rowCenter verCenter" @click="tab(index)" :class="{ curr: index == curr }" :key="index" v-for="(item, index) in text_arr">
<text class="t2">{{ item }}</text>
<text class="t3">0</text>
<text class="t3">{{ count[index] }}</text>
</view>
</view>
<template v-if="curr == 0">
<view class="list">
<view class="box row verCenter" v-for="(item, index) in 100" :key="index">
<view class="left column rowCenter verCenter">
<view class="p1">
<view class="list" v-if="list.length > 0">
<view class="box row verCenter" v-for="(item, index) in list" :key="index">
<view class="left column rowCenter verCenter">
<view class="p1">
<template v-if="item.coupon_type == 1">
<text class="t1"></text>
<text class="t2">10</text>
</view>
<view class="p2">满¥200可用</view>
<text class="t2">{{ item.sale_amount.toFixed(2) }}</text>
</template>
<template v-else-if="item.coupon_type == 2">
<text class="t2">{{ (item.sale_amount * 10).toFixed(2) }}</text>
<text class="t1"></text>
</template>
</view>
<view class="right">
<view class="p1">
<view class="p2">{{ item.require_desc }}</view>
</view>
<view class="right">
<view class="p1">
<template v-if="item.coupon_goods_range == 1">
<text class="t1">适用于</text>
<text class="t2">全站</text>
<text class="t2">{{ item.coupon_mall_type == 1 ? '全站' : item.coupon_mall_type == 2 ? '全部自营' : '全部联营' }}</text>
<text class="t1">商品</text>
</view>
<view class="p2">2023.02.27-2023.04.01</view>
<view class="p3 row rowCenter verCenter">立即使用</view>
</template>
<template v-else>
<text class="t1">适用于</text>
<text class="t2">{{ item.selected_supplier ? '供应商' + item.selected_supplier : '' }}{{ item.selected_brand ? '制造商' + item.selected_brand : '' }}</text>
<text class="t1">所有商品</text>
</template>
</view>
<text class="type-1"></text>
<view class="p2">{{ item.start_time }} - {{ item.end_time }}</view>
<navigator class="p3 row rowCenter verCenter" v-if="item.status == -1" url="/" hover-class="none">立即使用</navigator>
</view>
</view>
</template>
<template v-if="curr == 1">
<view class="list">
<view class="box row verCenter disabled" v-for="(item, index) in 100" :key="index">
<view class="left column rowCenter verCenter">
<view class="p1">
<text class="t1"></text>
<text class="t2">10</text>
</view>
<view class="p2">满¥200可用</view>
</view>
<view class="right">
<view class="p1"><text class="t1">新人优惠券</text></view>
<view class="p2">2023.02.27-2023.04.01</view>
</view>
<view class="type">
<view class="tt">{{ item.coupon_mall_type == 1 ? '全站' : item.coupon_mall_type == 2 ? '自营' : '联营' }}</view>
</view>
</view>
</template>
<template v-if="curr == 2">
</view>
<template v-else>
<view class="no-data column rowCenter verCenter">
<image src="../../static/nodate.png"></image>
<text class="tt">暂无优惠券信息</text>
......@@ -71,13 +67,42 @@ export default {
data() {
return {
curr: 0,
text_arr: ['未使用', '已使用', '已过期']
text_arr: ['未使用', '已使用', '已过期'],
list: [],
count: [],
searchParams: {
status: -1
}
};
},
onLoad() {},
onShow() {
this.getData();
},
methods: {
tab(index) {
this.curr = index;
if (index == 0) {
this.searchParams.status = -1;
} else if (index == 1) {
this.searchParams.status = 1;
} else if (index == 2) {
this.searchParams.status = -2;
}
this.getData();
},
getData() {
this.request(Api_Url + '/ucoupon/count', 'POST', {}, true, true).then(res => {
if (res.err_code === 0) {
this.count[0] = res.data[-1];
this.count[1] = res.data[1];
this.count[2] = res.data[-2];
}
});
this.request(Api_Url + '/ucoupon/lists', 'POST', this.searchParams, true, true).then(res => {
if (res.err_code === 0) {
this.list = res.data;
}
});
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment