Commit b84a171bdf611650d374d82c74fcc6d810d790fe

Authored by yvan.ni
1 parent 68e0283c

OA测试返回4个的优化

packageA/pages/checkin/checkin.js
... ... @@ -33,6 +33,8 @@ Page({
33 33  
34 34 flag: true,
35 35 isLogin: false,
  36 + imgUrl: app.globalData.setting.imghost,
  37 + show_no_integral:false
36 38  
37 39 },
38 40  
... ... @@ -46,11 +48,16 @@ Page({
46 48 });
47 49 self.loadCheckedRecord();
48 50 }else{
49   - wx.showToast({
50   - title: "网络繁忙,请重试",
51   - icon: 'none',
52   - duration: 2000
53   - })
  51 + if(res.data.msg.indexOf('未开启签到')!=-1){
  52 + self.setData({ show_no_integral: true });
  53 + }else{
  54 + wx.showToast({
  55 + title: res.data.msg,
  56 + icon: 'none',
  57 + duration: 2000
  58 + })
  59 + }
  60 +
54 61 }
55 62 },
56 63 });
... ... @@ -390,5 +397,10 @@ Page({
390 397 if(url){
391 398 getApp().goto(url);
392 399 }
  400 + },
  401 +
  402 + back_to(){
  403 + wx.navigateBack();
393 404 }
  405 +
394 406 })
... ...
packageA/pages/checkin/checkin.wxml
... ... @@ -139,4 +139,20 @@
139 139 </view>
140 140 </view>
141 141  
  142 + <view bindtap="back_to" wx:if="{{show_no_integral}}">
  143 + <view class="cover-layer"></view>
  144 + <view class="pop_up_no">
  145 + <view class="title" style="position:relative">
  146 + 提示
  147 + <image class="close_img" src="{{imgUrl}}/miniapp/images/close.png"></image>
  148 + </view>
  149 + <view class="content">
  150 + <image style="width:270rpx; height:270rpx; margin:20rpx 0"
  151 + src="{{imgUrl}}/miniapp/images/fenxiao.png"></image>
  152 + <view style="margin-top:10rpx">商家暂时未开启积分签到,敬请期待哦! </view>
  153 + </view>
  154 + </view>
  155 + </view>
  156 +
  157 +
142 158 </view>
143 159 \ No newline at end of file
... ...
packageA/pages/checkin/checkin.wxss
... ... @@ -354,3 +354,44 @@ page,
354 354 flex-wrap: wrap;
355 355 text-align:center;
356 356 }
  357 +
  358 +.cover-layer {
  359 + position: fixed;
  360 + left: 0;
  361 + top: 0;
  362 + right: 0;
  363 + bottom: 0;
  364 + z-index: 1000;
  365 + background: rgba(0,0,0,0.4);
  366 + width: 100%;
  367 + height: 100%;
  368 +}
  369 +
  370 +.pop_up_no{
  371 + z-index: 2000;
  372 + position: fixed;
  373 + width:80%;
  374 + height:500rpx;
  375 + left: 50%;
  376 + top:50%;
  377 + transform:translate(-50%,-50%);
  378 + background-color: #fff;
  379 + font-size: 28rpx;
  380 + border-radius: 20rpx;
  381 +}
  382 +
  383 +.pop_up_no .title{
  384 + height: 90rpx;
  385 + background-color: #ffd601;
  386 + text-align: center;
  387 + line-height: 90rpx;
  388 + border-top-right-radius: 20rpx;
  389 + border-top-left-radius: 20rpx;
  390 +}
  391 +
  392 +.pop_up_no .content{
  393 + text-align: center;
  394 +}
  395 +.pop_up_no .close_img{
  396 + width:60rpx; height:60rpx;position:absolute; right:-15px; top:-15rpx;
  397 + }
357 398 \ No newline at end of file
... ...