zhashaonan před 6 roky
rodič
revize
a9cbe47e22

+ 1 - 2
app.json

@@ -17,8 +17,7 @@
     "pages/orderPaySn/orderPaySn",
     "pages/fcode/fcode",
     "pages/login/login",
-    "pages/shareBonus/shareBonus",
-    "pages/pandaBonus/pandaBonus"
+    "pages/shareBonus/shareBonus"
   ],
   "window": {
     "backgroundTextStyle": "dark",

+ 2 - 2
pages/login/login.js

@@ -85,11 +85,11 @@ Page({
             app.globalData.backLogin = true;
             let len = getCurrentPages().length
             let prev = getCurrentPages()[len - 2]
-            if (prev['route'].indexOf('/pandaBonus/pandaBonus') != -1) {
+            if (prev['route'].indexOf('/shareBonus/shareBonus') != -1) {
               let { type_sn } = prev.options
               console.log(type_sn);
               wx.redirectTo({
-                url: `/pages/pandaBonus/pandaBonus?type_sn=${type_sn}`
+                url: `/pages/shareBonus/shareBonus?type_sn=${type_sn}`
               })
               return
             }

+ 0 - 420
pages/pandaBonus/pandaBonus.js

@@ -1,420 +0,0 @@
-// pages/pandaBonus/pandaBonus.js
-const app = getApp();
-const getReq = require('./../../config.js').getReq;
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    openAnimation: true, // 点击开红包
-    activityType: '',  // 1 活动未开始
-    renderCount: [],
-    bonus_state: '',
-    mine_bonus: '',
-    reveive_info: '',
-    binded_info: [], // 领取列表
-    msg: '',
-    testsn: '59801536315351351916',
-    mineid: '',
-    type_sn: '',
-    message_flag: false,
-    input_msg: '',
-    result_msg: '留言',
-    summarys: false
-  },
-  //bonus_state: 'unstart'// 未开始 
-
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // type_sn=80571536215385881479
-    // 65611536217344159139 已过期红包
-    // 41291536220812950106 未开始
-    // act=bonusex&op=grab
-    // 80571536215385881479 已领取
-    // 18731536237157331856 已开始未领取 随机红包 // 测试领取之后
-
-    // 55511536307147470142 手气王 一个 随机
-
-    // 74561536308128119414 他人领取 点击查看详情
-    // let { type_sn } = options
-    // if (!app.globalData.userInfo) {
-    //   wx.navigateTo({
-    //     url: `/pages/login/login`
-    //   });
-    //   return;
-    // }
-
-    console.log('onload');
-    let params = {
-      act: 'bonusex',
-      op: 'open',
-      // type_sn
-      // type_sn: '59801536315351351916'
-      type_sn: '50351536576369995082'
-    }
-    this.getDatas(params)
-    this.setData({
-      // type_sn
-    })
-  },
-  detail() {
-    console.log('---detail----');
-    let params = {
-      act: 'bonusex',
-      op: 'detail',
-      type_sn: this.data.type_sn
-    }
-    this.getDatas(params)
-  },
-  grab() {
-    console.log('---grab----');
-    let params = {
-      act: 'bonusex',
-      op: 'grab',
-      // type_sn: this.data.type_sn
-      type_sn: '50351536576369995082'
-    }
-    this.getDatas(params)
-  },
-  getDatas(params) {
-    let self = this
-
-    getReq(params, function (res) {
-      if (res.code == 200) {
-        console.log('params:', params);
-        console.log(res);
-        let { type_info, bonus_state } = res.datas
-        if (bonus_state == 'unstart') {
-          // bonus_state: unstart 活动未开始
-          let { send_start_date } = type_info
-          self.countTime(params, send_start_date)
-          self.setData({
-            bonus_state
-          })
-          return
-        }
-        else if (bonus_state == 'open') {
-          // open 活动开始, 可以点击, 红包金额有 固定, 随机
-          self.setData({
-            type_info,
-            bonus_state
-          })
-          return
-        }
-        else if (bonus_state == 'detail') {
-          // 已点开状态, 详情
-          let { avatars, mine_bonus, mineid, summarys } = res.datas
-          let { sender_id, relayer_id } = type_info
-
-          let sender_head_src = self.senderHead(relayer_id, sender_id, avatars)
-          let reveive_info = self.receiveInfo(type_info) // 展示领取信息
-          if(summarys) {
-            summarys = summarys.map(item => {
-              item['goods_lowest_price'] = parseFloat(item['goods_lowest_price'])
-              item['goods_price'] = parseFloat(item['goods_price'])
-              return item
-            })
-          }
-          console.log('summarys:', summarys);
-
-          //领取列表
-          let binded_info = []
-          if (res.datas['binded_info']) {
-            binded_info = self.getBindedInfo(res.datas['binded_info'], avatars, type_info)
-          }
-          if (mine_bonus) {
-            mine_bonus['bonus_value'] = parseInt(mine_bonus['bonus_value'] * 100 + 0.5) / 100
-          }
-          self.setData({
-            sender_head_src,
-            type_info,
-            bonus_state,
-            mine_bonus,
-            reveive_info,
-            binded_info,
-            mineid: mineid.toString(),
-            summarys
-          })
-          return
-        }
-        else if (bonus_state == 'over') {
-          console.log('over');
-          let { msg } = res.datas
-          self.setData({
-            msg,
-            bonus_state
-          })
-          return
-        }
-        else if (bonus_state == 'end') {
-          console.log('end');
-          self.setData({
-            type_info,
-            bonus_state
-          })
-          return
-        }
-      }
-    });
-  },
-  getBindedInfo(binded_info, avatars, type_info) {
-    let self = this
-    return binded_info.map(item => {
-      if (avatars[item['user_id']]) {
-        let avatarItem = avatars[item['user_id']]
-        item['avatar'] = avatarItem['avatar']
-        let discount = parseInt(avatarItem['discount'] * 100 + 0.5)
-        if (discount != 0) {
-          discount = discount / 100
-        }
-        item['discount'] = discount
-      }
-      else {
-        item['avatar'] = '../../image/bonus/female.png'
-        item['discount'] = 0
-      }
-      item['is_king'] = self.isKing(type_info, item['bonus_value'])
-      item['format_time'] = self.formatTime(item['get_time'])
-      item['bonus_value'] = parseInt(item['bonus_value'] * 100 + 0.5) / 100
-      return item
-    })
-  },
-  // 判断手气最佳
-  isKing(type_info, bonus_value) {
-    let { total_num, binded_num, send_type, max_amount } = type_info
-    if (send_type != 1) return false;
-    if (parseInt(total_num) != parseInt(binded_num)) return false;
-    if (parseInt(max_amount * 100) != parseInt(bonus_value * 100)) return false;
-    return true
-  },
-
-
-  formatTime(time) {
-    let d = new Date(time * 1000)
-    let month = this.zero(d.getMonth() + 1)
-    let date = this.zero(d.getDate())
-    let h = this.zero(d.getHours())
-    let m = this.zero(d.getMinutes())
-    return `${month}-${date}  ${h}:${m}`
-  },
-
-  senderHead(relayer_id, sender_id, avatars) {
-    let sender_head_src = '../../image/bonus/female.png'
-    if (relayer_id > 0) {
-      sender_head_src = avatars[relayer_id]['avatar']
-    }
-    else if (sender_id > 0) {
-      sender_head_src = avatars[sender_id]['avatar']
-    }
-
-    return sender_head_src
-  },
-  receiveInfo(type_info) {
-    let { total_num, binded_num } = type_info
-    if (total_num == binded_num) {
-      // 红包领完了
-      let timestr = `${total_num}个红包,${this.bindedTime(type_info['binded_period'])}`
-      return timestr
-    }
-    else {
-      let timestr = `领取 ${binded_num}/${total_num}`
-      let isEndTime = this.isEnd(type_info['send_end_date'])
-      if (isEndTime == false) {
-        timestr += ',点击右上角继续分享此红包'
-      }
-      return timestr
-    }
-  },
-  isEnd(send_end_date) {
-    let sendDate = parseInt(send_end_date)
-    if (sendDate === 0) {
-      return false
-    }
-    else {
-      return new Date().getTime >= sendDate * 1000
-    }
-  },
-  bindedTime(period) {
-    let min = 60
-    let hour = 3600
-    let day = 24 * 3600
-
-    let days = parseInt(period / day)
-    period = period % day
-
-    let hours = parseInt(period / hour)
-    period = period % hour
-
-    let mins = parseInt(period / min)
-    period = period % min
-
-    if (period > 0) {
-      mins += 1
-    }
-
-    let timestr = ''
-    if (days > 0) {
-      timestr += `${days}天`
-    }
-    if (hours > 0) {
-      timestr += `${hours}小时`
-    }
-    if (mins > 0) {
-      timestr += `${mins}分钟`
-    }
-    timestr += ',领完'
-    return timestr
-
-  },
-
-
-  countTime(params, send_start_date) {
-    let times = parseInt(send_start_date - new Date().getTime() / 1000)
-    if (times <= 0) {
-      console.log(times);
-      // wx.redirectTo({
-      //   url: '/pages/pandaBonus/pandaBonus'
-      // })
-      this.getDatas(params) // 活动时间到了,重新请求
-      return
-    }
-    let h = Math.floor(times / 3600)
-    h = this.zero(h)
-    let m = Math.floor((times / 60) % 60)
-    m = this.zero(m)
-    let s = times % 60
-    s = this.zero(s)
-    let renderCount = [h.split(''), m.split(''), s.split('')]
-    this.setData({
-      renderCount
-    })
-    setTimeout(() => {
-      this.countTime(send_start_date)
-    }, 1000);
-
-  },
-  zero(n) {
-    n = n >= 10 ? n.toString() : '0' + n
-    return n
-  },
-  open() {
-    this.setData({
-      openAnimation: false
-    })
-    this.grab()
-  },
-  bindKeyInput(e) {
-    let value = e.detail.value
-    this.setData({
-      input_msg: value
-    })
-  },
-  message_tap(e) {
-    let { flag } = e.currentTarget.dataset
-    console.log(e);
-    this.setData({
-      message_flag: flag
-    })
-  },
-  send_msg() {
-    let self = this
-    let result_msg = this.trim(this.data.input_msg)
-    if (!result_msg) return;
-
-    let params = {
-      act: 'bonusex',
-      op: 'comment',
-      comment: result_msg,
-      bonus_sn: this.data.mine_bonus['bonus_sn']
-    }
-    getReq(params, function (res) {
-      console.log(res);
-      if (res.code == 200) {
-        self.setData({
-          message_flag: false,
-          result_msg
-        })
-      }
-      else {
-        wx.showToast({
-          icon: 'none',
-          title: 'error',
-          duration: 2000
-        })
-        self.setData({
-          message_flag: false,
-          input_msg: ''
-        })
-      }
-    }, 'POST')
-
-
-
-
-
-
-  },
-  trim(str) {
-    str = str.replace(/\s+/g, "")
-    return str
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-    let imageUrl = '../../image/share_bonus.png'
-    let { type_sn } = this.data
-    return {
-      title: `点一下,你和TA都有红包!`,
-      path: `/pages/pandaBonus/pandaBonus?type_sn=${type_sn}`,
-      imageUrl: imageUrl
-    }
-  }
-})

+ 0 - 6
pages/pandaBonus/pandaBonus.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "twoColumns":"../components/blocks/twoColumns/twoColumns"
-  }
-}

+ 0 - 259
pages/pandaBonus/pandaBonus.wxml

@@ -1,259 +0,0 @@
-<!--pages/pandaBonus/pandaBonus.wxml-->
-<view>
-  <!-- 活动未开始 -->
-  <view class="default_container" wx:if="{{bonus_state == 'unstart'}}">
-    <view class="dot_left"></view>
-    <view class="dot_right"></view>
-    <image class="cloud_left" src="../../image/bonus/cloud.png"></image>
-    <image class="cloud_right" src="../../image/bonus/cloud.png"></image>
-    <view class="bg_content">
-      <image class="top_bg" src="../../image/bonus/top_bg.png"></image>
-      <view class="msg_box pos_rel">
-        <view class="name line_h68">让红包飞一会儿</view>
-        <view class="name line_h68">距离开抢时间还有</view>
-      </view>
-      <view class="time_box">
-        <image class="top_bg" src="../../image/bonus/time_bg.png"></image>
-        <view class="count_box">
-          <view class="count_text" wx:for="{{renderCount}}" wx:for-index="idx" wx:key="idx">
-            <view class="count_single" wx:for="{{item}}" wx:for-index="n" wx:key="n" wx:for-item="num">{{num}}</view>
-          </view>
-        </view>
-      </view>
-    </view>
-    <view class="bottom_pro">
-      <view class="line_h30">独家运营70多个知名化妆品品牌的天猫官方旗舰店</view>
-      <view class="flex_center ht30">
-        <image src="../../image/bonus/icon_logo.png" class="icon_logo"></image>
-        <view style="position: relative;top: 6rpx;">上海丽人丽妆化妆品股份有限公司</view>
-      </view>
-    </view>
-  </view>
-  <!-- 活动未开始 -->
-
-  <!-- 活动开始 -->
-
-  <view class="default_container" wx:if="{{bonus_state == 'open'}}">
-    <view class="dot_left"></view>
-    <view class="dot_right"></view>
-    <image class="cloud_left" src="../../image/bonus/cloud.png"></image>
-    <image class="cloud_right" src="../../image/bonus/cloud.png"></image>
-    <view class="bg_content">
-      <image class="top_bg" src="../../image/bonus/top_bg.png"></image>
-      <view class="msg_box pos_rel">
-        <view class="name line_h68">{{type_info['sender_name']}}</view>
-        <view class="msg line_h68" wx:if="{{type_info['send_type'] == 1}}">发了一个红包,金额随机</view>
-        <view class="msg line_h68" wx:else>发了一个红包,金额固定</view>
-      </view>
-      <view class="mgs_bottom pos_rel">
-        <view class="f56" catchtap="open">{{type_info['type_bless']}}</view>
-      </view>
-      <image wx:if="{{openAnimation}}" src="../../image/bonus/icon_open.png" class="open" catchtap="open"></image>
-      <image wx:else src="../../image/bonus/coin.png" class="open current_open"></image>
-    </view>
-    <view class="bottom_pro">
-      <view class="line_h30">独家运营70多个知名化妆品品牌的天猫官方旗舰店</view>
-      <view class="flex_center ht30">
-        <image src="../../image/bonus/icon_logo.png" class="icon_logo"></image>
-        <view style="position: relative;top: 6rpx;">上海丽人丽妆化妆品股份有限公司</view>
-      </view>
-    </view>
-  </view>
-  <!-- 活动开始 -->
-
-
-
-  <view class="default_container" wx:if="{{bonus_state == 'over'}}">
-    <view class="dot_left"></view>
-    <view class="dot_right"></view>
-    <image class="cloud_left" src="../../image/bonus/cloud.png"></image>
-    <image class="cloud_right" src="../../image/bonus/cloud.png"></image>
-    <view class="bg_content">
-      <image class="top_bg" src="../../image/bonus/top_bg.png"></image>
-      <view class="mgs_bottom pos_rel over">
-        <view class="f56">{{msg}}</view>
-      </view>
-      <view class="look" catchtap="detail">查看领取详情></view>
-    </view>
-
-    <view class="bottom_pro">
-      <view class="line_h30">独家运营70多个知名化妆品品牌的天猫官方旗舰店</view>
-      <view class="flex_center ht30">
-        <image src="../../image/bonus/icon_logo.png" class="icon_logo"></image>
-        <view style="position: relative;top: 6rpx;">上海丽人丽妆化妆品股份有限公司</view>
-      </view>
-    </view>
-  </view>
-
-  <view class="default_container" wx:if="{{bonus_state == 'end'}}">
-    <view class="dot_left"></view>
-    <view class="dot_right"></view>
-    <image class="cloud_left" src="../../image/bonus/cloud.png"></image>
-    <image class="cloud_right" src="../../image/bonus/cloud.png"></image>
-    <view class="bg_content">
-      <image class="top_bg" src="../../image/bonus/top_bg.png"></image>
-      <view class="msg_box pos_rel">
-        <view class="name">{{type_info['sender_name']}}</view>
-        <view class="msg mt20">该红包已过期。如已领取,</view>
-        <view class="msg">请在熊猫美妆APP中“我的红包”中查看~</view>
-      </view>
-    </view>
-    <view class="bottom_pro">
-      <view class="line_h30">独家运营70多个知名化妆品品牌的天猫官方旗舰店</view>
-      <view class="flex_center ht30">
-        <image src="../../image/bonus/icon_logo.png" class="icon_logo"></image>
-        <view style="position: relative;top: 6rpx;">上海丽人丽妆化妆品股份有限公司</view>
-      </view>
-    </view>
-  </view>
-
-
-  <!-- 红包未开封(活动未开始 未开启,已过期) -->
-  <!-- <view class="default_container" wx:if="{{bonus_state == 'unstart' || bonus_state == 'open' || bonus_state == 'over'}}">
-    <view class="dot_left"></view>
-    <view class="dot_right"></view>
-    <image class="cloud_left" src="../../image/bonus/cloud.png"></image>
-    <image class="cloud_right" src="../../image/bonus/cloud.png"></image>
-    <view class="bg_content">
-      <image class="top_bg" src="../../image/bonus/top_bg.png"></image>
-
-      <block wx:if="{{bonus_state == 'unstart'}}">
-        <view class="msg_box pos_rel">
-          <view class="name line_h68">让红包飞一会儿</view>
-          <view class="name line_h68">距离开抢时间还有</view>
-        </view>
-        <view class="time_box">
-          <image class="top_bg" src="../../image/bonus/time_bg.png"></image>
-          <view class="count_box">
-            <view class="count_text" wx:for="{{renderCount}}" wx:for-index="idx" wx:key="idx">
-              <view class="count_single" wx:for="{{item}}" wx:for-index="n" wx:key="n" wx:for-item="num">{{num}}</view>
-            </view>
-          </view>
-        </view>
-        <view style="font-size: 50rpx;position: relative;z-index: 100" catchtap="test">测试领取</view>
-
-      </block>
-
-
-      <block wx:if="{{bonus_state == 'open'}}">
-        <view class="msg_box pos_rel">
-          <view class="name line_h68">{{type_info['sender_name']}}</view>
-          <view class="msg line_h68" wx:if="{{type_info['send_type'] == 1}}">发了一个红包,金额随机</view>
-          <view class="msg line_h68" wx:else>发了一个红包,金额固定</view>
-        </view>
-        <view class="mgs_bottom pos_rel">
-          <view class="f56" catchtap="open">{{type_info['type_bless']}}</view>
-        </view>
-
-        <image wx:if="{{openAnimation}}" src="../../image/bonus/icon_open.png" class="open" catchtap="open"></image>
-        <image wx:else src="../../image/bonus/coin.png" class="open current_open"></image>
-      </block>
-
-      <block wx:if="{{bonus_state == 'over'}}">
-        <view class="mgs_bottom pos_rel">
-          <view class="f56" catchtap="open">{{msg}}</view>
-        </view>
-      </block>
-
-
-    </view>
-    <view class="bottom_pro">
-      <view class="line_h30">独家运营70多个知名化妆品品牌的天猫官方旗舰店</view>
-      <view class="flex_center ht30">
-        <image src="../../image/bonus/icon_logo.png" class="icon_logo"></image>
-        <view style="position: relative;top: 6rpx;">上海丽人丽妆化妆品股份有限公司</view>
-      </view>
-    </view>
-  </view> -->
-
-
-
-
-
-
-
-  <!-- 开了后的样式 , 即为 details -->
-  <view class="grab_container" wx:if="{{bonus_state == 'detail'}}">
-    <view class="pos_rel" style="height: 182rpx;">
-      <image class="common_bg" src="../../image/bonus/detail_bg.png"></image>
-      <view class="top_title">熊猫美妆红包</view>
-      <image class="sender_head" src="{{sender_head_src}}"></image>
-    </view>
-    <view class="grab_header">
-      <view class="grab_bonus_name">{{type_info['type_name']}}
-        <image class="icon_pin" src="../../image/bonus/icon_pin.png"></image>
-      </view>
-      <view class="grab_prompt">{{type_info['type_bless']}}</view>
-    </view>
-
-    <view class="grab_bonus_price flex_center" wx:if="{{mine_bonus}}">{{mine_bonus['bonus_value']}}<text class="ml4 f30">元</text></view>
-    
-    <view class="receive_info tb_line mt60">{{reveive_info}}</view>
-
-    <block wx:if="{{binded_info.length}}">
-      <view class="receive_list">
-        <view class="receive_item" wx:for="{{binded_info}}" wx:for-index="idx" wx:key="idx">
-          <image class="personal_image" src="{{item['avatar']}}"></image>
-          <view class="personal_content">
-            <view class="item_paragraph f30 col333"><text>{{item['user_name']}}</text></view>
-            <view class="item_paragraph f24 col666" wx:if="{{item['discount'] != 0}}">
-              <text>已累计节省{{item['discount']}}元</text>
-            </view>
-            <view class="item_paragraph f24 col666" wx:if="{{item['user_comment']}}">
-              <text>{{item['user_comment']}}</text>
-            </view>
-            <block wx:else>
-              <view wx:if="{{item['user_id'] == mineid}}" class="item_paragraph f24 {{result_msg == '留言' ? 'col2c71c6' : 'col666'}}" catchtap="message_tap" data-flag="true">{{result_msg}}</view>
-            </block>
-          </view>
-
-          <view class="text_right">
-            <view class="item_paragraph f30 col333">{{item['bonus_value']}}元</view>
-            <view wx:if="{{item['is_king']}}" class="item_paragraph f24 cole73636">
-                <image class="icon_king" src="../../image/bonus/king.png"></image>手气最佳
-              </view>
-            <view class="item_paragraph f24 col666">{{item['format_time']}}</view>
-            
-          </view>
-        </view>
-      </view>
-    </block>
-
-    <!-- 热卖商品 -->
-
-    <block wx:if="{{summarys}}">
-      <view class="receive_info tb_line mt20">热卖商品</view>
-      <view class="hot_summarys">
-        <block wx:for="{{summarys}}" wx:for-item="summary" wx:for-index="idx" wx:key="idx">
-          <twoColumns summary="{{summary}}"></twoColumns>
-        </block>
-      </view>
-    </block>
-
-
-
-    <image class="briefing_address" src="../../image/bonus/advert.png"></image>
-  </view>
-
-
-
-
-
-
-
-
-  <!--留言弹窗 -->
-
-  <view class="message_modal" wx:if="{{message_flag == 'true'}}">
-    <view class="modal_bg" catchtouchstart="message_tap" data-flag="false"></view>
-    <view class="message_content">
-      <textarea class="message_info" auto-focus="true" placeholder="写下你想说的话" bindinput="bindKeyInput"></textarea>
-      <view class="btn_group flex_center">
-        <view class="cancel_btn r_line" catchtap="message_tap" data-flag="false">取消</view>
-        <view class="submit_btn" catchtap="send_msg">发送</view>
-      </view>
-    </view>
-  </view>
-
-
-</view>

+ 0 - 378
pages/pandaBonus/pandaBonus.wxss

@@ -1,378 +0,0 @@
-/* pages/pandaBonus/pandaBonus.wxss */
-.default_container {
-  position: fixed;
-  left: 0;
-  right: 0;
-  top: 0;
-  bottom: 0;
-  z-index: 999;
-  background: #e14f48;
-  color: #ffe7b8;
-  text-align: center;
-}
-.bg_content {
-  position: relative;
-  height: 71%;
-}
-.top_bg {
-  position: absolute;
-  left: 0;
-  top: 0;
-  width: 100%;
-  height: 100%;
-}
-.msg_box {
-  padding-top: 148rpx;
-}
-
-.time_box {
-  margin: 80rpx 60rpx 0;
-  height: 100rpx;
-  position: relative;
-}
-.count_box {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  position: absolute;
-  left: 0;
-  top: 0;
-  width: 100%;
-  height: 100%;
-  z-index: 2;
-  font-size: 86rpx;
-  font-weight: bold;
-  color: #fff;
-}
-.count_text {
-  width: 172rpx;
-  padding: 0 4rpx;
-  display: flex;
-  justify-content: space-between;
-  box-sizing: border-box;
-  font-family: aAlternate;
-}
-.count_single {
-  width: 70rpx;
-}
-.f56 {
-  font-size: 56rpx;
-}
-.ht30 {
-  height: 30rpx;
-}
-.line_h30 {
-  line-height: 30rpx;
-}
-.line_h68 {
-  line-height: 68rpx;
-}
-.name {
-  font-size: 50rpx;
-}
-.msg {
-  font-size: 32rpx;
-  color: #ffd39b;
-}
-.mgs_bottom {
-  margin-top: 150rpx;
-}
-.mgs_bottom.over {
-  margin-top: 300rpx;
-}
-.open {
-  position: absolute;
-  z-index: 999;
-  width: 200rpx;
-  height: 200rpx;
-  left: 0;
-  right: 0;
-  margin: 0 auto -100rpx;
-  bottom: 0;
-}
-.open.opa0 {
-  opacity: 0;
-}
-.open.current_open {
-  opacity: 1;
-  z-index: 1000;
-  animation: iconRotate .8s linear infinite
-}
-
-@keyframes iconRotate{
-  0% {transform: rotateY(0deg);}
-  50% {transform: rotateY(180deg);}
-  100% {transform: rotateY(360deg);}
-}
-
-
-
-
-.bottom_pro {
-  position: absolute;
-  left: 0;
-  bottom: 8%;
-  width: 100%;
-  font-size: 20rpx;
-  color: #fff;
-}
-.icon_logo {
-  width: 20rpx;
-  height: 20rpx;
-  margin-right: 10rpx;
-}
-.cloud_left, .cloud_right {
-  position: absolute;
-  z-index: 1;
-  bottom: 3%;
-  width: 88rpx;
-  height: 34rpx;
-}
-.cloud_left {
-  left: 4%;
-}
-.cloud_right {
-  right: 4%;
-}
-.dot_left, .dot_right {
-  position: absolute;
-  top: 2%;
-  z-index: 1;
-  width: 10rpx;
-  height: 10rpx;
-  border-radius: 50%;
-  background: #ff8a6b;
-}
-.dot_left {
-  left: 3%;
-}
-.dot_right {
-  right: 3%;
-}
-
-/* 开红包后的样式 */
-.grab_container {
-  min-height: 100vh;
-  -webkit-overflow-scrolling: touch;
-  /* height: 100%; */
-  text-align: center;
-  background: #fff;
-  position: relative;
-  /* color: #ffe7b8; */
-}
-.common_bg {
-  width: 100%;
-  height: 182rpx;
-}
-.top_title {
-  position: absolute;
-  height: 80rpx;
-  line-height: 80rpx;
-  z-index: 1;
-  left: 0;
-  top: 30rpx;
-  width: 100%;
-  font-size: 36rpx;
-  font-weight: bold;
-  color: #FFEEA6 ;
-}
-.sender_head {
-  position: absolute;
-  z-index: 1;
-  left: 50%;
-  bottom: 0;
-  margin-left: -50rpx;
-  margin-bottom: -50rpx;
-  width: 100rpx;
-  height: 100rpx;
-  border-radius: 6rpx;
-}
-
-.grab_header {
-  margin-top: 70rpx;
-  padding: 0 30rpx;
-}
-.grab_bonus_name {
-  color: #333;
-  font-size: 30rpx;
-  font-weight: bold;
-  line-height: 45rpx;
-}
-.icon_pin {
-  position: relative;
-  top: 2rpx;
-  margin-left: 4rpx;
-  width: 30rpx;
-  height: 30rpx;
-}
-.grab_prompt {
-  margin-top: 5rpx;
-  font-size: 24rpx;
-  color: #666;
-  line-height: 45rpx;
-}
-
-.grab_bonus_price {
-  margin-top: 25rpx;
-  height: 98rpx;
-  font-size: 70rpx;
-  /* vertical-align: sub; */
-  color: #E73636;
-}
-.receive_info {
-  padding: 30rpx 30rpx 10rpx;
-  height: 45rpx;
-  line-height: 45rpx;
-  background: #f4f4f4;
-  font-size: 24rpx;
-  color: #666;
-  text-align: left;
-}
-.tb_line {
-  position: relative;
-}
-.tb_line::after {
-  content: '';
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 200%;
-  height: 200%;
-  transform: scale(.5);
-  transform-origin: 0 0;
-  pointer-events: none;
-  box-sizing: border-box;
-  border: 0 solid #d9d9d9;
-  border-width: 1px 0;
-}
-.receive_item {
-  position: relative;
-  display: flex;
-  padding: 30rpx;
-}
-.receive_item::after {
-  position: absolute;
-  z-index: 1;
-  content: '';
-  left: 0;
-  right: 0;
-  bottom: 0;
-  height: 1px;
-  background: #d9d9d9;
-  transform: scaleY(.5);
-}
-.personal_image {
-  width: 80rpx;
-  height: 80rpx;
-  border-radius: 4rpx;
-  margin-right: 25rpx;
-}
-.personal_content {
-  flex: 1;
-  padding-right: 30rpx;
-  box-sizing: border-box;
-  text-align: left;
-}
-.item_paragraph {
-  display: flex;
-  align-items: center;
-  height: 45rpx;
-  /* justify-content: space-between; */
-}
-.briefing_address {
-  width: 660rpx;
-  height: 50rpx;
-  margin: 58rpx auto 30rpx;
-}
-.icon_king {
-  width: 28rpx;
-  height: 24rpx;
-  margin-right: 10rpx;
-}
-.look {
-  position: absolute;
-  left: 50rpx;
-  right: 50rpx;
-  bottom: 40%;
-  text-align: center;
-  font-size: 28rpx;
-  color: #ffe7b8;
-}
-.message_modal{
-  position: fixed;
-  left: 0;
-  right: 0;
-  top: 0;
-  bottom: 0;
-  z-index: 999;
-}
-.modal_bg {
-  position: absolute;
-  z-index: 1;
-  width: 100%;
-  height: 100%;
-  background: rgba(0,0,0,.6);
-}
-.message_content {
-  position: absolute;
-  top: 160rpx;
-  left: 100rpx;
-  right: 100rpx;
-  background: #fff; 
-  border-radius: 10rpx; 
-  z-index: 10;
-}
-.message_info {
-  width:100%;
-  height: 160rpx; 
-  padding: 20rpx;
-  box-sizing: border-box;
-  font-size: 24rpx;
-}
-.btn_group {
-  position: relative;
-}
-.btn_group::after {
-  position: absolute;
-  content: '';
-  left: 0;
-  top: 0;
-  z-index: 2;
-  width: 100%;
-  height: 1px;
-  background: #d9d9d9;
-  transform: scaleY(.5);
-}
-.cancel_btn, .submit_btn {
-  text-align: center;
-  height: 80rpx;
-  line-height: 80rpx;
-  flex: 1;
-  font-size: 32rpx;
-}
-.submit_btn {
-  color: #EB4E4F
-}
-.r_line {
-  position: relative;
-}
-.r_line::after {
-  position: absolute;
-  content: '';
-  right: 0;
-  top: 0;
-  bottom: 0;
-  width: 1px;
-  background: #d9d9d9;
-  transform: scaleX(.5);
-}
-.hot_summarys {
-  width:750rpx;
-  display:flex;
-  flex:1;
-  flex-wrap:wrap;
-  text-align: left;
-}
-.col2c71c6 {
-  color: #2C71C6;
-}

+ 2 - 26
pages/person/person.js

@@ -138,35 +138,11 @@ Page({
     })
   },
   shareBonus() {
-    // let url = encodeURIComponent('https://passport.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=36061535965140897218')
-  
-    // wx.navigateTo({
-    //   url: `/pages/shareBonus/shareBonus?url=${url}`
-    // })
-    // 94811536567748006532 苗哥本地测试
-    // 64031536573511654235
-    wx.navigateTo({
-      // url: `/pages/pandaBonus/pandaBonus?type_sn=58971536559275350675`
-      // url: `/pages/pandaBonus/pandaBonus?type_sn=94811536567748006532`
-      url: `/pages/pandaBonus/pandaBonus?type_sn=59801536315351351916`
-
-
-      // url: `/pages/pandaBonus/pandaBonus?type_sn=64031536573511654235` // 测试领取过期红包, 删除信息不显示
-    })
-  },
-  shareWebview() {
-    let url = encodeURIComponent('https://passport.lrlz.com/hfive/test_mini_share/index.html')
-
     wx.navigateTo({
-      url: `/pages/webView/webView?url=${url}`
+      url: `/pages/shareBonus/shareBonus?type_sn=16711536579728954218`
+      // url: `/pages/shareBonus/shareBonus?type_sn=21991536583136231606`
     })
   },
-  payIndex() {
-    wx.reLaunch({
-      url: "/pages/index/index"
-    })
-  },
-
   /**
    * 生命周期函数--监听页面隐藏
    */

+ 0 - 39
pages/person/person.wxml

@@ -102,45 +102,6 @@
       <text>测试红包</text>
       <text class='look_all_order arrow_right' decode="{{true}}"></text>
     </view>
-    <view class='order_title' bindtap="shareWebview">
-      <text>测试分享webview</text>
-      <text class='look_all_order arrow_right' decode="{{true}}"></text>
-    </view>
-    <view class='order_title' bindtap="payIndex">
-      <text>测试首页</text>
-      <text class='look_all_order arrow_right' decode="{{true}}"></text>
-    </view>
   </view>
 
-  <!-- <view class='person_info_cell'>
-    <view class='item flex_1px_d' bindtap='bonus_list'>
-      <image style='width:32rpx;' mode='widthFix' src='../../image/person/bonus_icon.png'></image>
-      <text class='arrow_right'>熊猫红包</text>
-    </view>
-    <view class="bonus_list {{bonus_list_show ? 'show' : 'hide' }}">
-      <block wx:key="{{index}}" wx:for="{{bonus_rate}}">
-        <view class='bonus_item flex_1px_d'>
-          <text>{{item.rate}}%</text>
-          <text class='total'>{{item.total}}元</text>
-        </view>
-      </block>
-    </view>
-    <navigator url="/pages/address/address">
-      <view class='item flex_1px_d'>
-        <image style='width:32rpx;' mode='widthFix' src='../../image/person/address_icon.png'></image>
-        <text class='arrow_right'>收货地址</text>
-      </view>
-    </navigator>
-    <navigator url="/pages/fcode/fcode">
-      <view class='item flex_1px_d'>
-        <image style='width:32rpx;' mode='widthFix' src='../../image/person/fcode_icon.png'></image>
-        <text class='arrow_right'>我的F码</text>
-      </view>
-    </navigator>
-    <view class='item flex_1px_d'>
-      <image style='width:32rpx;' mode='widthFix' src='../../image/person/help_icon.png'></image>
-      <text class='arrow_right' bindtap='skip_help'>帮助中心</text>
-    </view>
-  </view> -->
-
 </view>

+ 323 - 21
pages/shareBonus/shareBonus.js

@@ -1,32 +1,343 @@
-// pages/shareBonus/shareBonus.js
+// pages/pandaBonus/pandaBonus.js
 const app = getApp();
+const getReq = require('./../../config.js').getReq;
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    webViewUrl: '',
-    tempUrl: ''
+    openAnimation: true, // 点击开红包
+    activityType: '',  // 1 活动未开始
+    renderCount: [],
+    bonus_state: '',
+    mine_bonus: '',
+    reveive_info: '',
+    binded_info: [], // 领取列表
+    msg: '',
+    mineid: '',
+    type_sn: '',
+    message_flag: false,
+    input_msg: '',
+    result_msg: '留言',
+    summarys: false
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    console.log(options.url);
-    let tempUrl = decodeURIComponent(options.url)
-    this.setData({
-      tempUrl
-    })
+    let { type_sn } = options
     if (!app.globalData.userInfo) {
       wx.navigateTo({
-        url: `/pages/login/login?url=${options.url}`
+        url: `/pages/login/login`
       });
       return;
     }
