Showing
2 changed files
with
34 additions
and
6 deletions
| ... | @@ -23,7 +23,7 @@ export const useVideoList = ($route) => { | ... | @@ -23,7 +23,7 @@ export const useVideoList = ($route) => { |
| 23 | // 修改默认语言绑定数据 | 23 | // 修改默认语言绑定数据 |
| 24 | if (checkLocalism.value) { | 24 | if (checkLocalism.value) { |
| 25 | // tslint:disable-next-line:no-string-literal | 25 | // tslint:disable-next-line:no-string-literal |
| 26 | - chooseLanguage.value = { text: columns[0]['text'], val: columns[0]['val'] } | 26 | + chooseLanguage.value = { text: columns.value[0]['text'], val: columns.value[0]['val'] } |
| 27 | } else { | 27 | } else { |
| 28 | chooseLanguage.value = { text: '普通话', val: '普通话' }; | 28 | chooseLanguage.value = { text: '普通话', val: '普通话' }; |
| 29 | } | 29 | } |
| ... | @@ -32,11 +32,33 @@ export const useVideoList = ($route) => { | ... | @@ -32,11 +32,33 @@ export const useVideoList = ($route) => { |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | // 方言选择项 | 34 | // 方言选择项 |
| 35 | - const columns = [ | 35 | + let columns = ref([ |
| 36 | { text: '所有方言', val: '所有方言' }, | 36 | { text: '所有方言', val: '所有方言' }, |
| 37 | - { text: '上海话', val: '上海话' }, | 37 | + ]) |
| 38 | - { text: '广东话', val: '广东话' }, | 38 | + // |
| 39 | - ]; | 39 | + axios.get('/srv/?a=localism_list') |
| 40 | + .then(res => { | ||
| 41 | + if (res.data.code === 1) { | ||
| 42 | + let arr = []; | ||
| 43 | + _.each(res.data.data, item => { | ||
| 44 | + arr.push({ | ||
| 45 | + text: item, | ||
| 46 | + val: item | ||
| 47 | + }) | ||
| 48 | + }); | ||
| 49 | + columns.value = _.concat(columns.value, arr); | ||
| 50 | + console.warn(columns); | ||
| 51 | + } else { | ||
| 52 | + console.warn(res); | ||
| 53 | + Toast({ | ||
| 54 | + icon: 'close', | ||
| 55 | + message: res.data.msg | ||
| 56 | + }); | ||
| 57 | + } | ||
| 58 | + }) | ||
| 59 | + .catch(err => { | ||
| 60 | + console.error(err); | ||
| 61 | + }) | ||
| 40 | 62 | ||
| 41 | const showPicker = ref(false); | 63 | const showPicker = ref(false); |
| 42 | 64 | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="video-detail-page"> | 2 | <div class="video-detail-page"> |
| 3 | - <div class="detail-header"> | 3 | + <div @click="getUserInfo" class="detail-header"> |
| 4 | <van-row> | 4 | <van-row> |
| 5 | <van-col span="4"> | 5 | <van-col span="4"> |
| 6 | <van-image round width="3rem" height="3rem" :src="videoInfo.avatar" /> | 6 | <van-image round width="3rem" height="3rem" :src="videoInfo.avatar" /> |
| ... | @@ -49,6 +49,12 @@ import { Toast } from 'vant'; | ... | @@ -49,6 +49,12 @@ import { Toast } from 'vant'; |
| 49 | const $route = useRoute(); | 49 | const $route = useRoute(); |
| 50 | const $router = useRouter(); | 50 | const $router = useRouter(); |
| 51 | 51 | ||
| 52 | +const getUserInfo = () => { | ||
| 53 | + $router.push({ | ||
| 54 | + path: '/client/personIndex' | ||
| 55 | + }) | ||
| 56 | +} | ||
| 57 | + | ||
| 52 | const active = ref(0); // index 0 为简介,1 为留言 | 58 | const active = ref(0); // index 0 为简介,1 为留言 |
| 53 | const onClickTab = ({ title }) => { | 59 | const onClickTab = ({ title }) => { |
| 54 | console.warn(title); | 60 | console.warn(title); | ... | ... |
-
Please register or login to post a comment