Selaa lähdekoodia

同步代码~

release/210823_需求对对碰
王饶冀 3 vuotta sitten
vanhempi
commit
da99471dee

+ 1
- 1
app.js Näytä tiedosto

@@ -11,7 +11,7 @@ App({
//准备更新
updateManager.onUpdateReady(function () {
wx.showModal({
title: '业务交流通更新啦~',
title: '需求对对碰更新啦~',
content: '新版本已经准备好,请重启应用',
showCancel: false,
success: function (res) {

+ 1
- 1
app.json Näytä tiedosto

@@ -26,7 +26,7 @@
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "业务交流通",
"navigationBarTitleText": "需求对对碰",
"navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json",

+ 1
- 1
package.json Näytä tiedosto

@@ -1,7 +1,7 @@
{
"name": "channel_business",
"version": "1.0.0",
"description": "业务交流通",
"description": "需求对对碰",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"

+ 1
- 1
pages/login/login.js Näytä tiedosto

@@ -52,7 +52,7 @@ Page({
iv: iv,
encryptedData: encryptedData,
sessionKey: app.globalData.sessionKey,
loginState: "业务交流通",
loginState: "需求对对碰",
avatarUrl,
gender,
nickName,

+ 20
- 8
pages/msgModule/wechat2/wechat2.js Näytä tiedosto

@@ -1,6 +1,7 @@
var utils = require("../../../utils/util.js")
const app = getApp()
const $request = require('../../../utils/request.js');
const $faces = require('../../../utils/faces.js');
Page({

/**
@@ -26,8 +27,8 @@ Page({
historyList: [],
input: null,
openid: null,
// 😄😊😃😉😍😘😚😳😌😁😜😝😒😏😓😔😞😖😥😰😨😣😢😭😂😲😱😠😡😪😷👿👽💛💙💗💚❤💔💓💘✨🌟💢❕❔💤💨💦🎶🎵🔥🔥💩👍👎👌👊✊✌👋✋👐👆👇👉👈🙌🙏☝👏💪🚶🏃👫💃👯🙆🙅💁🙇💏💑💆💇💅👦👧👩👨👶👵👴👱👲👳👷👮👼👸💂💀👣💋
connectemoji: ["😘", "😡", "😔", "😄", "❤", "😍", "👼", ""],
// 表情
connectemoji:[],
emoji_list: ['emoji1i1', 'emoji2i2', 'emoji3i3', 'emoji4i4', 'emoji5i5'],
emotionVisible: false,
inputShowed: false,
@@ -47,6 +48,8 @@ Page({
businessCommunicationDemandId: null,
// 当前产品详情
productInfo: null,
// 发送框是否获取焦点
inputShowed:false,
},

/**
@@ -78,9 +81,9 @@ Page({
let sendAvatar = app.globalData.businessCommunicationCustomer.chatHeads;
this.setData({
receiveMemberId: customerId,
sendAvatar
sendAvatar,
connectemoji:$faces.getfaces(),
})
console.log(this.data.sendAvatar, 'hahha')
// 获取内存中的数据
this.getStorageBaseInfo()
// 设置滚动区域的高度
@@ -88,14 +91,14 @@ Page({
// 初始化websocket
this.initWebSocket()
// setTimeout(() => {
// }, 100);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},

// websocket初始化
@@ -375,7 +378,14 @@ Page({

console.log(input, '输入框额值')
this.setData({
input
input,
emotionVisible:false,
inputShowed:true,
})
},
closeEmotionVisible(){
this.setData({
emotionVisible:false,
})
},
// 公共聚焦方法,方法比较笨,但是过度效果平滑流畅
@@ -401,4 +411,6 @@ Page({
// duration: 0
})
},
})
})



+ 5
- 5
pages/msgModule/wechat2/wechat2.wxml Näytä tiedosto

@@ -1,5 +1,5 @@
<!-- pages/wechat2/wechat2.wxml -->
<view class='news'>
<view class='news' bindtap="closeEmotionVisible">
<view class="historycon">
<scroll-view scroll-y="{{ true }}" scroll-into-view="{{scrollid}}" scroll-with-animation="{{true}}" style="height:{{scrollHeight}}" class="history">
<!-- 历史记录部分start -->
@@ -78,12 +78,12 @@
</view>
<view class="sendmessage">
<view class="send-message">
<input class="chat-input" type="text" bindinput="bindChange" confirm-type="send" value='{{input}}' cursor-spacing="16px" hold-keyboard="{{true}}" placeholder="" bindconfirm="send" />
<input class="chat-input" type="text" bindinput="bindChange" confirm-type="send" value='{{input}}' cursor-spacing="16px" hold-keyboard="{{true}}" placeholder="" bindconfirm="send" focus="{{inputShowed}}" />
<image class="expression-msg-img" src="/images/home/expression-msg-icon.png" bind:tap="emotionChange" />
<image class="img-msg-img" src="/images/home/img-msg-icon.png" />
<image class="img-msg-img" src="/images/home/img-msg-icon.png" bindtap="upImg"/>
</view>
<view class="faces-view" wx:if="{{emotionVisible}}">
<view class="emotions-item" wx:for="{{connectemoji}}" wx:key="index" bindtap="addemotion" data-index="{{index}}">
<view class="faces-view-dialog clearfix" wx:if="{{emotionVisible}}">
<view class="emotions-item fl" wx:for="{{connectemoji}}" wx:key="index" bindtap="addemotion" data-index="{{index}}">
{{item}}
</view>
</view>

+ 17
- 6
pages/msgModule/wechat2/wechat2.wxss Näytä tiedosto

@@ -276,11 +276,6 @@ page {
margin: 6px;
}

.emotions-item {
width: 24px;
height: 24px;
margin: 0 8px;
}

.historyText {
color: #ccc;
@@ -323,4 +318,20 @@ page {
font-size: 24rpx;
color: #b3bfcb;
text-align: left;
}
}

.faces-view-dialog {
width: 100%;
position: fixed;
box-sizing: border-box;
padding: 20rpx;
bottom: 76px;
background: #fff;
}

.emotions-item {
width: 24px;
height: 24px;
width: 6.6%;
text-align: center;
}

+ 112
- 0
utils/faces.js Näytä tiedosto

@@ -0,0 +1,112 @@

const getfaces = n => {
return [
"😊",
"😃",
"😉",
"😍",
"😘",
"😚",
"😳",
"😌",
"😁",
"😜",
"😝",
"😒",
"😏",
"😓",
"😔",
"😞",
"😖",
"😥",
"😰",
"😨",
"😣",
"😢",
"😭",
"😂",
"😲",
"😱",
"😠",
"😡",
"😪",
"😷",
"👿",
"👽",
"💛",
"💙",
"💗",
"💚",
"❤",
"💔",
"💓",
"💘",
"✨",
"🌟",
"💢",
"❕",
"❔",
"💤",
"💨",
"💦",
"🎶",
"🎵",
"🔥",
"🔥",
"💩",
"👍",
"👎",
"👌",
"👊",
"✊",
"✌",
"👋",
"✋",
"👐",
"👆",
"👇",
"👉",
"👈",
"🙌",
"🙏",
"☝",
"👏",
"💪",
"🚶",
"🏃",
"👫",
"💃",
"👯",
"🙆",
"🙅",
"💁",
"🙇",
"💏",
"💑",
"💆",
"💇",
"💅",
"👦",
"👧",
"👩",
"👨",
"👶",
"👵",
"👴",
"👱",
"👲",
"👳",
"👷",
"👮",
"👼",
"👸",
"💂",
"💀",
"👣",
"💋"
]
}

module.exports = {
getfaces
}

Loading…
Peruuta
Tallenna