feat: 新增
This commit is contained in:
parent
03b0f59ebd
commit
71fa79462f
|
@ -0,0 +1,76 @@
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
export interface Carousel {
|
||||||
|
id: number;
|
||||||
|
created_at: Date;
|
||||||
|
updated_at: Date;
|
||||||
|
img_url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Data {
|
||||||
|
carousel: Carousel[];
|
||||||
|
carouselad: Carousel[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface res_carousel {
|
||||||
|
status: string;
|
||||||
|
code: number;
|
||||||
|
data: Data;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取轮播图
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getCarousel() {
|
||||||
|
return axios.post<res_carousel>('/admin/api/v1/carousel/get_carousel');
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*获取广告轮播图
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getCarouselAd() {
|
||||||
|
return axios.post<res_carousel>('/admin/api/v1/carousel/get_carouselad');
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 添加轮播图 类型0是首页轮播图1是广告图
|
||||||
|
* @param img_url
|
||||||
|
* @param type
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function carouselAdd(img_url:string,type:Number) {
|
||||||
|
return axios.post<res_carousel>('/admin/api/v1/carousel/add',{img_url,type});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 删除轮播图
|
||||||
|
* @param id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function carouselDel(id:number,type:Number) {
|
||||||
|
return axios.post<res_carousel>('/admin/api/v1/carousel/del',{id,type});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 替换轮播图
|
||||||
|
* @param id
|
||||||
|
* @param type
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function carouselChang(id:number,type:Number,img_url:string) {
|
||||||
|
return axios.post<res_carousel>('/admin/api/v1/carousel/chang',{id,type,img_url});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取所有汇率
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getAll() {
|
||||||
|
return axios.post<res_carousel>('/api/v1/dictionary/lists');
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 更新汇率
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function setAll(item:any) {
|
||||||
|
return axios.post<res_carousel>('/api/v1/dictionary/updateId',item);
|
||||||
|
}
|
|
@ -34,6 +34,8 @@ import localevolunteerservicecorps from '@/views/volunteerservicecorps/locale/zh
|
||||||
|
|
||||||
import localeJobuser from '@/views/jobuser/locale/zh-CN';
|
import localeJobuser from '@/views/jobuser/locale/zh-CN';
|
||||||
import localeJUserblack from '@/views/userblack/locale/zh-CN';
|
import localeJUserblack from '@/views/userblack/locale/zh-CN';
|
||||||
|
|
||||||
|
import localeDictionary from '@/views/dictionary/locale/zh-CN';
|
||||||
export default {
|
export default {
|
||||||
'menu.dashboard': '仪表盘',
|
'menu.dashboard': '仪表盘',
|
||||||
'menu.server.dashboard': '仪表盘-服务端',
|
'menu.server.dashboard': '仪表盘-服务端',
|
||||||
|
@ -55,6 +57,7 @@ export default {
|
||||||
'menu.carousel':'汇率',
|
'menu.carousel':'汇率',
|
||||||
'menu.volunteerservicecorps':'志愿队',
|
'menu.volunteerservicecorps':'志愿队',
|
||||||
'menu.jobuser':'用户',
|
'menu.jobuser':'用户',
|
||||||
|
"menu.dictionary":'客服',
|
||||||
...localeSettings,
|
...localeSettings,
|
||||||
...localeMessageBox,
|
...localeMessageBox,
|
||||||
...localeLogin,
|
...localeLogin,
|
||||||
|
@ -80,5 +83,6 @@ export default {
|
||||||
...localecarousel,
|
...localecarousel,
|
||||||
...localevolunteerservicecorps,
|
...localevolunteerservicecorps,
|
||||||
...localeJobuser,
|
...localeJobuser,
|
||||||
...localeJUserblack
|
...localeJUserblack,
|
||||||
|
...localeDictionary
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
import { DEFAULT_LAYOUT } from '../base';
|
||||||
|
import { AppRouteRecordRaw } from '../types';
|
||||||
|
|
||||||
|
const LIST: AppRouteRecordRaw = {
|
||||||
|
path: '/dictionary',
|
||||||
|
name: 'dictionary',
|
||||||
|
component: DEFAULT_LAYOUT,
|
||||||
|
meta: {
|
||||||
|
locale: 'menu.dictionary',
|
||||||
|
requiresAuth: true,
|
||||||
|
icon: 'icon-menu-unfold',
|
||||||
|
order: 3,
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'dictionarylist', // The midline path complies with SEO specifications
|
||||||
|
name: 'dictionarylist',
|
||||||
|
component: () => import('@/views/dictionary/index.vue'),
|
||||||
|
meta: {
|
||||||
|
locale: 'menu.dictionarylist.Table',
|
||||||
|
requiresAuth: true,
|
||||||
|
roles: ['*'],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default LIST;
|
|
@ -0,0 +1,68 @@
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<Breadcrumb :items="['menu.dictionary', 'menu.dictionarylist.Table']" />
|
||||||
|
<a-card class="general-card" :title="$t('menu.dictionarylist.Table')">
|
||||||
|
<!-- 100 积分 = 0.00 USDT
|
||||||
|
100 积分 = 30 NGN
|
||||||
|
100 积分 = 1TRX
|
||||||
|
100 积分 = 1.62 INR
|
||||||
|
100 积分 = 0.080 BRL
|
||||||
|
100 积分 = 5 PKR -->
|
||||||
|
<h2 style="text-align: center;">设置客服地址</h2>
|
||||||
|
<a-form :model="form" auto-label-width @submit="handleSubmit">
|
||||||
|
<a-form-item field="service_1" label="whatsapp 频道">
|
||||||
|
<a-input v-model="form.service_1" placeholder="请输入对应的地址" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="service_2" label="telegram 群组">
|
||||||
|
<a-input v-model="form.service_2" placeholder="请输入对应的地址" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="service_3" label="telegram 频道">
|
||||||
|
<a-input v-model="form.service_3" placeholder="请输入对应的地址" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="service_url" label="留言客服">
|
||||||
|
<a-input v-model="form.service_url" placeholder="请输入对应的地址" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="service_user_url" label="人工客服">
|
||||||
|
<a-input v-model="form.service_user_url" placeholder="请输入对应的地址" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item>
|
||||||
|
<a-button html-type="submit">保存</a-button>
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</a-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { setAll, getAll } from '@/api/dictionary';
|
||||||
|
import { ref, onMounted,reactive } from 'vue';
|
||||||
|
import { IconFolderAdd } from '@arco-design/web-vue/es/icon';
|
||||||
|
// import carouselitem from './components/carouselitem.vue';
|
||||||
|
const form = reactive({
|
||||||
|
service_1:"",
|
||||||
|
service_2:"",
|
||||||
|
service_3:"",
|
||||||
|
service_url:"",
|
||||||
|
service_user_url:""
|
||||||
|
});
|
||||||
|
const handleSubmit=()=>{
|
||||||
|
setAll(form)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async ()=>{
|
||||||
|
const res=await getAll()
|
||||||
|
for(let i of res.data){
|
||||||
|
form[i.key]=i.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
padding: 0 20px 20px 20px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,6 @@
|
||||||
|
export default {
|
||||||
|
'menu.dictionary.basic': 'Basic Profile',
|
||||||
|
'menu.carousel.Table': 'carousel Table',
|
||||||
|
'menu.carouselad.Table': 'carouselad Table',
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
export default {
|
||||||
|
'menu.dictionary.basic': '客服',
|
||||||
|
'menu.dictionarylist.Table': '客服设置',
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue