Commit 1928f7b6 by liuquan

合并分支 'liuquan' 到 'XDJK-master'

Liuquan

查看合并请求 !8
parents 2ee2faca 41b24d36
......@@ -41,7 +41,9 @@
"patientList/patientList",
"chattingRecords/chattingRecords",
"beBeingService/beBeingService",
"productOrderInfo/productOrderInfo"
"productOrderInfo/productOrderInfo",
"productOrderDetail/productOrderDetail",
"productOrder/productOrder"
]
},
{
......
......@@ -11,12 +11,16 @@ Page({
phone: '',
take_over: ['请选择', '', ''],
detail_address: '',
type:0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this;
if(options.type){
that.data.type=options.type;
}
if(options.ordernumber){
that.data.ordernumber=options.ordernumber;
}
......@@ -48,9 +52,9 @@ Page({
let item = wx.getStorageSync('data');
//id不为空属于修改
if (that.data.id != '') {
console.log(2)
let data = {};
data.id = that.data.id
data.id = that.data.id;
data.type=that.data.type;
data.name = e.detail.value.name;
data.phone = e.detail.value.phone;
if(data.take_over=='请选择'){
......
......@@ -194,7 +194,7 @@ page {
.tcode {
font-size: 30rpx;
color: #212121;
font-weight: 700;
font-weight: 400;
}
.sname {
......
......@@ -1647,7 +1647,7 @@ Page({
patient_unionid: wx.getStorageSync('data').unionid,
isquick: item.isQuick
}
Service.getPayStatus(data).then((res) => {
Service.getPayStatusA(data).then((res) => {
if (res.code == 1) {
wx.navigateTo({
url: '/packageA/drugOrder/drugOrder'
......@@ -1666,6 +1666,54 @@ Page({
}
})
}, 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) {
let tel = e.currentTarget.dataset.tel;
......
......@@ -227,7 +227,7 @@
<view class="doctor-unit">{{item.payload.description.work_unit}}</view>
</view>
</view>
<view class="Report-text" wx:if='{{item.payload.description.diagnosis}}'>
<view class="Report-text" >
医生为您开具了一个推荐产品,您可根据自身情况自由选择是否购买。</view>
<view class="scale">
<view class="scale-title">推荐产品:</view>
......@@ -240,7 +240,7 @@
</view>
<view class="btn-view">
<!-- <view class="msg_btn" bindtap="viewRecipe" data-item="{{item.payload.description}}">查看推荐</view> -->
<view class="msg_btn1" bindtap="buyDrug" data-item="{{item.payload.description}}">购买产品</view>
<view class="msg_btn1" bindtap="buyProduct" data-item="{{item.payload.description}}">购买产品</view>
</view>
</view>
</block>
......
......@@ -60,13 +60,13 @@
<view class='left' wx:if="{{item.flow=='in'}}" id='d{{index}}'>
<image class='head' src='{{doctorimage || noSrc}}'></image>
<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 class='right' wx:if="{{item.flow=='out'}}" id='d{{index}}'>
<image class='head' src='{{avatarUrl|| noSrc}}'></image>
<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>
</block>
......
const Service = require('../../utils/service.js');
const { debouce } = require('../../utils/util.js'); //防抖函数
const {
debouce
} = require('../../utils/util.js'); //防抖函数
const Util = require('../../utils/util.js');
Page({
......@@ -13,8 +15,12 @@ Page({
winH: null,
},
showview: false,
success: true,
list: [],
page: 1
page: 1,
productPage: 0,
total: 0,
requestStatus: false, //请求状态
},
/**
......@@ -38,7 +44,10 @@ Page({
*/
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)
......@@ -51,13 +60,15 @@ Page({
*/
onReachBottom: function () {
var that = this
var page = that.data.page + 1;
that.setData({
scrollFlag: true,
success: false,
page: page
})
that.getList(page, that.data.nav)
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) {
......@@ -89,19 +100,29 @@ Page({
//获取列表
getList: function (page, status) {
var that = this
that.data.requestStatus = true;
var data = {
page: page,
// unionid:'oHhp80QCN2WjClijvSyhkEFQcUwY',
unionid: wx.getStorageSync('data').unionid,
status: status
};
Service.buyDrugList(data).then((res) => {
console.log("res", res)
var list = that.data.list;
that.buyDrugList(data);
},
/**
* 药品列表
* @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) {
for (let i = 0; i < res.data.length; i++) {
list.push(res.data[i])
}
newList = newList.concat(res.data);
// for (let i = 0; i < res.data.length; i++) {
// list.push(res.data[i])
// }
that.setData({
success: true
})
......@@ -116,19 +137,25 @@ Page({
})
}, 2000)
} else {
list = res.data;
// newList = res.data;
newList = newList.concat(res.data);
}
wx.stopPullDownRefresh()
if (list.length > 0) {
if (newList.length > 0) {
that.setData({
list: list,
showview: true
list: newList,
showview: true,
requestStatus: false,
})
wx.hideLoading();
} else {
that.setData({
list: [],
showview: true
showview: true,
requestStatus: false,
})
wx.hideLoading();
}
}).catch(function (Error) {
console.warn('error:', Error); // 获取会话资料失败的相关信息
......@@ -137,10 +164,20 @@ Page({
//选择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,
showview: false
total: 0,
productPage: 0,
showview: false,
list: []
})
_this.getList(1, e.currentTarget.dataset.index)
},
......@@ -176,7 +213,7 @@ Page({
// })
// },
/**
*修改地址-待发货2
* 修改地址-待发货2
*/
editAddress: debouce(function (e) {
Service.isEditAddress({
......@@ -184,7 +221,7 @@ Page({
}).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',
url: '/packageA/addsite/addsite?item=' + JSON.stringify(e.currentTarget.dataset.address) + '&ordernumber=' + e.currentTarget.dataset.ordernumber,
})
} else {
wx.showToast({
......@@ -214,12 +251,14 @@ Page({
*/
goPay: debouce(function (e) {
let that = this;
let orderClass = e.currentTarget.dataset.class;
console.log("orderClass", orderClass);
let data = {
prescription: e.currentTarget.dataset.id,
patient_unionid: wx.getStorageSync('data').unionid,
isquick: e.currentTarget.dataset.isquick
}
Service.getPayStatus(data).then((res) => {
Service.getPayStatusA(data).then((res) => {
if (res.code == 1) {
that.onShow();
} else if (res.code == -1) {
......
......@@ -13,6 +13,7 @@
</view>
<view wx:else>
<block wx:for="{{list}}" wx:key="key">
<!-- 药品 -->
<view class="dingdan">
<block>
<view class="num flex">
......
......@@ -22,7 +22,7 @@
<text wx:if="{{com=='zhongtong'}}">中通快递</text>
<text wx:if="{{com=='yundakuaiyun'}}">韵达快运</text>
:{{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 class="mt" wx:if="{{orderid!='null' && orderid}}">
<!-- <text class="wuliuzx">物流咨询:</text>
......
......@@ -119,7 +119,7 @@ text{
}
.list-zi::before{
position: absolute;
left: 0;
left: 4rpx;
top: 0;
margin-top: 30rpx;
content: "";
......@@ -152,7 +152,7 @@ text{
background: #D9D9D9;
position: absolute;
left: 0;
margin-left: 6rpx;
margin-left: 10rpx;
margin-top: 60rpx;
}
.steps .list:last-child::after{
......@@ -182,7 +182,7 @@ text{
background: #D9D9D9;
position: absolute;
left: 0;
margin-left: 6rpx;
margin-left: 10rpx;
}
.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 = {
type:1,
unionid: wx.getStorageSync("data").unionid,
ordernumber: e.currentTarget.dataset.ordernumber
};
Service.delBuyDrug(data).then((res) => {
if (res.code == 200) {
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 = {
type:1,
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 data = {
prescription: e.currentTarget.dataset.prescription,
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==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.modular==0?item.id:item.quickid}}" data-prescription="{{item.modular==0?item.yfid:item.quickid}}"
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!='0.00'}}">¥ {{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({
})
return;
}
console.log("options", options)
that.data.options = options
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
wx.showLoading({
title: '加载中',
mask: true
})
var that = this
that.login = that.selectComponent("#login");
that.modal = that.selectComponent("#modal");
......@@ -66,12 +69,13 @@ Page({
return Service.getUserData(res.openid)
}).then((res) => {
if (Util.isEmpty(res.unionid)) {
wx.hideLoading();
that.login.showLogin();
} else {
wx.setStorageSync('data', res)
if (that.data.options.isQuick == 0) {
// 正常开药
that.getPrescribe(that.data.options.scene, res.unionid)
that.getNormal(that.data.options.scene, res.unionid)
} else {
that.getQuick(that.data.options.scene, res.unionid)
}
......@@ -82,14 +86,14 @@ Page({
} else {
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 {
that.getQuick(that.data.options.scene, wx.getStorageSync('data').unionid)
}
}
},
// 处方笺
getPrescribe: function (id, patient_unionid) {
// 正常下单
getNormal: function (id, patient_unionid) {
let that = this
if (that.data.paySuccess) {
return;
......@@ -97,7 +101,8 @@ Page({
let data = {};
data.prescription = id;
data.patient_unionid = patient_unionid;
Service.getRecipeDetails(data).then((res) => {
console.log("getNormal", data)
Service.getNormalProduct(data).then((res) => {
console.log("getDetail", res);
if (res.code == 2 || res.code == 3) {
wx.showModal({
......@@ -127,6 +132,7 @@ Page({
that.isChecked(res.data.healthcare);
}
}
wx.hideLoading();
})
},
// 快速开药
......@@ -138,7 +144,7 @@ Page({
let data = {};
data.prescription = quickid;
data.patient_unionid = patient_unionid;
Service.getQuick(data).then((res) => {
Service.getQuickProduct(data).then((res) => {
if (res.code == 2 || res.code == 3) {
wx.showModal({
content: res.msg,
......@@ -167,6 +173,8 @@ Page({
that.isChecked(res.data.healthcare);
}
}
wx.hideLoading();
})
},
//如果有医生推荐药品加上选中状态
......@@ -341,31 +349,34 @@ Page({
title: '正在拉起支付',
mask: true
})
that.prescriptionPay();
that.productPay();
}
}, 1000, true),
prescriptionPay: function () {
productPay: function () {
let that = this;
let hstr = new Array();
let healthcare = that.data.list.healthcare;
for (let i = 0; i < healthcare.length; i++) {
if (healthcare[i].checked) {
hstr.push(healthcare[i].id);
}
}
/**
* @todo 医生推荐 废弃
*/
// let hstr = new Array();
// 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 = {
payid: that.data.list.payid,
id: that.data.options.scene,
patient_unionid: that.data.item.unionid,
modular: that.data.list.modular,
lastid: that.data.item.id,
address: that.data.receiveAddress.id,
isywlx: that.data.list.isywlx,
money: that.data.list.money,
hstr: hstr.toString(),
isgd: 1,
// isywlx: that.data.list.isywlx,
// money: that.data.list.money,
// hstr: hstr.toString(),
// isgd: 1,
// rise_need:that.data.isInvoice
}
Service.prescriptionPay(data).then((res) => {
Service.productPay(data).then((res) => {
console.log('res1', res);
switch (res.code) {
case 1:
......@@ -383,7 +394,7 @@ Page({
if (res.errMsg && res.errMsg == "requestPayment:ok") {
console.log("requestPayment:ok")
wx.reLaunch({
url: '/packageA/drugOrder/drugOrder'
url: '/packageA/productOrder/productOrder'
})
that.data.paySuccess = true;
return;
......@@ -475,7 +486,7 @@ Page({
}
})
},
/**
/**
*
*/
hideModal() {
......
......@@ -33,10 +33,10 @@
<image class="more" src="/images/more.png"></image>
</view>
</view>
<view class="line" wx:if='{{list.prescription.length>0}}'>
<view class="line" wx:if='{{list.healthcare.length>0}}'>
<text>推荐产品</text>
</view>
<block wx:for="{{list.prescription}}" wx:key="index">
<block wx:for="{{list.healthcare}}" wx:key="index">
<view class="list">
<view class="list-item">
<view class="image">
......@@ -55,10 +55,10 @@
</view>
</view>
</block>
<view wx:if='{{list.healthcare.length>0}}' class="line">
<!-- <view wx:if='{{list.healthcare.length>0}}' class="line">
<text>医生推荐</text>
</view>
<block wx:for="{{list.healthcare}}" wx:key="index" wx:for-index="index">
</view> -->
<!-- <block wx:for="{{list.healthcare}}" wx:key="index" wx:for-index="index">
<view class="list">
<checkbox data-index="{{index}}" checked="{{item.checked}}" bindtap="updataRadio" color='#1384ff' />
<view class="list-item1">
......@@ -77,7 +77,7 @@
<view class="number">x {{item.num}}</view>
</view>
</view>
</block>
</block> -->
<!-- 订单编号 -->
<view class="order-list">
<!-- <view class="order-num">
......@@ -88,11 +88,11 @@
<text>商品价格</text>
<view>
<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 class="order-num">
<!-- <view class="order-num">
<text>服务诊金</text>
<view>
<text style="color:#999999;font-size: 28rpx;">¥ </text>
......@@ -106,7 +106,7 @@
<text style=" color:#999999; font-size: 28rpx;">¥ </text>
<text class="fonw-400" style="font-size: 28rpx;">{{list.freight}}</text>
</view>
</view>
</view> -->
<!-- <view class="order-num">
<text>纸质发票</text>
<radio-group class="radio-group" bindchange="radioChange">
......
......@@ -14,9 +14,9 @@ Page({
},
/**
* 生命周期函数--监听页面加载
* @param {options.type} 进入途径1:购买服务,2:购买药物()身份证必填,3:医生列表
* @param {options.iShow} type=2||3 有选中id
* @param {options.item} type=2||3 有选中对象
* @param {*} options.type 进入途径1:购买服务,2:购买药物()身份证必填,3:医生列表
* @param {*} options.iShow type=2||3 有选中id
* @param {*} options.item type=2||3 有选中对象
*/
onLoad: function (options) {
console.log("options", options)
......
......@@ -10,7 +10,7 @@
<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-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>
<view class='item-content'>
......@@ -26,7 +26,7 @@
<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-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 class='item-content'>
<text class='item-name'>{{item.name}}</text>
......
......@@ -19,7 +19,7 @@
<view style='position:relative;height:214rpx;'>
<view class='item' bindtap='goChat' data-item='{{item}}' data-index="{{index}}">
<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>
<view class='info' style="{{index == serviceList.length -1?'border-bottom: none':''}}">
......
......@@ -67,7 +67,7 @@
</view>
<block wx:for="{{list.lcxl}}" wx:key="index">
<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>
<text class="user-name">{{item.name}}</text>
......@@ -100,7 +100,7 @@
</view>
<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}}">
<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>
<text class="user-name">{{item.name}}</text>
......
......@@ -1284,8 +1284,8 @@ Page({
}, 500)
}
})
} else if (Number(that.data.lb_id) == 60) {
// 瑞文
} else if (that.data.lb_tz == '3') {
// 瑞文高级和瑞文推理
wx.navigateTo({
url: '/pages/dati03/dati03',
success: function () {
......
......@@ -7,7 +7,7 @@ Page({
reportRedD: false, //报告红点展示
reportRedNum: 0, //未作报告数量
disabled:true,//防止重复点击
version:'3.1.6',
version:'3.2.0',
isShow:false,
showClose:true,
},
......
......@@ -43,6 +43,10 @@
<text>药品订单</text>
<image src='../../images/l@2x.png'></image>
</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">
<text>患者信息</text><text class="memo">完善后医生更好的为您服务</text>
<image src='../../images/l@2x.png'></image>
......
......@@ -86,7 +86,7 @@
<view class="{{filtrateSelect?'content':'content1'}}" wx:if='{{doctorList.length>0}}'>
<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}}">
<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>
<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=3100738",
"scene": 1011
},
{
"name": "packageA/productOrderDetail/productOrderDetail",
"pathName": "packageA/productOrderDetail/productOrderDetail",
"query": "id=111111111114478",
"scene": null
}
]
}
}
}
\ No newline at end of file
......@@ -16,7 +16,7 @@ function breakPromise() {
};
/**添加用户信息 */
function addUserInfo(param) {
var addUserInfoUrl = config.url.addUserInfo;
let addUserInfoUrl = config.url.addUserInfo;
return wxRequest.getRequest(addUserInfoUrl, param);
};
/**
......@@ -25,8 +25,8 @@ function addUserInfo(param) {
* @param {String} user 用户注册IM的id
*/
function getUserSig(user) {
var getUserSigUrl = config.url.getUserSig;
var data = {
let getUserSigUrl = config.url.getUserSig;
let data = {
"user": user
// "user": "oHhp80fVWvjJn2EYkB5XxhKnVBOo"
}
......@@ -37,8 +37,8 @@ function getUserSig(user) {
* @param {string} code 用户code
*/
function getOpenId(code) {
var getOpenId = config.url.getOpenId;
var data = {};
let getOpenId = config.url.getOpenId;
let data = {};
data.code = code;
return wxRequest.postRequest(getOpenId, data);
};
......@@ -47,8 +47,8 @@ function getOpenId(code) {
* @param {string} openid 小程序id
*/
function getUserData(openid) {
var getUserDataUrl = config.url.getUserData;
var data = {};
let getUserDataUrl = config.url.getUserData;
let data = {};
data.openid = openid;
return wxRequest.postRequest(getUserDataUrl, data);
};
......@@ -57,7 +57,7 @@ function getUserData(openid) {
* @param {Object} param
*/
function seeOpenId(param) {
var seeOpenIdUrl = config.url.seeOpenId;
let seeOpenIdUrl = config.url.seeOpenId;
return wxRequest.postRequest(seeOpenIdUrl, param);
};
/** 小程序强制更新
......@@ -198,7 +198,7 @@ function editAddress(param) {
* 是否可修改收货地址
* @param {*} param.ordernumber //订单号
*/
function isEditAddress(param){
function isEditAddress(param) {
var isEditAddressUrl = config.url.isEditAddress; //支付
return wxRequest.postRequest(isEditAddressUrl, param);
}
......@@ -450,6 +450,7 @@ function loadScene(param) {
var loadSceneUrl = config.url.loadScene;
return wxRequest.postRequest(loadSceneUrl, param);
}
function loadIMScene(param) {
var loadIMSceneUrl = config.url.loadIMScene;
return wxRequest.postRequest(loadIMSceneUrl, param);
......@@ -493,6 +494,11 @@ function buyDrugList(param) {
return wxRequest.postRequest(buyDrugListUrl, param);
}
function buyProductList(param) {
var buyProductListUrl = config.url.buyProductList;
return wxRequest.postRequest(buyProductListUrl, param);
}
function delBuyDrug(param) {
var delBuyDrugUrl = config.url.delBuyDrug;
return wxRequest.postRequest(delBuyDrugUrl, param);
......@@ -546,9 +552,14 @@ function acceptFollowUp(param) {
return wxRequest.postRequest(acceptFollowUpUrl, param);
}
function getPayStatus(param) {
var getPayStatusUrl = config.url.getPayStatus;
return wxRequest.postRequest(getPayStatusUrl, param);
function getPayStatusA(param) {
var getPayStatusAUrl = config.url.getPayStatusA;
return wxRequest.postRequest(getPayStatusAUrl, param);
}
function getPayStatusB(param) {
var getPayStatusBUrl = config.url.getPayStatusB;
return wxRequest.postRequest(getPayStatusBUrl, param);
}
function paySucceedCallback(param) {
......@@ -600,14 +611,37 @@ function drogOrderDetail(param) {
var drogOrderDetailUrl = config.url.drogOrderDetail;
return wxRequest.postRequest(drogOrderDetailUrl, param);
}
function productOrderDetail(param){
let productOrderDetailUrl=config.url.productOrderDetail;
return wxRequest.postRequest(productOrderDetailUrl,param);
}
/**
* 是否答题
* @param {*} param
*/
function getIsAnswer(param){
function getIsAnswer(param) {
var getIsAnswerUrl = config.url.getIsAnswer;
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) {
var getStopListUrl = config.url.getBusStopList;
......@@ -638,7 +672,7 @@ module.exports = {
prescriptionPay: prescriptionPay, //药方支付
addAddress: addAddress, //新增地址
editAddress: editAddress, //修改地址
isEditAddress:isEditAddress,//判断是否修改地址
isEditAddress: isEditAddress, //判断是否修改地址
addressList: addressList, //地址列表
defaultAddress: defaultAddress, //地址详情
isReport: isReport, //检测是否允许查看报告
......@@ -678,7 +712,7 @@ module.exports = {
delFriend: delFriend, //删除好友
appAddFriend: appAddFriend, //app.js添加好友
loadScene: loadScene, //加载量表二维码场景
loadIMScene:loadIMScene,//加载IM量表支付场景
loadIMScene: loadIMScene, //加载IM量表支付场景
seeBuyStaus: seeBuyStaus, //用户购买服务状态
endInquiry: endInquiry, //同意结束服务
refuseInquiry: refuseInquiry, //拒绝结束服务
......@@ -686,6 +720,7 @@ module.exports = {
getDrugList: getDrugList, //处方列表
getDrugDetail: getDrugDetail, //处方详情
buyDrugList: buyDrugList, //购药记录列表
buyProductList: buyProductList, //购买产品列表
delBuyDrug: delBuyDrug, //删除购药记录
confirmReceipt: confirmReceipt, //确认收货
getQuick: getQuick, //快速开药
......@@ -697,7 +732,8 @@ module.exports = {
checkCard: checkCard, //验证身份证与姓名
getTestInfo: getTestInfo, //获取检测信息
acceptFollowUp: acceptFollowUp, //接受随访
getPayStatus: getPayStatus, //获取药方支付状态
getPayStatusA: getPayStatusA, //获取药方支付状态
getPayStatusB: getPayStatusB, //获取药方支付状态
paySucceedCallback: paySucceedCallback, //支付成功回调
getChatMsgLog: getChatMsgLog, //获取消息历史记录
myServerList: myServerList, //我的服务列表
......@@ -705,5 +741,9 @@ module.exports = {
logisticsInfo: logisticsInfo, //物流信息
firendAfterRoom: firendAfterRoom, //成功加好友之后选择身份信息进入群聊房间
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) {
function zeroize(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 curDate = new Date(curTimestamp * 1000); // 当前时间日期对象
......
......@@ -12,7 +12,6 @@ function wxPromise(method,url,data){
data:data,
header:{'content-type': 'application/x-www-form-urlencoded'},
success:function(res){
// setTimeout(function () {
// wx.hideLoading();
// }, 100);
......
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