mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 10:57:26 +08:00
fix: 增强错误处理与组件逻辑优化
- 在 App.vue 中添加 JSON 解析错误处理,确保站点信息获取的稳定性。 - 更新多个 API 请求,添加 loading 状态管理,提升用户体验。 - 在 Search.vue 中优化热词列表的解析逻辑,增强容错性。 - 改进购物车、地址管理等 API 请求参数,确保一致性与可用性。 - 新增用户中心布局组件,提升用户界面的一致性与可读性。
This commit is contained in:
@@ -46,10 +46,14 @@ export default {
|
|||||||
getSite() {
|
getSite() {
|
||||||
getBaseSite().then((res) => {
|
getBaseSite().then((res) => {
|
||||||
if (res.success && res.result.settingValue) {
|
if (res.success && res.result.settingValue) {
|
||||||
|
try {
|
||||||
const data = JSON.parse(res.result.settingValue);
|
const data = JSON.parse(res.result.settingValue);
|
||||||
this.applySiteInfo(data);
|
this.applySiteInfo(data);
|
||||||
|
} catch {
|
||||||
|
// 站点配置解析失败时使用缓存
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ export function editMemberInfo (params) {
|
|||||||
url: '/buyer/passport/member/editOwn',
|
url: '/buyer/passport/member/editOwn',
|
||||||
method: Method.PUT,
|
method: Method.PUT,
|
||||||
needToken: true,
|
needToken: true,
|
||||||
data: params
|
data: params,
|
||||||
|
loading: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ export function newMemberAddress (params) {
|
|||||||
url: '/buyer/member/address',
|
url: '/buyer/member/address',
|
||||||
needToken: true,
|
needToken: true,
|
||||||
method: Method.POST,
|
method: Method.POST,
|
||||||
data: params
|
data: params,
|
||||||
|
loading: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,7 +28,8 @@ export function editMemberAddress (params) {
|
|||||||
url: '/buyer/member/address',
|
url: '/buyer/member/address',
|
||||||
needToken: true,
|
needToken: true,
|
||||||
method: Method.PUT,
|
method: Method.PUT,
|
||||||
params
|
params,
|
||||||
|
loading: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +38,8 @@ export function delMemberAddress (id) {
|
|||||||
return request({
|
return request({
|
||||||
url: `/buyer/member/address/delById/${id}`,
|
url: `/buyer/member/address/delById/${id}`,
|
||||||
needToken: true,
|
needToken: true,
|
||||||
method: Method.DELETE
|
method: Method.DELETE,
|
||||||
|
loading: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ export function cartGoodsAll () {
|
|||||||
return request({
|
return request({
|
||||||
url: '/buyer/trade/carts/all',
|
url: '/buyer/trade/carts/all',
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: true
|
needToken: true,
|
||||||
|
loading: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ export function getRegion (id) {
|
|||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/region/item/${id}`,
|
url: `${commonUrl}/common/common/region/item/${id}`,
|
||||||
needToken: true,
|
needToken: true,
|
||||||
method: Method.GET
|
method: Method.GET,
|
||||||
|
loading: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export function goodsList (params) {
|
|||||||
url: '/buyer/goods/goods/es',
|
url: '/buyer/goods/goods/es',
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: false,
|
needToken: false,
|
||||||
|
optionalToken: true,
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -18,6 +19,7 @@ export function filterList (params) {
|
|||||||
url: '/buyer/goods/goods/es/related',
|
url: '/buyer/goods/goods/es/related',
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: false,
|
needToken: false,
|
||||||
|
optionalToken: true,
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -298,7 +298,8 @@ export function cancelAfterSale (afterSaleSn) {
|
|||||||
return request({
|
return request({
|
||||||
url: `/buyer/order/afterSale/cancel/${afterSaleSn}`,
|
url: `/buyer/order/afterSale/cancel/${afterSaleSn}`,
|
||||||
method: Method.POST,
|
method: Method.POST,
|
||||||
needToken: true
|
needToken: true,
|
||||||
|
loading: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -128,10 +128,14 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
promotionTags() {
|
promotionTags() {
|
||||||
if (this.$store.state.hotWordsList) {
|
const raw = this.$store.state.hotWordsList;
|
||||||
return JSON.parse(this.$store.state.hotWordsList)
|
if (!raw) {
|
||||||
} else {
|
return [];
|
||||||
return []
|
}
|
||||||
|
try {
|
||||||
|
return typeof raw === "string" ? JSON.parse(raw) : raw;
|
||||||
|
} catch {
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -145,12 +149,12 @@ export default {
|
|||||||
if (!reloadTime) {
|
if (!reloadTime) {
|
||||||
hotWords({count: 5}).then(res => {
|
hotWords({count: 5}).then(res => {
|
||||||
if (res.success && res.result) storage.setItem('hotWordsList', res.result)
|
if (res.success && res.result) storage.setItem('hotWordsList', res.result)
|
||||||
})
|
}).catch(() => {})
|
||||||
storage.setItem('hotWordsReloadTime', new Date().getTime())
|
storage.setItem('hotWordsReloadTime', new Date().getTime())
|
||||||
} else if (reloadTime && time > reloadTime) {
|
} else if (reloadTime && time > reloadTime) {
|
||||||
hotWords({count: 5}).then(res => {
|
hotWords({count: 5}).then(res => {
|
||||||
if (res.success && res.result) storage.setItem('hotWordsList', res.result)
|
if (res.success && res.result) storage.setItem('hotWordsList', res.result)
|
||||||
})
|
}).catch(() => {})
|
||||||
storage.setItem('hotWordsReloadTime', new Date().getTime())
|
storage.setItem('hotWordsReloadTime', new Date().getTime())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 头部广告 -->
|
<!-- 头部广告 -->
|
||||||
<div class="advertising" v-if="show" :style="{'background-color': data.bgColor}">
|
<div class="advertising" v-if="show && data" :style="{'background-color': data.bgColor}">
|
||||||
<img :src="data.img" class="hover-pointer" @click="linkTo(data.url)"/>
|
<img :src="data.img" class="hover-pointer" @click="linkTo(data.url)"/>
|
||||||
<el-icon :size="20" @click="show = false"><CircleClose /></el-icon>
|
<el-icon :size="20" @click="show = false"><CircleClose /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import Footer from "@/components/footer/Footer.vue";
|
|||||||
import Search from "@/components/Search.vue";
|
import Search from "@/components/Search.vue";
|
||||||
import card from "@/components/card/index.vue";
|
import card from "@/components/card/index.vue";
|
||||||
import cateNav from "@/components/nav/CateNav.vue";
|
import cateNav from "@/components/nav/CateNav.vue";
|
||||||
|
import UserCenterLayout from "@/components/userCenter/Layout.vue";
|
||||||
|
|
||||||
export function registerGlobalComponents(app) {
|
export function registerGlobalComponents(app) {
|
||||||
app.component("empty", empty);
|
app.component("empty", empty);
|
||||||
@@ -15,5 +16,6 @@ export function registerGlobalComponents(app) {
|
|||||||
app.component("BaseFooter", Footer);
|
app.component("BaseFooter", Footer);
|
||||||
app.component("Search", Search);
|
app.component("Search", Search);
|
||||||
app.component("card", card);
|
app.component("card", card);
|
||||||
|
app.component("UserCenterLayout", UserCenterLayout);
|
||||||
app.component("cateNav", cateNav);
|
app.component("cateNav", cateNav);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<transition name='fade'>
|
<transition name='fade'>
|
||||||
<ul class="drop-items">
|
<ul class="drop-items">
|
||||||
<li @click="goUserCenter('/home')">我的主页</li>
|
<li @click="goUserCenter('/home/MyOrder')">我的主页</li>
|
||||||
<li @click="goUserCenter('/home/Coupons')">优惠券</li>
|
<li @click="goUserCenter('/home/Coupons')">优惠券</li>
|
||||||
<li @click="goUserCenter('/home/Favorites')">我的收藏</li>
|
<li @click="goUserCenter('/home/Favorites')">我的收藏</li>
|
||||||
<li @click="signOutFun">退出登录</li>
|
<li @click="signOutFun">退出登录</li>
|
||||||
@@ -40,14 +40,17 @@
|
|||||||
<li @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li>
|
<li @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li>
|
||||||
<li @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
|
<li @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
|
||||||
<li @click="goUserCenter('/home/MsgList')"><span class="nav-item">我的消息</span></li>
|
<li @click="goUserCenter('/home/MsgList')"><span class="nav-item">我的消息</span></li>
|
||||||
<li v-if="$route.name !== 'Cart'" style="position:relative;">
|
<li v-if="$route.name !== 'Cart'" class="cart-nav-item">
|
||||||
<el-dropdown placement="bottom-start" trigger="hover" @visible-change="handleCartDropdownVisible">
|
<el-dropdown
|
||||||
<router-link to="/cart" target="_blank">
|
class="cart-nav-dropdown"
|
||||||
<span class="nav-item">
|
placement="bottom-start"
|
||||||
|
trigger="hover"
|
||||||
|
@visible-change="handleCartDropdownVisible"
|
||||||
|
>
|
||||||
|
<span class="nav-item" @click="goToPay">
|
||||||
<el-icon :size="18"><ShoppingCart /></el-icon>
|
<el-icon :size="18"><ShoppingCart /></el-icon>
|
||||||
购物车({{ cartNum < 100 ? cartNum : '99' }})
|
购物车({{ cartNum < 100 ? cartNum : '99' }})
|
||||||
</span>
|
</span>
|
||||||
</router-link>
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<div class="shopping-cart-null" style="width:200px" v-show="shoppingCart.length <= 0">
|
<div class="shopping-cart-null" style="width:200px" v-show="shoppingCart.length <= 0">
|
||||||
<el-icon class="cart-null-icon"><ShoppingCart /></el-icon>
|
<el-icon class="cart-null-icon"><ShoppingCart /></el-icon>
|
||||||
@@ -128,7 +131,7 @@ export default {
|
|||||||
},
|
},
|
||||||
myInfo() { // 跳转会员中心
|
myInfo() { // 跳转会员中心
|
||||||
let url = this.$router.resolve({
|
let url = this.$router.resolve({
|
||||||
path: '/home'
|
path: '/home/MyOrder'
|
||||||
});
|
});
|
||||||
window.open(url.href, '_blank');
|
window.open(url.href, '_blank');
|
||||||
},
|
},
|
||||||
@@ -258,6 +261,27 @@ export default {
|
|||||||
|
|
||||||
.nav-item {
|
.nav-item {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cart-nav-item {
|
||||||
|
:deep(.cart-nav-dropdown),
|
||||||
|
:deep(.el-dropdown) {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tooltip__trigger),
|
||||||
|
:deep(.el-dropdown-selfdefine),
|
||||||
|
:deep([aria-expanded="true"]) {
|
||||||
|
outline: none !important;
|
||||||
|
border: none !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.location a {
|
.location a {
|
||||||
|
|||||||
@@ -229,11 +229,11 @@ export default {
|
|||||||
.advert-list {
|
.advert-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 5px 0;
|
padding: 10px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: $theme_color;
|
background: $theme_color;
|
||||||
height: 200px;
|
height: 210px;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -57,13 +57,15 @@
|
|||||||
class="hover-pointer"
|
class="hover-pointer"
|
||||||
@click="linkTo(item.url)"
|
@click="linkTo(item.url)"
|
||||||
>
|
>
|
||||||
|
<div class="img-wrap">
|
||||||
<img :src="item.img" alt="" />
|
<img :src="item.img" alt="" />
|
||||||
<p>{{ item.name }}</p>
|
|
||||||
<p>{{ $filters.unitPrice(item.price, "¥") }}</p>
|
|
||||||
<div class="jiaobiao" :class="'jiaobiao' + (index + 1)">
|
<div class="jiaobiao" :class="'jiaobiao' + (index + 1)">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<p>{{ item.name }}</p>
|
||||||
|
<p>{{ $filters.unitPrice(item.price, "¥") }}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -220,42 +222,37 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
img {
|
border-bottom: 1px solid #eee;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
.img-wrap {
|
||||||
|
position: relative;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
border-right: 1px solid #eee;
|
|
||||||
:nth-child(2) {
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
max-height: 32px;
|
|
||||||
line-height: 16px;
|
|
||||||
margin-top: 4px;
|
|
||||||
overflow: hidden;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
:nth-child(3) {
|
|
||||||
color: $theme_color;
|
|
||||||
margin-top: 2px;
|
|
||||||
line-height: 1.2;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.jiaobiao {
|
.jiaobiao {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 23px;
|
width: 23px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
top: 6px;
|
top: 0;
|
||||||
right: 6px;
|
right: 0;
|
||||||
background: url(../../../assets/images/festival_icon.png);
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
max-height: none;
|
||||||
|
overflow: visible;
|
||||||
|
display: block;
|
||||||
|
background: url(../../../assets/images/festival_icon.png) no-repeat;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
line-height: 23px;
|
||||||
|
font-size: 12px;
|
||||||
|
-webkit-line-clamp: unset;
|
||||||
|
-webkit-box-orient: unset;
|
||||||
}
|
}
|
||||||
.jiaobiao1,
|
.jiaobiao1,
|
||||||
.jiaobiao4 {
|
.jiaobiao4 {
|
||||||
@@ -270,6 +267,25 @@ export default {
|
|||||||
background-position: -60px -30px;
|
background-position: -60px -30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
> p:nth-child(2) {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
max-height: 32px;
|
||||||
|
line-height: 16px;
|
||||||
|
margin-top: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
> p:nth-child(3) {
|
||||||
|
color: $theme_color;
|
||||||
|
margin-top: 2px;
|
||||||
|
line-height: 1.2;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
> div:nth-child(3n) {
|
> div:nth-child(3n) {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,12 +83,17 @@ export default {
|
|||||||
width: 595px;
|
width: 595px;
|
||||||
.content-left {
|
.content-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
box-sizing: content-box;
|
||||||
> div:nth-child(1) {
|
> div:nth-child(1) {
|
||||||
width: 189px;
|
width: 189px;
|
||||||
border-right: 1px solid #eee;
|
border-right: 1px solid #eee;
|
||||||
height: 360px;
|
height: 360px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
img {
|
img {
|
||||||
margin: 40px 0 0 15px;
|
margin: 40px 0 0 15px;
|
||||||
}
|
}
|
||||||
@@ -106,15 +111,20 @@ export default {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
.view-btn {
|
.view-btn {
|
||||||
margin-left: 15px;
|
align-self: center;
|
||||||
margin-top: 10px;
|
width: 145px;
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: 15px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> div:nth-child(2) {
|
> div:nth-child(2) {
|
||||||
width: 405px;
|
width: 405px;
|
||||||
|
height: 360px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
align-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
> div {
|
> div {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -145,7 +155,7 @@ export default {
|
|||||||
grid-template-rows: repeat(2, 1fr);
|
grid-template-rows: repeat(2, 1fr);
|
||||||
height: 360px;
|
height: 360px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: content-box;
|
||||||
|
|
||||||
> div {
|
> div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
<div class="model" v-if="data">
|
<div class="model" v-if="data">
|
||||||
<div class="for-your">{{ data.options.title }}</div>
|
<div class="for-your">{{ data.options.title }}</div>
|
||||||
<div class="flex card">
|
<div class="flex card">
|
||||||
<div class="left">
|
<div class="left hover-pointer" @click="linkTo(data.options.data.image.url)">
|
||||||
<img :src="data.options.data.image.src" alt="" />
|
<img :src="data.options.data.image.src" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="right flex">
|
<div class="right flex">
|
||||||
<!-- 商品区 -->
|
<!-- 商品区 -->
|
||||||
<div class="goods-list">
|
<div class="for-your-goods-list">
|
||||||
<div
|
<div
|
||||||
class="goods-item"
|
class="for-your-goods-item"
|
||||||
:key="index"
|
:key="index"
|
||||||
v-for="(item, index) in data.options.data.list"
|
v-for="(item, index) in data.options.data.list"
|
||||||
@click="linkTo(item.url)"
|
@click="linkTo(item.url)"
|
||||||
@@ -65,14 +65,18 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.goods-list {
|
.for-your-goods-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex: 0 0 558px;
|
||||||
width: 558px;
|
width: 558px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
column-gap: 0;
|
||||||
}
|
}
|
||||||
.goods-item {
|
.for-your-goods-item {
|
||||||
|
flex: 0 0 278px;
|
||||||
width: 278px;
|
width: 278px;
|
||||||
height: 277px;
|
height: 277px;
|
||||||
|
min-width: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -84,10 +88,8 @@ export default {
|
|||||||
border-top: 1.4px solid #e2e2e2;
|
border-top: 1.4px solid #e2e2e2;
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
:deep .goods-name {
|
.goods-name,
|
||||||
color: $theme_color;
|
.goods-desc {
|
||||||
}
|
|
||||||
:deep .goods-desc {
|
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,10 +107,12 @@ export default {
|
|||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
.goods-img {
|
.goods-img {
|
||||||
|
display: block;
|
||||||
width: 190px;
|
width: 190px;
|
||||||
height: 156px;
|
height: 156px;
|
||||||
margin-top: 19px;
|
margin: 19px auto 0;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
.goods-desc {
|
.goods-desc {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -137,6 +141,8 @@ export default {
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
flex-shrink: 0;
|
||||||
box-shadow: 0px 1px 13px 0px #E5E5E5;
|
box-shadow: 0px 1px 13px 0px #E5E5E5;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -159,20 +165,27 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.left {
|
.left {
|
||||||
|
flex: 0 0 346px;
|
||||||
width: 346px;
|
width: 346px;
|
||||||
height: 554px;
|
height: 554px;
|
||||||
border-radius: 9.8px 0px 0px 9.8px;
|
border-radius: 9.8px 0px 0px 9.8px;
|
||||||
|
overflow: hidden;
|
||||||
> img {
|
> img {
|
||||||
max-width: 100%;
|
display: block;
|
||||||
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.right {
|
.right {
|
||||||
|
flex: 0 0 839px;
|
||||||
width: 839px;
|
width: 839px;
|
||||||
height: 554px;
|
height: 554px;
|
||||||
border-radius: 0px 9.8px 9.8px 0px;
|
border-radius: 0px 9.8px 9.8px 0px;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.hot-list {
|
.hot-list {
|
||||||
|
flex: 0 0 279px;
|
||||||
width: 279px;
|
width: 279px;
|
||||||
}
|
}
|
||||||
.hot-title {
|
.hot-title {
|
||||||
@@ -201,8 +214,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
> img {
|
> img {
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: block;
|
||||||
width: 76.3px;
|
width: 76.3px;
|
||||||
height: 77.7px;
|
height: 77.7px;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.hot-goods {
|
.hot-goods {
|
||||||
|
|||||||
@@ -49,5 +49,6 @@ export default {
|
|||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0px 1px 13px 0px #E5E5E5;
|
box-shadow: 0px 1px 13px 0px #E5E5E5;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,20 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex" v-if="data.options.right.model == 'brand'">
|
<div class="mix-panel flex" v-if="data.options.right.model == 'brand'">
|
||||||
<div class="left-side" @click="linkTo(data.options.right.data.image.url)">
|
<div class="left-side hover-pointer" @click="linkTo(data.options.right.data.image.url)">
|
||||||
<img :src="data.options.right.data.image.src" alt="">
|
<img :src="data.options.right.data.image.src" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="right-side">
|
<div class="right-side">
|
||||||
<div class="badge-box flex">
|
<div class="badge-box flex">
|
||||||
<div class="round">
|
<div class="round">
|
||||||
<el-icon><ArrowRight /></el-icon>
|
<el-icon><ArrowRight /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex goods-list">
|
<div class="flex goods-list">
|
||||||
<div class="goods-item flex" @click="linkTo(item.url)" :key="index" v-for="(item,index) in data.options.right.data.list">
|
<div
|
||||||
|
class="goods-item flex hover-pointer"
|
||||||
|
@click="linkTo(item.url)"
|
||||||
|
:key="index"
|
||||||
|
v-for="(item, index) in data.options.right.data.list"
|
||||||
|
>
|
||||||
<div class="goods-thumbnail">
|
<div class="goods-thumbnail">
|
||||||
<img :src="item.img" alt="">
|
<img :src="item.img" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -23,63 +26,60 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ArrowRight } from '@element-plus/icons-vue';
|
import { ArrowRight } from "@element-plus/icons-vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "mix-goods",
|
name: "mix-brand",
|
||||||
data() {
|
components: { ArrowRight },
|
||||||
return {}
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: () => ({}),
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: { ArrowRight },
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {}
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.right-side{
|
.mix-panel {
|
||||||
width: 330px;
|
height: 100%;
|
||||||
|
align-items: stretch;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.goods-detail-title{
|
|
||||||
font-size: 13px;
|
.left-side {
|
||||||
font-weight: normal;
|
flex-shrink: 0;
|
||||||
line-height: 16px;
|
width: 254px;
|
||||||
text-align: center;
|
height: 344px;
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
.goods-detail-price{
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: normal;
|
|
||||||
line-height: 17px;
|
|
||||||
letter-spacing: 0px;
|
|
||||||
color: $theme_color;
|
|
||||||
margin-top: 8px;
|
|
||||||
margin-bottom:10px;
|
|
||||||
}
|
|
||||||
.goods-thumbnail{
|
|
||||||
margin-left: 7px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
> img {
|
> img {
|
||||||
width:90px;
|
display: block;
|
||||||
height: 90px;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 9.8px 0 0 9.8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right-side {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
height: 344px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.badge-box {
|
.badge-box {
|
||||||
margin-top: 33px;
|
margin-top: 24px;
|
||||||
justify-content:right;
|
margin-bottom: 8px;
|
||||||
|
justify-content: flex-end;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
> .round {
|
> .round {
|
||||||
width: 17.5px;
|
width: 17.5px;
|
||||||
height: 17.5px;
|
height: 17.5px;
|
||||||
opacity: 1;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 17.5px;
|
line-height: 17.5px;
|
||||||
@@ -87,47 +87,48 @@ export default {
|
|||||||
margin-right: 17.5px;
|
margin-right: 17.5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-list {
|
.goods-list {
|
||||||
width: 330px;
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 16px;
|
align-content: flex-start;
|
||||||
|
padding: 0 16px 12px;
|
||||||
|
gap: 8px 0;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-item {
|
.goods-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width:50%;
|
flex: 0 0 calc(50% - 4px);
|
||||||
height: 85px;
|
width: calc(50% - 4px);
|
||||||
|
height: 82px;
|
||||||
border-radius: 9.8px;
|
border-radius: 9.8px;
|
||||||
opacity: 1;
|
box-sizing: border-box;
|
||||||
transition: .35s;
|
overflow: hidden;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
margin-bottom:9px;
|
transition: 0.35s;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
}
|
}
|
||||||
.left-side {
|
|
||||||
|
.goods-thumbnail {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
> img {
|
> img {
|
||||||
width: 254px;
|
max-width: 80px;
|
||||||
height: 344px;
|
max-height: 76px;
|
||||||
border-radius: 9.8px 0px 0px 9.8px;
|
width: auto;
|
||||||
opacity: 1;
|
height: auto;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.badge {
|
|
||||||
width: 50px;
|
|
||||||
height: 27px;
|
|
||||||
line-height:27px;
|
|
||||||
border-radius: 13.3px 0px 0px 13.3px;
|
|
||||||
opacity: 1;
|
|
||||||
background: #F31947;
|
|
||||||
font-size: 12.6px;
|
|
||||||
font-weight: normal;
|
|
||||||
text-align: center;
|
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #FFFFFF;
|
|
||||||
margin-top: 26px;
|
|
||||||
margin-bottom:17px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,19 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex" v-if="data.options.left.model == 'goods'">
|
<div class="mix-panel flex" v-if="data.options.left.model == 'goods'">
|
||||||
<div class="left-side" @click="linkTo(data.options.right.data.image.url)">
|
<div class="left-side hover-pointer" @click="linkTo(data.options.left.data.image.url)">
|
||||||
<img :src="data.options.left.data.image.src" alt="">
|
<img :src="data.options.left.data.image.src" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="right-side">
|
<div class="right-side">
|
||||||
<div class="badge-box flex">
|
<div class="badge-box flex">
|
||||||
<div class="badge" @click="linkTo(data.options.right.data.image.url)">
|
<div class="badge hover-pointer" @click="linkTo(data.options.left.data.badge.url)">
|
||||||
{{ data.options.left.data.badge.label }}
|
{{ data.options.left.data.badge.label }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex goods-list">
|
<div class="flex goods-list">
|
||||||
|
<div
|
||||||
<div class="goods-item flex" @click="linkTo(item.url)" :key="index" v-for="(item,index) in data.options.left.data.list">
|
class="goods-item flex hover-pointer"
|
||||||
|
@click="linkTo(item.url)"
|
||||||
|
:key="index"
|
||||||
|
v-for="(item, index) in data.options.left.data.list"
|
||||||
|
>
|
||||||
<div class="goods-thumbnail">
|
<div class="goods-thumbnail">
|
||||||
<img :src="item.img" alt="">
|
<img :src="item.img" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="goods-detail">
|
<div class="goods-detail">
|
||||||
<div class="goods-detail-title">{{ item.title }}</div>
|
<div class="goods-detail-title">{{ item.title }}</div>
|
||||||
@@ -28,99 +32,117 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "mix-goods",
|
name: "mix-goods",
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: () => ({}),
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: {},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {}
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.right-side{
|
.mix-panel {
|
||||||
width: 387px;
|
height: 100%;
|
||||||
|
align-items: stretch;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.left-side {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 196.7px;
|
||||||
|
height: 344px;
|
||||||
|
|
||||||
|
> img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 10px 0 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-side {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
height: 344px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.goods-detail-title {
|
.goods-detail-title {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-detail-price {
|
.goods-detail-price {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 17px;
|
line-height: 17px;
|
||||||
letter-spacing: 0px;
|
color: #f31947;
|
||||||
color: #F31947;
|
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
margin-bottom:10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-thumbnail {
|
.goods-thumbnail {
|
||||||
margin-left: 7px;
|
margin-left: 7px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
> img {
|
> img {
|
||||||
width: 90px;
|
width: 90px;
|
||||||
height: 90px;
|
height: 90px;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.badge-box{
|
|
||||||
|
|
||||||
justify-content:right;
|
.badge-box {
|
||||||
|
justify-content: flex-end;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-list {
|
.goods-list {
|
||||||
width: 387px;
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
|
gap: 9px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-item {
|
.goods-item {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 173.6px;
|
flex: 0 0 calc(50% - 4px);
|
||||||
|
width: calc(50% - 4px);
|
||||||
height: 119px;
|
height: 119px;
|
||||||
border-radius: 9.8px;
|
border-radius: 9.8px;
|
||||||
opacity: 1;
|
box-sizing: border-box;
|
||||||
transition: .35s;
|
overflow: hidden;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
margin-bottom:9px;
|
transition: 0.35s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0px 1px 6px 0px #E5E5E5;
|
box-shadow: 0 1px 6px 0 #e5e5e5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
.left-side {
|
|
||||||
>img{
|
|
||||||
border-radius: 10px 0px 0px 10px;
|
|
||||||
display: block;
|
|
||||||
width: 196.7px;
|
|
||||||
height: 343.7px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.badge {
|
.badge {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 27px;
|
height: 27px;
|
||||||
line-height: 27px;
|
line-height: 27px;
|
||||||
border-radius: 13.3px 0px 0px 13.3px;
|
border-radius: 13.3px 0 0 13.3px;
|
||||||
opacity: 1;
|
background: #f31947;
|
||||||
background: #F31947;
|
|
||||||
font-size: 12.6px;
|
font-size: 12.6px;
|
||||||
font-weight: normal;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
letter-spacing: 0px;
|
color: #ffffff;
|
||||||
color: #FFFFFF;
|
|
||||||
margin-top: 26px;
|
margin-top: 26px;
|
||||||
margin-bottom: 17px;
|
margin-bottom: 17px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="line flex flex-a-c flex-j-sb">
|
<div class="line flex flex-a-c flex-j-sb">
|
||||||
<div class="column" v-for="(item,index) in data.options.list" :key="index">
|
<div
|
||||||
<img :src="item.img" class="three-column-img">
|
class="column hover-pointer"
|
||||||
|
v-for="(item, index) in data.options.list"
|
||||||
|
:key="index"
|
||||||
|
@click="linkTo(item.url)"
|
||||||
|
>
|
||||||
|
<img :src="item.img" class="three-column-img" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -25,12 +30,18 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.line {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.column {
|
.column {
|
||||||
width: 385px;
|
width: 385px;
|
||||||
height: 165px;
|
height: 165px;
|
||||||
|
cursor: pointer;
|
||||||
> img {
|
> img {
|
||||||
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export default {
|
|||||||
// 存放分类信息
|
// 存放分类信息
|
||||||
localStorage.setItem("category", JSON.stringify(res.result));
|
localStorage.setItem("category", JSON.stringify(res.result));
|
||||||
}
|
}
|
||||||
});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
showDetail(index) {
|
showDetail(index) {
|
||||||
// 展示全部分类
|
// 展示全部分类
|
||||||
|
|||||||
144
buyer/src/components/userCenter/Layout.vue
Normal file
144
buyer/src/components/userCenter/Layout.vue
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
<template>
|
||||||
|
<div class="user-center-page">
|
||||||
|
<div class="user-center-title">{{ title }}</div>
|
||||||
|
<div class="user-center-panel">
|
||||||
|
<div v-if="showToolbar" class="user-center-toolbar">
|
||||||
|
<div class="user-center-tabs">
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in tabs"
|
||||||
|
:key="index"
|
||||||
|
class="user-center-tab"
|
||||||
|
:class="{ active: activeTab === index }"
|
||||||
|
@click="$emit('tab-change', index)"
|
||||||
|
>
|
||||||
|
{{ item }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="user-center-extra">
|
||||||
|
<slot name="extra">
|
||||||
|
<el-button v-if="moreText" type="primary" @click="handleMore">{{ moreText }}</el-button>
|
||||||
|
</slot>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="user-center-content">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "UserCenterLayout",
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
tabs: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
activeTab: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
moreText: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
moreTo: {
|
||||||
|
type: [String, Object],
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
emits: ["tab-change", "more"],
|
||||||
|
computed: {
|
||||||
|
showToolbar() {
|
||||||
|
return this.tabs.length || this.moreText || this.$slots.extra;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleMore() {
|
||||||
|
this.$emit("more");
|
||||||
|
if (!this.moreTo) return;
|
||||||
|
if (typeof this.moreTo === "string") {
|
||||||
|
this.$router.push(this.moreTo);
|
||||||
|
} else {
|
||||||
|
this.$router.push(this.moreTo);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.user-center-page {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-center-title {
|
||||||
|
height: 54px;
|
||||||
|
line-height: 54px;
|
||||||
|
padding: 0 20px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
color: #333;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-center-panel {
|
||||||
|
padding: 0 16px 16px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-center-toolbar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
min-height: 54px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-center-tabs {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 54px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-center-tab {
|
||||||
|
position: relative;
|
||||||
|
height: 54px;
|
||||||
|
line-height: 54px;
|
||||||
|
margin-right: 28px;
|
||||||
|
color: #333;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&.active {
|
||||||
|
color: $theme_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: -1px;
|
||||||
|
height: 2px;
|
||||||
|
background: $theme_color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-center-extra {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-center-content {
|
||||||
|
padding-top: 14px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -33,6 +33,7 @@ app.config.globalProperties.Cookies = storage;
|
|||||||
app.config.globalProperties.$inputMaxLength = inputMaxLength;
|
app.config.globalProperties.$inputMaxLength = inputMaxLength;
|
||||||
|
|
||||||
app.config.globalProperties.linkTo = function (url) {
|
app.config.globalProperties.linkTo = function (url) {
|
||||||
|
if (!url) return;
|
||||||
if (url.substr(0, 1) === "/") {
|
if (url.substr(0, 1) === "/") {
|
||||||
window.open(location.origin + url, "_blank");
|
window.open(location.origin + url, "_blank");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
<div class="store-collect" v-if="!takeDownSale && goodsMsg.data">
|
<div class="store-collect" v-if="!takeDownSale && goodsMsg.data">
|
||||||
<span class="mr_10" v-if="goodsMsg.data">
|
<span class="mr_10" v-if="goodsMsg.data">
|
||||||
<router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{
|
<router-link
|
||||||
goodsMsg.data.storeName
|
:to="{ path: '/merchant', query: { id: goodsMsg.data.storeId } }"
|
||||||
}}</router-link>
|
>{{ goodsMsg.data.storeName }}</router-link>
|
||||||
</span>
|
</span>
|
||||||
<span @click="collect">
|
<span @click="collect">
|
||||||
<el-icon :color="storeCollected ? '#ed3f14' : '#666'"><StarFilled /></el-icon>
|
<el-icon :color="storeCollected ? '#ed3f14' : '#666'"><StarFilled /></el-icon>
|
||||||
|
|||||||
@@ -67,16 +67,16 @@
|
|||||||
已有<span>{{ item.commentNum || 0 }}</span>人评价
|
已有<span>{{ item.commentNum || 0 }}</span>人评价
|
||||||
</div>
|
</div>
|
||||||
<div class="goods-show-seller">
|
<div class="goods-show-seller">
|
||||||
<span class="text-bottom" style="color: #e4393c">{{
|
<span
|
||||||
item.storeName
|
class="text-bottom hover-pointer"
|
||||||
}}</span>
|
style="color: #e4393c"
|
||||||
|
@click.stop="goShopPage(item.storeId)"
|
||||||
|
>{{ item.storeName }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="goods-show-right">
|
<div class="goods-show-right">
|
||||||
<el-tag
|
<el-tag
|
||||||
class="goods-show-tag goods-show-tag-self"
|
class="goods-show-tag goods-show-tag-self"
|
||||||
color="red"
|
|
||||||
effect="dark"
|
|
||||||
v-if="item.selfOperated"
|
v-if="item.selfOperated"
|
||||||
>
|
>
|
||||||
自营
|
自营
|
||||||
@@ -200,6 +200,17 @@ export default {
|
|||||||
});
|
});
|
||||||
window.open(routeUrl.href, "_blank");
|
window.open(routeUrl.href, "_blank");
|
||||||
},
|
},
|
||||||
|
goShopPage(id) {
|
||||||
|
if (!id) {
|
||||||
|
this.$Message.warning("店铺信息不存在");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const routeUrl = this.$router.resolve({
|
||||||
|
path: "/merchant",
|
||||||
|
query: { id },
|
||||||
|
});
|
||||||
|
window.open(routeUrl.href, "_blank");
|
||||||
|
},
|
||||||
// 分页 修改页码
|
// 分页 修改页码
|
||||||
changePageNum(val) {
|
changePageNum(val) {
|
||||||
this.params.pageNumber = val;
|
this.params.pageNumber = val;
|
||||||
@@ -279,6 +290,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.goods-show-tag-self {
|
.goods-show-tag-self {
|
||||||
|
--el-tag-bg-color: #fa2c19;
|
||||||
|
--el-tag-border-color: #fa2c19;
|
||||||
|
--el-tag-text-color: #fff;
|
||||||
|
background-color: #fa2c19;
|
||||||
|
border-color: #fa2c19;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
:deep(.el-tag__content) {
|
:deep(.el-tag__content) {
|
||||||
|
|||||||
@@ -125,7 +125,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getcps(){
|
getcps(){
|
||||||
console.log(123123)
|
|
||||||
let data = new Date()
|
let data = new Date()
|
||||||
let datas = data.getDate()
|
let datas = data.getDate()
|
||||||
getAutoCoup().then(res=>{ //调用自动发券
|
getAutoCoup().then(res=>{ //调用自动发券
|
||||||
@@ -146,27 +145,34 @@ export default {
|
|||||||
}
|
}
|
||||||
storage.setItem('getTimes',datas)//存储缓存
|
storage.setItem('getTimes',datas)//存储缓存
|
||||||
}
|
}
|
||||||
})
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
handleReachBottom(){
|
handleReachBottom(){
|
||||||
|
|
||||||
} ,
|
} ,
|
||||||
getIndexData () {
|
getIndexData () {
|
||||||
if(this.pageData){
|
if(this.pageData){
|
||||||
this.parsePageData(JSON.stringify(this.pageData))
|
this.parsePageData(JSON.stringify(this.pageData)).catch(() => {});
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
// 获取首页装修数据
|
// 获取首页装修数据
|
||||||
indexData({ clientType: 'PC' }).then(async (res) => {
|
indexData({ clientType: 'PC' }).then(async (res) => {
|
||||||
if (res.success && res.result) {
|
if (res.success && res.result?.pageData) {
|
||||||
this.parsePageData(res.result.pageData)
|
try {
|
||||||
|
await this.parsePageData(res.result.pageData);
|
||||||
|
} catch {
|
||||||
|
// 装修数据解析失败时保持默认空楼层
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async parsePageData(pageData){
|
async parsePageData(pageData){
|
||||||
let dataJson = JSON.parse(pageData);
|
const dataJson = typeof pageData === "string" ? JSON.parse(pageData) : pageData;
|
||||||
|
if (!dataJson?.list?.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 秒杀活动不是装修的数据,需要调用接口判断是否有秒杀商品
|
// 秒杀活动不是装修的数据,需要调用接口判断是否有秒杀商品
|
||||||
// 轮播图根据不同轮播,样式不同
|
// 轮播图根据不同轮播,样式不同
|
||||||
for (let i = 0; i < dataJson.list.length; i++) {
|
for (let i = 0; i < dataJson.list.length; i++) {
|
||||||
@@ -182,18 +188,25 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.modelForm = dataJson;
|
this.modelForm = dataJson;
|
||||||
|
if (dataJson.list[1]) {
|
||||||
storage.setItem('navList', dataJson.list[1])
|
storage.setItem('navList', dataJson.list[1])
|
||||||
|
}
|
||||||
this.showNav = true
|
this.showNav = true
|
||||||
|
if (dataJson.list[0]) {
|
||||||
this.topAdvert = dataJson.list[0];
|
this.topAdvert = dataJson.list[0];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async getListByDay () { // 当天秒杀活动
|
async getListByDay () { // 当天秒杀活动
|
||||||
|
try {
|
||||||
const res = await seckillByDay()
|
const res = await seckillByDay()
|
||||||
if (res.success && res.result.length) {
|
if (res.success && res.result?.length) {
|
||||||
return res.result
|
return res.result
|
||||||
} else {
|
|
||||||
return []
|
|
||||||
}
|
}
|
||||||
|
} catch {
|
||||||
|
// 秒杀接口失败时不影响首页其他模块
|
||||||
|
}
|
||||||
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: { Search,
|
components: { Search,
|
||||||
|
|||||||
@@ -2,18 +2,35 @@
|
|||||||
<div class="merchant">
|
<div class="merchant">
|
||||||
<BaseHeader/>
|
<BaseHeader/>
|
||||||
<!-- 搜索栏 -->
|
<!-- 搜索栏 -->
|
||||||
<Search :storeId="storeMsg.storeId" @search="search"></Search>
|
<Search :storeId="storeMsg.storeId || $route.query.id" @search="search"></Search>
|
||||||
<!-- 店铺logo -->
|
<!-- 店铺logo -->
|
||||||
<div class="shop-logo">
|
<div class="shop-logo">
|
||||||
<div>
|
<div class="shop-logo-inner">
|
||||||
<p>{{ storeMsg.storeName || '店铺' }}</p>
|
<div class="shop-info">
|
||||||
<p :alt="storeMsg.storeDesc" class="ellipsis" v-html="storeMsg.storeDesc"></p>
|
<p class="shop-name">{{ storeMsg.storeName || '店铺' }}</p>
|
||||||
|
<p
|
||||||
|
v-if="storeMsg.storeDesc"
|
||||||
|
:alt="storeMsg.storeDesc"
|
||||||
|
class="shop-desc ellipsis"
|
||||||
|
v-html="storeMsg.storeDesc"
|
||||||
|
></p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="shop-actions">
|
||||||
<span class="hover-pointer" @click="collect"><el-icon :color="storeCollected ? '#ed3f14' : '#fff'"><StarFilled /></el-icon>{{
|
<span class="hover-pointer store-collect-btn" @click="collect">
|
||||||
|
<el-icon :color="storeCollected ? '#ffc107' : '#fff'">
|
||||||
|
<StarFilled />
|
||||||
|
</el-icon>
|
||||||
|
<span>{{
|
||||||
storeCollected ? '已收藏店铺' : '收藏店铺'
|
storeCollected ? '已收藏店铺' : '收藏店铺'
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="hover-pointer ml_10" style="width:80px" @click="IMService(storeMsg.storeId,null,null)"><i class="icomoon icon-customer-service"></i>联系客服</span>
|
</span>
|
||||||
|
<span
|
||||||
|
class="hover-pointer store-service-btn"
|
||||||
|
@click="IMService(storeMsg.storeId, null, null)"
|
||||||
|
>
|
||||||
|
<i class="icomoon icon-customer-service"></i>联系客服
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="store-category">
|
<div class="store-category">
|
||||||
@@ -101,7 +118,11 @@
|
|||||||
|
|
||||||
import { ArrowDown, StarFilled } from '@element-plus/icons-vue';
|
import { ArrowDown, StarFilled } from '@element-plus/icons-vue';
|
||||||
import {getCateById, getDetailById} from "@/api/shopentry";
|
import {getCateById, getDetailById} from "@/api/shopentry";
|
||||||
import {cancelStoreCollect, collectStore} from "@/api/member";
|
import {
|
||||||
|
cancelStoreCollect,
|
||||||
|
collectStore,
|
||||||
|
isStoreCollection,
|
||||||
|
} from "@/api/member";
|
||||||
import {goodsList} from "@/api/goods";
|
import {goodsList} from "@/api/goods";
|
||||||
import Search from "@/components/Search";
|
import Search from "@/components/Search";
|
||||||
import ModelForm from "@/components/indexDecorate/ModelForm";
|
import ModelForm from "@/components/indexDecorate/ModelForm";
|
||||||
@@ -145,10 +166,15 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getStoreMsg();
|
this.getStoreMsg();
|
||||||
|
window.onscroll = () => {
|
||||||
|
const top =
|
||||||
|
document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
|
this.topSearchShow = top > 300;
|
||||||
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isFloorEnabled() {
|
isFloorEnabled() {
|
||||||
const pageShow = this.storeMsg.pageShow;
|
const pageShow = this.storeMsg && this.storeMsg.pageShow;
|
||||||
return pageShow === "1" || pageShow === 1 || pageShow === "OPEN" || pageShow === true;
|
return pageShow === "1" || pageShow === 1 || pageShow === "OPEN" || pageShow === true;
|
||||||
},
|
},
|
||||||
loadStoreGoodsView() {
|
loadStoreGoodsView() {
|
||||||
@@ -205,54 +231,44 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// getStoreMsg () { // 店铺信息
|
checkStoreCollectionStatus() {
|
||||||
// getDetailById(this.$route.query.id).then(res => {
|
const storeId = this.storeMsg && this.storeMsg.storeId;
|
||||||
// if (res.success) {
|
if (!storeId || !this.Cookies.getItem("userInfo")) {
|
||||||
// this.storeMsg = res.result
|
return;
|
||||||
// document.title = this.storeMsg.storeName
|
}
|
||||||
// if (this.Cookies.getItem('userInfo')) {
|
isStoreCollection("STORE", storeId)
|
||||||
// isCollection('STORE', this.storeMsg.storeId).then(res => {
|
.then((res) => {
|
||||||
// if (res.success && res.result) {
|
if (res.success && res.result) {
|
||||||
// this.storeCollected = true;
|
this.storeCollected = true;
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// }
|
.catch(() => {});
|
||||||
// }
|
},
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// async getListByDay() {
|
|
||||||
// // 当天秒杀活动
|
|
||||||
// const res = await seckillByDay();
|
|
||||||
// if (res.success && res.result.length) {
|
|
||||||
// return res.result;
|
|
||||||
// } else {
|
|
||||||
// return [];
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
|
|
||||||
getStoreMsg() {
|
getStoreMsg() {
|
||||||
// 店铺信息
|
const storeId = this.$route.query.id;
|
||||||
getDetailById(this.$route.query.id).then((res) => {
|
if (!storeId) {
|
||||||
if (res.success) {
|
this.$Message.warning("店铺不存在");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getDetailById(storeId)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.success && res.result) {
|
||||||
this.storeMsg = res.result;
|
this.storeMsg = res.result;
|
||||||
|
document.title = this.storeMsg.storeName || "店铺";
|
||||||
|
this.checkStoreCollectionStatus();
|
||||||
if (this.isFloorEnabled()) {
|
if (this.isFloorEnabled()) {
|
||||||
this.getIndexData();
|
this.getIndexData();
|
||||||
} else {
|
} else {
|
||||||
this.loadStoreGoodsView();
|
this.loadStoreGoodsView();
|
||||||
}
|
}
|
||||||
let that = this;
|
|
||||||
window.onscroll = function () {
|
|
||||||
let top =
|
|
||||||
document.documentElement.scrollTop || document.body.scrollTop;
|
|
||||||
if (top > 300) {
|
|
||||||
that.topSearchShow = true;
|
|
||||||
} else {
|
} else {
|
||||||
that.topSearchShow = false;
|
this.storeMsg = { storeId };
|
||||||
}
|
this.loadStoreGoodsView();
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.storeMsg = { storeId };
|
||||||
|
this.loadStoreGoodsView();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCateList() {
|
getCateList() {
|
||||||
@@ -318,17 +334,26 @@ export default {
|
|||||||
this.$router.push("/login");
|
this.$router.push("/login");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
if (this.storeCollected) {
|
if (this.storeCollected) {
|
||||||
let cancel = await cancelStoreCollect("STORE", storeId);
|
const cancel = await cancelStoreCollect("STORE", storeId);
|
||||||
if (cancel.success) {
|
if (cancel.success) {
|
||||||
this.$Message.success("已取消收藏");
|
this.$Message.success("已取消收藏");
|
||||||
this.storeCollected = false;
|
this.storeCollected = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let collect = await collectStore("STORE", storeId);
|
const collect = await collectStore("STORE", storeId);
|
||||||
if (collect.code === 200) {
|
if (collect.success || collect.code === 200) {
|
||||||
|
this.storeCollected = true;
|
||||||
|
this.$Message.success(
|
||||||
|
"收藏店铺成功,可以前往个人中心我的收藏查看"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
const msg = err?.message || err?.data?.message || "";
|
||||||
|
if (msg.includes("重复收藏")) {
|
||||||
this.storeCollected = true;
|
this.storeCollected = true;
|
||||||
this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -350,31 +375,56 @@ export default {
|
|||||||
padding: 4px;
|
padding: 4px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
> div {
|
.shop-logo-inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 8px;
|
||||||
width: 1200px;
|
width: 1200px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
> div:nth-child(2) {
|
min-width: 0;
|
||||||
margin-left: 10px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> div:nth-child(3) {
|
.shop-name {
|
||||||
width: 200px;
|
margin: 0;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p:nth-child(1) {
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
p:nth-child(2) {
|
.shop-desc {
|
||||||
|
margin: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
max-height: 40px;
|
max-height: 40px;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.shop-actions {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.store-collect-btn {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.store-service-btn {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
min-width: 80px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.store-category {
|
.store-category {
|
||||||
|
|||||||
@@ -1,28 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="账户安全"/>
|
<UserCenterLayout title="账户安全" :tabs="['账户安全']">
|
||||||
<div class="safeList">
|
<div class="safeList">
|
||||||
<!-- 密码 -->
|
<!-- 密码 -->
|
||||||
<div class="safeItem">
|
<div class="safeItem">
|
||||||
<div :span="2">
|
<div class="safeItem-icon">
|
||||||
<el-icon :size="40"><Key /></el-icon>
|
<el-icon :size="40"><Key /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
<div :span="16">
|
<div class="safeItem-content">
|
||||||
<div class="setDivItem">登录密码</div>
|
<div class="setDivItem">登录密码</div>
|
||||||
<div class="setDivItem theme">互联网账号存在被盗风险,建议您定期更改密码以保护账户安全。</div>
|
<div class="setDivItem theme">互联网账号存在被盗风险,建议您定期更改密码以保护账户安全。</div>
|
||||||
</div>
|
</div>
|
||||||
<div :span="4">
|
<div class="safeItem-action">
|
||||||
<el-button @click="modifyPwd">修改密码</el-button>
|
<el-button @click="modifyPwd">修改密码</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="safeItem">
|
<div class="safeItem safeItem-connect">
|
||||||
<div :span="2">
|
<div class="safeItem-main">
|
||||||
|
<div class="safeItem-icon">
|
||||||
<el-icon :size="40"><Link /></el-icon>
|
<el-icon :size="40"><Link /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
<div :span="16">
|
<div class="safeItem-content">
|
||||||
<div class="setDivItem">第三方账户绑定</div>
|
<div class="setDivItem">第三方账户绑定</div>
|
||||||
<div class="setDivItem theme">绑定后可使用第三方账号快捷登录。</div>
|
<div class="setDivItem theme">绑定后可使用第三方账号快捷登录。</div>
|
||||||
|
</div>
|
||||||
|
<div class="safeItem-action">
|
||||||
|
<el-button v-if="!isBound(wechatConnect.type)" type="primary" @click="openBindModal(wechatConnect)">绑定</el-button>
|
||||||
|
<el-button v-else @click="confirmUnbind(wechatConnect)">解绑</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="connectList">
|
<div class="connectList">
|
||||||
<div class="connectRow">
|
<div class="connectRow">
|
||||||
<div class="connectRowLeft">
|
<div class="connectRowLeft">
|
||||||
@@ -34,12 +41,8 @@
|
|||||||
<el-skeleton size="large" fix v-if="connectLoading"></el-skeleton>
|
<el-skeleton size="large" fix v-if="connectLoading"></el-skeleton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :span="4">
|
|
||||||
<el-button v-if="!isBound(wechatConnect.type)" type="primary" @click="openBindModal(wechatConnect)">绑定</el-button>
|
|
||||||
<el-button v-else @click="confirmUnbind(wechatConnect)">解绑</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="bindModalVisible"
|
v-model="bindModalVisible"
|
||||||
@@ -266,12 +269,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.safeItem > div:first-child,
|
|
||||||
.safeItem > div:last-child {
|
|
||||||
text-align: center;
|
|
||||||
color: $theme_color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.theme {
|
.theme {
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
}
|
}
|
||||||
@@ -281,17 +278,47 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.safeItem {
|
.safeItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
border-bottom: 1px solid $border_color;
|
border-bottom: 1px solid $border_color;
|
||||||
padding: 16px 0;
|
padding: 16px 0;
|
||||||
|
|
||||||
> div {
|
|
||||||
padding: 8px 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.safeItem-connect {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.safeItem-main {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.safeItem-icon {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 56px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: $theme_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.safeItem-content {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.safeItem-action {
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connectList {
|
.connectList {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
margin-left: 72px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connectRow {
|
.connectRow {
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="评论/晒单" />
|
<UserCenterLayout title="评论/晒单" :tabs="['评论/晒单']">
|
||||||
|
|
||||||
<div class="order">
|
<div class="order">
|
||||||
<div class="order-title">
|
<div class="order-title">
|
||||||
<div class="order-row title">
|
<div class="order-row title">
|
||||||
<div span="12">订单详情</div>
|
<div span="10" class="order-detail-title">订单详情</div>
|
||||||
<div span="4">收货人</div>
|
<div span="4">收货人</div>
|
||||||
<div span="4">评价</div>
|
<div span="4">评价等级</div>
|
||||||
<div span="6"></div>
|
<div span="4">评价内容</div>
|
||||||
|
<div span="2"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<empty v-if="list.length === 0" />
|
<empty v-if="list.length === 0" />
|
||||||
@@ -21,7 +22,7 @@
|
|||||||
<span class="hover-pointer fontsize_12 eval-detail" @click="evaluateDetail(item.id)">评价详情</span>
|
<span class="hover-pointer fontsize_12 eval-detail" @click="evaluateDetail(item.id)">评价详情</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="order-item-view">
|
<div class="order-item-view">
|
||||||
<div span="12" class="item-view-name">
|
<div span="10" class="item-view-name">
|
||||||
<div class="order-img hover-color" @click="linkTo(`/goodsDetail?goodsId=${item.goodsId}&skuId=${item.skuId}`)">
|
<div class="order-img hover-color" @click="linkTo(`/goodsDetail?goodsId=${item.goodsId}&skuId=${item.skuId}`)">
|
||||||
<img :src="item.goodsImage" alt="" />
|
<img :src="item.goodsImage" alt="" />
|
||||||
</div>
|
</div>
|
||||||
@@ -43,6 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
<div span="2"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -52,8 +54,9 @@
|
|||||||
<div class="page-size">
|
<div class="page-size">
|
||||||
<el-pagination :total="total" @current-change="changePageNum"
|
<el-pagination :total="total" @current-change="changePageNum"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
:page-size="params.pageSize" layout="total, sizes, prev, pager, next"></el-pagination>
|
:page-size="params.pageSize" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -158,11 +161,21 @@ export default {
|
|||||||
max-width: 50%;
|
max-width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> [span='10'] {
|
||||||
|
flex: 0 0 41.666667%;
|
||||||
|
max-width: 41.666667%;
|
||||||
|
}
|
||||||
|
|
||||||
> [span='4'] {
|
> [span='4'] {
|
||||||
flex: 0 0 16.666667%;
|
flex: 0 0 16.666667%;
|
||||||
max-width: 16.666667%;
|
max-width: 16.666667%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> [span='2'] {
|
||||||
|
flex: 0 0 8.333333%;
|
||||||
|
max-width: 8.333333%;
|
||||||
|
}
|
||||||
|
|
||||||
> [span='6'] {
|
> [span='6'] {
|
||||||
flex: 0 0 25%;
|
flex: 0 0 25%;
|
||||||
max-width: 25%;
|
max-width: 25%;
|
||||||
@@ -182,6 +195,10 @@ export default {
|
|||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.order-detail-title {
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 20px !important;
|
||||||
|
}
|
||||||
.content {
|
.content {
|
||||||
color: #999;
|
color: #999;
|
||||||
max-height: 60px;
|
max-height: 60px;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="add-eval">
|
<div class="add-eval">
|
||||||
|
<UserCenterLayout title="订单投诉" :tabs="['订单投诉']">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<card _Title="订单投诉" :_Size="16"></card>
|
|
||||||
<p>
|
<p>
|
||||||
<span class="fontsize_16 global_color">{{ statusLabel[detail.complainStatus] }}</span>
|
<span class="fontsize_16 global_color">{{ statusLabel[detail.complainStatus] }}</span>
|
||||||
<span class="color999 ml_20">创建时间:</span><span>{{ detail.createTime }}</span>
|
<span class="color999 ml_20">创建时间:</span><span>{{ detail.createTime }}</span>
|
||||||
@@ -118,6 +118,7 @@
|
|||||||
<el-dialog title="View Image" v-model="visible">
|
<el-dialog title="View Image" v-model="visible">
|
||||||
<img :src="previewImage" v-if="visible" style="width: 100%">
|
<img :src="previewImage" v-if="visible" style="width: 100%">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="我的投诉" />
|
<UserCenterLayout title="我的投诉" :tabs="['我的投诉']">
|
||||||
|
|
||||||
<div class="order">
|
<div class="order">
|
||||||
<div class="order-title">
|
<div class="order-title">
|
||||||
<div class="order-row title">
|
<div class="order-row title">
|
||||||
<div class="col-12">商品信息</div>
|
<div span="10" class="order-detail-title">商品信息</div>
|
||||||
<div class="col-4">投诉状态</div>
|
<div span="4">投诉状态</div>
|
||||||
<div class="col-4">投诉主题</div>
|
<div span="4">投诉主题</div>
|
||||||
<div class="col-4">投诉内容</div>
|
<div span="4">投诉内容</div>
|
||||||
|
<div span="2"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<empty v-if="list.length === 0" />
|
<empty v-if="list.length === 0" />
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
<span class="hover-pointer fontsize_12 eval-detail" style="right: 90px" v-if="item.complainStatus === 'APPLYING' || item.complainStatus === 'NEW'" @click="cancel(item.id)">取消投诉</span>
|
<span class="hover-pointer fontsize_12 eval-detail" style="right: 90px" v-if="item.complainStatus === 'APPLYING' || item.complainStatus === 'NEW'" @click="cancel(item.id)">取消投诉</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="order-item-view">
|
<div class="order-item-view">
|
||||||
<div class="col-12 item-view-name">
|
<div span="10" class="item-view-name">
|
||||||
<div class="order-img hover-color" @click="linkTo(`/goodsDetail?goodsId=${item.goodsId}&skuId=${item.skuId}`)">
|
<div class="order-img hover-color" @click="linkTo(`/goodsDetail?goodsId=${item.goodsId}&skuId=${item.skuId}`)">
|
||||||
<img :src="item.goodsImage" alt="" />
|
<img :src="item.goodsImage" alt="" />
|
||||||
</div>
|
</div>
|
||||||
@@ -30,11 +31,11 @@
|
|||||||
{{item.goodsName}}
|
{{item.goodsName}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">{{statusLabel[item.complainStatus]}}</div>
|
<div span="4">{{statusLabel[item.complainStatus]}}</div>
|
||||||
<div class="col-4">
|
<div span="4">
|
||||||
<div class="content">{{item.complainTopic}}</div>
|
<div class="content">{{item.complainTopic}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div span="4">
|
||||||
<el-tooltip>
|
<el-tooltip>
|
||||||
<div class="content">{{item.content}}</div>
|
<div class="content">{{item.content}}</div>
|
||||||
<template #content>
|
<template #content>
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
<div span="2"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -53,8 +55,9 @@
|
|||||||
<div class="page-size">
|
<div class="page-size">
|
||||||
<el-pagination :total="total" @current-change="changePageNum"
|
<el-pagination :total="total" @current-change="changePageNum"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
:page-size="params.pageSize" layout="total, sizes, prev, pager, next"></el-pagination>
|
:page-size="params.pageSize" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -163,29 +166,30 @@ export default {
|
|||||||
.order-item-view {
|
.order-item-view {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: nowrap;
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 10px 20px;
|
|
||||||
|
|
||||||
.col-12,
|
> [span] {
|
||||||
.col-4 {
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-12 {
|
> [span='10'] {
|
||||||
flex: 0 0 50%;
|
flex: 0 0 41.666667%;
|
||||||
max-width: 50%;
|
max-width: 41.666667%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-4 {
|
> [span='4'] {
|
||||||
flex: 0 0 16.666667%;
|
flex: 0 0 16.666667%;
|
||||||
max-width: 16.666667%;
|
max-width: 16.666667%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> [span='2'] {
|
||||||
|
flex: 0 0 8.333333%;
|
||||||
|
max-width: 8.333333%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-item-view {
|
.order-item-view {
|
||||||
|
padding: 10px 20px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
.order-item {
|
.order-item {
|
||||||
@@ -194,8 +198,13 @@ export default {
|
|||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
.order-row {
|
.order-row {
|
||||||
|
padding: 10px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.order-detail-title {
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 20px !important;
|
||||||
|
}
|
||||||
.content {
|
.content {
|
||||||
color: #999;
|
color: #999;
|
||||||
max-height: 60px;
|
max-height: 60px;
|
||||||
@@ -214,6 +223,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.page-size{
|
.page-size{
|
||||||
text-align: right;
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="我的分销" />
|
<UserCenterLayout title="我的分销" :tabs="['我的分销']">
|
||||||
<!-- 分销申请 -->
|
<!-- 分销申请 -->
|
||||||
|
|
||||||
<div v-if="status === 0">
|
<div v-if="status === 0">
|
||||||
@@ -103,7 +103,6 @@
|
|||||||
:total="goodsData.total"
|
:total="goodsData.total"
|
||||||
:page-size="params.pageSize"
|
:page-size="params.pageSize"
|
||||||
@current-change="changePage"
|
@current-change="changePage"
|
||||||
small
|
|
||||||
layout="total, prev, pager, next, jumper"></el-pagination>
|
layout="total, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -141,7 +140,6 @@
|
|||||||
:total="goodsData.total"
|
:total="goodsData.total"
|
||||||
:page-size="params.pageSize"
|
:page-size="params.pageSize"
|
||||||
@current-change="changePage"
|
@current-change="changePage"
|
||||||
small
|
|
||||||
layout="total, prev, pager, next, jumper"></el-pagination>
|
layout="total, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -178,7 +176,6 @@
|
|||||||
:total="logData.total"
|
:total="logData.total"
|
||||||
:page-size="logParams.pageSize"
|
:page-size="logParams.pageSize"
|
||||||
@current-change="changePageLog"
|
@current-change="changePageLog"
|
||||||
small
|
|
||||||
layout="total, prev, pager, next, jumper"></el-pagination>
|
layout="total, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -254,6 +251,7 @@
|
|||||||
<div class="mt_10" style="margin-top: 100px;">
|
<div class="mt_10" style="margin-top: 100px;">
|
||||||
商品链接:<el-input style="width: 600px" v-model="qrcode"></el-input>
|
商品链接:<el-input style="width: 600px" v-model="qrcode"></el-input>
|
||||||
</div></el-dialog>
|
</div></el-dialog>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -510,8 +508,9 @@ export default {
|
|||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
.page-size {
|
.page-size {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
margin: 15px 0px;
|
margin: 15px 0px;
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
.account-price {
|
.account-price {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="近期收藏" :_Tabs="favoriteWay" :_ActiveTab="activeTabIndex" @_Change="change" :_Size="16" v-if="!homePage" />
|
<UserCenterLayout
|
||||||
<card _Title="近期收藏" :_Size="16" :_Tabs="favoriteWay" :_ActiveTab="activeTabIndex" @_Change="change" _More="全部收藏" _Src="/home/Favorites" v-else>
|
v-if="!homePage"
|
||||||
</card>
|
title="近期收藏"
|
||||||
|
:tabs="favoriteWay"
|
||||||
|
:active-tab="activeTabIndex"
|
||||||
|
@tab-change="change"
|
||||||
|
>
|
||||||
<div v-if="list.length">
|
<div v-if="list.length">
|
||||||
<div v-for="(item, index) in list" :key="index">
|
<div v-for="(item, index) in list" :key="index">
|
||||||
<div class="goodsItem" :key="item.skuId">
|
<div class="goodsItem" :key="item.skuId">
|
||||||
@@ -35,6 +39,42 @@
|
|||||||
<el-skeleton size="large" fix v-if="spinShow"></el-skeleton>
|
<el-skeleton size="large" fix v-if="spinShow"></el-skeleton>
|
||||||
</div>
|
</div>
|
||||||
<empty v-else />
|
<empty v-else />
|
||||||
|
</UserCenterLayout>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<card _Title="近期收藏" :_Size="16" :_Tabs="favoriteWay" :_ActiveTab="activeTabIndex" @_Change="change" _More="全部收藏" _Src="/home/Favorites"></card>
|
||||||
|
<div v-if="list.length">
|
||||||
|
<div v-for="(item, index) in list" :key="index">
|
||||||
|
<div class="goodsItem" :key="item.skuId">
|
||||||
|
<div class="goodsImg hover-pointer" v-if="params.type === 'GOODS'">
|
||||||
|
<img :src="item.image" />
|
||||||
|
</div>
|
||||||
|
<div class="goodsImg hover-pointer" v-else>
|
||||||
|
<img :src="item.storeLogo" />
|
||||||
|
</div>
|
||||||
|
<div class="goodsTitle hover-color" v-if="params.type === 'GOODS'" @click="buynow(item.skuId, item.goodsId,item.id)">
|
||||||
|
{{ item.goodsName }}
|
||||||
|
</div>
|
||||||
|
<div v-else class="goodsTitle hover-pointer" @click="buynow(item.skuId, item.goodsId,item.id)" >
|
||||||
|
{{ item.storeName }}
|
||||||
|
<el-tag color="error" class="operated" v-if="item.selfOperated">商家自营</el-tag>
|
||||||
|
</div>
|
||||||
|
<div class="goodsPrice">
|
||||||
|
<span v-if="params.type === 'GOODS'">{{ $filters.unitPrice(item.price, '¥') }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="goodsBuy">
|
||||||
|
<el-button size="small" type="primary" @click="buynow(item.skuId, item.goodsId)"
|
||||||
|
v-if="params.type === 'GOODS'">立即购买</el-button>
|
||||||
|
<el-button size="small" type="primary" @click="goShop(item.id)" v-else>店铺购买</el-button>
|
||||||
|
<el-button size="small" v-if="params.type === 'GOODS'" @click="cancel(item.skuId)">取消收藏</el-button>
|
||||||
|
<el-button size="small" v-if="params.type === 'STORE'" @click="cancelStore(item.id)">取消收藏</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-skeleton size="large" fix v-if="spinShow"></el-skeleton>
|
||||||
|
</div>
|
||||||
|
<empty v-else />
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -183,14 +223,15 @@ export default {
|
|||||||
|
|
||||||
.goodsItem {
|
.goodsItem {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
line-height: 60px;
|
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
>.goodsImg {
|
>.goodsImg {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
>img {
|
>img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -200,12 +241,15 @@ export default {
|
|||||||
|
|
||||||
>.goodsPrice,
|
>.goodsPrice,
|
||||||
.goodsShop {
|
.goodsShop {
|
||||||
width: 150px;
|
width: 120px;
|
||||||
|
flex-shrink: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
>.goodsTitle {
|
>.goodsTitle {
|
||||||
width: 400px;
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
line-height: 60px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -213,10 +257,17 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.goodsBuy {
|
.goodsBuy {
|
||||||
margin-left: 80px;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
flex-shrink: 0;
|
||||||
|
gap: 8px;
|
||||||
|
width: 170px;
|
||||||
|
margin-left: 16px;
|
||||||
|
line-height: normal;
|
||||||
|
|
||||||
>* {
|
:deep(.el-button) {
|
||||||
margin: 0 4px;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="memberGrade">
|
<div class="memberGrade">
|
||||||
<card _Title="我的等级"/>
|
<UserCenterLayout title="我的等级" :tabs="['我的等级']">
|
||||||
<div class="summary">
|
<div class="summary">
|
||||||
<div class="gradeCard">
|
<div class="gradeCard">
|
||||||
<div class="gradeLeft">
|
<div class="gradeLeft">
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-tabs value="rules">
|
<el-tabs v-model="activeGradeTab">
|
||||||
<el-tab-pane label="获取经验值方式" name="rules">
|
<el-tab-pane label="获取经验值方式" name="rules">
|
||||||
<el-table v-loading="rulesLoading" :data="ruleList">
|
<el-table v-loading="rulesLoading" :data="ruleList">
|
||||||
<el-table-column label="获取方式" min-width="720">
|
<el-table-column label="获取方式" min-width="720">
|
||||||
@@ -65,17 +65,20 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination style="float:right;margin-top:10px"
|
<div class="grade-pagination">
|
||||||
|
<el-pagination
|
||||||
:current-page="params.pageNumber"
|
:current-page="params.pageNumber"
|
||||||
:total="experienceLogs.total || 0"
|
:total="experienceLogs.total || 0"
|
||||||
:page-size="params.pageSize"
|
:page-size="params.pageSize"
|
||||||
@current-change="changePage"
|
@current-change="changePage"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
:page-sizes="[10, 20, 50]"
|
:page-sizes="[10, 20, 50]"
|
||||||
small
|
layout="total, prev, pager, next, jumper"
|
||||||
layout="total, prev, pager, next, jumper"></el-pagination>
|
/>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
</UserCenterLayout>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -98,6 +101,7 @@ export default {
|
|||||||
currentExperience: 0,
|
currentExperience: 0,
|
||||||
currentGradeId: '',
|
currentGradeId: '',
|
||||||
selectedRuleKey: '',
|
selectedRuleKey: '',
|
||||||
|
activeGradeTab: 'rules',
|
||||||
logLoading: false,
|
logLoading: false,
|
||||||
gradeLoading: false,
|
gradeLoading: false,
|
||||||
params: {
|
params: {
|
||||||
@@ -405,4 +409,10 @@ h3 {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grade-pagination {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="账户安全"/>
|
<UserCenterLayout title="账户安全" :tabs="['账户安全']">
|
||||||
<!-- 手机号验证 -->
|
<!-- 手机号验证 -->
|
||||||
<el-form ref="formData" :model="formData" label-position="left" label-width="100px" :rules="ruleInLines"
|
<el-form ref="formData" :model="formData" label-position="left" label-width="100px" :rules="ruleInLines"
|
||||||
v-if="(status == 2 || status == 3) && !showPwd">
|
v-if="(status == 2 || status == 3) && !showPwd">
|
||||||
@@ -69,6 +69,7 @@
|
|||||||
<div v-if="showPwd" style="text-align: center;width: 50%">
|
<div v-if="showPwd" style="text-align: center;width: 50%">
|
||||||
<el-button type="primary" class="ml_10" @click="setPassword">设置</el-button>
|
<el-button type="primary" class="ml_10" @click="setPassword">设置</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="point">
|
<div class="point">
|
||||||
<card _Title="我的积分"/>
|
<UserCenterLayout title="我的积分" :tabs="['我的积分']">
|
||||||
<div class="point-content">
|
<div class="point-content">
|
||||||
<span>剩余积分:<span>{{ pointObj.point || 0 }}</span></span>
|
<span>剩余积分:<span>{{ pointObj.point || 0 }}</span></span>
|
||||||
<span>累计获得:<span>{{ pointObj.totalPoint || 0 }}</span></span>
|
<span>累计获得:<span>{{ pointObj.totalPoint || 0 }}</span></span>
|
||||||
@@ -18,15 +18,18 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<el-pagination style="float:right;margin-top:10px"
|
<div class="point-pagination">
|
||||||
|
<el-pagination
|
||||||
:current-page="params.pageNumber"
|
:current-page="params.pageNumber"
|
||||||
:total="logData.total"
|
:total="logData.total"
|
||||||
:page-size="params.pageSize"
|
:page-size="params.pageSize"
|
||||||
@current-change="changePage"
|
@current-change="changePage"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
:page-sizes="[10, 20, 50]"
|
:page-sizes="[10, 20, 50]"
|
||||||
small
|
layout="total, prev, pager, next, jumper"
|
||||||
layout="total, prev, pager, next, jumper"></el-pagination>
|
/>
|
||||||
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -92,4 +95,10 @@ h3 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.point-pagination {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,26 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="用户信息" />
|
<UserCenterLayout title="用户信息" :tabs="['用户信息']">
|
||||||
<el-form :model="formItem" :rules="rules" ref="form" label-width="80px">
|
<el-form :model="formItem" :rules="rules" ref="form" label-width="80px">
|
||||||
<el-form-item label="头像">
|
<el-form-item label="头像" class="avatar-form-item">
|
||||||
|
<div class="avatar-upload">
|
||||||
<el-avatar v-if="formItem.face" :src="formItem.face" :size="80" />
|
<el-avatar v-if="formItem.face" :src="formItem.face" :size="80" />
|
||||||
<el-avatar v-else :size="80"><el-icon><User /></el-icon></el-avatar>
|
<el-avatar v-else :size="80"><el-icon><User /></el-icon></el-avatar>
|
||||||
<el-upload
|
<el-upload
|
||||||
:show-upload-list="false"
|
:show-file-list="false"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:format="['jpg','jpeg','png']"
|
:format="['jpg','jpeg','png']"
|
||||||
:action="action"
|
:action="action"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
>
|
>
|
||||||
<el-button class="mt_10">上传头像</el-button>
|
<el-button>上传头像</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="昵称" prop="nickName">
|
<el-form-item label="昵称" prop="nickName">
|
||||||
<el-input class="wrapper-user-name" style="width:187px" v-model="formItem.nickName" placeholder="" />
|
<el-input class="profile-field" v-model="formItem.nickName" placeholder="" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="生日">
|
<el-form-item label="生日">
|
||||||
<el-date-picker type="date" placeholder="选择您的生日" v-model="formItem.birthday"></el-date-picker>
|
<el-date-picker
|
||||||
|
class="profile-field"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择您的生日"
|
||||||
|
v-model="formItem.birthday"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="性别">
|
<el-form-item label="性别">
|
||||||
<el-radio-group v-model="formItem.sex" type="button" button-style="solid">
|
<el-radio-group v-model="formItem.sex" type="button" button-style="solid">
|
||||||
@@ -33,6 +40,7 @@
|
|||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -113,5 +121,35 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.avatar-form-item {
|
||||||
|
:deep(.el-form-item__label) {
|
||||||
|
height: 90px;
|
||||||
|
line-height: 90px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar-upload {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
:deep(.el-avatar) {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-upload) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile-field {
|
||||||
|
width: 187px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.profile-field.el-date-editor) {
|
||||||
|
width: 187px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="add-eval">
|
<div class="add-eval">
|
||||||
|
<UserCenterLayout title="订单评价" :tabs="['订单评价']">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<card _Title="订单评价" :_Size="16"></card>
|
|
||||||
<p>
|
<p>
|
||||||
<span class="color999">订单号:</span><span>{{$route.query.sn}}</span>
|
<span class="color999">订单号:</span><span>{{$route.query.sn}}</span>
|
||||||
<span class="color999 ml_20" v-if="order.order">{{order.order.paymentTime}}</span>
|
<span class="color999 ml_20" v-if="order.order">{{order.order.paymentTime}}</span>
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
<!-- 物流评分、服务评分 -->
|
<!-- 物流评分、服务评分 -->
|
||||||
<div class="delivery-rate">
|
<div class="delivery-rate">
|
||||||
<div class="fontsize_16">物流服务评价:</div>
|
<div class="fontsize_16">物流服务评价:</div>
|
||||||
<div class="color999">
|
<div class="color999 rate-list">
|
||||||
<span>物流评价:<el-rate v-model="form.deliveryScore" /></span>
|
<span class="rate-item">物流评价:<el-rate v-model="form.deliveryScore" /></span>
|
||||||
<span>服务评价:<el-rate v-model="form.serviceScore" /></span>
|
<span class="rate-item">服务评价:<el-rate v-model="form.serviceScore" /></span>
|
||||||
<span>描述评价:<el-rate v-model="form.descriptionScore" /></span>
|
<span class="rate-item">描述评价:<el-rate v-model="form.descriptionScore" /></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 添加订单评价 左侧商品详情 右侧评价框 -->
|
<!-- 添加订单评价 左侧商品详情 右侧评价框 -->
|
||||||
@@ -26,13 +26,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="eval-con">
|
<div class="eval-con">
|
||||||
<div>
|
<div class="goods-grade-row">
|
||||||
<span class="color999">商品评价:</span>
|
<span class="color999 goods-grade-label">商品评价:</span>
|
||||||
<el-radio-group v-model="orderGoods.grade">
|
<el-radio-group v-model="orderGoods.grade">
|
||||||
<el-radio-button value="GOOD">好评</el-radio-button>
|
<el-radio-button value="GOOD">好评</el-radio-button>
|
||||||
<el-radio-button value="MODERATE">中评</el-radio-button>
|
<el-radio-button value="MODERATE">中评</el-radio-button>
|
||||||
<el-radio-button value="WORSE">差评</el-radio-button>
|
<el-radio-button value="WORSE">差评</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
<el-input type="textarea" maxlength="500" show-word-limit :rows="4" v-model="orderGoods.content" />
|
<el-input type="textarea" maxlength="500" show-word-limit :rows="4" v-model="orderGoods.content" />
|
||||||
</div>
|
</div>
|
||||||
<div style="display:flex;align-items:center;">
|
<div style="display:flex;align-items:center;">
|
||||||
@@ -59,10 +61,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<el-button type="primary" class="mt_10" :loading="loading" @click="save">发表</el-button>
|
<div class="submit-row">
|
||||||
|
<el-button type="primary" :loading="loading" @click="save">发表</el-button>
|
||||||
|
</div>
|
||||||
<el-dialog title="View Image" v-model="visible">
|
<el-dialog title="View Image" v-model="visible">
|
||||||
<img :src="previewImage" v-if="visible" style="width: 100%">
|
<img :src="previewImage" v-if="visible" style="width: 100%">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -188,6 +193,16 @@ export default {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.rate-list {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 18px;
|
||||||
|
}
|
||||||
|
.rate-item {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
.goods-eval li{
|
.goods-eval li{
|
||||||
display: flex;
|
display: flex;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
@@ -206,6 +221,20 @@ export default {
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.goods-grade-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.goods-grade-label {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.demo-upload-list{
|
.demo-upload-list{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="add-eval">
|
<div class="add-eval">
|
||||||
|
<UserCenterLayout title="评价详情" :tabs="['评价详情']">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<card _Title="评价详情" :_Size="16"></card>
|
|
||||||
<p>
|
<p>
|
||||||
<span class="color999">创建人:</span><span>{{ $filters.secrecyMobile( orderGoods.createBy ) }}</span>
|
<span class="color999">创建人:</span><span>{{ $filters.secrecyMobile( orderGoods.createBy ) }}</span>
|
||||||
<span class="color999 ml_20">{{ orderGoods.createTime }}</span>
|
<span class="color999 ml_20">{{ orderGoods.createTime }}</span>
|
||||||
@@ -84,6 +84,7 @@
|
|||||||
<el-dialog title="View Image" v-model="visible">
|
<el-dialog title="View Image" v-model="visible">
|
||||||
<img :src="previewImage" v-if="visible" style="width: 100%" />
|
<img :src="previewImage" v-if="visible" style="width: 100%" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="msg-list">
|
<div class="msg-list">
|
||||||
<card _Title="我的消息" :_Tabs="status" :_Size="16" @_Change="statusChange"/>
|
<UserCenterLayout
|
||||||
|
title="我的消息"
|
||||||
|
:tabs="status"
|
||||||
|
:active-tab="activeStatusIndex"
|
||||||
|
@tab-change="statusChange"
|
||||||
|
>
|
||||||
|
|
||||||
<el-table v-if="params.status != 'ALREADY_REMOVE'" :data="messageData.records || []">
|
<el-table v-if="params.status != 'ALREADY_REMOVE'" :data="messageData.records || []">
|
||||||
<el-table-column prop="title" label="消息标题" align="left" show-overflow-tooltip />
|
<el-table-column prop="title" label="消息标题" align="left" show-overflow-tooltip />
|
||||||
@@ -24,18 +29,19 @@
|
|||||||
<el-table-column prop="content" label="消息内容" align="left" show-overflow-tooltip />
|
<el-table-column prop="content" label="消息内容" align="left" show-overflow-tooltip />
|
||||||
<el-table-column prop="createTime" label="发送时间" align="left" width="240" />
|
<el-table-column prop="createTime" label="发送时间" align="left" width="240" />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div class="msg-pagination">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
style="float:right;margin-top:10px"
|
|
||||||
:current-page="params.pageNumber"
|
:current-page="params.pageNumber"
|
||||||
:total="messageData.total"
|
:total="messageData.total"
|
||||||
:page-size="params.pageSize"
|
:page-size="params.pageSize"
|
||||||
@current-change="changePage"
|
@current-change="changePage"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
:page-sizes="[10, 20, 50]"
|
:page-sizes="[10, 20, 50]"
|
||||||
small
|
|
||||||
layout="total, prev, pager, next, jumper"
|
layout="total, prev, pager, next, jumper"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {memberMsgList, readMemberMsg, delMemberMsg} from '@/api/member.js'
|
import {memberMsgList, readMemberMsg, delMemberMsg} from '@/api/member.js'
|
||||||
@@ -51,6 +57,13 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
activeStatusIndex () {
|
||||||
|
const map = ['UN_READY', 'ALREADY_READY', 'ALREADY_REMOVE'];
|
||||||
|
const index = map.indexOf(this.params.status);
|
||||||
|
return index > -1 ? index : 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
statusChange (index) {
|
statusChange (index) {
|
||||||
if (index === 0) { this.params.status = 'UN_READY' }
|
if (index === 0) { this.params.status = 'UN_READY' }
|
||||||
@@ -103,5 +116,9 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.msg-pagination {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<card _Title="收货地址" />
|
<UserCenterLayout title="收货地址" :tabs="['收货地址']">
|
||||||
<div class="add-box">
|
<div class="add-box">
|
||||||
<el-form :model="formData" ref="form" label-position="left" label-width="100px" :rules="ruleInline">
|
<el-form :model="formData" ref="form" label-position="left" label-width="100px" :rules="ruleInline">
|
||||||
<el-form-item label="收件人" prop="name">
|
<el-form-item label="收件人" prop="name">
|
||||||
@@ -30,14 +30,13 @@
|
|||||||
<el-button type="primary" class="mr_10" :loading="loading" @click="save">保存收货地址</el-button>
|
<el-button type="primary" class="mr_10" :loading="loading" @click="save">保存收货地址</el-button>
|
||||||
<el-button @click="$router.back()">返回</el-button>
|
<el-button @click="$router.back()">返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
|
|
||||||
<multipleMap ref="map" @callback="getAddress" />
|
<multipleMap ref="map" @callback="getAddress" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import card from "@/components/card";
|
|
||||||
|
|
||||||
import multipleMap from "@/components/map/multiple-map";
|
import multipleMap from "@/components/map/multiple-map";
|
||||||
import * as RegExp from "@/plugins/RegExp.js";
|
import * as RegExp from "@/plugins/RegExp.js";
|
||||||
import {
|
import {
|
||||||
@@ -85,8 +84,8 @@ export default {
|
|||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
editMemberAddress(params)
|
editMemberAddress(params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.success) {
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
if (res.success) {
|
||||||
this.$router.push("/home/MyAddress");
|
this.$router.push("/home/MyAddress");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -96,8 +95,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
newMemberAddress(params)
|
newMemberAddress(params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.success) {
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
if (res.success) {
|
||||||
this.$router.push("/home/MyAddress");
|
this.$router.push("/home/MyAddress");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -145,7 +144,6 @@ export default {
|
|||||||
if (id) this.getAddrById(id);
|
if (id) this.getAddrById(id);
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
card,
|
|
||||||
multipleMap
|
multipleMap
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- 卡片组件 -->
|
<UserCenterLayout title="我的售后" :tabs="['我的售后']">
|
||||||
<card _Title="我的售后" :_Size="16"></card>
|
<template #extra>
|
||||||
<!-- 搜索 筛选 -->
|
|
||||||
<div class="mb_20 box">
|
|
||||||
<div class="global_float_right">
|
|
||||||
<el-input
|
<el-input
|
||||||
class="width_300"
|
class="width_300"
|
||||||
|
|
||||||
@@ -13,8 +10,7 @@
|
|||||||
@keyup.enter="getList"
|
@keyup.enter="getList"
|
||||||
placeholder="请输入订单号搜索"
|
placeholder="请输入订单号搜索"
|
||||||
/>
|
/>
|
||||||
</div>
|
</template>
|
||||||
</div>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<empty v-if="orderList.length === 0"/>
|
<empty v-if="orderList.length === 0"/>
|
||||||
<div class="order-content" v-else>
|
<div class="order-content" v-else>
|
||||||
@@ -76,8 +72,9 @@
|
|||||||
<div class="page-size">
|
<div class="page-size">
|
||||||
<el-pagination :total="total" @current-change="changePageNum"
|
<el-pagination :total="total" @current-change="changePageNum"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
:page-size="params.pageSize" layout="sizes, prev, pager, next"></el-pagination>
|
:page-size="params.pageSize" layout="sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
<el-dialog v-model="logisticsShow" width="530">
|
<el-dialog v-model="logisticsShow" width="530">
|
||||||
<template #header><p>
|
<template #header><p>
|
||||||
<span>提交物流信息</span>
|
<span>提交物流信息</span>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-detail">
|
<div class="order-detail">
|
||||||
<card _Title="售后详情" :_Size="16"></card>
|
<UserCenterLayout title="售后详情" :tabs="['售后详情']">
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<el-card class="mb_10" shadow="never" v-if="(afterSale.serviceStatus == 'PASS' &&
|
<el-card class="mb_10" shadow="never" v-if="(afterSale.serviceStatus == 'PASS' &&
|
||||||
afterSale.serviceType != 'RETURN_MONEY') || (afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel)">
|
afterSale.serviceType != 'RETURN_MONEY') || (afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel)">
|
||||||
@@ -11,8 +11,10 @@
|
|||||||
<div class="order-card">
|
<div class="order-card">
|
||||||
<h3>{{afterSale.serviceName}}</h3>
|
<h3>{{afterSale.serviceName}}</h3>
|
||||||
<p class="global_color fontsize_18">{{ afterSale.orderStatusValue }}</p>
|
<p class="global_color fontsize_18">{{ afterSale.orderStatusValue }}</p>
|
||||||
<p>售后单号:{{ afterSale.sn }} 订单号:{{afterSale.orderSn}}</p>
|
<p class="order-meta">
|
||||||
<div style="color:#999;" class="operation-time">创建时间:{{afterSale.createTime}}</div>
|
<span>售后单号:{{ afterSale.sn }} 订单号:{{ afterSale.orderSn }}</span>
|
||||||
|
<span class="order-meta-time">创建时间:{{ afterSale.createTime }}</span>
|
||||||
|
</p>
|
||||||
<div class="service-after">
|
<div class="service-after">
|
||||||
<div>
|
<div>
|
||||||
本次售后服务由<span>{{afterSale.storeName}}</span>为您提供
|
本次售后服务由<span>{{afterSale.storeName}}</span>为您提供
|
||||||
@@ -104,6 +106,7 @@
|
|||||||
<el-button type="primary" :loading="submitLoading" @click="submitDelivery">提交</el-button>
|
<el-button type="primary" :loading="submitLoading" @click="submitDelivery">提交</el-button>
|
||||||
</div></template>
|
</div></template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -243,15 +246,21 @@ export default {
|
|||||||
color: #999;
|
color: #999;
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
}
|
}
|
||||||
|
.order-meta {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 16px;
|
||||||
|
|
||||||
|
.order-meta-time {
|
||||||
|
flex-shrink: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
h3 {
|
h3 {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.operation-time {
|
|
||||||
position: absolute;
|
|
||||||
right: 20px;
|
|
||||||
top: 10px;
|
|
||||||
}
|
|
||||||
&:last-child{
|
&:last-child{
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apply-after-sale">
|
<div class="apply-after-sale">
|
||||||
<card _Title="申请售后"></card>
|
<UserCenterLayout title="申请售后" :tabs="['申请售后']">
|
||||||
<el-table :data="goodsData" border>
|
<el-table :data="goodsData" border>
|
||||||
<el-table-column label="商品名称">
|
<el-table-column label="商品名称">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -42,7 +42,8 @@
|
|||||||
<el-input type="textarea" :rows="4" maxlength="500" style="width:260px" show-word-limit v-model="form.problemDesc" />
|
<el-input type="textarea" :rows="4" maxlength="500" style="width:260px" show-word-limit v-model="form.problemDesc" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图片信息">
|
<el-form-item label="图片信息">
|
||||||
<div style="display:flex;align-items:center;">
|
<div class="upload-section">
|
||||||
|
<div class="upload-row">
|
||||||
<div class="demo-upload-list" v-for="(img, index) in uploadList" :key="index">
|
<div class="demo-upload-list" v-for="(img, index) in uploadList" :key="index">
|
||||||
<img :src="img">
|
<img :src="img">
|
||||||
<div class="demo-upload-list-cover">
|
<div class="demo-upload-list-cover">
|
||||||
@@ -51,18 +52,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-upload
|
<el-upload
|
||||||
:show-upload-list="false"
|
class="upload-trigger"
|
||||||
|
:show-file-list="false"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
:format="['jpg','jpeg','png']"
|
:format="['jpg','jpeg','png']"
|
||||||
:action="action"
|
:action="action"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
style="display: inline-block;width:58px;">
|
>
|
||||||
<div class="hover-pointer icon-upload" style="">
|
<div class="hover-pointer icon-upload">
|
||||||
<el-icon :size="20"><Plus /></el-icon>
|
<el-icon :size="20"><Camera /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="describe">上传售后凭证,最多5张</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="退款方式">
|
<el-form-item label="退款方式">
|
||||||
<div>{{info.refundWay == 'ORIGINAL' ? '原路退回' : '账号退款'}}</div>
|
<div>{{info.refundWay == 'ORIGINAL' ? '原路退回' : '账号退款'}}</div>
|
||||||
@@ -89,16 +93,17 @@
|
|||||||
<img :src="previewImage" v-if="visible" style="width: 100%">
|
<img :src="previewImage" v-if="visible" style="width: 100%">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { Delete, Plus, View } from '@element-plus/icons-vue';
|
import { Camera, Delete, View } from '@element-plus/icons-vue';
|
||||||
import { afterSaleReason, afterSaleInfo, applyAfterSale } from '@/api/member.js'
|
import { afterSaleReason, afterSaleInfo, applyAfterSale } from '@/api/member.js'
|
||||||
import { commonUrl } from '@/plugins/request.js';
|
import { commonUrl } from '@/plugins/request.js';
|
||||||
import storage from '@/plugins/storage';
|
import storage from '@/plugins/storage';
|
||||||
import * as RegExp from '@/plugins/RegExp'
|
import * as RegExp from '@/plugins/RegExp'
|
||||||
export default {
|
export default {
|
||||||
components: { Delete, Plus, View },
|
components: { Camera, Delete, View },
|
||||||
data () {
|
data () {
|
||||||
const checkNum = (rule, value, callback) => {
|
const checkNum = (rule, value, callback) => {
|
||||||
if (value === '') {
|
if (value === '') {
|
||||||
@@ -228,7 +233,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.demo-upload-list{
|
.demo-upload-list{
|
||||||
display: inline-block;
|
display: block;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -239,8 +244,7 @@ export default {
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||||
margin-right: 4px;
|
flex-shrink: 0;
|
||||||
margin-top: 10px;
|
|
||||||
}
|
}
|
||||||
.demo-upload-list img{
|
.demo-upload-list img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -265,17 +269,43 @@ export default {
|
|||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
}
|
}
|
||||||
.icon-upload {
|
.icon-upload {
|
||||||
width: 58px;
|
width: 60px;
|
||||||
height:58px;
|
height: 60px;
|
||||||
line-height: 58px;
|
line-height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
border: 1px dashed #999;
|
border: 1px dashed #999;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-top: 10px;
|
box-sizing: border-box;
|
||||||
&:hover{
|
&:hover{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-color: $theme_color;
|
border-color: $theme_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upload-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-trigger {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
:deep(.el-upload) {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.describe {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="add-eval">
|
<div class="add-eval">
|
||||||
|
<UserCenterLayout title="商品投诉" :tabs="['商品投诉']">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<card _Title="商品投诉" :_Size="16"></card>
|
|
||||||
<p>
|
<p>
|
||||||
<span class="color999">订单号:</span><span>{{$route.query.sn}}</span>
|
<span class="color999">订单号:</span><span>{{$route.query.sn}}</span>
|
||||||
<span class="color999 ml_20" v-if="order.order">{{order.order.paymentTime}}</span>
|
<span class="color999 ml_20" v-if="order.order">{{order.order.paymentTime}}</span>
|
||||||
@@ -16,14 +16,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="eval-con">
|
<div class="eval-con">
|
||||||
<div>
|
<div class="eval-form">
|
||||||
<span class="color999">投诉主题:</span>
|
<span class="color999">投诉主题:</span>
|
||||||
<el-select v-model="form.complainTopic" style="width:260px;margin-bottom:10px">
|
<el-select v-model="form.complainTopic" style="width:260px;margin-bottom:10px">
|
||||||
<el-option v-for="item in reasonList" :value="item.reason" :key="item.id">{{ item.reason }}</el-option>
|
<el-option v-for="item in reasonList" :value="item.reason" :key="item.id">{{ item.reason }}</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input type="textarea" maxlength="500" show-word-limit :rows="4" placeholder="请输入投诉内容" v-model="form.content" />
|
<el-input type="textarea" maxlength="500" show-word-limit :rows="4" placeholder="请输入投诉内容" v-model="form.content" />
|
||||||
</div>
|
</div>
|
||||||
<div style="display:flex;align-items:center;">
|
<div class="upload-section">
|
||||||
|
<div class="upload-row">
|
||||||
<div class="demo-upload-list" v-for="(img, index) in orderGoods.uploadList" :key="index">
|
<div class="demo-upload-list" v-for="(img, index) in orderGoods.uploadList" :key="index">
|
||||||
<img :src="img">
|
<img :src="img">
|
||||||
<div class="demo-upload-list-cover">
|
<div class="demo-upload-list-cover">
|
||||||
@@ -32,25 +33,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-upload
|
<el-upload
|
||||||
:show-upload-list="false"
|
class="upload-trigger"
|
||||||
|
:show-file-list="false"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
:format="['jpg','jpeg','png']"
|
:format="['jpg','jpeg','png']"
|
||||||
:action="action"
|
:action="action"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
style="display: inline-block;width:58px;">
|
>
|
||||||
<div class="hover-pointer icon-upload" style="">
|
<div class="hover-pointer icon-upload">
|
||||||
<el-icon :size="20"><Camera /></el-icon>
|
<el-icon :size="20"><Camera /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
</div>
|
||||||
<div class="describe">上传投诉凭证,最多5张</div>
|
<div class="describe">上传投诉凭证,最多5张</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="submit-bar">
|
||||||
|
<el-button type="primary" :loading="loading" @click="save">提交</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" class="mt_10" :loading="loading" @click="save">提交</el-button>
|
|
||||||
<el-dialog title="View Image" v-model="visible">
|
<el-dialog title="View Image" v-model="visible">
|
||||||
<img :src="previewImage" v-if="visible" style="width: 100%">
|
<img :src="previewImage" v-if="visible" style="width: 100%">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -170,11 +176,18 @@ export default {
|
|||||||
.eval-con {
|
.eval-con {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.eval-form {
|
||||||
|
:deep(.el-textarea) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-upload-list{
|
.demo-upload-list{
|
||||||
display: inline-block;
|
display: block;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -185,8 +198,7 @@ export default {
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||||
margin-right: 4px;
|
flex-shrink: 0;
|
||||||
margin-top: 10px;
|
|
||||||
}
|
}
|
||||||
.demo-upload-list img{
|
.demo-upload-list img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -211,24 +223,53 @@ export default {
|
|||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
}
|
}
|
||||||
.icon-upload {
|
.icon-upload {
|
||||||
width: 58px;
|
width: 60px;
|
||||||
height:58px;
|
height: 60px;
|
||||||
line-height: 58px;
|
line-height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
border: 1px dashed #999;
|
border: 1px dashed #999;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-top: 10px;
|
box-sizing: border-box;
|
||||||
&:hover{
|
&:hover{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-color: $theme_color;
|
border-color: $theme_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upload-section {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-trigger {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
:deep(.el-upload) {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.describe{
|
.describe{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #999;
|
color: #999;
|
||||||
position:relative;
|
margin-top: 8px;
|
||||||
top: 46px;
|
}
|
||||||
left: -60px;
|
|
||||||
|
.submit-bar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="wrapper">
|
||||||
<card _Title="收货地址" _More="添加新地址" _Src="/home/addAddress"></card>
|
<UserCenterLayout title="收货地址" :tabs="['收货地址']" more-text="添加新地址" more-to="/home/addAddress">
|
||||||
|
<template #extra>
|
||||||
|
<el-button type="primary" @click="add">添加新地址</el-button>
|
||||||
|
</template>
|
||||||
<div class="address-box" v-for="(item, index) in list" :key="index">
|
<div class="address-box" v-for="(item, index) in list" :key="index">
|
||||||
<div class="address-header">
|
<div class="address-header">
|
||||||
<span>
|
<span>
|
||||||
@@ -28,12 +31,12 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Delete, Edit } from '@element-plus/icons-vue';
|
import { Delete, Edit } from '@element-plus/icons-vue';
|
||||||
import card from '@/components/card';
|
|
||||||
import { memberAddress, delMemberAddress } from '@/api/address.js';
|
import { memberAddress, delMemberAddress } from '@/api/address.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -46,6 +49,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.$router.push('/home/addAddress');
|
||||||
|
},
|
||||||
edit (id) {
|
edit (id) {
|
||||||
// 编辑地址
|
// 编辑地址
|
||||||
this.$router.push({ path: '/home/addAddress', query: { id: id } });
|
this.$router.push({ path: '/home/addAddress', query: { id: id } });
|
||||||
@@ -85,11 +91,17 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.wrapper {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
.address-box {
|
.address-box {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: 15px;
|
margin: 0;
|
||||||
|
|
||||||
border-bottom: 1px solid $border_color;
|
border-bottom: 1px solid $border_color;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-header {
|
.address-header {
|
||||||
@@ -114,11 +126,23 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-action span {
|
.address-action {
|
||||||
margin-left: 15px;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 15px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
.el-icon {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.default-address-tag {
|
.default-address-tag {
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- 卡片组件 -->
|
<card _Title="我的订单" :_Size="16" :_Tabs="changeWay" @_Change="change" _More="全部订单" _Src="/home/MyOrder" v-if="homePage"></card>
|
||||||
<card _Title="我的订单" :_Size="16" :_Tabs="changeWay" @_Change="change" v-if="!homePage"></card>
|
|
||||||
<card _Title="我的订单" :_Size="16" :_Tabs="changeWay" @_Change="change" _More="全部订单" _Src="/home/MyOrder" v-else></card>
|
<UserCenterLayout
|
||||||
<!-- 搜索 筛选 -->
|
v-if="!homePage"
|
||||||
<div class="order-search-bar" v-if="!homePage">
|
title="我的订单"
|
||||||
<div class="global_float_right">
|
:tabs="changeWay"
|
||||||
|
:active-tab="activeOrderTab"
|
||||||
|
@tab-change="change"
|
||||||
|
>
|
||||||
|
<template #extra>
|
||||||
|
<div class="order-search">
|
||||||
<el-input
|
<el-input
|
||||||
class="width_300"
|
|
||||||
v-model="params.keywords"
|
v-model="params.keywords"
|
||||||
@keyup.enter="getList"
|
@keyup.enter="getList"
|
||||||
placeholder="请输入订单号搜索"
|
placeholder="输入订单号搜索"
|
||||||
/>
|
/>
|
||||||
|
<el-button type="primary" @click="getList">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
|
|
||||||
<!-- 订单列表 -->
|
<!-- 订单列表 -->
|
||||||
<empty v-if="orderList.length === 0" />
|
<empty v-if="orderList.length === 0" />
|
||||||
<div class="order-content" v-else>
|
<div class="order-content" v-else>
|
||||||
@@ -74,11 +80,74 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-skeleton size="large" fix v-if="spinShow"></el-skeleton>
|
<el-skeleton size="large" fix v-if="spinShow"></el-skeleton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<div class="page-size" v-if="!homePage">
|
<div class="page-size">
|
||||||
<el-pagination :total="total" @current-change="changePageNum"
|
<el-pagination :total="total" @current-change="changePageNum"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
:page-size="params.pageSize" layout="total, sizes, prev, pager, next"></el-pagination>
|
:page-size="params.pageSize" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
|
|
||||||
|
<!-- 个人中心首页订单列表 -->
|
||||||
|
<empty v-if="homePage && orderList.length === 0" />
|
||||||
|
<div class="order-content" v-else-if="homePage">
|
||||||
|
<div
|
||||||
|
class="order-list"
|
||||||
|
v-for="(order, onderIndex) in orderList"
|
||||||
|
:key="onderIndex"
|
||||||
|
>
|
||||||
|
<div class="order-header">
|
||||||
|
<div>
|
||||||
|
<div>{{ filterOrderStatus(order.orderStatus) }}</div>
|
||||||
|
<div>
|
||||||
|
订单号:{{ order.sn }} {{order.createTime}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button v-if="order.orderStatus === 'COMPLETED'" @click="delOrder(order.sn)" class="del-btn mr_10 fontsize_16" style="margin-top:-5px;" type="text" icon="ios-trash-outline" size="small"></el-button>
|
||||||
|
<span>{{ $filters.unitPrice(order.flowPrice, "¥") }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="order-body">
|
||||||
|
<div class="goods-list">
|
||||||
|
<div
|
||||||
|
v-for="(goods, goodsIndex) in order.orderItems"
|
||||||
|
:key="goodsIndex"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
@click="goodsDetail(goods.skuId, goods.goodsId)"
|
||||||
|
class="hover-color"
|
||||||
|
:src="goods.image"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
<div class="hover-color" @click="goodsDetail(goods.skuId, goods.goodsId)">{{ goods.name }}</div>
|
||||||
|
<div class="mt_10">
|
||||||
|
<span class="global_color">{{ $filters.unitPrice(goods.goodsPrice, "¥") }} </span>x {{ goods.num }}
|
||||||
|
<span style="margin-left: 10px;color: #ff9900;">{{refundPriceList(goods.isRefund)}}</span>
|
||||||
|
</div>
|
||||||
|
<el-button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" type="success" class="fontsize_12" style="position:relative;top:-22px;left:190px;margin-right:10px">评价</el-button>
|
||||||
|
<el-button v-if="goods.complainStatus == 'NO_APPLY'" @click="complain(order.sn, goodsIndex)" type="danger" class="fontsize_12" size="small" style="position:relative;top:-22px;left:190px">投诉</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span @click="shopPage(order.storeId)">{{ order.storeName }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="order-actions">
|
||||||
|
<!-- 订单基础操作 -->
|
||||||
|
<el-button @click="orderDetail(order.sn)" type="warning" size="small">订单详情</el-button>
|
||||||
|
<el-button @click="handleCancelOrder(order.sn)" type="danger" v-if="order.allowOperationVO.cancel" size="small">取消订单</el-button>
|
||||||
|
<el-button @click="goPay(order.sn)" size="small" type="success" v-if="order.allowOperationVO.pay">去支付</el-button>
|
||||||
|
<el-button @click="received(order.sn)" size="small" type="primary" v-if="order.allowOperationVO.rog">确认收货</el-button>
|
||||||
|
<!-- 售后 -->
|
||||||
|
<el-button v-if="order.groupAfterSaleStatus && (order.groupAfterSaleStatus.includes('NOT_APPLIED')|| order.groupAfterSaleStatus.includes('PART_AFTER_SALE'))"
|
||||||
|
@click="applyAfterSale(order.orderItems)" size="small">申请售后</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-skeleton size="large" fix v-if="spinShow"></el-skeleton>
|
||||||
</div>
|
</div>
|
||||||
<!-- 选择售后商品 -->
|
<!-- 选择售后商品 -->
|
||||||
<el-dialog v-model="afterSaleModal" title="请选择申请售后的商品">
|
<el-dialog v-model="afterSaleModal" title="请选择申请售后的商品">
|
||||||
@@ -135,6 +204,7 @@ export default {
|
|||||||
// 状态数组
|
// 状态数组
|
||||||
orderStatusList,
|
orderStatusList,
|
||||||
changeWay: ['全部订单', '待付款', '待收货', '已完成'], // 订单状态
|
changeWay: ['全部订单', '待付款', '待收货', '已完成'], // 订单状态
|
||||||
|
activeOrderTab: 0,
|
||||||
total: 0, // 数据总数
|
total: 0, // 数据总数
|
||||||
spinShow: false, // 加载状态
|
spinShow: false, // 加载状态
|
||||||
afterSaleModal: false, // 选择售后商品模态框
|
afterSaleModal: false, // 选择售后商品模态框
|
||||||
@@ -173,6 +243,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 切换订单状态
|
// 切换订单状态
|
||||||
change (index) {
|
change (index) {
|
||||||
|
this.activeOrderTab = index;
|
||||||
|
this.params.pageNumber = 1;
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
this.params.tag = 'ALL'
|
this.params.tag = 'ALL'
|
||||||
@@ -306,14 +378,30 @@ export default {
|
|||||||
.wrapper {
|
.wrapper {
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
}
|
}
|
||||||
.order-search-bar {
|
.order-search {
|
||||||
margin-top: 16px;
|
display: flex;
|
||||||
margin-bottom: 16px;
|
align-items: center;
|
||||||
overflow: hidden;
|
width: 330px;
|
||||||
|
|
||||||
|
:deep(.el-input) {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-button) {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.order-content {
|
||||||
|
padding-top: 14px;
|
||||||
}
|
}
|
||||||
.page-size {
|
.page-size {
|
||||||
margin: 15px 0px;
|
margin: 15px 0;
|
||||||
text-align: right;
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
:deep(.el-pagination) {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/** 订单列表 */
|
/** 订单列表 */
|
||||||
.order-list {
|
.order-list {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-detail" v-if="order.order">
|
<div class="order-detail" v-if="order.order">
|
||||||
<card _Title="订单详情" :_Size="16"></card>
|
<UserCenterLayout title="订单详情" :tabs="['订单详情']">
|
||||||
<el-card
|
<el-card
|
||||||
class="mb_10"
|
class="mb_10"
|
||||||
shadow="never"
|
shadow="never"
|
||||||
@@ -317,6 +317,7 @@
|
|||||||
<el-button @click="logisticsModal = false">取消</el-button>
|
<el-button @click="logisticsModal = false">取消</el-button>
|
||||||
</div></template>
|
</div></template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</UserCenterLayout>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="优惠券列表" :_Tabs="statusNameList" @_Change="change" />
|
<UserCenterLayout
|
||||||
|
title="优惠券列表"
|
||||||
|
:tabs="statusNameList"
|
||||||
|
:active-tab="activeStatusIndex"
|
||||||
|
@tab-change="change"
|
||||||
|
>
|
||||||
<empty v-if="list.length == 0" />
|
<empty v-if="list.length == 0" />
|
||||||
<ul class="coupon-list" v-else>
|
<ul class="coupon-list" v-else>
|
||||||
<li v-for="(item, index) in list" class="coupon-item" :key="index">
|
<li v-for="(item, index) in list" class="coupon-item" :key="index">
|
||||||
@@ -30,13 +35,17 @@
|
|||||||
<i class="circle-bottom"></i>
|
<i class="circle-bottom"></i>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<el-pagination :total="total"
|
<div class="pageration">
|
||||||
|
<el-pagination
|
||||||
|
:total="total"
|
||||||
@current-change="changePageNum"
|
@current-change="changePageNum"
|
||||||
class="pageration"
|
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
:page-size="params.pageSize"
|
:page-size="params.pageSize"
|
||||||
layout="total, sizes, prev, pager, next"></el-pagination>
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<el-skeleton v-if="loading" fix></el-skeleton>
|
<el-skeleton v-if="loading" fix></el-skeleton>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -64,6 +73,12 @@ export default {
|
|||||||
list: [], // 优惠券列表
|
list: [], // 优惠券列表
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
activeStatusIndex() {
|
||||||
|
const index = this.statusList.indexOf(this.params.memberCouponStatus);
|
||||||
|
return index > -1 ? index : 0;
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
// 获取优惠券列表
|
// 获取优惠券列表
|
||||||
@@ -204,6 +219,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pageration {
|
.pageration {
|
||||||
text-align: right;
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="资金管理"/>
|
<UserCenterLayout title="资金管理" :tabs="['资金管理']">
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="mb_20 account-price">
|
<div class="mb_20 account-price">
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
<!-- 余额日志 -->
|
<!-- 余额日志 -->
|
||||||
<el-tabs v-model="activeWalletTab" @tab-click="(tab) => tabPaneChange(tab.paneName)">
|
<el-tabs v-model="activeWalletTab" @tab-click="(tab) => tabPaneChange(tab.paneName)">
|
||||||
<el-tab-pane label="余额日志" name="log">
|
<el-tab-pane label="余额日志" name="log">
|
||||||
<el-table :data="logColumnsData.records || []">
|
<el-table ref="logTable" :data="logColumnsData.records || []">
|
||||||
<el-table-column prop="createTime" label="时间" width="190" />
|
<el-table-column prop="createTime" label="时间" width="190" />
|
||||||
<el-table-column label="金额" width="180">
|
<el-table-column label="金额" width="180">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -106,15 +106,14 @@
|
|||||||
:page-size="walletForm.pageSize"
|
:page-size="walletForm.pageSize"
|
||||||
:page-sizes="[10, 20, 50]"
|
:page-sizes="[10, 20, 50]"
|
||||||
:total="logColumnsData.total"
|
:total="logColumnsData.total"
|
||||||
small
|
|
||||||
@current-change="changePage"
|
@current-change="changePage"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
layout="total, sizes, prev, pager, next"></el-pagination>
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- 充值记录 -->
|
<!-- 充值记录 -->
|
||||||
<el-tab-pane label="充值记录" name="recharge">
|
<el-tab-pane label="充值记录" name="recharge">
|
||||||
<el-table :data="rechargeListData.records || []">
|
<el-table ref="rechargeTable" :data="rechargeListData.records || []">
|
||||||
<el-table-column prop="createTime" label="充值时间" width="168" />
|
<el-table-column prop="createTime" label="充值时间" width="168" />
|
||||||
<el-table-column prop="rechargeSn" label="支付单号" width="200" />
|
<el-table-column prop="rechargeSn" label="支付单号" width="200" />
|
||||||
<el-table-column label="充值金额">
|
<el-table-column label="充值金额">
|
||||||
@@ -145,15 +144,14 @@
|
|||||||
:page-size="rechargeForm.pageSize"
|
:page-size="rechargeForm.pageSize"
|
||||||
:page-sizes="[10, 20, 50]"
|
:page-sizes="[10, 20, 50]"
|
||||||
:total="rechargeListData.total"
|
:total="rechargeListData.total"
|
||||||
small
|
|
||||||
@current-change="rechargeChangePage"
|
@current-change="rechargeChangePage"
|
||||||
@size-change="rechargeChangePageSize"
|
@size-change="rechargeChangePageSize"
|
||||||
layout="total, sizes, prev, pager, next"></el-pagination>
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="提现记录" name="withdrawApply">
|
<el-tab-pane label="提现记录" name="withdrawApply">
|
||||||
<el-table :data="withdrawApplyColumnsListData.records || []">
|
<el-table ref="withdrawTable" :data="withdrawApplyColumnsListData.records || []">
|
||||||
<el-table-column prop="createTime" label="申请时间" width="168" />
|
<el-table-column prop="createTime" label="申请时间" width="168" />
|
||||||
<el-table-column prop="sn" label="提现单号" width="200" />
|
<el-table-column prop="sn" label="提现单号" width="200" />
|
||||||
<el-table-column label="提现金额" width="110">
|
<el-table-column label="提现金额" width="110">
|
||||||
@@ -180,13 +178,13 @@
|
|||||||
:page-size="withdrawApplyForm.pageSize"
|
:page-size="withdrawApplyForm.pageSize"
|
||||||
:page-sizes="[10, 20, 50]"
|
:page-sizes="[10, 20, 50]"
|
||||||
:total="withdrawApplyColumnsListData.total"
|
:total="withdrawApplyColumnsListData.total"
|
||||||
small
|
|
||||||
@current-change="withdrawChangePage"
|
@current-change="withdrawChangePage"
|
||||||
@size-change="withdrawChangePageSize"
|
@size-change="withdrawChangePageSize"
|
||||||
layout="total, sizes, prev, pager, next"></el-pagination>
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -281,6 +279,7 @@ export default {
|
|||||||
getDepositLog(this.walletForm).then((res) => {
|
getDepositLog(this.walletForm).then((res) => {
|
||||||
if (res.message === 'success') {
|
if (res.message === 'success') {
|
||||||
this.logColumnsData = res.result;
|
this.logColumnsData = res.result;
|
||||||
|
this.refreshActiveTableLayout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -297,12 +296,14 @@ export default {
|
|||||||
if (v === 'withdrawApply') {
|
if (v === 'withdrawApply') {
|
||||||
this.getWithdrawApplyData();
|
this.getWithdrawApplyData();
|
||||||
}
|
}
|
||||||
|
this.refreshActiveTableLayout();
|
||||||
},
|
},
|
||||||
// 充值记录
|
// 充值记录
|
||||||
getRechargeData() {
|
getRechargeData() {
|
||||||
getRecharge(this.rechargeForm).then((res) => {
|
getRecharge(this.rechargeForm).then((res) => {
|
||||||
if (res.message === 'success') {
|
if (res.message === 'success') {
|
||||||
this.rechargeListData = res.result;
|
this.rechargeListData = res.result;
|
||||||
|
this.refreshActiveTableLayout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -311,9 +312,20 @@ export default {
|
|||||||
getWithdrawApply(this.withdrawApplyForm).then((res) => {
|
getWithdrawApply(this.withdrawApplyForm).then((res) => {
|
||||||
if (res.message === 'success') {
|
if (res.message === 'success') {
|
||||||
this.withdrawApplyColumnsListData = res.result;
|
this.withdrawApplyColumnsListData = res.result;
|
||||||
|
this.refreshActiveTableLayout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
refreshActiveTableLayout() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const tableMap = {
|
||||||
|
log: this.$refs.logTable,
|
||||||
|
recharge: this.$refs.rechargeTable,
|
||||||
|
withdrawApply: this.$refs.withdrawTable
|
||||||
|
};
|
||||||
|
tableMap[this.activeWalletTab]?.doLayout?.();
|
||||||
|
});
|
||||||
|
},
|
||||||
// 余额日志
|
// 余额日志
|
||||||
changePage(v) {
|
changePage(v) {
|
||||||
this.walletForm.pageNumber = v;
|
this.walletForm.pageNumber = v;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper my-gift-cards">
|
<div class="wrapper my-gift-cards">
|
||||||
<card _Title="我的礼品卡" />
|
<UserCenterLayout title="我的礼品卡" :tabs="['我的礼品卡']">
|
||||||
|
|
||||||
<div class="bind-section mb_20">
|
<div class="bind-section mb_20">
|
||||||
<div class="section-title">兑换礼品卡</div>
|
<div class="section-title">兑换礼品卡</div>
|
||||||
@@ -77,10 +77,9 @@
|
|||||||
:page-size="params.pageSize"
|
:page-size="params.pageSize"
|
||||||
:page-sizes="[10, 20, 50]"
|
:page-sizes="[10, 20, 50]"
|
||||||
:total="total"
|
:total="total"
|
||||||
small
|
|
||||||
@current-change="changePage"
|
@current-change="changePage"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
layout="total, sizes, prev, pager, next" />
|
layout="total, sizes, prev, pager, next, jumper" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog v-model="noticeModal" title="使用须知" footer-hide width="520">
|
<el-dialog v-model="noticeModal" title="使用须知" footer-hide width="520">
|
||||||
@@ -90,6 +89,7 @@
|
|||||||
<div class="gcc-notice-footer">
|
<div class="gcc-notice-footer">
|
||||||
<el-button type="primary" @click="noticeModal = false">我知道了</el-button>
|
<el-button type="primary" @click="noticeModal = false">我知道了</el-button>
|
||||||
</div></el-dialog>
|
</div></el-dialog>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -441,8 +441,9 @@ export default {
|
|||||||
background: #f7f7f7;
|
background: #f7f7f7;
|
||||||
}
|
}
|
||||||
.page-size {
|
.page-size {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.gcc-notice-text {
|
.gcc-notice-text {
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- 卡片组件 -->
|
<UserCenterLayout title="我的足迹" :tabs="['我的足迹']">
|
||||||
<card _Title="我的足迹" :_Size="16"></card>
|
<template #extra>
|
||||||
<el-button class="del-btn" @click="clearAll" type="primary">删除全部</el-button>
|
<el-button class="del-btn" @click="clearAll" type="primary">删除全部</el-button>
|
||||||
|
</template>
|
||||||
<!-- 订单列表 -->
|
<!-- 订单列表 -->
|
||||||
<empty v-if="list.length === 0" />
|
<empty v-if="list.length === 0" />
|
||||||
<ul class="track-list" v-else>
|
<ul class="track-list" v-else>
|
||||||
@@ -25,8 +26,9 @@
|
|||||||
@current-change="changePageNum"
|
@current-change="changePageNum"
|
||||||
@size-change="changePageSize"
|
@size-change="changePageSize"
|
||||||
:page-size="params.pageSize"
|
:page-size="params.pageSize"
|
||||||
layout="sizes, prev, pager, next"></el-pagination>
|
layout="sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
</UserCenterLayout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -90,36 +90,42 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="licencePhoto" label="营业执照电子版">
|
<el-form-item prop="licencePhoto" label="营业执照电子版">
|
||||||
|
<div class="upload-wrap">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadLicence"
|
ref="uploadLicence"
|
||||||
:show-upload-list="false"
|
:show-file-list="false"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:format="['jpg', 'jpeg', 'png', 'gif']"
|
accept=".jpg,.jpeg,.png,.gif"
|
||||||
:max-size="2048"
|
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:on-format-error="handleFormatError"
|
|
||||||
:on-exceeded-size="handleMaxSize"
|
|
||||||
:on-error="uploadErr"
|
:on-error="uploadErr"
|
||||||
multiple
|
:disabled="form.licencePhoto.length >= 1"
|
||||||
:action="action"
|
:action="action"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
>
|
>
|
||||||
<el-button type="info" :loading="uploadLoading">证照上传</el-button>
|
<el-button
|
||||||
|
type="info"
|
||||||
|
:loading="uploadLoading"
|
||||||
|
:disabled="form.licencePhoto.length >= 1"
|
||||||
|
>证照上传</el-button
|
||||||
|
>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div class="describe">
|
<div class="describe">
|
||||||
请压缩图片在2M以内,格式为gif,jpg,png,并确保文字清晰,以免上传或审核失败
|
请压缩图片在2M以内,格式为gif,jpg,png,并确保文字清晰,以免上传或审核失败,仅可上传1张
|
||||||
</div>
|
</div>
|
||||||
|
<div class="img-list-wrap">
|
||||||
<div
|
<div
|
||||||
class="img-list"
|
class="img-list"
|
||||||
v-for="(item, index) in form.licencePhoto"
|
v-for="(item, index) in form.licencePhoto"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<img :src="item" width="100" alt="" />
|
<img :src="item" alt="" />
|
||||||
<div class="cover">
|
<div class="cover">
|
||||||
<el-icon @click="handleView(item)"><View /></el-icon>
|
<el-icon @click="handleView(item)"><View /></el-icon>
|
||||||
<el-icon @click="handleRemove(index, 'licencePhoto')"><Delete /></el-icon>
|
<el-icon @click="handleRemove(index, 'licencePhoto')"><Delete /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<h4>法人信息</h4>
|
<h4>法人信息</h4>
|
||||||
@@ -139,15 +145,13 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="legalPhoto" label="法人证件电子版">
|
<el-form-item prop="legalPhoto" label="法人证件电子版">
|
||||||
|
<div class="upload-wrap">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadLegal"
|
ref="uploadLegal"
|
||||||
:show-upload-list="false"
|
:show-file-list="false"
|
||||||
:on-success="handleSuccess1"
|
:on-success="handleSuccess1"
|
||||||
:before-upload="beforeUpload1"
|
:before-upload="beforeUpload1"
|
||||||
:max-size="2048"
|
accept=".jpg,.jpeg,.png,.gif"
|
||||||
:format="['jpg', 'jpeg', 'png', 'gif']"
|
|
||||||
:on-format-error="handleFormatError"
|
|
||||||
:on-exceeded-size="handleMaxSize"
|
|
||||||
:on-error="uploadErr"
|
:on-error="uploadErr"
|
||||||
multiple
|
multiple
|
||||||
:action="action"
|
:action="action"
|
||||||
@@ -158,17 +162,20 @@
|
|||||||
<div class="describe">
|
<div class="describe">
|
||||||
请压缩图片在2M以内,身份证正反面两张照片,确保图片清晰无缺角
|
请压缩图片在2M以内,身份证正反面两张照片,确保图片清晰无缺角
|
||||||
</div>
|
</div>
|
||||||
|
<div class="img-list-wrap">
|
||||||
<div
|
<div
|
||||||
class="img-list"
|
class="img-list"
|
||||||
v-for="(item, index) in form.legalPhoto"
|
v-for="(item, index) in form.legalPhoto"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<img :src="item" width="100" alt="" />
|
<img :src="item" alt="" />
|
||||||
<div class="cover">
|
<div class="cover">
|
||||||
<el-icon @click="handleView(item)"><View /></el-icon>
|
<el-icon @click="handleView(item)"><View /></el-icon>
|
||||||
<el-icon @click="handleRemove(index, 'legalPhoto')"><Delete /></el-icon>
|
<el-icon @click="handleRemove(index, 'legalPhoto')"><Delete /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" :loading="loading" @click="next"
|
<el-button type="primary" :loading="loading" @click="next"
|
||||||
@@ -194,6 +201,7 @@ const FIRST_APPLY_DRAFT_KEY = 'shopEntryFirstDraft';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { multipleMap, View, Delete },
|
components: { multipleMap, View, Delete },
|
||||||
|
emits: ['change'],
|
||||||
props: {
|
props: {
|
||||||
content: {
|
content: {
|
||||||
default: {},
|
default: {},
|
||||||
@@ -290,7 +298,7 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
let params = JSON.parse(JSON.stringify(this.form));
|
let params = JSON.parse(JSON.stringify(this.form));
|
||||||
params.legalPhoto = this.form.legalPhoto.toString();
|
params.legalPhoto = this.form.legalPhoto.toString();
|
||||||
params.licencePhoto = this.form.licencePhoto.toString();
|
params.licencePhoto = this.normalizeLicencePhoto(this.form.licencePhoto);
|
||||||
applyFirst(params)
|
applyFirst(params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@@ -309,25 +317,47 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 上传之前
|
// 上传之前
|
||||||
beforeUpload () {
|
beforeUpload (file) {
|
||||||
this.uploadLoading = true;
|
this.uploadLoading = true;
|
||||||
if (this.form.licencePhoto.length >= 3) {
|
if (this.form.licencePhoto.length >= 1) {
|
||||||
this.$Message.warning('最多上传三张图片')
|
this.$Message.warning('最多上传一张图片')
|
||||||
|
this.uploadLoading = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return this.validateUploadFile(file);
|
||||||
},
|
},
|
||||||
// 上传之前
|
// 上传之前
|
||||||
beforeUpload1 () {
|
beforeUpload1 (file) {
|
||||||
this.uploadLoading1 = true;
|
this.uploadLoading1 = true;
|
||||||
if (this.form.legalPhoto.length >= 2) {
|
if (this.form.legalPhoto.length >= 2) {
|
||||||
this.$Message.warning('最多上传两张图片')
|
this.$Message.warning('最多上传两张图片')
|
||||||
|
this.uploadLoading1 = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return this.validateUploadFile(file);
|
||||||
|
},
|
||||||
|
validateUploadFile (file) {
|
||||||
|
const allowedTypes = ['image/jpeg', 'image/jpg', 'image/png', 'image/gif'];
|
||||||
|
const isAllowedType = allowedTypes.includes(file.type);
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
if (!isAllowedType) {
|
||||||
|
this.uploadLoading = false;
|
||||||
|
this.uploadLoading1 = false;
|
||||||
|
this.$Message.warning('上传文件格式不正确');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.uploadLoading = false;
|
||||||
|
this.uploadLoading1 = false;
|
||||||
|
this.$Message.warning('文件大小不能超过2M');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
handleSuccess (res, file) {
|
handleSuccess (res, file) {
|
||||||
this.uploadLoading = false;
|
this.uploadLoading = false;
|
||||||
this.form.licencePhoto.push(res.result);
|
this.form.licencePhoto = [res.result];
|
||||||
},
|
},
|
||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
handleSuccess1 (res, file) {
|
handleSuccess1 (res, file) {
|
||||||
@@ -366,6 +396,12 @@ export default {
|
|||||||
handleRemove (index, listName) {
|
handleRemove (index, listName) {
|
||||||
this.form[listName].splice(index, 1);
|
this.form[listName].splice(index, 1);
|
||||||
},
|
},
|
||||||
|
normalizeLicencePhoto (value) {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
return value.length ? value[0] : '';
|
||||||
|
}
|
||||||
|
return value ? String(value).split(',').filter(Boolean)[0] || '' : '';
|
||||||
|
},
|
||||||
initFormFromContent(content) {
|
initFormFromContent(content) {
|
||||||
if (!content || !Object.keys(content).length) return;
|
if (!content || !Object.keys(content).length) return;
|
||||||
this.form = JSON.parse(JSON.stringify(content));
|
this.form = JSON.parse(JSON.stringify(content));
|
||||||
@@ -373,7 +409,7 @@ export default {
|
|||||||
? String(content.legalPhoto).split(',').filter(Boolean)
|
? String(content.legalPhoto).split(',').filter(Boolean)
|
||||||
: [];
|
: [];
|
||||||
this.form.licencePhoto = content.licencePhoto
|
this.form.licencePhoto = content.licencePhoto
|
||||||
? String(content.licencePhoto).split(',').filter(Boolean)
|
? String(content.licencePhoto).split(',').filter(Boolean).slice(0, 1)
|
||||||
: [];
|
: [];
|
||||||
this.contentInitialized = true;
|
this.contentInitialized = true;
|
||||||
},
|
},
|
||||||
@@ -388,7 +424,9 @@ export default {
|
|||||||
...parsed,
|
...parsed,
|
||||||
};
|
};
|
||||||
this.form.legalPhoto = Array.isArray(parsed.legalPhoto) ? parsed.legalPhoto : [];
|
this.form.legalPhoto = Array.isArray(parsed.legalPhoto) ? parsed.legalPhoto : [];
|
||||||
this.form.licencePhoto = Array.isArray(parsed.licencePhoto) ? parsed.licencePhoto : [];
|
this.form.licencePhoto = Array.isArray(parsed.licencePhoto)
|
||||||
|
? parsed.licencePhoto.slice(0, 1)
|
||||||
|
: [];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
sessionStorage.removeItem(FIRST_APPLY_DRAFT_KEY);
|
sessionStorage.removeItem(FIRST_APPLY_DRAFT_KEY);
|
||||||
}
|
}
|
||||||
@@ -434,26 +472,45 @@ h4 {
|
|||||||
.el-input {
|
.el-input {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
|
.img-list-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 10px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.img-list {
|
.img-list {
|
||||||
display: inline-block;
|
display: block;
|
||||||
margin: 10px;
|
flex-shrink: 0;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
.cover {
|
.cover {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
width: inherit;
|
|
||||||
height: inherit;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
i {
|
:deep(.el-icon) {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 30px;
|
font-size: 24px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -461,7 +518,27 @@ h4 {
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.upload-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
:deep(.el-upload) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-upload-list) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.describe {
|
.describe {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
line-height: 1.5;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { applySecond } from '@/api/shopentry';
|
import { applySecond } from '@/api/shopentry';
|
||||||
export default {
|
export default {
|
||||||
|
emits: ['change'],
|
||||||
props: {
|
props: {
|
||||||
content: {
|
content: {
|
||||||
default: {},
|
default: {},
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 下一步
|
// 下一步
|
||||||
nextPage(step) {
|
nextPage(step) {
|
||||||
|
if (typeof step !== "number") return;
|
||||||
this.currentIndex = step;
|
this.currentIndex = step;
|
||||||
if (step > 0 && step < 3) {
|
if (step > 0 && step < 3) {
|
||||||
this.refreshApplyData();
|
this.refreshApplyData();
|
||||||
|
|||||||
@@ -11,46 +11,49 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item prop="storeLogo" label="店铺logo">
|
<el-form-item prop="storeLogo" label="店铺logo">
|
||||||
|
<div class="upload-wrap">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadLogo"
|
ref="uploadLogo"
|
||||||
:show-upload-list="false"
|
:show-file-list="false"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:format="['jpg', 'jpeg', 'png', 'gif']"
|
accept=".jpg,.jpeg,.png,.gif"
|
||||||
:max-size="2048"
|
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:on-format-error="handleFormatError"
|
|
||||||
:on-exceeded-size="handleMaxSize"
|
|
||||||
:on-error="uploadErr"
|
:on-error="uploadErr"
|
||||||
multiple
|
:disabled="form.storeLogo.length >= 1"
|
||||||
:action="action"
|
:action="action"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
>
|
>
|
||||||
<el-button type="info" :loading="uploadLoading">上传logo</el-button>
|
<el-button type="info" :loading="uploadLoading" :disabled="form.storeLogo.length >= 1">上传logo</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div class="describe">请压缩图片在2M以内,格式为gif,jpg,png</div>
|
<div class="describe">请压缩图片在2M以内,格式为gif,jpg,png,仅可上传1张</div>
|
||||||
|
<div class="img-list-wrap">
|
||||||
<div
|
<div
|
||||||
class="img-list"
|
class="img-list"
|
||||||
v-for="(item, index) in form.storeLogo"
|
v-for="(item, index) in form.storeLogo"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<img :src="item" width="100" height="" alt="" />
|
<img :src="item" alt="" />
|
||||||
<div class="cover">
|
<div class="cover">
|
||||||
<el-icon @click="handleView(item)"><View /></el-icon>
|
<el-icon @click="handleView(item)"><View /></el-icon>
|
||||||
<el-icon @click="handleRemove(index, 'storeLogo')"><Delete /></el-icon>
|
<el-icon @click="handleRemove(index, 'storeLogo')"><Delete /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="goodsManagementCategory" label="店铺经营类目">
|
<el-form-item prop="goodsManagementCategory" label="店铺经营类目">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.goodsManagementCategory"
|
v-model="form.goodsManagementCategory"
|
||||||
multiple
|
multiple
|
||||||
|
placeholder="请选择"
|
||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
>
|
>
|
||||||
<el-option v-for="item in categoryList"
|
<el-option
|
||||||
:value="item.id"
|
v-for="item in categoryList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
>{{ item.name }}</el-option
|
:label="item.name"
|
||||||
>
|
:value="normalizeCategoryId(item.id)"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -102,6 +105,7 @@ import multipleMap from "@/components/map/multiple-map";
|
|||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
emits: ['change'],
|
||||||
props: {
|
props: {
|
||||||
content: {
|
content: {
|
||||||
default: {},
|
default: {},
|
||||||
@@ -119,7 +123,8 @@ export default {
|
|||||||
|
|
||||||
visible: false, // 图片预览
|
visible: false, // 图片预览
|
||||||
form: { // 表单数据
|
form: { // 表单数据
|
||||||
storeLogo: []
|
storeLogo: [],
|
||||||
|
goodsManagementCategory: [],
|
||||||
},
|
},
|
||||||
rules: { // 验证规则
|
rules: { // 验证规则
|
||||||
goodsManagementCategory: [
|
goodsManagementCategory: [
|
||||||
@@ -159,33 +164,35 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 上传之前
|
// 上传之前
|
||||||
beforeUpload () {
|
beforeUpload (file) {
|
||||||
this.uploadLoading = true;
|
this.uploadLoading = true;
|
||||||
if (this.form.storeLogo.length >= 3) {
|
if (this.form.storeLogo.length >= 1) {
|
||||||
this.$Message.warning('最多上传三张图片')
|
this.$Message.warning('最多上传一张图片')
|
||||||
|
this.uploadLoading = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return this.validateUploadFile(file);
|
||||||
|
},
|
||||||
|
validateUploadFile (file) {
|
||||||
|
const allowedTypes = ['image/jpeg', 'image/jpg', 'image/png', 'image/gif'];
|
||||||
|
const isAllowedType = allowedTypes.includes(file.type);
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
if (!isAllowedType) {
|
||||||
|
this.uploadLoading = false;
|
||||||
|
this.$Message.warning('上传文件格式不正确');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.uploadLoading = false;
|
||||||
|
this.$Message.warning('文件大小不能超过2M');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
handleSuccess (res, file) {
|
handleSuccess (res, file) {
|
||||||
this.uploadLoading = false;
|
this.uploadLoading = false;
|
||||||
this.form.storeLogo.push(res.result);
|
this.form.storeLogo = [res.result];
|
||||||
},
|
|
||||||
// 上传格式错误
|
|
||||||
handleFormatError (file) {
|
|
||||||
this.uploadLoading = false;
|
|
||||||
this.$Notice.warning({
|
|
||||||
title: 'The file format is incorrect',
|
|
||||||
desc: '上传文件格式不正确'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 上传大小限制
|
|
||||||
handleMaxSize (file) {
|
|
||||||
this.uploadLoading = false;
|
|
||||||
this.$Notice.warning({
|
|
||||||
title: 'Exceeding file size limit',
|
|
||||||
desc: '文件大小不能超过2M'
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 上传失败
|
// 上传失败
|
||||||
uploadErr () {
|
uploadErr () {
|
||||||
@@ -219,26 +226,37 @@ export default {
|
|||||||
// 获取商品分类
|
// 获取商品分类
|
||||||
getCategoryList () {
|
getCategoryList () {
|
||||||
getCategory(0).then((res) => {
|
getCategory(0).then((res) => {
|
||||||
if (res.success) this.categoryList = res.result;
|
if (res.success) {
|
||||||
|
this.categoryList = res.result || [];
|
||||||
|
this.syncCategorySelection();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
normalizeCategoryId (id) {
|
||||||
|
return id == null ? '' : String(id);
|
||||||
|
},
|
||||||
|
syncCategorySelection () {
|
||||||
|
if (!Array.isArray(this.form.goodsManagementCategory)) {
|
||||||
|
this.form.goodsManagementCategory = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.form.goodsManagementCategory = this.form.goodsManagementCategory.map(
|
||||||
|
(id) => this.normalizeCategoryId(id)
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.accessToken.accessToken = storage.getItem('accessToken');
|
this.accessToken.accessToken = storage.getItem('accessToken');
|
||||||
this.getCategoryList();
|
|
||||||
if (this.content && Object.keys(this.content).length) {
|
if (this.content && Object.keys(this.content).length) {
|
||||||
this.form = JSON.parse(JSON.stringify(this.content));
|
this.form = JSON.parse(JSON.stringify(this.content));
|
||||||
if (this.form.storeLogo) {
|
this.form.storeLogo = this.content.storeLogo
|
||||||
this.form.storeLogo = String(this.content.storeLogo).split(',').filter(Boolean);
|
? String(this.content.storeLogo).split(',').filter(Boolean)
|
||||||
this.form.goodsManagementCategory = String(this.content.goodsManagementCategory || '')
|
: [];
|
||||||
.split(',')
|
this.form.goodsManagementCategory = this.content.goodsManagementCategory
|
||||||
.filter(Boolean);
|
? String(this.content.goodsManagementCategory).split(',').filter(Boolean)
|
||||||
} else {
|
: [];
|
||||||
this.form.storeLogo = [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
this.getCategoryList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -257,27 +275,45 @@ h4 {
|
|||||||
.el-input {
|
.el-input {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
|
.img-list-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 10px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.img-list {
|
.img-list {
|
||||||
display: inline-block;
|
display: block;
|
||||||
margin: 10px;
|
flex-shrink: 0;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: auto;
|
height: 100px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
.cover {
|
.cover {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
width: inherit;
|
|
||||||
height: inherit;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
i {
|
:deep(.el-icon) {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 30px;
|
font-size: 24px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -285,7 +321,28 @@ h4 {
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upload-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
:deep(.el-upload) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-upload-list) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.describe {
|
.describe {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
line-height: 1.5;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,9 +40,7 @@
|
|||||||
</el-menu>
|
</el-menu>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main class="content ml_10">
|
<el-main class="content ml_10">
|
||||||
<transition mode="out-in">
|
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</transition>
|
|
||||||
</el-main>
|
</el-main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,7 +53,12 @@ service.interceptors.request.use(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof window !== "undefined" && loading !== false) {
|
const method = (config.method || "get").toLowerCase();
|
||||||
|
const isReadRequest = method === "get" || method === "head";
|
||||||
|
const shouldShowLoading =
|
||||||
|
loading === true || (!isReadRequest && loading !== false);
|
||||||
|
|
||||||
|
if (typeof window !== "undefined" && shouldShowLoading) {
|
||||||
config.loading = ElLoading.service({ fullscreen: true });
|
config.loading = ElLoading.service({ fullscreen: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,8 +70,9 @@ service.interceptors.request.use(
|
|||||||
config.headers["uuid"] = uuid;
|
config.headers["uuid"] = uuid;
|
||||||
|
|
||||||
const accessToken = Storage.getItem("accessToken");
|
const accessToken = Storage.getItem("accessToken");
|
||||||
if (accessToken && config.needToken) {
|
if (accessToken && (config.needToken || config.optionalToken)) {
|
||||||
config.headers["accessToken"] = accessToken;
|
config.headers["accessToken"] = accessToken;
|
||||||
|
try {
|
||||||
const jwtData = JSON.parse(
|
const jwtData = JSON.parse(
|
||||||
decodeURIComponent(
|
decodeURIComponent(
|
||||||
escape(
|
escape(
|
||||||
@@ -76,7 +82,11 @@ service.interceptors.request.use(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (jwtData.exp < Math.round(new Date() / 1000)) {
|
if (jwtData.exp < Math.round(new Date() / 1000)) {
|
||||||
refresh(config);
|
refresh({ response: { config } });
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Storage.removeItem("accessToken");
|
||||||
|
Storage.removeItem("refreshToken");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,15 +95,23 @@ service.interceptors.request.use(
|
|||||||
(error) => Promise.reject(error)
|
(error) => Promise.reject(error)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function buildRejectError(error, errorData = {}) {
|
||||||
|
const message =
|
||||||
|
errorData.message ||
|
||||||
|
(error?.code === "ECONNABORTED" ? "连接超时,请稍候再试!" : "网络错误,请稍后再试!");
|
||||||
|
return Object.assign(new Error(message), { data: errorData });
|
||||||
|
}
|
||||||
|
|
||||||
async function refresh(error) {
|
async function refresh(error) {
|
||||||
const getTokenRes = await refreshToken();
|
const getTokenRes = await refreshToken();
|
||||||
if (getTokenRes === "success") {
|
if (getTokenRes === "success") {
|
||||||
if (isRefreshToken === 1) {
|
if (error?.response?.config) {
|
||||||
error.response.config.headers.accessToken = Storage.getItem("accessToken");
|
error.response.config.headers.accessToken = Storage.getItem("accessToken");
|
||||||
return service(error.response.config);
|
return service(error.response.config);
|
||||||
}
|
}
|
||||||
router.go(0);
|
router.go(0);
|
||||||
} else {
|
return new Promise(() => {});
|
||||||
|
}
|
||||||
Storage.removeItem("accessToken");
|
Storage.removeItem("accessToken");
|
||||||
Storage.removeItem("refreshToken");
|
Storage.removeItem("refreshToken");
|
||||||
Storage.removeItem("userInfo");
|
Storage.removeItem("userInfo");
|
||||||
@@ -119,7 +137,7 @@ async function refresh(error) {
|
|||||||
Modal.remove();
|
Modal.remove();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
return Promise.reject(new Error("登录已过期"));
|
||||||
}
|
}
|
||||||
|
|
||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
@@ -140,19 +158,22 @@ service.interceptors.response.use(
|
|||||||
) {
|
) {
|
||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
if (isRefreshToken === 1) {
|
if (isRefreshToken === 1) {
|
||||||
refresh(error);
|
|
||||||
isRefreshToken = 0;
|
isRefreshToken = 0;
|
||||||
|
return refresh(error);
|
||||||
}
|
}
|
||||||
} else if (errorResponse.status === 404) {
|
return Promise.reject(buildRejectError(error, errorData));
|
||||||
// skip
|
}
|
||||||
} else if (error.message) {
|
if (errorResponse.status === 404) {
|
||||||
|
return Promise.reject(buildRejectError(error, { message: "请求的资源不存在" }));
|
||||||
|
}
|
||||||
|
if (error.message) {
|
||||||
const _message =
|
const _message =
|
||||||
error.code === "ECONNABORTED"
|
error.code === "ECONNABORTED"
|
||||||
? "连接超时,请稍候再试!"
|
? "连接超时,请稍候再试!"
|
||||||
: "网络错误,请稍后再试!";
|
: "网络错误,请稍后再试!";
|
||||||
Message.error(errorData.message || _message);
|
Message.error(errorData.message || _message);
|
||||||
}
|
}
|
||||||
return Promise.reject(errorData);
|
return Promise.reject(buildRejectError(error, errorData));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ const MyGiftCards = () => import("@/pages/home/userCenter/MyGiftCards");
|
|||||||
|
|
||||||
const Home = () => import("@/pages/user/Home");
|
const Home = () => import("@/pages/user/Home");
|
||||||
const Merchant = () => import("@/pages/Merchant");
|
const Merchant = () => import("@/pages/Merchant");
|
||||||
const UserMain = () => import("@/pages/home/Main");
|
|
||||||
const topic = () => import("@/pages/Topic");
|
const topic = () => import("@/pages/Topic");
|
||||||
const ShopEntry = () => import("@/pages/shopEntry/ShopEntry");
|
const ShopEntry = () => import("@/pages/shopEntry/ShopEntry");
|
||||||
|
|
||||||
@@ -179,13 +178,8 @@ export const router = createRouter({
|
|||||||
{
|
{
|
||||||
path: "/home",
|
path: "/home",
|
||||||
component: Home,
|
component: Home,
|
||||||
|
redirect: { name: "MyOrder" },
|
||||||
children: [
|
children: [
|
||||||
{
|
|
||||||
path: "/",
|
|
||||||
name: "Home",
|
|
||||||
component: UserMain,
|
|
||||||
meta: { title: "会员中心" },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "MyTracks",
|
path: "MyTracks",
|
||||||
name: "MyTracks",
|
name: "MyTracks",
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
|
import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
|
||||||
let loadingInstance = null;
|
const MESSAGE_OFFSET = 36;
|
||||||
|
|
||||||
|
let loadingInstance = null;
|
||||||
export const Spin = {
|
export const Spin = {
|
||||||
show(options = {}) {
|
show(options = {}) {
|
||||||
Spin.hide();
|
Spin.hide();
|
||||||
@@ -28,19 +29,18 @@ export const Spin = {
|
|||||||
|
|
||||||
export const Message = {
|
export const Message = {
|
||||||
success(content) {
|
success(content) {
|
||||||
return ElMessage.success(normalize(content));
|
return showMessage("success", content);
|
||||||
},
|
},
|
||||||
error(content) {
|
error(content) {
|
||||||
return ElMessage.error(normalize(content));
|
return showMessage("error", content);
|
||||||
},
|
},
|
||||||
warning(content) {
|
warning(content) {
|
||||||
return ElMessage.warning(normalize(content));
|
return showMessage("warning", content);
|
||||||
},
|
},
|
||||||
info(content) {
|
info(content) {
|
||||||
return ElMessage.info(normalize(content));
|
return showMessage("info", content);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Notice = {
|
export const Notice = {
|
||||||
open(options = {}) {
|
open(options = {}) {
|
||||||
const fn = Message[options.type] || Message.info;
|
const fn = Message[options.type] || Message.info;
|
||||||
@@ -95,8 +95,14 @@ export const Modal = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function normalize(content) {
|
function showMessage(type, content) {
|
||||||
if (typeof content === "string") return content;
|
return ElMessage[type]({
|
||||||
|
message: normalize(content),
|
||||||
|
offset: MESSAGE_OFFSET,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalize(content) { if (typeof content === "string") return content;
|
||||||
if (content && content.content) return content.content;
|
if (content && content.content) return content.content;
|
||||||
return String(content ?? "");
|
return String(content ?? "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,14 @@ export default createStore({
|
|||||||
storage.getItem("logoImg") || require("@/assets/images/logo2.png"),
|
storage.getItem("logoImg") || require("@/assets/images/logo2.png"),
|
||||||
siteName: storage.getItem("siteName") || "lilishop",
|
siteName: storage.getItem("siteName") || "lilishop",
|
||||||
hotWordsList: storage.getItem("hotWordsList"),
|
hotWordsList: storage.getItem("hotWordsList"),
|
||||||
category: JSON.parse(localStorage.getItem("category")),
|
category: (() => {
|
||||||
|
try {
|
||||||
|
const raw = localStorage.getItem("category");
|
||||||
|
return raw ? JSON.parse(raw) : null;
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
})(),
|
||||||
},
|
},
|
||||||
getters,
|
getters,
|
||||||
actions,
|
actions,
|
||||||
|
|||||||
@@ -260,6 +260,14 @@ export default {
|
|||||||
background-position: right;
|
background-position: right;
|
||||||
background-size: 10%;
|
background-size: 10%;
|
||||||
}
|
}
|
||||||
|
.pageration {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 16px;
|
||||||
|
padding-right: 8px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.goods-dialog-cascader-popper {
|
.goods-dialog-cascader-popper {
|
||||||
|
|||||||
@@ -67,8 +67,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pageration {
|
.pageration {
|
||||||
text-align: right;
|
display: flex;
|
||||||
padding-right: 20px;
|
justify-content: flex-end;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 16px;
|
||||||
|
padding-right: 8px;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.wap-content-item {
|
.wap-content-item {
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { getCategoryTree } from "@/api/goods.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -39,10 +41,32 @@ export default {
|
|||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadCategoryFromCache() {
|
||||||
|
try {
|
||||||
|
const raw = localStorage.getItem("category");
|
||||||
|
if (!raw) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const parsed = JSON.parse(raw);
|
||||||
|
return Array.isArray(parsed) ? parsed : null;
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
applyCategoryList(category) {
|
||||||
|
if (!Array.isArray(category)) {
|
||||||
|
this.categoryList = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
category.forEach((item) => {
|
||||||
|
item.___type = "category";
|
||||||
|
});
|
||||||
|
this.categoryList = category;
|
||||||
|
},
|
||||||
// 点击一级
|
// 点击一级
|
||||||
handleClickChild(item, index) {
|
handleClickChild(item, index) {
|
||||||
this.parentIndex = index;
|
this.parentIndex = index;
|
||||||
this.secondLevel = item.children;
|
this.secondLevel = item.children || [];
|
||||||
item.___type = "category";
|
item.___type = "category";
|
||||||
item.allId = item.id;
|
item.allId = item.id;
|
||||||
|
|
||||||
@@ -59,7 +83,7 @@ export default {
|
|||||||
second.allId = `${second.parentId},${second.id}`
|
second.allId = `${second.parentId},${second.id}`
|
||||||
|
|
||||||
this.secondIndex = index;
|
this.secondIndex = index;
|
||||||
this.thirdLevel = second.children;
|
this.thirdLevel = second.children || [];
|
||||||
this.thirdIndex = '';
|
this.thirdIndex = '';
|
||||||
this.$emit("selected", [second]);
|
this.$emit("selected", [second]);
|
||||||
// this.handleClickthirdChild(second.children[0], 0);
|
// this.handleClickthirdChild(second.children[0], 0);
|
||||||
@@ -72,24 +96,17 @@ export default {
|
|||||||
this.thirdIndex = index;
|
this.thirdIndex = index;
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
let category = JSON.parse(localStorage.getItem('category'))
|
const cached = this.loadCategoryFromCache();
|
||||||
if (category) {
|
if (cached) {
|
||||||
category.forEach((item) => {
|
this.applyCategoryList(cached);
|
||||||
item.___type = "category";
|
return;
|
||||||
});
|
|
||||||
this.categoryList = category;
|
|
||||||
// this.handleClickChild(category[0], 0);
|
|
||||||
} else {
|
|
||||||
setTimeout(() => {
|
|
||||||
category = JSON.parse(localStorage.getItem('category'))
|
|
||||||
category.forEach((item) => {
|
|
||||||
item.___type = "category";
|
|
||||||
});
|
|
||||||
this.categoryList = category;
|
|
||||||
// this.handleClickChild(category[0], 0);
|
|
||||||
},3000)
|
|
||||||
}
|
}
|
||||||
|
getCategoryTree().then((res) => {
|
||||||
|
if (res.success && Array.isArray(res.result)) {
|
||||||
|
localStorage.setItem("category", JSON.stringify(res.result));
|
||||||
|
this.applyCategoryList(res.result);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -448,16 +448,16 @@ export default {
|
|||||||
.advert-list {
|
.advert-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 5px 6px;
|
padding: 10px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: $theme_color;
|
background: $theme_color;
|
||||||
height: 200px;
|
height: 210px;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 6px;
|
gap: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
> li {
|
> li {
|
||||||
flex: 0 0 calc((100% - 24px) / 5);
|
flex: 0 0 calc((100% - 40px) / 5);
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -32,23 +32,16 @@
|
|||||||
append-to-body destroy-on-close>
|
append-to-body destroy-on-close>
|
||||||
<div v-if="current">
|
<div v-if="current">
|
||||||
<div class="modal-tab-bar">
|
<div class="modal-tab-bar">
|
||||||
<div>
|
<div class="current-module-row">
|
||||||
当前模块 :
|
当前模块 :
|
||||||
<el-button-group>
|
<el-tag>{{ current.model === "goods" ? "商品" : "品牌" }}</el-tag>
|
||||||
<el-button :type="current.model == 'goods' ? 'primary' : 'default'"
|
|
||||||
>商品</el-button
|
|
||||||
>
|
|
||||||
<el-button :type="current.model == 'brand' ? 'primary' : 'default'"
|
|
||||||
>品牌</el-button
|
|
||||||
>
|
|
||||||
</el-button-group>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex image-row">
|
||||||
<div>图片 :</div>
|
<div>图片 :</div>
|
||||||
<div>
|
<div class="image-config">
|
||||||
<img class="image" :src="current.data.image.src" alt="" />
|
<img class="image" :src="current.data.image.src" alt="" />
|
||||||
<div>
|
<div class="image-config-detail">
|
||||||
<div>推荐尺寸:{{ current.data.image.size }}</div>
|
<div>推荐尺寸:{{ current.data.image.size }}</div>
|
||||||
<div class="link-src">
|
<div class="link-src">
|
||||||
链接地址:
|
链接地址:
|
||||||
@@ -74,7 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex" v-if="current.model == 'goods'">
|
<div class="flex badge-row" v-if="current.model == 'goods'">
|
||||||
<div>标签 :</div>
|
<div>标签 :</div>
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
@@ -82,14 +75,13 @@
|
|||||||
v-model="current.data.badge.label"
|
v-model="current.data.badge.label"
|
||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 100px; margin-left: 10px"
|
style="width: 100px"
|
||||||
disabled
|
disabled
|
||||||
type="text"
|
type="text"
|
||||||
v-model="current.data.badge.url"
|
v-model="current.data.badge.url"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
class="ml_10"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleSelectLink('badge')"
|
@click="handleSelectLink('badge')"
|
||||||
>选择链接
|
>选择链接
|
||||||
@@ -101,7 +93,7 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
class="draggable"
|
class="draggable"
|
||||||
>
|
>
|
||||||
<div class="flex">
|
<div class="flex column-item">
|
||||||
<img :src="item.img" class="column-img" />
|
<img :src="item.img" class="column-img" />
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
@@ -111,7 +103,7 @@
|
|||||||
@click="handleSelectGoods('list', index)"
|
@click="handleSelectGoods('list', index)"
|
||||||
>选择商品
|
>选择商品
|
||||||
</el-button>
|
</el-button>
|
||||||
<div>
|
<div class="column-item-config">
|
||||||
<div v-if="current.model == 'brand'" style="margin-bottom: 10px">
|
<div v-if="current.model == 'brand'" style="margin-bottom: 10px">
|
||||||
<el-input disabled v-model="item.url" />
|
<el-input disabled v-model="item.url" />
|
||||||
</div>
|
</div>
|
||||||
@@ -235,11 +227,12 @@ export default {
|
|||||||
// 选择商品回调
|
// 选择商品回调
|
||||||
selectedGoodsData(val) {
|
selectedGoodsData(val) {
|
||||||
if (!val?.length || !this.current) return;
|
if (!val?.length || !this.current) return;
|
||||||
|
const goods = val[0];
|
||||||
const item = this.current.data.list[this.goodsIndex];
|
const item = this.current.data.list[this.goodsIndex];
|
||||||
item.img = val[0].thumbnail;
|
item.img = goods.thumbnail;
|
||||||
item.title = val[0].goodsName;
|
item.title = goods.goodsName;
|
||||||
item.price = val[0].price;
|
item.price = goods.price;
|
||||||
item.url = val[0].url;
|
item.url = `/goodsDetail?skuId=${goods.id}&goodsId=${goods.goodsId}`;
|
||||||
},
|
},
|
||||||
// 选择链接回调
|
// 选择链接回调
|
||||||
selectedLink(val) {
|
selectedLink(val) {
|
||||||
@@ -279,6 +272,45 @@ export default {
|
|||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.current-module-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-row {
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-row {
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-config {
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-config-detail {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column-item {
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column-item-config {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.mix-model {
|
.mix-model {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -293,6 +325,7 @@ export default {
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0px 1px 13px 0px #e5e5e5;
|
box-shadow: 0px 1px 13px 0px #e5e5e5;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.setup-box {
|
.setup-box {
|
||||||
@@ -326,8 +359,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.draggable {
|
.draggable {
|
||||||
> .flex {
|
margin-bottom: 10px;
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex" v-if="data.options.right.model == 'brand'">
|
<div class="mix-panel flex" v-if="data.options.right.model == 'brand'">
|
||||||
<div class="left-side">
|
<div class="left-side">
|
||||||
<img :src="data.options.right.data.image.src" alt="">
|
<img :src="data.options.right.data.image.src" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="right-side">
|
||||||
<div class="badge-box flex">
|
<div class="badge-box flex">
|
||||||
<div class="round">
|
<div class="round">
|
||||||
<el-icon><ArrowRight /></el-icon>
|
<el-icon><ArrowRight /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex goods-list">
|
<div class="flex goods-list">
|
||||||
<div class="goods-item flex" :key="index" v-for="(item,index) in data.options.right.data.list">
|
<div
|
||||||
|
class="goods-item flex"
|
||||||
|
:key="index"
|
||||||
|
v-for="(item, index) in data.options.right.data.list"
|
||||||
|
>
|
||||||
<div class="goods-thumbnail">
|
<div class="goods-thumbnail">
|
||||||
<img :src="item.img" alt="">
|
<img :src="item.img" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -24,63 +26,59 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ArrowRight } from "@element-plus/icons-vue";
|
import { ArrowRight } from "@element-plus/icons-vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "mix-goods",
|
name: "mix-brand",
|
||||||
components: { ArrowRight },
|
components: { ArrowRight },
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: () => ({}),
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: {},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {}
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.goods-detail{
|
.mix-panel {
|
||||||
|
height: 100%;
|
||||||
|
align-items: stretch;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-side {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 254px;
|
||||||
|
height: 344px;
|
||||||
|
|
||||||
}
|
|
||||||
.goods-detail-title{
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: normal;
|
|
||||||
line-height: 16px;
|
|
||||||
text-align: center;
|
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
.goods-detail-price{
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: normal;
|
|
||||||
line-height: 17px;
|
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #F31947;
|
|
||||||
margin-top: 8px;
|
|
||||||
margin-bottom:10px;
|
|
||||||
}
|
|
||||||
.goods-thumbnail{
|
|
||||||
margin-left: 7px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
> img {
|
> img {
|
||||||
width:90px;
|
display: block;
|
||||||
height: 90px;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 9.8px 0 0 9.8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right-side {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
height: 344px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.badge-box {
|
.badge-box {
|
||||||
margin-top: 33px;
|
margin-top: 24px;
|
||||||
justify-content:right;
|
margin-bottom: 8px;
|
||||||
|
justify-content: flex-end;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
> .round {
|
> .round {
|
||||||
width: 17.5px;
|
width: 17.5px;
|
||||||
height: 17.5px;
|
height: 17.5px;
|
||||||
opacity: 1;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 17.5px;
|
line-height: 17.5px;
|
||||||
@@ -88,46 +86,47 @@ export default {
|
|||||||
margin-right: 17.5px;
|
margin-right: 17.5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-list {
|
.goods-list {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 16px;
|
align-content: flex-start;
|
||||||
|
padding: 0 16px 12px;
|
||||||
|
gap: 8px 0;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-item {
|
.goods-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width:50%;
|
flex: 0 0 calc(50% - 4px);
|
||||||
height: 85px;
|
width: calc(50% - 4px);
|
||||||
|
height: 82px;
|
||||||
border-radius: 9.8px;
|
border-radius: 9.8px;
|
||||||
opacity: 1;
|
box-sizing: border-box;
|
||||||
transition: .35s;
|
overflow: hidden;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
margin-bottom:9px;
|
transition: 0.35s;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.left-side {
|
|
||||||
|
.goods-thumbnail {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
> img {
|
> img {
|
||||||
width: 254px;
|
max-width: 80px;
|
||||||
height: 344px;
|
max-height: 76px;
|
||||||
border-radius: 9.8px 0px 0px 9.8px;
|
width: auto;
|
||||||
opacity: 1;
|
height: auto;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.badge {
|
|
||||||
width: 50px;
|
|
||||||
height: 27px;
|
|
||||||
line-height:27px;
|
|
||||||
border-radius: 13.3px 0px 0px 13.3px;
|
|
||||||
opacity: 1;
|
|
||||||
background: #F31947;
|
|
||||||
font-size: 12.6px;
|
|
||||||
font-weight: normal;
|
|
||||||
text-align: center;
|
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #FFFFFF;
|
|
||||||
margin-top: 26px;
|
|
||||||
margin-bottom:17px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex" v-if="data.options.left.model == 'goods'">
|
<div class="mix-panel flex" v-if="data.options.left.model == 'goods'">
|
||||||
<div class="left-side">
|
<div class="left-side">
|
||||||
<img :src="data.options.left.data.image.src" alt="">
|
<img :src="data.options.left.data.image.src" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="right-side">
|
||||||
<div class="badge-box flex">
|
<div class="badge-box flex">
|
||||||
<div class="badge">
|
<div class="badge">
|
||||||
{{ data.options.left.data.badge.label }}
|
{{ data.options.left.data.badge.label }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex goods-list">
|
<div class="flex goods-list">
|
||||||
<div class="goods-item flex" :key="index" v-for="(item,index) in data.options.left.data.list">
|
<div
|
||||||
|
class="goods-item flex"
|
||||||
|
:key="index"
|
||||||
|
v-for="(item, index) in data.options.left.data.list"
|
||||||
|
>
|
||||||
<div class="goods-thumbnail">
|
<div class="goods-thumbnail">
|
||||||
<img :src="item.img" alt="">
|
<img :src="item.img" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="goods-detail">
|
<div class="goods-detail">
|
||||||
<div class="goods-detail-title">{{ item.title }}</div>
|
<div class="goods-detail-title">{{ item.title }}</div>
|
||||||
@@ -27,97 +31,116 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "mix-goods",
|
name: "mix-goods",
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: () => ({}),
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: {},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {}
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.goods-detail{
|
.mix-panel {
|
||||||
|
height: 100%;
|
||||||
|
align-items: stretch;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.left-side {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 196.7px;
|
||||||
|
height: 344px;
|
||||||
|
|
||||||
|
> img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 10px 0 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-side {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
height: 344px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.goods-detail-title {
|
.goods-detail-title {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-detail-price {
|
.goods-detail-price {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 17px;
|
line-height: 17px;
|
||||||
letter-spacing: 0px;
|
color: #f31947;
|
||||||
color: #F31947;
|
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
margin-bottom:10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-thumbnail {
|
.goods-thumbnail {
|
||||||
margin-left: 7px;
|
margin-left: 7px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
> img {
|
> img {
|
||||||
width: 90px;
|
width: 90px;
|
||||||
height: 90px;
|
height: 90px;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.badge-box{
|
|
||||||
|
|
||||||
justify-content:right;
|
.badge-box {
|
||||||
|
justify-content: flex-end;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-list {
|
.goods-list {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
|
gap: 9px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-item {
|
.goods-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 173.6px;
|
flex: 0 0 calc(50% - 4px);
|
||||||
|
width: calc(50% - 4px);
|
||||||
height: 119px;
|
height: 119px;
|
||||||
border-radius: 9.8px;
|
border-radius: 9.8px;
|
||||||
opacity: 1;
|
box-sizing: border-box;
|
||||||
transition: .35s;
|
overflow: hidden;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
margin-bottom:9px;
|
transition: 0.35s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0px 1px 6px 0px #E5E5E5;
|
box-shadow: 0 1px 6px 0 #e5e5e5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
.left-side {
|
|
||||||
>img{
|
|
||||||
border-radius: 10px 0px 0px 10px;
|
|
||||||
display: block;
|
|
||||||
width: 196.7px;
|
|
||||||
height: 343.7px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.badge {
|
.badge {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 27px;
|
height: 27px;
|
||||||
line-height: 27px;
|
line-height: 27px;
|
||||||
border-radius: 13.3px 0px 0px 13.3px;
|
border-radius: 13.3px 0 0 13.3px;
|
||||||
opacity: 1;
|
background: #f31947;
|
||||||
background: #F31947;
|
|
||||||
font-size: 12.6px;
|
font-size: 12.6px;
|
||||||
font-weight: normal;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
letter-spacing: 0px;
|
color: #ffffff;
|
||||||
color: #FFFFFF;
|
|
||||||
margin-top: 26px;
|
margin-top: 26px;
|
||||||
margin-bottom: 17px;
|
margin-bottom: 17px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,12 +101,14 @@
|
|||||||
v-for="(item, index) in options.right.list"
|
v-for="(item, index) in options.right.list"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
|
<div class="img-wrap">
|
||||||
<img :src="item.img" alt="" />
|
<img :src="item.img" alt="" />
|
||||||
<p>{{ item.name }}</p>
|
|
||||||
<p>{{ $filters.unitPrice(item.price, "¥") }}</p>
|
|
||||||
<div class="jiaobiao" :class="'jiaobiao' + (index + 1)">
|
<div class="jiaobiao" :class="'jiaobiao' + (index + 1)">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>{{ item.name }}</p>
|
||||||
|
<p>{{ $filters.unitPrice(item.price, "¥") }}</p>
|
||||||
<div class="setup-box">
|
<div class="setup-box">
|
||||||
<div>
|
<div>
|
||||||
<el-button size="small" @click.stop="handleSelectGoods(item)"
|
<el-button size="small" @click.stop="handleSelectGoods(item)"
|
||||||
@@ -497,42 +499,37 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
img {
|
border-bottom: 1px solid #eee;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
.img-wrap {
|
||||||
|
position: relative;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
border-right: 1px solid #eee;
|
|
||||||
:nth-child(2) {
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
max-height: 32px;
|
|
||||||
line-height: 16px;
|
|
||||||
margin-top: 4px;
|
|
||||||
overflow: hidden;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
:nth-child(3) {
|
|
||||||
color: $theme_color;
|
|
||||||
margin-top: 2px;
|
|
||||||
line-height: 1.2;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.jiaobiao {
|
.jiaobiao {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 23px;
|
width: 23px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
top: 6px;
|
top: 0;
|
||||||
right: 6px;
|
right: 0;
|
||||||
background: url("../../../assets/festival_icon.png");
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
max-height: none;
|
||||||
|
overflow: visible;
|
||||||
|
display: block;
|
||||||
|
background: url("../../../assets/festival_icon.png") no-repeat;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
line-height: 23px;
|
||||||
|
font-size: 12px;
|
||||||
|
-webkit-line-clamp: unset;
|
||||||
|
-webkit-box-orient: unset;
|
||||||
}
|
}
|
||||||
.jiaobiao1,
|
.jiaobiao1,
|
||||||
.jiaobiao4 {
|
.jiaobiao4 {
|
||||||
@@ -547,6 +544,25 @@ export default {
|
|||||||
background-position: -60px -30px;
|
background-position: -60px -30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
> p:nth-child(2) {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
max-height: 32px;
|
||||||
|
line-height: 16px;
|
||||||
|
margin-top: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
> p:nth-child(3) {
|
||||||
|
color: $theme_color;
|
||||||
|
margin-top: 2px;
|
||||||
|
line-height: 1.2;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
> div:nth-child(3n) {
|
> div:nth-child(3n) {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,15 +121,26 @@ export default {
|
|||||||
selectedGoodsData(val) {
|
selectedGoodsData(val) {
|
||||||
if (!val?.length || !this.draftList) return;
|
if (!val?.length || !this.draftList) return;
|
||||||
val.forEach((item) => {
|
val.forEach((item) => {
|
||||||
|
if (this.isGoodsInDraftList(item)) return;
|
||||||
this.draftList.push({
|
this.draftList.push({
|
||||||
img: item.thumbnail,
|
img: item.thumbnail,
|
||||||
price: item.price,
|
price: item.price,
|
||||||
title: item.goodsName,
|
title: item.goodsName,
|
||||||
desc: "",
|
desc: "",
|
||||||
|
skuId: item.id,
|
||||||
|
goodsId: item.goodsId,
|
||||||
url: `/goodsDetail?skuId=${item.id}&goodsId=${item.goodsId}`,
|
url: `/goodsDetail?skuId=${item.id}&goodsId=${item.goodsId}`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
isGoodsInDraftList(goods) {
|
||||||
|
const targetUrl = `/goodsDetail?skuId=${goods.id}&goodsId=${goods.goodsId}`;
|
||||||
|
return this.draftList.some(
|
||||||
|
(draft) =>
|
||||||
|
(draft.skuId && String(draft.skuId) === String(goods.id)) ||
|
||||||
|
(draft.url && draft.url === targetUrl)
|
||||||
|
);
|
||||||
|
},
|
||||||
// 选择链接回调
|
// 选择链接回调
|
||||||
selectedLink(val) {
|
selectedLink(val) {
|
||||||
if (!this.draftList?.length) return;
|
if (!this.draftList?.length) return;
|
||||||
|
|||||||
@@ -345,12 +345,17 @@ export default {
|
|||||||
width: 595px;
|
width: 595px;
|
||||||
.content-left {
|
.content-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
box-sizing: content-box;
|
||||||
> div:nth-child(1) {
|
> div:nth-child(1) {
|
||||||
width: 189px;
|
width: 189px;
|
||||||
border-right: 1px solid #eee;
|
border-right: 1px solid #eee;
|
||||||
height: 360px;
|
height: 360px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
img {
|
img {
|
||||||
margin: 40px 0 0 15px;
|
margin: 40px 0 0 15px;
|
||||||
}
|
}
|
||||||
@@ -368,15 +373,20 @@ export default {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
.view-btn {
|
.view-btn {
|
||||||
margin-left: 15px;
|
align-self: center;
|
||||||
margin-top: 10px;
|
width: 145px;
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: 15px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> div:nth-child(2) {
|
> div:nth-child(2) {
|
||||||
width: 405px;
|
width: 405px;
|
||||||
|
height: 360px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
align-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
> div {
|
> div {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -408,7 +418,7 @@ export default {
|
|||||||
grid-template-rows: repeat(2, 1fr);
|
grid-template-rows: repeat(2, 1fr);
|
||||||
height: 360px;
|
height: 360px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: content-box;
|
||||||
|
|
||||||
> div {
|
> div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -26,9 +26,10 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="storeInfo.storeDisable"
|
v-model="storeEnabled"
|
||||||
:active-value="true"
|
:active-value="true"
|
||||||
:inactive-value="false"
|
:inactive-value="false"
|
||||||
|
:loading="storeStatusChanging"
|
||||||
active-text="启用"
|
active-text="启用"
|
||||||
inactive-text="禁用"
|
inactive-text="禁用"
|
||||||
@change="shopStatusChange"
|
@change="shopStatusChange"
|
||||||
@@ -301,7 +302,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="下单时间">
|
<el-form-item label="下单时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="selectDate"
|
v-model="orderSelectDate"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
clearable
|
clearable
|
||||||
@@ -427,7 +428,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="申请时间">
|
<el-form-item label="申请时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="selectDate"
|
v-model="refundGoodsSelectDate"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
clearable
|
clearable
|
||||||
@@ -573,7 +574,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="申请时间">
|
<el-form-item label="申请时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="selectDate"
|
v-model="refundSelectDate"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
clearable
|
clearable
|
||||||
@@ -696,8 +697,12 @@ export default {
|
|||||||
categories: [],
|
categories: [],
|
||||||
loading: true,
|
loading: true,
|
||||||
storeInfo: {},
|
storeInfo: {},
|
||||||
|
storeEnabled: false,
|
||||||
|
storeStatusChanging: false,
|
||||||
checkAllGroup: [],
|
checkAllGroup: [],
|
||||||
selectDate: null,
|
orderSelectDate: null,
|
||||||
|
refundGoodsSelectDate: null,
|
||||||
|
refundSelectDate: null,
|
||||||
orderData: [],
|
orderData: [],
|
||||||
orderTotal: 0,
|
orderTotal: 0,
|
||||||
orderSearchForm: {
|
orderSearchForm: {
|
||||||
@@ -833,7 +838,7 @@ export default {
|
|||||||
getStoreInfo() {
|
getStoreInfo() {
|
||||||
API_Store.getShopDetailData(this.id).then((res) => {
|
API_Store.getShopDetailData(this.id).then((res) => {
|
||||||
this.storeInfo = res.result;
|
this.storeInfo = res.result;
|
||||||
this.storeInfo.storeDisable = this.storeInfo.storeDisable === "OPEN" ? true : false;
|
this.storeEnabled = this.storeInfo.storeDisable === "OPEN";
|
||||||
if (this.storeInfo.goodsManagementCategory != null) {
|
if (this.storeInfo.goodsManagementCategory != null) {
|
||||||
this.checkAllGroup = this.storeInfo.goodsManagementCategory
|
this.checkAllGroup = this.storeInfo.goodsManagementCategory
|
||||||
.split(",")
|
.split(",")
|
||||||
@@ -843,11 +848,23 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
shopStatusChange(v) {
|
shopStatusChange(v) {
|
||||||
if (v) {
|
this.storeStatusChanging = true;
|
||||||
API_Store.enableBrand(this.id).then((res) => {});
|
const request = v ? API_Store.enableBrand(this.id) : API_Store.disableShop(this.id);
|
||||||
|
request
|
||||||
|
.then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("操作成功");
|
||||||
|
this.getStoreInfo();
|
||||||
} else {
|
} else {
|
||||||
API_Store.disableShop(this.id).then((res) => {});
|
this.storeEnabled = !v;
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.storeEnabled = !v;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.storeStatusChanging = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getOrderData() {
|
getOrderData() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -922,21 +939,30 @@ export default {
|
|||||||
this.getOrderData();
|
this.getOrderData();
|
||||||
},
|
},
|
||||||
selectDateRange(v) {
|
selectDateRange(v) {
|
||||||
if (v) {
|
if (v && v.length === 2) {
|
||||||
this.orderSearchForm.startDate = v[0];
|
this.orderSearchForm.startDate = v[0];
|
||||||
this.orderSearchForm.endDate = v[1];
|
this.orderSearchForm.endDate = v[1];
|
||||||
|
} else {
|
||||||
|
this.orderSearchForm.startDate = "";
|
||||||
|
this.orderSearchForm.endDate = "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectRefundGoodsDateRange(v) {
|
selectRefundGoodsDateRange(v) {
|
||||||
if (v) {
|
if (v && v.length === 2) {
|
||||||
this.refundGoodsOrderSearchForm.startDate = v[0];
|
this.refundGoodsOrderSearchForm.startDate = v[0];
|
||||||
this.refundGoodsOrderSearchForm.endDate = v[1];
|
this.refundGoodsOrderSearchForm.endDate = v[1];
|
||||||
|
} else {
|
||||||
|
this.refundGoodsOrderSearchForm.startDate = "";
|
||||||
|
this.refundGoodsOrderSearchForm.endDate = "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectRefundDateRange(v) {
|
selectRefundDateRange(v) {
|
||||||
if (v) {
|
if (v && v.length === 2) {
|
||||||
this.refundOrderSearchForm.startDate = v[0];
|
this.refundOrderSearchForm.startDate = v[0];
|
||||||
this.refundOrderSearchForm.endDate = v[1];
|
this.refundOrderSearchForm.endDate = v[1];
|
||||||
|
} else {
|
||||||
|
this.refundOrderSearchForm.startDate = "";
|
||||||
|
this.refundOrderSearchForm.endDate = "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -193,17 +193,21 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
text-align: center;
|
|
||||||
line-height: 30px;
|
|
||||||
color: #666666;
|
color: #666666;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
|
||||||
> div {
|
> div {
|
||||||
width: 100%;
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,6 +215,9 @@
|
|||||||
.custom-checkbox-card-checked {
|
.custom-checkbox-card-checked {
|
||||||
border: 2px solid #ff5c58;
|
border: 2px solid #ff5c58;
|
||||||
}
|
}
|
||||||
|
.oss-card-selectable {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
.text {
|
.text {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
|||||||
@@ -182,9 +182,13 @@
|
|||||||
<div v-for="(item, index) in data" :key="index" class="img-item">
|
<div v-for="(item, index) in data" :key="index" class="img-item">
|
||||||
<div
|
<div
|
||||||
class="card"
|
class="card"
|
||||||
:class="{ 'custom-checkbox-card-checked': selectedOss.includes(item.id + ',' + item.url) }"
|
:class="{
|
||||||
|
'custom-checkbox-card-checked': selectedOss.includes(item.id + ',' + item.url),
|
||||||
|
'oss-card-selectable': isComponent && selectImage,
|
||||||
|
}"
|
||||||
@mouseenter="onMouseOver(item, index)"
|
@mouseenter="onMouseOver(item, index)"
|
||||||
@mouseleave="onMouseOut(item, index)"
|
@mouseleave="onMouseOut(item, index)"
|
||||||
|
@click="handleCardClick(item, $event)"
|
||||||
>
|
>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
:value="item.id + ',' + item.url"
|
:value="item.id + ',' + item.url"
|
||||||
@@ -1103,6 +1107,23 @@ export default {
|
|||||||
this.$emit("selected", e);
|
this.$emit("selected", e);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleCardClick(item, event) {
|
||||||
|
if (!(this.isComponent && this.selectImage)) return;
|
||||||
|
if (event?.target?.closest?.(".preview") || event?.target?.closest?.(".card-checkbox")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const key = `${item.id},${item.url}`;
|
||||||
|
let next;
|
||||||
|
if (this.maxSelect === 1) {
|
||||||
|
next = this.selectedOss.includes(key) ? [] : [key];
|
||||||
|
} else if (this.selectedOss.includes(key)) {
|
||||||
|
next = this.selectedOss.filter((k) => k !== key);
|
||||||
|
} else {
|
||||||
|
next = [...this.selectedOss, key];
|
||||||
|
}
|
||||||
|
this.selectedOss = next;
|
||||||
|
this.selectOssChange(next);
|
||||||
|
},
|
||||||
// 页码改变时回调
|
// 页码改变时回调
|
||||||
pageChange(value) {
|
pageChange(value) {
|
||||||
this.selectedOss = [];
|
this.selectedOss = [];
|
||||||
|
|||||||
@@ -272,11 +272,12 @@ export default {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
min-height: 1200px;
|
min-height: 1200px;
|
||||||
|
overflow-x: visible;
|
||||||
}
|
}
|
||||||
.model-form-list {
|
.model-form-list {
|
||||||
min-height: 500px;
|
min-height: 500px;
|
||||||
padding-right: 110px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
.top-fixed-advert {
|
.top-fixed-advert {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -377,20 +377,34 @@ export default {
|
|||||||
.model-item {
|
.model-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: visible;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.del-btn {
|
.del-btn {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.model-item :deep(.width_1200_auto) {
|
||||||
|
width: 100% !important;
|
||||||
|
max-width: 100% !important;
|
||||||
|
margin-left: 0 !important;
|
||||||
|
margin-right: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.del-btn {
|
.del-btn {
|
||||||
width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -100px;
|
left: 100%;
|
||||||
|
right: auto;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 10;
|
width: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: none;
|
||||||
|
z-index: 100;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@@ -420,38 +434,41 @@ export default {
|
|||||||
}
|
}
|
||||||
/** 热门广告 */
|
/** 热门广告 */
|
||||||
.hot-advert {
|
.hot-advert {
|
||||||
width: 1200px;
|
width: 100%;
|
||||||
margin-right: -110px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.hot-advert-banner {
|
.hot-advert-banner {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.advert-list {
|
.advert-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 5px 0;
|
padding: 10px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: $theme_color;
|
background: $theme_color;
|
||||||
height: 200px;
|
height: 210px;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
> li {
|
> li {
|
||||||
flex: 0 0 calc((100% - 40px) / 5);
|
flex: 1 1 0;
|
||||||
|
min-width: 0;
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 190px;
|
height: 190px;
|
||||||
|
object-fit: cover;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
transition: all 150ms ease-in-out;
|
transition: all 150ms ease-in-out;
|
||||||
@@ -473,16 +490,17 @@ export default {
|
|||||||
}
|
}
|
||||||
/** 折扣广告 */
|
/** 折扣广告 */
|
||||||
.discountAdvert-wrap {
|
.discountAdvert-wrap {
|
||||||
width: 1200px;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.discountAdvert {
|
.discountAdvert {
|
||||||
width: 1300px;
|
width: 1300px;
|
||||||
height: 585px;
|
height: 596px;
|
||||||
margin-left: -100px;
|
margin-left: -100px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 1300px 585px;
|
background-size: 1300px 596px;
|
||||||
position: relative;
|
position: relative;
|
||||||
> div {
|
> div {
|
||||||
padding-left: 295px;
|
padding-left: 295px;
|
||||||
|
|||||||
@@ -101,12 +101,14 @@
|
|||||||
v-for="(item, index) in options.right.list"
|
v-for="(item, index) in options.right.list"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
|
<div class="img-wrap">
|
||||||
<img :src="item.img" alt="" />
|
<img :src="item.img" alt="" />
|
||||||
<p>{{ item.name }}</p>
|
|
||||||
<p>{{ $filters.unitPrice(item.price, "¥") }}</p>
|
|
||||||
<div class="jiaobiao" :class="'jiaobiao' + (index + 1)">
|
<div class="jiaobiao" :class="'jiaobiao' + (index + 1)">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>{{ item.name }}</p>
|
||||||
|
<p>{{ $filters.unitPrice(item.price, "¥") }}</p>
|
||||||
<div class="setup-box">
|
<div class="setup-box">
|
||||||
<div>
|
<div>
|
||||||
<el-button size="small" @click.stop="handleSelectGoods(item)"
|
<el-button size="small" @click.stop="handleSelectGoods(item)"
|
||||||
@@ -499,42 +501,37 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
img {
|
border-bottom: 1px solid #eee;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
.img-wrap {
|
||||||
|
position: relative;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
border-right: 1px solid #eee;
|
|
||||||
:nth-child(2) {
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
max-height: 32px;
|
|
||||||
line-height: 16px;
|
|
||||||
margin-top: 4px;
|
|
||||||
overflow: hidden;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
:nth-child(3) {
|
|
||||||
color: $theme_color;
|
|
||||||
margin-top: 2px;
|
|
||||||
line-height: 1.2;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.jiaobiao {
|
.jiaobiao {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 23px;
|
width: 23px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
top: 6px;
|
top: 0;
|
||||||
right: 6px;
|
right: 0;
|
||||||
background: url("../../../assets/festival_icon.png");
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
max-height: none;
|
||||||
|
overflow: visible;
|
||||||
|
display: block;
|
||||||
|
background: url("../../../assets/festival_icon.png") no-repeat;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
line-height: 23px;
|
||||||
|
font-size: 12px;
|
||||||
|
-webkit-line-clamp: unset;
|
||||||
|
-webkit-box-orient: unset;
|
||||||
}
|
}
|
||||||
.jiaobiao1,
|
.jiaobiao1,
|
||||||
.jiaobiao4 {
|
.jiaobiao4 {
|
||||||
@@ -549,6 +546,25 @@ export default {
|
|||||||
background-position: -60px -30px;
|
background-position: -60px -30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
> p:nth-child(2) {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
max-height: 32px;
|
||||||
|
line-height: 16px;
|
||||||
|
margin-top: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
> p:nth-child(3) {
|
||||||
|
color: $theme_color;
|
||||||
|
margin-top: 2px;
|
||||||
|
line-height: 1.2;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
> div:nth-child(3n) {
|
> div:nth-child(3n) {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,18 +341,21 @@ export default {
|
|||||||
.recommend {
|
.recommend {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
.recommend-left {
|
.recommend-left {
|
||||||
width: 595px;
|
width: 595px;
|
||||||
.content-left {
|
.content-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
box-sizing: content-box;
|
||||||
> div:nth-child(1) {
|
> div:nth-child(1) {
|
||||||
width: 189px;
|
width: 189px;
|
||||||
border-right: 1px solid #eee;
|
border-right: 1px solid #eee;
|
||||||
height: 360px;
|
height: 360px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
img {
|
img {
|
||||||
margin: 40px 0 0 15px;
|
margin: 40px 0 0 15px;
|
||||||
}
|
}
|
||||||
@@ -370,15 +373,20 @@ export default {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
.view-btn {
|
.view-btn {
|
||||||
margin-left: 15px;
|
align-self: center;
|
||||||
margin-top: 10px;
|
width: 145px;
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: 15px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> div:nth-child(2) {
|
> div:nth-child(2) {
|
||||||
width: 405px;
|
width: 405px;
|
||||||
|
height: 360px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
align-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
> div {
|
> div {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -410,7 +418,7 @@ export default {
|
|||||||
grid-template-rows: repeat(2, 1fr);
|
grid-template-rows: repeat(2, 1fr);
|
||||||
height: 360px;
|
height: 360px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: content-box;
|
||||||
|
|
||||||
> div {
|
> div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -211,6 +211,9 @@
|
|||||||
.custom-checkbox-card-checked {
|
.custom-checkbox-card-checked {
|
||||||
border: 2px solid #ff5c58;
|
border: 2px solid #ff5c58;
|
||||||
}
|
}
|
||||||
|
.oss-card-selectable {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
.text {
|
.text {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
|||||||
@@ -176,9 +176,13 @@
|
|||||||
<div v-for="(item, index) in data" :key="index" class="img-item">
|
<div v-for="(item, index) in data" :key="index" class="img-item">
|
||||||
<div
|
<div
|
||||||
class="card"
|
class="card"
|
||||||
:class="{ 'custom-checkbox-card-checked': selectedOss.includes(item.id + ',' + item.url) }"
|
:class="{
|
||||||
|
'custom-checkbox-card-checked': selectedOss.includes(item.id + ',' + item.url),
|
||||||
|
'oss-card-selectable': isComponent && selectImage,
|
||||||
|
}"
|
||||||
@mouseenter="onMouseOver(item, index)"
|
@mouseenter="onMouseOver(item, index)"
|
||||||
@mouseleave="onMouseOut(item, index)"
|
@mouseleave="onMouseOut(item, index)"
|
||||||
|
@click="handleCardClick(item, $event)"
|
||||||
>
|
>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
:value="item.id + ',' + item.url"
|
:value="item.id + ',' + item.url"
|
||||||
@@ -1097,6 +1101,23 @@ export default {
|
|||||||
this.$emit("selected", e);
|
this.$emit("selected", e);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleCardClick(item, event) {
|
||||||
|
if (!(this.isComponent && this.selectImage)) return;
|
||||||
|
if (event?.target?.closest?.(".preview") || event?.target?.closest?.(".card-checkbox")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const key = `${item.id},${item.url}`;
|
||||||
|
let next;
|
||||||
|
if (this.maxSelect === 1) {
|
||||||
|
next = this.selectedOss.includes(key) ? [] : [key];
|
||||||
|
} else if (this.selectedOss.includes(key)) {
|
||||||
|
next = this.selectedOss.filter((k) => k !== key);
|
||||||
|
} else {
|
||||||
|
next = [...this.selectedOss, key];
|
||||||
|
}
|
||||||
|
this.selectedOss = next;
|
||||||
|
this.selectOssChange(next);
|
||||||
|
},
|
||||||
// 页码改变时回调
|
// 页码改变时回调
|
||||||
pageChange(value) {
|
pageChange(value) {
|
||||||
this.selectedOss = [];
|
this.selectedOss = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user