@@ -0,0 +1,3 @@ | |||
{ | |||
"vue3snippets.enable-compile-vue-file-on-did-save-code": true | |||
} |
@@ -18,6 +18,9 @@ import basicSetting from './modules/basic-setting' | |||
import setAdvertising from './modules/set-advertising' | |||
import home from './modules/home' | |||
import mobTemplate from './modules/push-settings' | |||
@@ -96,6 +99,7 @@ export const asyncRoutes = [ | |||
booksManagement, | |||
sortManagement, | |||
setAdvertising, | |||
mobTemplate, | |||
// 404 page must be placed at the end !!! | |||
{ path: '*', redirect: '/404', hidden: true } | |||
] | |||
@@ -0,0 +1,29 @@ | |||
/** When your routing table is too long, you can split it into small modules **/ | |||
import Layout from '@/layout' | |||
const mobTemplate = { | |||
path: 'mob-template', | |||
component: Layout, | |||
redirect: 'push-settings', | |||
name: 'push-settings', | |||
meta: { | |||
title: '设置中心', | |||
icon: 'el-icon-s-home' | |||
}, | |||
children: [ | |||
{ | |||
path: '/push-settings/mob-template', | |||
component: () => import('@/views/push-settings/mob-template/mob-template'), | |||
name: 'mob-template', | |||
meta: { title: 'mob短信模版设置' } | |||
}, | |||
{ | |||
path: '/push-settings/niu-yun', | |||
component: () => import('@/views/push-settings/niu-yun/niu-yun'), | |||
name: 'niu-yun', | |||
meta: { title: '七牛云' } | |||
}, | |||
] | |||
} | |||
export default mobTemplate |
@@ -47,7 +47,7 @@ | |||
.el-table th.is-leaf, .el-table td { | |||
border-bottom: 0; | |||
} | |||
} | |||
el-table__row > td { | |||
border: none; | |||
@@ -63,4 +63,14 @@ | |||
color: #3DA2FF; | |||
border: none; | |||
box-shadow: 0px 0px 20px rgb(211, 211, 211); | |||
} | |||
} | |||
.mob-template { | |||
.el-form-item__content { | |||
margin-left: 0 !important; | |||
max-width: 400px; | |||
width: 50%; | |||
} | |||
} |
@@ -75,17 +75,17 @@ service.interceptors.response.use( | |||
return error.response.data | |||
} | |||
// 登录超时,重新登录 | |||
// if (error.response.data.code === 403) { | |||
// store.dispatch('user/resetToken').then(() => { | |||
// location.reload() | |||
// }) | |||
// Message({ | |||
// message: '登录超时,请重新登录', | |||
// type: 'error', | |||
// duration: 5 * 1000 | |||
// }) | |||
// return | |||
// } | |||
if (error.response.data.code === 403) { | |||
store.dispatch('user/resetToken').then(() => { | |||
location.reload() | |||
}) | |||
Message({ | |||
message: '登录超时,请重新登录', | |||
type: 'error', | |||
duration: 5 * 1000 | |||
}) | |||
return | |||
} | |||
Message({ | |||
message: errorMsg ?? error, | |||
@@ -22,7 +22,7 @@ | |||
@click="onBooksAdd(scope.$index)" | |||
></el-button> | |||
<el-tag style="margin-left: 10px" v-if="scope.row.value">{{ | |||
scope.row.value | onValueBooks | |||
scope.row.book_info.book_name | |||
}}</el-tag> | |||
</template> | |||
</el-table-column> | |||
@@ -167,12 +167,6 @@ import { getHomePage, homeSetting } from "@/api/home"; | |||
getHomePage; | |||
export default { | |||
filters: { | |||
onValueBooks(data) { | |||
console.log(data); | |||
return data; | |||
}, | |||
}, | |||
components: { | |||
ActionButton, | |||
CustomButton, | |||
@@ -182,22 +176,8 @@ export default { | |||
return { | |||
selectIndex: null, | |||
isBooksShow: false, | |||
banner: [ | |||
{ name: "", value: "", status: "" }, | |||
{ name: "", value: "", status: "" }, | |||
], | |||
book_show: [ | |||
{ | |||
name: "", | |||
value: { style: "", category_id: "" }, | |||
status: "", | |||
}, | |||
{ | |||
name: "", | |||
value: { style: "", category_id: "" }, | |||
status: "", | |||
}, | |||
], | |||
banner: [], | |||
book_show: [], | |||
booksData: [], | |||
options: [ | |||
{ | |||
@@ -221,8 +201,28 @@ export default { | |||
// 初始化 | |||
init() { | |||
getHomePage().then((res) => { | |||
this.banner = res.data.banner; | |||
this.book_show = res.data.book_show; | |||
if (res.data.banner) { | |||
this.banner = res.data.banner; | |||
this.book_show = res.data.book_show; | |||
} else { | |||
this.book_show = [ | |||
{ | |||
name: "", | |||
value: { style: "", category_id: "" }, | |||
status: "", | |||
}, | |||
{ | |||
name: "", | |||
value: { style: "", category_id: "" }, | |||
status: "", | |||
}, | |||
]; | |||
this.banner = [ | |||
{ name: "", value: "", status: "" }, | |||
{ name: "", value: "", status: "" }, | |||
]; | |||
} | |||
}); | |||
}, | |||
@@ -237,16 +237,17 @@ export default { | |||
onSelectItem(data) { | |||
this.isBooksShow = false; | |||
this.banner[this.selectIndex].value = data.book_name; | |||
this.banner[this.selectIndex].value = data.book_id; | |||
this.banner[this.selectIndex].book_info = data; | |||
}, | |||
// 删除banner | |||
onDeleteBanner(i) { | |||
this.banner.splice(i,1) | |||
this.banner.splice(i, 1); | |||
}, | |||
onDeleteBook(i) { | |||
this.book_show.splice(i,1) | |||
this.book_show.splice(i, 1); | |||
}, | |||
// 刷新 | |||
@@ -280,9 +281,6 @@ export default { | |||
}, | |||
submitForm() { | |||
console.log(this.book_show); | |||
console.log(this.banner); | |||
homeSetting({ | |||
book_show: this.book_show, | |||
banner: this.banner, | |||
@@ -292,9 +290,9 @@ export default { | |||
this.$message.success("保存成功"); | |||
}); | |||
}, | |||
resetForm(){ | |||
this.init() | |||
} | |||
resetForm() { | |||
this.init(); | |||
}, | |||
}, | |||
}; | |||
</script> | |||
@@ -0,0 +1,60 @@ | |||
<template> | |||
<div class="mob-template"> | |||
<el-main> | |||
<el-form> | |||
<el-form-item label="默认短信模版id:" prop="zhimeng.app_key" label-width="250px"> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item label="登录短信模版id:" prop="zhimeng.app_key" label-width="250px"> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item label="注册短信模版id:" prop="zhimeng.app_key" label-width="250px"> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item | |||
label="绑定支付宝短信模版id:" | |||
prop="zhimeng.app_key" | |||
label-width="250px" | |||
> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item | |||
label="解除绑定支付宝短信模版id:" | |||
prop="zhimeng.app_key" | |||
label-width="250px" | |||
> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item | |||
label="解除绑定手机短信模版id:" | |||
prop="zhimeng.app_key" | |||
label-width="250px" | |||
> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item | |||
label="绑定手机短信模版id:" | |||
prop="zhimeng.app_key" | |||
label-width="250px" | |||
> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
</el-form> | |||
</el-main> | |||
</div> | |||
</template> | |||
<script> | |||
export default {}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.el-form { | |||
padding: 20px; | |||
} | |||
.el-form-item { | |||
display: flex; | |||
width: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,58 @@ | |||
<template> | |||
<div class="mob-template"> | |||
<el-main> | |||
<el-form> | |||
<el-form-item | |||
label="七牛云存储AccessKey:" | |||
prop="zhimeng.app_key" | |||
label-width="250px" | |||
> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item | |||
label="七牛云存储SecretKey:" | |||
prop="zhimeng.app_key" | |||
label-width="250px" | |||
> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item | |||
label="七牛云存储空间名:" | |||
prop="zhimeng.app_key" | |||
label-width="250px" | |||
> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item | |||
label="七牛云存储bucket域名:" | |||
prop="zhimeng.app_key" | |||
label-width="250px" | |||
> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
<el-form-item | |||
label="七牛云存储文件所属区域:" | |||
prop="zhimeng.app_key" | |||
label-width="250px" | |||
> | |||
<el-input show-password></el-input> | |||
</el-form-item> | |||
</el-form> | |||
</el-main> | |||
</div> | |||
</template> | |||
<script> | |||
export default {}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.el-form { | |||
padding: 20px; | |||
} | |||
.el-form-item { | |||
display: flex; | |||
width: 100%; | |||
} | |||
</style> |