Jelajahi Sumber

mingsu page

邹能昇 3 bulan lalu
induk
melakukan
f86c8e1f23

+ 0 - 103
nova-tourism/components/calendar/index.js

@@ -1,103 +0,0 @@
-// nova-tourism/components/calendar/index.js
-Component({
-    /**
-     * 组件的属性列表
-     */
-    properties: {
-        show:{
-            type:Boolean,
-            default: false
-        },
-        title: {
-            type: String,
-            value: '日期选择',
-        },
-        color: String,
-        formatter: null,
-        // defaultDate: {
-        //     type: null,
-        //     observer: function (val) {
-        //       this.setData({ currentDate: val });
-        //       this.scrollIntoView();
-        //     },
-        //   },
-    },
-    created: function () {
-        this.setData({
-          currentDate: this.getInitialDate(this.defaultDate),
-        });
-    },
-    /**
-     * 组件的初始数据
-     */
-    data: {
-        subtitle: '',
-        currentDate: null,
-        scrollIntoView: '',
-        startTime:'',
-        endTime: ''
-    },
-
-    /**
-     * 组件的方法列表
-     */
-    methods: {
-        getInitialDate: function(defaultDate){
-            let now = new Date()
-            let currentYear = now.getFullYear();
-            let currentMonth = now.getMonth()+1;
-            let currentDay = now.getDay();
-            // let months = 
-            if(!defaultDate){
-                
-            }
-        },
-        getInitialDate: function (defaultDate) {
-            var _this = this;
-            if (defaultDate === void 0) {// defaultDate 为undefined
-              defaultDate = null;
-            }
-            let {type,minDate,maxDate} = this.data;
-            var now = utils_1.getToday().getTime();
-            if (type === 'range') {
-              if (!Array.isArray(defaultDate)) {
-                defaultDate = [];
-              }
-              var _b = defaultDate || [],
-                startDay = _b[0],
-                endDay = _b[1];
-              var start = this.limitDateRange(
-                startDay || now,
-                minDate,
-                utils_1.getPrevDay(new Date(maxDate)).getTime()
-              );
-              var end = this.limitDateRange(
-                endDay || now,
-                utils_1.getNextDay(new Date(minDate)).getTime()
-              );
-              return [start, end];
-            }
-            if (type === 'multiple') {
-              if (Array.isArray(defaultDate)) {
-                return defaultDate.map(function (date) {
-                  return _this.limitDateRange(date);
-                });
-              }
-              return [this.limitDateRange(now)];
-            }
-            if (!defaultDate || Array.isArray(defaultDate)) {
-              defaultDate = now;
-            }
-            return this.limitDateRange(defaultDate);
-          },
-        emit: function (date) {
-            var getTime = function (date) {
-              return date instanceof Date ? date.getTime() : date;
-            };
-            this.setData({
-              currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),
-            });
-            this.$emit('select', utils_1.copyDates(date));
-          },
-    }
-})

+ 0 - 4
nova-tourism/components/calendar/index.json

@@ -1,4 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {}
-}

+ 0 - 72
nova-tourism/components/calendar/index.wxml

@@ -1,72 +0,0 @@
-
-<block wx:if="{{show}}">
-    <view class="nova-calendar">
-        <header
-          title="{{ title }}"
-          showTitle="{{ showTitle }}"
-          subtitle="{{ subtitle }}"
-          showSubtitle="{{ showSubtitle }}"
-          firstDayOfWeek="{{ firstDayOfWeek }}"
-          bind:click-subtitle="onClickSubtitle"
-        >
-          <slot name="title" slot="title"></slot>
-        </header>
-        
-        <scroll-view
-          class="van-calendar__body"
-          scroll-y
-          scroll-into-view="{{ scrollIntoView }}"
-        >
-          <month
-            wx:for="{{ computed.getMonths(minDate, maxDate) }}"
-            wx:key="index"
-            id="month{{ index }}"
-            class="month"
-            data-date="{{ item }}"
-            date="{{ item }}"
-            type="{{ type }}"
-            color="{{ color }}"
-            minDate="{{ minDate }}"
-            maxDate="{{ maxDate }}"
-            showMark="{{ showMark }}"
-            formatter="{{ formatter }}"
-            rowHeight="{{ rowHeight }}"
-            currentDate="{{ currentDate }}"
-            showSubtitle="{{ showSubtitle }}"
-            allowSameDay="{{ allowSameDay }}"
-            showMonthTitle="{{ index !== 0 || !showSubtitle }}"
-            firstDayOfWeek="{{ firstDayOfWeek }}"
-            bind:click="onClickDay"
-          />
-        </scroll-view>
-      
-        <view
-          class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
-        >
-          <slot name="footer"></slot>
-        </view>
-      
-        <view
-          class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
-        >
-          <van-button
-            wx:if="{{ showConfirm }}"
-            round
-            block
-            type="danger"
-            color="{{ color }}"
-            custom-class="van-calendar__confirm"
-            disabled="{{ computed.getButtonDisabled(type, currentDate) }}"
-            nativeType="text"
-            bind:click="onConfirm"
-          >
-            {{
-              computed.getButtonDisabled(type, currentDate)
-                ? confirmDisabledText
-                : confirmText
-            }}
-          </van-button>
-        </view>
-    </view>
-      
-</block>

+ 0 - 1
nova-tourism/components/calendar/index.wxss

@@ -1 +0,0 @@
-.van-calendar{display:flex;flex-direction:column;height:100%;height:var(--calendar-height,100%);background-color:#fff;background-color:var(--calendar-background-color,#fff)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:80%;height:var(--calendar-popup-height,80%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__footer{flex-shrink:0;padding:0 16px;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:36px!important;height:var(--calendar-confirm-button-height,36px)!important;margin:7px 0!important;margin:var(--calendar-confirm-button-margin,7px 0)!important;line-height:34px!important;line-height:var(--calendar-confirm-button-line-height,34px)!important}

+ 0 - 46
nova-tourism/components/list-card/index.js

@@ -1,46 +0,0 @@
-// nova-tourism/components/list-card/index.js
-Component({
-    /**
-     * 组件的属性列表
-     */
-    properties: {
-        info:{
-            type: Object,
-            default: {}
-        },
-        islink:{
-            type:Boolean,
-            default: false
-        },
-        url: {
-            type:String,
-            default:''
-        },
-        linkdesc:{
-            type:String,
-            default:''
-        },
-        activeColor:{
-          type: String,
-          value: ''
-        },
-    },
-
-    /**
-     * 组件的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 组件的方法列表
-     */
-    methods: {
-        navigate(){
-            wx.navigateTo({
-              url: this.data.url,
-            })
-        }
-    }
-})

+ 0 - 4
nova-tourism/components/list-card/index.json

@@ -1,4 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {}
-}

+ 0 - 57
nova-tourism/components/list-card/index.less

@@ -1,57 +0,0 @@
-@red:#F01740;
-@grey: #666666;
-@orange: #FF8936;
-
-.title {
-  font-weight: Medium;
-  font-size: 36rpx; 
-  color: #222222;
-}
-.text-large {
-  font-size: 36rpx; 
-}
-.text {
-  font-size: 30rpx;
-  word-break: keep-all;
-}
-.text-small {
-  font-size: 24rpx;
-  word-break: keep-all;
-}
-.grey {
-  color:#666666;
-}  
-.orange {
-  color:#FF8936;
-}
-
-
-.card {
-  display: flex;
-  // align-items: center;
-  justify-content: space-between;
-  .card-start{
-    width: 100rpx;
-    .start-image-wrapper {
-      width: 80rpx;
-      height: 80rpx;
-    }
-    
-    .start-image {
-      width: 100%;
-      height: 100%;
-      margin: 0 auto;
-      border-radius: 50%;
-    
-    }
-  }
-  .card-end {
-    display: flex;
-    align-items: center;
-    width: 120rpx;
-    text-align: right;
-  }
-  .card-content {
-    flex:1;
-  }
-}

+ 0 - 16
nova-tourism/components/list-card/index.wxml

@@ -1,16 +0,0 @@
-<view class="card">
-    <view class="card-start">
-        <view class="start-image-wrapper">
-            <image class="start-image" src="{{info.cover}}" />
-        </view>
-    </view>
-    <view class="card-content">
-        <view class="card-title text">{{info.storeName}}</view>
-        <view class="card-rate text-small orange" style="color: {{activeColor}};">{{info.score}}分</view>
-        <view class="card-count text-small grey">共{{info.count}}套房源</view>
-    </view>
-    <view class="card-end" bind:tap="navigate" wx:if="islink">
-        <text class=" text-small orange">{{linkdesc}}</text>
-        <van-icon name="arrow" class="orange"></van-icon>
-    </view>
-</view>

+ 0 - 1
nova-tourism/components/list-card/index.wxss

@@ -1 +0,0 @@
-.title{font-weight:Medium;font-size:36rpx;color:#222222}.text-large{font-size:36rpx}.text{font-size:30rpx;word-break:keep-all}.text-small{font-size:24rpx;word-break:keep-all}.grey{color:#666666}.orange{color:#FF8936}.card{display:flex;justify-content:space-between}.card .card-start{width:100rpx}.card .card-start .start-image-wrapper{width:80rpx;height:80rpx}.card .card-start .start-image{width:100%;height:100%;margin:0 auto;border-radius:50%}.card .card-end{display:flex;align-items:center;width:120rpx;text-align:right}.card .card-content{flex:1}

+ 0 - 1
nova-tourism/pages/homestay/homestay-order/index.json

@@ -5,7 +5,6 @@
     "van-divider": "@vant/weapp/divider/index",
     "cell-list": "../../../components/cell-list/index",
     "list-item": "../../../components/list-item/index",
-    "list-card": "../../../components/list-card/index",
     "van-popup": "@vant/weapp/popup/index",
     "van-button": "@vant/weapp/button/index",
     "van-calendar": "@vant/weapp/calendar/index",