订单列表,购物车,个人中心,秒杀,消息中心

msb_beta
ch 3 years ago
parent 83d9986789
commit b375a78167

@ -1,3 +1,10 @@
<!--
* @Author: ch
* @Date: 2019-04-01 01:47:12
* @LastEditors: ch
* @LastEditTime: 2022-03-26 18:12:32
* @Description: file content
-->
<script>
export default {
onLaunch: function() {
@ -18,4 +25,7 @@
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "uview-ui/index.scss";
*{
font-family: 'PingFang SC-中粗体, PingFang SC';
}
</style>

@ -2,62 +2,64 @@
* @Author: ch
* @Date: 2022-03-20 13:11:55
* @LastEditors: ch
* @LastEditTime: 2022-03-24 16:38:41
* @LastEditTime: 2022-03-26 14:28:15
* @Description: file content
-->
<template>
<view class="empty-content">
<view class="empty-icon">
<slot name="icon">
<!-- <image class="image" src="@/static/empty.png" mode="widthFix"></image> -->
</slot>
</view>
<view class="tips">{{ tips }}</view>
<view class="empty">
<slot name="icon">
<image class="empty--icon" :src="icon" mode="widthFix"></image>
</slot>
<view class="empty--tips">{{ tips }}</view>
<slot name="btn"></slot>
</view>
</template>
<script>
export default {
// import icon from '@/static/message/empty.png'
export default {
data(){
return {
}
},
/**
* 组件的属性列表
* 用于组件自定义设置
*/
props: {
icon : {
type : String,
default : require('@/static/message/empty.png')
},
//
tips: {
type: String,
default: "亲,暂无相关数据",
}
},
mounted(){
},
/**
* 组件的属性列表
* 用于组件自定义设置
*/
props: {
//
tips: {
type: String,
default: '亲,暂无相关数据'
}
},
data() {
return {}
},
methods: {
}
}
methods: {},
};
</script>
<style lang="scss" scoped>
.empty-content {
box-sizing: border-box;
width: 100%;
padding: 50rpx;
text-align: center;
.tips {
font-size: 26rpx;
color: #999;
margin: 30rpx 0 50rpx;
}
.empty {
box-sizing: border-box;
width: 100%;
padding: 50rpx;
text-align: center;
background: #fff;
.empty-icon .image {
width: 280rpx;
}
&--tips {
font-size: 26rpx;
color: #999;
margin: 30rpx 0 50rpx;
}
}
&--icon {
width: 280rpx;
}
}
</style>

@ -0,0 +1,36 @@
<!--
* @Author: ch
* @Date: 2022-03-26 10:06:38
* @LastEditors: ch
* @LastEditTime: 2022-03-26 10:14:12
* @Description: file content
-->
<template>
<button class="btn" :class="`btn__${type}`"><slot></slot></button>
</template>
<script>
export default {
props : {
type : String,
default : 'line'
}
}
</script>
<style lang="scss" scoped>
.btn{
display: inline-block;
font-size: 28rpx;
height: 64rpx;
line-height: 64rpx;
padding: 0 50rpx;
text-align: center;
border-radius: 50rpx;
background: linear-gradient(270deg, #FF7F39 0%, #FFA35B 100%);
color: #fff;
&__line{
background: none;
color: #333;
border: 1px solid rgb(192, 185, 185);
}
}
</style>

@ -0,0 +1,57 @@
<!--
* @Author: ch
* @Date: 2022-03-25 10:11:37
* @LastEditors: ch
* @LastEditTime: 2022-03-25 10:36:12
* @Description: file content
-->
<template>
<view class="header">
<view class="header--title">
<image class="header--back" v-if="back" src="@/static/search/arrow.png" @click="$Router.back()"></image>
<slot name="title">{{title}}</slot>
</view>
<slot name="custom">
<view class="header--operation">
<slot name="operation"></slot>
</view>
</slot>
</view>
</template>
<script>
export default {
props : {
back : {
type : Boolean,
default : true
},
title : {
type : String,
default : ''
}
}
}
</script>
<style lang="scss" scoped>
.header{
height: 88rpx;
padding: 0 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
position: sticky;
top: var(--window-top);
z-index: 999;
&--back{
width: 14rpx;
height: 28rpx;
margin-right: 20rpx;
}
&--title{
display: flex;
align-items: center;
}
}
</style>

@ -223,6 +223,556 @@
"total_pay_price": "1399.00",
"expressPrice": 0,
"points_bonus": 0
},
{
"goods_id": 10009,
"goods_name": "荣耀9i 4GB+64GB 幻夜黑 移动联通电信4G全面屏手机 双卡双待",
"goods_no": "",
"video_id": 0,
"video_cover_id": 0,
"selling_point": "",
"spec_type": 20,
"goods_price_min": "1399.00",
"goods_price_max": "1499.00",
"line_price_min": "0.00",
"line_price_max": "0.00",
"stock_total": 571,
"content": "<p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20842\/114\/772658709\/51280\/97cce0f1\/5b175981N7290ead0.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20566\/33\/742373676\/46768\/fb7a4cc4\/5b17599cNea911d0e.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t21448\/12\/771050934\/55571\/1207e815\/5b1759ddN64ebf417.jpg\"\/><\/p>",
"delivery_id": 10001,
"is_points_gift": 1,
"is_points_discount": 1,
"is_alone_points_discount": 0,
"points_discount_config": "",
"is_enable_grade": 1,
"is_alone_grade": 0,
"alone_grade_equity": [],
"status": 10,
"goods_images": [
{
"file_id": 10080,
"group_id": 0,
"channel": 10,
"storage": "qiniu",
"domain": "http:\/\/static.yoshop.xany6.com",
"file_type": 10,
"file_name": "2018071717370507f183424.jpg",
"file_path": "2018071717370507f183424.jpg",
"file_size": 186872,
"file_ext": "jpg",
"cover": "",
"uploader_id": 0,
"is_recycle": 0,
"is_delete": 0,
"update_time": "2021-03-01 08:00:00",
"preview_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"external_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg"
}
],
"goods_image": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"goods_sales": 0,
"is_user_grade": false,
"skuInfo": {
"id": 10169,
"goods_sku_id": "10018_10021_10022",
"goods_id": 10009,
"image_id": 0,
"goods_sku_no": "",
"goods_price": "1399.00",
"line_price": "0.00",
"stock_num": 97,
"goods_weight": 0.14,
"goods_props": [
{
"group": {
"name": "颜色",
"id": 10001
},
"value": {
"name": "幻夜黑",
"id": 10018
}
},
{
"group": {
"name": "版本",
"id": 10002
},
"value": {
"name": "全网通4+64G",
"id": 10021
}
},
{
"group": {
"name": "套装",
"id": 10004
},
"value": {
"name": "官方标配",
"id": 10022
}
}
],
"spec_value_ids": [
10018,
10021,
10022
]
},
"goods_price": "1399.00",
"total_num": 1,
"goods_sku_id": "10018_10021_10022",
"total_price": "1399.00",
"grade_ratio": 0,
"grade_goods_price": 0,
"grade_total_money": 0,
"coupon_money": 0,
"max_points_num": 0,
"pointsNum": 0,
"points_money": 0,
"total_pay_price": "1399.00",
"expressPrice": 0,
"points_bonus": 0
},
{
"goods_id": 10009,
"goods_name": "荣耀9i 4GB+64GB 幻夜黑 移动联通电信4G全面屏手机 双卡双待",
"goods_no": "",
"video_id": 0,
"video_cover_id": 0,
"selling_point": "",
"spec_type": 20,
"goods_price_min": "1399.00",
"goods_price_max": "1499.00",
"line_price_min": "0.00",
"line_price_max": "0.00",
"stock_total": 571,
"content": "<p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20842\/114\/772658709\/51280\/97cce0f1\/5b175981N7290ead0.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20566\/33\/742373676\/46768\/fb7a4cc4\/5b17599cNea911d0e.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t21448\/12\/771050934\/55571\/1207e815\/5b1759ddN64ebf417.jpg\"\/><\/p>",
"delivery_id": 10001,
"is_points_gift": 1,
"is_points_discount": 1,
"is_alone_points_discount": 0,
"points_discount_config": "",
"is_enable_grade": 1,
"is_alone_grade": 0,
"alone_grade_equity": [],
"status": 10,
"goods_images": [
{
"file_id": 10080,
"group_id": 0,
"channel": 10,
"storage": "qiniu",
"domain": "http:\/\/static.yoshop.xany6.com",
"file_type": 10,
"file_name": "2018071717370507f183424.jpg",
"file_path": "2018071717370507f183424.jpg",
"file_size": 186872,
"file_ext": "jpg",
"cover": "",
"uploader_id": 0,
"is_recycle": 0,
"is_delete": 0,
"update_time": "2021-03-01 08:00:00",
"preview_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"external_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg"
}
],
"goods_image": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"goods_sales": 0,
"is_user_grade": false,
"skuInfo": {
"id": 10169,
"goods_sku_id": "10018_10021_10022",
"goods_id": 10009,
"image_id": 0,
"goods_sku_no": "",
"goods_price": "1399.00",
"line_price": "0.00",
"stock_num": 97,
"goods_weight": 0.14,
"goods_props": [
{
"group": {
"name": "颜色",
"id": 10001
},
"value": {
"name": "幻夜黑",
"id": 10018
}
},
{
"group": {
"name": "版本",
"id": 10002
},
"value": {
"name": "全网通4+64G",
"id": 10021
}
},
{
"group": {
"name": "套装",
"id": 10004
},
"value": {
"name": "官方标配",
"id": 10022
}
}
],
"spec_value_ids": [
10018,
10021,
10022
]
},
"goods_price": "1399.00",
"total_num": 1,
"goods_sku_id": "10018_10021_10022",
"total_price": "1399.00",
"grade_ratio": 0,
"grade_goods_price": 0,
"grade_total_money": 0,
"coupon_money": 0,
"max_points_num": 0,
"pointsNum": 0,
"points_money": 0,
"total_pay_price": "1399.00",
"expressPrice": 0,
"points_bonus": 0
},
{
"goods_id": 10009,
"goods_name": "荣耀9i 4GB+64GB 幻夜黑 移动联通电信4G全面屏手机 双卡双待",
"goods_no": "",
"video_id": 0,
"video_cover_id": 0,
"selling_point": "",
"spec_type": 20,
"goods_price_min": "1399.00",
"goods_price_max": "1499.00",
"line_price_min": "0.00",
"line_price_max": "0.00",
"stock_total": 571,
"content": "<p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20842\/114\/772658709\/51280\/97cce0f1\/5b175981N7290ead0.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20566\/33\/742373676\/46768\/fb7a4cc4\/5b17599cNea911d0e.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t21448\/12\/771050934\/55571\/1207e815\/5b1759ddN64ebf417.jpg\"\/><\/p>",
"delivery_id": 10001,
"is_points_gift": 1,
"is_points_discount": 1,
"is_alone_points_discount": 0,
"points_discount_config": "",
"is_enable_grade": 1,
"is_alone_grade": 0,
"alone_grade_equity": [],
"status": 10,
"goods_images": [
{
"file_id": 10080,
"group_id": 0,
"channel": 10,
"storage": "qiniu",
"domain": "http:\/\/static.yoshop.xany6.com",
"file_type": 10,
"file_name": "2018071717370507f183424.jpg",
"file_path": "2018071717370507f183424.jpg",
"file_size": 186872,
"file_ext": "jpg",
"cover": "",
"uploader_id": 0,
"is_recycle": 0,
"is_delete": 0,
"update_time": "2021-03-01 08:00:00",
"preview_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"external_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg"
}
],
"goods_image": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"goods_sales": 0,
"is_user_grade": false,
"skuInfo": {
"id": 10169,
"goods_sku_id": "10018_10021_10022",
"goods_id": 10009,
"image_id": 0,
"goods_sku_no": "",
"goods_price": "1399.00",
"line_price": "0.00",
"stock_num": 97,
"goods_weight": 0.14,
"goods_props": [
{
"group": {
"name": "颜色",
"id": 10001
},
"value": {
"name": "幻夜黑",
"id": 10018
}
},
{
"group": {
"name": "版本",
"id": 10002
},
"value": {
"name": "全网通4+64G",
"id": 10021
}
},
{
"group": {
"name": "套装",
"id": 10004
},
"value": {
"name": "官方标配",
"id": 10022
}
}
],
"spec_value_ids": [
10018,
10021,
10022
]
},
"goods_price": "1399.00",
"total_num": 1,
"goods_sku_id": "10018_10021_10022",
"total_price": "1399.00",
"grade_ratio": 0,
"grade_goods_price": 0,
"grade_total_money": 0,
"coupon_money": 0,
"max_points_num": 0,
"pointsNum": 0,
"points_money": 0,
"total_pay_price": "1399.00",
"expressPrice": 0,
"points_bonus": 0
},
{
"goods_id": 10009,
"goods_name": "荣耀9i 4GB+64GB 幻夜黑 移动联通电信4G全面屏手机 双卡双待",
"goods_no": "",
"video_id": 0,
"video_cover_id": 0,
"selling_point": "",
"spec_type": 20,
"goods_price_min": "1399.00",
"goods_price_max": "1499.00",
"line_price_min": "0.00",
"line_price_max": "0.00",
"stock_total": 571,
"content": "<p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20842\/114\/772658709\/51280\/97cce0f1\/5b175981N7290ead0.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20566\/33\/742373676\/46768\/fb7a4cc4\/5b17599cNea911d0e.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t21448\/12\/771050934\/55571\/1207e815\/5b1759ddN64ebf417.jpg\"\/><\/p>",
"delivery_id": 10001,
"is_points_gift": 1,
"is_points_discount": 1,
"is_alone_points_discount": 0,
"points_discount_config": "",
"is_enable_grade": 1,
"is_alone_grade": 0,
"alone_grade_equity": [],
"status": 10,
"goods_images": [
{
"file_id": 10080,
"group_id": 0,
"channel": 10,
"storage": "qiniu",
"domain": "http:\/\/static.yoshop.xany6.com",
"file_type": 10,
"file_name": "2018071717370507f183424.jpg",
"file_path": "2018071717370507f183424.jpg",
"file_size": 186872,
"file_ext": "jpg",
"cover": "",
"uploader_id": 0,
"is_recycle": 0,
"is_delete": 0,
"update_time": "2021-03-01 08:00:00",
"preview_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"external_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg"
}
],
"goods_image": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"goods_sales": 0,
"is_user_grade": false,
"skuInfo": {
"id": 10169,
"goods_sku_id": "10018_10021_10022",
"goods_id": 10009,
"image_id": 0,
"goods_sku_no": "",
"goods_price": "1399.00",
"line_price": "0.00",
"stock_num": 97,
"goods_weight": 0.14,
"goods_props": [
{
"group": {
"name": "颜色",
"id": 10001
},
"value": {
"name": "幻夜黑",
"id": 10018
}
},
{
"group": {
"name": "版本",
"id": 10002
},
"value": {
"name": "全网通4+64G",
"id": 10021
}
},
{
"group": {
"name": "套装",
"id": 10004
},
"value": {
"name": "官方标配",
"id": 10022
}
}
],
"spec_value_ids": [
10018,
10021,
10022
]
},
"goods_price": "1399.00",
"total_num": 1,
"goods_sku_id": "10018_10021_10022",
"total_price": "1399.00",
"grade_ratio": 0,
"grade_goods_price": 0,
"grade_total_money": 0,
"coupon_money": 0,
"max_points_num": 0,
"pointsNum": 0,
"points_money": 0,
"total_pay_price": "1399.00",
"expressPrice": 0,
"points_bonus": 0
},
{
"goods_id": 10009,
"goods_name": "荣耀9i 4GB+64GB 幻夜黑 移动联通电信4G全面屏手机 双卡双待",
"goods_no": "",
"video_id": 0,
"video_cover_id": 0,
"selling_point": "",
"spec_type": 20,
"goods_price_min": "1399.00",
"goods_price_max": "1499.00",
"line_price_min": "0.00",
"line_price_max": "0.00",
"stock_total": 571,
"content": "<p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20842\/114\/772658709\/51280\/97cce0f1\/5b175981N7290ead0.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t20566\/33\/742373676\/46768\/fb7a4cc4\/5b17599cNea911d0e.jpg\"\/><\/p><p><img src=\"https:\/\/m.360buyimg.com\/mobilecms\/jfs\/t21448\/12\/771050934\/55571\/1207e815\/5b1759ddN64ebf417.jpg\"\/><\/p>",
"delivery_id": 10001,
"is_points_gift": 1,
"is_points_discount": 1,
"is_alone_points_discount": 0,
"points_discount_config": "",
"is_enable_grade": 1,
"is_alone_grade": 0,
"alone_grade_equity": [],
"status": 10,
"goods_images": [
{
"file_id": 10080,
"group_id": 0,
"channel": 10,
"storage": "qiniu",
"domain": "http:\/\/static.yoshop.xany6.com",
"file_type": 10,
"file_name": "2018071717370507f183424.jpg",
"file_path": "2018071717370507f183424.jpg",
"file_size": 186872,
"file_ext": "jpg",
"cover": "",
"uploader_id": 0,
"is_recycle": 0,
"is_delete": 0,
"update_time": "2021-03-01 08:00:00",
"preview_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"external_url": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg"
}
],
"goods_image": "http:\/\/static.yoshop.xany6.com\/2018071717370507f183424.jpg",
"goods_sales": 0,
"is_user_grade": false,
"skuInfo": {
"id": 10169,
"goods_sku_id": "10018_10021_10022",
"goods_id": 10009,
"image_id": 0,
"goods_sku_no": "",
"goods_price": "1399.00",
"line_price": "0.00",
"stock_num": 97,
"goods_weight": 0.14,
"goods_props": [
{
"group": {
"name": "颜色",
"id": 10001
},
"value": {
"name": "幻夜黑",
"id": 10018
}
},
{
"group": {
"name": "版本",
"id": 10002
},
"value": {
"name": "全网通4+64G",
"id": 10021
}
},
{
"group": {
"name": "套装",
"id": 10004
},
"value": {
"name": "官方标配",
"id": 10022
}
}
],
"spec_value_ids": [
10018,
10021,
10022
]
},
"goods_price": "1399.00",
"total_num": 1,
"goods_sku_id": "10018_10021_10022",
"total_price": "1399.00",
"grade_ratio": 0,
"grade_goods_price": 0,
"grade_total_money": 0,
"coupon_money": 0,
"max_points_num": 0,
"pointsNum": 0,
"points_money": 0,
"total_pay_price": "1399.00",
"expressPrice": 0,
"points_bonus": 0
}
],
"orderTotalNum": 2,

@ -109,6 +109,18 @@
"navigationStyle" : "custom",
"navigationBarTitleText": "uni-app"
}
},
{
"path": "pages/account/message/group",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "pages/account/message/list",
"style": {
"navigationBarTitleText": "uni-app"
}
}
],
"tabBar": {

@ -1,16 +1,16 @@
<template>
<view class="container">
<!-- 页面顶部 -->
<view class="head">
<view class="head--title">
<UiPageHeader :back="true">
<template slot="title">
<text>购物车</text>
<text v-if="total">({{total}})</text>
</view>
<block v-if="list.length">
</template>
<template slot="operation" v-if="list.length">
<view v-if="mode == 'normal'" class="head--edit" @click="handleToggleMode"></view>
<view v-else class="head--finsh" @click="handleToggleMode"></view>
</block>
</view>
</template>
</UiPageHeader>
<!-- 购物车商品列表 -->
<view v-if="list.length" class="cart-list">
<view class="cart-item" v-for="(item, index) in list" :key="index"
@ -89,13 +89,15 @@
import BsEmpty from '@/components/BsEmpty.vue';
import BsGoodsGroup from '@/components/BsGoodsGroup.vue';
import cartData from '@/mock/cart.json'
import UiPageHeader from '../../components/UiPageHeader.vue';
const CartIdsIndex = 'CartIds'
export default {
components: {
BsEmpty,
BsGoodsGroup
BsGoodsGroup,
UiPageHeader
},
data() {
return {
@ -294,10 +296,10 @@
justify-content: space-between;
align-items: center;
padding: 0 30rpx;
background-color: #fff;
position: sticky;
top: var(--window-top);
z-index: 999;
background-color: #fff;
position: sticky;
top: var(--window-top);
z-index: 999;
&--totla{
font-size: 36rpx;
color: #333;
@ -321,8 +323,8 @@
display: flex;
align-items: center;
padding: 30rpx 0;
margin: 0 auto 24rpx auto;
border-bottom: 1px solid #eee;
margin: 0 auto 24rpx auto;
border-bottom: 1px solid #eee;
&--radio {
width: 56rpx;
height: 80rpx;

@ -1,653 +1,145 @@
<!--
* @Author: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
* @LastEditTime: 2022-03-26 09:38:31
* @Description: file content
-->
<template>
<view v-if="!isFirstload" class="container">
<!-- 页面头部 -->
<view class="main-header"
:style="{ height: $platform == 'H5' ? '240rpx' : '320rpx', paddingTop: $platform == 'H5' ? '0' : '50rpx' }">
<image class="bg-image" src="/static/background/user-header.png" mode="scaleToFill"></image>
<!-- 用户信息 -->
<view v-if="isLogin" class="user-info">
<view class="user-avatar">
<!-- <avatar-image :url="userInfo.avatar_url" :width="100" /> -->
</view>
<view class="user-content">
<!-- 会员昵称 -->
<view class="nick-name oneline-hide">{{ userInfo.nick_name }}</view>
<!-- 会员等级 -->
<view v-if="userInfo.grade_id > 0 && userInfo.grade" class="user-grade">
<view class="user-grade_icon">
<image class="image"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAA0lBMVEUAAAD/tjL/tzH/uDP/uC7/tjH/tzH/tzL/tTH+tTL+tjP/tDD/tTD+tzD/tjL/szD/uDH/tjL/tjL+tjD/tjT/szb/tzL/tTL+uTH+tjL/tjL/tjL/tTT/tjL/tjL+tjH/uTL/vDD/tjL/tjH/tzL9uS//tTL/nBr/sS7/tjH/ujL/szD/uTv+rzf/tzL+tzH+vDP+uzL+tjP+ry7+tDL9ki/7szf/sEX/tTL/tjL+tjL/tTH/tTT/tzH/tzL/tjP/sTX/uTP/wzX+rTn/vDX9vC8m8ckhAAAAOXRSTlMAlnAMB/vjxKWGMh0S6drMiVxPRkEY9PLy0ru0sKagmo5+dGtgVCMgBP716eXWyMGxqJGRe2o5KSmFNjaYAAABP0lEQVQ4y8XS13KDMBAF0AWDDe4t7r3ETu9lVxJgJ/n/X8rKAzHG5TE+Twz3zki7I/g/KXdghIbGJewrU4yzn08Ebgl6TuZzzuOC6W5es3HX6qsSz3NFShRU0MpucytDmOSpu3yULx3CA9RD1HjVedc0jSjqm6ZzhUjDsFDQhSp/OKj5GQvg0+ZCOixsbtDLAeTTOm/yGi8GyIphIVsgH737FEDV44LJa88IRKK/SetrwT9G/GUIr6vXjoy4GXn7+RboVXnghuSjaoGecwQxL2su3CwAKlO+QFoqxI4FMctHQhQd2OhxTu184jWUlI+rMTBTn1/IQcJHQ6GQdZ7pWiDaNdhTt330efISeiqYwQEzQpTlsURJLhzkEmpCPsERfeIUVyXr6MNuIyp5uziW6xURtt7hhGwzmMNJExfO4Bd9X0ZPqAxdNwAAAABJRU5ErkJggg==">
</image>
</view>
<view class="user-grade_name">
<text>{{ userInfo.grade.name }}</text>
</view>
</view>
<!-- 会员无等级时显示手机号 -->
<view v-else class="mobile">{{ userInfo.mobile }}</view>
</view>
</view>
<!-- 未登录 -->
<view v-else class="user-info" @click="handleLogin">
<view class="user-avatar">
<avatar-image :width="100" />
</view>
<view class="user-content">
<view class="nick-name">未登录</view>
<view class="login-tips">点击登录账号</view>
</view>
</view>
</view>
<!-- 我的钱包 -->
<view class="my-asset">
<view class="asset-left flex-box dis-flex flex-x-around">
<view class="asset-left-item" @click="onTargetWallet">
<view class="item-value dis-flex flex-x-center">
<text>{{ isLogin ? assets.balance : '--' }}</text>
</view>
<view class="item-name dis-flex flex-x-center">
<text>账户余额</text>
</view>
</view>
<view class="asset-left-item" @click="onTargetPoints">
<view class="item-value dis-flex flex-x-center">
<text>{{ isLogin ? assets.points : '--' }}</text>
</view>
<view class="item-name dis-flex flex-x-center">
<text>{{ setting[SettingKeyEnum.POINTS.value].points_name }}</text>
</view>
</view>
<view class="asset-left-item" @click="onTargetMyCoupon">
<view class="item-value dis-flex flex-x-center">
<text>{{ isLogin ? assets.coupon : '--' }}</text>
</view>
<view class="item-name dis-flex flex-x-center">
<text>优惠券</text>
</view>
</view>
</view>
<view class="asset-right">
<view class="asset-right-item" @click="onTargetWallet">
<view class="item-icon dis-flex flex-x-center">
<text class="iconfont icon-qianbao"></text>
</view>
<view class="item-name dis-flex flex-x-center">
<text>我的钱包</text>
</view>
</view>
</view>
</view>
<!-- 订单操作 -->
<view class="order-navbar">
<view class="order-navbar-item" v-for="(item, index) in orderNavbar" :key="index" @click="onTargetOrder(item)">
<view class="item-icon">
<text class="iconfont" :class="[`icon-${item.icon}`]"></text>
</view>
<view class="item-name">{{ item.name }}</view>
<view class="item-badge" v-if="item.count && item.count > 0">
<text v-if="item.count <= 99" class="text">{{ item.count }}</text>
<text v-else class="text">99+</text>
</view>
</view>
</view>
<!-- 我的服务 -->
<view class="my-service">
<view class="service-title">我的服务</view>
<view class="service-content clearfix">
<block v-for="(item, index) in service" :key="index">
<view v-if="item.type == 'link'" class="service-item" @click="handleService(item)">
<view class="item-icon">
<text class="iconfont" :class="[`icon-${item.icon}`]"></text>
</view>
<view class="item-name">{{ item.name }}</view>
<view class="item-badge" v-if="item.count && item.count > 0">
<text v-if="item.count <= 99" class="text">{{ item.count }}</text>
<text v-else class="text">99+</text>
</view>
</view>
<view v-if="item.type == 'button' && $platform == 'MP-WEIXIN'" class="service-item">
<button class="btn-normal" :open-type="item.openType">
<view class="item-icon">
<text class="iconfont" :class="[`icon-${item.icon}`]"></text>
</view>
<view class="item-name">{{ item.name }}</view>
</button>
</view>
</block>
</view>
</view>
<!-- 退出登录 -->
<view v-if="isLogin" class="my-logout">
<view class="logout-btn" @click="handleLogout()">
<text>退出登录</text>
</view>
</view>
</view>
<view>
<view class="header">
<u-badge class="header--badge" max="99" :value="9"></u-badge>
<image class="header--msg" src="@/static/account/xx.png" />
</view>
<u-cell :isLink="true" arrow-direction="right" :clickable="false" title="昵称" label="第一个青春是上帝给的..." :border="false">
<image slot="icon" class="head-img" src="@/static/account/tx.png" shape="circle" />
</u-cell>
<view class="order">
<view class="order--title">
<text>我的订单</text>
<text class="order--title-more">查看更多</text>
</view>
<view class="order-tabs">
<view class="order-tabs--item">
<u-badge class="item-badge" max="99" :value="9"></u-badge>
<image class="item-icon" src="@/static/account/fk.png"/>
<view>待付款</view>
</view>
<view class="order-tabs--item">
<u-badge class="item-badge" max="99" :value="9"></u-badge>
<image class="item-icon" src="@/static/account/fh.png"/>
<view>待发货</view>
</view>
<view class="order-tabs--item">
<u-badge class="item-badge" max="99" :value="9"></u-badge>
<image class="item-icon" src="@/static/account/sh.png"/>
<view>待收货</view>
</view>
</view>
</view>
<view class="cell">
<u-cell class="cell--item" :isLink="true" arrow-direction="right" title="退货/售后">
<image slot="icon" class="cell--icon" src="@/static/account/tk.png" shape="circle" />
</u-cell>
<u-cell class="cell--item" :isLink="true" arrow-direction="right" title="收货地址">
<image slot="icon" class="cell--icon" src="@/static/common/dz.png" shape="circle" />
</u-cell>
<u-cell class="cell--item" :isLink="true" arrow-direction="right" title="联系客服">
<image slot="icon" class="cell--icon" src="@/static/account/kf.png" shape="circle" />
</u-cell>
<u-cell class="cell--item" :isLink="true" arrow-direction="right" title="设置">
<image slot="icon" class="cell--icon" src="@/static/account/sz.png" shape="circle" />
</u-cell>
</view>
</view>
</template>
<script>
// import store from '@/store'
// import AvatarImage from '@/components/avatar-image'
// import { setCartTabBadge } from '@/core/app'
import SettingKeyEnum from '@/common/enum/setting/Key'
// import SettingModel from '@/common/model/Setting'
// import * as UserApi from '@/api/user'
// import * as OrderApi from '@/api/order'
// import { checkLogin } from '@/core/app'
import userInfoData from '@/mock/userInfo.json';
import addressData from '@/mock/address.json';
import countData from '@/mock/todoCounts.json';
import sessingData from '@/mock/setting.json';
//
const orderNavbar = [
{ id: 'all', name: '全部订单', icon: 'qpdingdan' },
{ id: 'payment', name: '待支付', icon: 'daifukuan', count: 0 },
{ id: 'delivery', name: '待发货', icon: 'daifahuo', count: 0 },
{ id: 'received', name: '待收货', icon: 'daishouhuo', count: 0 },
]
/**
* 我的服务
* id: 标识; name: 标题名称; icon: 图标; type 类型(link和button); url: 跳转的链接
*/
const service = [
{ id: 'address', name: '收货地址', icon: 'shouhuodizhi', type: 'link', url: 'pages/address/index' },
{ id: 'coupon', name: '领券中心', icon: 'lingquan', type: 'link', url: 'pages/coupon/index' },
{ id: 'myCoupon', name: '优惠券', icon: 'youhuiquan', type: 'link', url: 'pages/my-coupon/index' },
{ id: 'help', name: '我的帮助', icon: 'bangzhu', type: 'link', url: 'pages/help/index' },
{ id: 'contact', name: '在线客服', icon: 'kefu', type: 'button', openType: 'contact' },
{ id: 'points', name: '我的积分', icon: 'jifen', type: 'link', url: 'pages/points/log' },
{ id: 'refund', name: '退换/售后', icon: 'shouhou', type: 'link', url: 'pages/refund/index', count: 0 },
]
export default {
components: {
// AvatarImage
},
data() {
return {
//
SettingKeyEnum,
// (,view$platform)
$platform: this.$platform,
//
isLoading: true,
//
isFirstload: true,
//
isLogin: false,
//
setting: {},
//
userInfo: {},
//
assets: { balance: '--', points: '--', coupon: '--' },
//
service,
//
orderNavbar,
//
todoCounts: { payment: 0, deliver: 0, received: 0 }
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {
this.onRefreshPage()
},
methods: {
//
onRefreshPage() {
//
// setCartTabBadge()
//
this.isLogin = true //checkLogin()
//
this.getPageData()
},
//
getPageData(callback) {
const app = this
app.isLoading = true;
app.getSetting();
app.getUserInfo();
app.getUserAssets();
app.getTodoCounts();
app.isFirstload = false
// Promise.all([app.getSetting(), app.getUserInfo(), app.getUserAssets(), app.getTodoCounts()])
// .then(result => {
// console.log('----')
// app.isFirstload = false
// //
app.initService()
// //
app.initOrderTabbar()
// //
callback && callback()
// })
// .catch(err => console.log('catch', err))
// .finally(() => app.isLoading = false)
},
//
initService() {
const app = this
const newService = []
service.forEach(item => {
if (item.id === 'points') {
item.name = '我的' + app.setting[SettingKeyEnum.POINTS.value].points_name
}
//
if (item.count != undefined) {
item.count = app.todoCounts[item.id]
}
newService.push(item)
})
app.service = newService
},
//
initOrderTabbar() {
const app = this
const newOrderNavbar = []
orderNavbar.forEach(item => {
if (item.count != undefined) {
item.count = app.todoCounts[item.id]
}
newOrderNavbar.push(item)
})
app.orderNavbar = newOrderNavbar
},
//
getSetting() {
const app = this
app.setting = sessingData.data.setting
// return new Promise((resolve, reject) => {
// SettingModel.data()
// .then(setting => {
// app.setting = setting
// resolve(setting)
// }).catch(reject)
// })
},
//
getUserInfo() {
const app = this
app.userInfo = userInfoData.data.userInfo;
// return new Promise((resolve, reject) => {
// !app.isLogin ? resolve(null) :
// UserApi.info({}, { load: app.isFirstload })
// .then(result => {
// app.userInfo = result.data.userInfo
// resolve(app.userInfo)
// })
// .catch(err => {
// if (err.result && err.result.status == 401) {
// app.isLogin = false
// resolve(null)
// } else {
// reject(err)
// }
// })
// })
},
//
getUserAssets() {
const app = this
app.assets = addressData.data.assets;
// return new Promise((resolve, reject) => {
// !app.isLogin ? resolve(null) :
// UserApi.assets({}, { load: app.isFirstload })
// .then(result => {
// app.assets = result.data.assets
// resolve(app.assets)
// })
// .catch(err => {
// if (err.result && err.result.status == 401) {
// app.isLogin = false
// resolve(null)
// } else {
// reject(err)
// }
// })
// })
},
//
getTodoCounts() {
const app = this
app.todoCounts = countData.data.counts
// return new Promise((resolve, reject) => {
// !app.isLogin ? resolve(null) :
// OrderApi.todoCounts({}, { load: app.isFirstload })
// .then(result => {
// app.todoCounts = result.data.counts
// resolve(app.todoCounts)
// })
// .catch(err => {
// if (err.result && err.result.status == 401) {
// app.isLogin = false
// resolve(null)
// } else {
// reject(err)
// }
// })
// })
},
//
handleLogin() {
!this.isLogin && this.$navTo('pages/login/index')
},
// 退
handleLogout() {
const app = this
uni.showModal({
title: '友情提示',
content: '您确定要退出登录吗?',
success(res) {
if (res.confirm) {
// store.dispatch('Logout', {})
// .then(result => app.onRefreshPage())
}
}
})
},
//
onTargetWallet() {
this.$navTo('pages/wallet/index')
},
//
onTargetOrder(item) {
this.$navTo('pages/order/index', { dataType: item.id })
},
//
onTargetPoints() {
this.$navTo('pages/points/log')
},
//
onTargetMyCoupon() {
this.$navTo('pages/my-coupon/index')
},
//
handleService({ url }) {
this.$navTo(url)
},
},
/**
* 下拉刷新
*/
onPullDownRefresh() {
//
this.getPageData(() => {
uni.stopPullDownRefresh()
})
},
}
</script>
<style lang="scss" scoped>
//
.main-header {
background-color: #fff;
// background-image: url('/static/background/user-header.png');
position: relative;
width: 100%;
height: 280rpx;
background-size: 100% 100%;
overflow: hidden;
display: flex;
align-items: center;
// padding-top: 40rpx;
padding-left: 30rpx;
.bg-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
}
.user-info {
display: flex;
height: 100rpx;
z-index: 1;
.user-content {
display: flex;
flex-direction: column;
justify-content: center;
margin-left: 30rpx;
color: #c59a46;
.nick-name {
font-size: 32rpx;
font-weight: bold;
max-width: 270rpx;
}
.mobile {
margin-top: 15rpx;
font-size: 26rpx;
}
.user-grade {
align-self: baseline;
display: flex;
align-items: center;
background: #3c3c3c;
margin-top: 12rpx;
border-radius: 10rpx;
padding: 4rpx 12rpx;
.user-grade_icon .image {
display: block;
width: 32rpx;
height: 32rpx;
}
.user-grade_name {
margin-left: 5rpx;
font-size: 24rpx;
color: #EEE0C3;
}
}
.login-tips {
margin-top: 12rpx;
font-size: 28rpx;
}
}
}
}
//
.item-badge {
position: absolute;
top: 0;
right: 55rpx;
background: #fa2209;
color: #fff;
border-radius: 100%;
min-width: 38rpx;
height: 38rpx;
display: flex;
justify-content: center;
align-items: center;
padding: 1rpx;
font-size: 22rpx;
}
//
.my-asset {
display: flex;
background: #fff;
padding: 40rpx 0;
.asset-right {
width: 200rpx;
border-left: 1rpx solid #eee;
}
.asset-right-item {
text-align: center;
color: #545454;
.item-icon {
font-size: 40rpx;
}
.item-name {
margin-top: 10rpx;
}
.item-name text {
font-size: 25rpx;
}
}
.asset-left-item {
text-align: center;
color: #666;
padding: 0 42rpx;
.item-value {
font-size: 32rpx;
color: red;
}
.item-name {
margin-top: 6rpx;
}
.item-name {
font-size: 25rpx;
}
}
}
//
.order-navbar {
display: flex;
margin: 20rpx auto 20rpx auto;
padding: 20rpx 0;
width: 94%;
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
font-size: 30rpx;
border-radius: 5rpx;
background: #fff;
&-item {
position: relative;
width: 25%;
.item-icon {
text-align: center;
margin: 0 auto;
padding: 10rpx 0;
color: #545454;
font-size: 40rpx;
}
.item-name {
font-size: 26rpx;
color: #545454;
text-align: center;
margin-right: 10rpx;
}
}
}
//
.my-service {
margin: 22rpx auto 22rpx auto;
padding: 20rpx 0;
width: 94%;
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
border-radius: 5rpx;
background: #fff;
.service-title {
padding-left: 20rpx;
margin-bottom: 30rpx;
font-size: 28rpx;
}
.service-content {
// margin-bottom: -30rpx;
.service-item {
position: relative;
width: 25%;
float: left;
margin-bottom: 30rpx;
.item-icon {
text-align: center;
margin: 0 auto;
padding: 10rpx 0;
color: #ff3800;
font-size: 40rpx;
}
.item-name {
font-size: 26rpx;
color: #545454;
text-align: center;
margin-right: 10rpx;
}
}
}
}
// 退
.my-logout {
display: flex;
justify-content: center;
margin-top: 50rpx;
.logout-btn {
width: 50%;
margin: 0 auto;
font-size: 26rpx;
color: #616161;
border-radius: 20rpx;
border: 1px solid #dcdcdc;
padding: 14rpx 0;
text-align: center;
}
}
page{
background: url('@/static/account/bg.png') no-repeat top left #F8F8F8;
background-size: 100%;
}
.header{
height: 88rpx;
display: flex;
justify-content: end;
align-items: center;
padding: 0 40rpx;
position: relative;
&--msg{
width: 34rpx;
height: 40rpx
}
&--badge{
position: absolute;
right: 30rpx;
top: 10rpx;
z-index: 99;
}
}
.head-img{
width: 120rpx;
height: 120rpx;
border-radius: 50%;
margin-right: 30rpx;
}
.order{
width: 630rpx;
height: 200rpx;
background: #fff;
border-radius: 16rpx;
margin: 40rpx auto;
padding: 30rpx;
box-shadow: 0 0 13rpx 1px rgba(0, 0, 0, .05);
&--title{
display: flex;
justify-content: space-between;
align-items: center;
background: url('@/static/common/arrow.png') no-repeat center right;
background-size: 10rpx;
font-size: 28rpx;
color: #333;
margin: 10rpx 0 46rpx;
}
&--title-more{
padding-right: 20rpx;
font-size: 24rpx;
color: #999;
}
&-tabs{
display: flex;
justify-content: space-around;
&--item{
text-align: center;
font-size: 24rpx;
color: #666;
position: relative;
.item-icon{
width: 60rpx;
height: 60rpx;
}
.item-badge{
position: absolute;
top: -10rpx;
right: 0;
z-index: 99;
}
}
}
}
.cell{
margin: 30rpx;
border-radius: 16rpx;
background: #fff;
padding: 0 40rpx;
&--icon{
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
}
</style>

@ -2,19 +2,82 @@
* @Author: ch
* @Date: 2022-03-22 16:13:00
* @LastEditors: ch
* @LastEditTime: 2022-03-22 16:17:04
* @LastEditTime: 2022-03-26 14:25:15
* @Description: file content
-->
<template>
<view>
<BsEmpty tips="暂时还没有消息哦~" :icon="require('@/static/message/empty.png')" />
<view class="msgItem" v-for="item in 5" :key="item">
<image class="msgItem--headImg" src="@/static/account/tx.png"></image>
<view class="msgItem--con">
<view>
<text class="msgItem--title">马士兵严选你的包裹已经到达菜鸟驿站</text>
<text class="msgItem--text">你的包裹已经到达菜鸟驿站你的包裹已经到达菜鸟驿站你的包裹已经到达菜鸟驿站你的包裹已经到达菜鸟驿站</text>
</view>
<view class="msgItem--right">
<text class="msgItem--time">03-03 24:00</text>
<u-badge class="msgItem--badge" value="99"></u-badge>
</view>
</view>
</view>
</view>
</template>
<script>
import BsEmpty from '../../../components/BsEmpty.vue';
export default {
components: { BsEmpty }
}
</script>
<style lang="scss" scoped>
.msgItem{
display: flex;
padding: 40rpx 0 0 40rpx;
&--headImg{
width: 106rpx;
height: 106rpx;
margin-right: 30rpx;
}
&--con{
flex: 1;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #eee;
padding: 0 40rpx 40rpx 0;
}
&--title{
width: 350rpx;
display: block;
font-size: 32rpx;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
margin-bottom: 20rpx;
}
&--text{
width: 350rpx;
font-size: 28rpx;
line-height: 36rpx;
color: #999;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
&--right{
text-align: right;
}
&--time{
font-size: 24rpx;
color: #999;
display: block;
height: 36rpx;
line-height: 36rpx;
margin-bottom: 20rpx;
}
&--badge{
display: inline-block;
}
}
</style>

@ -0,0 +1,60 @@
<!--
* @Author: ch
* @Date: 2022-03-26 14:32:03
* @LastEditors: ch
* @LastEditTime: 2022-03-26 15:03:18
* @Description: file content
-->
<template>
<view>
<view class="msgItem" v-for="item in 5" :key="item">
<view class="msgItem--title">
<text>退款消息</text>
<text class="msgItem--time">03-23 00:00</text>
</view>
<view class="msgItem--con">
<image class="msgItem--img" src="@/static/testImg/3.png" mode="widthFix"/>
<view class="msgItem--desc">马士兵新款多线程与高并发专项训练突破课程书籍项训练突破课程书籍项训练突破</view>
</view>
</view>
</view>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
.msgItem{
padding: 40rpx 0 0 40rpx;
&--title{
display: flex;
justify-content: space-between;
align-items: center;
padding-right: 40rpx;
font-size: 32rpx;
color: #333;
}
&--time{
font-size: 24rpx;
color: #999;
}
&--con{
display: flex;
border-bottom: 1px solid #eee;
padding: 40rpx 0;
}
&--img{
width: 140rpx;
height: 140rpx;
border-radius: 12rpx;
margin-right: 40rpx;
}
&--desc{
width: 455rpx;
font-size: 28rpx;
line-height: 39rpx;
color: #666;
}
}
</style>

@ -2,17 +2,212 @@
* @Author: ch
* @Date: 2022-03-22 10:58:24
* @LastEditors: ch
* @LastEditTime: 2022-03-22 11:15:01
* @LastEditTime: 2022-03-26 14:27:34
* @Description: file content
-->
<template>
<view></view>
<view>
<view class="tabs">
<text class="tabs__active">全部</text>
<text>待付款</text>
<text>待发货</text>
<text>待收货</text>
<text>待评价</text>
</view>
<BsEmpty tips="暂无订单记录呢~" :icon="require('@/static/order/empty.png')">
<ui-button slot="btn" type="line">去逛逛</ui-button>
</BsEmpty>
<view class="orders" v-for="item in 10" :key="item">
<view class="orders--title">
<text class="orders--name">官方自营</text>
<text class="orders--status" :class="item % 2 == 0 && 'orders--status__warn'">待收货</text>
</view>
<view class="orders--item" v-for="i in 2" :key="i">
<image class="orders--item-image" mode="widthFix" src="http://static.yoshop.xany6.com/2018071717370507f183424.jpg" />
<view >
<view class="orders--item-con">
<text class="orders--item-title">商品标题商品标题商品标题商品标题商品标题</text>
<text class="orders--item-pirce">1922.00</text>
</view>
<view class="orders--item-desc">
<view>
<text class="orders--item-desc-item">试听课</text>
<text class="orders--item-desc-item">试课</text>
<text class="orders--item-desc-item">试听</text>
<text class="orders--item-desc-item">听课</text>
</view>
<text class="orders--item-num">x1</text>
</view>
</view>
</view>
<view class="orders--total">
<text>合计</text>
<text class="orders--total__amount">1000.00</text>
<text class="orders--total__pay">应付</text>
<text class="orders--total__amount orders--total__pay">1000.00</text>
</view>
<view class="orders--footer">
<button class="orders--footer-btn">查看物流</button>
<button class="orders--footer-btn orders--footer-btn__red">确认收货</button>
</view>
</view>
</view>
</template>
<script>
import BsEmpty from '../../../components/BsEmpty.vue'
import UiButton from '../../../components/UiButton.vue'
export default {
components: { BsEmpty, UiButton },
}
</script>
<style lang="scss" scoped>
page{
background: #f8f8f8;
overflow: hidden;
}
.tabs{
height: 100rpx;
background: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 40rpx;
font-size: 28rpx;
color: #666;
&__active{
color: #FF875B;
position: relative;
&::after{
display: block;
content: '';
height: 4rpx;
background: #FF875B;
border-radius: 4rpx;
position: absolute;
bottom: -20rpx;
left: 45%;
width: 50%;
transform: translateX(-50%);
}
}
}
.orders{
background: #fff;
padding: 30rpx;
margin: 20rpx 0;
&--title{
display: flex;
justify-content: space-between;
align-items: center;
}
&--name{
font-size: 32rpx;
color: #333;
}
&--status{
font-size: 24rpx;
color: #999;
&__warn{
color: #FF875B;
}
}
&--item{
display: flex;
justify-content: space-between;
padding: 30rpx 0 0;
}
&--item-image{
width: 180rpx;
height: 180rpx;
margin-right: 30rpx;
}
&--item-con{
width: 510rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #333;
line-height: 39rpx;
}
&--item-title{
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
&--item-pirce{
font-size: 22rpx;
margin-left: 60rpx;
}
&--item-desc{
width: 510rpx;
font-size: 24rpx;
color: #999;
margin-top: 20rpx;
line-height: 39rpx;
display: flex;
justify-content: space-between;
&-item{
background: #F8F8F8;
padding: 0 15rpx;
height: 32rpx;
line-height: 32rpx;
display: inline-block;
margin: 0 10px 10rpx 0;
}
}
&--item-num{
font-size: 28rpx;
margin-left: 60rpx;
}
&--total{
font-size: 24rpx;
color: #999;
display: flex;
align-items: center;
justify-content: end;
margin-top: 30rpx;
&__amount{
font-size: 28rpx;
margin-right: 20rpx;
}
&__pay{
color: #333;
}
}
&--footer{
display: flex;
justify-content: end;
align-items: center;
margin-top: 30rpx;
&-btn{
height: 58rpx;
line-height: 58rpx;
border-radius: 30rpx;
margin: 0 0 0 30rpx;
border: 1px solid #333;
color: #333;
background: none;
font-size: 26rpx;
&__red{
background: linear-gradient(270deg, #FF7F39 0%, #FFA35B 100%);
color: #fff;
border: 0;
height: 60rpx;
line-height: 60rpx;
}
}
}
}
//
</style>

@ -2,531 +2,221 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
* @LastEditTime: 2022-03-20 14:59:53
* @LastEditTime: 2022-03-25 15:39:28
* @Description: file content
-->
<template>
<view class="container p-bottom" v-if="order.goodsList.length">
<!-- 快递配送配送地址 -->
<view v-if="curDelivery == DeliveryTypeEnum.EXPRESS.value" @click="onSelectAddress" class="flow-delivery">
<view class="flow-delivery__detail dis-flex flex-y-center">
<view class="detail-location dis-flex">
<text class="iconfont icon-dingwei"></text>
</view>
<view class="detail-content flex-box">
<block v-if="order.address">
<view class="detail-content__title dis-flex">
<text class="f-30">{{ order.address.name }}</text>
<text class="detail-content__title-phone f-28">{{ order.address.phone }}</text>
</view>
<view class="address detail-content__describe">
<text class="region" v-for="(region, idx) in order.address.region" :key="idx">{{ region }}</text>
<text class="detail">{{ order.address.detail }}</text>
</view>
</block>
<block v-else>
<view class="detail-content__describe dis-flex">
<text class="col-6">请选择配送地址</text>
</view>
</block>
</view>
<view class="detail-arrow dis-flex">
<text class="iconfont icon-arrow-right"></text>
</view>
</view>
</view>
<!-- 商品列表 -->
<view class="m-top20">
<view class="checkout_list" v-for="(item, index) in order.goodsList" :key="index">
<view class="flow-shopList dis-flex" data-index="index" @click="onTargetGoods(item.goods_id)">
<!-- 商品图片 -->
<view class="flow-list-left">
<image mode="scaleToFill" :src="item.goods_image"></image>
</view>
<view class="flow-list-right flex-box">
<!-- 商品名称 -->
<text class="goods-name twoline-hide">{{ item.goods_name }}</text>
<!-- 商品规格 -->
<view class="goods-props clearfix">
<view class="goods-props-item" v-for="(props, idx) in item.skuInfo.goods_props" :key="idx">
<text class="group-name">{{ props.group.name }}: </text>
<text>{{ props.value.name }}</text>
</view>
</view>
<!-- 商品数量和单价 -->
<view class="flow-list-cont dis-flex flex-x-between flex-y-center">
<text class="small">×{{ item.total_num }}</text>
<text class="flow-cont" :class="[item.is_user_grade ? 'price-delete' : '']">{{ item.goods_price }}</text>
</view>
<!-- 会员折扣价 -->
<view v-if="item.is_user_grade" class="grade-price">
<text>会员折扣价{{ item.grade_goods_price }}</text>
</view>
</view>
</view>
</view>
<view class="flow-num-box b-f">
<text>{{ order.orderTotalNum }}件商品合计</text>
<text class="flow-money col-m">{{ order.orderTotalPrice }}</text>
</view>
</view>
<!-- 商品金额 -->
<view class="flow-all-money b-f m-top20">
<view class="flow-all-list dis-flex">
<text class="flex-five">订单总金额</text>
<view class="flex-five t-r">
<text class="col-m">{{ order.orderTotalPrice }}</text>
</view>
</view>
<!-- 优惠券 -->
<view class="flow-all-list dis-flex">
<text class="flex-five">优惠券</text>
<view class="flex-five t-r">
<view v-if="order.couponList.length > 0" @click="handleShowPopup()">
<text class="col-m" v-if="order.couponId > 0">-{{ order.couponMoney }}</text>
<text class="col-m" v-else>{{ order.couponList.length }}</text>
<text class="right-arrow iconfont icon-arrow-right"></text>
</view>
<text v-else class="">无优惠券可用</text>
</view>
</view>
<!-- 积分抵扣 -->
<view v-if="order.isAllowPoints" class="points flow-all-list dis-flex flex-y-center">
<view class="block-left flex-five" @click="handleShowPoints()">
<text class="title">可用{{ setting.points_name }}抵扣</text>
<text class="iconfont icon-help"></text>
</view>
<view class="flex-five dis-flex flex-x-end flex-y-center">
<text class="points-money col-m">-{{ order.pointsMoney }}</text>
<u-switch v-model="isUsePoints" size="48" active-color="#07c160" @change="getOrderData()"></u-switch>
</view>
</view>
<!-- 配送费用 -->
<view v-if="curDelivery == DeliveryTypeEnum.EXPRESS.value" class="dis-flex flow-all-list">
<text class="flex-five">配送费用</text>
<view class="flex-five t-r">
<view v-if="order.address">
<text class="col-m" v-if="order.isIntraRegion">+{{ order.expressPrice }}</text>
<text v-else></text>
</view>
<view v-else>
<text class="col-7">请先选择配送地址</text>
</view>
</view>
</view>
</view>
<!-- 支付方式 -->
<view class="pay-method flow-all-money b-f m-top20">
<view class="flow-all-list dis-flex">
<text class="flex-five">支付方式</text>
</view>
<!-- 微信支付 -->
<!-- #ifdef MP-WEIXIN -->
<view class="pay-item dis-flex flex-x-between" @click="handleSelectPayType(PayTypeEnum.WECHAT.value)">
<view class="item-left dis-flex flex-y-center">
<view class="item-left_icon wechat">
<text class="iconfont icon-wxpay"></text>
</view>
<view class="item-left_text">
<text>{{ PayTypeEnum.WECHAT.name }}</text>
</view>
</view>
<view class="item-right col-m" v-if="curPayType == PayTypeEnum.WECHAT.value">
<text class="iconfont icon-check"></text>
</view>
</view>
<!-- #endif -->
<!-- 余额支付 -->
<view class="pay-item dis-flex flex-x-between" @click="handleSelectPayType(PayTypeEnum.BALANCE.value)">
<view class="item-left dis-flex flex-y-center">
<view class="item-left_icon balance">
<text class="iconfont icon-qiandai"></text>
</view>
<view class="item-left_text">
<text>{{ PayTypeEnum.BALANCE.name }}</text>
</view>
<view class="user-balance">
<text>(可用{{ personal.balance }})</text>
</view>
</view>
<view class="item-right col-m" v-if="curPayType == PayTypeEnum.BALANCE.value">
<text class="iconfont icon-check"></text>
</view>
</view>
</view>
<!-- 买家留言 -->
<view class="flow-all-money b-f m-top20">
<view class="ipt-wrapper dis-flex flow-all-list">
<input v-model="remark" placeholder="选填买家留言50字以内"></input>
</view>
</view>
<!-- 提交订单 -->
<view class="flow-fixed-footer b-f m-top10">
<view class="dis-flex chackout-box">
<view class="chackout-left pl-12">实付款
<text class="col-m">{{ order.orderPayPrice }}</text>
</view>
<view class="chackout-right" @click="onSubmitOrder()">
<view class="flow-btn f-32" :class="{ disabled }">提交订单</view>
</view>
</view>
</view>
<!-- 积分说明弹窗 -->
<u-modal v-model="showPoints" :title="`${setting.points_name}说明`">
<scroll-view class="points-content" :scroll-y="true">
<text>{{ setting.points_describe }}</text>
</scroll-view>
</u-modal>
<!-- 优惠券弹出框 -->
<u-popup v-model="showPopup" mode="bottom">
<view class="popup__coupon">
<view class="coupon__title f-30">选择优惠券</view>
<!-- 优惠券列表 -->
<view class="coupon-list">
<scroll-view :scroll-y="true" style="height: 565rpx;">
<view class="coupon-item" v-for="(item, index) in order.couponList" :key="index">
<view class="item-wrapper"
:class="[item.is_apply ? 'color-' + CouponColors[index % CouponColors.length] : 'color-gray']"
@click="handleSelectCoupon(index)">
<view class="coupon-type">{{ CouponTypeEnum[item.coupon_type].name }}</view>
<view class="tip dis-flex flex-dir-column flex-x-center">
<view v-if="item.coupon_type == CouponTypeEnum.FULL_DISCOUNT.value">
<text class="f-30"></text>
<text class="money">{{ item.reduce_price }}</text>
</view>
<text class="money"
v-if="item.coupon_type == CouponTypeEnum.DISCOUNT.value">{{ item.discount }}</text>
<text class="pay-line">{{ item.min_price }}元可用</text>
</view>
<view class="split-line"></view>
<view class="content dis-flex flex-dir-column flex-x-between">
<view class="title">{{ item.name }}</view>
<view class="bottom dis-flex flex-y-center">
<view class="time flex-box">
<block v-if="item.start_time === item.end_time">{{ item.start_time }}</block>
<block v-else>{{ item.start_time }}~{{ item.end_time }}</block>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<!-- 不使用优惠券 -->
<view class="coupon__do_not dis-flex flex-y-center flex-x-center">
<view class="control dis-flex flex-y-center flex-x-center" @click="handleNotUseCoupon()">
<text class="f-26">不使用优惠券</text>
</view>
</view>
</view>
</u-popup>
</view>
<view>
<u-cell class="address" :title="addres.title" :label="addres.label"
:border="false" isLink @click="$Router.push('/pages/account/address/list')">
<image class="address--icon" slot="icon" src="@/static/common/dz.png" />
</u-cell>
<view class="goods-group">
<view class="goods-group--item">
<image class="goods-group--item-image" mode="widthFix" src="http://static.yoshop.xany6.com/2018071717370507f183424.jpg" />
<view >
<view class="goods-group--item-con">
<text class="goods-group--item-title">商品标题商品标题商品标题商品标题商品标题</text>
<text class="goods-group--item-pirce">1922.00</text>
</view>
<view class="goods-group--item-desc">
<text>多线程与高并发内部教材+试听课</text>
<text class="goods-group--item-num">x1</text>
</view>
</view>
</view>
<view class="goods-group--item">
<image class="goods-group--item-image" mode="widthFix" src="http://static.yoshop.xany6.com/2018071717370507f183424.jpg" />
<view >
<view class="goods-group--item-con">
<text class="goods-group--item-title">商品标题商品标题商品标题商品标题商品标题商品标题商品标题商品标题商品标题商品标题</text>
<text class="goods-group--item-pirce">1922.00</text>
</view>
<view class="goods-group--item-desc">
<text>多线程与高并发内部教材+试听课</text>
<text class="goods-group--item-num">x1</text>
</view>
</view>
</view>
</view>
<view class="service">
<u-cell title="配送方式" value="快递配送"></u-cell>
<u-cell title="买家留言" :border="false">
<textarea slot="value" class="service--remark" auto-height maxlength="50" placeholder="填写您想要备注的信息50字以内" />
</u-cell>
</view>
<view class="play">
<text class="play--title">支付方式</text>
<radio-group>
<u-cell title="微信支付" :border="false">
<image class="play--icon" slot="icon" src="@/static/order/wx.png"/>
<radio class="play--radio" slot="right-icon" color="#FF875B"></radio>
</u-cell>
<u-cell title="支付宝支付" :border="false">
<image class="play--icon" slot="icon" src="@/static/order/zfb.png"/>
<radio class="play--radio" slot="right-icon" color="#FF875B"></radio>
</u-cell>
</radio-group>
</view>
<view class="amount">
<u-cell title="商品总额" value="¥19923.00" :border="false"></u-cell>
<u-cell title="运费" value="¥0.00" :border="false"></u-cell>
</view>
<view class="footer">
<view class="footer--total">
<text>合计</text>
<text class="footer--amount">19923.00</text>
</view>
<button class="footer--btn">去支付</button>
</view>
</view>
</template>
<script>
// import * as Verify from '@/utils/verify'
// import * as CheckoutApi from '@/api/checkout'
import { CouponTypeEnum } from '@/common/enum/coupon'
import DeliveryTypeEnum from '@/common/enum/order/DeliveryType'
import PayTypeEnum from '@/common/enum/order/PayType'
// import { wxPayment } from '@/core/app'
import submitOrderData from '@/mock/submitOrder.json'
const CouponColors = ['red', 'blue', 'violet', 'yellow']
export default {
data() {
return {
//
DeliveryTypeEnum,
PayTypeEnum,
CouponTypeEnum,
//
options: {},
//
CouponColors,
//
curDelivery: null,
//
curPayType: PayTypeEnum.BALANCE.value,
//
selectCouponId: 0,
// 使
isUsePoints: false,
//
remark: '',
// submit
disabled: false,
//
showPoints: false,
//
showPopup: false,
//
disabled: false,
// (api)
order: {
//
goodsList: [],
//
couponList: [],
//
existAddress: false,
//
address: null,
//
existAddress: false,
//
isIntraRegion: true,
//
hasError: false,
//
errorMsg: ''
},
//
personal: {},
//
setting: {}
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.options = options
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
//
this.getOrderData()
},
methods: {
//
getOrderData() {
const app = this
//
const params = {
delivery: app.curDelivery || 0,
couponId: app.selectCouponId || 0,
isUsePoints: app.isUsePoints ? 1 : 0,
}
// api
// CheckoutApi.order(app.options.mode, app.getRequestParam())
// .then(result => {
// app.initData(result.data)
// })
// .catch(err => err);
app.initData(submitOrderData.data)
},
//
initData({ order, personal }) {
const app = this
app.order = order
app.personal = personal || {}
app.setting = order.setting
//
if (order.hasError) {
app.$toast(order.errorMsg)
}
//
app.curDelivery = order.delivery
//
app.isShowTab = app.setting.deliveryType.length > 1
// (使)
if (app.$platform === 'MP-WEIXIN') {
app.curPayType = PayTypeEnum.WECHAT.value
}
},
// api
getRequestParam() {
const app = this
const { options } = app
//
const modeParam = {}
// :
if (options.mode === 'buyNow') {
modeParam.goodsId = options.goodsId
modeParam.goodsNum = options.goodsNum
modeParam.goodsSkuId = options.goodsSkuId
}
// :
if (options.mode === 'cart') {
modeParam.cartIds = options.cartIds
}
// ()
const orderParam = {
delivery: app.curDelivery || 0,
couponId: app.selectCouponId || 0,
isUsePoints: app.isUsePoints ? 1 : 0,
}
return { ...orderParam, ...modeParam }
},
//
handleShowPoints() {
this.showPoints = true
},
//
handleShowPopup() {
this.showPopup = true
},
//
handleSelectCoupon(index) {
const app = this
const { couponList } = app.order
//
const couponItem = couponList[index]
//
if (!couponItem.is_apply) {
app.$toast(couponItem.not_apply_info)
return
}
// id
app.selectCouponId = couponItem.user_coupon_id
//
app.getOrderData()
//
app.showPopup = false
},
// 使
handleNotUseCoupon() {
const app = this
app.selectCouponId = 0
//
app.getOrderData()
//
app.showPopup = false
},
//
handleSelectPayType(value) {
this.curPayType = value
},
//
onSelectAddress() {
this.$navTo('pages/address/index', { from: 'checkout' })
},
//
onTargetGoods(goodsId) {
this.$navTo('pages/goods/detail', { goodsId })
},
//
onSubmitOrder() {
const app = this
if (app.disabled) {
return false
}
//
if (!app.onVerifyFrom()) {
return false
}
//
app.disabled = true
// api
// CheckoutApi.submit(app.options.mode, app.getFormData())
// .then(result => app.onSubmitCallback(result))
// .catch(err => {
// if (err.result) {
// const errData = err.result.data
// if (errData.is_created) {
// app.navToMyOrder()
// return false
// }
// }
// app.disabled = false
// })
},
//
onSubmitCallback(result) {
const app = this
//
if (result.data.payType == PayTypeEnum.WECHAT.value) {
// wxPayment(result.data.payment)
// .then(() => app.$success(''))
// .catch(err => app.$error(''))
// .finally(() => {
// app.disabled = false
// app.navToMyOrder()
// })
}
//
if (result.data.payType == PayTypeEnum.BALANCE.value) {
app.$success('支付成功')
app.disabled = false
app.navToMyOrder()
}
},
// (1)
navToMyOrder() {
setTimeout(() => {
this.$navTo('pages/order/index')
}, 1000)
},
//
getFormData() {
const app = this
const { options } = app
//
const form = {
delivery: app.curDelivery,
payType: app.curPayType,
couponId: app.selectCouponId || 0,
isUsePoints: app.isUsePoints ? 1 : 0,
remark: app.remark || '',
}
// -
if (options.mode === 'buyNow') {
form.goodsId = options.goodsId
form.goodsNum = options.goodsNum
form.goodsSkuId = options.goodsSkuId
}
// -
if (options.mode === 'cart') {
form.cartIds = options.cartIds || null
}
return form
},
//
onVerifyFrom() {
const app = this
if (app.hasError) {
app.$toast(app.errorMsg)
return false
}
return true
},
}
}
export default{
data(){
return {
addres : {
title : '选择收货地址',
label : '陈先生 189****6782'
}
}
}
}
</script>
<style lang="scss" scoped>
@import "./style.scss";
page{
background: #f8f8f8;
padding-bottom: 140rpx;
}
.address{
background: #fff;
&--icon{
width: 34rpx;
height: 34rpx;
margin-right: 30rpx;
}
}
.goods-group{
background: #fff;
margin: 20rpx 0;
&--item{
display: flex;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1px solid #eee;
&-image{
width: 180rpx;
height: 180rpx;
margin-right: 30rpx;
}
&-con{
width: 510rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #333;
line-height: 39rpx;
}
&-title{
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
&-pirce{
font-size: 22rpx;
margin-left: 60rpx;
}
&-desc{
width: 510rpx;
font-size: 24rpx;
color: #999;
margin-top: 20rpx;
line-height: 39rpx;
display: flex;
justify-content: space-between;
}
&-num{
font-size: 28rpx;
margin-left: 60rpx;
}
}
}
.service{
background: #fff;
&--remark{
font-size: 28rpx;
width: 500rpx;
text-align: right;
}
}
.play{
background: #fff;
margin: 20rpx 0;
&--title{
font-size: 28rpx;
padding: 30rpx;
display: block;
}
&--icon{
width: 39rpx;
height: 39rpx;
margin-right: 20rpx;
}
&--radio{
transform: scale(70%);
}
}
.amount{
background: #fff;
}
.footer{
display: flex;
align-items: center;
justify-content: space-between;
height: 120rpx;
background: #fff;
padding: 0 30rpx;
position: fixed;
bottom: 0;
right: 0;
left: 0;
&--total{
color: #666;
font-size: 24rpx;
display: flex;
align-items: center;
}
&--amount{
font-size: 32rpx;
color: #FF512B;
margin-left: 10rpx;
}
&--btn{
height: 70rpx;
line-height: 70rpx;
border-radius: 35rpx;
padding: 0 58rpx;
margin: 0;
font-size: 28rpx;
background: #FF512B;
color: #fff;
}
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 10:31:12
* @LastEditors: ch
* @LastEditTime: 2022-03-23 10:31:16
* @LastEditTime: 2022-03-25 10:04:56
* @Description: file content
-->
<template>
@ -32,7 +32,13 @@
export default {
data(){
return {
bannerList : []
}
},
props:{
bannerList : {
type : Array,
default : []
}
}
}

@ -2,35 +2,9 @@
* @Author: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
* @LastEditTime: 2022-03-23 20:11:26
* @LastEditTime: 2022-03-25 11:56:01
* @Description: file content
-->
<script>
import {ApiGetBannerData} from '@/common/api/index.js';
export default {
data() {
return {
bannerList: [],
categoryList : [
{ url : 'bz.png', title : '数码周边'},
{ url : 'bz.png', title : '数码周边'},
{ url : 'bz.png', title : '数码周边'},
{ url : 'bz.png', title : '数码周边'},
{ url : 'bz.png', title : '数码周边'},
{ url : 'bz.png', title : '数码周边'},
]
}
},
async onLoad() {
const {error, result} = await ApiGetBannerData({pageIndex:1, length:999});
this.bannerList = result.concat(result).map(i => i.imgUrl);
},
methods: {
},
}
</script>
<template>
<view>
<view class="header">
@ -46,7 +20,7 @@ export default {
<text class="search--input">请输入您想搜索的商品名称</text>
</view>
<Banner></Banner>
<Banner :bannerList="bannerList"></Banner>
<view class="category">
<view class="category--item" v-for="item in categoryList" :key="item.url">
@ -70,16 +44,46 @@ import BsGoodsGroup from '@/components/BsGoodsGroup';
import Sekill from './Sekill';
import Pick from './Pick';
import Banner from './Banner';
import {ApiGetBannerData} from '@/common/api/index.js';
export default {
components : {BsGoodsGroup, Pick, Banner},
components : {BsGoodsGroup, Pick, Banner, Sekill},
data(){
return {
scrollTop : 0
scrollTop : 0,
bannerList: [],
categoryList : [
{ url : 'bz2.png', title : '数码周边'},
{ url : 'bz1.png', title : '数码周边'},
{ url : 'bz3.png', title : '数码周边'},
{ url : 'bz4.png', title : '数码周边'},
{ url : 'bz5.png', title : '数码周边'},
{ url : 'bz6.png', title : '数码周边'},
]
}
},
onLoad(){},
onLoad(){
this.getBannerList();
},
onShow(){
uni.pageScrollTo({
scrollTop: 0,
duration : 0
});
this.scrollTop = 0;
},
onPageScroll({scrollTop}){
if(this.scrollTop > 36 && scrollTop > 36){
return
}
this.scrollTop = scrollTop;
},
methods : {
async getBannerList(){
const {error, result} = await ApiGetBannerData({pageIndex:1, length:999});
console.log(result)
this.bannerList = result.concat(result).map(i => i.imgUrl);
}
}
}
</script>

@ -2,12 +2,12 @@
* @Author: ch
* @Date: 2022-03-21 18:08:07
* @LastEditors: ch
* @LastEditTime: 2022-03-21 18:28:55
* @LastEditTime: 2022-03-26 18:01:12
* @Description: file content
-->
<template>
<view>
<view class="banner"></view>
<image class="banner" src="@/static/sekill/banner.png"/>
<view class="tab">
<view class="tab--item">
<text class="tab--time">16:00</text>
@ -30,7 +30,26 @@
<text>即将开抢</text>
</view>
</view>
<view class="list"></view>
<view class="goods">
<view class="goodsItem" v-for="item in 3" :key="item">
<image class="goodsItem--image" src="@/static/testImg/2.png"/>
<view class="goodsItem--con">
<text>马士兵教育马士兵教育</text>
<view class="goodsItem--progBox">
<u-line-progress class="goodsItem--prog" :percentage="30" :showText="false" height="11rpx" activeColor="#FE0A16" inactiveColor="#FF8E8F" />
<text>仅剩0件</text>
</view>
<view class="goodsItem--operation">
<view>
<view class="goodsItem--price">9.9</view>
<text class="goodsItem--orgPrice">19.00</text>
</view>
<button v-if="item % 2 == 0" class="goodsItem--btn"></button>
<button v-else class="goodsItem--btn goodsItem--btn__disable">已售罄</button>
</view>
</view>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
@ -39,15 +58,34 @@ page{
}
.banner{
height: 678rpx;
width: 750rpx;
}
.tab{
height:120rpx;
margin: 0 18rpx;
margin: 20rpx 18rpx 0;
background: linear-gradient(180deg, #FDDBAE 0%, #FEC793 25%, #FFB378 97%, #FFB378 100%);
display: flex;
justify-content: space-around;
align-items: center;
text-align: center;
position: relative;
padding: 0 30rpx;
&::after,&::before{
display: block;
content: '';
width: 24rpx;
height: 164rpx;
background: url('@/static/sekill/jz.png') no-repeat;
transform: rotate(180deg);
background-size: 24rpx;
position: absolute;
right: 0;
top: -22rpx;
}
&::before{
left: 0;
transform: rotate(0deg);
}
&--item{
font-size: 24rpx;
line-height: 45rpx;
@ -61,8 +99,98 @@ page{
font-size: 32rpx;
}
}
.list{
.goods{
min-height: calc(100vh - 826rpx);
overflow: hidden;
margin: 0 20rpx;
padding: 10rpx 30rpx 0;
background: #DF1F21;
box-shadow: 0 10rpx 20rpx rgba($color: #000000, $alpha: .1) inset;
}
.goodsItem{
width: 650rpx;
height: 258rpx;
margin: 30rpx auto;
border-radius: 12rpx;
padding: 30rpx;
display: flex;
box-sizing: border-box;
background: linear-gradient(181deg, #FFF1D5 0%, #FBE0BB 21%, #F7CFA1 88%, #F7CFA1 100%);
&--image{
width: 190rpx;
height: 190rpx;
background: #F0EEE6;
border-radius: 12rpx;
margin-right: 30rpx;
}
&--con{
width: 378rpx;
padding-top: 10rpx;
}
&--progBox{
margin-top: 24rpx;
display: flex;
justify-content: start;
align-items: center;
font-size: 22rpx;
color: #F31F07;
}
&--prog{
width: 167rpx;
margin-right: 20rpx;
flex: initial;
}
&--operation{
display: flex;
justify-content: space-between;
margin-top: 24rpx;
align-items: flex-end;
}
&--price{
display: flex;
font-size: 28rpx;
color: #F31F07;
font-weight: bold;
align-items: center;
margin-bottom: 10rpx;
&::before{
display: block;
content: '秒';
width: 36rpx;
height: 36rpx;
line-height: 36rpx;
border-radius: 6rpx;
background: #FE0A16;
color: #fff;
font-size: 24rpx;
text-align: center;
margin-right: 10rpx;
}
}
&--orgPrice{
font-size: 24rpx;
color: #BE4903;
text-decoration: line-through;
}
&--btn{
width: 166rpx;
height: 62rpx;
line-height: 62rpx;
background: url('@/static/sekill/btn.png');
background-size: 166rpx;
font-size: 28rpx;
font-weight: bold;
padding: 0;
border: none;
margin: 0;
color: #791704;
&::after{
display: none;
}
&__disable{
background: url('@/static/sekill/btn2.png');
background-size: 166rpx;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Loading…
Cancel
Save