Commit d05a8fee by Lyan

零售图片集展示更改

parent 6254de22
...@@ -21,7 +21,10 @@ const getQRCodeList = (params = {}) => { ...@@ -21,7 +21,10 @@ const getQRCodeList = (params = {}) => {
return POST(`${Prefix}/office/news/api/retailCodeList`, params) return POST(`${Prefix}/office/news/api/retailCodeList`, params)
} }
// 根据retailPictureId获得图片集
const getPicture = (params = {}) => {
return GET(`${Prefix}/office/retailpicture/api/info/${params.id}`)
}
// 获取图片集列表 // 获取图片集列表
const getPictureList = (params = {}) => { const getPictureList = (params = {}) => {
return POST(`${Prefix}/office/picture/api/retailPictureList`, params) return POST(`${Prefix}/office/picture/api/retailPictureList`, params)
...@@ -56,4 +59,5 @@ export default { ...@@ -56,4 +59,5 @@ export default {
geGuideDetailById, geGuideDetailById,
getPictureById, getPictureById,
getLatestNews, getLatestNews,
getPicture
} }
\ No newline at end of file
...@@ -207,7 +207,8 @@ import VueSlickCarousel from "vue-slick-carousel"; ...@@ -207,7 +207,8 @@ import VueSlickCarousel from "vue-slick-carousel";
import "vue-slick-carousel/dist/vue-slick-carousel.css"; import "vue-slick-carousel/dist/vue-slick-carousel.css";
import "vue-slick-carousel/dist/vue-slick-carousel-theme.css"; import "vue-slick-carousel/dist/vue-slick-carousel-theme.css";
import breadcrumb from "../comps/breadcrumb.vue"; import breadcrumb from "../comps/breadcrumb.vue";
import cate from "../comps/cate.vue";
export default { export default {
components: { components: {
VueSlickCarousel, VueSlickCarousel,
...@@ -289,6 +290,7 @@ export default { ...@@ -289,6 +290,7 @@ export default {
slidesToShow: 1, slidesToShow: 1,
slidesToScroll: 1, slidesToScroll: 1,
}, },
retailPictureId:this.$route.query.retailPictureId
}; };
}, },
mounted() { mounted() {
...@@ -300,9 +302,20 @@ export default { ...@@ -300,9 +302,20 @@ export default {
this.getHomeLatestNews(); this.getHomeLatestNews();
this.getHomeGuideList(); this.getHomeGuideList();
this.getQRCodeList(); this.getQRCodeList();
this.getPictureList(); this.initPicList()
}, },
methods: { methods: {
// 初始化图片集
initPicList(){
if(this.retailPictureId!=null&&this.retailPictureId!=''&&this.retailPictureId!=undefined){
this.getPicture(this.retailPictureId)
}else{
this.getPictureList();
}
},
goDetail() { goDetail() {
this.$router.push('/News/RetailBusiness'); this.$router.push('/News/RetailBusiness');
}, },
...@@ -393,6 +406,21 @@ export default { ...@@ -393,6 +406,21 @@ export default {
this.$message.error("获取首页商品二维码在零售领域的应用失败,请稍后重试~"); this.$message.error("获取首页商品二维码在零售领域的应用失败,请稍后重试~");
} }
}, },
// 根据id获取首页图片集列表
async getPicture(id) {
const params = {
id: id,
};
const listRes = await this.$api.sell.getPicture(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
let arr=[];
arr.push(data)
this.pictureList = arr;
} else {
this.$message.error("获取首页商品二维码在零售领域的应用失败,请稍后重试~");
}
},
lookPictureDetail(item) { lookPictureDetail(item) {
if (item.jumppath) { if (item.jumppath) {
window.open(item.jumppath,'_blank'); window.open(item.jumppath,'_blank');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment