xbx #66
10
package.json
10
package.json
@ -22,8 +22,8 @@
|
|||||||
"vuex": "^4.0.0-0"
|
"vuex": "^4.0.0-0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^4.4.1",
|
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
||||||
"@typescript-eslint/parser": "^4.4.1",
|
"@typescript-eslint/parser": "^2.33.0",
|
||||||
"@vue/cli-plugin-babel": "~4.5.0",
|
"@vue/cli-plugin-babel": "~4.5.0",
|
||||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||||
"@vue/cli-plugin-router": "~4.5.0",
|
"@vue/cli-plugin-router": "~4.5.0",
|
||||||
@ -31,12 +31,12 @@
|
|||||||
"@vue/cli-plugin-vuex": "~4.5.0",
|
"@vue/cli-plugin-vuex": "~4.5.0",
|
||||||
"@vue/cli-service": "~4.5.0",
|
"@vue/cli-service": "~4.5.0",
|
||||||
"@vue/compiler-sfc": "^3.0.0-0",
|
"@vue/compiler-sfc": "^3.0.0-0",
|
||||||
"@vue/eslint-config-typescript": "^7.0.0",
|
"@vue/eslint-config-typescript": "^5.0.2",
|
||||||
"eslint": "^7.11.0",
|
"eslint": "^6.7.2",
|
||||||
"eslint-plugin-vue": "^7.0.0-0",
|
"eslint-plugin-vue": "^7.0.0-0",
|
||||||
"node-sass": "^4.14.1",
|
"node-sass": "^4.14.1",
|
||||||
"sass-loader": "^10.0.2",
|
"sass-loader": "^10.0.2",
|
||||||
"typescript": "~4.0.3"
|
"typescript": "~3.9.3"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"root": true,
|
"root": true,
|
||||||
|
185
src/api/index.ts
185
src/api/index.ts
@ -153,8 +153,8 @@ export async function getstatisticlist() {
|
|||||||
* 发布直播
|
* 发布直播
|
||||||
*/
|
*/
|
||||||
interface Liveaddrule{
|
interface Liveaddrule{
|
||||||
code: number,
|
code: number;
|
||||||
msg: string
|
msg: string;
|
||||||
}
|
}
|
||||||
export async function liveadd(data: any) {
|
export async function liveadd(data: any) {
|
||||||
const res = await post<Liveaddrule>('live',data);
|
const res = await post<Liveaddrule>('live',data);
|
||||||
@ -194,11 +194,11 @@ interface VideoDetail{
|
|||||||
fileduration: string;
|
fileduration: string;
|
||||||
status: number;
|
status: number;
|
||||||
desc: string;
|
desc: string;
|
||||||
deleted_at: null;
|
deleted_at: string;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
updated_at: string;
|
updated_at: string;
|
||||||
share:number,
|
share: number;
|
||||||
watch:number
|
watch: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function videodetail(data?: any,ifupdate?: number) {
|
export async function videodetail(data?: any,ifupdate?: number) {
|
||||||
@ -225,9 +225,9 @@ export async function videodetail(data?:any,ifupdate?:number) {
|
|||||||
fileduration: res.data.fileduration,
|
fileduration: res.data.fileduration,
|
||||||
status: res.data.status,
|
status: res.data.status,
|
||||||
desc: res.data.desc,
|
desc: res.data.desc,
|
||||||
deleted_at: res.data.deleted_at,
|
deletedAt: res.data.deleted_at,
|
||||||
created_at: res.data.created_at,
|
createdAt: res.data.created_at,
|
||||||
updated_at: res.data.updated_at,
|
updatedAt: res.data.updated_at,
|
||||||
watch: res.data.watch,
|
watch: res.data.watch,
|
||||||
share: res.data.share
|
share: res.data.share
|
||||||
}
|
}
|
||||||
@ -263,19 +263,19 @@ export async function accountadd(data?:any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface SaleInfo{
|
interface SaleInfo{
|
||||||
total:number,
|
total: number;
|
||||||
accountid:number,
|
accountid: number;
|
||||||
memberid:number,
|
memberid: number;
|
||||||
sn:string,
|
sn: string;
|
||||||
type:number,
|
type: number;
|
||||||
typename:string,
|
typename: string;
|
||||||
money:string,
|
money: string;
|
||||||
source:number,
|
source: number;
|
||||||
remark:string,
|
remark: string;
|
||||||
deleted_at:string,
|
deleted_at: string;
|
||||||
created_at:string,
|
created_at: string;
|
||||||
updated_at:string,
|
updated_at: string;
|
||||||
basemoney:string
|
basemoney: string;
|
||||||
}
|
}
|
||||||
interface SaleInfolData{
|
interface SaleInfolData{
|
||||||
data: SaleInfo[];
|
data: SaleInfo[];
|
||||||
@ -326,13 +326,13 @@ export async function cashout(data?:any,accountinfo?:any){
|
|||||||
* 账户详情
|
* 账户详情
|
||||||
*/
|
*/
|
||||||
interface AccountInfo{
|
interface AccountInfo{
|
||||||
wallectid:number,
|
wallectid: number;
|
||||||
typeid:number,
|
typeid: number;
|
||||||
type:number,
|
type: number;
|
||||||
account:number,
|
account: number;
|
||||||
mname:string,
|
mname: string;
|
||||||
bankcode:string,
|
bankcode: string;
|
||||||
bankname:string
|
bankname: string;
|
||||||
}
|
}
|
||||||
export async function getaccountinfo(data?: any){
|
export async function getaccountinfo(data?: any){
|
||||||
const res=await get<AccountInfo>('wallect/'+data)
|
const res=await get<AccountInfo>('wallect/'+data)
|
||||||
@ -374,17 +374,17 @@ export async function deleteaccount(data:any) {
|
|||||||
* 交易明细 详情
|
* 交易明细 详情
|
||||||
*/
|
*/
|
||||||
interface TransactionInfo{
|
interface TransactionInfo{
|
||||||
accountid:number,
|
accountid: number;
|
||||||
memberid:number,
|
memberid: number;
|
||||||
sn:string,
|
sn: string;
|
||||||
type:number,
|
type: number;
|
||||||
typename:string,
|
typename: string;
|
||||||
money:number,
|
money: number;
|
||||||
source:number,
|
source: number;
|
||||||
remark:string,
|
remark: string;
|
||||||
deleted_at:any,
|
deleted_at: any;
|
||||||
created_at:string,
|
created_at: string;
|
||||||
updated_at:string
|
updated_at: string;
|
||||||
}
|
}
|
||||||
export async function transactioninfo(data?: any){
|
export async function transactioninfo(data?: any){
|
||||||
const res = await get<TransactionInfo>('account/'+data)
|
const res = await get<TransactionInfo>('account/'+data)
|
||||||
@ -418,24 +418,24 @@ export async function editpassword(data?:any) :Promise<any> {
|
|||||||
* 提现记录 列表
|
* 提现记录 列表
|
||||||
*/
|
*/
|
||||||
interface WithDrawal{
|
interface WithDrawal{
|
||||||
withdrawalid:number,
|
withdrawalid: number;
|
||||||
memberid:number,
|
memberid: number;
|
||||||
sn:string,
|
sn: string;
|
||||||
status:number,
|
status: number;
|
||||||
statusname:string,
|
statusname: string;
|
||||||
type:number,
|
type: number;
|
||||||
typename:string,
|
typename: string;
|
||||||
money:number
|
money: number;
|
||||||
sxf:number,
|
sxf: number;
|
||||||
international:number,
|
international: number;
|
||||||
account:string,
|
account: string;
|
||||||
mname:string,
|
mname: string;
|
||||||
bankcode:string,
|
bankcode: string;
|
||||||
bankname:string,
|
bankname: string;
|
||||||
remark:string,
|
remark: string;
|
||||||
deleted_at:string,
|
deleted_at: string;
|
||||||
created_at:string,
|
created_at: string;
|
||||||
updated_at:string
|
updated_at: string;
|
||||||
}
|
}
|
||||||
interface WithdrawlData{
|
interface WithdrawlData{
|
||||||
data: WithDrawal[];
|
data: WithDrawal[];
|
||||||
@ -462,17 +462,17 @@ export async function withdrawlxq(data?:any){
|
|||||||
* 评论(视频?)
|
* 评论(视频?)
|
||||||
*/
|
*/
|
||||||
interface CommentList{
|
interface CommentList{
|
||||||
commentid:number,
|
commentid: number;
|
||||||
memberid:number,
|
memberid: number;
|
||||||
cid:number,
|
cid: number;
|
||||||
type:number,
|
type: number;
|
||||||
score:number,
|
score: number;
|
||||||
content:string,
|
content: string;
|
||||||
deleted_at:null,
|
deleted_at: null;
|
||||||
created_at:string,
|
created_at: string;
|
||||||
updated_at:string,
|
updated_at: string;
|
||||||
name:string,
|
name: string;
|
||||||
img:string
|
img: string;
|
||||||
}
|
}
|
||||||
interface CommentlData{
|
interface CommentlData{
|
||||||
data: CommentList[];
|
data: CommentList[];
|
||||||
@ -484,7 +484,7 @@ interface ReplylistData{
|
|||||||
data: CommentList[];
|
data: CommentList[];
|
||||||
code: number;
|
code: number;
|
||||||
msg: string;
|
msg: string;
|
||||||
score?:string,
|
score?: string;
|
||||||
total: number;
|
total: number;
|
||||||
}
|
}
|
||||||
export async function getcommentlist(data?: any) {
|
export async function getcommentlist(data?: any) {
|
||||||
@ -511,11 +511,11 @@ export async function getcommentlist(data?:any) {
|
|||||||
* 发布评论
|
* 发布评论
|
||||||
*/
|
*/
|
||||||
interface SendData{
|
interface SendData{
|
||||||
type?:number,
|
type?: number;
|
||||||
cid?:number,
|
cid?: number;
|
||||||
teacherid?:number,
|
teacherid?: number;
|
||||||
score?:number,
|
score?: number;
|
||||||
content?:string
|
content?: string;
|
||||||
}
|
}
|
||||||
export async function addcomment(data?: any): Promise<void> {
|
export async function addcomment(data?: any): Promise<void> {
|
||||||
const res=await post<SendData>('comments',data)
|
const res=await post<SendData>('comments',data)
|
||||||
@ -541,20 +541,20 @@ export async function addcomment(data?:any):Promise<void> {
|
|||||||
* 验证用户是否存在
|
* 验证用户是否存在
|
||||||
*/
|
*/
|
||||||
interface CheckuserRule{
|
interface CheckuserRule{
|
||||||
memberid: number,
|
memberid: number;
|
||||||
name: string,
|
name: string;
|
||||||
mobile: string,
|
mobile: string;
|
||||||
email: string,
|
email: string;
|
||||||
code:string
|
code: string;
|
||||||
}
|
}
|
||||||
interface CheckData{
|
interface CheckData{
|
||||||
data: {
|
data: {
|
||||||
memberid: any,
|
memberid: any;
|
||||||
name: string,
|
name: string;
|
||||||
mobile: string,
|
mobile: string;
|
||||||
email: string,
|
email: string;
|
||||||
code:string
|
code: string;
|
||||||
},
|
};
|
||||||
code: number;
|
code: number;
|
||||||
msg: string;
|
msg: string;
|
||||||
}
|
}
|
||||||
@ -610,7 +610,7 @@ interface Countries{
|
|||||||
|
|
||||||
interface Willsay{
|
interface Willsay{
|
||||||
languageid: number;
|
languageid: number;
|
||||||
name: string
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getarchives(): Promise<[Countries[],Willsay[]]>{
|
export async function getarchives(): Promise<[Countries[],Willsay[]]>{
|
||||||
@ -809,3 +809,16 @@ export async function refusedtolive(signupid: number, msg: string){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取直播签名
|
||||||
|
*/
|
||||||
|
|
||||||
|
export async function usersig(userid: number) {
|
||||||
|
const res = await get<string>("userSig",{userid});
|
||||||
|
if(res.code != 0){
|
||||||
|
message.error(res.msg)
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return res.data;
|
||||||
|
}
|
@ -169,7 +169,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
const stars=ref<Array<number>>([])
|
const stars=ref<Array<number>>([])
|
||||||
console.log(prop.score)
|
console.log(prop.score)
|
||||||
let score1=ref<any>(prop.score)
|
const score1=ref<any>(prop.score)
|
||||||
// console.log(score1)
|
// console.log(score1)
|
||||||
if(score1.value==5){
|
if(score1.value==5){
|
||||||
for(let i=0;i < score1.value ; i++){
|
for(let i=0;i < score1.value ; i++){
|
||||||
|
@ -134,7 +134,7 @@ export default defineComponent({
|
|||||||
console.log(1)
|
console.log(1)
|
||||||
async function del(e?: number){
|
async function del(e?: number){
|
||||||
console.log(e)
|
console.log(e)
|
||||||
let res=await delreply(e)
|
const res=await delreply(e)
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
context.emit("reload",prop.replyid)
|
context.emit("reload",prop.replyid)
|
||||||
}
|
}
|
||||||
|
@ -119,11 +119,11 @@ export default defineComponent({
|
|||||||
console.log(useRoute().query)
|
console.log(useRoute().query)
|
||||||
console.log(store.state.userinfo.memberid,"userifno")
|
console.log(store.state.userinfo.memberid,"userifno")
|
||||||
interface SendData{
|
interface SendData{
|
||||||
type?:number,
|
type?: number;
|
||||||
cid?:number,
|
cid?: number;
|
||||||
teacherid?:number,
|
teacherid?: number;
|
||||||
score?:number,
|
score?: number;
|
||||||
content?:string
|
content?: string;
|
||||||
}
|
}
|
||||||
function send(){
|
function send(){
|
||||||
const data = ref<SendData>({})
|
const data = ref<SendData>({})
|
||||||
|
@ -5,15 +5,15 @@ export default createStore({
|
|||||||
state: {
|
state: {
|
||||||
userinfo:{
|
userinfo:{
|
||||||
accesstoken: "",
|
accesstoken: "",
|
||||||
api_token: "",
|
apiToken: "",
|
||||||
birthday: "",
|
birthday: "",
|
||||||
country: "",
|
country: "",
|
||||||
countryValue: "",
|
countryValue: "",
|
||||||
cover: "",
|
cover: "",
|
||||||
created_at: "",
|
createdAt: "",
|
||||||
currency: "",
|
currency: "",
|
||||||
currencyValue: "",
|
currencyValue: "",
|
||||||
deleted_at: null,
|
deletedAt: null,
|
||||||
desc: "",
|
desc: "",
|
||||||
email: "",
|
email: "",
|
||||||
img: "",
|
img: "",
|
||||||
@ -22,7 +22,7 @@ export default createStore({
|
|||||||
languageValue: "zh",
|
languageValue: "zh",
|
||||||
live: "",
|
live: "",
|
||||||
livetime: "",
|
livetime: "",
|
||||||
login_type: 0,
|
loginType: 0,
|
||||||
memberid: 0,
|
memberid: 0,
|
||||||
mobile: "",
|
mobile: "",
|
||||||
money: "",
|
money: "",
|
||||||
@ -39,7 +39,7 @@ export default createStore({
|
|||||||
tlanguageValue: 1,
|
tlanguageValue: 1,
|
||||||
type: 1,
|
type: 1,
|
||||||
uid: "",
|
uid: "",
|
||||||
updated_at: "",
|
updatedAt: "",
|
||||||
video: "",
|
video: "",
|
||||||
willsay: [{name: "请选择", level: 0}],
|
willsay: [{name: "请选择", level: 0}],
|
||||||
willsayValue: [{name: "0", level: 0}],
|
willsayValue: [{name: "0", level: 0}],
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { inject, provide, ref } from 'vue';
|
import { inject, provide, ref } from 'vue';
|
||||||
|
|
||||||
interface Language {
|
interface Language {
|
||||||
[key :string]: string
|
[key: string]: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Config {
|
interface Config {
|
||||||
locale: string;
|
locale: string;
|
||||||
messages: {[key: string]: Language}
|
messages: {[key: string]: Language};
|
||||||
}
|
}
|
||||||
|
|
||||||
const createI18n = (config: Config) => ({
|
const createI18n = (config: Config) => ({
|
||||||
|
@ -10,7 +10,7 @@ interface UploaderDone {
|
|||||||
video: {
|
video: {
|
||||||
url: string;
|
url: string;
|
||||||
verify_content: string;
|
verify_content: string;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function uploadflie(file: File,on?: OnFunctio): Promise<UploaderDone> {
|
export async function uploadflie(file: File,on?: OnFunctio): Promise<UploaderDone> {
|
||||||
|
@ -114,9 +114,10 @@ export default defineComponent({
|
|||||||
const uinfo=ref({
|
const uinfo=ref({
|
||||||
phone:"",
|
phone:"",
|
||||||
code:"",
|
code:"",
|
||||||
|
quhao:"",
|
||||||
password:"",
|
password:"",
|
||||||
repassword:"",
|
repassword:"",
|
||||||
quhao:"",
|
checkcodequhao:"",
|
||||||
memberid:0
|
memberid:0
|
||||||
})
|
})
|
||||||
const time = ref(60); //倒计时初始值
|
const time = ref(60); //倒计时初始值
|
||||||
@ -187,11 +188,11 @@ export default defineComponent({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let checkcode=await checksmscode(uinfo.value.quhao+uinfo.value.phone,uinfo.value.code)
|
const checkcode=await checksmscode(uinfo.value.quhao+uinfo.value.phone,uinfo.value.code)
|
||||||
console.log(checkcode,"checked")
|
console.log(checkcode,"checked")
|
||||||
if(checkcode){
|
if(checkcode){
|
||||||
console.log(uinfo.value)
|
console.log(uinfo.value)
|
||||||
let res= await editpassword(toRaw(uinfo.value))
|
const res= await editpassword(toRaw(uinfo.value))
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
stepnow.value=e
|
stepnow.value=e
|
||||||
}
|
}
|
||||||
|
@ -305,7 +305,8 @@ export default defineComponent({
|
|||||||
const modalNode = () => document.getElementsByClassName('modal-container')[0]
|
const modalNode = () => document.getElementsByClassName('modal-container')[0]
|
||||||
|
|
||||||
const chiveslist = ref<any>([[],[]]);
|
const chiveslist = ref<any>([[],[]]);
|
||||||
const languages = ref<unknown>([])
|
const languages = ref<unknown>([]);
|
||||||
|
const isSecondStep: Ref<boolean> = ref(false);
|
||||||
onMounted(async ()=>{
|
onMounted(async ()=>{
|
||||||
chiveslist.value = await getarchives()
|
chiveslist.value = await getarchives()
|
||||||
languages.value = await getlanguages()
|
languages.value = await getlanguages()
|
||||||
@ -377,7 +378,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 绑定手机号是否是第二步
|
// 绑定手机号是否是第二步
|
||||||
const isSecondStep: Ref<boolean> = ref(false);
|
|
||||||
interface BindPhoneItem{
|
interface BindPhoneItem{
|
||||||
number: string | number;
|
number: string | number;
|
||||||
code: string | number;
|
code: string | number;
|
||||||
@ -457,7 +457,7 @@ export default defineComponent({
|
|||||||
// console.log(toRaw(formData.value).willsay[i])
|
// console.log(toRaw(formData.value).willsay[i])
|
||||||
// }
|
// }
|
||||||
for(let m=0;m<toRaw(chiveslist.value).length;m++){
|
for(let m=0;m<toRaw(chiveslist.value).length;m++){
|
||||||
for(let i in toRaw(formData.value).willsayValue){
|
for(const i in toRaw(formData.value).willsayValue){
|
||||||
// console.log(toRaw(formData.value).willsayValue[i])
|
// console.log(toRaw(formData.value).willsayValue[i])
|
||||||
|
|
||||||
if(typeof toRaw(formData.value).willsay[i].name=='string'){
|
if(typeof toRaw(formData.value).willsay[i].name=='string'){
|
||||||
@ -504,7 +504,7 @@ export default defineComponent({
|
|||||||
async function uploads(file: AntUpload) {
|
async function uploads(file: AntUpload) {
|
||||||
uploadprogress.value=0
|
uploadprogress.value=0
|
||||||
|
|
||||||
let res = await uploadflie(file.file, (info: any) => {
|
const res = await uploadflie(file.file, (info: any) => {
|
||||||
console.log(info);
|
console.log(info);
|
||||||
uploadprogress.value = info.percent.toFixed(2) * 100;
|
uploadprogress.value = info.percent.toFixed(2) * 100;
|
||||||
});
|
});
|
||||||
|
@ -121,7 +121,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
interface FileItem {
|
interface FileItem {
|
||||||
video:Array<string>,
|
video: Array<string>;
|
||||||
}
|
}
|
||||||
const fileList: Array<FileItem> = [];
|
const fileList: Array<FileItem> = [];
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ export default defineComponent({
|
|||||||
file: File;
|
file: File;
|
||||||
}
|
}
|
||||||
async function uploadspic(file: AntUpload) {
|
async function uploadspic(file: AntUpload) {
|
||||||
let res = await uploadflie(file.file, (info: any) => {
|
const res = await uploadflie(file.file, (info: any) => {
|
||||||
console.log(info);
|
console.log(info);
|
||||||
uploadpicprogress.value = info.percent.toFixed(2) * 100;
|
uploadpicprogress.value = info.percent.toFixed(2) * 100;
|
||||||
});
|
});
|
||||||
@ -216,7 +216,7 @@ export default defineComponent({
|
|||||||
console.log(videos.value[0].duration);
|
console.log(videos.value[0].duration);
|
||||||
form.value.fileduration = videos.value[0].duration;
|
form.value.fileduration = videos.value[0].duration;
|
||||||
});
|
});
|
||||||
let res = await uploadflie(file.file, (info: any) => {
|
const res = await uploadflie(file.file, (info: any) => {
|
||||||
console.log(info);
|
console.log(info);
|
||||||
uploadprogress.value = info.percent.toFixed(2) * 100;
|
uploadprogress.value = info.percent.toFixed(2) * 100;
|
||||||
});
|
});
|
||||||
|
@ -272,7 +272,7 @@ export default defineComponent({
|
|||||||
validate()
|
validate()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// console.log(toRaw(form),111);
|
// console.log(toRaw(form),111);
|
||||||
let subdata = toRaw(form);
|
const subdata = toRaw(form);
|
||||||
// subdata.fileid=picinfo.
|
// subdata.fileid=picinfo.
|
||||||
console.log(subdata);
|
console.log(subdata);
|
||||||
liveadd(subdata);
|
liveadd(subdata);
|
||||||
@ -294,7 +294,7 @@ export default defineComponent({
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function startchange(e: string): void {
|
function startchange(e: string): void {
|
||||||
let month=new Date(e).getMonth()+1
|
const month = new Date(e).getMonth()+1
|
||||||
console.log(new Date(e).getFullYear()+"-"+month+'-'+new Date(e).getDate())
|
console.log(new Date(e).getFullYear()+"-"+month+'-'+new Date(e).getDate())
|
||||||
form.dateline =
|
form.dateline =
|
||||||
new Date(e).getFullYear() +
|
new Date(e).getFullYear() +
|
||||||
@ -326,7 +326,7 @@ export default defineComponent({
|
|||||||
console.log(videos.value[0].duration);
|
console.log(videos.value[0].duration);
|
||||||
form.fileduration = videos.value[0].duration;
|
form.fileduration = videos.value[0].duration;
|
||||||
});
|
});
|
||||||
let res = await uploadflie(file.file, (info: any) => {
|
const res = await uploadflie(file.file, (info: any) => {
|
||||||
console.log(info);
|
console.log(info);
|
||||||
uploadprogress.value = info.percent.toFixed(2) * 100;
|
uploadprogress.value = info.percent.toFixed(2) * 100;
|
||||||
});
|
});
|
||||||
@ -337,7 +337,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function uploadspic(file: AntUpload) {
|
async function uploadspic(file: AntUpload) {
|
||||||
let res = await uploadflie(file.file, (info: any) => {
|
const res = await uploadflie(file.file, (info: any) => {
|
||||||
console.log(info);
|
console.log(info);
|
||||||
uploadpicprogress.value = info.percent.toFixed(2) * 100;
|
uploadpicprogress.value = info.percent.toFixed(2) * 100;
|
||||||
});
|
});
|
||||||
|
@ -190,6 +190,11 @@ export default defineComponent({
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
livelist.value = await getlivelist();
|
livelist.value = await getlivelist();
|
||||||
});
|
});
|
||||||
|
async function tab(){
|
||||||
|
input.value = '';
|
||||||
|
livelist.value = await getlivelist({ status: tabindex.value});
|
||||||
|
|
||||||
|
}
|
||||||
function tabchange(e: number): void {
|
function tabchange(e: number): void {
|
||||||
tabindex.value = e;
|
tabindex.value = e;
|
||||||
livelist.value = {data:[], code: 0, msg: "",total: 0};
|
livelist.value = {data:[], code: 0, msg: "",total: 0};
|
||||||
@ -199,11 +204,7 @@ export default defineComponent({
|
|||||||
console.log(input.value);
|
console.log(input.value);
|
||||||
livelist.value = await getlivelist({title: input.value});
|
livelist.value = await getlivelist({title: input.value});
|
||||||
}
|
}
|
||||||
async function tab(){
|
|
||||||
input.value = '';
|
|
||||||
livelist.value = await getlivelist({ status: tabindex.value});
|
|
||||||
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
page,
|
page,
|
||||||
tabindex,
|
tabindex,
|
||||||
|
@ -45,7 +45,7 @@ export default defineComponent({
|
|||||||
setup() {
|
setup() {
|
||||||
console.log(useRoute().query.id);
|
console.log(useRoute().query.id);
|
||||||
const id = useRoute().query.id;
|
const id = useRoute().query.id;
|
||||||
let liveinfo = ref<any>({})
|
const liveinfo = ref<any>({})
|
||||||
if (typeof id == "string") {
|
if (typeof id == "string") {
|
||||||
getliveinfo(parseInt(id)).then((res) => {
|
getliveinfo(parseInt(id)).then((res) => {
|
||||||
liveinfo.value = res;
|
liveinfo.value = res;
|
||||||
|
@ -191,6 +191,7 @@ import { defineComponent, onMounted } from "vue";
|
|||||||
import LivePlaying from "@/components/LivePlaying.vue";
|
import LivePlaying from "@/components/LivePlaying.vue";
|
||||||
import LiveingWatcher from "@/components/LiveingWatcher.vue";
|
import LiveingWatcher from "@/components/LiveingWatcher.vue";
|
||||||
import TRTC from "trtc-js-sdk"
|
import TRTC from "trtc-js-sdk"
|
||||||
|
import { usersig } from '@/api';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
@ -202,48 +203,7 @@ export default defineComponent({
|
|||||||
let client: any;
|
let client: any;
|
||||||
let localStream: any;
|
let localStream: any;
|
||||||
let statie = true;
|
let statie = true;
|
||||||
onMounted(()=>{
|
let userSing = '';
|
||||||
init(pingmu);
|
|
||||||
|
|
||||||
})
|
|
||||||
function fenxiang(){
|
|
||||||
console.log(localStream)
|
|
||||||
|
|
||||||
|
|
||||||
// client.unpublish(localStream).then(() => {
|
|
||||||
// // 关闭屏幕分享流
|
|
||||||
// console.log("关闭")
|
|
||||||
// client.leave().then(() => {
|
|
||||||
// // leaving room success
|
|
||||||
// console.log("关闭成功")
|
|
||||||
// }).catch((error: string) => {
|
|
||||||
// console.error('leaving room failed: ' + error);
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
init(statie ? shexiang : pingmu);
|
|
||||||
statie = !statie;
|
|
||||||
}
|
|
||||||
function init(fun: any){
|
|
||||||
const el = document.querySelector("#local_stream");
|
|
||||||
if(el){
|
|
||||||
el.innerHTML = ""
|
|
||||||
}
|
|
||||||
client = TRTC.createClient({
|
|
||||||
mode: 'rtc',
|
|
||||||
sdkAppId: '1400400340',
|
|
||||||
userId: 10,
|
|
||||||
userSig: 'cf1e5db5d230ce6fee3fa23ba779c68a597dd229c11cd9ee315e5ffd6b9bf415'
|
|
||||||
});
|
|
||||||
client
|
|
||||||
.join({ roomId: 11 })
|
|
||||||
.catch((error: string) => {
|
|
||||||
console.error('进房失败 ' + error);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
console.log('进房成功');
|
|
||||||
fun()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function pingmu(){
|
function pingmu(){
|
||||||
localStream = TRTC.createStream({ userid: 10, audio: true, screen: true });
|
localStream = TRTC.createStream({ userid: 10, audio: true, screen: true });
|
||||||
|
|
||||||
@ -285,6 +245,53 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function init(fun: any, userSig: string){
|
||||||
|
console.log(userSig)
|
||||||
|
const el = document.querySelector("#local_stream");
|
||||||
|
if(el){
|
||||||
|
el.innerHTML = ""
|
||||||
|
}
|
||||||
|
client = TRTC.createClient({
|
||||||
|
mode: 'rtc',
|
||||||
|
sdkAppId: '1400400340',
|
||||||
|
userId: 10,
|
||||||
|
userSig: userSig
|
||||||
|
});
|
||||||
|
client
|
||||||
|
.join({ roomId: 11 })
|
||||||
|
.catch((error: string) => {
|
||||||
|
console.error('进房失败 ' + error);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
console.log('进房成功');
|
||||||
|
fun()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function fenxiang(){
|
||||||
|
console.log(localStream)
|
||||||
|
|
||||||
|
|
||||||
|
// client.unpublish(localStream).then(() => {
|
||||||
|
// // 关闭屏幕分享流
|
||||||
|
// console.log("关闭")
|
||||||
|
// client.leave().then(() => {
|
||||||
|
// // leaving room success
|
||||||
|
// console.log("关闭成功")
|
||||||
|
// }).catch((error: string) => {
|
||||||
|
// console.error('leaving room failed: ' + error);
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
init(statie ? shexiang : pingmu, userSing);
|
||||||
|
statie = !statie;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async ()=>{
|
||||||
|
userSing = await usersig(10);
|
||||||
|
|
||||||
|
init(pingmu, userSing);
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return{
|
return{
|
||||||
fenxiang
|
fenxiang
|
||||||
}
|
}
|
||||||
|
@ -202,30 +202,17 @@ export default defineComponent({
|
|||||||
console.log(date)
|
console.log(date)
|
||||||
const month: any = ref(date);
|
const month: any = ref(date);
|
||||||
const yue = ref(0);
|
const yue = ref(0);
|
||||||
function xia(){
|
|
||||||
yue.value = yue.value + 1;
|
|
||||||
month.value = getdate(yue.value)
|
|
||||||
getdates(userid.value)
|
|
||||||
}
|
|
||||||
const userid = computed(() => {
|
const userid = computed(() => {
|
||||||
return store.state.userinfo.memberid;
|
return store.state.userinfo.memberid;
|
||||||
|
|
||||||
})
|
})
|
||||||
watch(userid, ()=> {
|
|
||||||
getdates(userid.value);
|
|
||||||
})
|
|
||||||
function shang(){
|
|
||||||
yue.value = yue.value - 1;
|
|
||||||
month.value = getdate(yue.value)
|
|
||||||
getdates(userid.value)
|
|
||||||
}
|
|
||||||
async function getdates(userid: number){
|
async function getdates(userid: number){
|
||||||
getdatelist(month.value.start, month.value.end, userid).then((res: any)=>{
|
getdatelist(month.value.start, month.value.end, userid).then((res: any)=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
for(let i in res){
|
for(const i in res){
|
||||||
const day = getDay(res[i].dateline)
|
const day = getDay(res[i].dateline)
|
||||||
for(let j in month.value.date){
|
for(const j in month.value.date){
|
||||||
for(let k in month.value.date[j]){
|
for(const k in month.value.date[j]){
|
||||||
if(month.value.date[j][k].day == day){
|
if(month.value.date[j][k].day == day){
|
||||||
if(month.value.date[j][k].list == undefined){
|
if(month.value.date[j][k].list == undefined){
|
||||||
month.value.date[j][k].list = [];
|
month.value.date[j][k].list = [];
|
||||||
@ -239,6 +226,21 @@ export default defineComponent({
|
|||||||
console.log(month.value.date)
|
console.log(month.value.date)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
function xia(){
|
||||||
|
yue.value = yue.value + 1;
|
||||||
|
month.value = getdate(yue.value)
|
||||||
|
getdates(userid.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(userid, ()=> {
|
||||||
|
getdates(userid.value);
|
||||||
|
})
|
||||||
|
function shang(){
|
||||||
|
yue.value = yue.value - 1;
|
||||||
|
month.value = getdate(yue.value)
|
||||||
|
getdates(userid.value)
|
||||||
|
}
|
||||||
|
|
||||||
function navto(){
|
function navto(){
|
||||||
router.push("/regime/week")
|
router.push("/regime/week")
|
||||||
}
|
}
|
||||||
|
@ -219,14 +219,13 @@ export default defineComponent({
|
|||||||
const week = ref<any>(getweek());
|
const week = ref<any>(getweek());
|
||||||
const userid = store.state.userinfo.memberid;
|
const userid = store.state.userinfo.memberid;
|
||||||
console.log(week.value);
|
console.log(week.value);
|
||||||
getdates(userid);
|
|
||||||
function getdates(userid: number){
|
function getdates(userid: number){
|
||||||
getdatelist(week.value.start, week.value.end, userid).then((res: any)=>{
|
getdatelist(week.value.start, week.value.end, userid).then((res: any)=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
for(let i in res){
|
for(const i in res){
|
||||||
const day = getDay(res[i].dateline)
|
const day = getDay(res[i].dateline)
|
||||||
console.log(day)
|
console.log(day)
|
||||||
for(let j in week.value.date){
|
for(const j in week.value.date){
|
||||||
console.log(getDay(week.value.date[j].day))
|
console.log(getDay(week.value.date[j].day))
|
||||||
if(day == getDay(week.value.date[j].day)){
|
if(day == getDay(week.value.date[j].day)){
|
||||||
console.log("fuzhi")
|
console.log("fuzhi")
|
||||||
@ -240,6 +239,9 @@ export default defineComponent({
|
|||||||
console.log(week.value)
|
console.log(week.value)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getdates(userid);
|
||||||
|
|
||||||
watch(zhou, (value) => {
|
watch(zhou, (value) => {
|
||||||
week.value = getweek(value);
|
week.value = getweek(value);
|
||||||
console.log(week.value);
|
console.log(week.value);
|
||||||
|
Loading…
Reference in New Issue
Block a user