Commit 4ae2d4e3 by liuquan

Merge branch 'liuquan' of http://git.xiaodongai.com/WechatMiniProgram/XDJK into test

parents e67a3ba6 0dbc29c1
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
"patientList/patientList", "patientList/patientList",
"chattingRecords/chattingRecords", "chattingRecords/chattingRecords",
"beBeingService/beBeingService", "beBeingService/beBeingService",
"productOrderInfo/productOrderInfo" "productOrderInfo/productOrderInfo",
"productOrderDetail/productOrderDetail",
"productOrder/productOrder"
] ]
}, },
{ {
......
...@@ -1647,7 +1647,7 @@ Page({ ...@@ -1647,7 +1647,7 @@ Page({
patient_unionid: wx.getStorageSync('data').unionid, patient_unionid: wx.getStorageSync('data').unionid,
isquick: item.isQuick isquick: item.isQuick
} }
Service.getPayStatus(data).then((res) => { Service.getPayStatusA(data).then((res) => {
if (res.code == 1) { if (res.code == 1) {
wx.navigateTo({ wx.navigateTo({
url: '/packageA/drugOrder/drugOrder' url: '/packageA/drugOrder/drugOrder'
...@@ -1666,6 +1666,54 @@ Page({ ...@@ -1666,6 +1666,54 @@ Page({
} }
}) })
}, 1000, true), }, 1000, true),
/**
* 购买产品 buyProduct()
* isQuick 开药方式0-正常开药,1-二维码,2-快速开药
* name 姓名
* title 职称 住院医生
* work_unit 工作单位 小懂
* img 医生头像
* diagnosis 诊断 抑郁
* prescription 药方ID
* type 0-处方药,1-保健品
* payid 支付ID
*/
buyProduct: Util.debouce(function (e) {
wx.showLoading({
title:'加载中',
mask:true
});
let that = this;
let item = e.currentTarget.dataset.item;
// isQuick 购买方式 0-正常购买,1-二维码购买,2-快速购买
let id = item.isQuick == 0 ? item.payid : item.quickid;
let data = {
prescription: item.prescription,
patient_unionid: wx.getStorageSync('data').unionid,
isquick: item.isQuick
}
Service.getPayStatusB(data).then((res) => {
if (res.code == 1) {
wx.navigateTo({
url: '/packageA/drugOrder/drugOrder'
})
wx.hideLoading();
} else if (res.code == -1) {
wx.navigateTo({
url: '/packageA/productOrderInfo/productOrderInfo?scene=' + id + '&isQuick=' + item.isQuick + '&orderId=' + this.data.orderId + '&groupID=' + that.data.groupID,
success: function() {
wx.hideLoading();
}
})
} else {
wx.hideLoading();
that.setData({
errorToptips: res.msg
})
}
})
}, 1000, true),
//客服电话 //客服电话
dial(e) { dial(e) {
let tel = e.currentTarget.dataset.tel; let tel = e.currentTarget.dataset.tel;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<text>服务类型:{{serviceName}}</text> <text>服务类型:{{serviceName}}</text>
<text></text> <text></text>
<!-- <text>({{doctortitle}})</text> --> <!-- <text>({{doctortitle}})</text> -->
<text wx:if='{{end_time!=""&&end_time!=null&&!status}}'>服务时间:<text>{{end_time}}</text></text> <text wx:if='{{end_time!=""&&end_time!=null&&!status}}'>结束时间:<text>{{end_time}}</text></text>
<text wx:if='{{end_time!=""&&end_time!=null&&status}}'>服务状态:<text style="color:#2684ff">{{end_time}}</text></text> <text wx:if='{{end_time!=""&&end_time!=null&&status}}'>服务状态:<text style="color:#2684ff">{{end_time}}</text></text>
<text wx:if='{{end_time==""||end_time==null}}'>擅长:{{doctorgoodat}}</text> <text wx:if='{{end_time==""||end_time==null}}'>擅长:{{doctorgoodat}}</text>
<view> <view>
...@@ -216,6 +216,34 @@ ...@@ -216,6 +216,34 @@
</view> </view>
</view> </view>
</block> </block>
<!-- 推荐产品 -->
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="RecommendedProducts"}}'>
<view class='recipe'>
<view class="recipe-doctor">
<image class='head' src='{{doctorimage|| noSrc}}' binderror="binderrorimg" data-type="0"></image>
<view class="doctor-info">
<view><text class="doctor-name">{{item.payload.description.name}}</text><text
class="doctor-title">{{doctortitle}}</text></view>
<view class="doctor-unit">{{item.payload.description.work_unit}}</view>
</view>
</view>
<view class="Report-text" >
医生为您开具了一个推荐产品,您可根据自身情况自由选择是否购买。</view>
<view class="scale">
<view class="scale-title">推荐产品:</view>
<view>
<block wx:for="{{item.payload.description.drug}}" wx:for-item="drugitem" wx:key='index'>
<!-- <view class="scale-item"><view>{{drugitem}}</view><view wx:if="{{item.payload.description.norms[index]}}">{{item.payload.description.norms[index]}}</view> </view> -->
<view class="scale-item">{{drugitem}}</view>
</block>
</view>
</view>
<view class="btn-view">
<!-- <view class="msg_btn" bindtap="viewRecipe" data-item="{{item.payload.description}}">查看推荐</view> -->
<view class="msg_btn1" bindtap="buyProduct" data-item="{{item.payload.description}}">购买产品</view>
</view>
</view>
</block>
<!-- 处方 --> <!-- 处方 -->
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="Prescription"}}'> <block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="Prescription"}}'>
<view class='recipe'> <view class='recipe'>
......
...@@ -60,13 +60,13 @@ ...@@ -60,13 +60,13 @@
<view class='left' wx:if="{{item.flow=='in'}}" id='d{{index}}'> <view class='left' wx:if="{{item.flow=='in'}}" id='d{{index}}'>
<image class='head' src='{{doctorimage || noSrc}}'></image> <image class='head' src='{{doctorimage || noSrc}}'></image>
<view class='info-img' bindtap='previewImage' data-src='{{item.msg_content.originalPicture}}'> <view class='info-img' bindtap='previewImage' data-src='{{item.msg_content.originalPicture}}'>
<image src='{{item.msg_content.originalPicture}}' data-index="{{index}}" lazy-load="{{true}}" mode="widthFix"></image> <image src='{{item.msg_content.originalPicture}}' data-index="{{index}}" lazy-load mode="widthFix"></image>
</view> </view>
</view> </view>
<view class='right' wx:if="{{item.flow=='out'}}" id='d{{index}}'> <view class='right' wx:if="{{item.flow=='out'}}" id='d{{index}}'>
<image class='head' src='{{avatarUrl|| noSrc}}'></image> <image class='head' src='{{avatarUrl|| noSrc}}'></image>
<view class='info-img' bindtap='previewImage' data-src='{{item.msg_content.originalPicture}}'> <view class='info-img' bindtap='previewImage' data-src='{{item.msg_content.originalPicture}}'>
<image src='{{item.msg_content.originalPicture}}' data-index="{{index}}" lazy-load="{{true}}" mode="widthFix"></image> <image src='{{item.msg_content.originalPicture}}' data-index="{{index}}" lazy-load mode="widthFix"></image>
</view> </view>
</view> </view>
</block> </block>
......
const Service = require('../../utils/service.js'); const Service = require('../../utils/service.js');
const { debouce } = require('../../utils/util.js'); //防抖函数 const {
debouce
} = require('../../utils/util.js'); //防抖函数
const Util = require('../../utils/util.js'); const Util = require('../../utils/util.js');
Page({ Page({
...@@ -13,8 +15,12 @@ Page({ ...@@ -13,8 +15,12 @@ Page({
winH: null, winH: null,
}, },
showview: false, showview: false,
success: true,
list: [], list: [],
page: 1 page: 1,
productPage: 0,
total: 0,
requestStatus: false, //请求状态
}, },
/** /**
...@@ -38,7 +44,10 @@ Page({ ...@@ -38,7 +44,10 @@ Page({
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
var that = this var that = this
//重置
that.data.page = 1; that.data.page = 1;
that.data.productPage = 0;
that.data.total = 0;
wx.showNavigationBarLoading() //在标题栏中显示加载 wx.showNavigationBarLoading() //在标题栏中显示加载
setTimeout(function () { setTimeout(function () {
that.getList(1, that.data.nav) that.getList(1, that.data.nav)
...@@ -51,13 +60,15 @@ Page({ ...@@ -51,13 +60,15 @@ Page({
*/ */
onReachBottom: function () { onReachBottom: function () {
var that = this var that = this
var page = that.data.page + 1; if (that.data.success) {
that.setData({ var page = that.data.page + 1;
scrollFlag: true, that.setData({
success: false, scrollFlag: true,
page: page success: false,
}) page: page
that.getList(page, that.data.nav) })
that.getList(page, that.data.nav);
}
}, },
//删除订单 //删除订单
deleBtn: debouce(function (e) { deleBtn: debouce(function (e) {
...@@ -89,19 +100,29 @@ Page({ ...@@ -89,19 +100,29 @@ Page({
//获取列表 //获取列表
getList: function (page, status) { getList: function (page, status) {
var that = this var that = this
that.data.requestStatus = true;
var data = { var data = {
page: page, page: page,
// unionid:'oHhp80QCN2WjClijvSyhkEFQcUwY', // unionid:'oHhp80QCN2WjClijvSyhkEFQcUwY',
unionid: wx.getStorageSync('data').unionid, unionid: wx.getStorageSync('data').unionid,
status: status status: status
}; };
Service.buyDrugList(data).then((res) => { that.buyDrugList(data);
console.log("res", res) },
var list = that.data.list; /**
* 药品列表
* @param {*} param
*/
buyDrugList(param) {
let that = this;
let newList = that.data.list;
let page = param.page;
Service.buyDrugList(param).then((res) => {
if (page > 1 && res.data.length > 0) { if (page > 1 && res.data.length > 0) {
for (let i = 0; i < res.data.length; i++) { newList = newList.concat(res.data);
list.push(res.data[i]) // for (let i = 0; i < res.data.length; i++) {
} // list.push(res.data[i])
// }
that.setData({ that.setData({
success: true success: true
}) })
...@@ -116,19 +137,25 @@ Page({ ...@@ -116,19 +137,25 @@ Page({
}) })
}, 2000) }, 2000)
} else { } else {
list = res.data; // newList = res.data;
newList = newList.concat(res.data);
} }
wx.stopPullDownRefresh() wx.stopPullDownRefresh()
if (list.length > 0) {
if (newList.length > 0) {
that.setData({ that.setData({
list: list, list: newList,
showview: true showview: true,
requestStatus: false,
}) })
wx.hideLoading();
} else { } else {
that.setData({ that.setData({
list: [], list: [],
showview: true showview: true,
requestStatus: false,
}) })
wx.hideLoading();
} }
}).catch(function (Error) { }).catch(function (Error) {
console.warn('error:', Error); // 获取会话资料失败的相关信息 console.warn('error:', Error); // 获取会话资料失败的相关信息
...@@ -137,10 +164,20 @@ Page({ ...@@ -137,10 +164,20 @@ Page({
//选择topTab页 //选择topTab页
nav: function (e) { nav: function (e) {
let _this = this let _this = this
// wx.showLoading({
// title: '加载中',
// mask:true
// })
if (_this.data.requestStatus) {
return;
}
_this.setData({ _this.setData({
nav: e.currentTarget.dataset.index, nav: e.currentTarget.dataset.index,
page: 1, page: 1,
showview: false total: 0,
productPage: 0,
showview: false,
list: []
}) })
_this.getList(1, e.currentTarget.dataset.index) _this.getList(1, e.currentTarget.dataset.index)
}, },
...@@ -176,7 +213,7 @@ Page({ ...@@ -176,7 +213,7 @@ Page({
// }) // })
// }, // },
/** /**
*修改地址-待发货2 * 修改地址-待发货2
*/ */
editAddress: debouce(function (e) { editAddress: debouce(function (e) {
Service.isEditAddress({ Service.isEditAddress({
...@@ -214,12 +251,14 @@ Page({ ...@@ -214,12 +251,14 @@ Page({
*/ */
goPay: debouce(function (e) { goPay: debouce(function (e) {
let that = this; let that = this;
let orderClass = e.currentTarget.dataset.class;
console.log("orderClass", orderClass);
let data = { let data = {
prescription: e.currentTarget.dataset.id, prescription: e.currentTarget.dataset.id,
patient_unionid: wx.getStorageSync('data').unionid, patient_unionid: wx.getStorageSync('data').unionid,
isquick: e.currentTarget.dataset.isquick isquick: e.currentTarget.dataset.isquick
} }
Service.getPayStatus(data).then((res) => { Service.getPayStatusA(data).then((res) => {
if (res.code == 1) { if (res.code == 1) {
that.onShow(); that.onShow();
} else if (res.code == -1) { } else if (res.code == -1) {
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
</view> </view>
<view wx:else> <view wx:else>
<block wx:for="{{list}}" wx:key="key"> <block wx:for="{{list}}" wx:key="key">
<!-- 药品 -->
<view class="dingdan"> <view class="dingdan">
<block> <block>
<view class="num flex"> <view class="num flex">
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<text wx:if="{{com=='zhongtong'}}">中通快递</text> <text wx:if="{{com=='zhongtong'}}">中通快递</text>
<text wx:if="{{com=='yundakuaiyun'}}">韵达快运</text> <text wx:if="{{com=='yundakuaiyun'}}">韵达快运</text>
:{{orderid}} :{{orderid}}
<view class="btn" wx:if='{{orderid}}' bindtap="getNum" wx:if="{{orderid!='null' && orderid}}">复制</view> <view class="btn" bindtap="getNum" wx:if="{{orderid!='null' && orderid}}">复制</view>
</view> </view>
<view class="mt" wx:if="{{orderid!='null' && orderid}}"> <view class="mt" wx:if="{{orderid!='null' && orderid}}">
<!-- <text class="wuliuzx">物流咨询:</text> <!-- <text class="wuliuzx">物流咨询:</text>
......
...@@ -119,7 +119,7 @@ text{ ...@@ -119,7 +119,7 @@ text{
} }
.list-zi::before{ .list-zi::before{
position: absolute; position: absolute;
left: 0; left: 4rpx;
top: 0; top: 0;
margin-top: 30rpx; margin-top: 30rpx;
content: ""; content: "";
...@@ -152,7 +152,7 @@ text{ ...@@ -152,7 +152,7 @@ text{
background: #D9D9D9; background: #D9D9D9;
position: absolute; position: absolute;
left: 0; left: 0;
margin-left: 6rpx; margin-left: 10rpx;
margin-top: 60rpx; margin-top: 60rpx;
} }
.steps .list:last-child::after{ .steps .list:last-child::after{
...@@ -182,7 +182,7 @@ text{ ...@@ -182,7 +182,7 @@ text{
background: #D9D9D9; background: #D9D9D9;
position: absolute; position: absolute;
left: 0; left: 0;
margin-left: 6rpx; margin-left: 10rpx;
} }
.list:first-child>.list-zi>.name{ .list:first-child>.list-zi>.name{
......
const Service = require('../../utils/service.js');
const {
debouce
} = require('../../utils/util.js'); //防抖函数
const Util = require('../../utils/util.js');
Page({
/**
* 页面的初始数据
*/
data: {
nav: 0,
status: '',
noRecord: {
winH: null,
},
showview: false,
success: true,
list: [],
page: 1,
productPage: 0,
total: 0,
requestStatus: false, //请求状态
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this
if (!Util.isEmpty(options.status)) {
that.setData({
status: options.status,
nav: options.status
})
}
},
onShow: function () {
var that = this
that.getList(1, that.data.nav)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
var that = this
//重置
that.data.page = 1;
that.data.productPage = 0;
that.data.total = 0;
wx.showNavigationBarLoading() //在标题栏中显示加载
setTimeout(function () {
that.getList(1, that.data.nav)
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
}, 1500);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
var that = this
if (that.data.success) {
var page = that.data.page + 1;
that.setData({
scrollFlag: true,
success: false,
page: page
})
that.getList(page, that.data.nav);
}
},
//删除订单
deleBtn: debouce(function (e) {
var that = this
wx.showModal({
content: '是否确认删除订单',
success(res) {
if (res.confirm) {
let data = {
unionid: wx.getStorageSync("data").unionid,
ordernumber: e.currentTarget.dataset.ordernumber
};
Service.delBuyDrug(data).then((res) => {
if (res.code == 1) {
wx.showToast({
title: '删除成功',
icon: 'success',
mask: true
})
that.getList(1, that.data.nav)
}
}).catch((Error) => {
console.warn('error:', Error); // 获取会话资料失败的相关信息
});
}
}
})
}, 1000, true),
//获取列表
getList: function (page, status) {
var that = this
that.data.requestStatus = true;
var data = {
page: page,
// unionid:'oHhp80QCN2WjClijvSyhkEFQcUwY',
unionid: wx.getStorageSync('data').unionid,
status: status
};
that.buyProductList(data);
},
/**
* 推荐产品列表
* @param {*} param
*/
buyProductList(param) {
let that = this;
let newList = that.data.list;
let page = param.page;
Service.buyProductList(param).then(res => {
console.log("list",res)
if (res.data.list.length > 0 && res.data.list.length < 10) {
that.data.productPage = param.page;
}
if (page > 1 && res.data.list.length > 0) {
console.log("newList", res.data.list)
newList = newList.concat(res.data.list);
that.setData({
success: true
})
} else if (page > 1 && res.data.list.length == 0) {
that.setData({
scrollFlag: false,
scrollFlag1: true,
})
setTimeout(function () {
that.setData({
success: true
})
}, 2000)
} else {
newList = res.data.list;
}
wx.stopPullDownRefresh()
if (newList.length > 0) {
that.setData({
list: newList,
showview: true,
requestStatus: false,
})
wx.hideLoading();
} else {
that.setData({
list: [],
showview: true,
requestStatus: false,
})
}
}).catch(function (Error) {
console.warn('error:', Error); // 获取会话资料失败的相关信息
});
},
//选择topTab页
nav: function (e) {
let _this = this
// wx.showLoading({
// title: '加载中',
// mask:true
// })
if (_this.data.requestStatus) {
return;
}
_this.setData({
nav: e.currentTarget.dataset.index,
page: 1,
total: 0,
productPage: 0,
showview: false,
list: []
})
_this.getList(1, e.currentTarget.dataset.index)
},
//确认收货
confirmReceipt: debouce(function (e) {
let that = this
let data = {
unionid: wx.getStorageSync('data').unionid,
ordernumber: e.currentTarget.dataset.num
}
wx.showModal({
content: '确认收货',
success(ress) {
if (ress.confirm) {
Service.confirmReceipt(data).then((res) => {
console.log("confirmReceipt", res)
wx.showToast({
title: res.msg,
})
that.getList(1, 3)
})
} else if (ress.cancel) {
console.log('用户点击取消')
}
}
})
}, 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
*/
editAddress: debouce(function (e) {
Service.isEditAddress({
ordernumber: e.currentTarget.dataset.ordernumber
}).then((res) => {
if (res.code == 1) {
wx.navigateTo({
url: '/packageA/addsite/addsite?item=' + JSON.stringify(e.currentTarget.dataset.address) + '&ordernumber=' + e.currentTarget.dataset.ordernumber + '&type=1',
})
} else {
wx.showToast({
title: res.msg,
icon: 'success',
mask: true
})
}
})
}, 1000, true),
/**
* 订单详情-待发货2,已发货3,已完成4
*/
goOrderDetail: debouce(function (e) {
wx.navigateTo({
url: '/packageA/productOrderDetail/productOrderDetail?id=' + e.currentTarget.dataset.id,
})
}, 1000, true),
//查看物流-待收货+已完成
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),
})
}, 1000, true),
/**
* 立即支付
*/
goPay: debouce(function (e) {
let that = this;
let orderClass = e.currentTarget.dataset.class;
console.log("orderClass", orderClass);
let data = {
prescription: e.currentTarget.dataset.yfid,
patient_unionid: wx.getStorageSync('data').unionid,
isquick: e.currentTarget.dataset.isquick
}
Service.getPayStatusB(data).then((res) => {
if (res.code == 1) {
that.onShow();
} else if (res.code == -1) {
wx.navigateTo({
url: '/packageA/productOrderInfo/productOrderInfo?scene=' + e.currentTarget.dataset.id + "&isQuick=" + e.currentTarget.dataset.isquick,
})
} else if (res.code == 2) {
wx.showToast({
title: res.msg,
icon: 'none'
})
}
})
}, 1000, true),
})
\ No newline at end of file
{
"navigationBarTitleText": "产品订单",
"enablePullDownRefresh": true,
"usingComponents": {
"answer":"/components/answer/answer"
}
}
\ No newline at end of file
<import src="../../common/common.wxml" />
<answer id='answer'></answer>
<view class="flex navs">
<view bindtap="nav" data-index="0" class="{{nav==0?'active':'size-colo'}}">全部订单</view>
<view bindtap="nav" data-index="1" class="{{nav==1?'active':'size-colo'}}">待付款</view>
<view bindtap="nav" data-index="2" class="{{nav==2?'active':'size-colo'}}">待发货</view>
<view bindtap="nav" data-index="3" class="{{nav==3?'active':'size-colo'}}">待收货</view>
<view bindtap="nav" data-index="4" class="{{nav==4?'active':'size-colo'}}">已完成</view>
</view>
<block wx:if="{{showview}}">
<view wx:if='{{list.length==0}}'>
<template is="noRecord" data="{{...noRecord}}" />
</view>
<view wx:else>
<block wx:for="{{list}}" wx:key="key">
<!-- 推荐产品 -->
<view class="dingdan">
<block>
<view class="num flex">
<text>订单编号:{{item.ordernumber}}</text>
<!-- <text wx-if="{{item.status==1}}">已退款</text> -->
<text wx-if="{{item.status==1}}">待付款</text>
<text wx-if="{{item.status==2}}">待发货</text>
<text wx-if="{{item.status==3}}">待收货</text>
<text wx-if="{{item.status==4}}">已完成</text>
<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">
<view class="list ">
<view class="list-item {{index+1<item.prescription.length?'list-line':''}}">
<view class="bor">
<image src="{{itemName.picture}}"></image>
</view>
<view class="xq">
<view class="name web-font">{{itemName.name}}</view>
<view class="dz">{{itemName.firm}}</view>
<view class="dz">{{itemName.norms}}</view>
<view class="jg">
<text>¥</text>
<text>{{itemName.drug_price}}</text>
</view>
</view>
<view class="list-num">x {{itemName.drug_num}}</view>
</view>
</view>
</block>
</block>
<view class="zj flex">
<text>共 {{item.total}} 件商品 实付款: </text>
<text class="red">¥{{item.money}}</text>
<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==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"
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="ljzf" wx:if="{{item.status==3}}" bindtap="confirmReceipt" data-num="{{item.ordernumber}}">确认收货
</view>
<view class="ljzf" wx:if="{{item.status==2||item.status==3 || item.status==4}}" bindtap="goOrderDetail"
data-id="{{item.id}}">订单详情</view>
<view class="ljzf" wx:if="{{item.status==1}}" bindtap="goPay" data-id="{{item.id}}" data-yfid="{{item.yfid}}"
data-isquick="{{item.modular}}">立即支付</view>
<view class="ljzf1" wx:if="{{item.status==5}}">订单过期</view>
<view class="ljzf1" wx:if="{{item.status==7}}">订单作废</view>
</view>
</view>
</view>
</block>
<view class="loading_box" wx:if='{{!success}}'>
<view class="loading1" wx:if='{{scrollFlag}}'>
<image src='/images/2.gif'></image>正在加载...
</view>
<view class="loading2" wx:if='{{scrollFlag1&&!scrollFlag}}'>没有更多了</view>
</view>
</view>
</block>
<block wx:else>
<template is="loading" data="{{...loading}}" />
</block>
<view class="hight"></view>
\ No newline at end of file
@import '../../common/common.wxss';
page{
background: #fff;
}
view{
line-height: 1;
}
text{
line-height: 1;
}
.wrap{
position: absolute;
width: 100%;
height: 100%;
background: #fff;
}
.flex{
display: flex;
}
.navs{
position: sticky;
z-index: 10000;
top: 0;
background: #fff;
padding: 30rpx 50rpx 0 50rpx;
justify-content: space-between;
}
.navs view{
font-size: 28rpx;
font-weight: 400;
}
.size-color{
color: #333;
}
.active{
font-weight: 700;
color: #2684FF;
border-bottom: 4rpx solid #2684FF;
padding-bottom: 29rpx;
}
.num{
border-top: 20rpx solid #F9F9F9;
justify-content: space-between;
padding-left: 30rpx;
padding-right: 30rpx;
padding-top: 39rpx;
padding-bottom: 38rpx;
font-weight: 300;
}
.num text:first-child{
font-weight: 300;
font-size: 26rpx;
color: #666666;
letter-spacing: 1rpx;
}
.num text:last-child{
font-weight: 700;
font-size: 26rpx;
color: #000000;
letter-spacing: 1rpx;
}
.dingdan{
background: #fff;
}
.list{
border-top: 1rpx solid #e7e7e7;
padding-right: 30rpx;
margin-left: 30rpx;
padding-top: 39rpx;
position: relative;
}
.list-item{
display: flex;
padding-bottom: 42rpx;
}
.list-line{
border-bottom: 2rpx solid #F5F8FB;
}
.list image{
width: 159rpx;
height: 159rpx;
}
.bor{
width: 161rpx;
height: 161rpx;
border: 1rpx solid #EBEBEB;
padding: 1rpx;
}
.xq{
margin-left: 20rpx;
width: 400rpx;
}
.name{
font-size: 32rpx;
color: #333;
font-weight: 600;
line-height: 45rpx;
letter-spacing: 1rpx;
}
.dz{
margin-top: 12rpx;
font-size: 24rpx;
color: #666666;
}
.jg{
color: #EC5B68;
margin-top: 15rpx;
}
.jg text:first-child{
font-size: 24rpx;
}
.jg text:last-child{
font-size: 32rpx;
font-weight: 700;
}
.list-num{
font-size: 28rpx;
font-weight: 500;
position: absolute;
right: 0;
top: 0;
margin-right: 30rpx;
margin-top: 10rpx;
}
.zj{
/* margin-top: 32rpx; */
margin-left: 30rpx;
height: 100rpx;
align-items: center;
justify-content: flex-end;
border-top: 1rpx solid #E7E7E7;
border-bottom: 1rpx solid #E7E7E7;
font-weight: 400;
padding-right: 30rpx;
}
.zj{
font-size: 26rpx;
}
.zj>text:first-child{
color: #000000;
}
.zj>text:last-child{
color: #000000;
}
.red{
color: #EC5B68;
}
.dele{
margin-left: 30rpx;
justify-content: flex-end;
align-items: center;
}
.delebtn{
width: 130rpx;
height: 64rpx;
display: flex;
align-items: center;
margin-left: 20rpx;
border-radius: 5rpx;
font-size: 26rpx;
color: #666;
}
.btns{
font-size: 26rpx;
padding: 28rpx 30rpx 28rpx;
justify-content: flex-end;
width: 510rpx;
}
.btns view{
width: 146rpx;
height: 64rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 20rpx;
border-radius: 5rpx;
font-size: 26rpx;
}
.ckwl{
color: #000;
border: 1rpx solid #e7e7e7;
}
.ljzf{
color: #fff;
background: #2684FF;
}
.ljzf1{
color: #fff;
background: #ccc;
}
.hight{
width: 100%;
height: 100rpx;
}
\ No newline at end of file
// packageA/drugOrderDetail/drugOrderDetail.js
const Service = require('../../utils/service.js');
const Util = require('../../utils/util.js');
Page({
/**
* 页面的初始数据
*/
data: {
list: ["1"],
index: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that=this;
that.setData({
id:options.id,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that=this;
let param={
id:that.data.id
}
/**药品订单详情 drogOrderDetail()*/
Service.productOrderDetail(param).then((res)=>{
console.log("res",res)
let address={
id:res.data.address,
openid:wx.getStorageSync('data').openid,
unionid:wx.getStorageSync('data').unionid,
detail_address:res.data.detail_address,
name:res.data.name,
phone:res.data.phone,
province:res.data.province,
take_over:res.data.take_over,
area:res.data.area,
city:res.data.city,
}
if(res.code==200){
that.setData({
item:res.data,
list:res.data.drug_arr,
address:address
})
}
}).catch(Error=>{
console.warn('error:', Error); // 获取会话资料失败的相关信息
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/**复制 */
copy(e) {
let copy = e.currentTarget.dataset.c;
console.log("copy",copy)
wx.setClipboardData({
data: copy,
success: function (res) {
wx.getClipboardData({
success: function (res) {
wx.showToast({
title: '复制成功',
})
}
})
}
})
},
//客服电话
dial() {
let tel = "4001199218";
wx.makePhoneCall({
phoneNumber: tel,
})
},
/**打开常见问题 */
issue(e){
let that=this;
let index=e.currentTarget.dataset.index;
if(index==that.data.index){
index=0;
}
that.setData({
index:index
})
},
/**
*修改地址-待发货2
*/
editAddress:Util.debouce(function (e) {
Service.isEditAddress({
ordernumber: e.currentTarget.dataset.ordernumber
}).then((res) => {
if (res.code == 1) {
wx.navigateTo({
url: '/packageA/addsite/addsite?item=' +JSON.stringify(e.currentTarget.dataset.address)+'&ordernumber='+e.currentTarget.dataset.ordernumber,
})
}else{
wx.showToast({
title: res.msg,
icon: 'success',
mask: true
})
}
})
}, 1000, true),
/**
* 查看处方
* type 0 处方 1 用药建议
* @param {} e
*/
viewRecipe(e) {
let item = e.currentTarget.dataset.item;
wx.navigateTo({
url: '/packageA/recipeDetails/recipeDetails?id=' + item.id + '&type=0',
})
},
//查看物流-待收货+已完成
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),
})
},1000,true),
})
\ No newline at end of file
{
"navigationBarTitleText": "订单详情",
"usingComponents": {
"answer":"/components/answer/answer"
}
}
\ No newline at end of file
<!--packageA/drugOrderDetail/drugOrderDetail.wxml-->
<answer id='answer'></answer>
<view class="top">
<view class="top-title">
<image src="/images/yifukuan.png"></image>
<view>已付款</view>
</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>
</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> -->
</view>
<view class="br"></view>
<block wx:for="{{list}}" wx:key="index">
<view class="list">
<view class="list-item">
<view class="image">
<image src="{{item.picture}}"></image>
</view>
<view class="item-name">
<view class="name">{{item.name}}</view>
<view class="firm">{{item.firm}}</view>
<view class="norms">{{item.norms}}</view>
<view class="pirce">
<text>¥</text>
<text>{{item.price}}</text>
</view>
</view>
<view class="number">x {{item.num}}</view>
</view>
</view>
</block>
<view class="br"></view>
<view class="order">
<view class="row order-price">
<view>订单价格:</view>
<view>¥ {{item.drug_money}}</view>
</view>
<view class="row order-price">
<view>服务诊金:</view>
<view>¥ {{item.zj?item.zj:'0.00'}}</view>
</view>
<view class="row order-freight">
<view>运费:</view>
<view wx:if="{{item.freight}}">¥ {{item.freight}}</view>
<view wx:else >包邮</view>
</view>
<view class="actualPay">共{{item.drug_num}}件商品 实付款: <text style="color:#EC5B68;">¥{{item.money}}</text></view>
</view>
<view class="br"></view>
<view class="orderinfo">
<view class="ordertitle">订单详情</view>
<view class="row ordernumber">
<view>订单编号:<text style="color:#333;">{{item.ordernumber}}</text></view>
<view class="copy" bindtap="copy" data-c="{{item.ordernumber}}">复制订单</view>
</view>
<view>支付时间:{{item.create_time}}</view>
</view>
<view class="br"></view>
<!-- <view>
<view class="issue-top">常见问题</view>
<view class="issue-item">
<view class="issue-title row" bindtap="issue" data-index="1">1.关于发货时间以及物流配送<text
class="{{index==1?'cuIcon-fold':'cuIcon-unfold'}} lg text-gray"></text></view>
<view class="{{index==1?'issue-content':'hide'}}">
<view>①药品当天16点前支付药费,当天即可发货,下午19点后支付一般在第二天发货;</view>
<view>②快递采用顺丰配送, 1-3天即可到达。具体派送时间,请自行留意或联系派件员;</view>
<view>③您可以在“小懂健康”公众号【我的医生-药品订单】或 “小懂健康”小程序【我的-药品订单】查询物流信息;</view>
<view>④请确保预留的联系方式通话畅通,以免因派送失败耽误用药。</view>
<view>⑤由于库房存储原因,偶尔可能会拆单从不同库房发货,不增加您的运费。</view>
</view>
</view>
<view class="issue-item">
<view class="issue-title row" bindtap="issue" data-index="2">2.关于退换货<text
class="{{index==2?'cuIcon-fold':'cuIcon-unfold'}} lg text-gray"></text></view>
<view class="{{index==2?'issue-content':'hide'}}" wx:if="{{index=='2'}}">
<view>根据国家相关规定,药品属于特殊商品,一经售出(快递员揽收后),不得退换。请您仔细确认药品信息后再进行支付,如对药品有任何顾虑请您在药物配送前咨询客服或者处方医生。</view>
</view>
</view>
<view class="issue-item">
<view class="issue-title row" bindtap="issue" data-index="3">3.关于药品服用方法<text
class="{{index==3?'cuIcon-fold':'cuIcon-unfold'}} lg text-gray"></text></view>
<view class="{{index==3?'issue-content':'hide'}}" wx:if="{{index=='3'}}">
<view>支付药费后,可在“小懂健康”公众号【我的医生-我的处方】查询处方信息,遵医嘱服用。</view>
</view>
</view>
<view class="issue-item">
<view class="issue-title row" bindtap="issue" data-index="4">4.关于发票问题<text
class="{{index==4?'cuIcon-fold':'cuIcon-unfold'}} lg text-gray"></text></view>
<view class="{{index==4?'issue-content':'hide'}}">
<view>支付成功后,可在 “小懂健康”小程序【我的-开具发票】中,自行开具电子发票。</view>
</view>
</view>
<view class="issue-item">
<view class="issue-title row" bindtap="issue" data-index="5">5.关于下次如何快速找到医生<text
class="{{index==5?'cuIcon-fold':'cuIcon-unfold'}} lg text-gray"></text></view>
<view class="{{index==5?'issue-content':'hide'}}" wx:if="{{index=='5'}}">
<view>在您已经获得某个医生的服务后,为了方便下次能快速找到该医生,建议您关注“小懂健康”公众号, 在【我的医生】中联系医生。</view>
</view>
</view>
</view> -->
<view class="issue">
<view>有任何问题,与客服在线沟通,</view>
<view>如果回复不及时,可拨打</view>
<view>客服电话:<text style="color:#2684FF;" bindtap="dial">400-1199-218</text> 进行咨询。</view>
</view>
<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}}"
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
/* packageA/drugOrderDetail/drugOrderDetail.wxss */
@import '/components/icon.wxss';
page {
background: #fff;
padding-bottom: constant(safe-area-inset-bottom);
/*兼容 IOS<11.2*/
padding-bottom: env(safe-area-inset-bottom);
/*兼容 IOS>11.2*/
}
.top {
width: 750rpx;
height: 70rpx;
background: #626775;
color: #fff;
padding-top: 44rpx;
padding-bottom: 40rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.top-title {
margin-left: 30rpx;
height: 30rpx;
font-size: 28rpx;
font-weight: 700;
text-align: left;
display: flex;
flex-direction: row;
}
.top-title>image {
width: 28rpx;
height: 28rpx;
margin-right: 24rpx;
}
.top-title>view {
line-height: 26rpx;
}
.top-text {
margin-left: 83rpx;
height: 24rpx;
line-height: 24rpx;
font-size: 24rpx;
font-weight: 500;
text-align: left;
}
.logistics {
/* height: 76rpx; */
width: 690rpx;
padding: 32rpx 30rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
/* .logistics-left{
display: flex;
flex-direction: column;
justify-content: space-between;
} */
.logistics-right{
line-height: 76rpx;
}
.br {
width: 750rpx;
height: 20rpx;
background: #f5f8fb;
}
.logistics-title {
height: 36rpx;
font-size: 34rpx;
font-weight: 700;
text-align: left;
color: #212121;
line-height: 36rpx;
}
.logistics-text {
/* height: 25rpx; */
/* font-size: 26rpx; */
/* font-weight: 500; */
text-align: left;
color: #666666;
/* line-height: 26rpx; */
}
.addressInfo{
display: flex;
flex-direction: row;
background-color: #fff;
margin-top: 10rpx;
/* padding: 10rpx 30rpx 10rpx 30rpx; */
height: auto;
}
.address-icon{
line-height: 84rpx;
padding-right:20rpx;
}
.address_name,.address_call,.address_text{
line-height: 42rpx;
}
.address_call{
margin-left: 20rpx;
font-size: 28rpx;
}
.address_name{
font-size: 32rpx;
}
.address_text{
font-size: 25rpx;
color: #333333;
font-weight: 300;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.list {
padding: 0 30rpx;
}
.list-item {
display: flex;
width: 100%;
border-bottom: 2rpx solid #F5F8FB;
padding-bottom: 42rpx;
padding-top: 42rpx;
}
.list-item image {
width: 155rpx;
height: 155rpx;
}
.image {
padding: 2.5rpx;
border: 1rpx solid rgb(241, 241, 241);
}
.item-name {
display: flex;
flex-direction: column;
justify-content: space-between;
padding-left: 18rpx;
}
.name {
width: 455rpx;
font-size: 32rpx;
color: #333333;
font-weight: 600;
}
.firm {
font-size: 24rpx;
color: #666666;
}
.norms {
font-size: 24rpx;
color: #666666;
}
.pirce {
color: #EC5B68;
}
.pirce text:first-child {
font-size: 24rpx;
}
.pirce text:last-child {
font-size: 32rpx;
font-weight: 700;
}
.number {
display: flex;
margin-top: 5rpx;
font-size: 28rpx;
}
.order {
padding: 0 30rpx;
font-size: 28rpx;
font-weight: 500;
text-align: left;
color: #333333;
}
.row {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.actualPay {
/* border-top: 1rpx solid #e7e7e7; */
padding: 30rpx 0 26rpx 0;
text-align: right;
font-size: 26rpx;
}
.order-price {
height: 28rpx;
line-height: 28rpx;
margin-top: 30rpx;
}
.order-freight {
height: 28rpx;
line-height: 28rpx;
margin-top: 20rpx;
margin-bottom: 30rpx;
}
.orderinfo {
padding: 40rpx 30rpx;
width: 690rpx;
font-size: 28rpx;
font-weight: 500;
text-align: left;
color: #666666;
}
.ordertitle {
height: 34rpx;
font-size: 34rpx;
line-height: 34rpx;
font-weight: 700;
text-align: left;
color: #212121;
margin-bottom: 34rpx;
}
.ordernumber {
height: 48rpx;
line-height: 48rpx;
font-size: 28rpx;
margin-bottom: 14rpx;
}
.copy {
width: 120rpx;
height: 48rpx;
font-size: 22rpx;
text-align: center;
border: 1rpx solid #cecece;
color: #999;
}
.issue-top {
padding: 35rpx 30rpx;
border-bottom: 1rpx solid #e7e7e7;
}
.issue-item {
margin: 0 30rpx;
border-bottom: 1rpx solid #e7e7e7;
}
.issue-item:last-child {
border: 0 !important;
}
.issue-title {
padding: 30rpx 0;
height: 40rpx;
font-size: 28rpx;
font-weight: 700;
text-align: left;
color: #999999;
}
.hide {
display: none;
}
.issue-content {
padding: 0 30rpx 58rpx 30rpx;
width: 630rpx;
height: auto;
font-size: 28rpx;
font-weight: 500;
color: #666666;
line-height: 50rpx;
letter-spacing: 1rpx;
}
.issue-content>view {
text-align: justify;
}
.issue {
padding-top: 40rpx;
height: 250rpx;
width: 750rpx;
background: #f5f8fb;
font-size: 28rpx;
font-weight: 700;
text-align: center;
color: #999999;
line-height: 42rpx;
letter-spacing: 2rpx;
}
.bottom {
height: 100rpx;
width: 750rpx;
justify-content:flex-end !important;
}
.bottom>view{
margin:auto 0;
padding: 15rpx;
height: 22rpx;
line-height: 22rpx;
border: 1px solid #999999;
margin-right: 30rpx;
font-size: 22rpx;
color:#212121;
}
.bottom>view:last-child{
background:#2684ff;
color: #fff;
border:1rpx solid #2684ff;
}
\ No newline at end of file
...@@ -47,13 +47,16 @@ Page({ ...@@ -47,13 +47,16 @@ Page({
}) })
return; return;
} }
console.log("options", options)
that.data.options = options that.data.options = options
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
wx.showLoading({
title: '加载中',
mask: true
})
var that = this var that = this
that.login = that.selectComponent("#login"); that.login = that.selectComponent("#login");
that.modal = that.selectComponent("#modal"); that.modal = that.selectComponent("#modal");
...@@ -66,12 +69,13 @@ Page({ ...@@ -66,12 +69,13 @@ Page({
return Service.getUserData(res.openid) return Service.getUserData(res.openid)
}).then((res) => { }).then((res) => {
if (Util.isEmpty(res.unionid)) { if (Util.isEmpty(res.unionid)) {
wx.hideLoading();
that.login.showLogin(); that.login.showLogin();
} else { } else {
wx.setStorageSync('data', res) wx.setStorageSync('data', res)
if (that.data.options.isQuick == 0) { if (that.data.options.isQuick == 0) {
// 正常开药 // 正常开药
that.getPrescribe(that.data.options.scene, res.unionid) that.getNormal(that.data.options.scene, res.unionid)
} else { } else {
that.getQuick(that.data.options.scene, res.unionid) that.getQuick(that.data.options.scene, res.unionid)
} }
...@@ -82,14 +86,14 @@ Page({ ...@@ -82,14 +86,14 @@ Page({
} else { } else {
if (that.data.options.isQuick == 0) { if (that.data.options.isQuick == 0) {
// 正常开药 // 正常开药
that.getPrescribe(that.data.options.scene, wx.getStorageSync('data').unionid) that.getNormal(that.data.options.scene, wx.getStorageSync('data').unionid)
} else { } else {
that.getQuick(that.data.options.scene, wx.getStorageSync('data').unionid) that.getQuick(that.data.options.scene, wx.getStorageSync('data').unionid)
} }
} }
}, },
// 处方笺 // 正常下单
getPrescribe: function (id, patient_unionid) { getNormal: function (id, patient_unionid) {
let that = this let that = this
if (that.data.paySuccess) { if (that.data.paySuccess) {
return; return;
...@@ -97,7 +101,8 @@ Page({ ...@@ -97,7 +101,8 @@ Page({
let data = {}; let data = {};
data.prescription = id; data.prescription = id;
data.patient_unionid = patient_unionid; data.patient_unionid = patient_unionid;
Service.getRecipeDetails(data).then((res) => { console.log("getNormal", data)
Service.getNormalProduct(data).then((res) => {
console.log("getDetail", res); console.log("getDetail", res);
if (res.code == 2 || res.code == 3) { if (res.code == 2 || res.code == 3) {
wx.showModal({ wx.showModal({
...@@ -127,6 +132,7 @@ Page({ ...@@ -127,6 +132,7 @@ Page({
that.isChecked(res.data.healthcare); that.isChecked(res.data.healthcare);
} }
} }
wx.hideLoading();
}) })
}, },
// 快速开药 // 快速开药
...@@ -138,7 +144,7 @@ Page({ ...@@ -138,7 +144,7 @@ Page({
let data = {}; let data = {};
data.prescription = quickid; data.prescription = quickid;
data.patient_unionid = patient_unionid; data.patient_unionid = patient_unionid;
Service.getQuick(data).then((res) => { Service.getQuickProduct(data).then((res) => {
if (res.code == 2 || res.code == 3) { if (res.code == 2 || res.code == 3) {
wx.showModal({ wx.showModal({
content: res.msg, content: res.msg,
...@@ -167,6 +173,8 @@ Page({ ...@@ -167,6 +173,8 @@ Page({
that.isChecked(res.data.healthcare); that.isChecked(res.data.healthcare);
} }
} }
wx.hideLoading();
}) })
}, },
//如果有医生推荐药品加上选中状态 //如果有医生推荐药品加上选中状态
...@@ -341,31 +349,34 @@ Page({ ...@@ -341,31 +349,34 @@ Page({
title: '正在拉起支付', title: '正在拉起支付',
mask: true mask: true
}) })
that.prescriptionPay(); that.productPay();
} }
}, 1000, true), }, 1000, true),
prescriptionPay: function () { productPay: function () {
let that = this; let that = this;
let hstr = new Array(); /**
let healthcare = that.data.list.healthcare; * @todo 医生推荐 废弃
for (let i = 0; i < healthcare.length; i++) { */
if (healthcare[i].checked) { // let hstr = new Array();
hstr.push(healthcare[i].id); // let healthcare = that.data.list.healthcare;
} // for (let i = 0; i < healthcare.length; i++) {
} // if (healthcare[i].checked) {
// hstr.push(healthcare[i].id);
// }
// }
let data = { let data = {
payid: that.data.list.payid, id: that.data.options.scene,
patient_unionid: that.data.item.unionid, patient_unionid: that.data.item.unionid,
modular: that.data.list.modular, modular: that.data.list.modular,
lastid: that.data.item.id, lastid: that.data.item.id,
address: that.data.receiveAddress.id, address: that.data.receiveAddress.id,
isywlx: that.data.list.isywlx, // isywlx: that.data.list.isywlx,
money: that.data.list.money, // money: that.data.list.money,
hstr: hstr.toString(), // hstr: hstr.toString(),
isgd: 1, // isgd: 1,
// rise_need:that.data.isInvoice // rise_need:that.data.isInvoice
} }
Service.prescriptionPay(data).then((res) => { Service.productPay(data).then((res) => {
console.log('res1', res); console.log('res1', res);
switch (res.code) { switch (res.code) {
case 1: case 1:
...@@ -383,7 +394,7 @@ Page({ ...@@ -383,7 +394,7 @@ Page({
if (res.errMsg && res.errMsg == "requestPayment:ok") { if (res.errMsg && res.errMsg == "requestPayment:ok") {
console.log("requestPayment:ok") console.log("requestPayment:ok")
wx.reLaunch({ wx.reLaunch({
url: '/packageA/drugOrder/drugOrder' url: '/packageA/productOrder/productOrder'
}) })
that.data.paySuccess = true; that.data.paySuccess = true;
return; return;
...@@ -475,7 +486,7 @@ Page({ ...@@ -475,7 +486,7 @@ Page({
} }
}) })
}, },
/** /**
* *
*/ */
hideModal() { hideModal() {
......
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
<image class="more" src="/images/more.png"></image> <image class="more" src="/images/more.png"></image>
</view> </view>
</view> </view>
<view class="line" wx:if='{{list.prescription.length>0}}'> <view class="line" wx:if='{{list.healthcare.length>0}}'>
<text>推荐产品</text> <text>推荐产品</text>
</view> </view>
<block wx:for="{{list.prescription}}" wx:key="index"> <block wx:for="{{list.healthcare}}" wx:key="index">
<view class="list"> <view class="list">
<view class="list-item"> <view class="list-item">
<view class="image"> <view class="image">
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
</view> </view>
</view> </view>
</block> </block>
<view wx:if='{{list.healthcare.length>0}}' class="line"> <!-- <view wx:if='{{list.healthcare.length>0}}' class="line">
<text>医生推荐</text> <text>医生推荐</text>
</view> </view> -->
<block wx:for="{{list.healthcare}}" wx:key="index" wx:for-index="index"> <!-- <block wx:for="{{list.healthcare}}" wx:key="index" wx:for-index="index">
<view class="list"> <view class="list">
<checkbox data-index="{{index}}" checked="{{item.checked}}" bindtap="updataRadio" color='#1384ff' /> <checkbox data-index="{{index}}" checked="{{item.checked}}" bindtap="updataRadio" color='#1384ff' />
<view class="list-item1"> <view class="list-item1">
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<view class="number">x {{item.num}}</view> <view class="number">x {{item.num}}</view>
</view> </view>
</view> </view>
</block> </block> -->
<!-- 订单编号 --> <!-- 订单编号 -->
<view class="order-list"> <view class="order-list">
<!-- <view class="order-num"> <!-- <view class="order-num">
...@@ -88,11 +88,11 @@ ...@@ -88,11 +88,11 @@
<text>商品价格</text> <text>商品价格</text>
<view> <view>
<text style="color:#EC5B68; font-size: 28rpx;">¥ </text> <text style="color:#EC5B68; font-size: 28rpx;">¥ </text>
<text style="color:#EC5B68;font-weight: 700;font-size: 28rpx;">{{list.drug_money}}</text> <text style="color:#EC5B68;font-weight: 700;font-size: 28rpx;">{{list.money}}</text>
</view> </view>
</view> </view>
<view class="order-num"> <!-- <view class="order-num">
<text>服务诊金</text> <text>服务诊金</text>
<view> <view>
<text style="color:#999999;font-size: 28rpx;">¥ </text> <text style="color:#999999;font-size: 28rpx;">¥ </text>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<text style=" color:#999999; font-size: 28rpx;">¥ </text> <text style=" color:#999999; font-size: 28rpx;">¥ </text>
<text class="fonw-400" style="font-size: 28rpx;">{{list.freight}}</text> <text class="fonw-400" style="font-size: 28rpx;">{{list.freight}}</text>
</view> </view>
</view> </view> -->
<!-- <view class="order-num"> <!-- <view class="order-num">
<text>纸质发票</text> <text>纸质发票</text>
<radio-group class="radio-group" bindchange="radioChange"> <radio-group class="radio-group" bindchange="radioChange">
......
...@@ -9,13 +9,14 @@ Page({ ...@@ -9,13 +9,14 @@ Page({
iShow: 0, iShow: 0,
id: '', id: '',
needIdCard: 0, needIdCard: 0,
noIdCard: 0 //显示 noIdCard: 0, //显示
invalid:true
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
* @param {options.type} 进入途径1:购买服务,2:购买药物()身份证必填,3:医生列表 * @param {*} options.type 进入途径1:购买服务,2:购买药物()身份证必填,3:医生列表
* @param {options.iShow} type=2||3 有选中id * @param {*} options.iShow type=2||3 有选中id
* @param {options.item} type=2||3 有选中对象 * @param {*} options.item type=2||3 有选中对象
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log("options", options) console.log("options", options)
...@@ -41,7 +42,6 @@ Page({ ...@@ -41,7 +42,6 @@ Page({
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function () {
}, },
/** /**
...@@ -132,6 +132,9 @@ Page({ ...@@ -132,6 +132,9 @@ Page({
}); });
}, },
next:Util.debouce(function (e){ next:Util.debouce(function (e){
this.setData({
invalid:false
})
wx.showLoading({ wx.showLoading({
mask:true, mask:true,
title:'加载中' title:'加载中'
...@@ -142,6 +145,9 @@ Page({ ...@@ -142,6 +145,9 @@ Page({
content: "请选择或添加患者信息", content: "请选择或添加患者信息",
showCancel: false, showCancel: false,
}) })
this.setData({
invalid:true
})
wx.hideLoading(); wx.hideLoading();
return return
} else if (that.data.needIdCard == 1 && that.data.item.card == "") { } else if (that.data.needIdCard == 1 && that.data.item.card == "") {
...@@ -150,6 +156,9 @@ Page({ ...@@ -150,6 +156,9 @@ Page({
content: '请选择填写过身份证的患者', content: '请选择填写过身份证的患者',
showCancel: false, showCancel: false,
}) })
this.setData({
invalid:true
})
wx.hideLoading(); wx.hideLoading();
return; return;
} }
...@@ -160,9 +169,21 @@ Page({ ...@@ -160,9 +169,21 @@ Page({
item: that.data.item item: that.data.item
}) })
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1,
success: res => {
this.setData({
invalid:true
})
wx.hideLoading();
},
fail: fail => {
this.setData({
invalid:true
})
wx.hideLoading();
}
}) })
wx.hideLoading();
} else { } else {
var allData = wx.getStorageSync('data') var allData = wx.getStorageSync('data')
let data = { let data = {
...@@ -181,8 +202,19 @@ Page({ ...@@ -181,8 +202,19 @@ Page({
console.log("firendAfterRoom",res) console.log("firendAfterRoom",res)
wx.reLaunch({ wx.reLaunch({
url: '../chat/chat?t_unionid=' + that.data.t_unionid + '&groupID=' + res.chat_id, url: '../chat/chat?t_unionid=' + that.data.t_unionid + '&groupID=' + res.chat_id,
success: res => {
this.setData({
invalid:true
})
wx.hideLoading();
},
fail: fail => {
this.setData({
invalid:true
})
wx.hideLoading();
}
}) })
wx.hideLoading();
}) })
} }
},1000,true), },1000,true),
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="btn flex" style="height:{{iPhoneX?200:120}}rpx;"> <view class="flex {{invalid?'btn':'btn1'}}" style="height:{{iPhoneX?200:120}}rpx;">
<view class="flex" bindtap='next'>下一步</view> <view class="flex" wx:if="invalid" bindtap='next'>下一步</view>
<view class="flex" wx:else >下一步</view>
</view> </view>
\ No newline at end of file
...@@ -130,15 +130,7 @@ page{ ...@@ -130,15 +130,7 @@ page{
border: 2rpx solid #2684ff !important; border: 2rpx solid #2684ff !important;
background: rgba(94, 141, 252, 0.1) !important; background: rgba(94, 141, 252, 0.1) !important;
} }
.btn,.btn1{
.btn{
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
justify-content: center; justify-content: center;
...@@ -148,14 +140,19 @@ page{ ...@@ -148,14 +140,19 @@ page{
bottom: 0; bottom: 0;
background-color: #fff; background-color: #fff;
} }
.btn>view{ .btn>view,.btn1>view{
width: 690rpx; width: 690rpx;
height: 90rpx; height: 90rpx;
border-radius: 45rpx; border-radius: 45rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #fff; color: #fff;
background: #2684ff;
font-size: 34rpx; font-size: 34rpx;
font-weight: 600; font-weight: 600;
}
.btn>view{
background: #2684ff;
}
.btn1>view{
background: #999;
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<block wx:for="{{userReport.notDone}}" wx:for-item="item" wx:for-index="index" wx:key="index"> <block wx:for="{{userReport.notDone}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class='item' bindtap='getScale' data-item="{{item}}" data-num="{{index}}"> <view class='item' bindtap='getScale' data-item="{{item}}" data-num="{{index}}">
<view class='item-headimg'> <view class='item-headimg'>
<image src='{{item.headimgurl?item.headimgurl:userReport.logo}}'></image> <image lazy-load lazy-load-margin="0.5" src='{{item.headimgurl?item.headimgurl:userReport.logo}}'></image>
<view class='item-lb_num'>{{item.lb_num}}</view> <view class='item-lb_num'>{{item.lb_num}}</view>
</view> </view>
<view class='item-content'> <view class='item-content'>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<view style='position:relative;height:175rpx;width:750rpx;'> <view style='position:relative;height:175rpx;width:750rpx;'>
<view class='item' bindtap='checkReport' data-item="{{item}}" data-num="{{index}}" data-index="{{index}}" bindtouchstart="startHandle" bindtouchmove="moveHandle" bindtouchend="endHandle" style='position:absolute;left:{{item.left}}rpx;z-index:10;'> <view class='item' bindtap='checkReport' data-item="{{item}}" data-num="{{index}}" data-index="{{index}}" bindtouchstart="startHandle" bindtouchmove="moveHandle" bindtouchend="endHandle" style='position:absolute;left:{{item.left}}rpx;z-index:10;'>
<view class='item-headimg'> <view class='item-headimg'>
<image src='{{item.headimgurl?item.headimgurl:logo}}'></image> <image lazy-load lazy-load-margin="0.5" src='{{item.headimgurl?item.headimgurl:logo}}'></image>
</view> </view>
<view class='item-content'> <view class='item-content'>
<text class='item-name'>{{item.name}}</text> <text class='item-name'>{{item.name}}</text>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<view style='position:relative;height:214rpx;'> <view style='position:relative;height:214rpx;'>
<view class='item' bindtap='goChat' data-item='{{item}}' data-index="{{index}}"> <view class='item' bindtap='goChat' data-item='{{item}}' data-index="{{index}}">
<view class='photo'> <view class='photo'>
<image class='info-img' src='{{item.image || noSrc}}' mode="aspectFill" binderror="binderrorimg" data-errorIndex="{{index}}" ></image> <image class='info-img' src='{{item.image || noSrc}}' mode="aspectFill" lazy-load binderror="binderrorimg" data-errorIndex="{{index}}" ></image>
<view class='unread' wx:if='{{item.unreadCount>0}}'>{{item.unreadCount}}</view> <view class='unread' wx:if='{{item.unreadCount>0}}'>{{item.unreadCount}}</view>
</view> </view>
<view class='info' style="{{index == serviceList.length -1?'border-bottom: none':''}}"> <view class='info' style="{{index == serviceList.length -1?'border-bottom: none':''}}">
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</view> </view>
<block wx:for="{{list.lcxl}}" wx:key="index"> <block wx:for="{{list.lcxl}}" wx:key="index">
<view class="flex user" bindtap="doctorInfo" data-unionid="{{item.unionid}}" data-unitid="{{item.unitid}}"> <view class="flex user" bindtap="doctorInfo" data-unionid="{{item.unionid}}" data-unitid="{{item.unitid}}">
<image src="{{item.image}}" mode="aspectFill" binderror="binderrorimg" data-type="0" data-errorIndex="{{index}}"></image> <image src="{{item.image}}" mode="aspectFill" lazy-load binderror="binderrorimg" data-type="0" data-errorIndex="{{index}}"></image>
<view> <view>
<view> <view>
<text class="user-name">{{item.name}}</text> <text class="user-name">{{item.name}}</text>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
</view> </view>
<block wx:for="{{list.shxl}}" wx:for-item="item" wx:for-index="index" wx:key='index'> <block wx:for="{{list.shxl}}" wx:for-item="item" wx:for-index="index" wx:key='index'>
<view class="flex user" bindtap="doctorInfo" data-unitid="{{item.unitid}}" data-unionid="{{item.unionid}}"> <view class="flex user" bindtap="doctorInfo" data-unitid="{{item.unitid}}" data-unionid="{{item.unionid}}">
<image src="{{item.image}}" mode="aspectFill" binderror="binderrorimg" data-type="1" data-errorIndex="{{index}}"></image> <image src="{{item.image}}" mode="aspectFill" lazy-load binderror="binderrorimg" data-type="1" data-errorIndex="{{index}}"></image>
<view> <view>
<view> <view>
<text class="user-name">{{item.name}}</text> <text class="user-name">{{item.name}}</text>
......
...@@ -1284,8 +1284,8 @@ Page({ ...@@ -1284,8 +1284,8 @@ Page({
}, 500) }, 500)
} }
}) })
} else if (Number(that.data.lb_id) == 60) { } else if (that.data.lb_tz == '3') {
// 瑞文 // 瑞文高级和瑞文推理
wx.navigateTo({ wx.navigateTo({
url: '/pages/dati03/dati03', url: '/pages/dati03/dati03',
success: function () { success: function () {
......
...@@ -7,7 +7,7 @@ Page({ ...@@ -7,7 +7,7 @@ Page({
reportRedD: false, //报告红点展示 reportRedD: false, //报告红点展示
reportRedNum: 0, //未作报告数量 reportRedNum: 0, //未作报告数量
disabled:true,//防止重复点击 disabled:true,//防止重复点击
version:'3.1.6', version:'3.2.0',
isShow:false, isShow:false,
showClose:true, showClose:true,
}, },
......
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
<text>药品订单</text> <text>药品订单</text>
<image src='../../images/l@2x.png'></image> <image src='../../images/l@2x.png'></image>
</view> </view>
<view class='item' bindtap="goToURL" data-src="/packageA/productOrder/productOrder">
<text>产品列表</text>
<image src='../../images/l@2x.png'></image>
</view>
<view class='item' bindtap="goToURL" data-src="/packageA/patientList/patientList"> <view class='item' bindtap="goToURL" data-src="/packageA/patientList/patientList">
<text>患者信息</text><text class="memo">完善后医生更好的为您服务</text> <text>患者信息</text><text class="memo">完善后医生更好的为您服务</text>
<image src='../../images/l@2x.png'></image> <image src='../../images/l@2x.png'></image>
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<view class="{{filtrateSelect?'content':'content1'}}" wx:if='{{doctorList.length>0}}'> <view class="{{filtrateSelect?'content':'content1'}}" wx:if='{{doctorList.length>0}}'>
<block wx:for="{{doctorList}}" wx:for-index="index" wx:key="index"> <block wx:for="{{doctorList}}" wx:for-index="index" wx:key="index">
<view class="flex user" bindtap="doctorInfo" data-openid="{{item.openid}}" data-unitid="{{item.unitid}}" data-unionid="{{item.unionid}}"> <view class="flex user" bindtap="doctorInfo" data-openid="{{item.openid}}" data-unitid="{{item.unitid}}" data-unionid="{{item.unionid}}">
<image src="{{item.image}}" mode="aspectFill" binderror="binderrorimg" data-errorIndex="{{index}}"></image> <image src="{{item.image}}" lazy-load lazy-load-margin="0.5" mode="aspectFill" binderror="binderrorimg" data-errorIndex="{{index}}"></image>
<view class="xixui" wx:if="{{item.is_rest==1}}">休息中</view> <view class="xixui" wx:if="{{item.is_rest==1}}">休息中</view>
<view> <view>
<view> <view>
......
{
"setting": {},
"condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"id": 0,
"name": "pages/my/my",
"pathName": "pages/my/my",
"query": "",
"scene": 1011
},
{
"name": "packageA/myDoctor/myDoctor",
"pathName": "packageA/myDoctor/myDoctor",
"query": "type=1&id=oHhp80UTfudZVXcj4H2YOiFr8Jx8",
"scene": null
},
{
"name": "pages/info/info",
"pathName": "pages/info/info",
"query": "scene=32809",
"scene": null
},
{
"id": 3,
"name": "packageA/drugOrderInfo/drugOrderInfo",
"pathName": "packageA/drugOrderInfo/drugOrderInfo",
"query": "scene=3",
"scene": null
},
{
"id": -1,
"name": "pages/chatNews/chatNews",
"pathName": "pages/chatNews/chatNews",
"query": "",
"scene": null
},
{
"id": -1,
"name": "packageA/drugOrderDetail/drugOrderDetail",
"pathName": "packageA/drugOrderDetail/drugOrderDetail",
"query": "",
"scene": null
},
{
"id": 6,
"name": "packageA/chat/chat",
"pathName": "packageA/chat/chat",
"query": "groupID=@TGS#273CANVGX&orderId=532&t_unionid=oHhp80UTfudZVXcj4H2YOiFr8Jx8",
"scene": null
},
{
"name": "packageB/invoice/invoice",
"pathName": "packageB/invoice/invoice",
"query": "",
"scene": null
},
{
"name": "pages/prescription/order/order",
"pathName": "pages/prescription/order/order",
"query": "scene=1322",
"scene": null
},
{
"name": "物流模板信息",
"pathName": "packageA/logistics/logistics",
"query": "id=978&num=SF1334982552976&tel=17801017172&ordernumber=20210106215421&img=https://www.xiaodongai.com/xiaodongai/ceshi/Uploads/Drug/2020-04-11/5e916ffe83129.jpg&status=3&address={\"id\":7343,\"openid\":\"oYQX40BtoLUP4sbDt8iKxO-CcQ74\",\"unionid\":\"oHhp80YULOSNxEltQNTTkRqjzNrI\",\"name\":\"小孔5\",\"phone\":\"17801017172\",\"take_over\":\"北京市北京市通州区\",\"detail_address\":\"北京市北京市通州区小懂科技\",\"create_time\":\"1610531672\",\"update_time\":null,\"status\":0,\"is_default\":0,\"province\":\"北京市\",\"city\":\"北京市\",\"area\":\"通州区\"}&com=",
"scene": 1014
},
{
"name": "packageA/productOrderInfo/productOrderInfo",
"pathName": "packageA/productOrderInfo/productOrderInfo",
"query": "scene=15152",
"scene": 1011
},
{
"name": "packageA/productOrderDetail/productOrderDetail",
"pathName": "packageA/productOrderDetail/productOrderDetail",
"query": "id=111111111114478",
"scene": null
}
]
}
}
}
\ No newline at end of file
'use strict'; 'use strict';
const HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli'; const HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli';
// var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli_ceshi_copy'; // var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli_ceshi_copy';
const HOST_xinli_lb = 'https://static.xiaodongai.com/'; const HOST_xinli_lb = 'https://static.xiaodongai.com/';
const HOST_P = "https://static.xiaodongai.com/xiaodongai/"; const HOST_P = "https://static.xiaodongai.com/xiaodongai/";
const HOST_P_K = "https://static.xiaodongai.com/xiaodongai/kongtian/"; 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 = "http://test.patient.xiaodongai.com/" //测试新地址
// const HOST= "https://test-wechat.xiaodongai.com/"; const HOST_info = 'https://vivshi.com/xiaodongai/kongtian/'; // 弃用
const HOST = 'https://www.xiaodongai.com/xiaodongai/kongtian/';
// var HOST = 'https://www.xiaodongai.com/xiaodongai/ceshi/';//测试库
// var HOST = 'http://192.168.0.123:8081/xiaodongai/ceshi/';//本地
// var HOST = 'http://localhost/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/"; //互联网医院正式
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/";//互联网医院正式
const url = { const url = {
getUserSig: HOST + 'wechatIm.php?s=/Im/wechat_get_sign', //获取usersig以及userID /**
getOpenId: HOST + 'applet.php?s=Applet/getopenid', ///获取openid * begin
getUserData: HOST + 'wechatIteration.php?s=/Home/index', ///获取用户数据 * 推荐产品
addUserInfo: HOST + 'applet.php?s=/Applet/new_user_add', //添加用户 */
seeOpenId:HOST+"wechatIteration.php?s=/Inquisition/get_openid",//查询openid getNormalProduct :patient+"wechatIteration/Zcprescription/zckyxqs",//正常购买产品
getRoomUserSig:HOST+"wechatIteration.php?s=/Inquisition/get_room",//获取room的userSig 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
*/
getUserSig :HOST + 'wechatIm.php?s=/Im/wechat_get_sign', //获取usersig以及userID
getOpenId :HOST + 'applet.php?s=Applet/getopenid', ///获取openid
getUserData :HOST + 'wechatIteration.php?s=/Home/index', ///获取用户数据
addUserInfo :HOST + 'applet.php?s=/Applet/new_user_add', //添加用户
seeOpenId :HOST+"wechatIteration.php?s=/Inquisition/get_openid",//查询openid
getRoomUserSig :HOST+"wechatIteration.php?s=/Inquisition/get_room",//获取room的userSig
/**IM用户关系 */ /**IM用户关系 */
addFriend: HOST + "wechatIteration.php?s=/Im/add_firends", //添加好友 addFriend :HOST + "wechatIteration.php?s=/Im/add_firends", //添加好友
delFriend: HOST + "wechatIteration.php?s=/Personal/delDoctor", //删除好友 delFriend :HOST + "wechatIteration.php?s=/Personal/delDoctor", //删除好友
appAddFriend: HOST + "wechatIteration.php?s=/Im/gauge_unionid", //app.js添加好友 appAddFriend :HOST + "wechatIteration.php?s=/Im/gauge_unionid", //app.js添加好友
/**end */ /**end */
/**chat页面接口 */ /**chat页面接口 */
getFriendList: HOST + "wechatIteration.php?s=/Personal/myDoctor", //获取医生列表 getFriendList :HOST + "wechatIteration.php?s=/Personal/myDoctor", //获取医生列表
getFreeChat:HOST + "wechatIteration.php?s=/InquiryUser/judge_free",//获取免费咨询次数 getFreeChat :HOST + "wechatIteration.php?s=/InquiryUser/judge_free",//获取免费咨询次数
setFreeSend:HOST + "wechatIteration.php?s=/InquiryUser/drug_free_send",//修改免费咨询次数 setFreeSend :HOST + "wechatIteration.php?s=/InquiryUser/drug_free_send",//修改免费咨询次数
getSendReports:HOST+"wechatIteration.php?s=/Inquisition/send_test_result",//获取发送报告列表 getSendReports :HOST+"wechatIteration.php?s=/Inquisition/send_test_result",//获取发送报告列表
get_online: HOST + "wechatIteration.php?s=/Inquisition/get_online",//获取在线状态 get_online :HOST + "wechatIteration.php?s=/Inquisition/get_online",//获取在线状态
acceptFollowUp:HOST+ "wechatIteration.php?s=/Inquisition/jieshou",//接受预约 acceptFollowUp :HOST+ "wechatIteration.php?s=/Inquisition/jieshou",//接受预约
getPayStatus:HOST+"wechatIteration.php?s=/Prescription/drug_order_list_payresult",//获取药方支付状态 getPayStatusA :HOST+"wechatIteration.php?s=/Prescription/drug_order_list_payresult",//获取药方支付状态
getChatMsgLog:HOST+"wechatIteration.php?s=/Im/chat_message_logging",//获取历史记录 getChatMsgLog :HOST+"wechatIteration.php?s=/Im/chat_message_logging",//获取历史记录
getIsAnswer:HOST+"wechatIteration.php?s=home/testing_gauge",//获取当前量表是否已答 getIsAnswer :HOST+"wechatIteration.php?s=home/testing_gauge",//获取当前量表是否已答
/**end */ /**end */
/**服务设置 begin*/ /**服务设置 begin*/
myServerList:HOST+"wechatIteration.php?s=/InquiryUser/inquiryImList",//我的服务记录 myServerList :HOST+"wechatIteration.php?s=/InquiryUser/inquiryImList",//我的服务记录
getDoctorDetail: HOST + "wechatIteration.php?s=/WechatDoctor/doctorDetail", //医生服务详情 getDoctorDetail :HOST + "wechatIteration.php?s=/WechatDoctor/doctorDetail", //医生服务详情
getDoctorInfo: HOST + 'wechatIteration.php?s=/WechatDoctor/doctor', //医生信息 getDoctorInfo :HOST + 'wechatIteration.php?s=/WechatDoctor/doctor', //医生信息
payRecord: HOST + "wechatIteration.php?s=/Home/PayRecord", //支付生成订单 payRecord :HOST + "wechatIteration.php?s=/Home/PayRecord", //支付生成订单
GZPayRecord:HOST + "wechatIteration.php?s=/Home/guangzhou_pay_record", //广州互联网支付下单 GZPayRecord :HOST + "wechatIteration.php?s=/Home/guangzhou_pay_record", //广州互联网支付下单
servicePay: HOST + "wechatIteration.php?s=/WechatDoctor/servicePay", //插入支付记录 servicePay :HOST + "wechatIteration.php?s=/WechatDoctor/servicePay", //插入支付记录
isInquiry: HOST + "wechatIteration.php?s=/WechatDoctor/conductService", //判断是否有正在进行中或者未接诊的在线问诊服务 isInquiry :HOST + "wechatIteration.php?s=/WechatDoctor/conductService", //判断是否有正在进行中或者未接诊的在线问诊服务
switchService: HOST + "wechatIteration.php?s=/InquiryUser/switchInquiry", //切换服务 switchService :HOST + "wechatIteration.php?s=/InquiryUser/switchInquiry", //切换服务
serviceDetail: HOST + "wechatIteration.php?s=/Inquisition/inquiry_detail", //服务详情 serviceDetail :HOST + "wechatIteration.php?s=/Inquisition/inquiry_detail", //服务详情
endInquiry:HOST+"wechatIteration.php?s=/InquiryUser/endInquiry", //同意结束服务 endInquiry :HOST+"wechatIteration.php?s=/InquiryUser/endInquiry", //同意结束服务
refuseInquiry:HOST+ "wechatIteration.php?s=/InquiryUser/refuseInquiry",//拒绝提前结束 refuseInquiry :HOST+ "wechatIteration.php?s=/InquiryUser/refuseInquiry",//拒绝提前结束
seeBuyStaus:HOST+"wechatIteration.php?s=/InquiryUser/seeStatus",//用户购买服务状态 seeBuyStaus :HOST+"wechatIteration.php?s=/InquiryUser/seeStatus",//用户购买服务状态
/**end */ /**end */
/**药方详情 begin */ /**药方详情 begin */
getPrescription: HOST + "wechatIteration.php?s=/Prescription/detailPrescription", //药方详情 getPrescription :HOST + "wechatIteration.php?s=/Prescription/detailPrescription", //药方详情
isDrugEnough: HOST + "wechatIteration.php?s=/Prescription/judgeStock", //查询药物充足 isDrugEnough :HOST + "wechatIteration.php?s=/Prescription/judgeStock", //查询药物充足
prescriptionPay: HOST + "wechatIteration.php?s=/Prescription/zfxds", //支付 prescriptionPay :HOST + "wechatIteration.php?s=/Prescription/zfxds", //药品支付
addAddress: HOST + "wechatIteration.php?s=/Prescription/address", //新增地址 addAddress :HOST + "wechatIteration.php?s=/Prescription/address", //新增地址
editAddress: HOST + "wechatIteration.php?s=/Prescription/editAddress", //修改地址 editAddress :HOST + "wechatIteration.php?s=/Prescription/editAddress", //修改地址
isEditAddress:HOST+"wechatIteration.php?s=/Prescription/canEditAddress",//判断是否可修改地址 isEditAddress :HOST+"wechatIteration.php?s=/Prescription/canEditAddress",//判断是否可修改地址
addressList: HOST + "wechatIteration.php?s=/Prescription/listAddress", //地址列表 // addressList: HOSTTEST + "wechatIteration.php?s=/Prescription/listAddress", //地址列表
defaultAddress: HOST + "wechatIteration.php?s=/Prescription/addressDefault", //默认地址 addressList :HOST + "wechatIteration.php?s=/Prescription/listAddress", //地址列表
getDrugList:HOST + "wechatIteration.php?s=/Prescription/openDrug",//处方列表 defaultAddress :HOST + "wechatIteration.php?s=/Prescription/addressDefault", //默认地址
getDrugDetail:HOST+"wechatIteration.php?s=/Prescription/myDrugDetail",//处方详情 getDrugList :HOST + "wechatIteration.php?s=/Prescription/openDrug",//处方列表
confirmReceipt:HOST+ "wechatIteration.php?s=/Drugorder/confirmReceipt",//确认收货 getDrugDetail :HOST+"wechatIteration.php?s=/Prescription/myDrugDetail",//处方详情
delBuyDrug:HOST+"wechatIteration.php?s=/Drugorder/drugOrderDel",//删除购药记录 confirmReceipt :HOST+ "wechatIteration.php?s=/Drugorder/confirmReceipt",//确认收货
getRecipeDetails :HOST+"wechatIteration.php?s=/Prescription/zckyxqs",//正常开药 delBuyDrug :HOST+"wechatIteration.php?s=/Drugorder/drugOrderDel",//删除购药记录
getQuick:HOST+"wechatIteration.php?s=/Prescription/kskyxqs",//快速开药 getRecipeDetails :HOST+"wechatIteration.php?s=/Prescription/zckyxqs",//正常开药
getQuick :HOST+"wechatIteration.php?s=/Prescription/kskyxqs",//快速开药
paySucceedCallback:HOST+"wechatIteration.php?s=/Prescription/query_order_status",//支付成功回调 paySucceedCallback:HOST+"wechatIteration.php?s=/Prescription/query_order_status",//支付成功回调
logisticsInfo:HOST + "wechatIteration.php?s=/Express/sfRouteService",//物流信息 logisticsInfo :HOST + "wechatIteration.php?s=/Express/sfRouteService",//物流信息
drogOrderDetail:HOST + "wechatIteration.php?s=/Drugorder/prescription_order_detail",//药品订单详情 drogOrderDetail :HOST + "wechatIteration.php?s=/Drugorder/prescription_order_detail",//药品订单详情
/**end */ /**end */
/**公共 begin*/ /**公共 begin*/
isReport:HOST + "wechatIteration.php?s=/Inquisition/check_istype", //检测是否允许查看报告 isReport :HOST + "wechatIteration.php?s=/Inquisition/check_istype", //检测是否允许查看报告
forcedUpdate:HOST + 'wechatIteration.php?s=/Public/wechatVer', //强制更新 forcedUpdate :HOST + 'wechatIteration.php?s=/Public/wechatVer', //强制更新
getWxUserPhone:HOST + "wechatIteration.php?s=/InquiryUser/getUserPhone", //微信授权获取用户手机号 getWxUserPhone :HOST + "wechatIteration.php?s=/InquiryUser/getUserPhone", //微信授权获取用户手机号
getCode:HOST + "wechatIteration.php?s=/Home/getCode", //获取验证码 getCode :HOST + "wechatIteration.php?s=/Home/getCode", //获取验证码
checkCard:HOST_yiyuan+'Idcard/checkCard',//验证身份证与姓名 checkCard :HOST_yiyuan+'Idcard/checkCard',//验证身份证与姓名
/**end */ /**end */
/**量表 */ /**量表 */
loadScene:HOST+"wechatIteration.php?s=/Measure/is_price",//判断量表二维码场景 loadScene :HOST+"wechatIteration.php?s=/Measure/is_price",//判断量表二维码场景
loadIMScene:HOST+"wechatIteration.php?s=/Measure/is_price_to",//判断IM量表支付场景 loadIMScene :HOST+"wechatIteration.php?s=/Measure/is_price_to",//判断IM量表支付场景
getTestInfo:HOST+"wechatIteration.php?s=/InquiryUser/findInquiry",//获取检测信息 getTestInfo :HOST+"wechatIteration.php?s=/InquiryUser/findInquiry",//获取检测信息
/**end */ /**end */
/**用户购买问诊信息 begin*/ /**用户购买问诊信息 begin*/
addUserBuyInfo: HOST + "wechatIteration.php?s=/InquiryUser/addUser", //添加用户购买信息 addUserBuyInfo :HOST + "wechatIteration.php?s=/InquiryUser/addUser", //添加用户购买信息
editUserBuyInfo: HOST + "wechatIteration.php?s=/InquiryUser/editUser", //修改用户购买信息 editUserBuyInfo :HOST + "wechatIteration.php?s=/InquiryUser/editUser", //修改用户购买信息
delUserbuyInfo: HOST + "wechatIteration.php?s=/InquiryUser/delUser", //删除用户购买信息 delUserbuyInfo :HOST + "wechatIteration.php?s=/InquiryUser/delUser", //删除用户购买信息
userBuyInfoList: HOST + "wechatIteration.php?s=/InquiryUser/listUser", //用户购买信息列表 userBuyInfoList :HOST + "wechatIteration.php?s=/InquiryUser/listUser", //用户购买信息列表
lastUserBuyInfo: HOST + "wechatIteration.php?s=/InquiryUser/lastUser", //上次用户购买信息 lastUserBuyInfo :HOST + "wechatIteration.php?s=/InquiryUser/lastUser", //上次用户购买信息
sendCard: HOST + "wechatIteration.php?s=/InquiryUser/sendCard", //保存发送给医生的用户信息 sendCard :HOST + "wechatIteration.php?s=/InquiryUser/sendCard", //保存发送给医生的用户信息
servicePayEdit: HOST + "wechatIteration.php?s=/WechatDoctor/servicePayEdit", //支付信息请求 servicePayEdit :HOST + "wechatIteration.php?s=/WechatDoctor/servicePayEdit", //支付信息请求
/**end */ /**end */
/**tab我的 begin*/ /**tab我的 begin*/
profileDetails: HOST + "wechatIteration.php?s=/Inquisition/detail", //问诊详情 profileDetails :HOST + "wechatIteration.php?s=/Inquisition/detail", //问诊详情
buyDrugList: HOST + "wechatIteration.php?s=/Drugorder/drug_orders", //药品订单列表 buyDrugList :HOST + "wechatIteration.php?s=/Drugorder/drug_orders", //药品订单列表
delBuyDrug:HOST+"wechatIteration.php?s=/Drugorder/drugOrderDel",//删除购药记录 delBuyDrug :HOST+"wechatIteration.php?s=/Drugorder/drugOrderDel",//删除购药记录
getInvoiceList: HOST + "wechatIteration.php?s=/Receipt/invoiceList", //发票列表 getInvoiceList : HOST + "wechatIteration.php?s=/Receipt/invoiceList", //发票列表
saveInvoiceInfo: HOST + "wechatIteration.php?s=/Receipt/riseSave", //保存开票信息 saveInvoiceInfo : HOST + "wechatIteration.php?s=/Receipt/riseSave", //保存开票信息
getInvoiceStatus: HOST + "wechatIteration.php?s=/invoice/setStatus", //发票状态 getInvoiceStatus : HOST + "wechatIteration.php?s=/invoice/setStatus", //发票状态
getInvoiceDetail: HOST + "wechatIteration.php?s=/invoice/invoice_res", //发票详情 getInvoiceDetail : HOST + "wechatIteration.php?s=/invoice/invoice_res", //发票详情
getInvoiceInfo: HOST + "wechatIteration.php?s=/Receipt/riseDetail", //发票信息 getInvoiceInfo : HOST + "wechatIteration.php?s=/Receipt/riseDetail", //发票信息
editAgainEmail: HOST + "wechatIteration.php?s=/invoice/again_email", //修改发票邮箱 editAgainEmail : HOST + "wechatIteration.php?s=/invoice/again_email", //修改发票邮箱
getTaxpayers: HOST + "wechatIteration.php?s=/XdInvoice/searchSbh", //自动获取纳税人识别号 getTaxpayers : HOST + "wechatIteration.php?s=/XdInvoice/searchSbh", //自动获取纳税人识别号
sendEmail:HOST+"wechatIteration.php?s=/Receipt/receiptOpen",//确认开票 sendEmail :HOST+"wechatIteration.php?s=/Receipt/receiptOpen",//确认开票
seeInvoice:HOST+ "wechatIteration.php?s=/invoice/chakan_invoice",//查看发票 seeInvoice :HOST+ "wechatIteration.php?s=/invoice/chakan_invoice",//查看发票
contactDoctor:HOST+"wechatIteration.php?s=/Personal/personal_home",//联系医生 contactDoctor :HOST+"wechatIteration.php?s=/Personal/personal_home",//联系医生
firendAfterRoom:HOST+"wechatIteration.php?s=/Im/firend_after_room",//成功加好友之后选择身份信息进入群聊房间 firendAfterRoom :HOST+"wechatIteration.php?s=/Im/firend_after_room",//成功加好友之后选择身份信息进入群聊房间
/**end */ /**end */
/**首页Index */ /**首页Index */
getNotResult: HOST + "wechatIteration.php?s=/Home/testresult", //未做量表提醒 getNotResult : HOST + "wechatIteration.php?s=/Home/testresult", //未做量表提醒
getDoctorIndex: HOST + "wechatIteration.php?s=/Personal/doctorIndex", //首页医生数据 getDoctorIndex : HOST + "wechatIteration.php?s=/Personal/doctorIndex", //首页医生数据
screenDoctor: HOST + "wechatIteration.php?s=/personal/screenDoctor", //查询医生数据 screenDoctor : HOST + "wechatIteration.php?s=/personal/screenDoctor", //查询医生数据
/**end */ /**end */
getChatDoctor: HOST + "wechatIteration.php?s=/Inquisition/aptitude", getChatDoctor : HOST + "wechatIteration.php?s=/Inquisition/aptitude",
getDealDetails: HOST + "wechatIteration.php?s=/Inquisition/patient_details",//支付记录 getDealDetails : HOST + "wechatIteration.php?s=/Inquisition/patient_details",//支付记录
getReportList: HOST + "wechatIteration.php?s=/Home/testresult", getReportList : HOST + "wechatIteration.php?s=/Home/testresult",//量表列表
goSetTel: HOST + "wechatIteration.php?s=/Index/getPhone", goSetTel : HOST + "wechatIteration.php?s=/Index/getPhone",//获取手机号
getServiceList: HOST + "wechatIteration.php?s=/InquiryUser/chat_inquiry",//服务记录集合 getServiceList : HOST + "wechatIteration.php?s=/InquiryUser/chat_inquiry",//服务记录集合
delService:HOST+"wechatIteration.php?s=/InquiryUser/delInquiry", delService :HOST+"wechatIteration.php?s=/InquiryUser/delInquiry",
/** /**
* 修改 * 修改
* 后台和二维码改路径 * 后台和二维码改路径
*/ */
getFollowUpList: HOST + 'appIteration.php?s=/Inquisition/wechat_yuyue', getFollowUpList : HOST + 'appIteration.php?s=/Inquisition/wechat_yuyue',
delReport: HOST + 'wechatIteration.php?s=/Home/del_result', //无效 delReport : HOST + 'wechatIteration.php?s=/Home/del_result', //无效
goSetTel: HOST + "wechatIteration.php?s=/Index/getPhone", //code值需规范 goSetTel : HOST + "wechatIteration.php?s=/Index/getPhone", //code值需规范
} }
module.exports = { module.exports = {
url: url, url : url,
HOST: HOST, HOST : HOST,
HOST_xinli: HOST_xinli, patient : patient,
HOST_xinli_lb: HOST_xinli_lb, HOST_P : HOST_P,
HOST_P: HOST_P, HOST_P_K : HOST_P_K,
HOST_P_K: HOST_P_K, HOST_info : HOST_info,
HOST_info: HOST_info, HOST_yiyuan : HOST_yiyuan,
HOST_yiyuan:HOST_yiyuan, HOST_xinli : HOST_xinli,
HOST_xinli_lb : HOST_xinli_lb,
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ function breakPromise() { ...@@ -16,7 +16,7 @@ function breakPromise() {
}; };
/**添加用户信息 */ /**添加用户信息 */
function addUserInfo(param) { function addUserInfo(param) {
var addUserInfoUrl = config.url.addUserInfo; let addUserInfoUrl = config.url.addUserInfo;
return wxRequest.getRequest(addUserInfoUrl, param); return wxRequest.getRequest(addUserInfoUrl, param);
}; };
/** /**
...@@ -25,8 +25,8 @@ function addUserInfo(param) { ...@@ -25,8 +25,8 @@ function addUserInfo(param) {
* @param {String} user 用户注册IM的id * @param {String} user 用户注册IM的id
*/ */
function getUserSig(user) { function getUserSig(user) {
var getUserSigUrl = config.url.getUserSig; let getUserSigUrl = config.url.getUserSig;
var data = { let data = {
"user": user "user": user
// "user": "oHhp80fVWvjJn2EYkB5XxhKnVBOo" // "user": "oHhp80fVWvjJn2EYkB5XxhKnVBOo"
} }
...@@ -37,8 +37,8 @@ function getUserSig(user) { ...@@ -37,8 +37,8 @@ function getUserSig(user) {
* @param {string} code 用户code * @param {string} code 用户code
*/ */
function getOpenId(code) { function getOpenId(code) {
var getOpenId = config.url.getOpenId; let getOpenId = config.url.getOpenId;
var data = {}; let data = {};
data.code = code; data.code = code;
return wxRequest.postRequest(getOpenId, data); return wxRequest.postRequest(getOpenId, data);
}; };
...@@ -47,8 +47,8 @@ function getOpenId(code) { ...@@ -47,8 +47,8 @@ function getOpenId(code) {
* @param {string} openid 小程序id * @param {string} openid 小程序id
*/ */
function getUserData(openid) { function getUserData(openid) {
var getUserDataUrl = config.url.getUserData; let getUserDataUrl = config.url.getUserData;
var data = {}; let data = {};
data.openid = openid; data.openid = openid;
return wxRequest.postRequest(getUserDataUrl, data); return wxRequest.postRequest(getUserDataUrl, data);
}; };
...@@ -57,7 +57,7 @@ function getUserData(openid) { ...@@ -57,7 +57,7 @@ function getUserData(openid) {
* @param {Object} param * @param {Object} param
*/ */
function seeOpenId(param) { function seeOpenId(param) {
var seeOpenIdUrl = config.url.seeOpenId; let seeOpenIdUrl = config.url.seeOpenId;
return wxRequest.postRequest(seeOpenIdUrl, param); return wxRequest.postRequest(seeOpenIdUrl, param);
}; };
/** 小程序强制更新 /** 小程序强制更新
...@@ -198,7 +198,7 @@ function editAddress(param) { ...@@ -198,7 +198,7 @@ function editAddress(param) {
* 是否可修改收货地址 * 是否可修改收货地址
* @param {*} param.ordernumber //订单号 * @param {*} param.ordernumber //订单号
*/ */
function isEditAddress(param){ function isEditAddress(param) {
var isEditAddressUrl = config.url.isEditAddress; //支付 var isEditAddressUrl = config.url.isEditAddress; //支付
return wxRequest.postRequest(isEditAddressUrl, param); return wxRequest.postRequest(isEditAddressUrl, param);
} }
...@@ -450,6 +450,7 @@ function loadScene(param) { ...@@ -450,6 +450,7 @@ function loadScene(param) {
var loadSceneUrl = config.url.loadScene; var loadSceneUrl = config.url.loadScene;
return wxRequest.postRequest(loadSceneUrl, param); return wxRequest.postRequest(loadSceneUrl, param);
} }
function loadIMScene(param) { function loadIMScene(param) {
var loadIMSceneUrl = config.url.loadIMScene; var loadIMSceneUrl = config.url.loadIMScene;
return wxRequest.postRequest(loadIMSceneUrl, param); return wxRequest.postRequest(loadIMSceneUrl, param);
...@@ -493,6 +494,11 @@ function buyDrugList(param) { ...@@ -493,6 +494,11 @@ function buyDrugList(param) {
return wxRequest.postRequest(buyDrugListUrl, param); return wxRequest.postRequest(buyDrugListUrl, param);
} }
function buyProductList(param) {
var buyProductListUrl = config.url.buyProductList;
return wxRequest.postRequest(buyProductListUrl, param);
}
function delBuyDrug(param) { function delBuyDrug(param) {
var delBuyDrugUrl = config.url.delBuyDrug; var delBuyDrugUrl = config.url.delBuyDrug;
return wxRequest.postRequest(delBuyDrugUrl, param); return wxRequest.postRequest(delBuyDrugUrl, param);
...@@ -546,9 +552,14 @@ function acceptFollowUp(param) { ...@@ -546,9 +552,14 @@ function acceptFollowUp(param) {
return wxRequest.postRequest(acceptFollowUpUrl, param); return wxRequest.postRequest(acceptFollowUpUrl, param);
} }
function getPayStatus(param) { function getPayStatusA(param) {
var getPayStatusUrl = config.url.getPayStatus; var getPayStatusAUrl = config.url.getPayStatusA;
return wxRequest.postRequest(getPayStatusUrl, param); return wxRequest.postRequest(getPayStatusAUrl, param);
}
function getPayStatusB(param) {
var getPayStatusBUrl = config.url.getPayStatusB;
return wxRequest.postRequest(getPayStatusBUrl, param);
} }
function paySucceedCallback(param) { function paySucceedCallback(param) {
...@@ -600,14 +611,37 @@ function drogOrderDetail(param) { ...@@ -600,14 +611,37 @@ function drogOrderDetail(param) {
var drogOrderDetailUrl = config.url.drogOrderDetail; var drogOrderDetailUrl = config.url.drogOrderDetail;
return wxRequest.postRequest(drogOrderDetailUrl, param); return wxRequest.postRequest(drogOrderDetailUrl, param);
} }
function productOrderDetail(param){
let productOrderDetailUrl=config.url.productOrderDetail;
return wxRequest.postRequest(productOrderDetailUrl,param);
}
/** /**
* 是否答题 * 是否答题
* @param {*} param * @param {*} param
*/ */
function getIsAnswer(param){ function getIsAnswer(param) {
var getIsAnswerUrl = config.url.getIsAnswer; var getIsAnswerUrl = config.url.getIsAnswer;
return wxRequest.postRequest(getIsAnswerUrl, param); return wxRequest.postRequest(getIsAnswerUrl, param);
} }
/**
* 正常购买推荐产品
* @param {object} param patient_unionid 患者unionid
* @param {object} param prescription 药方ID
*/
function getNormalProduct(param) {
var getNormalProductUrl = config.url.getNormalProduct;
return wxRequest.postRequest(getNormalProductUrl, param);
}
function getQuickProduct(param) {
var getQuickProductUrl = config.url.getQuickProduct;
return wxRequest.postRequest(getQuickProductUrl, param);
}
function productPay(param) {
var productPayUrl = config.url.productPay;
return wxRequest.postRequest(productPayUrl, param)
}
function getBusStopListPromise(sid, stopType) { function getBusStopListPromise(sid, stopType) {
var getStopListUrl = config.url.getBusStopList; var getStopListUrl = config.url.getBusStopList;
...@@ -638,7 +672,7 @@ module.exports = { ...@@ -638,7 +672,7 @@ module.exports = {
prescriptionPay: prescriptionPay, //药方支付 prescriptionPay: prescriptionPay, //药方支付
addAddress: addAddress, //新增地址 addAddress: addAddress, //新增地址
editAddress: editAddress, //修改地址 editAddress: editAddress, //修改地址
isEditAddress:isEditAddress,//判断是否修改地址 isEditAddress: isEditAddress, //判断是否修改地址
addressList: addressList, //地址列表 addressList: addressList, //地址列表
defaultAddress: defaultAddress, //地址详情 defaultAddress: defaultAddress, //地址详情
isReport: isReport, //检测是否允许查看报告 isReport: isReport, //检测是否允许查看报告
...@@ -678,7 +712,7 @@ module.exports = { ...@@ -678,7 +712,7 @@ module.exports = {
delFriend: delFriend, //删除好友 delFriend: delFriend, //删除好友
appAddFriend: appAddFriend, //app.js添加好友 appAddFriend: appAddFriend, //app.js添加好友
loadScene: loadScene, //加载量表二维码场景 loadScene: loadScene, //加载量表二维码场景
loadIMScene:loadIMScene,//加载IM量表支付场景 loadIMScene: loadIMScene, //加载IM量表支付场景
seeBuyStaus: seeBuyStaus, //用户购买服务状态 seeBuyStaus: seeBuyStaus, //用户购买服务状态
endInquiry: endInquiry, //同意结束服务 endInquiry: endInquiry, //同意结束服务
refuseInquiry: refuseInquiry, //拒绝结束服务 refuseInquiry: refuseInquiry, //拒绝结束服务
...@@ -686,6 +720,7 @@ module.exports = { ...@@ -686,6 +720,7 @@ module.exports = {
getDrugList: getDrugList, //处方列表 getDrugList: getDrugList, //处方列表
getDrugDetail: getDrugDetail, //处方详情 getDrugDetail: getDrugDetail, //处方详情
buyDrugList: buyDrugList, //购药记录列表 buyDrugList: buyDrugList, //购药记录列表
buyProductList: buyProductList, //购买产品列表
delBuyDrug: delBuyDrug, //删除购药记录 delBuyDrug: delBuyDrug, //删除购药记录
confirmReceipt: confirmReceipt, //确认收货 confirmReceipt: confirmReceipt, //确认收货
getQuick: getQuick, //快速开药 getQuick: getQuick, //快速开药
...@@ -697,7 +732,8 @@ module.exports = { ...@@ -697,7 +732,8 @@ module.exports = {
checkCard: checkCard, //验证身份证与姓名 checkCard: checkCard, //验证身份证与姓名
getTestInfo: getTestInfo, //获取检测信息 getTestInfo: getTestInfo, //获取检测信息
acceptFollowUp: acceptFollowUp, //接受随访 acceptFollowUp: acceptFollowUp, //接受随访
getPayStatus: getPayStatus, //获取药方支付状态 getPayStatusA: getPayStatusA, //获取药方支付状态
getPayStatusB: getPayStatusB, //获取药方支付状态
paySucceedCallback: paySucceedCallback, //支付成功回调 paySucceedCallback: paySucceedCallback, //支付成功回调
getChatMsgLog: getChatMsgLog, //获取消息历史记录 getChatMsgLog: getChatMsgLog, //获取消息历史记录
myServerList: myServerList, //我的服务列表 myServerList: myServerList, //我的服务列表
...@@ -705,5 +741,9 @@ module.exports = { ...@@ -705,5 +741,9 @@ module.exports = {
logisticsInfo: logisticsInfo, //物流信息 logisticsInfo: logisticsInfo, //物流信息
firendAfterRoom: firendAfterRoom, //成功加好友之后选择身份信息进入群聊房间 firendAfterRoom: firendAfterRoom, //成功加好友之后选择身份信息进入群聊房间
drogOrderDetail: drogOrderDetail, //药品订单详情 drogOrderDetail: drogOrderDetail, //药品订单详情
getIsAnswer:getIsAnswer,//是否答题 productOrderDetail: productOrderDetail, //产品详情
getIsAnswer: getIsAnswer, //是否答题
getNormalProduct: getNormalProduct, //正常购买推荐产品
getQuickProduct: getQuickProduct, //快速购买推荐产品
productPay: productPay, //推荐产品支付
} }
\ No newline at end of file
...@@ -247,7 +247,7 @@ function timestampFormat(timestamp) { ...@@ -247,7 +247,7 @@ function timestampFormat(timestamp) {
function zeroize(num) { function zeroize(num) {
return (String(num).length == 1 ? '0' : '') + num; return (String(num).length == 1 ? '0' : '') + num;
} }
var curTimestamp = parseInt(new Date().getTime() / 1000); //当前时间 var curTimestamp = parseInt(new Date().getTime() / 1000); //戳
var timestampDiff = curTimestamp - timestamp; // 参数时间戳与当前时间戳相差秒数 var timestampDiff = curTimestamp - timestamp; // 参数时间戳与当前时间戳相差秒数
var curDate = new Date(curTimestamp * 1000); // 当前时间日期对象 var curDate = new Date(curTimestamp * 1000); // 当前时间日期对象
......
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