This commit is contained in:
zpc 2025-08-05 10:31:24 +08:00
parent d402e28cd4
commit 3ad57648de
21 changed files with 1484 additions and 262 deletions

2
.env
View File

@ -1,3 +1,3 @@
# 页面标题
VITE_APP_TITLE = '后台管理'
VITE_APP_TITLE = '申请礼物后台管理'

View File

@ -1,16 +1,17 @@
# 开发环境配置
ENV = 'development'
VITE_APP_API_HOST = 'http://localhost:8888'
VITE_APP_API_HOST = 'http://localhost:8888/'
# 开发环境
VITE_APP_BASE_API = '/dev-api'
# VITE_APP_BASE_API = 'http://localhost:8888/'
VITE_APP_BASE_API = 'https://gift.zpc-xy.com/'
# 路由前缀
VITE_APP_ROUTER_PREFIX = '/'
# 默认上传地址
VITE_APP_UPLOAD_URL = '/Common/UploadFile'
VITE_APP_UPLOAD_URL = 'Common/UploadFile'
#socket API
VITE_APP_SOCKET_API = '/msghub'
VITE_APP_SOCKET_API = 'https://gift.zpc-xy.com/msghub'

View File

@ -1,18 +1,19 @@
# 生产环境配置
ENV = 'production'
VITE_APP_API_HOST = 'https://gift.zpc-xy.com/'
# 生产环境
VITE_APP_BASE_API = '/prod-api'
VITE_APP_BASE_API = 'https://gift.zpc-xy.com/'
# 路由前缀
VITE_APP_ROUTER_PREFIX = '/'
# 默认上传地址
VITE_APP_UPLOAD_URL = '/Common/UploadFile'
VITE_APP_UPLOAD_URL = 'Common/UploadFile'
#socket API
VITE_APP_SOCKET_API = '/msghub'
VITE_APP_SOCKET_API = 'https://gift.zpc-xy.com/msghub'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -7,7 +7,7 @@
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="/favicon.ico">
<title>ZRAdmin.NET管理系统</title>
<title>申请礼物管理系统</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>
html,

View File

@ -1,7 +1,7 @@
{
"name": "zr.admin",
"version": "v20240105",
"description": "ZRAdmin.NET管理系统",
"description": "送礼管理系统",
"author": "ZR",
"license": "MIT",
"type": "module",

View File

@ -55,8 +55,8 @@ watch(
immediate: true
}
)
console.log('🎉源码地址: https://gitee.com/izory/ZrAdminNetCore')
console.log('📖官方文档http://www.izhaorui.cn')
console.log('💰打赏作者http://www.izhaorui.cn/doc/support.html')
console.log('📱移动端体验http://www.izhaorui.cn/h5')
// console.log('🎉: https://gitee.com/izory/ZrAdminNetCore')
// console.log('📖http://www.izhaorui.cn')
// console.log('💰http://www.izhaorui.cn/doc/support.html')
// console.log('📱http://www.izhaorui.cn/h5')
</script>

View File

@ -0,0 +1,79 @@
import request from '@/utils/request'
import { downFile } from '@/utils/request'
/**
* 礼品申领表分页查询
* @param {查询条件} data
*/
export function listGiftClaim(query) {
return request({
url: 'business/GiftClaim/list',
method: 'get',
params: query,
})
}
export function getGiftClaimSatistics() {
return request({
url: 'business/GiftClaim/statistics',
method: 'get',
})
}
/**
* 新增礼品申领表
* @param data
*/
export function addGiftClaim(data) {
return request({
url: 'business/GiftClaim',
method: 'post',
data: data,
})
}
/**
* 修改礼品申领表
* @param data
*/
export function updateGiftClaim(data) {
return request({
url: 'business/GiftClaim',
method: 'PUT',
data: data,
})
}
/**
* 获取礼品申领表详情
* @param {Id}
*/
export function getGiftClaim(id) {
return request({
url: 'business/GiftClaim/' + id,
method: 'get'
})
}
/**
* 删除礼品申领表
* @param {主键} pid
*/
export function delGiftClaim(pid) {
return request({
url: 'business/GiftClaim/delete/' + pid,
method: 'POST'
})
}
// 导出礼品申领表
export async function exportGiftClaim(query) {
await downFile('business/GiftClaim/export', { ...query })
}
/**
* 新增礼品申领表
* @param data
*/
export function updateGiftClaimStatus(id, status) {
return request({
url: 'business/GiftClaim/editStatus?id=' + id + "&status=" + status,
method: 'post',
})
}

View File

@ -0,0 +1,57 @@
import request from '@/utils/request'
/**
* 礼品小程序分页查询
* @param {查询条件} data
*/
export function listGiftConfig(query) {
return request({
url: 'business/GiftConfig/list',
method: 'get',
params: query,
})
}
/**
* 新增礼品小程序
* @param data
*/
export function addGiftConfig(data) {
return request({
url: 'business/GiftConfig',
method: 'post',
data: data,
})
}
/**
* 修改礼品小程序
* @param data
*/
export function updateGiftConfig(data) {
return request({
url: 'business/GiftConfig',
method: 'PUT',
data: data,
})
}
/**
* 获取礼品小程序详情
* @param {Id}
*/
export function getGiftConfig(id) {
return request({
url: 'business/GiftConfig/' + id,
method: 'get'
})
}
/**
* 删除礼品小程序
* @param {主键} pid
*/
export function delGiftConfig(pid) {
return request({
url: 'business/GiftConfig/delete/' + pid,
method: 'POST'
})
}

View File

