Merge remote-tracking branch 'origin/master' into dev
# Conflicts: # api/baseurl.js
This commit is contained in:
commit
b99bede35c
@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
//查询商品分类二级分类上边列表 小程序
|
||||
export function getGoodsCategoryNameList(goodsCategoryId) {
|
||||
return request({
|
||||
url: `/nurseApplet/nursingStationGoods/getGoodsCategoryNameList?goodsCategoryId=${goodsCategoryId}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
8
api/ProjectDetails/index.js
Normal file
8
api/ProjectDetails/index.js
Normal file
@ -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'
|
||||
})
|
||||
}
|
||||
@ -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
|
||||
|
||||
@ -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'
|
||||
})
|
||||
}
|
||||
@ -6,3 +6,10 @@ export function getWeChatUser(loginCode,phoneCode) {
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
export function createMobileToken() {
|
||||
return request({
|
||||
url: `/nurseApplet/authorization/createMobileToken`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
9
api/lookrate/index.js
Normal file
9
api/lookrate/index.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from "../request.js"
|
||||
|
||||
// 修改信息
|
||||
export function lookrate(orderNo) {
|
||||
return request({
|
||||
url: `/nurseApp/orderEvaluate/selectOrderEvaluate?orderNo=${orderNo}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
import request from "../request.js"
|
||||
|
||||
// 根据被护理人id查询基本信息
|
||||
export function goodPatientInfo(patientId) {
|
||||
return request({
|
||||
@ -46,12 +47,34 @@ export function getSubordinate(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
|
||||
})
|
||||
}
|
||||
|
||||
9
api/order/index.js
Normal file
9
api/order/index.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from "../request.js"
|
||||
|
||||
export function orderCount(patientId) {
|
||||
return request({
|
||||
url: `/nurseApp/login/orderCount?patientId=${patientId}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
@ -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)
|
||||
},
|
||||
|
||||
@ -2,7 +2,7 @@ import request from "../request.js"
|
||||
|
||||
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'
|
||||
})
|
||||
}
|
||||
|
||||
2
main.js
2
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'
|
||||
|
||||
@ -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
|
||||
},
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "NurseStationAppletUI",
|
||||
"name": "nurseWeChatAppletUI",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
||||
96
pages.json
96
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": {
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
@ -47,7 +47,6 @@
|
||||
<text class="money">实付款:</text>
|
||||
<text class="price">¥28.0</text>
|
||||
</view>
|
||||
|
||||
<view class="result">
|
||||
查看结果
|
||||
</view>
|
||||
@ -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,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -125,6 +140,7 @@
|
||||
// width: 169rpx;
|
||||
height: 171rpx;
|
||||
margin-left: 6%;
|
||||
|
||||
// background: #BFBFBF;
|
||||
.name {
|
||||
height: 70rpx;
|
||||
@ -134,6 +150,7 @@
|
||||
color: #000000;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
|
||||
.doctor {
|
||||
height: 60rpx;
|
||||
font-size: 35rpx;
|
||||
@ -142,11 +159,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Apayment {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
|
||||
.money {
|
||||
|
||||
height: 29rpx;
|
||||
@ -155,6 +174,7 @@
|
||||
line-height: 29rpx;
|
||||
// margin-top: -40px;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-family: Adobe Heiti Std;
|
||||
font-weight: normal;
|
||||
@ -164,6 +184,7 @@
|
||||
color: #000000;
|
||||
line-height: 77rpx;
|
||||
}
|
||||
|
||||
.result {
|
||||
width: 217rpx;
|
||||
height: 68rpx;
|
||||
|
||||
@ -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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -2,11 +2,14 @@
|
||||
<view class="app">
|
||||
<u-swiper :list="info" height="750" style='background-size: 100%;'></u-swiper>
|
||||
<view class="Commodity common">
|
||||
<view class="name">
|
||||
<view class="name" v-if="goodsDetailslist.goodsName">
|
||||
{{goodsDetailslist.goodsName}}
|
||||
</view>
|
||||
<view class="name" v-else>
|
||||
暂无
|
||||
</view>
|
||||
<view class="price">
|
||||
¥{{goodsPrice}} 起
|
||||
¥{{goodsPrice}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="choice common" @tap="buyshow=true">
|
||||
@ -43,7 +46,9 @@
|
||||
<view class="selected">
|
||||
图文服务
|
||||
</view>
|
||||
<image v-for="(item,index) in info" :src="item.image" mode=""></image>
|
||||
<view class="textInfo" v-html="goodsDetailslist.goodsRemark">
|
||||
</view>
|
||||
<!-- <image v-for="(item,index) in info" :src="item.image" mode=""></image> -->
|
||||
</view>
|
||||
<view class="Purchasecolumn">
|
||||
<view class="buy" @tap="buyshow=true">
|
||||
@ -54,12 +59,15 @@
|
||||
<view class="PurchasePage" @click.stop=''>
|
||||
<image class="close" src="../../static/gb.png" mode="" @tap='buyshow=false'></image>
|
||||
</image>
|
||||
<view class="topcontent">
|
||||
<view class="topcontent" style="width: 96%;">
|
||||
<view class="image">
|
||||
<image :src="updata.img" mode=""></image>
|
||||
</view>
|
||||
<view class="title">
|
||||
<span>{{goodsDetailslist.goodsName}}</span>
|
||||
<view class="title" v-if="goodsDetailslist.goodsName">
|
||||
{{goodsDetailslist.goodsName}}
|
||||
</view>
|
||||
<view class="title" v-else>
|
||||
暂无
|
||||
</view>
|
||||
<view class="price">
|
||||
¥{{updata.goodsPrice}}
|
||||
@ -68,15 +76,40 @@
|
||||
库存数量:{{updata.goodsStock}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
|
||||
@scrolltolower="lower" @scroll="scroll">
|
||||
<view class="bodys" @tap='upaddress()'>
|
||||
<view class="addressinfo">
|
||||
<image src="../../static/locatinsmall.png" mode=""></image>
|
||||
<view class="namephone" v-if='userid'>
|
||||
{{updata.receiver}},{{updata.phone}}
|
||||
</view>
|
||||
<view class="address" v-if='userid'>
|
||||
{{updata.receiveAddress}}
|
||||
</view>
|
||||
<view class="namephone" v-else>
|
||||
前往完善个人信息
|
||||
</view>
|
||||
<view class="picture2">
|
||||
<u-icon name="arrow-right" color="black" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="centercontent topcontent" v-show="goodshow">
|
||||
<view class="header">
|
||||
商品规格
|
||||
</view>
|
||||
<view class="" style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
||||
<view v-for="(item,index) in goodDetailsLists"
|
||||
:class="item.isActive ? 'Productmodel':'productmodel'" @tap='isActivegoods(item)'>
|
||||
<image :src="item.attributePitureUrl" mode=""></image>
|
||||
<view class="">
|
||||
{{item.attributeDetailsName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="centercontent topcontent" v-for="(item,index) in goodDetailsLists">
|
||||
<view class="header">
|
||||
{{item.attributeName}}
|
||||
@ -91,9 +124,23 @@
|
||||
数量
|
||||
</view>
|
||||
<view class="number">
|
||||
<u-number-box :min="1" :max="updata.goodsStock" v-model="updata.goodsCount"></u-number-box>
|
||||
<u-number-box :min="1" :max="updata.goodsStock" v-model="updata.goodsCount">
|
||||
</u-number-box>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="height: 230rpx;">
|
||||
<view class="bottomcontent topcontent" style="padding-bottom: 0;">
|
||||
<view class="header">
|
||||
支付方式
|
||||
</view>
|
||||
<view class="chat">
|
||||
<image src="/static/chat.png" mode=""></image>
|
||||
<span>微信支付</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="buy" @tap="tapbuy">
|
||||
立即购买
|
||||
</view>
|
||||
@ -128,6 +175,10 @@
|
||||
goodPatientInfo
|
||||
} from '@/api/modifyAddress/modifyAddress.js';
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import {
|
||||
addStationGoodsOrder,
|
||||
appletGoodsOrderPay
|
||||
} from '@/api/confirmOrder/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -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,50 +239,114 @@
|
||||
},
|
||||
//立即购买跳转确认订单页面
|
||||
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()
|
||||
}
|
||||
if (value && value2) {
|
||||
that.updata.patientId = value2
|
||||
AppIdentification(value2).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.loginFlag) {
|
||||
if (that.goodshow == true) {
|
||||
if (that.updata.goodsAttributeName == '') {
|
||||
if (this.goodshow == true) {
|
||||
if (this.updata.goodsAttributeName == '') {
|
||||
that.$refs.uToast.show({
|
||||
title: '未选择商品',
|
||||
type: 'error'
|
||||
})
|
||||
} else if (that.updata.goodsStock == 0) {
|
||||
} else if (this.updata.goodsStock == 0) {
|
||||
that.$refs.uToast.show({
|
||||
title: '库存数量不足,无法购买',
|
||||
type: 'error'
|
||||
})
|
||||
} else {
|
||||
that.buyshow = false
|
||||
that.updata.totalPrice = (that.updata.goodsPrice * that.updata
|
||||
this.buyshow = false
|
||||
this.updata.totalPrice = (this.updata.goodsPrice * this.updata
|
||||
.goodsCount).toFixed(
|
||||
2)
|
||||
uni.navigateTo({
|
||||
url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
|
||||
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
|
||||
uni.navigateTo({
|
||||
url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
|
||||
that.$refs.uToast.show({
|
||||
title: '未选择商品',
|
||||
type: 'error'
|
||||
})
|
||||
// that.buyshow = false
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
|
||||
// })
|
||||
}
|
||||
} else {
|
||||
that.buyshow = false
|
||||
that.usershow = true
|
||||
this.usershow = true
|
||||
}
|
||||
} else {
|
||||
} else if (res.code == 9999) {} else {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
@ -249,44 +375,32 @@
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '未登录,请先登录',
|
||||
type: 'error'
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
//选择商品
|
||||
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(/\<img/gi,
|
||||
"<br/> <img class='richPic'")
|
||||
}
|
||||
res.data.goodsPictureUrl = this.baseurl + res.data.goodsPictureUrl
|
||||
this.image = res.data.goodsPictureUrl
|
||||
var obj = {
|
||||
image: res.data[0].goodsPictureUrl,
|
||||
image: res.data.goodsPictureUrl,
|
||||
}
|
||||
this.info.push(obj)
|
||||
if (res.data[0].goodDetailsLists == null) {
|
||||
if (res.data.goodAttributeDetailsLists == null) {
|
||||
this.goodshow = false
|
||||
} else if (res.data[0].goodDetailsLists.length == 0) {
|
||||
} else if (res.data.goodAttributeDetailsLists.length == 0) {
|
||||
this.goodshow = false
|
||||
} else {
|
||||
res.data[0].goodDetailsLists.forEach(e => {
|
||||
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
|
||||
})
|
||||
// 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].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
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
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
|
||||
},
|
||||
|
||||
onShow() {
|
||||
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) {}
|
||||
},
|
||||
onShow() {
|
||||
var that = this
|
||||
this.baseurl = baseurl
|
||||
this.usershow = false
|
||||
this.goodsDetailsinfo(this.goodsInfoId)
|
||||
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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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%;
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,14 +39,20 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="anniu">
|
||||
<view class="logistics" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;"
|
||||
@tap='goorderdetails(item)'>退款中
|
||||
</view>
|
||||
<view class="logistics" v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'" @tap='gologistics(item)'>查看物流
|
||||
</view>
|
||||
<view class="logistics harvest" @tap='buy(item)' v-if="item.orderStatus=='WAIT_PAY'">
|
||||
去支付</view>
|
||||
<view class="logistics harvest" @tap='Receipt(item)' v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
|
||||
确认收货</view>
|
||||
<view class="logistics harvest" @tap='rate(item)' v-if="item.orderStatus=='RECEIVED_GOODS'">
|
||||
立即评价</view>
|
||||
<view class="logistics harvest" style="background-color: #60c5f1;" @tap='rate(item)'
|
||||
v-if="item.orderStatus=='RECEIVED_GOODS'">
|
||||
去评价</view>
|
||||
<view class="logistics harvest" v-if="item.orderStatus=='EVALUATED'" @tap='golookrate(item)'>
|
||||
查看评价</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -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 => {
|
||||
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,43 +249,63 @@
|
||||
});
|
||||
},
|
||||
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;
|
||||
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) {
|
||||
this.orderStatus = options.orderStatus
|
||||
that.orderStatus = options.orderStatus
|
||||
if (options.orderStatus == 'WAIT_PAY') {
|
||||
this.title = '待付款'
|
||||
that.title = '待付款'
|
||||
that.goodsOrderinfo();
|
||||
} else if (options.orderStatus == 'WAIT_RECEIVED_GOODS') {
|
||||
this.title = '待收货'
|
||||
that.title = '待收货'
|
||||
that.goodsOrderinfo();
|
||||
} else if (options.orderStatus == 'RECEIVED_GOODS') {
|
||||
this.title = '待评价'
|
||||
that.title = '待评价'
|
||||
that.goodsOrderinfo();
|
||||
} else if (options.orderStatus == 'EVALUATED') {
|
||||
this.title = '已完成'
|
||||
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 => {
|
||||
.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
|
||||
@ -263,11 +314,7 @@
|
||||
},
|
||||
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);
|
||||
|
||||
@ -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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -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{
|
||||
|
||||
@ -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 @@
|
||||
去支付
|
||||
</view>
|
||||
<view class="submit" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;">退款中</view>
|
||||
<!-- <view class="submit" v-if="item.orderStatus=='COMPLETE'" @tap='gorate(item)'>去评价</view> -->
|
||||
<!-- <view class="submit"
|
||||
v-if="item.orderStatus=='PAY'||item.orderStatus=='WAIT_DISPATCH'||item.orderStatus=='NOT_FINISH'">
|
||||
确认完成
|
||||
</view> -->
|
||||
<view class="submit" v-if="item.orderStatus=='COMPLETE'" @tap='gorate(item)'
|
||||
style="background-color: #60c5f1;">立即评价</view>
|
||||
<view class="submit" v-if="item.orderStatus=='EVALUATED'" @tap='lookrate(item)'>查看评价</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="noorder" v-else>
|
||||
@ -46,56 +44,150 @@
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
<u-mask :show="rateshow" @tap="rateshow = false" class='masks'>
|
||||
<view class="mask">
|
||||
<view class="rateitem" @tap="taprate('SATISFIED')">
|
||||
满意
|
||||
</view>
|
||||
<view class="rateitem" @tap="taprate('COMMONLY')">
|
||||
一般
|
||||
</view>
|
||||
<view class="rateitem" @tap="taprate('DISSATISFIED')">
|
||||
不满意
|
||||
</view>
|
||||
</view>
|
||||
</u-mask>
|
||||
<u-mask :show="lookrateshow" @tap="lookrateshow = false" class='masks'>
|
||||
<image :src="baseurl+rateimgtitle.img" mode=""></image>
|
||||
<view class="ratetitle">
|
||||
{{rateimgtitle.title}}
|
||||
</view>
|
||||
<view class="mask">
|
||||
<view class="lookrateitem" :style="ratelist.evaluateSatisfaction=='SATISFIED'?'background: #4C7BC9':''">
|
||||
满意
|
||||
</view>
|
||||
<view class="lookrateitem" :style="ratelist.evaluateSatisfaction=='COMMONLY'?'background: #4C7BC9':''">
|
||||
一般
|
||||
</view>
|
||||
<view class="lookrateitem"
|
||||
:style="ratelist.evaluateSatisfaction=='DISSATISFIED'?'background: #4C7BC9':''">
|
||||
不满意
|
||||
</view>
|
||||
</view>
|
||||
</u-mask>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import {
|
||||
lookrate
|
||||
} from '@/api/lookrate/index.js'
|
||||
import {
|
||||
appletAppointmentOrderPay
|
||||
} from '@/api/appointmenttime/appointmenttime.js'
|
||||
import {
|
||||
addAppointmentEvaluate
|
||||
} from '@/api/ServiceDetails/ServiceDetails.js'
|
||||
import {
|
||||
appServiceOrder
|
||||
} from '@/api/Nursingstationserviceorder/Nursingstationserviceorder.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
rateimgtitle: {
|
||||
img: null,
|
||||
title: null,
|
||||
},
|
||||
ratelist: null, //评价list
|
||||
rateshow: false, //评价
|
||||
lookrateshow: false, //查看评价
|
||||
baseurl: '',
|
||||
openid: null,
|
||||
patientId: null,
|
||||
pageNum: 1,
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageSize: 15,
|
||||
list: [],
|
||||
orderNo: null,
|
||||
timer: null,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.baseurl = baseurl
|
||||
let that = this
|
||||
this.baseurl = baseurl
|
||||
this.pageNum = 1;
|
||||
try {
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
that.patientId = value
|
||||
that.getinfo()
|
||||
const value3 = uni.getStorageSync('Refresh');
|
||||
if (value3) {
|
||||
that.getinfo();
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
try {
|
||||
const value = uni.getStorageSync('openid');
|
||||
if (value) {
|
||||
that.openid = value
|
||||
if (value) {} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
this.pageNum = 1
|
||||
try {
|
||||
const value = uni.getStorageSync('patientId');
|
||||
const value2 = uni.getStorageSync('openid');
|
||||
if (value && value2) {
|
||||
that.patientId = value
|
||||
that.openid = value2
|
||||
that.getinfo()
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
methods: {
|
||||
//查看评价
|
||||
lookrate(item) {
|
||||
this.rateimgtitle.img = item.itemPictureUrl
|
||||
this.rateimgtitle.title = item.nurseItemName
|
||||
this.lookrateshow = true
|
||||
lookrate(item.orderNo).then(res => {
|
||||
this.ratelist = res.data
|
||||
})
|
||||
},
|
||||
//去评价
|
||||
// gorate(){
|
||||
// uni.navigateTo({
|
||||
|
||||
// })
|
||||
// },
|
||||
gorate(item) {
|
||||
this.orderNo = item.orderNo
|
||||
this.rateshow = true
|
||||
},
|
||||
//评价
|
||||
taprate(item) {
|
||||
var obj = {
|
||||
"patientId": this.patientId,
|
||||
"openid": this.openid,
|
||||
"orderNo": this.orderNo,
|
||||
"evaluateChannel": "WE_CHAT_APPLET",
|
||||
"evaluateSatisfaction": item,
|
||||
}
|
||||
addAppointmentEvaluate(obj).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync("Refresh", 'Refresh')
|
||||
this.orderNo = null
|
||||
this.$refs.uToast.show({
|
||||
title: '评价成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
if (this.timer) {
|
||||
clearTimeout(this.timer)
|
||||
}
|
||||
this.timer = setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/ratesuccess/ratesuccess`
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
})
|
||||
},
|
||||
//支付
|
||||
buy(item) {
|
||||
let obj = {
|
||||
@ -117,18 +209,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.getinfo()
|
||||
},
|
||||
fail: function(err) {
|
||||
that.$refs.uToast.show({
|
||||
title: '取消支付',
|
||||
type: 'error',
|
||||
toast: 1500,
|
||||
duration: 1500,
|
||||
})
|
||||
}
|
||||
});
|
||||
@ -136,15 +229,24 @@
|
||||
this.$refs.uToast.show({
|
||||
title: response.msg,
|
||||
type: 'error',
|
||||
toast: 2000
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getinfo() {
|
||||
appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.removeStorageSync('Refresh');
|
||||
this.list = res.rows;
|
||||
// this.list.forEach(e => {
|
||||
// e.timestamp = null
|
||||
// var time = new Date(e.createTime).getTime() / 1000 + (60 * 60 * 24)
|
||||
// var times = new Date().getTime() / 1000
|
||||
// e.timestamp = time - times
|
||||
// })
|
||||
this.total = res.total
|
||||
}
|
||||
})
|
||||
},
|
||||
gofinished(item) {
|
||||
@ -158,6 +260,10 @@
|
||||
this.pageNum++
|
||||
appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => {
|
||||
res.rows.forEach(e => {
|
||||
// e.timestamp = null
|
||||
// var time = new Date(e.createTime).getTime() / 1000 + (60 * 60 * 24)
|
||||
// var times = new Date().getTime() / 1000
|
||||
// e.timestamp = time - times
|
||||
this.list.push(e)
|
||||
})
|
||||
})
|
||||
@ -172,7 +278,6 @@
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './Nursingstationserviceorder.scss';
|
||||
</style>
|
||||
|
||||
@ -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,37 +68,39 @@
|
||||
var that = this
|
||||
try {
|
||||
const value = uni.getStorageSync('openid');
|
||||
if (value) {
|
||||
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 {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
that.remove()
|
||||
}
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
that.remove()
|
||||
}
|
||||
} catch (e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
} else {
|
||||
that.remove()
|
||||
}
|
||||
} 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') {
|
||||
if (res.code == 200 && res.msg == 'LOGIN') {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
@ -109,9 +112,6 @@
|
||||
} else {
|
||||
that.remove()
|
||||
}
|
||||
} else {
|
||||
that.remove()
|
||||
}
|
||||
})
|
||||
} 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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,11 +1,23 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="productlist">
|
||||
<view class="" v-if='GoodsCategorychildrenlist.length>1'>
|
||||
<top-tabbar :tabIndex="tabIndex" :tabBars="GoodsCategorychildrenlist" @toggleToptab="toggleTab"
|
||||
selectedBottomColor="#D43953" selectedTextColor="#D43953" textColor="#7d7e80" bgColor="#ffffff">
|
||||
</top-tabbar>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<i class="icon"></i>
|
||||
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入商品名称">
|
||||
</view>
|
||||
<view class="productlist" v-if='goodsList.length>0'>
|
||||
<view class="item" @tap='goCommodityDetails(item)' v-for="(item,index) in goodsList" :key="index">
|
||||
<image :src="baseurl+item.goodsPictureUrl" mode=""></image>
|
||||
<view class="title">
|
||||
{{item.goodsName}}
|
||||
</view>
|
||||
<view class="text">
|
||||
{{item.attributeDetailsName}}
|
||||
</view>
|
||||
<view class="price">
|
||||
¥{{item.goodsPrice}}
|
||||
</view>
|
||||
@ -13,17 +25,31 @@
|
||||
<view style="width: 45%;" v-if="goodsList.length%2!=0">
|
||||
</view>
|
||||
</view>
|
||||
<view class="noorder" v-if='goodsList.length==0'>
|
||||
<image src="../../static/noorder.png" mode=""></image>
|
||||
<view class="">
|
||||
暂无商品
|
||||
</view>
|
||||
</view>
|
||||
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
goodsList
|
||||
goodsList,
|
||||
getGoodsCategoryNameList
|
||||
} from '@/api/ProductList/ProductList.js';
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import topTabbar from '../toptabbar/toptabbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
topTabbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//将选中标签的索引绑定为tabIndex,以便后续的调用
|
||||
tabIndex: 0,
|
||||
baseurl: '',
|
||||
title: '医路优品', //导航栏标题
|
||||
pageNum: 1,
|
||||
@ -31,28 +57,111 @@
|
||||
goodsCategoryId: '', //请求值
|
||||
goodsList: [], //商品列表list
|
||||
total: 0, //list总长度
|
||||
goodsName: '',
|
||||
GoodsCategorychildrenlist: [], //子分类list
|
||||
GoodsCategorychildrenid: null,
|
||||
scrollTop: 0,
|
||||
};
|
||||
},
|
||||
watch: { //监听
|
||||
goodsName() {
|
||||
this.pageNum = 1;
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
|
||||
this.goodsList = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
var that = this
|
||||
try {
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value3 = uni.getStorageSync('Refresh');
|
||||
if (value) {} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
if (value3) {
|
||||
that.goodsListinfo();
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
onLoad(options) { //获取传值
|
||||
if (options.title) {
|
||||
this.title = options.title //导航栏标题
|
||||
}
|
||||
this.goodsCategoryId = options.goodsCategoryId //请求id
|
||||
this.GoodsCategorychildrenid = options.goodsCategoryId //请求id
|
||||
this.baseurl = baseurl;
|
||||
this.goodsListinfo(this.pageSize, this.pageNum, options.goodsCategoryId)
|
||||
this.goodsListinfo()
|
||||
this.GoodsCategorychildren(this.goodsCategoryId);
|
||||
},
|
||||
methods: {
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
},
|
||||
//点击导航栏标签改变当前索引
|
||||
toggleTab(index) {
|
||||
if (index == 1111111111111) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/classification/classification?goodsCategoryId=${this.goodsCategoryId}&index=${this.tabIndex}&GoodsCategorychildrenid=${this.GoodsCategorychildrenid}`
|
||||
})
|
||||
} else if (index == 0) {
|
||||
this.GoodsCategorychildrenid = this.goodsCategoryId
|
||||
this.tabIndex = index
|
||||
this.pageNum = 1
|
||||
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(
|
||||
res => {
|
||||
if (res.code == 200) {
|
||||
this.goodsList = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
uni.removeStorageSync('Refresh');
|
||||
})
|
||||
} else {
|
||||
this.GoodsCategorychildrenid = this.GoodsCategorychildrenlist[index].id
|
||||
this.tabIndex = index
|
||||
this.pageNum = 1
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(
|
||||
res => {
|
||||
if (res.code == 200) {
|
||||
this.goodsList = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
uni.removeStorageSync('Refresh');
|
||||
})
|
||||
}
|
||||
},
|
||||
//根据父级分类id获取子分类
|
||||
GoodsCategorychildren(value) {
|
||||
getGoodsCategoryNameList(value).then(res => {
|
||||
this.GoodsCategorychildrenlist = [{
|
||||
goodsCategoryName: '全部',
|
||||
id: 99999999999999999,
|
||||
}]
|
||||
res.data.forEach(e => {
|
||||
this.GoodsCategorychildrenlist.push(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 查询商品列表
|
||||
goodsListinfo(pageSize, pageNum, goodsCategoryId) {
|
||||
goodsList(pageSize, pageNum, goodsCategoryId).then(res => {
|
||||
goodsListinfo() {
|
||||
this.pageNum = 1;
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
|
||||
if (res.code == 200) {
|
||||
res.rows.forEach(e => {
|
||||
this.goodsList.push(e)
|
||||
})
|
||||
this.total = res.total
|
||||
}
|
||||
uni.removeStorageSync('Refresh');
|
||||
})
|
||||
},
|
||||
//跳转详情页
|
||||
goCommodityDetails(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'SHOPPING_MALL'}`
|
||||
url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'SHOPPING_MALL'}&goodsAttributeId=${item.goodsAttributeId}`
|
||||
})
|
||||
},
|
||||
},
|
||||
@ -64,19 +173,45 @@
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.goodsList.length >= this.total) {} else {
|
||||
this.pageNum++;
|
||||
this.goodsListinfo(this.pageSize, this.pageNum, this.goodsCategoryId)
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
|
||||
if (res.code == 200) {
|
||||
res.rows.forEach(e => {
|
||||
this.goodsList.push(e)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
this.pageNum = 1;
|
||||
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId).then(res => {
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
|
||||
this.goodsList = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 1000);
|
||||
},
|
||||
//1.分享给朋友
|
||||
onShareAppMessage(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
url = decodeURIComponent(url)
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
//2.分享到朋友圈
|
||||
onShareTimeline(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
url = decodeURIComponent(url)
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
172
pages/ProjectDetails/ProjectDetails.scss
Normal file
172
pages/ProjectDetails/ProjectDetails.scss
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
174
pages/ProjectDetails/ProjectDetails.vue
Normal file
174
pages/ProjectDetails/ProjectDetails.vue
Normal file
@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="item">
|
||||
<image :src="list.itemPictureUrl"></image>
|
||||
<view class="huanyao" v-if='list.nurseItemName'>{{list.nurseItemName}}
|
||||
</view>
|
||||
<view class="huanyao" v-else>暂无
|
||||
</view>
|
||||
<!-- <view class="pingfen">
|
||||
<u-rate :count="5" value="2"></u-rate>
|
||||
</view> -->
|
||||
<view class="servicetime">服务时长:{{list.serveDurationUnit?list.serveDurationUnit:'0'}}</view>
|
||||
<view class="price">¥{{list.nurseItemPrice==null?'0':list.nurseItemPrice}}</view>
|
||||
</view>
|
||||
<view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情:
|
||||
<span>¥{{list.consumableTotalPrice==null?'0':list.consumableTotalPrice}}</span>
|
||||
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
|
||||
·{{item.consumableDetail}}
|
||||
<span>{{item.consumableCount}}{{item.consumableUnit}}/¥{{item.consumablePrice}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detailtitle">
|
||||
<view class="Introduction">服务详情:</view>
|
||||
<view class="textInfo" v-html="list.nurseItemContent">
|
||||
</view>
|
||||
</view>
|
||||
<view class="appointment" @tap.stop='goappointments(item)'>预约</view>
|
||||
<u-toast ref="uToast" />
|
||||
<u-mask :show="usershow" class='mask'>
|
||||
<view class="information">
|
||||
<image src="../../static/information.png" mode=""></image>
|
||||
<view class="title">
|
||||
请完善个人信息
|
||||
</view>
|
||||
<view class="cancel" @tap='usershow=false'>
|
||||
取消
|
||||
</view>
|
||||
<view class="determine" @tap='goinformation'>
|
||||
去完善
|
||||
</view>
|
||||
</view>
|
||||
</u-mask>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
AppIdentification
|
||||
} from '@/api/AppIdentification/index.js'
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import {
|
||||
getAppStationItemInfo
|
||||
} from '@/api/ProjectDetails/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
baseurl: '',
|
||||
list: {},
|
||||
orderNo: '',
|
||||
usershow: false, //完善信息开关
|
||||
list: [], //护理站list
|
||||
timer: null,
|
||||
stationId: null,
|
||||
stationItemId: null,
|
||||
stationItemPriceId: null,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.stationId = options.stationId
|
||||
this.stationItemId = options.stationItemId
|
||||
this.stationItemPriceId = options.stationItemPriceId
|
||||
},
|
||||
onShow() {
|
||||
this.usershow = false
|
||||
// 耗材包详情方法调用
|
||||
this.getlist(this.stationId, this.stationItemId, this.stationItemPriceId)
|
||||
},
|
||||
methods: {
|
||||
//预约
|
||||
goappointments() {
|
||||
let that = this
|
||||
try {
|
||||
const value = uni.getStorageSync('openid');
|
||||
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=${this.list.stationId}&stationItemId=${this.list.stationItemId}&stationItemPriceId=${this.list.stationItemPriceId}`,
|
||||
})
|
||||
} else {
|
||||
that.usershow = true
|
||||
}
|
||||
} else if (res.code == 9999) {
|
||||
|
||||
} 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)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '未登录,请先登录',
|
||||
type: 'error'
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
} catch (e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
},
|
||||
//跳转完善页面
|
||||
goinformation() {
|
||||
this.usershow = false
|
||||
uni.navigateTo({
|
||||
url: '/pages/information/information'
|
||||
})
|
||||
},
|
||||
// 信息
|
||||
getlist(stationId, stationItemId, stationItemPriceId) {
|
||||
getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => {
|
||||
if (res.data.nurseItemContent) {
|
||||
res.data.nurseItemContent = res.data.nurseItemContent.replace(/\<img/gi,
|
||||
"<br/> <img class='richPic'")
|
||||
}
|
||||
res.data.itemPictureUrl = baseurl + res.data.itemPictureUrl
|
||||
this.list = res.data
|
||||
})
|
||||
},
|
||||
},
|
||||
//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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './ProjectDetails.scss';
|
||||
</style>
|
||||
@ -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;
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="app" v-if="list">
|
||||
<view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'">
|
||||
剩余付款时间:
|
||||
<u-count-down style='' :timestamp="timestamp">
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="OrderStatus" v-if="list.orderStatus=='REFUNDED'||list.orderStatus=='CANCEL'">
|
||||
订单已关闭
|
||||
</view>
|
||||
@ -33,7 +38,7 @@
|
||||
</view>
|
||||
<view class="content">服务信息
|
||||
<view class="contacts">·联系人:{{list.patientName}}</view>
|
||||
<view class="contacts">·电话:{{list.patientPhone}}</view>
|
||||
<view class="contacts">·电话:{{list.patientPhone}}</view>
|
||||
<view class="contacts">·地址:{{list.serviceAddress}}</view>
|
||||
<view class="contacts">·时间:{{list.serviceDate}} {{list.serviceStartTime}}-{{list.serviceEndTime}}</view>
|
||||
</view>
|
||||
@ -44,14 +49,17 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情:
|
||||
<span>¥{{list.consumableTotalPrice}}</span>
|
||||
<span v-if="list.consumableTotalPrice">¥{{list.consumableTotalPrice}}</span>
|
||||
<span v-else>¥0</span>
|
||||
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
|
||||
·{{item.orderConsumableName}}
|
||||
<span
|
||||
style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/¥{{item.orderConsumablePrice}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="remarks">
|
||||
<view>备注:</view>
|
||||
<input v-model='list.remark'>
|
||||
<input v-model='list.remark' :disabled="list.orderStatus=='WAIT_PAY'?false :true">
|
||||
</view>
|
||||
<view class="evaluate">
|
||||
<view class="price">
|
||||
@ -60,13 +68,15 @@
|
||||
<view class="cancelorder" @tap="cancelorderment()"
|
||||
v-if="list.orderStatus=='PAY'||list.orderStatus=='WAIT_DISPATCH'||list.orderStatus=='NOT_FINISH'">取消订单
|
||||
</view>
|
||||
<view class="cancelorder" style="background: #4C7BC9;" @tap='rateshow= true'
|
||||
v-if="list.orderStatus=='COMPLETE'">评价
|
||||
<view class="cancelorder" style="background: #60c5f1;" @tap='rateshow= true'
|
||||
v-if="list.orderStatus=='COMPLETE'">立即评价
|
||||
</view>
|
||||
<view class="cancelorder" @tap='buy' style="background-color: darkorange;"
|
||||
v-if="list.orderStatus=='WAIT_PAY'">
|
||||
去支付
|
||||
</view>
|
||||
<view class="cancelorder" style="background: #4C7BC9;" v-if="list.orderStatus=='EVALUATED'"
|
||||
@tap='lookrate(list)'>查看评价</view>
|
||||
</view>
|
||||
<u-mask :show="rateshow" @tap="rateshow = false">
|
||||
<view class="mask">
|
||||
@ -81,6 +91,24 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-mask>
|
||||
<u-mask :show="lookrateshow" @tap="lookrateshow = false" class='masks'>
|
||||
<image :src="baseurl+rateimgtitle.img" mode=""></image>
|
||||
<view class="ratetitle">
|
||||
{{rateimgtitle.title}}
|
||||
</view>
|
||||
<view class="mask">
|
||||
<view class="lookrateitem" :style="ratelist.evaluateSatisfaction=='SATISFIED'?'background: #4C7BC9':''">
|
||||
满意
|
||||
</view>
|
||||
<view class="lookrateitem" :style="ratelist.evaluateSatisfaction=='COMMONLY'?'background: #4C7BC9':''">
|
||||
一般
|
||||
</view>
|
||||
<view class="lookrateitem"
|
||||
:style="ratelist.evaluateSatisfaction=='DISSATISFIED'?'background: #4C7BC9':''">
|
||||
不满意
|
||||
</view>
|
||||
</view>
|
||||
</u-mask>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
@ -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() {
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
font-size: 34rpx;
|
||||
padding-top: 10rpx;
|
||||
height: 100%;
|
||||
|
||||
.mask {
|
||||
.Agreement {
|
||||
width: 100%;
|
||||
@ -13,6 +14,7 @@
|
||||
width: 94%;
|
||||
left: 3%;
|
||||
font-size: 30rpx;
|
||||
|
||||
.title {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
@ -22,6 +24,7 @@
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
width: 98%;
|
||||
margin: 0 auto;
|
||||
@ -30,6 +33,7 @@
|
||||
text-align: left;
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
.cancel {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
@ -56,17 +60,20 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.addressitem {
|
||||
width: 97%;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
margin-left: 3%;
|
||||
height: 100%;
|
||||
|
||||
.leftaddress {
|
||||
width: 15%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.addition {
|
||||
color: #666666;
|
||||
display: inline-block;
|
||||
@ -80,8 +87,9 @@
|
||||
color: #D43953;
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
top:20%;
|
||||
top: 15%;
|
||||
}
|
||||
|
||||
.user {
|
||||
background: #FFFFFF;
|
||||
width: 94%;
|
||||
@ -89,14 +97,17 @@
|
||||
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;
|
||||
@ -105,16 +116,19 @@
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.addition {
|
||||
color: #666666;
|
||||
line-height: 30rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 97%;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
margin-left: 3%;
|
||||
|
||||
.addition {
|
||||
color: #666666;
|
||||
line-height: 30rpx;
|
||||
@ -122,6 +136,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.remarks {
|
||||
width: 94%;
|
||||
height: 382rpx;
|
||||
@ -133,10 +148,12 @@
|
||||
border-radius: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
position: relative;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
input {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@ -145,6 +162,7 @@
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.priceback {
|
||||
width: 99%;
|
||||
background: #FFFFFF;
|
||||
@ -154,11 +172,13 @@
|
||||
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,12 +202,14 @@
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.radio-content {
|
||||
margin: 50rpx auto;
|
||||
width: 70%;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
position: relative;
|
||||
|
||||
.agreement {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@ -194,9 +217,11 @@
|
||||
transform: translateY(-50%);
|
||||
color: #878987;
|
||||
}
|
||||
|
||||
.radio-right {
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
|
||||
.radio {
|
||||
display: inline-block;
|
||||
width: 35rpx;
|
||||
@ -207,23 +232,30 @@
|
||||
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,25 +263,39 @@
|
||||
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;
|
||||
position: relative;
|
||||
|
||||
.detail {
|
||||
line-height: 31rpx;
|
||||
font-size: 32rpx;
|
||||
@ -260,6 +306,7 @@
|
||||
top: 60%;
|
||||
}
|
||||
}
|
||||
|
||||
.message {
|
||||
width: 94%;
|
||||
background: white;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<!-- <view class="message">请填写下面的信息</view> -->
|
||||
<view class="user">
|
||||
<view class="item">
|
||||
<span>姓名:</span>
|
||||
@ -45,9 +44,16 @@
|
||||
</text>
|
||||
</view>
|
||||
<view class="Consumablespackage">耗材包详情:
|
||||
<text class="money">¥{{orderlist.consumableTotalPrice}}</text>
|
||||
<view class="detail" v-for="(item,index) in orderlist.itemConsumableList">
|
||||
·{{item.consumableDetail}}
|
||||
<text class="money">¥{{consumableTotalPrice}}</text>
|
||||
<view class="detail">
|
||||
<u-checkbox-group @change="checkboxGroupChange" wrap='true'>
|
||||
<u-checkbox @change="checkboxChange(item)" v-model="item.radio"
|
||||
v-for="(item, index) in orderlist.itemConsumableList" :key="index"
|
||||
:name="item.consumableDetail">
|
||||
<view style='display: inline-block;'> {{item.consumableDetail}}</view>
|
||||
<span>{{item.consumableCount}}{{item.consumableUnit}}/¥{{item.consumablePrice}}</span>
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="remarks">
|
||||
@ -62,7 +68,6 @@
|
||||
</view>
|
||||
<view class="agreement">我已阅读并同意<text @tap='maskshow=true'
|
||||
style="color: #000000;border-bottom: 1rpx solid #000000;">《用户协议》</text></view>
|
||||
|
||||
</view>
|
||||
<view class="priceback">
|
||||
<view class="prices">¥{{orderlist.totalPrice}}</view>
|
||||
@ -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)}`
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
}
|
||||
this.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
delta: 3
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
364
pages/classification/classification.vue
Normal file
364
pages/classification/classification.vue
Normal file
@ -0,0 +1,364 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="inputs">
|
||||
<i class="icon"></i>
|
||||
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入商品名称">
|
||||
</view>
|
||||
<view class="lefttabbar">
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
|
||||
@scrolltolower="lower" @scroll="scroll">
|
||||
<view class="scroll-view-item" v-for="(item,index) in GoodsCategorychildrenlist" :key='item.id'
|
||||
@tap='tapscroll(item,index)'>
|
||||
<view :class="tabIndex==index?'actives':'active'">
|
||||
{{item.goodsCategoryName}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="" style="display: inline-block;width: 80%;position: absolute;right: 0%;">
|
||||
<view class="productlist" v-if='goodsList.length>0'>
|
||||
<view class="item" @tap='goCommodityDetails(item)' v-for="(item,index) in goodsList" :key="index">
|
||||
<image :src="baseurl+item.goodsPictureUrl" mode=""></image>
|
||||
<view class="title">
|
||||
{{item.goodsName}}
|
||||
</view>
|
||||
<view class="text">
|
||||
{{item.attributeDetailsName}}
|
||||
</view>
|
||||
<view class="price">
|
||||
¥{{item.goodsPrice}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 45%;" v-if="goodsList.length%2!=0">
|
||||
</view>
|
||||
</view>
|
||||
<view class="noorder" v-if='goodsList.length==0'>
|
||||
<image src="../../static/noorder.png" mode=""></image>
|
||||
<view class="">
|
||||
暂无商品
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-back-top :scroll-top="scrollTop2"></u-back-top>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
goodsList,
|
||||
getGoodsCategoryNameList
|
||||
} from '@/api/ProductList/ProductList.js';
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//将选中标签的索引绑定为tabIndex,以便后续的调用
|
||||
baseurl: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
goodsCategoryId: '', //请求值
|
||||
goodsList: [], //商品列表list
|
||||
total: 0, //list总长度
|
||||
goodsName: '',
|
||||
tabIndex: 0,
|
||||
GoodsCategorychildrenlist: [], //子分类list
|
||||
GoodsCategorychildrenid: null,
|
||||
scrollTop: 0,
|
||||
scrollTop2: 0,
|
||||
old: {
|
||||
scrollTop: 0
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: { //监听
|
||||
goodsName() {
|
||||
this.pageNum = 1;
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
|
||||
this.goodsList = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
var that = this
|
||||
try {
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value3 = uni.getStorageSync('Refresh');
|
||||
if (value) {} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
if (value3) {
|
||||
that.goodsListinfo();
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
onLoad(options) { //获取传值
|
||||
this.goodsCategoryId = options.goodsCategoryId //请求id
|
||||
this.GoodsCategorychildrenid = options.GoodsCategorychildrenid //请求id
|
||||
this.tabIndex = options.index
|
||||
this.baseurl = baseurl;
|
||||
this.goodsListinfo()
|
||||
this.GoodsCategorychildren(this.goodsCategoryId);
|
||||
},
|
||||
methods: {
|
||||
onPageScroll(e) {
|
||||
this.scrollTop2 = e.scrollTop;
|
||||
},
|
||||
tapscroll(item, index) {
|
||||
this.tabIndex = index
|
||||
if (index == 0) {
|
||||
this.GoodsCategorychildrenid = this.goodsCategoryId
|
||||
this.tabIndex = index
|
||||
this.pageNum = 1
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(
|
||||
res => {
|
||||
if (res.code == 200) {
|
||||
this.goodsList = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
uni.removeStorageSync('Refresh');
|
||||
})
|
||||
} else {
|
||||
this.GoodsCategorychildrenid = this.GoodsCategorychildrenlist[index].id
|
||||
this.tabIndex = index
|
||||
this.pageNum = 1
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(
|
||||
res => {
|
||||
if (res.code == 200) {
|
||||
this.goodsList = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
uni.removeStorageSync('Refresh');
|
||||
})
|
||||
}
|
||||
},
|
||||
upper: function(e) {},
|
||||
lower: function(e) {},
|
||||
scroll: function(e) {
|
||||
this.old.scrollTop = e.detail.scrollTop
|
||||
},
|
||||
//根据父级分类id获取子分类
|
||||
GoodsCategorychildren(value) {
|
||||
getGoodsCategoryNameList(value).then(res => {
|
||||
this.GoodsCategorychildrenlist = [{
|
||||
goodsCategoryName: '全部',
|
||||
id: 99999999999999999,
|
||||
}]
|
||||
res.data.forEach(e => {
|
||||
this.GoodsCategorychildrenlist.push(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 查询商品列表
|
||||
goodsListinfo() {
|
||||
this.pageNum = 1;
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
|
||||
if (res.code == 200) {
|
||||
res.rows.forEach(e => {
|
||||
this.goodsList.push(e)
|
||||
})
|
||||
this.total = res.total
|
||||
}
|
||||
uni.removeStorageSync('Refresh');
|
||||
})
|
||||
},
|
||||
//跳转详情页
|
||||
goCommodityDetails(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'SHOPPING_MALL'}&goodsAttributeId=${item.goodsAttributeId}`
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.goodsList.length >= this.total) {} else {
|
||||
this.pageNum++;
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
|
||||
if (res.code == 200) {
|
||||
res.rows.forEach(e => {
|
||||
this.goodsList.push(e)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
this.pageNum = 1;
|
||||
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
|
||||
this.goodsList = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 1000);
|
||||
},
|
||||
//1.分享给朋友
|
||||
onShareAppMessage(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
url = decodeURIComponent(url)
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
//2.分享到朋友圈
|
||||
onShareTimeline(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
url = decodeURIComponent(url)
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.inputs {
|
||||
position: fixed;
|
||||
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%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.lefttabbar {
|
||||
position: fixed;
|
||||
width: 20%;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
top: 100rpx;
|
||||
|
||||
.scroll-Y {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
.actives {
|
||||
color: red;
|
||||
font-size: 34rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.active {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.scroll-view-item {
|
||||
color: #7d7e80;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.noorder {
|
||||
view {
|
||||
text-align: center;
|
||||
font-size: 40rpx;
|
||||
color: #BFBFBF;
|
||||
}
|
||||
|
||||
image {
|
||||
display: block;
|
||||
margin: 20% auto 50rpx;
|
||||
width: 160rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.productlist {
|
||||
width: 100%;
|
||||
margin: 120rpx auto 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
|
||||
.item {
|
||||
width: 45%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 25rpx;
|
||||
padding-bottom: 10rpx;
|
||||
box-shadow: 0px 4rpx 8rpx 4rpx rgba(199, 200, 202, 0.8);
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.price {
|
||||
font-size: 28rpx;
|
||||
color: #D43953;
|
||||
line-height: 50rpx;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 22rpx;
|
||||
padding: 0 10rpx;
|
||||
// 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: 28rpx;
|
||||
color: #000000;
|
||||
line-height: 50rpx;
|
||||
padding-left: 10rpx;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
image {
|
||||
border-radius: 25rpx 25rpx 0 0;
|
||||
width: 100%;
|
||||
height: 270rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -98,6 +98,9 @@
|
||||
font-size: 33rpx;
|
||||
color: #969394;
|
||||
line-height: 67rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -13,18 +13,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="concenta">
|
||||
<text class="life">生活护理 </text>
|
||||
<view class="lifeserve">
|
||||
<view class="life">生活护理 </view>
|
||||
<image src="/static/lifeserve.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="concentb">
|
||||
<text class="life">医疗护理 </text>
|
||||
<view class="lifeserve">
|
||||
<view class="life">医疗护理 </view>
|
||||
<image src="/static/yiliaohuli.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
padding-top: 10rpx;
|
||||
|
||||
.concent {
|
||||
width: 701rpx;
|
||||
width: 98%;
|
||||
height: 811rpx;
|
||||
background: #4C7BC9;
|
||||
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
margin-top: 5%;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 20px;
|
||||
margin: 10rpx auto 10rpx;
|
||||
|
||||
.background {
|
||||
position: relative;
|
||||
@ -71,43 +84,45 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.concenta,
|
||||
.concentb {
|
||||
margin: 0 auto 10rpx;
|
||||
width: 98%;
|
||||
height: 900rpx;
|
||||
padding-bottom: 40rpx;
|
||||
border-radius: 25rpx;
|
||||
|
||||
.life {
|
||||
// margin: 0 auto;
|
||||
width: 162rpx;
|
||||
height: 40rpx;
|
||||
font-size: 42rpx;
|
||||
margin-left: 35%;
|
||||
padding: 15rpx 0;
|
||||
font-size: 38rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
}
|
||||
.lifeserve image {
|
||||
width: 639rpx;
|
||||
height: 739rpx;
|
||||
margin-left: 5%;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
image {
|
||||
margin: 0 auto;
|
||||
width: 89%;
|
||||
display: block;
|
||||
height: 91%;
|
||||
// margin-left: 3%;
|
||||
}
|
||||
}
|
||||
|
||||
.concenta {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 20px;
|
||||
width: 701rpx;
|
||||
height: 811rpx;
|
||||
background: #E1AE3C;
|
||||
border-radius: 25rpx;
|
||||
}
|
||||
|
||||
.concentb {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 20px;
|
||||
width: 701rpx;
|
||||
height: 811rpx;
|
||||
background: #00C176;
|
||||
border-radius: 25rpx;
|
||||
}
|
||||
|
||||
.detailed {
|
||||
width: 657rpx;
|
||||
padding: 0 42rpx;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
|
||||
.detailed view {
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
@ -47,7 +47,25 @@
|
||||
},
|
||||
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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -43,7 +43,25 @@
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
//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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
.app {
|
||||
padding: 20rpx 0;
|
||||
|
||||
.item {
|
||||
font-size: 34rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
width: 94%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
|
||||
.lefttext {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 3%;
|
||||
}
|
||||
|
||||
.righttext {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 18%;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.lefttext,
|
||||
.righttext {
|
||||
::v-deep .uni-input-input {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
::v-deep .uni-input-wrapper {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
::v-deep .uni-input-placeholder {
|
||||
line-height: 100rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: 400;
|
||||
color: #C3C1C1;
|
||||
}
|
||||
}
|
||||
|
||||
.obtaincode {
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #4C7BC9;
|
||||
line-height: 100rpx;
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
top: 0%;
|
||||
}
|
||||
}
|
||||
|
||||
.loginbtn {
|
||||
width: 80%;
|
||||
height: 100rpx;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
background: #4C7BC9;
|
||||
border-radius: 51rpx;
|
||||
font-size: 41rpx;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 10%;
|
||||
}
|
||||
}
|
||||
@ -1,123 +0,0 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="item">
|
||||
<view class="lefttext">
|
||||
输入新密码
|
||||
</view>
|
||||
<u-input class='righttext' style='left:30%' placeholder="请输入密码" maxlength="10" type="password"
|
||||
:border="false" :password-icon="true" v-model="newpassword" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="lefttext">
|
||||
重复新密码
|
||||
</view>
|
||||
<u-input class='righttext' style='left:30%' placeholder="请再次输入密码" maxlength="10" type="password"
|
||||
:border="false" :password-icon="true" v-model="password" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="lefttext">
|
||||
手机号
|
||||
</view>
|
||||
<input class="righttext" style='left:23%' type="text" placeholder="请输入" maxlength="11" v-model="phone"/>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="lefttext">
|
||||
验证码
|
||||
</view>
|
||||
<input class="righttext" style='left:23%' type="text" placeholder="" maxlength="6" v-model="verification" />
|
||||
<view class="obtaincode" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
|
||||
{{getCodeText}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="loginbtn" @tap='pwdlogin'>
|
||||
登录
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
ForgotPassword
|
||||
} from '../../api/forgotPassword/forgotPassword.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone: '13678945620',
|
||||
verification: '111111',
|
||||
password: '',
|
||||
newpassword: '',
|
||||
getCodeText: '获取验证码', //获取验证码的文字
|
||||
getCodeBtnColor: "#4C7BC9", //获取验证码的color
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pwdlogin() {
|
||||
ForgotPassword(this.phone, this.password, this.verification).then(res => {
|
||||
if (this.password !== this.newpassword) {
|
||||
this.$refs.uToast.show({
|
||||
title: '密码输入不一致,请重新输入',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '密码修改成功',
|
||||
type: 'success',
|
||||
url: '/pages/login/login',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//点击获取验证码
|
||||
getCode() {
|
||||
uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
|
||||
if (this.getCodeisWaiting) { //是否在倒计时中
|
||||
return;
|
||||
}
|
||||
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phone))) { //校验手机号码是否有误
|
||||
uni.showToast({
|
||||
title: '请填写正确手机号码',
|
||||
icon: "none"
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.getCodeText = "发送中..." //发送验证码
|
||||
this.getCodeisWaiting = true;
|
||||
this.getCodeBtnColor = "rgba(138,139,133,1)" //追加样式,修改颜色
|
||||
//示例用定时器模拟请求效果
|
||||
//setTimeout(()用于在指定的毫秒数后调用函数或计算表达式
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: '验证码已发送',
|
||||
icon: "none"
|
||||
}); //弹出提示框
|
||||
// this.code = '1234'; //发送验证码,进行填入 示例默认1234,生产中请删除这一句。
|
||||
this.setTimer(); //调用定时器方法
|
||||
}, 1000)
|
||||
},
|
||||
//获取验证码的倒计时 setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
|
||||
setTimer() {
|
||||
let holdTime = 60; //定义变量并赋值
|
||||
this.getCodeText = "重新获取(60)"
|
||||
//setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
|
||||
//setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
|
||||
this.Timer = setInterval(() => {
|
||||
if (holdTime <= 0) {
|
||||
this.getCodeisWaiting = false;
|
||||
this.getCodeBtnColor = "#4C7BC9";
|
||||
this.getCodeText = "获取验证码"
|
||||
clearInterval(this.Timer); //清除该函数
|
||||
return; //返回前面
|
||||
}
|
||||
this.getCodeText = "重新获取(" + holdTime + ")"
|
||||
holdTime--;
|
||||
}, 1000)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "./forgotPassword.scss";
|
||||
</style>
|
||||
@ -74,6 +74,7 @@
|
||||
right: 10rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.itemimg {
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
<view class="rate">
|
||||
<view class="images">
|
||||
<view class="itemimgs" v-for="(item,index) in file">
|
||||
<image class="delimg" src="../../static/gb2.png" mode="" style="color: red;"></image>
|
||||
<image class="delimg" src="../../static/gb2.png" mode="" style="color: red;" @tap='delimg(item)'>
|
||||
</image>
|
||||
<image class="itemimg" :src="item" mode=""></image>
|
||||
</view>
|
||||
<view class="shot item" @tap='updataImage'>
|
||||
@ -55,11 +56,16 @@
|
||||
patientId: null,
|
||||
openid: null,
|
||||
timer: null,
|
||||
delta: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async updata() {
|
||||
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',
|
||||
@ -69,9 +75,6 @@
|
||||
'orderNo': that.orderlist.goOrderNo
|
||||
},
|
||||
timeout: 5000,
|
||||
header: {
|
||||
'Content-type': 'application/json;charset=utf-8'
|
||||
},
|
||||
success(res) {
|
||||
var img = {
|
||||
evaluatePictureUrl: JSON.parse(res.data).imgUrl
|
||||
@ -83,8 +86,10 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
} 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
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<span>身份证号:</span>
|
||||
<u-input :clearable='false' v-model="query.cardNo" type="text" placeholder='请输入' maxlength='18' />
|
||||
</view>
|
||||
<view class="item" @tap='areashow=true'>
|
||||
<view class="item" @tap='showPicker'>
|
||||
<span>所属区域:</span>
|
||||
<view class="address">{{address}}</view>
|
||||
</view>
|
||||
@ -25,14 +25,16 @@
|
||||
</view>
|
||||
<view class="item" @tap='getAddress()'>
|
||||
<span>所在位置:</span>
|
||||
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||
{{chooseLocation}}
|
||||
</view>
|
||||
<!-- <u-input type="text" placeholder='' /> -->
|
||||
<view class="address" style="">
|
||||
{{query.locationName}}
|
||||
</view>
|
||||
</view>
|
||||
<u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
|
||||
:list="arealist" @confirm="areaconfirm"></u-select>
|
||||
</view>
|
||||
<view class="">
|
||||
<m-city style='z-index: 10076;' :provinceData="list" headTitle="地区选择" ref="cityPicker"
|
||||
@funcValue="getpickerParentValue" pickerSize="4">
|
||||
</m-city>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="service">
|
||||
<view class="title">
|
||||
@ -92,15 +94,25 @@
|
||||
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, //用户协议
|
||||
getNurseTypelist: [], //护理类型数组
|
||||
@ -117,15 +129,18 @@
|
||||
nurseTypeIdList: [],
|
||||
diseaseInfoList: [],
|
||||
patientId: '',
|
||||
locationName: null,
|
||||
locationName: '',
|
||||
},
|
||||
timer: null,
|
||||
addresslength: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//提交信息
|
||||
informationinfo() {
|
||||
var that = this
|
||||
if (this.addresslength) {
|
||||
if (this.addresslength.length > 2) {
|
||||
try {
|
||||
const value = uni.getStorageSync('phone');
|
||||
if (value) {
|
||||
@ -159,27 +174,48 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '所属区域应选择所在的区或街道,请重新选择!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
} 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);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@ -13,8 +13,11 @@
|
||||
<script>
|
||||
import {
|
||||
appLoginpwd,
|
||||
getWeChatUser
|
||||
getWeChatUser,
|
||||
} from '../../api/login/index.js'
|
||||
import {
|
||||
createMobileToken
|
||||
} from '@/api/login/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -23,10 +26,35 @@
|
||||
timer: null,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('patientId');
|
||||
uni.removeStorageSync('token');
|
||||
uni.removeStorageSync('phone');
|
||||
},
|
||||
//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: {
|
||||
getPhoneNumberp(val) {
|
||||
let that = this;
|
||||
this.phonecode = val.detail.code
|
||||
if (val.detail.code) {
|
||||
that.phonecode = val.detail.code
|
||||
wx.login({
|
||||
provider: 'weixin',
|
||||
success: function(loginRes) {
|
||||
@ -34,8 +62,10 @@
|
||||
that.pwdlogin();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
pwdlogin() {
|
||||
login() {
|
||||
getWeChatUser(this.logincode, this.phonecode).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync("openid", res.data.openid)
|
||||
@ -46,6 +76,7 @@
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
uni.setStorageSync("Refresh", 'Refresh')
|
||||
if (this.timer) {
|
||||
clearTimeout(this.timer)
|
||||
}
|
||||
@ -54,11 +85,24 @@
|
||||
delta: 1
|
||||
})
|
||||
}, 1500)
|
||||
} else {
|
||||
uni.removeStorageSync('token');
|
||||
this.$refs.uToast.show({
|
||||
title: '登录失败',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
pwdlogin() {
|
||||
var that = this
|
||||
createMobileToken().then(res => {
|
||||
uni.setStorageSync("token", res.data.token)
|
||||
that.login()
|
||||
})
|
||||
},
|
||||
},
|
||||
toLogin() {}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
.address {
|
||||
color: #969394;
|
||||
padding: 32rpx 0;
|
||||
padding: 32rpx 20rpx;
|
||||
}
|
||||
|
||||
.border {
|
||||
|
||||
137
pages/lookrate/lookrate.scss
Normal file
137
pages/lookrate/lookrate.scss
Normal file
@ -0,0 +1,137 @@
|
||||
.app {
|
||||
padding: 0 0 50rpx 0;
|
||||
|
||||
.rate {
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
height: 100%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.itemimgs {
|
||||
display: inline-block;
|
||||
width: 30.5%;
|
||||
height: 212rpx;
|
||||
margin: 0 0 20rpx 2%;
|
||||
position: relative;
|
||||
padding-top: 20rpx;
|
||||
|
||||
.itemimg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.score {
|
||||
background-color: #FFFFFF;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
padding-top: 50rpx;
|
||||
position: relative;
|
||||
height: 500rpx;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
|
||||
::v-deep .u-rate {
|
||||
position: absolute;
|
||||
top: 52rpx;
|
||||
left: 200rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-top: 20rpx;
|
||||
|
||||
::v-deep .uni-textarea-textarea {
|
||||
width: 93%;
|
||||
display: block;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
::v-deep .u-input__textarea {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0 20rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
padding-bottom: 50rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 95%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
margin: 30rpx auto;
|
||||
position: relative;
|
||||
padding-bottom: 130rpx;
|
||||
|
||||
.detailslist {
|
||||
display: flex;
|
||||
|
||||
image {
|
||||
width: 182rpx;
|
||||
height: 182rpx;
|
||||
margin: 20rpx 0 0 20rpx;
|
||||
}
|
||||
|
||||
.model {
|
||||
width: 70%;
|
||||
margin: 30rpx 0 0 20rpx;
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
span:nth-child(1) {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
color: #969394;
|
||||
float: right;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.box {
|
||||
color: #969394;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.payinfo {
|
||||
width: 95%;
|
||||
position: absolute;
|
||||
left: 2.5%;
|
||||
bottom: 20rpx;
|
||||
|
||||
.pay {
|
||||
font-size: 30rpx;
|
||||
color: #020000;
|
||||
}
|
||||
|
||||
.price {
|
||||
float: right;
|
||||
font-size: 41rpx;
|
||||
color: #D43953;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
66
pages/lookrate/lookrate.vue
Normal file
66
pages/lookrate/lookrate.vue
Normal file
@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="content">
|
||||
<view class="detailslist">
|
||||
<image :src="baseurl+order.attributePitureUrl" mode=""></image>
|
||||
<view class="model">
|
||||
<view class="top">
|
||||
<span>{{order.goodsName}}</span>
|
||||
<span>¥{{order.goodsPrice}}</span>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<span class="box">型号:{{order.goodsAttributeName}}</span>
|
||||
<span class="box">X{{order.goodsCount}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="payinfo">
|
||||
<text class="pay">实付款</text>
|
||||
<text class="price">¥{{order.totalPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rate">
|
||||
<view class="itemimgs" v-for="(item,index) in ratelist.orderEvaluatePictureInfoList">
|
||||
<image class="itemimg" :src="baseurl+item.evaluatePictureUrl" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="score">
|
||||
<view class="title">
|
||||
综合评分
|
||||
</view>
|
||||
<u-rate :count="count" v-model="ratelist.compositeScore" size='46' :disabled="true"></u-rate>
|
||||
<view class="text">
|
||||
<u-input v-model="ratelist.evaluateContent" type="textarea" placeholder=' ' :clearable='false'
|
||||
:disabled="true" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
lookrate
|
||||
} from '@/api/lookrate/index.js'
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
baseurl: null,
|
||||
order: null,
|
||||
ratelist: null,
|
||||
count: 5,
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.baseurl = baseurl
|
||||
this.order = JSON.parse(options.item)
|
||||
lookrate(this.order.goOrderNo).then(res => {
|
||||
this.ratelist = res.data
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './lookrate.scss';
|
||||
</style>
|
||||
403
pages/m-city/m-city.vue
Normal file
403
pages/m-city/m-city.vue
Normal file
@ -0,0 +1,403 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="mask" :class="{ maskShow: showPicker }" @click="goemit" @click.stop.prevent @touchmove.stop.prevent
|
||||
catchtouchmove="true"></view>
|
||||
<view class="cpicker-content" :class="{ cpickerShow: showPicker }">
|
||||
<view class="city-head" @click.stop.prevent @touchmove.stop.prevent catchtouchmove="true">
|
||||
<view class="city-head-title">{{ headTitle }}</view>
|
||||
<!-- <view class="titlecancel" @click="hide">
|
||||
取消
|
||||
</view>
|
||||
<view class="titletap" @click="goemit">
|
||||
确定
|
||||
</view> -->
|
||||
<icon type="clear" v-if="clearRightIcon" class="clearRightIcon" size="20" color="#cccccc"
|
||||
@click="goemit">
|
||||
</icon>
|
||||
</view>
|
||||
<scroll-view id="nav-bar" class="nav-bar" scroll-x="true" scroll-with-animation="true"
|
||||
:scroll-left="scrollLeft">
|
||||
<view v-for="(item, index) in tabbars" class="nav-item" :key="index" :id="'tab' + index"
|
||||
@click="changeTab(index)" :class="{ current: index === tabCurrentIndex }"><text
|
||||
class="nav-bar-title">{{ item.localName }}</text></view>
|
||||
</scroll-view>
|
||||
<view class="city_content">
|
||||
<scroll-view class="panel-scroll-box" :scroll-y="enableScroll" :cscrollTop="scrollTop"
|
||||
:current="tabCurrentIndex" :scroll-top="scrollTop">
|
||||
<block v-for="(item, index) in tabbars[tabCurrentIndex].children" :key="index">
|
||||
<view class="flex-row-c-c" @click="changCity(tabCurrentIndex, item)">
|
||||
<text class="city-text"
|
||||
:class="{ color: tabbars[tabCurrentIndex].id == item.id }">{{ item.areaName }}</text>
|
||||
<icon type="success_no_circle" v-if="tabbars[tabCurrentIndex].id == item.id"
|
||||
:id="'show' + tabCurrentIndex" class="ischeck" size="14" :color="$lightColor"></icon>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let windowWidth = 0
|
||||
import {
|
||||
getSubordinateRegions,
|
||||
getSubordinateInfo
|
||||
} from '@/api/modifyAddress/modifyAddress.js';
|
||||
export default {
|
||||
name: "UniCityNvue",
|
||||
props: {
|
||||
headTitle: {
|
||||
//标题
|
||||
type: String,
|
||||
default: "地区选择",
|
||||
},
|
||||
pickerSize: {
|
||||
// 使用多少个tab
|
||||
type: [String, String],
|
||||
default: "1",
|
||||
},
|
||||
provinceData: {
|
||||
// 默认的省市区id,如果不使用id的情况下则为[];
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
clearRightIcon: true, //是否显示右侧关闭icon
|
||||
scrollLeft: 500, //顶部选项卡左滑距离
|
||||
scrollTop: 0, //默认滚动顶部为0
|
||||
enableScroll: true, //是否启用滚动
|
||||
tabCurrentIndex: 0, //当前选项卡索引
|
||||
tabbars: [{
|
||||
id: "",
|
||||
localName: "请选择",
|
||||
children: [],
|
||||
}, ], //默认的省市区id
|
||||
pickersize: this.pickerSize, //多少个tab 推荐为4级
|
||||
showPicker: false, //显示选取器
|
||||
};
|
||||
},
|
||||
onShow() {},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onUnload() {},
|
||||
methods: {
|
||||
goemit() {
|
||||
var list = null
|
||||
if (this.tabbars[this.tabbars.length - 1].localName == '请选择') {
|
||||
list = this.tabbars.filter(e => e.localName != '请选择')
|
||||
} else {
|
||||
list = this.tabbars
|
||||
}
|
||||
this.$emit("funcValue", list);
|
||||
this.hide();
|
||||
},
|
||||
/**
|
||||
* 显示选择器
|
||||
*/
|
||||
show() {
|
||||
this.showPicker = true;
|
||||
this.tabbars[0].children = this.provinceData;
|
||||
// if (this.tabbars[0].children.length == 0) {
|
||||
// getSubordinateRegions('').then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
windowWidth = uni.getSystemInfoSync().windowWidth;
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭选择器
|
||||
*/
|
||||
hide() {
|
||||
this.showPicker = false;
|
||||
},
|
||||
|
||||
/**
|
||||
* tab切换
|
||||
*/
|
||||
changeTab(e) {
|
||||
let index = e;
|
||||
this.setScroll(index);
|
||||
//延迟300ms,等待swiper动画结束再修改tabbar
|
||||
this.tabCurrentIndex = index;
|
||||
setTimeout(() => {
|
||||
this.getScroll("show" + index);
|
||||
}, 10);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获得元素的大小
|
||||
*/
|
||||
getElSize(id) {
|
||||
return new Promise((res, rej) => {
|
||||
let el = uni
|
||||
.createSelectorQuery()
|
||||
.in(this)
|
||||
.select("#" + id);
|
||||
el.fields({
|
||||
size: true,
|
||||
scrollOffset: true,
|
||||
rect: true,
|
||||
},
|
||||
(data) => {
|
||||
res(data);
|
||||
}
|
||||
).exec();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击城市后回调
|
||||
*/
|
||||
async changCity(index, item) {
|
||||
if (this.tabbars[index].id != item.id) {
|
||||
this.tabbars[index].localName = item.areaName;
|
||||
this.tabbars[index].id = item.areaCode;
|
||||
if (index < this.tabbars.length - 1) {
|
||||
this.tabbars.splice(index + 1, this.tabbars.length - index - 1);
|
||||
}
|
||||
if (this.tabbars.length < this.pickersize) {
|
||||
let data = await getSubordinateInfo(item.areaCode);
|
||||
// 当前选项级为最后一级时回调,将选中的数据返回
|
||||
if (data.data.length == 0) {
|
||||
this.$emit("funcValue", this.tabbars);
|
||||
this.hide();
|
||||
} else {
|
||||
// 将新的数据填充进下一级
|
||||
var current = {
|
||||
localName: "请选择",
|
||||
id: "",
|
||||
children: data.data,
|
||||
};
|
||||
this.tabbars.push(current);
|
||||
this.tabCurrentIndex++;
|
||||
// 当前距离重新为最上面
|
||||
this.$set(this, 'scrollTop', 0)
|
||||
}
|
||||
} else {
|
||||
this.$emit("funcValue", this.tabbars);
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取当前tab中滚动的距离
|
||||
*/
|
||||
async setScroll(index) {
|
||||
let width = 0;
|
||||
let nowWidth = 0;
|
||||
for (let i = 0; i <= index; i++) {
|
||||
let result = await this.getElSize("tab" + i);
|
||||
width += result.width;
|
||||
if (i === index) {
|
||||
nowWidth = result.width;
|
||||
}
|
||||
}
|
||||
if (width + nowWidth > windowWidth) {
|
||||
this.scrollLeft = width + nowWidth;
|
||||
} else {
|
||||
this.scrollLeft = 0;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 计算当前的滚动距离
|
||||
*/
|
||||
getScroll(id) {
|
||||
uni
|
||||
.createSelectorQuery()
|
||||
.in(this)
|
||||
.select(".panel-scroll-box")
|
||||
.boundingClientRect((data) => {
|
||||
uni
|
||||
.createSelectorQuery()
|
||||
.in(this)
|
||||
.select("#" + id)
|
||||
.boundingClientRect((res) => {
|
||||
if (res != undefined && res != null && res != "") {
|
||||
this.scrollTop = res.top - data.top;
|
||||
}
|
||||
})
|
||||
.exec();
|
||||
})
|
||||
.exec();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mask {
|
||||
visibility: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
opacity: 0;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.maskShow {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.cpicker-content {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #ffffff;
|
||||
transition: all 0.3s ease;
|
||||
transform: translateY(100%);
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
.cpickerShow {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.city-head {
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
flex-direction: column;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-color: #f4f4f4;
|
||||
border-bottom-style: solid;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.city-head-title {
|
||||
font-size: 30rpx;
|
||||
line-height: 88rpx;
|
||||
align-items: center;
|
||||
/* #ifndef APP-NVUE */
|
||||
text-align: center;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.titletap {
|
||||
display: inline-block;
|
||||
fonts-size: 24rpx;
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
top: 22rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.titlecancel {
|
||||
display: inline-block;
|
||||
fonts-size: 24rpx;
|
||||
position: absolute;
|
||||
left: 5%;
|
||||
top: 22rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.clearRightIcon {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 12px;
|
||||
font-size: 10px;
|
||||
color: #bebebe;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
height: 90rpx;
|
||||
white-space: nowrap;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: inline-flex !important;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
flex-direction: row !important;
|
||||
/* #endif */
|
||||
width: 170rpx;
|
||||
padding: 7px 0px;
|
||||
line-height: 26px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #303133;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.nav-bar-title {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.current {
|
||||
// color: $aider-light-color;
|
||||
// border-color: $aider-light-color;
|
||||
border-bottom-width: 4rpx;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
.current:after {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.panel-scroll-box {
|
||||
height: 750rpx;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.flex-row-c-c {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
flex-direction: row;
|
||||
/* #endif */
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
.city-text {
|
||||
/* #ifdef APP-NVUE */
|
||||
flex-direction: row;
|
||||
/* #endif */
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.hide {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.ischeck {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: inline-flex !important;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
flex-direction: column;
|
||||
/* #endif */
|
||||
margin-right: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.color {
|
||||
// color: $light-color;
|
||||
}
|
||||
|
||||
icon {
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
</style>
|
||||
@ -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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="app" v-if="list">
|
||||
<view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'">
|
||||
剩余付款时间:
|
||||
<u-count-down style='' :timestamp="timestamp">
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="OrderStatus" v-if="list.orderStatus=='REFUNDED'||list.orderStatus=='CANCEL'">
|
||||
订单已关闭
|
||||
</view>
|
||||
@ -44,9 +49,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情:
|
||||
<span>¥{{list.consumableTotalPrice}}</span>
|
||||
<span v-if="list.consumableTotalPrice">¥{{list.consumableTotalPrice}}</span>
|
||||
<span v-else>¥0</span>
|
||||
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
|
||||
·{{item.orderConsumableName}}
|
||||
<span
|
||||
style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/¥{{item.orderConsumablePrice}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="remarks">
|
||||
@ -57,9 +65,6 @@
|
||||
<view class="price">
|
||||
¥{{list.totalPrice}}
|
||||
</view>
|
||||
<view class="cancelorder" @tap="cancelorderment()"
|
||||
v-if="list.orderStatus=='PAY'||list.orderStatus=='WAIT_DISPATCH'||list.orderStatus=='NOT_FINISH'">取消订单
|
||||
</view>
|
||||
<!-- <view class="cancelorder " style="background: #4C7BC9;">评价</view> -->
|
||||
<view class="cancelorder" @tap='buy' style="background-color: darkorange;"
|
||||
v-if="list.orderStatus=='WAIT_PAY'">
|
||||
@ -84,13 +89,18 @@
|
||||
baseurl: '',
|
||||
patientId: '', //id
|
||||
openid: '', //id
|
||||
list: {},
|
||||
list: null,
|
||||
orderNo: '',
|
||||
timestamp: 0,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getlist()
|
||||
},
|
||||
onLoad(options) {
|
||||
var that = this
|
||||
this.baseurl = baseurl
|
||||
this.orderNo = JSON.parse(options.list).orderNo
|
||||
try {
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
@ -103,7 +113,6 @@
|
||||
that.openid = value
|
||||
}
|
||||
} catch (e) {}
|
||||
this.getlist(JSON.parse(options.list).orderNo)
|
||||
},
|
||||
methods: {
|
||||
//支付
|
||||
@ -130,7 +139,7 @@
|
||||
that.$refs.uToast.show({
|
||||
title: '支付成功',
|
||||
type: 'success',
|
||||
toast: 1500,
|
||||
duration: 1500,
|
||||
url: `/pages/paysuccess/paysuccess?delta=${3}`
|
||||
})
|
||||
},
|
||||
@ -138,7 +147,7 @@
|
||||
that.$refs.uToast.show({
|
||||
title: '取消支付',
|
||||
type: 'error',
|
||||
toast: 1500,
|
||||
duration: 1500,
|
||||
})
|
||||
}
|
||||
});
|
||||
@ -146,7 +155,7 @@
|
||||
that.$refs.uToast.show({
|
||||
title: response.msg,
|
||||
type: 'error',
|
||||
toast: 2000
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -158,7 +167,7 @@
|
||||
success: function(res) {
|
||||
if (res.platform == 'ios') {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: that.nursestationlist.phone //仅为示例
|
||||
phoneNumber: that.list.stationPhone //仅为示例
|
||||
});
|
||||
} else {
|
||||
uni.showActionSheet({
|
||||
@ -166,7 +175,7 @@
|
||||
success: function(res) {
|
||||
if (res.tapIndex + 1 == 1) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: that.nursestationlist.phone //仅为示例
|
||||
phoneNumber: that.list.stationPhone //仅为示例
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -177,14 +186,13 @@
|
||||
});
|
||||
},
|
||||
// 信息
|
||||
getlist(orderNo) {
|
||||
getAppointmentDetailsInfo(orderNo).then(res => {
|
||||
getlist() {
|
||||
getAppointmentDetailsInfo(this.orderNo).then(res => {
|
||||
this.list = res.data
|
||||
})
|
||||
},
|
||||
cancelorderment() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/cancelorder/cancelorder?nurseItemPrice=${this.list.totalPrice}&appointmentOrderId=${this.list.appointmentOrderId}`
|
||||
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
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@ -3,6 +3,9 @@
|
||||
width: 100%;
|
||||
color: #000000;
|
||||
padding-bottom: 50rpx;
|
||||
/deep/ .u-drawer{
|
||||
z-index: 0 !important;
|
||||
}
|
||||
.Agreement{
|
||||
width: 100%;
|
||||
background-color: #F4F5F7;
|
||||
@ -81,9 +84,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%);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -158,6 +162,9 @@
|
||||
display: inline-block;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
span {
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<u-input :clearable='false' v-model="appPersonallist.cardNo" placeholder="请输入" type="text"
|
||||
maxlength='18' />
|
||||
</view>
|
||||
<view class="item" @tap='areashow=true'>
|
||||
<view class="item" @tap='showPicker'>
|
||||
<span>所属区域:</span>
|
||||
<view class="address">{{address}}</view>
|
||||
</view>
|
||||
@ -32,8 +32,11 @@
|
||||
</view>
|
||||
<view class="item" @tap='getAddress()'>
|
||||
<span>所在位置:</span>
|
||||
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||
{{chooseLocation}}
|
||||
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"
|
||||
v-if="appPersonallist.locationName">
|
||||
{{appPersonallist.locationName}}
|
||||
</view>
|
||||
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" v-else>
|
||||
</view>
|
||||
</view>
|
||||
<view class="disease" style="border: none;" @tap="godisease">
|
||||
@ -54,8 +57,6 @@
|
||||
style="color: #000000;border-bottom: 1rpx solid #000000;">《用户协议》</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
|
||||
:list="arealist" @confirm="areaconfirm"></u-select>
|
||||
<view class="finish" @tap="informationinfo()">完成
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
@ -76,6 +77,11 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-mask>
|
||||
<view class="">
|
||||
<m-city style='z-index: 10076;' :provinceData="list" headTitle="地区选择" ref="cityPicker"
|
||||
@funcValue="getpickerParentValue" pickerSize="4">
|
||||
</m-city>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -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: '',
|
||||
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
|
||||
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
|
||||
}
|
||||
this.patientDiseaseInfoList = this.appPersonallist.patientDiseaseInfoList
|
||||
this.patientDiseaseInfoList.forEach(e => {
|
||||
that.patientDiseaseInfoList = that.appPersonallist.patientDiseaseInfoList
|
||||
that.patientDiseaseInfoList.forEach(e => {
|
||||
e.id = e.diseaseId
|
||||
})
|
||||
if (this.appPersonallist.locationName) {
|
||||
this.chooseLocation = this.appPersonallist.locationName
|
||||
}
|
||||
} 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);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,8 +7,18 @@
|
||||
{{item.receivePhone}}
|
||||
</view>
|
||||
<view class="item detail" @tap='goorder(item)'>
|
||||
{{item.address}}
|
||||
{{item.areaName}}{{item.receiveAddress}}
|
||||
</view>
|
||||
<view class="item detail" style="border: none;font-size: 32rpx;margin-top: 40rpx;">
|
||||
<view class="" style='width: 50%;display: inline-block;'>
|
||||
<view class="" style="display: inline-block;">
|
||||
默认地址
|
||||
</view>
|
||||
<view class="" style="transform: translateY(16%);display: inline-block;margin-left: 20rpx;">
|
||||
<u-switch v-model="item.defaultAddressFlag" size='36' @change='change(item)'></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="display: inline-block;width: 50%;">
|
||||
<view class="update">
|
||||
<view class="up ups" @tap='updataxg(item)'>
|
||||
修改
|
||||
@ -19,15 +29,17 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ADDress" @tap='add()'>
|
||||
<image src="../../static/add.png" mode=""></image>
|
||||
<span class="ADDtext">
|
||||
添加收货地址
|
||||
添加地址
|
||||
</span>
|
||||
</view>
|
||||
<!-- 弹框 -->
|
||||
<u-popup v-model="show" mode="center" width="80%" height="50%" border-radius="30">
|
||||
<view class="payment">
|
||||
<u-popup v-model="show" mode="center" width="85%" height="600rpx" border-radius="30" @close='cencel()'>
|
||||
<view class="payment" @click.stop=''>
|
||||
<span>{{shipAddress}}</span>
|
||||
<view class="cencel" @tap="cencel()">
|
||||
<image src="../../static/gb.png" mode=""></image>
|
||||
@ -37,23 +49,37 @@
|
||||
</u-field>
|
||||
<u-field v-model="infolist.receivePhone" label="手机号" placeholder="电话" class="items" maxlength='11'>
|
||||
</u-field>
|
||||
<view class="area" @tap='areashow=true'>
|
||||
<u-field v-model="infolist.address" label="地区" placeholder="请选择" class="items" disabled>
|
||||
<view class="area" @click="showPicker">
|
||||
<!-- <view class="area" @tap='areashow=true'> -->
|
||||
<u-field v-model="infolist.address" label="区域" placeholder="请选择" class="items" disabled>
|
||||
</u-field>
|
||||
<image src="../../static/jiantou.png" mode=""></image>
|
||||
</view>
|
||||
<u-field v-model="infolist.receiveAddress" label-width="170" label="详细地址" placeholder="如街道、门牌号、小区等"
|
||||
class="items" maxlength='50'>
|
||||
</u-field>
|
||||
<!-- <view class="" style="font-size: 28rpx;height: 80rpx">
|
||||
<view class="" style="display: inline-block;">
|
||||
默认地址
|
||||
</view>
|
||||
<view class="" style="transform: translateY(8%);display: inline-block;margin-left: 20rpx;">
|
||||
<u-switch v-model="infolist.defaultAddressFlag" size='32'></u-switch>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="save" @tap='submit()'>
|
||||
保存
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
|
||||
:list="arealist" @confirm="areaconfirm"></u-select>
|
||||
<!-- <u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
|
||||
:list="arealist" @confirm="areaconfirm"></u-select> -->
|
||||
<u-toast ref="uToast" />
|
||||
<view class="" v-if="cityPickershow">
|
||||
<m-city style='z-index: 10076;' :provinceData="list" headTitle="地区选择" ref="cityPicker"
|
||||
@funcValue="getpickerParentValue" pickerSize="4">
|
||||
</m-city>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -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) {
|
||||
if (that.addresslength) {
|
||||
if (that.addresslength.length > 2) {
|
||||
addnursingStation(that.infolist).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
that.$refs.uToast.show({
|
||||
title: '新增成功',
|
||||
duration: 1500
|
||||
});
|
||||
that.show = false;
|
||||
type: 'success'
|
||||
})
|
||||
that.cencel();
|
||||
setTimeout(e => {
|
||||
that.goodsList()
|
||||
}, 1500)
|
||||
}, 1000)
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
updatenursingStation(that.infolist).then(res => {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
duration: 1500
|
||||
});
|
||||
that.show = false;
|
||||
setTimeout(e => {
|
||||
that.goodsList()
|
||||
}, 1500)
|
||||
})
|
||||
this.Toast()
|
||||
}
|
||||
} else {
|
||||
this.Toast()
|
||||
}
|
||||
} else {
|
||||
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 => {
|
||||
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
|
||||
getSubordinate(res.data.areaCode).then(res => {
|
||||
this.infolist.address = res.data.regionName + '-' + res.data.streetName
|
||||
this.show = true
|
||||
})
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
add() {
|
||||
this.shipAddress = '添加地址'
|
||||
this.cityPickershow = true
|
||||
this.infolist = {
|
||||
receiveName: '',
|
||||
receivePhone: '',
|
||||
@ -191,50 +367,68 @@
|
||||
content: '确认要删除信息吗',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
if (that.goodPatient.length == 1) {
|
||||
that.$refs.uToast.show({
|
||||
title: '最少保留一条地址信息',
|
||||
type: 'error'
|
||||
})
|
||||
} else {
|
||||
delnursingStation(item.id).then(res => {
|
||||
uni.showToast({
|
||||
that.$refs.uToast.show({
|
||||
title: '删除成功',
|
||||
duration: 1500,
|
||||
|
||||
});
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(e => {
|
||||
that.goodsList()
|
||||
}, 1500)
|
||||
}, 1000)
|
||||
that.delshow = false;
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
}
|
||||
} 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);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -3,10 +3,16 @@
|
||||
<view class="content">
|
||||
<view class="righttext">
|
||||
<image class="picture" :src="list.stationIntroducePcitureUrl"></image>
|
||||
<view class="title">
|
||||
<view class="title" v-if="list.nurseStationName">
|
||||
{{list.nurseStationName}}
|
||||
</view>
|
||||
<view class="address">{{list.address}} </view>
|
||||
<view class="title" v-else>
|
||||
暂无
|
||||
</view>
|
||||
<view class="address" v-if="list.address">{{list.address}} </view>
|
||||
<view class="address" v-else>
|
||||
暂无
|
||||
</view>
|
||||
<view class="call">
|
||||
<view class="callme" @tap="gophone()">
|
||||
<u-icon class='icon' name="phone-fill" color="#ffffff" size="30"></u-icon>
|
||||
@ -19,8 +25,7 @@
|
||||
</view>
|
||||
<view class="detail">
|
||||
<view class="Introduction">机构简介</view>
|
||||
<view class="textInfo">
|
||||
{{list.agencyIntroduce}}
|
||||
<view class="textInfo" v-html="list.agencyIntroduce">
|
||||
</view>
|
||||
</view>
|
||||
<view class="Nursestationconfiguration">
|
||||
@ -41,7 +46,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="servelist.length>0&&choicetab==false">
|
||||
<view class="item" v-for="item in servelist" :key="" v-show='choicetab==false'>
|
||||
<view class="item" v-for="item in servelist" :key="" v-show='choicetab==false'
|
||||
@click.stop='goProjectDetails(item)'>
|
||||
<image :src="item.itemPictureUrl"></image>
|
||||
<view class="huanyao">{{item.nurseItemName}}
|
||||
</view>
|
||||
@ -49,7 +55,7 @@
|
||||
<u-rate :count="5" value="2"></u-rate>
|
||||
</view> -->
|
||||
<view class="servicetime">服务时长:{{item.serveDurationUnit?item.serveDurationUnit:'0'}}</view>
|
||||
<view class="appointment" @tap='goappointments(item)'>预约</view>
|
||||
<view class="appointment" @tap.stop='goappointments(item)'>预约</view>
|
||||
<view class="price">¥{{item.nurseItemPrice==null?'0':item.nurseItemPrice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -63,8 +69,9 @@
|
||||
<view class="item" v-show='choicetab' v-for="(item,index) in productlist" :key="index">
|
||||
<image :src="item.goodsPictureUrl"></image>
|
||||
<view class="product">{{item.goodsName}}</view>
|
||||
<view class="product" style="top:38%;font-size: 24rpx;color: #999999;">{{item.attributeDetailsName}}</view>
|
||||
<view class="buy appointment" @tap="goCommodityDetails(item)">购买</view>
|
||||
<view class="price">¥{{item.goodsPrice==null?'0':item.goodsPrice}}起</view>
|
||||
<view class="price" style="left:32%">¥{{item.goodsPrice==null?'0':item.goodsPrice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="noorder" v-if="productlist.length==0&&choicetab">
|
||||
@ -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,11 +147,9 @@
|
||||
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 (value && value2) {
|
||||
AppIdentification(value2).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.loginFlag) {
|
||||
that.usershow = false
|
||||
@ -156,12 +159,15 @@
|
||||
} else {
|
||||
that.usershow = true
|
||||
}
|
||||
} else {
|
||||
} else if (res.code == 9999) {} else {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
setTimeout(e => {
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
@ -173,18 +179,10 @@
|
||||
title: '未登录,请先登录',
|
||||
type: 'error'
|
||||
})
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}, 1500)
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '未登录,请先登录',
|
||||
type: 'error'
|
||||
})
|
||||
setTimeout(e => {
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
@ -198,15 +196,25 @@
|
||||
},
|
||||
getInfo() {
|
||||
introductionList(this.nurseStationId).then(res => {
|
||||
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(/\<img/gi,
|
||||
"<br/><img class='richPic'")
|
||||
}
|
||||
this.list = res.data
|
||||
if (res.data.nurseStationLabelList) {
|
||||
this.nurseStationLabelList = res.data.nurseStationLabelList
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
serveinfo() {
|
||||
this.pageNum = 1
|
||||
itemList(this.nurseStationId, this.pageSize, this.pageNum).then(res => {
|
||||
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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -8,18 +8,42 @@
|
||||
<view class="OrderStatus" @tap="gopaid('WAIT_PAY')">
|
||||
<image src="/static/Tobepaid.png" mode=""></image>
|
||||
<span>待付款</span>
|
||||
<view class="orderCount" v-if="list.waitPayCount>0&&list.waitPayCount<100">
|
||||
{{list.waitPayCount}}
|
||||
</view>
|
||||
<view class="orderCount" v-if="list.waitPayCount>=100">
|
||||
99+
|
||||
</view>
|
||||
</view>
|
||||
<view class="OrderStatus" @tap="goreceive('WAIT_RECEIVED_GOODS')">
|
||||
<image src="/static/received.png" mode=""></image>
|
||||
<span>待收货</span>
|
||||
<view class="orderCount" v-if="list.waitReceivedGoodsCount>0&&list.waitReceivedGoodsCount<100">
|
||||
{{list.waitReceivedGoodsCount}}
|
||||
</view>
|
||||
<view class="orderCount" v-if="list.waitReceivedGoodsCount>=100">
|
||||
99+
|
||||
</view>
|
||||
</view>
|
||||
<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')">
|
||||
<image src="/static/evaluated.png" mode=""></image>
|
||||
<span>待评价</span>
|
||||
<view class="orderCount" v-if="list.receivedGoodsCount>0&&list.receivedGoodsCount<100">
|
||||
{{list.receivedGoodsCount}}
|
||||
</view>
|
||||
<view class="orderCount" v-if="list.receivedGoodsCount>=100">
|
||||
99+
|
||||
</view>
|
||||
</view>
|
||||
<view class="OrderStatus" @tap="goEVALUATED('EVALUATED')">
|
||||
<image src="/static/finished.png" mode=""></image>
|
||||
<span>已完成</span>
|
||||
<!-- <view class="orderCount" v-if="list.evaluatedCount>0&&list.evaluatedCount<100">
|
||||
{{list.evaluatedCount}}
|
||||
</view>
|
||||
<view class="orderCount" v-if="list.evaluatedCount>=100">
|
||||
99+
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -29,14 +53,34 @@
|
||||
<image src="../../static/jiantou.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
orderCount
|
||||
} from '@/api/order/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
list: null,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
orderCount(value).then(res => {
|
||||
this.list = res.data
|
||||
})
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '请登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -76,7 +120,7 @@
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -5,6 +5,9 @@
|
||||
<u-count-down style='' :timestamp="timestamp">
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="OrderStatus" v-if="order.orderStatus=='REFUNDED'||order.orderStatus=='CANCEL'">
|
||||
订单已关闭
|
||||
</view>
|
||||
<!-- <custom-nav nav='To' Url="/pages/CommodityOrder/CommodityOrder" title='商品订单'></custom-nav> -->
|
||||
<view class="content">
|
||||
<view class="name">
|
||||
@ -42,7 +45,6 @@
|
||||
<view class="refund" v-if="order.orderStatus=='CANCEL'">
|
||||
已取消
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="payinfo">
|
||||
@ -51,7 +53,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info" v-if="order.orderStatus != ' WAIT_PAY'&& order.orderStatus!='CANCEL'">
|
||||
<view class="info">
|
||||
<span>收货人:<text>{{order.receiver}}</text></span>
|
||||
<span>联系电话:<text>{{order.phone}}</text></span>
|
||||
<span>收货地址:<text>{{order.receiveAddress}}</text></span>
|
||||
@ -66,7 +68,41 @@
|
||||
去支付
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy" v-if="order.orderStatus == 'EVALUATED'" @tap='golookrate'>
|
||||
<view class="pay" style="background-color: #4C7BC9;">
|
||||
查看评价
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy" v-if="order.orderStatus == 'RECEIVED_GOODS'" @tap='rate'>
|
||||
<view class="pay" style="background-color: #60c5f1;">
|
||||
去评价
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy" v-if="order.orderStatus == 'WAIT_RECEIVED_GOODS'">
|
||||
<view class="logistics" style="" @tap='gologistics'>查看物流
|
||||
</view>
|
||||
<view class="pay" style="background-color: #4C7BC9;" @tap='Receipt'>
|
||||
确认收货
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
<!-- //收货 -->
|
||||
<view class="frame">
|
||||
<u-popup v-model="show" mode="bottom" length="45%" border-radius="30">
|
||||
<view class="payment">
|
||||
<span>确认收到货了吗</span>
|
||||
<image src="../../static/gb.png" mode="" @tap="show = false"></image>
|
||||
</view>
|
||||
<view class="chat">
|
||||
<view class="image">
|
||||
<image :src="baseurl+order.attributePitureUrl" mode=""></image>
|
||||
<view class="blackground">共1件</view>
|
||||
</view>
|
||||
<view class="word">为了保证你的售后权益,请收到商品确认无误后再确认收货</view>
|
||||
</view>
|
||||
<view class="submits" @tap='Receipts'>确定</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -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'
|
||||
@ -85,13 +124,64 @@
|
||||
order: null,
|
||||
patientId: '',
|
||||
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) {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -5,6 +5,9 @@
|
||||
<u-count-down style='' :timestamp="timestamp">
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="OrderStatus" v-if="order.orderStatus=='REFUNDED'||order.orderStatus=='CANCEL'">
|
||||
订单已关闭
|
||||
</view>
|
||||
<!-- <custom-nav nav='To' Url="/pages/CommodityOrder/CommodityOrder" title='商品订单'></custom-nav> -->
|
||||
<view class="content">
|
||||
<view class="name">
|
||||
@ -42,7 +45,6 @@
|
||||
<view class="refund" v-if="order.orderStatus=='CANCEL'">
|
||||
已取消
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="payinfo">
|
||||
@ -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() {},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
|
||||
@mixin vue-flex($direction: row) {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
flex-direction: $direction;
|
||||
/* #endif */
|
||||
}
|
||||
100
pages/ratesuccess/ratesuccess.vue
Normal file
100
pages/ratesuccess/ratesuccess.vue
Normal file
@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<image src="../../static/paysuccess.png" mode=""></image>
|
||||
<view class="success">
|
||||
评价完成
|
||||
</view>
|
||||
<view class="goshopping" @tap='gos'>
|
||||
返回上一级
|
||||
</view>
|
||||
<view class="gohomepage" @tap='gohome'>
|
||||
去首页
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
delta: null,
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.delta = options.delta
|
||||
},
|
||||
methods: {
|
||||
gos() {
|
||||
var that = this
|
||||
this.delta = Number(this.delta)
|
||||
if (this.delta == 4) {
|
||||
uni.navigateBack({
|
||||
delta: 4
|
||||
});
|
||||
} else if (this.delta == 3) {
|
||||
uni.navigateBack({
|
||||
delta: 3
|
||||
});
|
||||
} else if (this.delta == 2) {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
});
|
||||
}else{
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
});
|
||||
}
|
||||
},
|
||||
gohome() {
|
||||
uni.switchTab({
|
||||
url: '/pages/homepage/homepage'
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
font-size: 30rpx;
|
||||
height: 100vh;
|
||||
|
||||
.goshopping,
|
||||
.gohomepage {
|
||||
padding: 0 30rpx;
|
||||
height: 70rpx;
|
||||
line-height: 65rpx;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
color: #4C7BC9;
|
||||
border: 1rpx solid #4C7BC9;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.goshopping {
|
||||
left: 10%;
|
||||
}
|
||||
|
||||
.gohomepage {
|
||||
right: 10%;
|
||||
}
|
||||
|
||||
.success {
|
||||
font-size: 42rpx;
|
||||
position: absolute;
|
||||
top: 35%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
image {
|
||||
width: 230rpx;
|
||||
height: 230rpx;
|
||||
position: absolute;
|
||||
top: 8%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -3,9 +3,8 @@
|
||||
<view class="cards">
|
||||
<view class="item" :style="{background:listcolor[index]}" @tap='goProductList(item)'
|
||||
v-for="(item,index) in goodsCategoryList" :key="index">
|
||||
<image :style="index==4?'top:0;border-radius: 20rpx;width:100%;height: 300rpx;':''"
|
||||
:src="item.goodsCategoryPicture" mode=""></image>
|
||||
<view class="title" style="font-size:42rpx" v-if="index!=4">
|
||||
<image :src="item.goodsCategoryPicture" mode=""></image>
|
||||
<view class="title" style="font-size:42rpx">
|
||||
{{item.goodsCategoryName}}
|
||||
</view>
|
||||
</view>
|
||||
@ -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 => {
|
||||
uni.removeStorageSync('Refresh');
|
||||
if (res.code == 200) {
|
||||
res.rows.forEach(e => {
|
||||
e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
|
||||
this.goodsCategoryList.push(e)
|
||||
})
|
||||
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 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.item:nth-child(0) {
|
||||
image {}
|
||||
.app {
|
||||
.cards {
|
||||
padding: 22px 0 20px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
//护理站列表
|
||||
.app{
|
||||
padding: 0;
|
||||
padding: 0 0 5rpx 0;
|
||||
.map{
|
||||
padding-top: 100rpx;
|
||||
z-index: 1;
|
||||
|
||||
@ -12,7 +12,9 @@
|
||||
<view class="addressContent" v-for="(item,index) in nursestationlist" :key="index">
|
||||
<view class="lists" @tap='godetails(item)'>
|
||||
<view class="nurse">{{item.nurseStationName}}</view>
|
||||
<view class="distance">距离您{{item.distance}}KM</view>
|
||||
<view class="distance"
|
||||
v-show="homeLatitudeLongitude.homeLatitude&&homeLatitudeLongitude.homeLongitude">
|
||||
距离您{{item.distance}}KM</view>
|
||||
<image class="background" :src="item.stationPictureUrl" mode=""></image>
|
||||
<view class="understand">
|
||||
点击了解
|
||||
@ -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,11 +149,11 @@
|
||||
},
|
||||
onShow() {
|
||||
var that = this
|
||||
try {
|
||||
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
|
||||
@ -162,72 +167,101 @@
|
||||
})
|
||||
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.latitude = that.latitude
|
||||
that.longitude = that.longitude
|
||||
that.requestinfo();
|
||||
},
|
||||
fail(err) {
|
||||
that.mask = true;
|
||||
}
|
||||
});
|
||||
// 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 if (res.code == 9999) {
|
||||
|
||||
} 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.latitude = that.latitude
|
||||
that.longitude = that.longitude
|
||||
that.requestinfo();
|
||||
},
|
||||
fail(err) {
|
||||
that.mask = true;
|
||||
}
|
||||
});
|
||||
// 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 {
|
||||
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.latitude = that.latitude
|
||||
that.longitude = that.longitude
|
||||
that.requestinfo();
|
||||
},
|
||||
fail(err) {
|
||||
that.mask = true;
|
||||
// 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;
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
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,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@ -17,28 +17,32 @@
|
||||
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.info()
|
||||
// const value = uni.getStorageSync('openid');
|
||||
// if (value) {
|
||||
// existPatientInfo(value).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// if (res.msg == 'LOGIN') {
|
||||
// uni.setStorageSync("LOGIN", res.msg)
|
||||
// } else {}
|
||||
// } else {}
|
||||
// })
|
||||
// } else {}
|
||||
//1.分享给朋友
|
||||
onShareAppMessage(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
info() {
|
||||
//2.分享到朋友圈
|
||||
onShareTimeline(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/homepage/homepage'
|
||||
});
|
||||
}, 2000);
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
167
pages/toptabbar/toptabbar.vue
Normal file
167
pages/toptabbar/toptabbar.vue
Normal file
@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<view style="position: relative;">
|
||||
<!--顶部导航栏-->
|
||||
<view class="uni-top-tabbar">
|
||||
<scroll-view scroll-x="true" class="uni-swiper-tab" :style="{backgroundColor:bgColor}">
|
||||
<view v-for="(tabBar,index) in tabBars" :key="index" class="swiper-tab-list"
|
||||
:class="{'active': tabIndex==index}" :style="{color:tabIndex==index?selectedTextColor:textColor}"
|
||||
@tap="toggleTab(index)">
|
||||
<view class="title">
|
||||
{{tabBar.goodsCategoryName}}
|
||||
</view>
|
||||
<view class="swiper-tab-line"
|
||||
:style="{backgroundColor:tabIndex==index?selectedBottomColor:bgColor}"></view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="fenlei" @tap='toggleTab(1111111111111)'>
|
||||
<image src="../../static/fenlei.png" mode=""></image>
|
||||
<view class="">
|
||||
分类
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "topTabbar",
|
||||
props: {
|
||||
//选中标签栏的索引
|
||||
tabIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
//导航栏标签内容
|
||||
tabBars: {
|
||||
type: Array,
|
||||
default: [{
|
||||
goodsCategoryName: '标签1',
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
goodsCategoryName: '标签2',
|
||||
id: 2
|
||||
},
|
||||
{
|
||||
goodsCategoryName: '标签3',
|
||||
id: 3
|
||||
},
|
||||
{
|
||||
goodsCategoryName: '标签4',
|
||||
id: 4
|
||||
},
|
||||
{
|
||||
goodsCategoryName: '标签5',
|
||||
id: 5
|
||||
},
|
||||
{
|
||||
goodsCategoryName: '标签6',
|
||||
id: 6
|
||||
}
|
||||
]
|
||||
},
|
||||
//选中时底部横条颜色
|
||||
selectedBottomColor: {
|
||||
type: String,
|
||||
default: '#D43953'
|
||||
},
|
||||
|
||||
//导航区背景颜色
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: '#ffffff'
|
||||
},
|
||||
|
||||
//选中时文字颜色
|
||||
selectedTextColor: {
|
||||
type: String,
|
||||
default: '#D43953'
|
||||
},
|
||||
|
||||
//默认文本颜色
|
||||
textColor: {
|
||||
type: String,
|
||||
default: '#7d7e80'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
//点击导航栏标签触发
|
||||
toggleTab(index) {
|
||||
this.$emit("toggleToptab", index)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.fenlei {
|
||||
width: 25%;
|
||||
display: inline-block;
|
||||
background-color: #fff;
|
||||
line-height: 70rpx;
|
||||
font-weight: normal;
|
||||
height: 75rpx;
|
||||
text-align: center;
|
||||
color: #7d7e80;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
|
||||
view {
|
||||
position: absolute;
|
||||
right: 25%;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
left: 25%;
|
||||
top: 50%;
|
||||
transform: translateY(-55%);
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.uni-top-tabbar {
|
||||
/* 以下3项设置用于开启底部阴影显示 */
|
||||
/* position: relative;
|
||||
z-index: 1;
|
||||
overflow: visible; */
|
||||
width: 75%;
|
||||
|
||||
.uni-swiper-tab {
|
||||
height: 75rpx;
|
||||
//设置底部阴影
|
||||
//box-shadow: rgba(170, 170, 170, 0.5) 0 2rpx 8rpx 0;
|
||||
white-space: nowrap;
|
||||
|
||||
.swiper-tab-list {
|
||||
font-size: 28rpx;
|
||||
font-weight: normal;
|
||||
line-height: 70rpx;
|
||||
//设置标签宽度
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.active {
|
||||
.swiper-tab-line {
|
||||
height: 4rpx;
|
||||
width: 80rpx;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -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;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<view class="img" v-else>
|
||||
<image src="../../static/users.png" mode=""></image>
|
||||
</view>
|
||||
<view class="phone" v-if="appPersonallist.patientName!=null">
|
||||
<view class="phone" v-if="appPersonallist.patientName">
|
||||
{{appPersonallist.patientName}}
|
||||
</view>
|
||||
<view class="nickname">
|
||||
@ -19,50 +19,57 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="information">
|
||||
<view class="item" v-if="appPersonallist.patientName!=null">
|
||||
<view class="item" v-if="appPersonallist.patientName">
|
||||
姓名:{{appPersonallist.patientName}}
|
||||
</view>
|
||||
<view class="item" v-else>
|
||||
姓名:
|
||||
</view>
|
||||
<view class="item" v-if="appPersonallist.phone!=null">
|
||||
<view class="item" v-if="appPersonallist.phone">
|
||||
电话:{{appPersonallist.phone}}
|
||||
</view>
|
||||
<view class="item" v-else>
|
||||
电话:
|
||||
</view>
|
||||
<view class="item" v-if="appPersonallist.cardNo!=null">
|
||||
<view class="item" v-if="appPersonallist.cardNo">
|
||||
身份证:{{appPersonallist.cardNo}}
|
||||
</view>
|
||||
<view class="item" v-else>
|
||||
身份证:
|
||||
</view>
|
||||
<view class="item" v-if="appPersonallist.streetName">
|
||||
区域:{{appPersonallist.regionName}}-{{appPersonallist.streetName}}
|
||||
</view>
|
||||
<view class="item" v-else>
|
||||
<view class="addressitem" v-if="appPersonallist.areaName">
|
||||
<view class="" style="padding-left: 5%;">
|
||||
区域:
|
||||
</view>
|
||||
<view class="item" style="height:100%" v-if="appPersonallist.address">
|
||||
地址:
|
||||
<view class="address" style="">
|
||||
{{appPersonallist.areaName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="addressitem" v-else>
|
||||
<view class="" style="padding-left: 5%;">
|
||||
区域:
|
||||
</view>
|
||||
<view class="address" style="">
|
||||
</view>
|
||||
</view>
|
||||
<view class="addressitem" style="height:100%" v-if="appPersonallist.address">
|
||||
<view class="" style="padding-left: 5%;">
|
||||
地址:
|
||||
</view>
|
||||
<view class="address" style="">
|
||||
{{appPersonallist.address}}
|
||||
</view>
|
||||
<view class="item" style="height:100%" v-else>
|
||||
地址:
|
||||
</view>
|
||||
<!-- <view class="item" style="height:100%">
|
||||
<view class="" style="display: inline-block;">
|
||||
位置:
|
||||
<view class="addressitem" style="height:100%" v-else>
|
||||
<view class="" style="padding-left: 5%;">
|
||||
地址:
|
||||
</view>
|
||||
<view class="address" v-if="appPersonallist.homeLatitude&&appPersonallist.homeLongitude">
|
||||
东经:{{appPersonallist.homeLongitude}}--北纬:{{ appPersonallist.homeLatitude}}
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="disease" style="border:none;">
|
||||
<view class="" style="line-height: 110rpx;">
|
||||
疾病类型:
|
||||
</view>
|
||||
<span style="padding-right: 15rpx;font-size: 32rpx;"
|
||||
<span style="padding-right: 15rpx;font-size: 30rpx;"
|
||||
v-for="(item,index) in appPersonallist.patientDiseaseInfoList"
|
||||
:key="index">{{item.diseaseName}}</span>
|
||||
</view>
|
||||
@ -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) {
|
||||
existPatientInfo(value).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.msg == 'LOGIN') {
|
||||
uni.setStorageSync("LOGIN", res.msg)
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
if (value && value2) {
|
||||
existPatientInfo(value).then(res => {
|
||||
if (res.code == 200 && res.msg == 'LOGIN') {
|
||||
appPersonal(value2).then(Response => {
|
||||
if (Response.code == 200) {
|
||||
that.appPersonallist = Response.data
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.remove()
|
||||
}
|
||||
} else {
|
||||
that.remove()
|
||||
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()
|
||||
that.removes();
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
uni.removeStorageSync('patientId');
|
||||
uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('phone');
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
} else {
|
||||
that.removes();
|
||||
}
|
||||
},
|
||||
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`
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
BIN
static/192x192.png
Normal file
BIN
static/192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
static/fenlei.png
Normal file
BIN
static/fenlei.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Loading…
Reference in New Issue
Block a user