Browse Source

fix:删compoments的组件d=

chenzhen2 1 year ago
parent
commit
5cde5e0b37

+ 0 - 65
src/components/common/FollowBtn.wpy

@@ -1,65 +0,0 @@
-<style lang="less">
-.component-follow-btn {
-  width: 100%;
-  height: 100%;
-}
-</style>
-
-<template>
-  <block v-if="followed !== null">
-    <block v-if="followed">
-      <slot name="followed-content"></slot>
-    </block>
-    <slot name="un-followed-content" v-else v-on:click="toFollow"></slot>
-  </block>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-import store from '@/store';
-import { mapState } from '@wepy/x';
-import { getUserHasFollowed } from '@/api/home';
-wepy.component({
-  store,
-  mame: 'FollowBtn',
-  data: {
-    followed: null,
-    linkUrl: ''
-  },
-  options: {
-    multipleSlots: true
-  },
-  props: {},
-  created() {
-    if (this.token) {
-      this.getData();
-    }
-  },
-  computed: {
-    ...mapState({ token: state => state.user.token })
-  },
-  watch: {
-    token(curVal, oldVal) {
-      if (curVal && !oldVal) {
-        this.getData();
-      }
-    }
-  },
-  methods: {
-    getData() {
-      getUserHasFollowed().then(res => {
-        let result = res.data || {};
-        this.followed = result.subscribe;
-        this.linkUrl = result.publicWechatUrl;
-      });
-    },
-    toFollow() {
-      wx.navigateTo({
-        url: `/h5/pages/external-view/h5?url=${encodeURIComponent(
-          this.linkUrl
-        )}`
-      });
-    }
-  }
-});
-</script>

+ 0 - 91
src/components/common/action-sheet-list.wpy

@@ -1,91 +0,0 @@
-<style lang="less">
-.component-action-sheet-list {
-  background: rgba(196, 196, 196, 0.2);
-  border-radius: 40rpx 40rpx 0 0;
-  overflow: hidden;
-  .option-list {
-    background: #fff;
-    width: 100%;
-    margin-bottom: 20rpx;
-    .option-item {
-      width: 100%;
-      height: 110rpx;
-      font-size: 32rpx;
-      line-height: 110rpx;
-      color: #000000;
-      text-align: center;
-    }
-  }
-  .btn-cancel {
-    height: 178rpx;
-    width: 100%;
-    background: #fff;
-    font-size: 32rpx;
-    line-height: 110rpx;
-    color: #000000;
-    text-align: center;
-  }
-}
-</style>
-
-<template>
-  <slider-panel
-    slidDoneEmitId="hidePanel"
-    @hidePanel="hidePanel"
-    showClose="{{false}}"
-    showSliderIcon="{{false}}"
-  >
-    <div class="component-action-sheet-list">
-      <div class="option-list">
-        <div
-          class="option-item"
-          v-for="item in options"
-          v-on:click="selectOption(item)"
-        >{{item.label}}</div>
-      </div>
-      <div class="btn-cancel" v-on:click="cancel">{{cancelText}}</div>
-    </div>
-  </slider-panel>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-
-let pageTouchStartY = 0;
-let isPageTouchStart = false;
-let componentTop = 0;
-wepy.component({
-  props: {
-    options: Array,
-    cancelText: {
-      type: String,
-      default: '取消'
-    }
-  },
-  ready() {},
-  data: {},
-  methods: {
-    hidePanel() {
-      this.$emit('component-action-sheet-close');
-    },
-    selectOption(item) {
-      this.$emit('component-action-sheet-slide-choose', item);
-    },
-    cancel() {
-      this.$emit('component-action-sheet-close');
-    }
-  }
-});
-</script>
-
-
-<config>
-{
-    usingComponents: {
-      'slider-panel': '~@/components/common/slider-panel',
-    },
-    "componentPlaceholder": {
-      "slider-panel": "view"
-    }
-}
-</config>

+ 0 - 119
src/components/common/action-sheet.wpy

@@ -1,119 +0,0 @@
-<style lang="less">
-.component-container {
-  position: fixed;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  background: #0000001f;
-  z-index: 20; //因为导航栏的z-index 为11 故为了遮住导航栏
-  .content-wrap {
-    position: absolute;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    height: 420rpx;
-    border-radius: 24rpx 24rpx 0px 0px;
-    background: #f2f2f2;
-    overflow: hidden;
-    .title {
-      height: 112rpx;
-      line-height: 112rpx;
-      text-align: center;
-      border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
-      background: #ffffff;
-      span,
-      label {
-        font-size: 28rpx;
-        color: #000000;
-        mix-blend-mode: normal;
-        opacity: 0.5;
-      }
-    }
-    .confrim {
-      height: 112rpx;
-      line-height: 112rpx;
-      text-align: center;
-      border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
-      background: #ffffff;
-      span,
-      label {
-        font-size: 34rpx;
-        color: #fa5151;
-        mix-blend-mode: normal;
-        opacity: 0.9;
-      }
-    }
-    .cancel {
-      position: absolute;
-      left: 0;
-      right: 0;
-      bottom: 0;
-      height: 180rpx;
-      padding-top: 32rpx;
-      text-align: center;
-      background: #ffffff;
-      box-sizing: border-box;
-      span,
-      label {
-        font-size: 34rpx;
-        line-height: 48rpx;
-        color: #000000;
-        mix-blend-mode: normal;
-        opacity: 0.9;
-      }
-    }
-  }
-}
-</style>
-
-<template>
-  <div class="component-container">
-    <div class="content-wrap">
-      <div class="title">
-        <span>{{ title }}</span>
-      </div>
-      <div class="confrim">
-        <span @click="confirm">{{ confirmText }}</span>
-      </div>
-      <div class="cancel">
-        <span @click="cancel">{{ cancelText }}</span>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-
-let pageTouchStartY = 0;
-let isPageTouchStart = false;
-let componentTop = 0;
-wepy.component({
-  props: {
-    // 注意同一个页面使用多个该组件时该值是否要保持唯一
-    confirmEmitId: String,
-    cancelEmitId: String,
-    title: String,
-    confirmText: String,
-    cancelText: {
-      type: String,
-      default: '取消',
-    },
-  },
-  ready() {},
-  data: {},
-  methods: {
-    confirm() {
-      if (this.confirmEmitId) {
-        this.$emit(this.confirmEmitId);
-      }
-    },
-    cancel() {
-      if (this.cancelEmitId) {
-        this.$emit(this.cancelEmitId);
-      }
-    },
-  },
-});
-</script>

