作者 吴孟雨

拼单页,搜索页,搜索结果页

@@ -33,6 +33,20 @@ App({ @@ -33,6 +33,20 @@ App({
33 } 33 }
34 }) 34 })
35 }, 35 },
  36 + //获取当前日期
  37 + nowDate() {
  38 + let date = new Date();
  39 + let month = date.getMonth() + 1;
  40 + let day = date.getDate();
  41 + // let hours = date.getHours();
  42 + // let minutes = date.getMinutes();
  43 + let Y = date.getFullYear() + '-' + (month > 9 ? month : ('0' + month)) + '-' + (day > 9 ? day : ('0' + day));
  44 + // let H = (hours>9?hours:('0'+hours)) + ':' +(minutes>9?minutes:('0'+minutes));
  45 + let time = [];
  46 + time.push(Y);
  47 + // let new_time = time.join(' ');
  48 + return time;
  49 + },
36 globalData: { 50 globalData: {
37 userInfo: null 51 userInfo: null
38 } 52 }
1 { 1 {
2 - "pages":[ 2 + "pages": [
  3 + "pages/spell-list/spell-list",
3 "pages/index/index", 4 "pages/index/index",
4 - "pages/logs/logs" 5 + "pages/logs/logs",
  6 + "pages/order/order",
  7 + "pages/my/my",
  8 + "pages/search/search"
5 ], 9 ],
6 - "window":{  
7 - "backgroundTextStyle":"light", 10 + "window": {
  11 + "backgroundTextStyle": "light",
8 "navigationBarBackgroundColor": "#fff", 12 "navigationBarBackgroundColor": "#fff",
9 "navigationBarTitleText": "WeChat", 13 "navigationBarTitleText": "WeChat",
10 - "navigationBarTextStyle":"black" 14 + "navigationBarTextStyle": "black"
11 } 15 }
12 } 16 }
@@ -2,11 +2,11 @@ @@ -2,11 +2,11 @@
2 2
3 3
4 @font-face {font-family: "iconfont"; 4 @font-face {font-family: "iconfont";
5 - src: url('//at.alicdn.com/t/font_961048_ey8uu8eyju6.eot?t=1544523215072'); /* IE9*/  
6 - src: url('//at.alicdn.com/t/font_961048_ey8uu8eyju6.eot?t=1544523215072#iefix') format('embedded-opentype'), /* IE6-IE8 */  
7 - url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAASkAAsAAAAABvgAAQAAAAAAAAAAAAAAAAAAAAAAAAA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et1ANwHo7ACTgC3IA78EgnmzaWx9+8eWNPANzgBx6O3y33kT1cMjtyDRe4F65TfxBukF+Em2jjVbhF/U3YxzOmwm10YXmD17hi9oR3YQ8dfAjXcI1P4Tr1L+EG+Vu4iTv8CrfQ8erCPuZeV7iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxjYGKAAC4G7ICZkYmRmZGFgSuxqCi/XDclvzyPIyc/ObEkMz+PgQEAXj4HlwAA') format('woff'),  
8 - url('//at.alicdn.com/t/font_961048_ey8uu8eyju6.ttf?t=1544523215072') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/  
9 - url('//at.alicdn.com/t/font_961048_ey8uu8eyju6.svg?t=1544523215072#iconfont') format('svg'); /* iOS 4.1- */ 5 + src: url('//at.alicdn.com/t/font_961048_s4pm998br9.eot?t=1545469706627'); /* IE9*/
  6 + src: url('//at.alicdn.com/t/font_961048_s4pm998br9.eot?t=1545469706627#iefix') format('embedded-opentype'), /* IE6-IE8 */
  7 + url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAW8AAsAAAAACEQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8dkgvY21hcAAAAYAAAABdAAABnLOMGw1nbHlmAAAB4AAAAdEAAAH8ozr8/mhlYWQAAAO0AAAALwAAADYTp4QZaGhlYQAAA+QAAAAcAAAAJAfeA4VobXR4AAAEAAAAAA4AAAAQEAAAAGxvY2EAAAQQAAAACgAAAAoBEgBsbWF4cAAABBwAAAAfAA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AAARwoCbXicY2FgYGBBwgAAsAARAAAAAAAAABQAbAD+AAB4nGNgZGBgYGGIZWBlAAEmIOYCQgaG/2A+AwASPgF9AHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nGNgYoAALgbsgIWRiZGZkYWRlYErsagov1w3Jb88jyMnPzmxJDM/j704IzEvOaOUgQEArdEKjw==') format('woff'),
  8 + url('//at.alicdn.com/t/font_961048_s4pm998br9.ttf?t=1545469706627') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
  9 + url('//at.alicdn.com/t/font_961048_s4pm998br9.svg?t=1545469706627#iconfont') format('svg'); /* iOS 4.1- */
10 } 10 }
11 11
12 .iconfont { 12 .iconfont {
@@ -21,4 +21,7 @@ @@ -21,4 +21,7 @@
21 21
22 .icon-location:before { content: "\e600"; } 22 .icon-location:before { content: "\e600"; }
23 23
  24 +.icon-shanchu:before { content: "\e60f"; }
  25 +
  26 +
24 27
  1 +const notice = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAEAYAAAD6+a2dAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA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bgz/uk3OJPxZOLie7LukBoGu8c1eknHIqxT6yX+xfvX7iQEODQNd4fk1UnTvLy36Dp0tiZC+/UU1XKrLrk/4ZoFVD3Bd8XuTX1th1dpH1RiJ+DdHtM4Iu6ww8ALo1yPR1hRYAXRtm2jpCDwDRtYG61k2UCQDRpaG61OlHuQAQVRusal2dUjYARJWGq1JHtykfABLWAEwdPNEmACSogZg+eKJdAIisAdkyeKJtAEi3Bmbb4In2ASCdDrDnrTvd87nRsG3wxJgAkNPuunl/t7lJY8rgiXEBIG2fEVoxfPAkvBtCJKNtaPGJx9zXU1Mt70doZsngibEBIHSNZ/vsK0+4btj1qAaXgFYsORMYFwB8CDwdYy4Bnd56ZeutakT7MwC+CDobbQOAr4K7Q7sAYDOou7QJALaD5VA+AKoMQJU6uk3ZAKjacFXr6pRyAdClwbrU6UeZAOjaUF3rJqEHQPcG6r4O/DTM8nXhx6GWrzOwAOjSENvWLX0zyGvAK15yk6WSag2Qre0bU5o2neqDubHYQiIhuz7pAfAefmTpdiuhddE6/YLg7orzTqNQkF1XeNvBlgy+WdtBCOgZQdLRY+IOo9k/8XSt9ldkb8Zfbm0FdYpTHfWhuT/e4/UAAAAAAAAAAAAAAADO4D9cvzD+Ik3LBAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0wNy0yOFQyMjo1MjoyMiswODowMMq1zi4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMDctMjhUMjI6NTI6MjIrMDg6MDC76HaSAAAASHRFWHRzdmc6YmFzZS11cmkAZmlsZTovLy9ob21lL2FkbWluL2ljb24tZm9udC90bXAvaWNvbl83NW1saHp1bGx3NS9jbG9zZS5zdmcxNhK3AAAAAElFTkSuQmCC'
  3 +
  4 +Component({
  5 + externalClasses: ['wux-class'],
  6 + options: {
  7 + multipleSlots: true,
  8 + },
  9 + properties: {
  10 + icon: {
  11 + type: String,
  12 + value: notice,
  13 + },
  14 + content: {
  15 + type: String,
  16 + value: '',
  17 + },
  18 + mode: {
  19 + type: String,
  20 + value: '',
  21 + },
  22 + action: {
  23 + type: String,
  24 + value: close,
  25 + },
  26 + loop: {
  27 + type: Boolean,
  28 + value: false,
  29 + },
  30 + leading: {
  31 + type: Number,
  32 + value: 500,
  33 + },
  34 + trailing: {
  35 + type: Number,
  36 + value: 800,
  37 + },
  38 + speed: {
  39 + type: Number,
  40 + value: 25,
  41 + },
  42 + },
  43 + data: {
  44 + animatedWidth: 0,
  45 + overflowWidth: 0,
  46 + visible: true,
  47 + },
  48 + methods: {
  49 + clearMarqueeTimer() {
  50 + if (this.marqueeTimer) {
  51 + clearTimeout(this.marqueeTimer)
  52 + this.marqueeTimer = null
  53 + }
  54 + },
  55 + startAnimation() {
  56 + this.clearMarqueeTimer()
  57 + const { overflowWidth, loop, leading, trailing, speed } = this.data
  58 + const isLeading = this.data.animatedWidth === 0
  59 + const timeout = isLeading ? leading : speed
  60 + const animate = () => {
  61 + let animatedWidth = this.data.animatedWidth + 1
  62 + const isRoundOver = animatedWidth > overflowWidth
  63 +
  64 + // 判断是否完成一次滚动
  65 + if (isRoundOver) {
  66 + if (!loop) {
  67 + return false
  68 + }
  69 + // 重置初始位置
  70 + animatedWidth = 0
  71 + }
  72 +
  73 + // 判断是否等待一段时间后进行下一次滚动
  74 + if (isRoundOver && trailing) {
  75 + setTimeout(() => {
  76 + this.setData({
  77 + animatedWidth,
  78 + })
  79 +
  80 + this.marqueeTimer = setTimeout(animate, speed)
  81 + }, trailing)
  82 + } else {
  83 + this.setData({
  84 + animatedWidth,
  85 + })
  86 + this.marqueeTimer = setTimeout(animate, speed)
  87 + }
  88 + }
  89 +
  90 + if (this.data.overflowWidth !== 0) {
  91 + this.marqueeTimer = setTimeout(animate, timeout)
  92 + }
  93 + },
  94 + initAnimation() {
  95 + const query = wx.createSelectorQuery().in(this)
  96 + query.select('.wux-notice-bar__marquee-container').boundingClientRect()
  97 + query.select('.wux-notice-bar__marquee').boundingClientRect()
  98 + query.exec((rects) => {
  99 + if (rects.filter((n) => !n).length) {
  100 + return false
  101 + }
  102 +
  103 + const [container, text] = rects
  104 + const overflowWidth = text.width - container.width
  105 +
  106 + if (overflowWidth !== this.data.overflowWidth) {
  107 + this.setData({ overflowWidth }, this.startAnimation)
  108 + }
  109 + })
  110 + },
  111 + onAction() {
  112 + if (this.data.mode === 'closable') {
  113 + this.clearMarqueeTimer()
  114 + this.setData({
  115 + visible: false
  116 + })
  117 + }
  118 + this.triggerEvent('click')
  119 + },
  120 + onClick() {
  121 + this.triggerEvent('click')
  122 + },
  123 + },
  124 + ready() {
  125 + this.initAnimation()
  126 + },
  127 + detached() {
  128 + this.clearMarqueeTimer()
  129 + },
  130 +})
  1 +{
  2 + "component": true
  3 +}
  1 +<view class="wux-class wux-notice-bar" wx:if="{{ visible }}" bindtap="onClick">
  2 + <view class="wux-notice-bar__hd">
  3 + <image class="wux-notice-bar__icon" src="{{ icon }}" wx:if="{{ icon }}" />
  4 + <block wx:else>
  5 + <slot name="header"></slot>
  6 + </block>
  7 + </view>
  8 + <view class="wux-notice-bar__bd">
  9 + <view class="wux-notice-bar__marquee-container">
  10 + <view class="wux-notice-bar__marquee" style="transform: translate3d({{ -animatedWidth + 'px' }}, 0px, 0px)">
  11 + <block wx:if="{{ content }}">{{ content }}</block>
  12 + <slot></slot>
  13 + </view>
  14 + </view>
  15 + </view>
  16 + <view class="wux-notice-bar__ft" catchtap="onAction" wx:if="{{ mode === 'closable' || mode === 'link' }}">
  17 + <image class="wux-notice-bar__action" src="{{ action }}" wx:if="{{ action }}" />
  18 + <block wx:else>
  19 + <slot name="footer"></slot>
  20 + </block>
  21 + </view>
  22 +</view>
  1 +.wux-notice-bar {
  2 + background-color: #fefcec;
  3 + height: 72rpx;
  4 + overflow: hidden;
  5 + font-size: 28rpx;
  6 + line-height: 72rpx;
  7 + color: #f76a24;
  8 + display: -webkit-box;
  9 + display: -webkit-flex;
  10 + display: flex;
  11 + padding: 0 20rpx;
  12 +}
  13 +.wux-notice-bar__icon {
  14 + width: 30rpx;
  15 + height: 30rpx;
  16 + margin-right: 20rpx;
  17 +}
  18 +.wux-notice-bar__action {
  19 + width: 30rpx;
  20 + height: 30rpx;
  21 + margin-left: 20rpx;
  22 +}
  23 +.wux-notice-bar__hd {
  24 + display: -webkit-box;
  25 + display: -webkit-flex;
  26 + display: flex;
  27 + -webkit-box-align: center;
  28 + -webkit-align-items: center;
  29 + align-items: center;
  30 +}
  31 +.wux-notice-bar__bd {
  32 + -webkit-box-flex: 1;
  33 + -webkit-flex: 1;
  34 + flex: 1;
  35 + width: 100%;
  36 + width: auto;
  37 + overflow: hidden;
  38 + text-overflow: ellipsis;
  39 + white-space: nowrap;
  40 +}
  41 +.wux-notice-bar__marquee-container {
  42 + overflow: hidden;
  43 +}
  44 +.wux-notice-bar__marquee {
  45 + position: relative;
  46 + -webkit-transform: translate3d(0, 0, 0);
  47 + transform: translate3d(0, 0, 0);
  48 + white-space: nowrap;
  49 + display: inline-block;
  50 +}
  51 +.wux-notice-bar__ft {
  52 + display: -webkit-box;
  53 + display: -webkit-flex;
  54 + display: flex;
  55 + -webkit-box-align: center;
  56 + -webkit-align-items: center;
  57 + align-items: center;
  58 +}
@@ -21,11 +21,25 @@ Page({ @@ -21,11 +21,25 @@ Page({
21 ], 21 ],
22 banner: [{image: '../../images/banner.png'}, {image: '../../images/b1@2x (1).png'}, {image: '../../images/b1@2x (2).png'}, {image: '../../images/banner.png'}], 22 banner: [{image: '../../images/banner.png'}, {image: '../../images/b1@2x (1).png'}, {image: '../../images/b1@2x (2).png'}, {image: '../../images/banner.png'}],
23 currentBannerIndex:0, 23 currentBannerIndex:0,
  24 + tabcurrent: {tab: 0,bubble: ''},
  25 + noticeList:[{url:'',name:'奥拉维尔·埃利亚松北京首展 https://github.com/wux-weapp/wux-weapp'}],
  26 +
24 motto: 'Hello World', 27 motto: 'Hello World',
25 userInfo: {}, 28 userInfo: {},
26 hasUserInfo: false, 29 hasUserInfo: false,
27 canIUse: wx.canIUse('button.open-type.getUserInfo') 30 canIUse: wx.canIUse('button.open-type.getUserInfo')
28 }, 31 },
  32 + onClick() {
  33 + wx.navigateTo({
  34 + url: '/pages/search/search',
  35 + })
  36 + },
  37 + //搜索
  38 + search() {
  39 + wx.navigateTo({
  40 + url: '/pages/search/search',
  41 + })
  42 + },
29 bannerChange(e){ 43 bannerChange(e){
30 // console.log(e,'current', current); 44 // console.log(e,'current', current);
31 const current = e.detail.current; 45 const current = e.detail.current;
@@ -60,4 +74,88 @@ Page({ @@ -60,4 +74,88 @@ Page({
60 console.log('refresh completed,加载更多') 74 console.log('refresh completed,加载更多')
61 }) 75 })
62 }, 76 },
  77 + //首页-导航
  78 + service(e) {
  79 + var tindex = e.currentTarget.dataset.tindex;
  80 + var tabcurrent = this.data.tabcurrent;
  81 + if (tabcurrent == tindex) {
  82 + return false
  83 + } else {
  84 + this.setData({
  85 + tabcurrent: tindex
  86 + })
  87 + wx.redirectTo({
  88 + url: '/pages/index/index',
  89 + })
  90 + }
  91 + },
  92 +
  93 +
  94 + //拼单-导航
  95 + consult(e) {
  96 + var tindex = e.currentTarget.dataset.tindex
  97 + var tabcurrent = this.data.tabcurrent
  98 + if (tabcurrent == tindex) {
  99 + return false
  100 + } else {
  101 + this.setData({
  102 + tabcurrent: tindex
  103 + })
  104 + // wx.showToast({
  105 + // title: '该功能正在开发中',
  106 + // icon: 'none'
  107 + // })
  108 + wx.redirectTo({
  109 + url: '/pages/spell-list/spell-list',
  110 + })
  111 + }
  112 + },
  113 + //发布按钮
  114 + release(e) {
  115 + let that = this;
  116 + that.setData({
  117 + releasepopup: true
  118 + })
  119 + },
  120 + //取消发布弹窗
  121 + cancelPopup() {
  122 + let that = this;
  123 + that.setData({
  124 + releasepopup: false
  125 + })
  126 + },
  127 + //订单-导航
  128 + wish(e) {
  129 + var tindex = e.currentTarget.dataset.tindex
  130 + var tabcurrent = this.data.tabcurrent
  131 + if (tabcurrent == tindex) {
  132 + return false
  133 + } else {
  134 + this.setData({
  135 + tabcurrent: tindex
  136 + })
  137 + // wx.showToast({
  138 + // title: '该功能正在开发中',
  139 + // icon: 'none'
  140 + // })
  141 + wx.redirectTo({
  142 + url: '/pages/order/order',
  143 + })
  144 + }
  145 + },
  146 + //我的-导航
  147 + my(e) {
  148 + var tindex = e.currentTarget.dataset.tindex
  149 + var tabcurrent = this.data.tabcurrent
  150 + if (tabcurrent == tindex) {
  151 + return false
  152 + } else {
  153 + this.setData({
  154 + tabcurrent: tindex
  155 + })
  156 + wx.redirectTo({
  157 + url: '/pages/my/my',
  158 + })
  159 + }
  160 + },
63 }) 161 })
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": { 4 "usingComponents": {
5 "masonry": "../components/masonry/masonry", 5 "masonry": "../components/masonry/masonry",
6 - "img-box": "../components/img-box/img-box" 6 + "img-box": "../components/img-box/img-box",
  7 + "wux-notice-bar": "../../dist/notice-bar/index"
