feat 添加店铺管理审核后分发账号,后台菜单权限

This commit is contained in:
lwh 2023-06-15 15:16:19 +08:00
parent 1dd076f96a
commit 84183cb217
8 changed files with 156 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# 开发环境配置
ENV = 'development'
VITE_APP_API_HOST = 'http://192.168.1.102:8888'
VITE_APP_API_HOST = 'http://localhost:8888'
# 开发环境
VITE_APP_BASE_API = '/dev-api'

View File

@ -79,3 +79,5 @@ export function audit(data) {
data: data
})
}

View File

@ -0,0 +1,28 @@
import request from '@/utils/request'
/**
* @Descripttion: 店详情Api接口
* @version: (1.0)
* @Author: (黎文豪)
* @Date: (2023-06-15)
* @LastEditors: (黎文豪)
* @LastEditTime: (2023-06-15)
*/
// 获取商户店铺详情
export function getShopOperatorDetail(query) {
return request({
url: '/business/Shop/getShopOperatorDetail',
method: 'get',
params: query
})
}
// 编辑店铺详情
export function editShopOperatorDetail(data) {
return request({
url: '/business/Shop/editShopOperatorDetail',
method: 'post',
data: data,
})
}

View File

@ -22,7 +22,7 @@ export function getUser(userId) {
// 新增用户
export function addUser(data) {
return request({
url: '/system/user/edit',
url: '/system/user/add',
method: 'post',
data: data
})

View File

@ -66,6 +66,11 @@
<el-table v-loading="loading" :data="dataList" ref="tableRef" highlight-current-row @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column prop="customerType" label="客户类型" align="center">
<template #default="scope">
<dict-tag :options=" customer_type " :value="scope.row.customerType" />
</template>
</el-table-column>
<el-table-column prop="customerAvatar" label="头像" align="center">
<template #default="scope">
<el-image preview-teleported :hide-on-click-modal="true" lazy class="table-td-thumb" fit="contain" :src="scope.row.customerAvatar.split(',')[0]" :preview-src-list="scope.row.customerAvatar.split(',')">
@ -76,7 +81,7 @@
<el-table-column prop="customerXcxOpenid" label="小程序openid" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="customerNickname" label="昵称" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="customerMobilePhoneNumber" label="手机号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="customerGender" label="性别(字典)" align="center">
<el-table-column prop="customerGender" label="性别" align="center">
<template #default="scope">
<dict-tag :options=" sys_user_sex " :value="scope.row.customerGender" />
</template>
@ -165,6 +170,14 @@ async function getsys_user_sex() {
}
getsys_user_sex()
//
const customer_type = ref([]);
async function getcustomer_type() {
await proxy.getDicts('customer_type').then((res) => {
customer_type.value = res.data
})
}
getcustomer_type()

View File

@ -0,0 +1,103 @@
<template>
<!-- 面包屑 -->
<el-breadcrumb>
<el-breadcrumb-item>联系方式</el-breadcrumb-item>
<el-breadcrumb-item to="/ContactInfo'">联系信息</el-breadcrumb-item>
</el-breadcrumb>
<el-form ref="formRef" :model="formData" :rules="rules">
<el-row>
<el-col :span='24'>
<el-form-item :label-width="labelWidth" label="名称" prop="shopName">
<el-input v-model="formData.shopName" placeholder="请输入名称" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label-width="labelWidth" label="简介" prop="shopIntro">
<el-input v-model="formData.shopIntro" type="textarea" :rows="5" placeholder="请输入简介" />
</el-form-item>
</el-col>
<el-col :span='6'>
<el-form-item :label-width="labelWidth" label="图标" prop="shopLogo">
<UploadImage ref="uploadRef" v-model="formData.shopLogo" :data=imgData :limit="1" :fileSize="5"
:drag="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-button type="primary" class="sus_button" @click="save(formRef)">
保存
</el-button>
</el-row>
</el-form>
</template>
<script setup>
import { ref, reactive } from "vue";
import { getShopOperatorDetail, editShopOperatorDetail } from "@/api/business/ShopManager/Shops/shopOperator.js";
import modal from '@/plugins/modal.js'
let formData = ref({});
const imgData = ref({
dirName: "ContactInfo"
})
//
const rules = reactive({
});
const labelWidth = 200;
const formRef = ref();
//
const getContent = async () => {
const { code, data } = await getShopOperatorDetail();
if (code == 200) {
formData.value = data;
}
};
getContent()
//
const save = async (formEl) => {
if (!formEl) return;
formEl.validate(async (valid) => {
if (!valid) {
return;
}
const { code } = await editShopOperatorDetail(formData.value);
if (code == 200) {
modal.msgSuccess('编辑成功')
}
});
};
</script>
<style lang="scss" scoped>
.sus_button {
width: 300px;
height: 50px;
margin: 20px auto;
}
// .upLoadEl {
// :deep(.el-upload-list__item) {
// height: 200px;
// width: 300px;
// }
// :deep(.el-upload-list__item-thumbnail) {
// object-fit: contain;
// }
// }
</style>

View File

@ -59,7 +59,12 @@
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column prop="userName" label="用户" align="center" />
<el-table-column prop="userName" label="用户" align="center">
<template #default="scope">
<div v-if="!scope.row.userName">暂未绑定</div>
<div v-else>{{ scope.row.userName }}</div>
</template>
</el-table-column>
<el-table-column prop="customerNickname" label="客户" align="center" />
<el-table-column prop="shopBusinessCategoryName" label="经营类目" align="center">
<template #default="scope">

View File

@ -550,6 +550,7 @@ function handleUpdate(row) {
}
/** 提交按钮 */
function submitForm() {
console.log(form.value,'表单');
proxy.$refs['userRef'].validate((valid) => {
if (valid) {
if (form.value.userId != undefined) {