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
a67623cf
Commit
a67623cf
authored
Apr 07, 2021
by
liuquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
c69eb57f
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
262 additions
and
280 deletions
+262
-280
packageA/addsite/addsite.js
+3
-36
packageA/chat/chat.js
+3
-3
packageA/drugOrder/drugOrder.js
+34
-15
packageA/drugOrder/drugOrder.wxml
+9
-11
packageA/drugOrderDetail/drugOrderDetail.js
+13
-7
packageA/drugOrderDetail/drugOrderDetail.wxml
+11
-51
packageA/logistics/logistics.js
+37
-9
packageA/logistics/logistics.wxml
+0
-5
packageA/productOrder/productOrder.js
+8
-9
packageA/productOrder/productOrder.wxml
+8
-14
packageA/productOrderDetail/productOrderDetail.js
+13
-8
packageA/productOrderDetail/productOrderDetail.wxml
+41
-46
pages/my/my.js
+53
-53
utils/config.js
+22
-12
utils/service.js
+7
-1
No files found.
packageA/addsite/addsite.js
View file @
a67623cf
...
...
@@ -151,6 +151,9 @@ Page({
})
}
},
addAddress
(){},
editAddress
(){},
editOrderAddress
(){},
name
:
function
(
e
)
{
e
.
detail
.
value
},
...
...
@@ -160,39 +163,4 @@ Page({
take_over
:
e
.
detail
.
value
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
})
\ No newline at end of file
packageA/chat/chat.js
View file @
a67623cf
...
...
@@ -1536,9 +1536,9 @@ Page({
*/
let
url
;
let
roomService
=
{
t_unionid
:
that
.
data
.
t_unionid
,
groupID
:
that
.
data
.
groupID
,
orderId
:
that
.
data
.
orderId
t_unionid
:
that
.
data
.
t_unionid
,
//医生unionid
groupID
:
that
.
data
.
groupID
,
//房间号
orderId
:
that
.
data
.
orderId
//订单号
}
wx
.
setStorageSync
(
'roomService'
,
roomService
);
if
(
status
==
0
)
{
...
...
packageA/drugOrder/drugOrder.js
View file @
a67623cf
const
Service
=
require
(
'../../utils/service.js'
);
const
{
debouce
}
=
require
(
'../../utils/util.js'
);
//防抖函数
const
{
debouce
}
=
require
(
'../../utils/util.js'
);
//防抖函数
const
Util
=
require
(
'../../utils/util.js'
);
Page
({
...
...
@@ -81,12 +83,18 @@ Page({
};
Service
.
delBuyDrug
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
;
let
list
=
Util
.
deepClone
(
that
.
data
.
list
);
list
.
splice
(
index
,
1
);
that
.
setData
({
list
:
list
})
wx
.
showToast
({
title
:
'删除成功'
,
icon
:
'success'
,
mask
:
true
})
that
.
getList
(
1
,
that
.
data
.
nav
)
//
that.getList(1, that.data.nav)
}
}).
catch
((
Error
)
=>
{
console
.
warn
(
'error:'
,
Error
);
// 获取会话资料失败的相关信息
...
...
@@ -136,10 +144,8 @@ Page({
},
2000
)
}
else
{
newList
=
res
.
data
;
// newList = newList.concat(res.data);
}
wx
.
stopPullDownRefresh
()
wx
.
stopPullDownRefresh
();
if
(
newList
.
length
>
0
)
{
that
.
setData
({
list
:
newList
,
...
...
@@ -156,7 +162,7 @@ Page({
wx
.
hideLoading
();
}
}).
catch
(
function
(
Error
)
{
console
.
warn
(
'error:'
,
Error
);
//
获取会话资料失败的相关信息
console
.
warn
(
'error:'
,
Error
);
//
});
},
//选择topTab页
...
...
@@ -203,13 +209,6 @@ Page({
}
})
},
1000
,
true
),
// 查看物流-待发货
// goLogistics1: function (e) {
// console.log(1,e.currentTarget.dataset.id)
// wx.navigateTo({
// url: e.currentTarget.dataset.src +'?img=' + e.currentTarget.dataset.img + '&status=' + e.currentTarget.dataset.status + '&num=' + e.currentTarget.dataset.num + '&tel=' + e.currentTarget.dataset.tel + '&ordernumber=' + e.currentTarget.dataset.ordernumber+'&com='+e.currentTarget.dataset.com +'&address='+JSON.stringify(e.currentTarget.dataset.address),
// })
// },
/**
* 修改地址-待发货2
*/
...
...
@@ -218,8 +217,21 @@ Page({
ordernumber
:
e
.
currentTarget
.
dataset
.
ordernumber
}).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
return
Service
.
getOrdersAddress
({
ordernumber
:
e
.
currentTarget
.
dataset
.
ordernumber
});
}
else
{
wx
.
showToast
({
title
:
res
.
msg
,
icon
:
'success'
,
mask
:
true
})
return
Service
.
breakPromise
();
}
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
wx
.
navigateTo
({
url
:
'/packageA/addsite/addsite?item='
+
JSON
.
stringify
(
e
.
currentTarget
.
dataset
.
address
)
+
'&ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
,
url
:
'/packageA/addsite/addsite?item='
+
JSON
.
stringify
(
res
.
data
)
+
'&ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
,
})
}
else
{
wx
.
showToast
({
...
...
@@ -228,6 +240,13 @@ Page({
mask
:
true
})
}
}).
catch
(
err
=>
{
wx
.
showToast
({
title
:
err
,
icon
:
'none'
,
mask
:
true
})
})
},
1000
,
true
),
/**
...
...
@@ -241,7 +260,7 @@ Page({
//查看物流-待收货+已完成
goLogistics
:
debouce
(
function
(
e
)
{
wx
.
navigateTo
({
url
:
e
.
currentTarget
.
dataset
.
src
+
"?num="
+
e
.
currentTarget
.
dataset
.
num
+
'&
tel='
+
e
.
currentTarget
.
dataset
.
tel
+
'&ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
+
'&img='
+
e
.
currentTarget
.
dataset
.
img
+
'&status='
+
e
.
currentTarget
.
dataset
.
status
+
'&com='
+
e
.
currentTarget
.
dataset
.
com
+
'&address='
+
JSON
.
stringify
(
e
.
currentTarget
.
dataset
.
address
)
,
url
:
e
.
currentTarget
.
dataset
.
src
+
"?num="
+
e
.
currentTarget
.
dataset
.
num
+
'&
ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
+
'&img='
+
e
.
currentTarget
.
dataset
.
img
+
'&status='
+
e
.
currentTarget
.
dataset
.
status
+
'&com='
+
e
.
currentTarget
.
dataset
.
com
,
})
},
1000
,
true
),
/**
...
...
packageA/drugOrder/drugOrder.wxml
View file @
a67623cf
...
...
@@ -12,7 +12,7 @@
<template is="noRecord" data="{{...noRecord}}" />
</view>
<view wx:else>
<block wx:for="{{list}}" wx:key="key">
<block wx:for="{{list}}" wx:
for-index="index" wx:
key="key">
<!-- 药品 -->
<view class="dingdan">
<block>
...
...
@@ -26,7 +26,7 @@
<text wx-if="{{item.status==5}}">订单过期</text>
<text wx-if="{{item.status==7}}">订单作废</text>
</view>
<block wx:for="{{item.prescription}}" wx:key="
index
" wx:for-item="itemName">
<block wx:for="{{item.prescription}}" wx:key="
key
" wx:for-item="itemName">
<view class="list ">
<view class="list-item {{index+1<item.prescription.length?'list-line':''}}">
<view class="bor">
...
...
@@ -52,20 +52,18 @@
<text>(含运费¥{{item.freight}})</text>
</view>
<view class="dele flex">
<view class="delebtn" bindtap="deleBtn" data-ordernumber="{{item.ordernumber}}"
<view class="delebtn" bindtap="deleBtn" data-ordernumber="{{item.ordernumber}}"
data-index="{{index}}"
wx:if="{{item.status==1 || item.status==4 || item.status==5||item.status==7}}">删除订单</view>
<view class="btns flex">
<view class="ckwl" wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}"
data-address="{{item.address}}">修改地址</view>
<
view class="ckwl" wx:if="{{item.status==2}}"
bindtap="goLogistics"
<
!-- <
view class="ckwl" wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}"
data-address="{{item.address}}">修改地址</view>
-->
<
!-- <view class="ckwl" wx:if="{{item.status==2}}"
bindtap="goLogistics"
data-img="{{item.prescription[0].picture}}" data-id="{{item.id}}" data-status="{{item.status}}"
data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}"
data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">
查看物流</view>
<view class="ckwl" wx:if="{{item.status==3 || item.status==4}}" bindtap="goLogistics"
data-status="{{item.status}}" data-img="{{item.prescription[0].picture}}"
data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}"
data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">
查看物流</view> -->
<view class="ckwl" wx:if="{{item.status==2||item.status==3 || item.status==4}}" bindtap="goLogistics"
data-img="{{item.prescription[0].picture}}" data-status="{{item.status}}" data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}" data-ordernumber="{{item.ordernumber}}">
查看物流</view>
<view class="ljzf" wx:if="{{item.status==3}}" bindtap="confirmReceipt" data-num="{{item.ordernumber}}">确认收货
</view>
...
...
packageA/drugOrderDetail/drugOrderDetail.js
View file @
a67623cf
...
...
@@ -38,9 +38,16 @@ Page({
}
/**药品订单详情 drogOrderDetail()*/
Service
.
drogOrderDetail
(
param
).
then
((
res
)
=>
{
console
.
log
(
"res"
,
res
)
if
(
res
.
code
==
1
){
that
.
setData
({
item
:
res
.
data
,
list
:
res
.
data
.
drug_arr
,
})
}
return
Service
.
getOrdersAddress
({
ordernumber
:
res
.
data
.
ordernumber
});
}).
then
(
res
=>
{
let
address
=
{
id
:
res
.
data
.
address
,
id
:
res
.
data
.
id
,
openid
:
wx
.
getStorageSync
(
'data'
).
openid
,
unionid
:
wx
.
getStorageSync
(
'data'
).
unionid
,
detail_address
:
res
.
data
.
detail_address
,
...
...
@@ -51,10 +58,8 @@ Page({
area
:
res
.
data
.
area
,
city
:
res
.
data
.
city
,
}
if
(
res
.
code
==
1
){
if
(
res
.
code
==
200
){
that
.
setData
({
item
:
res
.
data
,
list
:
res
.
data
.
drug_arr
,
address
:
address
})
}
...
...
@@ -99,7 +104,7 @@ Page({
},
/**复制 */
copy
(
e
)
{
let
copy
=
e
.
currentTarget
.
dataset
.
c
;
let
copy
=
String
(
e
.
currentTarget
.
dataset
.
c
)
;
wx
.
setClipboardData
({
data
:
copy
,
success
:
function
(
res
)
{
...
...
@@ -167,7 +172,7 @@ editAddress:Util.debouce(function (e) {
//查看物流-待收货+已完成
goLogistics
:
Util
.
debouce
(
function
(
e
)
{
wx
.
navigateTo
({
url
:
e
.
currentTarget
.
dataset
.
src
+
"?num="
+
e
.
currentTarget
.
dataset
.
num
+
'&
tel='
+
e
.
currentTarget
.
dataset
.
tel
+
'&ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
+
'&img='
+
e
.
currentTarget
.
dataset
.
img
+
'&status='
+
e
.
currentTarget
.
dataset
.
status
+
'&com='
+
e
.
currentTarget
.
dataset
.
com
+
'&address='
+
JSON
.
stringify
(
e
.
currentTarget
.
dataset
.
address
)
,
url
:
e
.
currentTarget
.
dataset
.
src
+
"?num="
+
e
.
currentTarget
.
dataset
.
num
+
'&
ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
+
'&img='
+
e
.
currentTarget
.
dataset
.
img
+
'&status='
+
e
.
currentTarget
.
dataset
.
status
+
'&com='
+
e
.
currentTarget
.
dataset
.
com
,
})
},
1000
,
true
),
})
\ No newline at end of file
packageA/drugOrderDetail/drugOrderDetail.wxml
View file @
a67623cf
...
...
@@ -7,62 +7,22 @@
</view>
<view class="top-text">预计1-3天送达,偏远地区除外</view>
</view>
<view class="logistics" wx:if="{{item.status==2}}">
<view class="logistics-title">等待发货</view>
<view class="logistics">
<view class="logistics-title" wx:if="{{item.status==2}}">等待发货</view>
<view class="logistics-title" wx:if="{{item.status==3}}">已发货</view>
<view class="logistics-title" wx:if="{{item.status==4}}">已签收</view>
<view class="logistics-text">
<view class="addressInfo">
<view class="address-icon">
<text class="cuIcon-location"></text>
</view>
<view>
<view class=""><text class="address_name">{{
item
.name}}</text><text
class="address_call">{{
item
.phone}}</text></view>
<view class="address_text">{{
item.take_over+item
.detail_address}}</view>
<view class=""><text class="address_name">{{
address
.name}}</text><text
class="address_call">{{
address
.phone}}</text></view>
<view class="address_text">{{
address.take_over+address
.detail_address}}</view>
</view>
</view>
</view>
<!-- <view>
<text class="cuIcon-right lg text-gray logistics-right"></text>
</view> -->
</view>
<view class="logistics" wx:if="{{item.status==3}}">
<view class="logistics-title">已发货</view>
<view class="logistics-text">
<view class="addressInfo">
<view class="address-icon">
<text class="cuIcon-location"></text>
</view>
<view>
<view class=""><text class="address_name">{{item.name}}</text><text
class="address_call">{{item.phone}}</text></view>
<view class="address_text">{{item.take_over+item.detail_address}}</view>
</view>
</view>
</view>
<!-- <view>
<text class="cuIcon-right lg text-gray logistics-right"></text>
</view> -->
</view>
<view class="logistics" wx:if="{{item.status==4}}">
<view class="logistics-title">已签收</view>
<view class="logistics-text">
<view class="addressInfo">
<view class="address-icon">
<text class="cuIcon-location"></text>
</view>
<view>
<view class=""><text class="address_name">{{item.name}}</text><text
class="address_call">{{item.phone}}</text></view>
<view class="address_text">{{item.take_over+item.detail_address}}</view>
</view>
</view>
</view>
<!-- <view>
<text class="cuIcon-right lg text-gray logistics-right"></text>
</view> -->
...
...
@@ -163,10 +123,9 @@
<view class="bottom row">
<!-- <view>查看医生推荐</view> -->
<view bindtap="viewRecipe" data-item="{{item}}">查看处方</view>
<view wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}"
data-address="{{address}}">修改地址</view>
<
!-- <
view wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}"
data-address="{{address}}">修改地址</view>
-->
<view bindtap="goLogistics" data-status="{{item.status}}" data-img="{{item.drug_arr[0].picture}}"
data-src="/packageA/logistics/logistics" data-num="{{item.express_order}}" data-com="{{item.com}}"
data-address="{{address}}" data-tel="{{item.phone}}" data-ordernumber="{{item.ordernumber}}">查看物流
data-src="/packageA/logistics/logistics" data-num="{{item.express_order}}" data-com="{{item.com}}" data-ordernumber="{{item.ordernumber}}">查看物流
</view>
</view>
\ No newline at end of file
packageA/logistics/logistics.js
View file @
a67623cf
...
...
@@ -28,14 +28,10 @@ Page({
that
.
setData
({
img
:
options
.
img
,
status
:
options
.
status
,
address
:
JSON
.
parse
(
options
.
address
)
//
address: JSON.parse(options.address)
})
if
(
options
.
tel
)
{
that
.
setData
({
mobileTail
:
options
.
tel
.
substring
(
options
.
tel
.
length
-
4
),
})
}
console
.
log
(
"options"
,
options
)
this
.
getOrderAddress
(
options
.
ordernumber
)
console
.
log
(
"options"
,
options
)
var
list
=
options
.
num
.
split
(
','
)
var
comlist
=
options
.
com
.
split
(
','
)
that
.
setData
({
...
...
@@ -45,7 +41,6 @@ Page({
comlist
:
comlist
,
com
:
util
.
isEmpty
(
comlist
[
0
])
?
'shunfeng'
:
comlist
[
0
]
})
that
.
getWl
()
},
/**
* 生命周期函数--监听页面显示
...
...
@@ -53,7 +48,40 @@ Page({
onShow
:
function
()
{
},
/**
* 获取最新的订单收货地址
*/
getOrderAddress
(
ordernumber
)
{
var
that
=
this
;
Service
.
getOrdersAddress
({
ordernumber
}).
then
(
res
=>
{
console
.
log
(
"res"
,
res
)
if
(
res
.
code
==
200
)
{
console
.
log
(
"res.data"
,
res
.
data
)
that
.
setData
({
address
:
res
.
data
,
mobileTail
:
res
.
data
.
phone
.
substring
(
res
.
data
.
phone
.
length
-
4
),
})
that
.
getWl
()
}
else
{
wx
.
showToast
({
title
:
res
.
msg
,
icon
:
'success'
,
mask
:
true
})
}
}).
catch
(
err
=>
{
wx
.
showToast
({
title
:
err
,
icon
:
'success'
,
mask
:
true
})
})
},
/**
* 获取物流路由
*/
getWl
:
function
()
{
var
that
=
this
var
data
=
{}
...
...
packageA/logistics/logistics.wxml
View file @
a67623cf
...
...
@@ -16,11 +16,6 @@
<view class="dfh" wx:if="{{status==4}}">已完成</view>
<view class="dh" wx:if="{{orderid!='null' && orderid}}">
<text wx:if="{{com=='shunfeng'}}">顺丰速运</text>
<text wx:if="{{com=='jd'}}">京东物流</text>
<text wx:if="{{com=='yuantong'}}">圆通速递</text>
<text wx:if="{{com=='shentong'}}">申通快递</text>
<text wx:if="{{com=='zhongtong'}}">中通快递</text>
<text wx:if="{{com=='yundakuaiyun'}}">韵达快运</text>
:{{orderid}}
<view class="btn" bindtap="getNum" wx:if="{{orderid!='null' && orderid}}">复制</view>
</view>
...
...
packageA/productOrder/productOrder.js
View file @
a67623cf
...
...
@@ -84,12 +84,18 @@ Page({
};
Service
.
delBuyDrug
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
;
let
list
=
Util
.
deepClone
(
that
.
data
.
list
);
list
.
splice
(
index
,
1
);
that
.
setData
({
list
:
list
})
wx
.
showToast
({
title
:
'删除成功'
,
icon
:
'success'
,
mask
:
true
})
that
.
getList
(
1
,
that
.
data
.
nav
)
//
that.getList(1, that.data.nav)
}
}).
catch
((
Error
)
=>
{
console
.
warn
(
'error:'
,
Error
);
// 获取会话资料失败的相关信息
...
...
@@ -207,13 +213,6 @@ Page({
}
})
},
1000
,
true
),
// 查看物流-待发货
// goLogistics1: function (e) {
// console.log(1,e.currentTarget.dataset.id)
// wx.navigateTo({
// url: e.currentTarget.dataset.src +'?img=' + e.currentTarget.dataset.img + '&status=' + e.currentTarget.dataset.status + '&num=' + e.currentTarget.dataset.num + '&tel=' + e.currentTarget.dataset.tel + '&ordernumber=' + e.currentTarget.dataset.ordernumber+'&com='+e.currentTarget.dataset.com +'&address='+JSON.stringify(e.currentTarget.dataset.address),
// })
// },
/**
* 修改地址-待发货2
*/
...
...
@@ -245,7 +244,7 @@ Page({
//查看物流-待收货+已完成
goLogistics
:
debouce
(
function
(
e
)
{
wx
.
navigateTo
({
url
:
e
.
currentTarget
.
dataset
.
src
+
"?num="
+
e
.
currentTarget
.
dataset
.
num
+
'&
tel='
+
e
.
currentTarget
.
dataset
.
tel
+
'&ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
+
'&img='
+
e
.
currentTarget
.
dataset
.
img
+
'&status='
+
e
.
currentTarget
.
dataset
.
status
+
'&com='
+
e
.
currentTarget
.
dataset
.
com
+
'&address='
+
JSON
.
stringify
(
e
.
currentTarget
.
dataset
.
address
)
,
url
:
e
.
currentTarget
.
dataset
.
src
+
"?num="
+
e
.
currentTarget
.
dataset
.
num
+
'&
ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
+
'&img='
+
e
.
currentTarget
.
dataset
.
img
+
'&status='
+
e
.
currentTarget
.
dataset
.
status
+
'&com='
+
e
.
currentTarget
.
dataset
.
com
,
})
},
1000
,
true
),
/**
...
...
packageA/productOrder/productOrder.wxml
View file @
a67623cf
...
...
@@ -12,7 +12,7 @@
<template is="noRecord" data="{{...noRecord}}" />
</view>
<view wx:else>
<block wx:for="{{list}}" wx:key="key">
<block wx:for="{{list}}" wx:
for-index="index" wx:
key="key">
<!-- 推荐产品 -->
<view class="dingdan">
<block>
...
...
@@ -26,7 +26,7 @@
<text wx-if="{{item.status==5}}">订单过期</text>
<text wx-if="{{item.status==7}}">订单作废</text>
</view>
<block wx:for="{{item.prescription}}" wx:key="
index
" wx:for-item="itemName">
<block wx:for="{{item.prescription}}" wx:key="
key
" wx:for-item="itemName">
<view class="list ">
<view class="list-item {{index+1<item.prescription.length?'list-line':''}}">
<view class="bor">
...
...
@@ -52,20 +52,14 @@
<text>(含运费¥{{item.freight}})</text>
</view>
<view class="dele flex">
<view class="delebtn" bindtap="deleBtn" data-ordernumber="{{item.ordernumber}}"
wx:if="{{item.status==1 || item.status==4 ||item.status==7}}">删除订单</view>
<view class="delebtn" bindtap="deleBtn" data-ordernumber="{{item.ordernumber}}"
data-index="{{index}}"
wx:if="{{item.status==1 || item.status==4 ||item.status==7}}"
>删除订单</view>
<view class="btns flex">
<view class="ckwl" wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}"
data-address="{{item.address}}">修改地址</view>
<view class="ckwl" wx:if="{{item.status==2}}" bindtap="goLogistics"
data-img="{{item.prescription[0].picture}}" data-id="{{item.id}}" data-status="{{item.status}}"
data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}"
data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">
查看物流</view>
<view class="ckwl" wx:if="{{item.status==3 || item.status==4}}" bindtap="goLogistics"
<!-- <view class="ckwl" wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}"
data-address="{{item.address}}">修改地址</view> -->
<view class="ckwl" wx:if="{{item.status==2||item.status==3 || item.status==4}}" bindtap="goLogistics"
data-status="{{item.status}}" data-img="{{item.prescription[0].picture}}"
data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}"
data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">
data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}" data-ordernumber="{{item.ordernumber}}">
查看物流</view>
<view class="ljzf" wx:if="{{item.status==3}}" bindtap="confirmReceipt" data-num="{{item.ordernumber}}">确认收货
</view>
...
...
packageA/productOrderDetail/productOrderDetail.js
View file @
a67623cf
...
...
@@ -10,7 +10,6 @@ Page({
list
:
[
"1"
],
index
:
0
},
/**
* 生命周期函数--监听页面加载
*/
...
...
@@ -38,9 +37,15 @@ Page({
}
/**药品订单详情 drogOrderDetail()*/
Service
.
productOrderDetail
(
param
).
then
((
res
)
=>
{
console
.
log
(
"res"
,
res
)
if
(
res
.
code
==
200
){
that
.
setData
({
item
:
res
.
data
,
list
:
res
.
data
.
drug_arr
,
})
}
return
Service
.
getOrdersAddress
({
ordernumber
:
res
.
data
.
ordernumber
});
}).
then
(
res
=>
{
let
address
=
{
id
:
res
.
data
.
address
,
id
:
res
.
data
.
id
,
openid
:
wx
.
getStorageSync
(
'data'
).
openid
,
unionid
:
wx
.
getStorageSync
(
'data'
).
unionid
,
detail_address
:
res
.
data
.
detail_address
,
...
...
@@ -53,8 +58,6 @@ Page({
}
if
(
res
.
code
==
200
){
that
.
setData
({
item
:
res
.
data
,
list
:
res
.
data
.
drug_arr
,
address
:
address
})
}
...
...
@@ -99,13 +102,14 @@ Page({
},
/**复制 */
copy
(
e
)
{
let
copy
=
e
.
currentTarget
.
dataset
.
c
;
console
.
log
(
"copy"
,
copy
)
let
copy
=
String
(
e
.
currentTarget
.
dataset
.
c
);
wx
.
setClipboardData
({
data
:
copy
,
success
:
function
(
res
)
{
console
.
log
(
"res"
,
res
)
wx
.
getClipboardData
({
success
:
function
(
res
)
{
console
.
log
(
"res"
,
res
)
wx
.
showToast
({
title
:
'复制成功'
,
})
...
...
@@ -168,7 +172,7 @@ editAddress:Util.debouce(function (e) {
//查看物流-待收货+已完成
goLogistics
:
Util
.
debouce
(
function
(
e
)
{
wx
.
navigateTo
({
url
:
e
.
currentTarget
.
dataset
.
src
+
"?num="
+
e
.
currentTarget
.
dataset
.
num
+
'&tel='
+
e
.
currentTarget
.
dataset
.
tel
+
'&ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
+
'&img='
+
e
.
currentTarget
.
dataset
.
img
+
'&
status='
+
e
.
currentTarget
.
dataset
.
status
+
'&com='
+
e
.
currentTarget
.
dataset
.
com
+
'&address='
+
JSON
.
stringify
(
e
.
currentTarget
.
dataset
.
address
)
,
url
:
e
.
currentTarget
.
dataset
.
src
+
"?num="
+
e
.
currentTarget
.
dataset
.
num
+
'&tel='
+
e
.
currentTarget
.
dataset
.
tel
+
'&ordernumber='
+
e
.
currentTarget
.
dataset
.
ordernumber
+
'&img='
+
e
.
currentTarget
.
dataset
.
img
+
'&
com='
+
e
.
currentTarget
.
dataset
.
com
,
})
},
1000
,
true
),
})
\ No newline at end of file
packageA/productOrderDetail/productOrderDetail.wxml
View file @
a67623cf
...
...
@@ -7,59 +7,54 @@
</view>
<view class="top-text">预计1-3天送达,偏远地区除外</view>
</view>
<view class="logistics" wx:if="{{item.status==2}}">
<view class="logistics-title">等待发货</view>
<view class="logistics-text">
<view class="addressInfo">
<view class="address-icon">
<text class="cuIcon-location"></text>
</view>
<view>
<view class=""><text class="address_name">{{item.name}}</text><text
class="address_call">{{item.phone}}</text></view>
<view class="address_text">{{item.take_over+item.detail_address}}</view>
<view class="logistics" >
<view class="logistics-title" wx:if="{{item.status==2||item.status==1}}">等待发货</view>
<view class="logistics-title" wx:if="{{item.status==3}}">已发货</view>
<view class="logistics-text">
<view class="addressInfo">
<view class="address-icon">
<text class="cuIcon-location"></text>
</view>
<view>
<view class=""><text class="address_name">{{address.name}}</text><text class="address_call">{{address.phone}}</text>
</view>
<view class="address_text">{{address.take_over+address.detail_address}}</view>
</view>
</view>
</view>
<!-- <view>
<text class="cuIcon-right lg text-gray logistics-right"></text>
</view> -->
</view>
<view class="logistics" wx:if="{{item.status==3}}">
<view class="logistics-title">已发货</view>
<view class="logistics-text">
<view class="addressInfo">
<view class="address-icon">
<text class="cuIcon-location"></text>
</view>
<view>
<view class=""><text class="address_name">{{item.name}}</text><text
class="address_call">{{item.phone}}</text></view>
<view class="address_text">{{item.take_over+item.detail_address}}</view>
<!-- <view class="logistics" wx:if="{{item.status==3}}">
<view class="logistics-title">已发货</view>
<view class="logistics-text">
<view class="addressInfo">
<view class="address-icon">
<text class="cuIcon-location"></text>
</view>
<view>
<view class=""><text class="address_name">{{item.name}}</text><text class="address_call">{{item.phone}}</text>
</view>
<view class="address_text">{{item.take_over+item.detail_address}}</view>
</view>
</view>
<!-- <view>
<text class="cuIcon-right lg text-gray logistics-right"></text>
</view> -->
</view>
</view>
</view> -->
<view class="logistics" wx:if="{{item.status==4}}">
<view class="logistics-title">已签收</view>
<view class="logistics-text">
<view class="addressInfo">
<view class="address-icon">
<text class="cuIcon-location"></text>
</view>
<view>
<view class=""><text class="address_name">{{item.name}}</text><text
class="address_call">{{item.phone}}</text></view>
<view class="address_text">{{item.take_over+item.detail_address}}</view>
<view class="logistics-title">已签收</view>
<view class="logistics-text">
<view class="addressInfo">
<view class="address-icon">
<text class="cuIcon-location"></text>
</view>
<view>
<view class=""><text class="address_name">{{item.name}}</text><text class="address_call">{{item.phone}}</text>
</view>
<view class="address_text">{{item.take_over+item.detail_address}}</view>
</view>
</view>
</view>
<!-- <view>
<text class="cuIcon-right lg text-gray logistics-right"></text>
...
...
@@ -98,7 +93,7 @@
<view class="row order-freight">
<view>运费:</view>
<view wx:if="{{item.freight&&item.freight!='0.00'}}">¥ {{item.freight}}</view>
<view wx:else
>包邮</view>
<view wx:else>包邮</view>
</view>
<view class="actualPay">共{{item.drug_num}}件商品 实付款: <text style="color:#EC5B68;">¥{{item.money}}</text></view>
</view>
...
...
@@ -159,13 +154,13 @@
<view>如果回复不及时,可拨打</view>
<view>客服电话:<text style="color:#2684FF;" bindtap="dial">400-1199-218</text> 进行咨询。</view>
</view>
<
view class="bottom row"
>
<
!-- <view class="bottom row"> --
>
<!-- <view>查看医生推荐</view> -->
<!-- <view bindtap="viewRecipe" data-item="{{item}}">查看处方</view> -->
<!-- <view wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}"
data-address="{{address}}">修改地址</view> -->
<
view bindtap="goLogistics" data-status="{{item.status
}}" data-img="{{item.drug_arr[0].picture}}"
<
!-- <view bindtap="goLogistics" data-status="{{item.status+1
}}" data-img="{{item.drug_arr[0].picture}}"
data-src="/packageA/logistics/logistics" data-num="{{item.express_order}}" data-com="{{item.com}}"
data-address="{{address}}" data-tel="{{item.phone}}" data-ordernumber="{{item.ordernumber}}">查看物流
</view>
</view>
\ No newline at end of file
data-ordernumber="{{item.ordernumber}}">查看物流
</view> -->
<!-- </view> -->
\ No newline at end of file
pages/my/my.js
View file @
a67623cf
const
Service
=
require
(
'../../utils/service.js'
);
const
Util
=
require
(
'../../utils/util.js'
);
Page
({
data
:
{
userInfo
:
''
,
reportRedD
:
false
,
//报告红点展示
reportRedNum
:
0
,
//未作报告数量
disabled
:
true
,
//防止重复点击
version
:
'3.2.0'
,
isShow
:
false
,
showClose
:
true
,
disabled
:
true
,
//防止重复点击
version
:
'3.2.0'
,
isShow
:
false
,
showClose
:
true
,
},
onLoad
:
function
()
{
wx
.
setNavigationBarTitle
({
...
...
@@ -24,13 +23,13 @@ Page({
wx
.
setStorageSync
(
'user'
,
res
)
return
Service
.
getUserData
(
res
.
openid
)
}).
then
((
res
)
=>
{
wx
.
setStorageSync
(
'data'
,
res
)
wx
.
setStorageSync
(
'data'
,
res
)
that
.
setData
({
userInfo
:
res
,
userInfo
:
res
,
unionid
:
res
.
unionid
||
''
,
nickname
:
res
.
nickname
||
res
.
name
||
0
,
headimgurl
:
res
.
headimgurl
||
'/images/head-img.png'
,
isShow
:
true
isShow
:
true
})
// that.resultNot(res.openid)
})
...
...
@@ -43,7 +42,7 @@ Page({
this
.
login
=
this
.
selectComponent
(
"#login"
);
this
.
answer
=
this
.
selectComponent
(
"#answer"
);
},
/**
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
...
...
@@ -54,8 +53,8 @@ Page({
},
//菜单栏红点提示
resultNot
(
openid
)
{
//未做量表提醒
console
.
log
(
"resultNot"
)
//未做量表提醒
console
.
log
(
"resultNot"
)
var
data
=
{
openid
:
openid
}
...
...
@@ -94,66 +93,66 @@ Page({
})
},
/**跳转页面 */
goToURL
:
Util
.
debouce
(
function
(
e
)
{
goToURL
:
Util
.
debouce
(
function
(
e
)
{
var
that
=
this
;
if
(
that
.
data
.
confirm
)
{
return
;
}
that
.
data
.
confirm
=
true
var
data
=
wx
.
getStorageSync
(
'data'
)
var
data
=
wx
.
getStorageSync
(
'data'
)
if
(
Util
.
isEmpty
(
data
.
unionid
))
{
that
.
login
.
showLogin
();
}
else
{
wx
.
navigateTo
({
url
:
e
.
currentTarget
.
dataset
.
src
,
url
:
e
.
currentTarget
.
dataset
.
src
,
})
}
that
.
data
.
confirm
=
false
;
},
1000
,
true
),
// 我的报告
myReport
:
Util
.
debouce
(
function
()
{
var
that
=
this
;
if
(
that
.
data
.
confirm
)
{
return
;
}
that
.
data
.
confirm
=
true
var
data
=
wx
.
getStorageSync
(
'data'
)
if
(
Util
.
isEmpty
(
data
.
unionid
))
{
that
.
login
.
showLogin
();
}
else
{
wx
.
navigateTo
({
url
:
'/packageB/myReport/myReport?type=0'
,
that
.
data
.
confirm
=
false
;
},
1000
,
true
),
// 我的报告
myReport
:
Util
.
debouce
(
function
()
{
var
that
=
this
;
if
(
that
.
data
.
confirm
)
{
return
;
}
that
.
data
.
confirm
=
true
var
data
=
wx
.
getStorageSync
(
'data'
)
if
(
Util
.
isEmpty
(
data
.
unionid
))
{
that
.
login
.
showLogin
();
}
else
{
wx
.
navigateTo
({
url
:
'/packageB/myReport/myReport?type=0'
,
})
}
that
.
data
.
confirm
=
false
;
},
1000
,
true
),
getUserInfo
()
{
this
.
login
.
showLogin
();
},
//客服电话
dial
(
e
)
{
let
tel
=
e
.
currentTarget
.
dataset
.
tel
;
wx
.
makePhoneCall
({
phoneNumber
:
tel
,
})
}
that
.
data
.
confirm
=
false
;
},
1000
,
true
),
getUserInfo
(){
this
.
login
.
showLogin
();
},
//客服电话
dial
(
e
)
{
let
tel
=
e
.
currentTarget
.
dataset
.
tel
;
wx
.
makePhoneCall
({
phoneNumber
:
tel
,
})
},
},
//设置推送
setPush
:
function
()
{
wx
.
openSetting
()
},
//登陆后组件回调方法刷新当前页面
_refreshEvent
()
{
//设置推送
setPush
:
function
()
{
wx
.
openSetting
()
},
//登陆后组件回调方法刷新当前页面
_refreshEvent
()
{
console
.
log
(
"刷新"
);
this
.
onShow
();
},
/**
/**
* 图片加载失败函数
* @param {any} e
*/
binderrorimg
(){
this
.
setData
({
headimgurl
:
'/images/head-img.png'
})
binderrorimg
()
{
this
.
setData
({
headimgurl
:
'/images/head-img.png'
})
},
})
\ No newline at end of file
utils/config.js
View file @
a67623cf
...
...
@@ -8,13 +8,15 @@ const HOST_P_K = "https://static.xiaodongai.com/xiaodongai/kongtian/";
// const HOST = "https://test-wechat.xiaodongai.com/";
const
HOST
=
'https://www.xiaodongai.com/xiaodongai/kongtian/'
;
// const HOST = 'https://www.xiaodongai.com/xiaodongai/ceshi/'; //测试库
// var HOST = 'http://192.168.0.123:8081/xiaodongai/ceshi/'; //本地
// var HOST = 'http://localhost/xiaodongai/kongtian/'; //本地
const
patient
=
"https://online-patient.xiaodongai.com/"
//正式新地址
// const patient = "http://test.patient.xiaodongai.com/" //测试新地址
// const HOST = 'https://www.xiaodongai.com/xiaodongai/ceshi/'; //测试库
// var HOST = 'http://192.168.0.123:8081/xiaodongai/ceshi/'; //本地
// var HOST = 'http://localhost/xiaodongai/kongtian/'; //本地
const
patient
=
"https://online-patient.xiaodongai.com/"
//推荐产品正式新地址
// const patient = "http://test.patient.xiaodongai.com/" //测试新地址
const
orders
=
"https://online-cjob.xiaodongai.com/index.php/order/"
//订单
// const orders = "http://120.53.134.66/index.php/api/"
const
HOST_info
=
'https://vivshi.com/xiaodongai/kongtian/'
;
// 弃用
const
HOST_info
=
'https://vivshi.com/xiaodongai/kongtian/'
;
// 弃用
const
HOST_yiyuan
=
"https://www.xiaodongai.com/xiaodong_yiyuan/xd_admin/public/index.php/apitest/"
;
//互联网医院测试
// var HOST_yiyuan = "https://www.xiaodongai.com/xiaodong_yiyuan/xd_admin/public/index.php/api/"; //互联网医院正式
...
...
@@ -23,12 +25,20 @@ const url = {
* begin
* 推荐产品
*/
getNormalProduct
:
patient
+
"wechatIteration/Zcprescription/zckyxqs"
,
//正常购买产品
getQuickProduct
:
patient
+
"wechatIteration/Prescription/kskyxqs"
,
//快速购买产品,扫二维码购买
productPay
:
patient
+
"wechatIteration/Place_order/place_order"
,
//推荐产品支付
buyProductList
:
patient
+
"wechatIteration/order_list/apiOrder"
,
//推荐产品列表
getPayStatusB
:
patient
+
"wechatIteration/is_purchase/purchase"
,
//获取产品支付状态
productOrderDetail
:
patient
+
"Drugorder/prescription_order_detail"
,
//获取产品订单详情
getNormalProduct
:
patient
+
"wechatIteration/Zcprescription/zckyxqs"
,
//正常购买产品
getQuickProduct
:
patient
+
"wechatIteration/Prescription/kskyxqs"
,
//快速购买产品,扫二维码购买
productPay
:
patient
+
"wechatIteration/Place_order/place_order"
,
//推荐产品支付
buyProductList
:
patient
+
"wechatIteration/order_list/apiOrder"
,
//推荐产品列表
getPayStatusB
:
patient
+
"wechatIteration/is_purchase/purchase"
,
//获取产品支付状态
productOrderDetail
:
patient
+
"Drugorder/prescription_order_detail"
,
//获取产品订单详情
/**
* end
*/
/**
* begin
* 订单中心
*/
getOrdersAddress
:
orders
+
"order_address/getOneByOrderNumber"
,
//获取订单地址
/**
* end
*/
...
...
utils/service.js
View file @
a67623cf
...
...
@@ -50,7 +50,7 @@ function getUserData(openid) {
let
getUserDataUrl
=
config
.
url
.
getUserData
;
let
data
=
{};
data
.
openid
=
openid
;
// data.openid='oYQX40
Gk7bjWc8YncaXwFyNOC2ww
'
// data.openid='oYQX40
HkqeZ36Kuq9M8APvwzizzc
'
return
wxRequest
.
postRequest
(
getUserDataUrl
,
data
);
};
/**
...
...
@@ -643,6 +643,10 @@ function productPay(param) {
var
productPayUrl
=
config
.
url
.
productPay
;
return
wxRequest
.
postRequest
(
productPayUrl
,
param
)
}
function
getOrdersAddress
(
param
){
var
getOrdersAddressUrl
=
config
.
url
.
getOrdersAddress
;
return
wxRequest
.
postRequest
(
getOrdersAddressUrl
,
param
)
}
function
getBusStopListPromise
(
sid
,
stopType
)
{
var
getStopListUrl
=
config
.
url
.
getBusStopList
;
...
...
@@ -747,4 +751,5 @@ module.exports = {
getNormalProduct
:
getNormalProduct
,
//正常购买推荐产品
getQuickProduct
:
getQuickProduct
,
//快速购买推荐产品
productPay
:
productPay
,
//推荐产品支付
getOrdersAddress
:
getOrdersAddress
,
//获取订单地址
}
\ No newline at end of file
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