diff --git a/api/ProductList/ProductList.js b/api/ProductList/ProductList.js
index ed4c62a..13c6ea1 100644
--- a/api/ProductList/ProductList.js
+++ b/api/ProductList/ProductList.js
@@ -1,8 +1,16 @@
import request from "../request.js"
-export function goodsList(pageSize,pageNum,goodsCategoryId) {
+export function goodsList(pageSize, pageNum, goodsCategoryId, goodsName) {
return request({
- url: `/nurseApplet/nursingStationGoods/goodsList?pageSize=${pageSize}&pageNum=${pageNum}&goodsCategoryId=${goodsCategoryId}`,
+ url: `/nurseApplet/nursingStationGoods/goodsList?pageSize=${pageSize}&pageNum=${pageNum}&goodsCategoryId=${goodsCategoryId}&goodsName=${goodsName}`,
method: 'GET'
})
-}
\ No newline at end of file
+}
+
+//查询商品分类二级分类上边列表 小程序
+export function getGoodsCategoryNameList(goodsCategoryId) {
+ return request({
+ url: `/nurseApplet/nursingStationGoods/getGoodsCategoryNameList?goodsCategoryId=${goodsCategoryId}`,
+ method: 'GET'
+ })
+}
diff --git a/api/ProjectDetails/index.js b/api/ProjectDetails/index.js
new file mode 100644
index 0000000..bf08060
--- /dev/null
+++ b/api/ProjectDetails/index.js
@@ -0,0 +1,8 @@
+import request from "../request.js"
+
+export function getAppStationItemInfo(stationId, stationItemId, stationItemPriceId) {
+ return request({
+ url: `/nurseApp/login/getAppStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`,
+ method: 'GET'
+ })
+}
diff --git a/api/baseurl.js b/api/baseurl.js
index 6cd999d..c7e0858 100644
--- a/api/baseurl.js
+++ b/api/baseurl.js
@@ -1,4 +1,5 @@
// var baseurl = "http://218.59.93.251:8077";
// var baseurl = "http://218.59.93.251:8099";
-var baseurl = "http://192.168.16.77:8099";
+var baseurl = "http://192.168.16.30:8080";
+// var baseurl = "https://quanyidaojia.xinelu.cn";
export default baseurl
diff --git a/api/forgotPassword/forgotPassword.js b/api/forgotPassword/forgotPassword.js
deleted file mode 100644
index 8580fee..0000000
--- a/api/forgotPassword/forgotPassword.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import request from "../request.js"
-
-export function ForgotPassword(phone, password,verification) {
- return request({
- url: `/nurseApp/login/appForgotPassword?phone=${phone}&password=${password}&verification=${verification}`,
- method: 'POST'
- })
-}
diff --git a/api/login/index.js b/api/login/index.js
index 80f6df3..673c75b 100644
--- a/api/login/index.js
+++ b/api/login/index.js
@@ -1,8 +1,15 @@
import request from "../request.js"
-export function getWeChatUser(loginCode,phoneCode) {
+export function getWeChatUser(loginCode, phoneCode) {
return request({
url: `/nurseApplet/login/getWeChatUserInfo?loginCode=${loginCode}&phoneCode=${phoneCode}`,
method: 'GET'
})
-}
\ No newline at end of file
+}
+
+export function createMobileToken() {
+ return request({
+ url: `/nurseApplet/authorization/createMobileToken`,
+ method: 'GET'
+ })
+}
diff --git a/api/lookrate/index.js b/api/lookrate/index.js
new file mode 100644
index 0000000..cead2df
--- /dev/null
+++ b/api/lookrate/index.js
@@ -0,0 +1,9 @@
+import request from "../request.js"
+
+// 修改信息
+export function lookrate(orderNo) {
+ return request({
+ url: `/nurseApp/orderEvaluate/selectOrderEvaluate?orderNo=${orderNo}`,
+ method: 'GET'
+ })
+}
diff --git a/api/modifyAddress/modifyAddress.js b/api/modifyAddress/modifyAddress.js
index c26d6ee..34d4d74 100644
--- a/api/modifyAddress/modifyAddress.js
+++ b/api/modifyAddress/modifyAddress.js
@@ -1,13 +1,14 @@
import request from "../request.js"
+
// 根据被护理人id查询基本信息
-export function goodPatientInfo(patientId){
+export function goodPatientInfo(patientId) {
return request({
url: `/nurseApplet/nursingStationGoods/goodPatientInfo?patientId=${patientId}`,
method: 'GET'
})
}
// 新增基本信息
-export function addnursingStation(data){
+export function addnursingStation(data) {
return request({
url: '/nurseApplet/nursingStationGoods/add',
method: 'POST',
@@ -17,7 +18,7 @@ export function addnursingStation(data){
// 修改基本信息
-export function updatenursingStation(data){
+export function updatenursingStation(data) {
return request({
url: '/nurseApplet/nursingStationGoods/edit',
method: 'POST',
@@ -25,7 +26,7 @@ export function updatenursingStation(data){
})
}
// 修改反显
-export function nursingStationGoodsinfo(id){
+export function nursingStationGoodsinfo(id) {
return request({
url: '/nurseApplet/nursingStationGoods/' + id,
method: 'GET'
@@ -34,24 +35,46 @@ export function nursingStationGoodsinfo(id){
// 删除
export function delnursingStation(id) {
- return request({
- url: '/nurseApplet/nursingStationGoods/' + id,
- method: 'delete'
- })
+ return request({
+ url: '/nurseApplet/nursingStationGoods/' + id,
+ method: 'delete'
+ })
}
// 查询
-export function getSubordinate(areaCode){
+export function getSubordinate(areaCode) {
return request({
url: `/nurseApplet/nursingStationGoods/getSubordinateRegions?areaCode=${areaCode}`,
method: 'GET'
})
}
-//区街道list
+// //区街道list
+// export function getSubordinateRegions(areaCode) {
+// return request({
+// url: `/nurseApplet/nursingStationGoods/getSubordinateRegions?areaCode=${areaCode}`,
+// method: 'GET'
+// })
+// }
+//省list
export function getSubordinateRegions(areaCode) {
return request({
- url: `/nurseApplet/login/getRegionAndStreetInfo?areaCode=${areaCode}`,
+ url: `/nurseApplet/login/getProvinceInfo?areaCode=${areaCode}`,
+ method: 'GET'
+ })
+}
+//市区街道list
+export function getSubordinateInfo(id) {
+ return request({
+ url: `/nurseApplet/login/getSubordinateInfo?areaCode=${id}`,
method: 'GET'
})
}
+//默认地址
+export function updateDefaultAddress(data) {
+ return request({
+ url: `/nurseApplet/nursingStationGoods/updateDefaultAddress`,
+ method: 'POST',
+ data
+ })
+}
diff --git a/api/order/index.js b/api/order/index.js
new file mode 100644
index 0000000..7bbe944
--- /dev/null
+++ b/api/order/index.js
@@ -0,0 +1,9 @@
+import request from "../request.js"
+
+export function orderCount(patientId) {
+ return request({
+ url: `/nurseApp/login/orderCount?patientId=${patientId}`,
+ method: 'GET'
+ })
+}
+
diff --git a/api/request.js b/api/request.js
index 77c0197..a0d6add 100644
--- a/api/request.js
+++ b/api/request.js
@@ -10,10 +10,26 @@ var request = function(config) {
data: config.data,
method: config.method,
timeout: 10000,
- // header: {
- // token: uni.getStorageSync('token')
- // },
+ header: {
+ Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
+ },
success(res) {
+ if (res.data.code == 9999) {
+ uni.removeStorageSync('token');
+ let pages = getCurrentPages();
+ let path = pages[pages.length - 1].$page.fullPath
+ if (path == '/pages/user/user') {
+ setTimeout(e => {
+ uni.navigateBack({
+ delta: 1
+ })
+ }, 200);
+ } else {
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }
+ }
uni.hideLoading();
resolve(res.data)
},
diff --git a/api/shopping/shopping.js b/api/shopping/shopping.js
index 6202c1f..4f273ad 100644
--- a/api/shopping/shopping.js
+++ b/api/shopping/shopping.js
@@ -1,8 +1,8 @@
import request from "../request.js"
-export function goodsCategoryList(pageSize,pageNum) {
+export function goodsCategoryList(pageSize, pageNum) {
return request({
- url: `/nurseApplet/nursingStationGoods/goodsCategoryList?pageSize=${pageSize}&pageNum=${pageNum}`,
+ url: `/nurseApplet/nursingStationGoods/goodsCategoryList?pageSize=${pageSize}&pageNum=${pageNum}&categoryLevel=${1}`,
method: 'GET'
})
}
diff --git a/main.js b/main.js
index b250490..24ceff6 100644
--- a/main.js
+++ b/main.js
@@ -4,6 +4,8 @@ import App from './App'
import Vue from 'vue'
import uView from "uview-ui";
Vue.use(uView);
+// import share from './share.js'
+// Vue.mixin(share)
Vue.config.productionTip = false
App.mpType = 'app'
diff --git a/manifest.json b/manifest.json
index b0dbda3..a7dd506 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,5 +1,5 @@
{
- "name" : "NurseStationAppletUI",
+ "name" : "nurseWeChatAppletUI",
"appid" : "__UNI__1200110",
"description" : "",
"versionName" : "1.0.0",
@@ -17,7 +17,9 @@
"delay" : 0
},
/* 模块配置 */
- "modules" : {},
+ "modules" : {
+ "Geolocation" : {}
+ },
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
@@ -43,7 +45,13 @@
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
- "sdkConfigs" : {},
+ "sdkConfigs" : {
+ "geolocation" : {
+ "system" : {
+ "__platform__" : [ "ios", "android" ]
+ }
+ }
+ },
"splashscreen" : {
"androidStyle" : "common"
}
@@ -63,16 +71,16 @@
// app.json
"permission" : {
"scope.userLocation" : {
- "desc" : "你的位置信息将用于小程序定位"
- }
- },
- "requiredPrivateInfos" : [ "getLocation" ],
- "plugins" : {
- "chooseLocation" : {
- "version" : "1.0.9",
- "provider" : "wx76a9a06e5b4e693e"
+ "desc" : "你的位置信息将用于护理站列表的位置查询"
}
},
+ "requiredPrivateInfos" : [ "chooseLocation", "getLocation" ],
+ // "plugins": {
+ // "chooseLocation": {
+ // "version": "1.0.9",
+ // "provider": "wx76a9a06e5b4e693e"
+ // }
+ // },
"uniStatistics" : {
"enable" : true
},
diff --git a/package-lock.json b/package-lock.json
index e144b6e..7df7a29 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,5 +1,5 @@
{
- "name": "NurseStationAppletUI",
+ "name": "nurseWeChatAppletUI",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/pages.json b/pages.json
index 92408f5..3845169 100644
--- a/pages.json
+++ b/pages.json
@@ -9,6 +9,29 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
+ }, {
+ "path": "pages/modifyAddress/modifyAddress",
+ "style": {
+ "navigationBarTitleText": "修改地址",
+ "navigationBarBackgroundColor": "#ffffff", //背景颜色
+ "enablePullDownRefresh": true //设置参数为true
+ }
+ }, {
+ "path": "pages/information/information",
+ "style": {
+ "navigationBarTitleText": "完善个人信息",
+ "navigationBarBackgroundColor": "#ffffff", //背景颜色
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "pages/lookrate/lookrate",
+ "style": {
+ "navigationBarTitleText": "查看评价",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#ffffff"
+ }
+
}, {
"path": "pages/ServiceDetails/ServiceDetails",
"style": {
@@ -17,6 +40,14 @@
"navigationBarBackgroundColor": "#ffffff" //背景颜色
}
+ }, {
+ "path": "pages/ProjectDetails/ProjectDetails",
+ "style": {
+ "navigationBarTitleText": "护理项目详情",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#ffffff" //背景颜色
+ }
+
}, {
"path": "pages/goodsorderRate/goodsorderRate",
"style": {
@@ -39,13 +70,6 @@
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //背景颜色
}
- }, {
- "path": "pages/information/information",
- "style": {
- "navigationBarTitleText": "完善个人信息",
- "navigationBarBackgroundColor": "#ffffff", //背景颜色
- "enablePullDownRefresh": false
- }
}, {
"path": "pages/appointmenttime/appointmenttime",
"style": {
@@ -60,12 +84,20 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "pages/ratesuccess/ratesuccess",
+ "style": {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
}, {
"path": "pages/shopping/shopping", //商城
"style": {
"navigationBarTitleText": "医路优品",
"navigationBarBackgroundColor": "#ffffff",
- "onReachBottomDistance": 20, //距离底部多远时触发 单位为px
+ "onReachBottomDistance": 40, //距离底部多远时触发 单位为px
"enablePullDownRefresh": true //设置参数为true
}
}, {
@@ -73,7 +105,7 @@
"style": {
"navigationBarTitleText": "商品订单",
"navigationBarBackgroundColor": "#ffffff",
- "onReachBottomDistance": 20, //距离底部多远时触发 单位为px
+ "onReachBottomDistance": 40, //距离底部多远时触发 单位为px
"enablePullDownRefresh": true //设置参数为true
}
},
@@ -133,7 +165,7 @@
"style": {
"navigationBarTitleText": "护理站服务订单",
"navigationBarBackgroundColor": "#ffffff", //背景颜色
- "onReachBottomDistance": 20, //距离底部多远时触发 单位为px
+ "onReachBottomDistance": 40, //距离底部多远时触发 单位为px
"enablePullDownRefresh": true //设置参数为true
}
@@ -179,6 +211,14 @@
"navigationBarBackgroundColor": "#ffffff"
}
},
+ {
+ "path": "pages/menttimeorder/menttimeorder",
+ "style": {
+ "navigationBarTitleText": "预约详情",
+ "enablePullDownRefresh": false
+ }
+
+ },
{
"path": "pages/homepage/homepage",
"style": {
@@ -220,7 +260,7 @@
"navigationBarTitleText": "医路优品",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
- "onReachBottomDistance": 20, //距离底部多远时触发 单位为px
+ "onReachBottomDistance": 40, //距离底部多远时触发 单位为px
"enablePullDownRefresh": true //设置参数为true
}
},
@@ -248,7 +288,7 @@
"navigationBarTitleText": "附近护理站",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff", //背景颜色
- "onReachBottomDistance": 20, //距离底部多远时触发 单位为px
+ "onReachBottomDistance": 40, //距离底部多远时触发 单位为px
"enablePullDownRefresh": true //设置参数为true
}
},
@@ -268,15 +308,7 @@
"navigationBarBackgroundColor": "#ffffff"
}
},
- {
- "path": "pages/modifyAddress/modifyAddress",
- "style": {
- "navigationBarTitleText": "修改地址",
- "enablePullDownRefresh": false,
- "navigationBarBackgroundColor": "#ffffff" //背景颜色
- }
- },
{
"path": "pages/Doctordetails/Doctordetails",
"style": {
@@ -284,15 +316,6 @@
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
- }
-
- , {
- "path": "pages/menttimeorder/menttimeorder",
- "style": {
- "navigationBarTitleText": "预约详情",
- "enablePullDownRefresh": false
- }
-
}, {
"path": "pages/Geriatricdisease/Geriatricdisease",
"style": {
@@ -308,6 +331,21 @@
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
+ }, {
+ "path": "pages/toptabbar/toptabbar",
+ "style": {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ },
+ {
+ "path": "pages/classification/classification",
+ "style": {
+ "navigationBarTitleText": "分类",
+ "enablePullDownRefresh": false
+ }
+
}
],
"globalStyle": {
diff --git a/pages/Applforrefund/Applforrefund.vue b/pages/Applforrefund/Applforrefund.vue
index c59a15f..793c0e9 100644
--- a/pages/Applforrefund/Applforrefund.vue
+++ b/pages/Applforrefund/Applforrefund.vue
@@ -54,7 +54,7 @@
order: {}, //订单
reasonlist: [], //退款原因list
dictname: '', //页面退款原因字段
- timer:null,
+ timer: null,
}
},
methods: {
@@ -69,6 +69,7 @@
type: 'error'
})
} else {
+ uni.setStorageSync("Refresh", 'Refresh')
this.$refs.uToast.show({
title: '退款申请提交成功',
type: 'success',
@@ -79,7 +80,7 @@
}
this.timer = setTimeout(e => {
uni.navigateBack({
- delta: 3
+ delta: 4
})
}, 1500)
}
diff --git a/pages/AppointmentRecord/AppointmentRecord.vue b/pages/AppointmentRecord/AppointmentRecord.vue
index 113c787..27ee482 100644
--- a/pages/AppointmentRecord/AppointmentRecord.vue
+++ b/pages/AppointmentRecord/AppointmentRecord.vue
@@ -13,7 +13,7 @@
内科门诊-主任医师
-
+
@@ -39,7 +39,7 @@
内科门诊-主任医师
-
+
@@ -47,7 +47,6 @@
实付款:
¥28.0
-
查看结果
@@ -64,7 +63,23 @@
}
},
methods: {
-
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
}
}
@@ -109,7 +124,7 @@
height: 230rpx;
// background-color: red;
margin: 0 auto;
- display:flex;
+ display: flex;
.img {
width: 169rpx;
@@ -120,21 +135,23 @@
}
.texts {
-
- margin-top: 7%;
+
+ margin-top: 7%;
// width: 169rpx;
height: 171rpx;
margin-left: 6%;
+
// background: #BFBFBF;
- .name{
+ .name {
height: 70rpx;
font-size: 38rpx;
-
+
color: #000000;
line-height: 70rpx;
}
- .doctor{
+
+ .doctor {
height: 60rpx;
font-size: 35rpx;
color: #969394;
@@ -142,12 +159,14 @@
}
}
}
- .Apayment{
+
+ .Apayment {
width: 90%;
margin: 0 auto;
// background-color: red;
display: flex;
- .money{
+
+ .money {
height: 29rpx;
font-size: 30rpx;
@@ -155,7 +174,8 @@
line-height: 29rpx;
// margin-top: -40px;
}
- .price{
+
+ .price {
font-family: Adobe Heiti Std;
font-weight: normal;
line-height: 29rpx;
@@ -164,7 +184,8 @@
color: #000000;
line-height: 77rpx;
}
- .result{
+
+ .result {
width: 217rpx;
height: 68rpx;
line-height: 68rpx;
diff --git a/pages/Bodysatelliteintegration/Bodysatelliteintegration.vue b/pages/Bodysatelliteintegration/Bodysatelliteintegration.vue
index 5fc337b..b388325 100644
--- a/pages/Bodysatelliteintegration/Bodysatelliteintegration.vue
+++ b/pages/Bodysatelliteintegration/Bodysatelliteintegration.vue
@@ -21,7 +21,25 @@
return {
};
- }
+ },
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
}
diff --git a/pages/CommodityDetails/CommodityDetails.vue b/pages/CommodityDetails/CommodityDetails.vue
index 4987e26..ce6db32 100644
--- a/pages/CommodityDetails/CommodityDetails.vue
+++ b/pages/CommodityDetails/CommodityDetails.vue
@@ -2,11 +2,14 @@
-
+
{{goodsDetailslist.goodsName}}
+
+ 暂无
+
- ¥{{goodsPrice}} 起
+ ¥{{goodsPrice}}
@@ -43,7 +46,9 @@
图文服务
-
+
+
+
@@ -54,12 +59,15 @@
-
+
-
- {{goodsDetailslist.goodsName}}
+
+ {{goodsDetailslist.goodsName}}
+
+
+ 暂无
¥{{updata.goodsPrice}}
@@ -68,31 +76,70 @@
库存数量:{{updata.goodsStock}}
-
-
-
- {{item.attributeDetailsName}}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{updata.receiver}},{{updata.phone}}
+
+
+ {{updata.receiveAddress}}
+
+
+ 前往完善个人信息
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.attributeDetailsName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 微信支付
+
+
+
+
立即购买
@@ -128,10 +175,14 @@
goodPatientInfo
} from '@/api/modifyAddress/modifyAddress.js';
import baseurl from '@/api/baseurl.js'
+ import {
+ addStationGoodsOrder,
+ appletGoodsOrderPay
+ } from '@/api/confirmOrder/index.js'
export default {
data() {
return {
- timer:null,
+ timer: null,
goodsInfoId: null, //商品id
baseurl: '', //url
image: null, //总图片
@@ -142,6 +193,7 @@
goodshow: true, //商品规格开关
buyshow: false, //立即购买遮罩层开关
info: [], //轮播list
+ goodsAttributeId: null, //商品规格id
updata: { //订单表
goodsPrice: 0.00,
goodsName: "",
@@ -164,10 +216,20 @@
attributeDetailsId: '', //商品属性明细表id
goodsAttributeId: '',
goodsAttributeDetailsId: '',
- }
+ },
+ scrollTop: 0,
+ old: {
+ scrollTop: 0
+ },
+ userid: null,
};
},
methods: {
+ upper: function(e) {},
+ lower: function(e) {},
+ scroll: function(e) {
+ this.old.scrollTop = e.detail.scrollTop
+ },
//跳转完善页面
goinformation() {
this.usershow = false
@@ -177,78 +239,128 @@
},
//立即购买跳转确认订单页面
tapbuy() {
- let that = this
+ var that = this
try {
const value = uni.getStorageSync('openid');
- if (value) {
- const value2 = uni.getStorageSync('patientId');
- if (value2) {
- if (!that.updata.patientId) {
- that.goodsList()
- }
- that.updata.patientId = value2
- AppIdentification(value2).then(res => {
- if (res.code == 200) {
- if (res.data.loginFlag) {
- if (that.goodshow == true) {
- if (that.updata.goodsAttributeName == '') {
- that.$refs.uToast.show({
- title: '未选择商品',
- type: 'error'
- })
- } else if (that.updata.goodsStock == 0) {
- that.$refs.uToast.show({
- title: '库存数量不足,无法购买',
- type: 'error'
- })
- } else {
- that.buyshow = false
- that.updata.totalPrice = (that.updata.goodsPrice * that.updata
- .goodsCount).toFixed(
- 2)
- uni.navigateTo({
- url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
- })
- }
+ const value2 = uni.getStorageSync('patientId');
+ if (value && value2) {
+ that.updata.patientId = value2
+ AppIdentification(value2).then(res => {
+ if (res.code == 200) {
+ if (res.data.loginFlag) {
+ if (this.goodshow == true) {
+ if (this.updata.goodsAttributeName == '') {
+ that.$refs.uToast.show({
+ title: '未选择商品',
+ type: 'error'
+ })
+ } else if (this.updata.goodsStock == 0) {
+ that.$refs.uToast.show({
+ title: '库存数量不足,无法购买',
+ type: 'error'
+ })
} else {
- that.buyshow = false
- uni.navigateTo({
- url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
+ this.buyshow = false
+ this.updata.totalPrice = (this.updata.goodsPrice * this.updata
+ .goodsCount).toFixed(
+ 2)
+ addStationGoodsOrder(this.updata).then(res => {
+ if (res.code == 500) {
+ that.$refs.uToast.show({
+ title: res.msg,
+ type: 'error'
+ })
+ } else {
+ let id = res.data.id
+ let paydata = res.data
+ paydata.openid = value
+ paydata.payType = "WECHAT_PAY"
+ paydata.paymentPrice = res.data.totalPrice
+ appletGoodsOrderPay(paydata).then(response => {
+ if (response.code == 200) {
+ uni.requestPayment({
+ timeStamp: response
+ .data.timeStamp,
+ nonceStr: response.data
+ .nonceStr,
+ package: response.data
+ .prepayId,
+ signType: response.data
+ .signType,
+ paySign: response.data
+ .paySign,
+ success: function(
+ res) {
+ that.goodsDetailsinfo(
+ that
+ .goodsInfoId
+ )
+ that.$refs
+ .uToast
+ .show({
+ title: '支付成功',
+ type: 'success',
+ duration: 1000,
+ url: '/pages/paysuccess/paysuccess'
+ })
+ },
+ fail: function(err) {
+ that.goodsDetailsinfo(
+ that
+ .goodsInfoId
+ )
+ that.$refs
+ .uToast
+ .show({
+ title: '取消支付',
+ type: 'error',
+ duration: 1000,
+ url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
+ })
+ // uni.navigateTo({
+ // url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
+ // })
+ }
+ });
+ } else {
+ that.$refs.uToast.show({
+ title: response.msg,
+ type: 'error',
+ duration: 1000
+ })
+ }
+ })
+ }
})
}
} else {
- that.buyshow = false
- that.usershow = true
+ that.$refs.uToast.show({
+ title: '未选择商品',
+ type: 'error'
+ })
+ // that.buyshow = false
+ // uni.navigateTo({
+ // url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
+ // })
}
} else {
- that.$refs.uToast.show({
- title: res.msg,
- type: 'error'
- })
- if (that.timer) {
- clearTimeout(that.timer)
- }
- that.timer = setTimeout(e => {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }, 1500)
+ this.usershow = true
}
- })
- } else {
- that.$refs.uToast.show({
- title: '未登录,请先登录',
- type: 'error'
- })
- if (that.timer) {
- clearTimeout(that.timer)
- }
- that.timer = setTimeout(e => {
- uni.navigateTo({
- url: '/pages/login/login'
+ } else if (res.code == 9999) {} else {
+ that.$refs.uToast.show({
+ title: res.msg,
+ type: 'error'
})
- }, 1500)
- }
+ if (that.timer) {
+ clearTimeout(that.timer)
+ }
+ that.timer = setTimeout(e => {
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }, 1500)
+ }
+ })
} else {
that.$refs.uToast.show({
title: '未登录,请先登录',
@@ -267,26 +379,28 @@
},
//选择商品
isActivegoods(item) {
- this.updata.goodsPrice = 0
- this.updata.goodsAttributeName = ''
if (item.isActive == true) {
- this.goodDetailsLists.forEach(e => {
- e.isActive = false
- })
- this.updata.goodsAttributeName = ''
- this.updata.goodsPrice = 0
- this.updata.attributeDetailsId = ''
- this.updata.goodsStock = 0
- this.updata.img = this.image
+ // this.updata.goodsPrice = 0
+ // this.updata.goodsAttributeName = ''
+ // this.goodDetailsLists.forEach(e => {
+ // e.isActive = false
+ // })
+ // this.updata.goodsAttributeName = ''
+ // this.updata.goodsPrice = 0
+ // this.updata.attributeDetailsId = ''
+ // this.updata.goodsStock = 0
+ // this.updata.img = this.image
} else {
this.goodDetailsLists.forEach(e => {
e.isActive = false
})
item.isActive = true
+ this.goodsAttributeId = item.goodsAttributeId
this.updata.img = item.attributePitureUrl
this.updata.goodsAttributeName = item.attributeDetailsName
this.updata.goodsPrice = item.goodsPrice
this.updata.goodsPrice = this.updata.goodsPrice.toFixed(2)
+ this.goodsPrice = this.updata.goodsPrice
this.updata.attributeDetailsId = item.attributeDetailsId
this.updata.goodsStock = item.goodsStock
this.updata.goodsAttributeId = item.goodsAttributeId
@@ -295,19 +409,25 @@
},
// 查询商品详细信息
goodsDetailsinfo(goodsInfoId) {
+ let that = this
goodsDetails(goodsInfoId).then(res => {
- res.data[0].goodsPictureUrl = this.baseurl + res.data[0].goodsPictureUrl
- this.image = res.data[0].goodsPictureUrl
+ uni.removeStorageSync('Refresh');
+ if (res.data.goodsRemark) {
+ res.data.goodsRemark = res.data.goodsRemark.replace(/\
{
+ res.data.goodAttributeDetailsLists.forEach(e => {
e.attributePitureUrl = this.baseurl + e.attributePitureUrl
e.isActive = false
var objs = {
@@ -315,51 +435,150 @@
}
this.info.push(objs)
})
- this.goodDetailsLists = res.data[0].goodDetailsLists
+ this.goodDetailsLists = res.data.goodAttributeDetailsLists
this.goodshow = true
}
- this.goodsDetailslist = res.data[0]
+ this.goodsDetailslist = res.data
this.updata.goodsName = this.goodsDetailslist.goodsName
this.updata.nurseStationId = this.goodsDetailslist.nurseStationId
- this.updata.img = res.data[0].goodsPictureUrl
- this.updata.goodsAttributeName = ''
- this.updata.goodsPrice = 0
- this.updata.attributeDetailsId = ''
- this.updata.goodsStock = 0
- this.updata.img = this.image
+ if (this.goodDetailsLists.length == 1) {
+ this.goodDetailsLists[0].isActive = true
+ this.updata.img = this.goodDetailsLists[0].attributePitureUrl
+ this.updata.goodsAttributeName = this.goodDetailsLists[0].attributeDetailsName
+ this.updata.goodsPrice = this.goodDetailsLists[0].goodsPrice
+ this.updata.goodsPrice = this.updata.goodsPrice.toFixed(2)
+ this.updata.attributeDetailsId = this.goodDetailsLists[0].attributeDetailsId
+ this.updata.goodsStock = this.goodDetailsLists[0].goodsStock
+ this.updata.goodsAttributeId = this.goodDetailsLists[0].goodsAttributeId
+ this.updata.goodsAttributeDetailsId = this.goodDetailsLists[0].attributeDetailsId
+ } else {
+ var list = {}
+ this.goodsDetailslist.goodAttributeDetailsLists.forEach(e => {
+ if (e.goodsAttributeId == this.goodsAttributeId) {
+ list = e
+ e.isActive = true
+ this.updata.goodsAttributeId = e.goodsAttributeId
+ this.updata.goodsAttributeDetailsId = e.attributeDetailsId
+ }
+ })
+ this.updata.img = list.attributePitureUrl
+ this.updata.goodsAttributeName = list.attributeDetailsName
+ this.updata.goodsPrice = list.goodsPrice
+ this.updata.attributeDetailsId = list.attributeDetailsId
+ this.updata.goodsStock = list.goodsStock
+ this.updata.img = list.attributePitureUrl
+ }
+ // this.updata.nurseStationId = this.goodsDetailslist.nurseStationId
+ // this.updata.img = res.data.goodsPictureUrl
+ // this.updata.goodsAttributeName = ''
+ // this.updata.goodsPrice = 0
+ // this.updata.attributeDetailsId = ''
+ // this.updata.goodsStock = 0
+ // this.updata.img = list.image
})
},
+ //跳转到全部收货地址
+ upaddress() {
+ if (this.updata.receiver) {
+ uni.navigateTo({
+ url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.updata)}`
+ })
+ } else {
+ uni.navigateTo({
+ url: '/pages/information/information'
+ })
+ }
+ },
// 收件人
goodsList() {
goodPatientInfo(this.updata.patientId).then(res => {
- res.data.forEach(e => {
- e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
- .receiveAddress
- })
- this.updata.receiver = res.data[0].receiveName
- this.updata.receiveAddress = res.data[0].address
- this.updata.phone = res.data[0].receivePhone
+ // res.data.forEach(e => {
+ // e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
+ // .receiveAddress
+ // })
+ var list = res.data.filter(e => e.defaultAddressFlag == 1)
+ if (list.length >= 1) {
+ this.updata.receiver = list[0].receiveName
+ this.updata.receiveAddress = list[0].areaName + list[0].receiveAddress
+ this.updata.phone = list[0].receivePhone
+ this.userid = list[0].id
+ } else {
+ this.updata.receiver = res.data[0].receiveName
+ this.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
+ this.updata.phone = res.data[0].receivePhone
+ this.userid = res.data[0].id
+ }
})
},
},
onLoad(options) { //获取传值
- this.updata.buySource = options.buySource
+ var that = this
this.goodsPrice = options.goodsPrice //页面价格
+ this.goodsAttributeId = options.goodsAttributeId
+ this.updata.buySource = options.buySource
this.goodsInfoId = options.goodsInfoId
+ const value = uni.getStorageSync('patientId');
+ if (value) {
+ that.updata.patientId = value
+ that.goodsList()
+ } else {}
},
-
onShow() {
+ var that = this
this.baseurl = baseurl
this.usershow = false
this.goodsDetailsinfo(this.goodsInfoId)
- let that = this
- try {
- const value = uni.getStorageSync('patientId');
- if (value) {
- that.updata.patientId = value
- that.goodsList()
- } else {}
- } catch (e) {}
+ goodPatientInfo(this.updata.patientId).then(res => {
+ var user = res.data.filter(e => e.id == this.userid)
+ if (user.length >= 1) {
+ // user[0].address = user[0].provinceName + user[0].cityName + user[0].regionName + user[0]
+ // .streetName + user[0].receiveAddress
+ this.updata.receiver = user[0].receiveName
+ this.updata.receiveAddress = user[0].areaName + user[0].receiveAddress
+ this.updata.phone = user[0].receivePhone
+ this.userid = user[0].id
+ } else {
+ // res.data.forEach(e => {
+ // e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
+ // .receiveAddress
+ // })
+ this.updata.receiver = res.data[0].receiveName
+ // this.updata.receiveAddress = res.data[0].address
+ this.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
+ this.updata.phone = res.data[0].receivePhone
+ this.userid = res.data[0].id
+ }
+ })
+ let useritem = null
+ uni.$on('updata', function(data) {
+ that.updata = JSON.parse(data.updata)
+ if (data.useritem) {
+ useritem = JSON.parse(data.useritem)
+ that.updata.receiver = useritem.receiveName
+ that.updata.phone = useritem.receivePhone
+ // that.updata.receiveAddress = useritem.address
+ that.updata.receiveAddress = useritem.areaName + useritem.receiveAddress
+ that.userid = useritem.id
+ }
+ })
+ },
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
},
}
diff --git a/pages/CommodityDetails/CommodityDetailsstyle.scss b/pages/CommodityDetails/CommodityDetailsstyle.scss
index a2fbd25..fa8850b 100644
--- a/pages/CommodityDetails/CommodityDetailsstyle.scss
+++ b/pages/CommodityDetails/CommodityDetailsstyle.scss
@@ -1,6 +1,9 @@
.app {
padding: 0;
-
+ .scroll-Y {
+ height: 790rpx;
+ background-color: #F4F5F7;
+ }
.mask {
.information {
width: 70%;
@@ -50,25 +53,71 @@
.PurchasePage {
position: fixed;
bottom: 0;
+ height: 1150rpx;
width: 100%;
background: #FFFFFF;
border-radius: 30rpx 30rpx 0px 0px;
font-size: 36rpx;
padding-bottom: 20rpx;
-
+ .bodys {
+ background-color: #FFFFFF;
+ width: 96%;
+ margin: 10rpx auto 0;
+ border-radius: 20rpx;
+ padding: 15rpx 0 20rpx;
+ position: relative;
+ .addressinfo {
+ font-size: 32rpx;
+ line-height: 65rpx;
+ margin-left: 90rpx;
+ image{
+ width: 40rpx;
+ height: 50rpx;
+ position: absolute;
+ top:50%;
+ left:20rpx;
+ transform: translateY(-50%);
+ }
+ .address{
+ padding-top: 10rpx;
+ width:92%;
+ font-size: 30rpx;
+ word-break:break-all;
+ line-height: 45rpx;
+ }
+ .namephone{
+ width: 70%;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+ .picture2 {
+ position: absolute;
+ top:50%;
+ right:20rpx;
+ transform: translateY(-50%);
+ image {
+ width: 18rpx;
+ height: 18rpx;
+ color: #FFFFFF;
+ margin-left: 20rpx;
+ }
+ }
+ }
+ }
.close {
width: 31rpx;
height: 31rpx;
position: absolute;
top: 2%;
right: 2%;
+ z-index: 999;
}
.topcontent {
- width: 90%;
+ width: 96%;
margin: 0 auto;
- padding-bottom: 24rpx;
- border-bottom: 1rpx solid #D8D4D4;
+ padding-bottom: 15rpx;
position: relative;
.goodsStock{
font-size: 24rpx;
@@ -86,19 +135,23 @@
.title {
font-size: 36rpx;
position: absolute;
- top: 0%;
+ top: 3%;
left: 38%;
font-weight: 600;
width: 58%;
- height: 85rpx;
+ // height: 85rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 3;
+ word-break: break-all;
}
.image {
- width: 215rpx;
- height: 215rpx;
- background: rgba(150, 147, 148, 0.21);
- margin: 35rpx 0 0 0;
-
+ width: 200rpx;
+ height: 200rpx;
+ margin: 15rpx 0 0 0;
image {
width: 201rpx;
height: 201rpx;
@@ -116,16 +169,41 @@
text-align: center;
line-height: 71rpx;
border-radius: 26rpx;
- margin: 40rpx 0 0 20%;
+ position: absolute;
+ bottom:30rpx;
+ left:20%;
}
.bottomcontent {
- margin-top: 34rpx;
- padding-bottom: 35rpx;
-
+ margin-top: 10rpx;
+ padding: 35rpx 0;
+ background-color: #FFFFFF;
+ border-radius: 15rpx;
+ .chat {
+ height: 130rpx;
+ position: relative;
+ span {
+ font-size: 30rpx;
+ position: absolute;
+ left:130rpx;
+ top:50%;
+ transform: translateY(-50%);
+ }
+
+ image {
+ position: absolute;
+ left:30rpx;
+ top:50%;
+ transform: translateY(-50%);
+ width: 65rpx;
+ height: 55rpx;
+ }
+ }
.header {
+ font-size: 32rpx;
display: inline-block;
vertical-align: middle;
+ margin-left: 17rpx;
}
.number {
@@ -136,35 +214,54 @@
}
.centercontent {
- margin-top: 34rpx;
- font-size: 36rpx;
+ font-size: 32rpx;
+ background-color: #FFFFFF;
+ margin-top: 10rpx;
+ padding-top: 20rpx;
+ border-radius: 20rpx;
.header {
margin-bottom: 20rpx;
+ margin-left: 17rpx;
}
+
.productmodel {
- font-size: 24rpx;
- display: inline-block;
- height: 60rpx;
- border: 1rpx solid #D8D4D4;
- line-height: 60rpx;
- border-radius: 25rpx;
- text-align: center;
- padding: 0 15rpx;
- margin: 15rpx 15rpx 0 0;
+ border: 4rpx solid #FFFFFF;
}
.Productmodel {
- font-size: 24rpx;
- display: inline-block;
- height: 60rpx;
background: #ECF1FA;
- border: 1rpx solid #4C7BC9;
- line-height: 60rpx;
- border-radius: 25rpx;
+ border: 4rpx solid #4C7BC9;
color: #4C7BC9;
+ }
+ .productmodel,.Productmodel{
+ background-color: #F6F6F6;
+ height: 300rpx;
text-align: center;
- padding: 0 15rpx;
- margin: 15rpx 15rpx 0 0;
+ width:30%;
+ font-size: 24rpx;
+ border-radius: 10rpx;
+ margin: 5rpx 1.5% 10rpx;
+ padding: 0 0 10rpx;
+ view{
+ background-color: #F6F6F6;
+ margin: 10rpx auto;
+ width: 98%;
+ // height: 90rpx;
+ border-radius: 10rpx;
+ font-size: 24rpx;
+ text-overflow: -o-ellipsis-lastline;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ line-clamp: 2;
+ -webkit-box-orient: vertical;
+ }
+ image{
+ border-radius: 10rpx;
+ width: 100%;
+ height: 200rpx;
+ }
}
}
}
@@ -238,7 +335,18 @@
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
position: relative;
padding-bottom: 110rpx;
-
+.textInfo {
+ word-break:break-all;
+ font-size: 29rpx;
+ text-indent: 2rem;
+ line-height: 42rpx;
+ // color: #666666;
+ padding: 0 20rpx;
+ /deep/ .richPic {
+ width: 100% !important;
+ height: 100% !important;
+ }
+ }
.selected {
padding: 20rpx 0 0 5%;
color: #969394;
@@ -278,6 +386,7 @@
.name,
.number {
+ word-break: break-all;
width: 100%;
display: inline-block;
line-height: 50rpx;
diff --git a/pages/CommodityOrder/CommodityOrder.scss b/pages/CommodityOrder/CommodityOrder.scss
index 5c2fcc9..daa0839 100644
--- a/pages/CommodityOrder/CommodityOrder.scss
+++ b/pages/CommodityOrder/CommodityOrder.scss
@@ -150,6 +150,7 @@
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
+
}
span:nth-child(2) {
@@ -167,12 +168,19 @@
top: 45%;
width: 68%;
- .box {
+ .box:nth-child(1) {
+ width: 70%;
+ display: inline-block;
font-size: 30rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
.box:nth-child(2) {
+ width: 30%;
position: absolute;
+ text-align: center;
right: 0%;
}
}
diff --git a/pages/CommodityOrder/CommodityOrder.vue b/pages/CommodityOrder/CommodityOrder.vue
index 4b930f8..46c5124 100644
--- a/pages/CommodityOrder/CommodityOrder.vue
+++ b/pages/CommodityOrder/CommodityOrder.vue
@@ -39,14 +39,20 @@
+ 退款中
+
查看物流
去支付
确认收货
-
- 立即评价
+
+ 去评价
+
+ 查看评价
@@ -100,13 +106,19 @@
img: '', //确认收货页面图片
orderStatus: '', //
goodsOrderId: '', //
- pageSize: 10, //
+ pageSize: 15, //
pageNum: 1, //
goodsName: '',
getCodeText: null,
}
},
methods: {
+ //查看评价
+ golookrate(item) {
+ uni.navigateTo({
+ url: `/pages/lookrate/lookrate?item=${JSON.stringify(item)}`
+ })
+ },
//收货
Receipts() {
confirmReceipt(this.orderNoitem.goOrderNo).then(res => {
@@ -117,15 +129,23 @@
duration: '1000'
})
this.show = false
+ uni.setStorageSync("Refresh", 'Refresh')
setTimeout(e => {
uni.navigateTo({
- url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.orderNoitem)}`
+ url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.orderNoitem)}&delta=${3}`
})
// uni.navigateTo({
// url: `/pages/orderDetails/orderDetails?goodsOrderId=${this.orderNoitem.goodsOrderId}`
// })
}, 1000)
- } else {}
+ } else {
+ this.$refs.uToast.show({
+ title: '收货失败',
+ type: 'error',
+ duration: '1000'
+ })
+ this.show = false
+ }
})
},
//支付
@@ -149,18 +169,19 @@
signType: response.data.signType,
paySign: response.data.paySign,
success: function(res) {
+ uni.setStorageSync("Refresh", 'Refresh')
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
- toast: 1500,
+ duration: 1500,
+ url: `/pages/paysuccess/paysuccess`,
})
- that.goodsOrderinfo();
},
fail: function(err) {
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
- toast: 1500,
+ duration: 1500,
})
}
});
@@ -168,7 +189,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
- toast: 2000
+ duration: 2000
})
}
})
@@ -182,7 +203,7 @@
//评价
rate(item) {
uni.navigateTo({
- url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(item)}`
+ url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(item)}&delta=${3}`
})
},
//订单详情页面
@@ -196,8 +217,17 @@
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this
.goodsName).then(
res => {
- this.orderlist = res.rows
- this.total = res.total
+ if (res.code == 200) {
+ this.orderlist = res.rows
+ // this.orderlist.forEach(e => {
+ // e.timestamp = null
+ // var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 24)
+ // var times = new Date().getTime() / 1000
+ // e.timestamp = time - times
+ // })
+ uni.removeStorageSync('Refresh');
+ this.total = res.total
+ }
})
},
//确认收货
@@ -209,6 +239,7 @@
},
watch: { //监听
goodsName() {
+ this.pageNum = 1
this.goodsOrderinfo()
},
},
@@ -218,56 +249,72 @@
});
},
onShow() {
+ this.pageNum = 1;
+ this.baseurl = baseurl;
let that = this
try {
- const value = uni.getStorageSync('patientId');
- if (value) {
- that.patientId = value
- that.goodsOrderinfo();
+ const value = uni.getStorageSync('openid');
+ if (value) {} else {
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
}
} catch (e) {}
try {
- const value = uni.getStorageSync('openid');
- if (value) {
- that.openid = value
+ const value3 = uni.getStorageSync('Refresh');
+ if (value3) {
+ that.goodsOrderinfo();
}
} catch (e) {}
},
onLoad(options) { //开局调用
- this.baseurl = baseurl;
- if (options.orderStatus) {
- this.orderStatus = options.orderStatus
- if (options.orderStatus == 'WAIT_PAY') {
- this.title = '待付款'
- } else if (options.orderStatus == 'WAIT_RECEIVED_GOODS') {
- this.title = '待收货'
- } else if (options.orderStatus == 'RECEIVED_GOODS') {
- this.title = '待评价'
- } else if (options.orderStatus == 'EVALUATED') {
- this.title = '已完成'
+ let that = this
+ try {
+ const value = uni.getStorageSync('patientId');
+ const value2 = uni.getStorageSync('openid');
+ if (value && value2) {
+ that.patientId = value
+ that.openid = value2
+ if (options.orderStatus) {
+ that.orderStatus = options.orderStatus
+ if (options.orderStatus == 'WAIT_PAY') {
+ that.title = '待付款'
+ that.goodsOrderinfo();
+ } else if (options.orderStatus == 'WAIT_RECEIVED_GOODS') {
+ that.title = '待收货'
+ that.goodsOrderinfo();
+ } else if (options.orderStatus == 'RECEIVED_GOODS') {
+ that.title = '待评价'
+ that.goodsOrderinfo();
+ } else if (options.orderStatus == 'EVALUATED') {
+ that.title = '已完成'
+ that.goodsOrderinfo();
+ }
+ } else {
+ that.goodsOrderinfo();
+ }
}
- }
+ } catch (e) {}
},
onReachBottom() { //下滑加载
if (this.orderlist.length >= this.total) {} else {
this.pageNum++;
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this
- .goodsName).then(
- res => {
- res.rows.forEach(e => {
- this.orderlist.push(e)
- })
- this.total = res.total
+ .goodsName).then(res => {
+ res.rows.forEach(e => {
+ // e.timestamp = null
+ // var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 24)
+ // var times = new Date().getTime() / 1000
+ // e.timestamp = time - times
+ this.orderlist.push(e)
})
+ this.total = res.total
+ })
}
},
onPullDownRefresh() { //下拉刷新
this.pageNum = 1;
- ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this.goodsName)
- .then(res => {
- this.orderlist = res.rows
- this.total = res.total
- })
+ this.goodsOrderinfo();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
diff --git a/pages/Doctordetails/Doctordetails.vue b/pages/Doctordetails/Doctordetails.vue
index 2fde3b1..1a98460 100644
--- a/pages/Doctordetails/Doctordetails.vue
+++ b/pages/Doctordetails/Doctordetails.vue
@@ -26,7 +26,25 @@
return {
};
- }
+ },
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
}
diff --git a/pages/Geriatricdisease/Geriatricdisease.vue b/pages/Geriatricdisease/Geriatricdisease.vue
index d3624ef..2fd7ef5 100644
--- a/pages/Geriatricdisease/Geriatricdisease.vue
+++ b/pages/Geriatricdisease/Geriatricdisease.vue
@@ -27,7 +27,25 @@
return {
};
- }
+ },
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
}
diff --git a/pages/Nursingstationserviceorder/Nursingstationserviceorder.scss b/pages/Nursingstationserviceorder/Nursingstationserviceorder.scss
index ed3e8a3..94de75d 100644
--- a/pages/Nursingstationserviceorder/Nursingstationserviceorder.scss
+++ b/pages/Nursingstationserviceorder/Nursingstationserviceorder.scss
@@ -1,5 +1,59 @@
.app {
padding: 2%;
+ .masks{
+ image{
+ position: absolute;
+ bottom:380rpx;
+ left:50%;
+ transform: translateX(-50%);
+ z-index: 999;
+ width: 250rpx;
+ border-radius: 25rpx;
+ height: 250rpx;
+ }
+ .ratetitle{
+ font-size: 34rpx;
+ position: absolute;
+ bottom:320rpx;
+ left:50%;
+ transform: translateX(-50%);
+ z-index: 999;
+ }
+ .mask{
+ position: absolute;
+ bottom:0;
+ width: 750rpx;
+ height: 703rpx;
+ background: #FFFFFF;
+ border-radius: 30rpx 30rpx 0px 0px;
+ display: flex;
+ justify-content: space-around;
+ .rateitem{
+ margin-top:200rpx;
+ width: 217rpx;
+ height: 222rpx;
+ line-height: 222rpx;
+ text-align: center;
+ color: #ffffff;
+ background: #BFBFBF;
+ font-size: 40rpx;
+ border-radius: 25rpx;
+ }
+
+ .lookrateitem{
+ font-size: 32rpx;
+ margin-top:440rpx;
+ width: 200rpx;
+ height: 200rpx;
+ line-height: 200rpx;
+ text-align: center;
+ color: #ffffff;
+ background: #BFBFBF;
+ border-radius: 25rpx;
+ }
+ }
+ }
+
.noorder{
margin-top: 20%;
image{
diff --git a/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue b/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue
index d0591ab..ce72b81 100644
--- a/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue
+++ b/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue
@@ -8,7 +8,7 @@
{{item.orderStatus=='PAY'?'已付款':''}}
{{item.orderStatus=='WAIT_DISPATCH'?'待服务':''}}
{{item.orderStatus=='NOT_FINISH'?'待完成':''}}
- {{item.orderStatus=='COMPLETE'?'未评价':''}}
+ {{item.orderStatus=='COMPLETE'?'待评价':''}}
{{item.orderStatus=='EVALUATED'?'服务完成':''}}
{{item.orderStatus=='WAIT_REFUND'?'退款中':''}}
{{item.orderStatus=='REFUNDED'?'已退款':''}}
@@ -32,11 +32,9 @@
去支付
退款中
-
-
+ 立即评价
+ 查看评价
@@ -46,56 +44,150 @@
+
+
+
+ 满意
+
+
+ 一般
+
+
+ 不满意
+
+
+
+
+
+
+ {{rateimgtitle.title}}
+
+
+
+ 满意
+
+
+ 一般
+
+
+ 不满意
+
+
+
-
-
diff --git a/pages/Personal/Personal.vue b/pages/Personal/Personal.vue
index 844cf1d..90ab0fc 100644
--- a/pages/Personal/Personal.vue
+++ b/pages/Personal/Personal.vue
@@ -44,7 +44,8 @@
var that = this
try {
const value = uni.getStorageSync('openid');
- if (value) {
+ const value3 = uni.getStorageSync('token');
+ if (value && value3) {
const value2 = uni.getStorageSync('patientId');
if (value2) {} else {
uni.navigateTo({
@@ -67,45 +68,44 @@
var that = this
try {
const value = uni.getStorageSync('openid');
- if (value) {
- const value2 = uni.getStorageSync('patientId');
- if (value2) {
- uni.navigateTo({
- url: '/pages/order/order'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
+ const value3 = uni.getStorageSync('token');
+ var that = this
+ if (value && value3) {
+ existPatientInfo(value).then(res => {
+ if (res.code == 200 && res.msg == 'LOGIN') {
+ const value2 = uni.getStorageSync('patientId');
+ if (value2) {
+ uni.navigateTo({
+ url: '/pages/order/order'
+ })
+ } else {
+ that.remove()
+ }
+ } else {
+ that.remove()
+ }
})
+ } else {
+ that.remove()
}
- } catch (e) {
- uni.navigateTo({
- url: '/pages/login/login'
- })
+ } catch {
+ that.remove()
}
},
//跳转个人信息页面
gouser() {
try {
const value = uni.getStorageSync('openid');
+ const value3 = uni.getStorageSync('token');
var that = this
- if (value) {
+ if (value && value3) {
existPatientInfo(value).then(res => {
- if (res.code == 200) {
- if (res.msg == 'LOGIN') {
- const value2 = uni.getStorageSync('patientId');
- if (value2) {
- uni.navigateTo({
- url: '/pages/user/user'
- })
- } else {
- that.remove()
- }
+ if (res.code == 200 && res.msg == 'LOGIN') {
+ const value2 = uni.getStorageSync('patientId');
+ if (value2) {
+ uni.navigateTo({
+ url: '/pages/user/user'
+ })
} else {
that.remove()
}
@@ -124,11 +124,30 @@
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
+ uni.removeStorageSync('token');
uni.navigateTo({
url: '/pages/login/login'
})
},
},
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
}
diff --git a/pages/ProductList/ProductList.vue b/pages/ProductList/ProductList.vue
index 7dbd560..504853e 100644
--- a/pages/ProductList/ProductList.vue
+++ b/pages/ProductList/ProductList.vue
@@ -1,11 +1,23 @@
-
+
+
+
+
+
+
+
+
+
{{item.goodsName}}
+
+ {{item.attributeDetailsName}}
+
¥{{item.goodsPrice}}
@@ -13,17 +25,31 @@
+
+
+
+ 暂无商品
+
+
+
@@ -84,10 +219,58 @@
.app {
padding: 0;
+ .noorder {
+ view {
+ text-align: center;
+ font-size: 40rpx;
+ color: #BFBFBF;
+ }
+
+ image {
+ display: block;
+ margin: 20% auto 50rpx;
+ width: 160rpx;
+ height: 200rpx;
+ }
+ }
+
+ .inputs {
+ box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
+ border: 1px solid #f0f0f0;
+ width: 90%;
+ height: 65rpx;
+ margin: 10rpx 0 10rpx 50%;
+ transform: translateX(-50%);
+ border-radius: 20rpx;
+ background-color: #Ffffff;
+ z-index: 999;
+
+ .input {
+ margin: 0 auto;
+ position: absolute;
+ height: 65rpx;
+ // top: 8%;
+ left: 10%;
+ width: 90%;
+ font-size: 26rpx;
+ color: #000000;
+ }
+
+ .icon {
+ background: url(@/static/sousuo.png) no-repeat;
+ width: 30rpx;
+ height: 28rpx;
+ background-size: cover;
+ position: absolute;
+ top: 30%;
+ left: 3%;
+ }
+ }
+
.productlist {
width: 100%;
margin: 0 auto;
- padding: 40rpx 0 0 0;
+ padding: 20rpx 0 0 0;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
@@ -101,23 +284,37 @@
margin-bottom: 40rpx;
.price {
- font-size: 42rpx;
+ font-size: 36rpx;
color: #D43953;
line-height: 79rpx;
- padding-left: 20rpx;
+ padding-left: 15rpx;
+ }
+
+ .text {
+ font-size: 24rpx;
+ padding: 0 15rpx;
+ // text-overflow: ellipsis;
+ // overflow: hidden;
+ // white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
}
.title {
- font-size: 39rpx;
+ font-size: 36rpx;
color: #000000;
line-height: 69rpx;
- padding-left: 20rpx;
+ padding-left: 15rpx;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
image {
+ border-radius: 25rpx 25rpx 0 0;
width: 100%;
height: 340rpx;
}
diff --git a/pages/ProjectDetails/ProjectDetails.scss b/pages/ProjectDetails/ProjectDetails.scss
new file mode 100644
index 0000000..69a3231
--- /dev/null
+++ b/pages/ProjectDetails/ProjectDetails.scss
@@ -0,0 +1,172 @@
+ .app {
+ height: 100%;
+ padding: 2% 2% 150rpx 2%;
+ padding-top: 10rpx;
+ font-size: 34rpx;
+ position: relative;
+ .mask {
+ .information {
+ width: 70%;
+ height: 400rpx;
+ margin: 50% auto;
+ background: #FFFFFF;
+ border-radius: 30rpx;
+ text-align: center;
+ color: #FFFFFF;
+ position: relative;
+
+ .determine,
+ .cancel {
+ width: 200rpx;
+ height: 70rpx;
+ border-radius: 26rpx;
+ font-size: 34rpx;
+ line-height: 70rpx;
+ position: absolute;
+ top: 74%;
+ }
+
+ .determine {
+ background: #4C7BC9;
+ right: 36rpx;
+ }
+
+ .cancel {
+ background: #C5BFBF;
+ left: 36rpx;
+ }
+
+ .title {
+ font-size: 42rpx;
+ margin-top: 40rpx;
+ color: #000000;
+ }
+
+ image {
+ width: 100rpx;
+ height: 100rpx;
+ margin: 10% 0 0 0;
+ }
+ }
+ }
+ .appointment {
+ width: 120rpx;
+ height: 70rpx;
+ background: #4C7BC9;
+ border-radius: 26rpx;
+ color: #ffffff;
+ text-align: center;
+ line-height: 70rpx;
+ position: absolute;
+ bottom:20rpx;
+ right:5%;
+ }
+ .detailtitle {
+ position: relative;
+ width: 94%;
+ height: 100%;
+ margin: 0 auto;
+ background: #FFFFFF;
+ border-radius: 20rpx;
+ margin-top: 3%;
+ font-size: 31rpx;
+ padding: 3%;
+ padding-bottom: 50rpx;
+ .textInfo {
+ word-break:break-all;
+ font-size: 29rpx;
+ text-indent: 2rem;
+ line-height: 42rpx;
+ color: #666666;
+ padding-top: 30rpx;
+ /deep/ .richPic {
+ width: 100% !important;
+ height: 100% !important;
+ }
+ }
+ .Introduction {
+ font-size: 31rpx;
+ color: #333333;
+ line-height: 12rpx;
+ margin-left: -3%;
+ padding: 3%;
+ }
+ }
+ .item {
+ width: 95%;
+ height: 100%;
+ background: #FFFFFF;
+ box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
+ border-radius: 20rpx;
+ margin: 20rpx auto 0;
+ padding: 3% 3% 40rpx 3%;
+ line-height: 60rpx;
+ position: relative;
+
+ image {
+ width: 170rpx;
+ height: 170rpx;
+ margin-left: 3%;
+ }
+
+ .servicetime {
+ color: #999999;
+ line-height: 37rpx;
+ font-size: 30rpx;
+ position: absolute;
+ top: 35%;
+ left: 35%;
+ }
+
+ .price {
+ color: red;
+ font-size: 32rpx;
+ position: absolute;
+ top: 65%;
+ left: 35%;
+ }
+
+ .product {
+ color: #000000;
+ width: 60%;
+ position: absolute;
+ top: 14%;
+ left: 32%;
+ font-size: 28rpx;
+ }
+
+ .huanyao {
+ color: #000000;
+ position: absolute;
+ top: 10%;
+ left: 35%;
+ width: 60%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
+
+ /* 耗材包 */
+ .Consumablespackage {
+ width: 95%;
+ height: 100%;
+ background: #FFFFFF;
+ box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
+ border-radius: 20rpx;
+ margin: 20rpx auto 0;
+ padding: 3% 3% 40rpx 3%;
+ line-height: 60rpx;
+ font-size: 32rpx;
+
+ .detail {
+ font-size: 30rpx;
+ color: #000000;
+ }
+
+ span {
+ color: red;
+ float: right;
+ }
+ }
+ }
\ No newline at end of file
diff --git a/pages/ProjectDetails/ProjectDetails.vue b/pages/ProjectDetails/ProjectDetails.vue
new file mode 100644
index 0000000..f133ad3
--- /dev/null
+++ b/pages/ProjectDetails/ProjectDetails.vue
@@ -0,0 +1,174 @@
+
+
+
+
+ {{list.nurseItemName}}
+
+ 暂无
+
+
+ 服务时长:{{list.serveDurationUnit?list.serveDurationUnit:'0'}}
+ ¥{{list.nurseItemPrice==null?'0':list.nurseItemPrice}}
+
+ 耗材包详情:
+ ¥{{list.consumableTotalPrice==null?'0':list.consumableTotalPrice}}
+
+ ·{{item.consumableDetail}}
+ {{item.consumableCount}}{{item.consumableUnit}}/¥{{item.consumablePrice}}
+
+
+
+ 服务详情:
+
+
+
+ 预约
+
+
+
+
+
+ 请完善个人信息
+
+
+ 取消
+
+
+ 去完善
+
+
+
+
+
+
+
+
diff --git a/pages/ServiceDetails/ServiceDetails.scss b/pages/ServiceDetails/ServiceDetails.scss
index bb98af2..01de41d 100644
--- a/pages/ServiceDetails/ServiceDetails.scss
+++ b/pages/ServiceDetails/ServiceDetails.scss
@@ -1,9 +1,71 @@
.app {
height: 100%;
- padding: 2%;
+ padding: 0 2% 2%;
font-size: 36rpx;
padding-top: 10rpx;
font-size: 34rpx;
+ .masks{
+ image{
+ position: absolute;
+ bottom:380rpx;
+ left:50%;
+ transform: translateX(-50%);
+ z-index: 999;
+ width: 250rpx;
+ border-radius: 25rpx;
+ height: 250rpx;
+ }
+ .ratetitle{
+ font-size: 34rpx;
+ position: absolute;
+ bottom:320rpx;
+ left:50%;
+ transform: translateX(-50%);
+ z-index: 999;
+ }
+ .mask{
+ position: absolute;
+ bottom:0;
+ width: 750rpx;
+ height: 703rpx;
+ background: #FFFFFF;
+ border-radius: 30rpx 30rpx 0px 0px;
+ display: flex;
+ justify-content: space-around;
+ .rateitem{
+ margin-top:200rpx;
+ width: 217rpx;
+ height: 222rpx;
+ line-height: 222rpx;
+ text-align: center;
+ color: #ffffff;
+ background: #BFBFBF;
+ font-size: 40rpx;
+ border-radius: 25rpx;
+ }
+
+ .lookrateitem{
+ font-size: 32rpx;
+ margin-top:440rpx;
+ width: 200rpx;
+ height: 200rpx;
+ line-height: 200rpx;
+ text-align: center;
+ color: #ffffff;
+ background: #BFBFBF;
+ border-radius: 25rpx;
+ }
+ }
+ }
+ .time{
+ height: 80rpx;
+ width: 95%;
+ text-align: center;
+ line-height: 80rpx;
+ background-color: #fff;
+ margin: 20rpx auto 0rpx;
+ border-radius: 20rpx;
+ }
.mask{
position: absolute;
bottom:0;
@@ -28,7 +90,7 @@
text-align: center;
width: 300rpx;
height: 70rpx;
- margin: 0 auto;
+ margin: 10rpx auto 0;
line-height: 70rpx;
background-color:#4C7BC9 ;
border-radius: 50rpx;
@@ -38,13 +100,11 @@
}
// 服务商家
.detail {
- margin-top: 3%;
+ margin: 30rpx 0 0 3%;
line-height: 31rpx;
font-size: 32rpx;
color: #666666;
line-height: 31rpx;
- margin-left: 3%;
-
}
.name {
@@ -111,7 +171,6 @@
/* 耗材包 */
.Consumablespackage {
width: 95%;
- // height: 188rpx;
margin: 20rpx auto;
padding: 3% 3% 50rpx;
background: #FFFFFF;
diff --git a/pages/ServiceDetails/ServiceDetails.vue b/pages/ServiceDetails/ServiceDetails.vue
index e2d5b7e..52859cc 100644
--- a/pages/ServiceDetails/ServiceDetails.vue
+++ b/pages/ServiceDetails/ServiceDetails.vue
@@ -1,5 +1,10 @@
-
+
+
+ 剩余付款时间:
+
+
+
订单已关闭
@@ -33,7 +38,7 @@
服务信息
·联系人:{{list.patientName}}
- ·电话:{{list.patientPhone}}
+ ·电话:{{list.patientPhone}}
·地址:{{list.serviceAddress}}
·时间:{{list.serviceDate}} {{list.serviceStartTime}}-{{list.serviceEndTime}}
@@ -44,14 +49,17 @@
耗材包详情:
- ¥{{list.consumableTotalPrice}}
+ ¥{{list.consumableTotalPrice}}
+ ¥0
·{{item.orderConsumableName}}
+ {{item.orderConsumableCount}}{{item.consumableUnit}}/¥{{item.orderConsumablePrice}}
@@ -60,13 +68,15 @@
取消订单
- 评价
+ 立即评价
去支付
+ 查看评价
@@ -81,6 +91,24 @@
+
+
+
+ {{rateimgtitle.title}}
+
+
+
+ 满意
+
+
+ 一般
+
+
+ 不满意
+
+
+
@@ -93,6 +121,9 @@
getAppointmentDetailsInfo,
addAppointmentEvaluate
} from '@/api/ServiceDetails/ServiceDetails.js'
+ import {
+ lookrate
+ } from '@/api/lookrate/index.js'
export default {
data() {
return {
@@ -100,31 +131,45 @@
baseurl: '',
patientId: '', //id
openid: '', //id
- list: {},
+ list: null,
orderNo: '',
timer: null,
+ timestamp: 0,
+ lookrateshow: false, //查看评价
+ ratelist: null,
+ rateimgtitle: {
+ img: null,
+ title: null,
+ },
}
},
+ onShow() {
+ this.getlist()
+ },
onLoad(options) {
+ this.baseurl = baseurl
+ this.orderNo = options.orderNo
var that = this
try {
const value = uni.getStorageSync('patientId');
- if (value) {
+ const value2 = uni.getStorageSync('openid');
+ if (value && value2) {
that.patientId = value
+ that.openid = value2
}
} catch (e) {}
-
- try {
- const value = uni.getStorageSync('openid');
- if (value) {
- that.openid = value
- }
- } catch (e) {}
- this.orderNo = options.orderNo
- this.baseurl = baseurl
this.getlist()
},
methods: {
+ //查看评价
+ lookrate(item) {
+ this.rateimgtitle.img = item.itemPictureUrl
+ this.rateimgtitle.title = item.nurseItemName
+ lookrate(item.orderNo).then(res => {
+ this.ratelist = res.data
+ this.lookrateshow = true
+ })
+ },
//支付
buy() {
let obj = {
@@ -146,18 +191,20 @@
signType: response.data.signType,
paySign: response.data.paySign,
success: function(res) {
+ uni.setStorageSync("Refresh", 'Refresh')
+ that.getlist()
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
- toast: 1500,
+ duration: 1500,
+ url: `/pages/paysuccess/paysuccess?delta=${3}`
})
- that.getlist()
},
fail: function(err) {
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
- toast: 1500,
+ duration: 1500,
})
}
});
@@ -165,12 +212,11 @@
this.$refs.uToast.show({
title: response.msg,
type: 'error',
- toast: 2000
+ duration: 2000
})
}
})
},
-
//评价
taprate(item) {
var obj = {
@@ -187,12 +233,22 @@
type: 'success',
duration: '1500'
})
+ uni.setStorageSync("Refresh", 'Refresh')
+ this.getlist();
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(e => {
- this.getlist();
+ uni.navigateTo({
+ url: `/pages/ratesuccess/ratesuccess?delta=${3}`
+ })
}, 1500)
+ } else {
+ this.$refs.uToast.show({
+ title: '评价失败',
+ type: 'error',
+ duration: '1500'
+ })
}
})
},
@@ -203,7 +259,7 @@
success: function(res) {
if (res.platform == 'ios') {
uni.makePhoneCall({
- phoneNumber: that.nursestationlist.phone //仅为示例
+ phoneNumber: that.list.stationPhone //仅为示例
});
} else {
uni.showActionSheet({
@@ -211,7 +267,7 @@
success: function(res) {
if (res.tapIndex + 1 == 1) {
uni.makePhoneCall({
- phoneNumber: that.nursestationlist.phone //仅为示例
+ phoneNumber: that.list.stationPhone //仅为示例
});
}
},
@@ -225,6 +281,10 @@
getlist() {
getAppointmentDetailsInfo(this.orderNo).then(res => {
this.list = res.data
+ var ordertimes = this.list.createTime.replaceAll(/\-/gi, "/")
+ var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 24)
+ var times = new Date().getTime() / 1000
+ this.timestamp = time - times
})
},
cancelorderment() {
diff --git a/pages/appointmenttime/appointmenttime.scss b/pages/appointmenttime/appointmenttime.scss
index 785e187..846a3bb 100644
--- a/pages/appointmenttime/appointmenttime.scss
+++ b/pages/appointmenttime/appointmenttime.scss
@@ -1,87 +1,95 @@
.app {
- font-size: 34rpx;
- padding-top: 10rpx;
- height: 100%;
- .mask{
- .Agreement{
- width: 100%;
- background-color: #F4F5F7;
- text-align: center;
- height: 1000rpx;
- position: absolute;
- top:5%;
- width:94%;
- left:3%;
- font-size: 30rpx;
- .title{
- height: 100rpx;
- line-height: 100rpx;
- border-bottom: 1px solid #eeeeee;
- font-size: 34rpx;
- margin: 0px auto;
- width: 100%;
- text-align: center;
- }
- .scroll-Y{
- width: 98%;
- margin: 0 auto;
- height:830rpx ;
- overflow-y:scroll;
- text-align: left;
- text-indent: 2em;
- }
- .cancel {
- height:70rpx;
- line-height: 70rpx;
- font-size: 32rpx;
- background-color: #F4F5F7;
- position: absolute;
- border-top: 1rpx solid #000000;
- bottom:0;
- right:0;
- width: 50%;
- color: #000000;
- }
-
- .determine {
- height:70rpx;
- line-height: 70rpx;
- font-size: 32rpx;
- width: 50%;
- color: #F4F5F7;
- background: #4C7BC9;
- position: absolute;
- bottom:0;
- left:0;
- }
- }
- }
- .addressitem{
- width: 97%;
- border-bottom: 1rpx solid #D8D4D4;
- margin-left: 3%;
+ font-size: 34rpx;
+ padding-top: 10rpx;
height: 100%;
- .leftaddress{
- width:15%;
+
+ .mask {
+ .Agreement {
+ width: 100%;
+ background-color: #F4F5F7;
+ text-align: center;
+ height: 1000rpx;
+ position: absolute;
+ top: 5%;
+ width: 94%;
+ left: 3%;
+ font-size: 30rpx;
+
+ .title {
+ height: 100rpx;
+ line-height: 100rpx;
+ border-bottom: 1px solid #eeeeee;
+ font-size: 34rpx;
+ margin: 0px auto;
+ width: 100%;
+ text-align: center;
+ }
+
+ .scroll-Y {
+ width: 98%;
+ margin: 0 auto;
+ height: 830rpx;
+ overflow-y: scroll;
+ text-align: left;
+ text-indent: 2em;
+ }
+
+ .cancel {
+ height: 70rpx;
+ line-height: 70rpx;
+ font-size: 32rpx;
+ background-color: #F4F5F7;
+ position: absolute;
+ border-top: 1rpx solid #000000;
+ bottom: 0;
+ right: 0;
+ width: 50%;
+ color: #000000;
+ }
+
+ .determine {
+ height: 70rpx;
+ line-height: 70rpx;
+ font-size: 32rpx;
+ width: 50%;
+ color: #F4F5F7;
+ background: #4C7BC9;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ }
+ }
+ }
+
+ .addressitem {
+ width: 97%;
+ border-bottom: 1rpx solid #D8D4D4;
+ margin-left: 3%;
height: 100%;
- display: flex;
- display: inline-block;
+
+ .leftaddress {
+ width: 15%;
+ height: 100%;
+ display: flex;
+ display: inline-block;
+ }
+
+ .addition {
+ color: #666666;
+ display: inline-block;
+ line-height: 50rpx;
+ font-size: 28rpx;
+ }
}
- .addition{
- color: #666666;
- display: inline-block;
- line-height: 50rpx;
- font-size: 28rpx;
- }
- }
.money {
font-size: 32rpx;
color: #D43953;
position: absolute;
- right:5%;
- top:20%;
+ right: 5%;
+ top: 15%;
}
+
.user {
background: #FFFFFF;
width: 94%;
@@ -89,39 +97,46 @@
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
line-height: 93rpx;
+
.selecttime {
height: 93rpx;
margin-left: 3%;
position: relative;
+
text {
font-size: 34rpx;
color: #878987;
}
+
image {
width: 18rpx;
height: 27rpx;
position: absolute;
- right:5%;
- top:50%;
+ right: 5%;
+ top: 50%;
transform: translateY(-50%);
}
- .addition{
+
+ .addition {
color: #666666;
line-height: 30rpx;
font-size: 28rpx;
}
}
+
.item {
width: 97%;
border-bottom: 1rpx solid #D8D4D4;
margin-left: 3%;
- .addition{
+
+ .addition {
color: #666666;
line-height: 30rpx;
font-size: 28rpx;
}
}
}
+
.remarks {
width: 94%;
height: 382rpx;
@@ -133,32 +148,37 @@
border-radius: 20rpx;
margin-top: 20rpx;
position: relative;
- span{
+
+ span {
display: inline-block;
width: 20%;
}
+
input {
position: absolute;
- top:50%;
- left:23%;
+ top: 50%;
+ left: 23%;
width: 77%;
transform: translateY(-50%);
}
}
+
.priceback {
width: 99%;
background: #FFFFFF;
height: 100rpx;
- position:fixed;
- bottom:0;
+ position: fixed;
+ bottom: 0;
padding-bottom: 20rpx;
display: flex;
justify-content: space-around;
+
.prices {
font-size: 48rpx;
color: #D43953;
line-height: 100rpx;
}
+
.xiugai {
width: 200rpx;
height: 70rpx;
@@ -170,6 +190,7 @@
text-align: center;
color: #ffffff;
}
+
.queren {
width: 200rpx;
height: 70rpx;
@@ -181,22 +202,26 @@
color: #ffffff;
}
}
+
.radio-content {
margin: 50rpx auto;
width: 70%;
text-align: center;
font-size: 28rpx;
position: relative;
+
.agreement {
position: absolute;
- top:50%;
- left:20%;
+ top: 50%;
+ left: 20%;
transform: translateY(-50%);
color: #878987;
- }
+ }
+
.radio-right {
height: 100rpx;
width: 100rpx;
+
.radio {
display: inline-block;
width: 35rpx;
@@ -204,26 +229,33 @@
border-radius: 70%;
border: 2rpx solid #178ffb;
position: absolute;
- top:50%;
- left:5%;
+ top: 50%;
+ left: 5%;
transform: translateY(-50%);
+
.radio-active {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #178ffb;
- margin-left: 26%;
- margin-top: 22%;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
// margin: 0 auto;
}
}
}
}
+
+ .Consumablespackage .money {
+ top: 8%;
+ }
/* 耗材包 */
.Consumablespackage {
width: 94%;
margin: 10rpx auto;
- padding: 3%;
+ padding: 3% 0 3% 3%;
font-size: 34rpx;
background: #FFFFFF;
border-radius: 20rpx;
@@ -231,35 +263,50 @@
position: relative;
padding-bottom: 40rpx;
.detail {
- width: 301rpx;
- height: 31rpx;
- font-size: 32rpx;
- color: #666666;
- line-height: 31rpx;
- margin: 20rpx 0 0 40rpx;
+ width: 100%;
+ line-height: 100rpx;
+ // padding: 20rpx 0 0 40rpx;
+ /deep/ .u-checkbox{
+ margin: 40rpx 0 0;
+ position: relative;
+ }
+ span{
+ width: 100%;
+ display: inline-block;
+ font-size: 30rpx;
+ color: #D43953;
+ text-align: right;
+ position: absolute;
+ right:5%;
+ top:50%;
+ transform: translateY(-50%);
+ }
}
}
+
/* 套餐 */
.Package {
width: 94%;
height: 150rpx;
margin: 10rpx auto;
- padding: 3%;
+ padding: 3% 0 3% 3%;
font-size: 34rpx;
background: #FFFFFF;
border-radius: 20rpx;
- margin-top:20rpx;
+ margin-top: 20rpx;
position: relative;
+
.detail {
line-height: 31rpx;
font-size: 32rpx;
color: #666666;
line-height: 31rpx;
position: absolute;
- left:10%;
- top:60%;
+ left: 10%;
+ top: 60%;
}
}
+
.message {
width: 94%;
background: white;
@@ -268,4 +315,4 @@
text-align: center;
line-height: 96rpx;
}
- }
+ }
\ No newline at end of file
diff --git a/pages/appointmenttime/appointmenttime.vue b/pages/appointmenttime/appointmenttime.vue
index ac9c005..af86a7b 100644
--- a/pages/appointmenttime/appointmenttime.vue
+++ b/pages/appointmenttime/appointmenttime.vue
@@ -1,6 +1,5 @@
-
姓名:
@@ -45,9 +44,16 @@
耗材包详情:
- ¥{{orderlist.consumableTotalPrice}}
-
- ·{{item.consumableDetail}}
+ ¥{{consumableTotalPrice}}
+
+
+
+ {{item.consumableDetail}}
+ {{item.consumableCount}}{{item.consumableUnit}}/¥{{item.consumablePrice}}
+
+
我已阅读并同意《用户协议》
-
¥{{orderlist.totalPrice}}
@@ -136,6 +141,7 @@
personInfo: {}, //用户信息
patientId: null,
useritem: null, //optionsuser信息
+ consumableTotalPrice: 0, //耗材包总价格
orderlist: {
orderCount: 1,
patientId: '',
@@ -171,11 +177,6 @@
that.personInfo.address = that.useritem.address
} else {}
})
- setTimeout(e => {
- if (!that.useritem) {
- that.userinfo();
- }
- }, 500)
},
onLoad(options) {
var that = this
@@ -187,6 +188,7 @@
} catch (e) {}
//耗材包详情方法调用
this.getPatientInfo(options.stationId, options.stationItemId, options.stationItemPriceId)
+ that.userinfo();
},
methods: {
userinfo() {
@@ -199,13 +201,9 @@
//被护理人信息
getAppPatientList(that.patientId).then(response => {
that.personInfo = response.data
- that.personInfo.address = response.data.provinceName + response.data
- .cityName + response.data.regionName + response.data.streetName +
- response.data.address
+ that.personInfo.address = response.data.areaName + response.data.address
that.orderlist.patientId = response.data.patientId
- that.orderlist.serviceAddress = response.data.provinceName + response.data
- .cityName + response.data.regionName + response.data.streetName +
- response.data.address
+ that.orderlist.serviceAddress = response.data.areaName + response.data.address
})
}
} catch (e) {}
@@ -213,14 +211,22 @@
//获取耗材包详情
getPatientInfo(stationId, stationItemId, stationItemPriceId) {
getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => {
+ res.data.nurseItemContent = ''
if (res.code == 200) {
+ if (res.data.itemConsumableList) {
+ res.data.itemConsumableList.forEach(e => {
+ e.radio = true
+ })
+ }
this.orderlist = res.data
+ this.consumableTotalPrice = res.data.consumableTotalPrice
}
})
},
//确认预约
updata() {
var that = this
+ this.orderlist.consumableTotalPrice = null
this.orderlist.orderChannel = 'WECHAT_APPLET'
if (this.radio == 1) {
this.$refs.uToast.show({
@@ -229,7 +235,14 @@
})
} else {
this.orderlist.orderCount = 1;
- this.orderlist.orderConsumableList = this.orderlist.itemConsumableList
+ this.orderlist.orderConsumableList = []
+ if (this.orderlist.itemConsumableList) {
+ this.orderlist.itemConsumableList.forEach(e => {
+ if (e.radio) {
+ this.orderlist.orderConsumableList.push(e)
+ }
+ })
+ }
submitAppointment(this.orderlist).then(res => {
if (res.code == 500) {
that.$refs.uToast.show({
@@ -258,7 +271,7 @@
that.$refs.uToast.show({
title: '预约成功',
type: 'success',
- toast: 1500,
+ duration: 1500,
url: `/pages/paysuccess/paysuccess`
})
},
@@ -266,7 +279,7 @@
that.$refs.uToast.show({
title: '取消预约',
type: 'error',
- toast: 1500,
+ duration: 1500,
url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}`
})
}
@@ -275,14 +288,13 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
- toast: 2000
+ duration: 2000
})
}
})
}
})
}
-
},
changeRadio() {
if (this.radio == 1) {
@@ -295,6 +307,75 @@
this.radio = 2;
this.maskshow = false
},
+ checkboxChange(e) {
+ if (e.radio) {
+ this.orderlist.totalPrice = this.argSubtr(this.orderlist.totalPrice, e.consumablePrice)
+ } else {
+ this.orderlist.totalPrice = this.argAdd(this.orderlist.totalPrice, e.consumablePrice)
+ }
+ },
+ argAdd(arg1, arg2) {
+ // 加法函数
+ var _this = this,
+ r1 = 0,
+ r2 = 0,
+ m = 0;
+ try {
+ r1 = arg1.toString().split(".")[1].length
+ } catch (e) {}
+ try {
+ r2 = arg2.toString().split(".")[1].length
+ } catch (e) {}
+ m = Math.pow(10, Math.max(r1, r2))
+ return _this.argDiv((_this.argMul(arg1, m) + _this.argMul(arg2, m)), m)
+ },
+ argSubtr(arg1, arg2) {
+ // 减法函数
+ var _this = this,
+ r1 = 0,
+ r2 = 0,
+ m = 0;
+ try {
+ r1 = arg1.toString().split(".")[1].length
+ } catch (e) {}
+ try {
+ r2 = arg2.toString().split(".")[1].length
+ } catch (e) {}
+ m = Math.pow(10, Math.max(r1, r2));
+ return _this.argDiv((_this.argMul(arg1, m) - _this.argMul(arg2, m)), m)
+ },
+ argMul(arg1, arg2) {
+ // 乘法函数
+ var _this = this,
+ m = 0,
+ s1 = arg1.toString(),
+ s2 = arg2.toString();
+ try {
+ m += s1.split(".")[1].length
+ } catch (e) {}
+ try {
+ m += s2.split(".")[1].length
+ } catch (e) {}
+ return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
+ },
+ argDiv(arg1, arg2) {
+ // 除法函数
+ var _this = this,
+ t1 = 0,
+ t2 = 0,
+ r1, r2;
+ try {
+ t1 = arg1.toString().split(".")[1].length
+ } catch (e) {}
+ try {
+ t2 = arg2.toString().split(".")[1].length
+ } catch (e) {}
+ r1 = Number(arg1.toString().replace(".", ""))
+ r2 = Number(arg2.toString().replace(".", ""))
+ return _this.argMul((r1 / r2), Math.pow(10, t2 - t1));
+ },
+ // 选中任一checkbox时,由checkbox-group触发
+ checkboxGroupChange(e) {},
//获取时间
timeconfirm(e) {
this.orderlist.serviceStartTime = e.hour + ":" + e.minute
@@ -309,7 +390,7 @@
},
goaddress() {
uni.navigateTo({
- url: `/pages/modifyAddress/modifyAddress?url=${'appointmenttime'}&updata=${JSON.stringify(this.orderlist)}`
+ url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.orderlist)}`
})
},
}
diff --git a/pages/cancelorder/cancelorder.vue b/pages/cancelorder/cancelorder.vue
index ee5c743..e43af6b 100644
--- a/pages/cancelorder/cancelorder.vue
+++ b/pages/cancelorder/cancelorder.vue
@@ -49,7 +49,7 @@
}
this.timer = setTimeout(e => {
uni.navigateBack({
- delta: 2
+ delta: 3
})
}, 1500)
}
diff --git a/pages/classification/classification.vue b/pages/classification/classification.vue
new file mode 100644
index 0000000..11e14ab
--- /dev/null
+++ b/pages/classification/classification.vue
@@ -0,0 +1,364 @@
+
+
+
+
+
+
+
+
+
+
+ {{item.goodsCategoryName}}
+
+
+
+
+
+
+
+
+
+ {{item.goodsName}}
+
+
+ {{item.attributeDetailsName}}
+
+
+ ¥{{item.goodsPrice}}
+
+
+
+
+
+
+
+
+ 暂无商品
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/confirmOrder/confirmOrder.scss b/pages/confirmOrder/confirmOrder.scss
index 84e7ad6..39405f1 100644
--- a/pages/confirmOrder/confirmOrder.scss
+++ b/pages/confirmOrder/confirmOrder.scss
@@ -98,6 +98,9 @@
font-size: 33rpx;
color: #969394;
line-height: 67rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
}
diff --git a/pages/confirmOrder/confirmOrder.vue b/pages/confirmOrder/confirmOrder.vue
index 479d73d..6e19aff 100644
--- a/pages/confirmOrder/confirmOrder.vue
+++ b/pages/confirmOrder/confirmOrder.vue
@@ -142,7 +142,7 @@
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
- toast: 1500,
+ duration: 1500,
url: '/pages/paysuccess/paysuccess'
})
},
@@ -150,7 +150,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
- toast: 1500,
+ duration: 1500,
url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
})
// uni.navigateTo({
@@ -162,7 +162,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
- toast: 2000
+ duration: 2000
})
}
})
@@ -183,6 +183,9 @@
},
onLoad(options) {
this.updata = JSON.parse(options.updata)
+ if (this.updata.totalPrice == 'null' || !this.updata.totalPrice) {
+ this.updata.totalPrice = 0
+ }
},
onShow() {
var that = this
diff --git a/pages/detail/detail.scss b/pages/detail/detail.scss
deleted file mode 100644
index 3b635d2..0000000
--- a/pages/detail/detail.scss
+++ /dev/null
@@ -1,115 +0,0 @@
-.app {
- // font-size: 36rpx;
- padding-top: 10rpx;
-
- .concent {
- width: 701rpx;
- height: 811rpx;
- background: #4C7BC9;
- box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
- border-radius: 20rpx;
- margin-top: 5%;
- // left: 50%;
- // transform: translateX(-50%);
- margin: 0 auto;
- margin-bottom: 20px;
-
- .background {
- position: relative;
- // display: flex;
- width: 657rpx;
- height: 727rpx;
- background: #FFFFFF;
- border-radius: 25rpx;
- background-color: white;
- margin: 0 auto;
- top: 50%;
- transform: translateY(-50%);
-
- image {
- width: 178rpx;
- height: 84rpx;
- background: #FFFFFF;
- border-radius: 25px;
- // float: right;
- margin-left: 68%;
- margin-top: 5%;
- }
-
-
- // text-align:center;
-
-
-
- }
- }
- }
-
- .life {
- // margin: 0 auto;
- width: 162rpx;
- height: 40rpx;
- font-size: 42rpx;
- margin-left: 35%;
- color: #ffffff;
-
-
-
- }
-
-
-
- .lifeserve image {
- width: 639rpx;
- height: 739rpx;
- margin-left: 5%;
-
- padding-bottom: 20rpx;
- // height: rpx;
- // background: #E1AE3C;
- // box-shadow: 0px 9px 31px 9px rgba(0,0,0,0.03);
- // border-radius: 20px;
- }
-
- .concenta {
-
- margin: 0 auto;
- margin-bottom: 20px;
- // position: absolute;
- width: 701rpx;
- height: 811rpx;
- background: #E1AE3C;
- // margin-top: 118%;
- // margin-left: 2.55%;
- border-radius: 25rpx;
- // margin-bottom: 30rpx;
- }
-
- .concentb {
- margin: 0 auto;
- margin-bottom: 20px;
- // position: absolute;
- width: 701rpx;
- height: 811rpx;
- background: #00C176;
- // margin-top: 118%;
- // margin-left: 2.55%;
- border-radius: 25rpx;
- // margin-bottom: 30rpx;
- }
-
-
-
-
- .detailed {
- // font-size: 29rpx;
- width: 657rpx;
- height: 727rpx;
- padding: 0 42rpx;
- line-height: 56rpx;
- }
-
- .detailed view {
- // height: 100%;
- text-indent: 2em;
- }
diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue
index bc49181..27d6a5b 100644
--- a/pages/detail/detail.vue
+++ b/pages/detail/detail.vue
@@ -13,16 +13,12 @@
- 生活护理
-
-
-
+ 生活护理
+
- 医疗护理
-
-
-
+ 医疗护理
+
@@ -32,22 +28,39 @@
data() {
return {}
},
- methods: {}
+ methods: {},
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
}
diff --git a/pages/goodsorderRate/goodsorderRate.scss b/pages/goodsorderRate/goodsorderRate.scss
index 27b9967..6a0f382 100644
--- a/pages/goodsorderRate/goodsorderRate.scss
+++ b/pages/goodsorderRate/goodsorderRate.scss
@@ -74,6 +74,7 @@
right: 10rpx;
width: 40rpx;
height: 40rpx;
+ z-index: 999;
}
.itemimg {
diff --git a/pages/goodsorderRate/goodsorderRate.vue b/pages/goodsorderRate/goodsorderRate.vue
index a997425..6c16985 100644
--- a/pages/goodsorderRate/goodsorderRate.vue
+++ b/pages/goodsorderRate/goodsorderRate.vue
@@ -3,7 +3,8 @@
-
+
+
@@ -54,37 +55,41 @@
imgs: [],
patientId: null,
openid: null,
- timer:null,
+ timer: null,
+ delta: null,
};
},
methods: {
- async updata() {
- let that = this
- this.file.forEach(e => {
- uni.uploadFile({
- url: baseurl + '/nurseApp/orderEvaluate/uploadEvaluatePictureUrl',
- filePath: e,
- name: 'file',
- formData: {
- 'orderNo': that.orderlist.goOrderNo
- },
- timeout: 5000,
- header: {
- 'Content-type': 'application/json;charset=utf-8'
- },
- success(res) {
- var img = {
- evaluatePictureUrl: JSON.parse(res.data).imgUrl
- }
- that.imgs.push(img)
- if (that.imgs.length == that.file.length) {
- that.info();
- }
- }
- })
- })
+ delimg(item) {
+ this.file = this.file.filter(e => e != item)
+ },
+ updata() {
+ let that = this
+ if (this.file.length > 0) {
+ this.file.forEach(e => {
+ uni.uploadFile({
+ url: baseurl + '/nurseApp/orderEvaluate/uploadEvaluatePictureUrl',
+ filePath: e,
+ name: 'file',
+ formData: {
+ 'orderNo': that.orderlist.goOrderNo
+ },
+ timeout: 5000,
+ success(res) {
+ var img = {
+ evaluatePictureUrl: JSON.parse(res.data).imgUrl
+ }
+ that.imgs.push(img)
+ if (that.imgs.length == that.file.length) {
+ that.info();
+ }
+ }
+ })
+ })
+ } else {
+ that.info();
+ }
},
-
info() {
var that = this
var obj = {
@@ -98,6 +103,7 @@
}
insertGoodsEvaluate(obj).then(res => {
if (res.code == 200) {
+ uni.setStorageSync("Refresh", 'Refresh')
that.$refs.uToast.show({
title: '评价成功',
type: 'success',
@@ -108,8 +114,8 @@
}
that.timer = setTimeout(e => {
that.imgs = []
- uni.navigateBack({
- delta: 1
+ uni.navigateTo({
+ url: `/pages/ratesuccess/ratesuccess?delta=${that.delta}`
})
}, 1500)
} else {
@@ -117,9 +123,6 @@
}
})
},
-
-
-
updataImage() {
var that = this;
uni.chooseImage({
@@ -134,6 +137,7 @@
},
onLoad(options) {
this.orderlist = JSON.parse(options.item)
+ this.delta = options.delta
},
onShow() {
this.baseurl = baseurl
diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue
index 7052de1..5770158 100644
--- a/pages/homepage/homepage.vue
+++ b/pages/homepage/homepage.vue
@@ -47,6 +47,24 @@
data() {
return {};
},
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
methods: {
//专病管理
godiseasemanagement() {
diff --git a/pages/information/information.scss b/pages/information/information.scss
index 1c384ad..1672bec 100644
--- a/pages/information/information.scss
+++ b/pages/information/information.scss
@@ -1,6 +1,9 @@
.app {
padding:0;
height:100vh;
+ /deep/ .u-drawer{
+ z-index: 0 !important;
+ }
.Agreement{
width: 100%;
background-color: #F4F5F7;
@@ -79,9 +82,10 @@
height: 16rpx;
border-radius: 50%;
background-color: #178ffb;
- margin-left: 26%;
- margin-top: 22%;
- // margin: 0 auto;
+ position: absolute;
+ top:50%;
+ left:50%;
+ transform: translate(-50%,-50%);
}
}
}
@@ -172,6 +176,9 @@
display: inline-block;
height: 120rpx;
line-height: 120rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
}
span {
diff --git a/pages/information/information.vue b/pages/information/information.vue
index 00c52fb..194dff1 100644
--- a/pages/information/information.vue
+++ b/pages/information/information.vue
@@ -15,7 +15,7 @@
身份证号:
-
+
所属区域:
{{address}}
@@ -25,14 +25,16 @@
所在位置:
-
- {{chooseLocation}}
+
+ {{query.locationName}}
-
-
+
+
+
+
@@ -92,17 +94,27 @@
information
} from '@/api/information/index.js'
import contenttext from './text.vue'
+ import {
+ getSubordinateRegions,
+ } from '@/api/modifyAddress/modifyAddress.js';
+ import gkcity from "../m-city/m-city.vue";
export default {
components: {
- contenttext
+ contenttext,
+ "m-city": gkcity
},
data() {
return {
radio: 1,
- chooseLocation: '', //地图选址
+ // chooseLocation: '', //地图选址
arealist: [], //区街道list
+ list: [{
+ id: "",
+ localName: "请选择",
+ children: [],
+ }, ],
areashow: false, //经纬度开关
- maskshow:false,//用户协议
+ maskshow: false, //用户协议
getNurseTypelist: [], //护理类型数组
medicalcarelist: [], //医疗护理数组
address: '', //页面所属区域
@@ -117,69 +129,93 @@
nurseTypeIdList: [],
diseaseInfoList: [],
patientId: '',
- locationName: null,
+ locationName: '',
},
timer: null,
+ addresslength: null,
};
},
methods: {
//提交信息
informationinfo() {
var that = this
- try {
- const value = uni.getStorageSync('phone');
- if (value) {
- that.query.phone = value
- if (that.radio == 1) {
- that.$refs.uToast.show({
- title: '请审核并同意用户协议',
- type: 'error'
- })
- } else {
- information(that.query).then(res => {
- if (res.code == 200) {
+ if (this.addresslength) {
+ if (this.addresslength.length > 2) {
+ try {
+ const value = uni.getStorageSync('phone');
+ if (value) {
+ that.query.phone = value
+ if (that.radio == 1) {
that.$refs.uToast.show({
- title: '完善信息成功',
- type: 'success',
- duration: '1500'
+ title: '请审核并同意用户协议',
+ type: 'error'
})
- if (that.timer) {
- clearTimeout(that.timer)
- }
- that.timer = setTimeout(e => {
- uni.navigateBack({
- delta: 1
- })
- }, 1500)
- } else if (res.code == 500) {
- that.$refs.uToast.show({
- title: res.msg,
- type: 'error',
+ } else {
+ information(that.query).then(res => {
+ if (res.code == 200) {
+ that.$refs.uToast.show({
+ title: '完善信息成功',
+ type: 'success',
+ duration: '1500'
+ })
+ if (that.timer) {
+ clearTimeout(that.timer)
+ }
+ that.timer = setTimeout(e => {
+ uni.navigateBack({
+ delta: 1
+ })
+ }, 1500)
+ } else if (res.code == 500) {
+ that.$refs.uToast.show({
+ title: res.msg,
+ type: 'error',
+ })
+ }
})
}
- })
- }
-
+ }
+ } catch (e) {}
+ } else {
+ that.$refs.uToast.show({
+ title: '所属区域应选择所在的区或街道,请重新选择!',
+ type: 'error'
+ })
}
- } catch (e) {}
+ } else {
+ that.$refs.uToast.show({
+ title: '所属区域应选择所在的区或街道,请重新选择!',
+ type: 'error'
+ })
+ }
},
//获取所在位置
getAddress() {
- uni.getLocation({
- type: 'wgs84',
- success: function(res) {
- const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使用在腾讯位置服务申请的key
- const referer = '泉医到家'; //调用插件的app的名称
- const location = JSON.stringify({
- latitude: 39.89631551,
- longitude: 116.323459711
- });
- wx.navigateTo({
- url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
- });
+ var that = this;
+ uni.chooseLocation({
+ success: function(location) {
+ that.query.locationName = location.address
+ that.query.homeLongitude = location.longitude;
+ that.query.homeLatitude = location.latitude;
}
});
},
+ // getAddress() {
+ // uni.getLocation({
+ // type: 'wgs84',
+ // success: function(res) {
+ // const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使用在腾讯位置服务申请的key
+ // const referer = '泉医到家'; //调用插件的app的名称
+ // const location = JSON.stringify({
+ // latitude: 39.89631551,
+ // longitude: 116.323459711
+ // });
+ // wx.navigateTo({
+ // url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
+ // });
+ // }
+ // });
+ // },
//护理类型请求
getNurseTypeInfo() {
getNurseType().then(res => {
@@ -189,25 +225,35 @@
},
//区街道
areaInfo() {
- getRegionAndStreetInfo().then(res => {
- //区下无街道添加一个空街道
- res.data.forEach(e => {
- if (e.children.length == 0) {
- e.children.push({
- areaCode: "",
- areaName: "暂无街道",
- children: null,
- id: '',
- })
- }
- })
- this.arealist = res.data;
+ getSubordinateRegions().then(res => {
+ this.list = res.data;
})
},
- //区街道选择
- areaconfirm(e) {
- this.query.areaCode = e[e.length - 1].value
- this.address = e[0].label + '-' + e[1].label
+ // 三级地址联动回调
+ getpickerParentValue(e) {
+ this.addresslength = e
+ if (e.length == 4) {
+ this.address = e[0].localName + e[1].localName + e[2].localName + e[3]
+ .localName
+ this.query.areaCode = e[3].id
+ } else if (e.length == 3) {
+ this.address = e[0].localName + e[1].localName + e[2].localName
+ this.query.areaCode = e[2].id
+ } else if (e.length == 2) {
+ this.address = e[0].localName + e[1].localName
+ this.query.areaCode = e[1].id
+ } else if (e.length == 1) {
+ this.address = e[0].localName
+ this.query.areaCode = e[0].id
+ } else {
+ this.address = ''
+ this.query.areaCode = ''
+ }
+ },
+ // 显示三级地址联动
+ showPicker() {
+ this.areashow = true
+ this.$refs.cityPicker.show();
},
//点击所需服务
addnurseType(item) {
@@ -250,14 +296,14 @@
// 从地图选点插件返回后,在页面的onShow生命周期函数中能够调用插件接口,取得选点结果对象
onShow() {
var that = this
- const chooseLocation = requirePlugin('chooseLocation');
- const location = chooseLocation.getLocation(); // 如果点击确认选点按钮,则返回选点结果对象,否则返回null
- if (location) {
- that.query.locationName = location.address
- that.chooseLocation = location.address
- that.query.homeLongitude = location.longitude;
- that.query.homeLatitude = location.latitude;
- }
+ // const chooseLocation = requirePlugin('chooseLocation');
+ // const location = chooseLocation.getLocation(); // 如果点击确认选点按钮,则返回选点结果对象,否则返回null
+ // if (location) {
+ // that.query.locationName = location.address
+ // that.chooseLocation = location.address
+ // that.query.homeLongitude = location.longitude;
+ // that.query.homeLatitude = location.latitude;
+ // }
uni.$on('disease', function(data) {
that.query.diseaseInfoList = JSON.parse(data.disease)
if (that.query.diseaseInfoList.length > 0) {
@@ -273,10 +319,6 @@
}
})
},
- onUnload() {
- // 页面卸载时设置插件选点数据为null,防止再次进入页面,geLocation返回的是上次选点结果
- chooseLocation.setLocation(null);
- },
}
diff --git a/pages/m-city/m-city.vue b/pages/m-city/m-city.vue
new file mode 100644
index 0000000..d90248a
--- /dev/null
+++ b/pages/m-city/m-city.vue
@@ -0,0 +1,403 @@
+
+
+
+
+
+ {{ headTitle }}
+
+
+
+
+
+ {{ item.localName }}
+
+
+
+
+
+ {{ item.areaName }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/medicine/medicine.vue b/pages/medicine/medicine.vue
index 479ac41..388c063 100644
--- a/pages/medicine/medicine.vue
+++ b/pages/medicine/medicine.vue
@@ -47,6 +47,24 @@
// })
},
},
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
}
diff --git a/pages/menttimeorder/menttimeorder.vue b/pages/menttimeorder/menttimeorder.vue
index 80823d1..0b90326 100644
--- a/pages/menttimeorder/menttimeorder.vue
+++ b/pages/menttimeorder/menttimeorder.vue
@@ -1,5 +1,10 @@
-
+
+
+ 剩余付款时间:
+
+
+
订单已关闭
@@ -44,9 +49,12 @@
耗材包详情:
- ¥{{list.consumableTotalPrice}}
+ ¥{{list.consumableTotalPrice}}
+ ¥0
·{{item.orderConsumableName}}
+ {{item.orderConsumableCount}}{{item.consumableUnit}}/¥{{item.orderConsumablePrice}}
+
+
+
+
@@ -88,19 +94,29 @@
} from '@/api/information/index.js'
import contenttext from '../information/text.vue'
import baseurl from '@/api/baseurl.js'
+ import {
+ appPersonal,
+ } from '@/api/user/user.js';
+ import {
+ getSubordinateRegions,
+ } from '@/api/modifyAddress/modifyAddress.js';
+ import gkcity from "../m-city/m-city.vue";
export default {
components: {
- contenttext
+ contenttext,
+ "m-city": gkcity
},
data() {
return {
+ list: [{
+ id: "",
+ localName: "请选择",
+ children: [],
+ }, ],
radio: 1,
baseurl: '',
address: '',
- arealist: [],
- areashow: false,
- maskshow:false,//用户协议
- chooseLocation: '',
+ maskshow: false, //用户协议
img: null,
image: null,
timer: null,
@@ -118,28 +134,60 @@
locationName: '',
},
patientDiseaseInfoList: [], //获取个人信息
+ addresslength: null,
}
},
onLoad(options) {
this.areaInfo();
this.baseurl = baseurl
- this.appPersonallist = JSON.parse(options.appPersonallist)
- this.img = baseurl + this.appPersonallist.headPictureUrl
- if (this.appPersonallist.regionName && this.appPersonallist.streetName) {
- this.address = this.appPersonallist.regionName + '-' + this.appPersonallist.streetName
- }
- this.patientDiseaseInfoList = this.appPersonallist.patientDiseaseInfoList
- this.patientDiseaseInfoList.forEach(e => {
- e.id = e.diseaseId
- })
- if (this.appPersonallist.locationName) {
- this.chooseLocation = this.appPersonallist.locationName
- }
+ var that = this
+ const value = uni.getStorageSync('patientId');
+ if (value) {
+ appPersonal(value).then(Response => {
+ if (Response.code == 200) {
+ that.appPersonallist = Response.data
+ that.appPersonallist.homeLatitude = Number(that.appPersonallist.homeLatitude)
+ that.appPersonallist.homeLongitude = Number(that.appPersonallist.homeLongitude)
+ that.img = baseurl + that.appPersonallist.headPictureUrl
+ if (that.appPersonallist.areaName) {
+ that.address = that.appPersonallist.areaName
+ }
+ that.patientDiseaseInfoList = that.appPersonallist.patientDiseaseInfoList
+ that.patientDiseaseInfoList.forEach(e => {
+ e.id = e.diseaseId
+ })
+ } else if (Response.code == 9999) {} else {}
+ })
+ } else {}
},
methods: {
+ // 三级地址联动回调
+ getpickerParentValue(e) {
+ this.addresslength = e
+ if (e.length == 4) {
+ this.address = e[0].localName + e[1].localName + e[2].localName + e[3]
+ .localName
+ this.appPersonallist.areaCode = e[3].id
+ } else if (e.length == 3) {
+ this.address = e[0].localName + e[1].localName + e[2].localName
+ this.appPersonallist.areaCode = e[2].id
+ } else if (e.length == 2) {
+ this.address = e[0].localName + e[1].localName
+ this.appPersonallist.areaCode = e[1].id
+ } else if (e.length == 1) {
+ this.address = e[0].localName
+ this.appPersonallist.areaCode = e[0].id
+ }else {
+ this.address = ''
+ this.appPersonallist.areaCode = ''
+ }
+ },
+ // 显示三级地址联动
+ showPicker() {
+ this.$refs.cityPicker.show();
+ },
//上传图片+提交信息
- informationinfo() {
- //上传图片
+ data() {
var that = this
if (that.radio == 1) {
that.$refs.uToast.show({
@@ -212,6 +260,23 @@
}
}
},
+ informationinfo() {
+ //上传图片
+ var that = this
+ if (this.addresslength) {
+ if (this.addresslength.length > 2) {
+ that.data();
+ } else {
+ that.$refs.uToast.show({
+ title: '所属区域应选择所在的区或街道,请重新选择!',
+ type: 'error'
+ })
+ }
+ } else {
+ that.data();
+ }
+
+ },
//上传头像
uploadImag() {
var that = this;
@@ -228,41 +293,36 @@
},
//获取所在位置
getAddress() {
- uni.getLocation({
- type: 'wgs84',
+ var that = this;
+ uni.chooseLocation({
success: function(res) {
- const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使用在腾讯位置服务申请的key
- const referer = '泉医到家'; //调用插件的app的名称
- const location = JSON.stringify({
- latitude: 39.89631551,
- longitude: 116.323459711
- });
- wx.navigateTo({
- url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
- });
+ that.appPersonallist.locationName = res.address
+ that.appPersonallist.homeLongitude = res.longitude;
+ that.appPersonallist.homeLatitude = res.latitude;
}
});
},
- //区街道选择
- areaconfirm(e) {
- this.appPersonallist.areaCode = e[e.length - 1].value
- this.address = e[0].label + '-' + e[1].label
- },
+ // //获取所在位置
+ // getAddress() {
+ // uni.getLocation({
+ // type: 'wgs84',
+ // success: function(res) {
+ // const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使用在腾讯位置服务申请的key
+ // const referer = '泉医到家'; //调用插件的app的名称
+ // const location = JSON.stringify({
+ // latitude: 39.89631551,
+ // longitude: 116.323459711
+ // });
+ // wx.navigateTo({
+ // url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
+ // });
+ // }
+ // });
+ // },
//区街道
areaInfo() {
- getRegionAndStreetInfo().then(res => {
- //区下无街道添加一个空街道
- res.data.forEach(e => {
- if (e.children.length == 0) {
- e.children.push({
- areaCode: "",
- areaName: "暂无街道",
- children: null,
- id: '',
- })
- }
- })
- this.arealist = res.data;
+ getSubordinateRegions().then(res => {
+ this.list = res.data;
})
},
//跳转疾病选择
@@ -285,27 +345,22 @@
},
onUnload() {
// 页面卸载时设置插件选点数据为null,防止再次进入页面,geLocation返回的是上次选点结果
- chooseLocation.setLocation(null);
+ // chooseLocation.setLocation(null);
},
//带参返回
onShow() {
- const chooseLocation = requirePlugin('chooseLocation');
- const location = chooseLocation.getLocation(); // 如果点击确认选点按钮,则返回选点结果对象,否则返回null
- if (location) {
- this.appPersonallist.locationName = location.address
- this.chooseLocation = location.address;
- this.appPersonallist.homeLongitude = location.longitude;
- this.appPersonallist.homeLatitude = location.latitude;
- }
let that = this
+ // const chooseLocation = requirePlugin('chooseLocation');
+ // const location = chooseLocation.getLocation(); // 如果点击确认选点按钮,则返回选点结果对象,否则返回null
+ // if (location) {
+ // that.appPersonallist.locationName = location.address
+ // that.appPersonallist.homeLongitude = location.longitude;
+ // that.appPersonallist.homeLatitude = location.latitude;
+ // }
uni.$on('disease', function(data) {
that.patientDiseaseInfoList = JSON.parse(data.disease)
})
},
- onUnload() {
- // 页面卸载时设置插件选点数据为null,防止再次进入页面,geLocation返回的是上次选点结果
- chooseLocation.setLocation(null);
- },
}
diff --git a/pages/modifyAddress/modifyAddress.scss b/pages/modifyAddress/modifyAddress.scss
index 58a49aa..cc6b254 100644
--- a/pages/modifyAddress/modifyAddress.scss
+++ b/pages/modifyAddress/modifyAddress.scss
@@ -6,6 +6,9 @@
height: 100%;
padding: 4%;
padding-bottom: 100rpx;
+ /deep/ .u-drawer{
+ z-index: 0 !important;
+ }
.address {
width: 99%;
background: #FFFFFF;
@@ -26,15 +29,16 @@
.detail {
border-bottom: 5rpx solid #F4F5F7;
height:100%;
+ padding-bottom: 30rpx;
font-size: 32rpx;
line-height: 50rpx;
- padding-bottom: 20rpx;
word-break:break-all;
}
.update {
display: flex;
- margin: 18rpx 18rpx 18rpx 50%;
+ width: 100%;
+ justify-content: flex-end;
}
.up {
@@ -50,7 +54,7 @@
}
.ups {
- margin-right: 30rpx;
+ margin-right: 20rpx;
}
}
diff --git a/pages/modifyAddress/modifyAddress.vue b/pages/modifyAddress/modifyAddress.vue
index 7b44277..b853ad0 100644
--- a/pages/modifyAddress/modifyAddress.vue
+++ b/pages/modifyAddress/modifyAddress.vue
@@ -7,14 +7,26 @@
{{item.receivePhone}}
- {{item.address}}
+ {{item.areaName}}{{item.receiveAddress}}
-
-
- 修改
+
+
+
+ 默认地址
+
+
+
+
-
- 删除
+
+
+
+ 修改
+
+
+ 删除
+
+
@@ -22,12 +34,12 @@
- 添加收货地址
+ 添加地址
-
-
+
+
{{shipAddress}}
@@ -37,23 +49,37 @@
-
-
+
+
+
+
保存
-
+
+
+
+
+
@@ -65,43 +91,115 @@
nursingStationGoodsinfo,
updatenursingStation,
getSubordinateRegions,
- getSubordinate
+ getSubordinate,
+ updateDefaultAddress
} from '@/api/modifyAddress/modifyAddress.js';
import baseurl from '@/api/baseurl.js'
+ import gkcity from "../m-city/m-city.vue";
export default {
+ components: {
+ "m-city": gkcity
+ },
data() {
return {
+ timer: null,
isedit: true, //标识
delshow: false, //删除弹框
content: '确认要删除信息吗?',
show: false, //弹框
- areashow: false, //经纬度开关
- arealist: [], //区街道list
+ // areashow: false, //经纬度开关
+ // arealist: [], //区街道list
areaCode: '',
- shipAddress: '添加收货地址',
+ shipAddress: '添加地址',
infolist: {
receiveName: '',
receivePhone: '',
receiveAddress: '',
- areaCode: '',
+ areaCode: null,
patientId: '',
- address: '', //页面所属区域
+ address: null, //页面所属区域
+ defaultAddressFlag: false,
},
goodPatient: [], // 查询地址信息
patientId: null,
url: '',
updata: [],
+ list: [{
+ id: "",
+ localName: "请选择",
+ children: [],
+ }, ],
+ cityPickershow: false,
+ addresslength: null,
}
},
- onLoad(options) {
- let that = this
- this.url = options.url
- this.updata = JSON.parse(options.updata)
- //获取传值
+ onShow() {
this.goodsList()
this.areaInfo()
},
+ onLoad(options) {
+ let that = this
+ this.updata = JSON.parse(options.updata)
+ },
methods: {
+ change(status) {
+ if (!status.defaultAddressFlag) {
+ status.defaultAddressFlag = true
+ } else {
+ this.goodPatient.forEach(e => {
+ e.defaultAddressFlag = 0
+ })
+ status.defaultAddressFlag = 1
+ updateDefaultAddress(this.goodPatient).then(res => {
+ if (res.code == 200) {
+ this.goodsList();
+ uni.$emit('updata', {
+ updata: JSON.stringify(this.updata),
+ useritem: JSON.stringify(status)
+ })
+ uni.navigateBack({
+ delta: 1
+ });
+ }
+ })
+ }
+ },
+ // 三级地址联动回调
+ getpickerParentValue(e) {
+ this.addresslength = e
+ this.infolist.address = ''
+ this.infolist.areaCode = ''
+ if (e && e.length >= 1) {
+ e.forEach(el => {
+ this.infolist.address = this.infolist.address + el.localName
+ })
+ this.infolist.areaCode = e[e.length - 1].id
+ }
+ // if (e) {
+ // if (e.length == 4) {
+ // this.infolist.address = e[0].localName + '-' + e[1].localName + '-' + e[2].localName + '-' + e[3]
+ // .localName
+ // this.infolist.areaCode = e[3].id
+ // } else if (e.length == 3) {
+ // this.infolist.address = e[0].localName + '-' + e[1].localName + '-' + e[2].localName
+ // this.infolist.areaCode = e[2].id
+ // } else if (e.length == 2) {
+ // this.infolist.address = e[0].localName + '-' + e[1].localName
+ // this.infolist.areaCode = e[1].id
+ // } else if (e.length == 1) {
+ // this.infolist.address = e[0].localName
+ // this.infolist.areaCode = e[0].id
+ // } else {
+ // this.infolist.address = ''
+ // this.infolist.areaCode = ''
+ // }
+ // }
+ },
+ // 显示三级地址联动
+ showPicker() {
+ this.cityPickershow = true
+ this.$refs.cityPicker.show();
+ },
//将信息携带至订单页面
goorder(item) {
uni.$emit('updata', {
@@ -119,14 +217,31 @@
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
- that.infolist.patientId = value
goodPatientInfo(that.patientId).then(res => {
res.data.forEach(e => {
- e.address = e.provinceName + e.cityName + e.regionName + e
- .streetName + e.receiveAddress
+ e.address = e.areaName + e.receiveAddress
+ if (e.defaultAddressFlag == 1) {
+ e.defaultAddressFlag = true
+ } else {
+ e.defaultAddressFlag = false
+ }
})
that.goodPatient = res.data
})
+ } else {
+ that.$refs.uToast.show({
+ title: '登录状态异常',
+ type: 'error'
+ })
+ if (that.timer) {
+ clearTimeout(that.timer)
+ }
+ that.timer = setTimeout(e => {
+ uni.navigateBack({
+ delta: 2
+ })
+
+ }, 1500)
}
} catch (e) {}
},
@@ -134,45 +249,106 @@
submit() {
let that = this
if (that.isedit == true) {
- addnursingStation(that.infolist).then(res => {
- if (res.code == 200) {
- uni.showToast({
- title: '新增成功',
- duration: 1500
- });
- that.show = false;
- setTimeout(e => {
- that.goodsList()
- }, 1500)
+ if (that.addresslength) {
+ if (that.addresslength.length > 2) {
+ addnursingStation(that.infolist).then(res => {
+ if (res.code == 200) {
+ that.$refs.uToast.show({
+ title: '新增成功',
+ type: 'success'
+ })
+ that.cencel();
+ setTimeout(e => {
+ that.goodsList()
+ }, 1000)
+ } else {
+ that.$refs.uToast.show({
+ title: res.msg,
+ type: 'error'
+ })
+ }
+ })
+ } else {
+ this.Toast()
}
- })
+ } else {
+ this.Toast()
+ }
} else {
- updatenursingStation(that.infolist).then(res => {
- uni.showToast({
- title: '修改成功',
- duration: 1500
- });
- that.show = false;
- setTimeout(e => {
- that.goodsList()
- }, 1500)
- })
+ if (that.addresslength) {
+ if (that.addresslength.length > 2) {
+ this.xgdata();
+ } else {
+ this.Toast()
+ }
+ } else {
+ this.xgdata();
+ }
}
},
+ Toast() {
+ this.$refs.uToast.show({
+ title: '区域应选择所在的区或街道,请重新选择!',
+ type: 'error'
+ })
+ },
+ xgdata() {
+ var that = this
+ updatenursingStation(that.infolist).then(res => {
+ if (res.code == 200) {
+ that.$refs.uToast.show({
+ title: '修改成功',
+ type: 'success'
+ })
+ that.cencel();
+ setTimeout(e => {
+ that.goodsList()
+ }, 1000)
+ } else {
+ that.$refs.uToast.show({
+ title: res.msg,
+ type: 'error'
+ })
+ }
+ })
+ },
+ // submit() {
+ // if (this.addresslength) {
+ // if (this.addresslength.length > 2) {
+ // this.data();
+ // } else {
+ // this.$refs.uToast.show({
+ // title: '所属区域应选择所在的区或街道,请重新选择!',
+ // type: 'error'
+ // })
+ // }
+ // } else {
+ // this.data()
+ // }
+ // },
// 修改按钮
updataxg(item) {
- this.shipAddress = '修改收货地址'
+ this.cityPickershow = true
+ this.shipAddress = '修改地址'
this.isedit = false
nursingStationGoodsinfo(item.id).then(res => {
- this.infolist = res.data
- getSubordinate(res.data.areaCode).then(res => {
- this.infolist.address = res.data.regionName + '-' + res.data.streetName
+ getSubordinate(res.data.areaCode).then(resp => {
+ if (resp.data.streetName) {
+ res.data.address = resp.data.provinceName + resp.data.cityName + resp.data
+ .regionName + resp.data.streetName
+ } else {
+ res.data.address = resp.data.provinceName + resp.data.cityName + resp.data
+ .regionName
+ }
+ this.infolist = res.data
this.show = true
})
})
},
// 新增
add() {
+ this.shipAddress = '添加地址'
+ this.cityPickershow = true
this.infolist = {
receiveName: '',
receivePhone: '',
@@ -191,50 +367,68 @@
content: '确认要删除信息吗',
success: function(res) {
if (res.confirm) {
- delnursingStation(item.id).then(res => {
- uni.showToast({
- title: '删除成功',
- duration: 1500,
-
- });
- setTimeout(e => {
- that.goodsList()
- }, 1500)
- that.delshow = false;
- })
- } else if (res.cancel) {
- }
+ if (that.goodPatient.length == 1) {
+ that.$refs.uToast.show({
+ title: '最少保留一条地址信息',
+ type: 'error'
+ })
+ } else {
+ delnursingStation(item.id).then(res => {
+ that.$refs.uToast.show({
+ title: '删除成功',
+ type: 'success'
+ })
+ setTimeout(e => {
+ that.goodsList()
+ }, 1000)
+ that.delshow = false;
+ })
+ }
+ } else if (res.cancel) {}
}
});
},
// 取消
cencel() {
this.show = false
- this.infolist = {}
+ this.cityPickershow = false
},
// 选择区街道
areaInfo() {
- getSubordinateRegions(this.areaCode).then(res => {
+ getSubordinateRegions().then(res => {
//区下无街道添加一个空街道
- res.data.forEach(e => {
- if (e.children.length == 0) {
- e.children.push({
- areaCode: "",
- areaName: "暂无街道",
- children: null,
- id: '',
- })
- }
- })
- this.arealist = res.data;
+ this.list = res.data;
})
},
+ // 选择区街道
+ // areaInfo() {
+ // getSubordinateRegions(this.areaCode).then(res => {
+ // //区下无街道添加一个空街道
+ // res.data.forEach(e => {
+ // if (e.children.length == 0) {
+ // e.children.push({
+ // areaCode: "",
+ // areaName: "暂无街道",
+ // children: null,
+ // id: '',
+ // })
+ // }
+ // })
+ // this.arealist = res.data;
+ // })
+ // },
//区街道选择
areaconfirm(e) {
this.infolist.areaCode = e[e.length - 1].value
this.infolist.address = e[0].label + '-' + e[1].label
},
- }
+ },
+ onPullDownRefresh() { //下拉刷新
+ this.goodsList()
+ setTimeout(function() {
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
}
diff --git a/pages/nursestation/nursestation.scss b/pages/nursestation/nursestation.scss
index 78c2e03..f91a9ac 100644
--- a/pages/nursestation/nursestation.scss
+++ b/pages/nursestation/nursestation.scss
@@ -118,6 +118,7 @@
top:14%;
left:32%;
font-size: 28rpx;
+ overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
}
.huanyao {
color: #000000;
@@ -208,6 +209,10 @@
line-height: 42rpx;
color: #666666;
padding-top: 30rpx;
+ /deep/ .richPic {
+ width: 100% !important;
+ height: 100% !important;
+ }
}
.Introduction {
font-size: 31rpx;
diff --git a/pages/nursestation/nursestation.vue b/pages/nursestation/nursestation.vue
index 4b2c199..d528587 100644
--- a/pages/nursestation/nursestation.vue
+++ b/pages/nursestation/nursestation.vue
@@ -3,10 +3,16 @@
-
+
{{list.nurseStationName}}
- {{list.address}}
+
+ 暂无
+
+ {{list.address}}
+
+ 暂无
+
@@ -19,8 +25,7 @@
机构简介
-
- {{list.agencyIntroduce}}
+
@@ -41,7 +46,8 @@
-
+
{{item.nurseItemName}}
@@ -49,7 +55,7 @@
-->
服务时长:{{item.serveDurationUnit?item.serveDurationUnit:'0'}}
- 预约
+ 预约
¥{{item.nurseItemPrice==null?'0':item.nurseItemPrice}}
@@ -63,8 +69,9 @@
{{item.goodsName}}
+ {{item.attributeDetailsName}}
购买
- ¥{{item.goodsPrice==null?'0':item.goodsPrice}}起
+ ¥{{item.goodsPrice==null?'0':item.goodsPrice}}
@@ -106,7 +113,6 @@
export default {
data() {
return {
- patientId: '', //
usershow: false, //完善信息开关
choicetab: false, //切换
list: [], //护理站list
@@ -121,6 +127,7 @@
pageNum: 1,
pageSize: 10,
tabIndex: 0,
+ timer: null,
tabList: [{
name: "服务项目"
}, {
@@ -131,8 +138,6 @@
onShow() {
this.usershow = false
this.getInfo()
- this.serveinfo()
- this.productinfo()
},
onLoad(options) {
this.nurseStationId = options.nurseStationId
@@ -142,49 +147,42 @@
let that = this
try {
const value = uni.getStorageSync('openid');
- if (value) {
- const value2 = uni.getStorageSync('patientId');
- if (value2) {
- that.patientId = value2
- AppIdentification(that.patientId).then(res => {
- if (res.code == 200) {
- if (res.data.loginFlag) {
- that.usershow = false
- uni.navigateTo({
- url: `/pages/appointmenttime/appointmenttime?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
- })
- } else {
- that.usershow = true
- }
- } else {
- that.$refs.uToast.show({
- title: res.msg,
- type: 'error'
+ const value2 = uni.getStorageSync('patientId');
+ if (value && value2) {
+ AppIdentification(value2).then(res => {
+ if (res.code == 200) {
+ if (res.data.loginFlag) {
+ that.usershow = false
+ uni.navigateTo({
+ url: `/pages/appointmenttime/appointmenttime?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
})
- setTimeout(e => {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }, 1500)
+ } else {
+ that.usershow = true
}
- })
- } else {
- that.$refs.uToast.show({
- title: '未登录,请先登录',
- type: 'error'
- })
- setTimeout(e => {
- uni.navigateTo({
- url: '/pages/login/login'
+ } else if (res.code == 9999) {} else {
+ that.$refs.uToast.show({
+ title: res.msg,
+ type: 'error'
})
- }, 1500)
- }
+ if (that.timer) {
+ clearTimeout(that.timer)
+ }
+ that.timer = setTimeout(e => {
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }, 1500)
+ }
+ })
} else {
that.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error'
})
- setTimeout(e => {
+ if (that.timer) {
+ clearTimeout(that.timer)
+ }
+ that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
@@ -198,15 +196,25 @@
},
getInfo() {
introductionList(this.nurseStationId).then(res => {
- res.data.stationIntroducePcitureUrl = baseurl + res.data.stationIntroducePcitureUrl
- this.list = res.data
- if (res.data.nurseStationLabelList) {
- this.nurseStationLabelList = res.data.nurseStationLabelList
+ if (res.code == 200) {
+ this.serveinfo()
+ this.productinfo()
+ res.data.stationIntroducePcitureUrl = baseurl + res.data.stationIntroducePcitureUrl
+ if (res.data.agencyIntroduce) {
+ res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\![]()
{
+ uni.removeStorageSync('Refresh');
res.rows.forEach(e => {
e.itemPictureUrl = baseurl + e.itemPictureUrl
})
@@ -215,7 +223,9 @@
})
},
productinfo() {
+ this.pageNum = 1
productInformation(this.nurseStationId, this.pageNum, this.pageSize).then(res => {
+ uni.removeStorageSync('Refresh');
res.rows.forEach(e => {
e.goodsPictureUrl = baseurl + e.goodsPictureUrl
})
@@ -230,7 +240,7 @@
//跳转商品详情页
goCommodityDetails(item) {
uni.navigateTo({
- url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'NURSE_STATION'}`
+ url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'NURSE_STATION'}&goodsAttributeId=${item.goodsAttributeId}`
})
},
//跳转完善页面
@@ -240,6 +250,11 @@
url: '/pages/information/information'
})
},
+ goProjectDetails(item) {
+ uni.navigateTo({
+ url: `/pages/ProjectDetails/ProjectDetails?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
+ })
+ },
gophone() {
var that = this
uni.getSystemInfo({
@@ -265,7 +280,6 @@
});
}
},
-
onReachBottom() { //下滑加载
if (this.choicetab == 0) {
if (this.servelist.length >= this.servetotal) {} else {
@@ -287,9 +301,7 @@
})
})
}
-
}
-
},
onPullDownRefresh() { //下拉刷新
this.pageNum = 1;
@@ -312,6 +324,24 @@
uni.stopPullDownRefresh();
}, 1000);
},
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
}
diff --git a/pages/order/order.vue b/pages/order/order.vue
index 78f72df..659798a 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -8,18 +8,42 @@
待付款
+
+ {{list.waitPayCount}}
+
+
+ 99+
+
待收货
+
+ {{list.waitReceivedGoodsCount}}
+
+
+ 99+
+
待评价
+
+ {{list.receivedGoodsCount}}
+
+
+ 99+
+
已完成
+
@@ -29,14 +53,34 @@
+
@@ -129,14 +173,31 @@
justify-content: space-around;
image {
- width: 83rpx;
- height: 72rpx;
+ width: 100rpx;
+ height: 80rpx;
margin-left: 50%;
transform: translateX(-50%);
}
.OrderStatus {
- margin-top: 8%;
+ padding-top: 50rpx;
+ position: relative;
+
+ .orderCount {
+ background-color: red;
+ color: #FFFFFF;
+ border-radius: 50%;
+ text-align: center;
+ // padding: 0 5rpx ;
+ line-height: 40rpx;
+ width: 40rpx;
+ height: 40rpx;
+ font-size: 20rpx;
+ // display: inline-block;
+ position: absolute;
+ top: 30rpx;
+ right: -20rpx;
+ }
}
}
diff --git a/pages/orderDetails/orderDetails.scss b/pages/orderDetails/orderDetails.scss
index ca8f4e4..dfae148 100644
--- a/pages/orderDetails/orderDetails.scss
+++ b/pages/orderDetails/orderDetails.scss
@@ -1,20 +1,115 @@
.app {
+ padding: 0;
+ .submits {
+ width: 501rpx;
+ height: 71rpx;
+ background: #4C7BC9;
+ border-radius: 26rpx;
+ text-align: center;
+ line-height: 71rpx;
+ color: #ffffff;
+ font-size: 34rpx;
+ margin-top: 5%;
+ margin-left: 15%;
+ }
+
+ // 弹框确认收货
+ .chat {
+ .word {
+ font-size: 26rpx;
+ color: #010000;
+ line-height: 36rpx;
+ width: 70%;
+ margin: 50rpx auto;
+ text-align: center;
+ }
+
+ .image {
+ position: relative;
+
+ .blackground {
+ width: 183rpx;
+ height: 69rpx;
+ background: #030303;
+ opacity: 0.5;
+ color: #ffffff;
+ font-size: 36rpx;
+ text-align: center;
+ line-height: 69rpx;
+ position: absolute;
+ bottom: 0%;
+ left: 50%;
+ transform: translateX(-50%);
+ }
+
+ image {
+ width: 182rpx;
+ display: block;
+ margin: 0 auto;
+ height: 182rpx;
+ }
+ }
+
+ }
+ .payment {
+ width: 100%;
+ font-size: 42rpx;
+ color: #000000;
+ line-height: 120rpx;
+ text-align: center;
+
+ span {}
+
+ image {
+ width: 31rpx;
+ height: 31rpx;
+ position: absolute;
+ right: 5%;
+ top: 5%;
+ }
+ }
.time{
height: 80rpx;
width: 95%;
text-align: center;
line-height: 80rpx;
background-color: #fff;
- margin: 0 auto 10rpx;
+ margin: 30rpx auto 0;
border-radius: 20rpx;
}
+ .OrderStatus{
+ text-align: center;
+ width: 300rpx;
+ height: 70rpx;
+ margin: 30rpx auto 0;
+ line-height: 70rpx;
+ background-color:#4C7BC9 ;
+ border-radius: 50rpx;
+ // color: #4C7BC9;
+ color: #FFFFFF;
+ border: 1rpx solid #4C7BC9;
+ }
.buy {
background: #FFFFFF;
position: fixed;
bottom: 0;
height: 100rpx;
width: 100%;
-
+ .logistics{
+ width: 216rpx;
+ height: 68rpx;
+ text-align: center;
+ color: #ffffff;
+ border-radius: 26rpx;
+ font-size: 36rpx;
+ line-height: 68rpx;
+ position: absolute;
+ right: 260rpx;
+ top: 50%;
+ background: #E1AE3C;
+ transform: translateY(-50%);
+ z-index: 999;
+ }
.pay {
width: 216rpx;
height: 68rpx;
diff --git a/pages/orderDetails/orderDetails.vue b/pages/orderDetails/orderDetails.vue
index 8f20ef6..b342ec9 100644
--- a/pages/orderDetails/orderDetails.vue
+++ b/pages/orderDetails/orderDetails.vue
@@ -5,6 +5,9 @@
+
+ 订单已关闭
+
@@ -42,7 +45,6 @@
已取消
-
@@ -51,7 +53,7 @@
-
+
收货人:{{order.receiver}}
联系电话:{{order.phone}}
收货地址:{{order.receiveAddress}}
@@ -66,7 +68,41 @@
去支付
+
+
+ 查看评价
+
+
+
+
+ 去评价
+
+
+
+ 查看物流
+
+
+ 确认收货
+
+
+
+
+
+
+ 确认收到货了吗
+
+
+
+
+
+ 共1件
+
+ 为了保证你的售后权益,请收到商品确认无误后再确认收货
+
+ 确定
+
+
@@ -74,6 +110,9 @@
import {
appletGoodsOrderPay
} from '@/api/confirmOrder/index.js'
+ import {
+ confirmReceipt
+ } from '@/api/CommodityOrder/index.js'
import {
goodsOrder
} from '@/api/CommodityOrder/index.js'
@@ -84,14 +123,65 @@
baseurl: '',
order: null,
patientId: '',
- openid:null,
+ openid: null,
+ show: false, //收货
orderStatus: '',
pageSize: 10,
pageNum: 1,
timestamp: 0,
+ goodsOrderId: null,
}
},
methods: {
+ //查看评价
+ golookrate() {
+ uni.navigateTo({
+ url: `/pages/lookrate/lookrate?item=${JSON.stringify(this.order)}`
+ })
+ },
+ //收货
+ Receipts() {
+ confirmReceipt(this.order.goOrderNo).then(res => {
+ if (res.code == 200) {
+ this.$refs.uToast.show({
+ title: '收货成功',
+ type: 'success',
+ duration: '1000'
+ })
+ this.show = false
+ uni.setStorageSync("Refresh", 'Refresh')
+ this.goodsOrderinfo()
+ setTimeout(e => {
+ uni.navigateTo({
+ url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.order)}&delta=${4}`
+ })
+ }, 1000)
+ } else {
+ this.$refs.uToast.show({
+ title: '收货失败',
+ type: 'error',
+ duration: '1000'
+ })
+ this.show = false
+ }
+ })
+ },
+ //收货
+ Receipt() {
+ this.show = true
+ },
+ //看物流信息
+ gologistics() {
+ uni.navigateTo({
+ url: `/pages/logistics/logistics?item=${JSON.stringify(this.order)}`
+ })
+ },
+ //评价
+ rate() {
+ uni.navigateTo({
+ url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.order)}&delta=${4}`
+ })
+ },
//支付
pay() {
var that = this
@@ -110,10 +200,12 @@
signType: response.data.signType,
paySign: response.data.paySign,
success: function(res) {
+ uni.setStorageSync("Refresh", 'Refresh')
+ this.goodsOrderinfo()
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
- toast: 1500,
+ duration: 1500,
url: '/pages/paysuccess/paysuccess'
})
},
@@ -121,7 +213,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
- toast: 1500
+ duration: 1500
})
}
});
@@ -129,7 +221,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
- toast: 1500
+ duration: 1500
})
}
})
@@ -140,10 +232,11 @@
url: `/pages/refundType/refundType?order=${JSON.stringify(this.order)}`
})
},
- goodsOrderinfo(goodsOrderId) {
- goodsOrder(this.patientId, this.orderStatus, goodsOrderId, this.pageSize, this.pageNum).then(res => {
+ goodsOrderinfo() {
+ goodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum).then(res => {
this.order = res.rows[0]
- var time = new Date(this.order.orderTime).getTime() / 1000 + (60 * 60 * 24)
+ var ordertimes = this.order.orderTime.replaceAll(/\-/gi, "/")
+ var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
this.timestamp = time - times
})
@@ -151,26 +244,25 @@
//跳转售后详情
goAftersalesdetails(item) {
uni.navigateTo({
- url: `/pages/Aftersalesdetails/Aftersalesdetails?goodsOrderId=${item.goodsOrderId}`
+ url: `/pages/Aftersalesdetails/Aftersalesdetails?goodsOrderId=${this.order.goodsOrderId}`
})
},
},
+ onShow() {
+ this.goodsOrderinfo()
+ },
onLoad(options) {
this.baseurl = baseurl
+ this.goodsOrderId = options.goodsOrderId
let that = this
try {
const value = uni.getStorageSync('patientId');
- if (value) {
+ const value2 = uni.getStorageSync('openid');
+ if (value && value2) {
that.patientId = value
- that.goodsOrderinfo(options.goodsOrderId)
+ that.openid = value2
}
} catch (e) {}
- try {
- const value = uni.getStorageSync('openid');
- if (value) {
- that.openid = value
- } else {}
- } catch (e) {}
}
}
diff --git a/pages/payorderDetails/payorderDetails.vue b/pages/payorderDetails/payorderDetails.vue
index 10e3657..ef3957d 100644
--- a/pages/payorderDetails/payorderDetails.vue
+++ b/pages/payorderDetails/payorderDetails.vue
@@ -5,6 +5,9 @@
+
+ 订单已关闭
+
@@ -42,7 +45,6 @@
已取消
-
@@ -89,6 +91,7 @@
pageSize: 10,
pageNum: 1,
timestamp: 0,
+ goodsOrderId: null,
}
},
methods: {
@@ -113,7 +116,7 @@
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
- toast: 1500,
+ duration: 1500,
url: `/pages/paysuccess/paysuccess?delta=${3}`
})
},
@@ -121,7 +124,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
- toast: 1500,
+ duration: 1500,
})
}
});
@@ -129,7 +132,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
- toast: 2000
+ duration: 2000
})
}
})
@@ -143,7 +146,8 @@
goodsOrderinfo(goodsOrderId) {
goodsOrder(this.patientId, this.orderStatus, goodsOrderId, this.pageSize, this.pageNum).then(res => {
this.order = res.rows[0]
- var time = new Date(this.order.orderTime).getTime() / 1000 + (60 * 60 * 24)
+ var ordertimes = this.order.orderTime.replaceAll(/\-/gi, "/")
+ var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
this.timestamp = time - times
})
@@ -157,12 +161,12 @@
},
onLoad(options) {
this.baseurl = baseurl
+ this.goodsOrderId = options.goodsOrderId
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
- that.goodsOrderinfo(options.goodsOrderId)
}
} catch (e) {}
try {
@@ -172,6 +176,9 @@
} else {}
} catch (e) {}
},
+ onShow() {
+ this.goodsOrderinfo(this.goodsOrderId)
+ },
onUnload() {},
}
diff --git a/pages/picker/style.components.scss b/pages/picker/style.components.scss
deleted file mode 100644
index 6835876..0000000
--- a/pages/picker/style.components.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
-@mixin vue-flex($direction: row) {
- /* #ifndef APP-NVUE */
- display: flex;
- flex-direction: $direction;
- /* #endif */
-}
\ No newline at end of file
diff --git a/pages/ratesuccess/ratesuccess.vue b/pages/ratesuccess/ratesuccess.vue
new file mode 100644
index 0000000..4afc1c5
--- /dev/null
+++ b/pages/ratesuccess/ratesuccess.vue
@@ -0,0 +1,100 @@
+
+
+
+
+ 评价完成
+
+
+ 返回上一级
+
+
+ 去首页
+
+
+
+
+
+
+
diff --git a/pages/shopping/shopping.vue b/pages/shopping/shopping.vue
index 9047730..64fc427 100644
--- a/pages/shopping/shopping.vue
+++ b/pages/shopping/shopping.vue
@@ -3,9 +3,8 @@
-
-
+
+
{{item.goodsCategoryName}}
@@ -45,7 +44,27 @@
], //颜色随动
};
},
- onLoad(options) { //初始化加载
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //初始化加载
+ onLoad(options) {},
+ onShow() {
this.goodsCategory()
},
methods: {
@@ -58,18 +77,27 @@
//获取商城信息
goodsCategory() {
goodsCategoryList(this.pageSize, this.pageNum).then(res => {
- res.rows.forEach(e => {
- e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
- this.goodsCategoryList.push(e)
- })
- this.total = res.total
+ uni.removeStorageSync('Refresh');
+ if (res.code == 200) {
+ res.rows.forEach(e => {
+ e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
+ })
+ this.goodsCategoryList = res.rows
+ this.total = res.total
+ }
})
}
},
onReachBottom() { //下滑加载
if (this.goodsCategoryList.length >= this.total) {} else {
this.pageNum++;
- this.goodsCategory()
+ goodsCategoryList(this.pageSize, this.pageNum).then(res => {
+ res.rows.forEach(e => {
+ e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
+ this.goodsCategoryList.push(e)
+ })
+ this.total = res.total
+ })
}
},
onPullDownRefresh() { //下拉刷新
@@ -89,7 +117,9 @@
diff --git a/pages/site/site.scss b/pages/site/site.scss
index 82040aa..468727f 100644
--- a/pages/site/site.scss
+++ b/pages/site/site.scss
@@ -1,6 +1,6 @@
//护理站列表
.app{
- padding: 0;
+ padding: 0 0 5rpx 0;
.map{
padding-top: 100rpx;
z-index: 1;
diff --git a/pages/site/site.vue b/pages/site/site.vue
index 5b52680..dbfe565 100644
--- a/pages/site/site.vue
+++ b/pages/site/site.vue
@@ -12,7 +12,9 @@
{{item.nurseStationName}}
- 距离您{{item.distance}}KM
+
+ 距离您{{item.distance}}KM
点击了解
@@ -55,6 +57,7 @@
latitude: 39.90374,
longitude: 116.397827,
markers: [],
+ homeLatitudeLongitude: null,
}
},
methods: {
@@ -63,29 +66,31 @@
uni.openSetting({
success(res) {
if (res.authSetting['scope.userLocation']) {
- uni.getLocation({
- type: 'wgs84',
- success: function(res) {
- that.latitude = res.latitude
- that.longitude = res.longitude
- that.markers.push({
- id: 3,
- latitude: res.Latitude,
- longitude: res.Longitude,
- width: 20,
- height: 25,
- iconPath: "../../static/locatinsmall.png"
- })
- that.mask = false
- }
- });
+ // uni.getLocation({
+ // type: 'wgs84',
+ // success: function(res) {
+ // that.latitude = res.latitude
+ // that.longitude = res.longitude
+ // that.markers.push({
+ // id: 3,
+ // latitude: res.Latitude,
+ // longitude: res.Longitude,
+ // width: 20,
+ // height: 25,
+ // iconPath: "../../static/locatinsmall.png"
+ // })
+ // that.mask = false
+ // }
+ // });
}
}
});
},
requestinfo() {
+ this.pageNum = 1;
nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseTypeCode).then(res => {
if (res.total > 0) {
+ uni.removeStorageSync('Refresh');
res.rows.forEach(e => {
e.stationPictureUrl = baseurl + e.stationPictureUrl
})
@@ -144,90 +149,119 @@
},
onShow() {
var that = this
- try {
- const value = uni.getStorageSync('patientId');
- if (value) {
- getPatientInfo(value).then(res => {
- if (res.code == 200) {
- if (res.data.homeLatitude && res.data.homeLongitude) {
- that.latitude = res.data.homeLatitude
- that.longitude = res.data.homeLongitude
- that.markers.push({
- id: 3,
- latitude: res.data.homeLatitude,
- longitude: res.data.homeLongitude,
- width: 20,
- height: 25,
- iconPath: "../../static/locatinsmall.png"
- })
- that.requestinfo();
- } else {
- uni.getLocation({
- type: 'wgs84',
- success: function(resp) {
- that.latitude = resp.latitude
- that.longitude = resp.longitude
- that.markers.push({
- id: 3,
- latitude: resp.latitude,
- longitude: resp.longitude,
- width: 20,
- height: 25,
- iconPath: "../../static/locatinsmall.png"
- })
- that.requestinfo();
- },
- fail(err) {
- that.mask = true;
- }
- });
- }
- } else {
- uni.getLocation({
- type: 'wgs84',
- success: function(resh) {
- that.latitude = resh.latitude
- that.longitude = resh.longitude
- that.markers.push({
- id: 3,
- latitude: resh.latitude,
- longitude: resh.longitude,
- width: 20,
- height: 25,
- iconPath: "../../static/locatinsmall.png"
- })
- that.requestinfo();
- },
- fail(err) {
- that.mask = true;
- }
- });
- }
- })
- } else {
- uni.getLocation({
- type: 'wgs84',
- success: function(res) {
- that.latitude = res.latitude
- that.longitude = res.longitude
+ const value = uni.getStorageSync('patientId');
+ if (value) {
+ getPatientInfo(value).then(res => {
+ if (res.code == 200) {
+ this.homeLatitudeLongitude = res.data
+ if (res.data.homeLatitude && res.data.homeLongitude) {
+ that.latitude = res.data.homeLatitude
+ that.longitude = res.data.homeLongitude
that.markers.push({
id: 3,
- latitude: res.latitude,
- longitude: res.longitude,
+ latitude: res.data.homeLatitude,
+ longitude: res.data.homeLongitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.requestinfo();
- },
- fail(err) {
- that.mask = true;
+ } else {
+ that.latitude = that.latitude
+ that.longitude = that.longitude
+ that.requestinfo();
+ // uni.getLocation({
+ // type: 'wgs84',
+ // success: function(resp) {
+ // that.latitude = resp.latitude
+ // that.longitude = resp.longitude
+ // that.markers.push({
+ // id: 3,
+ // latitude: resp.latitude,
+ // longitude: resp.longitude,
+ // width: 20,
+ // height: 25,
+ // iconPath: "../../static/locatinsmall.png"
+ // })
+ // that.requestinfo();
+ // },
+ // fail(err) {
+ // that.mask = true;
+ // }
+ // });
}
- });
- }
- } catch (e) {}
+ } else if (res.code == 9999) {
+
+ } else {
+ that.latitude = that.latitude
+ that.longitude = that.longitude
+ that.requestinfo();
+ // that.markers.push({
+ // uni.getLocation({
+ // type: 'wgs84',
+ // success: function(resh) {
+ // that.latitude = resh.latitude
+ // that.longitude = resh.longitude
+ // that.markers.push({
+ // id: 3,
+ // latitude: resh.latitude,
+ // longitude: resh.longitude,
+ // width: 20,
+ // height: 25,
+ // iconPath: "../../static/locatinsmall.png"
+ // })
+ // that.requestinfo();
+ // },
+ // fail(err) {
+ // that.mask = true;
+ // }
+ // });
+ }
+ })
+ } else {
+ that.latitude = that.latitude
+ that.longitude = that.longitude
+ that.requestinfo();
+ // uni.getLocation({
+ // type: 'wgs84',
+ // success: function(res) {
+ // that.latitude = res.latitude
+ // that.longitude = res.longitude
+ // that.markers.push({
+ // id: 3,
+ // latitude: res.latitude,
+ // longitude: res.longitude,
+ // width: 20,
+ // height: 25,
+ // iconPath: "../../static/locatinsmall.png"
+ // })
+ // that.requestinfo();
+ // },
+ // fail(err) {
+ // that.mask = true;
+ // }
+ // });
+ }
},
onLoad() {},
+ //1.分享给朋友
+ onShareAppMessage(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
+ //2.分享到朋友圈
+ onShareTimeline(res) {
+ let pages = getCurrentPages();
+ let url = pages[pages.length - 1].$page.fullPath
+ return {
+ title: '泉医到家',
+ path: url,
+ }
+ },
}
diff --git a/pages/user/user.scss b/pages/user/user.scss
index 3189b01..ac4fe44 100644
--- a/pages/user/user.scss
+++ b/pages/user/user.scss
@@ -64,6 +64,16 @@
background: #FFFFFF;
border-radius: 0 0 20rpx 20rpx;
}
+ .addressitem {
+ box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
+ // height: 110rpx;
+ line-height: 80rpx;
+ border-bottom: 1rpx solid #D8D4D4;
+ background: #FFFFFF;
+ .address{
+ line-height: 50rpx;font-size: 28rpx;width: 90%;margin: 0 auto;
+ }
+ }
.item {
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
// height: 110rpx;
diff --git a/pages/user/user.vue b/pages/user/user.vue
index 0de26cd..2eb2d9e 100644
--- a/pages/user/user.vue
+++ b/pages/user/user.vue
@@ -7,7 +7,7 @@
-
+
{{appPersonallist.patientName}}
@@ -19,50 +19,57 @@
-
+
姓名:{{appPersonallist.patientName}}
姓名:
-
+
电话:{{appPersonallist.phone}}
电话:
-
+
身份证:{{appPersonallist.cardNo}}
身份证:
-
- 区域:{{appPersonallist.regionName}}-{{appPersonallist.streetName}}
-
-
- 区域:
-
-
- 地址:
- {{appPersonallist.address}}
-
-
- 地址:
-
-
+
+
+
+ 区域:
+
+
+
+
+
+
+ 地址:
+
+
+ {{appPersonallist.address}}
+
+
+
+
+ 地址:
+
+
疾病类型:
- {{item.diseaseName}}
@@ -119,9 +126,7 @@
this.baseurl = baseurl
this.myInfo()
},
- onLoad(options) {
- //获取传值
- },
+ onLoad(options) {},
methods: {
remove() {
let that = this
@@ -133,6 +138,7 @@
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
+ uni.removeStorageSync('token');
that.$refs.uToast.show({
title: '退出账号成功',
type: 'success',
@@ -142,8 +148,8 @@
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
- uni.reLaunch({
- url: '/pages/homepage/homepage'
+ uni.navigateBack({
+ delta: 1
})
}, 1000)
} else if (res.cancel) {
@@ -156,49 +162,47 @@
}
});
},
+ removes() {
+ uni.removeStorageSync('patientId');
+ uni.removeStorageSync('openid');
+ uni.removeStorageSync('phone');
+ uni.removeStorageSync('Refresh');
+ uni.removeStorageSync('token');
+ uni.navigateBack({
+ delta: 1
+ })
+ },
//获取个人信息
myInfo() {
var that = this
const value = uni.getStorageSync('openid');
- if (value) {
+ const value2 = uni.getStorageSync('patientId');
+ if (value && value2) {
existPatientInfo(value).then(res => {
- if (res.code == 200) {
- if (res.msg == 'LOGIN') {
- uni.setStorageSync("LOGIN", res.msg)
- const value2 = uni.getStorageSync('patientId');
- if (value2) {
- appPersonal(value2).then(Response => {
- if (Response.code == 200) {
- that.appPersonallist = Response.data
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- })
+ if (res.code == 200 && res.msg == 'LOGIN') {
+ appPersonal(value2).then(Response => {
+ if (Response.code == 200) {
+ that.appPersonallist = Response.data
+ that.appPersonallist.homeLatitude = Number(that.appPersonallist
+ .homeLatitude)
+ that.appPersonallist.homeLongitude = Number(that.appPersonallist
+ .homeLongitude)
+ } else if (Response.code == 9999) {} else {
+ that.removes();
}
- } else {
- that.remove()
- }
+ })
} else {
- that.remove()
+ that.removes();
}
})
} else {
- that.remove()
+ that.removes();
}
},
- remove() {
- uni.removeStorageSync('patientId');
- uni.removeStorageSync('openid');
- uni.removeStorageSync('phone');
- uni.navigateTo({
- url: '/pages/login/login'
- })
- },
updatainfo() {
uni.navigateTo({
- url: `/pages/modify/modify?appPersonallist=${JSON.stringify(this.appPersonallist)}`
+ // url: `/pages/modify/modify?appPersonallist=${JSON.stringify(this.appPersonallist)}`
+ url: `/pages/modify/modify`
})
}
},
diff --git a/static/192x192.png b/static/192x192.png
new file mode 100644
index 0000000..cfeb33c
Binary files /dev/null and b/static/192x192.png differ
diff --git a/static/fenlei.png b/static/fenlei.png
new file mode 100644
index 0000000..3993982
Binary files /dev/null and b/static/fenlei.png differ