Merge branch 'master' of http://git.luyuan.tk/luyuan/beelink into zj

This commit is contained in:
asd 2020-10-22 11:17:14 +08:00
commit 1541b869d0
24 changed files with 758 additions and 931 deletions

View File

@ -22,8 +22,8 @@
"vuex": "^4.0.0-0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
@ -31,12 +31,12 @@
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0-0",
"@vue/eslint-config-typescript": "^7.0.0",
"eslint": "^7.11.0",
"@vue/eslint-config-typescript": "^5.0.2",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0-0",
"node-sass": "^4.14.1",
"sass-loader": "^10.0.2",
"typescript": "~4.0.3"
"typescript": "~3.9.3"
},
"eslintConfig": {
"root": true,

View File

@ -10,7 +10,7 @@ import { MessageType } from 'ant-design-vue/types/message';
export interface Get {
<T>(url: string, params?: unknown, config?: AxiosRequestConfig): Promise<CustomSuccessData<T>>;
}
const login:MessageType[] = []
const login: MessageType[] = []
axios.interceptors.request.use((config)=>{
login.push(message.loading('加载中..', 0))
return config;

View File

@ -86,7 +86,7 @@ interface Teacherliked {
interest: string;
}
export async function getteacherliked(data?:any){
export async function getteacherliked(data?: any){
const res = await get<Array<Teacherliked>>('teacherliked',data);
// console.log(res)
return res;
@ -118,7 +118,7 @@ interface VideoListInfo {
msg: string;
total: number;
}
export async function getvideolist(data?:any): Promise<VideoListInfo>{
export async function getvideolist(data?: any): Promise<VideoListInfo>{
const res = await get<Array<VideoList>>('video',data)
console.log(res)
return res
@ -130,7 +130,7 @@ export async function getvideolist(data?:any): Promise<VideoListInfo>{
export async function getlivelist(data?:any):Promise<LivelistInfo> {
export async function getlivelist(data?: any): Promise<LivelistInfo> {
const res = await get<Array<LiveList>>('live',data);
console.log(res);
return res;
@ -151,8 +151,8 @@ export async function getstatisticlist() {
// console.log(res)
return {
liveInfo: res.data.liveInfo,
videoInfo:res.data.videoInfo,
studentInfo:res.data.studentInfo
videoInfo: res.data.videoInfo,
studentInfo: res.data.studentInfo
}
}
@ -160,10 +160,10 @@ export async function getstatisticlist() {
*
*/
interface Liveaddrule{
code: number,
msg: string
code: number;
msg: string;
}
export async function liveadd(data:any) {
export async function liveadd(data: any) {
const res = await post<Liveaddrule>('live',data);
console.log(res)
}
@ -182,7 +182,7 @@ export async function videoadd( form: any,data: any) {
fileurl: "",
fileduration: "",
desc: "",
video:[""],
video: [""],
}
}
}
@ -201,14 +201,14 @@ interface VideoDetail{
fileduration: string;
status: number;
desc: string;
deleted_at: null;
deleted_at: string;
created_at: string;
updated_at: string;
share:number,
watch:number
share: number;
watch: number;
}
export async function videodetail(data?:any,ifupdate?:number) {
export async function videodetail(data?: any,ifupdate?: number) {
const res=await get<VideoDetail>('video/'+data)
if(ifupdate){
console.log(111)
@ -218,8 +218,8 @@ export async function videodetail(data?:any,ifupdate?:number) {
fileid: res.data.fileid,
fileurl: res.data.fileurl,
fileduration: res.data.fileduration,
desc:res.data.desc,
video:[res.data.fileurl],
desc: res.data.desc,
video: [res.data.fileurl],
}
}else{
return {
@ -232,11 +232,11 @@ export async function videodetail(data?:any,ifupdate?:number) {
fileduration: res.data.fileduration,
status: res.data.status,
desc: res.data.desc,
deleted_at: res.data.deleted_at,
created_at: res.data.created_at,
updated_at: res.data.updated_at,
watch:res.data.watch,
share:res.data.share
deletedAt: res.data.deleted_at,
createdAt: res.data.created_at,
updatedAt: res.data.updated_at,
watch: res.data.watch,
share: res.data.share
}
}
@ -248,7 +248,7 @@ export async function videodetail(data?:any,ifupdate?:number) {
/**
*
*/
export async function videodel(data:any) {
export async function videodel(data: any) {
const res = await del<Liveaddrule>('video/'+data);
if(res.code==0){
message.success("删除成功")
@ -260,7 +260,7 @@ export async function videodel(data:any) {
/**
*
*/
export async function accountadd(data?:any) {
export async function accountadd(data?: any) {
const res = await post<Liveaddrule>('wallect',data);
if(res.code==0){
message.success("新增成功")
@ -270,19 +270,19 @@ export async function accountadd(data?:any) {
}
interface SaleInfo{
total:number,
accountid:number,
memberid:number,
sn:string,
type:number,
typename:string,
money:string,
source:number,
remark:string,
deleted_at:string,
created_at:string,
updated_at:string,
basemoney:string
total: number;
accountid: number;
memberid: number;
sn: string;
type: number;
typename: string;
money: string;
source: number;
remark: string;
deleted_at: string;
created_at: string;
updated_at: string;
basemoney: string;
}
interface SaleInfolData{
data: SaleInfo[];
@ -295,7 +295,7 @@ interface SaleInfolData{
* @param data
*/
export async function saleinfo(data?:any){
export async function saleinfo(data?: any){
const res=await get<SaleInfolData>('account',data)
console.log(res)
return res
@ -304,7 +304,7 @@ export async function saleinfo(data?:any){
/**
*
*/
export async function cashout(data?:any,accountinfo?:any){
export async function cashout(data?: any,accountinfo?: any){
// data.type=data.typeid?data.typeid:0
// if(data.type!=0){
@ -333,31 +333,31 @@ export async function cashout(data?:any,accountinfo?:any){
*
*/
interface AccountInfo{
wallectid:number,
typeid:number,
type:number,
account:number,
mname:string,
bankcode:string,
bankname:string
wallectid: number;
typeid: number;
type: number;
account: number;
mname: string;
bankcode: string;
bankname: string;
}
export async function getaccountinfo(data?: any){
const res=await get<AccountInfo>('wallect/'+data)
console.log(res,2333)
return {
accountid:res.data.wallectid,
type:res.data.type,
account:res.data.account,
mname:res.data.mname,
bankcode:res.data.bankcode,
bankname:res.data.bankname
accountid: res.data.wallectid,
type: res.data.type,
account: res.data.account,
mname: res.data.mname,
bankcode: res.data.bankcode,
bankname: res.data.bankname
}
}
/**
*
*/
export async function editaccount(data?:any){
export async function editaccount(data?: any){
const res=await put<Liveaddrule>('wallect/'+data);
if(res.code==0){
message.success("修改成功")
@ -366,9 +366,9 @@ export async function editaccount(data?:any){
/**
*
*/
export async function deleteaccount(data:any) {
export async function deleteaccount(data: any) {
const res = await del<Liveaddrule>('wallect/'+data);
const res = await del<Liveaddrule>('wallect/' + data);
if(res.code==0){
message.success("删除成功")
}
@ -381,17 +381,17 @@ export async function deleteaccount(data:any) {
*
*/
interface TransactionInfo{
accountid:number,
memberid:number,
sn:string,
type:number,
typename:string,
money:number,
source:number,
remark:string,
deleted_at:any,
created_at:string,
updated_at:string
accountid: number;
memberid: number;
sn: string;
type: number;
typename: string;
money: number;
source: number;
remark: string;
deleted_at: any;
created_at: string;
updated_at: string;
}
export async function transactioninfo(data?: any){
const res = await get<TransactionInfo>('account/'+data)
@ -402,12 +402,12 @@ export async function transactioninfo(data?: any){
/**
*
*/
export async function editpassword(data?:any) :Promise<any> {
export async function editpassword(data?: any): Promise<any> {
console.log(data,111)
const newdata={
memberid:0,
password:"",
topassword:""
password: "",
topassword: ""
}
newdata.memberid=data.memberid
newdata.password=data.password
@ -425,24 +425,24 @@ export async function editpassword(data?:any) :Promise<any> {
*
*/
interface WithDrawal{
withdrawalid:number,
memberid:number,
sn:string,
status:number,
statusname:string,
type:number,
typename:string,
money:number
sxf:number,
international:number,
account:string,
mname:string,
bankcode:string,
bankname:string,
remark:string,
deleted_at:string,
created_at:string,
updated_at:string
withdrawalid: number;
memberid: number;
sn: string;
status: number;
statusname: string;
type: number;
typename: string;
money: number;
sxf: number;
international: number;
account: string;
mname: string;
bankcode: string;
bankname: string;
remark: string;
deleted_at: string;
created_at: string;
updated_at: string;
}
interface WithdrawlData{
data: WithDrawal[];
@ -450,7 +450,7 @@ interface WithdrawlData{
msg: string;
total: number;
}
export async function withdrawal(data?:any) {
export async function withdrawal(data?: any) {
console.log(data)
const res=await get<WithdrawlData>('withdrawal',data)
// console.log(res)
@ -460,7 +460,7 @@ export async function withdrawal(data?:any) {
/**
*
*/
export async function withdrawlxq(data?:any){
export async function withdrawlxq(data?: any){
const res=await get<WithDrawal>('withdrawal/'+data)
return res.data
}
@ -469,17 +469,17 @@ export async function withdrawlxq(data?:any){
*
*/
interface CommentList{
commentid:number,
memberid:number,
cid:number,
type:number,
score:number,
content:string,
deleted_at:null,
created_at:string,
updated_at:string,
name:string,
img:string
commentid: number;
memberid: number;
cid: number;
type: number;
score: number;
content: string;
deleted_at: null;
created_at: string;
updated_at: string;
name: string;
img: string;
}
interface CommentlData{
data: CommentList[];
@ -491,10 +491,10 @@ interface ReplylistData{
data: CommentList[];
code: number;
msg: string;
score?:string,
score?: string;
total: number;
}
export async function getcommentlist(data?:any) {
export async function getcommentlist(data?: any) {
console.log(data.type==2)
if(data.type==2){
@ -518,13 +518,13 @@ export async function getcommentlist(data?:any) {
*
*/
interface SendData{
type?:number,
cid?:number,
teacherid?:number,
score?:number,
content?:string
type?: number;
cid?: number;
teacherid?: number;
score?: number;
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)
if(res.code==0){
message.success("发布成功")
@ -535,7 +535,7 @@ export async function addcomment(data?:any):Promise<void> {
*
*/
export async function delreply(data?:any) {
export async function delreply(data?: any) {
const res = await del<Liveaddrule>('comments/'+data);
if(res.code==0){
message.success("删除成功")
@ -548,37 +548,37 @@ export async function addcomment(data?:any):Promise<void> {
*
*/
interface CheckuserRule{
memberid: number,
name: string,
mobile: string,
email: string,
code:string
memberid: number;
name: string;
mobile: string;
email: string;
code: string;
}
interface CheckData{
data: {
memberid: any,
name: string,
mobile: string,
email: string,
code:string
},
memberid: any;
name: string;
mobile: string;
email: string;
code: string;
};
code: number;
msg: string;
}
export async function checkuser(data?: any) {
const newdata={number:""}
export async function checkuser(data?: any){
const newdata={number: ""}
newdata.number=data.phone
const res = await get<CheckuserRule>('checkUser',newdata);
// console.log(res)
return {
code :res.code,
msg:res.msg,
data:{
memberid:res.data.memberid,
code: res.code,
msg: res.msg,
data: {
memberid: res.data.memberid,
name: res.data.name,
mobile: res.data.mobile,
email: res.data.email,
code:res.data.code
code: res.data.code
}
}
}
@ -657,7 +657,7 @@ interface Countries{
interface Willsay{
languageid: number;
name: string
name: string;
}
export async function getarchives(): Promise<[Countries[],Willsay[]]>{
@ -676,7 +676,7 @@ interface Language {
dictionaryid: number;
name: string;
alias: string;
code :string;
code: string;
position: number;
publish: number;
value: string;
@ -704,22 +704,22 @@ export async function putmember(data: any): Promise<any>{
data.willsayValue[i].level=data.willsayValue[i].level+''
}
const newdata={
name:data.name,
mobile:data.mobile,
img:data.img,
country:data.countryValue,
live:data.live,
mtongue:data.mtongue,
email:data.email,
interest:JSON.stringify(data.interest),
willsay:JSON.stringify(data.willsayValue),
birthday:data.birthday,
zoneid:data.zoneid,
currency:data.currencyValue,
language:data.languageValue,
tlanguage:data.tlanguageValue,
video:data.video,
desc:data.desc
name: data.name,
mobile: data.mobile,
img: data.img,
country: data.countryValue,
live: data.live,
mtongue: data.mtongue,
email: data.email,
interest: JSON.stringify(data.interest),
willsay: JSON.stringify(data.willsayValue),
birthday: data.birthday,
zoneid: data.zoneid,
currency: data.currencyValue,
language: data.languageValue,
tlanguage: data.tlanguageValue,
video: data.video,
desc: data.desc
}
console.log(newdata)
const res = await put<Liveaddrule>(`member/${store.state.userinfo.memberid}`, newdata)
@ -868,4 +868,17 @@ export async function refusedtolive(signupid: number, msg: string){
message.error(res.msg)
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;
}

View File

@ -159,17 +159,17 @@ export default defineComponent({
const videoid=ref(useRoute().query.id)
const ifshow=ref(false)
onMounted(async () => {
reviewlist.value=await getcommentlist({type:2,id:videoid.value})
reviewlist.value=await getcommentlist({type: 2,id: videoid.value})
})
async function refresh(e?:any){
async function refresh(e?: any){
console.log("rekload")
reviewlist.value=await getcommentlist({type:2,id:videoid.value})
replylist.value=await getcommentlist({type:3,id:e})
reviewlist.value=await getcommentlist({type: 2,id: videoid.value})
replylist.value=await getcommentlist({type: 3,id: e})
}
const stars=ref<Array<number>>([])
console.log(prop.score)
let score1=ref<any>(prop.score)
const score1=ref<any>(prop.score)
// console.log(score1)
if(score1.value==5){
for(let i=0;i < score1.value ; i++){
@ -187,13 +187,13 @@ export default defineComponent({
}
}
function reply(e?:string){
function reply(e?: string){
console.log(155)
context.emit("replying",{name:e,replyid:prop.replyid,score:prop.score})
context.emit("replying",{name: e,replyid: prop.replyid,score: prop.score})
}
async function findall(e :number){
async function findall(e: number){
console.log("all")
replylist.value =await getcommentlist({type:3,id:e})
replylist.value =await getcommentlist({type: 3,id: e})
ifshow.value=ifshow.value==false?true:false
}
return {

View File

@ -102,39 +102,39 @@ import store from '@/store';
import { defineComponent, ref } from 'vue';
export default defineComponent({
props:{
photo:{
type:String
props: {
photo: {
type: String
},
username:{
type:String
username: {
type: String
},
score:{
type:Number,
score: {
type: Number,
},
content:{
type:String
content: {
type: String
},
date:{
type:String
date: {
type: String
},
memberid:{
type:Number
memberid: {
type: Number
},
replyid:{
type:Number
replyid: {
type: Number
}
},
setup(prop,context){
const myid=ref<number>(store.state.userinfo.memberid)
function reply(e?:string){
function reply(e?: string){
console.log(155)
context.emit("replying",{name:e,replyid:prop.replyid,score:prop.score})
context.emit("replying",{name: e,replyid: prop.replyid,score: prop.score})
}
console.log(1)
async function del(e?: number){
console.log(e)
let res=await delreply(e)
const res=await delreply(e)
if(res.code==0){
context.emit("reload",prop.replyid)
}

View File

@ -98,13 +98,13 @@ import { useRoute } from 'vue-router';
import ReviewItem from "./ReviewItem.vue"
export default defineComponent({
components:{
components: {
ReviewItem
},
props:{
videoid:{
type:Number
props: {
videoid: {
type: Number
}
},
setup(prop,context){
@ -114,16 +114,16 @@ export default defineComponent({
const replylist =ref({})
const videoid=ref(useRoute().query.id)
onMounted(async () => {
reviewlist.value=await getcommentlist({type:2,id:videoid.value})
reviewlist.value=await getcommentlist({type: 2,id: videoid.value})
})
console.log(useRoute().query)
console.log(store.state.userinfo.memberid,"userifno")
interface SendData{
type?:number,
cid?:number,
teacherid?:number,
score?:number,
content?:string
type?: number;
cid?: number;
teacherid?: number;
score?: number;
content?: string;
}
function send(){
const data = ref<SendData>({})
@ -136,10 +136,10 @@ export default defineComponent({
addcomment(toRaw(data.value))
}
async function refresh(e?:any){
async function refresh(e?: any){
console.log("rekload")
reviewlist.value=await getcommentlist({type:2,id:videoid.value})
replylist.value=await getcommentlist({type:3,id:e})
reviewlist.value=await getcommentlist({type: 2,id: videoid.value})
replylist.value=await getcommentlist({type: 3,id: e})
}
const reply: (val: number) => void = (val: number) => {
console.log("收到子组件事件", val)
@ -148,7 +148,7 @@ export default defineComponent({
const haslist=ref([])
const findreply: (e: any) => void = async (e: any) => {
console.log("收到子组件事件", e)
replylist.value=await getcommentlist({type:3,id:e})
replylist.value=await getcommentlist({type: 3,id: e})
}
console.log(1)
return {

View File

@ -3,7 +3,7 @@ import zh from "./zh"
export default {
locale: "zh", //默认语言
messages:{
messages: {
zh
}
}

View File

@ -5,16 +5,16 @@ export default createStore({
state: {
userinfo:{
accesstoken: "",
api_token: "",
apiToken: "",
birthday: "",
country: "",
countryValue: "",
cover: "",
code:"",
created_at: "",
createdAt: "",
currency: "",
currencyValue: "",
deleted_at: null,
deletedAt: null,
desc: "",
email: "",
img: "",
@ -23,7 +23,7 @@ export default createStore({
languageValue: "zh",
live: "",
livetime: "",
login_type: 0,
loginType: 0,
memberid: 0,
mobile: "",
money: "",
@ -40,7 +40,7 @@ export default createStore({
tlanguageValue: 1,
type: 1,
uid: "",
updated_at: "",
updatedAt: "",
video: "",
willsay: [{name: "请选择", level: 0}],
willsayValue: [{name: "0", level: 0}],

View File

@ -1,12 +1,12 @@
import { inject, provide, ref } from 'vue';
interface Language {
[key :string]: string
[key: string]: string;
}
interface Config {
locale: string;
messages: {[key: string]: Language}
messages: {[key: string]: Language};
}
const createI18n = (config: Config) => ({

View File

@ -10,7 +10,7 @@ interface UploaderDone {
video: {
url: string;
verify_content: string;
}
};
}
export async function uploadflie(file: File,on?: OnFunctio): Promise<UploaderDone> {

View File

@ -114,9 +114,10 @@ export default defineComponent({
const uinfo=ref({
phone:"",
code:"",
quhao:"",
password:"",
repassword:"",
quhao:"",
checkcodequhao:"",
memberid:0
})
const time = ref(60); //
@ -187,17 +188,17 @@ export default defineComponent({
return
}
let checkcode=await checksmscode(uinfo.value.quhao+uinfo.value.phone,uinfo.value.code)
console.log(checkcode,"checked")
if(checkcode){
console.log(uinfo.value)
let res= await editpassword(toRaw(uinfo.value))
if(res.code==0){
stepnow.value=e
}
}else{
const checkcode=await checksmscode(uinfo.value.quhao+uinfo.value.phone,uinfo.value.code)
console.log(checkcode,"checked")
if(checkcode){
console.log(uinfo.value)
const res= await editpassword(toRaw(uinfo.value))
if(res.code==0){
stepnow.value=e
}
}else{
message.error("验证码有误,请重新输入")
}
}
}

View File

@ -315,11 +315,12 @@ export default defineComponent({
const modalNode = () => document.getElementsByClassName('modal-container')[0]
const chiveslist = ref<any>([[],[]]);
const languages = ref<unknown>([])
const quhaolist = ref<any>([])
const myquhao=ref<string>("")
const languages = ref<unknown>([]);
const quhaolist = ref<any>([]);
const myquhao = ref<string>("");
const mynewtel=ref<string>("")
const mynewtel = ref<string>("");
const isSecondStep: Ref<boolean> = ref(false);
onMounted(async ()=>{
chiveslist.value = await getarchives()
languages.value = await getlanguages()
@ -395,7 +396,6 @@ export default defineComponent({
}
}
//
const isSecondStep: Ref<boolean> = ref(false);
interface BindPhoneItem{
number: string | number;
code: string | number;
@ -504,7 +504,7 @@ export default defineComponent({
// console.log(toRaw(formData.value).willsay[i])
// }
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])
if(typeof toRaw(formData.value).willsay[i].name=='string'){
@ -551,7 +551,7 @@ export default defineComponent({
async function uploads(file: AntUpload) {
uploadprogress.value=0
let res = await uploadflie(file.file, (info: any) => {
const res = await uploadflie(file.file, (info: any) => {
console.log(info);
uploadprogress.value = info.percent.toFixed(2) * 100;
});

View File

@ -121,7 +121,7 @@ export default defineComponent({
},
setup() {
interface FileItem {
video:Array<string>,
video: Array<string>;
}
const fileList: Array<FileItem> = [];
@ -195,7 +195,7 @@ export default defineComponent({
file: File;
}
async function uploadspic(file: AntUpload) {
let res = await uploadflie(file.file, (info: any) => {
const res = await uploadflie(file.file, (info: any) => {
console.log(info);
uploadpicprogress.value = info.percent.toFixed(2) * 100;
});
@ -216,7 +216,7 @@ export default defineComponent({
console.log(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);
uploadprogress.value = info.percent.toFixed(2) * 100;
});

View File

@ -272,7 +272,7 @@ export default defineComponent({
validate()
.then(() => {
// console.log(toRaw(form),111);
let subdata = toRaw(form);
const subdata = toRaw(form);
// subdata.fileid=picinfo.
console.log(subdata);
liveadd(subdata);
@ -294,7 +294,7 @@ export default defineComponent({
*/
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())
form.dateline =
new Date(e).getFullYear() +
@ -326,7 +326,7 @@ export default defineComponent({
console.log(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);
uploadprogress.value = info.percent.toFixed(2) * 100;
});
@ -337,7 +337,7 @@ export default defineComponent({
}
async function uploadspic(file: AntUpload) {
let res = await uploadflie(file.file, (info: any) => {
const res = await uploadflie(file.file, (info: any) => {
console.log(info);
uploadpicprogress.value = info.percent.toFixed(2) * 100;
});

View File

@ -67,13 +67,13 @@ export default defineComponent({
withdrawallist.value=await withdrawal()
console.log(withdrawallist.value)
})
async function onChange(e: any,dateString:string){
async function onChange(e: any,dateString: string){
console.log(dateString)
dates.value[0]=dateString[0]
dates.value[1]=dateString[1]
withdrawallist.value=await withdrawal({bdate:dates.value[0],edate:dates.value[1]})
}
function navto(index: number,id?:number) {
function navto(index: number,id?: number) {
let url = "";
switch (index) {
case 1:
@ -100,7 +100,7 @@ export default defineComponent({
}
async function pagechange(e:any) {
async function pagechange(e: any) {
console.log(e)
page.value=e
withdrawallist.value=await withdrawal({bdate:dates.value[0],edate:dates.value[1],page:e});

View File

@ -121,7 +121,7 @@ export default defineComponent({
}
})
function navto(index: number,id?:number) {
function navto(index: number,id?: number) {
let url = "";
switch (index) {
case 1:

View File

@ -246,7 +246,7 @@ export default defineComponent({
function listchange(e: number){
listindex.value=e
}
async function onChange(e: any,dateString:string){
async function onChange(e: any,dateString: string){
console.log(dateString)
dates.value[0]=dateString[0]
dates.value[1]=dateString[1]
@ -255,12 +255,12 @@ export default defineComponent({
async function del(e: number){
deleteaccount(e)
}
async function pagechange(e:any) {
async function pagechange(e: any) {
console.log(e)
page.value=e
salelist.value=await saleinfo({status:state.value,bdate:dates.value[0],edate:dates.value[1],page:e});
}
function navto(index: number,id?:number) {
function navto(index: number,id?: number) {
let url = "";
switch (index) {
case 1:

View File

@ -190,6 +190,11 @@ export default defineComponent({
onMounted(async () => {
livelist.value = await getlivelist();
});
async function tab(){
input.value = '';
livelist.value = await getlivelist({ status: tabindex.value});
}
function tabchange(e: number): void {
tabindex.value = e;
livelist.value = {data:[], code: 0, msg: "",total: 0};
@ -199,11 +204,7 @@ export default defineComponent({
console.log(input.value);
livelist.value = await getlivelist({title: input.value});
}
async function tab(){
input.value = '';
livelist.value = await getlivelist({ status: tabindex.value});
}
return {
page,
tabindex,

View File

@ -45,7 +45,7 @@ export default defineComponent({
setup() {
console.log(useRoute().query.id);
const id = useRoute().query.id;
let liveinfo = ref<any>({})
const liveinfo = ref<any>({})
if (typeof id == "string") {
getliveinfo(parseInt(id)).then((res) => {
liveinfo.value = res;

View File

@ -191,6 +191,7 @@ import { defineComponent, onMounted } from "vue";
import LivePlaying from "@/components/LivePlaying.vue";
import LiveingWatcher from "@/components/LiveingWatcher.vue";
import TRTC from "trtc-js-sdk"
import { usersig } from '@/api';
export default defineComponent({
components: {
@ -202,49 +203,8 @@ export default defineComponent({
let client: any;
let localStream: any;
let statie = true;
onMounted(()=>{
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(){
let userSing = '';
function pingmu(){
localStream = TRTC.createStream({ userid: 10, audio: true, screen: true });
localStream
@ -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{
fenxiang
}

View File

@ -182,7 +182,7 @@ export default defineComponent({
onMounted(async () => {
teacherlikedlist.value=await getteacherliked()
});
async function search(e:any){
async function search(e: any){
teacherlikedlist.value=await getteacherliked(e)
}
async function pagechange(){

View File

@ -202,30 +202,17 @@ export default defineComponent({
console.log(date)
const month: any = ref(date);
const yue = ref(0);
function xia(){
yue.value = yue.value + 1;
month.value = getdate(yue.value)
getdates(userid.value)
}
const userid = computed(() => {
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){
getdatelist(month.value.start, month.value.end, userid).then((res: any)=>{
console.log(res)
for(let i in res){
for(const i in res){
const day = getDay(res[i].dateline)
for(let j in month.value.date){
for(let k in month.value.date[j]){
for(const j in month.value.date){
for(const k in month.value.date[j]){
if(month.value.date[j][k].day == day){
if(month.value.date[j][k].list == undefined){
month.value.date[j][k].list = [];
@ -239,6 +226,21 @@ export default defineComponent({
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(){
router.push("/regime/week")
}

View File

@ -219,14 +219,13 @@ export default defineComponent({
const week = ref<any>(getweek());
const userid = store.state.userinfo.memberid;
console.log(week.value);
getdates(userid);
function getdates(userid: number){
getdatelist(week.value.start, week.value.end, userid).then((res: any)=>{
console.log(res)
for(let i in res){
for(const i in res){
const day = getDay(res[i].dateline)
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))
if(day == getDay(week.value.date[j].day)){
console.log("fuzhi")
@ -240,6 +239,9 @@ export default defineComponent({
console.log(week.value)
})
}
getdates(userid);
watch(zhou, (value) => {
week.value = getweek(value);
console.log(week.value);

1063
yarn.lock

File diff suppressed because it is too large Load Diff