Skip to content

Commit 8fae8db

Browse files
committed
https
1 parent 6fb47aa commit 8fae8db

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

README.md

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

99
## 技术栈
1010
* **Vue2.0**:实现前端页面构建
@@ -24,6 +24,7 @@ Vue全家桶+Socket.io+Express/Koa2打造的网页版手机QQ(web app),高仿手
2424
* **MySQL**:MySQL关系型数据库持久化数据(考虑到表与表之间关系复杂,需要多表查询,最复杂的时候是六张表联查,用MySQL会比Mongodb好得多)
2525
* **jsonp**:跨域请求数据
2626
* **pm2**:服务端使用pm2部署,常驻进程,比forever好用得多(https://github.com/Unitech/pm2)
27+
* **nginx**:服务端使用nginx代理端口转发
2728

2829
## 使用方式
2930

@@ -77,7 +78,7 @@ require("babel-core/register")({
7778
require("babel-polyfill")
7879
```
7980

80-
上面的代码不可以使用import来导入,必须使用require,同时需要通过npm安装babel-core、babel-preset-es2015、babel-preset-stage-0、babel-polyfill等依赖。这样就可以愉快地使用import/export了。
81+
上面的模块不可以使用import来导入,必须使用require,同时需要通过npm安装babel-core、babel-preset-es2015、babel-preset-stage-0、babel-polyfill等依赖。这样就可以愉快地使用import/export了。
8182

8283
服务端代码片段如下:
8384

src/base/Scroll/Scroll.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default {
6666
//滚动结束时记录滚动位置到store里
6767
this.savePosition()
6868
},
69-
scrollToPosition(time=0){
69+
scrollToPosition(time=300){
7070
if(this.scroll){
7171
//如果要滚动到底部
7272
if(this.isScrollToBottom){

src/components/Login/Login.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</div>
99
<div class="form">
1010
<input type="text" v-model="userinfo.user" class="text"
11-
placeholder="QQ号/手机号/邮箱"><br/>
11+
placeholder="QQ号/手机号/邮箱" ref="user"><br/>
1212
<input type="password" v-model="userinfo.pwd" class="text"
1313
placeholder="密码"><br/>
1414
<input type="button" @click="login" class="btn" value="登录">
@@ -44,6 +44,9 @@ export default {
4444
//如果已经登陆了,则进入消息页面
4545
this.isLogin && this.$router.push('/message')
4646
},
47+
mounted(){
48+
this.$refs.user.focus()
49+
},
4750
methods:{
4851
validate({user,pwd}){
4952
if(user==''){

src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Vue.use(Vuex)
1919

2020
// vueg 转场动画
2121
const options = {
22-
forwardAnim: 'fadeInRight'
22+
forwardAnim: 'fadeInRight',
23+
duration:0.3
2324
}
2425
Vue.use(vueg, router, options)
2526

0 commit comments

Comments
 (0)