+    let params = {
+      act: 'bonusex',
+      op: 'open',
+      type_sn
+    }
+    this.getDatas(params)
+    this.setData({
+      type_sn
+    })
+  },
+  detail() {
+    let params = {
+      act: 'bonusex',
+      op: 'detail',
+      type_sn: this.data.type_sn
+    }
+    this.getDatas(params)
+  },
+  grab() {
+    let params = {
+      act: 'bonusex',
+      op: 'grab',
+      type_sn: this.data.type_sn
+    }
+    this.getDatas(params)
+  },
+  getDatas(params) {
+    let self = this
+
+    getReq(params, function (res) {
+      if (res.code == 200) {
+        let { type_info, bonus_state } = res.datas
+        if (bonus_state == 'unstart') {
+          // bonus_state: unstart 活动未开始
+          let { send_start_date } = type_info
+          self.countTime(params, send_start_date)
+          self.setData({
+            bonus_state
+          })
+          return
+        }
+        else if (bonus_state == 'open') {
+          // open 活动开始, 可以点击, 红包金额有 固定, 随机
+          self.setData({
+            type_info,
+            bonus_state
+          })
+          return
+        }
+        else if (bonus_state == 'detail') {
+          // 已点开状态, 详情
+          let { avatars, mine_bonus, mineid, summarys } = res.datas
+          let { sender_id, relayer_id } = type_info
+
+          let sender_head_src = self.senderHead(relayer_id, sender_id, avatars)
+          let reveive_info = self.receiveInfo(type_info) // 展示领取信息
+          if(summarys) {
+            summarys = summarys.map(item => {
+              item['goods_lowest_price'] = parseFloat(item['goods_lowest_price'])
+              item['goods_price'] = parseFloat(item['goods_price'])
+              return item
+            })
+          }
+          //领取列表
+          let binded_info = []
+          if (res.datas['binded_info']) {
+            binded_info = self.getBindedInfo(res.datas['binded_info'], avatars, type_info)
+          }
+          if (mine_bonus) {
+            mine_bonus['bonus_value'] = parseInt(mine_bonus['bonus_value'] * 100 + 0.5) / 100
+          }
+          self.setData({
+            sender_head_src,
+            type_info,
+            bonus_state,
+            mine_bonus,
+            reveive_info,
+            binded_info,
+            mineid: mineid.toString(),
+            summarys
+          })
+          return
+        }
+        else if (bonus_state == 'over') {
+          let { msg } = res.datas
+          self.setData({
+            msg,
+            bonus_state
+          })
+          return
+        }
+        else if (bonus_state == 'end') {
+          self.setData({
+            type_info,
+            bonus_state
+          })
+          return
+        }
+        else {
+          wx.showModal({
+            confirmText: '重试',
+            content: '网络错误',
+            success: function (res) {
+              if (res.confirm) {
+                wx.reLaunch({
+                  url: "/pages/index/index"
+                })
+              } else if (res.cancel) {
+                console.log('用户点击取消')
+              }
+            }
+          })
+        }
+      }
+    });
+  },
+  getBindedInfo(binded_info, avatars, type_info) {
+    let self = this
+    return binded_info.map(item => {
+      if (avatars[item['user_id']]) {
+        let avatarItem = avatars[item['user_id']]
+        item['avatar'] = avatarItem['avatar']
+        let discount = parseInt(avatarItem['discount'] * 100 + 0.5)
+        if (discount != 0) {
+          discount = discount / 100
+        }
+        item['discount'] = discount
+      }
+      else {
+        item['avatar'] = '../../image/bonus/female.png'
+        item['discount'] = 0
+      }
+      item['is_king'] = self.isKing(type_info, item['bonus_value'])
+      item['format_time'] = self.formatTime(item['get_time'])
+      item['bonus_value'] = parseInt(item['bonus_value'] * 100 + 0.5) / 100
+      return item
+    })
+  },
+  // 判断手气最佳
+  isKing(type_info, bonus_value) {
+    let { total_num, binded_num, send_type, max_amount } = type_info
+    if (send_type != 1) return false;
+    if (parseInt(total_num) != parseInt(binded_num)) return false;
+    if (parseInt(max_amount * 100) != parseInt(bonus_value * 100)) return false;
+    return true
+  },
 
 
+  formatTime(time) {
+    let d = new Date(time * 1000)
+    let month = this.zero(d.getMonth() + 1)
+    let date = this.zero(d.getDate())
+    let h = this.zero(d.getHours())
+    let m = this.zero(d.getMinutes())
+    return `${month}-${date}  ${h}:${m}`
+  },
+
+  senderHead(relayer_id, sender_id, avatars) {
+    let sender_head_src = '../../image/bonus/female.png'
+    if (relayer_id > 0) {
+      sender_head_src = avatars[relayer_id]['avatar']
+    }
+    else if (sender_id > 0) {
+      sender_head_src = avatars[sender_id]['avatar']
+    }
+
+    return sender_head_src
+  },
+  receiveInfo(type_info) {
+    let { total_num, binded_num } = type_info
+    if (total_num == binded_num) {
+      // 红包领完了
+      let timestr = `${total_num}个红包,${this.bindedTime(type_info['binded_period'])}`
+      return timestr
+    }
+    else {
+      let timestr = `领取 ${binded_num}/${total_num}`
+      let isEndTime = this.isEnd(type_info['send_end_date'])
+      if (isEndTime == false) {
+        timestr += ',点击右上角继续分享此红包'
+      }
+      return timestr
+    }
+  },
+  isEnd(send_end_date) {
+    let sendDate = parseInt(send_end_date)
+    if (sendDate === 0) {
+      return false
+    }
+    else {
+      return new Date().getTime >= sendDate * 1000
+    }
+  },
+  bindedTime(period) {
+    let min = 60
+    let hour = 3600
+    let day = 24 * 3600
+
+    let days = parseInt(period / day)
+    period = period % day
+
+    let hours = parseInt(period / hour)
+    period = period % hour
+
+    let mins = parseInt(period / min)
+    period = period % min
+
+    if (period > 0) {
+      mins += 1
+    }
+
+    let timestr = ''
+    if (days > 0) {
+      timestr += `${days}天`
+    }
+    if (hours > 0) {
+      timestr += `${hours}小时`
+    }
+    if (mins > 0) {
+      timestr += `${mins}分钟`
+    }
+    timestr += ',领完'
+    return timestr
+
+  },
+
+
+  countTime(params, send_start_date) {
+    let times = parseInt(send_start_date - new Date().getTime() / 1000)
+    if (times <= 0) {
+      this.getDatas(params) // 活动时间到了,重新请求
+      return
+    }
+    let h = Math.floor(times / 3600)
+    h = this.zero(h)
+    let m = Math.floor((times / 60) % 60)
+    m = this.zero(m)
+    let s = times % 60
+    s = this.zero(s)
+    let renderCount = [h.split(''), m.split(''), s.split('')]
+    this.setData({
+      renderCount
+    })
+    setTimeout(() => {
+      this.countTime(send_start_date)
+    }, 1000);
+
+  },
+  zero(n) {
+    n = n >= 10 ? n.toString() : '0' + n
+    return n
+  },
+  open() {
+    this.setData({
+      openAnimation: false
+    })
+    this.grab()
+  },
+  bindKeyInput(e) {
+    let value = e.detail.value
+    this.setData({
+      input_msg: value
+    })
+  },
+  message_tap(e) {
+    let { flag } = e.currentTarget.dataset
+    this.setData({
+      message_flag: flag
+    })
+  },
+  send_msg() {
+    let self = this
+    let result_msg = this.trim(this.data.input_msg)
+    if (!result_msg) return;
+
+    let params = {
+      act: 'bonusex',
+      op: 'comment',
+      comment: result_msg,
+      bonus_sn: this.data.mine_bonus['bonus_sn']
+    }
+    getReq(params, function (res) {
+      if (res.code == 200) {
+        self.setData({
+          message_flag: false,
+          result_msg
+        })
+      }
+      else {
+        wx.showToast({
+          icon: 'none',
+          title: 'error',
+          duration: 2000
+        })
+        self.setData({
+          message_flag: false,
+          input_msg: ''
+        })
+      }
+    }, 'POST')
+  },
+  trim(str) {
+    str = str.replace(/\s+/g, "")
+    return str
   },
 
   /**
@@ -40,14 +351,6 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-    if (app.globalData.userInfo) {
-      let session_id = wx.getStorageSync('session_id')
-      let url = this.data.tempUrl + '&HPHPSESSID=' + session_id
-      console.log(url);
-      this.setData({
-        webViewUrl: url
-      })
-    }
 
   },
 
@@ -83,12 +386,11 @@ Page({
    * 用户点击右上角分享
    */
   onShareAppMessage: function () {
-    let imageUrl = '../../image/share_bonus.png';
-    let url = encodeURIComponent(this.data.webViewUrl);
-
+    let imageUrl = '../../image/share_bonus.png'
+    let { type_sn } = this.data
     return {
       title: `点一下,你和TA都有红包!`,
-      path: `/pages/shareBonus/shareBonus?url=${url}`,
+      path: `/pages/shareBonus/shareBonus?type_sn=${type_sn}`,
       imageUrl: imageUrl
     }
   }

+ 6 - 1
pages/shareBonus/shareBonus.json

@@ -1 +1,6 @@
-{}
+{
+  "component": true,
+  "usingComponents": {
+    "twoColumns":"../components/blocks/twoColumns/twoColumns"
+  }
+}

+ 186 - 3
pages/shareBonus/shareBonus.wxml

