添加了请求权限

This commit is contained in:
luyuan 2020-10-25 20:56:40 +08:00
parent eee433837d
commit aa0b492cf8
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
3 changed files with 61 additions and 19 deletions

View File

@ -923,4 +923,14 @@ export async function setlive(data: any){
const info = await put("live/" + data.id, data)
console.log(info.data)
}
export async function getlivest() {
const res = await get<any>("checkReleaseLive");
if(res.data.status != 0) {
return res.data;
} else {
return false;
}
}

View File

@ -148,14 +148,14 @@
<div class="input-box time-zone-box">
<div class="label">时区</div>
<a-select
v-model:value="userinfo.zoneStr"
v-model:value="userinfo.zoneid"
style="width: 171px"
size="small"
ref="select"
:getPopupContainer="triggerNode => triggerNode.parentNode"
>
<a-select-option v-for="(item, index) in ['北京 GMT +08:00']" :key="index" :value="item">
{{ item }}
<a-select-option v-for="(item, index) in zonelist" :key="index" :value="item.zoneid">
{{item.city}}{{item.gmt}}
</a-select-option>
</a-select>
</div>
@ -168,21 +168,21 @@
ref="select"
:getPopupContainer="triggerNode => triggerNode.parentNode"
>
<a-select-option v-for="(item, index) in ['人民币']" :key="index" :value="item">
{{ item }}
<a-select-option v-for="(item, index) in currencylist" :key="index" :value="item.value">
{{item.name}}
</a-select-option>
</a-select>
</div>
<div class="input-box time-zone">
<div class="label">语言</div>
<a-select
v-model:value="userinfo.language"
v-model:value="userinfo.languageValue"
style="width: 171px"
size="small"
ref="select"
:getPopupContainer="triggerNode => triggerNode.parentNode"
>
<a-select-option v-for="(item, index) in languages" :key="index" :value="item.name">
<a-select-option v-for="(item, index) in languages" :key="index" :value="item.value">
{{ item.name }}
</a-select-option>
</a-select>
@ -287,7 +287,7 @@ import { uploadflie } from "@/utils/vod"
import store from '@/store';
import smile from "@/static/images/smile.png"
import smilet from "@/static/images/smilet.png"
import { changetel, checksmscode, editpassword, getarchives, getlanguages, getquhaolist, putmember, sendsms } from "@/api/index"
import { changetel, checksmscode, editpassword, getarchives, getcurrencys, getlanguages, getquhaolist, getzonelist, putmember, sendsms } from "@/api/index"
import { message } from 'ant-design-vue';
export default defineComponent({
@ -321,11 +321,32 @@ export default defineComponent({
const mynewtel = ref<string>("");
const isSecondStep: Ref<boolean> = ref(false);
const currencylist=ref<any>([{
alias: "CNY",
code: "104110041000",
createdAt: "2020-08-19 11:54:59",
deletedAt: null,
dictionaryid: 241,
name: "人民币¥",
position: 1,
publish: 1,
updatedAt: "2020-08-19 11:54:59",
value: "1"
}])
const zonelist=ref<any>([{
city: "中途岛",
gmt: "GMT-11:00",
id: "Pacific/Midway",
zoneid: 1
}])
onMounted(async ()=>{
chiveslist.value = await getarchives()
languages.value = await getlanguages()
quhaolist.value=await getquhaolist()
myquhao.value=quhaolist.value[0].code
quhaolist.value = await getquhaolist()
myquhao.value = quhaolist.value[0].code
currencylist.value = await getcurrencys()
zonelist.value=await getzonelist()
console.log(quhaolist.value,"listsssss")
})
@ -604,7 +625,9 @@ export default defineComponent({
mynewtel,
quhaolist,
getquhao,
myquhao
myquhao,
currencylist,
zonelist
}
}
});

View File

@ -122,22 +122,22 @@
<template v-slot:closeIcon>
<img src="@/static/images/delete.png" class="close" />
</template>
<div class="notice-container report" v-if="0">
<div class="notice-container report" v-if="lives.status == 1">
<div class="title">您尚未获得直播资格</div>
<div class="title sub-title">
您被 学生XXX<span class="red">举报发生违规行为</span
>,如有疑问点击反馈
{{lives.data.msg}}
</div>
<div class="confirm-btn">意见反馈</div>
</div>
<div class="notice-container" v-else>
<div class="title">您尚未获得直播资格</div>
<div class="title sub-title">
上一周/月您在平台视频点击量为
<!-- 上一周/月您在平台视频点击量为
<span class="red">第24名</span>要在前
<span class="bule">20</span> 才能获得直播资格
<span class="bule">20</span> 才能获得直播资格 -->
{{lives.msg}}
</div>
<rank-list></rank-list>
<rank-list :list="lives.data"></rank-list>
</div>
</a-modal>
</div>
@ -161,7 +161,7 @@ import RankList from "./RankList.vue";
import { previewCover } from "@/utils/common";
import { FromSend, ImgInfo } from "@/types/index";
import { uploadflie } from "@/utils/vod";
import { liveadd, liveinfo, setlive } from "@/api";
import { getlivest, liveadd, liveinfo, setlive } from "@/api";
import { useRoute } from 'vue-router';
import dayjs from 'dayjs';
@ -191,6 +191,7 @@ export default defineComponent({
const uploadpicprogress: Ref<number> = ref(0);
const videofile = ref<File>();
const videos = ref<Array<any>>([]);
const lives = ref<any>({});
/**
* 验证直播时间
*/
@ -300,7 +301,7 @@ export default defineComponent({
console.log("error", err);
});
};
const isEntitled: Ref<boolean> = ref(false);
const isEntitled: Ref<boolean> = ref(true);
/**
* 隐藏无资格提示
*/
@ -366,6 +367,13 @@ export default defineComponent({
form.value.img = res.video.url;
}
getlivest().then((res) => {
if(res){
isEntitled.value = true;
lives.value = res;
}
})
return {
labelCol: { span: 4 },
wrapperCol: { span: 14 },
@ -388,6 +396,7 @@ export default defineComponent({
startchange,
videofile,
videos,
lives
};
},
});