7 } 8 }
8 } 9 }
@@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
8 <text>北京</text> 8 <text>北京</text>
9 <view class="iconfont icon-arrow-down"></view> 9 <view class="iconfont icon-arrow-down"></view>
10 </view> 10 </view>
11 - <view class="right">  
12 - <input type="text"/> 11 + <view class="right" bindtap="search">
  12 + <view class="input"></view>
13 <view class="iconfont icon-arrow-down"></view> 13 <view class="iconfont icon-arrow-down"></view>
14 </view> 14 </view>
15 </view> 15 </view>
@@ -37,7 +37,12 @@ @@ -37,7 +37,12 @@
37 37
38 <view class="area-box"> 38 <view class="area-box">
39 <image src="../../images/haowai@2x.png"></image> 39 <image src="../../images/haowai@2x.png"></image>
40 - <text>奥拉维尔·埃利亚松北京首展</text> 40 + <!--<text>奥拉维尔·埃利亚松北京首展</text>-->
  41 + <view wx:for="{{noticeList}}" wx:key="index">
  42 + <wux-notice-bar mode="link" icon="" action="" content="{{item.name}}" bind:click="onClick">
  43 + <!--<text slot="footer" style="color: #a1a1a1; margin-left: 10px;">去看看</text>-->
  44 + </wux-notice-bar>
  45 + </view>
41 </view> 46 </view>
42 47
43 <view class="tandian-box"> 48 <view class="tandian-box">
@@ -51,7 +56,7 @@ @@ -51,7 +56,7 @@
51 </view> 56 </view>
52 </view> 57 </view>
53 58
54 - <!--swiper--> 59 + <!--banner-->
55 <view class='people_box rel bb1'> 60 <view class='people_box rel bb1'>
56 <!--<scroll-view scroll-x class='scroll_view'>--> 61 <!--<scroll-view scroll-x class='scroll_view'>-->
57 <!--<view class="people_list_box">--> 62 <!--<view class="people_list_box">-->
@@ -62,13 +67,14 @@ @@ -62,13 +67,14 @@
62 <!--</view>--> 67 <!--</view>-->
63 <!--</view>--> 68 <!--</view>-->
64 <!--</scroll-view>--> 69 <!--</scroll-view>-->
65 - <swiper class="bannerBox" autoplay="false" interval="3000" duration="1000" indicator-dots="true" 70 + <swiper class="bannerBox" autoplay="true" interval="3000" duration="2000"
66 previous-margin="50rpx" next-margin="50rpx" bindchange="bannerChange" current="{{index}}"> 71 previous-margin="50rpx" next-margin="50rpx" bindchange="bannerChange" current="{{index}}">
67 <block wx:for="{{banner}}" wx:key="index"> 72 <block wx:for="{{banner}}" wx:key="index">
68 <swiper-item> 73 <swiper-item>
69 <div class="fix pl5 pr5 box_bb"> 74 <div class="fix pl5 pr5 box_bb">
70 <!--<navigator url="">--> 75 <!--<navigator url="">-->
71 <image class="banner mt10 {{currentBannerIndex==index?'active':''}}" src="{{item.image}}" mode="aspectFill" /> 76 <image class="banner mt10 {{currentBannerIndex==index?'active':''}}" src="{{item.image}}" mode="aspectFill" />
  77 + <text>Opera Bombana 2018.4.28</text>
72 <!--</navigator>--> 78 <!--</navigator>-->
73 </div> 79 </div>
74 </swiper-item> 80 </swiper-item>
@@ -89,6 +95,10 @@ @@ -89,6 +95,10 @@
89 <view class="masonry-box"> 95 <view class="masonry-box">
90 <masonry generic:masonry-item="img-box" id="masonry" interval-width="20rpx"></masonry> 96 <masonry generic:masonry-item="img-box" id="masonry" interval-width="20rpx"></masonry>
91 </view> 97 </view>
  98 +
  99 + <!--底部tab-->
  100 + <import src="/templates/templates.wxml" />
  101 + <template is="tabBar" data='{{...tabcurrent}}' />
92 <!--swiper--> 102 <!--swiper-->
93 <!--<view class="banner-box">--> 103 <!--<view class="banner-box">-->
94 <!--<swiper indicator-dots="{{true}}"--> 104 <!--<swiper indicator-dots="{{true}}"-->
1 /**index.wxss**/ 1 /**index.wxss**/
  2 +@import "../../templates/templates.wxss";