@@ -1,3 +1,186 @@
-<!--pages/shareBonus/shareBonus.wxml-->
-<!-- <text>pages/shareBonus/shareBonus.wxml</text> -->
-<web-view src="{{webViewUrl}}"></web-view>
+<!--pages/pandaBonus/pandaBonus.wxml-->
+<view>
+  <!-- 活动未开始 -->
+  <view class="default_container" wx:if="{{bonus_state == 'unstart'}}">
+    <view class="dot_left"></view>
+    <view class="dot_right"></view>
+    <image class="cloud_left" src="../../image/bonus/cloud.png"></image>
+    <image class="cloud_right" src="../../image/bonus/cloud.png"></image>
+    <view class="bg_content">
+      <image class="top_bg" src="../../image/bonus/top_bg.png"></image>
+      <view class="msg_box pos_rel">
+        <view class="name line_h68">让红包飞一会儿</view>
+        <view class="name line_h68">距离开抢时间还有</view>
+      </view>
+      <view class="time_box">
+        <image class="top_bg" src="../../image/bonus/time_bg.png"></image>
+        <view class="count_box">
+          <view class="count_text" wx:for="{{renderCount}}" wx:for-index="idx" wx:key="idx">
+            <view class="count_single" wx:for="{{item}}" wx:for-index="n" wx:key="n" wx:for-item="num">{{num}}</view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="bottom_pro">
+      <view class="line_h30">独家运营70多个知名化妆品品牌的天猫官方旗舰店</view>
+      <view class="flex_center ht30">
+        <image src="../../image/bonus/icon_logo.png" class="icon_logo"></image>
+        <view style="position: relative;top: 6rpx;">上海丽人丽妆化妆品股份有限公司</view>
+      </view>
+    </view>
+  </view>
+  <!-- 活动未开始 -->
+
+  <!-- 活动开始 -->
+
+  <view class="default_container" wx:if="{{bonus_state == 'open'}}">
+    <view class="dot_left"></view>
+    <view class="dot_right"></view>
+    <image class="cloud_left" src="../../image/bonus/cloud.png"></image>
+    <image class="cloud_right" src="../../image/bonus/cloud.png"></image>
+    <view class="bg_content">
+      <image class="top_bg" src="../../image/bonus/top_bg.png"></image>
+      <view class="msg_box pos_rel">
+        <view class="name line_h68">{{type_info['sender_name']}}</view>
+        <view class="msg line_h68" wx:if="{{type_info['send_type'] == 1}}">发了一个红包,金额随机</view>
+        <view class="msg line_h68" wx:else>发了一个红包,金额固定</view>
+      </view>
+      <view class="mgs_bottom pos_rel">
+        <view class="f40" catchtap="open">{{type_info['type_bless']}}</view>
+      </view>
+      <image wx:if="{{openAnimation}}" src="../../image/bonus/icon_open.png" class="open" catchtap="open"></image>
+      <image wx:else src="../../image/bonus/coin.png" class="open current_open"></image>
+    </view>
+    <view class="bottom_pro">
+      <view class="line_h30">独家运营70多个知名化妆品品牌的天猫官方旗舰店</view>
+      <view class="flex_center ht30">
+        <image src="../../image/bonus/icon_logo.png" class="icon_logo"></image>
+        <view style="position: relative;top: 6rpx;">上海丽人丽妆化妆品股份有限公司</view>
+      </view>
+    </view>
+  </view>
+  <!-- 活动开始 -->
+
+
+
+  <view class="default_container" wx:if="{{bonus_state == 'over'}}">
+    <view class="dot_left"></view>
+    <view class="dot_right"></view>
+    <image class="cloud_left" src="../../image/bonus/cloud.png"></image>
+    <image class="cloud_right" src="../../image/bonus/cloud.png"></image>
+    <view class="bg_content">
+      <image class="top_bg" src="../../image/bonus/top_bg.png"></image>
+      <view class="mgs_bottom pos_rel over">
+        <view class="f56">{{msg}}</view>
+      </view>
+      <view class="look" catchtap="detail">查看领取详情></view>
+    </view>
+
+    <view class="bottom_pro">
+      <view class="line_h30">独家运营70多个知名化妆品品牌的天猫官方旗舰店</view>
+      <view class="flex_center ht30">
+        <image src="../../image/bonus/icon_logo.png" class="icon_logo"></image>
+        <view style="position: relative;top: 6rpx;">上海丽人丽妆化妆品股份有限公司</view>
+      </view>
+    </view>
+  </view>
+
+  <view class="default_container" wx:if="{{bonus_state == 'end'}}">
+    <view class="dot_left"></view>
+    <view class="dot_right"></view>
+    <image class="cloud_left" src="../../image/bonus/cloud.png"></image>
+    <image class="cloud_right" src="../../image/bonus/cloud.png"></image>
+    <view class="bg_content">
+      <image class="top_bg" src="../../image/bonus/top_bg.png"></image>
+      <view class="msg_box pos_rel">
+        <view class="name">{{type_info['sender_name']}}</view>
+        <view class="msg mt20">该红包已过期。如已领取,</view>
+        <view class="msg">请在熊猫美妆APP中“我的红包”中查看~</view>
+      </view>
+    </view>
+    <view class="bottom_pro">
+      <view class="line_h30">独家运营70多个知名化妆品品牌的天猫官方旗舰店</view>
+      <view class="flex_center ht30">
+        <image src="../../image/bonus/icon_logo.png" class="icon_logo"></image>
+        <view style="position: relative;top: 6rpx;">上海丽人丽妆化妆品股份有限公司</view>
+      </view>
+    </view>
+  </view>
+
+  <!-- 开了后的样式 , 即为 details -->
+  <view class="grab_container" wx:if="{{bonus_state == 'detail'}}">
+    <view class="pos_rel" style="height: 182rpx;">
+      <image class="common_bg" src="../../image/bonus/detail_bg.png"></image>
+      <view class="top_title">熊猫美妆红包</view>
+      <image class="sender_head" src="{{sender_head_src}}"></image>
+    </view>
+    <view class="grab_header">
+      <view class="grab_bonus_name">{{type_info['type_name']}}
+        <image class="icon_pin" src="../../image/bonus/icon_pin.png"></image>
+      </view>
+      <view class="grab_prompt">{{type_info['type_bless']}}</view>
+    </view>
+
+    <view class="grab_bonus_price flex_center" wx:if="{{mine_bonus}}">{{mine_bonus['bonus_value']}}<text class="ml4 f30">元</text></view>
+
+    <view class="receive_info tb_line mt60">{{reveive_info}}</view>
+
+    <block wx:if="{{binded_info.length}}">
+      <view class="receive_list">
+        <view class="receive_item" wx:for="{{binded_info}}" wx:for-index="idx" wx:key="idx">
+          <image class="personal_image" src="{{item['avatar']}}"></image>
+          <view class="personal_content">
+            <view class="item_paragraph f30 col333"><text>{{item['user_name']}}</text></view>
+            <view class="item_paragraph f24 col666" wx:if="{{item['discount'] != 0}}">
+              <text>已累计节省{{item['discount']}}元</text>
+            </view>
+            <view class="item_paragraph f24 col666" wx:if="{{item['user_comment']}}">
+              <text>{{item['user_comment']}}</text>
+            </view>
+            <block wx:else>
+              <view wx:if="{{item['user_id'] == mineid}}" class="item_paragraph f24 {{result_msg == '留言' ? 'col2c71c6' : 'col666'}}" catchtap="message_tap"
+                data-flag="true">{{result_msg}}</view>
+            </block>
+          </view>
+
+          <view class="text_right">
+            <view class="item_paragraph f30 col333" style="justify-content: flex-end">{{item['bonus_value']}}元</view>
+            <view wx:if="{{item['is_king']}}" class="item_paragraph f24 cole73636" style="justify-content: flex-end">
+              <image class="icon_king" src="../../image/bonus/king.png"></image>手气最佳
+            </view>
+            <view class="item_paragraph f24 col666" style="justify-content: flex-end">{{item['format_time']}}</view>
+
+          </view>
+        </view>
+      </view>
+    </block>
+
+    <!-- 热卖商品 -->
+
+    <block wx:if="{{summarys}}">
+      <view class="receive_info tb_line mt20">热卖商品</view>
+      <view class="hot_summarys">
+        <block wx:for="{{summarys}}" wx:for-item="summary" wx:for-index="idx" wx:key="idx">
+          <twoColumns summary="{{summary}}"></twoColumns>
+        </block>
+      </view>
+    </block>
+
+    <image class="briefing_address" src="../../image/bonus/advert.png"></image>
+  </view>
+
+  <!--留言弹窗 -->
+
+  <view class="message_modal" wx:if="{{message_flag == 'true'}}">
+    <view class="modal_bg" catchtouchstart="message_tap" data-flag="false"></view>
+    <view class="message_content">
+      <textarea class="message_info" auto-focus placeholder="写下你想说的话" bindinput="bindKeyInput"></textarea>
+      <view class="btn_group flex_center">
+        <view class="cancel_btn r_line" catchtap="message_tap" data-flag="false">取消</view>
+        <view class="submit_btn" catchtap="send_msg">发送</view>
+      </view>
+    </view>
+  </view>
+
+
+</view>

+ 378 - 1
pages/shareBonus/shareBonus.wxss

