This commit is contained in:
曹辉 2022-12-27 09:22:42 +08:00
parent bf87728394
commit 941675105b
34 changed files with 1128 additions and 347 deletions

9
api/lookrate/index.js Normal file
View File

@ -0,0 +1,9 @@
import request from "../request.js"
// 修改信息
export function lookrate(orderNo) {
return request({
url: `/nurseApp/orderEvaluate/selectOrderEvaluate?orderNo=${orderNo}`,
method: 'GET'
})
}

View File

@ -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'

View File

@ -9,6 +9,15 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/lookrate/lookrate",
"style": {
"navigationBarTitleText": "查看评价",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/ServiceDetails/ServiceDetails",
"style": {
@ -68,12 +77,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
}
}, {
@ -81,7 +98,7 @@
"style": {
"navigationBarTitleText": "商品订单",
"navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 20, // px
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
},
@ -141,7 +158,7 @@
"style": {
"navigationBarTitleText": "护理站服务订单",
"navigationBarBackgroundColor": "#ffffff", //
"onReachBottomDistance": 20, // px
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
@ -236,7 +253,7 @@
"navigationBarTitleText": "医路优品",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 20, // px
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
},
@ -264,7 +281,7 @@
"navigationBarTitleText": "附近护理站",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff", //
"onReachBottomDistance": 20, // px
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
},

View File

@ -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)
}

View File

@ -2,9 +2,12 @@
<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}}
</view>
@ -222,6 +225,8 @@
that.buyshow = false
that.usershow = true
}
} else if(res.code==9999){
} else {
that.$refs.uToast.show({
title: res.msg,
@ -297,9 +302,22 @@
},
//
goodsDetailsinfo(goodsInfoId) {
let that = this
goodsDetails(goodsInfoId).then(res => {
if (res.code == 200) {
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.updata.patientId = value
that.goodsList()
} else {}
} catch (e) {}
}
uni.removeStorageSync('Refresh');
if (res.data[0].goodsRemark) {
res.data[0].goodsRemark = res.data[0].goodsRemark.replace(/\<img/gi,
"<br/> <img class='richPic'")
}
res.data[0].goodsPictureUrl = this.baseurl + res.data[0].goodsPictureUrl
this.image = res.data[0].goodsPictureUrl
var obj = {
@ -351,19 +369,10 @@
this.goodsPrice = options.goodsPrice //
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) {}
},
}
</script>

View File

@ -40,6 +40,9 @@
</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)'
@ -47,8 +50,11 @@
去支付</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>
@ -102,13 +108,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 => {
@ -119,15 +131,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
}
})
},
//
@ -151,12 +171,13 @@
signType: response.data.signType,
paySign: response.data.paySign,
success: function(res) {
uni.setStorageSync("Refresh", 'Refresh')
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
toast: 1500,
url: `/pages/paysuccess/paysuccess`,
})
that.goodsOrderinfo();
},
fail: function(err) {
that.$refs.uToast.show({
@ -184,7 +205,7 @@
//
rate(item) {
uni.navigateTo({
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(item)}`
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(item)}&delta=${3}`
})
},
//
@ -198,6 +219,7 @@
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
@ -205,7 +227,9 @@
var times = new Date().getTime() / 1000
e.timestamp = time - times
})
uni.removeStorageSync('Refresh');
this.total = res.total
}
})
},
//
@ -217,6 +241,7 @@
},
watch: { //
goodsName() {
this.pageNum = 1
this.goodsOrderinfo()
},
},
@ -225,35 +250,45 @@
title: this.title,
});
},
onShow() {},
onShow() {
this.pageNum = 1;
this.baseurl = baseurl;
let that = this
try {
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsOrderinfo();
}
} catch (e) {}
},
onLoad(options) { //
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
const value2 = uni.getStorageSync('openid');
if (value && value2) {
that.patientId = value
that.openid = value2
if (options.orderStatus) {
that.orderStatus = options.orderStatus
if (options.orderStatus == 'WAIT_PAY') {
that.title = '待付款'
that.goodsOrderinfo();
} else if (options.orderStatus == 'WAIT_RECEIVED_GOODS') {
that.title = '待收货'
that.goodsOrderinfo();
} else if (options.orderStatus == 'RECEIVED_GOODS') {
that.title = '待评价'
that.goodsOrderinfo();
} else if (options.orderStatus == 'EVALUATED') {
that.title = '已完成'
that.goodsOrderinfo();
}
} else {
that.goodsOrderinfo();
}
} catch (e) {}
try {
const value = uni.getStorageSync('openid');
if (value) {
that.openid = value
}
} catch (e) {}
this.baseurl = baseurl;
if (options.orderStatus) {
this.orderStatus = options.orderStatus
if (options.orderStatus == 'WAIT_PAY') {
this.title = '待付款'
} else if (options.orderStatus == 'WAIT_RECEIVED_GOODS') {
this.title = '待收货'
} else if (options.orderStatus == 'RECEIVED_GOODS') {
this.title = '待评价'
} else if (options.orderStatus == 'EVALUATED') {
this.title = '已完成'
}
}
},
onReachBottom() { //
if (this.orderlist.length >= this.total) {} else {

View File

@ -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{

View File

@ -33,11 +33,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>
@ -47,55 +45,142 @@
</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() {},
onLoad() {
this.baseurl = baseurl
onShow() {
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) {}
},
onLoad() {
let that = this
this.pageNum = 1
try {
const value = uni.getStorageSync('openid');
if (value) {
that.openid = value
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,12 +202,13 @@
signType: response.data.signType,
paySign: response.data.paySign,
success: function(res) {
uni.setStorageSync("Refresh", 'Refresh')
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
toast: 1500,
url: `/pages/paysuccess/paysuccess`,
})
that.getinfo()
},
fail: function(err) {
that.$refs.uToast.show({
@ -143,6 +229,8 @@
},
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
@ -151,6 +239,7 @@
e.timestamp = time - times
})
this.total = res.total
}
})
},
gofinished(item) {
@ -182,7 +271,6 @@
},
}
</script>
<style lang="scss">
@import './Nursingstationserviceorder.scss';
</style>