+ 0 - 115
src/components/common/carousel.wpy

@@ -1,115 +0,0 @@
-<style lang="less">
-.carousel-container {
-  width: 100%;
-  height: 100%;
-  .imgs-container {
-    width: 100%;
-    height: 100%;
-    overflow: hidden;
-    position: relative;
-    .swiper {
-      height: 100%;
-    }
-    .imgs-wrap {
-      height: 100%;
-      display: flex;
-      justify-items: flex-start;
-      align-items: flex-start;
-      flex-wrap: nowrap;
-    }
-    .wrap-transition {
-      transition: ease-in-out .5s;
-    }
-    .img-block {
-      width: 100%;
-      height: 100%;
-      background-size: cover;
-      background-position: center;
-      background-repeat: no-repeat;
-      flex: none;
-    }
-  }
-  .dots {
-    position: absolute;
-    z-index: 1;
-    bottom: 16rpx;
-    left: 50%;
-    transform: translateX(-50%);
-    width: 50%;
-    height: 16rpx;
-    display: flex;
-    justify-content: center;
-    align-items: flex-start;
-    .dot {
-      display: inline-block;
-      height: 16rpx;
-      width: 16rpx;
-      border-radius: 50%;
-      border: 1rpx solid #FFFFFF;
-      background: transparent;
-      margin-right: 12rpx;
-    }
-    .dot:nth-last-child(1) {
-      margin-right: 0;
-      display: none;
-    }
-    .dot-actived {
-      background: #FFFFFF;
-    }
-  }
-}
-</style>
-
-<template>
-  <div class="carousel-container" ref="container">
-    <div class="imgs-container" v-if="imgs.length">
-      <swiper
-        class="swiper"
-        :indicator-dots="true" :autoplay="true" :circular="true"
-        :interval="3000" easing-function="easeInOutCubic"
-        indicator-color="rgba(255, 255, 255, .5)" indicator-active-color="#ffffff">
-        <swiper-item v-for="(img, index) in imgs" :key="index">
-          <div  class="img-block"
-            :style="{ 'background-image': 'url('+h5Origin+'/'+img.imageUrl+')'}"
-            @click="goDetail(img.innerUrl)"
-          ></div>
-          <view class="swiper-item {{item}}"></view>
-        </swiper-item>
-      </swiper>
-    </div>
-  </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-import config from '@/config';
-import utils from '../../common/utils.js';
-
-const DEFAULT_INTERVAL = 3000
-const DEFAULT_ANIMATION_TIME = 500
-wepy.component({
-  props: {
-    imgs: Array,
-    interval: Number
-  },
-  data: {
-    h5Origin: config.h5Origin,
-  },
-  computed: {
-  },
-  watch: {
-    imgs (val) {
-      // console.log(val)
-    }
-  },
-  methods: {
-    goDetail(absUrl) {
-      wx.navigateTo({
-        url: `/h5/pages/external-view/h5?url=${absUrl}`,
-      });
-    }
-  },
-  ready() {
-  }
-});
-</script>

+ 0 - 51
src/components/common/common-button.wpy

@@ -1,51 +0,0 @@
-<style lang="less">
-.button-wrap {
-  margin: 0 auto;
-  width: 480rpx;
-  height: 112rpx;
-  line-height: 112rpx;
-  background: #ffda1a;
-  box-shadow: 0px 4px 12px rgba(255, 218, 26, 0.3);
-  border-radius: 40rpx;
-  text-align: center;
-  font-weight: 500;
-  font-size: 32rpx;
-  color: rgba(13, 13, 61, 0.86);
-  .icon {
-    margin-right: 16rpx;
-    width: 28rpx;
-    height: 28rpx;
-    vertical-align: middle;
-  }
-  .text {
-    vertical-align: middle;
-  }
-}
-</style>
-
-<template>
-  <div class="button-wrap" v-on:click="submit">
-    <image class="icon" v-if="icon" src="{{icon}}" />
-    <span class="text" v-if="text">{{ text }}</span>
-  </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-
-wepy.component({
-  props: {
-    icon: String,
-    text: String,
-    clickEmitId: String,
-  },
-  ready() {},
-  methods: {
-    submit() {
-      if (this.clickEmitId) {
-        this.$emit(this.clickEmitId);
-      }
-    },
-  },
-});
-</script>

+ 0 - 89
src/components/common/data-none.wpy

@@ -1,89 +0,0 @@
-<style lang="less">
-.components-date-none {
-  position: fixed;
-  bottom: 43.3%;
-  left: 0;
-  right: 0;
-  .wrap {
-    text-align: center;
-    &.center {
-      display: flex;
-      flex-direction: column;
-      justify-content: center;
-      height: 100%;
-    }
-
-    .desc {
-      font-family: PingFang SC;
-      margin-top: 32rpx;
-      font-size: 34rpx;
-      line-height: 48rpx;
-      color: #c4c4c4;
-    }
-
-    .poster {
-      margin: 0 auto;
-      width: 200rpx;
-      height: 200rpx;
-      display: block;
-    }
-  }
-}
-</style>
-
-<template>
-  <div class="components-date-none">
-    <div class="wrap {{position}}">
-      <Icon
-        v-if="iconName"
-        :name="iconName"
-        size="100"
-        color="rgba(196, 196, 196, 0.4)"
-        weight="200"
-      />
-      <img v-else-if="imgUrl" class="poster" :src="imgUrl" />
-
-      <div class="desc">
-        <span>{{ desc }}</span>
-      </div>
-    </div>
-  </div>
-</template>
-
-
-<script>
-import wepy from '@wepy/core';
-
-wepy.component({
-  props: {
-    desc: String,
-    // 有的需要在剩余位置中居中处理
-    position: {
-      type: String,
-      default: ''
-    },
-    iconName: {
-      type: String
-    },
-    iconColor: {
-      type: String,
-      default: ''
-    },
-    imgUrl: {
-      type: String,
-      default: ''
-    }
-  }
-});
-</script>
-
-<config>
-{
-  "usingComponents": {
-    "Icon": "~@/components/TUI/Icon"
-  },
-  "componentPlaceholder": {
-    "Icon": "view"
-  }
-}
-</config>