@@ -1 +1,378 @@
-/* pages/shareBonus/shareBonus.wxss */
+/* pages/shareBonus/shareBonus.wxss */
+.default_container {
+  position: fixed;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  z-index: 999;
+  background: #e14f48;
+  color: #ffe7b8;
+  text-align: center;
+}
+.bg_content {
+  position: relative;
+  height: 71%;
+}
+.top_bg {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+}
+.msg_box {
+  padding-top: 148rpx;
+}
+
+.time_box {
+  margin: 80rpx 60rpx 0;
+  height: 100rpx;
+  position: relative;
+}
+.count_box {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 2;
+  font-size: 86rpx;
+  font-weight: bold;
+  color: #fff;
+}
+.count_text {
+  width: 172rpx;
+  padding: 0 4rpx;
+  display: flex;
+  justify-content: space-between;
+  box-sizing: border-box;
+  font-family: aAlternate;
+}
+.count_single {
+  width: 70rpx;
+}
+.f56 {
+  font-size: 56rpx;
+}
+.ht30 {
+  height: 30rpx;
+}
+.line_h30 {
+  line-height: 30rpx;
+}
+.line_h68 {
+  line-height: 68rpx;
+}
+.name {
+  font-size: 50rpx;
+}
+.msg {
+  font-size: 32rpx;
+  color: #ffd39b;
+}
+.mgs_bottom {
+  margin-top: 150rpx;
+}
+.mgs_bottom.over {
+  margin-top: 300rpx;
+}
+.open {
+  position: absolute;
+  z-index: 999;
+  width: 200rpx;
+  height: 200rpx;
+  left: 0;
+  right: 0;
+  margin: 0 auto -100rpx;
+  bottom: 0;
+}
+.open.opa0 {
+  opacity: 0;
+}
+.open.current_open {
+  opacity: 1;
+  z-index: 1000;
+  animation: iconRotate .8s linear infinite
+}
+
+@keyframes iconRotate{
+  0% {transform: rotateY(0deg);}
+  50% {transform: rotateY(180deg);}
+  100% {transform: rotateY(360deg);}
+}
+
+
+
+
+.bottom_pro {
+  position: absolute;
+  left: 0;
+  bottom: 8%;
+  width: 100%;
+  font-size: 20rpx;
+  color: #fff;
+}
+.icon_logo {
+  width: 20rpx;
+  height: 20rpx;
+  margin-right: 10rpx;
+}
+.cloud_left, .cloud_right {
+  position: absolute;
+  z-index: 1;
+  bottom: 3%;
+  width: 88rpx;
+  height: 34rpx;
+}
+.cloud_left {
+  left: 4%;
+}
+.cloud_right {
+  right: 4%;
+}
+.dot_left, .dot_right {
+  position: absolute;
+  top: 2%;
+  z-index: 1;
+  width: 10rpx;
+  height: 10rpx;
+  border-radius: 50%;
+  background: #ff8a6b;
+}
+.dot_left {
+  left: 3%;
+}
+.dot_right {
+  right: 3%;
+}
+
+/* 开红包后的样式 */
+.grab_container {
+  min-height: 100vh;
+  -webkit-overflow-scrolling: touch;
+  /* height: 100%; */
+  text-align: center;
+  background: #f9f9f9;
+  position: relative;
+  /* color: #ffe7b8; */
+}
+.common_bg {
+  width: 100%;
+  height: 182rpx;
+}
+.top_title {
+  position: absolute;
+  height: 80rpx;
+  line-height: 80rpx;
+  z-index: 1;
+  left: 0;
+  top: 30rpx;
+  width: 100%;
+  font-size: 36rpx;
+  font-weight: bold;
+  color: #FFEEA6 ;
+}
+.sender_head {
+  position: absolute;
+  z-index: 1;
+  left: 50%;
+  bottom: 0;
+  margin-left: -50rpx;
+  margin-bottom: -50rpx;
+  width: 100rpx;
+  height: 100rpx;
+  border-radius: 6rpx;
+}
+
+.grab_header {
+  margin-top: 70rpx;
+  padding: 0 30rpx;
+}
+.grab_bonus_name {
+  color: #333;
+  font-size: 30rpx;
+  font-weight: bold;
+  line-height: 45rpx;
+}
+.icon_pin {
+  position: relative;
+  top: 2rpx;
+  margin-left: 4rpx;
+  width: 30rpx;
+  height: 30rpx;
+}
+.grab_prompt {
+  margin-top: 5rpx;
+  font-size: 24rpx;
+  color: #666;
+  line-height: 45rpx;
+}
+
+.grab_bonus_price {
+  margin-top: 25rpx;
+  height: 98rpx;
+  font-size: 70rpx;
+  /* vertical-align: sub; */
+  color: #E73636;
+}
+.receive_info {
+  padding: 30rpx 30rpx 10rpx;
+  height: 45rpx;
+  line-height: 45rpx;
+  background: #f4f4f4;
+  font-size: 24rpx;
+  color: #666;
+  text-align: left;
+}
+.tb_line {
+  position: relative;
+}
+.tb_line::after {
+  content: '';
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 200%;
+  height: 200%;
+  transform: scale(.5);
+  transform-origin: 0 0;
+  pointer-events: none;
+  box-sizing: border-box;
+  border: 0 solid #d9d9d9;
+  border-width: 1px 0;
+}
+.receive_item {
+  position: relative;
+  display: flex;
+  padding: 30rpx;
+}
+.receive_item::after {
+  position: absolute;
+  z-index: 1;
+  content: '';
+  left: 0;
+  right: 0;
+  bottom: 0;
+  height: 1px;
+  background: #d9d9d9;
+  transform: scaleY(.5);
+}
+.personal_image {
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 4rpx;
+  margin-right: 25rpx;
+}
+.personal_content {
+  flex: 1;
+  padding-right: 30rpx;
+  box-sizing: border-box;
+  text-align: left;
+}
+.item_paragraph {
+  display: flex;
+  align-items: center;
+  height: 45rpx;
+  /* justify-content: space-between; */
+}
+.briefing_address {
+  width: 660rpx;
+  height: 50rpx;
+  margin: 58rpx auto 30rpx;
+}
+.icon_king {
+  width: 28rpx;
+  height: 24rpx;
+  margin-right: 10rpx;
+}
+.look {
+  position: absolute;
+  left: 50rpx;
+  right: 50rpx;
+  bottom: 40%;
+  text-align: center;
+  font-size: 28rpx;
+  color: #ffe7b8;
+}
+.message_modal{
+  position: fixed;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  z-index: 999;
+}
+.modal_bg {
+  position: absolute;
+  z-index: 1;
+  width: 100%;
+  height: 100%;
+  background: rgba(0,0,0,.6);
+}
+.message_content {
+  position: absolute;
+  top: 160rpx;
+  left: 100rpx;
+  right: 100rpx;
+  background: #fff; 
+  border-radius: 10rpx; 
+  z-index: 10;
+}
+.message_info {
+  width:100%;
+  height: 160rpx; 
+  padding: 20rpx;
+  box-sizing: border-box;
+  font-size: 24rpx;
+}
+.btn_group {
+  position: relative;
+}
+.btn_group::after {
+  position: absolute;
+  content: '';
+  left: 0;
+  top: 0;
+  z-index: 2;
+  width: 100%;
+  height: 1px;
+  background: #d9d9d9;
+  transform: scaleY(.5);
+}
+.cancel_btn, .submit_btn {
+  text-align: center;
+  height: 80rpx;
+  line-height: 80rpx;
+  flex: 1;
+  font-size: 32rpx;
+}
+.submit_btn {
+  color: #EB4E4F
+}
+.r_line {
+  position: relative;
+}
+.r_line::after {
+  position: absolute;
+  content: '';
+  right: 0;
+  top: 0;
+  bottom: 0;
+  width: 1px;
+  background: #d9d9d9;
+  transform: scaleX(.5);
+}
+.hot_summarys {
+  width:750rpx;
+  display:flex;
+  flex:1;
+  flex-wrap:wrap;
+  text-align: left;
+}
+.col2c71c6 {
+  color: #2C71C6;
+}

+ 0 - 288
pages/shopCart/shopCart.1.js

