Commit 10f6fe01 by MichaelJier

feature<imagetext>

1. menuList接口更换、新增获取富文本介绍的接口
2. 新增获取富文本介绍在客户端进行
parent 0c75e1c4
...@@ -5,13 +5,32 @@ ...@@ -5,13 +5,32 @@
</template> </template>
<script> <script>
import { getImagetext } from '@/plugins/API/apiAll';
import { mapGetters } from 'vuex';
import 'quill/dist/quill.core.css'; import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css'; import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css'; import 'quill/dist/quill.bubble.css';
export default { export default {
name: 'pc-menu-imageText', name: 'pc-menu-imageText',
props: { data() {
menuInfo: {} return {
menuInfo: ''
}
},
computed: {
...mapGetters({
channelInfo: 'channelInfo',
}),
},
mounted() {
this.getImagetext()
},
methods: {
async getImagetext() {
const id = this.channelInfo.id
const res = await getImagetext({ id });
this.menuInfo = res.data.menuInfo
},
} }
}; };
</script> </script>
......
...@@ -8,15 +8,28 @@ ...@@ -8,15 +8,28 @@
</template> </template>
<script> <script>
import { getImagetext } from '@/plugins/API/apiAll';
import { mapGetters } from 'vuex';
import 'quill/dist/quill.core.css'; import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css'; import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css'; import 'quill/dist/quill.bubble.css';
export default { export default {
name: 'menu-imageText', name: 'menu-imageText',
props: { data() {
menuInfo: {} return {
menuInfo: ''
}
},
// props: {
// menuInfo: {}
// },
async mounted() {
this.getImagetext()
}, },
computed: { computed: {
...mapGetters({
channelInfo: 'channelInfo',
}),
imageArr() { imageArr() {
if (!this.menuInfo) return if (!this.menuInfo) return
const getImgList = [] const getImgList = []
...@@ -27,6 +40,11 @@ export default { ...@@ -27,6 +40,11 @@ export default {
} }
}, },
methods: { methods: {
async getImagetext() {
const id = this.channelInfo.id
const res = await getImagetext({ id });
this.menuInfo = res.data.menuInfo
},
getpreview(e) { getpreview(e) {
if (e.target.tagName === 'IMG') { if (e.target.tagName === 'IMG') {
this.$refs.showImg.forEach(item => { this.$refs.showImg.forEach(item => {
......
...@@ -31,7 +31,9 @@ const prodApi = { ...@@ -31,7 +31,9 @@ const prodApi = {
getChannelConfig: getChannelConfig:
'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api.online/node-api/index/channelConfig', // 获取直播间配置 'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api.online/node-api/index/channelConfig', // 获取直播间配置
getMenuList: getMenuList:
'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api.online/node-api/live/menuList', // 获取菜单配置 'https://bapi.guangdianyun.tv/live/menu/list', // 获取菜单配置
getImagetext:
'https://bapi.guangdianyun.tv/live/menu/imagetext', // 获取富文本
getAdvertList: getAdvertList:
'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api.online/node-api/live/advertList', // 获取广告配置 'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api.online/node-api/live/advertList', // 获取广告配置
getChatCount: getChatCount:
...@@ -70,7 +72,9 @@ const preApi = { ...@@ -70,7 +72,9 @@ const preApi = {
getChannelConfig: getChannelConfig:
'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api/node-api/index/channelConfig', // 获取直播间配置 'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api/node-api/index/channelConfig', // 获取直播间配置
getMenuList: getMenuList:
'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api/node-api/live/menuList', // 获取菜单配置 'https://bapi.guangdianyun.tv/live/menu/list', // 获取菜单配置
getImagetext:
'https://bapi.guangdianyun.tv/live/menu/imagetext', // 获取富文本
getAdvertList: getAdvertList:
'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api/node-api/live/advertList', // 获取广告配置 'https://1812501212048408.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/node-api/node-api/live/advertList', // 获取广告配置
getChatCount: getChatCount:
...@@ -116,7 +120,7 @@ const testApi = { ...@@ -116,7 +120,7 @@ const testApi = {
getCaremaList: 'https://golivec-dev.guangdianyun.tv/v1/live/getcaremalist', // 获取全景直播配置 getCaremaList: 'https://golivec-dev.guangdianyun.tv/v1/live/getcaremalist', // 获取全景直播配置
// getWatchLoginInfo: '', // 获取登录信息 // getWatchLoginInfo: '', // 获取登录信息
// getWechatInfo: '', // 获取关注配置 // getWechatInfo: '', // 获取关注配置
PostInfo: 'https://golivec-dev.guangdianyun.tv/v1/live/postinfo' // 数据统计相关 PostInfo: 'https://golivec-dev.guangdianyun.tv/v1/live/postinfo', // 数据统计相关
// getPlaylistList: '', // 获得播单 // getPlaylistList: '', // 获得播单
// invitation: '', // 邀请统计 // invitation: '', // 邀请统计
// getInvitationList: '', // 获取邀请榜 // getInvitationList: '', // 获取邀请榜
...@@ -181,6 +185,9 @@ export const getChannelConfig = data => { ...@@ -181,6 +185,9 @@ export const getChannelConfig = data => {
export const getMenuList = data => { export const getMenuList = data => {
return request.get(api['getMenuList'], data); return request.get(api['getMenuList'], data);
}; };
export const getImagetext = data => {
return request.get(api['getImagetext'], data);
};
export const getAdvertList = data => { export const getAdvertList = data => {
return request.get(api['getAdvertList'], data); return request.get(api['getAdvertList'], data);
}; };
...@@ -254,6 +261,7 @@ export default { ...@@ -254,6 +261,7 @@ export default {
getChannelInfo, getChannelInfo,
getChannelConfig, getChannelConfig,
getMenuList, getMenuList,
getImagetext,
getAdvertList, getAdvertList,
getChatCount, getChatCount,
getWatchNum, getWatchNum,
......
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 sign in to comment