优化人员

This commit is contained in:
zyronon 2021-09-13 17:50:43 +08:00
parent b379a9438d
commit 22e6e74a1f
6 changed files with 115 additions and 118 deletions

View File

@ -32,26 +32,22 @@ export default {
} }
}, },
methods: { methods: {
stop() {
},
tab(index) { tab(index) {
this.currentTab = index
switch (index) { switch (index) {
case 1: case 1:
this.$router.push('/') this.$nav('/')
break break
case 2: case 2:
this.$router.push('/attention') this.$nav('/attention')
break break
case 3: case 3:
this.$nav('/publish') this.$nav('/publish')
break break
case 4: case 4:
this.$router.push('/message') this.$nav('/message')
break break
case 5: case 5:
this.$router.push('/me') this.$nav('/me')
break break
} }
}, },

View File

@ -203,22 +203,17 @@ export default {
}, },
methods: { methods: {
dbClick(e) { dbClick(e) {
console.log('dbclick') // console.log('dbclick')
let id = 'a' + Date.now()
let elWidth = 80
let rotate = this.randomNum(0, 1)
let template = `<img class="${rotate ? 'left love-dbclick' : 'right love-dbclick'}" id="${id}" src="${require('../assets/img/icon/loved.svg')}" alt="">`
let el = new Dom().create(template)
el.css({top: e.y - elWidth, left: e.x - elWidth / 2,})
new Dom('#home-index').append(el)
setTimeout(() => { setTimeout(() => {
let id = 'a' + Date.now() new Dom(`#${id}`).remove()
let elWidth = 80 }, 1000)
let rotate = this.randomNum(0, 1)
// let rotate = 1
let template = `<img class="${rotate ? 'left love-dbclick' : 'right love-dbclick'}" id="${id}" src="${require('../assets/img/icon/loved.svg')}" alt="">`
let el = new Dom().create(template)
el.css({top: e.y - elWidth, left: e.x - elWidth / 2,})
// new Dom().find('#home-index').append(el)
document.querySelector('#home-index').appendChild(el.els[0])
//
setTimeout(() => {
new Dom().find(`#${id}`).remove()
}, 1000)
})
}, },
randomNum(minNum, maxNum) { randomNum(minNum, maxNum) {
switch (arguments.length) { switch (arguments.length) {
@ -234,7 +229,7 @@ export default {
let checkTime = 400 let checkTime = 400
if (this.isDbClick) { if (this.isDbClick) {
this.dbClick(e) this.dbClick(e)
console.log('checkDbClick-dbclick1') // console.log('checkDbClick-dbclick1')
clearTimeout(this.dbClickTimer); clearTimeout(this.dbClickTimer);
this.dbClickTimer = setTimeout(() => { this.dbClickTimer = setTimeout(() => {
this.isDbClick = false this.isDbClick = false
@ -243,7 +238,7 @@ export default {
let nowTime = new Date().getTime(); let nowTime = new Date().getTime();
if (nowTime - this.lastClickTime < checkTime) { if (nowTime - this.lastClickTime < checkTime) {
this.dbClick(e) this.dbClick(e)
console.log('checkDbClick-dbclick2') // console.log('checkDbClick-dbclick2')
this.lastClickTime = 0; this.lastClickTime = 0;
this.clickTimer && clearTimeout(this.clickTimer); this.clickTimer && clearTimeout(this.clickTimer);
@ -254,7 +249,7 @@ export default {
} else { } else {
this.lastClickTime = nowTime; this.lastClickTime = nowTime;
this.clickTimer = setTimeout(() => { this.clickTimer = setTimeout(() => {
console.log('单击') // console.log('')
this.togglePlayVideo() this.togglePlayVideo()
}, checkTime); }, checkTime);
} }

View File

@ -1,8 +1,8 @@
export default { export default {
baseUrl: 'http://192.168.0.103/index.php/v1', // baseUrl: 'http://192.168.0.103/index.php/v1',
filePreview:'http://192.168.0.103/static/uploads/', // filePreview:'http://192.168.0.103/static/uploads/',
// baseUrl: 'http://192.168.10.164/index.php/v1', baseUrl: 'http://192.168.10.164/index.php/v1',
// filePreview:'http://192.168.10.164/static/uploads/' filePreview:'http://192.168.10.164/static/uploads/'
// baseUrl: 'http://localhost/index.php/v1', // baseUrl: 'http://localhost/index.php/v1',
// filePreview:'http://localhost/static/uploads/' // filePreview:'http://localhost/static/uploads/'
} }

View File

@ -11,11 +11,11 @@
<div class="friends pl1r "> <div class="friends pl1r ">
<div class="friend pr1r pl1r" <div class="friend pr1r pl1r"
@click="$nav('/message/chat')" @click="$nav('/message/chat')"
v-for="item in 10"> v-for="item in friends.all">
<div class="avatar on-line"> <div class="avatar on-line">
<img src="../../assets/img/icon/head-image.jpeg" alt=""> <img :src="$imgPreview(item.avatar)" alt="">
</div> </div>
<span>ttenu</span> <span>{{ item.name }}</span>
</div> </div>
<div class="friend pr10p"> <div class="friend pr10p">
<img src="../../assets/img/icon/next.svg" alt=""> <img src="../../assets/img/icon/next.svg" alt="">
@ -97,8 +97,8 @@
</div> </div>
<div class="friend-list"> <div class="friend-list">
<div class="index">Z</div> <div class="index">Z</div>
<div class="friend-item" v-for="item in friends" @click="item.select = !item.select"> <div class="friend-item" v-for="item in friends.all" @click="item.select = !item.select">
<img class="left" src="../../assets/img/icon/head-image.jpeg" alt=""> <img class="left" :src="$imgPreview(item.avatar)" alt="">
<div class="right"> <div class="right">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<Check mode="red" style="height: 2rem;width: 2rem;" v-model="item.select"/> <Check mode="red" style="height: 2rem;width: 2rem;" v-model="item.select"/>
@ -142,6 +142,7 @@ import Footer from '../../components/Footer.vue'
import Search from "../../components/Search"; import Search from "../../components/Search";
import FromBottomDialog from '../../components/dialog/FromBottomDialog' import FromBottomDialog from '../../components/dialog/FromBottomDialog'
import Check from "../../components/Check"; import Check from "../../components/Check";
import {mapState} from "_vuex@4.0.2@vuex";
export default { export default {
name: "Message", name: "Message",
@ -158,63 +159,63 @@ export default {
createChatDialog: false, createChatDialog: false,
isShowText: false, isShowText: false,
text: 'AAAAAAAAA、BBBBBBBBBBBBB、CCCCCCCC', text: 'AAAAAAAAA、BBBBBBBBBBBBB、CCCCCCCC',
friends: [ // friends: [
{ // {
avatar: '', // avatar: '',
name: '11', // name: '11',
account: '173123141231qoqo', // account: '173123141231qoqo',
select: false // select: false
}, // },
{ // {
avatar: '', // avatar: '',
name: 'Boooo', // name: 'Boooo',
account: '234242ooo', // account: '234242ooo',
select: false // select: false
}, // },
{ // {
avatar: '', // avatar: '',
name: '三分钟情、', // name: '',
account: '3029342', // account: '3029342',
select: false // select: false
}, // },
{ // {
avatar: '', // avatar: '',
name: 'zzzzz', // name: 'zzzzz',
account: '6034592', // account: '6034592',
select: false // select: false
}, // },
{ // {
avatar: '', // avatar: '',
name: 'zzzzz', // name: 'zzzzz',
account: '6034592', // account: '6034592',
select: false // select: false
}, // },
{ // {
avatar: '', // avatar: '',
name: 'zzzzz', // name: 'zzzzz',
account: '6034592', // account: '6034592',
select: false // select: false
}, // },
{ // {
avatar: '', // avatar: '',
name: 'zzzzz', // name: 'zzzzz',
account: '6034592', // account: '6034592',
select: false // select: false
}, // },
{ // {
avatar: '', // avatar: '',
name: 'zzzzz', // name: 'zzzzz',
account: '6034592', // account: '6034592',
select: false // select: false
}, // },
], // ],
searchFriends: [] searchFriends: []
} }
}, },
computed: { computed: {
...mapState(['friends']),
selectFriends() { selectFriends() {
let res = this.friends.filter(v => v.select) return this.friends.all.filter(v => v.select).length
return res.length
} }
}, },
watch: { watch: {

View File

@ -30,7 +30,7 @@ const store = Vuex.createStore({
"all": [ "all": [
{ {
"id": "224e9a00-ffa0-4bc1-bb07-c318c7b02fa5", "id": "224e9a00-ffa0-4bc1-bb07-c318c7b02fa5",
"avatar": "images/20210816/1.png", "avatar": require('../assets/img/icon/avatar/1.png'),
"name": "冒安志", "name": "冒安志",
"sex": "", "sex": "",
"age": null, "age": null,
@ -48,7 +48,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "2b446aa8-5d31-429a-8e39-d4705eb4e900", "id": "2b446aa8-5d31-429a-8e39-d4705eb4e900",
"avatar": "images/20210816/19.png", "avatar": require('../assets/img/icon/avatar/19.png'),
"name": "浅唱↘我们的歌", "name": "浅唱↘我们的歌",
"sex": "", "sex": "",
"age": null, "age": null,
@ -66,7 +66,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "2d8622b4-7112-4bc7-a0cf-00a268a85504", "id": "2d8622b4-7112-4bc7-a0cf-00a268a85504",
"avatar": "images/20210816/25.png", "avatar": require('../assets/img/icon/avatar/25.png'),
"name": "‘心’之天空", "name": "‘心’之天空",
"sex": "", "sex": "",
"age": null, "age": null,
@ -84,7 +84,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "2e38900b-65f7-426a-8e8b-edb403df35fb", "id": "2e38900b-65f7-426a-8e8b-edb403df35fb",
"avatar": "images/20210816/18.png", "avatar": require('../assets/img/icon/avatar/18.png'),
"name": "◇、_保持微笑ゞ", "name": "◇、_保持微笑ゞ",
"sex": "", "sex": "",
"age": null, "age": null,
@ -102,7 +102,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "3cd53cb5-04f8-4439-ad2b-e57b3f9b8c73", "id": "3cd53cb5-04f8-4439-ad2b-e57b3f9b8c73",
"avatar": "images/20210816/26.png", "avatar": require('../assets/img/icon/avatar/26.png'),
"name": "好◇°我会Yi直在●", "name": "好◇°我会Yi直在●",
"sex": "", "sex": "",
"age": null, "age": null,
@ -120,7 +120,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "46c77017-9dc6-4a48-bf96-560c6e7db06f", "id": "46c77017-9dc6-4a48-bf96-560c6e7db06f",
"avatar": "images/20210816/4.png", "avatar": require('../assets/img/icon/avatar/4.png'),
"name": "甫韦茹", "name": "甫韦茹",
"sex": "", "sex": "",
"age": null, "age": null,
@ -138,7 +138,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "4df770d7-a414-4e02-8f9e-72ebd87eb93e", "id": "4df770d7-a414-4e02-8f9e-72ebd87eb93e",
"avatar": "images/20210816/12.png", "avatar": require('../assets/img/icon/avatar/12.png'),
"name": "幸福泡泡", "name": "幸福泡泡",
"sex": "", "sex": "",
"age": null, "age": null,
@ -156,7 +156,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "5ebb4d7a-c7ad-43c7-a830-9eb3ee423cb7", "id": "5ebb4d7a-c7ad-43c7-a830-9eb3ee423cb7",
"avatar": "images/20210816/3.png", "avatar": require('../assets/img/icon/avatar/3.png'),
"name": "蔡傲安", "name": "蔡傲安",
"sex": "", "sex": "",
"age": null, "age": null,
@ -174,7 +174,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "7226092d-a2c5-4ffd-98d7-3b7ac814bca3", "id": "7226092d-a2c5-4ffd-98d7-3b7ac814bca3",
"avatar": "images/20210816/16.png", "avatar": require('../assets/img/icon/avatar/16.png'),
"name": "心若向阳无谓伤悲", "name": "心若向阳无谓伤悲",
"sex": "", "sex": "",
"age": null, "age": null,
@ -192,7 +192,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "72aef2a9-5573-4205-9288-706e19bccc7f", "id": "72aef2a9-5573-4205-9288-706e19bccc7f",
"avatar": "images/20210816/10.png", "avatar": require('../assets/img/icon/avatar/10.png'),
"name": "A倒影着稚嫩的少年", "name": "A倒影着稚嫩的少年",
"sex": "", "sex": "",
"age": null, "age": null,
@ -210,7 +210,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "77c82d2e-9be1-45c2-a733-00445d2e7f2c", "id": "77c82d2e-9be1-45c2-a733-00445d2e7f2c",
"avatar": "images/20210816/22.png", "avatar": require('../assets/img/icon/avatar/22.png'),
"name": "一只喵的旅行。", "name": "一只喵的旅行。",
"sex": "", "sex": "",
"age": null, "age": null,
@ -228,7 +228,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "7b30566d-70eb-4a31-ae43-200917269a43", "id": "7b30566d-70eb-4a31-ae43-200917269a43",
"avatar": "images/20210816/14.png", "avatar": require('../assets/img/icon/avatar/14.png'),
"name": "℉阳光下的小情绪", "name": "℉阳光下的小情绪",
"sex": "", "sex": "",
"age": null, "age": null,
@ -246,7 +246,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "90c6ccd8-0653-4789-9348-28fba06d6ae3", "id": "90c6ccd8-0653-4789-9348-28fba06d6ae3",
"avatar": "images/20210816/11.png", "avatar": require('../assets/img/icon/avatar/11.png'),
"name": "思念一直在", "name": "思念一直在",
"sex": "", "sex": "",
"age": null, "age": null,
@ -264,7 +264,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "a2c1310f-1a3c-430f-9b7c-557b9ccdd33d", "id": "a2c1310f-1a3c-430f-9b7c-557b9ccdd33d",
"avatar": "images/20210816/9.png", "avatar": require('../assets/img/icon/avatar/9.png'),
"name": "阎韶丽", "name": "阎韶丽",
"sex": "", "sex": "",
"age": null, "age": null,
@ -282,7 +282,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "a7443b4f-b0fa-4409-a693-5f090aa763ee", "id": "a7443b4f-b0fa-4409-a693-5f090aa763ee",
"avatar": "images/20210816/5.png", "avatar": require('../assets/img/icon/avatar/5.png'),
"name": "马佳婉清", "name": "马佳婉清",
"sex": "", "sex": "",
"age": null, "age": null,
@ -300,7 +300,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "b49fd828-f8a7-4be0-a3bc-0a8fa312b2e8", "id": "b49fd828-f8a7-4be0-a3bc-0a8fa312b2e8",
"avatar": "images/20210816/0.png", "avatar": require('../assets/img/icon/avatar/0.png'),
"name": "倒影着稚嫩的少年", "name": "倒影着稚嫩的少年",
"sex": "", "sex": "",
"age": null, "age": null,
@ -318,7 +318,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "b632bffe-1cfb-408a-8255-b558e2faf49a", "id": "b632bffe-1cfb-408a-8255-b558e2faf49a",
"avatar": "images/20210816/8.png", "avatar": require('../assets/img/icon/avatar/8.png'),
"name": "买易槐", "name": "买易槐",
"sex": "", "sex": "",
"age": null, "age": null,
@ -336,7 +336,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "c01f10dd-a270-42ab-876f-64a8beb22a69", "id": "c01f10dd-a270-42ab-876f-64a8beb22a69",
"avatar": "images/20210816/7.png", "avatar": require('../assets/img/icon/avatar/7.png'),
"name": "章昊苍", "name": "章昊苍",
"sex": "", "sex": "",
"age": null, "age": null,
@ -354,7 +354,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "d0bf11a3-a25b-4865-a047-c67de8e8af7b", "id": "d0bf11a3-a25b-4865-a047-c67de8e8af7b",
"avatar": "images/20210816/2.png", "avatar": require('../assets/img/icon/avatar/2.png'),
"name": "凌依晨", "name": "凌依晨",
"sex": "", "sex": "",
"age": null, "age": null,
@ -372,7 +372,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "d300b7a5-115d-41ba-a071-7d1781da331f", "id": "d300b7a5-115d-41ba-a071-7d1781da331f",
"avatar": "images/20210816/23.png", "avatar": require('../assets/img/icon/avatar/23.png'),
"name": "为你锁住心", "name": "为你锁住心",
"sex": "", "sex": "",
"age": null, "age": null,
@ -390,7 +390,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "deceba30-80fc-45c2-bd56-8d65091bb104", "id": "deceba30-80fc-45c2-bd56-8d65091bb104",
"avatar": "images/20210816/13.png", "avatar": require('../assets/img/icon/avatar/13.png'),
"name": "原味青春", "name": "原味青春",
"sex": "", "sex": "",
"age": null, "age": null,
@ -408,7 +408,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "e0c3d20d-5978-4339-962f-cffc6e29aff1", "id": "e0c3d20d-5978-4339-962f-cffc6e29aff1",
"avatar": "images/20210816/24.png", "avatar": require('../assets/img/icon/avatar/24.png'),
"name": "一起走过的日子°", "name": "一起走过的日子°",
"sex": "", "sex": "",
"age": null, "age": null,
@ -426,7 +426,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "e1fb6274-10fa-4d50-b9b1-6eefacfc2341", "id": "e1fb6274-10fa-4d50-b9b1-6eefacfc2341",
"avatar": "images/20210816/15.png", "avatar": require('../assets/img/icon/avatar/15.png'),
"name": "看,熟悉旳风景", "name": "看,熟悉旳风景",
"sex": "", "sex": "",
"age": null, "age": null,
@ -444,7 +444,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "eab1ef9b-70e6-4249-8d78-b4f6e1b0cb08", "id": "eab1ef9b-70e6-4249-8d78-b4f6e1b0cb08",
"avatar": "images/20210816/20.png", "avatar": require('../assets/img/icon/avatar/20.png'),
"name": "dear°学会微笑", "name": "dear°学会微笑",
"sex": "", "sex": "",
"age": null, "age": null,
@ -462,7 +462,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "ecb405e2-d057-4c85-a12b-a5fe9a7b8a05", "id": "ecb405e2-d057-4c85-a12b-a5fe9a7b8a05",
"avatar": "images/20210816/6.png", "avatar": require('../assets/img/icon/avatar/6.png'),
"name": "富察昕昕", "name": "富察昕昕",
"sex": "", "sex": "",
"age": null, "age": null,
@ -480,7 +480,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "f09652a3-d6e1-4517-a15e-583a24a250e1", "id": "f09652a3-d6e1-4517-a15e-583a24a250e1",
"avatar": "images/20210816/17.png", "avatar": require('../assets/img/icon/avatar/17.png'),
"name": "蓝天下的迷彩?", "name": "蓝天下的迷彩?",
"sex": "", "sex": "",
"age": null, "age": null,
@ -498,7 +498,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "f676cc30-cc81-487a-9450-cbb1f3c5cde8", "id": "f676cc30-cc81-487a-9450-cbb1f3c5cde8",
"avatar": "images/20210816/21.png", "avatar": require('../assets/img/icon/avatar/21.png'),
"name": "伱的微笑", "name": "伱的微笑",
"sex": "", "sex": "",
"age": null, "age": null,
@ -518,7 +518,7 @@ const store = Vuex.createStore({
"recent": [ "recent": [
{ {
"id": "3cd53cb5-04f8-4439-ad2b-e57b3f9b8c73", "id": "3cd53cb5-04f8-4439-ad2b-e57b3f9b8c73",
"avatar": "images/20210816/26.png", "avatar": require('../assets/img/icon/avatar/26.png'),
"name": "好◇°我会Yi直在●", "name": "好◇°我会Yi直在●",
"sex": "", "sex": "",
"age": null, "age": null,
@ -536,7 +536,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "77c82d2e-9be1-45c2-a733-00445d2e7f2c", "id": "77c82d2e-9be1-45c2-a733-00445d2e7f2c",
"avatar": "images/20210816/22.png", "avatar": require('../assets/img/icon/avatar/22.png'),
"name": "一只喵的旅行。", "name": "一只喵的旅行。",
"sex": "", "sex": "",
"age": null, "age": null,
@ -556,7 +556,7 @@ const store = Vuex.createStore({
"eachOther": [ "eachOther": [
{ {
"id": "2b446aa8-5d31-429a-8e39-d4705eb4e900", "id": "2b446aa8-5d31-429a-8e39-d4705eb4e900",
"avatar": "images/20210816/19.png", "avatar": require('../assets/img/icon/avatar/19.png'),
"name": "浅唱↘我们的歌", "name": "浅唱↘我们的歌",
"sex": "", "sex": "",
"age": null, "age": null,
@ -574,7 +574,7 @@ const store = Vuex.createStore({
}, },
{ {
"id": "eab1ef9b-70e6-4249-8d78-b4f6e1b0cb08", "id": "eab1ef9b-70e6-4249-8d78-b4f6e1b0cb08",
"avatar": "images/20210816/20.png", "avatar": require('../assets/img/icon/avatar/20.png'),
"name": "dear°学会微笑", "name": "dear°学会微笑",
"sex": "", "sex": "",
"age": null, "age": null,

View File

@ -252,6 +252,11 @@ export default {
}, },
$imgPreview(url) { $imgPreview(url) {
if (!url) return if (!url) return
//本地图片
if (url.includes('img')) {
return url
}
//网络,全路径图片
if (url.includes('http')) { if (url.includes('http')) {
return url return url
} }