@@ -1,288 +0,0 @@
-const getReq = require('./../../config.js').getReq;
-Page({
-  data: {
-    free_info: [],
-    summary: [],
-    cart_list: [],
-    all_checked: false,
-    allPrice: 0,
-    allGoodsPrice: 0,
-    hasmore: false,
-    curpage:0
-  },
-  onLoad: function () {
-
-  },
-  onShow: function () {
-    this.setData({
-      free_info: [],
-      summary: [],
-      cart_list: [],
-      all_checked: false,
-      allPrice: 0,
-      allGoodsPrice: 0,
-      hasmore: false,
-      curpage: 0
-    });
-    this.req_datas();
-  },
-  req_datas(){
-    let self = this;
-    wx.showLoading({
-      title: '加载中',
-    });
-    getReq({
-      act: 'cart',
-      op: 'list',
-      minest_cartid: self.data.curpage
-    }, function (res) {
-      if (res.code == 200) {
-        console.log('res.datas:', res.datas);
-        let hasmore = res.datas.mobile_page.hasmore;
-        let free_info = res.datas.free_info;
-        let summary_datas = res.datas.summary;
-        let cart_list = res.datas.cart_list;
-        let summary = [];
-        if (cart_list.length <= 0) {
-          self.setData({
-            free_info: free_info || self.data.free_info
-          });
-          wx.hideLoading();
-          return;
-        }
-        for (let item of cart_list) {
-          item.checked = false;
-        }
-        for (let i = 0; i < cart_list.length; i++) {
-          for (let j = 0; j < summary_datas.length; j++) {
-            if (cart_list[i].goods_id == summary_datas[j].goods_id) {
-              summary.push(summary_datas[j]);
-              continue;
-            }
-          }
-        }
-        if (hasmore) {
-          let lastCartListId = cart_list[cart_list.length - 1].cart_id;
-          self.setData({
-            hasmore: true,
-            curpage: lastCartListId
-          })
-        }
-        else {
-          self.setData({
-            hasmore: false
-          })
-        }
-        let localSummary = self.data.summary;
-        let localCartList = self.data.cart_list;
-        console.log('sumary:', summary);
-        self.setData({
-          free_info: free_info || self.data.free_info,
-          summary: localSummary.concat(summary),
-          cart_list: localCartList.concat(cart_list)
-        });
-        wx.hideLoading();
-      }
-    })
-  },
-  goods_checked(e) {
-    let goods_id = e.currentTarget.dataset.goodsid;
-    let cart_list = this.data.cart_list;
-    let all_checked_state = 0;
-    for (let item of cart_list) {
-      if (item.goods_id == goods_id) {
-        item.checked = !item.checked;
-      }
-    }
-    for (let item of cart_list) {
-      if (item.checked) {
-        all_checked_state = all_checked_state + 1;
-      }
-    }
-
-    if (all_checked_state == cart_list.length) {
-      all_checked_state = true;
-    }
-    else {
-      all_checked_state = false;
-    }
-    this.setData({
-      cart_list,
-      all_checked: all_checked_state
-    });
-    this.total();
-  },
-  all_checked() {
-    let cart_list = this.data.cart_list;
-    let all_checked_state = this.data.all_checked;
-    for (let item of cart_list) {
-      item.checked = !all_checked_state;
-    }
-    this.setData({
-      cart_list,
-      all_checked: !all_checked_state
-    });
-    this.total();
-  },
-  req_goods_num(cart_id, quantity,callback){
-    let self = this;
-    getReq({
-      act: 'cart',
-      op: 'edit',
-      cart_id,
-      quantity
-    }, function (res) {
-      if (res.code == 200) {
-        let goods_num = res.datas.goods_num;
-        let cart_list = self.data.cart_list;
-        for (let item of cart_list) {
-          if (item.cart_id == cart_id) {
-            item.goods_num = goods_num;
-          }
-        }
-        self.setData({
-          cart_list
-        });
-        callback;
-        for (let i = 0; i < self.data.cart_list.length;i++) {
-          if (self.data.cart_list[i].checked) {
-            self.total();
-            break;
-          }
-        }
-      }
-      else {
-        wx.showToast({
-          title:res.message,
-          icon:"none"
-        })
-      }
-    })
-  },
-  goods_num_handle(e) {
-    let self = this;
-    let cart_id = e.target.dataset.cartid;
-    let num = e.target.dataset.num;
-    let compute_function = e.target.dataset.function;
-    let goods_id = e.target.dataset.goodsid;
-    let quantity = 1;
-    if (compute_function == 'add') {
-      quantity = num + quantity;
-      this.req_goods_num(cart_id, quantity);
-    }
-    else {
-      quantity = num - quantity;
-      if (quantity <= 0) {
-        this.cancal_cart(e,goods_id, cart_id);
-      }
-      else {
-        self.req_goods_num(cart_id, quantity);
-      }
-    }
-  },
-  del_cart(cart_id, goods_id) {
-    let summary = this.data.summary;
-    let cart_list = this.data.cart_list;
-    for (let i = 0; i < summary.length;i++) {
-      if (summary[i].goods_id == goods_id) {
-        summary.splice(i,1);
-      }
-    }
-    for (let i = 0; i < cart_list.length; i++) {
-      if (cart_list[i].goods_id == goods_id) {
-        cart_list.splice(i,1);
-      }
-    }
-    this.setData({
-      summary,
-      cart_list
-    })
-  },
-  cancal_cart(e,goodsid,cartid){
-    let self = this;
-    let goods_id = e.target.dataset.goodsid || goodsid;
-    let cart_id = e.target.dataset.cartid || cartid;
-    wx.showModal({
-      title: "提示",
-      content: "确定要删除吗?",
-      success: function (res) {
-        if (res.confirm) {
-          self.req_goods_num(cart_id, 0, self.del_cart(cart_id, goods_id));
-        } else if (res.cancel) {
-          return;
-        }
-      }
-    })
-  },
-  total(){
-    let self = this;
-    let cart_item = [];
-    for (let item of this.data.cart_list){
-      if(item.checked){
-        cart_item.push(item.cart_id);
-      }
-    }
-    if(cart_item.length <= 0) {
-      self.setData({
-        allPrice:0,
-        allGoodsPrice:0
-      })
-    }
-    let carts = cart_item.join(",");
-    getReq({
-      act: 'member_buy',
-      op: 'calc_cash',
-      ifcart: 1,
-      cart_id: carts
-    }, function (res) {
-      if (res.code == 200) {
-        let datas = res.datas.payinfo;
-        let allPrice = parseFloat((datas.goods_amount + datas.freight - datas.available_pred - datas.full_discount - datas.opgoods_discount).toFixed(2));
-        let allGoodsPrice = parseFloat((datas.goods_amount).toFixed(2));
-        self.setData({
-          allPrice,
-          allGoodsPrice
-        })
-      }
-    })
-  },
-  onReachBottom(){
-    let self = this;
-    let hasmore = this.data.hasmore;
-    if(hasmore) {
-      
-      let req_curpage = this.data.curpage;
-      getReq({
-        act: 'cart',
-        op: 'list',
-        minest_cartid: req_curpage
-      }, function (res) {
-        self.req_datas();
-      })
-    }
-  },
-  settlement(){
-    const cart_id_list = [];
-    for (let cart_item of this.data.cart_list) {
-      if (cart_item.checked) {
-        cart_id_list.push(cart_item.cart_id);
-      }
-    }
-    if (cart_id_list.length <= 0) {
-      wx.showToast({
-        title:"请最少选择一件商品",
-        icon:"none"
-      });
-      return;
-    }
-    let cart_list = cart_id_list.join(',');
-    wx.navigateTo({
-      url: `/pages/confirmOrder/confirmOrder?iscart=1&cart_id=${cart_list}`
-    })
-  },
-  skip_index(){
-    wx.switchTab({
-      url:"/pages/index/index"
-    })
-  }
-})

+ 0 - 74
pages/shopCart/shopCart.1.wxml

@@ -1,74 +0,0 @@
-<!-- <view class='cell_box' wx:if="{{free_info.length}}">
-  <block wx:for="{{free_info}}" wx:key="{{index}}">
-    <view class='cell_item'>
-      <text class='cell_item_title'>{{item.title}}</text>
-      <text class='cell_item_value'>{{item.value}}</text>
-    </view>
-  </block>
-</view> -->
-<view style='background:#fff;' wx:if="{{summary.length <= 0}}">
-  <view class='flex_center'>
-    <image style='width:200rpx;' mode='widthFix' src='../../image/empty_cart.png'></image>
-  </view>
-  <view  class='flex_center'>
-    <text style='font-size:26rpx;color:#a1a1a1;'>您的购物车没有商品哦!</text>
-  </view>
-  <view class='flex_center'>
-    <button size='mini' bindtap='skip_index'  style='margin:20rpx 0;background: #2b2b2b;' type='warn'>去逛逛</button>
-  </view>
-</view>
-<view class='cart_list'>
-  <block wx:for="{{summary}}" wx:key="{{index}}">
-    <view class='cart_item'>
-      <icon class='cancal_btn' type="cancel" size="22" color="#333" bindtap='cancal_cart' data-goodsid="{{cart_list[index]['goods_id']}}" data-cartid="{{cart_list[index]['cart_id']}}"></icon>
-      <view class='check_btn' data-goodsid="{{cart_list[index]['goods_id']}}" bindtap='goods_checked'>
-        <block wx:if="{{cart_list[index]['checked']}}">
-          <icon type="success" size="21" color="#333"></icon>
-        </block>
-        <block wx:else>
-          <view class="icon_empty"></view>
-        </block>
-      </view>
-      <view class='goods_image'>
-        <image mode='scaleToFill' src="{{item.goods_image_url}}"></image>
-      </view>
-      <view class='goods_content'>
-        <view class='goods_name one_line_hidden'>{{item.goods_mobile_name}}</view>
-        <view class='goods_spec one_line_hidden'>{{item.goods_spec}}</view>
-        <view class='goods_price'>
-          <text class="bonus_price">¥{{item.bonus_price}}</text>
-          <text class="original_price">专柜价{{item.goods_price}}</text>
-        </view>
-        <view class='num_handle'>
-          <text class='handle_btn' bindtap='goods_num_handle' data-goodsid="{{cart_list[index]['goods_id']}}" data-cartid="{{cart_list[index]['cart_id']}}" data-function='minus' data-num="{{cart_list[index]['goods_num']}}">-</text>
-          <block>
-            <text class='num'>{{cart_list[index]['goods_num']}}</text>
-          </block>
-          <text class='handle_btn' bindtap='goods_num_handle' data-goodsid="{{cart_list[index]['goods_id']}}" data-cartid="{{cart_list[index]['cart_id']}}" data-function='add' data-num="{{cart_list[index]['goods_num']}}">+</text>
-        </view>
-      </view>
-    </view>
-  </block>
-  <view class='clear_fixed'></view>
-</view>
-
-<view class="handle_fixed">
-  <view class="all_check_btn" bindtap='all_checked'>
-    <block wx:if="{{all_checked}}">
-      <icon type="success" size="21" color="#333" style='margin-right:22rpx;position:relative;top:7rpx;'></icon>
-    </block>
-    <block wx:else>
-      <view class="icon_empty" style='position:relative;bottom:5rpx;'></view>
-    </block>
-    <text>全选</text>
-  </view>
-  <view style='float:right'>
-    <view class='cope'>
-      <text class='bonus_price'>应付:¥{{allPrice}}</text>
-      <text class="original_price">¥{{allGoodsPrice}}</text>
-    </view>
-    <view class='settlement_btn' bindtap='settlement'>
-      <text>结算</text>
-    </view>
-  </view>
-</view>