208 lines
3.9 KiB
Vue
208 lines
3.9 KiB
Vue
|
|
<template>
|
||
|
|
<view class="safe-area-inset-bottom">
|
||
|
|
<u-navbar title="我的" :is-back="false" title-size="34" title-color="#fff" :background="{
|
||
|
|
background:'linear-gradient(90deg, #00BFA6 0%, #6ACDBB 93%)'}">
|
||
|
|
</u-navbar>
|
||
|
|
|
||
|
|
<view class="head">
|
||
|
|
<view class="info">
|
||
|
|
<image :src="list.avatar || '/static/image/nv.png'" mode=""></image>
|
||
|
|
<view class="name">
|
||
|
|
<text>{{list.name}}</text>
|
||
|
|
<text>药师</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view class="store">
|
||
|
|
职业机构
|
||
|
|
</view>
|
||
|
|
<view class="store">
|
||
|
|
{{list.store.name || ' '}}
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
|
||
|
|
<view class="card">
|
||
|
|
<view class="setup" @click="toInfo">
|
||
|
|
个人资料
|
||
|
|
<u-icon name="arrow-right" color="#A7ABB0"></u-icon>
|
||
|
|
</view>
|
||
|
|
<view class="setup" @click="toSetup">
|
||
|
|
设置
|
||
|
|
<u-icon name="arrow-right" color="#A7ABB0"></u-icon>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
|
||
|
|
<u-tabbar v-model="current" :list="listed" active-color="#6ACDBB" @change="changed"></u-tabbar>
|
||
|
|
<d-loading-page :loading="loading"></d-loading-page>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import {
|
||
|
|
my
|
||
|
|
} from "@/api/all.js";
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
keyword: "",
|
||
|
|
show: false,
|
||
|
|
identity: uni.getStorageSync("identity") || 2,
|
||
|
|
index: 0,
|
||
|
|
navbarHeight: this.$navbarHeight,
|
||
|
|
statusBarHeight: this.$statusBarHeight,
|
||
|
|
loading: true,
|
||
|
|
userInfo: uni.getStorageSync("userInfo") || {},
|
||
|
|
list: [],
|
||
|
|
waitList: [],
|
||
|
|
is_req: false,
|
||
|
|
current: 1,
|
||
|
|
listed: '',
|
||
|
|
};
|
||
|
|
},
|
||
|
|
computed: {
|
||
|
|
|
||
|
|
|
||
|
|
},
|
||
|
|
created() {
|
||
|
|
|
||
|
|
},
|
||
|
|
onShow() {
|
||
|
|
|
||
|
|
},
|
||
|
|
onLoad() {
|
||
|
|
this.listed = [{
|
||
|
|
iconPath: require("../../static/image/w-sf.png"),
|
||
|
|
selectedIconPath: require("../../static/image/sf.png"),
|
||
|
|
text: '审方',
|
||
|
|
// pagePath: '/pages/pharmacist/index',
|
||
|
|
current: 0
|
||
|
|
},
|
||
|
|
{
|
||
|
|
iconPath: require("../../static/image/w-wd.png"),
|
||
|
|
selectedIconPath: require("../../static/image/wd.png"),
|
||
|
|
text: '我的',
|
||
|
|
// pagePath: '/pages/pharmacist/pharmacist-my',
|
||
|
|
current: 1
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
changed(index) {
|
||
|
|
this.current = index;
|
||
|
|
// console.log(this.current);
|
||
|
|
|
||
|
|
if (this.current == 0) {
|
||
|
|
uni.switchTab({
|
||
|
|
url: '/pages/pharmacist/index',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
},
|
||
|
|
|
||
|
|
async getList() {
|
||
|
|
let res = {};
|
||
|
|
res = await my({
|
||
|
|
store_id: uni.getStorageSync('store_id') || '11001',
|
||
|
|
})
|
||
|
|
this.list = [];
|
||
|
|
if (res.errcode == 0) {
|
||
|
|
// console.log(res, 'wd');
|
||
|
|
this.list = res.data;
|
||
|
|
this.$nextTick(() => {
|
||
|
|
this.loading = false;
|
||
|
|
});
|
||
|
|
} else {
|
||
|
|
this.$toast(res.msg);
|
||
|
|
this.loading = false;
|
||
|
|
}
|
||
|
|
},
|
||
|
|
toInfo() {
|
||
|
|
this.$go('../../subPackages/sub_pharmacist/pharmacist_info')
|
||
|
|
},
|
||
|
|
|
||
|
|
toSetup() {
|
||
|
|
this.$go('../../subPackages/sub_pharmacist/pharmacist_setInfo')
|
||
|
|
}
|
||
|
|
},
|
||
|
|
mounted() {
|
||
|
|
this.getList()
|
||
|
|
}
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
<style>
|
||
|
|
page {
|
||
|
|
background-color: #f9fafb;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
.bg {
|
||
|
|
position: fixed;
|
||
|
|
width: 750rpx;
|
||
|
|
height: 400rpx;
|
||
|
|
// background: linear-gradient(
|
||
|
|
// 180deg,
|
||
|
|
// #00BFA6 0%,
|
||
|
|
// #6ACDBB 0%,
|
||
|
|
// rgba(41, 121, 255, 0) 100%
|
||
|
|
// );
|
||
|
|
z-index: 981;
|
||
|
|
}
|
||
|
|
|
||
|
|
.head {
|
||
|
|
font-family: PingFang SC-Bold, PingFang SC;
|
||
|
|
font-weight: bold;
|
||
|
|
color: #232323;
|
||
|
|
width: 710rpx;
|
||
|
|
height: 304rpx;
|
||
|
|
background: #FFFFFF;
|
||
|
|
margin: 0 auto;
|
||
|
|
padding: 18rpx 20rpx;
|
||
|
|
|
||
|
|
.info {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
margin-bottom: 40rpx;
|
||
|
|
|
||
|
|
image {
|
||
|
|
border-radius: 50%;
|
||
|
|
width: 116rpx;
|
||
|
|
height: 116rpx;
|
||
|
|
}
|
||
|
|
|
||
|
|
.name {
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
|
||
|
|
text {
|
||
|
|
margin: 10rpx 20rpx;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.store {
|
||
|
|
height: 50rpx;
|
||
|
|
line-height: 50rpx;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.card {
|
||
|
|
width: 710rpx;
|
||
|
|
height: 176rpx;
|
||
|
|
background: #FFFFFF;
|
||
|
|
margin: 30rpx auto;
|
||
|
|
font-family: PingFang SC-Bold, PingFang SC;
|
||
|
|
font-weight: bold;
|
||
|
|
color: #232323;
|
||
|
|
|
||
|
|
.setup {
|
||
|
|
height: 88rpx;
|
||
|
|
line-height: 88rpx;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: space-between;
|
||
|
|
padding: 0 30rpx;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|