123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <template>
- <view class="container">
- <u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
- <view style="width: 100vw;height: auto;background-color: #f6f6f6;">
- <view style="width: 100%;height: 100%;">
- <view v-for="(item,index) in serviceList" :key="index">
- <view class="card flex justify-center">
- <view class="taocan" :data-id="item.order_pack.id" @click="details(item.order_pack,item.id)">
- <view class="tc_left">
- <text>{{item.order_pack.pack_name}}</text>
- </view>
- <view class="tc_right">
- <view style="width: 100%;">
- <view class="">{{item.order_pack.pack_intro}}</view>
- <!-- <view class="text">{{item.desc}}</view> -->
- <view class="text">
- <view class="">
- 图文次数:{{item.order_pack.chat_num}}次
- </view>
- <view class="">
- 电话次数:{{item.order_pack.phone_minutes}}次
- </view>
- <view class="">
- 门诊次数:{{item.order_pack.appoint_num}}次
- </view>
- <!-- <text style="float: right;color: #FF4F61;font-weight: bold;">¥{{item.order_pack.pack_price/100}}</text> -->
- </view>
- </view>
- <view class="margin-top-xs">
- 剩余时长:<u-count-down v-if="current!=1" color="#EEAA3F" separator="zh" :timestamp="item.order_pack.end_time-miao"></u-count-down><text
- v-else>已结束</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <u-empty text="暂无数据" :show="show" mode="order" margin-top="250"></u-empty>
- <view class="cu-tabbar-height"></view>
- <view class="cu-tabbar-height"></view>
- </view>
- </template>
- <script>
- export default {
- onLoad() {
- this.getserviceList()
- },
- onShow() {
- this.miao = parseInt(new Date().getTime() / 1000)
- },
- data() {
- return {
- list: [{
- name: '服务中服务包'
- }, {
- name: '历史服务包'
- }, {
- name: '失效服务包'
- }],
- current: 0,
- serviceList: [],
- miao: "",
- pageindex: 1,
- show: false,
- order_status:3
- }
- },
- methods: {
- change(index) {
- this.current = index;
- this.pageindex = 1
- this.serviceList = []
- this.getserviceList()
- },
- getserviceList: async function() {
- let num = 0
- if (this.current == 0) {
- num = 2
- this.order_status = 3
- } else if (this.current == 1) {
- num = 1
- this.order_status = 4
- } else {
- num = 3
- }
- console.log(num)
- let res = await this.$request.post("/api/v1/order/orderList", {
- page: this.pageindex,
- list_type: 1,
- product_type: 6,
- is_pack_expire: num,
- order_status:this.order_status
- })
- console.log(res)
- if (res.status == 0) {
- if (this.pageindex > res.data.last_page) {
- uni.showToast({
- title: "没有更多了",
- icon: "none"
- })
- } else {
- this.serviceList = this.serviceList.concat(res.data.data)
- this.pageindex++
- }
- }
- if (this.serviceList.length == 0) {
- this.show = true
- } else {
- this.show = false
- }
- },
- details(data, id) {
- let obj = {
- service_pack_id: id,
- guardian_name: data.guardian_name
- }
- console.log(data)
- uni.navigateTo({
- url: "choiceBox?data=" + JSON.stringify(obj)
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .container {
- width: 100%;
- height: 100%;
- background-color: #F6F6F6;
- }
- .card {
- width: 100%;
- height: auto;
- margin-top: 20rpx;
- // background-image: url(../../static/服务包.png);
- .taocan {
- width: 710rpx;
- height: 230rpx;
- position: relative;
- display: flex;
- border-radius: 10rpx;
- background: radial-gradient(circle at right top, transparent 15rpx, #ffffff 0) top left / 152rpx 51% no-repeat,
- radial-gradient(circle at right bottom, transparent 15rpx, #ffffff 0) bottom left /152rpx 51% no-repeat,
- radial-gradient(circle at left top, transparent 15rpx, #ffffff 0) top right /560rpx 51% no-repeat,
- radial-gradient(circle at left bottom, transparent 15rpx, #ffffff 0) bottom right /560rpx 51% no-repeat;
- filter: drop-shadow(0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.04));
- }
- }
- .tc_left {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 152rpx;
- text {
- font-size: 30rpx;
- font-weight: bold;
- }
- }
- .tc_right {
- display: flex;
- flex-direction: column;
- justify-content: center;
- width: 550rpx;
- padding: 0 20rpx;
- font-size: 26rpx;
- .text {
- padding: 10rpx 0rpx;
- width: 100%;
- }
- }
- </style>
|