Commit f7d450fd authored by looker's avatar looker

fix

parent e74631dd
......@@ -7,5 +7,6 @@ module.exports = merge(prodEnv, {
API_URL:'"/API/"',
// WX_ADDRESS: '"http://imdev.chenzhen.shop:9093/"',
WX_ADDRESS: '"172.16.22.67:9093/"',
IMG_ADDRESS:'"http://chat-x.oss-cn-beijing.aliyuncs.com/"'
IMG_ADDRESS:'"http://chat-x.oss-cn-beijing.aliyuncs.com/"',
NEW_YUYUEDAN:'"http://172.16.22.13:8087/#/rfm/newList"'
})
......@@ -3,5 +3,6 @@ module.exports = {
NODE_ENV: '"production"',
API_URL:'""',
WX_ADDRESS: "http://imweb.chenzhen.shop:9093",
IMG_ADDRESS:'"http://chat-x.oss-cn-beijing.aliyuncs.com/"'
IMG_ADDRESS:'"http://chat-x.oss-cn-beijing.aliyuncs.com/"',
NEW_YUYUEDAN:'"http://run.baozheng.cc/#/rfm/newList"'
}
No preview for this file type
......@@ -52,6 +52,7 @@ export default {
return {
imgUrl:process.env.IMG_ADDRESS,
headerId:0,
changeFlag:true,
loadStatus:false,
}
},
......@@ -79,15 +80,18 @@ export default {
this.$refs.list.scrollTop = this.$refs.list.scrollHeight
this.$refs.list.onscroll = function () {
if(this.scrollTop ==0){
temp.moreMessage()
if(temp.changeFlag){
temp.moreMessage()
}
}
temp.changeFlag = true
}
},
watch: {
selectId() {
selectId(v) {
this.changeFlag = false
},
messages(val, old){
console.log(433333333)
if(!val||val.length==0){
return
}
......@@ -95,39 +99,20 @@ export default {
setTimeout(() => this.$refs.list.scrollTop = this.$refs.list.scrollHeight, 0)
}else if(val[0].conversationId!=old[0].conversationId){//切换tab
setTimeout(() => this.$refs.list.scrollTop = this.$refs.list.scrollHeight, 0)
}
if(this.headerId == val[0].id){//
setTimeout(() => this.$refs.list.scrollTop = this.$refs.list.scrollHeight, 0)
}else{
this.$refs.list.scrollTop= 50
// }
// let liArray = this.$refs.list.children[0].children
// let index = val.length - old.length
// console.log('------------------------=======================')
// console.log(index)
// for(let li of liArray){
// if(li.className.split(' ')[0] == 'dnf'+val[index].id){
// this.$refs.list.scrollTop = li.scrollHeight*9
// }
// }
if(this.headerId == val[0].id){//
setTimeout(() => this.$refs.list.scrollTop = this.$refs.list.scrollHeight, 0)
}else{
this.$refs.list.scrollTop= 50
}
}
this.headerId = val[0].id
// console.log(66666666666666666666666)
// if(old.length+1==val.length){
// setTimeout(() => this.$refs.list.scrollTop = this.$refs.list.scrollHeight, 0)
// }
// if((val.length-old.length)>5){
// setTimeout(() => this.$refs.list.scrollTop = ~~this.$refs.list.scrollHeight-2000, 0)
// }
}
},
methods: {
...mapActions('user',[
'moreMessage',
]),
// 在发送信息之后,将输入的内容中属于表情的部分替换成emoji图片标签
// 再经过v-html 渲染成真正的图片
replaceFace (content) {
let html = String(content).replace(/\n/g, "<br>")
for(let item of emojis){
......@@ -135,27 +120,12 @@ export default {
html = html.replace(regex, `<img class='wx-emoji' width="30px" height="30px" src='static/emoji/${item.file}'/>`)
}
return html
// if(con&&con.includes('/:')) {
// var emojis=this.user.emojis;
// for(var i=0;i<emojis.length;i++){
// con = con.replace(emojis[i].title, '<img src="static/emoji/' + emojis[i].file +'" alt="" style="vertical-align: middle; width: 24px; height: 24px" />');
// }
// return con;
// }
// return con;
}
},
filters: {
// 将日期过滤为 hour:minutes
time (date) {
date = new Date(parseInt(date+'') * 1000);
return moment(date).format('YYYY-MM-DD HH:mm:ss')
// if(date.getMinutes()<10){
// return date.getHours() + ':0' +date.getMinutes();
// }else{
// return date.getHours() + ':' + date.getMinutes();
// }
},
imgUrl(img){
if(!img){
......
......@@ -196,7 +196,7 @@ export default {
type:2,
toRoleId:obj.roleBo.roleId,
toCustomerId:r.customerId,
name:r.username
name:r.username + `(${r.customerSessionBo.userStateValue})`
})
}
}
......
......@@ -13,7 +13,7 @@
<div>
<span>系统顾客名称:</span>
<span style="width: 90px;overflow:hidden;display: inline-block;text-overflow:ellipsis;white-space:nowrap">{{customerInfo.customerName}}</span>
<!-- <el-button type="success" size="mini">新建预约单</el-button> -->
<a :href="yuyuedan" target="_blank" style="color:#fff"><el-button type="success" size="mini">新建预约单</el-button></a>
</div>
<div>
<span>联系方式:</span>
......@@ -54,6 +54,7 @@ export default{
data(){
return {
activeName:'second',
yuyuedan:process.env.NEW_YUYUEDAN,
baseInfo:[
{
label:'微信昵称',
......@@ -82,8 +83,7 @@ export default{
]),
...mapGetters([
'customerInfo',
])
]),
},
components: {
},
......
......@@ -69,14 +69,13 @@ export default{
parm.imageKey= this.speechContext
parm.company = 20
parm.page = this.page
parm.rows = 20
parm.rows = 21
this.searchBiaoqingbao(parm).then((data)=>{
this.pics = data
this.total = data.total
})
},
handleClick(){
console.log(43434)
},
seadPic(val){
this.$alert(`
......
......@@ -32,7 +32,7 @@
</el-tab-pane> -->
<el-tab-pane label="其他" name="sixth"><div class="tool-body"><el-button type="danger" plain @click="logout">退出</el-button></div></el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
......
<template>
<div class="tabs-body">
<div style="margin:50px;overflow: auto;" v-if="!baozheng.isLogin">
<el-form :model="ruleForm2" status-icon ref="ruleForm2" class="demo-ruleForm">
<el-form :model="ruleForm2" status-icon ref="baozhengform" class="demo-ruleForm">
<el-form-item prop="pass">
<el-input type="text" placeholder="登录名" v-model="ruleForm2.account" auto-complete="off"></el-input>
</el-form-item>
......@@ -45,9 +45,6 @@ export default{
},
mounted() {
this.init()
// if(this.baozheng.isLogin&&this.user.userInfo.type==1){
// this.init()
// }
},
methods: {
...mapActions('baozheng',[
......
......@@ -162,10 +162,6 @@ const user = {
let temp = [...value, ...chatlist[c].messages]
chatlist[c].messages = temp.sort(compare('createTime'))
}
// if(chatlist[c].id==selectId){
// let temp = value == null?[]:value.sort(compare('createTime'))
// chatlist[c].messages = [...temp, ...chatlist[c].messages]
// }
}
},
SEND_MESSAGE(state, value){
......@@ -178,18 +174,6 @@ const user = {
array[c].queryData = value[0].createTime
array.sort(compare('queryData'))
array.reverse()
// let tempe = array[0]
// array[0] = array[array.length-1]
// array[array.length-1] = tempe
// state.chatlist = []
// state.chartings = []
// state.chatlist = [...array]
// state.chartings = [...array]
// chatlist.reverse()
// state.chatlist = chatlist
// state.chartings = chatlist
}
}
}
......@@ -278,7 +262,14 @@ const user = {
}else{
commit('CHANGE_ISSELECTMORE',false)
data&&commit('ADD_MESSAGE', data)
!data&&state.messagesPage--
if(!data){
let { selectId, chatlist } = state
for(let i in chatlist){
if(chatlist[i].id==selectId){
chatlist[i].page--
}
}
}
}
})
.on('conversations/show', (data, callback) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment