Преглед на файлове

8/10优惠券系列打包测试

Foystor преди 3 години
родител
ревизия
370ca27536
променени са 100 файла, в които са добавени 126 реда и са изтрити 2469 реда
  1. 60 56
      src/components/index/personal.vue
  2. 21 29
      src/pages/coupons/index.vue
  3. 7 5
      src/pages/user_center/discountCard/index.vue
  4. 6 247
      src/pages/user_center/recharge/index.vue
  5. 1 2
      src/pages/user_center/recharge/main.json
  6. 31 4
      src/requests/coupons.js
  7. 0 1
      static/vant/action-sheet/index.d.ts
  8. 0 70
      static/vant/action-sheet/index.js
  9. 0 8
      static/vant/action-sheet/index.json
  10. 0 69
      static/vant/action-sheet/index.wxml
  11. 0 0
      static/vant/action-sheet/index.wxss
  12. 0 6
      static/vant/collapse-item/animate.d.ts
  13. 0 70
      static/vant/collapse-item/animate.js
  14. 0 1
      static/vant/collapse-item/index.d.ts
  15. 0 59
      static/vant/collapse-item/index.js
  16. 0 6
      static/vant/collapse-item/index.json
  17. 0 44
      static/vant/collapse-item/index.wxml
  18. 0 1
      static/vant/collapse-item/index.wxss
  19. 0 1
      static/vant/collapse/index.d.ts
  20. 0 44
      static/vant/collapse/index.js
  21. 0 3
      static/vant/collapse/index.json
  22. 0 3
      static/vant/collapse/index.wxml
  23. 0 1
      static/vant/collapse/index.wxss
  24. 0 1
      static/vant/dropdown-item/index.d.ts
  25. 0 111
      static/vant/dropdown-item/index.js
  26. 0 8
      static/vant/dropdown-item/index.json
  27. 0 48
      static/vant/dropdown-item/index.wxml
  28. 0 1
      static/vant/dropdown-item/index.wxss
  29. 0 5
      static/vant/dropdown-item/shared.d.ts
  30. 0 1
      static/vant/dropdown-item/shared.js
  31. 0 1
      static/vant/dropdown-menu/index.d.ts
  32. 0 112
      static/vant/dropdown-menu/index.js
  33. 0 3
      static/vant/dropdown-menu/index.json
  34. 0 23
      static/vant/dropdown-menu/index.wxml
  35. 0 16
      static/vant/dropdown-menu/index.wxs
  36. 0 1
      static/vant/dropdown-menu/index.wxss
  37. 0 1
      static/vant/grid-item/index.d.ts
  38. 0 62
      static/vant/grid-item/index.js
  39. 0 6
      static/vant/grid-item/index.json
  40. 0 27
      static/vant/grid-item/index.wxml
  41. 0 32
      static/vant/grid-item/index.wxs
  42. 0 0
      static/vant/grid-item/index.wxss
  43. 0 1
      static/vant/grid/index.d.ts
  44. 0 55
      static/vant/grid/index.js
  45. 0 3
      static/vant/grid/index.json
  46. 0 8
      static/vant/grid/index.wxml
  47. 0 13
      static/vant/grid/index.wxs
  48. 0 1
      static/vant/grid/index.wxss
  49. 0 1
      static/vant/index-bar/index.d.ts
  50. 0 248
      static/vant/index-bar/index.js
  51. 0 3
      static/vant/index-bar/index.json
  52. 0 22
      static/vant/index-bar/index.wxml
  53. 0 1
      static/vant/index-bar/index.wxss
  54. 0 1
      static/vant/nav-bar/index.d.ts
  55. 0 65
      static/vant/nav-bar/index.js
  56. 0 6
      static/vant/nav-bar/index.json
  57. 0 42
      static/vant/nav-bar/index.wxml
  58. 0 13
      static/vant/nav-bar/index.wxs
  59. 0 1
      static/vant/nav-bar/index.wxss
  60. 0 1
      static/vant/notice-bar/index.d.ts
  61. 0 123
      static/vant/notice-bar/index.js
  62. 0 6
      static/vant/notice-bar/index.json
  63. 0 39
      static/vant/notice-bar/index.wxml
  64. 0 15
      static/vant/notice-bar/index.wxs
  65. 0 1
      static/vant/notice-bar/index.wxss
  66. 0 1
      static/vant/panel/index.d.ts
  67. 0 9
      static/vant/panel/index.js
  68. 0 6
      static/vant/panel/index.json
  69. 0 19
      static/vant/panel/index.wxml
  70. 0 1
      static/vant/panel/index.wxss
  71. 0 1
      static/vant/progress/index.d.ts
  72. 0 51
      static/vant/progress/index.js
  73. 0 3
      static/vant/progress/index.json
  74. 0 20
      static/vant/progress/index.wxml
  75. 0 36
      static/vant/progress/index.wxs
  76. 0 1
      static/vant/progress/index.wxss
  77. 0 1
      static/vant/rate/index.d.ts
  78. 0 79
      static/vant/rate/index.js
  79. 0 6
      static/vant/rate/index.json
  80. 0 35
      static/vant/rate/index.wxml
  81. 0 1
      static/vant/rate/index.wxss
  82. 0 1
      static/vant/search/index.d.ts
  83. 0 78
      static/vant/search/index.js
  84. 0 6
      static/vant/search/index.json
  85. 0 50
      static/vant/search/index.wxml
  86. 0 1
      static/vant/search/index.wxss
  87. 0 1
      static/vant/share-sheet/index.d.ts
  88. 0 55
      static/vant/share-sheet/index.js
  89. 0 7
      static/vant/share-sheet/index.json
  90. 0 46
      static/vant/share-sheet/index.wxml
  91. 0 12
      static/vant/share-sheet/index.wxs
  92. 0 1
      static/vant/share-sheet/index.wxss
  93. 0 1
      static/vant/share-sheet/options.d.ts
  94. 0 14
      static/vant/share-sheet/options.js
  95. 0 3
      static/vant/share-sheet/options.json
  96. 0 20
      static/vant/share-sheet/options.wxml
  97. 0 14
      static/vant/share-sheet/options.wxs
  98. 0 1
      static/vant/share-sheet/options.wxss
  99. 0 1
      static/vant/sidebar-item/index.d.ts
  100. 0 29
      static/vant/sidebar-item/index.js

+ 60 - 56
src/components/index/personal.vue

@@ -78,32 +78,31 @@
       overlay
       z-index="99"
     >
-      <div class="quan_container">
-        <van-row gutter="10">
-          <van-col span="14" offset="1">
-            <div class="padding-top-sm margin-bottom-sm">
-              <text class="title">
+      <div class="quan_container padding-tb-xl">
+        <view class=" margin-top-xl flex justify-center">
+              <text class="title" >
                 水母会员次卡体验券1张
               </text>
-                <text class="text-xs ">
+              
+              </view>
+        <view class="flex justify-center">
+                <text class="text-xs">
                 {{userinfo.certainTime}}&nbsp;当天领取有效
               </text>
-            </div>
-            
-            <view class="padding-tb">
-              <text class="time">
+            </view>
+
+            <view class="flex justify-center margin-top-xl padding-top-xs">
+                <text class="time margin-right-xs">
                 10
               </text>
-              <text class="time_text">
+              <text class="time_text margin-top-xs">
                 分钟
               </text>
             </view>
-          </van-col>
-          <van-col span="5" offset="4" class="" @click="get_ticket">
-            <view class="get_ticket_text">领取</view>
-          </van-col>
-        </van-row>
-
+            
+            <view class="flex justify-center margin-top-xl">
+              <button class="cu-btn get_btn text-white" @click="get_ticket">领取</button>
+            </view>
 
       </div>
     </van-popup>
@@ -132,7 +131,7 @@
 
 <script>
 import { userUpdateLoginTime } from "../../requests/user";
-import { couponReceiveFirst } from "../../requests/coupons";
+import { couponReceiveFirst, couponReceiveFirstID } from "../../requests/coupons";
 import Toast from "../../../static/vant/toast/toast";
 import { reload_userinfo } from "../../utils/user";
 import user_store from "@/store/index";
@@ -158,23 +157,26 @@ export default {
         $this.receive += 1;
         console.log($this.receive);
         $this.first = false;
-        couponReceiveFirst().then((res) => {
-          let $res = res.data;
-          if ($res.code == 0) {
-            $this.first = false;
-            userUpdateLoginTime().then((res) => {
-              let $res = res.data;
-              $this.userinfo["login_time"] = $res.data;
-              $this.$store = user_store.setters.set_userinfo($this.userinfo);
-
-              wx.setStorageSync("is_first", false);
-              reload_userinfo($this);
-            });
-            Toast.success($res.errmsg);
-          } else {
-            Toast.fail($res.errmsg);
-          }
-        });
+        let ID
+        couponReceiveFirstID().then((res)=>{
+          ID = res.data.data.coupon_category_id
+          couponReceiveFirst(ID).then((res) => {
+            let $res = res.data;
+            if ($res.code == 0) {
+               $this.first = false;
+               userUpdateLoginTime().then((res) => {
+                let $res = res.data;
+                $this.userinfo["login_time"] = $res.data;
+                $this.$store = user_store.setters.set_userinfo($this.userinfo);
+                wx.setStorageSync("is_first", false);
+                reload_userinfo($this);
+              });
+              Toast.success($res.errmsg);
+            } else {
+               Toast.fail($res.errmsg);
+            }
+          });
+        })
       }
     },
     //修改第一次登录状态
@@ -231,6 +233,11 @@ export default {
 
 
 <style scoped>
+@font-face {
+  font-family: Microsoft YaHei;
+  src: url("https://img.shuimuai.com/MSYH.TTC");
+}
+
 .userinfoYellow {
   background-image: url("https://img.shuimuai.com/huiyuankadiban.png");
   background-position: center;
@@ -242,7 +249,6 @@ export default {
 
 .userinfoGrey {
   background-image: url("https://img.shuimuai.com/pic_grey.png");
-  /* background-image: url("https://img.shuimuai.com/huiyuankadiban.png"); */
   background-position: center;
   background-size: 100% 100%;
   width: 99%;
@@ -273,34 +279,35 @@ export default {
 }
 
 .quan_container {
-  background-image: url("https://img.shuimuai.com/web/index_item_quan.png");
+  background-image: url("https://img.shuimuai.com/pic_getCoupon.png");
   background-position: center;
   background-size: 100% 100%;
-  width: 340px;
-  height: 115px;
+  width: 270px;
+  height: 235px;
 }
 
 /*标题*/
 .quan_container .title {
   font-size: 15px;
-  font-weight: 400;
-  color: #030000;
-  line-height: 24px;
+  font-weight: bold;
+  color: #222222;
+  font-family: Microsoft YaHei;
+  margin: 6px 0 -5px;
 }
 
-/*标题*/
+/*标题*/
 .quan_container .sub-title {
   font-size: 10px;
   font-weight: 400;
+  font-family: Microsoft YaHei;
   color: #030000;
-  line-height: 24px;
 }
 
 /*分钟数*/
 .quan_container .time {
   font-size: 36px;
-  font-weight: 400;
-  color: #030000;
+  font-weight: bold;
+  color: #6858C4;
   line-height: 24px;
 }
 
@@ -308,20 +315,17 @@ export default {
 .quan_container .time_text {
   font-size: 12px;
   font-weight: 400;
-  color: #030000;
+  color: #6858C4;
   line-height: 24px;
-  margin-left: -5px;
 }
 
-/*领取二字*/
-.quan_container .get_ticket_text {
-  font-size: 18px;
-  font-weight: 400;
-  color: #ffffff;
-  line-height: 24px;
-  margin: 45px 0px;
+/* 领取按钮 */
+.get_btn{
+  width: 119px;
+  height: 31px;
+  background: #6858C4;
+  border-radius: 15px;
 }
-
 /*弹窗模块*/
 .err_container {
   width: 260px;

+ 21 - 29
src/pages/coupons/index.vue

@@ -6,18 +6,18 @@
           <text class="padding-left">共{{rec_list.length}}张</text>
 
           <div v-for="(item,index) in rec_list" :key="index">
-            <div class="quan_container" >
+            <div class="quan_container container" >
             <van-row gutter="10">
               <van-col span="15" offset="1">
                 <div class="padding-top">
                   <text class="title">{{ item.name }}</text>
                 </div>
                 <div v-if="item.validity_time.type==0"> 
-                  <text class="subtitle text-sm">{{ item.validity_time.start_time }} 至 {{ item.validity_time.end_time }} 领取有效</text>
+                  <text class="subtitle text-sm">{{ item.validity_time.start_time_format }} 至 {{ item.validity_time.end_time_format }} 领取有效</text>
                 </div>
                 
                 <div v-if="item.validity_time.type==1">
-                  <text class="subtitle text-sm">{{ item.validity_time.time }} 之前领取有效</text>
+                  <text class="subtitle text-sm">{{ item.validity_time.time_format }} 之前领取有效</text>
                 </div>
  
                 <van-row gutter="9"> 
@@ -62,7 +62,7 @@
                </van-row>
 
               </van-col>
-              <van-col span="5" offset="3" class="" @click="get_ticket(item.coupon_category_id)">
+              <van-col span="5" offset="3" class="" @click="get_ticket(item)">
                 <view class="get_ticket_text">领取</view>
               </van-col>
             </van-row>
@@ -90,15 +90,15 @@
           <text class="padding-left">共{{cp_list.length}}张</text>
 
           <div v-for="(item,index) in cp_list" :key="index">
-            <div class="quan_container_get">
+            <div class="quan_container_get container">
             <van-row gutter="10">
               <van-col span="15" offset="1">
-                <div class="padding-top">
+                <div :class="item.type==1?'margin-bottom padding-top':'padding-top'">
                   <text class="title">{{ item.name }}</text>
                 </div>
 
                 <div>
-                  <text class="subtitle text-sm">{{ item.start_time }} 至 {{ item.end_time }} 可使用</text>
+                  <text v-if="!(item.type==1)" class="subtitle text-sm">{{ item.start_time }} 至 {{ item.end_time }} 可使用</text>
                 </div>
                
                 <van-row gutter="9"> 
@@ -133,7 +133,7 @@
                     </view>
                   </van-col> 
 
-                  <van-col span="7" >
+                  <van-col span="7">
                     <view class="margin-top-xl" @click="ruleShow(item.coupon_category_id)">
                       <text class="text-sm text-grey rule">使用规则</text>
                     </view>
@@ -142,7 +142,8 @@
 
               </van-col>
               <van-col span="5" offset="2">
-                <view class="get_ticket_text">已领取</view>
+                <view class="get_ticket_text" v-if="item.status==2">已使用</view>
+                <view class="get_ticket_text" v-else>已领取</view>
               </van-col>
             </van-row>
             </div>
@@ -169,7 +170,7 @@
           <text class="padding-left">共{{ov_list.length}}张</text>
 
           <div v-for="(item,index) in ov_list" :key="index">
-            <div class="quan_container_gray">
+            <div class="quan_container_gray container">
             <van-row gutter="10">
               <van-col span="15" offset="1">
                 <div class="padding-top">
@@ -301,15 +302,15 @@ export default {
         let $res = res.data;
         $this.rec_list = $res.data.list;
         $this.rec_list.forEach(($val, $index) => {
-          $val.validity_time['end_time'] = timestampTwoNum($val.validity_time['end_time'])
-          $val.validity_time['start_time'] = timestampTwoNum($val.validity_time['start_time'])
-          $val.validity_time['time'] = timestampTwoNum($val.validity_time['time'])
+          $val.validity_time['end_time_format'] = timestampTwoNum($val.validity_time['end_time'])
+          $val.validity_time['start_time_format'] = timestampTwoNum($val.validity_time['start_time'])
+          $val.validity_time['time_format'] = timestampTwoNum($val.validity_time['time'])
         })
       })
     },
     //  领取优惠券
-    get_ticket($id) {
-      couponReceive($id).then((res) => {
+    get_ticket($item) {
+      couponReceive($item).then((res) => {
         let $res = res.data;
         if ($res.code == 0) {
           Toast.success({
@@ -354,8 +355,7 @@ export default {
 
 <style scoped>
 
-.quan_container {
-  background-image: url("https://img.shuimuai.com/web/index_item_quan.png");
+.container{
   background-position: center;
   background-size: 100% 100%;
   width: 340px;
@@ -363,22 +363,16 @@ export default {
   margin: 3px auto;
 }
 
+.quan_container {
+  background-image: url("https://img.shuimuai.com/web/index_item_quan.png");
+}
+
 .quan_container_get{
   background-image: url("https://img.shuimuai.com/discount_get.png");
-  background-position: center;
-  background-size: 100% 100%;
-  width: 340px;
-  height: 115px;
-  margin: 3px auto;
 }
 
 .quan_container_gray {
   background-image: url("https://img.shuimuai.com/web/quan_huise.png");
-  background-position: center;
-  background-size: 100% 100%;
-  width: 340px;
-  height: 115px;
-  margin: 3px auto;
 }
 
 /*标题*/
@@ -436,6 +430,4 @@ export default {
   line-height: 18px;
   margin-bottom: 26px
 }
-.quan_list {
-}
 </style>

+ 7 - 5
src/pages/user_center/discountCard/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <div class="quan_list">
+        <div class="quan_list ">
           <div  v-for="(item,index) in couponData" :key="index">
             <div class="quan_container shadow bg-white">
 
@@ -44,7 +44,7 @@
 
                     <van-col span="4" offset="6" >
                       <text class="text-sm text-grey rule" @click="ruleShow(item.coupon_id)">使用规则</text>
-                    </van-col>  
+                    </van-col> 
                 </van-row>
              
             </van-row>
@@ -62,7 +62,8 @@
             </view>
           </view>
           
-          </div>       
+          </div>   
+          <div style="height: 5rem;"></div>    
         </div>
         <view class="cu-bar tabbar bg-white shadow foot btmBar">
            <view class='margin-left'>已优惠
@@ -77,6 +78,7 @@
 <script>
 let $this
 let add
+import { payCoupon } from "../../../requests/coupons";
 import pay from '../../../utils/pay.js'
 import { formatTimeAnother } from "../../../utils/index.js";
 export default {
@@ -96,8 +98,8 @@ export default {
        $this.radio = $params.coupon.coupon_id
        add = options.isAdd * 1
        let price = $params.total_price + add
-       this.$fly.get("https://testapi.shuimuai.com/coupon/choose-coupon?price=" + price +"&goods_id=" +$params.goods_id)
-           .then((res)=>{
+       $params["priceHere"] = price
+       payCoupon($params).then((res)=>{
                console.log('优惠券',res.data.data)
                this.couponData = res.data.data
                this.couponData.forEach(($val, $index) => {

+ 6 - 247
src/pages/user_center/recharge/index.vue

@@ -204,113 +204,6 @@
       </view>
     </div>
 
-    <!--    确认订单 弹窗-->
-    <van-popup
-      :show="order_confirm"
-      @close="close_order_confirm"
-      round
-      closeable
-    >
-      <div class="order_confirm padding">
-        <view>
-          <text class="text-sm text-gray">已选商品&emsp;水母星球-{{ selection_card.goods_name }}</text>
-          <br>
-        </view>
-        <view>
-          <text class="text-sm text-gray">商品价格&emsp;{{ selection_card.price }}元</text>
-          <br>
-
-        </view>
-        <view>
-          <text class="text-sm text-gray">支付方式&emsp;微信支付</text>
-          <br>
-
-        </view>
-
-        <view v-if="selection_card.goods_id < 4">
-          <text class="text-lg text-red" style="font-weight: bold;">折扣&emsp;{{ selection_card.discount * 10 }}折</text>
-          <br>
-        </view>
-        <view class="order_price_container">
-          <text class="text-sm text-gray">实付(元)&emsp;</text>
-          <text class="mine_min">{{ selection_card.total_price }}</text>
-        </view>
-        <button
-          class="cu-btn bg-primary lg text-white recharge_button"
-          @click="success_pay"
-          :disabled="btn_disabled"
-        >立即充值</button>
-      </div>
-    </van-popup>
-
-    <!--    充值失败-->
-    <van-popup
-      :show="err_show"
-      @close="close_err_pop"
-      round
-      :close-on-click-overlay="false"
-    >
-      <div class="err_container flex flex-direction align-center justify-around">
-        <view>
-          <text class="title">
-            充值失败,请再次尝试
-          </text>
-        </view>
-        <img
-          src="https://img.shuimuai.com/web/sign_notimeJfish.png"
-          class="err_img"
-          alt=""
-        >
-        <div class="button_group flex justify-around">
-          <button
-            class="cu-btn bg-gray text-white lg"
-            @click="close_err_pop"
-          >取消支付</button>
-          <button
-            class="cu-btn  bg-primary text-white lg"
-            @click="repay"
-            :disabled="btn_disabled"
-          >再次支付</button>
-        </div>
-      </div>
-    </van-popup>
-
-    <!--    充值成功-->
-    <van-popup
-      :show="success_show"
-      @close="close_success_pop"
-      round
-      :close-on-click-overlay="false"
-    >
-      <div class="err_container flex flex-direction align-center justify-around ext_container">
-        <img
-          src="https://img.shuimuai.com/web/boyya.png"
-          class="boy_logo"
-          alt=""
-        >
-        <view>
-          <text class="title">
-            充值成功
-          </text>
-        </view>
-        <view
-          class="sub-title"
-          v-if="selection_card.goods_id < 4"
-        >
-          <text class="text-gray">
-            {{ selection_card.goods_name }},请到实体店店员处领取邀请卡
-          </text>
-        </view>
-        <div class="button_group flex justify-around">
-          <!--          <button class="cu-btn bg-gray text-white lg" @click="close_success_pop">以后再填</button>-->
-          <!--          <button class="cu-btn  bg-primary text-white lg" @click="to_write_address">填写地址</button>-->
-          <button
-            class="cu-btn  bg-primary text-white lg"
-            @click="to_index"
-          >充值成功</button>
-        </div>
-      </div>
-    </van-popup>
   </div>
 </template>
 
@@ -325,10 +218,7 @@ export default {
   data() {
     return {
       order: {},
-      order_confirm: false,
       card_action_show: 0,
-      err_show: false,
-      success_show: false,
       //时间卡列表
       time_cards: [],
       //次卡列表
@@ -337,26 +227,16 @@ export default {
       userinfo: {},
       //  选中的充值卡
       selection_card: {},
-      //支付信息
-      payment_info: {},
-      //订单编号
-      order_sn: "",
-      btn_disabled: false,
     };
   },
   watch: {},
   methods: {
-    //弹出确认订单
-    // to_confirm($item) {
-    //   $this.order_confirm = true;
-    //   $item["total_price"] = ($item.price * $item.discount).toFixed(2);
-    //   $this.selection_card = $item;
-    // },
+    //确认订单
     to_confirm($item) {
       console.log("data",$item)
       //实付
       if($item.coupon.type==3){
-        $item["total_price"] = $item.price*$item.coupon.discount
+        $item["total_price"] = Math.round($item.price*$item.coupon.discount*100)/100
       }else if($item.coupon.type==2){
          $item["total_price"] = $item.price-$item.coupon.reduce
       }else if($item.coupon.type==4){
@@ -366,7 +246,7 @@ export default {
       }
       //减多少
       if($item.coupon.type==3){
-        $item["reduce"] = $item.price-$item.price*$item.coupon.discount
+        $item["reduce"] = Math.round(($item.price-$item.price*$item.coupon.discount)*100)/100
       }else if($item.coupon.type==2){
          $item["reduce"] = $item.coupon.reduce
       }else if($item.coupon.type==4){
@@ -389,127 +269,6 @@ export default {
         url: "/pages/user_center/confirmPay/main?data=" + data,
       });
     },
-    //关闭确认订单
-    close_order_confirm() {
-      $this.order_confirm = false;
-    },
-    //关闭充值失败窗口
-    close_err_pop() {
-      $this.err_show = false;
-    },
-    //取消充值
-    cancel_recharge() {
-      $this.close_err_pop();
-
-      deleteOrder($this.order_sn).then(
-        (res) => {
-          let $res = res.data;
-        },
-        (err) => {
-          console.log("删除订单错误", err);
-        }
-      );
-    },
-    // 打开充值成功窗口
-    open_success_window() {
-      $this.success_show = true;
-    },
-    //关闭充值成功窗口
-    close_success_pop() {
-      $this.success_show = false;
-    },
-    //再次付款
-    repay() {
-      $this.btn_disabled = true;
-      let $payment = $this.payment_info;
-      wx.requestPayment({
-        timeStamp: $payment.timeStamp,
-        nonceStr: $payment.nonceStr,
-        package: $payment.package,
-        signType: $payment.signType,
-        paySign: $payment.sign,
-        success(res) {
-          //支付成功
-          console.log("success支付成功调用:", res);
-          //关闭确认订单窗口
-          $this.close_order_confirm();
-          $this.close_success_pop();
-          //打开成功充值窗口
-          $this.open_success_window();
-        },
-        fail(res) {
-          console.log("success支付失败调用:", res);
-
-          $this.cancel_recharge();
-          $this.close_order_confirm();
-          $this.err_show = true;
-        },
-        complete() {
-          $this.btn_disabled = false;
-        },
-      });
-    },
-    to_index() {
-      mpvue.reLaunch({
-        url: "/pages/index/main",
-      });
-    },
-    // 成功支付
-    success_pay() {
-      $this.btn_disabled = true;
-
-      // 支付成功后得回调方法
-      let $params = {
-        goods_id: $this.selection_card.goods_id,
-        buy_num: 1,
-      };
-
-      wx.login({
-        success(res1) {
-          console.log("微信登陆", res1.code);
-          let $code = res1.code;
-          $params["js_code"] = $code;
-          createOrder($params).then(
-            (res) => {
-              let $data = res.data;
-              let $payment = $data.data;
-              $this.order_sn = $payment["sn"];
-              $this.payment_info = $payment;
-              wx.requestPayment({
-                timeStamp: $payment.timeStamp,
-                nonceStr: $payment.nonceStr,
-                package: $payment.package,
-                signType: $payment.signType,
-                paySign: $payment.sign,
-                success(res) {
-                  //支付成功
-                  console.log("success", res);
-                  //关闭确认订单窗口
-                  $this.close_order_confirm();
-                  $this.close_success_pop();
-                  //打开成功充值窗口
-                  $this.open_success_window();
-                },
-                fail(res) {
-                  console.log("fail", res);
-                  $this.cancel_recharge();
-                  $this.close_order_confirm();
-                  $this.err_show = true;
-                },
-                complete() {
-                  $this.btn_disabled = false;
-                },
-              });
-            },
-            (err) => {
-              console.log(err);
-            }
-          );
-        },
-      });
-
-      //  接收回调方法后弹出支付成功
-    },
     //跳转填写地址
     to_write_address() {
       mpvue.navigateTo({
@@ -553,6 +312,9 @@ export default {
     $this.get_card_list();
     $this.userinfo = wx.getStorageSync("userinfo");
   },
+  onShow(){
+    $this.get_card_list();
+  },
   created() {
     $this = this;
   },
@@ -565,9 +327,6 @@ export default {
 </script>
 
 <style scoped>
-.uc_recharge_container {
-  /* padding: 0px 10px; */
-}
 .mine {
   width: 330px;
   height: 84px;

+ 1 - 2
src/pages/user_center/recharge/main.json

@@ -1,7 +1,6 @@
 {
   "usingComponents": {
     "van-row": "../../../static/vant/row/index",
-    "van-col": "../../../static/vant/col/index",
-    "van-popup": "../../../static/vant/popup/index"
+    "van-col": "../../../static/vant/col/index"
   }
 }

+ 31 - 4
src/requests/coupons.js

@@ -27,19 +27,46 @@ export function getOverdueCouponList($limit = 0) {
 }
 
 //待领取优惠券
-export function couponReceive($id) {
+export function couponReceive($item) {
   let $params = {}
-  $params['coupon_category_id'] = $id
+  $params['coupon_category_id'] = $item.coupon_category_id
+  $params['start_time'] = $item.validity_time.start_time
+  $params['end_time'] = $item.validity_time.end_time
   $params['access_token'] = wx.getStorageSync('token')
   return fly.post('coupon/coupon-receive', $params)
 }
 
+//获取首次登录领取优惠券ID
+export function couponReceiveFirstID() {
+  let $params = {
+    "access_token": wx.getStorageSync('token'),
+  }
+  return fly.post('coupon/member-coupon', $params)
+}
+
 //首次登录领取优惠券
-export function couponReceiveFirst() {
+export function couponReceiveFirst($id) {
   let $params = {
     "access_token": wx.getStorageSync('token'),
-    "coupon_category_id": 1,
+    "coupon_category_id": $id,
   }
   return fly.post('coupon/coupon-receive', $params)
 }
 
+//支付时优惠券
+export function payCoupon($item) {
+  let $params = {
+    "access_token": wx.getStorageSync('token'),
+    "price": $item.priceHere,
+    "goods_id": $item.goods_id,
+  }
+  return fly.post('coupon/choose-coupon', $params)
+}
+
+//外发卡券信息
+// export function outputCoupon() {
+//   let $params = {
+//     "access_token": wx.getStorageSync('token'),
+//   }
+//   return fly.post('coupon/out-list', $params)
+// }

+ 0 - 1
static/vant/action-sheet/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 70
static/vant/action-sheet/index.js

@@ -1,70 +0,0 @@
-import { VantComponent } from '../common/component';
-import { button } from '../mixins/button';
-VantComponent({
-  mixins: [button],
-  props: {
-    show: Boolean,
-    title: String,
-    cancelText: String,
-    description: String,
-    round: {
-      type: Boolean,
-      value: true,
-    },
-    zIndex: {
-      type: Number,
-      value: 100,
-    },
-    actions: {
-      type: Array,
-      value: [],
-    },
-    overlay: {
-      type: Boolean,
-      value: true,
-    },
-    closeOnClickOverlay: {
-      type: Boolean,
-      value: true,
-    },
-    closeOnClickAction: {
-      type: Boolean,
-      value: true,
-    },
-    safeAreaInsetBottom: {
-      type: Boolean,
-      value: true,
-    },
-  },
-  methods: {
-    onSelect(event) {
-      const { index } = event.currentTarget.dataset;
-      const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data;
-      const item = actions[index];
-      if (item) {
-        this.$emit('select', item);
-        if (closeOnClickAction) {
-          this.onClose();
-        }
-        if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
-          wx.getUserProfile({
-            desc: item.getUserProfileDesc || '  ',
-            complete: (userProfile) => {
-              this.$emit('getuserinfo', userProfile);
-            },
-          });
-        }
-      }
-    },
-    onCancel() {
-      this.$emit('cancel');
-    },
-    onClose() {
-      this.$emit('close');
-    },
-    onClickOverlay() {
-      this.$emit('click-overlay');
-      this.onClose();
-    },
-  },
-});

+ 0 - 8
static/vant/action-sheet/index.json

@@ -1,8 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-icon": "../icon/index",
-    "van-popup": "../popup/index",
-    "van-loading": "../loading/index"
-  }
-}

+ 0 - 69
static/vant/action-sheet/index.wxml

@@ -1,69 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-
-<van-popup
-  show="{{ show }}"
-  position="bottom"
-  round="{{ round }}"
-  z-index="{{ zIndex }}"
-  overlay="{{ overlay }}"
-  custom-class="van-action-sheet"
-  safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
-  close-on-click-overlay="{{ closeOnClickOverlay }}"
-  bind:close="onClickOverlay"
->
-  <view wx:if="{{ title }}" class="van-action-sheet__header">
-    {{ title }}
-    <van-icon
-      name="cross"
-      custom-class="van-action-sheet__close"
-      bind:click="onClose"
-    />
-  </view>
-  <view wx:if="{{ description }}" class="van-action-sheet__description van-hairline--bottom">
-    {{ description }}
-  </view>
-  <view wx:if="{{ actions && actions.length }}">
-    <!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
-    <button
-      wx:for="{{ actions }}"
-      wx:key="index"
-      open-type="{{ item.disabled || item.loading || (canIUseGetUserProfile && item.openType === 'getUserInfo') ? '' : item.openType }}"
-      style="{{ item.color ? 'color: ' + item.color : '' }}"
-      class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}"
-      hover-class="van-action-sheet__item--hover"
-      data-index="{{ index }}"
-      bindtap="{{ item.disabled || item.loading ? '' : 'onSelect' }}"
-      bindgetuserinfo="onGetUserInfo"
-      bindcontact="onContact"
-      bindgetphonenumber="onGetPhoneNumber"
-      binderror="onError"
-      bindlaunchapp="onLaunchApp"
-      bindopensetting="onOpenSetting"
-      lang="{{ lang }}"
-      session-from="{{ sessionFrom }}"
-      send-message-title="{{ sendMessageTitle }}"
-      send-message-path="{{ sendMessagePath }}"
-      send-message-img="{{ sendMessageImg }}"
-      show-message-card="{{ showMessageCard }}"
-      app-parameter="{{ appParameter }}"
-    >
-      <block wx:if="{{ !item.loading }}">
-        {{ item.name }}
-        <view wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</view>
-      </block>
-      <van-loading wx:else custom-class="van-action-sheet__loading" size="22px" />
-    </button>
-  </view>
-  <slot />
-  <block wx:if="{{ cancelText }}">
-    <view class="van-action-sheet__gap" />
-    <view
-      class="van-action-sheet__cancel"
-      hover-class="van-action-sheet__cancel--hover"
-      hover-stay-time="70"
-      bind:tap="onCancel"
-    >
-      {{ cancelText }}
-    </view>
-  </block>
-</van-popup>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
static/vant/action-sheet/index.wxss


+ 0 - 6
static/vant/collapse-item/animate.d.ts

@@ -1,6 +0,0 @@
-/// <reference types="miniprogram-api-typings" />
-export declare function setContentAnimate(
-  context: WechatMiniprogram.Component.TrivialInstance,
-  expanded: boolean,
-  mounted: boolean
-): void;

+ 0 - 70
static/vant/collapse-item/animate.js

@@ -1,70 +0,0 @@
-import { canIUseAnimate } from '../common/version';
-import { getRect } from '../common/utils';
-function useAnimate(context, expanded, mounted, height) {
-  const selector = '.van-collapse-item__wrapper';
-  if (expanded) {
-    context.animate(
-      selector,
-      [
-        { height: 0, ease: 'ease-in-out', offset: 0 },
-        { height: `${height}px`, ease: 'ease-in-out', offset: 1 },
-        { height: `auto`, ease: 'ease-in-out', offset: 1 },
-      ],
-      mounted ? 300 : 0,
-      () => {
-        context.clearAnimation(selector);
-      }
-    );
-    return;
-  }
-  context.animate(
-    selector,
-    [
-      { height: `${height}px`, ease: 'ease-in-out', offset: 0 },
-      { height: 0, ease: 'ease-in-out', offset: 1 },
-    ],
-    300,
-    () => {
-      context.clearAnimation(selector);
-    }
-  );
-}
-function useAnimation(context, expanded, mounted, height) {
-  const animation = wx.createAnimation({
-    duration: 0,
-    timingFunction: 'ease-in-out',
-  });
-  if (expanded) {
-    if (height === 0) {
-      animation.height('auto').top(1).step();
-    } else {
-      animation
-        .height(height)
-        .top(1)
-        .step({
-          duration: mounted ? 300 : 1,
-        })
-        .height('auto')
-        .step();
-    }
-    context.setData({
-      animation: animation.export(),
-    });
-    return;
-  }
-  animation.height(height).top(0).step({ duration: 1 }).height(0).step({
-    duration: 300,
-  });
-  context.setData({
-    animation: animation.export(),
-  });
-}
-export function setContentAnimate(context, expanded, mounted) {
-  getRect(context, '.van-collapse-item__content')
-    .then((rect) => rect.height)
-    .then((height) => {
-      canIUseAnimate()
-        ? useAnimate(context, expanded, mounted, height)
-        : useAnimation(context, expanded, mounted, height);
-    });
-}

+ 0 - 1
static/vant/collapse-item/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 59
static/vant/collapse-item/index.js

@@ -1,59 +0,0 @@
-import { VantComponent } from '../common/component';
-import { useParent } from '../common/relation';
-import { setContentAnimate } from './animate';
-VantComponent({
-  classes: ['title-class', 'content-class'],
-  relation: useParent('collapse'),
-  props: {
-    name: null,
-    title: null,
-    value: null,
-    icon: String,
-    label: String,
-    disabled: Boolean,
-    clickable: Boolean,
-    border: {
-      type: Boolean,
-      value: true,
-    },
-    isLink: {
-      type: Boolean,
-      value: true,
-    },
-  },
-  data: {
-    expanded: false,
-  },
-  mounted() {
-    this.updateExpanded();
-    this.mounted = true;
-  },
-  methods: {
-    updateExpanded() {
-      if (!this.parent) {
-        return;
-      }
-      const { value, accordion } = this.parent.data;
-      const { children = [] } = this.parent;
-      const { name } = this.data;
-      const index = children.indexOf(this);
-      const currentName = name == null ? index : name;
-      const expanded = accordion
-        ? value === currentName
-        : (value || []).some((name) => name === currentName);
-      if (expanded !== this.data.expanded) {
-        setContentAnimate(this, expanded, this.mounted);
-      }
-      this.setData({ index, expanded });
-    },
-    onClick() {
-      if (this.data.disabled) {
-        return;
-      }
-      const { name, expanded } = this.data;
-      const index = this.parent.children.indexOf(this);
-      const currentName = name == null ? index : name;
-      this.parent.switch(currentName, !expanded);
-    },
-  },
-});

+ 0 - 6
static/vant/collapse-item/index.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-cell": "../cell/index"
-  }
-}

+ 0 - 44
static/vant/collapse-item/index.wxml

@@ -1,44 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-
-<view class="van-collapse-item custom-class {{ index !== 0 ? 'van-hairline--top' : '' }}">
-  <van-cell
-    title="{{ title }}"
-    title-class="title-class"
-    icon="{{ icon }}"
-    value="{{ value }}"
-    label="{{ label }}"
-    is-link="{{ isLink }}"
-    clickable="{{ clickable }}"
-    border="{{ border && expanded }}"
-    class="{{ utils.bem('collapse-item__title', { disabled, expanded }) }}"
-    right-icon-class="van-cell__right-icon"
-    custom-class="van-cell"
-    hover-class="van-cell--hover"
-    bind:click="onClick"
-  >
-    <slot
-      name="title"
-      slot="title"
-    />
-    <slot
-      name="icon"
-      slot="icon"
-    />
-    <slot name="value" />
-    <slot
-      name="right-icon"
-      slot="right-icon"
-    />
-  </van-cell>
-  <view
-    class="{{ utils.bem('collapse-item__wrapper') }}"
-    style="height: 0;"
-    animation="{{ animation }}"
-  >
-    <view
-      class="van-collapse-item__content content-class"
-    >
-      <slot />
-    </view>
-  </view>
-</view>

+ 0 - 1
static/vant/collapse-item/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;transition:-webkit-transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s),-webkit-transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c8c9cc!important;color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important;background-color:var(--white,#fff)!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__content{padding:15px;padding:var(--collapse-item-content-padding,15px);color:#969799;color:var(--collapse-item-content-text-color,#969799);font-size:13px;font-size:var(--collapse-item-content-font-size,13px);line-height:1.5;line-height:var(--collapse-item-content-line-height,1.5);background-color:#fff;background-color:var(--collapse-item-content-background-color,#fff)}

+ 0 - 1
static/vant/collapse/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 44
static/vant/collapse/index.js

@@ -1,44 +0,0 @@
-import { VantComponent } from '../common/component';
-import { useChildren } from '../common/relation';
-VantComponent({
-  relation: useChildren('collapse-item'),
-  props: {
-    value: {
-      type: null,
-      observer: 'updateExpanded',
-    },
-    accordion: {
-      type: Boolean,
-      observer: 'updateExpanded',
-    },
-    border: {
-      type: Boolean,
-      value: true,
-    },
-  },
-  methods: {
-    updateExpanded() {
-      this.children.forEach((child) => {
-        child.updateExpanded();
-      });
-    },
-    switch(name, expanded) {
-      const { accordion, value } = this.data;
-      const changeItem = name;
-      if (!accordion) {
-        name = expanded
-          ? (value || []).concat(name)
-          : (value || []).filter((activeName) => activeName !== name);
-      } else {
-        name = expanded ? name : '';
-      }
-      if (expanded) {
-        this.$emit('open', changeItem);
-      } else {
-        this.$emit('close', changeItem);
-      }
-      this.$emit('change', name);
-      this.$emit('input', name);
-    },
-  },
-});

+ 0 - 3
static/vant/collapse/index.json

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

+ 0 - 3
static/vant/collapse/index.wxml

@@ -1,3 +0,0 @@
-<view class="custom-class van-collapse {{ border ? 'van-hairline--top-bottom' : '' }}">
-  <slot />
-</view>

+ 0 - 1
static/vant/collapse/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';

+ 0 - 1
static/vant/dropdown-item/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 111
static/vant/dropdown-item/index.js

@@ -1,111 +0,0 @@
-import { useParent } from '../common/relation';
-import { VantComponent } from '../common/component';
-VantComponent({
-  field: true,
-  relation: useParent('dropdown-menu', function () {
-    this.updateDataFromParent();
-  }),
-  props: {
-    value: {
-      type: null,
-      observer: 'rerender',
-    },
-    title: {
-      type: String,
-      observer: 'rerender',
-    },
-    disabled: Boolean,
-    titleClass: {
-      type: String,
-      observer: 'rerender',
-    },
-    options: {
-      type: Array,
-      value: [],
-      observer: 'rerender',
-    },
-    popupStyle: String,
-  },
-  data: {
-    transition: true,
-    showPopup: false,
-    showWrapper: false,
-    displayTitle: '',
-  },
-  methods: {
-    rerender() {
-      wx.nextTick(() => {
-        var _a;
-        (_a = this.parent) === null || _a === void 0
-          ? void 0
-          : _a.updateItemListData();
-      });
-    },
-    updateDataFromParent() {
-      if (this.parent) {
-        const {
-          overlay,
-          duration,
-          activeColor,
-          closeOnClickOverlay,
-          direction,
-        } = this.parent.data;
-        this.setData({
-          overlay,
-          duration,
-          activeColor,
-          closeOnClickOverlay,
-          direction,
-        });
-      }
-    },
-    onOpen() {
-      this.$emit('open');
-    },
-    onOpened() {
-      this.$emit('opened');
-    },
-    onClose() {
-      this.$emit('close');
-    },
-    onClosed() {
-      this.$emit('closed');
-      this.setData({ showWrapper: false });
-    },
-    onOptionTap(event) {
-      const { option } = event.currentTarget.dataset;
-      const { value } = option;
-      const shouldEmitChange = this.data.value !== value;
-      this.setData({ showPopup: false, value });
-      this.$emit('close');
-      this.rerender();
-      if (shouldEmitChange) {
-        this.$emit('change', value);
-      }
-    },
-    toggle(show, options = {}) {
-      var _a;
-      const { showPopup } = this.data;
-      if (typeof show !== 'boolean') {
-        show = !showPopup;
-      }
-      if (show === showPopup) {
-        return;
-      }
-      this.setData({
-        transition: !options.immediate,
-        showPopup: show,
-      });
-      if (show) {
-        (_a = this.parent) === null || _a === void 0
-          ? void 0
-          : _a.getChildWrapperStyle().then((wrapperStyle) => {
-              this.setData({ wrapperStyle, showWrapper: true });
-              this.rerender();
-            });
-      } else {
-        this.rerender();
-      }
-    },
-  },
-});

+ 0 - 8
static/vant/dropdown-item/index.json

@@ -1,8 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-popup": "../popup/index",
-    "van-cell": "../cell/index",
-    "van-icon": "../icon/index"
-  }
-}

+ 0 - 48
static/vant/dropdown-item/index.wxml

@@ -1,48 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-
-<view
-  wx:if="{{ showWrapper }}"
-  class="{{ utils.bem('dropdown-item', direction) }}"
-  style="{{ wrapperStyle }}"
->
-  <van-popup
-    show="{{ showPopup }}"
-    custom-style="position: absolute;{{ popupStyle }}"
-    overlay-style="position: absolute;"
-    overlay="{{ overlay }}"
-    position="{{ direction === 'down' ? 'top' : 'bottom' }}"
-    duration="{{ transition ? duration : 0 }}"
-    close-on-click-overlay="{{ closeOnClickOverlay }}"
-    bind:enter="onOpen"
-    bind:leave="onClose"
-    bind:close="toggle"
-    bind:after-enter="onOpened"
-    bind:after-leave="onClosed"
-  >
-    <van-cell
-      wx:for="{{ options }}"
-      wx:key="value"
-      data-option="{{ item }}"
-      class="{{ utils.bem('dropdown-item__option', { active: item.value === value } ) }}"
-      clickable
-      icon="{{ item.icon }}"
-      bind:tap="onOptionTap"
-    >
-      <view
-        slot="title"
-        class="van-dropdown-item__title"
-        style="{{ item.value === value  ? 'color:' + activeColor : '' }}"
-      >
-        {{ item.text }}
-      </view>
-      <van-icon
-        wx:if="{{ item.value === value }}"
-        name="success"
-        class="van-dropdown-item__icon"
-        color="{{ activeColor }}"
-      />
-    </van-cell>
-
-    <slot />
-  </van-popup>
-</view>

+ 0 - 1
static/vant/dropdown-item/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#ee0a24;color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}

+ 0 - 5
static/vant/dropdown-item/shared.d.ts

@@ -1,5 +0,0 @@
-export interface Option {
-  text: string;
-  value: string | number;
-  icon: string;
-}

+ 0 - 1
static/vant/dropdown-item/shared.js

@@ -1 +0,0 @@
-export {};

+ 0 - 1
static/vant/dropdown-menu/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 112
static/vant/dropdown-menu/index.js

@@ -1,112 +0,0 @@
-import { VantComponent } from '../common/component';
-import { useChildren } from '../common/relation';
-import { addUnit, getRect, getSystemInfoSync } from '../common/utils';
-let ARRAY = [];
-VantComponent({
-  field: true,
-  relation: useChildren('dropdown-item', function () {
-    this.updateItemListData();
-  }),
-  props: {
-    activeColor: {
-      type: String,
-      observer: 'updateChildrenData',
-    },
-    overlay: {
-      type: Boolean,
-      value: true,
-      observer: 'updateChildrenData',
-    },
-    zIndex: {
-      type: Number,
-      value: 10,
-    },
-    duration: {
-      type: Number,
-      value: 200,
-      observer: 'updateChildrenData',
-    },
-    direction: {
-      type: String,
-      value: 'down',
-      observer: 'updateChildrenData',
-    },
-    closeOnClickOverlay: {
-      type: Boolean,
-      value: true,
-      observer: 'updateChildrenData',
-    },
-    closeOnClickOutside: {
-      type: Boolean,
-      value: true,
-    },
-  },
-  data: {
-    itemListData: [],
-  },
-  beforeCreate() {
-    const { windowHeight } = getSystemInfoSync();
-    this.windowHeight = windowHeight;
-    ARRAY.push(this);
-  },
-  destroyed() {
-    ARRAY = ARRAY.filter((item) => item !== this);
-  },
-  methods: {
-    updateItemListData() {
-      this.setData({
-        itemListData: this.children.map((child) => child.data),
-      });
-    },
-    updateChildrenData() {
-      this.children.forEach((child) => {
-        child.updateDataFromParent();
-      });
-    },
-    toggleItem(active) {
-      this.children.forEach((item, index) => {
-        const { showPopup } = item.data;
-        if (index === active) {
-          item.toggle();
-        } else if (showPopup) {
-          item.toggle(false, { immediate: true });
-        }
-      });
-    },
-    close() {
-      this.children.forEach((child) => {
-        child.toggle(false, { immediate: true });
-      });
-    },
-    getChildWrapperStyle() {
-      const { zIndex, direction } = this.data;
-      return getRect(this, '.van-dropdown-menu').then((rect) => {
-        const { top = 0, bottom = 0 } = rect;
-        const offset = direction === 'down' ? bottom : this.windowHeight - top;
-        let wrapperStyle = `z-index: ${zIndex};`;
-        if (direction === 'down') {
-          wrapperStyle += `top: ${addUnit(offset)};`;
-        } else {
-          wrapperStyle += `bottom: ${addUnit(offset)};`;
-        }
-        return wrapperStyle;
-      });
-    },
-    onTitleTap(event) {
-      const { index } = event.currentTarget.dataset;
-      const child = this.children[index];
-      if (!child.data.disabled) {
-        ARRAY.forEach((menuItem) => {
-          if (
-            menuItem &&
-            menuItem.data.closeOnClickOutside &&
-            menuItem !== this
-          ) {
-            menuItem.close();
-          }
-        });
-        this.toggleItem(index);
-      }
-    },
-  },
-});

+ 0 - 3
static/vant/dropdown-menu/index.json

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

+ 0 - 23
static/vant/dropdown-menu/index.wxml

@@ -1,23 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-<wxs src="./index.wxs" module="computed" />
-
-<view class="van-dropdown-menu van-dropdown-menu--top-bottom">
-  <view
-    wx:for="{{ itemListData }}"
-    wx:key="index"
-    data-index="{{ index }}"
-    class="{{ utils.bem('dropdown-menu__item', { disabled: item.disabled }) }}"
-    bind:tap="onTitleTap"
-  >
-    <view
-      class="{{ item.titleClass }} {{ utils.bem('dropdown-menu__title', { active: item.showPopup, down: item.showPopup === (direction === 'down') }) }}"
-      style="{{ item.showPopup ? 'color:' + activeColor : '' }}"
-    >
-      <view class="van-ellipsis">
-        {{ computed.displayTitle(item) }}
-      </view>
-    </view>
-  </view>
-
-  <slot />
-</view>

+ 0 - 16
static/vant/dropdown-menu/index.wxs

@@ -1,16 +0,0 @@
-/* eslint-disable */
-function displayTitle(item) {
-  if (item.title) {
-    return item.title;
-  }
-
-  var match = item.options.filter(function(option) {
-    return option.value === item.value;
-  });
-  var displayTitle = match.length ? match[0].text : '';
-  return displayTitle;
-}
-
-module.exports = {
-  displayTitle: displayTitle
-};

+ 0 - 1
static/vant/dropdown-menu/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-dropdown-menu{display:-webkit-flex;display:flex;box-shadow:0 2px 12px rgba(100,101,102,.12);-webkit-user-select:none;user-select:none;height:50px;height:var(--dropdown-menu-height,50px);background-color:#fff;background-color:var(--dropdown-menu-background-color,#fff)}.van-dropdown-menu__item{display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799;color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;padding:var(--dropdown-menu-title-padding,0 8px);color:#323233;color:var(--dropdown-menu-title-text-color,#323233);font-size:15px;font-size:var(--dropdown-menu-title-font-size,15px);line-height:18px;line-height:var(--dropdown-menu-title-line-height,18px)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:#ee0a24;color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}

+ 0 - 1
static/vant/grid-item/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 62
static/vant/grid-item/index.js

@@ -1,62 +0,0 @@
-import { VantComponent } from '../common/component';
-import { useParent } from '../common/relation';
-import { link } from '../mixins/link';
-VantComponent({
-  relation: useParent('grid'),
-  classes: ['content-class', 'icon-class', 'text-class'],
-  mixins: [link],
-  props: {
-    icon: String,
-    iconColor: String,
-    iconPrefix: {
-      type: String,
-      value: 'van-icon',
-    },
-    dot: Boolean,
-    info: null,
-    badge: null,
-    text: String,
-    useSlot: Boolean,
-  },
-  data: {
-    viewStyle: '',
-  },
-  mounted() {
-    this.updateStyle();
-  },
-  methods: {
-    updateStyle() {
-      if (!this.parent) {
-        return;
-      }
-      const { data, children } = this.parent;
-      const {
-        columnNum,
-        border,
-        square,
-        gutter,
-        clickable,
-        center,
-        direction,
-        reverse,
-        iconSize,
-      } = data;
-      this.setData({
-        center,
-        border,
-        square,
-        gutter,
-        clickable,
-        direction,
-        reverse,
-        iconSize,
-        index: children.indexOf(this),
-        columnNum,
-      });
-    },
-    onClick() {
-      this.$emit('click');
-      this.jumpLink();
-    },
-  },
-});

+ 0 - 6
static/vant/grid-item/index.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-icon": "../icon/index"
-  }
-}

+ 0 - 27
static/vant/grid-item/index.wxml

@@ -1,27 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-<wxs src="./index.wxs" module="computed" />
-
-<view
-  class="custom-class {{ utils.bem('grid-item', { square }) }}"
-  style="{{ computed.wrapperStyle({ square, gutter, columnNum, index }) }}"
-  bindtap="onClick"
->
-  <view
-    class="content-class {{ utils.bem('grid-item__content', [direction, { center, square, reverse, clickable, surround: border && gutter }]) }} {{ border ? 'van-hairline--surround' : '' }}"
-    style="{{ computed.contentStyle({ square, gutter }) }}"
-  >
-    <block wx:if="{{ useSlot }}">
-      <slot />
-    </block>
-    <block wx:else>
-      <view class="van-grid-item__icon icon-class">
-        <van-icon wx:if="{{ icon }}" name="{{ icon }}" color="{{ iconColor }}" class-prefix="{{ iconPrefix }}" dot="{{ dot }}" info="{{ badge || info }}" size="{{ iconSize }}" />
-        <slot wx:else name="icon"></slot>
-      </view>
-      <view class="van-grid-item__text text-class">
-        <text wx:if="{{ text }}">{{ text }}</text>
-        <slot wx:else name="text"></slot>
-      </view>
-    </block>
-  </view>
-</view>

+ 0 - 32
static/vant/grid-item/index.wxs

@@ -1,32 +0,0 @@
-/* eslint-disable */
-var style = require('../wxs/style.wxs');
-var addUnit = require('../wxs/add-unit.wxs');
-
-function wrapperStyle(data) {
-  var width = 100 / data.columnNum + '%';
-
-  return style({
-    width: width,
-    'padding-top': data.square ? width : null,
-    'padding-right': addUnit(data.gutter),
-    'margin-top':
-      data.index >= data.columnNum && !data.square
-        ? addUnit(data.gutter)
-        : null,
-  });
-}
-
-function contentStyle(data) {
-  return data.square
-    ? style({
-        right: addUnit(data.gutter),
-        bottom: addUnit(data.gutter),
-        height: 'auto',
-      })
-    : '';
-}
-
-module.exports = {
-  wrapperStyle: wrapperStyle,
-  contentStyle: contentStyle,
-};

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
static/vant/grid-item/index.wxss


+ 0 - 1
static/vant/grid/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 55
static/vant/grid/index.js

@@ -1,55 +0,0 @@
-import { VantComponent } from '../common/component';
-import { useChildren } from '../common/relation';
-VantComponent({
-  relation: useChildren('grid-item'),
-  props: {
-    square: {
-      type: Boolean,
-      observer: 'updateChildren',
-    },
-    gutter: {
-      type: null,
-      value: 0,
-      observer: 'updateChildren',
-    },
-    clickable: {
-      type: Boolean,
-      observer: 'updateChildren',
-    },
-    columnNum: {
-      type: Number,
-      value: 4,
-      observer: 'updateChildren',
-    },
-    center: {
-      type: Boolean,
-      value: true,
-      observer: 'updateChildren',
-    },
-    border: {
-      type: Boolean,
-      value: true,
-      observer: 'updateChildren',
-    },
-    direction: {
-      type: String,
-      observer: 'updateChildren',
-    },
-    iconSize: {
-      type: String,
-      observer: 'updateChildren',
-    },
-    reverse: {
-      type: Boolean,
-      value: false,
-      observer: 'updateChildren',
-    },
-  },
-  methods: {
-    updateChildren() {
-      this.children.forEach((child) => {
-        child.updateStyle();
-      });
-    },
-  },
-});

+ 0 - 3
static/vant/grid/index.json

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

+ 0 - 8
static/vant/grid/index.wxml

@@ -1,8 +0,0 @@
-<wxs src="./index.wxs" module="computed" />
-
-<view
-  class="van-grid custom-class {{ border && !gutter ? 'van-hairline--top' : '' }}"
-  style="{{ computed.rootStyle({ gutter }) }}"
->
-  <slot />
-</view>

+ 0 - 13
static/vant/grid/index.wxs

@@ -1,13 +0,0 @@
-/* eslint-disable */
-var style = require('../wxs/style.wxs');
-var addUnit = require('../wxs/add-unit.wxs');
-
-function rootStyle(data) {
-  return style({
-    'padding-left': addUnit(data.gutter),
-  });
-}
-
-module.exports = {
-  rootStyle: rootStyle,
-};

+ 0 - 1
static/vant/grid/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-grid{position:relative;box-sizing:border-box;overflow:hidden}

+ 0 - 1
static/vant/index-bar/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 248
static/vant/index-bar/index.js

@@ -1,248 +0,0 @@
-import { GREEN } from '../common/color';
-import { VantComponent } from '../common/component';
-import { useChildren } from '../common/relation';
-import { getRect, isDef } from '../common/utils';
-import { pageScrollMixin } from '../mixins/page-scroll';
-const indexList = () => {
-  const indexList = [];
-  const charCodeOfA = 'A'.charCodeAt(0);
-  for (let i = 0; i < 26; i++) {
-    indexList.push(String.fromCharCode(charCodeOfA + i));
-  }
-  return indexList;
-};
-VantComponent({
-  relation: useChildren('index-anchor', function () {
-    this.updateData();
-  }),
-  props: {
-    sticky: {
-      type: Boolean,
-      value: true,
-    },
-    zIndex: {
-      type: Number,
-      value: 1,
-    },
-    highlightColor: {
-      type: String,
-      value: GREEN,
-    },
-    stickyOffsetTop: {
-      type: Number,
-      value: 0,
-    },
-    indexList: {
-      type: Array,
-      value: indexList(),
-    },
-  },
-  mixins: [
-    pageScrollMixin(function (event) {
-      this.scrollTop =
-        (event === null || event === void 0 ? void 0 : event.scrollTop) || 0;
-      this.onScroll();
-    }),
-  ],
-  data: {
-    activeAnchorIndex: null,
-    showSidebar: false,
-  },
-  created() {
-    this.scrollTop = 0;
-  },
-  methods: {
-    updateData() {
-      wx.nextTick(() => {
-        if (this.timer != null) {
-          clearTimeout(this.timer);
-        }
-        this.timer = setTimeout(() => {
-          this.setData({
-            showSidebar: !!this.children.length,
-          });
-          this.setRect().then(() => {
-            this.onScroll();
-          });
-        }, 0);
-      });
-    },
-    setRect() {
-      return Promise.all([
-        this.setAnchorsRect(),
-        this.setListRect(),
-        this.setSiderbarRect(),
-      ]);
-    },
-    setAnchorsRect() {
-      return Promise.all(
-        this.children.map((anchor) =>
-          getRect(anchor, '.van-index-anchor-wrapper').then((rect) => {
-            Object.assign(anchor, {
-              height: rect.height,
-              top: rect.top + this.scrollTop,
-            });
-          })
-        )
-      );
-    },
-    setListRect() {
-      return getRect(this, '.van-index-bar').then((rect) => {
-        Object.assign(this, {
-          height: rect.height,
-          top: rect.top + this.scrollTop,
-        });
-      });
-    },
-    setSiderbarRect() {
-      return getRect(this, '.van-index-bar__sidebar').then((res) => {
-        if (!isDef(res)) {
-          return;
-        }
-        this.sidebar = {
-          height: res.height,
-          top: res.top,
-        };
-      });
-    },
-    setDiffData({ target, data }) {
-      const diffData = {};
-      Object.keys(data).forEach((key) => {
-        if (target.data[key] !== data[key]) {
-          diffData[key] = data[key];
-        }
-      });
-      if (Object.keys(diffData).length) {
-        target.setData(diffData);
-      }
-    },
-    getAnchorRect(anchor) {
-      return getRect(anchor, '.van-index-anchor-wrapper').then((rect) => ({
-        height: rect.height,
-        top: rect.top,
-      }));
-    },
-    getActiveAnchorIndex() {
-      const { children, scrollTop } = this;
-      const { sticky, stickyOffsetTop } = this.data;
-      for (let i = this.children.length - 1; i >= 0; i--) {
-        const preAnchorHeight = i > 0 ? children[i - 1].height : 0;
-        const reachTop = sticky ? preAnchorHeight + stickyOffsetTop : 0;
-        if (reachTop + scrollTop >= children[i].top) {
-          return i;
-        }
-      }
-      return -1;
-    },
-    onScroll() {
-      const { children = [], scrollTop } = this;
-      if (!children.length) {
-        return;
-      }
-      const { sticky, stickyOffsetTop, zIndex, highlightColor } = this.data;
-      const active = this.getActiveAnchorIndex();
-      this.setDiffData({
-        target: this,
-        data: {
-          activeAnchorIndex: active,
-        },
-      });
-      if (sticky) {
-        let isActiveAnchorSticky = false;
-        if (active !== -1) {
-          isActiveAnchorSticky =
-            children[active].top <= stickyOffsetTop + scrollTop;
-        }
-        children.forEach((item, index) => {
-          if (index === active) {
-            let wrapperStyle = '';
-            let anchorStyle = `
-              color: ${highlightColor};
-            `;
-            if (isActiveAnchorSticky) {
-              wrapperStyle = `
-                height: ${children[index].height}px;
-              `;
-              anchorStyle = `
-                position: fixed;
-                top: ${stickyOffsetTop}px;
-                z-index: ${zIndex};
-                color: ${highlightColor};
-              `;
-            }
-            this.setDiffData({
-              target: item,
-              data: {
-                active: true,
-                anchorStyle,
-                wrapperStyle,
-              },
-            });
-          } else if (index === active - 1) {
-            const currentAnchor = children[index];
-            const currentOffsetTop = currentAnchor.top;
-            const targetOffsetTop =
-              index === children.length - 1
-                ? this.top
-                : children[index + 1].top;
-            const parentOffsetHeight = targetOffsetTop - currentOffsetTop;
-            const translateY = parentOffsetHeight - currentAnchor.height;
-            const anchorStyle = `
-              position: relative;
-              transform: translate3d(0, ${translateY}px, 0);
-              z-index: ${zIndex};
-              color: ${highlightColor};
-            `;
-            this.setDiffData({
-              target: item,
-              data: {
-                active: true,
-                anchorStyle,
-              },
-            });
-          } else {
-            this.setDiffData({
-              target: item,
-              data: {
-                active: false,
-                anchorStyle: '',
-                wrapperStyle: '',
-              },
-            });
-          }
-        });
-      }
-    },
-    onClick(event) {
-      this.scrollToAnchor(event.target.dataset.index);
-    },
-    onTouchMove(event) {
-      const sidebarLength = this.children.length;
-      const touch = event.touches[0];
-      const itemHeight = this.sidebar.height / sidebarLength;
-      let index = Math.floor((touch.clientY - this.sidebar.top) / itemHeight);
-      if (index < 0) {
-        index = 0;
-      } else if (index > sidebarLength - 1) {
-        index = sidebarLength - 1;
-      }
-      this.scrollToAnchor(index);
-    },
-    onTouchStop() {
-      this.scrollToAnchorIndex = null;
-    },
-    scrollToAnchor(index) {
-      if (typeof index !== 'number' || this.scrollToAnchorIndex === index) {
-        return;
-      }
-      this.scrollToAnchorIndex = index;
-      const anchor = this.children.find(
-        (item) => item.data.index === this.data.indexList[index]
-      );
-      if (anchor) {
-        anchor.scrollIntoView(this.scrollTop);
-        this.$emit('select', anchor.data.index);
-      }
-    },
-  },
-});

+ 0 - 3
static/vant/index-bar/index.json

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

+ 0 - 22
static/vant/index-bar/index.wxml

@@ -1,22 +0,0 @@
-<view class="van-index-bar">
-  <slot />
-
-  <view
-    wx:if="{{ showSidebar }}"
-    class="van-index-bar__sidebar"
-    catch:tap="onClick"
-    catch:touchmove="onTouchMove"
-    catch:touchend="onTouchStop"
-    catch:touchcancel="onTouchStop"
-  >
-    <view
-      wx:for="{{ indexList }}"
-      wx:key="index"
-      class="van-index-bar__index"
-      style="z-index: {{ zIndex + 1 }}; color: {{ activeAnchorIndex === index ? highlightColor : '' }}"
-      data-index="{{ index }}"
-    >
-      {{ item }}
-    </view>
-  </view>
-</view>

+ 0 - 1
static/vant/index-bar/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-index-bar{position:relative}.van-index-bar__sidebar{position:fixed;top:50%;right:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-weight:500;padding:0 4px 0 16px;padding:0 var(--padding-base,4px) 0 var(--padding-md,16px);font-size:10px;font-size:var(--index-bar-index-font-size,10px);line-height:14px;line-height:var(--index-bar-index-line-height,14px)}

+ 0 - 1
static/vant/nav-bar/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 65
static/vant/nav-bar/index.js

@@ -1,65 +0,0 @@
-import { VantComponent } from '../common/component';
-import { getRect, getSystemInfoSync } from '../common/utils';
-VantComponent({
-  classes: ['title-class'],
-  props: {
-    title: String,
-    fixed: {
-      type: Boolean,
-      observer: 'setHeight',
-    },
-    placeholder: {
-      type: Boolean,
-      observer: 'setHeight',
-    },
-    leftText: String,
-    rightText: String,
-    customStyle: String,
-    leftArrow: Boolean,
-    border: {
-      type: Boolean,
-      value: true,
-    },
-    zIndex: {
-      type: Number,
-      value: 1,
-    },
-    safeAreaInsetTop: {
-      type: Boolean,
-      value: true,
-    },
-  },
-  data: {
-    height: 46,
-  },
-  created() {
-    const { statusBarHeight } = getSystemInfoSync();
-    this.setData({
-      statusBarHeight,
-      height: 46 + statusBarHeight,
-    });
-  },
-  mounted() {
-    this.setHeight();
-  },
-  methods: {
-    onClickLeft() {
-      this.$emit('click-left');
-    },
-    onClickRight() {
-      this.$emit('click-right');
-    },
-    setHeight() {
-      if (!this.data.fixed || !this.data.placeholder) {
-        return;
-      }
-      wx.nextTick(() => {
-        getRect(this, '.van-nav-bar').then((res) => {
-          if (res && 'height' in res) {
-            this.setData({ height: res.height });
-          }
-        });
-      });
-    },
-  },
-});

+ 0 - 6
static/vant/nav-bar/index.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-icon": "../icon/index"
-  }
-}

+ 0 - 42
static/vant/nav-bar/index.wxml

@@ -1,42 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-<wxs src="./index.wxs" module="computed" />
-
-<view wx:if="{{ fixed && placeholder }}" style="height: {{ height }}px;" />
-
-<view
-  class="{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}"
-  style="{{ computed.barStyle({ zIndex, statusBarHeight, safeAreaInsetTop }) }}; {{ customStyle }}"
->
-  <view class="van-nav-bar__content">
-    <view class="van-nav-bar__left" bind:tap="onClickLeft">
-      <block wx:if="{{ leftArrow || leftText }}">
-        <van-icon
-          wx:if="{{ leftArrow }}"
-          size="16px"
-          name="arrow-left"
-          custom-class="van-nav-bar__arrow"
-        />
-        <view
-          wx:if="{{ leftText }}"
-          class="van-nav-bar__text"
-          hover-class="van-nav-bar__text--hover"
-          hover-stay-time="70"
-        >{{ leftText }}</view>
-      </block>
-      <slot wx:else name="left" />
-    </view>
-    <view class="van-nav-bar__title title-class van-ellipsis">
-      <block wx:if="{{ title }}">{{ title }}</block>
-      <slot wx:else name="title" />
-    </view>
-    <view class="van-nav-bar__right" bind:tap="onClickRight">
-      <view
-        wx:if="{{ rightText }}"
-        class="van-nav-bar__text"
-        hover-class="van-nav-bar__text--hover"
-        hover-stay-time="70"
-      >{{ rightText }}</view>
-      <slot wx:else name="right" />
-    </view>
-  </view>
-</view>

+ 0 - 13
static/vant/nav-bar/index.wxs

@@ -1,13 +0,0 @@
-/* eslint-disable */
-var style = require('../wxs/style.wxs');
-
-function barStyle(data) {
-  return style({
-    'z-index': data.zIndex,
-    'padding-top': data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0,
-  });
-}
-
-module.exports = {
-  barStyle: barStyle,
-};

+ 0 - 1
static/vant/nav-bar/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-nav-bar{position:relative;text-align:center;-webkit-user-select:none;user-select:none;height:46px;height:var(--nav-bar-height,46px);line-height:46px;line-height:var(--nav-bar-height,46px);background-color:#fff;background-color:var(--nav-bar-background-color,#fff)}.van-nav-bar__content{position:relative;height:100%}.van-nav-bar__text{display:inline-block;vertical-align:middle;margin:0 -16px;margin:0 -var(--padding-md,16px);padding:0 16px;padding:0 var(--padding-md,16px);color:#1989fa;color:var(--nav-bar-text-color,#1989fa)}.van-nav-bar__text--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-nav-bar__arrow{vertical-align:middle;font-size:16px!important;font-size:var(--nav-bar-arrow-size,16px)!important;color:#1989fa!important;color:var(--nav-bar-icon-color,#1989fa)!important}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;color:#323233;color:var(--nav-bar-title-text-color,#323233);font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--nav-bar-title-font-size,16px)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;top:0;bottom:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;font-size:14px;font-size:var(--font-size-md,14px)}.van-nav-bar__left{left:16px;left:var(--padding-md,16px)}.van-nav-bar__right{right:16px;right:var(--padding-md,16px)}

+ 0 - 1
static/vant/notice-bar/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 123
static/vant/notice-bar/index.js

@@ -1,123 +0,0 @@
-import { VantComponent } from '../common/component';
-import { getRect, requestAnimationFrame } from '../common/utils';
-VantComponent({
-  props: {
-    text: {
-      type: String,
-      value: '',
-      observer: 'init',
-    },
-    mode: {
-      type: String,
-      value: '',
-    },
-    url: {
-      type: String,
-      value: '',
-    },
-    openType: {
-      type: String,
-      value: 'navigate',
-    },
-    delay: {
-      type: Number,
-      value: 1,
-    },
-    speed: {
-      type: Number,
-      value: 60,
-      observer: 'init',
-    },
-    scrollable: null,
-    leftIcon: {
-      type: String,
-      value: '',
-    },
-    color: String,
-    backgroundColor: String,
-    background: String,
-    wrapable: Boolean,
-  },
-  data: {
-    show: true,
-  },
-  created() {
-    this.resetAnimation = wx.createAnimation({
-      duration: 0,
-      timingFunction: 'linear',
-    });
-  },
-  destroyed() {
-    this.timer && clearTimeout(this.timer);
-  },
-  mounted() {
-    this.init();
-  },
-  methods: {
-    init() {
-      requestAnimationFrame(() => {
-        Promise.all([
-          getRect(this, '.van-notice-bar__content'),
-          getRect(this, '.van-notice-bar__wrap'),
-        ]).then((rects) => {
-          const [contentRect, wrapRect] = rects;
-          const { speed, scrollable, delay } = this.data;
-          if (
-            contentRect == null ||
-            wrapRect == null ||
-            !contentRect.width ||
-            !wrapRect.width ||
-            scrollable === false
-          ) {
-            return;
-          }
-          if (scrollable || wrapRect.width < contentRect.width) {
-            const duration =
-              ((wrapRect.width + contentRect.width) / speed) * 1000;
-            this.wrapWidth = wrapRect.width;
-            this.contentWidth = contentRect.width;
-            this.duration = duration;
-            this.animation = wx.createAnimation({
-              duration,
-              timingFunction: 'linear',
-              delay,
-            });
-            this.scroll();
-          }
-        });
-      });
-    },
-    scroll() {
-      this.timer && clearTimeout(this.timer);
-      this.timer = null;
-      this.setData({
-        animationData: this.resetAnimation
-          .translateX(this.wrapWidth)
-          .step()
-          .export(),
-      });
-      requestAnimationFrame(() => {
-        this.setData({
-          animationData: this.animation
-            .translateX(-this.contentWidth)
-            .step()
-            .export(),
-        });
-      });
-      this.timer = setTimeout(() => {
-        this.scroll();
-      }, this.duration);
-    },
-    onClickIcon(event) {
-      if (this.data.mode === 'closeable') {
-        this.timer && clearTimeout(this.timer);
-        this.timer = null;
-        this.setData({ show: false });
-        this.$emit('close', event.detail);
-      }
-    },
-    onClick(event) {
-      this.$emit('click', event);
-    },
-  },
-});

+ 0 - 6
static/vant/notice-bar/index.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-icon": "../icon/index"
-  }
-}

+ 0 - 39
static/vant/notice-bar/index.wxml

@@ -1,39 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-<wxs src="./index.wxs" module="computed" />
-
-<view
-  wx:if="{{ show }}"
-  class="custom-class {{ utils.bem('notice-bar', { withicon: mode, wrapable }) }}"
-  style="{{ computed.rootStyle({ color, backgroundColor, background }) }}"
-  bind:tap="onClick"
->
-  <van-icon
-    wx:if="{{ leftIcon }}"
-    size="16px"
-    name="{{ leftIcon }}"
-    class="van-notice-bar__left-icon"
-  />
-  <slot wx:else name="left-icon" />
-
-  <view class="van-notice-bar__wrap">
-    <view class="van-notice-bar__content {{ scrollable === false && !wrapable ? 'van-ellipsis' : '' }}" animation="{{ animationData }}">
-      {{ text }}
-      <slot wx:if="{{ !text }}"></slot>
-    </view>
-  </view>
-
-  <van-icon
-    wx:if="{{ mode === 'closeable' }}"
-    class="van-notice-bar__right-icon"
-    name="cross"
-    catch:tap="onClickIcon"
-  />
-  <navigator
-    wx:elif="{{ mode === 'link' }}"
-    url="{{ url }}"
-    open-type="{{ openType }}"
-  >
-    <van-icon class="van-notice-bar__right-icon" name="arrow" />
-  </navigator>
-  <slot wx:else name="right-icon" />
-</view>

+ 0 - 15
static/vant/notice-bar/index.wxs

@@ -1,15 +0,0 @@
-/* eslint-disable */
-var style = require('../wxs/style.wxs');
-var addUnit = require('../wxs/add-unit.wxs');
-
-function rootStyle(data) {
-  return style({
-    color: data.color,
-    'background-color': data.backgroundColor,
-    background: data.background,
-  });
-}
-
-module.exports = {
-  rootStyle: rootStyle,
-};

+ 0 - 1
static/vant/notice-bar/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:40px;height:var(--notice-bar-height,40px);padding:0 16px;padding:var(--notice-bar-padding,0 16px);font-size:14px;font-size:var(--notice-bar-font-size,14px);color:#ed6a0c;color:var(--notice-bar-text-color,#ed6a0c);line-height:24px;line-height:var(--notice-bar-line-height,24px);background-color:#fffbe8;background-color:var(--notice-bar-background-color,#fffbe8)}.van-notice-bar--withicon{position:relative;padding-right:40px}.van-notice-bar--wrapable{height:auto;padding:8px 16px;padding:var(--notice-bar-wrapable-padding,8px 16px)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-right:4px;vertical-align:middle}.van-notice-bar__left-icon,.van-notice-bar__right-icon{font-size:16px;font-size:var(--notice-bar-icon-size,16px);min-width:22px;min-width:var(--notice-bar-icon-min-width,22px)}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px}.van-notice-bar__wrap{position:relative;-webkit-flex:1;flex:1;overflow:hidden;height:24px;height:var(--notice-bar-line-height,24px)}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}

+ 0 - 1
static/vant/panel/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 9
static/vant/panel/index.js

@@ -1,9 +0,0 @@
-import { VantComponent } from '../common/component';
-VantComponent({
-  classes: ['header-class', 'footer-class'],
-  props: {
-    desc: String,
-    title: String,
-    status: String,
-  },
-});

+ 0 - 6
static/vant/panel/index.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-cell": "../cell/index"
-  }
-}

+ 0 - 19
static/vant/panel/index.wxml

@@ -1,19 +0,0 @@
-<view class="van-panel van-hairline--top-bottom custom-class">
-  <van-cell
-    wx:if="{{ title || desc || status }}"
-    title="{{ title }}"
-    label="{{ desc }}"
-    value="{{ status }}"
-    custom-class="header-class"
-    value-class="van-panel__header-value"
-  />
-  <slot wx:else name="header" />
-
-  <view class="van-panel__content">
-    <slot />
-  </view>
-
-  <view class="van-panel__footer van-hairline--top footer-class">
-    <slot name="footer" />
-  </view>
-</view>

+ 0 - 1
static/vant/panel/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-panel{background:#fff;background:var(--panel-background-color,#fff)}.van-panel__header-value{color:#ee0a24;color:var(--panel-header-value-color,#ee0a24)}.van-panel__footer{padding:8px 16px;padding:var(--panel-footer-padding,8px 16px)}.van-panel__footer:empty{display:none}

+ 0 - 1
static/vant/progress/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 51
static/vant/progress/index.js

@@ -1,51 +0,0 @@
-import { VantComponent } from '../common/component';
-import { BLUE } from '../common/color';
-import { getRect } from '../common/utils';
-VantComponent({
-  props: {
-    inactive: Boolean,
-    percentage: {
-      type: Number,
-      observer: 'setLeft',
-    },
-    pivotText: String,
-    pivotColor: String,
-    trackColor: String,
-    showPivot: {
-      type: Boolean,
-      value: true,
-    },
-    color: {
-      type: String,
-      value: BLUE,
-    },
-    textColor: {
-      type: String,
-      value: '#fff',
-    },
-    strokeWidth: {
-      type: null,
-      value: 4,
-    },
-  },
-  data: {
-    right: 0,
-  },
-  mounted() {
-    this.setLeft();
-  },
-  methods: {
-    setLeft() {
-      Promise.all([
-        getRect(this, '.van-progress'),
-        getRect(this, '.van-progress__pivot'),
-      ]).then(([portion, pivot]) => {
-        if (portion && pivot) {
-          this.setData({
-            right: (pivot.width * (this.data.percentage - 100)) / 100,
-          });
-        }
-      });
-    },
-  },
-});

+ 0 - 3
static/vant/progress/index.json

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

+ 0 - 20
static/vant/progress/index.wxml

@@ -1,20 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-<wxs src="./index.wxs" module="computed" />
-
-<view
-  class="van-progress custom-class"
-  style="{{ computed.rootStyle({ strokeWidth, trackColor }) }}"
->
-  <view
-    class="van-progress__portion"
-    style="{{ computed.portionStyle({ percentage, inactive, color }) }}"
-  >
-    <view
-      wx:if="{{ showPivot && computed.pivotText(pivotText, percentage) }}"
-      style="{{ computed.pivotStyle({ textColor, pivotColor, inactive, color, right }) }}"
-      class="van-progress__pivot"
-    >
-      {{ computed.pivotText(pivotText, percentage) }}
-    </view>
-  </view>
-</view>

+ 0 - 36
static/vant/progress/index.wxs

@@ -1,36 +0,0 @@
-/* eslint-disable */
-var utils = require('../wxs/utils.wxs');
-var style = require('../wxs/style.wxs');
-
-function pivotText(pivotText, percentage) {
-  return pivotText || percentage + '%';
-}
-
-function rootStyle(data) {
-  return style({
-    'height': data.strokeWidth ? utils.addUnit(data.strokeWidth) : '',
-    'background': data.trackColor,
-  });
-}
-
-function portionStyle(data) {
-  return style({
-    background: data.inactive ? '#cacaca' : data.color,
-    width: data.percentage ? data.percentage + '%' : '',
-  });
-}
-
-function pivotStyle(data) {
-  return style({
-    color: data.textColor,
-    right: data.right + 'px',
-    background: data.pivotColor ? data.pivotColor : data.inactive ? '#cacaca' : data.color,
-  });
-}
-
-module.exports = {
-  pivotText: pivotText,
-  rootStyle: rootStyle,
-  portionStyle: portionStyle,
-  pivotStyle: pivotStyle,
-};

+ 0 - 1
static/vant/progress/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-progress{position:relative;height:4px;height:var(--progress-height,4px);border-radius:4px;border-radius:var(--progress-height,4px);background:#ebedf0;background:var(--progress-background-color,#ebedf0)}.van-progress__portion{position:absolute;left:0;height:100%;border-radius:inherit;background:#1989fa;background:var(--progress-color,#1989fa)}.van-progress__pivot{position:absolute;top:50%;box-sizing:border-box;min-width:3.6em;text-align:center;word-break:keep-all;border-radius:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#fff;color:var(--progress-pivot-text-color,#fff);padding:0 5px;padding:var(--progress-pivot-padding,0 5px);font-size:10px;font-size:var(--progress-pivot-font-size,10px);line-height:1.6;line-height:var(--progress-pivot-line-height,1.6);background-color:#1989fa;background-color:var(--progress-pivot-background-color,#1989fa)}

+ 0 - 1
static/vant/rate/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 79
static/vant/rate/index.js

@@ -1,79 +0,0 @@
-import { getAllRect } from '../common/utils';
-import { VantComponent } from '../common/component';
-import { canIUseModel } from '../common/version';
-VantComponent({
-  field: true,
-  classes: ['icon-class'],
-  props: {
-    value: {
-      type: Number,
-      observer(value) {
-        if (value !== this.data.innerValue) {
-          this.setData({ innerValue: value });
-        }
-      },
-    },
-    readonly: Boolean,
-    disabled: Boolean,
-    allowHalf: Boolean,
-    size: null,
-    icon: {
-      type: String,
-      value: 'star',
-    },
-    voidIcon: {
-      type: String,
-      value: 'star-o',
-    },
-    color: String,
-    voidColor: String,
-    disabledColor: String,
-    count: {
-      type: Number,
-      value: 5,
-      observer(value) {
-        this.setData({ innerCountArray: Array.from({ length: value }) });
-      },
-    },
-    gutter: null,
-    touchable: {
-      type: Boolean,
-      value: true,
-    },
-  },
-  data: {
-    innerValue: 0,
-    innerCountArray: Array.from({ length: 5 }),
-  },
-  methods: {
-    onSelect(event) {
-      const { data } = this;
-      const { score } = event.currentTarget.dataset;
-      if (!data.disabled && !data.readonly) {
-        this.setData({ innerValue: score + 1 });
-        if (canIUseModel()) {
-          this.setData({ value: score + 1 });
-        }
-        wx.nextTick(() => {
-          this.$emit('input', score + 1);
-          this.$emit('change', score + 1);
-        });
-      }
-    },
-    onTouchMove(event) {
-      const { touchable } = this.data;
-      if (!touchable) return;
-      const { clientX } = event.touches[0];
-      getAllRect(this, '.van-rate__icon').then((list) => {
-        const target = list
-          .sort((cur, next) => cur.dataset.score - next.dataset.score)
-          .find((item) => clientX >= item.left && clientX <= item.right);
-        if (target != null) {
-          this.onSelect(
-            Object.assign(Object.assign({}, event), { currentTarget: target })
-          );
-        }
-      });
-    },
-  },
-});

+ 0 - 6
static/vant/rate/index.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-icon": "../icon/index"
-  }
-}

+ 0 - 35
static/vant/rate/index.wxml

@@ -1,35 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-<wxs src="../wxs/style.wxs" module="style" />
-
-<view
-  class="{{ utils.bem('rate') }} custom-class"
-  bind:touchmove="onTouchMove"
->
-  <view
-    class="{{ utils.bem('rate__item') }}"
-    wx:for="{{ innerCountArray }}"
-    wx:key="index"
-    style="{{ style({ paddingRight: index !== count - 1 ? utils.addUnit(gutter) : null }) }}"
-  >
-    <van-icon
-      name="{{ index + 1 <= innerValue ? icon : voidIcon }}"
-      class="{{ utils.bem('rate__icon', [{ disabled, full: index + 1 <= innerValue }])}}"
-      style="{{ style({ fontSize: utils.addUnit(size) }) }}"
-      custom-class="icon-class"
-      data-score="{{ index }}"
-      color="{{ disabled ? disabledColor : index + 1 <= innerValue ? color : voidColor }}"
-      bind:click="onSelect"
-    />
-
-    <van-icon
-      wx:if="{{ allowHalf }}"
-      name="{{ index + 0.5 <= innerValue ? icon : voidIcon }}"
-      class="{{ utils.bem('rate__icon', ['half', { disabled, full: index + 0.5 <= innerValue }]) }}"
-      style="{{ style({ fontSize: utils.addUnit(size) }) }}"
-      custom-class="icon-class"
-      data-score="{{ index - 0.5 }}"
-      color="{{ disabled ? disabledColor : index + 0.5 <= innerValue ? color : voidColor }}"
-      bind:click="onSelect"
-    />
-  </view>
-</view>

+ 0 - 1
static/vant/rate/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-rate{display:-webkit-inline-flex;display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{position:relative;padding:0 2px;padding:0 var(--rate-horizontal-padding,2px)}.van-rate__item:not(:last-child){padding-right:4px;padding-right:var(--rate-icon-gutter,4px)}.van-rate__icon{display:block;height:1em;color:#c8c9cc;color:var(--rate-icon-void-color,#c8c9cc);font-size:20px;font-size:var(--rate-icon-size,20px)}.van-rate__icon--half{position:absolute;top:0;width:.5em;overflow:hidden;left:2px;left:var(--rate-horizontal-padding,2px)}.van-rate__icon--full,.van-rate__icon--half{color:#ee0a24;color:var(--rate-icon-full-color,#ee0a24)}.van-rate__icon--disabled{color:#c8c9cc;color:var(--rate-icon-disabled-color,#c8c9cc)}

+ 0 - 1
static/vant/search/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 78
static/vant/search/index.js

@@ -1,78 +0,0 @@
-import { VantComponent } from '../common/component';
-import { canIUseModel } from '../common/version';
-VantComponent({
-  field: true,
-  classes: ['field-class', 'input-class', 'cancel-class'],
-  props: {
-    label: String,
-    focus: Boolean,
-    error: Boolean,
-    disabled: Boolean,
-    readonly: Boolean,
-    inputAlign: String,
-    showAction: Boolean,
-    useActionSlot: Boolean,
-    useLeftIconSlot: Boolean,
-    useRightIconSlot: Boolean,
-    leftIcon: {
-      type: String,
-      value: 'search',
-    },
-    rightIcon: String,
-    placeholder: String,
-    placeholderStyle: String,
-    actionText: {
-      type: String,
-      value: '取消',
-    },
-    background: {
-      type: String,
-      value: '#ffffff',
-    },
-    maxlength: {
-      type: Number,
-      value: -1,
-    },
-    shape: {
-      type: String,
-      value: 'square',
-    },
-    clearable: {
-      type: Boolean,
-      value: true,
-    },
-  },
-  methods: {
-    onChange(event) {
-      if (canIUseModel()) {
-        this.setData({ value: event.detail });
-      }
-      this.$emit('change', event.detail);
-    },
-    onCancel() {
-      /**
-       * 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效
-       * https://github.com/youzan/@vant/weapp/issues/1768
-       */
-      setTimeout(() => {
-        if (canIUseModel()) {
-          this.setData({ value: '' });
-        }
-        this.$emit('cancel');
-        this.$emit('change', '');
-      }, 200);
-    },
-    onSearch(event) {
-      this.$emit('search', event.detail);
-    },
-    onFocus(event) {
-      this.$emit('focus', event.detail);
-    },
-    onBlur(event) {
-      this.$emit('blur', event.detail);
-    },
-    onClear(event) {
-      this.$emit('clear', event.detail);
-    },
-  },
-});

+ 0 - 6
static/vant/search/index.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-field": "../field/index"
-  }
-}

+ 0 - 50
static/vant/search/index.wxml

@@ -1,50 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-
-<view
-  class="{{ utils.bem('search', { withaction: showAction || useActionSlot }) }} custom-class"
-  style="background: {{ background }}"
->
-  <view class="{{ utils.bem('search__content', [shape]) }}">
-    <view class="van-search__label" wx:if="{{ label }}">{{ label }}</view>
-    <slot wx:else name="label" />
-
-    <van-field
-      type="search"
-      left-icon="{{ !useLeftIconSlot ? leftIcon : '' }}"
-      right-icon="{{ !useRightIconSlot ? rightIcon : '' }}"
-      focus="{{ focus }}"
-      error="{{ error }}"
-      border="{{ false }}"
-      confirm-type="search"
-      class="van-search__field field-class"
-      value="{{ value }}"
-      disabled="{{ disabled }}"
-      readonly="{{ readonly }}"
-      clearable="{{ clearable }}"
-      maxlength="{{ maxlength }}"
-      input-align="{{ inputAlign }}"
-      input-class="input-class"
-      placeholder="{{ placeholder }}"
-      placeholder-style="{{ placeholderStyle }}"
-      custom-style="padding: 5px 10px 5px 0; background-color: transparent;"
-      bind:blur="onBlur"
-      bind:focus="onFocus"
-      bind:change="onChange"
-      bind:confirm="onSearch"
-      bind:clear="onClear"
-    >
-      <slot wx:if="{{ useLeftIconSlot }}" name="left-icon" slot="left-icon" />
-      <slot wx:if="{{ useRightIconSlot }}" name="right-icon" slot="right-icon" />
-    </van-field>
-  </view>
-
-  <view
-    wx:if="{{ showAction || useActionSlot }}"
-    class="van-search__action"
-    hover-class="van-search__action--hover"
-    hover-stay-time="70"
-  >
-    <slot wx:if="{{ useActionSlot }}" name="action" />
-    <view wx:else bind:tap="onCancel" class="cancel-class">{{ actionText }}</view>
-  </view>
-</view>

+ 0 - 1
static/vant/search/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:12px;padding-left:var(--padding-sm,12px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:999px;border-radius:var(--border-radius-max,999px)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}

+ 0 - 1
static/vant/share-sheet/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 55
static/vant/share-sheet/index.js

@@ -1,55 +0,0 @@
-import { VantComponent } from '../common/component';
-VantComponent({
-  props: {
-    // whether to show popup
-    show: Boolean,
-    // overlay custom style
-    overlayStyle: Object,
-    // z-index
-    zIndex: {
-      type: Number,
-      value: 100,
-    },
-    title: String,
-    cancelText: {
-      type: String,
-      value: '取消',
-    },
-    description: String,
-    options: {
-      type: Array,
-      value: [],
-    },
-    overlay: {
-      type: Boolean,
-      value: true,
-    },
-    safeAreaInsetBottom: {
-      type: Boolean,
-      value: true,
-    },
-    closeOnClickOverlay: {
-      type: Boolean,
-      value: true,
-    },
-    duration: {
-      type: null,
-      value: 300,
-    },
-  },
-  methods: {
-    onClickOverlay() {
-      this.$emit('click-overlay');
-    },
-    onCancel() {
-      this.onClose();
-      this.$emit('cancel');
-    },
-    onSelect(event) {
-      this.$emit('select', event.detail);
-    },
-    onClose() {
-      this.$emit('close');
-    },
-  },
-});

+ 0 - 7
static/vant/share-sheet/index.json

@@ -1,7 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-popup": "../popup/index",
-    "options": "./options"
-  }
-}

+ 0 - 46
static/vant/share-sheet/index.wxml

@@ -1,46 +0,0 @@
-<wxs src="./index.wxs" module="computed" />
-
-<van-popup
-  round
-  class="van-share-sheet"
-  show="{{ show }}"
-  position="bottom"
-  overlay="{{ overlay }}"
-  duration="{{ duration }}"
-  z-index="{{ zIndex }}"
-  overlay-style="{{ overlayStyle }}"
-  close-on-click-overlay="{{ closeOnClickOverlay }}"
-  safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
-  bind:close="onClose"
-  bind:click-overlay="onClickOverlay"
->
-  <view class="van-share-sheet__header">
-    <view class="van-share-sheet__title">
-      <slot name="title" />
-    </view>
-    <view wx:if="{{ title }}" class="van-share-sheet__title">{{ title }}</view>
-
-    <view class="van-share-sheet__description">
-      <slot name="description" />
-    </view>
-    <view wx:if="{{ description }}" class="van-share-sheet__description">
-      {{ description }}
-    </view>
-  </view>
-
-  <block wx:if="{{ computed.isMulti(options) }}">
-    <options
-      wx:for="{{ options }}"
-      show-border="{{ index !== 0 }}"
-      wx:key="index"
-      options="{{ item }}"
-      bind:select="onSelect"
-    />
-  </block>
-
-  <options wx:else options="{{ options }}" bind:select="onSelect" />
-
-  <button type="button" class="van-share-sheet__cancel" bindtap="onCancel">
-    {{ cancelText }}
-  </button>
-</van-popup>

+ 0 - 12
static/vant/share-sheet/index.wxs

@@ -1,12 +0,0 @@
-/* eslint-disable */
-function isMulti(options) {
-  if (options == null || options[0] == null) {
-    return false;
-  }
-
-  return "Array" === options.constructor && "Array" === options[0].constructor;
-}
-
-module.exports = {
-  isMulti: isMulti
-};

+ 0 - 1
static/vant/share-sheet/index.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-share-sheet__header{padding:12px 16px 4px;text-align:center}.van-share-sheet__title{margin-top:8px;color:#323233;font-weight:400;font-size:14px;line-height:20px}.van-share-sheet__title:empty,.van-share-sheet__title:not(:empty)+.van-share-sheet__title{display:none}.van-share-sheet__description{display:block;margin-top:8px;color:#969799;font-size:12px;line-height:16px}.van-share-sheet__description:empty,.van-share-sheet__description:not(:empty)+.van-share-sheet__description{display:none}.van-share-sheet__cancel{display:block;box-sizing:initial;width:100%;height:auto;padding:0;font-size:16px;line-height:48px;text-align:center;background:#fff;border:none}.van-share-sheet__cancel:before{display:block;height:8px;background-color:#f7f8fa;content:" "}.van-share-sheet__cancel:after{display:none}.van-share-sheet__cancel:active{background-color:#f2f3f5}

+ 0 - 1
static/vant/share-sheet/options.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 14
static/vant/share-sheet/options.js

@@ -1,14 +0,0 @@
-import { VantComponent } from '../common/component';
-VantComponent({
-  props: {
-    options: Array,
-    showBorder: Boolean,
-  },
-  methods: {
-    onSelect(event) {
-      const { index } = event.currentTarget.dataset;
-      const option = this.data.options[index];
-      this.$emit('select', Object.assign(Object.assign({}, option), { index }));
-    },
-  },
-});

+ 0 - 3
static/vant/share-sheet/options.json

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

+ 0 - 20
static/vant/share-sheet/options.wxml

@@ -1,20 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-<wxs src="./options.wxs" module="computed" />
-
-<view class="{{ utils.bem('share-sheet__options', { border: showBorder }) }}">
-  <view
-    wx:for="{{ options }}"
-    wx:key="index"
-    class="van-share-sheet__option"
-    data-index="{{ index }}"
-    bindtap="onSelect"
-  >
-    <button class="van-share-sheet__button" open-type="{{ item.openType }}">
-      <image src="{{ computed.getIconURL(item.icon) }}" class="van-share-sheet__icon" />
-    </button>
-    <view wx:if="{{ item.name }}" class="van-share-sheet__name">{{ item.name }}</view>
-    <view wx:if="{{ item.description }}" class="van-share-sheet__option-description">
-      {{ item.description }}
-    </view>
-  </view>
-</view>

+ 0 - 14
static/vant/share-sheet/options.wxs

@@ -1,14 +0,0 @@
-/* eslint-disable */
-var PRESET_ICONS = ['qq', 'link', 'weibo', 'wechat', 'poster', 'qrcode', 'weapp-qrcode', 'wechat-moments'];
-
-function getIconURL(icon) {
-  if (PRESET_ICONS.indexOf(icon) !== -1) {
-    return 'https://img.yzcdn.cn/vant/share-sheet-' + icon + '.png';
-  }
-
-  return icon;
-}
-
-module.exports = {
-  getIconURL: getIconURL,
-};

+ 0 - 1
static/vant/share-sheet/options.wxss

@@ -1 +0,0 @@
-@import '../common/index.wxss';.van-share-sheet__options{position:relative;display:-webkit-flex;display:flex;padding:16px 0 16px 8px;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}.van-share-sheet__options--border:before{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:0;right:0;left:16px;border-top:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-user-select:none;user-select:none}.van-share-sheet__option:active{opacity:.7}.van-share-sheet__button{height:auto;padding:0;line-height:inherit;background-color:initial;border:0}.van-share-sheet__button:after{border:0}.van-share-sheet__icon{width:48px;height:48px;margin:0 16px}.van-share-sheet__name{margin-top:8px;padding:0 4px;color:#646566;font-size:12px}.van-share-sheet__option-description{padding:0 4px;color:#c8c9cc;font-size:12px}

+ 0 - 1
static/vant/sidebar-item/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 29
static/vant/sidebar-item/index.js

@@ -1,29 +0,0 @@
-import { VantComponent } from '../common/component';
-import { useParent } from '../common/relation';
-VantComponent({
-  classes: ['active-class', 'disabled-class'],
-  relation: useParent('sidebar'),
-  props: {
-    dot: Boolean,
-    badge: null,
-    info: null,
-    title: String,
-    disabled: Boolean,
-  },
-  methods: {
-    onClick() {
-      const { parent } = this;
-      if (!parent || this.data.disabled) {
-        return;
-      }
-      const index = parent.children.indexOf(this);
-      parent.setActive(index).then(() => {
-        this.$emit('click', index);
-        parent.$emit('change', index);
-      });
-    },
-    setActive(selected) {
-      return this.setData({ selected });
-    },
-  },
-});

Някои файлове не бяха показани, защото твърде много файлове са промени