Commit 982cdd8d by 梁建民

Merge branch 'master' of http://119.23.72.7/shiyu/icsalesProgram

parents 8fd03927 ccd68df6
...@@ -59,14 +59,14 @@ App({ ...@@ -59,14 +59,14 @@ App({
// url: '/pages/tab/home/home' // url: '/pages/tab/home/home'
// }); // });
} else { } else {
wx.redirectTo({ // wx.redirectTo({
url: '/pages/person/login/index' // url: '/pages/person/login/index'
}); // });
} }
} else { } else {
wx.redirectTo({ // wx.redirectTo({
url: '/pages/person/auth/index' // url: '/pages/person/auth/index'
}); // });
} }
......
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
"pages/person/integralrule/index", "pages/person/integralrule/index",
"pages/person/packet/index", "pages/person/packet/index",
"pages/person/invitation/index", "pages/person/invitation/index",
"pages/person/invitationrecord/index" "pages/person/invitationrecord/index",
"pages/form/report/index"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
......
...@@ -11,9 +11,9 @@ Component({ ...@@ -11,9 +11,9 @@ Component({
type: String, type: String,
value: msgType.chatType.SINGLE_CHAT, value: msgType.chatType.SINGLE_CHAT,
}, },
isTopic:{ isTopic: {
type:String, type: String,
value:"" value: ""
} }
}, },
data: { data: {
...@@ -54,12 +54,27 @@ Component({ ...@@ -54,12 +54,27 @@ Component({
}, },
sendMessage() { sendMessage() {
if (this.data.isTopic) {
this.triggerEvent(
"newTextMsg", {
type: '1'
}, {
bubbles: true,
composed: true
}
);
this.setData({
userMessage: "",
inputMessage: "",
});
return
};
let me = this; let me = this;
let customer = wx.getStorageSync('customer') || ''; let customer = wx.getStorageSync('customer') || '';
if (customer) { if (customer) {
wx.removeStorageSync('customer'); wx.removeStorageSync('customer');
} }
String.prototype.trim = function () { String.prototype.trim = function() {
return this.replace(/(^\s*)|(\s*$)/g, ''); return this.replace(/(^\s*)|(\s*$)/g, '');
} }
if (!this.data.userMessage.trim()) { if (!this.data.userMessage.trim()) {
...@@ -98,7 +113,7 @@ Component({ ...@@ -98,7 +113,7 @@ Component({
"newTextMsg", { "newTextMsg", {
msg: msg, msg: msg,
type: msgType.TEXT, type: msgType.TEXT,
customer: customer?true:false customer: customer ? true : false
}, { }, {
bubbles: true, bubbles: true,
composed: true composed: true
...@@ -110,7 +125,7 @@ Component({ ...@@ -110,7 +125,7 @@ Component({
inputMessage: "", inputMessage: "",
}); });
}, },
sendCmd: function () { sendCmd: function() {
let me = this; let me = this;
let id = WebIM.conn.getUniqueId(); let id = WebIM.conn.getUniqueId();
let msg = new WebIM.message(msgType.CMD, id); let msg = new WebIM.message(msgType.CMD, id);
...@@ -132,13 +147,13 @@ Component({ ...@@ -132,13 +147,13 @@ Component({
to: me.data.username.your, to: me.data.username.your,
action: "template", action: "template",
ext: params, ext: params,
success: function () { success: function() {
console.log('发送模板成功') console.log('发送模板成功')
console.log(me.data.username.your) console.log(me.data.username.your)
// getApp().addChatMember(me.data.username.your) // getApp().addChatMember(me.data.username.your)
disp.fire('em.chat.sendSuccess', id); disp.fire('em.chat.sendSuccess', id);
}, },
fail: function () { fail: function() {
console.log('发送模板失败'); console.log('发送模板失败');
} }
}); });
...@@ -166,7 +181,7 @@ Component({ ...@@ -166,7 +181,7 @@ Component({
moved() { moved() {
}, },
detached() { }, detached() {},
ready() { ready() {
let template = wx.getStorageSync('template') || ''; let template = wx.getStorageSync('template') || '';
let customer = wx.getStorageSync('customer') || ''; let customer = wx.getStorageSync('customer') || '';
...@@ -177,11 +192,11 @@ Component({ ...@@ -177,11 +192,11 @@ Component({
wx.removeStorageSync('template'); wx.removeStorageSync('template');
this.sendCmd(); this.sendCmd();
}; };
if(customer){ if (customer) {
this.setData({ this.setData({
userMessage:customer userMessage: customer
}); });
this.sendMessage(); this.sendMessage();
} }
}, },
}); });
\ No newline at end of file
// pages/form/report/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
openAction: function () {
wx.showActionSheet({
itemList: ['广告骚扰', '违法内容', '人身攻击','侮辱性语言'],
success(res) {
console.log(res.tapIndex)
},
fail(res) {
console.log(res.errMsg)
}
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "举报"
}
\ No newline at end of file
<!--pages/form/report/index.wxml-->
<view class="report-view">
<view class="report-top row bothSide verCenter">
<text class="text-left">举报原因</text>
<view class="text-right row verCenter" bindtap="openAction">
<text class="text">请选择举报原因</text>
<text class="icon iconfont iconChevron"></text>
</view>
</view>
<textarea class="textarea" placeholder="请填写具体问题(选填)"></textarea>
<view class="btn-com btn-com-b report-btn">提交举报</view>
</view>
\ No newline at end of file
/* pages/form/report/index.wxss */
.report-top{
font-size: 28rpx;
margin-left:24rpx;
padding:27rpx 32rpx 27rpx 15rpx;
border-bottom:1px solid #D8DFE6;
}
.text-left{
color:#515559;
}
.text-right{
color:#8A9299;
}
.icon{
margin-left:12rpx;
}
.textarea{
width:100%;
margin-left:24rpx;
padding:27rpx 32rpx 27rpx 15rpx;
box-sizing: border-box;
border-bottom:1px solid #D8DFE6;
}
.report-btn{
margin-top:60rpx;
}
\ No newline at end of file
...@@ -5,77 +5,93 @@ Page({ ...@@ -5,77 +5,93 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
tabIndex:1 tabIndex: 1,
inputbar: null
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function(options) {
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function() {
this.data.inputbar = this.selectComponent("#topic-inputbar");
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { onHide: function() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () { onUnload: function() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function() {
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function() {
}, },
switchTab: function (e) { sendSignin: function(evt) {
console.log(evt)
this.data.inputbar.cancelEmoji();
},
switchTab: function(e) {
let i = e.currentTarget.dataset.index; let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) { if (i == this.data.tabIndex) {
return return
} else { } else {
this.setData({ this.setData({
tabIndex: i, tabIndex: i,
}) })
} }
},
openAction:function(){
wx.showActionSheet({
itemList: ['我要举报'],
success(res) {
console.log(res.tapIndex)
},
fail(res) {
console.log(res.errMsg)
}
})
} }
}) })
\ No newline at end of file
...@@ -97,11 +97,11 @@ ...@@ -97,11 +97,11 @@
<text class="num">233</text> <text class="num">233</text>
</view> </view>
</view> </view>
<view class="more"> <view class="more" bindtap="openAction">
<text class="icon iconfont iconiconxiantiaoshouji6"></text> <text class="icon iconfont iconiconxiantiaoshouji6"></text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<chat-inputbar id="topic-inputbar" is-topic="1"></chat-inputbar> <chat-inputbar id="topic-inputbar" is-topic="1" bind:newTextMsg="sendSignin"></chat-inputbar>
</view> </view>
\ No newline at end of file
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 16, "current": 18,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -166,6 +166,20 @@ ...@@ -166,6 +166,20 @@
"id": -1, "id": -1,
"name": "pages/person/invitationrecord/index", "name": "pages/person/invitationrecord/index",
"pathName": "pages/person/invitationrecord/index", "pathName": "pages/person/invitationrecord/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/list/signin/index",
"pathName": "pages/list/signin/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/form/report/index",
"pathName": "pages/form/report/index",
"scene": null "scene": null
} }
] ]
......
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 sign in to comment