Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
65694347aa
@ -32,7 +32,7 @@
|
|||||||
行为积分
|
行为积分
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @tap='gohealthybeans'>
|
<view class="item" @tap='gointegral'>
|
||||||
<view class="number">
|
<view class="number">
|
||||||
0
|
0
|
||||||
</view>
|
</view>
|
||||||
@ -148,12 +148,44 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
mapActions
|
||||||
|
} from "vuex";
|
||||||
|
import {
|
||||||
|
appPersonal,
|
||||||
|
} from '@/api/pages/myinformation/myinformation.js';
|
||||||
|
import {
|
||||||
|
existPatientInfo
|
||||||
|
} from '@/api/pages/startup/index.js'
|
||||||
|
import {
|
||||||
|
createMobileToken
|
||||||
|
} from '@/api/pages/login/index.js'
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
baseurl: '',
|
||||||
|
appPersonallist: null, //获取个人信息
|
||||||
|
timer: null,
|
||||||
|
list: {},
|
||||||
|
// bjimg: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
// this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png'
|
||||||
|
let that = this
|
||||||
|
this.baseurl = baseurl
|
||||||
|
this.myInfo()
|
||||||
|
const value = uni.getStorageSync('patientId');
|
||||||
|
if (value) {} else {
|
||||||
|
that.appPersonallist = null
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '您未登录,请先登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//全部订单
|
//全部订单
|
||||||
goorder(index, item) {
|
goorder(index, item) {
|
||||||
@ -186,14 +218,150 @@
|
|||||||
url: '/pagesB/managefamily/managefamily'
|
url: '/pagesB/managefamily/managefamily'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
gohealthybeans() {
|
||||||
|
uni.navigateTo({})
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
let that = this
|
||||||
|
const value = uni.getStorageSync('patientId');
|
||||||
|
if (value) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '确认要退出此账号吗',
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.clearStorageSync();
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '退出账号成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: '1000'
|
||||||
|
})
|
||||||
|
createMobileToken().then(res => {
|
||||||
|
uni.setStorageSync("token", res.data.token)
|
||||||
|
})
|
||||||
|
if (that.timer) {
|
||||||
|
clearTimeout(that.timer)
|
||||||
|
}
|
||||||
|
that.timer = setTimeout(e => {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/homepage/homepage'
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '您未登录,请先登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removes() {
|
||||||
|
this.appPersonallist = null
|
||||||
|
uni.removeStorageSync('patientId');
|
||||||
|
uni.removeStorageSync('openid');
|
||||||
|
uni.removeStorageSync('phone');
|
||||||
|
uni.removeStorageSync('Refresh');
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取个人信息
|
||||||
|
myInfo() {
|
||||||
|
var that = this
|
||||||
|
const value = uni.getStorageSync('openid');
|
||||||
|
const value2 = uni.getStorageSync('patientId');
|
||||||
|
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
|
||||||
|
if (!that.appPersonallist.integral) {
|
||||||
|
that.appPersonallist.integral = 0
|
||||||
|
}
|
||||||
|
that.appPersonallist.homeLatitude = Number(that.appPersonallist
|
||||||
|
.homeLatitude)
|
||||||
|
that.appPersonallist.homeLongitude = Number(that.appPersonallist
|
||||||
|
.homeLongitude)
|
||||||
|
} else if (Response.code == 9999) {} else {
|
||||||
|
that.removes();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.removes();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.removes();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updatainfo() {
|
||||||
|
const value = uni.getStorageSync('openid');
|
||||||
|
const value2 = uni.getStorageSync('patientId');
|
||||||
|
if (value && value2) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/modify/modify`
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.gologin();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//护理站服务订单
|
||||||
|
gonursestation() {
|
||||||
|
const value = uni.getStorageSync('openid');
|
||||||
|
const value2 = uni.getStorageSync('patientId');
|
||||||
|
if (value && value2) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesB/Nursingstationserviceorder/Nursingstationserviceorder'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.gologin();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//去登陆
|
||||||
|
gologin() {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '您未登录,请先登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000',
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//优惠券
|
||||||
gocoupon() {
|
gocoupon() {
|
||||||
|
const value = uni.getStorageSync('openid');
|
||||||
|
const value2 = uni.getStorageSync('patientId');
|
||||||
|
if (value && value2) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesB/coupon/coupon'
|
url: '/pagesB/coupon/coupon'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.gologin();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
gohealthybeans() {
|
//积分页面
|
||||||
|
...mapActions(["integralopenPopup"]),
|
||||||
|
gointegral() {
|
||||||
|
const value = uni.getStorageSync('openid');
|
||||||
|
const value2 = uni.getStorageSync('patientId');
|
||||||
|
if (value && value2) {
|
||||||
|
// this.integralopenPopup();
|
||||||
|
setTimeout(e => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesB/healthybeans/healthybeans'
|
url: `/pagesB/healthybeans/healthybeans?integral=${this.appPersonallist.integral}`
|
||||||
|
})
|
||||||
|
}, 0)
|
||||||
|
} else {
|
||||||
|
this.gologin();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//健康档案
|
||||||
|
goHealthrecords() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/Healthrecords/Healthrecords'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -183,22 +183,22 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// import {
|
import {
|
||||||
// signIn,
|
signIn,
|
||||||
// selectPatientSignIn,
|
selectPatientSignIn,
|
||||||
// selectExchangeGoods,
|
selectExchangeGoods,
|
||||||
// integralGoodsOrder
|
integralGoodsOrder
|
||||||
// } from '@/api/integral/index.js'
|
} from '@/api/pagesB/integral/index.js'
|
||||||
// import {
|
import {
|
||||||
// inviteFriends
|
inviteFriends
|
||||||
// } from '@/api/Personal/Personal.js';
|
} from '@/api/pages/myinformation/myinformation.js';
|
||||||
// import {
|
import {
|
||||||
// goodPatientInfo
|
goodPatientInfo
|
||||||
// } from '@/api/modifyAddress/modifyAddress.js';
|
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
||||||
// import {
|
import {
|
||||||
// AppIdentification
|
AppIdentification
|
||||||
// } from '@/api/AppIdentification/index.js'
|
} from '@/api/pagesB/AppIdentification/index.js'
|
||||||
import baseurl from '../../api/baseurl';
|
import baseurl from '@/api/baseurl';
|
||||||
import rCanvas from "@/components/r-canvas/r-canvas.vue"
|
import rCanvas from "@/components/r-canvas/r-canvas.vue"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -255,63 +255,63 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {},
|
onLoad(options) {},
|
||||||
// onShow() {
|
onShow() {
|
||||||
// this.baseurl = baseurl
|
this.baseurl = baseurl
|
||||||
// this.pageNum = 1
|
this.pageNum = 1
|
||||||
// this.selectExchangeGoodsinfo();
|
this.selectExchangeGoodsinfo();
|
||||||
// this.baseurl = baseurl
|
this.baseurl = baseurl
|
||||||
// this.yapqingbeijingimg = baseurl + '/profile/appletPicture/inviteFriendsTwo.png'
|
this.yapqingbeijingimg = baseurl + '/profile/appletPicture/inviteFriendsTwo.png'
|
||||||
// var that = this
|
var that = this
|
||||||
// const value = uni.getStorageSync('patientId');
|
const value = uni.getStorageSync('patientId');
|
||||||
// if (value) {
|
if (value) {
|
||||||
// that.patientId = value
|
that.patientId = value
|
||||||
// that.updata.patientId = value
|
that.updata.patientId = value
|
||||||
// that.selectPatientSignInifo();
|
that.selectPatientSignInifo();
|
||||||
// that.user();
|
that.user();
|
||||||
// AppIdentification(value).then(res => {
|
AppIdentification(value).then(res => {
|
||||||
// if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// if (res.data.loginFlag) {
|
if (res.data.loginFlag) {
|
||||||
// that.loginFlag = true
|
that.loginFlag = true
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// goodPatientInfo(value).then(res => {
|
goodPatientInfo(value).then(res => {
|
||||||
// if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// if (res.data.length > 0) {
|
if (res.data.length > 0) {
|
||||||
// var user = res.data.filter(e => e.id == that.userid)
|
var user = res.data.filter(e => e.id == that.userid)
|
||||||
// if (user.length >= 1) {
|
if (user.length >= 1) {
|
||||||
// that.updata.receiver = user[0].receiveName
|
that.updata.receiver = user[0].receiveName
|
||||||
// that.updata.receiveAddress = user[0].areaName + user[0].receiveAddress
|
that.updata.receiveAddress = user[0].areaName + user[0].receiveAddress
|
||||||
// that.updata.phone = user[0].receivePhone
|
that.updata.phone = user[0].receivePhone
|
||||||
// that.userid = user[0].id
|
that.userid = user[0].id
|
||||||
// } else {
|
} else {
|
||||||
// that.updata.receiver = res.data[0].receiveName
|
that.updata.receiver = res.data[0].receiveName
|
||||||
// that.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
|
that.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
|
||||||
// that.updata.phone = res.data[0].receivePhone
|
that.updata.phone = res.data[0].receivePhone
|
||||||
// that.userid = res.data[0].id
|
that.userid = res.data[0].id
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// } else {
|
} else {
|
||||||
// that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
// title: '未登录,请先登录',
|
title: '未登录,请先登录',
|
||||||
// type: 'error',
|
type: 'error',
|
||||||
// duration: '2000',
|
duration: '2000',
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// let useritem = null
|
let useritem = null
|
||||||
// uni.$on('updata', function(data) {
|
uni.$on('updata', function(data) {
|
||||||
// if (data.useritem) {
|
if (data.useritem) {
|
||||||
// useritem = JSON.parse(data.useritem)
|
useritem = JSON.parse(data.useritem)
|
||||||
// that.updata.receiver = useritem.receiveName
|
that.updata.receiver = useritem.receiveName
|
||||||
// that.updata.phone = useritem.receivePhone
|
that.updata.phone = useritem.receivePhone
|
||||||
// that.updata.receiveAddress = useritem.areaName + useritem.receiveAddress
|
that.updata.receiveAddress = useritem.areaName + useritem.receiveAddress
|
||||||
// that.userid = useritem.id
|
that.userid = useritem.id
|
||||||
// }
|
}
|
||||||
// uni.$off('updata')
|
uni.$off('updata')
|
||||||
// })
|
})
|
||||||
// },
|
},
|
||||||
methods: {
|
methods: {
|
||||||
yaoqingshowtrue() {
|
yaoqingshowtrue() {
|
||||||
this.yaoqingshow = true
|
this.yaoqingshow = true
|
||||||
|
|||||||
@ -191,7 +191,7 @@
|
|||||||
} from '@/api/pagesB/integral/index.js'
|
} from '@/api/pagesB/integral/index.js'
|
||||||
import {
|
import {
|
||||||
inviteFriends
|
inviteFriends
|
||||||
} from '@/api/pagesB/Personal/Personal.js';
|
} from '@/api/pages/myinformation/myinformation.js';
|
||||||
import {
|
import {
|
||||||
goodPatientInfo
|
goodPatientInfo
|
||||||
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
||||||
|
|||||||
@ -229,7 +229,7 @@
|
|||||||
if (res.data.loginFlag) {
|
if (res.data.loginFlag) {
|
||||||
that.usershow = false
|
that.usershow = false
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/confirmation/confirmation?price=${item.consultingFee}&hospitalPersonId=${item.id}&&personName=${item.personName}`
|
url: `/pagesB/confirmation/confirmation?price=${item.consultingFee}&hospitalPersonId=${item.id}&&personName=${item.personName}`
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
that.usershow = true
|
that.usershow = true
|
||||||
@ -254,7 +254,7 @@
|
|||||||
goinformation() {
|
goinformation() {
|
||||||
this.usershow = false
|
this.usershow = false
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/information/information'
|
url: '/pagesB/information/information'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goConsultationDetails() {
|
goConsultationDetails() {
|
||||||
|
|||||||
@ -112,7 +112,7 @@
|
|||||||
import baseurl from '@/api/baseurl.js'
|
import baseurl from '@/api/baseurl.js'
|
||||||
import {
|
import {
|
||||||
appPersonal,
|
appPersonal,
|
||||||
} from '@/api/pagesB/Personal/Personal.js';
|
} from '@/api/pages/myinformation/myinformation.js';
|
||||||
import {
|
import {
|
||||||
getSubordinateRegions,
|
getSubordinateRegions,
|
||||||
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
||||||
|
|||||||
63
store/index.js
Normal file
63
store/index.js
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import Vuex from 'vuex'
|
||||||
|
Vue.use(Vuex)
|
||||||
|
const store = new Vuex.Store({
|
||||||
|
state: {
|
||||||
|
//公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
//相当于同步的操作
|
||||||
|
//点击确认
|
||||||
|
subscribesuccess(state) {
|
||||||
|
wx.requestSubscribeMessage({
|
||||||
|
tmplIds: [
|
||||||
|
'-IxZeEkkXFhoSwGtBHbipKQ6kjEmkdTkswKeOypSsNQ',
|
||||||
|
'e1JRZaw1OfTz2b6X9DTqqaJtV4rXEt7uhwXoZLDb_eA',
|
||||||
|
'nUB9HRbqQXOVuTpkKBIHMgzWlNq6touzxf5QYBiMkbU',
|
||||||
|
],
|
||||||
|
success(res) {},
|
||||||
|
fail(err) {},
|
||||||
|
complete(scc) {}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
integralsubscribesuccess(state) {
|
||||||
|
wx.requestSubscribeMessage({
|
||||||
|
tmplIds: [
|
||||||
|
'S_c9bR4znSWpXg-6ACIMn7AkaR11dzo113XM8w4CKz0'
|
||||||
|
],
|
||||||
|
success(res) {},
|
||||||
|
fail(err) {},
|
||||||
|
complete(scc) {}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
//相当于异步的操作,不能直接改变state的值,只能通过触发mutations的方法才能改变
|
||||||
|
integralopenPopup(contxt) {
|
||||||
|
// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
|
||||||
|
wx.getSetting({
|
||||||
|
withSubscriptions: true, // 是否获取用户订阅消息的订阅状态,默认false不返回
|
||||||
|
success(res) {
|
||||||
|
if (res.authSetting['scope.subscribeMessage']) {} else {
|
||||||
|
//因为没有选择总是保持,所以需要调起授权弹窗再次授权
|
||||||
|
contxt.commit('integralsubscribesuccess')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 是否设置过授权
|
||||||
|
openPopup(contxt) {
|
||||||
|
// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
|
||||||
|
wx.getSetting({
|
||||||
|
withSubscriptions: true, // 是否获取用户订阅消息的订阅状态,默认false不返回
|
||||||
|
success(res) {
|
||||||
|
if (res.authSetting['scope.subscribeMessage']) {} else {
|
||||||
|
//因为没有选择总是保持,所以需要调起授权弹窗再次授权
|
||||||
|
contxt.commit('subscribesuccess')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
export default store
|
||||||
Loading…
Reference in New Issue
Block a user