+ 0 - 76
src/components/common/dot.wpy

@@ -1,76 +0,0 @@
-<style lang="less">
-.dot {
-  width: 5px;
-  height: 5px;
-  border-radius: 50%;
-}
-.orange {
-  background: rgba(255, 136, 77, 0.8);
-  box-shadow: 0px 4px 12px rgba(255, 136, 77, 0.8),
-    0px 0px 4px rgba(255, 136, 77, 0.8);
-}
-.blue {
-  background: rgba(77, 148, 255, 0.8);
-  box-shadow: 0px 4px 12px rgba(77, 148, 255, 0.8),
-    0px 0px 4px rgba(77, 148, 255, 0.8);
-}
-.green {
-  background: rgba(52, 209, 157, 0.8);
-  box-shadow: 0px 4px 12px rgba(52, 209, 157, 0.8),
-    0px 0px 4px rgba(52, 209, 157, 0.8);
-}
-.dot-flicker {
-  animation: flicker 2s infinite linear;
-  -webkit-animation: flicker 2s infinite linear;
-}
-@keyframes flicker {
-  0% {
-    opacity: 1;
-  }
-  50% {
-    opacity: 0;
-  }
-  100% {
-    opacity: 1;
-  }
-}
-@-webkit-keyframes flicker {
-  0% {
-    opacity: 1;
-  }
-  50% {
-    opacity: 0;
-  }
-  100% {
-    opacity: 1;
-  }
-}
-</style>
-
-<template>
-  <div
-    class="dot"
-    :class="{'dot-flicker': isFlicker,
-      'orange': colorType=='orange',
-      'blue': colorType=='blue',
-      'green': colorType=='green'}">
-    </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-
-wepy.component({
-  props: {
-    colorType: {
-      type: String,
-      default: 'orange'
-    },
-    // 是否闪烁
-    isFlicker: {
-      type: Boolean,
-      default: false
-    }
-  }
-});
-</script>

+ 0 - 96
src/components/common/input-with-clear.wpy

@@ -1,96 +0,0 @@
-<style lang="less">
-.component-input {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  position: relative;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-  align-items: center;
-  background: rgba(196, 196, 196, 0.2);
-  border-radius: 44rpx;
-  padding-left: 80rpx;
-}
-
-.icon-search-wrap {
-  position: absolute;
-  left: 28rpx;
-  top: 28rpx;
-  .icon {
-    width: 32rpx;
-    height: 32rpx;
-    display: block;
-  }
-}
-.component-input .input {
-  height: 100%;
-  flex: 1;
-  box-sizing: border-box;
-  padding: 0;
-  background: transparent;
-  font-size: 48rpx;
-  font-size: 30rpx;
-  line-height: 100%;
-  color: #000;
-}
-
-.component-input .clear {
-  height: 100%;
-  width: 72rpx;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-}
-</style>
-
-<template>
-  <div class="component-input">
-    <label v-if="isShowSearch" class="icon-search-wrap" for="component-input">
-      <image class="icon" src="{{h5StaticPath+ '/icon-search.svg'}}" />
-    </label>
-    <input
-      id="component-input"
-      class="input"
-      :placeholder="placeholder"
-      :value="value"
-      bindinput="changeValue"
-      placeholder-style="{{placeholderStyle || 'color:#AFAFC1;'}}"
-    />
-    <div class="clear" v-if="value" v-on:click="clear()">
-      <icon type="clear" size="16" class="icon-close"></icon>
-    </div>
-  </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-import config from '@/config';
-
-wepy.component({
-  data: {
-    h5StaticPath: config.h5StaticPath
-  },
-  props: {
-    placeholder: String,
-    value: String,
-    placeholderStyle: String,
-    isShowSearch: {
-      type: Boolean,
-      default: false
-    }
-  },
-  methods: {
-    clear() {
-      this.changeValueFun('');
-    },
-    changeValue(e) {
-      let value = e.$wx.detail.value;
-      this.changeValueFun(value);
-    },
-    changeValueFun(text) {
-      this.$emit('component-input-with-clear-change', text);
-    }
-  }
-});
-</script>

+ 0 - 60
src/components/common/page-bottom-button.wpy

@@ -1,60 +0,0 @@
-<style lang="less">
-.page-bottom-button {
-  position: fixed;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  height: 280rpx;
-  background-size: 100%;
-  z-index: 1;
-  .button-container {
-    position: absolute;
-    left: 0;
-    right: 0;
-    bottom: 80rpx;
-  }
-}
-</style>
-
-<template>
-    <div class="page-bottom-button" :style="{'background-image': 'url('+h5StaticPath+'/page_bottom_btn_bg.png)'}">
-        <div class="button-container">
-            <common-button text="{{text}}" icon="{{icon}}" click-emit-id="pageBottomBtnEmitId" v-on:pageBottomBtnEmitId="submit" />
-        </div>
-    </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-import config from '@/config';
-
-wepy.component({
-  props: {
-    icon: String,
-    text: String,
-    clickEmitId: String
-  },
-  data: {
-    h5StaticPath: config.h5StaticPath
-  },
-  ready() {},
-  methods: {
-    submit() {
-      if (this.clickEmitId) {
-        this.$emit(this.clickEmitId);
-      }
-    }
-  }
-});
-</script>
-
-<config>
-{
-    usingComponents: {
-      'common-button': '~@/components/common/common-button'
-    },
-    "componentPlaceholder": {
-      "common-button": "view"
-    }
-}
-</config>

+ 0 - 115
src/components/common/page-pull-down-animation.wpy

@@ -1,115 +0,0 @@
-<style lang="less">
-.page-pull-down-animation {
-  width: 100%;
-  .page-top-pic {
-    width: 100%;
-    // overflow-x: hidden;
-    overflow: hidden;
-    image {
-      width: 100%;
-      height: 100%;
-      transition: all 0.1s;
-      transform-origin: bottom center;
-    }
-  }
-  .page-content {
-    width: 100%;
-  }
-}
-</style>
-
-<template>
-  <!-- <div class="page-pull-down-animation" v-on:touchstart="pageTouchStart" v-on:touchmove="pageTouchMove" v-on:touchend="pageTouchEnd"> -->
-  <div class="page-pull-down-animation">
-    <div class="page-top-pic" :style="{'margin-top': picTop+'rpx', 'height': picHeight+'rpx', 'background-color': bgColor}">
-      <image :style="{'transform': 'scale('+picScale+')'}" src="{{pic}}" />
-    </div>
-    <div class="page-content">
-      <slot></slot>
-    </div>
-  </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-
-let pageTouchStartY = 0;
-let isPageTouchStart = false;
-let picTop = 0;
-let picHeight = 0;
-wepy.component({
-  props: {
-    // 顶部图片地址
-    pic: String,
-    // 图片尺寸-高,单位rpx
-    height: Number,
-    // 顶部图片超出上边界的距离,单位rpx
-    top: Number,
-    // 组件id
-    elementId: String,
-    // 背景颜色
-    bgColor: String
-  },
-  data: {
-    picScale: 1,
-    picHeight: 0,
-    picTop: 0,
-    pageContentPaddingTop: 0
-  },
-  ready() {
-    picHeight = Number(this.height || 0);
-    if (!this.top && this.top != 0) {
-      picTop = -(picHeight / 3);
-    } else {
-      picTop = Number(this.top);
-    }
-    this.picTop = picTop;
-    this.picHeight = picHeight;
-    this.pageContentPaddingTop = picHeight + picTop;
-    if(!this.bgColor){
-      this.bgColor = "transparent"
-    }
-  },
-  methods: {
-    pageTouchStart(e) {
-      wx.createSelectorQuery()
-        .select('#' + this.elementId)
-        .boundingClientRect(function(rect) {
-          let top = rect.top;
-          if (top >= 0) {
-            try {
-              let touch = e.touches[0]; //获取第一个触点
-              //记录触点初始位置
-              pageTouchStartY = Number(touch.pageY); //页面触点Y坐标
-              isPageTouchStart = true;
-            } catch (err) {
-              console.log(err.message);
-            }
-          }
-        })
-        .exec();
-    },
-    pageTouchMove(e) {
-      if (!isPageTouchStart) {
-        return;
-      }
-      try {
-        let touch = e.touches[0], //获取第一个触点
-          y = Number(touch.pageY); //页面触点Y坐标
-        let touchLength = (y - pageTouchStartY);
-        if (touchLength >= 0) {
-          this.picScale = (touchLength * 2 + picHeight) / picHeight;
-        } else {
-          this.picScale = 1;
-        }
-      } catch (err) {
-        console.log(err.message);
-      }
-    },
-    pageTouchEnd(e) {
-      isPageTouchStart = false;
-      this.picScale = 1;
-    }
-  }
-});
-</script>

+ 0 - 75
src/components/common/page-title-view-scroll.wpy

@@ -1,75 +0,0 @@
-<style lang="less">
-  .page-top {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    background-color: transparent;
-    z-index: 1;
-
-    .page-title {
-      position: absolute;
-      top: 50%;
-      left: 50%;
-      transform: translate(-50%, -50%);
-      height: 48rpx;
-      line-height: 48rpx;
-      font-size: 32rpx;
-      color: #ffffff;
-    }
-  }
-</style>
-
-<template>
-  <div class="page-top" :style="{'top': pageTopBarTop + 'px'}">
-    <slot></slot>
-    <div class="page-title">
-      <span v-show="isViewPageTitle" :style="{'color': pageTitleColor}">{{pageTitle}}</span>
-    </div>
-  </div>
-</template>
-
-<script>
-  import wepy from '@wepy/core';
-
-  let menuButtonBoundingClientRect;
-  wepy.component({
-    props: {
-      pageTitle: String,
-      pageTitleColor: String,
-      observeTarget: String
-    },
-    data: {
-      isViewPageTitle: false,
-      pageTopBarTop: 0
-    },
-    ready() {
-      menuButtonBoundingClientRect = wx.getMenuButtonBoundingClientRect();
-      this.pageTopBarTop =
-        menuButtonBoundingClientRect.top +
-        menuButtonBoundingClientRect.height / 2;
-      this.observePageTitle();
-    },
-    methods: {
-      observePageTitle() {
-        let top = menuButtonBoundingClientRect.top + menuButtonBoundingClientRect.bottom + menuButtonBoundingClientRect.height;
-        var query = wx.createSelectorQuery();
-        query.select(this.observeTarget).boundingClientRect();
-        query.exec(res => {
-          top -= res[0].height;
-          wx.createIntersectionObserver()
-            .relativeToViewport({
-              top: -top
-            })
-            .observe(this.observeTarget, res => {
-              if (res.intersectionRatio === 0) {
-                this.isViewPageTitle = true;
-              } else {
-                this.isViewPageTitle = false;
-              }
-            });
-        });
-      }
-    }
-  });
-</script>

+ 0 - 144
src/components/common/panel-can-close.wpy

@@ -1,144 +0,0 @@
-<style lang="less">
-.component-panel-can-close-wrapper {
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  z-index: 2;
-  background-color: rgba(0, 0, 0, 0.4);
-}
-.component-panel-can-close {
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  z-index: 3;
-  box-shadow: 0px 0px 4px rgba(1, 1, 51, 0.02),
-    0px 0px 40px rgba(1, 1, 51, 0.08);
-  border-radius: 32rpx 32rpx 0 0;
-  min-height: 400rpx;
-  animation: slideUp 0.3s linear;
-  -webkit-animation: slideUp 0.3s linear;
-  background-color: #fff;
-}
-
-.component-panel-can-close .content {
-  position: relative;
-}
-
-.component-panel-can-close .closed-wrapper {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 112rpx;
-  height: 112rpx;
-  z-index: 3;
-}
-
-.component-panel-can-close .closed {
-  position: absolute;
-  top: 24rpx;
-  right: 24rpx;
-  background: rgba(2, 2, 82, 0.03);
-  width: 48rpx;
-  height: 48rpx;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  border-radius: 50%;
-}
-
-.icon-close-image {
-  width: 20rpx;
-  height: 20rpx;
-  display: block;
-}
-</style>
-
-<template>
-  <div
-    class="component-panel-can-close-wrapper"
-    style="{{'display:'+ (show?'block;': 'none;')}}"
-    v-if="show"
-  >
-    <div
-      class="component-panel-can-close"
-      style="{{('transform:translateY('+translateY+'px)'+';')}}"
-      v-on:touchmove.stop="pageTouchMove"
-      v-on:touchstart="pageTouchStart"
-      v-on:touchend="pageTouchEnd"
-    >
-      <div class="content">
-        <div class="closed-wrapper" v-on:click="closePanel">
-          <div class="closed">
-            <image class="icon-close-image" :src="h5StaticPath+'/icon_close_gray.png'" />
-          </div>
-        </div>
-        <slot></slot>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-import config from '@/config';
-let pageTouchStartY = 0;
-wepy.component({
-  data: {
-     h5StaticPath: config.h5StaticPath,
-    showPanel: false,
-    translateY: 0
-  },
-  props: {
-    show: Boolean,
-    containerId: String
-  },
-  watch:{
-     show: function(newShow, oldShow) {
-      if (oldShow !== newShow) {
-        this.show = newShow;
-      }
-    }
-  },
-  methods: {
-    closePanel() {
-     this.show = false;
-     this.$emit('compnent-panel-close-close');
-    },
-    pageTouchStart(e) {
-      try {
-        let touch = e.touches[0]; //获取第一个触点
-        //记录触点初始位置
-        pageTouchStartY = Number(touch.pageY); //页面触点Y坐标
-      } catch (err) {
-        console.log(err.message);
-      }
-    },
-    pageTouchMove(e) {
-      try {
-        let touch = e.touches[0], //获取第一个触点
-          y = Number(touch.pageY); //页面触点Y坐标
-        let touchLength = parseInt(y - pageTouchStartY);
-        // 下滑
-        if (touchLength >= 0) {
-         this.translateY =  touchLength;
-        }
-      } catch (err) {
-        console.log(err.message);
-      }
-    },
-    pageTouchEnd(e) {
-      if (this.translateY >= 200) {
-        this.closePanel();
-      }
-      this.translateY =  0;
-    },
-    stopPropagation() {
-      // 空方法,阻止冒泡用
-    }
-  }
-});
-</script>

+ 0 - 314
src/components/common/panel-step.wpy

@@ -1,314 +0,0 @@
-<style lang="less">
-.component-step-panel-mask {
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  z-index: 2;
-  background-color: rgba(0, 0, 0, 0.4);
-}
-.component-step-panel-content {
-  position: absolute;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  z-index: 3;
-  box-shadow: 0px 0px 4px rgba(1, 1, 51, 0.02),
-    0px 0px 40px rgba(1, 1, 51, 0.08);
-  border-radius: 32rpx 32rpx 0 0;
-  background: #fff;
-  &.hasAnimation {
-    transition: transform 0.3s ease-out;
-  }
-}
-
-.component-step-panel {
-  position: relative;
-}
-.component-step-panel .pre-step-wrapper {
-  position: absolute;
-  top: 0;
-  left: 0;
-  height: 112rpx;
-  width: 112rpx;
-  z-index: 3;
-}
-.component-step-panel .step-content {
-  display: flex;
-  flex-direction: row;
-  align-items: flex-start;
-  overflow-x: hidden;
-  transition: transform 0.3s ease-out;
-}
-
-.component-step-panel .step-item {
-  overflow: hidden;
-  display: block;
-}
-
-.component-step-panel .pre-step {
-  position: absolute;
-  top: 24rpx;
-  left: 24rpx;
-  width: 48rpx;
-  height: 48rpx;
-  background: rgba(2, 2, 82, 0.03);
-  border-radius: 50%;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-}
-
-.component-step-panel .pre-step .icon-arrow {
-  width: 16rpx;
-  height: 24rpx;
-}
-
-.component-step-panel .closed-wrapper {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 112rpx;
-  height: 112rpx;
-  z-index: 3;
-}
-
-.component-step-panel .closed {
-  position: absolute;
-  top: 24rpx;
-  right: 24rpx;
-  background: rgba(2, 2, 82, 0.03);
-  width: 48rpx;
-  height: 48rpx;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  border-radius: 50%;
-}
-
-.component-step-panel .icon-close-image {
-  width: 20rpx;
-  height: 20rpx;
-  display: block;
-}
-</style>
-
-<template>
-  <div
-    class="component-step-panel-mask"
-    v-if="show"
-    v-on:touchmove="stopPropagation"
-    v-on:touchstart="stopPropagation"
-    v-on:touchend="stopPropagation"
-  >
-    <div
-      class="component-step-panel-content"
-      :class="{'hasAnimation': hasAnimation}"
-      style="{{('transform:translateY('+translateY+')'+';')}}"
-      v-on:touchmove="pageTouchMove"
-      v-on:touchstart="pageTouchStart"
-      v-on:touchend="pageTouchEnd"
-    >
-      <div class="component-step-panel">
-        <div class="pre-step-wrapper" v-on:click.stop="goPreStep" v-if="step!=1">
-          <div class="pre-step">
-            <image class="icon-arrow" :src="h5StaticPath+'/icon_back_gray_weight.png'" />
-          </div>
-        </div>
-        <div class="closed-wrapper" @click="closePanel">
-          <div class="closed">
-            <image class="icon-close-image" :src="h5StaticPath+'/icon_close_gray.png'" />
-          </div>
-        </div>
-        <div
-          class="step-content"
-          :style="{width:(screenWidth*steps+'px'),transform:('translate('+(-(step-1)*screenWidth)+'px,'+(0)+'px)')}"
-        >
-          <div
-            v-for="(item, index) in stepsArr"
-            :key="index"
-            class="{{'step-item '+(item)}}"
-            style="{{'width:'+screenWidth+'px'}}"
-          >
-            <slot :name="item"></slot>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-import config from '@/config';
-let pageTouchStartY = 0;
-let moveY = 0;
-wepy.component({
-  options: {
-    multipleSlots: true // 在组件定义时的选项中启用多slot支持
-  },
-  data: {
-    h5StaticPath: config.h5StaticPath,
-    stepsArr: [],
-    stepHeights: [],
-    contanierHeight: 0,
-    translateY: '100%',
-    translateX: 0,
-    screenWidth: 375,
-    oldStep: 0,
-    hiddenOldStep: false,
-    hasAnimation: false
-  },
-  props: {
-    steps: Number,
-    step: Number,
-    panelHeightHasChange: Boolean,
-    show: Boolean,
-    containerId: String
-  },
-  ready() {
-    this.generateStepArrar();
-    // 防止内部元素未加载完毕
-    setTimeout(() => {
-      this.getStepHieght();
-    }, 20);
-    this.setStepContanierWidth();
-  },
-  watch: {
-    step: function(newStep, oldStep) {
-      if (oldStep !== newStep) {
-        //更新时候重新设置值
-        // 当首次更改的时候,第一次设置值,此时元素还未加载完,故加上延迟
-        if (!oldStep) {
-          setTimeout(() => {
-            this.getStepHieght();
-          }, 200);
-        } else {
-          this.getStepHieght();
-        }
-      }
-    },
-    panelHeightHasChange: function(newPanelHeightChange, oldPanelHeightChange) {
-      if (oldPanelHeightChange == false && newPanelHeightChange == true) {
-        this.getStepHieght(); //更新时候重新设置值
-      }
-    },
-    show: function(newShow, oldShow) {
-      if (oldShow !== newShow) {
-        this.show = newShow;
-        // 当首次更改的时候,第一次设置值,此时元素还未加载完,故加上延迟
-        if (oldShow == null) {
-          setTimeout(() => {
-            this.getStepHieght();
-          }, 200);
-        } else {
-          this.getStepHieght();
-        }
-
-        if (!oldShow && newShow) {
-          this.hasAnimation = true;
-          setTimeout(() => {
-            this.hasAnimation = false;
-          }, 300);
-        }
-      }
-    }
-  },
-  methods: {
-    generateStepArrar() {
-      const { steps } = this;
-      let stepsArr = [];
-      for (let i = 1; i <= steps; i++) {
-        let stepClassName = 'step' + i;
-        stepsArr.push(stepClassName);
-      }
-      this.stepsArr = stepsArr;
-    },
-    getStepHieght() {
-      const { show, step } = this;
-      if (!show) {
-        return;
-      }
-      this.setStepTranslste();
-    },
-    setStepTranslste() {
-      const { step, containerId } = this;
-      if (!this.stepsArr.length) {
-        this.generateStepArrar();
-      }
-      let { stepsArr } = this;
-      let selector = this.$wx
-        .createSelectorQuery()
-        .select('.step-content')
-        .boundingClientRect();
-      let stepClassName = stepsArr[step - 1];
-      selector = selector.select(`.${stepClassName}`).boundingClientRect();
-
-      selector.exec(ret => {
-        this.translateY = ret[0].height - ret[1].height + 'px';
-      });
-    },
-    setStepContanierWidth() {
-      wx.getSystemInfo({
-        success: res => {
-          let screenWidth = res.screenWidth;
-          this.screenWidth = screenWidth;
-        }
-      });
-    },
-    goPreStep() {
-      this.$emit('component-panel-step-back');
-    },
-    closePanel() {
-      this.show = false;
-      this.$emit('component-panel-step-close');
-    },
-    pageTouchStart(e) {
-      try {
-        let touch = e.touches[0]; //获取第一个触点
-        //记录触点初始位置
-        pageTouchStartY = Number(touch.pageY); //页面触点Y坐标
-      } catch (err) {
-        console.log(err.message);
-      }
-    },
-    pageTouchMove(e) {
-      try {
-        let touch = e.touches[0], //获取第一个触点
-          y = Number(touch.pageY); //页面触点Y坐标
-
-        let touchLength = parseInt(y - pageTouchStartY);
-        pageTouchStartY = y;
-        moveY = moveY + touchLength;
-        // 下滑
-        let oldTranslateY = parseInt(
-          this.translateY.substring(0, this.translateY.length - 2)
-        );
-        if (touchLength > 0) {
-          this.translateY = oldTranslateY + touchLength + 'px';
-        } else {
-          // 重新计算,防止下滑后再上滑,更改了值
-          // this.getStepHieght();
-        }
-      } catch (err) {}
-    },
-    pageTouchEnd(e) {
-      if (!moveY) {
-        return;
-      }
-      if (moveY >= 200) {
-        this.closePanel();
-      } else {
-        this.getStepHieght();
-      }
-      moveY = 0;
-    },
-    stopPropagation() {
-      // 空方法,阻止冒泡用
-    }
-  }
-});
-</script>