@ -0,0 +1,62 @@
import request from '@/utils/request'
import { downFile } from '@/utils/request'
/**
* 微信用户表分页查询
* @param {查询条件} data
*/
export function listGiftUser(query) {
return request({
url: 'business/GiftUser/list',
method: 'get',
params: query,
})
}
/**
* 新增微信用户表
* @param data
*/
export function addGiftUser(data) {
return request({
url: 'business/GiftUser',
method: 'post',
data: data,
})
}
/**
* 修改微信用户表
* @param data
*/
export function updateGiftUser(data) {
return request({
url: 'business/GiftUser',
method: 'PUT',
data: data,
})
}
/**
* 获取微信用户表详情
* @param {Id}
*/
export function getGiftUser(id) {
return request({
url: 'business/GiftUser/' + id,
method: 'get'
})
}
/**
* 删除微信用户表
* @param {主键} pid
*/
export function delGiftUser(pid) {
return request({
url: 'business/GiftUser/delete/' + pid,
method: 'POST'
})
}
// 导出微信用户表
export async function exportGiftUser(query) {
await downFile('business/GiftUser/export', { ...query })
}

View File

@ -1,5 +1,7 @@
.login-wrap {
background: radial-gradient(220% 105% at top center, #1b2947 10%, #4b76a7 40%, #81acae 65%, #f7f7b6);
// background: radial-gradient(ellipse at top center, #1b2947 0%, #4b76a7 50%, #81acae 80%, #f7f7b6 100%);
// background: radial-gradient(ellipse at top center, #1b2947 0%, #4b76a7 60%, #f7f7b6 100%);
background-attachment: fixed;
overflow: hidden;
display: flex;

View File

@ -11,8 +11,8 @@
<header-search class="right-menu-item" />
<Notice title="通知" class="right-menu-item" />
<template v-if="appStore.device == 'desktop'">
<zr-git title="源码地址" class="right-menu-item" />
<zr-doc title="文档地址" class="right-menu-item" />
<!-- <zr-git title="源码地址" class="right-menu-item" />
<zr-doc title="文档地址" class="right-menu-item" /> -->
<screenfull title="全屏" class="right-menu-item" />
</template>
<size-select title="布局大小" class="right-menu-item" />

View File

@ -11,7 +11,11 @@ export default {
// 失败连接重试次数
failNum: 4,
init(url) {
var socketUrl = window.location.origin + url + '?clientId=' + cache.local.get('clientId')
if (url.indexOf('http') == -1) {
url = window.location.origin + url
}
var socketUrl = url + '?clientId=' + cache.local.get('clientId')
console.log('socketUrl', socketUrl)
const connection = new signalR.HubConnectionBuilder()
.withUrl(socketUrl, { accessTokenFactory: () => getToken() })
.withAutomaticReconnect() //自动重新连接

View File

@ -27,6 +27,7 @@ service.interceptors.request.use(
config.headers['Authorization'] = 'Bearer ' + getToken()
config.headers['userid'] = useUserStore().userId
config.headers['userName'] = encodeURIComponent(useUserStore().userName)
//
}
const method = config?.method || 'get'
const header = config?.headers['Content-Type'] ?? ''

View File

@ -0,0 +1,622 @@
<!--
* @Descripttion: (礼品申领表/gift_claim)
* @Author: (admin)
* @Date: (2025-07-30)
-->
<template>
<div>
<el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
<el-form-item label="姓名" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="联系方式" prop="phone">
<el-input v-model="queryParams.phone" placeholder="请输入联系方式" />
</el-form-item>
<el-form-item label="工作单位" prop="company">
<el-input v-model="queryParams.company" placeholder="请输入工作单位" />
</el-form-item>
<el-form-item label="收货地址" prop="address">
<el-input v-model="queryParams.address" placeholder="请输入收货地址" />
</el-form-item>
<el-form-item label="产品型号" prop="productModel">
<el-input v-model="queryParams.productModel" placeholder="请输入产品型号" />
</el-form-item>
<el-form-item label="出品编号" prop="productSerialNumber">
<el-input v-model="queryParams.productSerialNumber" placeholder="请输入出品编号" />
</el-form-item>
<el-form-item label="微信openId" prop="userWxOpenId">
<el-input v-model="queryParams.userWxOpenId" placeholder="请输入微信openId" />
</el-form-item>
<el-form-item label="审核状态" prop="status">
<el-select clearable v-model="queryParams.status" placeholder="请选择审核状态">
<el-option v-for="item in options.gift_request_claim" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
<span class="fl">{{ item.dictLabel }}</span>
<span class="fr" style="color: var(--el-text-color-secondary)">{{ item.dictValue }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
<el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
</el-form-item>
</el-form>
<!-- 工具区域 -->
<el-row :gutter="15" class="mb10">
<el-col :span="1.5">
<el-button type="primary" v-hasPermi="['giftclaim:add']" plain icon="plus" @click="handleAdd">
{{ $t('btn.add') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="download" @click="handleExport" v-hasPermi="['giftclaim:export']">
{{ $t('btn.export') }}
</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table
:data="dataList"
v-loading="loading"
ref="table"
border
header-cell-class-name="el-table-header-cell"
highlight-current-row
@sort-change="sortChange">
<el-table-column prop="id" label="序号" align="center" width="80">
<template #default="scope">
{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="id" label="id" align="center" width="70" v-if="columns.showColumn('id')"> </el-table-column>
<el-table-column prop="userId" label="用户信息" align="center" width="300">
<template #default="scope">
<div class="user-info-container">
<div class="user-info-item">
<span class="info-label">openId</span>
<span class="info-value">{{ scope.row.userWxOpenId }}</span>
</div>
<div class="user-info-item">
<span class="info-label">姓名</span>
<span class="info-value">{{ scope.row.name }}</span>
</div>
<div class="user-info-item">
<span class="info-label">联系方式</span>
<span class="info-value">{{ scope.row.phone }}</span>
</div>
<div class="user-info-item">
<span class="info-label">工作单位</span>
<span class="info-value">{{ scope.row.company }}</span>
</div>
<div class="user-info-item">
<span class="info-label">收货地址</span>
<span class="info-value">{{ scope.row.address }}</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="productModel" label="产品信息" align="center" width="400" v-if="columns.showColumn('productModel')">
<template #default="scope">
<div class="product-info-container">
<div class="product-image">
<ImagePreview style="width: 80px; height: 80px; border-radius: 8px" :src="scope.row.productImage"></ImagePreview>
</div>
<div class="product-details">
<div class="product-info-item">
<span class="info-label">产品型号</span>
<span class="info-value">{{ scope.row.productModel }}</span>
</div>
<div class="product-info-item">
<span class="info-label">出品编号</span>
<span class="info-value">{{ scope.row.productSerialNumber }}</span>
</div>
<div class="product-info-item">
<span class="info-label">出品年月</span>
<span class="info-value">{{ scope.row.productDate }}</span>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="createdAt" label="时间信息" :show-overflow-tooltip="true" width="220">
<template #default="scope">
<div class="user-info-container">
<div class="user-info-item">
<span class="info-label" style="font-size: 12px; min-width: 50px">申请时间</span>
<span class="info-value" style="font-size: 12px">{{ scope.row.createdAt }}</span>
</div>
<div class="user-info-item">
<span class="info-label" style="font-size: 12px; min-width: 50px">审核时间</span>
<span class="info-value" style="font-size: 12px">{{ scope.row.reviewAt }}</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="status" label="审核状态" align="center" width="150">
<template #default="scope">
<div class="status-column">
<div class="status-tag-wrapper">
<dict-tag :options="options.gift_request_claim" :value="scope.row.status" />
</div>
<div class="audit-buttons" v-if="scope.row.status === 0">
<el-button size="small" type="success" plain @click="handleAudit(scope.row, 1)" v-hasPermi="['giftclaim:audit']"> 通过 </el-button>
<el-button size="small" type="danger" plain @click="handleAudit(scope.row, 2)" v-hasPermi="['giftclaim:audit']"> 拒绝 </el-button>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="操作" width="120">
<template #default="scope">
<el-button
type="success"
size="small"
icon="edit"
title="编辑"
v-hasPermi="['giftclaim:edit']"
@click="handleUpdate(scope.row)"></el-button>
<el-button
type="danger"
size="small"
icon="delete"
title="删除"
v-hasPermi="['giftclaim:delete']"
@click="handleDelete(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
<el-dialog :title="title" :lock-scroll="false" v-model="open">
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
<el-row :gutter="20">
<el-col :lg="12">
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入姓名" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item label="联系方式" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系方式" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item label="工作单位" prop="company">
<el-input v-model="form.company" placeholder="请输入工作单位" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item label="收货地址" prop="address">
<el-input v-model="form.address" placeholder="请输入收货地址" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item label="产品型号" prop="productModel">
<el-input v-model="form.productModel" placeholder="请输入产品型号" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item label="出品编号" prop="productSerialNumber">
<el-input v-model="form.productSerialNumber" placeholder="请输入出品编号" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item label="出品年月" prop="productDate">
<el-input v-model="form.productDate" placeholder="请输入出品年月" />
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item label="出品图片" prop="productImage">
<UploadImage v-model="form.productImage" :data="{ uploadType: 1 }" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item label="提交时间" prop="createdAt">
<el-date-picker v-model="form.createdAt" type="datetime" placeholder="选择日期时间" value-format="YYYY-MM-DD HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item label="审核状态" prop="status">
<el-select v-model="form.status" placeholder="请选择审核状态">
<el-option
v-for="item in options.gift_request_claim"
:key="item.dictValue"
:label="item.dictLabel"
:value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer v-if="opertype != 3">
<el-button text @click="cancel">{{ $t('btn.cancel') }}</el-button>
<el-button type="primary" :loading="state.submitLoading" @click="submitForm">{{ $t('btn.submit') }}</el-button>
</template>
</el-dialog>
</div>
</template>
<script setup name="giftclaim">
import { listGiftClaim, addGiftClaim, delGiftClaim, updateGiftClaim, getGiftClaim, updateGiftClaimStatus } from '@/api/business/giftclaim.js'
const { proxy } = getCurrentInstance()
const ids = ref([])
const loading = ref(false)
const showSearch = ref(true)
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
sort: 'Id',
sortType: 'desc',
name: undefined,
phone: undefined,
company: undefined,
address: undefined,
productModel: undefined,
productSerialNumber: undefined,
userWxOpenId: undefined,
status: undefined
})
const columns = ref([
{ visible: true, align: 'center', type: '', prop: 'id', label: '序号' },
{ visible: true, align: 'center', type: '', prop: 'id', label: 'id' },
{ visible: true, align: 'center', type: '', prop: 'userId', label: '用户信息' },
{ visible: true, align: 'center', type: '', prop: 'productModel', label: '产品信息', showOverflowTooltip: true },
{ visible: true, align: 'center', type: '', prop: 'createdAt', label: '申请时间', showOverflowTooltip: true },
{ visible: true, align: 'center', type: 'dict', prop: 'status', label: '审核状态', dictType: 'gift_request_claim', showOverflowTooltip: true }
//{ visible: false, prop: 'actions', label: '', type: 'slot', width: '160' }
])
const total = ref(0)
const dataList = ref([])
const queryRef = ref()
const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
var dictParams = ['gift_request_claim']
proxy.getDicts(dictParams).then((response) => {
response.data.forEach((element) => {
state.options[element.dictType] = element.list
})
})
function getList() {
loading.value = true
listGiftClaim(queryParams).then((res) => {
const { code, data } = res
if (code == 200) {
dataList.value = data.result
total.value = data.totalNum
loading.value = false
}
})
}
//
function handleQuery() {
queryParams.pageNum = 1
getList()
}
//
function resetQuery() {
proxy.resetForm('queryRef')
handleQuery()
}
//
function sortChange(column) {
var sort = undefined
var sortType = undefined
if (column.prop != null && column.order != null) {
sort = column.prop
sortType = column.order
}
queryParams.sort = sort
queryParams.sortType = sortType
handleQuery()
}
//
async function handleAudit(row, status) {
console.log(row, status)
var id = row.id
const res = await updateGiftClaimStatus(id, status)
if (res.code == 200) {
proxy.$modal.msgSuccess(status == 1 ? '审核成功' : '审核不通过')
getList()
}
}
/*************** form操作 ***************/
const formRef = ref()
const title = ref('')
// 1add 2edit 3view
const opertype = ref(0)
const open = ref(false)
const state = reactive({
single: true,
multiple: true,
submitLoading: false,
form: {},
rules: {
userId: [{ required: true, message: '用户ID不能为空', trigger: 'blur', type: 'number' }],
name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
phone: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }],
address: [{ required: true, message: '收货地址不能为空', trigger: 'blur' }],
productModel: [{ required: true, message: '产品型号不能为空', trigger: 'blur' }],
productSerialNumber: [{ required: true, message: '出品编号不能为空', trigger: 'blur' }],
productDate: [{ required: true, message: '出品年月不能为空', trigger: 'blur' }],
status: [{ required: true, message: '审核状态不能为空', trigger: 'change', type: 'number' }]
},
options: {
// eg:{ dictLabel: '', dictValue: '0'}
gift_request_claim: []
}
})
const { form, rules, options, single, multiple } = toRefs(state)
// dialog
function cancel() {
open.value = false
reset()
}
//
function reset() {
form.value = {
id: null,
userId: null,
name: null,
phone: null,
company: null,
address: null,
productModel: null,
productSerialNumber: null,
productDate: null,
productImage: null,
createdAt: null,
status: null
}
proxy.resetForm('formRef')
}
//
function handleAdd() {
reset()
open.value = true
state.submitLoading = false
title.value = '添加礼品申领表'
opertype.value = 1
}
//
function handleUpdate(row) {
reset()
state.submitLoading = false
const id = row.id || ids.value
getGiftClaim(id).then((res) => {
const { code, data } = res
if (code == 200) {
open.value = true
title.value = '修改礼品申领表'
opertype.value = 2
form.value = {
...data
}
}
})
}
// &
function submitForm() {
proxy.$refs['formRef'].validate((valid) => {
if (valid) {
state.submitLoading = true
if (form.value.id != undefined && opertype.value === 2) {
updateGiftClaim(form.value).then((res) => {
proxy.$modal.msgSuccess('修改成功')
open.value = false
getList()
})
} else {
addGiftClaim(form.value)
.then((res) => {
proxy.$modal.msgSuccess('新增成功')
open.value = false
getList()
})
.finally(() => {
setTimeout(() => {
state.submitLoading = false
}, 800)
})
}
}
})
}
//
function handleDelete(row) {
const Ids = row.id || ids.value
proxy
.$confirm('是否确认删除参数编号为"' + Ids + '"的数据项?', '警告', {
confirmButtonText: proxy.$t('common.ok'),
cancelButtonText: proxy.$t('common.cancel'),
type: 'warning'
})
.then(function () {
return delGiftClaim(Ids)
})
.then(() => {
getList()
proxy.$modal.msgSuccess('删除成功')
})
}
//
function handleExport() {
proxy
.$confirm('是否确认导出礼品申领表数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
await proxy.downFile('/business/GiftClaim/export', { ...queryParams })
})
}
handleQuery()
</script>
<style scoped>
/* 用户信息样式 */
.user-info-container {
padding: 8px;
text-align: left;
}
.user-info-item {
margin-bottom: 6px;
display: flex;
align-items: flex-start;
line-height: 1.4;
}
.user-info-item:last-child {
margin-bottom: 0;
}
/* 产品信息样式 */
.product-info-container {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 8px;
text-align: left;
}
.product-image {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}
.product-details {
flex: 1;
min-width: 0;
}
.product-info-item {
margin-bottom: 6px;
display: flex;
align-items: flex-start;
line-height: 1.4;
}
.product-info-item:last-child {
margin-bottom: 0;
}
/* 通用信息样式 */
.info-label {
font-weight: 500;
color: #606266;
white-space: nowrap;
margin-right: 4px;
min-width: 70px;
}
.info-value {
color: #303133;
word-break: break-all;
flex: 1;
}
/* 审核状态列样式 */
.status-column {
display: flex;
align-items: center;
justify-content: center;
gap: 10px; /* 标签和按钮之间的间距 */
flex-wrap: wrap; /* 允许换行 */
padding: 4px;
}
.status-tag-wrapper {
flex-shrink: 0; /* 防止标签收缩 */
margin-bottom: 4px;
}
.audit-buttons {
display: flex;
gap: 6px; /* 按钮之间的间距 */
flex-wrap: wrap; /* 小屏幕时允许按钮换行 */
}
.audit-buttons .el-button {
padding: 4px 8px; /* 紧凑的按钮内边距 */
font-size: 12px; /* 稍小的字体 */
border-radius: 4px;
transition: all 0.2s ease;
}
.audit-buttons .el-button:hover {
transform: translateY(-1px); /* 悬停时轻微上移效果 */
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
/* 响应式调整 */
@media (max-width: 768px) {
.product-info-container {
flex-direction: column;
align-items: center;
gap: 8px;
}
.product-image {
align-self: center;
}
.user-info-container,
.product-details {
font-size: 12px;
}
.info-label {
min-width: 60px;
font-size: 12px;
}
.status-column {
flex-direction: column; /* 小屏幕时垂直排列 */
gap: 6px;
}
.audit-buttons {
gap: 4px;
}
.audit-buttons .el-button {
padding: 2px 6px;
font-size: 11px;
}
/* 调整表格列宽度 */
.el-table-column[prop='status'] {
min-width: 140px;
}
}
</style>

View File

@ -0,0 +1,395 @@
<!--
* @Descripttion: (微信用户表/gift_user)
* @Author: (admin)
* @Date: (2025-07-30)
-->
<template>
<div>
<el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
<el-form-item label="昵称" prop="nickname">
<el-input v-model="queryParams.nickname" placeholder="请输入昵称" />
</el-form-item>
<el-form-item>
<el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
<el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
</el-form-item>
</el-form>
<!-- 工具区域 -->
<el-row :gutter="15" class="mb10">
<el-col :span="1.5">
<el-button type="primary" v-hasPermi="['giftuser:add']" plain icon="plus" @click="handleAdd">
{{ $t('btn.add') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="download" @click="handleExport" v-hasPermi="['giftuser:export']">
{{ $t('btn.export') }}
</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table
:data="dataList"
v-loading="loading"
ref="table"
border
header-cell-class-name="el-table-header-cell"
highlight-current-row
@sort-change="sortChange">
<el-table-column prop="id" label="主键ID" align="center" sortable v-if="columns.showColumn('id')" />
<el-table-column prop="openid" label="微信openid" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('openid')" />
<el-table-column prop="unionid" label="微信unionid" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('unionid')" />
<el-table-column prop="nickname" label="昵称" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('nickname')" />
<el-table-column prop="avatarUrl" label="头像URL" align="center" v-if="columns.showColumn('avatarUrl')">
<template #default="scope">
<ImagePreview :src="scope.row.avatarUrl"></ImagePreview>
</template>
</el-table-column>
<el-table-column prop="gender" label="性别" align="center" v-if="columns.showColumn('gender')">
<template #default="scope">
<dict-tag :options="options.sys_user_sex" :value="scope.row.gender" />
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('phone')" />
<el-table-column prop="status" label="状态" align="center" v-if="columns.showColumn('status')">
<template #default="scope">
<dict-tag :options="options.sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column
prop="lastLoginTime"
label="最后登录时间"
:show-overflow-tooltip="true"
sortable
v-if="columns.showColumn('lastLoginTime')" />
<el-table-column label="操作" width="160">
<template #default="scope">
<el-button type="primary" size="small" icon="view" title="详情" @click="handlePreview(scope.row)"></el-button>
<el-button
type="success"
size="small"
icon="edit"
title="编辑"
v-hasPermi="['giftuser:edit']"
@click="handleUpdate(scope.row)"></el-button>
<el-button
type="danger"
size="small"
icon="delete"
title="删除"
v-hasPermi="['giftuser:delete']"
@click="handleDelete(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
<el-dialog :title="title" :lock-scroll="false" v-model="open">
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
<el-row :gutter="20">
<el-col :lg="24">
<el-form-item label="微信openid" prop="openid">
<el-input v-model="form.openid" placeholder="请输入微信openid" />
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item label="微信unionid" prop="unionid">
<el-input v-model="form.unionid" placeholder="请输入微信unionid" />
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item label="昵称" prop="nickname">
<el-input v-model="form.nickname" placeholder="请输入昵称" />
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item label="头像URL" prop="avatarUrl">
<UploadImage v-model="form.avatarUrl" :data="{ uploadType: 1 }" />
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item label="性别" prop="gender">
<el-select v-model="form.gender" placeholder="请选择性别">
<el-option v-for="item in options.sys_user_sex" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item label="手机号" prop="phone">
<el-input v-model="form.phone" placeholder="请输入手机号" />
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio v-for="item in options.sys_normal_disable" :key="item.dictValue" :value="item.dictValue">
{{ item.dictLabel }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item label="最后登录时间" prop="lastLoginTime">
<el-date-picker v-model="form.lastLoginTime" type="datetime" placeholder="选择日期时间" value-format="YYYY-MM-DD HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer v-if="opertype != 3">
<el-button text @click="cancel">{{ $t('btn.cancel') }}</el-button>
<el-button type="primary" :loading="state.submitLoading" @click="submitForm">{{ $t('btn.submit') }}</el-button>
</template>
</el-dialog>
</div>
</template>
<script setup name="giftuser">
import { listGiftUser, addGiftUser, delGiftUser, updateGiftUser, getGiftUser } from '@/api/business/giftuser.js'
const { proxy } = getCurrentInstance()
const ids = ref([])
const loading = ref(false)
const showSearch = ref(true)
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
sort: 'Id',
sortType: 'desc',
nickname: undefined
})
const columns = ref([
{ visible: true, align: 'center', type: '', prop: 'id', label: '主键ID' },
{ visible: true, align: 'center', type: '', prop: 'openid', label: '微信openid', showOverflowTooltip: true },
{ visible: true, align: 'center', type: '', prop: 'unionid', label: '微信unionid', showOverflowTooltip: true },
{ visible: true, align: 'center', type: '', prop: 'nickname', label: '昵称', showOverflowTooltip: true },
{ visible: true, align: 'center', type: 'img', prop: 'avatarUrl', label: '头像URL', showOverflowTooltip: true },
{ visible: true, align: 'center', type: 'dict', prop: 'gender', label: '性别', showOverflowTooltip: true, dictType: 'sys_user_sex' },
{ visible: true, align: 'center', type: '', prop: 'phone', label: '手机号', showOverflowTooltip: true },
{ visible: true, align: 'center', type: 'dict', prop: 'status', label: '状态', showOverflowTooltip: true, dictType: 'sys_normal_disable' },
{ visible: false, align: 'center', type: '', prop: 'lastLoginTime', label: '最后登录时间', showOverflowTooltip: true }
//{ visible: false, prop: 'actions', label: '', type: 'slot', width: '160' }
])
const total = ref(0)
const dataList = ref([])
const queryRef = ref()
const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
var dictParams = ['sys_user_sex', 'sys_normal_disable']
proxy.getDicts(dictParams).then((response) => {
response.data.forEach((element) => {
state.options[element.dictType] = element.list
})
})
function getList() {
loading.value = true
listGiftUser(queryParams).then((res) => {
const { code, data } = res
if (code == 200) {
dataList.value = data.result
total.value = data.totalNum
loading.value = false
}
})
}
//
function handleQuery() {
queryParams.pageNum = 1
getList()
}
//
function resetQuery() {
proxy.resetForm('queryRef')
handleQuery()
}
//
function sortChange(column) {
var sort = undefined
var sortType = undefined
if (column.prop != null && column.order != null) {
sort = column.prop
sortType = column.order
if (column.prop == 'lastLoginTime') {
sort = 'last_login_time'
}
if (column.prop == 'createTime') {
sort = 'create_time'
}
}
queryParams.sort = sort
queryParams.sortType = sortType
handleQuery()
}
/*************** form操作 ***************/
const formRef = ref()
const title = ref('')
// 1add 2edit 3view
const opertype = ref(0)
const open = ref(false)
const state = reactive({
single: true,
multiple: true,
submitLoading: false,
form: {},
rules: {
openid: [{ required: true, message: '微信openid不能为空', trigger: 'blur' }],
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
},
options: {
// eg:{ dictLabel: '', dictValue: '0'}
sys_user_sex: [],
// eg:{ dictLabel: '', dictValue: '0'}
sys_normal_disable: []
}
})
const { form, rules, options, single, multiple } = toRefs(state)
// dialog
function cancel() {
open.value = false
reset()
}
//
function reset() {
form.value = {
id: null,
openid: null,
unionid: null,
nickname: null,
avatarUrl: null,
gender: null,
phone: null,
status: null,
lastLoginTime: null,
createTime: null,
updateTime: null
}
proxy.resetForm('formRef')
}
/**
* 查看
* @param {*} row
*/
function handlePreview(row) {
reset()
const id = row.id
getGiftUser(id).then((res) => {
const { code, data } = res
if (code == 200) {
open.value = true
title.value = '查看'
opertype.value = 3
form.value = {
...data
}
}
})
}
//
function handleAdd() {
reset()
open.value = true
state.submitLoading = false
title.value = '添加微信用户表'
opertype.value = 1
}
//
function handleUpdate(row) {
reset()
state.submitLoading = false
const id = row.id || ids.value
getGiftUser(id).then((res) => {
const { code, data } = res
if (code == 200) {
open.value = true
title.value = '修改微信用户表'
opertype.value = 2
form.value = {
...data
}
}
})
}
// &
function submitForm() {
proxy.$refs['formRef'].validate((valid) => {
if (valid) {
state.submitLoading = true
if (form.value.id != undefined && opertype.value === 2) {
updateGiftUser(form.value).then((res) => {
proxy.$modal.msgSuccess('修改成功')
open.value = false
getList()
})
} else {
addGiftUser(form.value)
.then((res) => {
proxy.$modal.msgSuccess('新增成功')
open.value = false
getList()
})
.finally(() => {
setTimeout(() => {
state.submitLoading = false
}, 800)
})
}
}
})
}
//
function handleDelete(row) {
const Ids = row.id || ids.value
proxy
.$confirm('是否确认删除参数编号为"' + Ids + '"的数据项?', '警告', {
confirmButtonText: proxy.$t('common.ok'),
cancelButtonText: proxy.$t('common.cancel'),
type: 'warning'
})
.then(function () {
return delGiftUser(Ids)
})
.then(() => {
getList()
proxy.$modal.msgSuccess('删除成功')
})
}
//
function handleExport() {
proxy
.$confirm('是否确认导出微信用户表数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
await proxy.downFile('/business/GiftUser/export', { ...queryParams })
})
}
handleQuery()
</script>

View File

@ -6,7 +6,7 @@
<svg-icon name="peoples" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<el-statistic :title="$t('layout.onlineUsers')" :value="state.onlineNum" />
<el-statistic title="申请人数" :value="state.onlineNum" />
</div>
</div>
</el-col>
@ -16,7 +16,7 @@
<svg-icon name="message" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<el-statistic :value="state.order" :title="$t('layout.message')"> </el-statistic>
<el-statistic title="审核人数" :value="state.order"> </el-statistic>
</div>
</div>
</el-col>
@ -34,39 +34,6 @@
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('shoppings')">
<div class="card-panel-icon-wrapper icon-shopping">
<svg-icon name="shopping" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<el-statistic :value="state.order" :title="$t('layout.order')">
<template #title>
<div style="display: inline-flex; align-items: center">{{ $t('layout.order') }}</div>
</template>
</el-statistic>
<div class="statistic-footer">
<div class="footer-item">
<span>环比</span>
<span style="color: green">
16%
<el-icon>
<CaretTop />
</el-icon>
</span>
<span>同比</span>
<span style="color: red">
-16%
<el-icon>
<CaretBottom />
</el-icon>
</span>
</div>
</div>
</div>
</div>
</el-col>
</el-row>
</template>

15
src/views/gift/list.vue Normal file
View File

@ -0,0 +1,15 @@
<template>
<div class="app-container home">礼品列表</div>
</template>
<script setup name="index">
import defaultSettings from '@/settings'
const version = defaultSettings.version
</script>
<style scoped lang="scss">
.home {
}
</style>

View File

@ -1,162 +1,56 @@
<template>
<div class="app-container home">
<noticeBar :dataList="noticeList"> </noticeBar>
<el-row :gutter="20">
<el-col :sm="24" :lg="24">
<blockquote class="text-warning" style="font-size: 14px">
阿里云特惠专区
<el-link href="https://www.aliyun.com/minisite/goods?userCode=uotn5vt1&share_source=copy_link" type="primary" target="_black">
点我进入
</el-link>
<br />
领取腾讯云通用云产品新用户专属大礼包2860优惠券每种代金券限量500张先到先得
<el-link href="https://curl.qcloud.com/5J4nag8D" type="primary" target="_blank"> 点我进入 </el-link>
<br />
<div class="home">
<!-- 用户信息 -->
<el-row :gutter="15">
<el-col :md="24" :lg="16" :xl="24" class="mb10">
<el-card shadow="hover">
<div class="user-item">
<div class="user-item-left">
<el-avatar :size="60" shape="circle" :src="userInfo.avatar" />
</div>
腾讯云限时秒杀活动
<el-link href="https://curl.qcloud.com/4yEoRquq" type="primary" target="_blank">点我进入 </el-link>
<br />
华为特惠专区多款产品限时特价
<el-link
href="https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=a53709d1-149d-49f4-9b89-bf62bd96ef65&utm_source=aGlkX3N0dnZkMWNxejBnOTJ5OA===&utm_medium=cps&utm_campaign=201905"
type="primary"
target="_blank">
点我进入
</el-link>
<br />
领取七牛云通用云产品优惠券
<el-link href="https://s.qiniu.com/FzEfay" type="primary" target="_blank"> 点我进入 </el-link>
<br />
Gitee 企业版优惠专区
<el-link href="https://gitee.com/enterprises?invite_code=Z2l0ZWUtMTI1NzM1OQ%3D%3D" type="primary" target="_blank"> 点我进入 </el-link>
<br />
<h4 class="text-danger">云产品通用红包可叠加官网常规优惠使用(仅限新用户)</h4>
</blockquote>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :lg="16" :sm="24">
<h2>ZRAdmin.NET {{ $t('layout.backstageManagement') }}</h2>
<p>
ZRAdmin.NET借鉴了很多开源项目的优点让你开发Web管理系统更简单所以我也把它给开源了前端
<code>vue页面</code>主要使用了若依后端参考Ruoyi SpringBoot版本在此表示感谢.)
</p>
<p>{{ $t('layout.content1') }}</p>
<p>
<b>{{ $t('layout.currentVersion') }}:</b> <span>v{{ version }}</span>
<el-link
class="ml10"
type="primary"
size="small"
icon="Document"
plain
@click="goTarget('http://www.izhaorui.cn/doc/changelog.html#' + version)"
>{{ $t('layout.changeLog') }}
</el-link>
</p>
<p>
<el-button type="primary" size="small" icon="Cloudy" plain @click="goTarget('https://gitee.com/izory/ZrAdminNetCore')">Gitee </el-button>
<el-button type="primary" size="small" icon="Cloudy" plain @click="goTarget('https://github.com/izhaorui/ZrAdmin.NET')"
>Github
</el-button>
</p>
<p></p>
<h3>{{ $t('layout.tip1') }}</h3>
</el-col>
<el-col :lg="8" :sm="24">
<h2>{{ $t('layout.technicalSelection') }}</h2>
<div style="float: left; width: 50%">
<h4>{{ $t('layout.backendTechnology') }}</h4>
<ul>
<li>NET8</li>
<li>JWT</li>
<li>SqlSugar</li>
<li>Quartz.Net</li>
<li>Mapster</li>
<li>MiniExcel</li>
<li>Redis</li>
<li>Signalr</li>
<li>...</li>
</ul>
</div>
<div style="float: right; width: 50%">
<h4>{{ $t('layout.frontendTechnology') }}</h4>
<ul>
<li>Vue3</li>
<li>Pinia</li>
<li>Element plus</li>
<li>Axios</li>
<li>Sass</li>
<li>Wangeditor</li>
<li>Vite</li>
<li>Composition api</li>
<li>I18n</li>
<li>...</li>
</ul>
</div>
</el-col>
</el-row>
<el-divider />
<el-row :gutter="20" class="mt10">
<el-col :sm="24" :lg="8">
<el-card>
<template #header>
<span>{{ $t('layout.donationSupport') }}</span>
</template>
<div class="body">
<div style="color: red">{{ $t('layout.rewardUser') }}</div>
<img src="@/assets/images/reward.jpg" alt="donate" style="width: 100%" />
<div class="user-item-right">
<el-row>
<el-col :xs="24" :md="24" class="right-title mb20 one-text-overflow">
<div class="mb10">
{{ userInfo.welcomeMessage }} <strong>{{ userInfo.nickName }}</strong>
<span>({{ userInfo.welcomeContent }})</span>
</div>
</el-col>
</el-row>
<el-row>
<el-button icon="edit">
<router-link to="/user/profile">{{ $t('layout.modifyInformation') }}</router-link>
</el-button>
</el-row>
</div>
</div>
</el-card>
</el-col>
<el-col :sm="24" :lg="10">
<el-card>
<template #header>
<span>
移动端体验
<span style="color: red">如有需要联系作者</span>
</span>
</template>
<div class="body">
<table style="width: 100%; text-align: center">
<tbody>
<tr>
<td>微信小程序</td>
<td>H5</td>
</tr>
<tr>
<td>
<img src="@/assets/images/qrcode.jpg" alt="donate" style="width: 160px" />
</td>
<td>
<img src="@/assets/images/qrcodeH5.png" alt="donate" style="width: 160px" />
</td>
</tr>
</tbody>
</table>
<el-col :lg="8" class="mb10">
<el-card style="height: 100%">
<div class="text-warning mb10">{{ currentTime }} {{ weekName }}</div>
<div class="work-wrap">
<el-statistic title="申请数量" :value="statistics.nowCount" />
<el-statistic title="待审核数量" :value="statistics.shenhe" />
<el-statistic title="审核通过" :value="statistics.shenhe1" />
<el-statistic title="审核未通过" :value="statistics.shenhe2" />
</div>
</el-card>
</el-col>
<el-col :sm="24" :lg="6">
<el-card>
</el-row>
<el-row :gutter="15">
<el-col :md="24" :lg="24" :xl="24" class="mb10">
<el-card shadow="hover">
<template #header>
<span>{{ $t('layout.contactUs') }}</span>
<span><svg-icon name="tool" /> {{ $t('layout.commonFuncs') }}</span>
<div class="home-card-more">
<el-button text @click="handleAdd()">{{ $t('btn.add') }}</el-button>
</div>
</template>
<div class="body">
<p>
<el-icon> <promotion /> </el-icon>{{ $t('layout.officialWebsite') }}
<el-link href="http://www.izhaorui.cn" target="_blank"> http://www.izhaorui.cn </el-link>
</p>
<p>
<el-icon> <UserFilled /> </el-icon>{{ $t('layout.qqGroup') }}
<s>满191349103</s>
<s>满462862273</s>
<s>满658227537</s>
<el-link target="_black" href="https://qm.qq.com/q/e8uHl134qc"> &nbsp;1026662023 </el-link>
</p>
<div>
<el-scrollbar wrap-class="scrollbar-wrapper"> <CommonMenu v-model="showEdit"></CommonMenu></el-scrollbar>
</div>
</el-card>
</el-col>
@ -165,79 +59,94 @@
</template>
<script setup name="index">
import noticeBar from '@/components/NoticeBar/index'
import PanelGroup from './dashboard/PanelGroup'
import CommonMenu from './components/CommonMenu'
import { getGiftClaimSatistics } from '@/api/business/giftclaim.js'
import dayjs from 'dayjs'
//
import duration from 'dayjs/plugin/duration'
dayjs.extend(duration)
const noticeList = ref(['官网地址http://www.izhaorui.cn', 'ZRAdmin.NET后台管理系统'])
import useUserStore from '@/store/modules/user'
import useSocketStore from '@/store/modules/socket'
import { getWeek } from '@/utils/ruoyi'
import defaultSettings from '@/settings'
const version = defaultSettings.version
const showEdit = ref(false)
const { proxy } = getCurrentInstance()
let statistics = ref({
nowCount: 0,
shenhe: 0,
shenhe1: 0,
shenhe2: 0
})
const userInfo = computed(() => {
return useUserStore().userInfo
})
const onlineInfo = computed(() => {
return useSocketStore().onlineInfo
})
const currentTime = computed(() => {
return proxy.parseTime(new Date(), 'YYYY-MM-DD')
})
const weekName = getWeek()
function goTarget(url) {
window.open(url, '__blank')
function handleSetLineChartData(type) {
//
console.log('切换图表类型:', type)
}
function handleAdd() {
proxy.$modal.msg('请通过搜索添加')
}
getGiftClaimSatistics().then((res) => {
console.log(res)
statistics.value.nowCount = res.data.nowCount
statistics.value.shenhe = res.data.shenheCount
statistics.value.shenhe1 = res.data.shenheCount1
statistics.value.shenhe2 = res.data.shenheCount2
})
function workTimeFormatter(val) {
return dayjs.duration(val * 60, 'second').format('HH时mm分')
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.home {
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eee;
.home-card-more {
float: right;
padding: 3px 0;
font-size: 13px;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eee;
}
.col-item {
margin-bottom: 20px;
}
ul {
padding: 0;
margin: 0;
}
font-family: 'open sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 13px;
color: #676a6c;
overflow-x: hidden;
ul {
list-style-type: none;
}
h4 {
margin-top: 0px;
}
h2 {
margin-top: 10px;
font-size: 26px;
font-weight: 100;
}
p {
margin-top: 10px;
b {
font-weight: 700;
.user-item {
display: flex;
align-items: center;
.user-item-left {
width: 60px;
height: 60px;
overflow: hidden;
margin-right: 10px;
}
.user-item-right {
flex: 1;
.right-title {
font-size: 20px;
}
}
}
.update-log {
ol {
display: block;
list-style-type: decimal;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 40px;
.work-wrap {
display: grid;
grid-template-columns: repeat(4, 25%);
.item {
text-align: center;
.name {
color: #606666;
}
}
}
}

94
src/views/mp/settings.vue Normal file
View File

@ -0,0 +1,94 @@
<template>
<div class="app-container">
<el-form :model="form" ref="formRef" @submit.prevent>
<el-row class="mb10">
<el-col :lg="24">
<el-form-item>
<UploadImage ref="uploadRef" v-model="form.homeImage" :limit="1" :fileSize="15" style="width: 100px" :data="{ storeType: 2 }">
<template #icon>
<div class="upload-wrap">
<el-icon class="avatar-uploader-icon"><plus /></el-icon>
<div>首页宣传图片</div>
</div>
</template>
</UploadImage>
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item>
<UploadImage ref="uploadRef" v-model="form.extend" :limit="1" :fileSize="15" style="width: 100px" :data="{ storeType: 2 }">
<template #icon>
<div class="upload-wrap">
<el-icon class="avatar-uploader-icon"><plus /></el-icon>
<div>首页礼品图片</div>
</div>
</template>
</UploadImage>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="btn-wrap">
<el-button type="success" @click="handlePublish">保存</el-button>
</div>
</div>
</template>
<script setup name="mp_settings">
import useSettingsStore from '@/store/modules/settings'
import { getGiftConfig, updateGiftConfig } from '@/api/business/giftconfig.js'
const settingsStore = useSettingsStore()
const { proxy } = getCurrentInstance()
const formRef = ref()
const uploadRef = ref()
const form = reactive({
homeImage: '',
extend: '',
extend1: '',
id: 0
})
/** 提交按钮 */
async function handlePublish() {
await updateGiftConfig(form)
proxy.$modal.msgSuccess('保存成功')
}
function getList() {
getGiftConfig(0).then((res) => {
const { code, data } = res
if (code == 200) {
console.log(data)
form.homeImage = data.homeImage ?? ''
form.id = data.id
form.extend = data.extend
}
})
}
getList()
</script>
<style scoped>
.app-container {
position: relative;
}
.upload-wrap {
display: flex;
align-items: center;
flex-direction: column;
color: #ccc;
}
.btn-wrap {
z-index: 10;
width: 100%;
background: #fff;
padding: 3px 20px;
display: flex;
align-items: center;
position: fixed;
bottom: var(--base-footer-height);
}
</style>

13
src/views/record/list.vue Normal file
View File

@ -0,0 +1,13 @@
<template>
<div class="app-container home">礼品列表</div>
</template>
<script setup name="record_list">
import defaultSettings from '@/settings'
const version = defaultSettings.version
</script>
<style scoped lang="scss">
.home {
}
</style>