修正完了error

This commit is contained in:
2020-10-22 11:04:04 +08:00
parent 854ce7191c
commit ff85285fb4
22 changed files with 303 additions and 295 deletions

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

@@ -305,7 +305,8 @@ export default defineComponent({
const modalNode = () => document.getElementsByClassName('modal-container')[0]
const chiveslist = ref<any>([[],[]]);
const languages = ref<unknown>([])
const languages = ref<unknown>([]);
const isSecondStep: Ref<boolean> = ref(false);
onMounted(async ()=>{
chiveslist.value = await getarchives()
languages.value = await getlanguages()
@@ -377,7 +378,6 @@ export default defineComponent({
}
}
// 绑定手机号是否是第二步
const isSecondStep: Ref<boolean> = ref(false);
interface BindPhoneItem{
number: string | number;
code: string | number;
@@ -457,7 +457,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'){
@@ -504,7 +504,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

@@ -204,52 +204,7 @@ export default defineComponent({
let localStream: any;
let statie = true;
let userSing = '';
onMounted(async ()=>{
userSing = await usersig(10);
init(pingmu, userSing);
})
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;
}
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 pingmu(){
function pingmu(){
localStream = TRTC.createStream({ userid: 10, audio: true, screen: true });
localStream
@@ -290,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);