Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
XDJK
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wechatminiprogram
XDJK
Commits
382d0c54
Commit
382d0c54
authored
Jun 05, 2021
by
liuquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
bdb5b227
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
150 additions
and
76 deletions
+150
-76
packageA/chat/chat.js
+91
-43
packageA/drugOrderInfo/drugOrderInfo.js
+19
-5
packageA/drugOrderInfo/drugOrderInfo.wxml
+5
-5
packageA/drugOrderInfo/drugOrderInfo.wxss
+3
-3
packageA/editUser/editUser.js
+2
-2
pages/prescription/order/order.js
+20
-13
pages/prescription/order/order.wxml
+5
-5
pages/prescription/order/order.wxss
+5
-0
No files found.
packageA/chat/chat.js
View file @
382d0c54
...
...
@@ -615,7 +615,7 @@ Page({
let
itemSettings
=
!
Util
.
isEmpty
(
res
.
subscriptionsSetting
)
?
res
.
subscriptionsSetting
.
itemSettings
:
""
;
console
.
log
(
'itemSettings'
,
res
,
itemSettings
)
if
(
itemSettings
)
{
if
(
itemSettings
[
'd33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'
]
==
'accept'
&&
itemSettings
[
'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'
]
==
'accept'
)
{
if
(
itemSettings
[
'd33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'
]
==
'accept'
)
{
that
.
setData
({
remind
:
false
});
...
...
@@ -645,9 +645,8 @@ Page({
that
.
setData
({
remind
:
false
})
wx
.
requestSubscribeMessage
({
tmplIds
:
[
'd33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'
,
'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk
'
],
tmplIds
:
[
'd33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY
'
],
success
(
res
)
{
console
.
log
(
'requestSubscribeMessage'
,
res
)
}
...
...
@@ -659,22 +658,70 @@ Page({
})
},
tmplArr
()
{
let
arr
=
[];
return
new
Promise
((
success
,
fail
)
=>
{
wx
.
getSetting
({
withSubscriptions
:
true
,
success
(
res
)
{
let
itemSettings
=
!
Util
.
isEmpty
(
res
.
subscriptionsSetting
)
?
res
.
subscriptionsSetting
.
itemSettings
:
""
;
console
.
log
(
'itemSettings'
,
res
,
itemSettings
)
withSubscriptions
:
true
}).
then
(
res
=>
{
let
itemSettings
=
!
res
.
subscriptionsSetting
.
mainSwitch
?
res
.
subscriptionsSetting
.
itemSettings
:
""
;
console
.
log
(
'itemSettings
21331
'
,
res
,
itemSettings
)
if
(
itemSettings
)
{
arr
=
itemSettings
.
map
((
item
)
=>
{
console
.
log
(
'1'
)
let
list
=
[
'd33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'
,
'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'
];
arr
=
[];
arr
=
list
.
map
((
item
)
=>
{
if
(
itemSettings
[
item
]
=
"reject"
)
return
item
})
}
else
{
arr
=
[
'd33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'
,
'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'
];
}
}
})
return
arr
;
success
(
arr
)
}).
catch
(
err
=>
{
fail
(
arr
)
})
})
// wx.getSetting({
// withSubscriptions: true
// }).then(res => {
// let itemSettings = !res.subscriptionsSetting.mainSwitch ? res.subscriptionsSetting.itemSettings : "";
// console.log('itemSettings21331', res, itemSettings)
// if (itemSettings) {
// console.log('1')
// let list = ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY', 'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'];
// arr = [];
// arr = list.map((item) => {
// if (itemSettings[item] = "reject") return item
// })
// }
// console.log('tmplArr1', arr)
// return arr;
// }).catch(err => {
// console.log('tmplArr2', arr)
// return arr;
// })
// wx.getSetting({
// withSubscriptions: true,
// success(res) {
// let itemSettings = !res.subscriptionsSetting.mainSwitch ? res.subscriptionsSetting.itemSettings : "";
// console.log('itemSettings21331', res, itemSettings)
// if (itemSettings) {
// console.log('1')
// let list = ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY', 'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'];
// arr = [];
// arr = list.map((item) => {
// if (itemSettings[item] = "reject") return item
// })
// }
// console.log('tmplArr1', arr)
// return arr;
// },
// fail() {
// console.log('tmplArr2', arr)
// return arr;
// }
// // complete(){
// // console.log('tmplArr3', arr)
// // return arr;
// // }
// })
},
/**
* 服务提前结束 0同意 1拒绝
...
...
@@ -974,34 +1021,34 @@ Page({
});
}).
then
((
imResponse
)
=>
{
console
.
log
(
"%c第一次拉取消息列表"
,
"color:#04BE02"
,
imResponse
)
let
msgList
=
Util
.
deepClone
(
imResponse
.
data
.
messageList
);
let
messageList
=
that
.
messageListParser
(
msgList
);
let
length
=
Number
(
messageList
.
length
-
1
);
console
.
log
(
"length"
,
length
)
if
(
length
>=
0
)
{
that
.
data
.
lastShowTimeStamp
=
messageList
[
length
].
time
;
console
.
log
(
"messageList[length].payload.data"
,
messageList
[
length
].
payload
.
data
)
if
(
messageList
[
length
].
payload
.
data
==
"InitiateEndService"
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'对方发起了一个结束当前服务的请求'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
that
.
endInquiry
(
0
);
that
.
userPayList
(
that
.
data
.
orderId
?
that
.
data
.
orderId
:
''
);
}
else
if
(
res
.
cancel
)
{
that
.
endInquiry
(
1
);
that
.
userPayList
(
that
.
data
.
orderId
?
that
.
data
.
orderId
:
''
);
}
}
})
}
}
that
.
setData
({
messageList
:
that
.
showTimestamp
(
messageList
),
// 消息列表。
nextReqMessageID
:
imResponse
.
data
.
nextReqMessageID
,
// 用于续拉,分页续拉时需传入该字段。
isCompleted
:
imResponse
.
data
.
isCompleted
// 表示是否已经拉完所有消息。
})
//
let msgList = Util.deepClone(imResponse.data.messageList);
//
let messageList = that.messageListParser(msgList);
//
let length = Number(messageList.length - 1);
//
console.log("length", length)
//
if (length >= 0) {
//
that.data.lastShowTimeStamp = messageList[length].time;
//
console.log("messageList[length].payload.data", messageList[length].payload.data)
//
if (messageList[length].payload.data == "InitiateEndService") {
//
wx.showModal({
//
title: '提示',
//
content: '对方发起了一个结束当前服务的请求',
//
success(res) {
//
if (res.confirm) {
//
that.endInquiry(0);
//
that.userPayList(that.data.orderId ? that.data.orderId : '');
//
} else if (res.cancel) {
//
that.endInquiry(1);
//
that.userPayList(that.data.orderId ? that.data.orderId : '');
//
}
//
}
//
})
//
}
//
}
//
that.setData({
//
messageList: that.showTimestamp(messageList), // 消息列表。
//
nextReqMessageID: imResponse.data.nextReqMessageID, // 用于续拉,分页续拉时需传入该字段。
//
isCompleted: imResponse.data.isCompleted // 表示是否已经拉完所有消息。
//
})
//延时500ms避免scroll-view的防止抖动生效
setTimeout
(()
=>
{
that
.
scrollToBottom
();
//使滑动条到最底部
...
...
@@ -1494,6 +1541,7 @@ Page({
this
.
setData
({
reportShow
:
true
})
console
.
log
(
'message'
,
message
)
let
msg
=
Util
.
deepClone
(
message
);
that
.
unsentMessageInsert
(
msg
);
Tim
.
createCustomMessage
(
message
).
then
((
imResponse
)
=>
{
...
...
packageA/drugOrderInfo/drugOrderInfo.js
View file @
382d0c54
...
...
@@ -19,10 +19,13 @@ Page({
paySuccess
:
false
,
errshow
:
false
,
items
:
[{
name
:
''
,
name
:
'
是
'
,
value
:
'1'
},
],
isInvoice
:
0
,
//是否开具发票
},
{
name
:
'否'
,
value
:
'0'
}],
isInvoice
:
-
1
,
//是否开具发票
isBtnAsh
:
true
,
//支付按钮置灰
},
/**
...
...
@@ -251,9 +254,9 @@ Page({
* 是否需要开具纸质发票
* @param {*} e
*/
checkbox
Change
:
function
(
e
)
{
radio
Change
:
function
(
e
)
{
this
.
setData
({
isInvoice
:
e
.
detail
.
value
[
0
]
==
1
?
1
:
0
,
isInvoice
:
e
.
detail
.
value
,
})
},
/**
...
...
@@ -348,6 +351,17 @@ Page({
})
return
}
if
(
that
.
data
.
isInvoice
==
-
1
)
{
wx
.
showToast
({
title
:
'请选择是否需要随货纸质发票'
,
icon
:
'none'
,
duration
:
2000
})
that
.
setData
({
isBtnAsh
:
true
})
return
}
if
(
that
.
data
.
ishow
==
true
)
{
if
(
that
.
data
.
item
==
null
)
{
wx
.
showToast
({
...
...
packageA/drugOrderInfo/drugOrderInfo.wxml
View file @
382d0c54
...
...
@@ -110,12 +110,12 @@
</view>
</view>
<view class="order-num">
<text>
开具
发票</text>
<
checkbox-group class="checkbox-group" bindchange="checkbox
Change">
<label class="
checkbox
" wx:for="{{items}}" wx:key="key">
<
checkbox value="{{item.value}}" checked="{{item.value==0?true : fals
e}}" color='#1384ff' />{{item.name}}
<text>
是否需要随货纸质
发票</text>
<
radio-group class="radio-group" bindchange="radio
Change">
<label class="
radio
" wx:for="{{items}}" wx:key="key">
<
radio value="{{item.value}}" checked="{{item.value==isInvoic
e}}" color='#1384ff' />{{item.name}}
</label>
</
checkbox
-group>
</
radio
-group>
</view>
<view class="tys" bindtap="agree">
<view wx:if='{{!agree}}' class="unselected">
...
...
packageA/drugOrderInfo/drugOrderInfo.wxss
View file @
382d0c54
...
...
@@ -7,10 +7,10 @@ page {
background: rgb(242, 242, 242)
}
/* checkbox {
padding-top: 90rpx;
radio {
transform: scale(.8);
} */
color: #1384ff;
}
checkbox {
transform: scale(.7);
...
...
packageA/editUser/editUser.js
View file @
382d0c54
...
...
@@ -630,10 +630,10 @@ Page({
})
}
}
else
{
var
{
unionid
}
=
wx
.
getStorageSync
(
"data"
);
var
allData
=
wx
.
getStorageSync
(
"data"
);
if
(
that
.
data
.
id
==
''
)
{
var
data
=
{
unionid
:
unionid
,
unionid
:
allData
.
unionid
,
name
:
that
.
data
.
name
,
card
:
that
.
data
.
idCard
,
idType
:
that
.
data
.
idType
,
...
...
pages/prescription/order/order.js
View file @
382d0c54
...
...
@@ -19,18 +19,14 @@ Page({
paySuccess
:
false
,
errshow
:
false
,
items
:
[{
name
:
'不需要'
,
value
:
'0'
},
{
name
:
'需要'
,
name
:
'是'
,
value
:
'1'
},
],
isInvoice
:
0
,
//是否开具发票
isBtnAsh
:
true
,
//支付按钮置灰
items
:
[{
name
:
''
,
value
:
'1'
}]
},
{
name
:
'否'
,
value
:
'0'
}],
isInvoice
:
-
1
,
//是否开具发票
isBtnAsh
:
true
//支付按钮置灰
},
/**
* 生命周期函数--监听页面加载
...
...
@@ -232,9 +228,9 @@ Page({
* 是否需要开具纸质发票
* @param {*} e
*/
checkbox
Change
:
function
(
e
)
{
radio
Change
:
function
(
e
)
{
this
.
setData
({
isInvoice
:
e
.
detail
.
value
[
0
]
==
1
?
1
:
0
,
isInvoice
:
e
.
detail
.
value
,
})
},
/**
...
...
@@ -311,6 +307,17 @@ Page({
})
return
}
if
(
that
.
data
.
isInvoice
==
-
1
)
{
wx
.
showToast
({
title
:
'请选择是否需要随货纸质发票'
,
icon
:
'none'
,
duration
:
2000
})
that
.
setData
({
isBtnAsh
:
true
})
return
}
if
(
that
.
data
.
ishow
==
true
)
{
if
(
that
.
data
.
item
==
null
)
{
wx
.
showToast
({
...
...
pages/prescription/order/order.wxml
View file @
382d0c54
...
...
@@ -108,12 +108,12 @@
</view>
</view>
<view class="order-num">
<text>
开具
发票</text>
<
checkbox-group class="checkbox-group" bindchange="checkbox
Change">
<label class="
checkbox
" wx:for="{{items}}" wx:key="key">
<
checkbox value="{{item.value}}" checked="{{item.value==0?true : fals
e}}" color='#1384ff' />{{item.name}}
<text>
是否需要随货纸质
发票</text>
<
radio-group class="radio-group" bindchange="radio
Change">
<label class="
radio
" wx:for="{{items}}" wx:key="key">
<
radio value="{{item.value}}" checked="{{item.value==isInvoic
e}}" color='#1384ff' />{{item.name}}
</label>
</
checkbox
-group>
</
radio
-group>
</view>
<view class="tys" bindtap="agree">
<view wx:if='{{!agree}}' class="unselected">
...
...
pages/prescription/order/order.wxss
View file @
382d0c54
...
...
@@ -12,6 +12,11 @@ page {
transform: scale(.8);
} */
radio {
transform: scale(.8);
color: #1384ff;
}
checkbox {
transform: scale(.7);
color: #1384ff;
...
...
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