This commit is contained in:
pikachu1995@126.com
2026-07-13 14:32:20 +08:00
151 changed files with 1618 additions and 1800 deletions

View File

@@ -23,10 +23,8 @@
"qs": "^6.9.4", "qs": "^6.9.4",
"sass": "^1.63.6", "sass": "^1.63.6",
"sass-loader": "^10.4.1", "sass-loader": "^10.4.1",
"swiper": "^5.4.5",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"vue": "^3.5.35", "vue": "^3.5.35",
"vue-awesome-swiper": "^4.1.1",
"vue-qr": "^5.0.3", "vue-qr": "^5.0.3",
"vue-router": "^4.6.4", "vue-router": "^4.6.4",
"vuex": "^4.1.0" "vuex": "^4.1.0"

View File

@@ -0,0 +1,29 @@
import back from "./back.png";
import carts from "./carts.png";
import collage from "./collage.png";
import feedback from "./feedback.png";
import notice from "./notice.png";
import notification from "./notification.png";
import shop from "./shop.png";
import story from "./story.png";
import support from "./support.png";
import user from "./user.png";
const iconMap = {
back,
carts,
collage,
feedback,
notice,
notification,
shop,
story,
support,
user,
};
export function getIconUrl(name) {
return iconMap[name] || "";
}
export default iconMap;

View File

