This commit is contained in:
Apcallover
2024-03-12 14:33:37 +08:00
3 changed files with 13 additions and 10 deletions

View File

@@ -2,7 +2,6 @@
<div> <div>
<div class="title">{{menuDetail.menuName}}</div> <div class="title">{{menuDetail.menuName}}</div>
<avue-crud <avue-crud
v-if="menuDetail && menuDetail.menuName"
:option="option" :option="option"
:table-loading="loading" :table-loading="loading"
:data="data" :data="data"
@@ -205,6 +204,9 @@ export default {
drawerTitle: '' drawerTitle: ''
} }
}, },
mounted() {
this.bannerInit()
},
methods: { methods: {
isURL, isURL,
openUrl (row) { openUrl (row) {
@@ -337,7 +339,7 @@ export default {
this.loading = true; this.loading = true;
var menuId = this.recommend.menuDetail.menuId var menuId = this.recommend.menuDetail.menuId
getCarouselList( getCarouselList(
5, 1,
menuId, menuId,
).then((res) => { ).then((res) => {
this.data = res.data.data; this.data = res.data.data;
@@ -347,7 +349,8 @@ export default {
bannerInit (){ bannerInit (){
this.data = [] this.data = []
this.loading = true; this.loading = true;
var type = this.envType() // var type = this.envType()
var type = 1;
getCarouselList( getCarouselList(
type, type,
).then((res) => { ).then((res) => {

View File

@@ -65,11 +65,7 @@
{ {
name: '轮播图', name: '轮播图',
select: true select: true
}, }
// {
// name: '侧边栏',
// select: true
// },
], ],
menuList: [ menuList: [
@@ -85,6 +81,9 @@
menuDetail: {} menuDetail: {}
} }
}, },
mounted() {
this.$refs.advertisementBody.bannerInit()
},
methods: { methods: {
titleActive (item) { titleActive (item) {
if(item.select)return if(item.select)return
@@ -98,6 +97,7 @@
this.menuDetail = JSON.parse(JSON.stringify(item)) this.menuDetail = JSON.parse(JSON.stringify(item))
if (this.titleList[0].select) { if (this.titleList[0].select) {
this.$refs.advertisementBody.onLoad() this.$refs.advertisementBody.onLoad()
// this.$refs.advertisementBody.bannerInit()
} else if (this.titleList[1].select) { } else if (this.titleList[1].select) {
this.$refs.advertisementBody.bannerInit() this.$refs.advertisementBody.bannerInit()
} }

View File

@@ -24,9 +24,9 @@ module.exports = {
proxy: { proxy: {
"/api": { "/api": {
// target: 'http://localhost:8000', // 本地服务接口地址 // target: 'http://localhost:8000', // 本地服务接口地址
// target: "http://39.98.184.58:8000", // 阿里云后台地址 target: "http://39.98.184.58:8000", // 阿里云后台地址
// target: "http://192.168.3.108:8000", // 本地 // target: "http://192.168.3.108:8000", // 本地
target: 'http://192.168.3.111:8000', // target: 'http://192.168.3.111:8000',
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {