123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <template>
- <view style="width: 100vw;height: auto;padding: 30rpx 20rpx;background-color: #f6f6f6;">
- <view style="width: 100%;height: 100%;">
- <text style="font-size: 30rpx;font-weight: bold;">官方套餐</text>
- <view v-for="(item,index) in serviceList" :key='index'>
- <view class="card">
- <view class="taocan" :data-id="item.id" @click="details">
- <view class="tc_left">
- <text style="text-align: center;">{{item.name}}</text>
- </view>
- <view class="tc_right">
- <view style="width: 100%;">
- <view class="text">{{item.intro}}</view>
- <view class="text">
- <text class="margin-right-sm text_style" v-for="(itm,idx) in item.label_texts" :key="idx">{{itm.name}}</text>
- </view>
- <view class="text">
- <text style="text-align: left;">时长:{{item.effective_days}}天</text>
- <text style="float: right;color: #FF4F61;font-weight: bold;">¥{{item.price/100}}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- mounted() {
- this.getservice()
- },
- data() {
- return {
- pageindex: 1,
- serviceList: []
- }
- },
- methods: {
- details(e) {
- uni.navigateTo({
- url: '/pages/service_packs/packs_details?id=' + e.currentTarget.dataset.id
- })
- },
- getservice: async function() {
- let res = await this.$request.post("/api/v1/ServicePack/servicePackList", {
- page: this.pageindex
- })
- 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++
- }
- }
- }
- }
- }
- </script>
- <style lang="scss">
- .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));
- }
- }
- .text_style{
- // display: flex;
- // justify-content: center;
- // align-items: center;
- text-align: center;
- display: inline-block;
- font-weight: 400;
- background-color: #E5F5FF;
- color: #0B73B9;
- width: 100rpx;
- height: 28rpx;
- font-size: 20rpx;
- border-radius: 10rpx;
- }
- .tc_left {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 152rpx;
- text {
- font-size: 30rpx;
- font-weight: bold;
- }
- }
- .tc_right {
- display: flex;
- align-items: center;
- width: 550rpx;
- padding: 0 20rpx;
- font-size: 26rpx;
- .text {
- padding: 10rpx 0rpx;
- width: 100%;
- }
- }
- </style>
|