save
This commit is contained in:
parent
1585a8c74b
commit
a496b528c3
Binary file not shown.
|
Before Width: | Height: | Size: 593 KiB |
BIN
public/img/point.png
Normal file
BIN
public/img/point.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 649 B |
BIN
public/img/pointmall_bg.jpg
Normal file
BIN
public/img/pointmall_bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
@ -18,7 +18,7 @@ const routes = [
|
||||
path: '/Gift',
|
||||
name: 'Gift',
|
||||
component: () => import('./views/Tabbars/Gift.vue'),
|
||||
meta: { title: '礼品区', cache: true }
|
||||
meta: { title: '礼包区', cache: true }
|
||||
},
|
||||
{
|
||||
path: '/Mall',
|
||||
@ -26,6 +26,12 @@ const routes = [
|
||||
component: () => import('./views/Tabbars/Mall.vue'),
|
||||
meta: { title: '商城', cache: true }
|
||||
},
|
||||
{
|
||||
path: '/PointMall',
|
||||
name: 'PointMall',
|
||||
component: () => import('./views/Tabbars/PointMall.vue'),
|
||||
meta: { title: '积分区', cache: true }
|
||||
},
|
||||
{
|
||||
path: '/My',
|
||||
name: 'My',
|
||||
@ -184,13 +190,13 @@ const routes = [
|
||||
path: '/Business_School',
|
||||
name: 'Business_School',
|
||||
component: () => import('./views/Platform/Business_School.vue'),
|
||||
meta: { title: '商学院', noLogin: true, cache: true }
|
||||
meta: { title: '商学院', noLogin: true }
|
||||
},
|
||||
{
|
||||
path: '/School_detail',
|
||||
name: 'School_detail',
|
||||
component: () => import('./views/Platform/School_Detail.vue'),
|
||||
meta: { title: '商学院详情', noLogin: true, cache: true }
|
||||
meta: { title: '商学院详情', noLogin: true, }
|
||||
},
|
||||
{
|
||||
path: '/School_Category',
|
||||
@ -202,13 +208,13 @@ const routes = [
|
||||
path: '/Column',
|
||||
name: 'Column',
|
||||
component: () => import('./views/Platform/Column.vue'),
|
||||
meta: { title: '栏目列表', noLogin: true, cache: true }
|
||||
meta: { title: '栏目列表', noLogin: true }
|
||||
},
|
||||
{
|
||||
path: '/ColumnDetail',
|
||||
name: 'ColumnDetail',
|
||||
component: () => import('./views/Platform/ColumnDetail.vue'),
|
||||
meta: { title: '栏目详情', noLogin: true, cache: true }
|
||||
meta: { title: '栏目详情', noLogin: true }
|
||||
},
|
||||
{
|
||||
path: '/GoodsDetail',
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { get } from '@/api/http'
|
||||
|
||||
// Module level cache for quick access
|
||||
export let dictCache = {}
|
||||
|
||||
const SESSION_KEY = 'dict_cache'
|
||||
|
||||
export const useDatadicStore = defineStore('datadic', {
|
||||
state: () => ({
|
||||
dicts: {},
|
||||
@ -20,6 +21,18 @@ export const useDatadicStore = defineStore('datadic', {
|
||||
},
|
||||
actions: {
|
||||
async init() {
|
||||
// 优先从 sessionStorage 读取缓存
|
||||
const cached = sessionStorage.getItem(SESSION_KEY)
|
||||
if (cached) {
|
||||
try {
|
||||
dictCache = JSON.parse(cached)
|
||||
this.dicts = dictCache
|
||||
this.loaded = true
|
||||
return
|
||||
} catch (e) {
|
||||
sessionStorage.removeItem(SESSION_KEY)
|
||||
}
|
||||
}
|
||||
if (this.loaded) return
|
||||
try {
|
||||
const res = await get('/v1/client/CDatadicsClient')
|
||||
@ -29,6 +42,7 @@ export const useDatadicStore = defineStore('datadic', {
|
||||
})
|
||||
this.dicts = dictCache
|
||||
this.loaded = true
|
||||
sessionStorage.setItem(SESSION_KEY, JSON.stringify(dictCache))
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('数据字典加载失败', e)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { post } from '@/api/http';
|
||||
import { get } from '@/api/http';
|
||||
|
||||
export const useUserStore = defineStore('user', {
|
||||
state: () => ({
|
||||
@ -64,7 +64,7 @@ export const useUserStore = defineStore('user', {
|
||||
*/
|
||||
async fetchUserInfo() {
|
||||
try {
|
||||
const res = await post('/v1/client/UserClient/info');
|
||||
const res = await get('/v1/client/DUsersClient');
|
||||
if (res.status === 200 && res.data) {
|
||||
this.setUser(res.data);
|
||||
}
|
||||
|
||||
@ -384,10 +384,17 @@
|
||||
|
||||
.fast_to {
|
||||
.box;
|
||||
.box-tb;
|
||||
.box-pack-between;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
gap: 2.4vw;
|
||||
|
||||
>div {
|
||||
.box;
|
||||
gap: 2.4vw;
|
||||
// margin-bottom: 2.4vw;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 44.8vw;
|
||||
height: 17.33vw;
|
||||
@ -2073,6 +2080,7 @@
|
||||
.banner img {
|
||||
width: 100%;
|
||||
margin-top: 3.07vw;
|
||||
border-radius: 2.2vw;
|
||||
}
|
||||
|
||||
.label_box {
|
||||
@ -2146,6 +2154,7 @@
|
||||
img {
|
||||
margin: 3.33vw 0 1.87vw;
|
||||
height: 14.4vw;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2457,6 +2466,7 @@
|
||||
.box;
|
||||
.box-pack-between;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.good {
|
||||
|
||||
@ -894,6 +894,29 @@ img {
|
||||
padding-bottom: 2.53vw;
|
||||
border-bottom: 1px solid #f5f5f580;
|
||||
|
||||
.state {
|
||||
.box;
|
||||
.box-center-center;
|
||||
.bs;
|
||||
height: 4.67vw;
|
||||
padding: 0 1.2vw;
|
||||
border-radius: 1.07vw;
|
||||
margin-right: 1.2vw;
|
||||
}
|
||||
|
||||
.state1 {
|
||||
background-color: #2990f0;
|
||||
}
|
||||
|
||||
.state3 {
|
||||
background-color: #ea4747;
|
||||
|
||||
}
|
||||
|
||||
.state4 {
|
||||
background-color: #229427;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 3.2vw;
|
||||
height: 3.2vw;
|
||||
@ -903,6 +926,7 @@ img {
|
||||
|
||||
.goods_box {
|
||||
.box;
|
||||
.box-align-center;
|
||||
margin-top: 2.8vw;
|
||||
|
||||
img {
|
||||
@ -914,9 +938,9 @@ img {
|
||||
.goods_info {
|
||||
.box;
|
||||
.box-tb;
|
||||
.box-pack-around;
|
||||
.box-pack-between;
|
||||
width: 100%;
|
||||
height: 21.33vw;
|
||||
height: 18.33vw;
|
||||
|
||||
|
||||
>div {
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 用户协议 -->
|
||||
<van-checkbox icon-size="2.667vw" class="agreement" v-model="checked" checked-color="#841e36">
|
||||
<van-checkbox icon-size="3.2vw" class="agreement" v-model="checked" checked-color="#841e36">
|
||||
选中即代表同意<a @click.stop="showContract = true">《用户协议》</a>和<a @click.stop="showPolicy = true">《隐私政策》</a>
|
||||
</van-checkbox>
|
||||
|
||||
@ -357,7 +357,7 @@ export default {
|
||||
this.formData.Recommend = inviteCode;
|
||||
localStorage.setItem('recommend', inviteCode);
|
||||
// 有邀请码时自动切换到注册模式
|
||||
this.isReg = true;
|
||||
// this.isReg = true;
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
|
||||
@ -6,12 +6,12 @@ export default {
|
||||
mounted() {
|
||||
const url = new URL(window.location.href)
|
||||
const code = url.searchParams.get('code')
|
||||
const inviteCode = url.searchParams.get('invite')
|
||||
|
||||
if (code) {
|
||||
sessionStorage.setItem('wx_callback_code', code)
|
||||
sessionStorage.setItem('wx_code_processed', '1')
|
||||
// 跳转到登录页,让用户完成注册/登录
|
||||
this.$router.replace('/Login')
|
||||
// 带上 invite 参数一起跳转,Login mounted 时读取
|
||||
this.$router.replace('/Login' + (inviteCode ? `?invite=${inviteCode}` : ''))
|
||||
} else {
|
||||
this.$router.replace('/')
|
||||
}
|
||||
|
||||
@ -11,15 +11,8 @@
|
||||
<img :src="i.bankspname === '支付宝' ? '/img/aliicon.png' : '/img/bankcardicon.png'" alt="">
|
||||
<div>
|
||||
<span>
|
||||
{{ i.bankspname === '支付宝' ? '支付宝账号' : i.bankspname }}({{ i.bankid === 91 ? i.bankcellphone
|
||||
: i.bankcardnumber }})
|
||||
{{ i.realname }}({{ i.bankcardnumber }})
|
||||
</span>
|
||||
<p v-if="i.bankid === 91">
|
||||
2小时内到账
|
||||
</p>
|
||||
<p v-else>
|
||||
{{ i.realname }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -100,9 +93,10 @@
|
||||
:formatter="formatter" />
|
||||
<van-field v-model="tempData.bankcardnumber" label="银行卡号" placeholder="请输入银行卡号"
|
||||
:rules="[{ required: true, message: '请填写银行卡号' }]" clearable required :formatter="formatter" />
|
||||
<van-field v-model="tempData.bankname" label="银行名称" placeholder="请选择银行名称"
|
||||
<!--
|
||||
<van-field v-model="tempData.bankname" label="银行名称" placeholder="请选择银行名称"
|
||||
:rules="[{ required: true, message: '请选择银行名称' }]" readonly required is-link
|
||||
@click="showBankPicker = true" />
|
||||
@click="showBankPicker = true" /> -->
|
||||
<van-field v-model="regionName" label="开户地区" placeholder="请选择开户地区"
|
||||
:rules="[{ required: true, message: '请选择开户地区' }]" clearable required is-link @click="showRegion = true;"
|
||||
readonly />
|
||||
@ -127,9 +121,9 @@
|
||||
@finish="onFinish" @close="showRegion = false" />
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model:show="showBankPicker" round position="bottom">
|
||||
<!-- <van-popup v-model:show="showBankPicker" round position="bottom">
|
||||
<van-picker title="选择银行" :columns="bankColumns" @confirm="onBankConfirm" @cancel="showBankPicker = false" />
|
||||
</van-popup>
|
||||
</van-popup> -->
|
||||
</div>
|
||||
</BasePage>
|
||||
|
||||
@ -142,13 +136,11 @@ export default {
|
||||
name: 'CashoutAccount',
|
||||
mounted() {
|
||||
this.init();
|
||||
this.getBankId()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showAddAliPayPopup: false,
|
||||
showAddPopup: false,
|
||||
showBankPicker: false,
|
||||
tempData: {},
|
||||
saving: false,
|
||||
checked: 0,
|
||||
@ -160,7 +152,6 @@ export default {
|
||||
maxDate: new Date('2099/12/31'),
|
||||
regionName: '',
|
||||
region: '',
|
||||
bankidGroup: {},
|
||||
areaList: useCascaderAreaData(),
|
||||
defaultProps: {
|
||||
text: 'text',
|
||||
@ -170,9 +161,6 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
bankColumns() {
|
||||
return this.bankidGroup.map(item => ({ text: item.name, value: item.id }));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
@ -185,11 +173,6 @@ export default {
|
||||
formatter(value) {
|
||||
return value.replace(/\s/g, '');
|
||||
},
|
||||
getBankId() {
|
||||
this.$get('/v1/client/DBanksClient').then(res => {
|
||||
this.bankidGroup = res.data;
|
||||
})
|
||||
},
|
||||
onChange({ selectedOptions }) {
|
||||
this.tempData.provid = selectedOptions[0]?.value || '';
|
||||
},
|
||||
@ -199,14 +182,6 @@ export default {
|
||||
this.tempData.provid = selectedOptions[0]?.value || '';
|
||||
this.tempData.areaid = selectedOptions[1]?.value || selectedOptions[0]?.value || '';
|
||||
},
|
||||
onBankConfirm({ selectedValues }) {
|
||||
const bank = this.bankidGroup.find(item => item.id === selectedValues[0]);
|
||||
if (bank) {
|
||||
this.tempData.bankid = bank.id;
|
||||
this.tempData.bankname = bank.name;
|
||||
}
|
||||
this.showBankPicker = false;
|
||||
},
|
||||
onconfirm({ selectedValues }) {
|
||||
const date = selectedValues.join('-');
|
||||
if (this.tempData.obj === 'certbegindate') {
|
||||
@ -245,7 +220,7 @@ export default {
|
||||
"realname": this.tempData.realname,
|
||||
"idnumber": this.tempData.idnumber,
|
||||
"bankid": this.tempData.bankid || 0,
|
||||
"bankname": this.tempData.bankname || '',
|
||||
// "bankname": this.tempData.bankname || '',
|
||||
"bankcardnumber": this.tempData.bankcardnumber,
|
||||
"bankcellphone": this.tempData.bankcellphone,
|
||||
"sort": 0,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<BasePage>
|
||||
<BasePage :title="data.name || '产品详情'">
|
||||
<div class="goodsdetails">
|
||||
<div class="t">
|
||||
<img :src="$file(data.img)" alt="">
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<!-- -->
|
||||
<BasePage :title="currentColumn.name || '平台动态'">
|
||||
<BasePage :title="currentColumn.name || ''">
|
||||
<!-- <div class="column-list" v-if="currentColumn"> -->
|
||||
<!-- v-if="currentColumn.ColumnType === 'list'" -->
|
||||
<div class="column-list">
|
||||
<div class="column-list b_l_w" v-if="articleList.length > 0">
|
||||
<div>
|
||||
<div v-if="articleList.length > 0" @click="$navigate(`/ColumnDetail?id=${item.id}`)" class="column"
|
||||
v-for="item in articleList" :key="item.id">
|
||||
<img :src="$file(item.img)" class="icon" />
|
||||
<div @click="$navigate(`/ColumnDetail?id=${item.id}`)" class="column" v-for="item in articleList"
|
||||
:key="item.id">
|
||||
<img v-if="item.img" :src="$file(item.img)" class="icon" />
|
||||
<div class="overview">
|
||||
<span class="title">{{ item.name }}</span>
|
||||
<div class="desc">
|
||||
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <van-empty v-else class="b_l_w" description="暂无数据" /> -->
|
||||
<van-empty v-else class="b_l_w" description="暂无数据" />
|
||||
<!-- </div> -->
|
||||
<!-- <van-empty v-else class="b_l_w" description="栏目不存在" /> -->
|
||||
</BasePage>
|
||||
@ -30,24 +30,10 @@ export default {
|
||||
name: 'Column',
|
||||
emits: ['updateShare'],
|
||||
mounted() {
|
||||
const cacheKey = 'Column_articleList'
|
||||
const cached = sessionStorage.getItem(cacheKey)
|
||||
if (cached) {
|
||||
try {
|
||||
const { articleList, columnName } = JSON.parse(cached)
|
||||
this.articleList = articleList
|
||||
this.currentColumn.name = columnName
|
||||
return
|
||||
} catch (e) { }
|
||||
}
|
||||
this.$get('/v1/client/CNewsClient?pid=3').then(data => {
|
||||
this.$get(`/v1/client/CNewsClient?pid=${this.pid}`).then(data => {
|
||||
// console.log(data);
|
||||
this.articleList = data.data.items;
|
||||
this.currentColumn.name = data.data.items[0].pidname;
|
||||
sessionStorage.setItem(cacheKey, JSON.stringify({
|
||||
articleList: this.articleList,
|
||||
columnName: this.currentColumn.name
|
||||
}))
|
||||
})
|
||||
},
|
||||
data() {
|
||||
@ -56,6 +42,7 @@ export default {
|
||||
articles: [],
|
||||
articleList: [],
|
||||
currentColumn: {},
|
||||
pid: this.$route.query.pid || 3,
|
||||
}
|
||||
},
|
||||
|
||||
@ -63,8 +50,11 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.column-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.column {
|
||||
display: flex;
|
||||
padding: 3.333vw;
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<span style="font-size: 24px">{{ article.name }}</span>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 12px">
|
||||
<span style="color: #999999">{{ article.addtime ? $formatGMT(article.addtime, 'yyyy-MM-dd') : ''
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span style="color: #999999">阅读 {{ article.click }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -25,17 +25,9 @@ export default {
|
||||
},
|
||||
beforeCreate() {
|
||||
const id = this.$route.query.id
|
||||
const cacheKey = `School_Detail_${id}`
|
||||
const cached = sessionStorage.getItem(cacheKey)
|
||||
if (cached) {
|
||||
try {
|
||||
this.article = JSON.parse(cached)
|
||||
return
|
||||
} catch (e) {}
|
||||
}
|
||||
this.$get(`/v1/client/CBusinessschoolsClient/${id}`).then(res => {
|
||||
this.article = res.data;
|
||||
sessionStorage.setItem(cacheKey, JSON.stringify(res.data))
|
||||
// sessionStorage.setItem(cacheKey, JSON.stringify(res.data))
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
@ -45,26 +37,26 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
setupImagePreview() {
|
||||
const contentEl = this.$refs.contentRef;
|
||||
if (!contentEl) return;
|
||||
// setupImagePreview() {
|
||||
// const contentEl = this.$refs.contentRef;
|
||||
// if (!contentEl) return;
|
||||
|
||||
const images = contentEl.querySelectorAll('img');
|
||||
this.imageUrls = Array.from(images).map(img => img.src);
|
||||
// const images = contentEl.querySelectorAll('img');
|
||||
// this.imageUrls = Array.from(images).map(img => img.src);
|
||||
|
||||
images.forEach((img, index) => {
|
||||
img.addEventListener('click', () => {
|
||||
this.previewImages(index);
|
||||
});
|
||||
});
|
||||
},
|
||||
previewImages(startPosition) {
|
||||
this.$showImagePreview({
|
||||
images: this.imageUrls,
|
||||
startPosition,
|
||||
closeable: true,
|
||||
});
|
||||
}
|
||||
// images.forEach((img, index) => {
|
||||
// img.addEventListener('click', () => {
|
||||
// this.previewImages(index);
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
// previewImages(startPosition) {
|
||||
// this.$showImagePreview({
|
||||
// images: this.imageUrls,
|
||||
// startPosition,
|
||||
// closeable: true,
|
||||
// });
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -148,7 +148,7 @@
|
||||
<div class="name">
|
||||
<b>{{ item.name }}</b>
|
||||
<div class="text">
|
||||
{{ item.skuname }}
|
||||
{{ item.description }}
|
||||
<b style="line-height: 5.6vw;">
|
||||
<span><span>¥</span>{{ item.saleprice }}</span>
|
||||
<!-- <span> /{{ item.skuname }}</span> -->
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<van-swipe-item class="v" style="height: 12vw; line-height: 6vw" v-for="(group, index) in trendsGrouped"
|
||||
:key="index">
|
||||
<template v-for="item in group">
|
||||
<a @click="$navigate(`/Column?pid=3`)">
|
||||
<a @click="$navigate(`/Column?pid=2`)">
|
||||
<span></span>{{ item.name }}
|
||||
</a>
|
||||
</template>
|
||||
|
||||
@ -15,26 +15,7 @@
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
</div>
|
||||
<!-- <div class="label_box">
|
||||
<div class="">
|
||||
<img src="/img/mall_i1.png" alt="">
|
||||
<span>
|
||||
官方商城
|
||||
</span>
|
||||
</div>
|
||||
<div class="">
|
||||
<img src="/img/mall_i2.png" alt="">
|
||||
<span>
|
||||
正品保障
|
||||
</span>
|
||||
</div>
|
||||
<div class="">
|
||||
<img src="/img/mall_i3.png" alt="">
|
||||
<span>
|
||||
售后无忧
|
||||
</span>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="cg_bigbox">
|
||||
@ -218,26 +199,15 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'Mall',
|
||||
// emits: ['changeTabbar'],
|
||||
activated() {
|
||||
if (this._skipActivatedRefresh) {
|
||||
this._skipActivatedRefresh = false
|
||||
return
|
||||
}
|
||||
this.$refs.BaseList?.refresh()
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
activeType: '',
|
||||
_skipActivatedRefresh: true,
|
||||
searchParams: {
|
||||
mallstate: 3,
|
||||
pid: '',
|
||||
Key: '',
|
||||
},
|
||||
show: true,
|
||||
data: {
|
||||
Carousel: [],
|
||||
SpuType: [],
|
||||
@ -247,65 +217,66 @@ export default {
|
||||
bgcolor: '',
|
||||
}
|
||||
},
|
||||
|
||||
activated() {
|
||||
this.$refs.BaseList?.refresh()
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
Promise.all([
|
||||
this.$get(`/v1/client/EProcatesClient`).then(res => {
|
||||
this.data.SpuType = res.data
|
||||
this.$get('/v1/client/EProcatesClient').then(res => {
|
||||
this.data.SpuType = res.data.filter(i => i.homeshowed)
|
||||
}),
|
||||
this.$get(`/v1/client/CSlidesClient?pid=2`).then(res => {
|
||||
this.$get('/v1/client/CSlidesClient?pid=2').then(res => {
|
||||
this.data.Carousel = res.data
|
||||
if (res.data?.[0]?.bgcolor) {
|
||||
this.bgcolor = res.data[0].bgcolor
|
||||
}
|
||||
this.bgcolor = res.data?.[0]?.bgcolor || ''
|
||||
}),
|
||||
this.$get('/v1/client/EProsClient?recommend=true').then(res => {
|
||||
this.hotData = res.data.items;
|
||||
this.hotData = res.data.items || []
|
||||
}),
|
||||
this.$get('/v1/client/EProcatesClient/1').then(res => {
|
||||
this.typeData = res.data
|
||||
this.searchParams.pid = res.data?.[0]?.id || ''
|
||||
const filtered = res.data.filter(i => i.homeshowed)
|
||||
this.typeData = filtered
|
||||
if (filtered.length > 0) {
|
||||
this.activeType = filtered[0].id
|
||||
this.searchParams.pid = filtered[0].id
|
||||
}
|
||||
}),
|
||||
]).then(() => {
|
||||
// 初始化完成后,允许 activated 触发 refresh
|
||||
this._skipActivatedRefresh = false
|
||||
}).catch(err => {
|
||||
]).catch(err => {
|
||||
this.$showFailToast(err.message || '加载失败')
|
||||
});
|
||||
},
|
||||
groupItems(items, num) {
|
||||
const grouped = [];
|
||||
for (let i = 0; i < items.length; i += num) {
|
||||
grouped.push(items.slice(i, i + num));
|
||||
}
|
||||
return grouped;
|
||||
})
|
||||
},
|
||||
|
||||
changeTab(type) {
|
||||
this.searchParams.pid = type;
|
||||
this.$refs.BaseList.refresh()
|
||||
this.searchParams.pid = type
|
||||
},
|
||||
|
||||
onSwipeChange(index) {
|
||||
const item = this.data.Carousel[index]
|
||||
this.bgcolor = item?.bgcolor || ''
|
||||
}
|
||||
this.bgcolor = this.data.Carousel[index]?.bgcolor || ''
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
this.$refs.BaseList?.refresh()
|
||||
},
|
||||
|
||||
onClear() {
|
||||
this.searchParams.Key = ''
|
||||
this.$refs.BaseList?.refresh()
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
bgStyle() {
|
||||
if (this.bgcolor) {
|
||||
return {
|
||||
background: `linear-gradient(${this.bgcolor}, #f5f5f5)`
|
||||
}
|
||||
}
|
||||
return {}
|
||||
return this.bgcolor ? { background: `linear-gradient(${this.bgcolor}, #f5f5f5)` } : {}
|
||||
},
|
||||
btnStyle() {
|
||||
if (this.bgcolor) {
|
||||
return {
|
||||
background: this.bgcolor
|
||||
}
|
||||
}
|
||||
return {}
|
||||
}
|
||||
return this.bgcolor ? { background: this.bgcolor } : {}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
290
src/views/Tabbars/PointMall.vue
Normal file
290
src/views/Tabbars/PointMall.vue
Normal file
@ -0,0 +1,290 @@
|
||||
<template>
|
||||
<div class="pointmall">
|
||||
<div class="top">
|
||||
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item>
|
||||
<img style="width: 100%;" src="/img/pointmall_bg.jpg" alt="">
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
<!-- <div class="search">
|
||||
<img src="/img/search-w.png" alt="">
|
||||
<input type="text" placeholder="搜索您想要的产品">
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="contaiar">
|
||||
<div class="tabs">
|
||||
<van-tabs style="max-width: 90%;" background="transparent" line-height="0.8vw" line-width="9.33vw;"
|
||||
v-model:active="active" :ellipsis="false" color="#ca2904" title-active-color="#ca2904"
|
||||
title-inactive-color="#4e4e4e">
|
||||
<van-tab title="新品" name=""></van-tab>
|
||||
<van-tab v-for="i in tabs" :name="i.id" :title="i.name"></van-tab>
|
||||
</van-tabs>
|
||||
<img @click="showLeft = true" class="filter_img" style="width: 5.4vw;" src="/img/filter.png" alt="">
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <BaseList url="/v1/client/EProsClient" class="goods_list" :params="{ mallstate: 2, pid: active }">
|
||||
<template #default="{ item }">
|
||||
<div class="goods_item" :key="item.id" @click="toDetail(item.id)">
|
||||
<img :src="$file(item.img)" alt="">
|
||||
<div>
|
||||
<span class="title">{{ item.name }}</span>
|
||||
<p>¥{{ item.originalprice }}</p>
|
||||
<div class="money">
|
||||
<div>
|
||||
<span>¥
|
||||
<b>{{ item.saleprice }}</b>.00
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<img class="r" style="width: 5.6vw;" src="/img/cart.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</BaseList> -->
|
||||
|
||||
|
||||
<div class="goods_list">
|
||||
<div class="goods_item" v-for="item in goods" :key="item.id" @click="toDetail(item.id)">
|
||||
<img :src="item.Icon" alt="">
|
||||
<div>
|
||||
<span class="title">{{ item.SubTitle }}</span>
|
||||
<div class="point_box">
|
||||
<img style="width: 3.33vw;height: 3.2vw;" src="/img/point.png" alt="">
|
||||
<span style="font-size: 3.2vw; color: #d9a452;">积分可抵¥500.00</span>
|
||||
</div>
|
||||
<!-- <p>¥{{ item.OPrice }}</p> -->
|
||||
<div class="money">
|
||||
<div>
|
||||
<span>¥</span>
|
||||
<b>{{ item.Price }}</b>
|
||||
</div>
|
||||
|
||||
<span class="oprice">
|
||||
¥{{ item.OPrice }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<van-popup v-model:show="showLeft" position="left" :style="{ width: '30%', height: '100%' }">
|
||||
<div v-for="i in tabs">
|
||||
<div @click="changeTab(i.id)" style="height: 10vw;width: 100%;border-bottom: solid 1px #f5f5f5;"
|
||||
class="box box-center-center">
|
||||
{{ i.name }}
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PointMall',
|
||||
activated() {
|
||||
this.getTab()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: '',
|
||||
showLeft: false,
|
||||
tabs: [],
|
||||
goods: [
|
||||
{
|
||||
id: 1, Icon:
|
||||
'/img/avatar.png', SubTitle:
|
||||
'积分礼品测试商品1', OPrice: '99.00',
|
||||
Price: '9.90'
|
||||
},
|
||||
{
|
||||
id: 2, Icon:
|
||||
'/img/avatar.png', SubTitle:
|
||||
'积分礼品测试商品2', OPrice:
|
||||
'199.00', Price: '19.90'
|
||||
},
|
||||
{
|
||||
id: 3, Icon:
|
||||
'/img/avatar.png', SubTitle:
|
||||
'积分礼品测试商品3', OPrice:
|
||||
'299.00', Price: '29.90'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTab()
|
||||
},
|
||||
methods: {
|
||||
getTab() {
|
||||
this.$get('/v1/client/EProcatesClient/2').then(res => {
|
||||
this.tabs = res.data
|
||||
})
|
||||
},
|
||||
changeTab(id) {
|
||||
this.active = id;
|
||||
this.showLeft = false;
|
||||
},
|
||||
toDetail(e) {
|
||||
this.$navigate(`/GoodsDetail?id=${e}`)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredGoods() {
|
||||
// if (this.active === 0) {
|
||||
// return this.goods
|
||||
// }
|
||||
// const categoryId = this.active
|
||||
// return this.goods.filter(item => item.CategoryId === categoryId)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pointmall {
|
||||
&::before {
|
||||
content: '';
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: #f5f5f5;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
.finished-text {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.top {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.contaiar {
|
||||
position: relative;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 8vw 8vw 0vw 0vw;
|
||||
margin-top: -12vw;
|
||||
z-index: 1;
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 5vw;
|
||||
margin-top: 4vw;
|
||||
position: relative;
|
||||
|
||||
.filter_img {
|
||||
width: 5.4vw;
|
||||
height: 5.4vw;
|
||||
position: absolute;
|
||||
right: 5vw;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods_list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 0 4vw;
|
||||
margin-top: 4vw;
|
||||
|
||||
.goods_item {
|
||||
background-color: #fefefe;
|
||||
border-radius: 2vw;
|
||||
margin-bottom: 4vw;
|
||||
width: 44.8vw;
|
||||
max-width: 44.8vw;
|
||||
|
||||
img {
|
||||
width: 44.8vw;
|
||||
height: 44.8vw;
|
||||
background-color: #fefefe;
|
||||
border-radius: 2vw 2vw 0vw 0vw;
|
||||
}
|
||||
|
||||
>div {
|
||||
padding: 3.2vw;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 38.4vw;
|
||||
max-width: 38.4vw;
|
||||
font-size: 3.47vw;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box !important;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
line-height: 4vw;
|
||||
height: 8vw;
|
||||
color: #333;
|
||||
margin-bottom: 3.2vw;
|
||||
}
|
||||
|
||||
.point_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 3.2vw;
|
||||
height: 5.33vw;
|
||||
background-color: #fff6dd;
|
||||
border-radius: 0.8vw;
|
||||
border: solid 0.27vw #f1c98c;
|
||||
padding: 0 2vw;
|
||||
width: fit-content;
|
||||
|
||||
img {
|
||||
width: 3.33vw;
|
||||
height: 3.2vw;
|
||||
margin-right: 1.6vw;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 3.2vw;
|
||||
color: #d9a452;
|
||||
}
|
||||
}
|
||||
|
||||
.money {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #ea3e23;
|
||||
|
||||
span {
|
||||
color: #ca2904;
|
||||
text-decoration: line-through;
|
||||
|
||||
}
|
||||
|
||||
|
||||
b {
|
||||
font-size: 4vw;
|
||||
color: #ea3e23;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.oprice {
|
||||
font-size: 3.2vw;
|
||||
color: #b1b1b1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -138,6 +138,7 @@ export default {
|
||||
Paychannel: paychannel,
|
||||
Openid: method === 'wechat' ? openid : ''
|
||||
});
|
||||
// alert(JSON.stringify(res));
|
||||
if (res.data && res.data.startsWith('http')) {
|
||||
// 返回链接则跳转
|
||||
location.href = res.data;
|
||||
|
||||
@ -64,9 +64,13 @@
|
||||
实付金额
|
||||
<b style="color: #f00;">¥{{ data.realmoney?.toFixed(2) }}</b>
|
||||
</p>
|
||||
<p v-if="data.paychannelname">
|
||||
支付方式
|
||||
<span>{{ data.paychannelname }}</span>
|
||||
</p>
|
||||
<p v-if="data.zongsongjifen">
|
||||
赠送积分
|
||||
<span>{{ data.zongsongjifen }}</span>
|
||||
<span>{{ data.zongsongjifen?.toFixed(2) }}</span>
|
||||
</p>
|
||||
<hr style="margin:1.67vw 0;height: 1px;border: none;background: #f5f5f580;">
|
||||
<p>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<BasePage>
|
||||
<BasePage :back="back">
|
||||
<div class="tradelist">
|
||||
<div class="tabs">
|
||||
<van-tabs class="area" v-model:active="TradeArea" color="#f00" title-active-color="#222"
|
||||
@ -24,72 +24,39 @@
|
||||
style="padding: 3.33vw;" @refresh="onRefresh">
|
||||
<template #default="{ item }">
|
||||
<div class="list">
|
||||
<!-- 买单订单 -->
|
||||
<template v-if="item.shopname">
|
||||
<div class="merchant_info">
|
||||
<img class="icon" :src="$file(item.shopimg)" alt="">
|
||||
<div class="inf">
|
||||
<span>{{ item.shopname }}</span>
|
||||
<div>
|
||||
<p>¥{{ item.ordermoney?.toFixed(2) }}</p>
|
||||
<span class="dr" v-if="item.discountratio">{{ item.discountratio }}%让利</span>
|
||||
</div>
|
||||
<div class="order_box">
|
||||
<span :class="'state' + item.mallstate" class="state">{{ item.mallstatename.slice(0, 2) }}</span>
|
||||
<span>订单编号:{{ item.ordernum }}</span>
|
||||
<img src="/img/copy_b.png" @click="$copyText(item.ordernum); $showSuccessToast('复制成功')" alt="">
|
||||
</div>
|
||||
<div class="goods_box">
|
||||
<img :src="$file(item.shopimg || item.proimg)" alt="">
|
||||
<div class="goods_info">
|
||||
<div class="tit">{{ item.shopname || item.proname }}</div>
|
||||
<div class="spec" v-if="!item.shopname">
|
||||
<span>{{ item.proskuname }}</span>
|
||||
<p>x{{ item.buynums }}</p>
|
||||
</div>
|
||||
<div class="concession">
|
||||
<span>¥{{ item.proskusaleprice?.toFixed(2) }}</span>
|
||||
<p v-if="item.discountratio">{{ item.discountratio }}%让利</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="price">
|
||||
实付:<span>¥<b>{{ item.realmoney?.toFixed(2) }}</b></span>
|
||||
</div>
|
||||
<div class="price">
|
||||
实付:<span>¥<b>{{ item.realmoney?.toFixed(2) }}</b></span>
|
||||
</div>
|
||||
<div class="state_box">
|
||||
<b :class="'b' + item.state">{{ item.statename }}</b>
|
||||
<div class="btn_box">
|
||||
<button v-if="item.state === 0" @click="cancelTrade(item)">取消订单</button>
|
||||
<button v-if="!item.shopname" @click="$navigate(`TradeDetail?ordernum=${item.ordernum}`)">查看详情</button>
|
||||
<button v-else @click="$navigate(`MerchantTradeDetail?id=${item.ordernum}`)">查看详情</button>
|
||||
|
||||
<button v-if="item.state === 3" @click="confirmReceipt(item)">确认收货</button>
|
||||
<button v-if="item.state === 0" @click="$navigate(`Pay?ordernum=${item.ordernum}`)">立即支付</button>
|
||||
</div>
|
||||
<div class="detail_box">
|
||||
<div>
|
||||
<span>订单编号:</span>
|
||||
<span class="r">{{ item.ordernum }}<img src="/img/copy_b.png"
|
||||
@click="$copyText(item.ordernum); $showSuccessToast('复制成功')" alt=""></span>
|
||||
</div>
|
||||
<div>
|
||||
<span>下单时间:</span>
|
||||
<span class="r">{{ $formatGMT(item.addtime, 'yyyy-MM-dd HH:mm:ss') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state_box">
|
||||
<b :class="'b' + item.state">{{ item.statename }}</b>
|
||||
<div class="btn_box">
|
||||
<button @click="$navigate(`MerchantTradeDetail?id=${item.ordernum}&type=user`)">查看详情</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 商城/礼包订单 -->
|
||||
<template v-else>
|
||||
<div class="order_box">
|
||||
<span>订单编号:{{ item.ordernum }}</span>
|
||||
<img src="/img/copy_b.png" @click="$copyText(item.ordernum); $showSuccessToast('复制成功')" alt="">
|
||||
</div>
|
||||
<div class="goods_box">
|
||||
<img :src="$file(item.proimg)" alt="">
|
||||
<div class="goods_info">
|
||||
<div class="tit">{{ item.proname }}</div>
|
||||
<div class="spec">
|
||||
<span>{{ item.proskuname }}</span>
|
||||
<p>x{{ item.buynums }}</p>
|
||||
</div>
|
||||
<div class="concession">
|
||||
<span>¥{{ item.proskusaleprice?.toFixed(2) }}</span>
|
||||
<p v-if="item.discountratio">{{ item.discountratio }}%让利</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="price">
|
||||
实付:<span>¥<b>{{ item.realmoney?.toFixed(2) }}</b></span>
|
||||
</div>
|
||||
<div class="state_box">
|
||||
<b :class="'b' + item.state">{{ item.statename }}</b>
|
||||
<div class="btn_box">
|
||||
<button v-if="item.state === 0" @click="cancelTrade(item)">取消订单</button>
|
||||
<button @click="$navigate(`TradeDetail?ordernum=${item.ordernum}`)">查看详情</button>
|
||||
<button v-if="item.state === 3" @click="confirmReceipt(item)">确认收货</button>
|
||||
<button v-if="item.state === 0" @click="$navigate(`Pay?ordernum=${item.ordernum}`)">立即支付</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</BaseList>
|
||||
@ -100,156 +67,155 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'TradeList',
|
||||
|
||||
data() {
|
||||
return {
|
||||
activeTab: '',
|
||||
TradeArea: 0,
|
||||
_initialized: false,
|
||||
TradeArea: this.$route.query.TradeArea || 0,
|
||||
activeTab: this.$route.query.state || '',
|
||||
_searchParams: {
|
||||
ordernum: '',
|
||||
state: '',
|
||||
},
|
||||
tradeStates: [
|
||||
{
|
||||
"value": 0,
|
||||
"label": "待付款"
|
||||
},
|
||||
{
|
||||
"value": 1,
|
||||
"label": "待发货"
|
||||
},
|
||||
{
|
||||
"value": 3,
|
||||
"label": "待收货"
|
||||
},
|
||||
{
|
||||
"value": 4,
|
||||
"label": "已完成"
|
||||
}
|
||||
],
|
||||
mallList: [
|
||||
{ value: 0, label: '全部订单' },
|
||||
{
|
||||
"value": 1,
|
||||
"label": "礼包订单"
|
||||
},
|
||||
{
|
||||
"value": 3,
|
||||
"label": "商城订单"
|
||||
},
|
||||
{
|
||||
"value": 4,
|
||||
"label": "买单订单"
|
||||
}
|
||||
],
|
||||
_initializing: true,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
Promise.all([
|
||||
this.$get('/v1/client/FOrdersClient/orderstate'),
|
||||
this.$get('/v1/client/EProsClient/mallstate')
|
||||
]).then(([stateRes, areaRes]) => {
|
||||
this.tradeStates = stateRes.data;
|
||||
this.mallList = [{ value: 0, label: '全部订单' }, ...(areaRes.data || [])];
|
||||
// 先标记跳过,等 watch 触发完再刷新
|
||||
if (this.$refs.baseList) {
|
||||
this.$refs.baseList._skipWatch = true
|
||||
}
|
||||
const areaFromRoute = this.$route.query.TradeArea;
|
||||
if (areaFromRoute !== undefined && areaFromRoute !== '') {
|
||||
this.TradeArea = Number(areaFromRoute) || 0;
|
||||
} else {
|
||||
this.TradeArea = 0;
|
||||
}
|
||||
const stateFromRoute = this.$route.query.state;
|
||||
if (stateFromRoute !== undefined && stateFromRoute !== '') {
|
||||
this.activeTab = String(stateFromRoute);
|
||||
this._searchParams.state = stateFromRoute;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.baseList) {
|
||||
this.$refs.baseList._skipWatch = false
|
||||
this.$refs.baseList.refresh()
|
||||
}
|
||||
})
|
||||
}).catch((err) => {
|
||||
this.$showFailToast(err.message || '加载失败');
|
||||
});
|
||||
},
|
||||
|
||||
computed: {
|
||||
parseData() {
|
||||
return res => res.data.items;
|
||||
},
|
||||
parseData2() {
|
||||
return res => res.data.items;
|
||||
return res => res.data.items
|
||||
},
|
||||
searchParams() {
|
||||
const params = {
|
||||
ordernum: this._searchParams.ordernum,
|
||||
state: this._searchParams.state,
|
||||
};
|
||||
if (this.TradeArea !== 0) {
|
||||
params.mallstate = this.TradeArea;
|
||||
state: this._searchParams.state === '' ? '' : Number(this._searchParams.state),
|
||||
}
|
||||
return params;
|
||||
if (this.TradeArea !== 0) {
|
||||
params.mallstate = this.TradeArea
|
||||
}
|
||||
return params
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
watch: {
|
||||
'$route.query.TradeArea': {
|
||||
handler(val) {
|
||||
this.TradeArea = val !== undefined ? Number(val) : 0
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
'$route.query.state': {
|
||||
handler(val) {
|
||||
this.activeTab = val || ''
|
||||
this._searchParams.state = val || ''
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// TradeArea(val) {
|
||||
// this._searchParams.state = '';
|
||||
// this.activeTab = '';
|
||||
// },
|
||||
'$route.query.state': {
|
||||
handler(newVal) {
|
||||
if (newVal !== undefined && newVal !== '') {
|
||||
this.activeTab = String(newVal);
|
||||
// this.getTradeStates();
|
||||
} else {
|
||||
this.activeTab = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
'$route.query.TradeArea': {
|
||||
handler(newVal) {
|
||||
if (newVal !== undefined && newVal !== '') {
|
||||
this.TradeArea = Number(newVal) || 0;
|
||||
} else {
|
||||
this.TradeArea = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.push('/My')
|
||||
},
|
||||
// 加载订单状态和类型列表
|
||||
// async loadFilterOptions() {
|
||||
// try {
|
||||
// const [stateRes, areaRes] = await Promise.all([
|
||||
// this.$get('/v1/client/FOrdersClient/orderstate'),
|
||||
// this.$get('/v1/client/EProsClient/mallstate'),
|
||||
// ])
|
||||
// this.tradeStates = stateRes.data || []
|
||||
// this.mallList = [{ value: 0, label: '全部订单' }, ...(areaRes.data || [])]
|
||||
// this._initializing = false
|
||||
// } catch (err) {
|
||||
// this.$showFailToast(err.message || '加载失败')
|
||||
// }
|
||||
// },
|
||||
|
||||
// Tab 切换 - 订单状态
|
||||
onTabChange(name) {
|
||||
this._searchParams.state = name;
|
||||
this.$refs.baseList?.refresh();
|
||||
this._searchParams.state = name
|
||||
// this.$refs.baseList?.refresh()
|
||||
},
|
||||
changeMall(name) {
|
||||
if (this.TradeArea !== name) {
|
||||
this.TradeArea = Number(name) || 0;
|
||||
}
|
||||
|
||||
// Tab 切换 - 订单类型
|
||||
changeMall(val) {
|
||||
this.TradeArea = val
|
||||
this._searchParams.state = ''
|
||||
this.activeTab = ''
|
||||
// 不需要手动 refresh,BaseList 的 watch params 会自动触发
|
||||
},
|
||||
|
||||
// 搜索 & 清除
|
||||
onSearch() {
|
||||
this.$refs.baseList?.refresh();
|
||||
this.$refs.baseList?.refresh()
|
||||
},
|
||||
onClear() {
|
||||
this._searchParams.ordernum = '';
|
||||
this.$refs.baseList?.refresh();
|
||||
},
|
||||
getTradeAreas() {
|
||||
this.$get('/v1/client/EProsClient/mallstate').then(res => {
|
||||
this.mallList = [{ value: 0, label: '全部订单' }, ...(res.data || [])];
|
||||
}).catch((err) => {
|
||||
this.$showFailToast(err.message || '获取订单类型失败');
|
||||
});
|
||||
},
|
||||
getTradeStates() {
|
||||
this.$get('/v1/client/FOrdersClient/orderstate').then(res => {
|
||||
this.tradeStates = res.data;
|
||||
}).catch((err) => {
|
||||
this.$showFailToast(err.message || '获取订单状态失败');
|
||||
});
|
||||
},
|
||||
onRefresh() {
|
||||
this._searchParams.ordernum = ''
|
||||
this.$refs.baseList?.refresh()
|
||||
},
|
||||
|
||||
// 确认收货
|
||||
confirmReceipt(item) {
|
||||
this.$showConfirmDialog({
|
||||
title: "是否确认收货",
|
||||
}).then(() => {
|
||||
this.$put(`/v1/client/FOrdersClient/${item.ordernum}/receipt`).then(() => {
|
||||
this.$showSuccessToast('确认收货成功');
|
||||
this.$refs.baseList?.refresh();
|
||||
}).catch(err => {
|
||||
this.$showFailToast(err.message || '操作失败');
|
||||
});
|
||||
}).catch(() => { });
|
||||
this.$showConfirmDialog({ title: '是否确认收货' })
|
||||
.then(() => this.$put(`/v1/client/FOrdersClient/${item.ordernum}/receipt`))
|
||||
.then(() => {
|
||||
this.$showSuccessToast('确认收货成功')
|
||||
this.$refs.baseList?.refresh()
|
||||
})
|
||||
.catch(err => this.$showFailToast(err.message || '操作失败'))
|
||||
},
|
||||
|
||||
// 取消订单
|
||||
cancelTrade(item) {
|
||||
this.$showConfirmDialog({
|
||||
title: "是否确认取消订单",
|
||||
}).then(() => {
|
||||
this.$put(`/v1/client/FOrdersClient/${item.ordernum}/cancel`).then(() => {
|
||||
this.$showSuccessToast('取消订单成功');
|
||||
this.$refs.baseList?.refresh();
|
||||
}).catch(err => {
|
||||
this.$showFailToast(err.message || '取消失败');
|
||||
});
|
||||
}).catch(() => { });
|
||||
this.$showConfirmDialog({ title: '是否确认取消订单' })
|
||||
.then(() => this.$put(`/v1/client/FOrdersClient/${item.ordernum}/cancel`))
|
||||
.then(() => {
|
||||
this.$showSuccessToast('取消订单成功')
|
||||
this.$refs.baseList?.refresh()
|
||||
})
|
||||
.catch(err => this.$showFailToast(err.message || '取消失败'))
|
||||
},
|
||||
}
|
||||
|
||||
back() {
|
||||
this.$navigate('/My');
|
||||
},
|
||||
|
||||
onRefresh() { },
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -68,35 +68,39 @@
|
||||
</div>
|
||||
<div class="c">
|
||||
<van-badge :dot="data.ordercountdaifukuan > 0" :offset="[3, -3]">
|
||||
<div class="st_box" @click="$navigate(`TradeList?TradeArea=3&state=0`)">
|
||||
<div class="st_box" @click="$navigate(`/TradeList?state=0`)">
|
||||
<img src="/img/my_o1.png">
|
||||
<p>待付款</p>
|
||||
</div>
|
||||
</van-badge>
|
||||
<van-badge :dot="data.ordercountdaifahuo > 0" :offset="[3, -3]">
|
||||
<div class="st_box" @click="$navigate(`TradeList?TradeArea=3&state=1`)">
|
||||
<div class="st_box" @click="$navigate(`/TradeList?state=1`)">
|
||||
<img src="/img/my_o2.png">
|
||||
<p>待发货</p>
|
||||
</div>
|
||||
</van-badge>
|
||||
<van-badge :dot="data.ordercountdaishouhuo > 0" :offset="[3, -3]">
|
||||
<div class="st_box" @click="$navigate(`TradeList?TradeArea=3&state=3`)">
|
||||
<div class="st_box" @click="$navigate(`/TradeList?state=3`)">
|
||||
<img src="/img/my_o3.png">
|
||||
<p>待收货</p>
|
||||
</div>
|
||||
</van-badge>
|
||||
<div class="st_box" @click="$navigate(`TradeList?TradeArea=0`)">
|
||||
<div class="st_box" @click="$navigate(`/TradeList?state=4`)">
|
||||
<img src="/img/my_o4.png">
|
||||
<p>全部订单</p>
|
||||
<p>已完成</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fast_to">
|
||||
<img src="/img/my_f1.jpg" @click="toInvite()" alt="">
|
||||
<img src="/img/my_f2.jpg" @click="$navigate('Team')" alt="">
|
||||
<img src="/img/my_f3.jpg" @click="$navigate('Allow')" alt="">
|
||||
<img src="/img/my_f4.jpg" @click="$navigate('Certificate')" alt="">
|
||||
<div>
|
||||
<img src="/img/my_f1.jpg" @click="toInvite()" alt="">
|
||||
<img src="/img/my_f2.jpg" @click="$navigate('Team')" alt="">
|
||||
</div>
|
||||
<div>
|
||||
<img src="/img/my_f3.jpg" @click="$navigate('Allow')" alt="">
|
||||
<img src="/img/my_f4.jpg" @click="$navigate('Certificate')" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="service_center">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user