View File

@ -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({
@ -93,11 +94,11 @@
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 +110,6 @@
} else {
that.remove()
}
} else {
that.remove()
}
})
} else {
that.remove()
@ -124,6 +122,7 @@
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
uni.removeStorageSync('token');
uni.navigateTo({
url: '/pages/login/login'
})

View File

@ -47,6 +47,15 @@
})
},
},
onShow() {
var that = this
try {
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsListinfo();
}
} catch (e) {}
},
onLoad(options) { //
this.title = options.title //
this.goodsCategoryId = options.goodsCategoryId //id
@ -56,11 +65,15 @@
methods: {
//
goodsListinfo() {
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.goodsList.push(e)
})
this.total = res.total
}
uni.removeStorageSync('Refresh');
})
},
//
@ -78,7 +91,13 @@
onReachBottom() { //
if (this.goodsList.length >= this.total) {} else {
this.pageNum++;
this.goodsListinfo(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName)
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.goodsList.push(e)
})
}
})
}
},
onPullDownRefresh() { //

View File

@ -3,6 +3,7 @@
padding: 2% 2% 150rpx 2%;
padding-top: 10rpx;
font-size: 34rpx;
position: relative;
.mask {
.information {
width: 70%;

View File

@ -2,7 +2,9 @@
<view class="app">
<view class="item">
<image :src="list.itemPictureUrl"></image>
<view class="huanyao">{{list.nurseItemName}}
<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>
@ -57,14 +59,20 @@
usershow: false, //
list: [], //list
timer: null,
stationId: null,
stationItemId: null,
stationItemPriceId: null,
}
},
onLoad(options) {
//
this.getlist(options.stationId, options.stationItemId, options.stationItemPriceId)
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: {
//
@ -72,9 +80,8 @@
let that = this
try {
const value = uni.getStorageSync('openid');
if (value) {
const value2 = uni.getStorageSync('patientId');
if (value2) {
if (value && value2) {
AppIdentification(value2).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {
@ -85,6 +92,8 @@
} else {
that.usershow = true
}
} else if (res.code == 9999) {
} else {
that.$refs.uToast.show({
title: res.msg,
@ -114,20 +123,6 @@
})
}, 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'
@ -144,8 +139,10 @@
//
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
})

View File

@ -41,7 +41,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>
@ -62,7 +62,7 @@
</view>
<view class="remarks">
<view>备注</view>
<input v-model='list.remark' :disabled="list.orderStatus=='PAY'?true :false">
<input v-model='list.remark' :disabled="list.orderStatus=='WAIT_PAY'?false :true">
</view>
<view class="evaluate">
<view class="price">
@ -71,13 +71,14 @@
<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'&&timestamp>0">
去支付
</view>
<view class="cancelorder" style="background: #4C7BC9;" v-if="list.orderStatus=='EVALUATED'">查看评价</view>
</view>
<u-mask :show="rateshow" @tap="rateshow = false">
<view class="mask">
@ -118,22 +119,17 @@
}
},
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: {
@ -158,12 +154,14 @@
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,
url: `/pages/paysuccess/paysuccess?delta=${3}`
})
that.getlist()
},
fail: function(err) {
that.$refs.uToast.show({
@ -199,23 +197,34 @@
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'
})
}
})
},
//
gophone() {
console.log(this.list)
var that = this
uni.getSystemInfo({
success: function(res) {
if (res.platform == 'ios') {
uni.makePhoneCall({
phoneNumber: that.nursestationlist.phone //
phoneNumber: that.list.stationPhone //
});
} else {
uni.showActionSheet({
@ -223,7 +232,7 @@
success: function(res) {
if (res.tapIndex + 1 == 1) {
uni.makePhoneCall({
phoneNumber: that.nursestationlist.phone //
phoneNumber: that.list.stationPhone //
});
}
},

View File

@ -177,11 +177,6 @@
that.personInfo.address = that.useritem.address
} else {}
})
setTimeout(e => {
if (!that.useritem) {
that.userinfo();
}
}, 500)
},
onLoad(options) {
var that = this
@ -193,6 +188,7 @@
} catch (e) {}
//
this.getPatientInfo(options.stationId, options.stationItemId, options.stationItemPriceId)
that.userinfo();
},
methods: {
userinfo() {

View File

@ -49,7 +49,7 @@
}
this.timer = setTimeout(e => {
uni.navigateBack({
delta: 2
delta: 3
})
}, 1500)
}

View File

@ -74,6 +74,7 @@
right: 10rpx;
width: 40rpx;
height: 40rpx;
z-index: 999;
}
.itemimg {

View File

@ -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

View File

@ -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 {
@ -26,7 +29,8 @@
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 +38,10 @@
that.pwdlogin();
}
});
}
},
pwdlogin() {
login() {
getWeChatUser(this.logincode, this.phonecode).then(res => {
if (res.code == 200) {
uni.setStorageSync("openid", res.data.openid)
@ -46,6 +52,7 @@
type: 'success',
duration: '1500'
})
uni.setStorageSync("Refresh", 'Refresh')
if (this.timer) {
clearTimeout(this.timer)
}
@ -63,6 +70,13 @@
}
})
},
pwdlogin() {
var that = this
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
that.login()
})
},
},
toLogin() {}
}

View File

@ -52,7 +52,7 @@
.address {
color: #969394;
padding: 32rpx 0;
padding: 32rpx 20rpx;
}
.border {

View 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;
}
}
}
}

View 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>

View File

@ -164,7 +164,7 @@
success: function(res) {
if (res.platform == 'ios') {
uni.makePhoneCall({
phoneNumber: that.nursestationlist.phone //
phoneNumber: that.list.stationPhone //
});
} else {
uni.showActionSheet({
@ -172,7 +172,7 @@
success: function(res) {
if (res.tapIndex + 1 == 1) {
uni.makePhoneCall({
phoneNumber: that.nursestationlist.phone //
phoneNumber: that.list.stationPhone //
});
}
},

View File

@ -94,10 +94,12 @@
updata: [],
}
},
onShow() {
this.goodsList()
},
onLoad(options) {
let that = this
this.updata = JSON.parse(options.updata)
this.goodsList()
this.areaInfo()
},
methods: {
@ -147,10 +149,10 @@
if (that.isedit == true) {
addnursingStation(that.infolist).then(res => {
if (res.code == 200) {
uni.showToast({
that.$refs.uToast.show({
title: '新增成功',
duration: 1000
});
type: 'success'
})
that.show = false;
setTimeout(e => {
that.goodsList()
@ -159,14 +161,21 @@
})
} else {
updatenursingStation(that.infolist).then(res => {
uni.showToast({
if (res.code == 200) {
that.$refs.uToast.show({
title: '修改成功',
duration: 1000
});
type: 'success'
})
that.show = false;
setTimeout(e => {
that.goodsList()
}, 1000)
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
}
})
}
},

View File

@ -209,8 +209,8 @@
color: #666666;
padding-top: 30rpx;
/deep/ .richPic {
width: 94% !important;
height: 94% !important;
width: 100% !important;
height: 100% !important;
}
}
.Introduction {

View File

@ -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>
@ -130,21 +136,18 @@
},
onShow() {
this.usershow = false
this.getInfo()
},
onLoad(options) {
this.nurseStationId = options.nurseStationId
this.getInfo()
this.serveinfo()
this.productinfo()
},
methods: {
goappointments(item) {
let that = this
try {
const value = uni.getStorageSync('openid');
if (value) {
const value2 = uni.getStorageSync('patientId');
if (value2) {
if (value && value2) {
AppIdentification(value2).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {
@ -155,7 +158,7 @@
} else {
that.usershow = true
}
} else {
} else if (res.code == 9999) {} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
@ -184,20 +187,6 @@
})
}, 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'
@ -206,19 +195,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'")
// res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\<img/,
// "<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
})
@ -227,7 +222,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
})

View File

@ -1,4 +1,73 @@
.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%;
@ -26,7 +95,21 @@
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;

View File

@ -72,7 +72,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>
@ -80,6 +114,9 @@
import {
appletGoodsOrderPay
} from '@/api/confirmOrder/index.js'
import {
confirmReceipt
} from '@/api/CommodityOrder/index.js'
import {
goodsOrder
} from '@/api/CommodityOrder/index.js'
@ -91,13 +128,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
@ -116,6 +204,8 @@
signType: response.data.signType,
paySign: response.data.paySign,
success: function(res) {
uni.setStorageSync("Refresh", 'Refresh')
this.goodsOrderinfo()
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
@ -146,8 +236,8 @@
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 times = new Date().getTime() / 1000
@ -157,26 +247,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>

View 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>

View File

@ -45,6 +45,8 @@
};
},
onLoad(options) { //
},
onShow() {
this.goodsCategory()
},
methods: {
@ -57,10 +59,11 @@
//
goodsCategory() {
goodsCategoryList(this.pageSize, this.pageNum).then(res => {
uni.removeStorageSync('Refresh');
res.rows.forEach(e => {
e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
this.goodsCategoryList.push(e)
})
this.goodsCategoryList = res.rows
this.total = res.total
})
}
@ -68,7 +71,13 @@
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() { //

View File

@ -84,8 +84,10 @@
});
},
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
})
@ -142,8 +144,7 @@
// this.requestinfo()
},
},
onShow() {},
onLoad() {
onShow() {
var that = this
try {
const value = uni.getStorageSync('patientId');
@ -183,6 +184,8 @@
}
});
}
} else if (res.code == 9999) {
} else {
uni.getLocation({
type: 'wgs84',
@ -228,6 +231,7 @@
}
} catch (e) {}
},
onLoad() {},
}
</script>
<style lang="scss">