@@ -44,6 +44,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import multipleMap from "@/components/map/multiple-map"; import multipleMap from "@/components/map/multiple-map";
import { import {
newMemberAddress, newMemberAddress,
@@ -96,7 +97,7 @@ export default {
editMemberAddress(params).then((res) => { editMemberAddress(params).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.$Message.success('编辑地址成功'); Message.success('编辑地址成功');
this.$emit('change', true); this.$emit('change', true);
this.hide(); this.hide();
} }
@@ -105,7 +106,7 @@ export default {
newMemberAddress(params).then((res) => { newMemberAddress(params).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.$Message.success('新增地址成功'); Message.success('新增地址成功');
this.$emit('change', true); this.$emit('change', true);
this.hide(); this.hide();
} }

View File

@@ -79,6 +79,7 @@
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import { Delete } from '@element-plus/icons-vue'; import { Delete } from '@element-plus/icons-vue';
import {cartGoodsAll, delCartGoods, addCartGoods, cartCount} from '@/api/cart.js' import {cartGoodsAll, delCartGoods, addCartGoods, cartCount} from '@/api/cart.js'
import { getOrderList } from '@/api/order'; import { getOrderList } from '@/api/order';
@@ -165,14 +166,14 @@ export default {
delGoods (id) { delGoods (id) {
delCartGoods({ skuIds: id }).then((res) => { delCartGoods({ skuIds: id }).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success('删除成功'); Message.success('删除成功');
this.getCartList(); this.getCartList();
cartCount().then(res => { cartCount().then(res => {
this.$store.commit('SET_CARTNUM', res.result) this.$store.commit('SET_CARTNUM', res.result)
this.Cookies.setItem('cartNum', res.result) this.Cookies.setItem('cartNum', res.result)
}) })
} else { } else {
this.$Message.error(res.message); Message.error(res.message);
} }
}); });
}, },
@@ -183,7 +184,7 @@ export default {
receive (item) { // 领取优惠券 receive (item) { // 领取优惠券
receiveCoupon(item.id).then(res => { receiveCoupon(item.id).then(res => {
if (res.success) { if (res.success) {
this.$Modal.confirm({ Modal.confirm({
title: '领取优惠券', title: '领取优惠券',
content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>', content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>',
okText: '我的优惠券', okText: '我的优惠券',
@@ -232,9 +233,9 @@ export default {
addCartGoods(params).then(res => { addCartGoods(params).then(res => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.$Message.success('商品已成功添加到购物车') Message.success('商品已成功添加到购物车')
} else { } else {
this.$Message.warning(res.message); Message.warning(res.message);
} }
}).catch(() => { this.loading = false }); }).catch(() => { this.loading = false });
}, },
@@ -280,7 +281,7 @@ export default {
cancelCollect (id) { // 取消商品收藏 cancelCollect (id) { // 取消商品收藏
cancelCollect('GOODS', id).then(res => { cancelCollect('GOODS', id).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('取消收藏成功') Message.success('取消收藏成功')
this.getCollectList(); this.getCollectList();
} }
}) })

View File

@@ -13,7 +13,7 @@
</div> </div>
</div> </div>
<el-drawer width="300" class="popup" :title="drawerData.title" :mask="resetConfig.mask" :closable="resetConfig.closable" <el-drawer width="300" class="popup" :title="drawerData.title" :modal="resetConfig.mask" :show-close="resetConfig.closable"
v-model="handleDrawer"> v-model="handleDrawer">
<drawerPage :title="drawerData.title" /> <drawerPage :title="drawerData.title" />
</el-drawer> </el-drawer>
@@ -21,6 +21,7 @@
</template> </template>
<script> <script>
import { Modal } from "@/utils/message";
import Storage from '@/plugins/storage.js'; import Storage from '@/plugins/storage.js';
import Configuration from './config'; import Configuration from './config';
import drawerPage from './Drawer' import drawerPage from './Drawer'
@@ -55,7 +56,7 @@ export default {
}, },
clickBar (val) { // tabbar点击操作 clickBar (val) { // tabbar点击操作
if (!this.userInfo) { if (!this.userInfo) {
this.$Modal.confirm({ Modal.confirm({
title: '请登录', title: '请登录',
content: '请登录后执行此操作', content: '请登录后执行此操作',
okText: '立即登录', okText: '立即登录',

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="shadow-box"> <div class="shadow-box">
<div class="shadow-item flex flex-a-c flex-j-c" v-for="(item,index) in iconList" @click="handleClickIcon(item)" :key="index"> <div class="shadow-item flex flex-a-c flex-j-c" v-for="(item,index) in iconList" @click="handleClickIcon(item)" :key="index">
<img class="icon" :src="require(`@/assets/iconfont/${item.icon}.png`)"> <img class="icon" :src="getIconUrl(item.icon)">
<div class="shadow-label">{{item.label}}</div> <div class="shadow-label">{{item.label}}</div>
<div class="line" v-if="iconList.length-1 !=index"></div> <div class="line" v-if="iconList.length-1 !=index"></div>
</div> </div>
@@ -9,6 +9,8 @@
</template> </template>
<script> <script>
import { getIconUrl } from "@/assets/iconfont/iconMap";
export default { export default {
name: "fixed-index", name: "fixed-index",
data(){ data(){
@@ -58,6 +60,7 @@ export default {
}, },
methods:{ methods:{
getIconUrl,
scrollToTop() { scrollToTop() {
const c = document.documentElement.scrollTop || document.body.scrollTop; const c = document.documentElement.scrollTop || document.body.scrollTop;
if (c > 0) { if (c > 0) {

View File

@@ -69,12 +69,13 @@
</template> </template>
<script> <script>
import config from '@/config';
export default { export default {
name: "Footer", name: "Footer",
data() { data() {
return { return {
config:require('@/config'), config,
guideArr: [ guideArr: [
// 导航链接 // 导航链接
["购物指南", "购物流程", "会员介绍", "生活旅行", "常见问题"], ["购物指南", "购物流程", "会员介绍", "生活旅行", "常见问题"],

View File

@@ -120,7 +120,7 @@
</div> </div>
<!-- 优惠券展示 --> <!-- 优惠券展示 -->
<div class="item-price-coupon-row" v-if="promotionMap['COUPON'].length"> <div class="item-price-coupon-row" v-if="promotionMap['COUPON'].length">
<p class="Ellipsis"> <div class="Ellipsis">
<span class="item-price-title"> </span> <span class="item-price-title"> </span>
<span> <span>
<span <span
@@ -156,7 +156,7 @@
</span> </span>
</div> </div>
</div> </div>
</p> </div>
</div> </div>
<!-- 满减展示 --> <!-- 满减展示 -->
<div class="item-price-row" v-if="promotionMap['FULL_DISCOUNT']"> <div class="item-price-row" v-if="promotionMap['FULL_DISCOUNT']">
@@ -238,7 +238,7 @@
:precision="0" :precision="0"
@blur="changeCount" @blur="changeCount"
></el-input-number> ></el-input-number>
<span class="inventory">&nbsp&nbsp库存{{ skuDetail.quantity }}</span> <span class="inventory">&nbsp;&nbsp;库存{{ skuDetail.quantity }}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -293,7 +293,7 @@
>立即购买</el-button >立即购买</el-button
> >
<el-tooltip content="观看视频" v-if="skuDetail.goodsVideo"> <el-tooltip content="观看视频" v-if="skuDetail.goodsVideo">
<img class="view-video" @click="showGoodsVideo = true" :src="require('@/assets/iconfont/play.svg')" alt=""> <img class="view-video" @click="showGoodsVideo = true" :src="playIcon" alt="">
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
@@ -308,6 +308,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { StarFilled } from '@element-plus/icons-vue'; import { StarFilled } from '@element-plus/icons-vue';
import Promotion from "./Promotion.vue"; import Promotion from "./Promotion.vue";
import DPlayer from "dplayer"; import DPlayer from "dplayer";
@@ -318,6 +319,7 @@ import {
cancelCollect, cancelCollect,
} from "@/api/member.js"; } from "@/api/member.js";
import { addCartGoods } from "@/api/cart.js"; import { addCartGoods } from "@/api/cart.js";
import playIcon from "@/assets/iconfont/play.svg";
export default { export default {
name: "ShowGoods", name: "ShowGoods",
@@ -348,6 +350,7 @@ export default {
}, },
data() { data() {
return { return {
playIcon,
showGoodsVideo:false, showGoodsVideo:false,
goodsVideo:"", goodsVideo:"",
wholesaleList: [], wholesaleList: [],
@@ -440,7 +443,7 @@ export default {
changeCount(val) { changeCount(val) {
if (this.wholesaleList && this.wholesaleList.length > 0) { if (this.wholesaleList && this.wholesaleList.length > 0) {
if (this.count <= this.wholesaleList[0].num) { if (this.count <= this.wholesaleList[0].num) {
this.$Message.warning("批发商品购买数量不能小于起批数量"); Message.warning("批发商品购买数量不能小于起批数量");
this.count = this.wholesaleList[0].num; this.count = this.wholesaleList[0].num;
} }
} }
@@ -480,10 +483,16 @@ export default {
if (res.success) { if (res.success) {
this.$router.push({ this.$router.push({
path: "/shoppingCart", path: "/shoppingCart",
query: { detail: this.skuDetail, count: this.count }, query: {
skuId: this.skuDetail.id,
goodsId: this.skuDetail.goodsId,
thumbnail: this.skuDetail.thumbnail,
goodsName: this.skuDetail.goodsName,
count: this.count,
},
}); });
} else { } else {
this.$Message.warning(res.message); Message.warning(res.message);
} }
}) })
.catch(() => { .catch(() => {
@@ -511,7 +520,7 @@ export default {
query: { way: params.cartType }, query: { way: params.cartType },
}); });
} else { } else {
this.$Message.warning(res.message); Message.warning(res.message);
} }
}) })
.catch(() => { .catch(() => {
@@ -523,14 +532,14 @@ export default {
if (this.isCollected) { if (this.isCollected) {
let cancel = await cancelCollect("GOODS", this.skuDetail.id); let cancel = await cancelCollect("GOODS", this.skuDetail.id);
if (cancel.success) { if (cancel.success) {
this.$Message.success("取消收藏成功"); Message.success("取消收藏成功");
this.isCollected = false; this.isCollected = false;
} }
} else { } else {
let collect = await collectGoods("GOODS", this.skuDetail.id); let collect = await collectGoods("GOODS", this.skuDetail.id);
if (collect.code === 200) { if (collect.code === 200) {
this.isCollected = true; this.isCollected = true;
this.$Message.success("收藏商品成功,可以前往个人中心我的收藏查看"); Message.success("收藏商品成功,可以前往个人中心我的收藏查看");
} }
} }
}, },
@@ -586,9 +595,9 @@ export default {
// 领取优惠券 // 领取优惠券
receiveCoupon(id).then((res) => { receiveCoupon(id).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("优惠券领取成功"); Message.success("优惠券领取成功");
} else { } else {
this.$Message.warning(res.message); Message.warning(res.message);
} }
}); });
}, },

View File

@@ -85,10 +85,10 @@
</div> </div>
</div> </div>
<div class="remarks-page"> <div class="remarks-page">
<el-pagination :total="commentTotal" small <el-pagination v-model:current-page="commentParams.pageNumber" v-model:page-size="commentParams.pageSize"
:total="commentTotal" small
@current-change="changePageNum" @current-change="changePageNum"
@size-change="changePageSize" @size-change="changePageSize"
:page-size="commentParams.pageSize"
layout="prev, pager, next"></el-pagination> layout="prev, pager, next"></el-pagination>
</div> </div>
</div> </div>
@@ -368,7 +368,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 0 30px; padding: 0 30px;
min-height: 300px; min-height: 300px;
:deep img{ :deep(img){
margin:0 auto; margin:0 auto;
} }
} }

View File

@@ -91,11 +91,12 @@
</template> </template>
<script> <script>
import { Modal } from "@/utils/message";
import { ShoppingCart } from '@element-plus/icons-vue'; import { ShoppingCart } from '@element-plus/icons-vue';
import storage from '@/plugins/storage.js'; import storage from '@/plugins/storage.js';
import {cartGoodsAll} from '@/api/cart.js'; import {cartGoodsAll} from '@/api/cart.js';
import {logout} from '@/api/account.js'; import {logout} from '@/api/account.js';
import config from '@/config';
export default { export default {
components: { ShoppingCart }, components: { ShoppingCart },
@@ -108,7 +109,7 @@ export default {
data() { data() {
return { return {
config: require('@/config'), config,
userInfo: {}, // 用户信息 userInfo: {}, // 用户信息
shoppingCart: [], // 购物车 shoppingCart: [], // 购物车
cartLoading: false, cartLoading: false,
@@ -150,7 +151,7 @@ export default {
if (this.userInfo.username) { if (this.userInfo.username) {
this.$router.push({path: path}); this.$router.push({path: path});
} else { } else {
this.$Modal.confirm({ Modal.confirm({
title: '请登录', title: '请登录',
content: '请登录后执行此操作', content: '请登录后执行此操作',
okText: '立即登录', okText: '立即登录',

View File

@@ -49,8 +49,7 @@
<div <div
class="discountAdvert" class="discountAdvert"
:style="{ :style="{
backgroundImage: backgroundImage: 'url(' + decorateImg + ')',
'url(' + require('@/assets/images/decorate.png') + ')',
}" }"
> >
<div> <div>
@@ -153,7 +152,7 @@ import goodsAndType from "./modelList/goodsAndType.vue";
import onlyGoodsModel from "./modelList/onlyGoodsModel.vue"; import onlyGoodsModel from "./modelList/onlyGoodsModel.vue";
import mixModel from "./modelList/mixModel.vue"; import mixModel from "./modelList/mixModel.vue";
import forYour from "./modelList/forYour.vue"; import forYour from "./modelList/forYour.vue";
import decorateImg from "@/assets/images/decorate.png";
export default { export default {
name: "modelFormItem", name: "modelFormItem",
@@ -175,6 +174,7 @@ export default {
}, },
data() { data() {
return { return {
decorateImg,
showModal: false, // 控制模态框显隐 showModal: false, // 控制模态框显隐
selected: {}, // 已选数据 selected: {}, // 已选数据
}; };

View File

@@ -51,18 +51,14 @@
</div> --> </div> -->
</div> </div>
<div v-else class="flex flex-a-c "> <div v-else class="flex flex-a-c ">
<div class="btns" @click="$router.push('login')" shape="circle" <div class="btns" @click="$router.push('login')">登录</div>
>登录</div <div class="btns sign-up" @click="$router.push('signUp')">注册</div>
>
<div class="btns sign-up" @click="$router.push('signUp')" shape="circle"
>注册</div
>
</div> </div>
<div class="gray-line"></div> <div class="gray-line"></div>
<div class="icon-list flex flex-j-sb" > <div class="icon-list flex flex-j-sb" >
<div class="icon-item" @click="entryControl(item)" :key="index" v-for="(item, index) in entranceList"> <div class="icon-item" @click="entryControl(item)" :key="index" v-for="(item, index) in entranceList">
<img class="icon" :src="require(`@/assets/iconfont/${item.icon}.png`)"> <img class="icon" :src="getIconUrl(item.icon)">
<div> <div>
{{ item.label }} {{ item.label }}
</div> </div>
@@ -70,7 +66,7 @@
</div> </div>
<div class="icon-list flex flex-j-sb" > <div class="icon-list flex flex-j-sb" >
<div class="icon-item" :key="index" @click="entryControl(item)" v-for="(item, index) in appendList"> <div class="icon-item" :key="index" @click="entryControl(item)" v-for="(item, index) in appendList">
<img class="icon" :src="require(`@/assets/iconfont/${item.icon}.png`)"> <img class="icon" :src="getIconUrl(item.icon)">
<div> <div>
{{ item.label }} {{ item.label }}
</div> </div>
@@ -89,6 +85,9 @@
<script> <script>
import storage from "@/plugins/storage"; import storage from "@/plugins/storage";
import config from "@/config";
import defaultAvatar from "@/assets/images/default.png";
import { getIconUrl } from "@/assets/iconfont/iconMap";
export default { export default {
name: "modelCarousel", name: "modelCarousel",
props: ["data"], props: ["data"],
@@ -102,8 +101,8 @@ export default {
}, },
data() { data() {
return { return {
config: require("@/config"), config,
defaultAvatar: require("@/assets/images/default.png"), defaultAvatar,
userInfo: {}, // 用户信息 userInfo: {}, // 用户信息
entranceList: [ entranceList: [
{ {
@@ -170,6 +169,7 @@ export default {
}; };
}, },
methods: { methods: {
getIconUrl,
carouselItemKey(item, index) { carouselItemKey(item, index) {
return item?.img || item?.url || `slide-${index}`; return item?.img || item?.url || `slide-${index}`;
}, },

View File

@@ -34,10 +34,10 @@
<el-avatar v-else :size="80" class="mb_10"><el-icon><User /></el-icon></el-avatar> <el-avatar v-else :size="80" class="mb_10"><el-icon><User /></el-icon></el-avatar>
<div>Hi{{ $filters.secrecyMobile(userInfo.nickName || `欢迎来到${config.title}`) }}</div> <div>Hi{{ $filters.secrecyMobile(userInfo.nickName || `欢迎来到${config.title}`) }}</div>
<div v-if="userInfo.id"> <div v-if="userInfo.id">
<el-button type="danger" shape="circle">会员中心</el-button> <el-button type="danger">会员中心</el-button>
</div> </div>
<div v-else> <div v-else>
<el-button type="danger" shape="circle">请登录</el-button> <el-button type="danger">请登录</el-button>
</div> </div>
</div> </div>
<div class="shop-msg"> <div class="shop-msg">
@@ -60,13 +60,14 @@
import {articleList} from '@/api/common.js' import {articleList} from '@/api/common.js'
import storage from '@/plugins/storage'; import storage from '@/plugins/storage';
import { User } from '@element-plus/icons-vue'; import { User } from '@element-plus/icons-vue';
import config from '@/config';
export default { export default {
components: { User }, components: { User },
name: 'modelCarousel2', name: 'modelCarousel2',
props: ['data'], props: ['data'],
data () { data () {
return { return {
config:require('@/config'), config,
userInfo: {}, // 用户信息 userInfo: {}, // 用户信息
articleList: [], // 常见问题 articleList: [], // 常见问题
params: { // 请求常见问题参数 params: { // 请求常见问题参数

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="invoice-modal"> <div class="invoice-modal">
<el-dialog v-model="invoiceAvailable" width="640" footer-hide> <el-dialog v-model="invoiceAvailable" width="640">
<template #header><p> <template #header><p>
<span>发票信息</span> <span>发票信息</span>
</p></template> </p></template>

View File

@@ -19,10 +19,11 @@
</div> </div>
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import AMapLoader from "@amap/amap-jsapi-loader"; import AMapLoader from "@amap/amap-jsapi-loader";
import { handleRegion } from "@/api/address.js"; import { handleRegion } from "@/api/address.js";
import config from "@/config/index";
const config = require('@/config/index')
export default { export default {
name: "map", name: "map",
data() { data() {
@@ -62,7 +63,7 @@ export default {
} }
}); });
} else { } else {
this.$Message.error('未获取到坐标信息请查看高德API配置是否正确') Message.error('未获取到坐标信息请查看高德API配置是否正确')
} }
}, },
@@ -133,7 +134,7 @@ export default {
selectAddr(location) { selectAddr(location) {
// 选择坐标 // 选择坐标
if (!location) { if (!location) {
this.$Message.warning("请选择正确点位"); Message.warning("请选择正确点位");
return false; return false;
} }
const lnglat = [location.lng, location.lat]; const lnglat = [location.lng, location.lat];

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-dialog width="800" footer-hide v-model="enableMap"> <el-dialog width="800" v-model="enableMap">
<el-radio-group @change="changeMap" v-model="mapDefault" type="button"> <el-radio-group @change="changeMap" v-model="mapDefault" type="button">
<el-radio label="select">级联选择</el-radio> <el-radio label="select">级联选择</el-radio>
<el-radio label="map" v-if="aMapSwitch">高德地图</el-radio> <el-radio label="map" v-if="aMapSwitch">高德地图</el-radio>
@@ -27,6 +27,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { aMapSwitch } from '@/config/index' import { aMapSwitch } from '@/config/index'
import mapping from "@/components/map/index.vue"; import mapping from "@/components/map/index.vue";
import * as API_Setup from "@/api/common.js"; import * as API_Setup from "@/api/common.js";
@@ -101,7 +102,7 @@ export default {
// 选择完成 // 选择完成
finished() { finished() {
if(!this.chiosend[0]){ if(!this.chiosend[0]){
this.$Message.error("请选择地址") Message.error("请选择地址")
return return
} }
const params = this.chiosend.filter((item) => item!=="" && item.value !== ""); const params = this.chiosend.filter((item) => item!=="" && item.value !== "");

View File

@@ -3,6 +3,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { getIMDetail } from "@/api/common"; import { getIMDetail } from "@/api/common";
import Storage from "@/plugins/storage"; import Storage from "@/plugins/storage";
import { getMemberMsg } from "@/api/login"; import { getMemberMsg } from "@/api/login";
@@ -34,7 +35,7 @@ export default {
} }
} else { } else {
this.$Message.error("请登录后再联系客服"); Message.error("请登录后再联系客服");
return; return;
} }
}, },

View File

@@ -167,7 +167,7 @@ export default {
return; return;
} }
this.cateList = JSON.parse(localStorage.getItem("category")); this.cateList = JSON.parse(localStorage.getItem("category"));
// this.$Message.info(cateList) // Message.info(cateList)
} }
}, },
getCate() { getCate() {

View File

@@ -15,6 +15,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { Refresh, ArrowRight } from '@element-plus/icons-vue'; import { Refresh, ArrowRight } from '@element-plus/icons-vue';
import { getVerifyImg, postVerifyImg } from './verify.js'; import { getVerifyImg, postVerifyImg } from './verify.js';
export default { export default {
@@ -110,7 +111,7 @@ export default {
this.data = res.result; this.data = res.result;
this.show = true; this.show = true;
} else { } else {
this.$Message.warning('请求失败请重试!') Message.warning('请求失败请重试!')
} }
}); });
} }

View File

@@ -12,8 +12,9 @@ import * as filters from "./plugins/filters";
import storage from "@/plugins/storage"; import storage from "@/plugins/storage";
import { fetchAndApplyTheme } from "@/utils/theme"; import { fetchAndApplyTheme } from "@/utils/theme";
import { getThemeSetting } from "@/api/common.js"; import { getThemeSetting } from "@/api/common.js";
import config from "@/config";
const { aMapSecurityJsCode, inputMaxLength } = require("@/config"); const { aMapSecurityJsCode, inputMaxLength } = config;
if (aMapSecurityJsCode) { if (aMapSecurityJsCode) {
window._AMapSecurityConfig = { window._AMapSecurityConfig = {

View File

@@ -242,6 +242,7 @@
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import Promotion from "@/components/goodsDetail/Promotion"; import Promotion from "@/components/goodsDetail/Promotion";
import Search from "@/components/Search"; import Search from "@/components/Search";
import * as APICart from "@/api/cart"; import * as APICart from "@/api/cart";
@@ -289,13 +290,13 @@ export default {
}, },
// 收藏商品 // 收藏商品
collectGoods(id) { collectGoods(id) {
this.$Modal.confirm({ Modal.confirm({
title: "收藏", title: "收藏",
content: "商品收藏后可在个人中心我的收藏查看", content: "商品收藏后可在个人中心我的收藏查看",
onOk: () => { onOk: () => {
APIMember.collectGoods("GOODS", id).then((res) => { APIMember.collectGoods("GOODS", id).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("收藏商品成功"); Message.success("收藏商品成功");
this.getCartList(); this.getCartList();
} }
}); });
@@ -318,16 +319,16 @@ export default {
} else { } else {
idArr.push(id); idArr.push(id);
} }
this.$Modal.confirm({ Modal.confirm({
title: "删除", title: "删除",
content: "确定要删除该商品吗?", content: "确定要删除该商品吗?",
onOk: () => { onOk: () => {
APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => { APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("删除成功"); Message.success("删除成功");
this.getCartList(); this.getCartList();
} else { } else {
this.$Message.error(res.message); Message.error(res.message);
} }
}); });
}, },
@@ -335,16 +336,16 @@ export default {
}, },
// 清空购物车 // 清空购物车
clearCart() { clearCart() {
this.$Modal.confirm({ Modal.confirm({
title: "提示", title: "提示",
content: "确定要清空购物车吗?清空后不可恢复", content: "确定要清空购物车吗?清空后不可恢复",
onOk: () => { onOk: () => {
APICart.clearCart().then((res) => { APICart.clearCart().then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("清空购物车成功"); Message.success("清空购物车成功");
this.getCartList(); this.getCartList();
} else { } else {
this.$Message.error(res.message); Message.error(res.message);
} }
}); });
}, },
@@ -355,7 +356,7 @@ export default {
if (this.checkedNum) { if (this.checkedNum) {
this.$router.push({ path: "/pay", query: { way: "CART" } }); this.$router.push({ path: "/pay", query: { way: "CART" } });
} else { } else {
this.$Message.warning("请至少选择一件商品"); Message.warning("请至少选择一件商品");
} }
}, },
// 展示优惠券 // 展示优惠券
@@ -393,9 +394,9 @@ export default {
let res = await APIMember.receiveCoupon(item.id); let res = await APIMember.receiveCoupon(item.id);
if (res.success) { if (res.success) {
item["disabled"] = true; item["disabled"] = true;
this.$Message.success("领取成功"); Message.success("领取成功");
} else { } else {
this.$Message.error(res.message); Message.error(res.message);
} }
}, },
// 购物车列表 // 购物车列表

View File

@@ -43,11 +43,12 @@
<i class="circle-bottom"></i> <i class="circle-bottom"></i>
</li> </li>
</ul> </ul>
<el-pagination :total="total" <el-pagination v-model:current-page="params.pageNumber"
v-model:page-size="params.pageSize"
:total="total"
@current-change="changePageNum" @current-change="changePageNum"
class="pageration" class="pageration"
@size-change="changePageSize" @size-change="changePageSize"
:page-size="params.pageSize"
layout="total, sizes, prev, pager, next"></el-pagination> layout="total, sizes, prev, pager, next"></el-pagination>
</div> </div>
</div> </div>
@@ -55,6 +56,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Modal } from "@/utils/message";
import { couponList, receiveCoupon } from "@/api/member.js"; import { couponList, receiveCoupon } from "@/api/member.js";
export default { export default {
data() { data() {
@@ -116,7 +118,7 @@ export default {
receiveCoupon(item.id) receiveCoupon(item.id)
.then((res) => { .then((res) => {
if (!res || !res.success) return; if (!res || !res.success) return;
this.$Modal.confirm({ Modal.confirm({
title: "领取优惠券", title: "领取优惠券",
content: "优惠券领取成功,可到我的优惠券页面查看", content: "优惠券领取成功,可到我的优惠券页面查看",
okText: "我的优惠券", okText: "我的优惠券",

View File

@@ -105,18 +105,20 @@
<script> <script>
import { Message } from "@/utils/message";
import * as RegExp from '@/plugins/RegExp.js'; import * as RegExp from '@/plugins/RegExp.js';
import { md5 } from '@/plugins/md5.js'; import { md5 } from '@/plugins/md5.js';
import * as apiLogin from '@/api/login.js'; import * as apiLogin from '@/api/login.js';
import { sendSms } from '@/api/common.js'; import { sendSms } from '@/api/common.js';
import Verify from '@/components/verify'; import Verify from '@/components/verify';
import { Lock, Iphone, Document } from '@element-plus/icons-vue'; import { Lock, Iphone, Document } from '@element-plus/icons-vue';
import config from '@/config';
export default { export default {
name: 'ForgetPassword', name: 'ForgetPassword',
components: { Verify, Lock, Iphone, Document }, components: { Verify, Lock, Iphone, Document },
data () { data () {
return { return {
config:require('@/config'), config,
loading: false, // 加载状态 loading: false, // 加载状态
loading1: false, // 第二步加载状态 loading1: false, // 第二步加载状态
formFirst: { // 手机验证码表单 formFirst: { // 手机验证码表单
@@ -163,10 +165,10 @@ export default {
apiLogin.validateCode(data).then((res) => { apiLogin.validateCode(data).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
// this.$Message.success(''); // Message.success('');
this.step = 1; this.step = 1;
} else { } else {
this.$Message.warning(res.message); Message.warning(res.message);
} }
}).catch(() => { this.loading = false; }); }).catch(() => { this.loading = false; });
} else {} } else {}
@@ -177,7 +179,7 @@ export default {
if (valid) { if (valid) {
let params = JSON.parse(JSON.stringify(this.form)); let params = JSON.parse(JSON.stringify(this.form));
if (params.password !== params.oncePasd) { if (params.password !== params.oncePasd) {
this.$Message.warning('两次输入密码不一致'); Message.warning('两次输入密码不一致');
return; return;
}; };
params.mobile = this.formFirst.mobile; params.mobile = this.formFirst.mobile;
@@ -189,7 +191,7 @@ export default {
this.loading1 = false; this.loading1 = false;
console.log(res); console.log(res);
if (res.success) { if (res.success) {
this.$Message.success('修改密码成功'); Message.success('修改密码成功');
this.$router.push('login'); this.$router.push('login');
} }
}).catch(() => { this.loading = false; }); }).catch(() => { this.loading = false; });
@@ -199,11 +201,11 @@ export default {
sendCode () { // 发送验证码 sendCode () { // 发送验证码
if (this.time === 60) { if (this.time === 60) {
if (this.formFirst.mobile === '') { if (this.formFirst.mobile === '') {
this.$Message.warning('请先填写手机号'); Message.warning('请先填写手机号');
return; return;
} }
if (!this.verifyStatus) { if (!this.verifyStatus) {
this.$Message.warning('请先完成安全验证'); Message.warning('请先完成安全验证');
return; return;
} }
let params = { let params = {
@@ -212,7 +214,7 @@ export default {
}; };
sendSms(params).then(res => { sendSms(params).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('验证码发送成功'); Message.success('验证码发送成功');
let that = this; let that = this;
this.interval = setInterval(() => { this.interval = setInterval(() => {
that.time--; that.time--;
@@ -226,7 +228,7 @@ export default {
} }
}, 1000); }, 1000);
} else { } else {
this.$Message.warning(res.message); Message.warning(res.message);
} }
}); });
} }

View File

@@ -43,6 +43,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { StarFilled } from '@element-plus/icons-vue'; import { StarFilled } from '@element-plus/icons-vue';
import Search from "@/components/Search"; import Search from "@/components/Search";
@@ -154,7 +155,7 @@ export default {
}); });
} }
} else { } else {
this.$Message.error(res.message); Message.error(res.message);
this.isLoading = false this.isLoading = false
} }
}) })
@@ -182,21 +183,21 @@ export default {
return; return;
} }
if (!this.Cookies.getItem("userInfo")) { if (!this.Cookies.getItem("userInfo")) {
this.$Message.warning("请先登录"); Message.warning("请先登录");
this.$router.push("/login"); this.$router.push("/login");
return; return;
} }
if (this.storeCollected) { if (this.storeCollected) {
let cancel = await cancelStoreCollect("STORE", storeId); let cancel = await cancelStoreCollect("STORE", storeId);
if (cancel.success) { if (cancel.success) {
this.$Message.success("已取消收藏"); Message.success("已取消收藏");
this.storeCollected = false; this.storeCollected = false;
} }
} else { } else {
let collect = await collectStore("STORE", storeId); let collect = await collectStore("STORE", storeId);
if (collect.code === 200) { if (collect.code === 200) {
this.storeCollected = true; this.storeCollected = true;
this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看"); Message.success("收藏店铺成功,可以前往个人中心我的收藏查看");
} }
} }
}, },

View File

@@ -99,10 +99,11 @@
</div> </div>
<div class="goods-page"> <div class="goods-page">
<el-pagination <el-pagination
v-model:current-page="params.pageNumber"
v-model:page-size="params.pageSize"
@current-change="changePageNum" @current-change="changePageNum"
@size-change="changePageSize" @size-change="changePageSize"
:total="total" :total="total"
:page-size="params.pageSize"
layout="total, prev, pager, next, sizes" layout="total, prev, pager, next, sizes"
></el-pagination> ></el-pagination>
</div> </div>
@@ -113,6 +114,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { ArrowDown, ArrowUp } from '@element-plus/icons-vue'; import { ArrowDown, ArrowUp } from '@element-plus/icons-vue';
import GoodsClassNav from "@/components/nav/GoodsClassNav"; import GoodsClassNav from "@/components/nav/GoodsClassNav";
import * as apiGoods from "@/api/goods"; import * as apiGoods from "@/api/goods";
@@ -201,7 +203,7 @@ export default {
}, },
goShopPage(id) { goShopPage(id) {
if (!id) { if (!id) {
this.$Message.warning("店铺信息不存在"); Message.warning("店铺信息不存在");
return; return;
} }
const routeUrl = this.$router.resolve({ const routeUrl = this.$router.resolve({

View File

@@ -154,6 +154,7 @@
<script> <script>
import { Message, Spin } from "@/utils/message";
import * as RegExp from "@/plugins/RegExp.js"; import * as RegExp from "@/plugins/RegExp.js";
import { md5 } from "@/plugins/md5.js"; import { md5 } from "@/plugins/md5.js";
import * as apiLogin from "@/api/login.js"; import * as apiLogin from "@/api/login.js";
@@ -163,6 +164,7 @@ import storage from "@/plugins/storage.js";
import verify from "@/components/verify"; import verify from "@/components/verify";
import vueQr from "vue-qr"; import vueQr from "vue-qr";
import { User, Lock, Document } from "@element-plus/icons-vue"; import { User, Lock, Document } from "@element-plus/icons-vue";
import config from "@/config";
export default { export default {
name: "Login", name: "Login",
@@ -182,7 +184,7 @@ export default {
scannerCodeLoginFLag: false, scannerCodeLoginFLag: false,
scannerCodeLoginStatus: 0, scannerCodeLoginStatus: 0,
qrCodeTimer:null, qrCodeTimer:null,
config: require('@/config'), config,
type: true, // true 账号登录 false 验证码登录 type: true, // true 账号登录 false 验证码登录
formData: { formData: {
// 登录表单 // 登录表单
@@ -239,7 +241,7 @@ export default {
apiLogin.smsLogin(data).then((res) => { apiLogin.smsLogin(data).then((res) => {
this.hideVerify(); this.hideVerify();
if (res.success) { if (res.success) {
this.$Message.success("登录成功"); Message.success("登录成功");
storage.setItem("accessToken", res.result.accessToken); storage.setItem("accessToken", res.result.accessToken);
storage.setItem("refreshToken", res.result.refreshToken); storage.setItem("refreshToken", res.result.refreshToken);
storage.setItem('getTimes',0) storage.setItem('getTimes',0)
@@ -258,7 +260,7 @@ export default {
} }
}); });
} else { } else {
this.$Message.error(res.message); Message.error(res.message);
} }
}); });
} }
@@ -269,11 +271,11 @@ export default {
sendCode() { sendCode() {
if (this.time === 60) { if (this.time === 60) {
if (this.formSms.mobile === "") { if (this.formSms.mobile === "") {
this.$Message.warning("请先填写手机号"); Message.warning("请先填写手机号");
return; return;
} }
if (!this.verifyStatus) { if (!this.verifyStatus) {
this.$Message.warning("请先完成安全验证"); Message.warning("请先完成安全验证");
return; return;
} }
let params = { let params = {
@@ -282,7 +284,7 @@ export default {
}; };
sendSms(params).then((res) => { sendSms(params).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("验证码发送成功"); Message.success("验证码发送成功");
let that = this; let that = this;
this.interval = setInterval(() => { this.interval = setInterval(() => {
that.time--; that.time--;
@@ -296,7 +298,7 @@ export default {
} }
}, 1000); }, 1000);
} else { } else {
this.$Message.warning(res.message); Message.warning(res.message);
} }
}); });
} }
@@ -310,19 +312,19 @@ export default {
let data = JSON.parse(JSON.stringify(this.formData)); let data = JSON.parse(JSON.stringify(this.formData));
data.password = md5(data.password); data.password = md5(data.password);
this.hideVerify(); this.hideVerify();
this.$Spin.show(); Spin.show();
apiLogin apiLogin
.login(data) .login(data)
.then((res) => { .then((res) => {
if (res.success) { if (res.success) {
this.loginSuccess(res.result.accessToken,res.result.refreshToken); this.loginSuccess(res.result.accessToken,res.result.refreshToken);
} else { } else {
this.$Spin.hide(); Spin.hide();
this.$Message.error(res.message); Message.error(res.message);
} }
}) })
.catch(() => { .catch(() => {
this.$Spin.hide(); Spin.hide();
}); });
} else { } else {
this.verifyStatus = true; this.verifyStatus = true;
@@ -340,11 +342,11 @@ export default {
webLogin(type); webLogin(type);
}, },
loginSuccess(accessToken,refreshToken){ loginSuccess(accessToken,refreshToken){
this.$Message.success("登录成功"); Message.success("登录成功");
storage.setItem("accessToken", accessToken); storage.setItem("accessToken", accessToken);
storage.setItem("refreshToken", refreshToken); storage.setItem("refreshToken", refreshToken);
apiLogin.getMemberMsg().then((res) => { apiLogin.getMemberMsg().then((res) => {
this.$Spin.hide(); Spin.hide();
if (res.success) { if (res.success) {
storage.setItem("userInfo", res.result); storage.setItem("userInfo", res.result);
let query = this.$route.query; let query = this.$route.query;

View File

@@ -100,7 +100,8 @@
</div> </div>
</div> </div>
<div class="goods-page"> <div class="goods-page">
<el-pagination :page-size="params.pageSize" <el-pagination v-model:current-page="params.pageNumber"
v-model:page-size="params.pageSize"
:total="total" :total="total"
@current-change="changePageNum" @current-change="changePageNum"
@size-change="changePageSize" @size-change="changePageSize"
@@ -116,6 +117,7 @@
<script> <script>
import { Message } from "@/utils/message";
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 { import {
@@ -247,7 +249,7 @@ export default {
getStoreMsg() { getStoreMsg() {
const storeId = this.$route.query.id; const storeId = this.$route.query.id;
if (!storeId) { if (!storeId) {
this.$Message.warning("店铺不存在"); Message.warning("店铺不存在");
return; return;
} }
getDetailById(storeId) getDetailById(storeId)
@@ -330,7 +332,7 @@ export default {
return; return;
} }
if (!this.Cookies.getItem("userInfo")) { if (!this.Cookies.getItem("userInfo")) {
this.$Message.warning("请先登录"); Message.warning("请先登录");
this.$router.push("/login"); this.$router.push("/login");
return; return;
} }
@@ -338,14 +340,14 @@ export default {
if (this.storeCollected) { if (this.storeCollected) {
const cancel = await cancelStoreCollect("STORE", storeId); const cancel = await cancelStoreCollect("STORE", storeId);
if (cancel.success) { if (cancel.success) {
this.$Message.success("已取消收藏"); Message.success("已取消收藏");
this.storeCollected = false; this.storeCollected = false;
} }
} else { } else {
const collect = await collectStore("STORE", storeId); const collect = await collectStore("STORE", storeId);
if (collect.success || collect.code === 200) { if (collect.success || collect.code === 200) {
this.storeCollected = true; this.storeCollected = true;
this.$Message.success( Message.success(
"收藏店铺成功,可以前往个人中心我的收藏查看" "收藏店铺成功,可以前往个人中心我的收藏查看"
); );
} }

View File

@@ -13,7 +13,7 @@
</div> </div>
<div class="add-info-box-row"> <div class="add-info-box-row">
<div class="add-info-img"> <div class="add-info-img">
<img :src="this.detail.thumbnail" alt=""> <img :src="detail.thumbnail" alt="">
</div> </div>
<div class="add-info-intro"> <div class="add-info-intro">
<p>{{detail.goodsName}}</p> <p>{{detail.goodsName}}</p>
@@ -24,7 +24,7 @@
<div class="car-btn-group"> <div class="car-btn-group">
<div></div> <div></div>
<div class="car-btn-row"> <div class="car-btn-row">
<router-link :to="`/goodsDetail?skuId=${detail.id}&goodsId=${detail.goodsId}`"> <router-link :to="{ path: '/goodsDetail', query: { skuId: detail.skuId, goodsId: detail.goodsId } }">
<button class="btn-car hover-pointer btn-car-to-detail">查看商品详情</button> <button class="btn-car hover-pointer btn-car-to-detail">查看商品详情</button>
</router-link> </router-link>
<router-link to="/cart"> <router-link to="/cart">
@@ -51,8 +51,13 @@ export default {
}; };
}, },
mounted () { mounted () {
let detail = this.$route.query.detail; const { skuId, goodsId, thumbnail, goodsName } = this.$route.query;
if (detail) this.detail = detail; this.detail = {
skuId,
goodsId,
thumbnail,
goodsName
};
} }
}; };
</script> </script>

View File

@@ -94,18 +94,20 @@
<script> <script>
import { Message } from "@/utils/message";
import * as RegExp from '@/plugins/RegExp.js'; import * as RegExp from '@/plugins/RegExp.js';
import { md5 } from '@/plugins/md5.js'; import { md5 } from '@/plugins/md5.js';
import * as apiLogin from '@/api/login.js'; import * as apiLogin from '@/api/login.js';
import { sendSms } from '@/api/common.js'; import { sendSms } from '@/api/common.js';
import Verify from '@/components/verify'; import Verify from '@/components/verify';
import { User, Lock, Iphone, Document } from '@element-plus/icons-vue'; import { User, Lock, Iphone, Document } from '@element-plus/icons-vue';
import config from '@/config';
export default { export default {
name: 'SignUp', name: 'SignUp',
components: { Verify, User, Lock, Iphone, Document }, components: { Verify, User, Lock, Iphone, Document },
data () { data () {
return { return {
config:require('@/config'), config,
year: new Date().getFullYear(), year: new Date().getFullYear(),
formRegist: { formRegist: {
// 注册表单 // 注册表单
@@ -152,10 +154,10 @@ export default {
data.password = md5(data.password); data.password = md5(data.password);
apiLogin.regist(data).then((res) => { apiLogin.regist(data).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success('注册成功!'); Message.success('注册成功!');
this.$router.push('login'); this.$router.push('login');
} else { } else {
this.$Message.warning(res.message || '注册失败'); Message.warning(res.message || '注册失败');
} }
}).catch(() => {}); }).catch(() => {});
}).catch(() => {}); }).catch(() => {});
@@ -164,11 +166,11 @@ export default {
sendCode () { sendCode () {
if (this.time === 60) { if (this.time === 60) {
if (this.formRegist.mobilePhone === '') { if (this.formRegist.mobilePhone === '') {
this.$Message.warning('请先填写手机号'); Message.warning('请先填写手机号');
return; return;
} }
if (!this.verifyStatus) { if (!this.verifyStatus) {
this.$Message.warning('请先完成安全验证'); Message.warning('请先完成安全验证');
return; return;
} }
let params = { let params = {
@@ -177,7 +179,7 @@ export default {
}; };
sendSms(params).then(res => { sendSms(params).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('验证码发送成功'); Message.success('验证码发送成功');
let that = this; let that = this;
this.interval = setInterval(() => { this.interval = setInterval(() => {
that.time--; that.time--;
@@ -191,7 +193,7 @@ export default {
} }
}, 1000); }, 1000);
} else { } else {
this.$Message.warning(res.message || '验证码发送失败'); Message.warning(res.message || '验证码发送失败');
} }
}).catch(() => {}); }).catch(() => {});
} }

View File

@@ -12,7 +12,7 @@
<script> <script>
import { articleDetail } from "@/api/common.js"; import { articleDetail } from "@/api/common.js";
const config = require("@/config/index"); import config from "@/config/index";
export default { export default {
data() { data() {
return { return {

View File

@@ -48,11 +48,7 @@
v-model="bindModalVisible" v-model="bindModalVisible"
title="绑定第三方账户" title="绑定第三方账户"
:close-on-click-modal="false" :close-on-click-modal="false"
:footer-hide="bindForm.type === 'WECHAT'" @closed="resetBindForm"
:ok-text="bindModalOkText"
:loading="bindSubmitLoading"
@ok="submitBind"
@cancel="resetBindForm"
> >
<el-form label-width="110px"> <el-form label-width="110px">
<el-form-item label="类型"> <el-form-item label="类型">
@@ -67,8 +63,8 @@
<div v-else class="wechatQrEmpty">二维码获取失败请刷新重试</div> <div v-else class="wechatQrEmpty">二维码获取失败请刷新重试</div>
</div> </div>
<div class="wechatQrActions"> <div class="wechatQrActions">
<el-button @click="fetchWechatQrCode">刷新二维码</el-button> <el-button :loading="qrCodeLoading" @click="fetchWechatQrCode">刷新二维码</el-button>
<el-button type="primary" @click="submitBind">我已完成绑定</el-button> <el-button type="primary" :loading="bindSubmitLoading" @click="submitBind">我已完成绑定</el-button>
</div> </div>
<div class="wechatQrTip">请使用微信扫码关注/授权完成后点击我已完成绑定检测绑定状态</div> <div class="wechatQrTip">请使用微信扫码关注/授权完成后点击我已完成绑定检测绑定状态</div>
</div> </div>
@@ -78,11 +74,19 @@
<el-input v-model="bindForm.unionID" placeholder="请输入 OpenID/UnionID" /> <el-input v-model="bindForm.unionID" placeholder="请输入 OpenID/UnionID" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<template v-if="bindForm.type !== 'WECHAT'" #footer>
<el-button @click="bindModalVisible = false">取消</el-button>
<el-button type="primary" :loading="bindSubmitLoading" @click="submitBind">
{{ bindModalOkText }}
</el-button>
</template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import { Key, Link } from '@element-plus/icons-vue'; import { Key, Link } from '@element-plus/icons-vue';
// import { getPwdStatus } from '@/api/account'; // import { getPwdStatus } from '@/api/account';
import storage from '@/plugins/storage' import storage from '@/plugins/storage'
@@ -186,7 +190,7 @@ export default {
const userId = userInfo && userInfo.id ? String(userInfo.id) : '' const userId = userInfo && userInfo.id ? String(userInfo.id) : ''
if (!userId) { if (!userId) {
this.qrCodeBase64 = '' this.qrCodeBase64 = ''
this.$Message.error('未获取到当前用户ID请重新登录后重试') Message.error('未获取到当前用户ID请重新登录后重试')
return return
} }
this.qrCodeLoading = true this.qrCodeLoading = true
@@ -197,7 +201,7 @@ export default {
return return
} }
this.qrCodeBase64 = '' this.qrCodeBase64 = ''
this.$Message.error((res && res.message) || '二维码获取失败') Message.error((res && res.message) || '二维码获取失败')
}) })
.catch(() => { .catch(() => {
this.qrCodeBase64 = '' this.qrCodeBase64 = ''
@@ -213,12 +217,12 @@ export default {
this.refreshConnectBinds() this.refreshConnectBinds()
.then(() => { .then(() => {
if (this.isBound(this.bindForm.type)) { if (this.isBound(this.bindForm.type)) {
this.$Message.success('绑定成功') Message.success('绑定成功')
this.bindModalVisible = false this.bindModalVisible = false
this.resetBindForm() this.resetBindForm()
return return
} }
this.$Message.warning('暂未检测到绑定,请扫码后重试') Message.warning('暂未检测到绑定,请扫码后重试')
this.$nextTick(() => { this.$nextTick(() => {
this.bindModalVisible = true this.bindModalVisible = true
}) })
@@ -229,11 +233,11 @@ export default {
return return
} }
if (!this.bindForm.type) { if (!this.bindForm.type) {
this.$Message.error('绑定类型不能为空') Message.error('绑定类型不能为空')
return return
} }
if (!this.bindForm.unionID) { if (!this.bindForm.unionID) {
this.$Message.error('OpenID/UnionID 不能为空') Message.error('OpenID/UnionID 不能为空')
this.$nextTick(() => { this.$nextTick(() => {
this.bindModalVisible = true this.bindModalVisible = true
}) })
@@ -243,7 +247,7 @@ export default {
this.bindSubmitLoading = true this.bindSubmitLoading = true
bindThirdAccount({ unionID: this.bindForm.unionID, type: this.bindForm.type }) bindThirdAccount({ unionID: this.bindForm.unionID, type: this.bindForm.type })
.then(() => { .then(() => {
this.$Message.success('绑定成功') Message.success('绑定成功')
this.bindModalVisible = false this.bindModalVisible = false
this.resetBindForm() this.resetBindForm()
this.refreshConnectBinds() this.refreshConnectBinds()
@@ -253,12 +257,12 @@ export default {
}) })
}, },
confirmUnbind (item) { confirmUnbind (item) {
this.$Modal.confirm({ Modal.confirm({
title: '解绑确认', title: '解绑确认',
content: `<p>确定解绑 ${item.label} 吗?</p>`, content: `<p>确定解绑 ${item.label} 吗?</p>`,
onOk: () => { onOk: () => {
unbindThirdAccount({ type: item.type }).then(() => { unbindThirdAccount({ type: item.type }).then(() => {
this.$Message.success('解绑成功') Message.success('解绑成功')
this.refreshConnectBinds() this.refreshConnectBinds()
}) })
} }

View File

@@ -5,11 +5,11 @@
<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="10" class="order-detail-title">订单详情</div> <div class="order-detail-title col-10">订单详情</div>
<div span="4">收货人</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="2"></div> <div class="col-2"></div>
</div> </div>
</div> </div>
<empty v-if="list.length === 0" /> <empty v-if="list.length === 0" />
@@ -22,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="10" class="item-view-name"> <div class="item-view-name col-10">
<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 +30,11 @@
{{item.goodsName}} {{item.goodsName}}
</div> </div>
</div> </div>
<div span="4">{{ $filters.secrecyMobile(item.createBy ) }}</div> <div class="col-4">{{ $filters.secrecyMobile(item.createBy ) }}</div>
<div span="4"> <div class="col-4">
{{item.grade==='GOOD'?'好评' : item.grade === 'WORSE'?'差评' : '中评'}} {{item.grade==='GOOD'?'好评' : item.grade === 'WORSE'?'差评' : '中评'}}
</div> </div>
<div span="4"> <div class="col-4">
<el-tooltip> <el-tooltip>
<div class="content">{{item.content}}</div> <div class="content">{{item.content}}</div>
<template #content> <template #content>
@@ -44,7 +44,7 @@
</template> </template>
</el-tooltip> </el-tooltip>
</div> </div>
<div span="2"></div> <div class="col-2"></div>
</div> </div>
</div> </div>
</div> </div>
@@ -52,9 +52,9 @@
</div> </div>
<!-- 分页 --> <!-- 分页 -->
<div class="page-size"> <div class="page-size">
<el-pagination :total="total" @current-change="changePageNum" <el-pagination v-model:current-page="params.pageNumber" v-model:page-size="params.pageSize"
@size-change="changePageSize" :total="total" @current-change="changePageNum"
:page-size="params.pageSize" layout="total, sizes, prev, pager, next, jumper"></el-pagination> @size-change="changePageSize" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div> </div>
</UserCenterLayout> </UserCenterLayout>
</div> </div>
@@ -151,32 +151,32 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
> [span] { > [class*='col-'] {
box-sizing: border-box; box-sizing: border-box;
padding: 0 8px; padding: 0 8px;
} }
> [span='12'] { > .col-12 {
flex: 0 0 50%; flex: 0 0 50%;
max-width: 50%; max-width: 50%;
} }
> [span='10'] { > .col-10 {
flex: 0 0 41.666667%; flex: 0 0 41.666667%;
max-width: 41.666667%; max-width: 41.666667%;
} }
> [span='4'] { > .col-4 {
flex: 0 0 16.666667%; flex: 0 0 16.666667%;
max-width: 16.666667%; max-width: 16.666667%;
} }
> [span='2'] { > .col-2 {
flex: 0 0 8.333333%; flex: 0 0 8.333333%;
max-width: 8.333333%; max-width: 8.333333%;
} }
> [span='6'] { > .col-6 {
flex: 0 0 25%; flex: 0 0 25%;
max-width: 25%; max-width: 25%;
} }

View File

@@ -122,6 +122,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { View } from '@element-plus/icons-vue'; import { View } from '@element-plus/icons-vue';
import {getComplainDetail} from '@/api/member.js'; import {getComplainDetail} from '@/api/member.js';
import {communication} from '@/api/order'; import {communication} from '@/api/order';
@@ -170,7 +171,7 @@ export default {
// 回复消息 // 回复消息
handleSubmit () { handleSubmit () {
if (this.params.content === '') { if (this.params.content === '') {
this.$Message.error('请填写对话内容'); Message.error('请填写对话内容');
return; return;
} }
this.submitLoading = true; this.submitLoading = true;
@@ -178,7 +179,7 @@ export default {
communication(this.params).then((res) => { communication(this.params).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success('对话成功'); Message.success('对话成功');
this.params.content = ''; this.params.content = '';
this.getDetail(); this.getDetail();
} }

View File

@@ -5,11 +5,11 @@
<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="10" class="order-detail-title">商品信息</div> <div class="order-detail-title col-10">商品信息</div>
<div span="4">投诉状态</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="2"></div> <div class="col-2"></div>
</div> </div>
</div> </div>
<empty v-if="list.length === 0" /> <empty v-if="list.length === 0" />
@@ -23,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 span="10" class="item-view-name"> <div class="item-view-name col-10">
<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>
@@ -31,11 +31,11 @@
{{item.goodsName}} {{item.goodsName}}
</div> </div>
</div> </div>
<div span="4">{{statusLabel[item.complainStatus]}}</div> <div class="col-4">{{statusLabel[item.complainStatus]}}</div>
<div span="4"> <div class="col-4">
<div class="content">{{item.complainTopic}}</div> <div class="content">{{item.complainTopic}}</div>
</div> </div>
<div span="4"> <div class="col-4">
<el-tooltip> <el-tooltip>
<div class="content">{{item.content}}</div> <div class="content">{{item.content}}</div>
<template #content> <template #content>
@@ -45,7 +45,7 @@
</template> </template>
</el-tooltip> </el-tooltip>
</div> </div>
<div span="2"></div> <div class="col-2"></div>
</div> </div>
</div> </div>
</div> </div>
@@ -53,15 +53,16 @@
</div> </div>
<!-- 分页 --> <!-- 分页 -->
<div class="page-size"> <div class="page-size">
<el-pagination :total="total" @current-change="changePageNum" <el-pagination v-model:current-page="params.pageNumber" v-model:page-size="params.pageSize"
@size-change="changePageSize" :total="total" @current-change="changePageNum"
:page-size="params.pageSize" layout="total, sizes, prev, pager, next, jumper"></el-pagination> @size-change="changePageSize" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div> </div>
</UserCenterLayout> </UserCenterLayout>
</div> </div>
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import {complainList, clearComplain} from '@/api/member.js'; import {complainList, clearComplain} from '@/api/member.js';
export default { export default {
name: 'ComplainList', name: 'ComplainList',
@@ -107,13 +108,13 @@ export default {
this.getList() this.getList()
}, },
cancel (id) { // 取消投诉 cancel (id) { // 取消投诉
this.$Modal.confirm({ Modal.confirm({
title: '取消投诉', title: '取消投诉',
content: '确定取消投诉吗?', content: '确定取消投诉吗?',
onOk: () => { onOk: () => {
clearComplain(id).then((res) => { clearComplain(id).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success('取消投诉成功'); Message.success('取消投诉成功');
this.getList(); this.getList();
} }
}); });
@@ -167,22 +168,22 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
> [span] { > [class*='col-'] {
box-sizing: border-box; box-sizing: border-box;
padding: 0 8px; padding: 0 8px;
} }
> [span='10'] { > .col-10 {
flex: 0 0 41.666667%; flex: 0 0 41.666667%;
max-width: 41.666667%; max-width: 41.666667%;
} }
> [span='4'] { > .col-4 {
flex: 0 0 16.666667%; flex: 0 0 16.666667%;
max-width: 16.666667%; max-width: 16.666667%;
} }
> [span='2'] { > .col-2 {
flex: 0 0 8.333333%; flex: 0 0 8.333333%;
max-width: 8.333333%; max-width: 8.333333%;
} }

View File

@@ -99,11 +99,13 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page-size"> <div class="page-size">
<el-pagination :current-page="params.pageNumber" <el-pagination v-model:current-page="params.pageNumber"
:total="goodsData.total" :total="goodsData.total"
:page-size="params.pageSize" v-model:page-size="params.pageSize"
:page-sizes="[10, 20, 50]"
@current-change="changePage" @current-change="changePage"
layout="total, prev, pager, next, jumper"></el-pagination> @size-change="changePageSize"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="未选商品" name="goodsUncheck"> <el-tab-pane label="未选商品" name="goodsUncheck">
@@ -136,11 +138,13 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page-size"> <div class="page-size">
<el-pagination :current-page="params.pageNumber" <el-pagination v-model:current-page="params.pageNumber"
:total="goodsData.total" :total="goodsData.total"
:page-size="params.pageSize" v-model:page-size="params.pageSize"
:page-sizes="[10, 20, 50]"
@current-change="changePage" @current-change="changePage"
layout="total, prev, pager, next, jumper"></el-pagination> @size-change="changePageSize"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="提现记录" name="log"> <el-tab-pane label="提现记录" name="log">
@@ -172,11 +176,13 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page-size"> <div class="page-size">
<el-pagination :current-page="logParams.pageNumber" <el-pagination v-model:current-page="logParams.pageNumber"
:total="logData.total" :total="logData.total"
:page-size="logParams.pageSize" v-model:page-size="logParams.pageSize"
:page-sizes="[10, 20, 50]"
@current-change="changePageLog" @current-change="changePageLog"
layout="total, prev, pager, next, jumper"></el-pagination> @size-change="changePageSizeLog"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@@ -256,6 +262,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { Edit } from '@element-plus/icons-vue'; import { Edit } from '@element-plus/icons-vue';
import { import {
distribution, distribution,
@@ -268,12 +275,13 @@ import {
import { IDCard } from "@/plugins/RegExp.js"; import { IDCard } from "@/plugins/RegExp.js";
import { checkBankno } from "@/plugins/Foundation"; import { checkBankno } from "@/plugins/Foundation";
import vueQr from "vue-qr"; import vueQr from "vue-qr";
import config from "@/config";
export default { export default {
name: "Distribution", name: "Distribution",
components: { vueQr, Edit }, components: { vueQr, Edit },
data() { data() {
return { return {
config:require('@/config'), config,
status: 0, // 申请状态0为未申请 1 申请中 2 申请完成 3 功能暂未开启 status: 0, // 申请状态0为未申请 1 申请中 2 申请完成 3 功能暂未开启
applyForm: {}, // 申请表单 applyForm: {}, // 申请表单
rules: { rules: {
@@ -320,18 +328,18 @@ export default {
params: { params: {
// 商品请求参数 // 商品请求参数
pageNumber: 1, pageNumber: 1,
pageSize: 20, pageSize: 10,
checked: true, checked: true,
}, },
orderParams: { orderParams: {
// 订单商品请求参数 // 订单商品请求参数
pageNumber: 1, pageNumber: 1,
pageSize: 20, pageSize: 10,
}, },
logParams: { logParams: {
// 日志参数 // 日志参数
pageNumber: 1, pageNumber: 1,
pageSize: 20, pageSize: 10,
sort: "createTime", sort: "createTime",
order: "desc", order: "desc",
}, },
@@ -355,7 +363,7 @@ export default {
applyDistribution(this.applyForm).then((res) => { applyDistribution(this.applyForm).then((res) => {
this.applyLoading = false; this.applyLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("申请已提交,请等待管理员审核"); Message.success("申请已提交,请等待管理员审核");
this.status = 1; this.status = 1;
} }
}); });
@@ -377,21 +385,21 @@ export default {
withdraw() { withdraw() {
const price = Number(this.withdrawPrice); const price = Number(this.withdrawPrice);
if (!price || price < 1) { if (!price || price < 1) {
this.$Message.error('提现金额单次最少提现金额为1元'); Message.error('提现金额单次最少提现金额为1元');
return; return;
} }
distCash({ price: this.withdrawPrice }).then((res) => { distCash({ price: this.withdrawPrice }).then((res) => {
if (res.success) { if (res.success) {
this.withdrawApplyModal = false; this.withdrawApplyModal = false;
this.withdrawPrice = 0; this.withdrawPrice = 0;
this.$Message.success('申请已提交,请等待审核'); Message.success('申请已提交,请等待审核');
this.distribution(); this.distribution();
this.getLog(); this.getLog();
} else { } else {
this.$Message.error(this.normalizeWithdrawError(res.message)); Message.error(this.normalizeWithdrawError(res.message));
} }
}).catch((err) => { }).catch((err) => {
this.$Message.error(this.normalizeWithdrawError(err?.message || err?.data?.message)); Message.error(this.normalizeWithdrawError(err?.message || err?.data?.message));
}); });
}, },
qrcodeData(data64) { qrcodeData(data64) {
@@ -437,11 +445,23 @@ export default {
this.params.pageNumber = val; this.params.pageNumber = val;
this.getGoodsData(); this.getGoodsData();
}, },
changePageSize(val) {
// 修改每页条数
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getGoodsData();
},
changePageLog(val) { changePageLog(val) {
// 修改页码 日志 // 修改页码 日志
this.logParams.pageNumber = val; this.logParams.pageNumber = val;
this.getLog(); this.getLog();
}, },
changePageSizeLog(val) {
// 修改每页条数 日志
this.logParams.pageNumber = 1;
this.logParams.pageSize = val;
this.getLog();
},
selectGoods(id, checked) { selectGoods(id, checked) {
// 选择商品 // 选择商品
let params = { let params = {
@@ -450,7 +470,7 @@ export default {
}; };
selectDistGoods(params).then((res) => { selectDistGoods(params).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("操作成功!"); Message.success("操作成功!");
this.getGoodsData(); this.getGoodsData();
} }
}); });
@@ -479,7 +499,7 @@ export default {
applyDistribution().then((res) => { applyDistribution().then((res) => {
this.applyLoading = false; this.applyLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("申诉已提交,请等待管理员审核"); Message.success("申诉已提交,请等待管理员审核");
// this.status = 1; // this.status = 1;
} }
}); });

View File

@@ -79,6 +79,7 @@
</template> </template>
<script> <script>
import { Modal } from "@/utils/message";
import { collectList, cancelCollect, storeCollectList, cancelStoreCollect } from '@/api/member.js' import { collectList, cancelCollect, storeCollectList, cancelStoreCollect } from '@/api/member.js'
export default { export default {
name: 'Favorites', name: 'Favorites',
@@ -145,7 +146,7 @@ export default {
}, },
cancel(id) { // 取消收藏 cancel(id) { // 取消收藏
let typeName = this.params.type === 'GOODS' ? '商品' : '店铺' let typeName = this.params.type === 'GOODS' ? '商品' : '店铺'
this.$Modal.confirm({ Modal.confirm({
title: '取消收藏', title: '取消收藏',
content: `确定取消收藏该${typeName}吗?`, content: `确定取消收藏该${typeName}吗?`,
onOk: () => { onOk: () => {
@@ -159,7 +160,7 @@ export default {
}, },
cancelStore(id) { // 取消收藏 cancelStore(id) { // 取消收藏
let typeName = this.params.type === 'GOODS' ? '商品' : '店铺' let typeName = this.params.type === 'GOODS' ? '商品' : '店铺'
this.$Modal.confirm({ Modal.confirm({
title: '取消收藏', title: '取消收藏',
content: `确定取消收藏该${typeName}吗?`, content: `确定取消收藏该${typeName}吗?`,
onOk: () => { onOk: () => {

View File

@@ -67,9 +67,9 @@
</el-table> </el-table>
<div class="grade-pagination"> <div class="grade-pagination">
<el-pagination <el-pagination
:current-page="params.pageNumber" v-model:current-page="params.pageNumber"
v-model:page-size="params.pageSize"
:total="experienceLogs.total || 0" :total="experienceLogs.total || 0"
: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]"

View File

@@ -74,6 +74,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { Lock } from '@element-plus/icons-vue'; import { Lock } from '@element-plus/icons-vue';
import { import {
setPwd, setPwd,
@@ -152,7 +153,7 @@ export default {
if (valid) { if (valid) {
const {newPassword, againPassword, password} = this.formRegister const {newPassword, againPassword, password} = this.formRegister
if (newPassword !== againPassword) { if (newPassword !== againPassword) {
this.$Message.error({ Message.error({
content: '新密码和确认密码不一致' content: '新密码和确认密码不一致'
}); });
return return
@@ -162,13 +163,13 @@ export default {
params.password = md5(password) params.password = md5(password)
editPwd(params).then(res => { editPwd(params).then(res => {
if (res.success && res.result) { if (res.success && res.result) {
this.$Message.success('修改密码成功'); Message.success('修改密码成功');
this.$router.push('/home') this.$router.push('/home')
} else { } else {
this.$Message.error(this.normalizePwdError(res.message)); Message.error(this.normalizePwdError(res.message));
} }
}).catch((err) => { }).catch((err) => {
this.$Message.error(this.normalizePwdError(err?.message || err?.data?.message)); Message.error(this.normalizePwdError(err?.message || err?.data?.message));
}); });
} }
}) })
@@ -187,13 +188,13 @@ export default {
if (valid) { if (valid) {
const {newPassword, againPassword} = this.formDataUpdate const {newPassword, againPassword} = this.formDataUpdate
if (newPassword === '') { if (newPassword === '') {
this.$Message.error({ Message.error({
content: '请输入密码' content: '请输入密码'
}); });
return return
} }
if (newPassword !== againPassword) { if (newPassword !== againPassword) {
this.$Message.error({ Message.error({
content: '新密码和确认密码不一致' content: '新密码和确认密码不一致'
}); });
return return
@@ -202,7 +203,7 @@ export default {
params.password = md5(newPassword) params.password = md5(newPassword)
setPwd(params).then(res => { setPwd(params).then(res => {
if (res.message === 'success' && res.result) { if (res.message === 'success' && res.result) {
this.$Message.success('支付密码设置成功'); Message.success('支付密码设置成功');
this.$router.push('/home') this.$router.push('/home')
} }
}); });

View File

@@ -20,9 +20,9 @@
<!-- 分页 --> <!-- 分页 -->
<div class="point-pagination"> <div class="point-pagination">
<el-pagination <el-pagination
:current-page="params.pageNumber" v-model:current-page="params.pageNumber"
v-model:page-size="params.pageSize"
:total="logData.total" :total="logData.total"
: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]"

View File

@@ -45,6 +45,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { editMemberInfo } from '@/api/account.js'; import { editMemberInfo } from '@/api/account.js';
import { buyerUrl } from '@/plugins/request.js'; import { buyerUrl } from '@/plugins/request.js';
import storage from '@/plugins/storage.js'; import storage from '@/plugins/storage.js';
@@ -104,7 +105,7 @@ export default {
} }
editMemberInfo(params).then(res => { editMemberInfo(params).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('修改个人资料成功') Message.success('修改个人资料成功')
storage.setItem('userInfo', res.result) storage.setItem('userInfo', res.result)
this.$router.go(0) this.$router.go(0)
} }

View File

@@ -75,6 +75,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message, Notice } from "@/utils/message";
import { Camera, Delete, View } from '@element-plus/icons-vue'; import { Camera, Delete, View } from '@element-plus/icons-vue';
import { orderDetail } from '@/api/order.js'; import { orderDetail } from '@/api/order.js';
import { addEvaluation } from '@/api/member.js'; import { addEvaluation } from '@/api/member.js';
@@ -109,17 +110,17 @@ export default {
}, },
save () { // 保存评价 save () { // 保存评价
if (!this.form.serviceScore || !this.form.deliveryScore) { if (!this.form.serviceScore || !this.form.deliveryScore) {
this.$Message.warning('物流服务评价不能为空') Message.warning('物流服务评价不能为空')
return false; return false;
} }
if (!this.form.descriptionScore) { if (!this.form.descriptionScore) {
this.$Message.warning('描述评价不能为空') Message.warning('描述评价不能为空')
return false; return false;
} }
if (!this.orderGoods.content || !String(this.orderGoods.content).trim()) { if (!this.orderGoods.content || !String(this.orderGoods.content).trim()) {
this.$Message.warning('评论内容不能为空') Message.warning('评论内容不能为空')
return false; return false;
} }
@@ -139,14 +140,14 @@ export default {
addEvaluation(params).then(res => { addEvaluation(params).then(res => {
this.loading = false this.loading = false
if (res.success) { if (res.success) {
this.$Message.success('评价成功') Message.success('评价成功')
this.$router.push('/home/CommentList') this.$router.push('/home/CommentList')
} else { } else {
this.$Message.error(res.message || '评价失败,请稍后重试') Message.error(res.message || '评价失败,请稍后重试')
} }
}).catch((err) => { }).catch((err) => {
this.loading = false; this.loading = false;
this.$Message.error(err?.message || '评价失败,请稍后重试') Message.error(err?.message || '评价失败,请稍后重试')
}) })
}, },
goGoodsDetail (skuId, goodsId) { // 跳转商品详情 goGoodsDetail (skuId, goodsId) { // 跳转商品详情
@@ -171,7 +172,7 @@ export default {
handleBeforeUpload () { // 上传之前钩子 handleBeforeUpload () { // 上传之前钩子
const check = this.orderGoods.uploadList.length < 9; const check = this.orderGoods.uploadList.length < 9;
if (!check) { if (!check) {
this.$Notice.warning({ Notice.warning({
title: '最多可以上传九张图片' title: '最多可以上传九张图片'
}); });
return check; return check;

View File

@@ -31,9 +31,9 @@
</el-table> </el-table>
<div class="msg-pagination"> <div class="msg-pagination">
<el-pagination <el-pagination
:current-page="params.pageNumber" v-model:current-page="params.pageNumber"
v-model:page-size="params.pageSize"
:total="messageData.total" :total="messageData.total"
: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]"
@@ -44,6 +44,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import {memberMsgList, readMemberMsg, delMemberMsg} from '@/api/member.js' import {memberMsgList, readMemberMsg, delMemberMsg} from '@/api/member.js'
export default { export default {
data() { data() {
@@ -94,19 +95,17 @@ export default {
}) })
}, },
removeMessage (id) { removeMessage (id) {
this.$Modal.confirm({ Modal.confirm({
title: '确认删除', title: '确认删除',
content: '确认要删除此消息?', content: '确认要删除此消息?',
loading: true, loading: true,
onOk: () => { onOk: () =>
delMemberMsg(id).then((res) => { delMemberMsg(id).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success('消息已成功放入回收站'); Message.success('消息已成功放入回收站');
this.getList(); this.getList();
} }
}); }),
},
}); });
} }
}, },

View File

@@ -70,9 +70,9 @@
</div> </div>
<!-- 分页 --> <!-- 分页 -->
<div class="page-size"> <div class="page-size">
<el-pagination :total="total" @current-change="changePageNum" <el-pagination v-model:current-page="params.pageNumber" v-model:page-size="params.pageSize"
@size-change="changePageSize" :total="total" @current-change="changePageNum"
:page-size="params.pageSize" layout="sizes, prev, pager, next, jumper"></el-pagination> @size-change="changePageSize" layout="sizes, prev, pager, next, jumper"></el-pagination>
</div> </div>
</UserCenterLayout> </UserCenterLayout>
<el-dialog v-model="logisticsShow" width="530"> <el-dialog v-model="logisticsShow" width="530">
@@ -123,6 +123,7 @@
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import {afterSaleList, cancelAfterSale} from '@/api/member.js'; import {afterSaleList, cancelAfterSale} from '@/api/member.js';
import {afterSaleDelivery, getLogisticsCompany} from '@/api/order.js'; import {afterSaleDelivery, getLogisticsCompany} from '@/api/order.js';
import {afterSaleStatusList} from '../enumeration.js' import {afterSaleStatusList} from '../enumeration.js'
@@ -171,13 +172,13 @@ export default {
}) })
}, },
cancel(sn) { // 取消售后申请 cancel(sn) { // 取消售后申请
this.$Modal.confirm({ Modal.confirm({
title: '取消', title: '取消',
content: '确定取消此次售后申请吗?', content: '确定取消此次售后申请吗?',
onOk: () => { onOk: () => {
cancelAfterSale(sn).then(res => { cancelAfterSale(sn).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('取消售后申请成功') Message.success('取消售后申请成功')
this.getList() this.getList()
} }
}) })
@@ -244,7 +245,7 @@ export default {
afterSaleDelivery(this.form).then(res => { afterSaleDelivery(this.form).then(res => {
if (res.success) { if (res.success) {
this.logisticsShow = false; this.logisticsShow = false;
this.$Message.success('提交成功'); Message.success('提交成功');
this.getList(); this.getList();
} }
this.submitLoading = false; this.submitLoading = false;

View File

@@ -114,6 +114,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import { afterSaleDetail, afterSaleLog, afterSaleReason, cancelAfterSale } from '@/api/member.js'; import { afterSaleDetail, afterSaleLog, afterSaleReason, cancelAfterSale } from '@/api/member.js';
import { afterSaleDelivery, getLogisticsCompany } from '@/api/order.js'; import { afterSaleDelivery, getLogisticsCompany } from '@/api/order.js';
import { afterSaleStatusList } from '../enumeration.js' import { afterSaleStatusList } from '../enumeration.js'
@@ -182,13 +183,13 @@ export default {
window.open(img, '_blank') window.open(img, '_blank')
}, },
cancel (sn) { // 取消售后申请 cancel (sn) { // 取消售后申请
this.$Modal.confirm({ Modal.confirm({
title: '取消', title: '取消',
content: '<p>确定取消此次售后申请吗?</p>', content: '<p>确定取消此次售后申请吗?</p>',
onOk: () => { onOk: () => {
cancelAfterSale(sn).then(res => { cancelAfterSale(sn).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('取消售后申请成功') Message.success('取消售后申请成功')
this.getDetail() this.getDetail()
} }
}) })
@@ -210,7 +211,7 @@ export default {
afterSaleDelivery(this.form).then(res => { afterSaleDelivery(this.form).then(res => {
if (res.success) { if (res.success) {
this.logisticsShow = false; this.logisticsShow = false;
this.$Message.success('提交成功') Message.success('提交成功')
this.getDetail() this.getDetail()
} }
this.submitLoading = false this.submitLoading = false

View File

@@ -102,6 +102,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message, Notice } from "@/utils/message";
import { Camera, Delete, 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 { buyerUrl } from '@/plugins/request.js'; import { buyerUrl } from '@/plugins/request.js';
@@ -186,7 +187,7 @@ export default {
params.reason = this.reasonList.find(item => item.id == params.reason).reason params.reason = this.reasonList.find(item => item.id == params.reason).reason
applyAfterSale(params).then(res => { applyAfterSale(params).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('售后申请提交成功,请到售后订单查看!') Message.success('售后申请提交成功,请到售后订单查看!')
this.$router.push({name: 'AfterSale'}) this.$router.push({name: 'AfterSale'})
} }
}) })
@@ -208,7 +209,7 @@ export default {
handleBeforeUpload () { // 上传之前钩子函数 handleBeforeUpload () { // 上传之前钩子函数
const check = this.uploadList.length < 6; const check = this.uploadList.length < 6;
if (!check) { if (!check) {
this.$Notice.warning({ Notice.warning({
title: '最多可以上传5张图片' title: '最多可以上传5张图片'
}); });
return check; return check;

View File

@@ -62,6 +62,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message, Notice } from "@/utils/message";
import { Camera, Delete, View } from '@element-plus/icons-vue'; import { Camera, Delete, View } from '@element-plus/icons-vue';
import { orderDetail } from '@/api/order.js'; import { orderDetail } from '@/api/order.js';
import { afterSaleReason, handleComplain } from '@/api/member.js'; import { afterSaleReason, handleComplain } from '@/api/member.js';
@@ -111,7 +112,7 @@ export default {
} }
handleComplain(params).then(res => { handleComplain(params).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('投诉申请已提交,感谢您的反馈') Message.success('投诉申请已提交,感谢您的反馈')
this.$router.push({name: 'ComplainList'}) this.$router.push({name: 'ComplainList'})
} }
}) })
@@ -138,7 +139,7 @@ export default {
handleBeforeUpload () { // 上传之前钩子函数 handleBeforeUpload () { // 上传之前钩子函数
const check = this.orderGoods.uploadList.length < 6; const check = this.orderGoods.uploadList.length < 6;
if (!check) { if (!check) {
this.$Notice.warning({ Notice.warning({
title: '最多可以上传五张图片' title: '最多可以上传五张图片'
}); });
return check; return check;

View File

@@ -36,6 +36,7 @@
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import { Delete, Edit } from '@element-plus/icons-vue'; import { Delete, Edit } from '@element-plus/icons-vue';
import { memberAddress, delMemberAddress } from '@/api/address.js'; import { memberAddress, delMemberAddress } from '@/api/address.js';
@@ -58,19 +59,19 @@ export default {
}, },
del (id) { del (id) {
// 删除地址 // 删除地址
this.$Modal.confirm({ Modal.confirm({
title: '提示', title: '提示',
content: '你确定删除这个收货地址', content: '你确定删除这个收货地址',
onOk: () => { onOk: () => {
delMemberAddress(id).then((res) => { delMemberAddress(id).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success('删除成功'); Message.success('删除成功');
this.getAddrList(); this.getAddrList();
} }
}); });
}, },
onCancel: () => { onCancel: () => {
this.$Message.info('取消删除'); Message.info('取消删除');
} }
}); });
}, },

View File

@@ -83,9 +83,9 @@
<!-- 分页 --> <!-- 分页 -->
<div class="page-size"> <div class="page-size">
<el-pagination :total="total" @current-change="changePageNum" <el-pagination v-model:current-page="params.pageNumber" v-model:page-size="params.pageSize"
@size-change="changePageSize" :total="total" @current-change="changePageNum"
:page-size="params.pageSize" layout="total, sizes, prev, pager, next, jumper"></el-pagination> @size-change="changePageSize" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div> </div>
</UserCenterLayout> </UserCenterLayout>
@@ -176,6 +176,7 @@
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import { getOrderList, sureReceived, cancelOrder, delOrder } from '@/api/order'; import { getOrderList, sureReceived, cancelOrder, delOrder } from '@/api/order';
import { afterSaleReason } from '@/api/member'; import { afterSaleReason } from '@/api/member';
import { orderStatusList } from '../enumeration.js' import { orderStatusList } from '../enumeration.js'
@@ -276,7 +277,7 @@ export default {
received (sn) { // 确认收货 received (sn) { // 确认收货
sureReceived(sn).then(res => { sureReceived(sn).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('确认收货成功') Message.success('确认收货成功')
this.getList() this.getList()
} }
}) })
@@ -309,13 +310,13 @@ export default {
this.$router.push({name: 'Complain', query: {sn, index: goodsIndex}}) this.$router.push({name: 'Complain', query: {sn, index: goodsIndex}})
}, },
delOrder (sn) { // 删除订单 delOrder (sn) { // 删除订单
this.$Modal.confirm({ Modal.confirm({
title: '删除订单', title: '删除订单',
content: '<p>确认删除当前订单吗?</p>', content: '<p>确认删除当前订单吗?</p>',
onOk: () => { onOk: () => {
delOrder(sn).then(res => { delOrder(sn).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('删除成功'); Message.success('删除成功');
this.getList() this.getList()
} }
}) })
@@ -360,7 +361,7 @@ export default {
sureCancel () { // 确定取消 sureCancel () { // 确定取消
cancelOrder(this.cancelParams).then(res => { cancelOrder(this.cancelParams).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('取消订单成功') Message.success('取消订单成功')
this.getList() this.getList()
this.cancelAvail = false this.cancelAvail = false
} }

View File

@@ -264,7 +264,8 @@
<dd><div class="text-box">{{ order.order.sn }}</div></dd> <dd><div class="text-box">{{ order.order.sn }}</div></dd>
</dl> </dl>
</div> </div>
<div v-if="orderPackage.length > 0" v-for="(packageItem, packageIndex) in orderPackage" :key="packageIndex"> <template v-if="orderPackage.length > 0">
<div v-for="(packageItem, packageIndex) in orderPackage" :key="packageIndex">
<div class="layui-layer-wrap"> <div class="layui-layer-wrap">
<dl><dt>物流公司:</dt> <dl><dt>物流公司:</dt>
<dd><div class="text-box">{{ packageItem.logisticsName }}</div></dd> <dd><div class="text-box">{{ packageItem.logisticsName }}</div></dd>
@@ -292,6 +293,7 @@
</div> </div>
</div> </div>
</div> </div>
</template>
<div v-if = "orderPackage.length == 0 && logistics"> <div v-if = "orderPackage.length == 0 && logistics">
<div class="layui-layer-wrap"> <div class="layui-layer-wrap">
<dl> <dl>
@@ -322,6 +324,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { import {
orderDetail, orderDetail,
getTraces, getTraces,
@@ -390,7 +393,7 @@ export default {
viewReceiptInvoice (receipt) { viewReceiptInvoice (receipt) {
const invoiceAddress = this.getInvoiceAddress(receipt); const invoiceAddress = this.getInvoiceAddress(receipt);
if (!invoiceAddress) { if (!invoiceAddress) {
this.$Message.warning("暂无发票附件"); Message.warning("暂无发票附件");
return; return;
} }
window.open(invoiceAddress, "_blank"); window.open(invoiceAddress, "_blank");
@@ -477,7 +480,7 @@ export default {
// 确认收货 // 确认收货
sureReceived(sn).then((res) => { sureReceived(sn).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("确认收货成功"); Message.success("确认收货成功");
this.getDetail(); this.getDetail();
} }
}); });
@@ -519,7 +522,7 @@ export default {
// 确定取消 // 确定取消
cancelOrder(this.cancelParams).then((res) => { cancelOrder(this.cancelParams).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("取消订单成功"); Message.success("取消订单成功");
this.getDetail(); this.getDetail();
this.cancelAvail = false; this.cancelAvail = false;
} }
@@ -695,15 +698,15 @@ table {
.layui-layer-wrap > .div-express-log { .layui-layer-wrap > .div-express-log {
max-height: 300px; max-height: 300px;
} }
:deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar{ :deep(.layui-layer-wrap > .div-express-log::-webkit-scrollbar){
width: 1px; width: 1px;
height: 5px; height: 5px;
} }
:deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-thumb{ :deep(.layui-layer-wrap > .div-express-log::-webkit-scrollbar-thumb){
border-radius: 1em; border-radius: 1em;
background-color: rgba(50,50,50,.3); background-color: rgba(50,50,50,.3);
} }
:deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-track{ :deep(.layui-layer-wrap > .div-express-log::-webkit-scrollbar-track){
border-radius: 1em; border-radius: 1em;
background-color: rgba(50,50,50,.1); background-color: rgba(50,50,50,.1);
} }
@@ -727,7 +730,6 @@ table {
.time { .time {
width: 30%; width: 30%;
display: inline-block;
float: left; float: left;
} }

View File

@@ -37,10 +37,11 @@
</ul> </ul>
<div class="pageration"> <div class="pageration">
<el-pagination <el-pagination
v-model:current-page="params.pageNumber"
v-model:page-size="params.pageSize"
:total="total" :total="total"
@current-change="changePageNum" @current-change="changePageNum"
@size-change="changePageSize" @size-change="changePageSize"
:page-size="params.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
/> />
</div> </div>

View File

@@ -102,8 +102,8 @@
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<div class="page-size"> <div class="page-size">
<el-pagination :current-page="walletForm.pageNumber" <el-pagination v-model:current-page="walletForm.pageNumber"
:page-size="walletForm.pageSize" v-model:page-size="walletForm.pageSize"
:page-sizes="[10, 20, 50]" :page-sizes="[10, 20, 50]"
:total="logColumnsData.total" :total="logColumnsData.total"
@current-change="changePage" @current-change="changePage"
@@ -140,8 +140,8 @@
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<div class="page-size"> <div class="page-size">
<el-pagination :current-page="rechargeForm.pageNumber" <el-pagination v-model:current-page="rechargeForm.pageNumber"
:page-size="rechargeForm.pageSize" v-model:page-size="rechargeForm.pageSize"
:page-sizes="[10, 20, 50]" :page-sizes="[10, 20, 50]"
:total="rechargeListData.total" :total="rechargeListData.total"
@current-change="rechargeChangePage" @current-change="rechargeChangePage"
@@ -174,8 +174,8 @@
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<div class="page-size"> <div class="page-size">
<el-pagination :current-page="withdrawApplyForm.pageNumber" <el-pagination v-model:current-page="withdrawApplyForm.pageNumber"
:page-size="withdrawApplyForm.pageSize" v-model:page-size="withdrawApplyForm.pageSize"
:page-sizes="[10, 20, 50]" :page-sizes="[10, 20, 50]"
:total="withdrawApplyColumnsListData.total" :total="withdrawApplyColumnsListData.total"
@current-change="withdrawChangePage" @current-change="withdrawChangePage"
@@ -189,6 +189,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import {getDepositLog, getMembersWallet, getRecharge, getWithdrawApply, recharge, withdrawalApply} from '@/api/member'; import {getDepositLog, getMembersWallet, getRecharge, getWithdrawApply, recharge, withdrawalApply} from '@/api/member';
import {withdrawalSettingVO} from "@/api/pay"; import {withdrawalSettingVO} from "@/api/pay";
import { Edit } from '@element-plus/icons-vue'; import { Edit } from '@element-plus/icons-vue';
@@ -398,7 +399,7 @@ export default {
if (valid) { if (valid) {
withdrawalApply(this.withdrawApplyFormData).then((res) => { withdrawalApply(this.withdrawApplyFormData).then((res) => {
if (res && res.success) { if (res && res.success) {
this.$Message.success('提现申请成功,关注提现状态'); Message.success('提现申请成功,关注提现状态');
this.withdrawApplyModal = false; this.withdrawApplyModal = false;
this.init(); // 余额查询 this.init(); // 余额查询
this.getWithdrawApplyData(); // 提现记录 this.getWithdrawApplyData(); // 提现记录

View File

@@ -73,8 +73,8 @@
</div> </div>
<div class="page-size"> <div class="page-size">
<el-pagination :current-page="params.pageNumber" <el-pagination v-model:current-page="params.pageNumber"
:page-size="params.pageSize" v-model:page-size="params.pageSize"
:page-sizes="[10, 20, 50]" :page-sizes="[10, 20, 50]"
:total="total" :total="total"
@current-change="changePage" @current-change="changePage"
@@ -82,7 +82,7 @@
layout="total, sizes, prev, pager, next, jumper" /> 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="使用须知" width="520">
<p class="gcc-notice-text"> <p class="gcc-notice-text">
请在有效期内使用本礼品卡消费时将优先使用卡内余额具体使用范围以活动规则为准如有疑问请联系客服 请在有效期内使用本礼品卡消费时将优先使用卡内余额具体使用范围以活动规则为准如有疑问请联系客服
</p> </p>
@@ -94,6 +94,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { import {
getGiftCardCashMemberCardPage, getGiftCardCashMemberCardPage,
bindGiftCardCashMemberCard, bindGiftCardCashMemberCard,
@@ -231,7 +232,7 @@ export default {
.then((res) => { .then((res) => {
this.bindSubmitting = false; this.bindSubmitting = false;
if (res.success) { if (res.success) {
this.$Message.success(res.message || "兑换成功"); Message.success(res.message || "兑换成功");
this.resetBindForm(); this.resetBindForm();
this.params.pageNumber = 1; this.params.pageNumber = 1;
this.getList(); this.getList();
@@ -249,14 +250,14 @@ export default {
if (this.statusTab === "PENDING_ACTIVATION") { if (this.statusTab === "PENDING_ACTIVATION") {
const memberCardId = this.resolveMemberCardId(item); const memberCardId = this.resolveMemberCardId(item);
if (!memberCardId) { if (!memberCardId) {
this.$Message.error("卡片信息异常,无法激活"); Message.error("卡片信息异常,无法激活");
return; return;
} }
this.activatingId = memberCardId; this.activatingId = memberCardId;
activateGiftCardCashMemberCard(memberCardId) activateGiftCardCashMemberCard(memberCardId)
.then((res) => { .then((res) => {
if (res.success) { if (res.success) {
this.$Message.success(res.message || "激活成功"); Message.success(res.message || "激活成功");
this.getList(); this.getList();
} }
}) })

View File

@@ -23,9 +23,9 @@
<!-- 分页 --> <!-- 分页 -->
<div class="page-size"> <div class="page-size">
<el-pagination <el-pagination
v-model:current-page="params.pageNumber"
v-model:page-size="params.pageSize"
:total="total" :total="total"
:current-page="params.pageNumber"
:page-size="params.pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100]" :page-sizes="[10, 20, 30, 40, 50, 100]"
layout="sizes, prev, pager, next, jumper" layout="sizes, prev, pager, next, jumper"
@current-change="changePageNum" @current-change="changePageNum"
@@ -37,6 +37,7 @@
</template> </template>
<script> <script>
import { Message, Modal } from "@/utils/message";
import { Delete } from '@element-plus/icons-vue'; import { Delete } from '@element-plus/icons-vue';
import { tracksList, clearTracks, clearTracksById } from "@/api/member"; import { tracksList, clearTracks, clearTracksById } from "@/api/member";
export default { export default {
@@ -77,13 +78,13 @@ export default {
}, },
clearAll() { clearAll() {
// 清除全部足迹 // 清除全部足迹
this.$Modal.confirm({ Modal.confirm({
title: "删除", title: "删除",
content: "<p>确定要删除全部足迹吗?</p>", content: "<p>确定要删除全部足迹吗?</p>",
onOk: () => { onOk: () => {
clearTracks().then((res) => { clearTracks().then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("删除成功"); Message.success("删除成功");
this.getList(); this.getList();
} }
}); });
@@ -95,7 +96,7 @@ export default {
// 清除全部足迹 // 清除全部足迹
clearTracksById(id).then((res) => { clearTracksById(id).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("删除成功"); Message.success("删除成功");
this.getList(); this.getList();
} }
}); });

View File

@@ -299,7 +299,7 @@
<invoice-modal ref="invModal" :invoiceData="invoiceData" @change="getInvMsg" /> <invoice-modal ref="invModal" :invoiceData="invoiceData" @change="getInvMsg" />
<!-- 选择地址模态框 --> <!-- 选择地址模态框 -->
<address-manage ref="address" :id="addrId" @change="addrChange"></address-manage> <address-manage ref="address" :id="addrId" @change="addrChange"></address-manage>
<el-dialog v-model="giftCardNoticeModal" title="礼品卡使用说明" footer-hide width="520"> <el-dialog v-model="giftCardNoticeModal" title="礼品卡使用说明" width="520">
<p class="pay-gcc-notice-p"> <p class="pay-gcc-notice-p">
请在礼品卡有效期内使用结算时勾选礼品卡即可按规则抵扣订单金额可与优惠券等活动叠加规则以平台说明为准放弃勾选或取消抵扣将恢复对应余额 请在礼品卡有效期内使用结算时勾选礼品卡即可按规则抵扣订单金额可与优惠券等活动叠加规则以平台说明为准放弃勾选或取消抵扣将恢复对应余额
</p> </p>
@@ -310,6 +310,7 @@
</template> </template>
<script> <script>
import { Message, Modal, Spin } from "@/utils/message";
import { ArrowDown, ArrowUp, Check, Help, Plus, Warning } from '@element-plus/icons-vue'; import { ArrowDown, ArrowUp, Check, Help, Plus, Warning } from '@element-plus/icons-vue';
import invoiceModal from "@/components/invoiceModal"; import invoiceModal from "@/components/invoiceModal";
import addressManage from "@/components/addressManage"; import addressManage from "@/components/addressManage";
@@ -487,17 +488,17 @@ export default {
}, },
getGoodsDetail() { getGoodsDetail() {
// 订单商品详情 // 订单商品详情
this.$Spin.show(); Spin.show();
cartGoodsPay({ way: this.$route.query.way }) cartGoodsPay({ way: this.$route.query.way })
.then((res) => { .then((res) => {
this.$Spin.hide(); Spin.hide();
if (res.success) { if (res.success) {
if ( if (
!res.result.checkedSkuList || !res.result.checkedSkuList ||
res.result.checkedSkuList.length === 0 res.result.checkedSkuList.length === 0
) { ) {
if (res.result.skuList && res.result.skuList[0]) { if (res.result.skuList && res.result.skuList[0]) {
this.$Modal.warning({ Modal.warning({
title: "购物车存在无效商品!", title: "购物车存在无效商品!",
content: content:
"[" + "[" +
@@ -545,7 +546,7 @@ export default {
title = e.errorMessage; title = e.errorMessage;
content.push(e.goodsSku.goodsName); content.push(e.goodsSku.goodsName);
}); });
this.$Modal.warning({ Modal.warning({
title: "以下商品超出配送区域" || title, title: "以下商品超出配送区域" || title,
content: content.toString(), content: content.toString(),
}); });
@@ -587,7 +588,7 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
this.$Spin.hide(); Spin.hide();
}); });
}, },
syncGiftCardSelectionFromCart(result) { syncGiftCardSelectionFromCart(result) {
@@ -727,7 +728,7 @@ export default {
}; };
selectAddr(params).then((res) => { selectAddr(params).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("选择配送方式成功"); Message.success("选择配送方式成功");
this.selectMethod = item; this.selectMethod = item;
this.getGoodsDetail(); this.getGoodsDetail();
} }
@@ -739,7 +740,7 @@ export default {
// 选择自提地址 // 选择自提地址
setStoreAddressId(item.id,this.$route.query.way).then((res) => { setStoreAddressId(item.id,this.$route.query.way).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("选择自提地址成功"); Message.success("选择自提地址成功");
this.selectedStoreAddress = item; this.selectedStoreAddress = item;
this.getGoodsDetail(); this.getGoodsDetail();
} }
@@ -768,13 +769,13 @@ export default {
}, },
delAddress(item) { delAddress(item) {
// 删除地址 // 删除地址
this.$Modal.confirm({ Modal.confirm({
title: "提示", title: "提示",
content: "你确定删除这个收货地址", content: "你确定删除这个收货地址",
onOk: () => { onOk: () => {
delMemberAddress(item.id).then((res) => { delMemberAddress(item.id).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("删除成功"); Message.success("删除成功");
this.getAddress(); this.getAddress();
} }
}); });
@@ -839,10 +840,10 @@ export default {
if (!params.remark.length) delete params.remark; if (!params.remark.length) delete params.remark;
this.$Spin.show(); Spin.show();
createTrade(params) createTrade(params)
.then((res) => { .then((res) => {
this.$Spin.hide(); Spin.hide();
if (res.success) { if (res.success) {
if (params.way === "POINTS") { if (params.way === "POINTS") {
// 积分支付不需要跳转支付页面 // 积分支付不需要跳转支付页面
@@ -856,7 +857,7 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
this.$Spin.hide(); Spin.hide();
}); });
}, },
// 优惠券可用范围 // 优惠券可用范围

View File

@@ -38,7 +38,7 @@
<script> <script>
import {tradeDetail, pay} from '@/api/pay.js'; import {tradeDetail, pay} from '@/api/pay.js';
import { Message } from '@/utils/message'; import { Message, Modal } from "@/utils/message";
export default { export default {
data () { data () {
@@ -98,16 +98,16 @@ export default {
params.paymentClient = 'NATIVE'; params.paymentClient = 'NATIVE';
params.price = this.payDetail.price; params.price = this.payDetail.price;
if (way === 'WALLET') { if (way === 'WALLET') {
this.$Modal.confirm({ Modal.confirm({
title: '支付确认', title: '支付确认',
content: '确认使用余额支付吗?', content: '确认使用余额支付吗?',
onOk: () => { onOk: () => {
pay(params).then(res => { pay(params).then(res => {
if (res.success) { if (res.success) {
this.$Message.success(res.message) Message.success(res.message)
this.$router.push('/payDone'); this.$router.push('/payDone');
} else { } else {
this.$Message.warning(res.message) Message.warning(res.message)
} }
}) })
} }

View File

@@ -33,6 +33,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { Iphone } from '@element-plus/icons-vue'; import { Iphone } from '@element-plus/icons-vue';
import vueQr from 'vue-qr'; import vueQr from 'vue-qr';
import { payCallback, pay } from '@/api/pay.js'; import { payCallback, pay } from '@/api/pay.js';
@@ -56,7 +57,7 @@ export default {
this.num = 0; this.num = 0;
this.interval = setInterval(this.callback, 5000); this.interval = setInterval(this.callback, 5000);
} else { } else {
this.$Message.error(res.message) Message.error(res.message)
} }
}); });
}, },

View File

@@ -85,6 +85,7 @@
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import Search from '@/components/Search'; import Search from '@/components/Search';
import { addCartGoods } from '@/api/cart.js'; import { addCartGoods } from '@/api/cart.js';
import { pointGoodsDetail } from '@/api/promotion'; import { pointGoodsDetail } from '@/api/promotion';
@@ -121,7 +122,7 @@ export default {
this.goodsMsg = res.result; this.goodsMsg = res.result;
this.goodsSku = res.result.goodsSku this.goodsSku = res.result.goodsSku
} else { } else {
this.$Message.error(res.message) Message.error(res.message)
this.$router.push('/') this.$router.push('/')
} }
}).catch(() => { }).catch(() => {
@@ -140,7 +141,7 @@ export default {
if (res.success) { if (res.success) {
this.$router.push({path: '/pay', query: {way: params.cartType}}); this.$router.push({path: '/pay', query: {way: params.cartType}});
} else { } else {
this.$Message.warning(res.message); Message.warning(res.message);
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;

View File

@@ -37,9 +37,9 @@
</div> </div>
</div> </div>
<div class="page-size"> <div class="page-size">
<el-pagination :total="total" @current-change="changePageNum" <el-pagination v-model:current-page="params.pageNumber" v-model:page-size="params.pageSize"
@size-change="changePageSize" :total="total" @current-change="changePageNum"
:page-size="params.pageSize" layout="total, sizes, prev, pager, next"></el-pagination> @size-change="changePageSize" layout="total, sizes, prev, pager, next"></el-pagination>
</div> </div>
<BaseFooter></BaseFooter> <BaseFooter></BaseFooter>
</div> </div>

View File

@@ -191,6 +191,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message, Notice } from "@/utils/message";
import { Delete, View } from '@element-plus/icons-vue'; import { Delete, View } from '@element-plus/icons-vue';
import { applyFirst } from '@/api/shopentry'; import { applyFirst } from '@/api/shopentry';
import * as RegExp from '@/plugins/RegExp.js'; import * as RegExp from '@/plugins/RegExp.js';
@@ -320,7 +321,7 @@ export default {
beforeUpload (file) { beforeUpload (file) {
this.uploadLoading = true; this.uploadLoading = true;
if (this.form.licencePhoto.length >= 1) { if (this.form.licencePhoto.length >= 1) {
this.$Message.warning('最多上传一张图片') Message.warning('最多上传一张图片')
this.uploadLoading = false; this.uploadLoading = false;
return false; return false;
} }
@@ -330,7 +331,7 @@ export default {
beforeUpload1 (file) { beforeUpload1 (file) {
this.uploadLoading1 = true; this.uploadLoading1 = true;
if (this.form.legalPhoto.length >= 2) { if (this.form.legalPhoto.length >= 2) {
this.$Message.warning('最多上传两张图片') Message.warning('最多上传两张图片')
this.uploadLoading1 = false; this.uploadLoading1 = false;
return false; return false;
} }
@@ -343,13 +344,13 @@ export default {
if (!isAllowedType) { if (!isAllowedType) {
this.uploadLoading = false; this.uploadLoading = false;
this.uploadLoading1 = false; this.uploadLoading1 = false;
this.$Message.warning('上传文件格式不正确'); Message.warning('上传文件格式不正确');
return false; return false;
} }
if (!isLt2M) { if (!isLt2M) {
this.uploadLoading = false; this.uploadLoading = false;
this.uploadLoading1 = false; this.uploadLoading1 = false;
this.$Message.warning('文件大小不能超过2M'); Message.warning('文件大小不能超过2M');
return false; return false;
} }
return true; return true;
@@ -373,7 +374,7 @@ export default {
handleFormatError (file) { handleFormatError (file) {
this.uploadLoading = false; this.uploadLoading = false;
this.uploadLoading1 = false; this.uploadLoading1 = false;
this.$Notice.warning({ Notice.warning({
title: 'The file format is incorrect', title: 'The file format is incorrect',
desc: '上传文件格式不正确' desc: '上传文件格式不正确'
}); });
@@ -382,7 +383,7 @@ export default {
handleMaxSize (file) { handleMaxSize (file) {
this.uploadLoading = false; this.uploadLoading = false;
this.uploadLoading1 = false; this.uploadLoading1 = false;
this.$Notice.warning({ Notice.warning({
title: 'Exceeding file size limit', title: 'Exceeding file size limit',
desc: '文件大小不能超过2M' desc: '文件大小不能超过2M'
}); });

View File

@@ -42,7 +42,7 @@
v-if="storeDisable === 'REFUSED' && currentIndex === 3">重新申请</el-button> v-if="storeDisable === 'REFUSED' && currentIndex === 3">重新申请</el-button>
</div> </div>
<el-dialog title="店铺入驻协议" v-model="showAgreement" width="1200" :closable="false" :close-on-click-modal="false"> <el-dialog title="店铺入驻协议" v-model="showAgreement" width="1200" :show-close="false" :close-on-click-modal="false">
<div class="agreement-scroll"> <div class="agreement-scroll">
<div class="agreeent-con" v-html="agreementCon"></div> <div class="agreeent-con" v-html="agreementCon"></div>
</div> </div>
@@ -211,7 +211,7 @@ export default {
} }
.agreeent-con { .agreeent-con {
max-height: 500px; max-height: 500px;
:deep img{ :deep(img){
max-width: 100%; max-width: 100%;
} }

View File

@@ -93,6 +93,7 @@
</div> </div>
</template> </template>
<script> <script>
import { Message } from "@/utils/message";
import { Delete, View } from '@element-plus/icons-vue'; import { Delete, View } from '@element-plus/icons-vue';
import { applyThird } from '@/api/shopentry'; import { applyThird } from '@/api/shopentry';
import { getCategory } from '@/api/goods'; import { getCategory } from '@/api/goods';
@@ -153,7 +154,6 @@ export default {
.then((res) => { .then((res) => {
this.loading = false; this.loading = false;
if (res.success) this.$emit('change', 3); if (res.success) this.$emit('change', 3);
this.$parent.getData('next');
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
@@ -167,7 +167,7 @@ export default {
beforeUpload (file) { beforeUpload (file) {
this.uploadLoading = true; this.uploadLoading = true;
if (this.form.storeLogo.length >= 1) { if (this.form.storeLogo.length >= 1) {
this.$Message.warning('最多上传一张图片') Message.warning('最多上传一张图片')
this.uploadLoading = false; this.uploadLoading = false;
return false; return false;
} }
@@ -179,12 +179,12 @@ export default {
const isLt2M = file.size / 1024 / 1024 < 2; const isLt2M = file.size / 1024 / 1024 < 2;
if (!isAllowedType) { if (!isAllowedType) {
this.uploadLoading = false; this.uploadLoading = false;
this.$Message.warning('上传文件格式不正确'); Message.warning('上传文件格式不正确');
return false; return false;
} }
if (!isLt2M) { if (!isLt2M) {
this.uploadLoading = false; this.uploadLoading = false;
this.$Message.warning('文件大小不能超过2M'); Message.warning('文件大小不能超过2M');
return false; return false;
} }
return true; return true;

View File

@@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from "vue-router";
import NProgress from "nprogress"; import NProgress from "nprogress";
import "nprogress/nprogress.css"; import "nprogress/nprogress.css";
import Index from "@/pages/Index"; import Index from "@/pages/Index";
import config from "@/config";
const Login = () => import("@/pages/Login"); const Login = () => import("@/pages/Login");
const SignUp = () => import("@/pages/SignUp"); const SignUp = () => import("@/pages/SignUp");
@@ -55,7 +56,7 @@ const Merchant = () => import("@/pages/Merchant");
const topic = () => import("@/pages/Topic"); const topic = () => import("@/pages/Topic");
const ShopEntry = () => import("@/pages/shopEntry/ShopEntry"); const ShopEntry = () => import("@/pages/shopEntry/ShopEntry");
const { title } = require("@/config"); const { title } = config;
NProgress.configure({ showSpinner: false }); NProgress.configure({ showSpinner: false });

View File

@@ -63,11 +63,42 @@ export const Notice = {
export const Modal = { export const Modal = {
confirm(options = {}) { confirm(options = {}) {
const content = options.content || options.title || "确认操作?"; const content = options.content || options.title || "确认操作?";
return ElMessageBox.confirm(content, options.title || "提示", { const title = options.title || "提示";
const boxOptions = {
confirmButtonText: options.okText || "确定", confirmButtonText: options.okText || "确定",
cancelButtonText: options.cancelText || "取消", cancelButtonText: options.cancelText || "取消",
type: options.type || "warning", type: options.type || "warning",
};
if (options.loading) {
return ElMessageBox.confirm(content, title, {
...boxOptions,
beforeClose: (action, instance, done) => {
if (action !== "confirm") {
if (typeof options.onCancel === "function") {
options.onCancel();
}
done();
return;
}
if (typeof options.onOk !== "function") {
done();
return;
}
instance.confirmButtonLoading = true;
Promise.resolve(options.onOk())
.then(() => {
instance.confirmButtonLoading = false;
done();
}) })
.catch(() => {
instance.confirmButtonLoading = false;
});
},
});
}
return ElMessageBox.confirm(content, title, boxOptions)
.then(() => { .then(() => {
if (typeof options.onOk === "function") { if (typeof options.onOk === "function") {
return options.onOk(); return options.onOk();

View File

@@ -1,15 +1,14 @@
import { createStore } from "vuex"; import { createStore } from "vuex";
import * as actions from "./actions"; import * as actions from "./actions";
import * as mutations from "./mutations"; import * as mutations from "./mutations";
import * as getters from "./getters";
import storage from "@/plugins/storage.js"; import storage from "@/plugins/storage.js";
import defaultLogo from "@/assets/images/logo2.png";
export default createStore({ export default createStore({
state: { state: {
navList: [], navList: [],
cartNum: storage.getItem("cartNum") || 0, cartNum: storage.getItem("cartNum") || 0,
logoImg: logoImg: storage.getItem("logoImg") || defaultLogo,
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: (() => { category: (() => {
@@ -21,7 +20,6 @@ export default createStore({
} }
})(), })(),
}, },
getters,
actions, actions,
mutations, mutations,
}); });

View File

@@ -1,7 +1,7 @@
import hotzone from './index.vue' import hotzone from './index.vue'
hotzone.install = (Vue) => { hotzone.install = (app) => {
Vue.component(hotzone.name, hotzone) app.component(hotzone.name, hotzone)
} }
export default hotzone export default hotzone

View File

@@ -42,17 +42,6 @@
} }
} }
:deep(.ivu-scroll-container){
width: 100% !important;
height: 400px !important;
}
:deep(.ivu-scroll-content){
/* */
display: flex;
flex-wrap: wrap;
}
.wap-content-list { .wap-content-list {
overflow-y: auto; overflow-y: auto;
} }

View File

@@ -33,13 +33,10 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(.ivu-card-body){ :deep(.el-card__body) {
height: 414px; height: 414px;
overflow: auto; overflow: auto;
} }
.ivu-table-wrapper ivu-table-wrapper-with-border {
height: 300px !important;
}
.list { .list {
margin: 0 1.5%; margin: 0 1.5%;
height: 400px; height: 400px;
@@ -69,11 +66,11 @@ export default {
height: 416px; height: 416px;
overflow: hidden; overflow: hidden;
} }
:deep(.ivu-table){ :deep(.el-table) {
height: 300px !important; height: 300px !important;
overflow: auto; overflow: auto;
} }
:deep(.ivu-card-body){ :deep(.el-card__body) {
padding: 0; padding: 0;
height: auto; height: auto;
} }

View File

@@ -63,12 +63,8 @@
ref="ossManage" ref="ossManage"
:is-component="true" :is-component="true"
:initialize="picModalFlag" :initialize="picModalFlag"
@selected="handleOssSelected" @callback="handleOssCallback"
/> />
<template #footer>
<el-button @click="cancelPicModal">取消</el-button>
<el-button type="primary" @click="confirmPicModal">确认</el-button>
</template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@@ -117,14 +113,12 @@ export default {
viewImage: false, viewImage: false,
uploadFileUrl: uploadFile, uploadFileUrl: uploadFile,
picModalFlag: false, picModalFlag: false,
pendingSelection: [],
selectedFormBtnName: "", selectedFormBtnName: "",
picIndex: "", picIndex: "",
}; };
}, },
methods: { methods: {
handleCLickImg(val, index) { handleCLickImg(val, index) {
this.pendingSelection = [];
this.picModalFlag = true; this.picModalFlag = true;
this.selectedFormBtnName = val; this.selectedFormBtnName = val;
this.picIndex = index; this.picIndex = index;
@@ -134,41 +128,16 @@ export default {
} }
}); });
}, },
handleOssSelected(list) { handleOssCallback(item) {
this.pendingSelection = Array.isArray(list) ? list : [];
},
parseOssSelectionUrl(item) {
if (!item) {
return "";
}
if (typeof item === "string") {
const index = item.indexOf(",");
return index >= 0 ? item.slice(index + 1) : item;
}
return item.url || "";
},
confirmPicModal() {
const list = this.pendingSelection || [];
if (!list.length) {
this.$Message.warning("请先选择图片");
return;
}
const url = this.parseOssSelectionUrl(list[list.length - 1]);
if (!url) {
this.$Message.warning("请选择有效图片");
return;
}
this.picModalFlag = false; this.picModalFlag = false;
this.currentValue = url; if (!item?.url) return;
this.currentValue = item.url;
this.picIndex = ""; this.picIndex = "";
this.emitValue(this.currentValue); this.emitValue(this.currentValue);
this.pendingSelection = [];
},
cancelPicModal() {
this.picModalFlag = false;
}, },
resetPicModal() { resetPicModal() {
this.pendingSelection = []; this.selectedFormBtnName = "";
this.picIndex = "";
}, },
init() { init() {
this.accessToken = { this.accessToken = {

View File

@@ -22,8 +22,8 @@
<script> <script>
import AMapLoader from "@amap/amap-jsapi-loader"; import AMapLoader from "@amap/amap-jsapi-loader";
import { getRegion } from "@/api/common.js"; import { getRegion } from "@/api/common.js";
import config from "@/config/index";
const config = require('@/config/index')
export default { export default {
name: "map", name: "map",
data() { data() {

View File

@@ -22,8 +22,9 @@ import { setStore, getStore, removeStore } from "@/libs/storage";
import util from "@/libs/util"; import util from "@/libs/util";
import { md5 } from "@/utils/md5.js"; import { md5 } from "@/utils/md5.js";
import * as filters from "@/utils/filters"; import * as filters from "@/utils/filters";
import config from "@/config";
const { aMapSecurityJsCode, mainColor } = require("@/config"); const { aMapSecurityJsCode, mainColor } = config;
if (aMapSecurityJsCode) { if (aMapSecurityJsCode) {
window._AMapSecurityConfig = { window._AMapSecurityConfig = {

View File

@@ -1,6 +1,6 @@
import Main from "@/views/Main.vue"; import Main from "@/views/Main.vue";
import config from "@/config/index";
const config = require('@/config/index')
// 不作为Main组件的子页面展示的页面单独写如下 // 不作为Main组件的子页面展示的页面单独写如下
export const loginRouter = { export const loginRouter = {
path: "/login", path: "/login",

View File

@@ -1,4 +1,6 @@
const { setting } = require("@/config"); import config from "@/config";
const { setting } = config;
const localSetting = window.localStorage.getItem('admin-setting') const localSetting = window.localStorage.getItem('admin-setting')
const settingData = { const settingData = {

View File

@@ -13,7 +13,7 @@
border-radius: 1em; border-radius: 1em;
background-color: rgba(50,50,50,.1); background-color: rgba(50,50,50,.1);
} }
.ivu-table table{ .el-table table {
width: 100% !important; width: 100% !important;
} }
@@ -151,7 +151,6 @@ $bg_color: #f1f6fa;
border-radius: 0.4em; border-radius: 0.4em;
flex-wrap: wrap; flex-wrap: wrap;
> .ivu-form-item,
> .el-form-item { > .el-form-item {
margin: 8px 10px !important; margin: 8px 10px !important;
} }
@@ -174,7 +173,3 @@ $bg_color: #f1f6fa;
margin-top: 10px; margin-top: 10px;
} }
// 兼容遗留 iView 结构
.ivu-card + .ivu-card {
margin-top: 10px;
}

View File

@@ -23,7 +23,6 @@
border-radius: 0.4em; border-radius: 0.4em;
flex-wrap: wrap; flex-wrap: wrap;
> .ivu-form-item,
> .el-form-item { > .el-form-item {
margin: 8px 10px !important; margin: 8px 10px !important;
} }
@@ -48,7 +47,3 @@
margin-top: 10px; margin-top: 10px;
} }
// 兼容遗留 iView
.ivu-card + .ivu-card {
margin-top: 10px;
}

View File

@@ -32,7 +32,3 @@
display: block; display: block;
} }
.block-pop .ivu-poptip,
.block-pop .ivu-poptip-rel {
display: block;
}

View File

@@ -85,8 +85,8 @@ import circleLoading from "@/components/lili/circle-loading.vue";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import util from "@/libs/util.js"; import util from "@/libs/util.js";
import { getNoticePage, logout } from "@/api/index"; import { getNoticePage, logout } from "@/api/index";
import config from "@/config/index.js";
const config = require("@/config/index.js"); import defaultLogo from "@/assets/logo.png";
export default { export default {
components: { components: {
@@ -102,7 +102,7 @@ export default {
sliceNum: 5, sliceNum: 5,
userInfo: "", userInfo: "",
tipsMessage: "", tipsMessage: "",
defaultLogo: require("@/assets/logo.png"), defaultLogo,
domainLogo: "", domainLogo: "",
}; };
}, },

View File

@@ -151,7 +151,7 @@
</el-table-column> </el-table-column>
<el-table-column label="价格" width="200"> <el-table-column label="价格" width="200">
<template #default="{ row }"> <template #default="{ row }">
<span :style="{ color: $mainColor }">{{ $filters.unitPrice(row.price, '¥') }}</span> <span :style="{ color: $mainColor }">{{ unitPrice(row.price, '¥') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="buyCount" label="销量" width="150" /> <el-table-column prop="buyCount" label="销量" width="150" />
@@ -305,6 +305,8 @@ import {
getGoodsGroupByPage, getGoodsGroupByPage,
addGoodsGroupItems addGoodsGroupItems
} from "@/api/goods"; } from "@/api/goods";
import { ElMessage, ElMessageBox } from "element-plus";
import { unitPrice, customRouterPush } from "@/utils/filters";
export default { export default {
name: "goods", name: "goods",
data() { data() {
@@ -367,6 +369,7 @@ export default {
} }
}, },
methods: { methods: {
unitPrice,
clearTableSelection() { clearTableSelection() {
this.$refs.table?.clearSelection?.(); this.$refs.table?.clearSelection?.();
}, },
@@ -452,7 +455,7 @@ export default {
lower() { lower() {
const reason = this.underForm.reason ? this.underForm.reason.trim() : ""; const reason = this.underForm.reason ? this.underForm.reason.trim() : "";
if (!reason) { if (!reason) {
this.$Message.error("下架原因不能为空"); ElMessage.error("下架原因不能为空");
return; return;
} }
let params = { let params = {
@@ -460,9 +463,8 @@ export default {
reason reason
}; };
lowGoods(params).then((res) => { lowGoods(params).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.modalVisible = false; this.modalVisible = false;
this.getDataList(); this.getDataList();
this.getNumberData(); // 添加这行 this.getNumberData(); // 添加这行
@@ -471,29 +473,23 @@ export default {
}, },
// 上架 // 上架
upper(v) { upper(v) {
this.$Modal.confirm({ ElMessageBox.confirm("您确认要上架 " + v.goodsName + " ?", "确认上架", { type: "warning" }).then(() => {
title: "确认上架",
content: "您确认要上架 " + v.goodsName + " ?",
loading: true,
onOk: () => {
let params = { let params = {
goodsId: v.id goodsId: v.id
}; };
upGoods(params).then((res) => { return upGoods(params).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("上架成功"); ElMessage.success("上架成功");
this.getDataList(); this.getDataList();
this.getNumberData(); // 添加这行 this.getNumberData(); // 添加这行
} }
}); });
}, }).catch(() => {});
});
}, },
//查看商品详情 //查看商品详情
showDetail(v) { showDetail(v) {
this.$filters.customRouterPush({ customRouterPush({
name: "goods-detail", name: "goods-detail",
query: { id: v.id }, query: { id: v.id },
}); });
@@ -521,26 +517,20 @@ export default {
this.goodsAuditForm.authFlag = "REFUSE"; this.goodsAuditForm.authFlag = "REFUSE";
} }
this.$Modal.confirm({ ElMessageBox.confirm("您确认要审核" + examine + " " + v.goodsName + " ?", "确认审核", { type: "warning" }).then(() => {
title: "确认审核",
content: "您确认要审核" + examine + " " + v.goodsName + " ?",
loading: true,
onOk: () => {
this.goodsAuditForm.goodsIds=v.id; this.goodsAuditForm.goodsIds=v.id;
let formData = new FormData(); let formData = new FormData();
formData.append('goodsIds', v.id); formData.append('goodsIds', v.id);
formData.append('authFlag', this.goodsAuditForm.authFlag); formData.append('authFlag', this.goodsAuditForm.authFlag);
authGoods(formData).then((res) => { return authGoods(formData).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("审核成功"); ElMessage.success("审核成功");
this.getDataList(); this.getDataList();
this.getNumberData(); this.getNumberData();
} }
}); });
}, }).catch(() => {});
});
}, },
// 打开审核弹框 // 打开审核弹框
@@ -563,7 +553,7 @@ export default {
formData.append('authFlag', this.goodsAuditForm.auth_flag === 1 ? 'PASS' : 'REFUSE'); formData.append('authFlag', this.goodsAuditForm.auth_flag === 1 ? 'PASS' : 'REFUSE');
authGoods(formData).then((res) => { authGoods(formData).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success('审核成功'); ElMessage.success('审核成功');
this.auditModalVisible = false; this.auditModalVisible = false;
this.getDataList(); this.getDataList();
this.getNumberData(); this.getNumberData();
@@ -580,78 +570,60 @@ export default {
// 批量上架 // 批量上架
batchUpper() { batchUpper() {
if (this.selectedRows.length === 0) { if (this.selectedRows.length === 0) {
this.$Message.warning('请先选择要上架的商品'); ElMessage.warning('请先选择要上架的商品');
return; return;
} }
const goodsNames = this.selectedRows.map(item => item.goodsName).join('、'); const goodsNames = this.selectedRows.map(item => item.goodsName).join('、');
this.$Modal.confirm({ ElMessageBox.confirm(`您确认要上架以下商品吗?\n${goodsNames}`, "确认批量上架", { type: "warning" }).then(() => {
title: '确认批量上架',
content: `您确认要上架以下商品吗?\n${goodsNames}`,
loading: true,
onOk: () => {
// 提取所有选中商品的ID
const goodsIds = this.selectedRows.map(item => item.id); const goodsIds = this.selectedRows.map(item => item.id);
const params = { const params = {
goodsId: goodsIds // 传递ID数组 goodsId: goodsIds
}; };
upGoods(params).then((res) => { return upGoods(params).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success('批量上架成功'); ElMessage.success('批量上架成功');
this.selectedRows = []; this.selectedRows = [];
this.selectAll = false; this.selectAll = false;
this.getDataList(); this.getDataList();
this.getNumberData(); this.getNumberData();
} }
}).catch(() => {
this.$Modal.remove();
});
}
}); });
}).catch(() => {});
}, },
// 批量下架 // 批量下架
batchLower() { batchLower() {
if (this.selectedRows.length === 0) { if (this.selectedRows.length === 0) {
this.$Message.warning('请先选择要下架的商品'); ElMessage.warning('请先选择要下架的商品');
return; return;
} }
const goodsNames = this.selectedRows.map(item => item.goodsName).join('、'); const goodsNames = this.selectedRows.map(item => item.goodsName).join('、');
this.$Modal.confirm({ ElMessageBox.confirm(`您确认要下架以下商品吗?\n${goodsNames}`, "确认批量下架", { type: "warning" }).then(() => {
title: '确认批量下架',
content: `您确认要下架以下商品吗?\n${goodsNames}`,
loading: true,
onOk: () => {
// 提取所有选中商品的ID
const goodsIds = this.selectedRows.map(item => item.id); const goodsIds = this.selectedRows.map(item => item.id);
const params = { const params = {
goodsId: goodsIds, // 传递ID数组 goodsId: goodsIds,
reason: '批量下架操作' // 可以设置默认下架原因 reason: '批量下架操作'
}; };
lowGoods(params).then((res) => { return lowGoods(params).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success('批量下架成功'); ElMessage.success('批量下架成功');
this.selectedRows = []; this.selectedRows = [];
this.selectAll = false; this.selectAll = false;
this.getDataList(); this.getDataList();
this.getNumberData(); this.getNumberData();
} }
}).catch(() => {
this.$Modal.remove();
});
}
}); });
}).catch(() => {});
}, },
// 批量审核 // 批量审核
batchAudit() { batchAudit() {
if (this.selectedRows.length === 0) { if (this.selectedRows.length === 0) {
this.$Message.warning('请先选择要审核的商品'); ElMessage.warning('请先选择要审核的商品');
return; return;
} }
@@ -666,13 +638,13 @@ export default {
// 提交批量审核 // 提交批量审核
submitBatchAudit() { submitBatchAudit() {
if (this.selectedRows.length === 0) { if (this.selectedRows.length === 0) {
this.$Message.warning('请先选择要审核的商品'); ElMessage.warning('请先选择要审核的商品');
return; return;
} }
// 如果是拒绝审核,必须填写原因 // 如果是拒绝审核,必须填写原因
if (this.batchAuditForm.auth_flag === 2 && !this.batchAuditForm.reason.trim()) { if (this.batchAuditForm.auth_flag === 2 && !this.batchAuditForm.reason.trim()) {
this.$Message.warning('审核拒绝时必须填写拒绝原因'); ElMessage.warning('审核拒绝时必须填写拒绝原因');
return; return;
} }
@@ -688,7 +660,7 @@ export default {
this.batchAuditSubmitLoading = true; this.batchAuditSubmitLoading = true;
authGoods(formData).then((res) => { authGoods(formData).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success(`批量审核${actionText}成功`); ElMessage.success(`批量审核${actionText}成功`);
this.selectedRows = []; this.selectedRows = [];
this.selectAll = false; this.selectAll = false;
this.batchAuditModalVisible = false; this.batchAuditModalVisible = false;
@@ -709,7 +681,7 @@ export default {
}, },
openSetGoodsGroup() { openSetGoodsGroup() {
if (this.selectedRows.length === 0) { if (this.selectedRows.length === 0) {
this.$Message.warning("请先选择商品"); ElMessage.warning("请先选择商品");
return; return;
} }
this.goodsGroupFlag = true; this.goodsGroupFlag = true;
@@ -728,18 +700,18 @@ export default {
addGoodsGroupItems(this.goodsGroupForm.groupId, goodsIds).then((res) => { addGoodsGroupItems(this.goodsGroupForm.groupId, goodsIds).then((res) => {
this.goodsGroupLoading = false; this.goodsGroupLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("设置成功"); ElMessage.success("设置成功");
this.goodsGroupFlag = false; this.goodsGroupFlag = false;
this.selectedRows = []; this.selectedRows = [];
this.selectAll = false; this.selectAll = false;
this.clearTableSelection(); this.clearTableSelection();
this.getDataList(); this.getDataList();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} }
}).catch(() => { }).catch(() => {
this.goodsGroupLoading = false; this.goodsGroupLoading = false;
this.$Message.error("设置失败,请检查权限或后端接口"); ElMessage.error("设置失败,请检查权限或后端接口");
}); });
}); });
} }

View File

@@ -53,7 +53,7 @@
<el-table-column prop="id" label="商品编号" min-width="120" show-overflow-tooltip /> <el-table-column prop="id" label="商品编号" min-width="120" show-overflow-tooltip />
<el-table-column label="价格" min-width="120"> <el-table-column label="价格" min-width="120">
<template #default="{ row }"> <template #default="{ row }">
<span v-if="row" :style="{ color: $mainColor }">{{ $filters.unitPrice(row.price, "") }}</span> <span v-if="row" :style="{ color: $mainColor }">{{ unitPrice(row.price, "") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核状态" min-width="120"> <el-table-column label="审核状态" min-width="120">
@@ -93,6 +93,8 @@
<script> <script>
import { authGoods, getAuthGoodsListData } from "@/api/goods"; import { authGoods, getAuthGoodsListData } from "@/api/goods";
import { ElMessage, ElMessageBox } from "element-plus";
import { unitPrice, customRouterPush } from "@/utils/filters";
export default { export default {
name: "goodsApply", name: "goodsApply",
@@ -113,6 +115,7 @@ export default {
}; };
}, },
methods: { methods: {
unitPrice,
authFlagText(v) { authFlagText(v) {
const map = { const map = {
TOBEAUDITED: "待审核", TOBEAUDITED: "待审核",
@@ -163,24 +166,20 @@ export default {
examine(v, authFlag) { examine(v, authFlag) {
const examine = authFlag === 1 ? "通过" : "拒绝"; const examine = authFlag === 1 ? "通过" : "拒绝";
this.goodsAuditForm.authFlag = authFlag === 1 ? "PASS" : "REFUSE"; this.goodsAuditForm.authFlag = authFlag === 1 ? "PASS" : "REFUSE";
this.$Modal.confirm({ ElMessageBox.confirm(`您确认要审核${examine} ${v.goodsName} ?`, "确认审核", { type: "warning" }).then(() => {
title: "确认审核",
content: `您确认要审核${examine} ${v.goodsName} ?`,
onOk: () => {
const formData = new FormData(); const formData = new FormData();
formData.append("goodsIds", v.id); formData.append("goodsIds", v.id);
formData.append("authFlag", this.goodsAuditForm.authFlag); formData.append("authFlag", this.goodsAuditForm.authFlag);
return authGoods(formData).then((res) => { return authGoods(formData).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("审核成功"); ElMessage.success("审核成功");
this.getDataList(); this.getDataList();
} }
}); });
}, }).catch(() => {});
});
}, },
showDetail(v) { showDetail(v) {
this.$filters.customRouterPush({ customRouterPush({
name: "goods-detail", name: "goods-detail",
query: { id: v.id }, query: { id: v.id },
}); });

View File

@@ -159,6 +159,8 @@ import {
} from "@/api/goods"; } from "@/api/goods";
import ossManage from "@/views/sys/oss-manage/ossManage"; import ossManage from "@/views/sys/oss-manage/ossManage";
import { regular } from "@/utils"; import { regular } from "@/utils";
import { ElMessage, ElMessageBox } from "element-plus";
import defaultPic from "@/assets/default.png";
export default { export default {
name: "brand", name: "brand",
@@ -167,7 +169,7 @@ export default {
}, },
data() { data() {
return { return {
defaultPic: require("@/assets/default.png"), defaultPic,
loading: true, loading: true,
modalType: 0, modalType: 0,
modalVisible: false, modalVisible: false,
@@ -262,7 +264,7 @@ export default {
.then((res) => { .then((res) => {
this.categorySubmitLoading = false; this.categorySubmitLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.categoryModalVisible = false; this.categoryModalVisible = false;
} }
}) })
@@ -272,28 +274,25 @@ export default {
}, },
handleStatusSwitchChange(row, checked) { handleStatusSwitchChange(row, checked) {
const disable = !checked; const disable = !checked;
this.$Modal.confirm({ ElMessageBox.confirm(
title: disable ? "确认禁用" : "确认启用", "您确认要" + (disable ? "禁用" : "启用") + "品牌 " + row.name + " ?",
content: "您确认要" + (disable ? "禁用" : "启用") + "品牌 " + row.name + " ?", disable ? "确认禁用" : "确认启用",
loading: true, { type: "warning" }
onOk: () => { ).then(() => {
disableBrand(row.id, { disable }).then((res) => { return disableBrand(row.id, { disable }).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
} }
this.getDataList(); this.getDataList();
}); });
}, }).catch(() => {
onCancel: () => {
this.$nextTick(() => this.$forceUpdate()); this.$nextTick(() => this.$forceUpdate());
},
}); });
}, },
async delBrand(id) { async delBrand(id) {
const res = await delBrand(id); const res = await delBrand(id);
if (res.success) { if (res.success) {
this.$Message.success("品牌删除成功!"); ElMessage.success("品牌删除成功!");
this.getDataList(); this.getDataList();
} }
}, },
@@ -332,7 +331,7 @@ export default {
addBrand(this.form).then((res) => { addBrand(this.form).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.getDataList(); this.getDataList();
this.modalVisible = false; this.modalVisible = false;
} }
@@ -341,7 +340,7 @@ export default {
updateBrand(this.form).then((res) => { updateBrand(this.form).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.getDataList(); this.getDataList();
this.modalVisible = false; this.modalVisible = false;
} }

View File

@@ -158,6 +158,7 @@ import {
} from "@/api/goods"; } from "@/api/goods";
import uploadPicInput from "@/components/lili/upload-pic-input"; import uploadPicInput from "@/components/lili/upload-pic-input";
import { regular } from "@/utils"; import { regular } from "@/utils";
import { ElMessage, ElMessageBox } from "element-plus";
export default { export default {
name: "goods-category", name: "goods-category",
@@ -222,28 +223,23 @@ export default {
onStatusSwitchChange(row, nextDeleteFlag) { onStatusSwitchChange(row, nextDeleteFlag) {
const previousDeleteFlag = !nextDeleteFlag; const previousDeleteFlag = !nextDeleteFlag;
const isClosing = nextDeleteFlag === true; const isClosing = nextDeleteFlag === true;
this.$Modal.confirm({ ElMessageBox.confirm(
title: isClosing ? "确认关闭" : "确认开启", `您是否要${isClosing ? "关闭" : "开启"}当前分类 ${row.name} 及其子分类?`,
content: `您是否要${isClosing ? "关闭" : "开启"}当前分类 ${row.name} 及其子分类?`, isClosing ? "确认关闭" : "确认开启",
loading: true, { type: "warning", confirmButtonText: "是", cancelButtonText: "否" }
okText: "是", ).then(() => {
cancelText: "否",
onOk: () => {
row._statusLoading = true; row._statusLoading = true;
disableCategory(row.id, { enableOperations: isClosing ? true : 0 }).then((res) => { return disableCategory(row.id, { enableOperations: isClosing ? true : 0 }).then((res) => {
this.$Modal.remove();
row._statusLoading = false; row._statusLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.getAllList(); this.getAllList();
return; return;
} }
row.deleteFlag = previousDeleteFlag; row.deleteFlag = previousDeleteFlag;
}); });
}, }).catch(() => {
onCancel: () => {
row.deleteFlag = previousDeleteFlag; row.deleteFlag = previousDeleteFlag;
},
}); });
}, },
init() { init() {
@@ -283,7 +279,7 @@ export default {
saveCategorySpec(this.categoryId, this.specForm).then((res) => { saveCategorySpec(this.categoryId, this.specForm).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.modalSpecVisible = false; this.modalSpecVisible = false;
} }
}); });
@@ -292,7 +288,7 @@ export default {
saveCategoryBrand(this.categoryId, this.brandForm).then((res) => { saveCategoryBrand(this.categoryId, this.brandForm).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.modalBrandVisible = false; this.modalBrandVisible = false;
} }
}); });
@@ -342,7 +338,7 @@ export default {
insertCategory(this.formAdd).then((res) => { insertCategory(this.formAdd).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("添加成功"); ElMessage.success("添加成功");
this.getAllList(); this.getAllList();
this.modalVisible = false; this.modalVisible = false;
this.$refs.form.resetFields(); this.$refs.form.resetFields();
@@ -352,7 +348,7 @@ export default {
updateCategory(this.formAdd).then((res) => { updateCategory(this.formAdd).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("修改成功"); ElMessage.success("修改成功");
this.getAllList(); this.getAllList();
this.modalVisible = false; this.modalVisible = false;
this.$refs.form.resetFields(); this.$refs.form.resetFields();
@@ -362,20 +358,14 @@ export default {
}); });
}, },
remove(v) { remove(v) {
this.$Modal.confirm({ ElMessageBox.confirm("您确认要删除 " + v.name + " ?", "确认删除", { type: "warning" }).then(() => {
title: "确认删除", return delCategory(v.id).then((res) => {
content: "您确认要删除 " + v.name + " ?",
loading: true,
onOk: () => {
delCategory(v.id).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.getAllList(); this.getAllList();
} }
}); });
}, }).catch(() => {});
});
}, },
getAllList() { getAllList() {
this.loading = true; this.loading = true;
@@ -394,45 +384,35 @@ export default {
}); });
}, },
enable(v) { enable(v) {
this.$Modal.confirm({ ElMessageBox.confirm(
title: "确认启用", "您是否要启用当前分类 " + v.name + " 及其子分类?",
content: "您是否要启用当前分类 " + v.name + " 及其子分类?", "确认启用",
loading: true, { type: "warning", confirmButtonText: "是", cancelButtonText: "否" }
okText: "是", ).then(() => {
cancelText: "否", return disableCategory(v.id, { enableOperations: 0 }).then((res) => {
onOk: () => {
disableCategory(v.id, { enableOperations: 0 }).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.getAllList(); this.getAllList();
} }
}); });
}, }).catch(() => {
onCancel: () => {
this.getAllList(); this.getAllList();
},
}); });
}, },
disable(v) { disable(v) {
this.$Modal.confirm({ ElMessageBox.confirm(
title: "确认禁用", "您是否要禁用当前分类 " + v.name + " 及其子分类?",
content: "您是否要禁用当前分类 " + v.name + " 及其子分类?", "确认禁用",
loading: true, { type: "warning", confirmButtonText: "是", cancelButtonText: "否" }
okText: "是", ).then(() => {
cancelText: "否", return disableCategory(v.id, { enableOperations: true }).then((res) => {
onOk: () => {
disableCategory(v.id, { enableOperations: true }).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.getAllList(); this.getAllList();
} }
}); });
}, }).catch(() => {
onCancel: () => {
this.getAllList(); this.getAllList();
},
}); });
}, },
}, },

View File

@@ -98,6 +98,7 @@ import {
updateGoodsParams, updateGoodsParams,
} from "@/api/goods"; } from "@/api/goods";
import { regular } from "@/utils"; import { regular } from "@/utils";
import { ElMessage } from "element-plus";
const getOptionText = (value) => { const getOptionText = (value) => {
if (value && typeof value === "object") return value.value; if (value && typeof value === "object") return value.value;
@@ -369,7 +370,7 @@ export default {
insertGoodsParams(buildSpringFormPayload(payload)) insertGoodsParams(buildSpringFormPayload(payload))
.then((res) => { .then((res) => {
if (!(res && res.success)) return; if (!(res && res.success)) return;
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.back(); this.back();
}) })
.finally(() => { .finally(() => {
@@ -379,7 +380,7 @@ export default {
updateGoodsParams(buildSpringFormPayload(payload)) updateGoodsParams(buildSpringFormPayload(payload))
.then((res) => { .then((res) => {
if (!(res && res.success)) return; if (!(res && res.success)) return;
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.back(); this.back();
}) })
.finally(() => { .finally(() => {

View File

@@ -67,6 +67,7 @@
</template> </template>
<script> <script>
import { deleteParams, getGoodsParamsPage } from "@/api/goods"; import { deleteParams, getGoodsParamsPage } from "@/api/goods";
import { ElMessage, ElMessageBox } from "element-plus";
export default { export default {
name: "categoryParams", name: "categoryParams",
@@ -127,20 +128,14 @@ export default {
this.$router.push({ name: "goods-parameter-edit", query: { id: row.id } }); this.$router.push({ name: "goods-parameter-edit", query: { id: row.id } });
}, },
remove(row) { remove(row) {
this.$Modal.confirm({ ElMessageBox.confirm("您确认要删除 " + (row.paramName || "") + " ?", "确认删除", { type: "warning" }).then(() => {
title: "确认删除", return deleteParams(row.id).then((res) => {
content: "您确认要删除 " + (row.paramName || "") + " ?",
loading: true,
onOk: () => {
deleteParams(row.id).then((res) => {
this.$Modal.remove();
if (res && res.success) { if (res && res.success) {
this.$Message.success("删除成功"); ElMessage.success("删除成功");
this.getDataList(); this.getDataList();
} }
}); });
}, }).catch(() => {});
});
}, },
}, },
mounted() { mounted() {

View File

@@ -172,6 +172,7 @@
<script> <script>
import * as API_Member from "@/api/member"; import * as API_Member from "@/api/member";
import { ElMessage, ElMessageBox } from "element-plus";
export default { export default {
name: "goods-review", name: "goods-review",
@@ -213,7 +214,7 @@ export default {
} }
API_Member.updateMemberReview(this.currentReviewId, { status }).then((res) => { API_Member.updateMemberReview(this.currentReviewId, { status }).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("修改成功!"); ElMessage.success("修改成功!");
this.getDataList(); this.getDataList();
} }
}); });
@@ -257,7 +258,7 @@ export default {
top: item.id === v.id ? top : false, top: item.id === v.id ? top : false,
}; };
}); });
this.$Message.success(top ? "置顶成功!" : "取消置顶成功!"); ElMessage.success(top ? "置顶成功!" : "取消置顶成功!");
this.init(); this.init();
} }
}); });
@@ -296,18 +297,12 @@ export default {
this.infoData = {}; this.infoData = {};
}, },
remove(v) { remove(v) {
this.$Modal.confirm({ ElMessageBox.confirm("您确认要删除会员" + v.memberName + "的评论?", "确认删除", { type: "warning" }).then(() => {
title: "确认删除", return API_Member.delMemberReview(v.id).then(() => {
content: "您确认要删除会员" + v.memberName + "的评论?", ElMessage.success("修改成功");
loading: true,
onOk: () => {
API_Member.delMemberReview(v.id).then(() => {
this.$Modal.remove();
this.$Message.success("修改成功");
this.init(); this.init();
}); });
}, }).catch(() => {});
});
}, },
}, },
mounted() { mounted() {

View File

@@ -70,6 +70,7 @@
<script> <script>
import * as API_Goods from "@/api/goods.js"; import * as API_Goods from "@/api/goods.js";
import { ElMessage, ElMessageBox } from "element-plus";
export default { export default {
name: "goodsGroup", name: "goodsGroup",
@@ -125,12 +126,12 @@ export default {
this.data = res.result.records || []; this.data = res.result.records || [];
this.total = res.result.total || 0; this.total = res.result.total || 0;
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.$Message.error("加载商品分组失败"); ElMessage.error("加载商品分组失败");
}); });
}, },
openAdd() { openAdd() {
@@ -148,16 +149,16 @@ export default {
.then((res) => { .then((res) => {
this.submitAddLoading = false; this.submitAddLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("添加成功"); ElMessage.success("添加成功");
this.addFlag = false; this.addFlag = false;
this.getData(); this.getData();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} }
}) })
.catch(() => { .catch(() => {
this.submitAddLoading = false; this.submitAddLoading = false;
this.$Message.error("添加失败,请检查权限或后端接口"); ElMessage.error("添加失败,请检查权限或后端接口");
}); });
}); });
}, },
@@ -181,7 +182,7 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
this.$Message.error("获取分组详情失败"); ElMessage.error("获取分组详情失败");
}); });
}, },
submitEdit() { submitEdit() {
@@ -193,38 +194,34 @@ export default {
.then((res) => { .then((res) => {
this.submitEditLoading = false; this.submitEditLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("修改成功"); ElMessage.success("修改成功");
this.editFlag = false; this.editFlag = false;
this.getData(); this.getData();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} }
}) })
.catch(() => { .catch(() => {
this.submitEditLoading = false; this.submitEditLoading = false;
this.$Message.error("修改失败,请检查权限或后端接口"); ElMessage.error("修改失败,请检查权限或后端接口");
}); });
}); });
}, },
remove(row) { remove(row) {
this.$Modal.confirm({ ElMessageBox.confirm("确定删除该分组?", "提示", { type: "warning" }).then(() => {
title: "提示", return API_Goods.deleteGoodsGroup(row.id)
content: "确定删除该分组?",
onOk: () => {
API_Goods.deleteGoodsGroup(row.id)
.then((res) => { .then((res) => {
if (res && res.success) { if (res && res.success) {
this.$Message.success("删除成功"); ElMessage.success("删除成功");
this.getData(); this.getData();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} }
}) })
.catch(() => { .catch(() => {
this.$Message.error("删除失败,请检查权限或后端接口"); ElMessage.error("删除失败,请检查权限或后端接口");
});
},
}); });
}).catch(() => {});
}, },
}, },
mounted() { mounted() {

View File

@@ -214,6 +214,7 @@ import {
getGoodsSkuData, getGoodsSkuData,
updateGoodsSkuVirtualSales, updateGoodsSkuVirtualSales,
} from "@/api/goods"; } from "@/api/goods";
import { ElMessage } from "element-plus";
const VIRTUAL_SALES_FIELDS = [ const VIRTUAL_SALES_FIELDS = [
"virtualSales", "virtualSales",
@@ -311,14 +312,14 @@ export default {
this.data = []; this.data = [];
this.total = 0; this.total = 0;
this.selectedRows = []; this.selectedRows = [];
this.$Message.error((res && res.message) || "加载规格列表失败"); ElMessage.error((res && res.message) || "加载规格列表失败");
} }
}) })
.catch(() => { .catch(() => {
this.data = []; this.data = [];
this.total = 0; this.total = 0;
this.selectedRows = []; this.selectedRows = [];
this.$Message.error("加载规格列表失败"); ElMessage.error("加载规格列表失败");
}) })
.finally(() => { .finally(() => {
this.loading = false; this.loading = false;
@@ -339,7 +340,7 @@ export default {
}, },
openBatchVirtualSalesModal() { openBatchVirtualSalesModal() {
if (!this.selectedRows.length) { if (!this.selectedRows.length) {
this.$Message.warning("请先选择要设置的商品规格"); ElMessage.warning("请先选择要设置的商品规格");
return; return;
} }
this.modalMode = "batch"; this.modalMode = "batch";
@@ -362,7 +363,7 @@ export default {
handleSubmitVirtualSales() { handleSubmitVirtualSales() {
const virtualSales = Number(this.editForm.virtualSales); const virtualSales = Number(this.editForm.virtualSales);
if (!Number.isInteger(virtualSales) || virtualSales < 0) { if (!Number.isInteger(virtualSales) || virtualSales < 0) {
this.$Message.warning("请输入大于等于 0 的整数虚拟销量"); ElMessage.warning("请输入大于等于 0 的整数虚拟销量");
return; return;
} }
if (this.modalMode === "batch") { if (this.modalMode === "batch") {
@@ -384,14 +385,14 @@ export default {
this.data[currentIndex].virtualSales = virtualSales; this.data[currentIndex].virtualSales = virtualSales;
this.data[currentIndex].virtualSalesInput = virtualSales; this.data[currentIndex].virtualSalesInput = virtualSales;
} }
this.$Message.success("虚拟销量设置成功"); ElMessage.success("虚拟销量设置成功");
this.resetVirtualSalesModal(); this.resetVirtualSalesModal();
} else { } else {
this.$Message.error((res && res.message) || "规格虚拟销量设置失败"); ElMessage.error((res && res.message) || "规格虚拟销量设置失败");
} }
}) })
.catch(() => { .catch(() => {
this.$Message.error("规格虚拟销量设置失败"); ElMessage.error("规格虚拟销量设置失败");
}) })
.finally(() => { .finally(() => {
if (this.data[currentIndex]) { if (this.data[currentIndex]) {
@@ -403,7 +404,7 @@ export default {
handleBatchSubmitVirtualSales(virtualSales) { handleBatchSubmitVirtualSales(virtualSales) {
const skuIds = this.selectedRows.map((item) => item.id).filter(Boolean); const skuIds = this.selectedRows.map((item) => item.id).filter(Boolean);
if (!skuIds.length) { if (!skuIds.length) {
this.$Message.warning("请先选择要设置的商品规格"); ElMessage.warning("请先选择要设置的商品规格");
return; return;
} }
this.modalSubmitting = true; this.modalSubmitting = true;
@@ -420,14 +421,14 @@ export default {
}); });
this.selectedRows = []; this.selectedRows = [];
this.$refs.table?.clearSelection(); this.$refs.table?.clearSelection();
this.$Message.success("虚拟销量设置成功"); ElMessage.success("虚拟销量设置成功");
this.resetVirtualSalesModal(); this.resetVirtualSalesModal();
} else { } else {
this.$Message.error((res && res.message) || "虚拟销量设置失败"); ElMessage.error((res && res.message) || "虚拟销量设置失败");
} }
}) })
.catch(() => { .catch(() => {
this.$Message.error("虚拟销量设置失败"); ElMessage.error("虚拟销量设置失败");
}) })
.finally(() => { .finally(() => {
this.modalSubmitting = false; this.modalSubmitting = false;

View File

@@ -10,7 +10,7 @@ h4 {
margin: 20px 0; margin: 20px 0;
font-size: 18px; font-size: 18px;
} }
:deep(.ivu-icon){ .icon {
margin-left: 40px; margin-left: 40px;
margin-right: 40px; margin-right: 40px;
} }

View File

@@ -13,7 +13,8 @@
</template> </template>
<script> <script>
const config = require("@/config/index"); import config from "@/config/index";
export default { export default {
data() { data() {
return { return {

View File

@@ -183,17 +183,6 @@
height: 100%; height: 100%;
.options {
.ivu-select-dropdown {
transform-origin: center top 0px;
position: absolute;
top: 45px !important;
left: -2px;
will-change: top, left;
}
}
.message-con { .message-con {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;

View File

@@ -171,6 +171,7 @@
<script> <script>
import { getUserWithdrawApply, withdrawApply } from "@/api/member"; import { getUserWithdrawApply, withdrawApply } from "@/api/member";
import { ElMessage } from "element-plus";
export default { export default {
name: "withdrawApply", name: "withdrawApply",
@@ -242,7 +243,7 @@ export default {
params.result = res; params.result = res;
params.remark = this.audit; params.remark = this.audit;
if (res === false && params.remark === "") { if (res === false && params.remark === "") {
this.$Message.error("审核备注不能为空"); ElMessage.error("审核备注不能为空");
return; return;
} }
this.submitLoading = true; this.submitLoading = true;
@@ -250,7 +251,7 @@ export default {
.then((result) => { .then((result) => {
const success = result === true || (result && result.success === true); const success = result === true || (result && result.success === true);
if (success) { if (success) {
this.$Message.success("操作成功"); ElMessage.success("操作成功");
this.roleModalVisible = false; this.roleModalVisible = false;
this.queryModalVisible = false; this.queryModalVisible = false;
this.audit = ""; this.audit = "";

View File

@@ -349,6 +349,7 @@ import { getPlatformCoupon } from "@/api/promotion";
import { formatPromotionCouponValidityHtml } from "@/utils/promotions"; import { formatPromotionCouponValidityHtml } from "@/utils/promotions";
import couponTemplate from "@/views/promotions/coupon/coupon.vue"; import couponTemplate from "@/views/promotions/coupon/coupon.vue";
import uploadPicInput from "@/components/lili/upload-pic-input.vue"; import uploadPicInput from "@/components/lili/upload-pic-input.vue";
import { ElMessage, ElMessageBox } from "element-plus";
const GIFT_POINT = "GIFT_POINT"; const GIFT_POINT = "GIFT_POINT";
const COUPON_PACKAGE = "COUPON_PACKAGE"; const COUPON_PACKAGE = "COUPON_PACKAGE";
@@ -641,7 +642,7 @@ export default {
confirmCouponPicker() { confirmCouponPicker() {
const list = this.$refs.couponPicker?.getSelection?.() || []; const list = this.$refs.couponPicker?.getSelection?.() || [];
if (!list.length) { if (!list.length) {
this.$Message.warning("请至少选择一张优惠券"); ElMessage.warning("请至少选择一张优惠券");
return; return;
} }
this.onCouponTemplateSelected(list); this.onCouponTemplateSelected(list);
@@ -712,7 +713,7 @@ export default {
}, },
submitAdd() { submitAdd() {
if (!this.$refs.addForm) { if (!this.$refs.addForm) {
this.$Message.warning("表单未就绪,请稍后重试"); ElMessage.warning("表单未就绪,请稍后重试");
return; return;
} }
this.$refs.addForm.validate((valid) => { this.$refs.addForm.validate((valid) => {
@@ -730,17 +731,17 @@ export default {
API_Member.addMemberBenefit(payload).then((res) => { API_Member.addMemberBenefit(payload).then((res) => {
this.submitAddLoading = false; this.submitAddLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("添加成功"); ElMessage.success("添加成功");
this.addFlag = false; this.addFlag = false;
this.getData(); this.getData();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} else { } else {
this.$Message.error("添加失败"); ElMessage.error("添加失败");
} }
}).catch(() => { }).catch(() => {
this.submitAddLoading = false; this.submitAddLoading = false;
this.$Message.error("网络异常,请稍后重试"); ElMessage.error("网络异常,请稍后重试");
}); });
}); });
}, },
@@ -786,7 +787,7 @@ export default {
}, },
submitEdit() { submitEdit() {
if (!this.$refs.editForm) { if (!this.$refs.editForm) {
this.$Message.warning("表单未就绪,请稍后重试"); ElMessage.warning("表单未就绪,请稍后重试");
return; return;
} }
this.$refs.editForm.validate((valid) => { this.$refs.editForm.validate((valid) => {
@@ -804,17 +805,17 @@ export default {
API_Member.updateMemberBenefit(id, payload).then((res) => { API_Member.updateMemberBenefit(id, payload).then((res) => {
this.submitEditLoading = false; this.submitEditLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("修改成功"); ElMessage.success("修改成功");
this.editFlag = false; this.editFlag = false;
this.getData(); this.getData();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} else { } else {
this.$Message.error("修改失败"); ElMessage.error("修改失败");
} }
}).catch(() => { }).catch(() => {
this.submitEditLoading = false; this.submitEditLoading = false;
this.$Message.error("网络异常,请稍后重试"); ElMessage.error("网络异常,请稍后重试");
}); });
}); });
}, },
@@ -823,16 +824,13 @@ export default {
const prevState = row.benefitState; const prevState = row.benefitState;
if (nextState === prevState) return; if (nextState === prevState) return;
const text = checked ? "开启" : "关闭"; const text = checked ? "开启" : "关闭";
this.$Modal.confirm({ ElMessageBox.confirm(`确定${text}该客户权益?`, "提示", { type: "warning" }).then(() => {
title: "提示",
content: `确定${text}该客户权益?`,
onOk: () => {
row._benefitStateLoading = true; row._benefitStateLoading = true;
return API_Member.updateMemberBenefitState(row.id, nextState) return API_Member.updateMemberBenefitState(row.id, nextState)
.then((res) => { .then((res) => {
row._benefitStateLoading = false; row._benefitStateLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success(`${text}成功`); ElMessage.success(`${text}成功`);
row.benefitState = nextState; row.benefitState = nextState;
} else { } else {
this.getData(); this.getData();
@@ -841,24 +839,19 @@ export default {
.catch(() => { .catch(() => {
row._benefitStateLoading = false; row._benefitStateLoading = false;
}); });
}, }).catch(() => {});
});
}, },
remove(row) { remove(row) {
this.$Modal.confirm({ ElMessageBox.confirm("确定删除该客户权益?", "提示", { type: "warning" }).then(() => {
title: "提示",
content: "确定删除该客户权益?",
onOk: () => {
API_Member.deleteMemberBenefit(row.id).then((res) => { API_Member.deleteMemberBenefit(row.id).then((res) => {
if (res && res.success) { if (res && res.success) {
this.$Message.success("删除成功"); ElMessage.success("删除成功");
this.getData(); this.getData();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} }
}); });
}, }).catch(() => {});
});
}, },
}, },
mounted() { mounted() {

View File

@@ -239,6 +239,7 @@
<script> <script>
import { getSetting, setSetting } from "@/api/index"; import { getSetting, setSetting } from "@/api/index";
import { ElMessage } from "element-plus";
const RULE_OPTIONS = [ const RULE_OPTIONS = [
{ ruleKey: "CONSUME", ruleName: "消费" }, { ruleKey: "CONSUME", ruleName: "消费" },
@@ -407,7 +408,7 @@ export default {
return false; return false;
}); });
if (invalid) { if (invalid) {
this.$Message.error("请检查经验值配置经验值范围为1-100限额需为正整数"); ElMessage.error("请检查经验值配置经验值范围为1-100限额需为正整数");
return false; return false;
} }
return true; return true;
@@ -428,7 +429,7 @@ export default {
setSetting("EXPERIENCE_SETTING", payload) setSetting("EXPERIENCE_SETTING", payload)
.then((res) => { .then((res) => {
if (res && res.success) { if (res && res.success) {
this.$Message.success("保存成功"); ElMessage.success("保存成功");
} }
}) })
.finally(() => { .finally(() => {

View File

@@ -181,6 +181,7 @@
<script> <script>
import * as API_Member from "@/api/member.js"; import * as API_Member from "@/api/member.js";
import uploadPicInput from "@/components/lili/upload-pic-input"; import uploadPicInput from "@/components/lili/upload-pic-input";
import { ElMessage, ElMessageBox } from "element-plus";
const buildDefaultForm = () => ({ const buildDefaultForm = () => ({
id: "", id: "",
@@ -358,7 +359,7 @@ export default {
API_Member.addMemberGrade(payload).then((res) => { API_Member.addMemberGrade(payload).then((res) => {
this.submitAddLoading = false; this.submitAddLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("添加成功"); ElMessage.success("添加成功");
this.addFlag = false; this.addFlag = false;
this.getData(); this.getData();
} }
@@ -410,7 +411,7 @@ export default {
API_Member.updateMemberGrade(id, payload).then((res) => { API_Member.updateMemberGrade(id, payload).then((res) => {
this.submitEditLoading = false; this.submitEditLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("修改成功"); ElMessage.success("修改成功");
this.editFlag = false; this.editFlag = false;
this.getData(); this.getData();
} }
@@ -422,16 +423,13 @@ export default {
const prevState = row.gradeState; const prevState = row.gradeState;
if (nextState === prevState) return; if (nextState === prevState) return;
const text = checked ? "开启" : "关闭"; const text = checked ? "开启" : "关闭";
this.$Modal.confirm({ ElMessageBox.confirm(`确定${text}该客户等级?`, "提示", { type: "warning" }).then(() => {
title: "提示",
content: `<p>确定${text}该客户等级?</p>`,
onOk: () => {
row._gradeStateLoading = true; row._gradeStateLoading = true;
return API_Member.updateMemberGradeState(row.id, nextState) return API_Member.updateMemberGradeState(row.id, nextState)
.then((res) => { .then((res) => {
row._gradeStateLoading = false; row._gradeStateLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success(`${text}成功`); ElMessage.success(`${text}成功`);
row.gradeState = nextState; row.gradeState = nextState;
} else { } else {
this.getData(); this.getData();
@@ -440,24 +438,19 @@ export default {
.catch(() => { .catch(() => {
row._gradeStateLoading = false; row._gradeStateLoading = false;
}); });
}, }).catch(() => {});
});
}, },
remove(row) { remove(row) {
this.$Modal.confirm({ ElMessageBox.confirm("确定删除该客户等级?", "提示", { type: "warning" }).then(() => {
title: "提示",
content: "<p>确定删除该客户等级?</p>",
onOk: () => {
API_Member.deleteMemberGrade(row.id).then((res) => { API_Member.deleteMemberGrade(row.id).then((res) => {
if (res && res.success) { if (res && res.success) {
this.$Message.success("删除成功"); ElMessage.success("删除成功");
this.getData(); this.getData();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} }
}); });
}, }).catch(() => {});
});
}, },
}, },
mounted() { mounted() {

View File

@@ -72,6 +72,7 @@
<script> <script>
import * as API_Member from "@/api/member.js"; import * as API_Member from "@/api/member.js";
import { ElMessage, ElMessageBox } from "element-plus";
export default { export default {
name: "memberGroup", name: "memberGroup",
@@ -142,7 +143,7 @@ export default {
API_Member.addMemberGroup(this.formAdd).then((res) => { API_Member.addMemberGroup(this.formAdd).then((res) => {
this.submitAddLoading = false; this.submitAddLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("添加成功"); ElMessage.success("添加成功");
this.addFlag = false; this.addFlag = false;
this.getData(); this.getData();
} }
@@ -176,7 +177,7 @@ export default {
API_Member.updateMemberGroup(id, { groupName, description }).then((res) => { API_Member.updateMemberGroup(id, { groupName, description }).then((res) => {
this.submitEditLoading = false; this.submitEditLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("修改成功"); ElMessage.success("修改成功");
this.editFlag = false; this.editFlag = false;
this.getData(); this.getData();
} }
@@ -184,20 +185,16 @@ export default {
}); });
}, },
remove(row) { remove(row) {
this.$Modal.confirm({ ElMessageBox.confirm("确定删除该分组?", "提示", { type: "warning" }).then(() => {
title: "提示",
content: "确定删除该分组?",
onOk: () => {
API_Member.deleteMemberGroup(row.id).then((res) => { API_Member.deleteMemberGroup(row.id).then((res) => {
if (res && res.success) { if (res && res.success) {
this.$Message.success("删除成功"); ElMessage.success("删除成功");
this.getData(); this.getData();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} }
}); });
}, }).catch(() => {});
});
}, },
}, },
mounted() { mounted() {

View File

@@ -300,6 +300,9 @@ import multipleMap from "@/components/map/multiple-map";
import * as API_Member from "@/api/member.js"; import * as API_Member from "@/api/member.js";
import ossManage from "@/views/sys/oss-manage/ossManage"; import ossManage from "@/views/sys/oss-manage/ossManage";
import * as RegExp from "@/libs/RegExp.js"; import * as RegExp from "@/libs/RegExp.js";
import { ElMessage, ElMessageBox } from "element-plus";
import { customRouterPush } from "@/utils/filters";
import defaultPic from "@/assets/default.png";
export default { export default {
name: "member", name: "member",
@@ -320,7 +323,7 @@ export default {
}, },
data() { data() {
return { return {
defaultPic: require("@/assets/default.png"), defaultPic,
descTitle: "", descTitle: "",
descFlag: false, descFlag: false,
loading: true, loading: true,
@@ -459,7 +462,7 @@ export default {
}, },
submitSetMemberGroup() { submitSetMemberGroup() {
if (this.selectedRows.length === 0) { if (this.selectedRows.length === 0) {
this.$Message.warning("请先选择会员"); ElMessage.warning("请先选择会员");
return; return;
} }
this.$refs.memberGroupForm.validate((valid) => { this.$refs.memberGroupForm.validate((valid) => {
@@ -469,12 +472,12 @@ export default {
API_Member.addMemberGroupUsers(this.memberGroupForm.groupId, memberIds).then((res) => { API_Member.addMemberGroupUsers(this.memberGroupForm.groupId, memberIds).then((res) => {
this.memberGroupLoading = false; this.memberGroupLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("设置成功"); ElMessage.success("设置成功");
this.memberGroupFlag = false; this.memberGroupFlag = false;
this.selectedRows = []; this.selectedRows = [];
this.clearSelection(); this.clearSelection();
} else if (res && res.message) { } else if (res && res.message) {
this.$Message.error(res.message); ElMessage.error(res.message);
} }
}); });
}); });
@@ -579,7 +582,7 @@ export default {
if (res.result) { if (res.result) {
this.$refs.addMemberForm.resetFields(); this.$refs.addMemberForm.resetFields();
this.getData(); this.getData();
this.$Message.success("添加成功!"); ElMessage.success("添加成功!");
this.addFlag = false; this.addFlag = false;
} }
}); });
@@ -598,25 +601,21 @@ export default {
} }
}, },
detail(row) { detail(row) {
this.$filters.customRouterPush({ name: "member-detail", query: { id: row.id } }); customRouterPush({ name: "member-detail", query: { id: row.id } });
}, },
disabled(v) { disabled(v) {
let params = { let params = {
memberIds: [v.id], memberIds: [v.id],
disabled: false, disabled: false,
}; };
this.$Modal.confirm({ ElMessageBox.confirm("确认禁用此会员?", "提示", { type: "warning" }).then(() => {
title: "提示",
content: "<p>确认禁用此会员?</p>",
onOk: () => {
API_Member.updateMemberStatus(params).then((res) => { API_Member.updateMemberStatus(params).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("禁用成功"); ElMessage.success("禁用成功");
this.getData(); this.getData();
} }
}); });
}, }).catch(() => {});
});
}, },
openWalletIncrease(row) { openWalletIncrease(row) {
this.walletIncreaseLoading = false; this.walletIncreaseLoading = false;
@@ -636,11 +635,11 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res && res.success) { if (res && res.success) {
this.$Message.success("充值成功"); ElMessage.success("充值成功");
this.walletIncreaseFlag = false; this.walletIncreaseFlag = false;
this.getData(); this.getData();
} else { } else {
this.$Message.error((res && res.message) || "充值失败"); ElMessage.error((res && res.message) || "充值失败");
} }
}) })
.finally(() => { .finally(() => {
@@ -667,11 +666,11 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res && res.success) { if (res && res.success) {
this.$Message.success("修改成功"); ElMessage.success("修改成功");
this.memberPointFlag = false; this.memberPointFlag = false;
this.getData(); this.getData();
} else { } else {
this.$Message.error((res && res.message) || "修改失败"); ElMessage.error((res && res.message) || "修改失败");
} }
}) })
.finally(() => { .finally(() => {
@@ -700,7 +699,7 @@ export default {
} }
API_Member.updateMember(submit).then((res) => { API_Member.updateMember(submit).then((res) => {
if (res.result) { if (res.result) {
this.$Message.success("修改成功!"); ElMessage.success("修改成功!");
this.descFlag = false; this.descFlag = false;
this.getData(); this.getData();
} }

View File

@@ -418,6 +418,7 @@ import ossManage from "@/views/sys/oss-manage/ossManage";
import multipleMap from "@/components/map/multiple-map"; import multipleMap from "@/components/map/multiple-map";
import * as RegExp from "@/libs/RegExp.js"; import * as RegExp from "@/libs/RegExp.js";
import * as API_Order from "@/api/order.js"; import * as API_Order from "@/api/order.js";
import { ElMessage, ElMessageBox } from "element-plus";
export default { export default {
name: "memberDetail", name: "memberDetail",
@@ -677,7 +678,7 @@ export default {
API_Member.editMemberAddress(submit).then((res) => { API_Member.editMemberAddress(submit).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("修改成功"); ElMessage.success("修改成功");
this.addressModalVisible = false; this.addressModalVisible = false;
this.getAddressData(); this.getAddressData();
} }
@@ -686,7 +687,7 @@ export default {
API_Member.addMemberAddress(submit).then((res) => { API_Member.addMemberAddress(submit).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res && res.success) { if (res && res.success) {
this.$Message.success("添加成功"); ElMessage.success("添加成功");
this.addressModalVisible = false; this.addressModalVisible = false;
this.getAddressData(); this.getAddressData();
} }
@@ -714,18 +715,14 @@ export default {
} }
}, },
memberAddressRemove(v) { memberAddressRemove(v) {
this.$Modal.confirm({ ElMessageBox.confirm("确定要删除此收货地址?", "删除", { type: "warning" }).then(() => {
title: "删除",
content: "<p>确定要删除此收货地址?</p>",
onOk: () => {
API_Member.removeMemberAddress(v.id).then((res) => { API_Member.removeMemberAddress(v.id).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("删除成功"); ElMessage.success("删除成功");
this.getAddressData(); this.getAddressData();
} }
}); });
}, }).catch(() => {});
});
}, },
getAddressData() { getAddressData() {
this.addressLoading = true; this.addressLoading = true;

View File

@@ -148,6 +148,8 @@
import * as API_Member from "@/api/member.js"; import * as API_Member from "@/api/member.js";
import ossManage from "@/views/sys/oss-manage/ossManage"; import ossManage from "@/views/sys/oss-manage/ossManage";
import multipleMap from "@/components/map/multiple-map"; import multipleMap from "@/components/map/multiple-map";
import { ElMessage, ElMessageBox } from "element-plus";
import { customRouterPush } from "@/utils/filters";
export default { export default {
name: "memberRecycle", name: "memberRecycle",
@@ -242,25 +244,21 @@ export default {
} }
}, },
detail(row) { detail(row) {
this.$filters.customRouterPush({ name: "member-detail", query: { id: row.id } }); customRouterPush({ name: "member-detail", query: { id: row.id } });
}, },
enable(v) { enable(v) {
let params = { let params = {
memberIds: [v.id], memberIds: [v.id],
disabled: true, disabled: true,
}; };
this.$Modal.confirm({ ElMessageBox.confirm("确定启用此会员?", "提示", { type: "warning" }).then(() => {
title: "提示",
content: "<p>确定启用此会员?</p>",
onOk: () => {
API_Member.updateMemberStatus(params).then((res) => { API_Member.updateMemberStatus(params).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("启用成功"); ElMessage.success("启用成功");
this.getData(); this.getData();
} }
}); });
}, }).catch(() => {});
});
}, },
handleSubmitModal() { handleSubmitModal() {
const { nickName, sex, username, face, newPassword, id, regionId, region } = this.formValidate; const { nickName, sex, username, face, newPassword, id, regionId, region } = this.formValidate;
@@ -280,7 +278,7 @@ export default {
} }
API_Member.updateMember(submit).then((res) => { API_Member.updateMember(submit).then((res) => {
if (res.result) { if (res.result) {
this.$Message.success("修改成功!"); ElMessage.success("修改成功!");
this.descFlag = false; this.descFlag = false;
this.init(); this.init();
} }

View File

@@ -116,6 +116,7 @@ import {
editWechatMPMessageTemplate, editWechatMPMessageTemplate,
delWechatMPMessageTemplate, delWechatMPMessageTemplate,
} from "@/api/setting"; } from "@/api/setting";
import { ElMessage, ElMessageBox } from "element-plus";
export default { export default {
title: "wechat-message-manage", title: "wechat-message-manage",
@@ -166,30 +167,23 @@ export default {
this.wechatModal = true; this.wechatModal = true;
}, },
weChatSync(mp) { weChatSync(mp) {
this.$Modal.confirm({ ElMessageBox.confirm("确认要初始化微信小程序消息订阅?", "提示", { type: "warning" }).then(() => {
title: "提示",
content: "确认要初始化微信小程序消息订阅?",
loading: true,
onOk: () => {
if (mp === "mp") { if (mp === "mp") {
wechatMPMessageSync().then((res) => { wechatMPMessageSync().then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("微信小程序消息订阅初始化"); ElMessage.success("微信小程序消息订阅初始化");
this.getWechatMPMessagePage(); this.getWechatMPMessagePage();
} }
}); });
} else { } else {
wechatMessageSync().then((res) => { wechatMessageSync().then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("微信消息模板初始化成功"); ElMessage.success("微信消息模板初始化成功");
this.getWechatMessagePage(); this.getWechatMessagePage();
} }
}); });
} }
}, }).catch(() => {});
});
}, },
wechatFormDataEdit() { wechatFormDataEdit() {
this.$refs.wechatFormData.validate((valid) => { this.$refs.wechatFormData.validate((valid) => {
@@ -199,7 +193,7 @@ export default {
} }
editWechatMessageTemplate(this.id, this.wechatFormData).then((res) => { editWechatMessageTemplate(this.id, this.wechatFormData).then((res) => {
if (res.message === "success") { if (res.message === "success") {
this.$Message.success("微信模板修改成功"); ElMessage.success("微信模板修改成功");
this.wechatModal = false; this.wechatModal = false;
this.getWechatMessagePage(); this.getWechatMessagePage();
} }
@@ -212,7 +206,7 @@ export default {
if (valid) { if (valid) {
editWechatMPMessageTemplate(this.id, this.wechatMPFormData).then((res) => { editWechatMPMessageTemplate(this.id, this.wechatMPFormData).then((res) => {
if (res.message === "success") { if (res.message === "success") {
this.$Message.success("微信消息订阅模板修改成功"); ElMessage.success("微信消息订阅模板修改成功");
this.wechatModal = false; this.wechatModal = false;
this.getWechatMPMessagePage(); this.getWechatMPMessagePage();
} }
@@ -221,30 +215,23 @@ export default {
}); });
}, },
delWeChat(v) { delWeChat(v) {
this.$Modal.confirm({ ElMessageBox.confirm("确定删除此模板?", "提示", { type: "warning" }).then(() => {
title: "提示",
content: "确定删除此模板?",
loading: true,
onOk: () => {
if (this.tab === "WECHAT") { if (this.tab === "WECHAT") {
delWechatMessageTemplate(v.id).then((res) => { delWechatMessageTemplate(v.id).then((res) => {
if (res.success) { if (res.success) {
this.$Modal.remove(); ElMessage.success("微信模板删除成功");
this.$Message.success("微信模板删除成功");
this.getWechatMessagePage(); this.getWechatMessagePage();
} }
}); });
} else { } else {
delWechatMPMessageTemplate(v.id).then((res) => { delWechatMPMessageTemplate(v.id).then((res) => {
if (res.success) { if (res.success) {
this.$Modal.remove(); ElMessage.success("微信消息订阅删除成功");
this.$Message.success("微信消息订阅删除成功");
this.getWechatMPMessagePage(); this.getWechatMPMessagePage();
} }
}); });
} }
}, }).catch(() => {});
});
}, },
getDataList() { getDataList() {
this.getWechatMessagePage(); this.getWechatMessagePage();

View File

@@ -205,6 +205,7 @@
<script> <script>
import * as API_Member from "@/api/member.js"; import * as API_Member from "@/api/member.js";
import { customRouterPush } from "@/utils/filters";
export default { export default {
name: "point", name: "point",
@@ -241,7 +242,7 @@ export default {
this.$emit("callback", val); this.$emit("callback", val);
}, },
detail(row) { detail(row) {
this.$filters.customRouterPush({ name: "member-detail", query: { id: row.id } }); customRouterPush({ name: "member-detail", query: { id: row.id } });
}, },
init() { init() {
this.getStatistics(); this.getStatistics();

View File

@@ -69,6 +69,7 @@
</template> </template>
<script> <script>
import * as API_Order from "@/api/order"; import * as API_Order from "@/api/order";
import { ElMessage, ElMessageBox } from "element-plus";
export default { export default {
data() { data() {
@@ -143,7 +144,7 @@ export default {
API_Order.addAfterSaleReason(this.form).then((res) => { API_Order.addAfterSaleReason(this.form).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("添加成功"); ElMessage.success("添加成功");
this.getDataList(); this.getDataList();
this.modalVisible = false; this.modalVisible = false;
} }
@@ -152,7 +153,7 @@ export default {
API_Order.editAfterSaleReason(this.form.id, this.form).then((res) => { API_Order.editAfterSaleReason(this.form.id, this.form).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("修改成功"); ElMessage.success("修改成功");
this.getDataList(); this.getDataList();
this.modalVisible = false; this.modalVisible = false;
} }
@@ -162,20 +163,14 @@ export default {
}); });
}, },
remove(v) { remove(v) {
this.$Modal.confirm({ ElMessageBox.confirm("确认要删除此售后原因?", "确认删除", { type: "warning" }).then(() => {
title: "确认删除",
content: "确认要删除此售后原因?",
loading: true,
onOk: () => {
API_Order.delAfterSaleReason(v.id).then((res) => { API_Order.delAfterSaleReason(v.id).then((res) => {
this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("售后原因已删除"); ElMessage.success("售后原因已删除");
this.getDataList(); this.getDataList();
} }
}); });
}, }).catch(() => {});
});
}, },
}, },
mounted() { mounted() {

View File

@@ -126,7 +126,7 @@
<el-table-column label="售后金额" width="110"> <el-table-column label="售后金额" width="110">
<template #default="{ row }"> <template #default="{ row }">
<span v-if="row" :style="{ color: $mainColor }"> <span v-if="row" :style="{ color: $mainColor }">
{{ $filters.unitPrice(row.applyRefundPrice, "") }}</span> {{ unitPrice(row.applyRefundPrice, "") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="售后类型" width="100"> <el-table-column label="售后类型" width="100">
@@ -169,6 +169,7 @@
<script> <script>
import * as API_Order from "@/api/order"; import * as API_Order from "@/api/order";
import { unitPrice, customRouterPush } from "@/utils/filters";
export default { export default {
name: "after-sale-order", name: "after-sale-order",
@@ -240,6 +241,7 @@ export default {
}, },
}, },
methods: { methods: {
unitPrice,
serviceTypeText(type) { serviceTypeText(type) {
const map = { const map = {
RETURN_MONEY: "退款", RETURN_MONEY: "退款",
@@ -330,7 +332,7 @@ export default {
}, },
detail(v) { detail(v) {
const sn = v.sn; const sn = v.sn;
this.$filters.customRouterPush({ customRouterPush({
name: "after-order-detail", name: "after-order-detail",
query: { sn: sn }, query: { sn: sn },
}); });

Some files were not shown because too many files have changed in this diff Show More