Skip to content

Commit dd160a9

Browse files
committed
update
1 parent 6e9845b commit dd160a9

File tree

8 files changed

+24
-12
lines changed

8 files changed

+24
-12
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Vue全家桶+Socket.io+Express/Koa2打造的网页版手机QQ(web app),高仿手
44

55
## 预览
66

7-
在线预览地址:http://lenshen.com:8080/
7+
在线预览地址:http://lenshen.com:8080/ (为了体验到最佳的效果,提供了3个测试账号,需要账号才能登陆哦,具体账号和密码下面有讲)
88

99
## 技术栈
1010
* **Vue2.0**:实现前端页面构建
@@ -27,7 +27,7 @@ Vue全家桶+Socket.io+Express/Koa2打造的网页版手机QQ(web app),高仿手
2727

2828
## 使用方式
2929

30-
先将根目录下的qq.sql导入到你的MySQL数据库里(可以使用Navicat),用户名为root,登录密码为空。启动MySQL服务。然后使用cnpm install 安装所有依赖最后运行npm run dev。服务器部署只需要运行npm run pm2(前提是得先全局安装pm2)
30+
先将根目录下的qq.sql导入到你的MySQL数据库里(可以使用Navicat),用户名为root,登录密码为空。启动MySQL服务。然后使用cnpm install 安装所有依赖(最好用cnpm安装,因为项目依赖很多,npm用的是国外的镜像,在网络不稳定的情况下很有可能会导致安装失败,而且下载速度远远慢于国内的cnpm),最后运行npm run dev。服务器部署运行项目只需要npm run pm2,这样就可以常驻进程,不过前提是得先全局安装pm2
3131

3232
尽量使用Chrome浏览器体验最佳效果。另外提供了三个测试账号,默认用户的密码都是6个1:
3333

@@ -179,3 +179,7 @@ socket.io最核心的两个api就是`emit` 和 `on`了 ,服务端和客户端
179179
`socket.emit()`:向服务端发送消息
180180

181181
`socket.on()`:监听服务端发来的信息
182+
183+
## 最后
184+
185+
如果觉得不错,就毫不吝啬地给个star吧。后期项目还会继续更新和完善。

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<script src="http://localhost:3000/socket.io/socket.io.js"></script>
1414
<script>
15-
const socket = io.connect('http://localhost:3000/')
15+
const socket = io.connect('http://localhost:3000/')
1616

1717
//解决用户手动刷新浏览器后,原来的socketid失效的问题
1818
const loginStatus= JSON.parse(localStorage.getItem("loginStatus") || '{}')

src/App.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ import {mapGetters} from 'vuex'
1010
export default {
1111
name: 'app',
1212
computed: {
13-
...mapGetters([
14-
'isLogin',
15-
'userId'
16-
])
13+
...mapGetters(['isLogin'])
1714
},
1815
created(){
1916
//如果不是首次启动,且没有登陆,则跳到登录页面
@@ -38,7 +35,6 @@ html, body {
3835
width: 100%;
3936
height: 100%;
4037
overflow: hidden;
41-
4238
font-family: 'Microsoft Yahei' !important
4339
}
4440
#app,.wrapper{

src/components/Friend/searchFriend.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
</div>
1818
<div class="search_result" v-show="hasSearch">
1919
<p v-show="!hasResult" class="no_result">没有找到相关结果</p>
20-
<VScroll :data="dataList">
21-
<ul v-show="hasResult&&hasManyResult">
20+
<VScroll :data="dataList" v-show="hasResult&&hasManyResult">
21+
<ul>
2222
<li v-for="item in dataList"
2323
@click="$router.push(`/profile/${item.id}`)">
2424
<img :src="item.face" class="user">

src/components/Register/Register.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ export default {
327327

328328
<!-- Add "scoped" attribute to limit CSS to this component only -->
329329
<style scoped lang="scss" type="text/css">
330+
.wrapper{
331+
background:#fff !important;
332+
}
330333
.top{
331334
background: url(/static/icon/4/fas.9.png) no-repeat left center;
332335
width: 100%;

src/components/Social/Social.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export default {
5151

5252
<!-- Add "scoped" attribute to limit CSS to this component only -->
5353
<style scoped lang="scss" type="text/css">
54+
.wrapper{
55+
background:#FFFDFD !important;
56+
}
5457
.search{
5558
margin-top: 50px;
5659
}

src/components/User/Profile.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ export default {
145145
</script>
146146

147147
<style scoped lang="scss" type="text/css">
148+
.wrapper{
149+
background:#fff !important;
150+
}
148151
.header{
149-
display:flex;
152+
display:flex;
150153
padding:0 20px;
151154
height:50px;
152155
line-height:50px;
@@ -159,7 +162,7 @@ export default {
159162
width:100%;
160163
z-index:1;
161164
.item{
162-
flex:1;
165+
flex:1;
163166
&.left{
164167
background:url(/static/icon/4/flc.png) no-repeat left center;
165168
margin-left:-10px;

src/components/Welcome/Welcome.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export default {
2525
</script>
2626

2727
<style scoped lang="scss" type="text/css">
28+
.wrapper{
29+
background:#fff !important;
30+
}
2831
.welcome{
2932
position:absolute;
3033
width:100%;

0 commit comments

Comments
 (0)