View File

@ -23,16 +23,6 @@
url: '/pages/homepage/homepage'
});
}, 2000);
// 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 {}
},
methods: {},
}

View File

@ -119,8 +119,7 @@
this.baseurl = baseurl
this.myInfo()
},
onLoad(options) {
},
onLoad(options) {},
methods: {
remove() {
let that = this
@ -128,11 +127,11 @@
title: '提示',
content: '确认要退出此账号吗',
success: function(res) {
console.log(res)
if (res.confirm) {
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
uni.removeStorageSync('token');
that.$refs.uToast.show({
title: '退出账号成功',
type: 'success',
@ -156,45 +155,38 @@
}
});
},
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.navigateBack({
delta: 1
})
}
})
}
} else {
that.remove()
}
} else {
that.remove()
} else if (Response.code == 9999) {} else {
that.removes();
}
})
} else {
that.remove()
that.removes();
}
},
remove() {
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
uni.navigateBack({
delta: 1
})
} else {
that.removes();
}
},
updatainfo() {
uni.navigateTo({

50
share.js Normal file
View File

@ -0,0 +1,50 @@
export default {
data() {
return {
// 默认的全局分享内容
share: {
title: '泉医到家',
path: '/pages/homepage/homepage', // 全局分享的路径,比如 首页
// imageUrl: , // 全局分享的图片(可本地可网络)
}
}
},
// 定义全局分享
// 1.发送给朋友
onShareAppMessage(res) {
// getCurrentPages() 函数用于获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath.split('?')[0]
if (url == '/pages/user/user' || url == '/pages/information/information' || url == '/pages/modify/modify') {
return {
title: this.share.title,
path: this.share.path,
imageUrl: '/static/192x192.png',
}
} else {
return {
title: this.share.title,
path: this.share.path,
// imageUrl: this.share.imageUrl,
}
}
},
//2.分享到朋友圈
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath.split('?')[0]
if (url == '/pages/user/user' || url == '/pages/information/information' || url == '/pages/modify/modify') {
return {
title: this.share.title,
path: this.share.path,
imageUrl: '/static/192x192.png',
}
} else {
return {
title: this.share.title,
path: this.share.path,
// imageUrl: this.share.imageUrl,
}
}
},
}

BIN
static/192x192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB