Commit ba551534 by LJM

css

parent a6650e0e
......@@ -6,6 +6,34 @@
"description": "",
"glyphs": [
{
"icon_id": "35644729",
"name": "矩形 (5)",
"font_class": "a-juxing5",
"unicode": "e79f",
"unicode_decimal": 59295
},
{
"icon_id": "35644730",
"name": "矩形 (3)",
"font_class": "a-juxing31",
"unicode": "e7a0",
"unicode_decimal": 59296
},
{
"icon_id": "35644731",
"name": "矩形 (2)",
"font_class": "a-juxing2",
"unicode": "e7a1",
"unicode_decimal": 59297
},
{
"icon_id": "35644732",
"name": "矩形 (4)",
"font_class": "a-juxing4",
"unicode": "e7a2",
"unicode_decimal": 59298
},
{
"icon_id": "35604131",
"name": "矩形",
"font_class": "juxing5",
......
......@@ -63,15 +63,23 @@
padding-left: 24rpx;
position: relative;
.t1 {
max-width: 46%;
font-size: 26rpx;
color: #484b59;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 12rpx;
}
.t2 {
.content {
height: 30rpx;
font-size: 24rpx;
color: #919399;
font-weight: 400;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.arrow {
width: 12rpx;
......
.page-userCoupon {
padding-top: 88rpx;
.go-coupon {
text-align: right;
font-size: 28rpx;
color: #1969f9;
}
.tab {
background: #ffffff;
height: 88rpx;
margin-bottom: 16rpx;
.box {
position: relative;
height: 100%;
transition: all 0.4s ease;
.t1 {
font-size: 28rpx;
color: #484b59;
}
.t2 {
font-size: 28rpx;
color: #292b33;
font-weight: bold;
}
.t3 {
font-size: 24rpx;
color: #919399;
}
&.curr {
&::after {
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 53rpx;
height: 7rpx;
margin: 0 auto;
background: #1969f9;
border-radius: 4rpx;
content: '';
}
}
}
}
.list {
padding: 0 24rpx;
.box {
position: relative;
height: 176rpx;
background: #ffffff;
border-radius: 0px 10rpx 10rpx 0px;
margin-bottom: 16rpx;
.left {
width: 230rpx;
height: 176rpx;
background: url('https://img.ichunt.com/images/ichunt/202305/19/e8f03900544551d09436a542ee7d0ea0.png') no-repeat center;
background-size: cover;
.p1 {
margin-bottom: 8rpx;
.t1 {
font-size: 22rpx;
color: #ffffff;
}
.t2 {
margin-left: 10rpx;
font-size: 60rpx;
color: #ffffff;
font-family: Impact;
}
}
.p2 {
font-size: 20rpx;
color: #ffffff;
}
}
.right {
padding-left: 24rpx;
.p1 {
margin-bottom: 16rpx;
.t1 {
font-size: 22rpx;
color: #484b59;
}
.t2 {
font-size: 22rpx;
color: #1969f9;
}
}
.p2 {
margin-bottom: 16rpx;
}
.p3 {
width: 142rpx;
height: 40rpx;
border-radius: 6rpx;
border: 1px solid #1969f9;
font-size: 22rpx;
color: #1969f9;
}
}
.type {
position: absolute;
right: 0;
top: 0;
width: 82rpx;
height: 68rpx;
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 {
background: url('https://img.ichunt.com/images/ichunt/202305/19/ebf691eb49a2a3dffe612baea352a7b6.png') no-repeat center;
background-size: cover;
}
}
}
}
}
.no-data {
image {
width: 356rpx;
height: 356rpx;
}
.tt {
margin-top: 32rpx;
font-size: 28rpx;
color: #292b33;
}
}
......@@ -108,7 +108,7 @@
}
},
{
"path": "pages/mine/userCoupon",
"path": "pages/mine/coupon",
"style": {
"navigationBarTitleText": "优惠券"
}
......
......@@ -75,6 +75,10 @@ export default {
this.request(Api_Url + '/help/help/feedback_list', 'POST', this.searchParams, true, true).then(res => {
if (res.err_code === 0) {
this.list = res.data.list;
} else if (res.err_code == 11012) {
uni.navigateTo({
url: '/login?referer=/user/inquery'
});
}
});
}
......
......@@ -2,27 +2,41 @@
<view class="page-msg">
<navElement title="我的消息"></navElement>
<view class="tab row avarage verCenter">
<text class="box curr row verCenter"><text class="tt">全部</text></text>
<text class="box row verCenter">
<text class="tt">未读</text>
<text class="msg row rowCenter verCenter">28</text>
<text class="box row verCenter" @click="tab(index)" :class="{ curr: index == curr }" :key="index" v-for="(item, index) in text_arr">
<text class="tt">{{ item }}</text>
</text>
<text class="box row verCenter"><text class="tt">已读</text></text>
</view>
<view class="list">
<navigator class="box row verCenter" v-for="(item, index) in 10" :key="index" url="/user/msgDetail" hover-class="none">
<text class="iconfont icon-adindex2"></text>
<view class="list" v-if="list.length > 0">
<navigator class="box row verCenter" v-for="(item, index) in list" :key="index" url="/user/msgDetail" hover-class="none">
<!-- 公告 -->
<template v-if="item.msg_type == 1">
<text class="iconfont icon-a-juxing4"></text>
</template>
<!-- 活动 -->
<template v-else-if="item.msg_type == 2">
<text class="iconfont icon-a-juxing31"></text>
</template>
<!-- 新闻 -->
<template v-else-if="item.msg_type == 3">
<text class="iconfont icon-a-juxing4"></text>
</template>
<!-- 其他 -->
<template v-else>
<text class="iconfont icon-a-juxing5"></text>
</template>
<view class="text column">
<view class="row">
<view class="t1">活动通知</view>
<text class="arrow"></text>
<view class="t1">{{ item.title }}</view>
<template v-if="item.status == 1">
<text class="arrow"></text>
</template>
</view>
<text class="t2">恭喜您获得会员专享200.00元抵扣券一张!</text>
<view class="content" v-html="item.content"></view>
</view>
<view class="time">2023-04-12 11:16</view>
<view class="time">{{ item.actual_send_time_format }}</view>
</navigator>
</view>
<view class="no-data column rowCenter verCenter">
<view class="no-data column rowCenter verCenter" v-else>
<image src="../../static/nodate.png"></image>
<text class="tt">暂无消息</text>
</view>
......@@ -37,10 +51,59 @@ export default {
navElement
},
data() {
return {};
return {
curr: 0,
text_arr: ['全部', '未读', '已读'],
searchParams: {
p: 1,
limit: 1000,
status: ''
},
list: []
};
},
onShow() {},
methods: {}
onShow() {
this.getData();
},
methods: {
tab(index) {
this.curr = index;
if (index == 0) {
this.searchParams.status = '';
} else if (index == 1) {
this.searchParams.status = 1;
} else if (index == 2) {
this.searchParams.status = 2;
}
this.getData();
},
/**
* 已读消息
*/
changeMessageStatus(msg_id) {
this.request(Api_Url + '/msg/getMessageListsByUserId', 'POST', { status: 1, msg_id: msg_id }, true, true).then(res => {
if (res.err_code === 0) {
this.getData();
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
getData() {
this.request(Api_Url + '/msg/getMessageListsByUserId', 'POST', this.searchParams, true, true).then(res => {
if (res.err_code === 0) {
this.list = res.data.list;
} else if (res.err_code === 11012) {
uni.navigateTo({
url: '/login'
});
}
});
}
}
};
</script>
......
......@@ -438,6 +438,10 @@ export default {
this.request(Api_Url + '/order/lists', 'POST', this.searchParams, true, true).then(res => {
if (res.err_code === 0) {
this.list = res.data.list;
} else if (res.err_code == 11012) {
uni.navigateTo({
url: '/login?referer=/user/shoporder'
});
} else {
this.list = [];
}
......
......@@ -18,7 +18,7 @@
<text class="tt">我的订单</text>
<text class="tip"></text>
</navigator>
<navigator class="box column rowCenter verCenter" url="/userCoupon" hover-class="none">
<navigator class="box column rowCenter verCenter" url="/user/coupon" hover-class="none">
<image src="../../static/coup.png"></image>
<text class="tt">我的优惠券</text>
<text class="tip"></text>
......
......@@ -76,6 +76,10 @@ export default {
this.request(Api_Url + '/address/recvlist', 'POST', {}, true, true).then(res => {
if (res.err_code === 0) {
this.list = res.data;
} else if (res.err_code == 11012) {
uni.navigateTo({
url: '/login?referer=/user/reciveaddress'
});
}
});
},
......
<template>
<view class="page-userCoupon">
<navElement title="我的优惠券">
<template slot="title-bar">
<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">({{ count[index] }})</text>
</view>
</view>
<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">{{ 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="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">{{ item.coupon_mall_type == 1 ? '全站' : item.coupon_mall_type == 2 ? '全部自营' : '全部联营' }}</text>
<text class="t1">商品</text>
</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>
<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 class="type">
<view class="tt">{{ item.coupon_mall_type == 1 ? '全站' : item.coupon_mall_type == 2 ? '自营' : '联营' }}</view>
</view>
</view>
</view>
<template v-else>
<view class="no-data column rowCenter verCenter">
<image src="../../static/nodate.png"></image>
<text class="tt">暂无优惠券信息</text>
</view>
</template>
</view>
</template>
<script>
import { Api_Url } from '@/util/api.js';
import navElement from '@/components/nav.vue';
export default {
components: {
navElement
},
data() {
return {
curr: 0,
text_arr: ['未使用', '已使用', '已过期'],
list: [],
count: [],
searchParams: {
status: -1
}
};
},
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;
}
});
}
}
};
</script>
<style lang="scss">
@import '@/assets/css/mine/userCoupon.scss';
</style>
......@@ -146,8 +146,8 @@ const router = new Router({
}
},
{
path: '/pages/mine/userCoupon',
aliasPath: '/userCoupon',
path: '/pages/mine/coupon',
aliasPath: '/user/coupon',
meta: {
title: '优惠券',
auth: true
......
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