fix:banner不显示

feature/ad-0531-ch
ch 2 years ago
parent 295537b06c
commit 27d2e49aff

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-03 22:14:16 * @Date: 2022-05-03 22:14:16
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-10 14:18:39 * @LastEditTime: 2022-05-31 18:58:47
* @Description: file content * @Description: file content
*/ */
export default { export default {
@ -84,6 +84,7 @@ export default {
'/mall/': { '/mall/': {
// target: 'http://114.55.64.39:3004', // 目标接口域名 // target: 'http://114.55.64.39:3004', // 目标接口域名
target: 'https://you-gateway.mashibing.com/', // 目标接口域名 target: 'https://you-gateway.mashibing.com/', // 目标接口域名
target: 'https://k8s-horse-gateway.mashibing.cn/', // 目标接口域名
pathRewrite: { pathRewrite: {
changeOrigin: true, // 表示是否跨域 changeOrigin: true, // 表示是否跨域
}, },

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-03 22:14:16 * @Date: 2022-05-03 22:14:16
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-31 18:41:33 * @LastEditTime: 2022-06-01 09:36:44
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -104,6 +104,7 @@ export default {
location : AD_LOCATION.HOME_BANNER location : AD_LOCATION.HOME_BANNER
}); });
bannerList = bannerList || []; bannerList = bannerList || [];
console.log('bannerList', bannerList);
return { return {
@ -133,6 +134,10 @@ export default {
this.getSelectProducts(); this.getSelectProducts();
}, },
async mounted() { async mounted() {
let {result:bannerList} = await ApiGetAdList({
location : AD_LOCATION.HOME_BANNER
});
console.log(bannerList);
// //
window.addEventListener("scroll", this.scrollEventMethod); window.addEventListener("scroll", this.scrollEventMethod);
}, },

@ -185,7 +185,6 @@ export default {
deep: true, deep: true,
handler(val) { handler(val) {
if (val && val.length >= NEW_MIN_COUNT) { if (val && val.length >= NEW_MIN_COUNT) {
console.log("新品上架", val);
this.showNew = true; this.showNew = true;
this.newGoodsOne = val[0]; this.newGoodsOne = val[0];
this.newArray = val.slice(1, NEW_MIN_COUNT); this.newArray = val.slice(1, NEW_MIN_COUNT);

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-31 11:17:38 * @Date: 2022-05-31 11:17:38
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-31 18:40:27 * @LastEditTime: 2022-05-31 18:55:38
* @Description: file content * @Description: file content
*/ */
@ -14,6 +14,8 @@ const BASE_URL = '/mall/marketing';
// 获取广告列表 // 获取广告列表
export const ApiGetAdList = (params) => ToAsyncAwait(axios.get(`${BASE_URL}/app/advertisement`, { export const ApiGetAdList = (params) => ToAsyncAwait(axios.get(`${BASE_URL}/app/advertisement`, {
platform : AD_PLATFORM.PC, params: {
...params platform : AD_PLATFORM.PC,
...params
}
})) }))
Loading…
Cancel
Save