修改
This commit is contained in:
parent
96023542d9
commit
9c912b1b9c
@ -32,7 +32,7 @@
|
||||
行为积分
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" @tap='gohealthybeans'>
|
||||
<view class="item" @tap='gointegral'>
|
||||
<view class="number">
|
||||
0
|
||||
</view>
|
||||
@ -148,12 +148,44 @@
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
data() {
|
||||
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: {
|
||||
//全部订单
|
||||
goorder(index, item) {
|
||||
@ -186,14 +218,150 @@
|
||||
url: '/pagesB/managefamily/managefamily'
|
||||
})
|
||||
},
|
||||
gocoupon() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/coupon/coupon'
|
||||
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
|
||||
})
|
||||
},
|
||||
gohealthybeans() {
|
||||
//获取个人信息
|
||||
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() {
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/coupon/coupon'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//积分页面
|
||||
...mapActions(["integralopenPopup"]),
|
||||
gointegral() {
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
// this.integralopenPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: `/pagesB/healthybeans/healthybeans?integral=${this.appPersonallist.integral}`
|
||||
})
|
||||
}, 0)
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//健康档案
|
||||
goHealthrecords() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/healthybeans/healthybeans'
|
||||
url: '/pages/Healthrecords/Healthrecords'
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@
|
||||
} from '@/api/pagesB/integral/index.js'
|
||||
import {
|
||||
inviteFriends
|
||||
} from '@/api/pagesB/Personal/Personal.js';
|
||||
} from '@/api/pages/myinformation/myinformation.js';
|
||||
import {
|
||||
goodPatientInfo
|
||||
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
||||
|
||||
@ -112,7 +112,7 @@
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import {
|
||||
appPersonal,
|
||||
} from '@/api/pagesB/Personal/Personal.js';
|
||||
} from '@/api/pages/myinformation/myinformation.js';
|
||||
import {
|
||||
getSubordinateRegions,
|
||||
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
||||
@ -434,4 +434,4 @@
|
||||
|
||||
<style lang="scss">
|
||||
@import "./modify.scss"
|
||||
</style>
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user