Showing
5 changed files
with
31 additions
and
14 deletions
| 1 | <!--components/userinfo/share.wxml--> | 1 | <!--components/userinfo/share.wxml--> |
| 2 | <block wx:if="{{!hasShare}}"> | 2 | <block wx:if="{{!hasShare}}"> |
| 3 | - <userinfo binduserinfo="userinfo" class="share-but-view" catchtap="catchtap"> | 3 | + <userinfo binduserinfo="userinfo" class="share-but-view" catchtap="catchtap" style="width: 100%;"> |
| 4 | <slot></slot> | 4 | <slot></slot> |
| 5 | </userinfo> | 5 | </userinfo> |
| 6 | </block> | 6 | </block> |
| @@ -45,11 +45,13 @@ Page({ | @@ -45,11 +45,13 @@ Page({ | ||
| 45 | seller_tel=[seller.phone]; | 45 | seller_tel=[seller.phone]; |
| 46 | } | 46 | } |
| 47 | seller.seller_tel=seller_tel | 47 | seller.seller_tel=seller_tel |
| 48 | - seller.distance=parseInt(seller.distance); | ||
| 49 | - if(seller.distance>1000){ | ||
| 50 | - seller.distanceStr=(seller.distance/1000).toFixed(2)+'公里' | ||
| 51 | - }else{ | ||
| 52 | - seller.distanceStr=seller.distance+'米'; | 48 | + if(seller.distance){ |
| 49 | + seller.distance=parseInt(seller.distance); | ||
| 50 | + if(seller.distance>1000){ | ||
| 51 | + seller.distanceStr=(seller.distance/1000).toFixed(2)+'公里' | ||
| 52 | + }else{ | ||
| 53 | + seller.distanceStr=seller.distance+'米'; | ||
| 54 | + } | ||
| 53 | } | 55 | } |
| 54 | if(seller.envi_image.length<1){ | 56 | if(seller.envi_image.length<1){ |
| 55 | seller.envi_image=['http://qn.colorcun.com/custom/lite-online/image/def-banner.png'] | 57 | seller.envi_image=['http://qn.colorcun.com/custom/lite-online/image/def-banner.png'] |
| @@ -106,7 +108,9 @@ Page({ | @@ -106,7 +108,9 @@ Page({ | ||
| 106 | * 用户点击右上角分享 | 108 | * 用户点击右上角分享 |
| 107 | */ | 109 | */ |
| 108 | onShareAppMessage: function () { | 110 | onShareAppMessage: function () { |
| 109 | - | 111 | + return { |
| 112 | + title:'请客订包间,就上一键订', | ||
| 113 | + } | ||
| 110 | }, | 114 | }, |
| 111 | reserve(){ | 115 | reserve(){ |
| 112 | let seller_tel=this.data.seller.seller_tel | 116 | let seller_tel=this.data.seller.seller_tel |
| @@ -203,5 +207,8 @@ Page({ | @@ -203,5 +207,8 @@ Page({ | ||
| 203 | this.setData({ | 207 | this.setData({ |
| 204 | pagesHeight:'500rpx' | 208 | pagesHeight:'500rpx' |
| 205 | }) | 209 | }) |
| 206 | - } | 210 | + }, |
| 211 | + shareUserinfo(){ | ||
| 212 | + util.toast('授权成功,请继续分享','none'); | ||
| 213 | + }, | ||
| 207 | }) | 214 | }) |
| @@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "formids":"/components/formids/formids", | 6 | "formids":"/components/formids/formids", |
| 7 | "userinfo":"/components/userinfo/userinfo", | 7 | "userinfo":"/components/userinfo/userinfo", |
| 8 | + "userinfo-share":"/components/userinfo/share", | ||
| 8 | "stat":"/components/stat/stat", | 9 | "stat":"/components/stat/stat", |
| 9 | "as":"/components/actionSheet/index", | 10 | "as":"/components/actionSheet/index", |
| 10 | "nav":"/components/nav/nav", | 11 | "nav":"/components/nav/nav", |
| @@ -73,7 +73,7 @@ | @@ -73,7 +73,7 @@ | ||
| 73 | <image src="http://qn.colorcun.com/custom/lite-online/image/%E5%AE%9A%E4%BD%8D.png"></image> | 73 | <image src="http://qn.colorcun.com/custom/lite-online/image/%E5%AE%9A%E4%BD%8D.png"></image> |
| 74 | <view>{{seller.real_address||seller.map_address}}</view> | 74 | <view>{{seller.real_address||seller.map_address}}</view> |
| 75 | </view> | 75 | </view> |
| 76 | - <view class="addr-long">距您当前位置{{seller.distanceStr}}</view> | 76 | + <view class="addr-long">{{seller.distanceStr?'距您当前位置'+seller.distanceStr:''}}</view> |
| 77 | </view> | 77 | </view> |
| 78 | </view> | 78 | </view> |
| 79 | <view class="black20line"></view> | 79 | <view class="black20line"></view> |
| @@ -140,6 +140,11 @@ | @@ -140,6 +140,11 @@ | ||
| 140 | <view class="text">收藏</view> | 140 | <view class="text">收藏</view> |
| 141 | </userinfo> | 141 | </userinfo> |
| 142 | </view> | 142 | </view> |
| 143 | + <view class="reserve share flex-vc"> | ||
| 144 | + <userinfo-share class="flex-vc" style="width: 100%" binduserinfo="shareUserinfo"> | ||
| 145 | + <view class="text">分享</view> | ||
| 146 | + </userinfo-share> | ||
| 147 | + </view> | ||
| 143 | <view class="reserve"> | 148 | <view class="reserve"> |
| 144 | <formids class="flex-vc" bindclick="reserve" id="reserve-button"> | 149 | <formids class="flex-vc" bindclick="reserve" id="reserve-button"> |
| 145 | <view class="text">电话预定</view> | 150 | <view class="text">电话预定</view> |
| @@ -162,7 +162,7 @@ | @@ -162,7 +162,7 @@ | ||
| 162 | background-color: #FFFFFF; | 162 | background-color: #FFFFFF; |
| 163 | } | 163 | } |
| 164 | .footer .left{ | 164 | .footer .left{ |
| 165 | - width: 50%; | 165 | + width: 34%; |
| 166 | height: 100%; | 166 | height: 100%; |
| 167 | } | 167 | } |
| 168 | .footer .left formids{ | 168 | .footer .left formids{ |
| @@ -181,18 +181,22 @@ | @@ -181,18 +181,22 @@ | ||
| 181 | margin-top: 8rpx; | 181 | margin-top: 8rpx; |
| 182 | } | 182 | } |
| 183 | .footer .follow{ | 183 | .footer .follow{ |
| 184 | - margin-left: 110rpx; | 184 | + margin-left: 70rpx; |
| 185 | } | 185 | } |
| 186 | .footer .reserve{ | 186 | .footer .reserve{ |
| 187 | - width: 50%; | 187 | + width: 33%; |
| 188 | height: 100%; | 188 | height: 100%; |
| 189 | background-color: #242320; | 189 | background-color: #242320; |
| 190 | } | 190 | } |
| 191 | +.footer .reserve.share{ | ||
| 192 | + background-color: #C0A369; | ||
| 193 | +} | ||
| 191 | .footer .reserve .text{ | 194 | .footer .reserve .text{ |
| 192 | - line-height: 42rpx; | ||
| 193 | - height: 42rpx; | 195 | + line-height: 100rpx; |
| 196 | + height: 100rpx; | ||
| 194 | font-size: 30rpx; | 197 | font-size: 30rpx; |
| 195 | color:#ffffff; | 198 | color:#ffffff; |
| 199 | + width: 100%; | ||
| 196 | } | 200 | } |
| 197 | 201 | ||
| 198 | .baos{ | 202 | .baos{ |
-
Please register or login to post a comment