|
@@ -49,23 +49,40 @@ export default {
|
|
|
},
|
|
|
// 跳转
|
|
|
async linkBtn(id) {
|
|
|
- let res = await this.livefetch(id);
|
|
|
- let sheng = '';
|
|
|
- let shi = '';
|
|
|
- let parent = res.data.province;
|
|
|
- let places = res.data.place;
|
|
|
- let reslte = await this.palcequery({ level: 1, parent });
|
|
|
- let resltes = await this.palcequery({ level: 2, parent });
|
|
|
- var arr = reslte.data.filter(item => item.code === parent);
|
|
|
- var cre = resltes.data.filter(item => item.code === places);
|
|
|
- for (const val of arr) {
|
|
|
- sheng = val.name;
|
|
|
- }
|
|
|
- for (const val of cre) {
|
|
|
- shi = val.name;
|
|
|
+ // console.log(this.user.uid);
|
|
|
+
|
|
|
+ if (this.user.uid) {
|
|
|
+ if (
|
|
|
+ this.user.role == '2' ||
|
|
|
+ this.user.role == '3' ||
|
|
|
+ this.user.role == '4' ||
|
|
|
+ this.user.role == '6' ||
|
|
|
+ this.user.role == '7' ||
|
|
|
+ this.user.role == '8'
|
|
|
+ ) {
|
|
|
+ let res = await this.livefetch(id);
|
|
|
+ let sheng = '';
|
|
|
+ let shi = '';
|
|
|
+ let parent = res.data.province;
|
|
|
+ let places = res.data.place;
|
|
|
+ let reslte = await this.palcequery({ level: 1, parent });
|
|
|
+ let resltes = await this.palcequery({ level: 2, parent });
|
|
|
+ var arr = reslte.data.filter(item => item.code === parent);
|
|
|
+ var cre = resltes.data.filter(item => item.code === places);
|
|
|
+ for (const val of arr) {
|
|
|
+ sheng = val.name;
|
|
|
+ }
|
|
|
+ for (const val of cre) {
|
|
|
+ shi = val.name;
|
|
|
+ }
|
|
|
+ let newTitle = sheng + shi + res.data.title;
|
|
|
+ window.location.href = encodeURI(`${this.liveIndex}?id=${id}&title=${newTitle}`);
|
|
|
+ } else {
|
|
|
+ this.$router.push({ path: '/newlogin' });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$router.push({ path: '/newlogin' });
|
|
|
}
|
|
|
- let newTitle = sheng + shi + res.data.title;
|
|
|
- window.location.href = encodeURI(`${this.liveIndex}?id=${id}&title=${newTitle}`);
|
|
|
},
|
|
|
canIn(data) {
|
|
|
let nowTime = new Date().getTime();
|