+ 0 - 83
src/components/common/track-message.wpy

@@ -1,83 +0,0 @@
-<style lang="less">
-</style>
-
-<template>
-  <div class="component-follow-btn" v-if="tracked !== null">
-    <div v-if="tracked">
-      <slot name="tracked-content"></slot>
-    </div>
-    <div v-else v-on:click="toTrack">
-      <slot name="un-tracked-content"></slot>
-    </div>
-  </div>
-</template>
-
-<script>
-import wepy from '@wepy/core';
-import store from '@/store';
-import { mapState } from '@wepy/x';
-import { trackMessages } from '@/service/subscribeMessage';
-import { trackOrder, checkOrderSubscribed } from '@/api/subscribe';
-
-wepy.component({
-  store,
-  mame: 'FollowBtn',
-  data: {
-    tracked: null,
-    linkUrl: ''
-  },
-  options: {
-    multipleSlots: true
-  },
-  props: {
-    templateId: String, //该订阅消息模版,
-    businessId: String, //事务id
-    businessType: String //业务类类型 1身份认证 ,2发票
-  },
-  created() {
-    if (this.token) {
-      this.getData();
-    }
-  },
-  computed: {
-    ...mapState({ token: state => state.user.token })
-  },
-  watch: {
-    token(curVal, oldVal) {
-      if (curVal && !oldVal) {
-        this.getData();
-      }
-    }
-  },
-  methods: {
-    getData() {
-      // 判断当前id 是否跟踪过
-      checkOrderSubscribed({
-        businessId: this.businessId,
-        msgSubscriptionType: Number(this.businessType) //业务类类型 1身份认证 ,2发票
-      }).then(res => {
-        let result = res.data;
-        this.tracked = result;
-      });
-    },
-    toTrack() {
-      trackMessages(this.templateId).then(res => {
-        // 如果返回的是订阅消息拒绝过,就不再订阅
-        if (res && res.reject) {
-          return;
-        }
-        setTimeout(()=> {
-          //发请求跟踪消息
-          trackOrder({
-            businessId: this.businessId,
-            msgSubscriptionType: Number(this.businessType) //业务类类型 1身份认证 ,2发票
-          }).then(() => {
-            this.tracked = true;
-          });
-        }, 3e3);
-       
-      });
-    }
-  }
-});
-</script>

+ 0 - 77
src/components/counter.wpy

@@ -1,77 +0,0 @@
-<style lang="less">
-  .counter {
-    text-align: left;
-    font-size: 12px;
-  }
-  .count {
-    font-size: 18px;
-    font-weight: bold;
-    &.red {
-      color: red;
-    }
-    &.green {
-      color: green;
-    }
-  }
-</style>
-<template>
-  <div class="counter {{style}}">
-    <button @tap="plus" size="mini">  +  </button>
-    <button @tap="minus" size="mini">  -  </button>
-    <button @tap="increment" size="mini">  INCREMENT  </button>
-    <button @tap="decrement" size="mini">  DECREMENT  </button>
-    <button @tap="incrementAsync" size="mini">  ASYNC INCREMENT  </button>
-    <span class="count"> {{counter}} </span>
-  </div>
-</template>
-<script>
-  import wepy from '@wepy/core'
-  import store from '../store';
-  import { mapState, mapActions } from '@wepy/x';
-
-  wepy.component({
-    store,
-    props: {
-      num: {
-        type: [Number, String],
-        coerce: function (v) {
-          return +v
-        },
-        default: 50
-      }
-    },
-  computed: mapState([ 'counter' ]),
-
-    events: {
-      'index-broadcast': (...args) => {
-        let $event = args[args.length - 1]
-        console.log(`${this.$name} receive ${$event.name} from ${$event.source.$name}`)
-      }
-    },
-
-    watch: {
-      num (curVal, oldVal) {
-        console.log(`旧值:${oldVal},新值:${curVal}`)
-      }
-    },
-
-    methods: {
-      ...mapActions([
-        'increment',
-        'decrement',
-        'incrementAsync'
-      ]),
-      plus () {
-        this.num = this.num + 1
-        console.log('plus tapped in component');
-
-        this.$emit('index-emit', this.num);
-      },
-      minus () {
-        this.num = this.num - 1
-        console.log(this.$name + ' minus tap')
-      }
-    }
-  })
-</script>
-

+ 0 - 41
src/components/group.wpy

@@ -1,41 +0,0 @@
-<style type="less">
-  .group {}
-</style>
-<template>
-  <div class="group">
-    <span class="id">{{grouplist.id}}. </span>
-    <span class="name" @tap="tap">{{grouplist.name}}</span>
-    <div>
-      <div v-for="item in grouplist.list">
-        <groupitem :gitem="item"></groupitem>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-  import wepy from '@wepy/core';
-  //import GroupItem from './groupitem'
-
-  wepy.component({
-    props: {
-      grouplist: {},
-      index: {}
-    },
-
-    methods: {
-      tap () {
-        this.grouplist.name = `Parent Random(${Math.random()})`
-        let groups = this.$parent.$children.filter(com => com.$is === 'components/group');
-        let index = groups.indexOf(this);
-        console.log(`Clicked Group ${index}, ID is ${this.grouplist.id}`)
-      }
-    }
-  });
-</script>
-<config>
-{
-  usingComponents: {
-    'groupitem': './groupitem'
-  }
-}
-</config>

+ 0 - 28
src/components/groupitem.wpy

