Commit 6f3498d2 by liuquan

合并分支 'feature.logistics.v3.2.3.20210423.liuquan' 到 'XDJK-master'

Feature.logistics.v3.2.3.20210423.liuquan

查看合并请求 !11
parents 59adfe4d ab36d678
......@@ -276,6 +276,7 @@ Page({
// | $$ | $$__/ $$| $$__/ $$| $$| $$| $$_____
// | $$ \$$ $$| $$ $$| $$| $$ \$$ \
// \$$ \$$$$$$ \$$$$$$$ \$$ \$$ \$$$$$$$
/**
* 判断授权
*/
......@@ -711,6 +712,7 @@ Page({
} else if (res.code == 1 && res.data.status == "2") {
that.setData({
payFlag: false,
payFlag1: false,
end_time: '已结束',
sendBtns: true,
status: true,
......
......@@ -391,7 +391,7 @@
<text class='send-report' wx:if='{{payFlag}}' data-src="123" bindtap='openReport'>发送报告</text>
<text class='send-report' wx:if='{{!payFlag}}' data-src="123" style=" background:#e5e6e8;">发送报告</text>
<text class='send-img' wx:if='{{payFlag}}' bindtap='createImageMessage'>发送图片</text>
<text class='send-img' wx:if='{{!payFlag}}' style=" background:#e5e6e8;">发送图片</text>
<text class='send-img' wx:if='{{!payFlag}}' style="background:#e5e6e8;">发送图片</text>
<text class='send-img' wx:if='{{orderId!=""&&orderId!=0}}' bindtap='chatLog'>聊天记录</text>
<!-- <text class='send-img' wx:if="{{serviceEvaluation}}" bindtap="estimateShow" >服务评价</text> -->
</view>
......
......@@ -126,6 +126,6 @@
<!-- <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-ordernumber="{{item.ordernumber}}">查看物流
data-src="/packageA/logistics/logistics" data-ordernumber="{{item.ordernumber}}">查看物流
</view>
</view>
\ No newline at end of file
......@@ -15,10 +15,11 @@ Page({
time2: '',
time3: '',
img: '',
status: '',
status: -1,//物流状态
sforderid:'',//物流单号
logistics: false,
mobileTail: '',
xdorderid: ''
ordernumber: '' //订单单号
},
/**
* 生命周期函数--监听页面加载
......@@ -27,20 +28,10 @@ Page({
let that = this
that.setData({
img: options.img,
status: options.status,
// address: JSON.parse(options.address)
})
this.getOrderAddress(options.ordernumber)
console.log("options", options)
var list = options.num.split(',')
var comlist = options.com.split(',')
that.setData({
xdorderid: options.ordernumber,
list: list,
orderid: list[0],
comlist: comlist,
com: util.isEmpty(comlist[0]) ? 'shunfeng' : comlist[0]
ordernumber: options.ordernumber,
})
this.getLogisticsInfo(options.ordernumber);
// this.getLogisticsInfo("20210422589380")
},
/**
* 生命周期函数--监听页面显示
......@@ -51,19 +42,19 @@ Page({
/**
* 获取最新的订单收货地址
*/
getOrderAddress(ordernumber) {
var that = this;
getLogisticsInfo(ordernumber) {
let that = this;
Service.getOrdersAddress({
ordernumber
}).then(res => {
console.log("res", res)
if (res.code == 200) {
console.log("res.data",res.data)
console.log("res.data", res.data)
that.setData({
address: res.data,
mobileTail: res.data.phone.substring(res.data.phone.length - 4),
})
that.getWl()
this.getLogisticsNumber(ordernumber);
} else {
wx.showToast({
title: res.msg,
......@@ -80,15 +71,51 @@ Page({
})
},
/**
* 通过订单单号获取物流单号
*/
getLogisticsNumber(ordernumber) {
let that = this;
Service.getLogisticsNumber({
ordernumber
}).then(res => {
console.log("res.data", res)
if (res.code == 200) {
if (res.data) {
that.setData({
status:res.data.status,
sforderid:res.data.sf_waybillno
})
}
that.getWl()
// that.setData({
// address: res.data,
// mobileTail: res.data.phone.substring(res.data.phone.length - 4),
// })
} else {
wx.showToast({
title: res.msg,
icon: 'success',
mask: true
})
}
}).catch(err => {
console.err("getLogisticsNumber", err)
wx.showToast({
title: err,
// icon: 'success',
mask: true
})
})
},
/**
* 获取物流路由
*/
getWl: function () {
var that = this
var data = {}
data.orderid = that.data.orderid;
let that = this
let data = {}
data.orderid = that.data.sforderid;
data.mobileTail = that.data.mobileTail;
data.xdorderid = that.data.xdorderid;
data.com = that.data.com;
data.xdorderid = that.data.ordernumber;
data.phone = that.data.mobileTail;
Service.logisticsInfo(data).then((res) => {
if (res.data) {
......@@ -103,18 +130,19 @@ Page({
}
})
},
getSf: function (e) {
var _this = this
_this.setData({
orderid: e.currentTarget.dataset.num
})
_this.getWl()
},
/**
* 复制单号
* @param {*} e
*/
getNum: function (e) {
wx.setClipboardData({
data: this.data.orderid,
data: this.data.sforderid,
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'success',
mask: true
})
}
})
},
......
<!--packageA/logistics/logistics.wxml-->
<answer id='answer'></answer>
<view class="pre" wx:if="{{orderid!='null' && list.length>1}}">
<view space='ensp'>因货品存放于不同仓库,您的订单拆分为{{list.length}}个包裹发货,运单号为:
<text bindtap="getSf" data-num="{{item}}" wx:for="{{list}}" wx:key="index">{{item}}{{list.length>index+1?'、':''}}</text>{{list.length>index+1?'':','}}
点击单号可查看物流状态。</view>
</view>
<view class="header">
<view class="title">
<view class="img">
<image src="{{img}}"></image>
</view>
<view class="marl">
<view class="dfh mt" wx:if="{{status==2}}">待发货</view>
<view class="dfh" wx:if="{{status==3}}">待收货</view>
<view class="dfh" wx:if="{{status==4}}">已完成</view>
<view class="dh" wx:if="{{orderid!='null' && orderid}}">
<text wx:if="{{com=='shunfeng'}}">顺丰速运</text>
:{{orderid}}
<view class="btn" bindtap="getNum" wx:if="{{orderid!='null' && orderid}}">复制</view>
<view class="dfh mt" wx:if="{{status==-1}}">待发货</view>
<view class="dfh" wx:if="{{status==0||status==1||status==6}}">待收货</view>
<view class="dfh" wx:if="{{status==2}}">已完成</view>
<view class="dfh" wx:if="{{status==3}}">已取消</view>
<view class="dfh" wx:if="{{status==4}}">已拒收</view>
<view class="dfh" wx:if="{{status==5}}">派件异常</view>
<view class="dh" wx:if="{{sforderid}}">
<text >顺丰速运</text>
:{{sforderid}}
<view class="btn" bindtap="getNum" wx:if="{{sforderid}}">复制</view>
</view>
<view class="mt" wx:if="{{orderid!='null' && orderid}}">
<!-- <text class="wuliuzx">物流咨询:</text>
<text class="wuliutel" bindtap="ddh">95338</text> -->
</view>
<view class="mt" wx:if="{{status==2}}">
<view class="mt" wx:if="{{!sforderid}}">
<text class="wuliuzx02">暂无运单信息</text>
</view>
</view>
......@@ -49,7 +47,7 @@
</view>
</view>
</block>
<view class="list" wx:if="{{orderid!='null' && orderid}}">
<view class="list" wx:if="{{orderid}}">
<image src="{{arr==''?'/images/yfh.png':'/images/yfh2.png'}}"></image>
<view class="list-zi">
<view class="ztsize" style="font-size:32rpx;">已发货</view>
......
......@@ -134,7 +134,7 @@ text{
.steps .list:first-child .list-zi::before{
position: absolute;
z-index: 100;
left: 0;
left:4rpx ;
top: 0;
margin-top: 30rpx;
content: "";
......
......@@ -110,7 +110,7 @@ Page({
that.data.requestStatus = true;
var data = {
page: page,
// unionid:'oHhp80QCN2WjClijvSyhkEFQcUwY',
// unionid:'oHhp80TKmeamBXcKWKjwM-NBrZ94',
unionid: wx.getStorageSync('data').unionid,
status: status
};
......
......@@ -59,7 +59,7 @@
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-ordernumber="{{item.ordernumber}}">
data-src="/packageA/logistics/logistics" data-ordernumber="{{item.ordernumber}}">
查看物流</view>
<view class="ljzf" wx:if="{{item.status==3}}" bindtap="confirmReceipt" data-num="{{item.ordernumber}}">确认收货
</view>
......
......@@ -154,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+1}}" data-img="{{item.drug_arr[0].picture}}"
data-src="/packageA/logistics/logistics" data-num="{{item.express_order}}" data-com="{{item.com}}"
<view bindtap="goLogistics" data-img="{{item.drug_arr[0].picture}}"
data-src="/packageA/logistics/logistics"
data-ordernumber="{{item.ordernumber}}">查看物流
</view> -->
<!-- </view> -->
\ No newline at end of file
</view>
</view>
\ No newline at end of file
......@@ -45,15 +45,15 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.getReportList();
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
// /**
// * 页面上拉触底事件的处理函数
// */
// onReachBottom: function () {
},
// },
/**
* 量表续答
* @param {*} e
......@@ -181,6 +181,7 @@ Page({
isShow: true,
})
}
wx.stopPullDownRefresh();
})
},
/**
......
......@@ -77,6 +77,10 @@ Page({
}
}, 500);
},
onTabItemTap(item) {
// tab 点击时执行
console.log("item",item)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
......
......@@ -10,17 +10,42 @@
<text wx:else>{{item.con}}</text>
</view>
<block wx:for="{{item.answer}}" wx:for-item="itemName" wx:for-index="index1" wx:key="*this">
<view class=" answer {{active == index1?'s-active':''}}" hidden="{{(pizibao&& current+1==1)||(pizibao&& current+1==3)||(pizibao&& current+1==4) || (pizibao1&& current+1==10) || (pizibao1&& current+1==11)}}" bindtap='selectData' data-index="{{index1}}"
data-answer="{{itemName}}" data-score="{{item.score[index1]}}" data-record="{{current}}">
<block wx:if="{{!multipleChoice}}">
<view class=" answer {{active == index1?'s-active':''}}"
hidden="{{(pizibao&& current+1==1)||(pizibao&& current+1==3)||(pizibao&& current+1==4) || (pizibao1&& current+1==10) || (pizibao1&& current+1==11)}}"
bindtap='selectData' data-index="{{index1}}" data-answer="{{itemName}}" data-score="{{item.score[index1]}}"
data-record="{{current}}">
<text>{{itemName}}</text>
</view>
<!--社会支持评定 -->
<view class="shehui {{((pizibao1&& current+1==10) || (pizibao1&& current+1==11))?'show':'hid'}}">
<view class=" answer1 {{active == index1?'s-active':''}} " bindtap='selectData' data-index="{{index1}}" data-answer="{{itemName}}" data-score="{{item.score[index1]}}" data-record="{{current}}" style="border-left:{{index1%2==0?'none':'0.5px solid #e3e3e3'}};">
<view class=" answer1 {{active == index1?'s-active':''}} " bindtap='selectData' data-index="{{index1}}"
data-answer="{{itemName}}" data-score="{{item.score[index1]}}" data-record="{{current}}"
style="border-left:{{index1%2==0?'none':'0.5px solid #e3e3e3'}};">
<text>{{itemName}}</text>
</view>
</view>
</block>
<!-- 惰性性攻击的动态评价 -->
<block wx:else>
<block wx:if='{{current == 8 || current == 9 || current == 10}}'>
<view class=" answer {{item.check[index1] == 1?'s-active':''}}"
hidden="{{(pizibao&& current+1==1)||(pizibao&& current+1==3)||(pizibao&& current+1==4) ||(pizibao1&& current+1==56)||(pizibao1&& current+1==58)||(pizibao1&& current+1==59)|| (shzcpd&& current+1==10) || (shzcpd&& current+1==11)}}"
data-index="{{index1}}" data-answer="{{itemName}}" data-score="{{item.score[index1]}}"
data-record="{{current}}" bindtap='selectData' data-btnflag='1'>
<text>{{itemName}}</text>
</view>
</block>
<block wx:else>
<view class=" answer {{active == index1?'s-active':''}}"
hidden="{{(pizibao&& current+1==1)||(pizibao&& current+1==3)||(pizibao&& current+1==4) || (pizibao1&& current+1==56)||(pizibao1&& current+1==58)||(pizibao1&& current+1==59)||(shzcpd&& current+1==10) || (shzcpd&& current+1==11)}}"
data-index="{{index1}}" data-answer="{{itemName}}" data-score="{{item.score[index1]}}"
data-record="{{current}}" bindtap='selectData' data-btnflag='0'>
<text>{{itemName}}</text>
</view>
</block>
</block>
</block>
<!--匹兹堡睡眠质量 -->
<view class="pizibao {{(pizibao&& current+1==1)||(pizibao&& current+1==3)||(pizibao&& current+1==4)?'show':'hid'}}">
<block wx:if="{{current+1==1}}">
......@@ -58,15 +83,33 @@
</block>
</view>
</view>
<view class="btn {{current<all-1?'show':'hid'}}">
<block wx:if='{{!multipleChoice}}'>
<view class="btn {{current<all-1?'show':'hid'}}">
<view class="menuebtn1 {{current>0?'menuebtn-active':''}}" bindtap='prev'>上一题</view>
</view>
<view class="btn {{all==current+1?'show':'hid'}}">
</view>
<view class="btn {{all==current+1?'show':'hid'}}">
<view class="menuebtn {{current>0?'menuebtn-active':''}}" bindtap='prev'>上一题</view>
<view class="menuebtn {{disab?'show':'hid'}} " style='margin-left:40rpx;'>提交</view>
<view class="menuebtn menuebtn-active {{disab?'hid':'show'}} " style='margin-left:40rpx;' wx:if='{{sc}}' bindtap='tijiao'>提交</view>
<view class="menuebtn menuebtn-active {{disab?'hid':'show'}} " style='margin-left:40rpx; background: #999;' wx:if='{{!sc}}'>上传中</view>
</view>
<view class="menuebtn menuebtn-active {{disab?'hid':'show'}} " style='margin-left:40rpx;' wx:if='{{sc}}'
bindtap='tijiao'>提交</view>
<view class="menuebtn menuebtn-active {{disab?'hid':'show'}} " style='margin-left:40rpx; background: #999;'
wx:if='{{!sc}}'>上传中</view>
</view>
</block>
<block wx:else>
<view class="btn {{current<all?'show':'hid'}}">
<view wx:if="{{!canvas}}" class="menuebtn {{current>0?'menuebtn-active':''}}" bindtap='prev'>上一题</view>
<view class="menuebtn" wx:if='{{!nextFalg[current]}}' style='margin-left:40rpx;' data-cur='{{current}}'>
下一题</view>
<view class="menuebtn menuebtn-active" wx:elif='{{nextFalg[current] && current+1 < all }}'
style='margin-left:40rpx;' bindtap='next' data-cur='{{current}}'>下一题</view>
<block wx:else>
<view class="menuebtn {{disab?'show':'hid'}} " style='margin-left:40rpx;'>提交</view>
<view class="menuebtn menuebtn-active {{disab?'hid':'show'}} " style='margin-left:40rpx;' bindtap='tijiao'>提交
</view>
</block>
</view>
</block>
<view class='all-item'>
<text>{{current+1}}/{{all}}</text>
</view>
\ No newline at end of file
......@@ -68,6 +68,7 @@ Page({
}
},
onPullDownRefresh: function () {
console.log("onPullDownRefresh")
var that = this
that.getDoctorIndex();
that.resultNot(that.data.userInfo.openid)
......
......@@ -6,7 +6,7 @@ Page({
reportRedD: false, //报告红点展示
reportRedNum: 0, //未作报告数量
disabled: true, //防止重复点击
version: '3.2.0',
version: '3.2.2',
isShow: false,
showClose: true,
},
......
......@@ -37,7 +37,7 @@
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.12.2",
"libVersion": "2.13.0",
"appid": "wxd418ee346d79d382",
"projectname": "XDJK-master",
"scripts": {
......
......@@ -13,7 +13,8 @@ const HOST = 'https://www.xiaodongai.com/xiaodongai/kongtian/';
// 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 = "https://online-cjob.xiaodongai.com/index.php/order/" //订单中心 生产
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/'; // 弃用
......@@ -38,7 +39,8 @@ const url = {
* begin
* 订单中心
*/
getOrdersAddress:orders+"order_address/getOneByOrderNumber",//获取订单地址
getOrdersAddress:orders+"order_address/getOneByOrderNumber",//获取订单收货地址
getLogisticsNumber:orders+"order_logistics/getOneByOrderNumber",//获取订单物流编号
/**
* end
*/
......@@ -165,5 +167,4 @@ module.exports = {
HOST_yiyuan : HOST_yiyuan,
HOST_xinli : HOST_xinli,
HOST_xinli_lb : HOST_xinli_lb,
}
\ No newline at end of file
......@@ -50,7 +50,7 @@ function getUserData(openid) {
let getUserDataUrl = config.url.getUserData;
let data = {};
data.openid = openid;
// data.openid='oYQX40HkqeZ36Kuq9M8APvwzizzc'
// data.openid='oYQX40AHxKlrHu_fVDrp4u486tsY'
return wxRequest.postRequest(getUserDataUrl, data);
};
/**
......@@ -647,7 +647,10 @@ function getOrdersAddress(param){
var getOrdersAddressUrl = config.url.getOrdersAddress;
return wxRequest.postRequest(getOrdersAddressUrl, param)
}
function getLogisticsNumber(param){
var getLogisticsNumberUrl=config.url.getLogisticsNumber;
return wxRequest.postRequest(getLogisticsNumberUrl,param)
}
function getBusStopListPromise(sid, stopType) {
var getStopListUrl = config.url.getBusStopList;
var data = {
......@@ -751,5 +754,6 @@ module.exports = {
getNormalProduct: getNormalProduct, //正常购买推荐产品
getQuickProduct: getQuickProduct, //快速购买推荐产品
productPay: productPay, //推荐产品支付
getOrdersAddress:getOrdersAddress,//获取订单地址
getOrdersAddress:getOrdersAddress,//获取订单收货地址
getLogisticsNumber:getLogisticsNumber,//获取物流单号
}
\ No newline at end of file
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 to comment