123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- <template>
- <view style="width: 100%;height: 100%;background-color: #ececec;">
- <!-- 卡券 -->
- <view class="card">
- <view class="card_view">
- <!-- 放图片 标题 -->
- <view class="title">
- <view class="">
- {{packs.pack_name}}
- </view>
- <view class="">
- </view>
- </view>
- <!-- 放描述 -->
- <view class="describe">
- <view style="font-size: 40rpx;font-weight: bold;">{{packs.pack_name}}</view>
- <view style="font-size: 28rpx;font-weight: bold;padding-top: 60rpx;">有效期</view>
- <view style="font-size: 26rpx;color: #999999;padding-top: 30rpx;">自购买服务起{{packs.effective_days}}天</view>
- <view style="font-size: 28rpx;font-weight: bold;padding-top: 50rpx;">服务包内容介绍</view>
- <view style="font-size: 26rpx;color: #999999;">
- <view style="padding: 27rpx 0 12rpx 0;">{{packs.pack_intro}}</view>
- <rich-text style="padding: 12rpx 0;" :nodes="packs.desc"></rich-text>
- </view>
- <view style="font-size: 28rpx;font-weight: bold;padding-top: 60rpx;">服务包绑定者</view>
- <view style="font-size: 28rpx;font-weight: bold;">监护人:{{service.guardian_name}}</view>
- <view class="" v-for="(item,index) in packs.team" :key="index">
- <view style="font-size: 28rpx;font-weight: bold;padding-top: 48rpx;">{{item.name}}</view>
- <view class="list" v-for="(ite,idx) in item.docter" :key="idx" @click="gotodocterinfo(ite)">
- <!-- 头像 -->
- <view class="portrait">
- <view style="padding-top: 20rpx;">
- <image class="img" :src="ite.avatar"></image>
- <view class="bun_true" @click="submitCollect" :data-itemindex="index" :data-index="idx" :data-id="ite.id" v-if="ite.is_collect==0">关注</view>
- <view class="bun_false" @click="submitCollect" :data-itemindex="index" :data-index="idx" :data-id="ite.id"
- v-else>已关注</view>
- </view>
- </view>
- <!-- 文字 -->
- <view class="text">
- <!-- 名字+标签 -->
- <view class="name">
- <view style="margin-right: 15rpx;">{{ite.name}}</view>
- <view class="label" v-for="(itm,idex) in ite.label_texts" :key="idex">{{itm.label_name}}</view>
- </view>
- <!-- 科室 -->
- <view class="department">
- <text>科室:</text>
- <text style="color: #333333;">{{ite.office.name}}</text>
- <text style="color: #333333;">{{ite.qualification.name}}</text>
- </view>
- <!-- 选项 -->
- <view class="option">
- <view v-if="ite.is_chat">图文</view>
- <view v-if="ite.is_phone">电话</view>
- <view v-if="ite.is_appoint">门诊</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 两个半圆 -->
- <view class="round" style="position:absolute;top: 25vh;right:0;"></view>
- <view class="round" style="position:absolute;top: 25vh;"></view>
- </view>
- </template>
- <script>
- export default {
- name: 'productdetailspage',
- onLoad(op) {
- console.log(op.data)
- this.service = JSON.parse(op.data)
- console.log(this.service)
- },
- mounted() {
- this.getservice()
- },
- data() {
- return {
- //关注
- isfollow: false,
- //协议
- num: 1,
- imgitem: {
- istrue: false,
- name: "https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/xieyi.png"
- },
- packs: {},
- serviceid: "",
- service: ""
- }
- },
- methods: {
- gotodocterinfo(item) {
- uni.navigateTo({
- url: "../doctor_related/doctor_info?id=" + item.id + "&index=1"
- })
- },
- //关注
- submitCollect: async function(e) {
- console.log(e)
- let res = await this.$request.post("/api/v1/collection/submitCollect", {
- type: 1,
- relation_id: e.currentTarget.dataset.id
- })
- if (res.status == 0) {
- if (res.data.is_collect == 0) {
- uni.showToast({
- title: "取消成功",
- icon: "none"
- })
- this.packs.team[e.currentTarget.dataset.itemindex].docter[e.currentTarget.dataset.index].is_collect = res.data.is_collect
- } else {
- uni.showToast({
- title: "关注成功",
- icon: "none"
- })
- this.packs.team[e.currentTarget.dataset.itemindex].docter[e.currentTarget.dataset.index].is_collect = res.data.is_collect
- }
- }
- },
- getservice: async function() {
- let res = await this.$request.post("/api/v1/order/orderDetail", {
- order_id: this.service.service_pack_id
- })
- console.log(res)
- if (res.status == 0) {
- this.packs = res.data.order_pack
- }
- }
- }
- }
- </script>
- <style lang="scss">
- .footer {
- width: 100%;
- height: auto;
- display: flex;
- position: fixed;
- bottom: 0;
- }
- .round {
- height: 45rpx;
- width: 50rpx;
- border-radius: 50%;
- background-color: #ececec;
- }
- .card {
- padding: 30rpx 30rpx;
- box-sizing: border-box;
- .card_view {
- width: 100%;
- background-color: #ffffff;
- border-radius: 15rpx;
- .title {
- width: 100%;
- height: 20vh;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .img {
- width: 90%;
- height: 90%;
- }
- }
- .describe {
- width: 100%;
- height: 1;
- padding: 100rpx 40rpx 20rpx 40rpx;
- }
- }
- }
- .list {
- margin: 20rpx 0 10rpx 0;
- display: flex;
- width: 100%;
- height: 200rpx;
- border-radius: 15rpx;
- background-color: #FFFFFF;
- box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
- .portrait {
- width: 30%;
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- .img {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- }
- .bun_true {
- text-align: center;
- width: 80rpx;
- height: 36rpx;
- background-color: #D92975;
- margin: 0 10rpx;
- border-radius: 60rpx;
- position: relative;
- top: -20rpx;
- font-size: 20rpx;
- color: #FFFFFF;
- padding: 3rpx 0;
- }
- .bun_false {
- border: 1rpx solid #D92975;
- text-align: center;
- width: 80rpx;
- height: 36rpx;
- background-color: #FFFFFF;
- margin: 0 10rpx;
- border-radius: 60rpx;
- position: relative;
- top: -20rpx;
- font-size: 20rpx;
- color: #D92975;
- padding: 3rpx 0;
- }
- }
- //文字
- .text {
- width: 70%;
- height: 100%;
- padding: 20rpx 0;
- //名字+标签
- .name {
- font-size: 30rpx;
- font-weight: bold;
- display: flex;
- align-items: center;
- .label {
- font-weight: 400;
- margin-right: 15rpx;
- background-color: #E5F5FF;
- color: #0B73B9;
- width: 100rpx;
- height: 28rpx;
- font-size: 20rpx;
- border-radius: 10rpx;
- text-align: center;
- }
- }
- //科室
- .department {
- padding: 20rpx 0;
- color: #666666;
- text {
- margin-right: 15rpx;
- }
- }
- // 选项
- .option {
- display: flex;
- view {
- background-color: #E4E4E4;
- width: 100rpx;
- height: 48rpx;
- border-radius: 12px;
- margin-right: 15rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- }
- }
- }
- </style>
|