cyl/develop
jscyl13849007907 1 year ago
parent 5fd62daf16
commit fe811a8152

@ -84,7 +84,8 @@
"pages/sendCreatorCode/index", "pages/sendCreatorCode/index",
"pages/creatorSelectPage/index", "pages/creatorSelectPage/index",
"components/chat/text", "components/chat/text",
"components/chat/hello" "components/chat/hello",
"components/chat/html"
], ],
"permission": { "permission": {
"scope.userLocation": { "scope.userLocation": {

@ -0,0 +1,76 @@
// components/chat/text.js
Component({
properties: {
message: {
type: String,
value: ''
},
color: {
type: String,
value: ''
},
},
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,3 @@
<view class="panel-html {{color}}">
<rich-text nodes="{{message}}"/>
</view>

@ -0,0 +1,11 @@
/* components/chat/html.wxss */
.cblack{
color: #000;
}
.cwhite{
color: #fff;
}
.panel-text{
font-size: 16px;
}

@ -168,7 +168,14 @@ Page({
isUp:false, isUp:false,
isDown:false, isDown:false,
content:that.data.sendText content:that.data.sendText
} },
{
id:that.data.list.length + 1,
type:'html',
isUp:false,
isDown:false,
content:`【北京奔驰连接器日结工】<br /><br />🚻 男女 18-48 18-48周岁 男女不限, 要求26个英文字母 纹身烟疤拍照确认, 黑户,明显纹身,临时身份证不予接收,两班倒,站班<br /><br />💰 员工250元/天支付60天60天以后员工220元/天每月10号发薪。培训工资100元/天,员工 16 元/时以上部分含税6个点的打卡不满七天无工资60天以后员工缴纳社保`
},
], ],
sendText:'' sendText:''
}); });

@ -1,6 +1,7 @@
{ {
"usingComponents": { "usingComponents": {
"hello-panel": "../../components/chat/hello", "hello-panel": "../../components/chat/hello",
"text-panel": "../../components/chat/text" "text-panel": "../../components/chat/text",
"html-panel": "../../components/chat/html"
} }
} }

@ -18,7 +18,8 @@
<view wx:if="{{index % 2 == 0 && index != 0}}" <view wx:if="{{index % 2 == 0 && index != 0}}"
class="bg-obj g_flex_row_start min80" class="bg-obj g_flex_row_start min80"
> >
<text-panel message="{{item.content}}" color="cblack" /> <text-panel message="{{item.content}}" color="cblack" wx:if="{{item.type == 'text'}}" />
<html-panel message="{{item.content}}" color="cblack" wx:if="{{item.type == 'html'}}" />
</view> </view>
<view wx:if="{{index % 2 == 1}}" <view wx:if="{{index % 2 == 1}}"
class="main-obj g_flex_row_end max80" class="main-obj g_flex_row_end max80"
@ -78,6 +79,7 @@
placeholder="请输入内容" placeholder="请输入内容"
style="width: 100%;" style="width: 100%;"
bindinput="handleInput" bindinput="handleInput"
value="{{sendText}}"
/> />
</view> </view>
<view class="voice-box" wx:if="{{eventType == 'voice'}}"> <view class="voice-box" wx:if="{{eventType == 'voice'}}">

Loading…
Cancel
Save