@ -0,0 +1,5 @@
|
||||
.hbuilderx/
|
||||
.history/
|
||||
unpackage/
|
||||
node_moudel/
|
||||
package-lock.json
|
@ -0,0 +1,7 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-17 16:38:39
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-17 16:38:39
|
||||
* @Description: file content
|
||||
*/
|
@ -0,0 +1,7 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-17 16:38:26
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-17 16:38:26
|
||||
* @Description: file content
|
||||
*/
|
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-17 16:37:45
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-22 17:25:29
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
import {Request, ToAsyncAwait} from '@/common/utils';
|
||||
|
||||
/**
|
||||
* 获取测试信息
|
||||
* @param {*} params
|
||||
*/
|
||||
export const ApiGetBannerData = (params) =>
|
||||
ToAsyncAwait(Request.get('/edu-course/carousel/app',params));
|
||||
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
import ApplyRangeEnum from './ApplyRange'
|
||||
import ExpireTypeEnum from './ExpireType'
|
||||
import CouponTypeEnum from './CouponType'
|
||||
|
||||
export { ApplyRangeEnum, CouponTypeEnum, ExpireTypeEnum }
|
@ -0,0 +1,17 @@
|
||||
import DeliveryStatusEnum from './DeliveryStatus'
|
||||
import DeliveryTypeEnum from './DeliveryType'
|
||||
import OrderSourceEnum from './OrderSource'
|
||||
import OrderStatusEnum from './OrderStatus'
|
||||
import PayStatusEnum from './PayStatus'
|
||||
import PayTypeEnum from './PayType'
|
||||
import ReceiptStatusEnum from './ReceiptStatus'
|
||||
|
||||
export {
|
||||
DeliveryStatusEnum,
|
||||
DeliveryTypeEnum,
|
||||
OrderSourceEnum,
|
||||
OrderStatusEnum,
|
||||
PayStatusEnum,
|
||||
PayTypeEnum,
|
||||
ReceiptStatusEnum
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
import AuditStatusEnum from './AuditStatus'
|
||||
import RefundStatusEnum from './RefundStatus'
|
||||
import RefundTypeEnum from './RefundType'
|
||||
|
||||
export {
|
||||
AuditStatusEnum,
|
||||
RefundStatusEnum,
|
||||
RefundTypeEnum
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
import PageCategoryStyleEnum from './Style'
|
||||
|
||||
export { PageCategoryStyleEnum }
|
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-18 11:11:05
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-18 11:11:05
|
||||
* @Description: file content
|
||||
*/
|
||||
import {RouterMount,createRouter} from 'uni-simple-router';
|
||||
|
||||
const router = createRouter({
|
||||
platform: process.env.VUE_APP_PLATFORM,
|
||||
routes: [...ROUTES]
|
||||
});
|
||||
//全局路由前置守卫
|
||||
router.beforeEach((to, from, next) => {
|
||||
next();
|
||||
});
|
||||
// 全局路由后置守卫
|
||||
router.afterEach((to, from) => {
|
||||
console.log('跳转结束')
|
||||
})
|
||||
|
||||
export {
|
||||
router,
|
||||
RouterMount
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-22 18:28:52
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-24 14:20:14
|
||||
* @Description: file content
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex';
|
||||
|
||||
|
||||
export default new Vuex.Store({
|
||||
state : {
|
||||
|
||||
},
|
||||
mutations:{
|
||||
|
||||
},
|
||||
getters:{
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-22 16:52:28
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-22 17:26:44
|
||||
* @Description: 所有工具类统一在这输出
|
||||
*/
|
||||
import * as util from './utils';
|
||||
import * as requset from './requset';
|
||||
|
||||
export * from './utils';
|
||||
export * from './requset';
|
||||
|
||||
export default { ...util, requset}
|
@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-23 14:07:07
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 14:14:37
|
||||
* @Description: file content
|
||||
*/
|
||||
import { ToAsyncAwait } from '@/common/utils';
|
||||
|
||||
const getStorageSync = (key )=> ToAsyncAwait(async ()=>{
|
||||
return Promise((resolve, reject)=>{
|
||||
try{
|
||||
cosnt val = await uni.getStorageSync(key);
|
||||
resolve(val)
|
||||
}catch (e){
|
||||
reject(e)
|
||||
}
|
||||
|
||||
})
|
||||
})
|
@ -0,0 +1,63 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-20 13:11:55
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-24 16:38:41
|
||||
* @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>
|
||||
<slot name="btn"></slot>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
* 用于组件自定义设置
|
||||
*/
|
||||
props: {
|
||||
// 提示的问题
|
||||
tips: {
|
||||
type: String,
|
||||
default: '亲,暂无相关数据'
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
|
||||
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-icon .image {
|
||||
width: 280rpx;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -0,0 +1,169 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-20 16:45:27
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-21 17:36:52
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="goods">
|
||||
<view class="goods--column">
|
||||
<view class="goods-item" @click="$Router.push('/pages/goods/detail')">
|
||||
<image class="goods-item--img" src="@/static/testImg/2.png" mode="widthFix"></image>
|
||||
<view class="goods-item--title"><text>JAVA语言程序员必备的技术书籍</text></view>
|
||||
<view class="goods-item--pirce-box">
|
||||
<view>
|
||||
<text class="goods-item--pirce">¥29</text>
|
||||
<text class="goods-item--original-pirce">¥50</text>
|
||||
</view>
|
||||
<view>
|
||||
<image class="goods-item--icon" src='@/static/index/bz.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item--activity">
|
||||
<text class="goods-item--activity-title">秒杀</text>
|
||||
<text class="goods-item--activity-desc">正在抢购中</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item">
|
||||
<image class="goods-item--img" src="@/static/testImg/3.png" mode="widthFix"></image>
|
||||
<view class="goods-item--title"><text>JAVA语言程序员必备的技术书籍</text></view>
|
||||
<view class="goods-item--pirce-box">
|
||||
<view>
|
||||
<text class="goods-item--pirce">¥29</text>
|
||||
<text class="goods-item--original-pirce">¥50</text>
|
||||
</view>
|
||||
<view>
|
||||
<image class="goods-item--icon" src='@/static/index/bz.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item--activity">
|
||||
<text class="goods-item--activity-title">秒杀</text>
|
||||
<text class="goods-item--activity-desc">正在抢购中</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item">
|
||||
<image class="goods-item--img" src="@/static/testImg/2.png" mode="widthFix"></image>
|
||||
<view class="goods-item--title"><text>JAVA语言程序员必备的技术书籍</text></view>
|
||||
<view class="goods-item--pirce-box">
|
||||
<view>
|
||||
<text class="goods-item--pirce">¥29</text>
|
||||
<text class="goods-item--original-pirce">¥50</text>
|
||||
</view>
|
||||
<view>
|
||||
<image class="goods-item--icon" src='@/static/index/bz.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item--activity">
|
||||
<text class="goods-item--activity-title">秒杀</text>
|
||||
<text class="goods-item--activity-desc">正在抢购中</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods--column">
|
||||
<view class="goods-item">
|
||||
<image class="goods-item--img" src="@/static/testImg/3.png" mode="widthFix"></image>
|
||||
<view class="goods-item--title"><text>JAVA语言程序员必备的技术书籍</text></view>
|
||||
<view class="goods-item--pirce-box">
|
||||
<view>
|
||||
<text class="goods-item--pirce">¥29</text>
|
||||
<text class="goods-item--original-pirce">¥50</text>
|
||||
</view>
|
||||
<view>
|
||||
<image class="goods-item--icon" src='@/static/index/bz.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item--activity">
|
||||
<text class="goods-item--activity-title">秒杀</text>
|
||||
<text class="goods-item--activity-desc">正在抢购中</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item">
|
||||
<image class="goods-item--img" src="@/static/testImg/2.png" mode="widthFix"></image>
|
||||
<view class="goods-item--title"><text>JAVA语言程序员必备的技术书籍</text></view>
|
||||
<view class="goods-item--pirce-box">
|
||||
<view>
|
||||
<text class="goods-item--pirce">¥29</text>
|
||||
<text class="goods-item--original-pirce">¥50</text>
|
||||
</view>
|
||||
<view>
|
||||
<image class="goods-item--icon" src='@/static/index/bz.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item--activity">
|
||||
<text class="goods-item--activity-title">秒杀</text>
|
||||
<text class="goods-item--activity-desc">正在抢购中</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.goods{
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-flow:wrap;
|
||||
&--column{
|
||||
width: 335rpx;
|
||||
}
|
||||
&-item{
|
||||
|
||||
width: 335rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 30rpx;
|
||||
overflow: hidden;
|
||||
padding-bottom: 20rpx;
|
||||
&--img{
|
||||
width: 100%;
|
||||
}
|
||||
&--title{
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx 20rpx;
|
||||
}
|
||||
&--pirce-box{
|
||||
padding:0 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
&--pirce{
|
||||
font-size: 32rpx;
|
||||
color: #FF512B;
|
||||
}
|
||||
&--original-pirce{
|
||||
color: #ccc;
|
||||
font-size: 20rpx;
|
||||
text-decoration: line-through;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
&--icon{
|
||||
width: 22rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
&--activity{
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
margin:20rpx 20rpx 0;
|
||||
background: #FFEDE9;
|
||||
border-radius: 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: #FF512B;
|
||||
display: flex;
|
||||
&-title{
|
||||
height: 40rpx;
|
||||
display: block;
|
||||
border-radius: 20rpx;
|
||||
padding: 0 14rpx;
|
||||
background: #FF512B;
|
||||
color: #fff;
|
||||
}
|
||||
&-desc{
|
||||
flex: 1 1 auto;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,56 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-23 16:05:10
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 16:32:42
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="search">
|
||||
<image class="search--icon" src="@/static/search/arrow.png" @click="$Router.back()"></image>
|
||||
<u--input class="search--input" :placeholder="placeholder" @focus="$Router.push('/pages/goods/search')"
|
||||
prefixIcon="search" clearable prefixIconStyle="font-size:48rpx;color:#ccc"
|
||||
v-model="value" placeholderClass="search--input__placeholder"></u--input>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value : {
|
||||
type : String,
|
||||
default : ''
|
||||
},
|
||||
placeholder : {
|
||||
type : String,
|
||||
default : '请输入您想搜索的商品名称'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.search{
|
||||
height: 88rpx;
|
||||
padding: 0 40rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
&--icon{
|
||||
width: 14rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
&--input{
|
||||
display: block;
|
||||
margin-left:40rpx;
|
||||
height: 70rpx;
|
||||
border:none;
|
||||
box-sizing: border-box;
|
||||
background: #F8F8F8;
|
||||
&__placeholder{
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view v-if="isLoading" class="loading">
|
||||
<u-loading-icon mode="circle"></u-loading-icon>
|
||||
</view>
|
||||
<view v-else class="field-body" @click="handleSelect()">
|
||||
<view class="field-value oneline-hide">{{ valueText ? valueText: placeholder }}</view>
|
||||
</view>
|
||||
<u-picker :show="show" keyName="label" :columns="options" @cancel="show = false" @change="changeRegion" @confirm="onConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Emitter from 'uview-ui/libs/util/emitter'
|
||||
import regionData from '@/mock/region.json';
|
||||
// import RegionModel from '@/common/model/Region'
|
||||
|
||||
// 根据选中的value集获取索引集keys
|
||||
// 用于设置默认选中
|
||||
const findOptionsKey = (data, searchValue, deep = 1, keys = []) => {
|
||||
const index = data.findIndex(item => item.value === searchValue[deep - 1])
|
||||
if (index > -1) {
|
||||
keys.push(index)
|
||||
if (data[index].children) {
|
||||
findOptionsKey(data[index].children, searchValue, ++deep, keys)
|
||||
}
|
||||
}
|
||||
return keys
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'SelectRegion',
|
||||
mixins: [Emitter],
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'change'
|
||||
},
|
||||
props: {
|
||||
// v-model 指定选中项
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 未选中时的提示文字
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择省/市/区'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 正在加载
|
||||
isLoading: true,
|
||||
// 是否显示
|
||||
show: false,
|
||||
// 默认选中的值
|
||||
defaultValue: [],
|
||||
// 选中项内容(文本展示)
|
||||
valueText: '',
|
||||
// 级联选择器数据
|
||||
options: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听v-model
|
||||
value(val) {
|
||||
// 设置默认选中的值
|
||||
this.valueText = val.map(item => item.label).join('/')
|
||||
this.setDefaultValue(val)
|
||||
// 将当前的值发送到 u-form-item 进行校验
|
||||
this.dispatch('u-form-item', 'on-form-change', val)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// 获取地区数据
|
||||
this.getTreeData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 打开选择器
|
||||
handleSelect() {
|
||||
this.show = true
|
||||
},
|
||||
|
||||
// 获取地区数据
|
||||
getTreeData() {
|
||||
const app = this
|
||||
app.isLoading = true;
|
||||
this.options = [[
|
||||
{
|
||||
label : '北京',
|
||||
id : 11000000,
|
||||
children : [
|
||||
{
|
||||
label : '东城',
|
||||
id : 11100000
|
||||
},
|
||||
{
|
||||
label : '西城',
|
||||
id : 11200000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label : '湖南',
|
||||
id : 43000000,
|
||||
children : [
|
||||
{
|
||||
label : '长沙',
|
||||
id : 11100000
|
||||
},
|
||||
{
|
||||
label : '邵阳',
|
||||
id : 11200000
|
||||
}
|
||||
]
|
||||
}
|
||||
],[{
|
||||
label : '东城',
|
||||
id : 11100000
|
||||
},
|
||||
{
|
||||
label : '西城',
|
||||
id : 11200000
|
||||
}]];
|
||||
app.isLoading = false;
|
||||
// RegionModel.getTreeData()
|
||||
// .then(regions => {
|
||||
// // 格式化级联选择器数据
|
||||
// this.options = this.getOptions(regions)
|
||||
// })
|
||||
// .finally(() => app.isLoading = false)
|
||||
},
|
||||
changeRegion(val){
|
||||
this.options = [this.options[0],val.value[0].children]
|
||||
},
|
||||
// 确认选择后的回调
|
||||
onConfirm(value) {
|
||||
// 绑定到v-model执行的值
|
||||
this.$emit('input', value)
|
||||
this.$emit('change', value)
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置默认选中的值
|
||||
* 该操作是为了每次打开选择器时聚焦到上次选择
|
||||
* @param {Object} value
|
||||
*/
|
||||
setDefaultValue(value) {
|
||||
const values = value.map(item => item.value)
|
||||
const options = this.options
|
||||
this.defaultValue = findOptionsKey(options, values)
|
||||
},
|
||||
|
||||
/**
|
||||
* 格式化级联选择器数据
|
||||
* @param {*} regions 地区数据
|
||||
*/
|
||||
getOptions(regions) {
|
||||
const { getOptions, getChildren } = this
|
||||
const options = []
|
||||
for (const index in regions) {
|
||||
const item = regions[index]
|
||||
const children = getChildren(item)
|
||||
const optionItem = {
|
||||
value: item.id,
|
||||
label: item.name
|
||||
}
|
||||
if (children !== false) {
|
||||
optionItem.children = getOptions(children)
|
||||
}
|
||||
options.push(optionItem)
|
||||
}
|
||||
return options
|
||||
},
|
||||
|
||||
// 获取子集地区
|
||||
getChildren(item) {
|
||||
if (item.city) {
|
||||
return item.city
|
||||
}
|
||||
if (item.region) {
|
||||
return item.region
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loading {
|
||||
padding-left: 10rpx;
|
||||
// text-align: center;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2021-07-26 23:22:16
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-22 17:47:44
|
||||
* @Description: file content
|
||||
*/
|
||||
import Vue from 'vue';
|
||||
import App from './App';
|
||||
|
||||
import {router,RouterMount} from './common/router/index.js';
|
||||
import uView from 'uview-ui';
|
||||
|
||||
Vue.use(router);
|
||||
Vue.use(uView);
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
// #ifdef H5
|
||||
RouterMount(app,router,'#app')
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
|
||||
// #endif
|
@ -0,0 +1,77 @@
|
||||
{
|
||||
"name" : "demo",
|
||||
"appid" : "",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2",
|
||||
"h5" : {
|
||||
"router" : {
|
||||
"mode" : "history"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
{"status":200,"message":"success","data":{"assets":{"balance":"0.00","points":0,"coupon":0}}}
|
@ -0,0 +1,758 @@
|
||||
{
|
||||
"status": 200,
|
||||
"message": "success",
|
||||
"data": {
|
||||
"cartTotal": 2,
|
||||
"list": [
|
||||
{
|
||||
"id": 11922,
|
||||
"goods_id": 10009,
|
||||
"goods_sku_id": "10019_10021_10023",
|
||||
"goods_num": 1,
|
||||
"user_id": 12872,
|
||||
"is_delete": 0,
|
||||
"store_id": 10001,
|
||||
"create_time": "2022-03-18 19:45:02",
|
||||
"update_time": "2022-03-18 19:45:02",
|
||||
"goods": {
|
||||
"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": 10172,
|
||||
"goods_sku_id": "10019_10021_10023",
|
||||
"goods_id": 10009,
|
||||
"image_id": 0,
|
||||
"goods_sku_no": "",
|
||||
"goods_price": "1499.00",
|
||||
"line_price": "0.00",
|
||||
"stock_num": 98,
|
||||
"goods_weight": 0.14,
|
||||
"goods_props": [
|
||||
{
|
||||
"group": {
|
||||
"name": "颜色",
|
||||
"id": 10001
|
||||
},
|
||||
"value": {
|
||||
"name": "魅海蓝",
|
||||
"id": 10019
|
||||
}
|
||||
},
|
||||
{
|
||||
"group": {
|
||||
"name": "版本",
|
||||
"id": 10002
|
||||
},
|
||||
"value": {
|
||||
"name": "全网通4+64G",
|
||||
"id": 10021
|
||||
}
|
||||
},
|
||||
{
|
||||
"group": {
|
||||
"name": "套装",
|
||||
"id": 10004
|
||||
},
|
||||
"value": {
|
||||
"name": "耳机套装",
|
||||
"id": 10023
|
||||
}
|
||||
}
|
||||
],
|
||||
"spec_value_ids": [
|
||||
10019,
|
||||
10021,
|
||||
10023
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11923,
|
||||
"goods_id": 10009,
|
||||
"goods_sku_id": "10018_10021_10022",
|
||||
"goods_num": 1,
|
||||
"user_id": 12872,
|
||||
"is_delete": 0,
|
||||
"store_id": 10001,
|
||||
"create_time": "2022-03-18 19:50:02",
|
||||
"update_time": "2022-03-18 19:50:02",
|
||||
"goods": {
|
||||
"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
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11923,
|
||||
"goods_id": 10009,
|
||||
"goods_sku_id": "10018_10021_10022",
|
||||
"goods_num": 1,
|
||||
"user_id": 12872,
|
||||
"is_delete": 0,
|
||||
"store_id": 10001,
|
||||
"create_time": "2022-03-18 19:50:02",
|
||||
"update_time": "2022-03-18 19:50:02",
|
||||
"goods": {
|
||||
"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
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11923,
|
||||
"goods_id": 10009,
|
||||
"goods_sku_id": "10018_10021_10022",
|
||||
"goods_num": 1,
|
||||
"user_id": 12872,
|
||||
"is_delete": 0,
|
||||
"store_id": 10001,
|
||||
"create_time": "2022-03-18 19:50:02",
|
||||
"update_time": "2022-03-18 19:50:02",
|
||||
"goods": {
|
||||
"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
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11923,
|
||||
"goods_id": 10009,
|
||||
"goods_sku_id": "10018_10021_10022",
|
||||
"goods_num": 1,
|
||||
"user_id": 12872,
|
||||
"is_delete": 0,
|
||||
"store_id": 10001,
|
||||
"create_time": "2022-03-18 19:50:02",
|
||||
"update_time": "2022-03-18 19:50:02",
|
||||
"goods": {
|
||||
"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
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11923,
|
||||
"goods_id": 10009,
|
||||
"goods_sku_id": "10018_10021_10022",
|
||||
"goods_num": 1,
|
||||
"user_id": 12872,
|
||||
"is_delete": 0,
|
||||
"store_id": 10001,
|
||||
"create_time": "2022-03-18 19:50:02",
|
||||
"update_time": "2022-03-18 19:50:02",
|
||||
"goods": {
|
||||
"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
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11923,
|
||||
"goods_id": 10009,
|
||||
"goods_sku_id": "10018_10021_10022",
|
||||
"goods_num": 1,
|
||||
"user_id": 12872,
|
||||
"is_delete": 0,
|
||||
"store_id": 10001,
|
||||
"create_time": "2022-03-18 19:50:02",
|
||||
"update_time": "2022-03-18 19:50:02",
|
||||
"goods": {
|
||||
"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
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,270 @@
|
||||
{
|
||||
"status": 200,
|
||||
"message": "success",
|
||||
"data": {
|
||||
"order": {
|
||||
"goodsList": [
|
||||
{
|
||||
"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": 10172,
|
||||
"goods_sku_id": "10019_10021_10023",
|
||||
"goods_id": 10009,
|
||||
"image_id": 0,
|
||||
"goods_sku_no": "",
|
||||
"goods_price": "1499.00",
|
||||
"line_price": "0.00",
|
||||
"stock_num": 98,
|
||||
"goods_weight": 0.14,
|
||||
"goods_props": [
|
||||
{
|
||||
"group": {
|
||||
"name": "颜色",
|
||||
"id": 10001
|
||||
},
|
||||
"value": {
|
||||
"name": "魅海蓝",
|
||||
"id": 10019
|
||||
}
|
||||
},
|
||||
{
|
||||
"group": {
|
||||
"name": "版本",
|
||||
"id": 10002
|
||||
},
|
||||
"value": {
|
||||
"name": "全网通4+64G",
|
||||
"id": 10021
|
||||
}
|
||||
},
|
||||
{
|
||||
"group": {
|
||||
"name": "套装",
|
||||
"id": 10004
|
||||
},
|
||||
"value": {
|
||||
"name": "耳机套装",
|
||||
"id": 10023
|
||||
}
|
||||
}
|
||||
],
|
||||
"spec_value_ids": [
|
||||
10019,
|
||||
10021,
|
||||
10023
|
||||
]
|
||||
},
|
||||
"goods_price": "1499.00",
|
||||
"total_num": 1,
|
||||
"goods_sku_id": "10019_10021_10023",
|
||||
"total_price": "1499.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": "1499.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,
|
||||
"couponList": [],
|
||||
"hasError": false,
|
||||
"errorMsg": "",
|
||||
"delivery": 10,
|
||||
"address": {
|
||||
"address_id": 11379,
|
||||
"name": "x",
|
||||
"phone": "13245678909",
|
||||
"province_id": 1,
|
||||
"city_id": 2,
|
||||
"region_id": 3,
|
||||
"detail": "ddd",
|
||||
"user_id": 12872,
|
||||
"region": {
|
||||
"province": "北京",
|
||||
"city": "北京市",
|
||||
"region": "东城区"
|
||||
}
|
||||
},
|
||||
"existAddress": true,
|
||||
"expressPrice": "0.00",
|
||||
"isIntraRegion": true,
|
||||
"isAllowPoints": false,
|
||||
"isUsePoints": "0",
|
||||
"pointsMoney": 0,
|
||||
"pointsBonus": 0,
|
||||
"payType": 10,
|
||||
"setting": {
|
||||
"deliveryType": [
|
||||
10
|
||||
],
|
||||
"points_name": "积分",
|
||||
"points_describe": "a) 积分不可兑现、不可转让,仅可在本平台使用;\nb) 您在本平台参加特定活动也可使用积分,详细使用规则以具体活动时的规则为准;\nc) 积分的数值精确到个位(小数点后全部舍弃,不进行四舍五入)\nd) 买家在完成该笔交易(订单状态为“已签收”)后才能得到此笔交易的相应积分,如购买商品参加店铺其他优惠,则优惠的金额部分不享受积分获取;"
|
||||
},
|
||||
"orderTotalPrice": "2898.00",
|
||||
"couponId": 0,
|
||||
"couponMoney": 0,
|
||||
"orderPrice": "2898.00",
|
||||
"orderPayPrice": "2898.00"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
{"status":200,"message":"success","data":{"counts":{"payment":0,"delivery":0,"received":0}}}
|
@ -0,0 +1 @@
|
||||
{"status":200,"message":"success","data":{"userInfo":{"user_id":12872,"mobile":"189****6782","nick_name":"189****6782","avatar_id":0,"gender":"未知","country":"","province":"","city":"","address_id":11379,"balance":"0.00","points":0,"pay_money":"0.00","expend_money":"0.00","grade_id":0,"platform":"H5","last_login_time":1647603880,"avatar":null,"grade":null}}}
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "shopping-app",
|
||||
"version": "1.0.0",
|
||||
"description": "严选",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://internel-git.mashibing.cn/chenhui/shopping-app.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"mp-html": "^2.2.2",
|
||||
"uni-read-pages": "^1.0.5",
|
||||
"uni-simple-router": "^2.0.7",
|
||||
"uview-ui": "^2.0.29"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dcloudio/uni-helper-json": "^1.0.13"
|
||||
}
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"backgroundColor" : "#69ADE5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/sekill/index",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/category",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/search",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/list/index",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/detail",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/detail/index",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/account/index",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/account/login",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
"path": "pages/account/cart",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
"path": "pages/account/setting",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
"path": "pages/account/address/list",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
"path": "pages/account/address/create",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/account/order/submit",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/account/order/list",
|
||||
"style": {
|
||||
"navigationStyle" : "custom",
|
||||
"navigationBarTitleText": "uni-app"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#BBBBBB",
|
||||
"selectedColor": "#FF875B",
|
||||
"backgroundColor": "#FFF",
|
||||
"borderStyle" : "white",
|
||||
"fontSize" : "22rpx",
|
||||
"height" : "120rpx",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar/home.png",
|
||||
"selectedIconPath": "static/tabbar/home-active.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/goods/category",
|
||||
"iconPath": "static/tabbar/category.png",
|
||||
"selectedIconPath": "static/tabbar/category-active.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/account/cart",
|
||||
"iconPath": "static/tabbar/shopping-cart.png",
|
||||
"selectedIconPath": "static/tabbar/shopping-cart-active.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/account/index",
|
||||
"iconPath": "static/tabbar/account.png",
|
||||
"selectedIconPath": "static/tabbar/account-active.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "white",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"easycom" : {
|
||||
"autoscan": true,
|
||||
"custom": {
|
||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,318 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-22 13:54:15
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 10:55:44
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="addres-list">
|
||||
<view class="address-item" v-for="(item, index) in list" :key="index">
|
||||
<view class="contacts">
|
||||
<text class="name">{{ item.name }}</text>
|
||||
<text class="phone">{{ item.phone }}</text>
|
||||
</view>
|
||||
<view class="address">
|
||||
<text class="region" v-for="(region, idx) in item.region" :key="idx">{{ region }}</text>
|
||||
<text class="detail">{{ item.detail }}</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="item-option">
|
||||
<view class="_left">
|
||||
<label class="item-radio" @click.stop="handleSetDefault(item.address_id)">
|
||||
<radio class="radio" color="#fa2209" :checked="item.address_id == defaultId"></radio>
|
||||
<text class="text">{{ item.address_id == defaultId ? '默认' : '选择' }}</text>
|
||||
</label>
|
||||
</view>
|
||||
<view class="_right">
|
||||
<view class="events">
|
||||
<view class="event-item" @click="handleUpdate(item.address_id)">
|
||||
<text class="iconfont icon-edit"></text>
|
||||
<text class="title">编辑</text>
|
||||
</view>
|
||||
<view class="event-item" @click="handleRemove(item.address_id)">
|
||||
<text class="iconfont icon-delete"></text>
|
||||
<text class="title">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<BsEmpty v-if="!list.length" :isLoading="isLoading" tips="亲,暂无收货地址" />
|
||||
<!-- 底部操作按钮 -->
|
||||
<view class="footer-fixed">
|
||||
<view class="btn-wrapper">
|
||||
<view class="btn-item btn-item-main" @click="handleCreate()">添加新地址</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import * as AddressApi from '@/api/address'
|
||||
import BsEmpty from '@/components/BsEmpty'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
BsEmpty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//当前页面参数
|
||||
options: {},
|
||||
// 正在加载
|
||||
isLoading: true,
|
||||
// 收货地址列表
|
||||
list: [],
|
||||
// 默认收货地址
|
||||
defaultId: null
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
// 当前页面参数
|
||||
this.options = options
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
// 获取页面数据
|
||||
this.getPageData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 获取页面数据
|
||||
getPageData() {
|
||||
const app = this
|
||||
app.isLoading = true
|
||||
Promise.all([app.getDefaultId(), app.getAddressList()])
|
||||
.then(() => {
|
||||
// 列表排序把默认收货地址放到最前
|
||||
app.onReorder()
|
||||
})
|
||||
.finally(() => app.isLoading = false)
|
||||
},
|
||||
|
||||
// 获取收货地址列表
|
||||
getAddressList() {
|
||||
const app = this
|
||||
return new Promise((resolve, reject) => {
|
||||
app.list = []
|
||||
resolve({})
|
||||
// AddressApi.list()
|
||||
// .then(result => {
|
||||
// app.list = result.data.list
|
||||
// resolve(result)
|
||||
// })
|
||||
// .catch(reject)
|
||||
})
|
||||
},
|
||||
|
||||
// 获取默认的收货地址
|
||||
getDefaultId() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const app = this
|
||||
app.defaultId = null
|
||||
resolve({})
|
||||
// AddressApi.defaultId()
|
||||
// .then(result => {
|
||||
// app.defaultId = result.data.defaultId
|
||||
// resolve(result)
|
||||
// })
|
||||
// .catch(reject)
|
||||
})
|
||||
},
|
||||
|
||||
// 列表排序把默认收货地址放到最前
|
||||
onReorder() {
|
||||
const app = this
|
||||
app.list.sort(item => {
|
||||
return item.address_id == app.defaultId ? -1 : 1
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 添加新地址
|
||||
*/
|
||||
handleCreate() {
|
||||
this.$navTo('pages/address/create')
|
||||
},
|
||||
|
||||
/**
|
||||
* 编辑地址
|
||||
* @param {int} addressId 收货地址ID
|
||||
*/
|
||||
handleUpdate(addressId) {
|
||||
this.$navTo('pages/address/update', { addressId })
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除收货地址
|
||||
* @param {int} addressId 收货地址ID
|
||||
*/
|
||||
handleRemove(addressId) {
|
||||
const app = this
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您确定要删除当前收货地址吗?",
|
||||
success({ confirm }) {
|
||||
confirm && app.onRemove(addressId)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 确认删除收货地址
|
||||
* @param {int} addressId 收货地址ID
|
||||
*/
|
||||
onRemove(addressId) {
|
||||
const app = this
|
||||
// AddressApi.remove(addressId)
|
||||
// .then(result => {
|
||||
// app.getPageData()
|
||||
// })
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置为默认地址
|
||||
* @param {Object} addressId
|
||||
*/
|
||||
handleSetDefault(addressId) {
|
||||
const app = this
|
||||
// AddressApi.setDefault(addressId)
|
||||
// .then(result => {
|
||||
// app.defaultId = addressId
|
||||
// app.options.from === 'checkout' && uni.navigateBack()
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.addres-list {
|
||||
padding-bottom: calc(constant(safe-area-inset-bottom) + 120rpx);
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) + 120rpx);
|
||||
}
|
||||
|
||||
// 项目内容
|
||||
.address-item {
|
||||
margin: 20rpx auto 20rpx auto;
|
||||
padding: 30rpx 40rpx;
|
||||
width: 94%;
|
||||
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 16rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.contacts {
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.name {
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.address {
|
||||
font-size: 28rpx;
|
||||
|
||||
.region {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
margin: 20rpx 0;
|
||||
border-bottom: 1rpx solid #f3f3f3;
|
||||
}
|
||||
|
||||
.item-option {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 48rpx;
|
||||
|
||||
// 单选框
|
||||
.item-radio {
|
||||
font-size: 28rpx;
|
||||
|
||||
.radio {
|
||||
vertical-align: middle;
|
||||
transform: scale(0.76)
|
||||
}
|
||||
|
||||
.text {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
// 操作
|
||||
.events {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 48rpx;
|
||||
|
||||
.event-item {
|
||||
font-size: 28rpx;
|
||||
margin-right: 26rpx;
|
||||
color: #4c4c4c;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 底部操作栏
|
||||
.footer-fixed {
|
||||
position: fixed;
|
||||
bottom: var(--window-bottom);
|
||||
left: 0;
|
||||
right: 0;
|
||||
min-height: 120rpx;
|
||||
z-index: 11;
|
||||
box-shadow: 0 -4rpx 40rpx 0 rgba(151, 151, 151, 0.24);
|
||||
background: #fff;
|
||||
|
||||
// 设置ios刘海屏底部横线安全区域
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
|
||||
.btn-wrapper {
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
|
||||
.btn-item {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.btn-item-main {
|
||||
background: linear-gradient(to right, #f9211c, #ff6335);
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -0,0 +1,653 @@
|
||||
<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>
|
||||
</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;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,136 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-22 15:36:46
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-24 18:05:59
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<image class="arrow" src="@/static/search/arrow.png" @click="$Router.back()"/>
|
||||
</view>
|
||||
<view class="logo">马士兵严选</view>
|
||||
<u--form class="login">
|
||||
<u-form-item>
|
||||
<input placeholder="请输入手机号" v-model="phone" class="login--input" border="bottom" />
|
||||
</u-form-item>
|
||||
<u-form-item class="login--code">
|
||||
<input placeholder="验证码" type="number" maxlength="6" class="login--input" v-model="code" border="bottom" />
|
||||
<u-code ref="uCode" @change="codeChange" changeText="X秒后重新获取"
|
||||
@start="sendStatus = true" @end="sendStatus = false" seconds="10"></u-code>
|
||||
<text class="login--send-btn" :class="sendStatus && 'login--send-btn__disabled'"
|
||||
@click="getCode">{{tips}}</text>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<u-button class="login--btn" @click="login">登录</u-button>
|
||||
<label class="login--agreement">
|
||||
<radio class="radio" :checked="checked" @click="checked = !checked" color="#FF875B"/>
|
||||
同意<text class="link">《用户协议》</text>和<text class="link">《隐私协议》</text>,首次登陆将自动注册
|
||||
</label>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { IsPhone } from '@/common/utils';
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
tips : '',
|
||||
sendStatus : false,
|
||||
checked: false,
|
||||
phone : '',
|
||||
code : ''
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
codeChange(text) {
|
||||
this.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if(!this.$refs.uCode.canGetCode){
|
||||
return false
|
||||
}
|
||||
if(!IsPhone(this.phone)){
|
||||
uni.$u.toast('请输入正确手机号');
|
||||
return false
|
||||
}
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start();
|
||||
}, 2000);
|
||||
},
|
||||
login(){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.header{
|
||||
height: 88rpx;
|
||||
padding-left: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.arrow{
|
||||
width: 14rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
}
|
||||
.logo{
|
||||
font-size: 46rpx;
|
||||
text-align: center;
|
||||
margin: 25rpx 0 84rpx 0;
|
||||
}
|
||||
.login{
|
||||
width: 650rpx;
|
||||
margin: 0 auto;
|
||||
&--input{
|
||||
border-bottom: 2rpx solid #eee;
|
||||
width: 650rpx;
|
||||
height: 100rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
&--code{
|
||||
position: relative;
|
||||
}
|
||||
&--send-btn{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
color: #FF875B;
|
||||
&__disabled{
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
&--btn{
|
||||
width: 650rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 45rpx;
|
||||
font-size: 32rpx;
|
||||
margin: 60rpx 50rpx 40rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(270deg, #FF875B 0%, #FF512B 100%);
|
||||
}
|
||||
&--agreement{
|
||||
width: 650rpx;
|
||||
padding: 0 50rpx;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
.radio{
|
||||
transform: scale(60%);
|
||||
}
|
||||
.link{
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
@ -0,0 +1,20 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-22 16:13:00
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-22 16:17:04
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,18 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-22 10:58:24
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-22 11:15:01
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view></view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,446 @@
|
||||
|
||||
|
||||
.dis-flex{
|
||||
display: flex;
|
||||
}
|
||||
// 配送信息
|
||||
.flow-delivery {
|
||||
padding: 34rpx 30rpx;
|
||||
background: #fff url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANYAAAANCAYAAADVGpDCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3Yjk4M2ExYy1jMDhkLTQ1OTktYTI0Ny1kZjNjYzdiYTQ5ZTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQwNkY3RkU5N0NGMTFFNUI3N0M4NTU4MzM2RjlFODIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQwNkY3RkQ5N0NGMTFFNUI3N0M4NTU4MzM2RjlFODIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNzgwZWI1NS03OGFhLTQzOTUtODQ4OC1lOWI5YmVlYTY1ZDciIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo1OTRiYzUyMy1jMzc3LTExNzgtYTdkZS04NGY3YmM1ZGIxMDMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz556PLxAAACBElEQVR42tyaSyhEYRTHP48imlKibDQeSSlkSlEWLCRFsZNH5FE2FqQ8ErIRC9lIkTwXSpMkWWChhEJCSnlkoUZGSsr78f98n43CMFPu/Z/6NZuZ2zn33/+cb869XkmLx8IDEQaGQJbgiytQDSY3MyL+LYnL/HxPXSoHDIJQQq2WQQk4Dbbb/yUB29LJ+6e3B66VB3ZITbUIEqSpCGoJBP1ghtBUD6ARpEtTGSEhXzd+awE9oJzQUPegWdf3QlBPMhgDMYRa7YNisGWkpP5qrBQtVBShUHugUE9hs4fUtwG0utlEjRivoA/Ug1sj3vjffr8FNJEK1auPFHcE9UTq5pdK2PwcoAzMG7mjuRrRYEIfK9jiDJSCBZJ6ynSTsBBqNQ0qgdPISbq6vJCFbJOaagrEk5gqWNczRGiqG1Ah1LLMafRkf5pYIUKtZnMJDXUNasAIST2ZYFioRx9ssQaKwJFZEv5uYmWDXVJTrYBEElP562PfPKGpnkAbSDOTqb6aWAGgW6iHol5kQj2CdtAJngnqkc1hHMQRNr9DPaXWzZj8Z2PZtFCxhEIdaKE2CGqRJ4060AH8CLUaALX6f5VpBZLhI9SaeZXQVHKNLt84SCIxVbhQi5YuQlNd6OVElZlN9TGxrGBUn2PZ4lyoTdIsST0FQj0UDSLUak6ot3gcBLVY3wQYAJoVXxmNERajAAAAAElFTkSuQmCC') bottom left repeat-x;
|
||||
background-size: 120rpx auto;
|
||||
|
||||
.detail-location {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.detail-content {
|
||||
padding: 0 20rpx;
|
||||
.detail-content__title-phone {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.detail-content__describe {
|
||||
font-size: 28rpx;
|
||||
color: #777;
|
||||
}
|
||||
}
|
||||
.detail-content__title {
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 买家留言
|
||||
.flow-all-money {
|
||||
.ipt-wrapper {
|
||||
input {
|
||||
font-size: 28rpx;
|
||||
width: 100%;
|
||||
height: 75rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 商品列表
|
||||
.checkout_list {
|
||||
padding: 20rpx 30rpx 4rpx 30rpx;
|
||||
background: #fff;
|
||||
border-bottom: 1rpx solid rgb(248, 248, 248);
|
||||
.flow-shopList {
|
||||
padding: 5rpx 0 10rpx;
|
||||
border-bottom: 1rpx solid rgb(248, 248, 248);
|
||||
&:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.flow-header-left {
|
||||
padding-left: 90rpx;
|
||||
}
|
||||
|
||||
/* 会员价 */
|
||||
.flow-shopList {
|
||||
|
||||
.flow-list-right {
|
||||
.flow-cont {
|
||||
|
||||
&.price-delete {
|
||||
font-size: 26rpx;
|
||||
color: #777;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.grade-price {
|
||||
padding-top: 8rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ff495e;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.goods-name{
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* 优惠券选择 */
|
||||
.popup__coupon {
|
||||
width: 750rpx;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
|
||||
.coupon__do_not {
|
||||
.control {
|
||||
width: 90%;
|
||||
height: 72rpx;
|
||||
margin-bottom: 24rpx;
|
||||
color: #888;
|
||||
border: 1rpx solid #e3e3e3;
|
||||
border-radius: 10rpx;
|
||||
/* #ifdef H5 */
|
||||
max-width: 1120rpx;
|
||||
/* #endif */
|
||||
}
|
||||
}
|
||||
|
||||
.coupon__title {
|
||||
text-align: center;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.coupon-list {
|
||||
/* #ifdef H5 */
|
||||
max-width: 1120rpx;
|
||||
margin: 0 auto;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.coupon-item {
|
||||
overflow: hidden;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
|
||||
.item-wrapper {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
border-radius: 8rpx;
|
||||
color: #fff;
|
||||
height: 180rpx;
|
||||
|
||||
.coupon-type {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
width: 128rpx;
|
||||
padding: 6rpx 0;
|
||||
background: #a771ff;
|
||||
font-size: 20rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
transform: rotate(45deg);
|
||||
transform-origin: 64rpx 64rpx;
|
||||
}
|
||||
|
||||
&.color-blue {
|
||||
background: linear-gradient(-125deg, #57bdbf, #2f9de2);
|
||||
}
|
||||
|
||||
&.color-red {
|
||||
background: linear-gradient(-128deg, #ff6d6d, #ff3636);
|
||||
}
|
||||
|
||||
&.color-violet {
|
||||
background: linear-gradient(-113deg, #ef86ff, #b66ff5);
|
||||
|
||||
.coupon-type {
|
||||
background: #55b5ff;
|
||||
}
|
||||
}
|
||||
|
||||
&.color-yellow {
|
||||
background: linear-gradient(-141deg, #f7d059, #fdb054);
|
||||
}
|
||||
|
||||
&.color-gray {
|
||||
background: linear-gradient(-113deg, #bdbdbd, #a2a1a2);
|
||||
|
||||
.coupon-type {
|
||||
background: #9e9e9e;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
padding: 30rpx 20rpx;
|
||||
border-radius: 16rpx 0 0 16rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.receive {
|
||||
height: 46rpx;
|
||||
width: 122rpx;
|
||||
line-height: 46rpx;
|
||||
text-align: center;
|
||||
border: 1rpx solid #fff;
|
||||
border-radius: 30rpx;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
|
||||
&.state {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
position: relative;
|
||||
flex: 0 0 32%;
|
||||
text-align: center;
|
||||
border-radius: 0 16rpx 16rpx 0;
|
||||
|
||||
.money {
|
||||
font-weight: bold;
|
||||
font-size: 52rpx;
|
||||
}
|
||||
|
||||
.pay-line {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.split-line {
|
||||
position: relative;
|
||||
flex: 0 0 0;
|
||||
border-left: 4rpx solid #fff;
|
||||
margin: 0 10rpx 0 6rpx;
|
||||
background: #fff;
|
||||
|
||||
&:before,
|
||||
{
|
||||
border-radius: 0 0 16rpx 16rpx;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&:after {
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 24rpx;
|
||||
height: 12rpx;
|
||||
background: #f7f7f7;
|
||||
left: -14rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* 积分抵扣 */
|
||||
.points {
|
||||
|
||||
.title {
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
|
||||
.icon-help {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.points-money {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
/* 支付方式 */
|
||||
.pay-method {
|
||||
|
||||
.pay-item {
|
||||
padding: 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
border-bottom: 1rpx solid rgb(248, 248, 248);
|
||||
|
||||
.item-left_icon {
|
||||
margin-right: 20rpx;
|
||||
font-size: 32rpx;
|
||||
|
||||
&.wechat {
|
||||
color: #00c800;
|
||||
}
|
||||
|
||||
&.balance {
|
||||
color: #ff9700;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.user-balance {
|
||||
margin-left: 20rpx;
|
||||
font-size: 26rpx;
|
||||
// color: #464646;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 商品规格
|
||||
.goods-props {
|
||||
padding-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
|
||||
.goods-props-item {
|
||||
float: left;
|
||||
.group-name {
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 右侧箭头
|
||||
.right-arrow {
|
||||
margin-left: 16rpx;
|
||||
// color: #777;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
// 底部操作栏
|
||||
.flow-fixed-footer {
|
||||
position: fixed;
|
||||
bottom: var(--window-bottom);
|
||||
left: var(--window-left);
|
||||
right: var(--window-right);
|
||||
// width: 100%;
|
||||
background: #fff;
|
||||
border-top: 1px solid #eee;
|
||||
z-index: 11;
|
||||
|
||||
.chackout-left {
|
||||
font-size: 28rpx;
|
||||
line-height: 92rpx;
|
||||
color: #777;
|
||||
flex: 4;
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.chackout-right {
|
||||
font-size: 34rpx;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
.flow-btn {
|
||||
background: linear-gradient(to right, #f9211c, #ff6335);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 92rpx;
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
// 禁用按钮
|
||||
&.disabled {
|
||||
background: #ff9779;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 积分说明
|
||||
.points-content {
|
||||
padding: 30rpx 48rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 50rpx;
|
||||
text-align: left;
|
||||
color: #606266;
|
||||
height: 620rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 共几件商品 */
|
||||
.flow-num-box {
|
||||
font-size: 28rpx;
|
||||
color: #777;
|
||||
padding: 16rpx 24rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* app.scss */
|
||||
.flow-shopList {
|
||||
padding: 18rpx 0;
|
||||
|
||||
.flow-list-left {
|
||||
margin-right: 20rpx;
|
||||
|
||||
image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border: 1rpx solid #eee;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.flow-list-right {
|
||||
|
||||
.flow-cont {
|
||||
font-size: 28rpx;
|
||||
color: #fa2209;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 26rpx;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.flow-list-cont {
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.flow-all-money {
|
||||
padding: 0 24rpx;
|
||||
color: #444;
|
||||
|
||||
.flow-all-list {
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid rgb(248, 248, 248);
|
||||
}
|
||||
|
||||
.flow-all-list:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.flow-all-list-cont {
|
||||
font-size: 28rpx;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.flow-arrow {
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-22 15:09:06
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-22 16:19:06
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view>
|
||||
<u-cell :isLink="true" arrow-direction="right" label="昵称">
|
||||
<u-image slot="icon" shape="circle" width="100rpx" height="100rpx" ></u-image>
|
||||
</u-cell>
|
||||
<u-cell label="我的收货地址" :isLink="true" rightIcon="arrow-right"></u-cell>
|
||||
<u-cell label="版本号" value="1.0.0"></u-cell>
|
||||
<u-button type="primary" text="退出登录"></u-button>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<!-- 商品评价 -->
|
||||
<view v-if="!isLoading && list.length" class="goods-comment m-top20">
|
||||
<view class="item-title dis-flex">
|
||||
<view class="block-left flex-box">
|
||||
商品评价 (<text class="total">{{ total }}条</text>)
|
||||
</view>
|
||||
<view class="block-right">
|
||||
<text @click="onTargetToComment" class="show-more col-9">查看更多</text>
|
||||
<text class="iconfont icon-arrow-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 评论列表 -->
|
||||
<view class="comment-list">
|
||||
<view class="comment-item" v-for="(item, index) in list" :key="index">
|
||||
<view class="comment-item_row dis-flex flex-y-center">
|
||||
<view class="user-info dis-flex flex-y-center">
|
||||
<avatar-image class="user-avatar" :url="item.user.avatar_url" :width="50" />
|
||||
<text class="user-name">{{ item.user.nick_name }}</text>
|
||||
</view>
|
||||
<!-- 评星 -->
|
||||
<view class="star-rating">
|
||||
<u-rate active-color="#f4a213" :current="rates[item.score]" :disabled="true" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-content m-top20">
|
||||
<text class="f-26 twoline-hide">{{ item.content }}</text>
|
||||
</view>
|
||||
<view class="comment-time">{{ item.create_time }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AvatarImage from '@/components/avatar-image'
|
||||
import * as CommentApi from '@/api/comment'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AvatarImage
|
||||
},
|
||||
props: {
|
||||
// 商品ID
|
||||
goodsId: {
|
||||
type: Number,
|
||||
default: null
|
||||
},
|
||||
// 加载多少条记录 默认2条
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 2
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 正在加载
|
||||
isLoading: true,
|
||||
// 评星数据转换
|
||||
rates: { 10: 5, 20: 3, 30: 1 },
|
||||
// 评价列表数据
|
||||
list: [],
|
||||
// 评价总数量
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
// 加载评价列表数据
|
||||
this.getCommentList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 加载评价列表数据
|
||||
getCommentList() {
|
||||
const app = this
|
||||
app.isLoading = true
|
||||
CommentApi.listRows(app.goodsId, app.limit)
|
||||
.then(result => {
|
||||
app.list = result.data.list
|
||||
app.total = result.data.total
|
||||
})
|
||||
.catch(err => err)
|
||||
.finally(() => app.isLoading = false)
|
||||
},
|
||||
|
||||
// 跳转到评论列表页
|
||||
onTargetToComment() {
|
||||
const app = this
|
||||
app.$navTo('pages/comment/index', { goodsId: app.goodsId })
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.goods-comment {
|
||||
padding: 20rpx 30rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 25rpx;
|
||||
|
||||
.total {
|
||||
margin: 0 4rpx;
|
||||
}
|
||||
|
||||
.show-more {
|
||||
margin-right: 8rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.comment-item {
|
||||
padding: 15rpx 5rpx;
|
||||
margin-bottom: 10rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.comment-item_row {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.user-info {
|
||||
margin-right: 15rpx;
|
||||
|
||||
.user-avatar {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.item-content {
|
||||
color: #333;
|
||||
margin: 16rpx 0;
|
||||
max-height: 76rpx;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
|
||||
.comment-time {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<view v-if="list.length" class="service-wrapper">
|
||||
<!-- 服务简述 -->
|
||||
<view class="service-simple" @click="handlePopup">
|
||||
<view class="s-list">
|
||||
<view class="s-item" v-for="(item, index) in list" :key="index">
|
||||
<text class="item-icon iconfont icon-fuwu"></text>
|
||||
<text class="item-val">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 扩展箭头 -->
|
||||
<view class="s-arrow f-26 col-9 t-r">
|
||||
<text class="iconfont icon-arrow-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情内容弹窗 -->
|
||||
<u-popup v-model="showPopup" mode="bottom" :closeable="true" :border-radius="26">
|
||||
<view class="service-content">
|
||||
<view class="title">服务</view>
|
||||
<scroll-view class="content-scroll" :scroll-y="true">
|
||||
<view class="s-list clearfix">
|
||||
<view class="s-item" v-for="(item, index) in list" :key="index">
|
||||
<text class="item-icon iconfont icon-fuwu"></text>
|
||||
<view class="item-val">{{ item.name }}</view>
|
||||
<view class="item-summary">{{ item.summary }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
props: {
|
||||
// 商品ID
|
||||
goodsId: {
|
||||
type: Number,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 正在加载
|
||||
isLoading: true,
|
||||
// 显示详情内容弹窗
|
||||
showPopup: false,
|
||||
// 服务列表数据
|
||||
list: []
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
// 获取商品服务列表
|
||||
this.getServiceList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 获取商品服务列表
|
||||
getServiceList() {
|
||||
const app = this
|
||||
app.isLoading = true
|
||||
// ServiceApi.list(app.goodsId)
|
||||
// .then(result => app.list = result.data.list)
|
||||
// .finally(() => app.isLoading = false)
|
||||
},
|
||||
|
||||
// 显示弹窗
|
||||
handlePopup() {
|
||||
this.showPopup = !this.showPopup
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.service-wrapper {
|
||||
min-height: 24rpx;
|
||||
margin-bottom: -24rpx;
|
||||
}
|
||||
|
||||
// 服务简述
|
||||
.service-simple {
|
||||
padding: 24rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.s-list {
|
||||
flex: 1;
|
||||
margin-left: -15rpx;
|
||||
}
|
||||
|
||||
.s-item {
|
||||
float: left;
|
||||
font-size: 26rpx;
|
||||
margin: 8rpx 15rpx;
|
||||
|
||||
.item-icon {
|
||||
color: #FA2209;
|
||||
}
|
||||
|
||||
.item-val {
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 服务详细内容
|
||||
.service-content {
|
||||
padding: 24rpx;
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 50rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-scroll {
|
||||
min-height: 400rpx;
|
||||
max-height: 760rpx;
|
||||
}
|
||||
|
||||
.s-list {
|
||||
padding: 0 30rpx 0 80rpx;
|
||||
}
|
||||
|
||||
.s-item {
|
||||
position: relative;
|
||||
margin-bottom: 60rpx;
|
||||
|
||||
.item-icon {
|
||||
position: absolute;
|
||||
top: 6rpx;
|
||||
left: -50rpx;
|
||||
color: #FA2209;
|
||||
}
|
||||
|
||||
.item-val {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.item-summary {
|
||||
font-size: 26rpx;
|
||||
margin-top: 20rpx;
|
||||
color: #6d6d6d;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<goods-sku-popup :value="value" @input="onChangeValue" border-radius="20" :localdata="goodsInfo" :mode="skuMode"
|
||||
:maskCloseAble="true" @open="openSkuPopup" @close="closeSkuPopup" @add-cart="addCart" @buy-now="buyNow"
|
||||
buyNowText="立即购买" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { setCartTotalNum } from '@/core/app'
|
||||
// import * as CartApi from '@/api/cart'
|
||||
import GoodsSkuPopup from '@/components/goods-sku-popup'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GoodsSkuPopup
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'input'
|
||||
},
|
||||
props: {
|
||||
// true 组件显示 false 组件隐藏
|
||||
value: {
|
||||
Type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 模式 1:都显示 2:只显示购物车 3:只显示立即购买
|
||||
skuMode: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
// 商品详情信息
|
||||
goods: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
goodsInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
const app = this
|
||||
const { goods } = app
|
||||
app.goodsInfo = {
|
||||
_id: goods.goods_id,
|
||||
name: goods.goods_name,
|
||||
goods_thumb: goods.goods_image,
|
||||
sku_list: app.getSkuList(),
|
||||
spec_list: app.getSpecList()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 监听组件显示隐藏
|
||||
onChangeValue(val) {
|
||||
this.$emit('input', val)
|
||||
},
|
||||
|
||||
// 整理商品SKU列表
|
||||
getSkuList() {
|
||||
const app = this
|
||||
const { goods: { goods_name, goods_image, skuList } } = app
|
||||
const skuData = []
|
||||
skuList.forEach(item => {
|
||||
skuData.push({
|
||||
_id: item.id,
|
||||
goods_sku_id: item.goods_sku_id,
|
||||
goods_id: item.goods_id,
|
||||
goods_name: goods_name,
|
||||
image: item.image_url ? item.image_url : goods_image,
|
||||
price: item.goods_price * 100,
|
||||
stock: item.stock_num,
|
||||
spec_value_ids: item.spec_value_ids,
|
||||
sku_name_arr: app.getSkuNameArr(item.spec_value_ids)
|
||||
})
|
||||
})
|
||||
return skuData
|
||||
},
|
||||
|
||||
// 获取sku记录的规格值列表
|
||||
getSkuNameArr(specValueIds) {
|
||||
const app = this
|
||||
const defaultData = ['默认']
|
||||
const skuNameArr = []
|
||||
if (specValueIds) {
|
||||
specValueIds.forEach((valueId, groupIndex) => {
|
||||
const specValueName = app.getSpecValueName(valueId, groupIndex)
|
||||
skuNameArr.push(specValueName)
|
||||
})
|
||||
}
|
||||
return skuNameArr.length ? skuNameArr : defaultData
|
||||
},
|
||||
|
||||
// 获取指定的规格值名称
|
||||
getSpecValueName(valueId, groupIndex) {
|
||||
const app = this
|
||||
const { goods: { specList } } = app
|
||||
const res = specList[groupIndex].valueList.find(specValue => {
|
||||
return specValue.spec_value_id == valueId
|
||||
})
|
||||
return res.spec_value
|
||||
},
|
||||
|
||||
// 整理规格数据
|
||||
getSpecList() {
|
||||
const { goods: { specList } } = this
|
||||
const defaultData = [{ name: '默认', list: [{ name: '默认' }] }]
|
||||
const specData = []
|
||||
specList.forEach(group => {
|
||||
const children = []
|
||||
group.valueList.forEach(specValue => {
|
||||
children.push({ name: specValue.spec_value })
|
||||
})
|
||||
specData.push({
|
||||
name: group.spec_name,
|
||||
list: children
|
||||
})
|
||||
})
|
||||
return specData.length ? specData : defaultData
|
||||
},
|
||||
|
||||
// sku组件 开始-----------------------------------------------------------
|
||||
openSkuPopup() {
|
||||
// console.log("监听 - 打开sku组件")
|
||||
},
|
||||
|
||||
closeSkuPopup() {
|
||||
// console.log("监听 - 关闭sku组件")
|
||||
},
|
||||
|
||||
// 加入购物车按钮
|
||||
addCart(selectShop) {
|
||||
const app = this
|
||||
const { goods_id, goods_sku_id, buy_num } = selectShop
|
||||
// CartApi.add(goods_id, goods_sku_id, buy_num)
|
||||
// .then(result => {
|
||||
// // 显示成功
|
||||
// app.$toast(result.message)
|
||||
// // 隐藏当前弹窗
|
||||
// app.onChangeValue(false)
|
||||
// // 购物车商品总数量
|
||||
// const cartTotal = result.data.cartTotal
|
||||
// // 缓存购物车数量
|
||||
// setCartTotalNum(cartTotal)
|
||||
// // 传递给父级
|
||||
// app.$emit('addCart', cartTotal)
|
||||
// })
|
||||
},
|
||||
|
||||
// 立即购买
|
||||
buyNow(selectShop) {
|
||||
// 跳转到订单结算页
|
||||
this.$navTo('pages/checkout/index', {
|
||||
mode: 'buyNow',
|
||||
goodsId: selectShop.goods_id,
|
||||
goodsSkuId: selectShop.goods_sku_id,
|
||||
goodsNum: selectShop.buy_num
|
||||
})
|
||||
// 隐藏当前弹窗
|
||||
this.onChangeValue(false)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,230 @@
|
||||
.container {
|
||||
// 设置ios刘海屏底部横线安全区域
|
||||
// 110 - 18 + 4
|
||||
padding-bottom: calc(constant(safe-area-inset-bottom) + 106rpx + 6rpx);
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) + 106rpx + 6rpx);
|
||||
}
|
||||
|
||||
// 商品信息
|
||||
.goods-info {
|
||||
background: #fff;
|
||||
padding: 25rpx 30rpx;
|
||||
}
|
||||
|
||||
.info-item__top {
|
||||
min-height: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.floor-price__samll {
|
||||
font-size: 26rpx;
|
||||
line-height: 1;
|
||||
color: #FA2209;
|
||||
margin-bottom: -10rpx;
|
||||
}
|
||||
|
||||
// 商品价
|
||||
.floor-price {
|
||||
color: #FA2209;
|
||||
margin-right: 15rpx;
|
||||
font-size: 42rpx;
|
||||
}
|
||||
|
||||
.original-price {
|
||||
font-size: 26rpx;
|
||||
text-decoration: line-through;
|
||||
color: #959595;
|
||||
margin-right: 15rpx;
|
||||
margin-bottom: -6rpx;
|
||||
}
|
||||
|
||||
// 会员价标签
|
||||
.user-grade {
|
||||
background: #3c3c3c;
|
||||
border-radius: 6rpx;
|
||||
padding: 8rpx 14rpx;
|
||||
margin-right: 15rpx;
|
||||
font-size: 24rpx;
|
||||
color: #EEE0C3;
|
||||
}
|
||||
|
||||
.goods-sales {
|
||||
font-size: 24rpx;
|
||||
color: #959595;
|
||||
}
|
||||
|
||||
.info-item__name .goods-name {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
/* 商品分享 */
|
||||
|
||||
.goods-share__line {
|
||||
border-left: 1rpx solid #f4f4f4;
|
||||
height: 60rpx;
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
|
||||
.goods-share .share-btn {
|
||||
line-height: normal;
|
||||
padding: 0;
|
||||
background: none;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
font-size: 8pt;
|
||||
border: none;
|
||||
color: #191919;
|
||||
}
|
||||
|
||||
.goods-share .share-btn::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.goods-share .share__icon {
|
||||
font-size: 40rpx;
|
||||
margin-bottom: 5rpx;
|
||||
}
|
||||
|
||||
// 商品卖点
|
||||
.info-item_selling-point {
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
// 选择商品规格
|
||||
.goods-choice {
|
||||
padding: 26rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.spec-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.spec-name {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 商品详情
|
||||
.goods-content .item-title {
|
||||
padding: 26rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
// 底部操作栏
|
||||
.footer-fixed {
|
||||
position: fixed;
|
||||
bottom: var(--window-bottom);
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
z-index: 11;
|
||||
box-shadow: 0 -4rpx 40rpx 0 rgba(151, 151, 151, 0.24);
|
||||
background: #fff;
|
||||
|
||||
// 设置ios刘海屏底部横线安全区域
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.footer-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
height: 106rpx;
|
||||
}
|
||||
|
||||
// 快捷菜单
|
||||
.foo-item-fast {
|
||||
box-sizing: border-box;
|
||||
width: 256rpx;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.fast-item {
|
||||
position: relative;
|
||||
padding: 4rpx 10rpx;
|
||||
line-height: 1;
|
||||
// text-align: center;
|
||||
|
||||
.fast-icon {
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
&--home {
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
&--cart {
|
||||
.fast-icon { padding-left: 3px; }
|
||||
}
|
||||
|
||||
// 角标
|
||||
.fast-badge {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
min-width: 16px;
|
||||
padding: 0 3px;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
font-family: -apple-system-font, Helvetica Neue, Arial, sans-serif;
|
||||
line-height: 1.2;
|
||||
text-align: center;
|
||||
background-color: #ee0a24;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 999px;
|
||||
}
|
||||
.fast-badge--fixed {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transform-origin: 100%
|
||||
}
|
||||
|
||||
.fast-icon {
|
||||
font-size: 46rpx;
|
||||
}
|
||||
|
||||
.fast-text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 操作按钮
|
||||
.foo-item-btn {
|
||||
flex: 1;
|
||||
|
||||
.btn-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn-item {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
height: 72rpx;
|
||||
margin-right: 16rpx;
|
||||
color: #fff;
|
||||
border-radius: 50rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
// 立即购买按钮
|
||||
.btn-item-main {
|
||||
background: linear-gradient(to right, #f9211c, #ff6335);
|
||||
}
|
||||
|
||||
// 购物车按钮
|
||||
.btn-item-deputy {
|
||||
background: linear-gradient(to right, #ffa600, #ffbb00);
|
||||
}
|
||||
}
|
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<goods-sku-popup :value="value" @input="onChangeValue" border-radius="20" :localdata="goodsInfo" :mode="skuMode"
|
||||
:maskCloseAble="true" @open="openSkuPopup" @close="closeSkuPopup" @add-cart="addCart" @buy-now="buyNow"
|
||||
buyNowText="立即购买" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { setCartTotalNum } from '@/core/app'
|
||||
// import * as CartApi from '@/api/cart'
|
||||
import GoodsSkuPopup from '@/components/goods-sku-popup'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GoodsSkuPopup
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'input'
|
||||
},
|
||||
props: {
|
||||
// true 组件显示 false 组件隐藏
|
||||
value: {
|
||||
Type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 模式 1:都显示 2:只显示购物车 3:只显示立即购买
|
||||
skuMode: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
// 商品详情信息
|
||||
goods: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
goodsInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
const app = this
|
||||
const { goods } = app
|
||||
app.goodsInfo = {
|
||||
_id: goods.goods_id,
|
||||
name: goods.goods_name,
|
||||
goods_thumb: goods.goods_image,
|
||||
sku_list: app.getSkuList(),
|
||||
spec_list: app.getSpecList()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 监听组件显示隐藏
|
||||
onChangeValue(val) {
|
||||
this.$emit('input', val)
|
||||
},
|
||||
|
||||
// 整理商品SKU列表
|
||||
getSkuList() {
|
||||
const app = this
|
||||
const { goods: { goods_name, goods_image, skuList } } = app
|
||||
const skuData = []
|
||||
skuList.forEach(item => {
|
||||
skuData.push({
|
||||
_id: item.id,
|
||||
goods_sku_id: item.goods_sku_id,
|
||||
goods_id: item.goods_id,
|
||||
goods_name: goods_name,
|
||||
image: item.image_url ? item.image_url : goods_image,
|
||||
price: item.goods_price * 100,
|
||||
stock: item.stock_num,
|
||||
spec_value_ids: item.spec_value_ids,
|
||||
sku_name_arr: app.getSkuNameArr(item.spec_value_ids)
|
||||
})
|
||||
})
|
||||
return skuData
|
||||
},
|
||||
|
||||
// 获取sku记录的规格值列表
|
||||
getSkuNameArr(specValueIds) {
|
||||
const app = this
|
||||
const defaultData = ['默认']
|
||||
const skuNameArr = []
|
||||
if (specValueIds) {
|
||||
specValueIds.forEach((valueId, groupIndex) => {
|
||||
const specValueName = app.getSpecValueName(valueId, groupIndex)
|
||||
skuNameArr.push(specValueName)
|
||||
})
|
||||
}
|
||||
return skuNameArr.length ? skuNameArr : defaultData
|
||||
},
|
||||
|
||||
// 获取指定的规格值名称
|
||||
getSpecValueName(valueId, groupIndex) {
|
||||
const app = this
|
||||
const { goods: { specList } } = app
|
||||
const res = specList[groupIndex].valueList.find(specValue => {
|
||||
return specValue.spec_value_id == valueId
|
||||
})
|
||||
return res.spec_value
|
||||
},
|
||||
|
||||
// 整理规格数据
|
||||
getSpecList() {
|
||||
const { goods: { specList } } = this
|
||||
const defaultData = [{ name: '默认', list: [{ name: '默认' }] }]
|
||||
const specData = []
|
||||
specList.forEach(group => {
|
||||
const children = []
|
||||
group.valueList.forEach(specValue => {
|
||||
children.push({ name: specValue.spec_value })
|
||||
})
|
||||
specData.push({
|
||||
name: group.spec_name,
|
||||
list: children
|
||||
})
|
||||
})
|
||||
return specData.length ? specData : defaultData
|
||||
},
|
||||
|
||||
// sku组件 开始-----------------------------------------------------------
|
||||
openSkuPopup() {
|
||||
// console.log("监听 - 打开sku组件")
|
||||
},
|
||||
|
||||
closeSkuPopup() {
|
||||
// console.log("监听 - 关闭sku组件")
|
||||
},
|
||||
|
||||
// 加入购物车按钮
|
||||
addCart(selectShop) {
|
||||
const app = this
|
||||
const { goods_id, goods_sku_id, buy_num } = selectShop
|
||||
// CartApi.add(goods_id, goods_sku_id, buy_num)
|
||||
// .then(result => {
|
||||
// // 显示成功
|
||||
// app.$toast(result.message)
|
||||
// // 隐藏当前弹窗
|
||||
// app.onChangeValue(false)
|
||||
// // 购物车商品总数量
|
||||
// const cartTotal = result.data.cartTotal
|
||||
// // 缓存购物车数量
|
||||
// setCartTotalNum(cartTotal)
|
||||
// // 传递给父级
|
||||
// app.$emit('addCart', cartTotal)
|
||||
// })
|
||||
},
|
||||
|
||||
// 立即购买
|
||||
buyNow(selectShop) {
|
||||
// 跳转到订单结算页
|
||||
this.$navTo('pages/checkout/index', {
|
||||
mode: 'buyNow',
|
||||
goodsId: selectShop.goods_id,
|
||||
goodsSkuId: selectShop.goods_sku_id,
|
||||
goodsNum: selectShop.buy_num
|
||||
})
|
||||
// 隐藏当前弹窗
|
||||
this.onChangeValue(false)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,139 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-23 17:27:21
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-24 14:10:20
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view>
|
||||
<SlideImage :images="goods.goods_images"></SlideImage>
|
||||
<view class="goods-info">
|
||||
<view class="pirce">
|
||||
<text>¥</text>
|
||||
<text>199.9</text>
|
||||
<text>起</text>
|
||||
</view>
|
||||
<view class="goods-info--title">{{goods.goods_name}}</view>
|
||||
</view>
|
||||
<view class="select">
|
||||
<Service></Service>
|
||||
|
||||
<u-cell label="选择" :border="false" isLink @click="onShowSkuPopup()"></u-cell>
|
||||
<SkuPopup v-model="showSkuPopup" :skuMode="skuMode" :goods="goods" @addCart="onAddCart" ></SkuPopup>
|
||||
</view>
|
||||
<view class="goods-desc">
|
||||
<mp-html :content="goods.content"/>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<view class="footer--left">
|
||||
<view class="icon service">客服</view>
|
||||
<view class="icon cart">购物车</view>
|
||||
</view>
|
||||
<view class="footer--btns">
|
||||
<button class="btn" plain @click="onShowSkuPopup(2)">加入购物车</button>
|
||||
<button class="btn" plain @click="onShowSkuPopup(3)">立即购买</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import goodsDetailData from '@/mock/goodsDetail.json';
|
||||
import SlideImage from '@/pages/goods/detail/SlideImage.vue';
|
||||
import Service from './Service.vue';
|
||||
import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html';
|
||||
import SkuPopup from './SkuPopup.vue';
|
||||
export default {
|
||||
components: { SlideImage, mpHtml, Service, SkuPopup},
|
||||
data(){
|
||||
return {
|
||||
goods : goodsDetailData.data.detail,
|
||||
showSkuPopup : false,
|
||||
// sku弹窗模式 1:都显示 2:只显示购物车 3:只显示立即购买
|
||||
skuMode : 1
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
/**
|
||||
* 显示/隐藏SKU弹窗
|
||||
* @param {skuMode} 模式 1:都显示 2:只显示购物车 3:只显示立即购买
|
||||
*/
|
||||
onShowSkuPopup(skuMode = 1) {
|
||||
this.skuMode = skuMode
|
||||
this.showSkuPopup = true
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
page{
|
||||
background: #f8f8f8;
|
||||
padding-bottom: 138rpx;
|
||||
}
|
||||
.goods-info{
|
||||
margin: 20rpx 30rpx 0;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
&--title{
|
||||
font-size: 32rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
}
|
||||
.select{
|
||||
margin: 20rpx 30rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.goods-desc{
|
||||
margin: 20rpx 30rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.footer{
|
||||
height: 138rpx;
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
border-top-left-radius: 24rpx;
|
||||
border-top-right-radius: 24rpx;
|
||||
background: #fff;
|
||||
&--left{
|
||||
display: flex;
|
||||
}
|
||||
&--btns{
|
||||
background: #FFF3EE;
|
||||
border-radius: 40rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.icon{
|
||||
font-size: 22rpx;
|
||||
padding-top: 60rpx;
|
||||
background: url('@/static/tabbar/home.png') no-repeat center top;
|
||||
background-size: 48rpx;
|
||||
color: #333;
|
||||
&.cart{
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
}
|
||||
.btn{
|
||||
width: 250rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
display: inline-block;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 28rpx;
|
||||
color: #FF875B;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,105 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-23 16:37:30
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 17:16:03
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="sort">
|
||||
<view class="sort--item" :class="item.value == 'all' && 'sort--item__active'" v-for="item in sortData" :key="item.value">
|
||||
<text class="sort--label">{{item.label}}</text>
|
||||
<view>
|
||||
<view class="sort--icon sort--icon__up sort--icon__active"></view>
|
||||
<view class="sort--icon sort--icon__down"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="sort-item" :class="{ active: sortType === 'all' }" @click="handleSortType('all')">
|
||||
<text>综合</text>
|
||||
</view>
|
||||
<view class="sort-item" :class="{ active: sortType === 'sales' }" @click="handleSortType('sales')">
|
||||
<text>销量</text>
|
||||
</view>
|
||||
<view class="sort-item sort-item-price" :class="{ active: sortType === 'price' }" @click="handleSortType('price')">
|
||||
<text>价格</text>
|
||||
<view class="price-arrow">
|
||||
<view class="icon up" :class="{ active: sortType === 'price' && !sortPrice }">
|
||||
<text class="iconfont icon-arrow-up"></text>
|
||||
</view>
|
||||
<view class="icon down" :class="{ active: sortType === 'price' && sortPrice }">
|
||||
<text class="iconfont icon-arrow-down"></text> </view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
sortData : [
|
||||
{
|
||||
value : 'all',
|
||||
label : '综合',
|
||||
sort : 'ASC'
|
||||
},
|
||||
{
|
||||
value : 'pirce',
|
||||
label : '价格',
|
||||
sort : 'ASC'
|
||||
},
|
||||
{
|
||||
value : 'num',
|
||||
label : '销量',
|
||||
sort : 'ASC'
|
||||
},
|
||||
{
|
||||
value : 'new',
|
||||
label : '上新',
|
||||
sort : 'ASC'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.sort{
|
||||
height: 88rpx;
|
||||
padding: 0 40rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
&--item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #666;
|
||||
&__active{
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
&--label{
|
||||
font-size: 28rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
&--icon{
|
||||
border: 8rpx solid #999;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
&__up{
|
||||
border-top-color: transparent;
|
||||
margin-bottom: 6rpx;
|
||||
|
||||
&.sort--icon__active{
|
||||
border-bottom-color: #FF7F39;
|
||||
}
|
||||
}
|
||||
&__down{
|
||||
border-bottom-color: transparent;
|
||||
&.sort--icon__active{
|
||||
border-top-color: #FF7F39;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,44 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-21 10:31:54
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 17:03:25
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view>
|
||||
<view class="header">
|
||||
<BsSearchTop :value="$Route.query.search"></BsSearchTop>
|
||||
<!-- 排序标签 -->
|
||||
<Sort></Sort>
|
||||
</view>
|
||||
<BsGoodsGroup class="goods-group"></BsGoodsGroup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import BsGoodsGroup from "@/components/BsGoodsGroup.vue";
|
||||
import BsSearchTop from "@/components/BsSearchTop.vue";
|
||||
import Sort from "./Sort.vue";
|
||||
export default {
|
||||
components: { BsGoodsGroup, BsSearchTop, Sort },
|
||||
data() {
|
||||
return {
|
||||
sortType: "all", // 排序类型
|
||||
sortPrice: false, // 价格排序 (true高到低 false低到高)
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
.header {
|
||||
position: sticky;
|
||||
top: var(--window-top);
|
||||
z-index: 99;
|
||||
}
|
||||
.goods-group {
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,173 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-21 11:29:38
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 17:18:48
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="search">
|
||||
<image class="search--icon" src="@/static/search/arrow.png" @click="$Router.back()"></image>
|
||||
<u--input class="search--input" placeholder="请输入您想搜索的商品名称"
|
||||
prefixIcon="search" clearable prefixIconStyle="font-size:48rpx;color:#ccc"
|
||||
v-model="searchValue" placeholderClass="search--input__placeholder"></u--input>
|
||||
<text class="search--btn" @click="onSearch">搜索</text>
|
||||
</view>
|
||||
<view class="history" v-if="historyList.length">
|
||||
<view class="history--head">
|
||||
<text>最近搜索</text>
|
||||
<image class="history--del" src="@/static/search/del.png" @click="clearHistory" />
|
||||
</view>
|
||||
<view class="history--list">
|
||||
<view class="history--item" v-for="(val, index) in historyList"
|
||||
:key="index" @click="handleQuick(val)">{{ val }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
const HISTORY_SEARCH_KEY = "historySearch";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
historyList : [],
|
||||
searchValue: '',
|
||||
};
|
||||
},
|
||||
onShow(){
|
||||
this.searchValue = '';
|
||||
this.historyList = uni.getStorageSync(HISTORY_SEARCH_KEY) || [];
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 搜索提交
|
||||
*/
|
||||
onSearch() {
|
||||
const { searchValue } = this;
|
||||
if (searchValue) {
|
||||
this.setHistory(searchValue);
|
||||
this.$Router.push({path:'/pages/goods/list/index', query :{
|
||||
search: searchValue
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 清空最近搜索记录
|
||||
*/
|
||||
clearHistory() {
|
||||
this.updateHistoryStorage([]);
|
||||
},
|
||||
/**
|
||||
* 记录历史搜索
|
||||
*/
|
||||
setHistory(searchValue) {
|
||||
const data = this.historyList;
|
||||
const index = data.indexOf(searchValue);
|
||||
index > -1 && data.splice(index, 1);
|
||||
data.unshift(searchValue);
|
||||
if(data.length === 11){
|
||||
data.pop();
|
||||
}
|
||||
this.updateHistoryStorage(data);
|
||||
},
|
||||
/**
|
||||
* 更新历史搜索缓存
|
||||
* @param {Object} data
|
||||
*/
|
||||
updateHistoryStorage(data) {
|
||||
this.historyList = data;
|
||||
uni.setStorageSync(HISTORY_SEARCH_KEY, data);
|
||||
},
|
||||
|
||||
/**
|
||||
* 跳转到最近搜索
|
||||
*/
|
||||
handleQuick(searchValue) {
|
||||
this.setHistory(searchValue);
|
||||
this.$Router.push({path:'/pages/goods/list/index', query :{
|
||||
search: searchValue
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page{
|
||||
background: #fff;
|
||||
}
|
||||
.container{
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.search{
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
&--icon{
|
||||
width: 14rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
&--input{
|
||||
display: block;
|
||||
margin: 0 40rpx;
|
||||
height: 70rpx;
|
||||
border:none;
|
||||
box-sizing: border-box;
|
||||
background: #F8F8F8;
|
||||
&__placeholder{
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
&--btn{
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 最近搜索
|
||||
.history {
|
||||
&--head {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
&--del{
|
||||
width: 27rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
&--list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
&--item{
|
||||
max-width: 276rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding: 0 20rpx;
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
background: #F8F8F8;
|
||||
margin: 10rpx 18rpx 10rpx 0;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -0,0 +1,93 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-23 10:31:12
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 10:31:16
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="banner">
|
||||
<u-swiper :list="bannerList" height="240rpx" indicator indicatorMode="dot"></u-swiper>
|
||||
<view class="desc">
|
||||
<view class="desc--item">
|
||||
<image class="desc--icon" src='@/static/index/bz.png'></image>
|
||||
<text class="desc--txt">马士兵严选</text>
|
||||
</view>
|
||||
<view class="desc--item">
|
||||
<image class="desc--icon" src='@/static/index/bz.png'></image>
|
||||
<text class="desc--txt">100%正品</text>
|
||||
</view>
|
||||
<view class="desc--item">
|
||||
<image class="desc--icon" src='@/static/index/bz.png'></image>
|
||||
<text class="desc--txt">365天质保</text>
|
||||
</view>
|
||||
<view class="desc--item">
|
||||
<image class="desc--icon" src='@/static/index/bz.png'></image>
|
||||
<text class="desc--txt">售后无忧</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
bannerList : []
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.banner{
|
||||
height: 298rpx;
|
||||
position: relative;
|
||||
padding: 40rpx 30rpx 0;
|
||||
margin-bottom: 50rpx;
|
||||
&::before{
|
||||
display: block;
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -5vw;
|
||||
top:0;
|
||||
height: 231rpx;
|
||||
width: 110vw;
|
||||
background: #69ADE5;
|
||||
border-bottom-left-radius: 100%;
|
||||
border-bottom-right-radius: 100%;
|
||||
}
|
||||
}
|
||||
.desc{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 24rpx;
|
||||
&--item{
|
||||
display: flex;
|
||||
}
|
||||
&--icon{
|
||||
width: 22rpx;
|
||||
height: 24rpx;
|
||||
position: relative;
|
||||
margin-right: 11rpx;
|
||||
overflow: initial;
|
||||
// box-shadow: 0 0 5rpx #f00;
|
||||
&::before{
|
||||
display: block;
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 50%;
|
||||
top: 10rpx;
|
||||
left: 7rpx;
|
||||
box-shadow: 0 0 20rpx #FA7204;
|
||||
background: #FA7204;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
&--txt{
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,39 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-23 10:29:07
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 10:29:10
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="pick">
|
||||
<view class="pick-max">
|
||||
|
||||
</view>
|
||||
<view class="pick-min"></view>
|
||||
<view class="pick-min"></view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.pick{
|
||||
margin: 0 30rpx;
|
||||
height: 450rpx;
|
||||
display: flex;
|
||||
flex-flow: column wrap;
|
||||
justify-content: space-between;
|
||||
&-max{
|
||||
width: 335rpx;
|
||||
height: 450rpx;
|
||||
background: #fff;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
&-min{
|
||||
width: 335rpx;
|
||||
height: 215rpx;
|
||||
background: #fff;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,182 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-23 10:07:48
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 10:08:58
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="sekill">
|
||||
<view class="sekill-title">
|
||||
<view class="sekill-title--left">
|
||||
<text class="sekill-title--text">限时秒杀</text>
|
||||
<view class="sekill-title--time">
|
||||
<text class="sekill-title--time-name">14点场</text>
|
||||
<image class="sekill-title--time-icon" src="@/static/index/time.png"></image>
|
||||
<text class="sekill-title--time-time">14:20:30</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sekill-title--more" @click="$Router.push('/pages/sekill/index')">
|
||||
<text>查看更多</text>
|
||||
<image class="sekill-title--more-icon" src="@/static/common/arrow.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sekill--group">
|
||||
<view>
|
||||
<image class="sekill--item-img"></image>
|
||||
<view class="sekill--item-pirce-box">
|
||||
<text>秒杀价</text>
|
||||
<text class="sekill--item-pirce">¥29</text>
|
||||
</view>
|
||||
<text class="sekill--item-original-pirce">¥50</text>
|
||||
</view>
|
||||
<view>
|
||||
<image class="sekill--item-img"></image>
|
||||
<view class="sekill--item-pirce-box">
|
||||
<text>秒杀价</text>
|
||||
<text class="sekill--item-pirce">¥29</text>
|
||||
</view>
|
||||
<text class="sekill--item-original-pirce">¥50</text>
|
||||
</view>
|
||||
<view>
|
||||
<image class="sekill--item-img"></image>
|
||||
<view class="sekill--item-pirce-box">
|
||||
<text>秒杀价</text>
|
||||
<text class="sekill--item-pirce">¥29</text>
|
||||
</view>
|
||||
<text class="sekill--item-original-pirce">¥50</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.sekill{
|
||||
height: 384rpx;
|
||||
width: 630rpx;
|
||||
margin: 0 auto;
|
||||
padding: 30rpx;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
&-title{
|
||||
height: 38rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
&--text{
|
||||
font-size: 36rpx;
|
||||
}
|
||||
&--left{
|
||||
display: flex;
|
||||
}
|
||||
&--time{
|
||||
display: flex;
|
||||
height: 38rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
margin-left: 36rpx;
|
||||
background: #FFEDE9;
|
||||
overflow: hidden;
|
||||
align-items: center;
|
||||
}
|
||||
&--time-name{
|
||||
height: 100%;
|
||||
padding: 0 22rpx 0 15rpx;
|
||||
background: #FF512B;
|
||||
font-size: 22rpx;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
&::after{
|
||||
display: block;
|
||||
content: '';
|
||||
width: 16rpx;
|
||||
height: 36rpx;
|
||||
background: #FF512B;
|
||||
transform: rotate(40deg);
|
||||
position: absolute;
|
||||
right: -10rpx;
|
||||
top: -12rpx;
|
||||
}
|
||||
|
||||
}
|
||||
&--time-time{
|
||||
margin-right: 15rpx;
|
||||
font-size: 22rpx;
|
||||
color: #FF512B;
|
||||
position: relative;
|
||||
&::before{
|
||||
display: block;
|
||||
content: '';
|
||||
width: 14rpx;
|
||||
height: 36rpx;
|
||||
background: #FFEDE9;
|
||||
transform: rotate(40deg);
|
||||
position: absolute;
|
||||
left: -52rpx;
|
||||
top: 8rpx;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
&--time-icon{
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
padding-left: 20rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
&--more{
|
||||
display: inline-block;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
&--more-icon{
|
||||
width: 10rpx;
|
||||
height: 20rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
&--group{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
&--item{
|
||||
&-img{
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #F8F8F8;
|
||||
}
|
||||
&-pirce-box{
|
||||
width: 140rpx;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
background: linear-gradient(90deg, #FFE7DE 0%, #FFFFFF 100%);
|
||||
border-radius: 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
padding: 0 20rpx;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
&-pirce{
|
||||
color: #FF512B;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
&-original-pirce{
|
||||
display: block;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
</style>
|
@ -0,0 +1,180 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2019-08-22 19:41:20
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-23 20:11:26
|
||||
* @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">
|
||||
<view class="logo" :class="{'logo__min' : scrollTop > 35 }"></view>
|
||||
<view class="search search__min" v-if="scrollTop > 35" @click="$Router.push('/pages/goods/search')">
|
||||
<text class="search--input">请输入您想搜索的商品名称</text>
|
||||
</view>
|
||||
<view class="msg">
|
||||
<image class="msg--icon" src="@/static/index/msg.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search" @click="$Router.push('/pages/goods/search')">
|
||||
<text class="search--input">请输入您想搜索的商品名称</text>
|
||||
</view>
|
||||
|
||||
<Banner></Banner>
|
||||
|
||||
<view class="category">
|
||||
<view class="category--item" v-for="item in categoryList" :key="item.url">
|
||||
<view class="category--image-box">
|
||||
<image class="category--image" src="@/static/tabbar/home-active.png"></image>
|
||||
</view>
|
||||
<text class="category--title">{{item.title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<Sekill></Sekill>
|
||||
|
||||
<view class="title">甄选推荐</view>
|
||||
<Pick></Pick>
|
||||
|
||||
<view class="title">为您推荐</view>
|
||||
<BsGoodsGroup></BsGoodsGroup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import BsGoodsGroup from '@/components/BsGoodsGroup';
|
||||
import Sekill from './Sekill';
|
||||
import Pick from './Pick';
|
||||
import Banner from './Banner';
|
||||
export default {
|
||||
components : {BsGoodsGroup, Pick, Banner},
|
||||
data(){
|
||||
return {
|
||||
scrollTop : 0
|
||||
}
|
||||
},
|
||||
onLoad(){},
|
||||
onPageScroll({scrollTop}){
|
||||
this.scrollTop = scrollTop;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background: #f8f8f8;
|
||||
padding-bottom: 120rpx;
|
||||
}
|
||||
.header{
|
||||
position: sticky;
|
||||
top: var(--window-top);
|
||||
z-index:999;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #69ADE5;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.logo{
|
||||
width: 265rpx;
|
||||
height: 50rpx;
|
||||
background: url("@/static/index/logo.png");
|
||||
background-size: 265rpx;
|
||||
&__min{
|
||||
width: 50rpx;
|
||||
}
|
||||
}
|
||||
.msg{
|
||||
&--icon{
|
||||
width: 32rpx;
|
||||
height: 38rpx;
|
||||
}
|
||||
}
|
||||
.search{
|
||||
padding: 0 30rpx;
|
||||
background: #69ADE5;
|
||||
&__min{
|
||||
width: 548rpx;
|
||||
}
|
||||
&--input{
|
||||
display: flex;
|
||||
height: 70rpx;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: rgba(255, 255, 255, .3);
|
||||
color: #fff;
|
||||
border-radius: 8rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 24rpx;
|
||||
&::after{
|
||||
display: block;
|
||||
content: "";
|
||||
width: 34rpx;
|
||||
height: 36rpx;
|
||||
background: url("@/static/index/search.png");
|
||||
background-size: 100%;
|
||||
}
|
||||
}
|
||||
&--icon{
|
||||
width: 34rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.category{
|
||||
display: flex;
|
||||
padding: 0 20rpx;
|
||||
flex-wrap: wrap;
|
||||
&--item{
|
||||
padding: 0 10rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
&--image-box{
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
&--image{
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
&--title{
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.title{
|
||||
font-size: 36rpx;
|
||||
margin: 60rpx 30rpx 30rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
@ -0,0 +1,68 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-21 18:08:07
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-21 18:28:55
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view>
|
||||
<view class="banner"></view>
|
||||
<view class="tab">
|
||||
<view class="tab--item">
|
||||
<text class="tab--time">16:00</text>
|
||||
<text>已开抢</text>
|
||||
</view>
|
||||
<view class="tab--item tab--item__active">
|
||||
<text class="tab--time">18:00</text>
|
||||
<text>已结束</text>
|
||||
</view>
|
||||
<view class="tab--item">
|
||||
<text class="tab--time">20:00</text>
|
||||
<text>即将开抢</text>
|
||||
</view>
|
||||
<view class="tab--item">
|
||||
<text class="tab--time">20:00</text>
|
||||
<text>即将开抢</text>
|
||||
</view>
|
||||
<view class="tab--item">
|
||||
<text class="tab--time">20:00</text>
|
||||
<text>即将开抢</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list"></view>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
page{
|
||||
background: #F53739;
|
||||
}
|
||||
.banner{
|
||||
height: 678rpx;
|
||||
}
|
||||
.tab{
|
||||
height:120rpx;
|
||||
margin: 0 18rpx;
|
||||
background: linear-gradient(180deg, #FDDBAE 0%, #FEC793 25%, #FFB378 97%, #FFB378 100%);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
&--item{
|
||||
font-size: 24rpx;
|
||||
line-height: 45rpx;
|
||||
color: #EF6817;
|
||||
&__active{
|
||||
color: #F53739;
|
||||
}
|
||||
}
|
||||
&--time{
|
||||
display: block;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
margin: 0 20rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
</style>
|
After Width: | Height: | Size: 324 B |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 946 B |
After Width: | Height: | Size: 696 B |
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 393 B |
After Width: | Height: | Size: 525 B |
After Width: | Height: | Size: 730 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 604 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 663 B |
After Width: | Height: | Size: 858 B |
After Width: | Height: | Size: 484 B |