@@ -1,28 +0,0 @@
-<style type="less">
-.groupitem {
-}
-</style>
-<template>
-  <div class="groupitem">
-    --<span class="id">{{gitem.childid}}.</span>
-    <span class="name" @tap="tap"> {{gitem.childname}}</span>
-  </div>
-</template>
-<script>
-  import wepy from '@wepy/core';
-
-  wepy.component({
-    props: {
-      gitem: {}
-    },
-    data: {
-    },
-    methods: {
-      tap () {
-        this.gitem.childname = `Child Random(${Math.random()})`
-        let index = this.$parent.$children.indexOf(this);
-        console.log(`Item ${index}, ID is ${this.gitem.childid}`)
-      }
-    }
-  });
-</script>

+ 0 - 48
src/components/list.wpy

@@ -1,48 +0,0 @@
-<style lang="less">
-  .mylist:odd {
-    color: red;
-  }
-  .mylist:even {
-    color: green;
-  }
-</style>
-<template>
-  <div class="list">
-     This component is not used. because list is an aliasField in package.json 
-  </div>
-</template>
-<script>
-  import wepy from '@wepy/core'
-
-  wepy.component({
-    data: {
-      list: [
-        {
-          id: '0',
-          title: 'loading'
-        }
-      ]
-    },
-
-    events: {
-      'index-broadcast': (...args) => {
-        let $event = args[args.length - 1]
-        console.log(`${this.$name} receive ${$event.name} from ${$event.source.name}`)
-      }
-    },
-
-    methods: {
-      tap () {
-        // this.num = this.num + 1
-        console.log(this.$name + ' tap')
-      },
-      add () {
-        let len = this.list.length
-        this.list.push({id: len + 1, title: 'title_' + len})
-      }
-    }
-
-    onLoad () {
-    }
-  });
-</script>

+ 0 - 40
src/components/panel.wpy

@@ -1,40 +0,0 @@
-<style lang="less">
-  panel {
-    width: 100%;
-  }
-  .panel {
-    width: 100%;
-    margin-top: 20rpx;
-    text-align: left;
-    font-size: 12px;
-    padding-top: 20rpx;
-    padding-left: 50rpx;
-    padding-bottom: 20rpx;
-    border: 1px solid #ccc;
-
-    .title {
-      padding-bottom: 20rpx;
-      font-size: 14px;
-      font-weight: bold;
-    }
-    .info {
-      padding: 15rpx;
-    }
-    .testcounter {
-      margin-top: 15rpx;
-      position: absolute;
-    }
-    .counterview {
-      margin-left: 120rpx;
-    }
-  }
-</style>
-<template>
-  <div class="panel">
-    <slot name="title">
-      Title
-    </slot>
-    <slot>
-    </slot>
-  </div>
-</template>

+ 0 - 58
src/components/wepy-list.wpy

@@ -1,58 +0,0 @@
-<style lang="less">
-    .mylist:odd {
-        color: red;
-    }
-    .mylist:even {
-        color: green;
-    }
-</style>
-<template>
-    <div class="wepy-list">
-        <div>
-            <button @tap="add" size="mini">添加列表another</button>
-        </div>
-        <div v-for="(item, index) in list">
-            <div @tap="tap" class="mylist">
-              <span>{{item.id}}</span>: {{item.title}}  <span @tap="remove(index)"> X </span>
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-  import wepy from '@wepy/core'
-
-  wepy.component({
-    data: {
-      list: [
-        {
-          id: '0',
-          title: 'loading'
-        }
-      ]
-    },
-
-    events: {
-      'index-broadcast': (...args) => {
-        let $event = args[args.length - 1]
-        console.log(`${this.$name} receive ${$event.name} from ${$event.source.name}`)
-      }
-    },
-
-    methods: {
-      tap () {
-        // this.num = this.num + 1
-        console.log(this.$name + ' tap')
-      },
-      add () {
-        let len = this.list.length
-        this.list.push({id: len + 1, title: 'title_' + len})
-      },
-      remove (index) {
-        this.$delete(this.list, index);
-      }
-    },
-
-    onLoad () {
-    }
-  });
-</script>

+ 15 - 18
src/pages/bindTenant/index.wpy

@@ -1,26 +1,23 @@
 <style lang="less">
+page {
+  height: 100%;
+  background: rgba(235, 245, 250, 1);
+}
 .overflow-wrap {
   width: 100%;
   height: 100%;
-  .scroll-view {
-    position: relative;
-    width: 100%;
-    height: 100%;
-    z-index: 2;
+
+  padding: 24rpx 40rpx;
+  .bind-item {
+    padding: 40rpx 48rpx;
   }
 }
-.avatar-wrapper {
-  width: 80px;
-  height: 80px;
-}
-.avatar {
-  width: 80px;
-  height: 80px;
-}
 </style>
 <template>
- <div>
-  绑定租户页面
+ <div class="overflow-wrap">
+   <div class="bind-item">
+      
+   </div>
  </div>
 </template>
 
@@ -46,8 +43,8 @@ wepy.page({
 </script>
 <config>
 {
-  navigationBarTitleText: '公司身份选择',
-  usingComponents: {
-  }
+  "navigationBarTitleText": "公司身份选择",
+  "disableScroll": true,
+  "backgroundColor": "#EBF5FA",
 }
 </config>

+ 4 - 3
src/pages/index.wpy

@@ -78,7 +78,9 @@
   </form>  
   <button class="bind-btn"
   open-type="getPhoneNumber"
-   bindgetphonenumber="phonenumberAuth">微信手机号认证</button>
+  @click="goBindTenant">微信手机号认证</button>
+
+   <!-- bindgetphonenumber="phonenumberAuth" -->
   <div class="phone-tip">确保是入职公司使用的手机号</div>
   <button class="home-btn" @click="goHome">首页</button>
  </div>
@@ -89,8 +91,7 @@ import wepy from '@wepy/core';
 import { mapState } from '@wepy/x';
 import store from '@/store';
 import { setUserInfoByAuth } from '@/service/user';
-let defaultAvatarUrl =
-  '';
+let defaultAvatarUrl = '';
 wepy.page({
   store,
   config: {