home.wxml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <import src="/components/local/wxParse/wxParse.wxml" />
  2. <wxs src="./../../utils/wxsUtil.wxs" module="wxsUtil" />
  3. <!-- 头部banner -->
  4. <home-skeleton isLoading="{{isLoading}}">
  5. <view class="navbar-distance" style="margin-top: {{navBarData.navBarHeight}}px;">距离{{wxsUtil.getDistance(lat1,lng1,homeData.store.latitude,homeData.store.longitude)}}Km</view>
  6. <!-- 距离提示 -->
  7. <view class="navbar-hint" style="margin-top: {{navBarData.navBarHeight+11}}px;" wx:if="{{wxsUtil.getDistance(lat1,lng1,homeData.store.latitude,homeData.store.longitude)<=1}}">
  8. <image src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20221017/%E7%BC%96%E7%BB%84%2022%402x.png">
  9. </image>
  10. <view class="navbar-hint-tip">距离变美只有一点点距离啦</view>
  11. </view>
  12. <view class="top-banner">
  13. <swiper class="top-swiper" indicator-color='#F0F0F0' indicator-dots indicator-active-color='#fa7d22' autoplay circular interval='3000'>
  14. <swiper-item wx:if="{{homeData.banner.length!=0}}" wx:for="{{homeData.banner}}" wx:key="index">
  15. <image data-source="{{item}}" data-url="{{ item.url }}" bindtap="goToUrl" bindload="imgInfo" src="{{item.image_url}}" lazy-load="true"></image>
  16. </swiper-item>
  17. </swiper>
  18. </view>
  19. <!-- 自定义导航 -->
  20. <!-- TODO 遇到 bindtap触发不了的问题,应该是层级问题,暂时整体可点击 -->
  21. <navigation bindtap="goToStore">
  22. <cover-view class="navbar-box {{navBarBgClass}} " style="height:{{navBarData.navBarHeight}}px;" bindtap="goToStore">
  23. <cover-view class="navbar-box-container" style="height:{{navBarData.menuHeight}}px; min-height:{{navBarData.menuHeight}}px; line-height:{{navBarData.menuHeight}}px; bottom:{{navBarData.menuBotton}}px;">
  24. <cover-image class="navbar-location" src="{{navBarBgClass==''?'../../images/home/定位@2x.png':'../../images/home/定位@2x(2).png'}}"></cover-image>
  25. <cover-view class="navbar-store">
  26. <cover-view style="color: {{navBarBgClass!=''?'#333':'#fff'}};" class="navbar-tips">{{homeData.store.store_name}}</cover-view>
  27. </cover-view>
  28. <cover-image class="navbar-arrow" src="{{navBarBgClass==''?'../../images/home/展开@2x(1).png':'../../images/home/展开@2x.png'}}"></cover-image>
  29. </cover-view>
  30. </cover-view>
  31. </navigation>
  32. <view class="content" style="padding-bottom: 24rpx;">
  33. <!-- 消息提示框 -->
  34. <view class="message-box">
  35. <image class="trumpet" src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20221017/%E5%96%87%E5%8F%AD%402x.png"></image>
  36. <swiper class="message-tip" circular='{{true}}' autoplay vertical='{{true}}' wx:if="{{messageList!=''}}">
  37. <swiper-item wx:for="{{messageList}}" wx:key="index">
  38. <view style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; " class="message-contents">{{item.title}}</view>
  39. <view class="goMessage" data-notice='{{item.notice}}' data-id="{{item.id}}" bindtap="goMessageDetail">去看看>></view>
  40. </swiper-item>
  41. </swiper>
  42. <view class="message-tip" wx:if="{{messageList==''}}">【欢迎使用jolijoli小程序】</view>
  43. <!-- <image style="margin-left: 126rpx;" class="message-icon" src="../../images/home/time.png"></image> -->
  44. <view class="message-icon">
  45. <image bindtap="goMessageCenter" src="../../images/home/message.png"></image>
  46. <view class="message-total" wx:if="{{notMessageTotal!=0}}">{{notMessageTotal}}</view>
  47. </view>
  48. </view>
  49. <!-- 肤龄 -->
  50. <view class="skin-box" bindtap="{{skinInfo==''?'goSkin':'goTestSkin'}}">
  51. <view class="skin-box-left">
  52. <view class="skin-title">肤龄</view>
  53. <view class="skin-date">{{skinInfo==''?'你还没有过测肤状况':skinInfo.create_time}}</view>
  54. </view>
  55. <view class="skin-box-right">
  56. <view class="skin-age" wx:if="{{skinInfo!=''}}">{{skin_type[skinInfo.skin_type-1]}}<text>{{skinInfo.skin_age}}</text>岁</view>
  57. <view class="skin-age" wx:else>立即<text style="font-size: 42rpx; color: #FA7D22;">去测肤</text></view>
  58. </view>
  59. </view>
  60. <!-- <button bindtap="open">点我</button> -->
  61. <!-- 项目分类 -->
  62. <view class="project-classify">
  63. <view class="project-classify-item" wx:for="{{homeData.shortcut}}" wx:key="index" data-index="{{item.url}}" bindtap="goOrder">
  64. <image src="{{item.image_url}}"></image>
  65. <view>{{item.name}}</view>
  66. </view>
  67. </view>
  68. <!-- 推荐项目 -->
  69. <view class="recommend-project" wx:if="{{homeData.config!=''&&homeData.referrals.length!=0}}">{{homeData.config}}</view>
  70. <!-- 推荐项目轮播图 -->
  71. <swiper class="projectImage" wx:if="{{homeData.config!=''&&homeData.referrals.length!=0}}" bindchange='changeSwiper' previous-margin='39rpx' next-margin='39rpx' circular='true'>
  72. <swiper-item class="projectImage-item" bindtap="goOtherUrl" data-type="{{item.url_type}}" data-url="{{item.url}}" wx:for="{{homeData.referrals}}" wx:key="index">
  73. <view class=" boxSmall {{index==swiperIndex?'boxBig':''}}">
  74. <image src="{{item.image_url}}"></image>
  75. </view>
  76. </swiper-item>
  77. </swiper>
  78. <!-- 美丽秘籍模块 -->
  79. <view class="article">
  80. <scroll-view class="article-tab {{tabClass}}" style='--top--:{{navBarData.navBarHeight}}px;' scroll-x="true">
  81. <view class="tab-item {{current == index?'tab-item-active':''}}" bindtap="onTabsChange" data-index='{{index}}' wx:for="{{ classify }}" wx:key="index">
  82. <view style="position: relative;">{{item.name}}</view>
  83. </view>
  84. </scroll-view>
  85. <!-- 瀑布流 -->
  86. <view class="main">
  87. <view wx:for="{{columns}}" wx:key="index" class="column">
  88. <view wx:for="{{item}}" wx:key="index" class="column_item" wx:for-item="pics" bindtap="goArticleDetail" data-id='{{pics.id}}'>
  89. <view class="main-box">
  90. <image src="{{pics.cover}}" class="column_pic" mode="widthFix" />
  91. <view class="main-content">
  92. <view class="main-title">{{pics.title}}</view>
  93. <view class="main-bottom">
  94. <view class="main-author">{{pics.author_name}}</view>
  95. <view class="main-time">{{pics.create_time}}</view>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="hide">
  103. <image wx:for="{{tempPics}}" wx:key="index" src="{{item.cover}}" bindload="loadPic" binderror="loadPicError" data-index="{{index}}" />
  104. </view>
  105. </view>
  106. <!-- listker打卡活动 -->
  107. <view hidden="{{true}}">
  108. <view class="title flex-align-center" catchtap="cardingCatchTap">
  109. <text class="title-text flex1 flex-align-center">打卡活动</text>
  110. <view class="right flex-align-center">
  111. <text style="color: #666666;font-size: 24rpx;">查看更多</text>
  112. <image src="/images/icon_08.png"></image>
  113. </view>
  114. </view>
  115. <view class="carding">
  116. <view class="top">
  117. <view class="title">免费领取菲洛嘉产品</view>
  118. <image class="img" src="/images/q_img.png" catchtap="guildMessage"></image>
  119. </view>
  120. <view class="carding_content">
  121. <view class="line_show"></view>
  122. <view class="carding_item" wx:for="{{progressList}}" wx:key="index">
  123. <image class="carding__img" src="{{(index==5?'/images/all_carding.png':item.status==0?'/images/not_carding.png':(item.status==1?'/images/user_carding.png':(item.status==2?'/images/is_carding.png':'/images/not_carding.png')))}}">
  124. </image>
  125. <view class="carding_number">{{item.day}}</view>
  126. </view>
  127. </view>
  128. <view class="viewData">*体验项目累计6天/月</view>
  129. </view>
  130. </view>
  131. <!-- <view wx:if="{{homeData.card_banner_list.length>0}}"> -->
  132. <view hidden="{{true}}">
  133. <view class="title flex-align-center">
  134. <text class="title-text flex-align-center">开卡活动</text>
  135. </view>
  136. <view class='swiper-box' style="padding-top: 12rpx;">
  137. <swiper circular current="{{cardBannerCurrentSwiper}}" bindanimationfinish="swiperChange" data-current-source="cardBanner">
  138. <swiper-item wx:for="{{homeData.card_banner_list}}" wx:key="index" bindtap="jumpByUrlType" data-item="{{item}}">
  139. <image src="{{item.image_url}}"></image>
  140. </swiper-item>
  141. </swiper>
  142. <view class="swiper-dots flex-align-center flex-column">
  143. <block wx:for="{{homeData.card_banner_list}}" wx:key="index">
  144. <view class="swiper-dot{{index == cardBannerCurrentSwiper ? ' swiper-dot-active' : ''}}"></view>
  145. </block>
  146. </view>
  147. </view>
  148. </view>
  149. <!-- 邀请/被邀请入口 -->
  150. <!-- <view class="invite" wx:if="{{allow_invite==1||allow_receive==1}}"> -->
  151. <!-- <view class="invite">
  152. <text class="invite-title">邀请活动</text>
  153. <view bindtap="onInvite">
  154. <image class="invite-banner" src="{{allow_invite==1?inviteImg:allow_receive==1?beInvitedImg:inviteImg}}"></image>
  155. </view>
  156. </view> -->
  157. </view>
  158. <view class="location flex-align-center" bindtap="goToStore" wx:if="{{false}}">
  159. <!-- <view class="img">
  160. <image class="img1" src="{{homeData.store.logo_url}}"></image>
  161. <image class="img2" src="/images/my/downsemicircle.png"></image>
  162. <text>已选</text>
  163. </view> -->
  164. <image src="{{homeData.store.logo_url}}"></image>
  165. <view class="text flex-column flex1">
  166. <view class="text-box flex-align-center" style="margin-bottom:8rpx;">
  167. <text class="ellipsis" style="font-family: PingFangSC-Semibold;">{{homeData.store.store_name}}</text>
  168. <view class="active flex-center">已选</view>
  169. </view>
  170. <view class="text-box flex-align-center">
  171. <text class="ellipsis" style="font-size:24rpx;width:280rpx;">{{homeData.store.belong_region}}</text>
  172. <text style="font-size:24rpx;color: #FA7D22;">更多>></text>
  173. </view>
  174. </view>
  175. </view>
  176. <view class="content" wx:if="{{false}}">
  177. <view class="title flex-align-center">项目推荐</view>
  178. <view class="list">
  179. <!-- <navigator wx:for="{{list}}" wx:key="index"
  180. url="/pages/projectDetail/projectDetail?project_id={{item.id}}&store_id={{homeData.store.id}}"
  181. hover-class="none" id="goToProject">
  182. </navigator> -->
  183. <view bindtap="goToProject" class="goToProject" data-item="{{item}}" wx:for="{{list}}" wx:key="index">
  184. <view class="item radius flex-column">
  185. <image class="item-top" src="{{item.cover_url}}"></image>
  186. <view class="item-text flex-column">
  187. <!-- <view class="box">
  188. <image src="/images/my/tag.png"></image>
  189. <view class="flex-center">{{index+1}}</view>
  190. </view> -->
  191. <text class="ellipsis" style="font-family: PingFangSC-Medium, PingFang SC;">{{item.project_name}}</text>
  192. <text class="ellipsis" style="font-size: 24rpx;color: #666;margin-top: 10rpx;" wx:if="{{item.project_desc}}">{{item.project_desc}}</text>
  193. </view>
  194. <view class="item-btn flex-align-center">
  195. <text style="font-family: PingFangSC-Semibold;font-size: 44rpx;color: #E95564;">¥{{item.price}}</text>
  196. <text style="margin-left:24rpx;font-size: 28rpx;color: #CCCCCC;text-decoration:line-through;">¥{{item.original_price}}</text>
  197. <text class="flex1"></text>
  198. <view class="btn flex-center">预约项目</view>
  199. <!-- <image src="/images/my/button.png">
  200. <text class="flex-center">预约项目</text>
  201. </image> -->
  202. </view>
  203. </view>
  204. </view>
  205. <view style="text-align:center;margin-top:100rpx;color:#fff;display: {{list.length == 0 ? 'block' : 'none'}};">
  206. 该店铺暂无项目~
  207. </view>
  208. </view>
  209. <view class="title flex-align-center" style="justify-content: space-between" wx:if="{{ homeData.case_list && homeData.case_list.length > 0 }}">
  210. <text style="font-family: PingFangSC-Semibold, PingFang SC;">会员案例</text>
  211. <navigator url="/pages/caseList/caseList" hover-class="none">
  212. <view class="flex-align-center">
  213. <text style="font-size: 28rpx;color: #666666;">查看全部</text>
  214. <image style="width: 48rpx;height: 48rpx;" src="/images/icon_01.png"></image>
  215. <!-- <text style="font-size: 28rpx;color: #666666;">查看全部 >></text> -->
  216. </view>
  217. </navigator>
  218. </view>
  219. <scroll-view class="case-list" scroll-x>
  220. <view class="flex">
  221. <navigator url="/pages/caseDetail/caseDetail?id={{item.id}}" hover-class="none" wx:for="{{ homeData.case_list }}" wx:key="index" class="test">
  222. <view class="case-item flex-column">
  223. <image src="{{ item.cover }}"></image>
  224. <view class="text-box flex-column">
  225. <text class="ellipsis" style="font-size: 28rpx;font-family: PingFangSC-Medium, PingFang SC;">{{ item.title
  226. }}</text>
  227. <text class="ellipsis" style="font-size: 24rpx;color: #666666;">{{ item.desc }}</text>
  228. </view>
  229. </view>
  230. </navigator>
  231. </view>
  232. </scroll-view>
  233. </view>
  234. <navigator url="/pages/vip/vip" hover-class="none" wx:if="{{ activity.expire_time_seconds && activity.expire_time_seconds > 0 && btmToast }}">
  235. <view class="btm-toast">
  236. <view class="flex flex-center margin-box">
  237. <image src="/images/icon_avatar_01.png" class="left-image"></image>
  238. <view class="right flex1 flex-column">
  239. <view class="">
  240. <text>初次到店体验后福利,立即开卡享</text>
  241. <text style="color:#FF6CB2;">{{activity.discount}}</text>
  242. <text>折</text>
  243. </view>
  244. <text>福利活动剩余时间 {{activity.currentTime}}</text>
  245. <text>错过不再有,速领!</text>
  246. </view>
  247. <image src="/images/icon_close_01.png" class="close" catchtap="onCloseToast"></image>
  248. <view class="btn flex-center">立即开卡</view>
  249. </view>
  250. </view>
  251. </navigator>
  252. <wux-landscape visible="{{ false }}" maskClosable="{{ true }}" closable="{{ true }}" bind:close="onClose" data-key="visible" class="home-coupon" newPrefixCls="wux-popup-widtn">
  253. <view class="img-box" bindtap="onConfirm">
  254. <image src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220413/coupon.png" class="coupon-popup-img" />
  255. <text>有效期:{{coupon.ex_time}}</text>
  256. </view>
  257. <!-- <view class="coupon-popup" style="display: none;">
  258. <text style="font-size: 36rpx;">恭喜获取优惠券一张</text>
  259. <view class="item flex">
  260. <view class="item-left flex-center">
  261. <text style="color: #fff;">新人\n体验券</text>
  262. </view>
  263. <view class="item-right flex1 flex-column">
  264. <text>有效期</text>
  265. <text>{{coupon.ex_time}}</text>
  266. <text>{{coupon.coupon_desc}}</text>
  267. </view>
  268. </view>
  269. <view class="btn flex-center" bindtap="onConfirm">确认领取</view>
  270. </view> -->
  271. </wux-landscape>
  272. <!-- 一天一次 -->
  273. <!-- 项目详情 -->
  274. <!-- !visible && posterPopup -->
  275. <wux-landscape visible="{{ !visible && posterPopup }}" maskClosable="{{ true }}" closable="{{ true }}" wx:if="{{ homeData.ad && homeData.ad.cover }}" bind:close="onClose" data-key="posterPopup" class="home-poster" newPrefixCls="wux-popup-widtn">
  276. <view class="img-box" bindtap="goToUrl" data-url="{{ homeData.ad.url }}">
  277. <image src="{{homeData.ad.cover}}" class="coupon-popup-img" />
  278. </view>
  279. </wux-landscape>
  280. </home-skeleton>
  281. <wux-landscape visible="{{ guildMessage }}" maskClosable="{{ true }}" closable="{{ false }}" bind:close="onCloseLandscape" class="skin-popup" catchtouchmove="true">
  282. <view class="use-popup flex-column">
  283. <view class="text-cotent">
  284. <template is="wxParse" data="{{wxParseData:article.nodes}}" />
  285. <!-- <view class="title_guild">积分规则</view>
  286. <view class="inText">1.每消费1元=1积分</view>
  287. <view class="inText">2.游戏、任务、互动等赚积分(以具体告知为准)</view> -->
  288. <!-- <template is="wxParse" data="{{wxParseData:article.nodes}}" /> -->
  289. </view>
  290. <image src="/images/icon_20.png" class="close-img" bindtap="onCloseLandscape"></image>
  291. </view>
  292. </wux-landscape>
  293. <!-- <wux-landscape visible="{{ visible }}" maskClosable="{{ true }}" closable="{{ true }}" bind:close="onClose" data-key="visible" class="home-coupon" newPrefixCls="wux-popup-widtn" >
  294. <view class="img-box" bindtap="onConfirm">
  295. <swiper autoplay="{{true}}" class="coupon-popup-img1" bindchange="bindchanges" interval="1000">
  296. <block wx:for="{{newAcountImage}}" wx:key="*this">
  297. <swiper-item class="coupon-popup-img">
  298. <image src="{{item}}" class="coupon-popup-img1" />
  299. <view hidden="{{index==0?true:false}}" class="newAcountText">新用户专享</view>
  300. <view hidden="{{index==0?true:false}}" class="couponCard {{index==1?'colorShowLike':'colorVFace'}}">
  301. {{index==1?'上镜小V脸':'修丽可项目'}}</view>
  302. <view hidden="{{index==0?true:false}}" class="getNow {{index==1?'colorShowLikeGet':'colorVFaceGet'}}">立即领取
  303. </view>
  304. </swiper-item>
  305. </block>
  306. </swiper>
  307. <view class="onTag">
  308. <view wx:for="{{3}}" wx:key="*this" class="{{currentNewAcount==index?'onTag-index':'onTag-index-select'}}"></view>
  309. </view>
  310. </view>
  311. </wux-landscape> -->
  312. <!-- 十月一弹窗 -->
  313. <!-- <wux-landscape wux-class='activePopBox' visible="{{ PopShow }}" bind:close="onClosePop">
  314. <view class="activePop">
  315. <image bindtap="gotoActive" src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220928/%E4%BD%8D%E5%9B%BE%402x.png"></image>
  316. </view>
  317. </wux-landscape> -->
  318. <!-- <wux-landscape visible="{{ visible }}" maskClosable="{{ true }}" closable="{{ true }}" bind:close="onClose" data-key="visible" class="home-coupon" newPrefixCls="wux-popup-widtn">
  319. </wux-landscape> -->
  320. <!-- 匹配中弹窗 -->
  321. <van-popup show="{{ matching }}" close-icon="close" closeable round bind:close="orderConfirmOnclose">
  322. <view class="scape-block">
  323. <!-- <view class="close">
  324. <image src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220609/close.png"></image>
  325. </view> -->
  326. <view class="loading">
  327. <image src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220609/loading.gif"></image>
  328. </view>
  329. <view class="matching-tips">美容师正在为您核实和确认搭配 项目和产品稍作等待……</view>
  330. </view>
  331. </van-popup>
  332. <!-- 悬浮领券图标 -->
  333. <view class="suspend" bindtap="getCoupon" wx:if="{{false}}">
  334. <image src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220822/%E7%BB%84%205%402x.png"></image>
  335. </view>
  336. <!-- 跳转公众号
  337. <web-view>跳转</web-view> -->