Showing
7 changed files
with
128 additions
and
1 deletions
components/tips/boost.js
0 → 100644
| 1 | +// components/tips/boost.js | ||
| 2 | +const cacheKey='A2L-INDEX' | ||
| 3 | +Component({ | ||
| 4 | + /** | ||
| 5 | + * 组件的属性列表 | ||
| 6 | + */ | ||
| 7 | + properties: { | ||
| 8 | + | ||
| 9 | + }, | ||
| 10 | + lifetimes: { | ||
| 11 | + attached: function() { | ||
| 12 | + this.show() | ||
| 13 | + }, | ||
| 14 | + }, | ||
| 15 | + /** | ||
| 16 | + * 组件的初始数据 | ||
| 17 | + */ | ||
| 18 | + data: { | ||
| 19 | + disp:false, | ||
| 20 | + background:[{ | ||
| 21 | + url:'http://nosqn.colorcun.com/boots/1.png', | ||
| 22 | + txt:'1.戳选地图上的商家,开始预订', | ||
| 23 | + },{ | ||
| 24 | + url:'http://nosqn.colorcun.com/boots/2.png', | ||
| 25 | + txt:'2.搜索商家或位置,开始预订', | ||
| 26 | + }] | ||
| 27 | + }, | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 组件的方法列表 | ||
| 31 | + */ | ||
| 32 | + methods: { | ||
| 33 | + show(){ | ||
| 34 | + wx.getStorage({ | ||
| 35 | + key:cacheKey, | ||
| 36 | + fail:()=>{ | ||
| 37 | + this.setData({ | ||
| 38 | + disp:true, | ||
| 39 | + }) | ||
| 40 | + this.triggerEvent('event',{act:'show',txt:'新用户'}) | ||
| 41 | + //wx.setStorage({key:cacheKey, data:new Date().toISOString()}) | ||
| 42 | + }, | ||
| 43 | + success:()=>{ | ||
| 44 | + this.triggerEvent('event',{act:'hide',txt:'老用户'}) | ||
| 45 | + }, | ||
| 46 | + }) | ||
| 47 | + }, | ||
| 48 | + hide(){ | ||
| 49 | + this.setData({ | ||
| 50 | + disp:false, | ||
| 51 | + }) | ||
| 52 | + this.triggerEvent('event',{act:'hide',txt:'新用户'}) | ||
| 53 | + }, | ||
| 54 | + } | ||
| 55 | +}) |
components/tips/boost.json
0 → 100644
components/tips/boost.wxml
0 → 100644
| 1 | +<!--components/tips/boost.wxml--> | ||
| 2 | +<view class="mask" bindtap="hide" wx:if="{{disp}}"> | ||
| 3 | + <view class="boost" catchtap="catchtap"> | ||
| 4 | + <view class="header flex-lr" bindtap="hide"> | ||
| 5 | + <view> </view> | ||
| 6 | + <view class="title">操作指引</view> | ||
| 7 | + <view class="close"></view> | ||
| 8 | + </view> | ||
| 9 | + <view class="content"> | ||
| 10 | + <swiper indicator-dots style="height:496rpx;"> | ||
| 11 | + <block wx:for="{{background}}" wx:key="*this"> | ||
| 12 | + <swiper-item style="text-align: center"> | ||
| 13 | + <image src="{{item.url}}" class="swiper-image"></image> | ||
| 14 | + <view class="swiper-txt Medium">{{item.txt}}</view> | ||
| 15 | + </swiper-item> | ||
| 16 | + </block> | ||
| 17 | + </swiper> | ||
| 18 | + </view> | ||
| 19 | + </view> | ||
| 20 | +</view> |
components/tips/boost.wxss
0 → 100644
| 1 | +/* components/tips/boost.wxss */ | ||
| 2 | +@import "../../app.wxss"; | ||
| 3 | +.boost{ | ||
| 4 | + width:100%; | ||
| 5 | + height:738rpx; | ||
| 6 | + background:rgba(255,255,255,1); | ||
| 7 | + border-radius:40rpx 40rpx 0rpx 0rpx; | ||
| 8 | + padding: 40rpx 42rpx 0; | ||
| 9 | + box-sizing: border-box; | ||
| 10 | + position: fixed; | ||
| 11 | + bottom: 0; | ||
| 12 | +} | ||
| 13 | +.title{ | ||
| 14 | + height:42rpx; | ||
| 15 | + font-size:30rpx; | ||
| 16 | + font-family:PingFangSC-Regular,PingFang SC; | ||
| 17 | + font-weight:400; | ||
| 18 | + color:rgba(53,53,53,1); | ||
| 19 | + line-height:42rpx; | ||
| 20 | +} | ||
| 21 | +.close{ | ||
| 22 | + width:28rpx; | ||
| 23 | + height:29rpx; | ||
| 24 | + background-size: 100% 100%; | ||
| 25 | + background-image: url("http://nosqn.colorcun.com/sellerbaobao/close.png"); | ||
| 26 | +} | ||
| 27 | + | ||
| 28 | +.content{ | ||
| 29 | + margin-top: 80rpx; | ||
| 30 | +} | ||
| 31 | +.swiper-image{ | ||
| 32 | + width:468rpx; | ||
| 33 | + height:290rpx; | ||
| 34 | +} | ||
| 35 | +.swiper-txt{ | ||
| 36 | + height:44rpx; | ||
| 37 | + font-size:32rpx; | ||
| 38 | + font-family:PingFangSC-Medium,PingFang SC; | ||
| 39 | + font-weight:500; | ||
| 40 | + color:rgba(53,53,53,1); | ||
| 41 | + line-height:44rpx; | ||
| 42 | + margin-top: 60rpx; | ||
| 43 | +} |
| @@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
| 8 | "getpos":"/components/userinfo/getpos", | 8 | "getpos":"/components/userinfo/getpos", |
| 9 | "sb-tr":"/components/reserve/seller-box-transverse/seller-box", | 9 | "sb-tr":"/components/reserve/seller-box-transverse/seller-box", |
| 10 | "a2l":"/components/tips/add-to-lite", | 10 | "a2l":"/components/tips/add-to-lite", |
| 11 | + "boost":"/components/tips/boost", | ||
| 11 | "ds":"/components/tips/discount", | 12 | "ds":"/components/tips/discount", |
| 12 | "caixi":"/components/reserve/caixi", | 13 | "caixi":"/components/reserve/caixi", |
| 13 | "list":"/components/reserve/seller-box-transverse-cview/list", | 14 | "list":"/components/reserve/seller-box-transverse-cview/list", |
| @@ -142,4 +142,5 @@ | @@ -142,4 +142,5 @@ | ||
| 142 | <caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" | 142 | <caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" |
| 143 | bindactive="caixiActive" id="caixi" | 143 | bindactive="caixiActive" id="caixi" |
| 144 | ></caixi> | 144 | ></caixi> |
| 145 | -<activity-enter hasInHome></activity-enter> | ||
| 145 | +<activity-enter hasInHome></activity-enter> | ||
| 146 | +<boost bindevent="boostEvent"></boost> |
-
Please register or login to post a comment