Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
21a2fc2b
authored
Sep 25, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
11
parent
917d15da
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
61 additions
and
54 deletions
app.js
pages/form/bj/index.wxml
pages/form/good/index.wxml
pages/form/rate/index.js
pages/form/rate/index.wxml
pages/form/xj/index.js
pages/form/xj/index.wxml
pages/list/rate/index.wxml
pages/list/ratemanage/index.wxml
pages/person/auth/index.js
pages/person/getphone/index.js
pages/tab/message/message.wxml
utils/chat.js
app.js
View file @
21a2fc2b
...
...
@@ -15,8 +15,8 @@ App({
auth
:
wx
.
getStorageSync
(
'auth'
),
token
:
wx
.
getStorageSync
(
'access_token'
),
isIPX
:
false
,
//是否为iphone X
customerNum
:
"001"
,
customerName
:
"IC助手客服"
,
customerNum
:
"001"
,
//客服
customerName
:
"IC助手客服"
,
//客服名称
isRelogin
:
true
,
//登入环信失败后是否重新登入,只允许重新登入一次
bus
:
bus
,
imBoolean
:
false
,
...
...
pages/form/bj/index.wxml
View file @
21a2fc2b
...
...
@@ -58,7 +58,7 @@
<view class="form-item row verCenter px-hr-top" hidden="{{!isShowTime}}">
<text class="form-item-title">*时间</text>
<view class="form-item-right">
<input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="
number
" name="day" value="{{day}}"></input>
<input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="
text
" name="day" value="{{day}}"></input>
</view>
</view>
<view class="form-hr"></view>
...
...
pages/form/good/index.wxml
View file @
21a2fc2b
...
...
@@ -69,7 +69,7 @@
<view class="form-item row verCenter px-hr-bottom" hidden="{{!isShowTime}}">
<text class="form-item-title">*时间</text>
<view class="form-item-right">
<input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="
number
" name="day" value="{{day}}"></input>
<input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="
text
" name="day" value="{{day}}"></input>
</view>
</view>
<!-- <button class="btn-com btn-com-b hf-btn " form-type="submit" style="margin-bottom:{{'goodId'&&'32rpx'}}"> -->
...
...
pages/form/rate/index.js
View file @
21a2fc2b
...
...
@@ -16,13 +16,15 @@ Page({
total
:
0
,
textareaVal
:
''
,
id
:
null
,
isClick
:
true
isClick
:
true
,
isWarm
:
false
,
isShowTip
:
true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
setData
({
id
:
options
.
id
})
...
...
@@ -31,62 +33,67 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
onShow
:
function
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
},
textareaChange
:
function
(
e
)
{
closeTip
:
function
()
{
this
.
setData
({
isShowTip
:
false
})
},
textareaChange
:
function
(
e
)
{
let
val
=
e
.
detail
.
value
;
this
.
setData
({
total
:
val
.
length
,
textareaVal
:
val
})
},
changeType
:
function
(
e
)
{
changeType
:
function
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
setData
({
defaulType
:
index
})
},
releaseRate
:
function
()
{
releaseRate
:
function
()
{
if
(
!
this
.
data
.
textareaVal
.
trim
().
length
)
{
tips
(
'请填写评价内容'
);
}
else
{
let
obj
=
{
token
:
wx
.
getStorageSync
(
'access_token'
)
||
''
,
offer_id
:
this
.
data
.
id
,
...
...
@@ -98,23 +105,22 @@ Page({
me
.
setData
({
isClick
:
false
})
getData
(
apis
.
evaluateAdd
,
'get'
,
obj
,
function
(
res
)
{
getData
(
apis
.
evaluateAdd
,
'get'
,
obj
,
function
(
res
)
{
me
.
setData
({
isClick
:
true
});
if
(
res
.
errcode
==
0
)
{
tips
(
'评价成功'
);
me
.
setData
({
isClick
:
true
});
setTimeout
(()
=>
{
wx
.
navigateBack
()
},
1000
)
}
else
{
}
else
if
(
res
.
errcode
==
107040
)
{
//含敏感词汇
me
.
setData
({
isClick
:
true
});
isWarm
:
true
,
isShowTip
:
true
})
}
else
{
tips
(
res
.
errmsg
)
}
},
true
)
}
...
...
pages/form/rate/index.wxml
View file @
21a2fc2b
<!--pages/form/rate/index.wxml-->
<view class="rate-form">
<view class="tip row bothSide verCenter
tip-error
">
<view class="tip row bothSide verCenter
{{isWarm?'tip-error':''}} {{isShowTip?'':'noheight'}}
">
<view class="tip-left row verCenter">
<!-- <text class="icon iconfont iconiconxiantiaoshouji12 tip-icon"></text> -->
<!-- <text class="tip-c">评论内容,一条回复报价仅评价一次</text> -->
<text class="icon iconfont iconiconxiantiaoshouji1 tip-icon error-icon"></text>
<text class="tip-c error-text">提示:您的内容存在敏感词汇,请编辑后再发布</text>
<text class="icon iconfont tip-icon {{isWarm?'iconiconxiantiaoshouji1 error-icon':'iconiconxiantiaoshouji12'}}"></text>
<text class="tip-c {{isWarm?'error-text':''}}">{{isWarm?'提示:您的内容存在敏感词汇,请编辑后再发布':'评论内容,一条回复报价仅评价一次'}}</text>
</view>
<text class="icon iconfont iconiconxiantiaoshouji13 close-icon"></text>
<text class="icon iconfont iconiconxiantiaoshouji13 close-icon"
bindtap="closeTip"
></text>
</view>
<view class="form">
<view class="textarea-view">
...
...
pages/form/xj/index.js
View file @
21a2fc2b
...
...
@@ -54,13 +54,14 @@ Page({
if
(
!
obj
.
day
.
trim
().
length
)
{
tips
(
'请填写货期'
);
return
}
else
if
(
isNaN
(
Number
(
obj
.
day
.
trim
())))
{
tips
(
'货期必须为数字'
);
return
}
else
if
(
obj
.
day
.
trim
().
length
>
3
)
{
tips
(
'货期不能大于3个字符'
);
return
}
}
// else if (isNaN(Number(obj.day.trim()))) {
// tips('货期必须为数字');
// return
// } else if (obj.day.trim().length > 3) {
// tips('货期不能大于3个字符');
// return
// }
}
}
this
.
postData
(
obj
);
...
...
pages/form/xj/index.wxml
View file @
21a2fc2b
...
...
@@ -69,7 +69,7 @@
<view class="form-item row verCenter px-hr-top" hidden="{{!isShowTime}}">
<text class="form-item-title">*时间</text>
<view class="form-item-right">
<input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="
number
" name="day"></input>
<input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="
text
" name="day"></input>
</view>
</view>
<view class="form-hr"></view>
...
...
pages/list/rate/index.wxml
View file @
21a2fc2b
...
...
@@ -9,7 +9,7 @@
<view class="rate-item" wx:for="{{rateList}}" wx:key="{{index}}">
<view class="item-top row bothSide px-hr-bottom verCenter">
<view class="top-left row verCenter">
<image src="{{item.avatar||'/res/images/imgs/s.png'}}" class="img"></image>
<image src="{{item.
evaluate_
avatar||'/res/images/imgs/s.png'}}" class="img"></image>
<text class="name">{{item.evaluate_company_name||'--'}}</text>
</view>
<view class="top-right row verCenter">
...
...
pages/list/ratemanage/index.wxml
View file @
21a2fc2b
...
...
@@ -57,7 +57,7 @@
<view class="rate-item" wx:for="{{rateList}}" wx:key="{{index}}">
<view class="item-top row bothSide px-hr-bottom verCenter">
<view class="top-left row verCenter">
<image src="{{item.avatar||'/res/images/imgs/s.png'}}" class="img"></image>
<image src="{{item.
evaluate_
avatar||'/res/images/imgs/s.png'}}" class="img"></image>
<text class="name">{{item.evaluate_company_name||'--'}}</text>
</view>
<view class="top-right row verCenter">
...
...
pages/person/auth/index.js
View file @
21a2fc2b
...
...
@@ -72,12 +72,10 @@ Page({
wx
.
login
({
success
(
res
)
{
if
(
res
.
code
)
{
//存储用户资料
self
.
setData
({
userinfo
:
e
.
detail
.
userInfo
});
//获取openId
http
.
getData
(
apis
.
getOpenId
,
'GET'
,
{
code
:
res
.
code
,
...
...
pages/person/getphone/index.js
View file @
21a2fc2b
...
...
@@ -65,7 +65,15 @@ Page({
*/
getPhoneNumber
(
e
)
{
if
(
e
.
detail
.
errMsg
==
'getPhoneNumber:ok'
)
{
console
.
log
(
{
openid
:
wx
.
getStorageSync
(
'openid'
),
session_key
:
wx
.
getStorageSync
(
'session_key'
),
encryptedData
:
e
.
detail
.
encryptedData
,
iv
:
e
.
detail
.
iv
}
)
return
http
.
getData
(
apis
.
getwxUserInfo
,
'GET'
,
{
openid
:
wx
.
getStorageSync
(
'openid'
),
session_key
:
wx
.
getStorageSync
(
'session_key'
),
...
...
pages/tab/message/message.wxml
View file @
21a2fc2b
...
...
@@ -4,7 +4,7 @@
<image src="/res/images/imgs/nomessage.png" class="img"></image>
<view class="h3 bold">暂无询价消息</view>
</view> -->
<view class="message-content"
wx:if="{{!isCustomer||arr.length}}"
>
<view class="message-content">
<view class="tip row bothSide verCenter {{isShowTip?'':'noheight'}}">
<view class="tip-left row verCenter">
<text class="icon iconfont iconiconxiantiaoshouji12 tip-icon"></text>
...
...
utils/chat.js
View file @
21a2fc2b
...
...
@@ -48,15 +48,9 @@ const getImUser = () => {
wx
.
setStorageSync
(
'company_name'
,
res
.
data
.
company_name
||
''
);
wx
.
setStorageSync
(
"myUsername"
,
res
.
data
.
im_username
);
wx
.
setStorageSync
(
"myPassword"
,
res
.
data
.
im_password
);
// wx.setStorageSync("imNick", res.data.company_name || (res.data.mobile ? res.data.mobile.replace(reg, '$1****$2') : '') || res.data.wechat_oauth.oauth_nickname || '');
// wx.setStorageSync("myUsername",'001');
// wx.setStorageSync("myPassword", '123456789');
getBlackList
(
token
,
res
.
data
.
im_username
,
res
.
data
.
im_password
);
// conn.open({
// apiUrl: WebIM.config.apiURL,
// user: res.data.im_username,
// pwd: res.data.im_password,
// appKey: WebIM.config.appkey
// })
}
else
{
console
.
log
(
'获取环信账号失败'
)
}
...
...
@@ -77,6 +71,8 @@ const getBlackList = (token,name,pwd) => { //获取黑名单列表
apiUrl
:
WebIM
.
config
.
apiURL
,
user
:
name
,
pwd
:
pwd
,
// user:'001',
// pwd:'123456789',
appKey
:
WebIM
.
config
.
appkey
})
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment