feat: 分享设置接口接入

This commit is contained in:
YeMingfei666 2025-03-11 11:36:17 +08:00
parent 4e956987d5
commit 6264708ee5
1 changed files with 9 additions and 4 deletions

View File

@ -61,6 +61,10 @@
<script>
import shopShareApi from "@/api/account/shopShare";
import AddCoupon from "./addCoupon.vue";
import { useUserStore } from "@/store/modules/user";
import { ElMessage } from "element-plus";
const shopUser = useUserStore();
export default {
components: { AddCoupon },
data() {
@ -114,8 +118,8 @@ export default {
tableType: "1", // 1 2
tableEditorIndex: 0, // index
shopInfo: {
name: localStorage.getItem("shopName"),
logo: localStorage.getItem("logo"),
name: "",
logo: "",
},
form: {
status: 1,
@ -193,6 +197,7 @@ export default {
},
mounted() {
this.byShopId();
this.shopInfo = shopUser.userInfo;
},
methods: {
//
@ -236,7 +241,7 @@ export default {
this.form.shopId = localStorage.getItem("shopId");
await shopShareApi.update(this.form);
this.loading = false;
this.$notify({
ElMessage({
title: "成功",
message: `保存成功`,
type: "success",
@ -251,7 +256,7 @@ export default {
//
async byShopId() {
try {
const res = await byShopId();
const res = await shopShareApi.get();
if (res.id) {
this.form = res;
this.createdAt = [res.startTime, res.endTime];