Commit b03a4dc6361869c7bdeb89f59676bc1cc89ca7f3
1 parent
bfc2f423
oa单优化
Showing
28 changed files
with
150 additions
and
120 deletions
app.js
| @@ -430,16 +430,8 @@ App({ | @@ -430,16 +430,8 @@ App({ | ||
| 430 | //获取场景值 判断是否是单页面 | 430 | //获取场景值 判断是否是单页面 |
| 431 | is_Single_page() { | 431 | is_Single_page() { |
| 432 | let scene = wx.getLaunchOptionsSync().scene; | 432 | let scene = wx.getLaunchOptionsSync().scene; |
| 433 | - //--先判断会员状态-- | ||
| 434 | - if (scene == 1154) { | ||
| 435 | - wx.showToast({ | ||
| 436 | - title: '请前往小程序', | ||
| 437 | - icon: "error", | ||
| 438 | - duration: 3000, | ||
| 439 | - }) | ||
| 440 | - return false | ||
| 441 | - } | ||
| 442 | - return true; | 433 | + //--判断是否是单页面-- |
| 434 | + return scene == 1154? false:true; | ||
| 443 | }, | 435 | }, |
| 444 | 436 | ||
| 445 | 437 |
packageA/pages/jfbuy/jfbuy.js
| @@ -65,9 +65,6 @@ Page({ | @@ -65,9 +65,6 @@ Page({ | ||
| 65 | * 生命周期函数--监听页面加载 | 65 | * 生命周期函数--监听页面加载 |
| 66 | */ | 66 | */ |
| 67 | onLoad: function (options) { | 67 | onLoad: function (options) { |
| 68 | - if(!getApp().is_Single_page()){ | ||
| 69 | - return false; | ||
| 70 | - } | ||
| 71 | var th=this; | 68 | var th=this; |
| 72 | this.data.requestData={ | 69 | this.data.requestData={ |
| 73 | store_id:oo.stoid, | 70 | store_id:oo.stoid, |
packageA/pages/liveStream/liveStream.js
| @@ -208,17 +208,15 @@ Page({ | @@ -208,17 +208,15 @@ Page({ | ||
| 208 | * 生命周期函数--监听页面加载 | 208 | * 生命周期函数--监听页面加载 |
| 209 | */ | 209 | */ |
| 210 | onLoad: function (options) { | 210 | onLoad: function (options) { |
| 211 | - if(!getApp().is_Single_page()){ | ||
| 212 | - return false; | ||
| 213 | - } | ||
| 214 | self = this; | 211 | self = this; |
| 215 | - // console.log('ppppp',this.pageTotal(4, 10)); | 212 | + if(getApp().is_Single_page()){ |
| 213 | + app.isLogin().then(function(data) {//进入页面前已经授权登录成功 | ||
| 214 | + self.setData({ | ||
| 215 | + userInfo: data, | ||
| 216 | + }); | ||
| 217 | + }); | ||
| 218 | + } | ||
| 216 | 219 | ||
| 217 | - app.isLogin().then(function(data) {//进入页面前已经授权登录成功 | ||
| 218 | - self.setData({ | ||
| 219 | - userInfo: data, | ||
| 220 | - }); | ||
| 221 | - }); | ||
| 222 | }, | 220 | }, |
| 223 | 221 | ||
| 224 | /** | 222 | /** |
packageA/pages/quan_list/quan_list.wxml
| @@ -4,44 +4,46 @@ | @@ -4,44 +4,46 @@ | ||
| 4 | 4 | ||
| 5 | <block wx:if="{{config2.couponset}}"> | 5 | <block wx:if="{{config2.couponset}}"> |
| 6 | <view class="header"> | 6 | <view class="header"> |
| 7 | - <rich-text nodes="{{config2.couponset}}" class="r_txt fs26"></rich-text> | 7 | + <rich-text nodes="{{config2.couponset}}" class="r_txt fs26"></rich-text> |
| 8 | </view> | 8 | </view> |
| 9 | </block> | 9 | </block> |
| 10 | <view class="content"> | 10 | <view class="content"> |
| 11 | - <view bindtap="go_detail" data-ind="{{index}}" class="quan_item flex fs30" wx:for="{{dataList}}"> | 11 | + <view bindtap="go_detail" data-ind="{{index}}" class="quan_item flex fs30" wx:for="{{dataList}}"> |
| 12 | <!-- 左边 --> | 12 | <!-- 左边 --> |
| 13 | <view class="left {{tool.get_color(index,dataList)}} flex ai-center jc-center co-w"> | 13 | <view class="left {{tool.get_color(index,dataList)}} flex ai-center jc-center co-w"> |
| 14 | <view class="t-c"> | 14 | <view class="t-c"> |
| 15 | - <view class="fs40"><text class="fs24">¥</text>{{filters.toFix(item.money,2)}}</view> | ||
| 16 | - <view>满{{filters.toFix(item.condition,2)}}可用</view> | 15 | + <view class="fs40"><text class="fs24">¥</text>{{filters.toFix(item.money,2)}}</view> |
| 16 | + <view>满{{filters.toFix(item.condition,2)}}可用</view> | ||
| 17 | </view> | 17 | </view> |
| 18 | </view> | 18 | </view> |
| 19 | - <!-- 右边 --> | 19 | + <!-- 右边 --> |
| 20 | <view class="right fs24 co_g pding" style="background-image:url({{iurl}}/miniapp/images/coupon_img/white.png); position: relative"> | 20 | <view class="right fs24 co_g pding" style="background-image:url({{iurl}}/miniapp/images/coupon_img/white.png); position: relative"> |
| 21 | - <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view> | 21 | + <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view> |
| 22 | 22 | ||
| 23 | - <view class="ellipsis-1" style="margin-top: 5rpx" wx:if="{{item.coupon_remark!=null && item.coupon_remark!=''}}">{{item.coupon_remark}}</view> | ||
| 24 | - <view style="margin-top: 5rpx" wx:else>所有门店通用</view> | ||
| 25 | - <view wx:if="{{item.endtype==0}}">有效期 | ||
| 26 | - <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text> | ||
| 27 | - <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>至 | ||
| 28 | - <text wx:if="{{item.use_end_time>0}}"> {{filters.format_time(item.use_end_time)}}</text><text wx:else>不限</text> | ||
| 29 | - </view> | ||
| 30 | - <view wx:else>有效期 <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text> | 23 | + <view class="ellipsis-1" style="margin-top: 5rpx" wx:if="{{item.coupon_remark!=null && item.coupon_remark!=''}}">{{item.coupon_remark}}</view> |
| 24 | + <view style="margin-top: 5rpx" wx:else>所有门店通用</view> | ||
| 25 | + <view wx:if="{{item.endtype==0}}">有效期 | ||
| 26 | + <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text> | ||
| 27 | + <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text> | ||
| 28 | + 至 | ||
| 29 | + <text wx:if="{{item.use_end_time>0}}"> {{filters.format_time(item.use_end_time)}}</text><text wx:else>不限</text> | ||
| 30 | + </view> | ||
| 31 | + <view wx:else>有效期 | ||
| 32 | + <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text> | ||
| 31 | <text wx:else>{{filters.format_time(getcurday)}}</text> | 33 | <text wx:else>{{filters.format_time(getcurday)}}</text> |
| 32 | 至 | 34 | 至 |
| 33 | - <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days)}}</text> | ||
| 34 | - <text wx:else>不限</text> | ||
| 35 | - | ||
| 36 | - </view> | ||
| 37 | - <view>每人限领:<text wx:if="{{item.everyone_num>0}}">{{item.everyone_num}}</text><text wx:else>不限</text></view> | ||
| 38 | - <!-- 领取按钮 --> | ||
| 39 | - <view data-ind="{{index}}" data-cid="{{item.id}}" catchtap="get_quan"> | 35 | + <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days+3600*24*item.startdays)}}</text> |
| 36 | + <text wx:else>不限</text> | ||
| 37 | + | ||
| 38 | + </view> | ||
| 39 | + <view>每人限领:<text wx:if="{{item.everyone_num>0}}">{{item.everyone_num}}</text><text wx:else>不限</text></view> | ||
| 40 | + <!-- 领取按钮 --> | ||
| 41 | + <view data-ind="{{index}}" data-cid="{{item.id}}" catchtap="get_quan"> | ||
| 40 | <view wx:if="{{item.everyone_num>0 && item.lqnum>=item.everyone_num}}" class="btn flex jc-center ai-center is_get">已领取</view> | 42 | <view wx:if="{{item.everyone_num>0 && item.lqnum>=item.everyone_num}}" class="btn flex jc-center ai-center is_get">已领取</view> |
| 41 | <view wx:else class="btn flex jc-center ai-center">立即领取</view> | 43 | <view wx:else class="btn flex jc-center ai-center">立即领取</view> |
| 42 | - </view> | 44 | + </view> |
| 43 | </view> | 45 | </view> |
| 44 | - </view> | 46 | + </view> |
| 45 | </view> | 47 | </view> |
| 46 | 48 | ||
| 47 | <view wx:if="{{show_success}}"> | 49 | <view wx:if="{{show_success}}"> |
| @@ -58,5 +60,4 @@ | @@ -58,5 +60,4 @@ | ||
| 58 | </view> | 60 | </view> |
| 59 | 61 | ||
| 60 | <warn id="warn"></warn> | 62 | <warn id="warn"></warn> |
| 61 | -<nav_box id="nav"></nav_box> | ||
| 62 | - | 63 | +<nav_box id="nav"></nav_box> |
| 63 | \ No newline at end of file | 64 | \ No newline at end of file |
packageA/pages/quan_pro/quan_pro.wxml
| @@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
| 40 | <view wx:else class="lower fs30">有效期 | 40 | <view wx:else class="lower fs30">有效期 |
| 41 | <text wx:if="{{ q_data.starttype==1}}"> {{filters.format_time(getcurday+3600*24*q_data.startdays)}}</text> | 41 | <text wx:if="{{ q_data.starttype==1}}"> {{filters.format_time(getcurday+3600*24*q_data.startdays)}}</text> |
| 42 | <text wx:else>{{filters.format_time(getcurday)}}</text>至 | 42 | <text wx:else>{{filters.format_time(getcurday)}}</text>至 |
| 43 | - <text wx:if="{{q_data.days>0}}"> {{filters.format_time(getcurday+3600*24*q_data.days)}}</text><text wx:else>不限</text> | 43 | + <text wx:if="{{q_data.days>0}}"> {{filters.format_time(getcurday+3600*24*q_data.days+3600*24*q_data.startdays)}}</text><text wx:else>不限</text> |
| 44 | </view> | 44 | </view> |
| 45 | </block> | 45 | </block> |
| 46 | 46 |
packageB/pages/zuhegou/index/index.js
| @@ -123,9 +123,7 @@ Page({ | @@ -123,9 +123,7 @@ Page({ | ||
| 123 | * 生命周期函数--监听页面加载 | 123 | * 生命周期函数--监听页面加载 |
| 124 | */ | 124 | */ |
| 125 | onLoad: function (options) { | 125 | onLoad: function (options) { |
| 126 | - if(!getApp().is_Single_page()){ | ||
| 127 | - return false; | ||
| 128 | - } | 126 | + |
| 129 | console.log(options, 111); | 127 | console.log(options, 111); |
| 130 | self = this; | 128 | self = this; |
| 131 | var the_id = options.id; | 129 | var the_id = options.id; |
| @@ -160,8 +158,10 @@ Page({ | @@ -160,8 +158,10 @@ Page({ | ||
| 160 | //如果有会员的时候 | 158 | //如果有会员的时候 |
| 161 | var userInfo = getApp().globalData.userInfo; | 159 | var userInfo = getApp().globalData.userInfo; |
| 162 | if (!userInfo) { | 160 | if (!userInfo) { |
| 163 | - getApp().goto("/pages/togoin/togoin"); | ||
| 164 | - return false; | 161 | + if(getApp().is_Single_page()){ |
| 162 | + getApp().goto("/pages/togoin/togoin"); | ||
| 163 | + return false; | ||
| 164 | + } | ||
| 165 | } | 165 | } |
| 166 | }, | 166 | }, |
| 167 | 167 |
packageB/pages/zuhegou/preindex/index.js
| @@ -123,9 +123,6 @@ Page({ | @@ -123,9 +123,6 @@ Page({ | ||
| 123 | * 生命周期函数--监听页面加载 | 123 | * 生命周期函数--监听页面加载 |
| 124 | */ | 124 | */ |
| 125 | onLoad: function (options) { | 125 | onLoad: function (options) { |
| 126 | - if(!getApp().is_Single_page()){ | ||
| 127 | - return false; | ||
| 128 | - } | ||
| 129 | console.log(options, 111); | 126 | console.log(options, 111); |
| 130 | self = this; | 127 | self = this; |
| 131 | var the_id = options.id; | 128 | var the_id = options.id; |
| @@ -160,8 +157,10 @@ Page({ | @@ -160,8 +157,10 @@ Page({ | ||
| 160 | //如果有会员的时候 | 157 | //如果有会员的时候 |
| 161 | var userInfo = getApp().globalData.userInfo; | 158 | var userInfo = getApp().globalData.userInfo; |
| 162 | if (!userInfo) { | 159 | if (!userInfo) { |
| 163 | - getApp().goto("/pages/togoin/togoin"); | ||
| 164 | - return false; | 160 | + if(getApp().is_Single_page()){ |
| 161 | + getApp().goto("/pages/togoin/togoin"); | ||
| 162 | + return false; | ||
| 163 | + } | ||
| 165 | } | 164 | } |
| 166 | }, | 165 | }, |
| 167 | 166 |
packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | 5 | ||
| 6 | <!-- 商品名称 --> | 6 | <!-- 商品名称 --> |
| 7 | <view class="spec-goods"> | 7 | <view class="spec-goods"> |
| 8 | - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 8 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> |
| 9 | <view class="spec-goods-info"> | 9 | <view class="spec-goods-info"> |
| 10 | <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> | 10 | <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> |
| 11 | <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" > | 11 | <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" > |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| @@ -285,9 +285,7 @@ Page({ | @@ -285,9 +285,7 @@ Page({ | ||
| 285 | 285 | ||
| 286 | //------初始化加载---------- | 286 | //------初始化加载---------- |
| 287 | onLoad: function (t) { | 287 | onLoad: function (t) { |
| 288 | - if(!getApp().is_Single_page()){ | ||
| 289 | - return false; | ||
| 290 | - } | 288 | + |
| 291 | // console.log('onload'); | 289 | // console.log('onload'); |
| 292 | if(t && t.group_id) { | 290 | if(t && t.group_id) { |
| 293 | this.data.group_id = t.group_id; | 291 | this.data.group_id = t.group_id; |
| @@ -534,10 +532,13 @@ Page({ | @@ -534,10 +532,13 @@ Page({ | ||
| 534 | //--先判断会员登陆状态-- | 532 | //--先判断会员登陆状态-- |
| 535 | var user_info = getApp().globalData.userInfo; | 533 | var user_info = getApp().globalData.userInfo; |
| 536 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | 534 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 535 | + | ||
| 536 | + if(getApp().is_Single_page()){ | ||
| 537 | wx.navigateTo({ | 537 | wx.navigateTo({ |
| 538 | - url: '/pages/togoin/togoin', | ||
| 539 | - }) | 538 | + url: '/pages/togoin/togoin', |
| 539 | + }) | ||
| 540 | return false; | 540 | return false; |
| 541 | + } | ||
| 541 | } | 542 | } |
| 542 | 543 | ||
| 543 | }, | 544 | }, |
pages/activity/pind_list/pind_list.js
| @@ -22,9 +22,6 @@ Page({ | @@ -22,9 +22,6 @@ Page({ | ||
| 22 | 22 | ||
| 23 | //------初始化加载---------- | 23 | //------初始化加载---------- |
| 24 | onLoad: function (t) { | 24 | onLoad: function (t) { |
| 25 | - if(!getApp().is_Single_page()){ | ||
| 26 | - return false; | ||
| 27 | - } | ||
| 28 | wx.setNavigationBarTitle({ | 25 | wx.setNavigationBarTitle({ |
| 29 | title: "天天拼单", | 26 | title: "天天拼单", |
| 30 | }) | 27 | }) |
pages/activity/seckill_list/seckill_list.js
| @@ -21,9 +21,6 @@ Page({ | @@ -21,9 +21,6 @@ Page({ | ||
| 21 | 21 | ||
| 22 | //------初始化加载---------- | 22 | //------初始化加载---------- |
| 23 | onLoad: function (t) { | 23 | onLoad: function (t) { |
| 24 | - if(!getApp().is_Single_page()){ | ||
| 25 | - return false; | ||
| 26 | - } | ||
| 27 | wx.setNavigationBarTitle({ | 24 | wx.setNavigationBarTitle({ |
| 28 | title: "商品秒杀", | 25 | title: "商品秒杀", |
| 29 | }) | 26 | }) |
pages/giftpack/buygiftpack/giftpackbuy.js
| @@ -29,9 +29,7 @@ Page({ | @@ -29,9 +29,7 @@ Page({ | ||
| 29 | first_leader: e.globalData.first_leader || 0, // 推荐人ID | 29 | first_leader: e.globalData.first_leader || 0, // 推荐人ID |
| 30 | }, | 30 | }, |
| 31 | onLoad: function (options) { | 31 | onLoad: function (options) { |
| 32 | - if(!getApp().is_Single_page()){ | ||
| 33 | - return false; | ||
| 34 | - } | 32 | + |
| 35 | var th = this; | 33 | var th = this; |
| 36 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id | 34 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id |
| 37 | my_confirm.open_cancel(0); | 35 | my_confirm.open_cancel(0); |
| @@ -73,15 +71,17 @@ Page({ | @@ -73,15 +71,17 @@ Page({ | ||
| 73 | }); | 71 | }); |
| 74 | } | 72 | } |
| 75 | }) | 73 | }) |
| 76 | - | 74 | + |
| 77 | 75 | ||
| 78 | }, | 76 | }, |
| 79 | onShow: function () { | 77 | onShow: function () { |
| 80 | //--先判断会员状态-- | 78 | //--先判断会员状态-- |
| 81 | var user_info = getApp().globalData.userInfo; | 79 | var user_info = getApp().globalData.userInfo; |
| 82 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | 80 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 83 | - getApp().goto('/pages/togoin/togoin'); | ||
| 84 | - return false; | 81 | + if(getApp().is_Single_page()){ |
| 82 | + getApp().goto('/pages/togoin/togoin'); | ||
| 83 | + return false; | ||
| 84 | + } | ||
| 85 | } | 85 | } |
| 86 | this.getList(); | 86 | this.getList(); |
| 87 | 87 |
pages/giftpack/giftpacklist/giftpacklist.js
| @@ -32,9 +32,6 @@ Page({ | @@ -32,9 +32,6 @@ Page({ | ||
| 32 | first_leader: e.globalData.first_leader || 0, // 推荐人ID | 32 | first_leader: e.globalData.first_leader || 0, // 推荐人ID |
| 33 | }, | 33 | }, |
| 34 | onLoad: function (options) { | 34 | onLoad: function (options) { |
| 35 | - if(!getApp().is_Single_page()){ | ||
| 36 | - return false; | ||
| 37 | - } | ||
| 38 | var th = this; | 35 | var th = this; |
| 39 | th.setData({ | 36 | th.setData({ |
| 40 | isBuy: options.isBuy, | 37 | isBuy: options.isBuy, |
| @@ -65,13 +62,11 @@ Page({ | @@ -65,13 +62,11 @@ Page({ | ||
| 65 | onShow: function () { | 62 | onShow: function () { |
| 66 | //--先判断会员状态-- | 63 | //--先判断会员状态-- |
| 67 | var user_info = getApp().globalData.userInfo; | 64 | var user_info = getApp().globalData.userInfo; |
| 68 | - | ||
| 69 | - if(!getApp().is_Single_page()){ | ||
| 70 | - return false; | ||
| 71 | - } | ||
| 72 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | 65 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 73 | - getApp().goto('/pages/togoin/togoin'); | ||
| 74 | - return false; | 66 | + if(getApp().is_Single_page()){ |
| 67 | + getApp().goto('/pages/togoin/togoin'); | ||
| 68 | + return false; | ||
| 69 | + } | ||
| 75 | } | 70 | } |
| 76 | if (this.data.isBuy == 0) { | 71 | if (this.data.isBuy == 0) { |
| 77 | this.GetMyGiftList(); | 72 | this.GetMyGiftList(); |
pages/giftpack/mygiftpack/mygiftpack.js
| @@ -30,9 +30,6 @@ Page({ | @@ -30,9 +30,6 @@ Page({ | ||
| 30 | }, | 30 | }, |
| 31 | 31 | ||
| 32 | onLoad: function(options) { | 32 | onLoad: function(options) { |
| 33 | - if(!getApp().is_Single_page()){ | ||
| 34 | - return false; | ||
| 35 | - } | ||
| 36 | var th = this; | 33 | var th = this; |
| 37 | th.setData({ | 34 | th.setData({ |
| 38 | getStorageID: a.stoid, | 35 | getStorageID: a.stoid, |
| @@ -79,8 +76,12 @@ Page({ | @@ -79,8 +76,12 @@ Page({ | ||
| 79 | //--先判断会员状态-- | 76 | //--先判断会员状态-- |
| 80 | var user_info = getApp().globalData.userInfo; | 77 | var user_info = getApp().globalData.userInfo; |
| 81 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | 78 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 82 | - getApp().goto('/pages/togoin/togoin'); | ||
| 83 | - return false; | 79 | + if(getApp().is_Single_page()){ |
| 80 | + getApp().goto('/pages/togoin/togoin'); | ||
| 81 | + return false; | ||
| 82 | + } | ||
| 83 | + // getApp().goto('/pages/togoin/togoin'); | ||
| 84 | + // return false; | ||
| 84 | } | 85 | } |
| 85 | this.getList(); | 86 | this.getList(); |
| 86 | 87 |
pages/goods/categoryList/categoryList.js
| @@ -93,9 +93,6 @@ Page({ | @@ -93,9 +93,6 @@ Page({ | ||
| 93 | 93 | ||
| 94 | 94 | ||
| 95 | onLoad: function(tt) { | 95 | onLoad: function(tt) { |
| 96 | - if(!getApp().is_Single_page()){ | ||
| 97 | - return false; | ||
| 98 | - } | ||
| 99 | var that = this; | 96 | var that = this; |
| 100 | var first_leader=tt.first_leader; | 97 | var first_leader=tt.first_leader; |
| 101 | if(first_leader){ | 98 | if(first_leader){ |
pages/goods/goodsInfo/buy_flash_normal.wxml
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <view class="pding"> | 3 | <view class="pding"> |
| 4 | <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | 4 | <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> |
| 5 | <view class="spec-goods"> | 5 | <view class="spec-goods"> |
| 6 | - <image class="wh100 spec-img xc-distance-bottom" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> |
| 7 | <view class="spec-goods-info"> | 7 | <view class="spec-goods-info"> |
| 8 | <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | 8 | <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> |
| 9 | <view class="flex ai_end xc-val-money"> | 9 | <view class="flex ai_end xc-val-money"> |
pages/goods/goodsInfo/buy_integral.wxml
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <view class="pding"> | 3 | <view class="pding"> |
| 4 | <icon bindtap="closeSpecModal_inte" class="modal-close" color="black" size="22" type="cancel"></icon> | 4 | <icon bindtap="closeSpecModal_inte" class="modal-close" color="black" size="22" type="cancel"></icon> |
| 5 | <view class="spec-goods"> | 5 | <view class="spec-goods"> |
| 6 | - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> |
| 7 | <view class="spec-goods-info"> | 7 | <view class="spec-goods-info"> |
| 8 | <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | 8 | <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> |
| 9 | <view class="flex ai_end xc-val-money"> | 9 | <view class="flex ai_end xc-val-money"> |
pages/goods/goodsInfo/buy_integral_normal.wxml
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <view class="pding"> | 3 | <view class="pding"> |
| 4 | <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | 4 | <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon> |
| 5 | <view class="spec-goods"> | 5 | <view class="spec-goods"> |
| 6 | - <image class="wh100 spec-img xc-distance-bottom" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> |
| 7 | <view class="spec-goods-info"> | 7 | <view class="spec-goods-info"> |
| 8 | <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | 8 | <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> |
| 9 | <view class="flex ai_end xc-val-money"> | 9 | <view class="flex ai_end xc-val-money"> |
pages/goods/goodsInfo/buy_pt.wxml
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | 5 | ||
| 6 | <!-- 商品名称 --> | 6 | <!-- 商品名称 --> |
| 7 | <view class="spec-goods"> | 7 | <view class="spec-goods"> |
| 8 | - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 8 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> |
| 9 | <view class="spec-goods-info"> | 9 | <view class="spec-goods-info"> |
| 10 | <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> | 10 | <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> |
| 11 | <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" > | 11 | <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" > |
pages/goods/goodsInfo/goodsInfo.js
| @@ -4519,12 +4519,44 @@ Page({ | @@ -4519,12 +4519,44 @@ Page({ | ||
| 4519 | if (quan_list) { | 4519 | if (quan_list) { |
| 4520 | for (var ind in quan_list) { | 4520 | for (var ind in quan_list) { |
| 4521 | var ep = quan_list[ind]; | 4521 | var ep = quan_list[ind]; |
| 4522 | - var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd"); | ||
| 4523 | - var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd"); | ||
| 4524 | - start = start.replace("00:00:00", ""); | ||
| 4525 | - end = end.replace("00:00:00", ""); | 4522 | + var start = ""; |
| 4523 | + var end = ""; | ||
| 4524 | + if(ep.endtype == 1){ | ||
| 4525 | + if(ep.starttype == 1) { | ||
| 4526 | + start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd"); | ||
| 4527 | + }else{ | ||
| 4528 | + start = ut.formatTime(ut.gettimestamp(),"yyyy-MM-dd"); | ||
| 4529 | + } | ||
| 4530 | + if(ep.days > 0) { | ||
| 4531 | + end = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays+3600*24*ep.days,"yyyy-MM-dd"); | ||
| 4532 | + }else{ | ||
| 4533 | + end = "不限"; | ||
| 4534 | + } | ||
| 4535 | + }else { | ||
| 4536 | + if(ep.starttype == 1 ){ | ||
| 4537 | + start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd"); | ||
| 4538 | + }else{ | ||
| 4539 | + if(ep.starttype == 0 && ep.use_start_time >0) { | ||
| 4540 | + start = ut.formatTime(ep.use_start_time ,"yyyy-MM-dd"); | ||
| 4541 | + }else{ | ||
| 4542 | + start = "不限" | ||
| 4543 | + } | ||
| 4544 | + } | ||
| 4545 | + | ||
| 4546 | + if(ep.use_end_time > 0 ) { | ||
| 4547 | + end = ut.formatTime(ep.use_end_time ,"yyyy-MM-dd"); | ||
| 4548 | + }else{ | ||
| 4549 | + end = "不限" | ||
| 4550 | + } | ||
| 4551 | + } | ||
| 4526 | quan_list[ind].start = start; | 4552 | quan_list[ind].start = start; |
| 4527 | quan_list[ind].end = end; | 4553 | quan_list[ind].end = end; |
| 4554 | + // var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd"); | ||
| 4555 | + // var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd"); | ||
| 4556 | + // start = start.replace("00:00:00", ""); | ||
| 4557 | + // end = end.replace("00:00:00", ""); | ||
| 4558 | + // quan_list[ind].start = start; | ||
| 4559 | + // quan_list[ind].end = end; | ||
| 4528 | } | 4560 | } |
| 4529 | } | 4561 | } |
| 4530 | 4562 |
pages/goods/goodsInfo/goodsInfo.wxml
| @@ -295,7 +295,7 @@ | @@ -295,7 +295,7 @@ | ||
| 295 | <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}"> | 295 | <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}"> |
| 296 | 296 | ||
| 297 | <view class="market-price flex" style="align-items: baseline;"> | 297 | <view class="market-price flex" style="align-items: baseline;"> |
| 298 | - <block wx:if="{{card_field && data[card_field]>0}}"> | 298 | + <block wx:if="{{card_field && data[card_field]>0 && is_no_plus}}"> |
| 299 | <view class="flex ai-center grade-card-frame"> | 299 | <view class="flex ai-center grade-card-frame"> |
| 300 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 300 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
| 301 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | 301 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> |
| @@ -1470,7 +1470,7 @@ | @@ -1470,7 +1470,7 @@ | ||
| 1470 | <view class="top-frame"> | 1470 | <view class="top-frame"> |
| 1471 | <view class="xc-coupon-frame "> | 1471 | <view class="xc-coupon-frame "> |
| 1472 | <!-- -单张的券- --> | 1472 | <!-- -单张的券- --> |
| 1473 | - <view class="rel" wx:for="{{quan_list}}" wx:key="{{index}}"> | 1473 | + <view class="rel" wx:for="{{quan_list}}" wx:key="id"> |
| 1474 | <view class="coupon flex"> | 1474 | <view class="coupon flex"> |
| 1475 | <view class="circle xc-circular-one"></view> | 1475 | <view class="circle xc-circular-one"></view> |
| 1476 | <view class="xc-coupon-left "> | 1476 | <view class="xc-coupon-left "> |
pages/index/index/index.js
| @@ -88,9 +88,6 @@ Page({ | @@ -88,9 +88,6 @@ Page({ | ||
| 88 | }, | 88 | }, |
| 89 | 89 | ||
| 90 | onLoad: async function (tt) { | 90 | onLoad: async function (tt) { |
| 91 | - if(!getApp().is_Single_page()){ | ||
| 92 | - return false; | ||
| 93 | - } | ||
| 94 | var th = this; | 91 | var th = this; |
| 95 | var first_leader = tt.first_leader; | 92 | var first_leader = tt.first_leader; |
| 96 | if (!first_leader && tt.scene) { | 93 | if (!first_leader && tt.scene) { |
pages/template/index.js
| @@ -15,9 +15,6 @@ Page({ | @@ -15,9 +15,6 @@ Page({ | ||
| 15 | }, | 15 | }, |
| 16 | 16 | ||
| 17 | onLoad: function(e) { | 17 | onLoad: function(e) { |
| 18 | - if(!getApp().is_Single_page()){ | ||
| 19 | - return false; | ||
| 20 | - } | ||
| 21 | var th = this; | 18 | var th = this; |
| 22 | this.data.temp_id=e.scene; | 19 | this.data.temp_id=e.scene; |
| 23 | if(!this.data.temp_id) | 20 | if(!this.data.temp_id) |
pages/user/assistance/assistance.js
| @@ -39,9 +39,6 @@ Page({ | @@ -39,9 +39,6 @@ Page({ | ||
| 39 | * 生命周期函数--监听页面加载 | 39 | * 生命周期函数--监听页面加载 |
| 40 | */ | 40 | */ |
| 41 | onLoad: function(options) { | 41 | onLoad: function(options) { |
| 42 | - if(!getApp().is_Single_page()){ | ||
| 43 | - return false; | ||
| 44 | - } | ||
| 45 | var th = this; | 42 | var th = this; |
| 46 | var nav_b = th.selectComponent("#nav_b"); //组件的id | 43 | var nav_b = th.selectComponent("#nav_b"); //组件的id |
| 47 | nav_b.set_name("助力", "/pages/user/assistance/assistance"); | 44 | nav_b.set_name("助力", "/pages/user/assistance/assistance"); |
| @@ -56,8 +53,10 @@ Page({ | @@ -56,8 +53,10 @@ Page({ | ||
| 56 | //--先判断会员状态-- | 53 | //--先判断会员状态-- |
| 57 | var user_info = getApp().globalData.userInfo; | 54 | var user_info = getApp().globalData.userInfo; |
| 58 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | 55 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 59 | - getApp().goto('/pages/togoin/togoin'); | ||
| 60 | - return false; | 56 | + if(getApp().is_Single_page()){ |
| 57 | + getApp().goto('/pages/togoin/togoin'); | ||
| 58 | + return false; | ||
| 59 | + } | ||
| 61 | } | 60 | } |
| 62 | 61 | ||
| 63 | var th = this; | 62 | var th = this; |
pages/user/index/index.js
| @@ -25,6 +25,7 @@ Page({ | @@ -25,6 +25,7 @@ Page({ | ||
| 25 | txmon: 0, | 25 | txmon: 0, |
| 26 | byquan: 0, | 26 | byquan: 0, |
| 27 | yuer: 0, | 27 | yuer: 0, |
| 28 | + is_no_plus:1, | ||
| 28 | currentPage: 1, | 29 | currentPage: 1, |
| 29 | recommend_list: [], | 30 | recommend_list: [], |
| 30 | tc_hide: true, | 31 | tc_hide: true, |
| @@ -134,7 +135,21 @@ Page({ | @@ -134,7 +135,21 @@ Page({ | ||
| 134 | } | 135 | } |
| 135 | }) | 136 | }) |
| 136 | 137 | ||
| 137 | - | 138 | + //调用接口判断商家plus有没有过期 |
| 139 | + rq.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=3", {}).then(res => { | ||
| 140 | + if (res.data.code == 0) { | ||
| 141 | + var arr = res.data.data.pageData; | ||
| 142 | + if (arr.length > 0) { | ||
| 143 | + var item = arr[0]; | ||
| 144 | + if (item.is_sy == 0) { | ||
| 145 | + var now = Date.parse(new Date()); now = now / 1000; | ||
| 146 | + if (item.end_time < now) { | ||
| 147 | + th.setData({ is_no_plus: 0 }) | ||
| 148 | + } | ||
| 149 | + } | ||
| 150 | + } | ||
| 151 | + } | ||
| 152 | + }) | ||
| 138 | var th=this; | 153 | var th=this; |
| 139 | 154 | ||
| 140 | // 判断是否开启美业 | 155 | // 判断是否开启美业 |
pages/user/index/index.wxml
| @@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
| 69 | </image> | 69 | </image> |
| 70 | 70 | ||
| 71 | </view> | 71 | </view> |
| 72 | - <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2 && show_buy_plus}}"> | 72 | + <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2 && show_buy_plus && is_no_plus}}"> |
| 73 | <view class="xc-add-member flex-center-around "> | 73 | <view class="xc-add-member flex-center-around "> |
| 74 | <view class="flex jc-center ai-center"> | 74 | <view class="flex jc-center ai-center"> |
| 75 | <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png"></image> | 75 | <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png"></image> |
pages/user/userinfo/userinfo.js
| @@ -49,6 +49,7 @@ Page({ | @@ -49,6 +49,7 @@ Page({ | ||
| 49 | fir_pick_index: 0, | 49 | fir_pick_index: 0, |
| 50 | sec_pick_index: 0, | 50 | sec_pick_index: 0, |
| 51 | is_gps: 1, | 51 | is_gps: 1, |
| 52 | + is_no_plus:1, | ||
| 52 | lon: 0, | 53 | lon: 0, |
| 53 | only_pk: 0, | 54 | only_pk: 0, |
| 54 | open_ind_store: 0, //哪里打开的门店列表的控制属性 | 55 | open_ind_store: 0, //哪里打开的门店列表的控制属性 |
| @@ -608,6 +609,7 @@ Page({ | @@ -608,6 +609,7 @@ Page({ | ||
| 608 | }, | 609 | }, |
| 609 | //------初始化加载---------- | 610 | //------初始化加载---------- |
| 610 | onLoad: function(t) { | 611 | onLoad: function(t) { |
| 612 | + let th= this; | ||
| 611 | var user = getApp().globalData.userInfo; | 613 | var user = getApp().globalData.userInfo; |
| 612 | if (user.card_field != '' && user.card_field != null && user.card_field != undefined && user.card_expiredate) { | 614 | if (user.card_field != '' && user.card_field != null && user.card_field != undefined && user.card_expiredate) { |
| 613 | var now = ut.gettimestamp(); | 615 | var now = ut.gettimestamp(); |
| @@ -618,6 +620,21 @@ Page({ | @@ -618,6 +620,21 @@ Page({ | ||
| 618 | this.puls_user(); | 620 | this.puls_user(); |
| 619 | } | 621 | } |
| 620 | } | 622 | } |
| 623 | + //调用接口判断商家plus有没有过期 | ||
| 624 | + getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + r.stoid + "&type=3", {}).then(res => { | ||
| 625 | + if (res.data.code == 0) { | ||
| 626 | + var arr = res.data.data.pageData; | ||
| 627 | + if (arr.length > 0) { | ||
| 628 | + var item = arr[0]; | ||
| 629 | + if (item.is_sy == 0) { | ||
| 630 | + var now = Date.parse(new Date()); now = now / 1000; | ||
| 631 | + if (item.end_time < now) { | ||
| 632 | + th.setData({ is_no_plus: 0 }) | ||
| 633 | + } | ||
| 634 | + } | ||
| 635 | + } | ||
| 636 | + } | ||
| 637 | + }) | ||
| 621 | this.initial_user(); | 638 | this.initial_user(); |
| 622 | 639 | ||
| 623 | // 获取用户昵称 | 640 | // 获取用户昵称 |
pages/user/userinfo/userinfo.wxml
| @@ -11,17 +11,15 @@ | @@ -11,17 +11,15 @@ | ||
| 11 | 11 | ||
| 12 | <view class="flex-center vipmax"> | 12 | <view class="flex-center vipmax"> |
| 13 | <view> | 13 | <view> |
| 14 | - | ||
| 15 | <view> | 14 | <view> |
| 16 | <view class="ellipsis-2 Nickname" style="font-size: 31rpx"> | 15 | <view class="ellipsis-2 Nickname" style="font-size: 31rpx"> |
| 17 | <view style="float:left;">{{user.nickname}}</view> | 16 | <view style="float:left;">{{user.nickname}}</view> |
| 18 | <button bindtap="getUserProfile" style="margin-left:10rpx;float:left;width: 200rpx;height:50rpx;font-size:20rpx;" class="flex-center fs30 confirmtext"> 点击更新头像昵称 </button> | 17 | <button bindtap="getUserProfile" style="margin-left:10rpx;float:left;width: 200rpx;height:50rpx;font-size:20rpx;" class="flex-center fs30 confirmtext"> 点击更新头像昵称 </button> |
| 19 | </view> | 18 | </view> |
| 20 | - | ||
| 21 | </view> | 19 | </view> |
| 22 | 20 | ||
| 23 | <view class="flex fs22 vip"> | 21 | <view class="flex fs22 vip"> |
| 24 | - <block wx:if="{{isBool&&gradename}}"> | 22 | + <block wx:if="{{isBool && gradename}}"> |
| 25 | <navigator url="/pages/user/userqy/userqy"> | 23 | <navigator url="/pages/user/userqy/userqy"> |
| 26 | <view class="flex-center AncrownMax"> | 24 | <view class="flex-center AncrownMax"> |
| 27 | <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image> | 25 | <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image> |
| @@ -29,7 +27,7 @@ | @@ -29,7 +27,7 @@ | ||
| 29 | </view> | 27 | </view> |
| 30 | </navigator> | 28 | </navigator> |
| 31 | </block> | 29 | </block> |
| 32 | - <block wx:if="{{pulscardname && rank_switch > 0 }}"> | 30 | + <block wx:if="{{pulscardname && rank_switch > 0 && is_no_plus}}"> |
| 33 | <navigator url="/pages/user/plus/plus"> | 31 | <navigator url="/pages/user/plus/plus"> |
| 34 | <view class="flex-center plusMax"> | 32 | <view class="flex-center plusMax"> |
| 35 | <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 33 | <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |