index.wpy 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <style lang="less">
  2. page {
  3. width:100%;
  4. }
  5. .page-search {
  6. position: relative;
  7. padding-top: 136rpx;
  8. .input-wrap {
  9. box-sizing:border-box;
  10. display: flex;
  11. position: relative;
  12. margin:40rpx auto;
  13. width: 670rpx;
  14. height: 96rpx;
  15. line-height: 96rpx;
  16. background: #F4F5F6;
  17. border-radius: 82rpx;
  18. }
  19. .input-wrap input,
  20. textarea {
  21. padding-left:120rpx;
  22. padding-right:40rpx;
  23. box-sizing:border-box;
  24. width: 100%;
  25. height:48rpx;
  26. margin-top:24rpx;
  27. line-height: 48rpx;
  28. background-color: transparent;
  29. font-size: 14px;
  30. }
  31. .input-wrap .icon {
  32. width: 48rpx;
  33. height: 48rpx;
  34. display: block;
  35. }
  36. .input-wrap .icon-search-wrap {
  37. position: absolute;
  38. left: 40rpx;
  39. top: 24rpx;
  40. }
  41. .input-wrap .icon-close-wrap {
  42. position: absolute;
  43. right: 32rpx;
  44. top: 24rpx;
  45. }
  46. .search-box{
  47. box-sizing:border-box;
  48. padding-top:32rpx;
  49. padding-bottom:16rpx;
  50. padding-left:34rpx;
  51. padding-right:56rpx;
  52. line-height:60rpx;
  53. color: #8B949E;
  54. .title{
  55. padding-left:22rpx;
  56. label {
  57. display:block;
  58. color: #8B949E;
  59. font-family: PingFang SC;
  60. font-size: 14px;
  61. font-weight: 400;
  62. line-height: 22px;
  63. padding:8rpx 0;
  64. letter-spacing: 0px;
  65. text-align: left;
  66. border-bottom: 1px solid #C4C9CF4D
  67. }
  68. }
  69. .content{
  70. width:100%;
  71. .content-item{
  72. display:inline-block;
  73. vertical-align:middle;
  74. margin-left:22rpx;
  75. width:308rpx;
  76. height:48rpx;
  77. padding:24rpx 0;
  78. }
  79. }
  80. }
  81. }
  82. </style>
  83. <template>
  84. <view class="page-search">
  85. <page-top-bar
  86. titleColor="#1B2129"
  87. bgColor="#ffffff"></page-top-bar>
  88. <!--搜索框-->
  89. <view class="input-wrap">
  90. <label for="spaceSearchInputId" class="icon-search-wrap">
  91. <image class="icon" src="{{h5StaticPath+ 'icon_search.svg'}}" />
  92. </label>
  93. <input
  94. id="spaceSearchInputId"
  95. value="{{inputValue}}"
  96. bindinput="getInputValue"
  97. placeholder="输入人名/地点"
  98. focus="{{autoFocus}}"
  99. />
  100. <label for="spaceSearchInputId" class="icon-close-wrap">
  101. <image
  102. wx:if="{{inputValue}}"
  103. bindtap="clearInput"
  104. class="icon"
  105. src="{{h5StaticPath+ 'icon_close.svg'}}"
  106. />
  107. </label>
  108. </view>
  109. <!--最近搜索-->
  110. <view class="search-box">
  111. <view class="title">
  112. <label>最近搜索</label>
  113. </view>
  114. <view class="content">
  115. <view class="content-item"
  116. :key="index"
  117. v-for="(item,index) in 20">
  118. ddgggggg
  119. </view>
  120. </view>
  121. </view>
  122. <!--会议室-->
  123. <view class="search-box">
  124. <view class="title">
  125. <label>所有会议室</span>
  126. </view>
  127. <view class="content">
  128. <view class="content-item" v-for="item in 20">
  129. ddgggggg
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. </template>
  135. <script>
  136. import config from '@/config';
  137. import wepy from '@wepy/core'
  138. import eventHub from '@/common/eventHub'
  139. import { mapState } from '@wepy/x'
  140. import store from '@/store'
  141. import testMixin from '@/mixins/test'
  142. let h5StaticPath = config.h5StaticPath + '/page-intelligent-control/';
  143. wepy.page({
  144. store,
  145. config: {
  146. navigationBarTitleText: 'test'
  147. },
  148. data: {
  149. inputValue: '',
  150. autoFocus: false,
  151. h5StaticPath,
  152. },
  153. onLoad(){
  154. },
  155. onReady() {
  156. this.autoFocus = true;
  157. },
  158. methods: {
  159. getInputValue(e) {
  160. let keyword = e.$wx.detail.value || '';
  161. keyword = keyword.trim();
  162. let searchResultList = [];
  163. this.inputValue = keyword;
  164. },
  165. goEnv() {
  166. wx.navigateTo({
  167. url: '/packagesEnv/pages/officehome/index?spaceId=Sp1101080259b3510e26e7dd4dd9bf9784f06f3feb68'
  168. })
  169. },
  170. goPortrait() {
  171. wx.navigateTo({
  172. url: '/packagesEnv/pages/portrait/home'
  173. })
  174. },
  175. goPersonCenter() {
  176. wx.navigateTo({
  177. url: '/packagesEnv/pages/personalCenter/index'
  178. })
  179. }
  180. },
  181. created() {}
  182. })
  183. </script>
  184. <config>
  185. {
  186. "navigationBarTitleText": "公司身份选择",
  187. "backgroundColor": "#EBF5FA",
  188. navigationStyle:"custom",
  189. usingComponents: {
  190. 'page-top-bar': '~@/components/common/page-top-bar',
  191. },
  192. componentPlaceholder:{
  193. 'page-top-bar': 'view'
  194. }
  195. }
  196. </config>