Skip to content

Commit

Permalink
add robot
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Jun 19, 2017
1 parent fa6e5ff commit 7542236
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 18 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ npm run dev (访问本地,运行后访问 http://localhost:8882)

### 移动端扫描下方二维码

![](http://images.cangdu.org/code.png)
![](https://github.com/bailichen/vue-weixin/raw/master/printscreen/code.png)


### 说明
Expand Down Expand Up @@ -74,14 +74,14 @@ npm run dev (访问本地,运行后访问 http://localhost:8882)

### 单人聊天、群聊

<img src="http://images.cangdu.org/singlechat.gif" width="300" height="530" alt=""> <img src="http://images.cangdu.org/groupchat.gif" width="300" height="530" alt="">
<img src="https://github.com/bailichen/vue-weixin/raw/master/printscreen/singlechat.gif" width="300" height="530" alt=""> <img src="https://github.com/bailichen/vue-weixin/raw/master/printscreen/groupchat.gif" width="300" height="530" alt="">


### 朋友圈

###### 上传图片、点赞

<img src="http://images.cangdu.org/shangchuan.gif" width="300" height="530"/> <img src="http://images.cangdu.org/like.gif" width="300" height="530"/>
<img src="https://github.com/bailichen/vue-weixin/raw/master/printscreen/shangchuan.gif" width="300" height="530"/> <img src="https://github.com/bailichen/vue-weixin/raw/master/printscreen/like.gif" width="300" height="530"/>

# 项目布局

Expand Down
11 changes: 8 additions & 3 deletions src/frames/addressbook/addressbook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</div>
<div class="contacts_bottom">
<ul class="contacts_bottom_ul">
<li v-for="(value, key, index) in manageaddress" :key="key">
<li v-for="(value, key, index) in manageaddress" :key="key" ref="addlist">
<h1>{{key}}</h1>
<ul>
<router-link to="/addressbook/details" tag="li" v-for="(item, index) in value" @click.native='detailMessage(item)'>
Expand All @@ -64,8 +64,8 @@
</li>
</ul>
<section class="list_guide">
<dl v-for="(value, index) in sortlist" :key="index">
<dd>{{value}}</dd>
<dl>
<dd v-for="(value, index) in sortlist" :key="index" @click="getHear(value)">{{value}}</dd>
</dl>
<p>#</p>
</section>
Expand Down Expand Up @@ -97,6 +97,7 @@
beforeMount(){
contactList().then((res) => {
this.contactList=res;
console.log(this.$refs.addlist)
})
},
mounted(){
Expand Down Expand Up @@ -138,6 +139,10 @@
detailMessage(item){
this.SAVE_MESSAGE(item);
},
getHear(value){
console.log(value)
}
}
}
</script>
Expand Down
1 change: 0 additions & 1 deletion src/frames/conversation/chatmessage/groupchatmessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
allgroup().then((res)=>{
if(res.status == 200){
this.allPeople=res.users
console.log(this.allPeople)
if(this.allPeople.length > 20){
this.lookgroup=true
this.notlook=true;
Expand Down
7 changes: 5 additions & 2 deletions src/frames/conversation/groupchat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</svg>
</div>
<div>
<input type="text" v-model="inputmessage" @input="whatInput" @click="inputBottomHide" :class="{lightborder : light}">
<input type="text" v-model="inputmessage" maxlength="100" @input="whatInput" @click="inputBottomHide" :class="{lightborder : light}">
</div>
<div>
<svg>
Expand Down Expand Up @@ -184,7 +184,6 @@
]),
},
beforeDestroy(){
console.log(1)
clearTimeout(this.timer);
socket.removeAllListeners();
},
Expand Down Expand Up @@ -461,6 +460,7 @@
}
.coversation{
background-color: #ebebeb;
overflow-scrolling: touch;
-webkit-overflow-scrolling: touch;
padding-top: 2.06933rem;
.coversationlist{
Expand All @@ -472,6 +472,8 @@
ul{
padding-top:.4rem;
width:15.4rem;
overflow-scrolling: touch;
-webkit-overflow-scrolling: touch;
top:0;
li{
.other{
Expand Down Expand Up @@ -506,6 +508,7 @@
border-radius:8px;
@include sizeColor(0.64rem, #333);
line-height:0.8533333333rem;
word-break: break-all;
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/frames/conversation/singlechat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</svg>
</div>
<div>
<input type="text" v-model="inputmessage" @input="whatInput" @click="inputBottomHide" :class="{lightborder : light}">
<input type="text" v-model="inputmessage" maxlength="100" @input="whatInput" @click="inputBottomHide" :class="{lightborder : light}">
</div>
<div>
<svg>
Expand Down Expand Up @@ -259,6 +259,8 @@
padding-top:.4rem;
padding-bottom:2.2rem;
width:15.4rem;
overflow-scrolling: touch;
-webkit-overflow-scrolling: touch;
top:0;
li{
.other{
Expand Down Expand Up @@ -293,6 +295,7 @@
border-radius:8px;
@include sizeColor(0.64rem, #333);
line-height:0.8533333333rem;
word-break: break-all;
}
}
Expand Down
11 changes: 8 additions & 3 deletions src/frames/dialogue/dialogue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<!-- 对话列表 -->
<section class="conversation">
<ul>
<router-link to="/singlechat" tag="li" v-for="item in contactList" @click.native="refreshInfor(item)">
<router-link to="/singlechat" tag="li" v-for="item in dialogueList" @click.native="refreshInfor(item)">
<div class="imgwipe">
<i class="redicon_num" v-if="newinfor">
1
Expand Down Expand Up @@ -96,7 +96,7 @@
import footGuide from 'src/components/footer/foot'
import {imgurl} from 'src/config/env';
import {mapState,mapActions,mapMutations} from 'vuex'
import {groupChat, userInfo, login} from 'src/service/getData'
import {groupChat, userInfo, login, dialog} from 'src/service/getData'
import fetch from 'src/config/fetch'
export default{
Expand All @@ -114,6 +114,7 @@
borderColortwo: false,
timer:null,
groupHead:[],
dialogueList:[]
}
},
created(){
Expand All @@ -123,13 +124,17 @@
},
beforeMount(){
//console.log(this.contactList)
},
mounted(){
groupChat().then( (res) =>{
this.groupHead=[...res.grouphead]
});
dialog().then((res) =>{
this.dialogueList=[...res]
this.dialogueList=[...this.contactList,...this.dialogueList]
})
},
components:{
Expand Down
8 changes: 5 additions & 3 deletions src/service/data/dialoglist.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ import {imgurl} from 'src/config/env';
export const dialog = [
{
"wxid":"fileTransfer",
"headurl":imgurl+'file.jpg',
"petname":"文件传输助手",
"remarks":"文件传输助手",
"headurl":imgurl+'robot.jpg',
"petname":"机器人聊天",
"remarks":"机器人聊天",
"newmeassage":"请从通讯录的联系人进入机器人单人聊天",
"sendobject":1,
},
]
2 changes: 1 addition & 1 deletion weixin/static/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion weixin/static/js/manifest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7542236

Please sign in to comment.