This commit is contained in:
asd 2020-10-28 11:39:20 +08:00
parent cefcf52257
commit ce602a5ff9
8 changed files with 37 additions and 16 deletions

View File

@ -743,7 +743,7 @@ export async function putmember(data: any): Promise<any>{
willsay: JSON.stringify(data.willsayValue), willsay: JSON.stringify(data.willsayValue),
birthday: data.birthday, birthday: data.birthday,
zoneid: data.zoneid, zoneid: data.zoneid,
currency: data.currency, currency: data.currencyValue,
language: data.languageValue, language: data.languageValue,
tlanguage: data.tlanguageValue, tlanguage: data.tlanguageValue,
video: data.video, video: data.video,

View File

@ -173,6 +173,7 @@ export default defineComponent({
const userinfo = computed(() => store.state.userinfo) const userinfo = computed(() => store.state.userinfo)
// //
for(const i in list){ for(const i in list){
console.log(list[i].route==useRoute().path)
if(list[i].route == useRoute().path){ if(list[i].route == useRoute().path){
selnum.value = parseInt(i); selnum.value = parseInt(i);
} }

View File

@ -43,7 +43,7 @@
<a-dropdown :trigger="['click']" :getPopupContainer="triggerNode => triggerNode.parentNode"> <a-dropdown :trigger="['click']" :getPopupContainer="triggerNode => triggerNode.parentNode">
<div class="item" @click="e => e.preventDefault()"> <div class="item" @click="e => e.preventDefault()">
<img src="@/static/images/qianbi.png" alt="" class="icon"> <img src="@/static/images/qianbi.png" alt="" class="icon">
<div class="name">{{userinfo.currencyValue}}</div> <div class="name">{{userinfo.currency}}</div>
<img src="@/static/images/jiantou2.png" alt="" class="down"> <img src="@/static/images/jiantou2.png" alt="" class="down">
</div> </div>
<template v-slot:overlay> <template v-slot:overlay>
@ -200,10 +200,6 @@ export default defineComponent({
} }
}, },
setup(props){ setup(props){
// console.log(useRoute().currentRoute.value.name)
axios.get("//api.map.baidu.com/location/ip?ak=YoG7yXzGNdKSDpAjvl7DpBaESaqzUKhT").then((res)=>{
console.log(res,"llllkljsdkoj")
})
const routes = useRoute(); const routes = useRoute();
console.log(routes.path); console.log(routes.path);
const types = ref(props.type) const types = ref(props.type)

View File

@ -11,9 +11,9 @@
<div class="bottom"> <div class="bottom">
<div class="date">{{date}}</div> <div class="date">{{date}}</div>
<div class="operate"> <div class="operate">
<div class="reply" @click="reply(username)"> <!-- <div class="reply" @click="reply(username)">
回复 回复
</div> </div> -->
<div class="del" @click="del(replyid)" v-if="parseInt(memberid)==myid"> <div class="del" @click="del(replyid)" v-if="parseInt(memberid)==myid">
删除 删除
</div> </div>

View File

@ -93,6 +93,7 @@
<script lang="ts"> <script lang="ts">
import { addcomment, getcommentlist, videodetail } from '@/api'; import { addcomment, getcommentlist, videodetail } from '@/api';
import store from '@/store'; import store from '@/store';
import { message } from 'ant-design-vue';
import { defineComponent, onMounted, ref, toRaw } from 'vue'; import { defineComponent, onMounted, ref, toRaw } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import ReviewItem from "./ReviewItem.vue" import ReviewItem from "./ReviewItem.vue"
@ -133,7 +134,12 @@ export default defineComponent({
// data.value.score=uinfo.value.score // data.value.score=uinfo.value.score
data.value.content=commentval.value data.value.content=commentval.value
console.log(data.value,2221) console.log(data.value,2221)
if(uinfo.value.name){
addcomment(toRaw(data.value)) addcomment(toRaw(data.value))
}else{
message.error("请先选择回复的学生")
}
// addcomment(toRaw(data.value))
} }
async function refresh(e?: any){ async function refresh(e?: any){

View File

@ -80,7 +80,7 @@
<div class="lessons"> <div class="lessons">
<!-- @click="tovideoxq(i.videoid)" --> <!-- @click="tovideoxq(i.videoid)" -->
<div class="lessonitem" v-for="(i,j) in videolist" :key="j" > <div class="lessonitem" v-for="(i,j) in videolist" :key="j" @click="todetail(i.videoid)">
<img :src="i.img" alt="" class="pic"/> <img :src="i.img" alt="" class="pic"/>
<div class="lessonname"> <div class="lessonname">
<div>{{i.title}}</div> <div>{{i.title}}</div>
@ -249,6 +249,9 @@ export default defineComponent({
function navto(){ function navto(){
router.push("/about") router.push("/about")
} }
function todetail(e?: number){
router.push("/regime/videoinfo?id="+e)
}
return { return {
formLayout, formLayout,
tabselected, tabselected,
@ -265,7 +268,8 @@ export default defineComponent({
sublogin, sublogin,
videolist, videolist,
tovideoxq, tovideoxq,
navto navto,
todetail
}; };
}, },
}); });

View File

@ -246,6 +246,10 @@ export default defineComponent({
message.error("密码不能为空"); message.error("密码不能为空");
return false; return false;
} }
if(userinfo.value.pass!=userinfo.value.passtow){
message.error("两次密码输入不一致")
return
}
if (userinfo.value.name == "") { if (userinfo.value.name == "") {
message.error("姓名不能为空"); message.error("姓名不能为空");
return false; return false;
@ -270,6 +274,7 @@ export default defineComponent({
*/ */
async function next(e: number) { async function next(e: number) {
if(!ifagree.value){ if(!ifagree.value){
message.error("请同意用户协议"); message.error("请同意用户协议");
return ; return ;

View File

@ -309,7 +309,7 @@ import { uploadflie } from "@/utils/vod"
import store from '@/store'; import store from '@/store';
import smile from "@/static/images/smile.png" import smile from "@/static/images/smile.png"
import smilet from "@/static/images/smilet.png" import smilet from "@/static/images/smilet.png"
import { changetel, checksmscode, editpassword, getarchives, getcurrencys, getlanguages, getquhaolist, getzonelist, putmember, sendsms } from "@/api/index" import { changetel, checksmscode, editpassword, editsystemsetting, getarchives, getcurrencys, getlanguages, getquhaolist, getzonelist, putmember, sendsms } from "@/api/index"
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
export default defineComponent({ export default defineComponent({
@ -330,12 +330,12 @@ export default defineComponent({
}]; }];
const userinfo = computed(() => {return store.state.userinfo}) const userinfo = computed(() => {return store.state.userinfo})
// //
const currencyindex=ref<string>(userinfo.value.currencyValue) const currencyindex=ref<string>(userinfo.value.currency)
const formData = ref(toRaw(userinfo.value)); const formData = ref(toRaw(userinfo.value));
watch(userinfo,() => { watch(userinfo,() => {
formData.value = toRaw(userinfo.value); formData.value = toRaw(userinfo.value);
console.log(userinfo.value.currencyValue,"listsssss") console.log(userinfo.value.currencyValue,"listsssss")
currencyindex.value=userinfo.value.currencyValue currencyindex.value=userinfo.value.currency
console.log(currencyindex.value,"listsssss") console.log(currencyindex.value,"listsssss")
}) })
@ -591,7 +591,15 @@ export default defineComponent({
} }
} }
} }
const reg = /^\w+((.\w+)|(-\w+))@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+).[A-Za-z0-9]+$/;
console.log(userinfo.value.email)
console.log()
if(reg.test(userinfo.value.email)){
putmember(uesrinfo) putmember(uesrinfo)
}else{
message.error("邮箱格式有误")
}
} }
@ -638,7 +646,8 @@ export default defineComponent({
function currencychange(e?: any){ function currencychange(e?: any){
console.log(e) console.log(e)
userinfo.value.currency=e userinfo.value.currencyValue=e
// editsystemsetting({currency:e})
} }
async function uploadspic(file: AntUpload) { async function uploadspic(file: AntUpload) {