2 .userinfo { 3 .userinfo {
3 display: flex; 4 display: flex;
4 flex-direction: column; 5 flex-direction: column;
@@ -68,7 +69,7 @@ @@ -68,7 +69,7 @@
68 -moz-box-sizing: border-box; 69 -moz-box-sizing: border-box;
69 box-sizing: border-box; 70 box-sizing: border-box;
70 } 71 }
71 -.position input { 72 +.position .input {
72 color: #ffffff; 73 color: #ffffff;
73 padding-left: 20rpx; 74 padding-left: 20rpx;
74 font-size: 28rpx; 75 font-size: 28rpx;
@@ -276,7 +277,16 @@ swiper { @@ -276,7 +277,16 @@ swiper {
276 277
277 /*banner start*/ 278 /*banner start*/
278 .bannerBox{ 279 .bannerBox{
279 - height: 208px; 280 + height: 383rpx;
  281 +}
  282 +.bannerBox text {
  283 + width: 100%;
  284 + display: block;
  285 + line-height: 60rpx;
  286 + padding: 0 14rpx;
  287 + text-align: left;
  288 + color:#333333;
  289 + font-size: 24rpx;
280 } 290 }
281 .banner{ 291 .banner{
282 overflow: hidden; 292 overflow: hidden;
@@ -293,19 +303,20 @@ swiper { @@ -293,19 +303,20 @@ swiper {
293 .bannerDots{ 303 .bannerDots{
294 width: 100%; 304 width: 100%;
295 left: 0; 305 left: 0;
296 - bottom: 40px; 306 + bottom: 100rpx;
297 height: 6px; 307 height: 6px;
298 } 308 }
299 .dot{ 309 .dot{
300 - width: 6px;  
301 - height: 6px; 310 + width: 8px;
  311 + height: 8px;
302 margin: 0 3px; 312 margin: 0 3px;
303 - border-radius: 3px;  
304 - background-color: #fff; 313 + border-radius: 50%;
  314 + background: rgba(255,255,255,.3);
  315 + opacity: 0.3;
305 } 316 }
306 .dot.active{ 317 .dot.active{
307 - width: 15px;  
308 - background-color: #7090E8; 318 + opacity: 1;
  319 + background-color: #FEE2BB;
309 } 320 }
310 .fix { 321 .fix {
311 zoom: 1; 322 zoom: 1;
@@ -322,6 +333,8 @@ swiper { @@ -322,6 +333,8 @@ swiper {
322 padding-right: 5px; 333 padding-right: 5px;
323 } 334 }
324 .box_bb { 335 .box_bb {
  336 + -webkit-box-sizing: border-box;
  337 + -moz-box-sizing: border-box;
325 box-sizing: border-box; 338 box-sizing: border-box;
326 } 339 }
327 .flex_c { 340 .flex_c {
  1 +// pages/my/my.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + tabcurrent: {tab: 4,bubble: ''},
  9 + },
  10 + //首页-导航
  11 + service(e) {
  12 + var tindex = e.currentTarget.dataset.tindex;
  13 + var tabcurrent = this.data.tabcurrent;
  14 + if (tabcurrent == tindex) {
  15 + return false
  16 + } else {
  17 + this.setData({
  18 + tabcurrent: tindex
  19 + })
  20 + wx.redirectTo({
  21 + url: '/pages/index/index',
  22 + })
  23 + }
  24 + },
  25 +
  26 +
  27 + //拼单-导航
  28 + consult(e) {
  29 + var tindex = e.currentTarget.dataset.tindex
  30 + var tabcurrent = this.data.tabcurrent
  31 + if (tabcurrent == tindex) {
  32 + return false
  33 + } else {
  34 + this.setData({
  35 + tabcurrent: tindex
  36 + })
  37 + // wx.showToast({
  38 + // title: '该功能正在开发中',
  39 + // icon: 'none'
  40 + // })
  41 + wx.redirectTo({
  42 + url: '/pages/spell-list/spell-list',
  43 + })
  44 + }
  45 + },
  46 + //发布按钮
  47 + release(e) {
  48 + let that = this;
  49 + that.setData({
  50 + releasepopup: true
  51 + })
  52 + },
  53 + //取消发布弹窗
  54 + cancelPopup() {
  55 + let that = this;
  56 + that.setData({
  57 + releasepopup: false
  58 + })
  59 + },
  60 + //订单-导航
  61 + wish(e) {
  62 + var tindex = e.currentTarget.dataset.tindex
  63 + var tabcurrent = this.data.tabcurrent
  64 + if (tabcurrent == tindex) {
  65 + return false
  66 + } else {
  67 + this.setData({
  68 + tabcurrent: tindex
  69 + })
  70 + // wx.showToast({
  71 + // title: '该功能正在开发中',
  72 + // icon: 'none'
  73 + // })
  74 + wx.redirectTo({
  75 + url: '/pages/order/order',
  76 + })
  77 + }
  78 + },
  79 + //我的-导航
  80 + my(e) {
  81 + var tindex = e.currentTarget.dataset.tindex
  82 + var tabcurrent = this.data.tabcurrent
  83 + if (tabcurrent == tindex) {
  84 + return false
  85 + } else {
  86 + this.setData({
  87 + tabcurrent: tindex
  88 + })
  89 + wx.redirectTo({
  90 + url: '/pages/my/my',
  91 + })
  92 + }
  93 + },
  94 + /**
  95 + * 生命周期函数--监听页面加载
  96 + */
  97 + onLoad: function (options) {
  98 +
  99 + },
  100 +
  101 + /**
  102 + * 生命周期函数--监听页面初次渲染完成
  103 + */
  104 + onReady: function () {
  105 +
  106 + },
  107 +
  108 + /**
  109 + * 生命周期函数--监听页面显示
  110 + */
  111 + onShow: function () {
  112 +
  113 + },
  114 +
  115 + /**
  116 + * 生命周期函数--监听页面隐藏
  117 + */
  118 + onHide: function () {
  119 +
  120 + },
  121 +
  122 + /**
  123 + * 生命周期函数--监听页面卸载
  124 + */
  125 + onUnload: function () {
  126 +
  127 + },
  128 +
  129 + /**
  130 + * 页面相关事件处理函数--监听用户下拉动作
  131 + */
  132 + onPullDownRefresh: function () {
  133 +
  134 + },
  135 +
  136 + /**
  137 + * 页面上拉触底事件的处理函数
  138 + */
  139 + onReachBottom: function () {
  140 +
  141 + },
  142 +
  143 + /**
  144 + * 用户点击右上角分享
  145 + */
  146 + onShareAppMessage: function () {
  147 +
  148 + }
  149 +})
  1 +<!--pages/my/my.wxml-->
  2 +<!--底部tab-->
  3 +<import src="/templates/templates.wxml" />
  4 +<template is="tabBar" data='{{...tabcurrent}}' />
  1 +/* pages/my/my.wxss */
  2 +@import "../../templates/templates.wxss";
  1 +// pages/order/order.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + tabcurrent: {tab: 3,bubble: ''},
  9 + },
  10 + //首页-导航
  11 + service(e) {
  12 + var tindex = e.currentTarget.dataset.tindex;
  13 + var tabcurrent = this.data.tabcurrent;
  14 + if (tabcurrent == tindex) {
  15 + return false
  16 + } else {
  17 + this.setData({
  18 + tabcurrent: tindex
  19 + })
  20 + wx.redirectTo({
  21 + url: '/pages/index/index',
  22 + })
  23 + }
  24 + },
  25 +
  26 +
  27 + //拼单-导航
  28 + consult(e) {
  29 + var tindex = e.currentTarget.dataset.tindex
  30 + var tabcurrent = this.data.tabcurrent
  31 + if (tabcurrent == tindex) {
  32 + return false
  33 + } else {
  34 + this.setData({
  35 + tabcurrent: tindex
  36 + })
  37 + // wx.showToast({
  38 + // title: '该功能正在开发中',
  39 + // icon: 'none'
  40 + // })
  41 + wx.redirectTo({
  42 + url: '/pages/spell-list/spell-list',
  43 + })
  44 + }
  45 + },
  46 + //发布按钮
  47 + release(e) {
  48 + let that = this;
  49 + that.setData({
  50 + releasepopup: true
  51 + })
  52 + },
  53 + //取消发布弹窗
  54 + cancelPopup() {
  55 + let that = this;
  56 + that.setData({
  57 + releasepopup: false
  58 + })
  59 + },
  60 + //订单-导航
  61 + wish(e) {
  62 + var tindex = e.currentTarget.dataset.tindex
  63 + var tabcurrent = this.data.tabcurrent
  64 + if (tabcurrent == tindex) {
  65 + return false
  66 + } else {
  67 + this.setData({
  68 + tabcurrent: tindex
  69 + })
  70 + // wx.showToast({
  71 + // title: '该功能正在开发中',
  72 + // icon: 'none'
  73 + // })
  74 + wx.redirectTo({
  75 + url: '/pages/order/order',
  76 + })
  77 + }
  78 + },
  79 + //我的-导航
  80 + my(e) {
  81 + var tindex = e.currentTarget.dataset.tindex
  82 + var tabcurrent = this.data.tabcurrent
  83 + if (tabcurrent == tindex) {
  84 + return false
  85 + } else {
  86 + this.setData({
  87 + tabcurrent: tindex
  88 + })
  89 + wx.redirectTo({
  90 + url: '/pages/my/my',
  91 + })
  92 + }
  93 + },
  94 + /**
  95 + * 生命周期函数--监听页面加载
  96 + */
  97 + onLoad: function (options) {
  98 +
  99 + },
  100 +
  101 + /**
  102 + * 生命周期函数--监听页面初次渲染完成
  103 + */
  104 + onReady: function () {
  105 +
  106 + },
  107 +
  108 + /**
  109 + * 生命周期函数--监听页面显示
  110 + */
  111 + onShow: function () {
  112 +
  113 + },
  114 +
  115 + /**
  116 + * 生命周期函数--监听页面隐藏
  117 + */
  118 + onHide: function () {
  119 +
  120 + },
  121 +
  122 + /**
  123 + * 生命周期函数--监听页面卸载
  124 + */
  125 + onUnload: function () {
  126 +
  127 + },
  128 +
  129 + /**
  130 + * 页面相关事件处理函数--监听用户下拉动作
  131 + */
  132 + onPullDownRefresh: function () {
  133 +
  134 + },
  135 +
  136 + /**
  137 + * 页面上拉触底事件的处理函数
  138 + */
  139 + onReachBottom: function () {
  140 +
  141 + },
  142 +
  143 + /**
  144 + * 用户点击右上角分享
  145 + */
  146 + onShareAppMessage: function () {
  147 +
  148 + }
  149 +})
  1 +<!--pages/order/order.wxml-->
  2 +<!--底部tab-->
  3 +<import src="/templates/templates.wxml" />
  4 +<template is="tabBar" data='{{...tabcurrent}}' />
  1 +/* pages/order/order.wxss */
  2 +@import "../../templates/templates.wxss";
  1 +// pages/service/renting/search/search.js
  2 +const app = getApp();
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + searchValue: '',
  10 + postList: [],
  11 + searchHistory:[{keyword:'法国巴黎'},{keyword:'埃菲尔铁塔'},{keyword:'北京'},{keyword:'西雅图'},{keyword:'美国洛杉矶'},{keyword:'北京'},{keyword:'北京'},{keyword:'北京'},],
  12 + currentModal: 0,
  13 + currentPost: 0,
  14 + hidden_img: false,
  15 + hasMore: true,
  16 + pageNumber: 0,
  17 + avatar: [],
  18 + },
  19 + //初始化postList
  20 + initPostList() {
  21 + this.setData({
  22 + pageNumber: 0,
  23 + hasMore: true,
  24 + });
  25 + this.data.postList = []
  26 + },
  27 + inputFocus() {
  28 + this.setData({postList:[]})
  29 + },
  30 + //输入搜索内容
  31 + inputKey(e) {
  32 + this.setData({searchValue: e.detail.value})
  33 + },
  34 + //点击搜索(搜索结果)
  35 + startSearch() {
  36 + let self = this;
  37 + if(!self.data.hasMore) return;
  38 + self.setData({hasMore: false});
  39 + let url = '/home/home/search';
  40 + let params = {
  41 + keyword: self.data.searchValue,
  42 + page: self.data.pageNumber,
  43 + };
  44 + let header = {
  45 + "XX-Token": wx.getStorageSync('token')
  46 + };
  47 + if(self.data.searchValue === '') {
  48 + wx.showToast({title:'搜索内容不能为空~',icon: 'none'})
  49 + }else {
  50 + self.getSearchHistory();
  51 + app.post(url, params, header).then((res) => {
  52 + // console.log('搜索结果', res);
  53 + if(+res.page < res.page_size) {
  54 + self.data.hasMore = true;
  55 + }
  56 + const list = res.data.map((item, index) => {
  57 + return {...item, showlabel_box: false, more: item.more !== '' ? JSON.parse(item.more) : ''}
  58 + });
  59 + self.setData({
  60 + postList: self.data.postList.concat(list)
  61 + });
  62 + // console.log('搜索结果', self.data.postList);
  63 + })
  64 + }
  65 + },
  66 + //点击量
  67 + hit(current) {
  68 + let url = '/home/home/hits';
  69 + let params = {
  70 + id: this.data.postList[current].id,
  71 + };
  72 + let header = { "XX-Token": wx.getStorageSync('token') };
  73 + app.post(url, params, header).then((res) => {
  74 + // console.log('点击量',res);
  75 + if(res.message == "操作成功") {
  76 + const post_hits = this.data.postList[current].post_hits +1
  77 + this.setData({
  78 + [`postList[${current}].post_hits`]: post_hits
  79 + });
  80 + }
  81 + })
  82 + },
  83 + //清空输入框
  84 + clearInput() {
  85 + this.setData({searchValue: ''})
  86 + },
  87 + //搜索历史列表
  88 + getSearchHistory() {
  89 + let self = this;
  90 + let url = '/home/home/search_history';
  91 + let header = {
  92 + "XX-Token": wx.getStorageSync('token')
  93 + };
  94 + app.post(url, {}, header).then((res) => {
  95 + // console.log('搜索历史列表', res);
  96 + self.setData({
  97 + searchHistory: res
  98 + });
  99 + })
  100 + },
  101 + //点击搜索历史
  102 + clickHistory(e) {
  103 + const current = e.currentTarget.dataset.index;
  104 + const list = [{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多'}]//假数据
  105 + this.setData({
  106 + searchValue: this.data.searchHistory[current].keyword,
  107 + postList:list,
  108 + });
  109 + this.startSearch()
  110 + },
  111 + //清空历史搜索
  112 + clearHistory() {
  113 + let self = this;
  114 + let url = '/home/home/clear_search';
  115 + let header = {
  116 + "XX-Token": wx.getStorageSync('token')
  117 + };
  118 + app.post(url, {}, header).then((res) => {
  119 + // console.log('清空搜索历史列表', res);
  120 + self.getSearchHistory()
  121 + })
  122 + },
  123 + //个人信息弹框
  124 + showModal(e) {
  125 + let that = this;
  126 + const current = e.currentTarget.dataset.index;
  127 + if(that.data.currentModal === current) {
  128 + that.data.postList[current].showlabel_box = !that.data.postList[current].showlabel_box;
  129 + }else {
  130 + that.data.postList[current].showlabel_box = !that.data.postList[current].showlabel_box;
  131 + that.data.postList[that.data.currentModal].showlabel_box = false;
  132 + }
  133 + that.setData({
  134 + postList: that.data.postList,
  135 + currentModal: current
  136 + });
  137 + },
  138 + //复制微信号
  139 + clickCopy(e) {
  140 + const current = e.currentTarget.dataset.index;
  141 + wx.setClipboardData({
  142 + data: this.data.postList[current].wxn,
  143 + success:function (res) {
  144 + // console.log('复制微信号',res);
  145 + }
  146 + });
  147 + this.setData({
  148 + [`postList[${this.data.currentModal}].showlabel_box`]: false
  149 + });
  150 + },
  151 + //进入主页
  152 + enterHomePage(e) {
  153 + let self = this;
  154 + const current = e.currentTarget.dataset.index;
  155 +
  156 + wx.navigateTo({
  157 + url: '/pages/service/myindex/myindex?user_id=' + self.data.postList[current].user_id
  158 + });
  159 + self.setData({
  160 + [`postList[${self.data.currentModal}].showlabel_box`]: false
  161 + });
  162 + },
  163 + //举报
  164 + report(e) {
  165 + let self = this;
  166 + const current = e.currentTarget.dataset.index;
  167 + const to_user_id = self.data.postList[current].user_id;
  168 + const post_id = self.data.postList[current].id;
  169 + wx.navigateTo({url:'/pages/report/report?to_user_id=' + to_user_id + '&post_id=' + post_id});
  170 + self.setData({
  171 + [`postList[${self.data.currentModal}].showlabel_box`]: false
  172 + });
  173 + },
  174 + //查看文章详情
  175 + goPostDetail(e) {
  176 + const current = e.currentTarget.dataset.index;
  177 + const list = this.data.postList.map((item,index) => {
  178 + return {...item, showlabel_box: false}
  179 + });//进入详情时关闭所有弹框
  180 + this.setData({
  181 + postList: list,
  182 + currentPost: current
  183 + });
  184 + this.hit(current);
  185 + wx.navigateTo({
  186 + url: '../../rentingDetail/rentingDetail?post_id=' + this.data.postList[current].id,
  187 + })
  188 +
  189 + },
  190 + //收藏、取消收藏
  191 + delArticles(e) {
  192 + let self = this;
  193 + const current = e.currentTarget.dataset.index;
  194 + let url = '/home/home/collect';
  195 + let url_del = '/home/home/collect_del';
  196 + let header = {
  197 + "XX-Token": wx.getStorageSync('token')
  198 + };
  199 + let params = {
  200 + id: self.data.postList[current].id,
  201 + };
  202 + if(self.data.postList[current].is_hits) {
  203 + app.post(url_del, params, header).then((res) => {
  204 + // console.log('取消收藏', res);
  205 + if(res.message == "操作成功") {
  206 + self.setData({
  207 + [`postList[${current}].is_hits`]: 0
  208 + });
  209 + }
  210 + })
  211 + }else {
  212 + app.post(url, params, header).then((res) => {
  213 + // console.log('收藏', res);
  214 + if(res.message == "操作成功") {
  215 + self.setData({
  216 + [`postList[${current}].is_hits`]: 1
  217 + });
  218 + }
  219 + })
  220 + }
  221 + },
  222 + //点赞/取消赞
  223 + clickZan(e) {
  224 + let self = this;
  225 + let current = e.currentTarget.dataset.index;
  226 + let postList = self.data.postList;
  227 + let url = '/home/home/like';
  228 + let url_del = '/home/home/like_del';
  229 + let header = {
  230 + "XX-Token": wx.getStorageSync('token')
  231 + };
  232 + let params = {
  233 + id: self.data.postList[current].id,
  234 + };
  235 + if(postList[current].is_paise) {
  236 + app.post(url_del, params, header).then((res) => {
  237 + // console.log('取消赞', res);
  238 + if(res.message == "操作成功") {//局部刷新赞数和头像
  239 + const post_like = postList[current].post_like - 1;
  240 + self.setData({
  241 + [`postList[${current}].is_paise`]: 0,
  242 + [`postList[${current}].post_like`]: post_like,
  243 + });
  244 + const paise_user = [];
  245 + postList[current].paise_user.map((item) => {
  246 + if(item !== res.data) {
  247 + paise_user.push(item)
  248 + }
  249 + });
  250 + self.setData({
  251 + [`postList[${current}].paise_user`]: paise_user,
  252 + })
  253 + }
  254 + })
  255 + }else {
  256 + app.post(url, params, header).then((res) => {
  257 + // console.log('点赞', res);
  258 + if(res.message == "操作成功") {//局部刷新赞数和头像
  259 + const post_like = postList[current].post_like + 1;
  260 + self.setData({
  261 + [`postList[${current}].is_paise`]: 1,
  262 + [`postList[${current}].post_like`]: post_like,
  263 + });
  264 + if(postList[current].paise_user !== undefined) {
  265 + const paise_user = postList[current].paise_user;
  266 + self.setData({
  267 + [`postList[${current}].paise_user`]: paise_user.concat(res.data),
  268 + })
  269 + }else {
  270 + const paise_user = [];
  271 + paise_user.push(res.data);
  272 + self.setData({
  273 + [`postList[${current}].paise_user`]: paise_user,
  274 + })
  275 + }
  276 + }
  277 + })
  278 + }
  279 + },
  280 + //去评论
  281 + goComment() {
  282 + wx.navigateTo({
  283 + url: '/pages/service/comment/comment?post_id=' +
  284 + this.data.postList[this.data.currentPost].id +
  285 + '&is_post_list=' + true
  286 + })
  287 + },
  288 + //获取用户id
  289 + personInfo() {
  290 + let url = '/home/me/index';
  291 + let header = {
  292 + "XX-Token": wx.getStorageSync('token')
  293 + };
  294 + let params = {}
  295 + app.post(url, params, header).then((res) => {
  296 + console.log(res)
  297 + this.setData({
  298 + userId: res.id,
  299 + });
  300 + console.log(this.data.userId)
  301 + })
  302 + },
  303 + onLoad: function (options) {
  304 + const self = this;
  305 + self.setData({
  306 + id: +options.id,
  307 + order: +options.order,
  308 + select_id: +options.select_id,
  309 + });
  310 + self.personInfo();
  311 + self.getSearchHistory();
  312 + },
  313 + refreshPostCollect() {
  314 + const postList = this.data.postList;
  315 + const currentPost = this.data.currentPost;
  316 + // console.log('刷新前长度', postList[currentPost].is_hits);
  317 + if(this.data.is_collect) {
  318 + this.setData({
  319 + [`postList[${currentPost}].is_hits`]: 1,
  320 + })
  321 + }else {
  322 + this.setData({
  323 + [`postList[${currentPost}].is_hits`]: 0,
  324 + })
  325 + }
  326 + // console.log('刷新后长度', postList[currentPost].is_hits);
  327 + },
  328 + refreshPostComment() {
  329 + const postList = this.data.postList;
  330 + const currentPost = this.data.currentPost;
  331 + // console.log('刷新前长度', postList[currentPost].comments.length);
  332 + if(this.data.is_comment) {
  333 + this.setData({[`postList[${currentPost}].comments[0].length`]: this.data.length})
  334 + }
  335 + // console.log('刷新后长度', postList[currentPost].comments[0].length);
  336 + },
  337 + refreshPostLike() {
  338 + const postList = this.data.postList;
  339 + const currentPost = this.data.currentPost;
  340 + if(this.data.is_paise) {
  341 + const post_like = postList[currentPost].post_like +1;
  342 + this.setData({
  343 + [`postList[${currentPost}].is_paise`]: 1,
  344 + [`postList[${currentPost}].post_like`]: post_like,
  345 + [`postList[${currentPost}].paise_user`]: this.data.paise_user,
  346 + })
  347 + // console.log('点赞', postList[currentPost].post_like);
  348 + }else {
  349 + const post_like = postList[currentPost].post_like -1;
  350 + this.setData({
  351 + [`postList[${currentPost}].is_paise`]: 0,
  352 + [`postList[${currentPost}].post_like`]: post_like,
  353 + [`postList[${currentPost}].paise_user`]: this.data.paise_user,
  354 + })
  355 + // console.log('取消赞', postList[currentPost].post_like);
  356 + }
  357 + },
  358 + /**
  359 + * 生命周期函数--监听页面初次渲染完成
  360 + */
  361 + onReady: function () {
  362 +
  363 + },
  364 +
  365 + /**
  366 + * 生命周期函数--监听页面显示
  367 + */
  368 + onShow: function () {
  369 +
  370 + },
  371 +
  372 + /**
  373 + * 生命周期函数--监听页面隐藏
  374 + */
  375 + onHide: function () {
  376 +
  377 + },
  378 +
  379 + /**
  380 + * 生命周期函数--监听页面卸载
  381 + */
  382 + onUnload: function () {
  383 +
  384 + },
  385 +
  386 + /**
  387 + * 页面相关事件处理函数--监听用户下拉动作
  388 + */
  389 + onPullDownRefresh: function () {
  390 +
  391 + },
  392 +
  393 + /**
  394 + * 页面上拉触底事件的处理函数
  395 + */
  396 + onReachBottom: function () {
  397 + const self = this;
  398 + if (!self.data.hasMore) {
  399 + wx.showToast({
  400 + title: '没有更多数据了~',
  401 + icon: 'none'
  402 + });
  403 + console.log('reach bottom', self.data.hasMore);
  404 + } else {
  405 + console.log('reach bottom', self.data.hasMore);
  406 + self.data.pageNumber++;
  407 + self.startSearch();
  408 + }
  409 + },
  410 +
  411 + /**
  412 + * 用户点击右上角分享
  413 + */
  414 + onShareAppMessage: function () {
  415 +
  416 + }
  417 +})
  1 +{
  2 + "navigationBarTitleText": "搜索"
  3 +}
  1 +<!--pages/service/renting/search/search.wxml-->
  2 +<view class="container">
  3 + <view class="head_search_box">
  4 + <view class="input">
  5 + <image src="../../images/search@2x.png"></image>
  6 + <input placeholder='请输入搜索相关内容' bindfocus="inputFocus" bindinput="inputKey" value="{{searchValue}}" bindconfirm="startSearch" placeholder-class='input_size'/>
  7 + <view class="iconfont icon-jia1 jia1" catchtap="clearInput"></view>
  8 + </view>
  9 + <!--<view class="search-text" bindtap="startSearch">搜索</view>-->
  10 + </view>
  11 +
  12 + <view class="history_box" wx:if="{{postList.length<=0}}">
  13 + <view class="head">
  14 + <view class="title">热门搜索</view>
  15 + </view>
  16 +
  17 + <view class="history_list {{searchHistory.length === 0?'text-center':''}}">
  18 + <text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text>
  19 + <view wx:elseif wx:for="{{searchHistory}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item.keyword}}</view>
  20 + </view>
  21 + </view>
  22 +
  23 + <view class="history_box history" wx:if="{{postList.length<=0}}">
  24 + <view class="head">
  25 + <view class="title">搜索历史</view>
  26 + <view class="clear" bindtap="clearHistory">
  27 + <view class="iconfont icon-shanchu"></view>
  28 + <text>清空历史记录</text>
  29 + </view>
  30 + </view>
  31 +
  32 + <view class="history_list {{searchHistory.length === 0?'text-center':''}}">
  33 + <text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text>
  34 + <view wx:elseif wx:for="{{searchHistory}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item.keyword}}</view>
  35 + </view>
  36 + </view>
  37 +
  38 + <!--文章内容-->
  39 + <view class='content_box post_box' wx:if="{{postList.length > 0}}">
  40 + <view class='content_item' wx:for="{{postList}}" wx:key="index" bindtap='goPostDetail' data-index="{{index}}">
  41 + <image src="../../images/lishi@2x.png" class="thumb"></image>
  42 + <view class="lish-right">
  43 + <view class="title">{{item.title}}</view>
  44 + <view class="time">{{item.time}}</view>
  45 + <view class="name-box">
  46 + <image src="../../images/avatar@2x.png" class="avatar"></image>
  47 + <text>{{item.name}}</text>
  48 + </view>
  49 + </view>
  50 + </view>
  51 + </view>
  52 +</view>
  1 +/* pages/service/renting/search/search.wxss */
  2 +/*@import '../renting.wxss';*/
  3 +page {
  4 + background-color: #fff;
  5 + padding: 0;
  6 +}
  7 +.head_search_box {
  8 + display: flex;
  9 + align-items: center;
  10 + justify-content: space-between;
  11 + /*height: 64rpx;*/
  12 + line-height: 64rpx;
  13 + padding: 12rpx 32rpx;
  14 + -webkit-box-sizing: border-box;
  15 + -moz-box-sizing: border-box;
  16 + box-sizing: border-box;
  17 + background-color: #fff;
  18 + position: fixed;
  19 + top: 0;
  20 + left: 0;
  21 + width: 100%;
  22 + z-index: 20;
  23 +}
  24 +.content_box {
  25 + padding: 10rpx 20rpx;
  26 + -webkit-box-sizing: border-box;
  27 + -moz-box-sizing: border-box;
  28 + box-sizing: border-box;
  29 + border-top: 1rpx solid #eeeeee;
  30 +}
  31 +.post_box {
  32 + margin-top: 100rpx;
  33 +}
  34 +.content_item {
  35 + display: flex;
  36 + align-items: center;
  37 + justify-content: flex-start;
  38 + padding: 30rpx 0;
  39 + -webkit-box-sizing: border-box;
  40 + -moz-box-sizing: border-box;
  41 + box-sizing: border-box;
  42 + border-bottom: 1rpx solid #eeeeee;
  43 +
  44 +}
  45 +.content_item .thumb {
  46 + width: 170rpx;
  47 + height: 170rpx;
  48 + margin-right: 26rpx;
  49 +}
  50 +.lish-right {
  51 + height: 166rpx;
  52 + display: flex;
  53 + flex-direction: column;
  54 + justify-content: space-around;
  55 +}
  56 +.lish-right .title, .lish-right .time{
  57 + font-size: 24rpx;
  58 + color: #333333;
  59 +}
  60 +.lish-right .name-box {
  61 + display: flex;
  62 + align-items: center;
  63 + color: #666666;
  64 + font-size: 22rpx;
  65 +}
  66 +.lish-right .name-box .avatar{
  67 + width: 40rpx;
  68 + height: 40rpx;
  69 + margin-right: 16rpx;
  70 +}
  71 +.input {
  72 + width: 100%;
  73 + display: flex;
  74 + align-items: center;
  75 + background: #F2F2F2;
  76 + border-radius: 10rpx;
  77 + padding:0 10rpx;
  78 +}
  79 +.input input {
  80 + font-size: 28rpx;
  81 + color: #666666;
  82 +}
  83 +.input_size {
  84 + font-size: 28rpx;
  85 +}
  86 +.input image {
  87 + width: 34rpx;
  88 + height: 34rpx;
  89 + margin: 0 20rpx;
  90 +}
  91 +.fangdajing {
  92 + margin-left: 24rpx;
  93 + margin-right: 22rpx;
  94 + color: #999999;
  95 +}
  96 +.jia1 {
  97 + margin-right: 20rpx;
  98 + color: #97A0A8;
  99 +}
  100 +.head_serach_box input {
  101 + font-size: 30rpx;
  102 +}
  103 +.search-text {
  104 + font-size: 26rpx;
  105 +}
  106 +.history_box {
  107 + display: flex;
  108 + flex-direction: column;
  109 + padding: 36rpx 38rpx;
  110 + background-color: #fff;
  111 + margin-top: 76rpx;
  112 +}
  113 +.history {
  114 + margin-top: 0;
  115 +}
  116 +.head {
  117 + display: flex;
  118 + justify-content: space-between;
  119 + margin-bottom: 18rpx;
  120 +}
  121 +.title {
  122 + color: #333333;
  123 + font-size: 30rpx;
  124 + font-weight: bold;
  125 +}
  126 +.icon-shanchu {
  127 + margin-right: 10rpx;
  128 + color: #999999;
  129 + font-size: 28rpx;
  130 +}
  131 +.clear {
  132 + display: flex;
  133 + align-items: center;
  134 +}
  135 +.clear text {
  136 + font-size: 24rpx;
  137 + color: #999999;
  138 +}
  139 +.history_list {
  140 + display: flex;
  141 + justify-content: flex-start;
  142 + align-items: center;
  143 + flex-wrap: wrap;
  144 + border-top: 1rpx solid #E8E8E8;
  145 +}
  146 +.text-center {
  147 + text-align: center;
  148 + display: block;
  149 +}
  150 +.history_list view {
  151 + padding: 12rpx 26rpx;
  152 + /* background-color: #F4F4F4; */
  153 + font-size: 28rpx;
  154 + color: #999999;
  155 + margin-right: 10rpx;
  156 + margin-bottom: 10rpx;
  157 + margin-left: 20rpx;
  158 + border-radius: 8rpx;
  159 +}
  160 +.history_list text {
  161 + font-size: 26rpx;
  162 + color: #999999;
  163 +}
  164 +.list_comment_box {
  165 + position: relative;
  166 +}
  167 +.triangle1 {
  168 + width: 0;
  169 + height: 0;
  170 + border-bottom: 11rpx solid #ebecf0;
  171 + border-left: 13rpx solid transparent;
  172 + border-right: 13rpx solid transparent;
  173 + position: absolute;
  174 + top: -8rpx;
  175 + left: 20rpx;
  176 +}
  1 +// pages/spell-list/spell-list.js
  2 +const app = getApp();
  3 +// const date = new Date();
  4 +// const years = [];
  5 +// const months = [];
  6 +// const days = [];
  7 +//
  8 +// for (let i = 1990; i <= date.getFullYear(); i++) {
  9 +// years.push(i)
  10 +// }
  11 +//
  12 +// for (let i = 1; i <= 12; i++) {
  13 +// months.push(i)
  14 +// }
  15 +//
  16 +// for (let i = 1; i <= 31; i++) {
  17 +// days.push(i)
  18 +// }
  19 +Page({
  20 +
  21 + /**
  22 + * 页面的初始数据
  23 + */
  24 + data: {
  25 + tabcurrent: {tab: 1,bubble: ''},
  26 + current: 0,//0拼餐,1拼活动
  27 + is_showSort: false,
  28 + is_showSelect: false,
  29 + currentSort: 0,
  30 + currentSelect: 0,
  31 + start_time_date: app.nowDate(),
  32 + end_time_date: app.nowDate(),
  33 + type:[
  34 + {name:'粤菜',id:1},{name:'川菜',id:2},{name:'其他中餐',id:3},{name:'粤菜',id:4},{name:'粤菜',id:5},{name:'粤菜',id:6},{name:'粤菜',id:7},
  35 + {name:'粤菜',id:8},{name:'川菜',id:9},{name:'其他中餐',id:10},{name:'粤菜',id:11},{name:'粤菜',id:12},{name:'粤菜',id:13},{name:'粤菜',id:14},
  36 + ],
  37 + sort: [{id: 0, name: '最具人气'}, {id: 1, name: '距离最近'}],
  38 + sort_id: 0,//选择的排序id,默认是0
  39 + is_all: true,
  40 + list:[
  41 + {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
  42 + {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
  43 + {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
  44 + ]
  45 + },
  46 + //搜索
  47 + search() {
  48 + wx.navigateTo({
  49 + url: '/pages/search/search',
  50 + })
  51 + },
  52 + //tab点击事件
  53 + chargeTab(e) {
  54 + this.setData({
  55 + current: e.currentTarget.dataset.current
  56 + })
  57 + },
  58 + //点击智能排序按钮
  59 + clickSort() {
  60 + let that = this;
  61 + that.setData({
  62 + // down: !that.data.down,
  63 + is_showSort: !that.data.is_showSort,
  64 + is_showSelect: false
  65 + // showrent_mask: false
  66 + })
  67 + },
  68 + //点击筛选按钮
  69 + clickSelect() {
  70 + let that = this;
  71 + that.setData({
  72 + // down: !that.data.down,
  73 + is_showSelect: !that.data.is_showSelect,
  74 + is_showSort: false,
  75 + // showrent_mask: false
  76 + })
  77 + },
  78 + //关闭排序列表
  79 + closeMask() {
  80 + let that = this;
  81 + that.setData({
  82 + // showrent_mask: false,
  83 + is_showSort: false,
  84 + is_showSelect: false,
  85 + })
  86 + },
  87 + //保持筛选列表开启
  88 + openMask() {
  89 + this.setData({is_showSelect: true,})
  90 + },
  91 + //点击默认/热度排序
  92 + chooseSort(e) {
  93 + const current = e.currentTarget.dataset.index;
  94 + this.setData({
  95 + sort_id: this.data.sort[current].id,
  96 + currentSort: current,
  97 + is_showSort: false,
  98 + // down: !this.data.down,
  99 + });
  100 + this.initPortalPost();
  101 + this.getuser_recommend()
  102 + },
  103 + //选择开始时间
  104 + changeStartTime: function(e) {
  105 + console.log('picker发送选择改变,携带值为', e.detail.value)
  106 + this.setData({
  107 + start_time_date: e.detail.value,
  108 + is_showSelect: true,
  109 + // is_birth_change: true,
  110 + })
  111 + },
  112 + //选择结束时间
  113 + changeEndTime: function(e) {
  114 + console.log('picker发送选择改变,携带值为', e.detail.value)
  115 + this.setData({
  116 + end_time_date: e.detail.value,
  117 + is_showSelect: true,
  118 + // is_birth_change: true,
  119 + })
  120 + },
  121 + //选择全部分类
  122 + chooseAll() {
  123 + this.setData({is_all: true,is_showSelect:false,current_type:null})
  124 + },
  125 + //选择分类
  126 + chooseType(e) {
  127 + const current = e.currentTarget.dataset.index;
  128 + this.setData({current_type: current,is_all:false,is_showSelect:false,is_showSort: false,})
  129 + },
  130 + //首页-导航
  131 + service(e) {
  132 + var tindex = e.currentTarget.dataset.tindex;
  133 + var tabcurrent = this.data.tabcurrent;
  134 + if (tabcurrent == tindex) {
  135 + return false
  136 + } else {
  137 + this.setData({
  138 + tabcurrent: tindex
  139 + })
  140 + wx.redirectTo({
  141 + url: '/pages/index/index',
  142 + })
  143 + }
  144 + },
  145 + //拼单-导航
  146 + consult(e) {
  147 + var tindex = e.currentTarget.dataset.tindex
  148 + var tabcurrent = this.data.tabcurrent
  149 + if (tabcurrent == tindex) {
  150 + return false
  151 + } else {
  152 + this.setData({
  153 + tabcurrent: tindex
  154 + })
  155 + // wx.showToast({
  156 + // title: '该功能正在开发中',
  157 + // icon: 'none'
  158 + // })
  159 + wx.redirectTo({
  160 + url: '/pages/spell-list/spell-list',
  161 + })
  162 + }
  163 + },
  164 + //发布按钮
  165 + release(e) {
  166 + let that = this;
  167 + that.setData({
  168 + releasepopup: true
  169 + })
  170 + },
  171 + //取消发布弹窗
  172 + cancelPopup() {
  173 + let that = this;
  174 + that.setData({
  175 + releasepopup: false
  176 + })
  177 + },
  178 + //订单-导航
  179 + wish(e) {
  180 + var tindex = e.currentTarget.dataset.tindex
  181 + var tabcurrent = this.data.tabcurrent
  182 + if (tabcurrent == tindex) {
  183 + return false
  184 + } else {
  185 + this.setData({
  186 + tabcurrent: tindex
  187 + })
  188 + // wx.showToast({
  189 + // title: '该功能正在开发中',
  190 + // icon: 'none'
  191 + // })
  192 + wx.redirectTo({
  193 + url: '/pages/order/order',
  194 + })
  195 + }
  196 + },
  197 + //我的-导航
  198 + my(e) {
  199 + var tindex = e.currentTarget.dataset.tindex
  200 + var tabcurrent = this.data.tabcurrent
  201 + if (tabcurrent == tindex) {
  202 + return false
  203 + } else {
  204 + this.setData({
  205 + tabcurrent: tindex
  206 + })
  207 + wx.redirectTo({
  208 + url: '/pages/my/my',
  209 + })
  210 + }
  211 + },
  212 + /**
  213 + * 生命周期函数--监听页面加载
  214 + */
  215 + onLoad: function (options) {
  216 +
  217 + },
  218 +
  219 + /**
  220 + * 生命周期函数--监听页面初次渲染完成
  221 + */
  222 + onReady: function () {
  223 +
  224 + },
  225 +
  226 + /**
  227 + * 生命周期函数--监听页面显示
  228 + */
  229 + onShow: function () {
  230 +
  231 + },
  232 +
  233 + /**
  234 + * 生命周期函数--监听页面隐藏
  235 + */
  236 + onHide: function () {
  237 +
  238 + },
  239 +
  240 + /**
  241 + * 生命周期函数--监听页面卸载
  242 + */
  243 + onUnload: function () {
  244 +
  245 + },
  246 +
  247 + /**
  248 + * 页面相关事件处理函数--监听用户下拉动作
  249 + */
  250 + onPullDownRefresh: function () {
  251 +
  252 + },
  253 +
  254 + /**
  255 + * 页面上拉触底事件的处理函数
  256 + */
  257 + onReachBottom: function () {
  258 +
  259 + },
  260 +
  261 + /**
  262 + * 用户点击右上角分享
  263 + */
  264 + onShareAppMessage: function () {
  265 +
  266 + }
  267 +})
  1 +{
  2 + "navigationBarTitleText": "拼单"
  3 +}
  1 +<!--pages/spell-list/spell-list.wxml-->
  2 +<view class="fix-box">
  3 + <view class="head">
  4 + <view class="position">
  5 + <view class="left">
  6 + <view class="iconfont icon-location"></view>
  7 + <text>北京</text>
  8 + <view class="iconfont icon-arrow-down"></view>
  9 + </view>
  10 + <view class="right" bindtap="search">
  11 + <view class="input"></view>
  12 + <image src="../../images/search@2x.png"></image>
  13 + <!--<view class="iconfont icon-arrow-down"></view>-->
  14 + </view>
  15 + </view>
  16 + </view>
  17 +
  18 + <view class='tab_box'>
  19 + <view class="tab_item {{current==0?'active':''}}" data-current='0' bindtap='chargeTab'>拼餐</view>
  20 + <view class="tab_item {{current==1?'active':''}}" data-current='1' bindtap='chargeTab'>拼活动</view>
  21 + </view>
  22 +
  23 + <view class="sort-select-box">
  24 + <!--智能排序按钮-->
  25 + <view class="sort-box" bindtap='clickSort'>
  26 + <view class='' class="sort-btn">智能排序</view>
  27 + <view class="iconfont icon-arrow-down"></view>
  28 + </view>
  29 + <!--筛选按钮-->
  30 + <view class="select-box" bindtap='clickSelect'>
  31 + <view class='' class="select-btn">筛选</view>
  32 + <view class="iconfont icon-arrow-down"></view>
  33 + </view>
  34 + </view>
  35 + <!--智能排序列表-->
  36 + <view class='rent_mask' wx:if='{{is_showSort}}' bindtap="closeMask">
  37 + <view class='rent_popup'>
  38 + <view class="rent_item {{currentSort===index?'active':''}}" wx:for="{{sort}}" wx:key="index"
  39 + catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>
  40 + </view>
  41 + </view>
  42 + <!--筛选列表-->
  43 + <view class='rent_mask' wx:if='{{is_showSelect}}' bindtap="closeMask">
  44 + <view class='rent_popup time-box' catchtap="openMask">
  45 + <text class="title">时间:</text>
  46 + <view class="picker-box">
  47 + <picker bindchange="changeStartTime" value="{{start_time_date}}" mode="date">
  48 + <view class="time-select-box">
  49 + <view class="select-picker">
  50 + <view class="picker">
  51 + {{start_time_date}}
  52 + </view>
  53 + </view>
  54 + <view class="iconfont icon-arrow-down arrow"></view>
  55 + </view>
  56 + </picker>
  57 + <text>-</text>
  58 + <picker bindchange="changeEndTime" value="{{end_time_date}}" mode="date">
  59 + <view class="time-select-box">
  60 + <view class="select-picker">
  61 + <view class="picker">
  62 + {{end_time_date}}
  63 + </view>
  64 + </view>
  65 + <view class="iconfont icon-arrow-down arrow"></view>
  66 + </view>
  67 + </picker>
  68 + </view>
  69 + <text class="title">菜系:</text>
  70 + <view class="type">
  71 + <text catchtap="chooseAll" class="{{is_all?'change-color':''}}">全部</text>
  72 + <text class="{{current_type === index?'change-color':''}}"
  73 + wx:for="{{type}}" wx:key="index" catchtap="chooseType"
  74 + data-index="{{index}}">{{item.name}}</text>
  75 + </view>
  76 + <!--<view class="rent_item {{currentSelect===index?'active':''}}" wx:for="{{select}}" wx:key="index"-->
  77 + <!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>-->
  78 + </view>
  79 + </view>
  80 +</view>
  81 +
  82 +<!--拼餐-->
  83 +<view class='content_box' wx:if='{{current==0}}'>
  84 + <view class="no-data" wx:if="{{list.length === 0}}">暂无拼餐活动</view>
  85 + <view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
  86 + bindtap='gouserrecommend_detail' data-index="{{index}}">
  87 + <image src="../../images/activity_img@2x.png"></image>
  88 + <view class="title">
  89 + <text class="area">{{item.area}}</text>
  90 + <text class="num">还差{{item.num}}人</text>
  91 + </view>
  92 + <view class="user">
  93 + <image src="../../images/avatar@2x.png" class="avatar"></image>
  94 + <text>{{item.name}}</text>
  95 + </view>
  96 + </view>
  97 +</view>
  98 +<!--拼活动-->
  99 +<view class="content_box" wx:if='{{current==1}}'>
  100 + <view class="no-data" wx:if="{{list.length === 0}}">暂无拼餐活动</view>
  101 + <view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
  102 + bindtap='gouserrecommend_detail' data-index="{{index}}">
  103 + <image src="../../images/b1@2x (1).png"></image>
  104 + <view class="title">
  105 + <text class="area">{{item.area}}</text>
  106 + <text class="num">还差{{item.num}}人</text>
  107 + </view>
  108 + <view class="user">
  109 + <image src="../../images/avatar@2x.png" class="avatar"></image>
  110 + <text>{{item.name}}</text>
  111 + </view>
  112 + </view>
  113 +</view>
  114 +
  115 +<!--底部tab-->
  116 +<import src="/templates/templates.wxml" />
  117 +<template is="tabBar" data='{{...tabcurrent}}' />
  1 +/* pages/spell-list/spell-list.wxss */
  2 +@import "../../templates/templates.wxss";
  3 +@keyframes content_box {
  4 + 0% { opacity: 0; }
  5 + 100% { opacity: 1; }
  6 +}
  7 +.fix-box {
  8 + width:100%;
  9 + position: fixed;
  10 + top: 0;
  11 + left: 0;
  12 + z-index: 10;
  13 + background: #fff;
  14 +}
  15 +.position {
  16 + width: 100%;
  17 + display: flex;
  18 + align-items: center;
  19 + justify-content: space-between;
  20 + padding: 20rpx;
  21 + -webkit-box-sizing: border-box;
  22 + -moz-box-sizing: border-box;
  23 + box-sizing: border-box;
  24 + border-bottom: 1rpx solid #f2f2f2;
  25 +}
  26 +.position .left {
  27 + display: flex;
  28 + align-items: center;
  29 +}
  30 +.position .left .icon-location {
  31 + font-size: 44rpx;
  32 + color: #000000;
  33 + margin-right: 14rpx;
  34 +}
  35 +.position .left .icon-arrow-down {
  36 + font-size: 36rpx;
  37 + color: #000000;
  38 + margin-left: 18rpx;
  39 +}
  40 +.position text {
  41 + color: #000000;
  42 + font-size: 28rpx;
  43 +}
  44 +.position .right {
  45 + width: 70%;
  46 + height: 52rpx;
  47 + position: relative;
  48 + background-color: rgba(255,255,255,0.35);
  49 + display: flex;
  50 + align-items: center;
  51 + justify-content: space-between;
  52 + border-radius: 10rpx;
  53 + padding: 0 20rpx;
  54 + -webkit-box-sizing: border-box;
  55 + -moz-box-sizing: border-box;
  56 + box-sizing: border-box;
  57 +}
  58 +.position .right image {
  59 + width: 34rpx;
  60 + height: 34rpx;
  61 + position: absolute;
  62 + right: 36rpx;
  63 + top: 8rpx;
  64 +}
  65 +.position .input {
  66 + width: 100%;
  67 + height: 54rpx;
  68 + color: #000000;
  69 + padding-left: 20rpx;
  70 + font-size: 28rpx;
  71 + border: 1rpx solid #e5e5e5;
  72 + border-radius: 26rpx;
  73 +}
  74 +.tab_box {
  75 + padding: 0 100rpx;
  76 + height: 90rpx;
  77 + line-height: 90rpx;
  78 + display: flex;
  79 + align-items: center;
  80 + justify-content: center;
  81 + border-bottom: 20rpx solid #f5f5f5;
  82 + overflow: hidden;
  83 + white-space: nowrap;
  84 + flex-wrap: nowrap;
  85 +}
  86 +.tab_item {
  87 + display: inline-block;
  88 + width: 160rpx;
  89 + font-size: 32rpx;
  90 + color: #0E050A;
  91 + position: relative;
  92 + text-align: center;
  93 + /* border: 1rpx solid red; */
  94 +}
  95 +.active {
  96 + color: #0E050A;
  97 +}
  98 +
  99 +.tab_box .active::after {
  100 + content: "";
  101 + /*border: 2rpx solid #DB4E2A;*/
  102 + position: absolute;
  103 + bottom: 0rpx;
  104 + left: 50%;
  105 + transform: translateX(-50%);
  106 + width: 120rpx;
  107 + height: 4rpx;
  108 + background: #DB4E2A;
  109 +}
  110 +.sort-select-box {
  111 + display: flex;
  112 + align-items: center;
  113 + justify-content: space-between;
  114 + padding: 24rpx 20rpx;
  115 + -webkit-box-sizing: border-box;
  116 + -moz-box-sizing: border-box;
  117 + box-sizing: border-box;
  118 +}
  119 +.sort-box, .select-box {
  120 + display: flex;
  121 + align-items: center;
  122 +}
  123 +.sort-btn {
  124 + color: #333333;
  125 + font-size: 24rpx;
  126 + margin-right: 10rpx;
  127 +}
  128 +.select-btn {
  129 + color: #666666;
  130 + font-size: 24rpx;
  131 + margin-right: 10rpx;
  132 +}
  133 +.sort-select-box .icon-arrow-down {
  134 + font-size: 30rpx;
  135 + color: #666666;
  136 +}
  137 +.rent_mask {
  138 + width: 100%;
  139 + height: 100%;
  140 + background: RGBA(0, 0, 0, 0.2);
  141 + position: fixed;
  142 + top: 282rpx;
  143 + left: 0;
  144 + z-index: 10;
  145 + overflow: hidden;
  146 +}
  147 +
  148 +.rent_popup {
  149 + background: #fafafa;
  150 + padding: 0 30rpx;
  151 +}
  152 +.time-box {
  153 + padding: 20rpx 30rpx;
  154 +}
  155 +.rent_item {
  156 + width: 100%;
  157 + height: 73rpx;
  158 + border-bottom: 1rpx solid #ebebeb;
  159 + font-size: 30rpx;
  160 + color: #b3b3b3;
  161 + text-align: center;
  162 + line-height: 73rpx;
  163 +}
  164 +
  165 +.rent_item.active {
  166 + color: #DB4E2A;
  167 +}
  168 +
  169 +.rent_item:last-child {
  170 + border-bottom: 0;
  171 +}
  172 +.picker-box {
  173 + display: flex;
  174 + align-items: center;
  175 + justify-content: space-between;
  176 + padding: 20rpx 0;
  177 +}
  178 +.picker-box picker {
  179 + width: 50%;
  180 + height: 50rpx;
  181 + line-height: 50rpx;
  182 + border: 1rpx solid #e5e5e5;
  183 + border-radius: 40rpx;
  184 +}
  185 +.time-select-box {
  186 + display: flex;
  187 + align-items: center;
  188 + justify-content: space-between;
  189 +}
  190 +.select-picker {
  191 + width: 90%;
  192 + text-align: center;
  193 +}
  194 +.select-picker .picker {
  195 + color: #666666;
  196 + font-size: 28rpx;
  197 +}
  198 +.time-box .title {
  199 + font-size: 30rpx;
  200 + color: #333333;
  201 +}
  202 +.time-select-box .arrow {
  203 + margin-right: 20rpx;
  204 +}
  205 +.time-box .type {
  206 + width: 100%;
  207 + display: flex;
  208 + align-items: flex-start;
  209 + flex-wrap: wrap;
  210 + padding: 10rpx 0;
  211 +}
  212 +.time-box .type text {
  213 + color: #666666;
  214 + font-size: 28rpx;
  215 + padding: 10rpx 10rpx;
  216 +}
  217 +.time-box .type .change-color{
  218 + color: #DB4E2A;
  219 +}
  220 +.content_box {
  221 + background: #fff;
  222 + animation: content_box 1s both;
  223 + margin-top: 284rpx;
  224 + padding: 10rpx 20rpx 120rpx 20rpx;
  225 + -webkit-box-sizing: border-box;
  226 + -moz-box-sizing: border-box;
  227 + box-sizing: border-box;
  228 +}
  229 +.content_item {
  230 + padding: 16rpx;
  231 + -webkit-box-sizing: border-box;
  232 + -moz-box-sizing: border-box;
  233 + box-sizing: border-box;
  234 + box-shadow: 2rpx 8rpx 38rpx rgba(89, 89, 89, 0.14);
  235 + border-radius: 8rpx;
  236 +}
  237 +.content_item image {
  238 + width: 100%;
  239 + height: 340rpx;
  240 +}
  241 +.content_item .title, .content_item .user {
  242 + display: flex;
  243 + align-items: center;
  244 + justify-content: space-between;
  245 +}
  246 +.content_item .user {
  247 + justify-content: flex-start;
  248 + margin-top: 10rpx;
  249 +}
  250 +.content_item .title .area {
  251 + color: #333333;
  252 + font-size: 24rpx;
  253 +}
  254 +.content_item .title .num {
  255 + color: #666666;
  256 + font-size: 22rpx;
  257 +}
  258 +.content_item .user image {
  259 + width: 40rpx;
  260 + height: 40rpx;
  261 + border-radius: 50%;
  262 + margin-right: 10rpx;
  263 +}
  264 +.content_item .user text {
  265 + color: #666666;
  266 + font-size: 22rpx;
  267 +}
  1 +<template name="tabBar">
  2 + <view class='tabbar_box'>
  3 + <view class='tabbar_item' data-tindex='0' bindtap='service'>
  4 + <!--<view class="iconfont icon-zonghe {{tab==0?'tab_active':''}}"></view>-->
  5 + <image src="../../images/shouye1@2x.png" wx:if="{{tab==0}}"></image>
  6 + <image src="../../images/shouye@2x.png" wx:else></image>
  7 + <!--<view class="tabbar_title {{tab==0?'tab_active':''}}">首页</view>-->
  8 + </view>
  9 + <view class='tabbar_item' data-tindex='1' bindtap='consult'>
  10 + <!--<view class="iconfont icon-pinglun1 {{tab==1?'tab_active':''}}"></view>-->
  11 + <image src="../../images/pindan1@2x.png" wx:if="{{tab==1}}"></image>
  12 + <image src="../../images/pindan@2x.png" wx:else></image>
  13 + <!--<view class="tabbar_title {{tab==1?'tab_active':''}}">拼单</view>-->
  14 + </view>
  15 + <view class='release_box' data-tindex='2' bindtap='release'>
  16 + <!--<view class='iconfont icon-xiangji'></view>-->
  17 + <image src="../../images/fabu@2x.png" class="fabu"></image>
  18 + </view>
  19 + <view class='tabbar_item' data-tindex='3' bindtap='wish'>
  20 + <!--<view class="iconfont icon-xiangqu {{tab==3?'tab_active':''}}"></view>-->
  21 + <image src="../../images/order1@2x.png" wx:if="{{tab==3}}"></image>
  22 + <image src="../../images/order@2x.png" wx:else></image>
  23 + <!--<view class="tabbar_title {{tab==3?'tab_active':''}}">订单</view>-->
  24 + </view>
  25 + <view class='tabbar_item' data-tindex='4' bindtap='my'>
  26 + <!--<view class="iconfont icon-wode {{tab==4?'tab_active':''}}"></view>-->
  27 + <image src="../../images/my1@2x.png" wx:if="{{tab==4}}"></image>
  28 + <image src="../../images/my@2x.png" wx:else></image>
  29 + <!--<view class="tabbar_title {{tab==4?'tab_active':''}}">我的</view>-->
  30 + <!--<view class="tip-point" wx:if="{{bubble == 2}}"></view>-->
  31 + </view>
  32 + </view>
  33 +</template>
  1 +/* pages/template/template.wxss */
  2 +/* 公共tabbar */
  3 + .tabbar_box {
  4 + width: 100%;
  5 + height: 100rpx;
  6 + display: flex;
  7 + align-items: center;
  8 + justify-content: space-between;
  9 + padding: 0 60rpx;
  10 + -webkit-box-sizing: border-box;
  11 + -moz-box-sizing: border-box;
  12 + box-sizing: border-box;
  13 + border: 1rpx solid #EBEBEB;
  14 + position: fixed;
  15 + bottom: 0;
  16 + left: 0;
  17 + background: #333333;
  18 +}
  19 +
  20 +.release_box {
  21 + width: 104rpx;
  22 + height: 136rpx;
  23 + display: flex;
  24 + align-items: center;
  25 + justify-content: center;
  26 + margin-top:-50rpx;
  27 +}
  28 +.release_box image {
  29 + width: 100%;
  30 + height: 100%;
  31 +}
  32 +.icon-xiangji {
  33 + font-size: 56rpx;
  34 + color: #fff;
  35 +}
  36 +.icon-pinglun1{
  37 + font-size: 38rpx;
  38 +}
  39 +.tabbar_box .iconfont {
  40 + text-align: center;
  41 +}
  42 +
  43 +.tabbar_title {
  44 + font-size: 24rpx;
  45 + color: #666;
  46 + text-align: center;
  47 +}
  48 +.tab_active{
  49 + color: #E0492C;
  50 +}
  51 +.tabbar_item {
  52 + position: relative;
  53 + display: flex;
  54 + align-items: center;
  55 +}
  56 +.tabbar_item image {
  57 + width: 48rpx;
  58 + height:76rpx;
  59 +}
  60 +.tip-point {
  61 + width: 16rpx;
  62 + height: 16rpx;
  63 + background-color: #53A6FA;
  64 + position: absolute;
  65 + top: 2rpx;
  66 + right: 6rpx;
  67 + border-radius: 50%;
  68 +}