Forráskód Böngészése

Merge branch 'dev3.8' of http://192.168.3.207:10080/qmx/jy into dev3.8

wangshan 4 éve
szülő
commit
6a43a41956
60 módosított fájl, 2440 hozzáadás és 6 törlés
  1. 1 0
      .gitignore
  2. 139 0
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/css/base.css
  3. 177 0
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/css/squeezeMobile.css
  4. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/bg.png
  5. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/hongbao.png
  6. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/product.png
  7. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/rule.png
  8. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket100.png
  9. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket15.png
  10. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket250.png
  11. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket38.png
  12. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket5.png
  13. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticketBg.png
  14. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/tit.png
  15. 1 0
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/js/jquery-2.1.4.min.js
  16. 13 0
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/js/rem.js
  17. 138 0
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/js/squeeze_mobile.js
  18. 52 0
      src/jfw/modules/app/src/web/staticres/jyapp/squeeze/js/tool.js
  19. 86 0
      src/jfw/modules/app/src/web/templates/frontRouter/squeeze/sess/squeeze_mobile.html
  20. 273 0
      src/web/staticres/css/coupon-list.css
  21. 139 0
      src/web/staticres/frontRouter/pc/squeeze/sess/css/base.css
  22. 165 0
      src/web/staticres/frontRouter/pc/squeeze/sess/css/squeezePc.css
  23. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/bg.png
  24. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/hongbao.png
  25. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/product.png
  26. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/rule.png
  27. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket100.png
  28. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket15.png
  29. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket250.png
  30. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket38.png
  31. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket5.png
  32. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/ticketBg.png
  33. BIN
      src/web/staticres/frontRouter/pc/squeeze/sess/images/tit.png
  34. 1 0
      src/web/staticres/frontRouter/pc/squeeze/sess/js/jquery-2.1.4.min.js
  35. 125 0
      src/web/staticres/frontRouter/pc/squeeze/sess/js/squeeze_pc.js
  36. 52 0
      src/web/staticres/frontRouter/pc/squeeze/sess/js/tool.js
  37. 139 0
      src/web/staticres/frontRouter/wx/squeeze/css/base.css
  38. 177 0
      src/web/staticres/frontRouter/wx/squeeze/css/squeezeMobile.css
  39. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/bg.png
  40. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/hongbao.png
  41. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/product.png
  42. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/rule.png
  43. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/ticket100.png
  44. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/ticket15.png
  45. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/ticket250.png
  46. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/ticket38.png
  47. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/ticket5.png
  48. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/ticketBg.png
  49. BIN
      src/web/staticres/frontRouter/wx/squeeze/images/tit.png
  50. 1 0
      src/web/staticres/frontRouter/wx/squeeze/js/jquery-2.1.4.min.js
  51. 13 0
      src/web/staticres/frontRouter/wx/squeeze/js/rem.js
  52. 138 0
      src/web/staticres/frontRouter/wx/squeeze/js/squeeze_mobile.js
  53. 52 0
      src/web/staticres/frontRouter/wx/squeeze/js/tool.js
  54. 75 0
      src/web/staticres/js/coupon-item-template.js
  55. 0 0
      src/web/staticres/js/coupon-item-template.min.js
  56. 214 0
      src/web/staticres/js/coupon-list.js
  57. 6 0
      src/web/staticres/js/login.js
  58. 96 6
      src/web/templates/frontRouter/pc/coupon/sess/index.html
  59. 81 0
      src/web/templates/frontRouter/pc/squeeze/sess/squeeze_pc.html
  60. 86 0
      src/web/templates/frontRouter/wx/squeeze/sess/squeeze_mobile.html

+ 1 - 0
.gitignore

@@ -1,5 +1,6 @@
 pkg
 bin
+.DS_Store
 .project
 extend
 */pkg

+ 139 - 0
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/css/base.css

@@ -0,0 +1,139 @@
+* {
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    -webkit-overflow-scrolling: touch;
+    -webkit-tap-highlight-color:rgba(0,0,0,0);
+    -webkit-tap-highlight-color:transparent;
+}
+body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
+    margin: 0;
+    padding: 0;
+}
+html,body {
+    /* max-width: 750px; */
+    -webkit-text-size-adjust: 100%;
+    margin: 0 auto;
+    height: 100%;
+    overflow-x: hidden;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    font-size: .24rem;
+    background:rgba(245,244,249,1);;
+    color: #3d3d3d;
+    font-family:  "Microsoft YaHei","Helvetica Neue", "Roboto", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
+}
+
+ul,ol {
+    list-style: none;
+}
+
+/*清除输入框内阴影*/
+input,textarea,select,button {
+    outline: none;
+    border: 0;
+    -webkit-appearance: none;
+    appearance:none;
+}
+
+button,span,div {
+    -webkit-tap-highlight-color:rgba(0,0,0,0);
+	/* -webkit-user-modify:read-only; */
+}
+
+img {
+    border: 0;
+    vertical-align: middle;
+    max-width: 100%;
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+a {
+    text-decoration: none;
+    color: #3d3d3d;
+	-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
+	-webkit-user-select: none;
+	-moz-user-focus: none;
+	-moz-user-select: none;
+}
+
+/*禁用长按页面时的弹出菜单(iOS下有效) ,img和a标签都要加*/
+img, a {
+    -webkit-touch-callout:none;
+}
+em,i{
+	font-style: normal;
+}
+/*兼容ios调取h5页面的头部*/
+.ios-head {
+    display: none;
+    position: fixed;
+    top: 0;
+    padding-top: 15px;
+    background: #18974b;
+    width: 100%;
+    z-index: 100;
+}
+
+/* 清除浮动 */
+.clearfix {
+    zoom: 1;
+}
+.clearfix:after{
+    clear: both;
+    height: 0;
+    overflow: hidden;
+    display: block;
+    visibility: hidden;
+    content: "";
+}
+
+.left {
+    float: left;
+}
+
+.right {
+    float: right;
+}
+.ellipsis {
+    overflow:hidden;
+    text-overflow:ellipsis;
+    white-space:nowrap;
+}
+.show{
+	display: block;
+}
+.hide{
+	display: none;
+}
+[v-cloak] {
+    display: none!important;
+}
+
+
+.jy-app-header {
+    position: absolute;
+    width: 100%;
+    height: 21.33333vw;
+    padding: 10.66667vw 3.2vw 0 3.2vw;
+    box-sizing: border-box;
+    background: #fff;
+    font-family: "Avenir", Helvetica, Arial, sans-serif;
+    display: flex;
+    align-items: center;
+    z-index: 999;
+  }
+
+  .jy-app-header .fanhui {
+    width: 0.48rem;
+    height: 0.48rem;
+    font-size: 0.36rem;
+  }
+
+  .jy-app-header .subreport_title {
+    width: 6.1rem;
+    height: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 0.36rem;
+  }

+ 177 - 0
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/css/squeezeMobile.css

@@ -0,0 +1,177 @@
+body,
+html {
+  width: 100%;
+  height: 100%;
+}
+.squeeze-mobile {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  height: 100%;
+  background-color: #fff;
+}
+.squeeze-mobile main {
+  flex: 1;
+  overflow-y: auto;
+  background-color: #ed322a;
+}
+.squeeze-mobile main .activity {
+  height: 6.1rem;
+  position: relative;
+}
+.squeeze-mobile main .activity .ac-bg {
+  display: block;
+  position: absolute;
+  width: 100%;
+}
+.squeeze-mobile main .activity .ac-content {
+  position: absolute;
+  top: 0.85rem;
+  left: 50%;
+  transform: translateX(-50%);
+  width: 5.72rem;
+}
+.squeeze-mobile main .activity .ac-content img {
+  display: block;
+  width: 100%;
+}
+.squeeze-mobile main .activity .ac-content p {
+  margin-top: 0.2rem;
+  font-size: 0.24rem;
+  color: #fff;
+  font-weight: 700;
+  text-align: center;
+}
+.squeeze-mobile main .activity .ac-discount {
+  position: absolute;
+  top: 3.95rem;
+}
+.squeeze-mobile main .ticket {
+  background-color: #f14939;
+  position: relative;
+  z-index: 1;
+  margin: 0 auto;
+  width: 6.86rem;
+  height: 7.58rem;
+  background: url(../images/app/ticketBg.png) no-repeat;
+  background-size: cover;
+  text-align: center;
+  overflow: hidden;
+}
+.squeeze-mobile main .ticket ul {
+  height: 5.04rem;
+  margin-top: 1.26rem;
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: center;
+}
+.squeeze-mobile main .ticket ul li {
+  position: relative;
+  margin: 0 0.12rem;
+  margin-bottom: 0.27rem;
+  width: 3.03rem;
+  height: 1.41rem;
+}
+.squeeze-mobile main .ticket ul li img {
+  width: 100%;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn {
+  position: absolute;
+  bottom: 0.21rem;
+  right: 0.32rem;
+  width: 1.07rem;
+  height: 0.41rem;
+  text-align: center;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn button {
+  width: 100%;
+  height: 100%;
+  border: 0.02rem solid #fff;
+  border-radius: 0.23rem;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn button i {
+  text-align: center;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 200%;
+  height: 200%;
+  font-size: 0.42rem;
+  transform: scale(0.5) translate(-50%, -50%);
+}
+.squeeze-mobile main .ticket ul li .ticket-btn button.use {
+  color: #fff;
+  background-color: #da1f0f;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn button.get {
+  color: #da1f0f;
+  background-color: #fff;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn span {
+  font-size: 0.29rem;
+  color: rgba(255, 255, 255, 0.5);
+}
+.squeeze-mobile main .ticket #getAll {
+  width: 2.94rem;
+  height: 0.67rem;
+  background-color: #fff;
+  color: #da1f0f;
+  font-size: 0.28rem;
+  border: 1px solid #fff;
+  border-radius: 0.33rem;
+}
+.squeeze-mobile main .ticket #getAll.dis {
+  color: #fff;
+  background-color: #da1f0f;
+  border: 1px solid #fff;
+  opacity: 0.5;
+}
+.squeeze-mobile main .product {
+  position: relative;
+  width: 7.07rem;
+  margin: 0 auto;
+  margin-top: 0.33rem;
+}
+.squeeze-mobile main .product img {
+  display: block;
+  width: 100%;
+}
+.squeeze-mobile main .product button {
+  width: 2.1rem;
+  height: 0.52rem;
+  position: absolute;
+  left: 1.8rem;
+  opacity: 0;
+}
+.squeeze-mobile main .product button#buy1 {
+  top: 3.28rem;
+}
+.squeeze-mobile main .product button#buy2 {
+  top: 6.52rem;
+}
+.squeeze-mobile main .product button#buy3 {
+  top: 9.76rem;
+}
+#toast {
+  display: none;
+  position: fixed;
+  left: 0;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 99;
+}
+#toast .toast-content {
+  position: absolute;
+  top: 4rem;
+  left: 50%;
+  transform: translateX(-50%);
+  height: 0.76rem;
+  width: 1.85rem;
+  border-radius: 0.16rem;
+  background: rgba(0, 0, 0, 0.72);
+  font-size: 0.3rem;
+  text-align: center;
+  line-height: 0.76rem;
+  color: #ffffff;
+}

BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/bg.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/hongbao.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/product.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/rule.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket100.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket15.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket250.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket38.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticket5.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/ticketBg.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/images/tit.png


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/js/jquery-2.1.4.min.js


+ 13 - 0
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/js/rem.js

@@ -0,0 +1,13 @@
+;(function (doc, win) {
+  const docEl = doc.documentElement
+  const resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
+  const recalc = function () {
+    let clientWidth = docEl.clientWidth
+    if (!clientWidth) { return };
+    if (clientWidth > 750) { clientWidth = 750 }
+    docEl.style.fontSize = clientWidth / 7.5 + 'px'
+  }
+  if (!doc.addEventListener) { return };
+  win.addEventListener(resizeEvt, recalc, false)
+  doc.addEventListener('DOMContentLoaded', recalc, false)
+})(document, window)

+ 138 - 0
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/js/squeeze_mobile.js

@@ -0,0 +1,138 @@
+// let activityInfo; // 活动信息
+let ticketList // 奖券列表
+let baseUrl = getEVN('http://192.168.20.67:8080')
+let ticket // 可领取的奖券
+let activityId // 活动id
+let isWX = isWeChat()
+console.log(isWX);
+ticketImg = [
+  './images/app/ticket5.png',
+  './images/app/ticket15.png',
+  './images/app/ticket38.png',
+  './images/app/ticket100.png',
+  './images/app/ticket250.png'
+]
+ 
+activityId = GetRequest()
+console.log(activityId);
+getTicket()
+
+// 获取奖券信息
+function getTicket() {
+  request('/jyMarketing/lottery/activityLottery', 'GET', {
+    userId: 123,
+    appId: 10000,
+    activityId
+  }).then(data => {
+    console.log(data)
+    ticketList = data.data
+    let lis = ''
+    ticket = []
+    ticketList.forEach((item, index) => {
+      // console.log(item);
+      if (item.IsReceive) {
+        li = `<li>
+                <img src="${ticketImg[index]}" alt="">
+                <div class="ticket-btn">
+                  <button class="use"><i>立即使用</i></button>
+                </div>
+              </li>`
+        if (item.StockNumber > 0) {
+          lis += `<li>
+                    <img src="${ticketImg[index]}" alt="">
+                    <div class="ticket-btn">
+                      <button class="get" type="button" is-receive="${item.IsReceive}" data-id="${item.LotteryIdStr}"><i>点击领取</i></button>
+                    </div>
+                  </li>`
+          ticket.push(item.LotteryIdStr)
+        } else {
+          lis += `<li>
+                    <img src="${ticketImg[index]}" alt="">
+                    <div class="ticket-btn">
+                      <span data-id="${item.LotteryIdStr}">抢光了</span>
+                    </div>
+                  </li>`
+        }
+      } else {
+        lis +=`<li>
+                <img src="${ticketImg[index]}" alt="">
+                <div class="ticket-btn">
+                  <button class="use" type="button" is-receive="${item.IsReceive}" data-id="${item.LotteryIdStr}"><i>立即使用</i></button>
+                </div>
+              </li>`
+      }
+    })
+    $('.ticket ul').html(lis)
+    console.log(ticket);
+    if (ticket.length == 0) {
+      $('#getAll').attr('disabled', true).addClass('dis').text('已领光')
+    }
+  })
+}
+// 领取奖券
+function drawTicket(id) {
+  request('/jyMarketing/lottery/lotteryReceive', 'POST', {
+    userId: 123,
+    appId: 10000,
+    lotteryIdArr: id.join(',')
+  }).then(data => {
+    // console.log(data);
+    if (data.code === 1) {
+      $('#toast .toast-content').text('领取成功')
+      // $('#toast').show()
+      getTicket()
+      setTimeout(() => {
+        $('#toast').hide()
+      }, 1500)
+    } else {
+      $('#toast .toast-content').text('领取失败')
+      // $('#toast').show()
+      setTimeout(() => {
+        $('#toast').hide()
+      }, 1500)
+    }
+  })
+}
+$('.ticket ul').on('click', 'li button', function () {
+  // 领取
+  if($(this).attr('is-receive') === 'true') {
+    $('#toast .toast-content').text('领取中')
+    $('#toast').show()
+    let ids = []
+    ids.push($(this).attr('data-id'))
+    drawTicket(ids)
+  } else { // 使用
+    if(isWX) {
+      location.href = '/weixin/frontPage/coupon/free/selectProduct?couponId=' + $(this).attr('data-id')
+    } else {
+      location.href = '/jyapp/frontPage/coupon/free/selectProduct?couponId=' + $(this).attr('data-id')
+    }
+  }
+ 
+})
+$('#getAll').click(function () {
+  if (ticket.length != 0) {
+    $('#toast .toast-content').text('领取中')
+    $('#toast').show()
+    drawTicket(ticket)
+  }
+})
+$('#buy1').click(function() {
+  if(isWX) {
+    location.href = "/front/vipsubscribe/introducePage"
+  } else {
+    location.href = "/jyapp/vipsubscribe/introducePage"
+  }
+})
+
+$('#buy2').click(function() {
+  if(isWX) {
+    location.href = "/front/wx_dataExport/toSieve"
+  } else {
+    location.href = "/jyapp/front/dataExport/toSieve"
+  }
+})
+
+$('#buy3').click(function() {
+  location.href = "/page_points_mobile/home"
+})

+ 52 - 0
src/jfw/modules/app/src/web/staticres/jyapp/squeeze/js/tool.js

@@ -0,0 +1,52 @@
+// 防抖
+function debounce(fn, wait) {
+  let timer = null
+  return function(...args) {
+    if(timer) clearTimeout(timer)
+    timer = setTimeout(()=> {
+      fn.apply(this, ...args)
+    }, wait)
+  }
+}
+
+// 获取url上的id
+function GetRequest() {
+  let url = location.search; //获取url中"?"符后的字串 
+  let theRequest = '';
+  theRequest = url.split('?')[1]
+  return theRequest;
+}
+
+// 获取环境
+function getEVN(ip) {
+  let url = location.href
+  let baseUrl = url.includes('jianyu360')?'':ip
+  return baseUrl
+}
+
+// 接口请求封装
+function request(url, type, data = {}) {
+  return new Promise((resolve, reject) => {
+    $.ajax({
+      url: baseUrl + url,
+      type,
+      dataType: 'json',
+      data,
+      success(data) {
+        resolve(data)
+      }
+    })
+  })
+}
+
+// 判断是否为微信浏览器
+function isWeChat(){
+  //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息,这个属性可以用来判断浏览器类型
+  var ua = window.navigator.userAgent.toLowerCase();
+  //通过正则表达式匹配ua中是否含有MicroMessenger字符串
+  if(ua.match(/MicroMessenger/i) == 'micromessenger'){
+  return true;
+  }else{
+  return false;
+  }
+}

+ 86 - 0
src/jfw/modules/app/src/web/templates/frontRouter/squeeze/sess/squeeze_mobile.html

@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+  <meta name="apple-mobile-web-app-capable" content="yes">
+  <meta name="apple-mobile-web-app-status-bar-style" content="black">
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <title>领取优惠券</title>
+  <script src="./js/rem.js"></script>
+  <link rel="stylesheet" href="./css/base.css">
+  <link rel="stylesheet" href="./iconfont/iconfont.css">
+  <link rel="stylesheet" href="./css/squeezeMobile.css">
+</head>
+<body>
+  <div class="squeeze-mobile">
+    <!-- <header class="header">
+      <div class="iconfont icon-fanhui fanhui"></div>
+      <div class="subreport_title">领取优惠券</div>
+    </header> -->
+    <main>
+      <div class="activity">
+        <img class="ac-bg" src="./images/app/bg.png" alt="">
+        <div class="ac-content">
+          <img src="./images/app/tit.png" alt="">
+          <p>活动时间:2021年4月20日-2021年5月7日</p>
+        </div>
+        <img class="ac-discount" src="./images/app/hongbao.png" alt="">
+      </div>
+      <div class="ticket">
+        <ul>
+          <!-- <li>
+            <img src="./images/app/ticket5.png" alt="">
+            <div class="ticket-btn">
+              <button class="use"><i>立即使用</i></button>
+            </div>
+          </li>
+          <li>
+            <img src="./images/app/ticket15.png" alt="">
+            <div class="ticket-btn">
+              <button class="get"><i>点击领取</i></button>
+            </div>
+          </li>
+          <li>
+            <img src="./images/app/ticket38.png" alt="">
+            <div class="ticket-btn">
+              <button class="get"><i>点击领取</i></button>
+            </div>
+          </li>
+          <li>
+            <img src="./images/app/ticket100.png" alt="">
+            <div class="ticket-btn">
+              <button class="get"><i>点击领取</i></button>
+            </div>
+          </li>
+          <li>
+            <img src="./images/app/ticket250.png" alt="">
+            <div class="ticket-btn">
+              <span>抢光了</span>
+            </div>
+          </li> -->
+        </ul>
+        <button id="getAll">一键领取</button>
+      </div>
+      <div class="product">
+        <img src="./images/app/product.png" alt="">
+        <button id="buy1">购买</button>
+        <button id="buy2">购买</button>
+        <button id="buy3">购买</button>
+      </div>
+      <div class="product">
+        <img src="./images/app/rule.png" alt="">
+      </div>
+    </main>
+  </div>
+  <div id="toast">
+    <div class="toast-content">
+      领取成功
+    </div>
+  </div>
+  <script src="./js/jquery-2.1.4.min.js"></script>
+  <script src="./js/tool.js"></script>
+  <script src="./js/squeeze_mobile.js"></script>
+</body>
+</html>

+ 273 - 0
src/web/staticres/css/coupon-list.css

@@ -0,0 +1,273 @@
+.icon-expand {
+    display: inline-block;
+    width: 16px;
+    height: 16px;
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH7SURBVHgB7ZbNjcIwEIUnC5zgkBIoge1g08HmAAhxIRUsWwFQwbIVBE6IHynbAZRACZTAhRMgdh5ykBUF4STObT4JmUwce954bA+RIAiCIAiCIAg5cUw6rdfr0e12GzuOM223299UIqvVKuRmwHONea7Jq/5vZACcV+2QxfxQSaixB/qcrzASwNHYxf+ViBFZRq3yUDP9mXxnJKBarfrcHOJnRMemiDhFNdPher0aparRHgCLxaJZqVS2/LcZ23jSQbfbnVMBOOe/uJlqJjjv9Xq9g8n3xgLAExE+izBa7iTL5fKT0zPSTJmcB5kEAI5YixuIcJXpeD6fvX6/v6cMpI3DP6/T6WQax2gP6GACjpKvmdxarbbF6piOofoi8rHzhDGzOg8yCwC8xDueMNBMLlLLRERaGjIBxqQc5BIAeMIZ579+0TRfiXiyhyYc+RnlJLcAwJt3nCIiCsPQTfaFDe8o4TzGoAIUEgCUA7+aqdVoNKJkv3q9jhKhFT/bcB4UFgA4BYZ8HD7uA3buY7PZhPGzKhE+tfdzG86DzMfoM6Ioci+Xy5ade0QZBRnaxC27Z8HvZAkrKwB83z9yyeFRouRIlgin08kji1gTACACNylpIjTut2wQBEeyiLUU0kk5LjOXCKaUIgCoUuF+GpXlvCAIgiAIgiAIhfgH3rP9DdTY2f8AAAAASUVORK5CYII=);
+    background-size: contain;
+}
+
+.ellipsis {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+.ellipsis-hidden {
+    overflow: hidden;
+    text-overflow: clip;
+    white-space: nowrap;
+}
+
+/* ele-ui reset */
+.el-tabs__item {
+    font-size: 16px;
+    line-height: 24px;
+    color: #686868;
+}
+.el-tabs__item.is-active {
+    color: #2CB7CA;
+}
+.el-tabs__active-bar {
+    background-color: #2CB7CA;
+}
+.el-tab-pane {
+    min-height: 400px;
+    border-top: 1px solid transparent;
+}
+
+.el-pagination {
+    margin-top: 15px;
+    padding-bottom: 60px;
+    text-align: right;
+}
+.el-pagination.is-background .el-pager li {
+    background-color: #fff;
+    border: 1px solid rgba(0,0,0,0.05);
+}
+.el-pagination.is-background .el-pager :not(.disabled).active,
+.el-pagination.is-background .el-pager :not(.disabled).hover {
+    background-color: #fff;
+    background-color: #2cb7ca;
+}
+
+/* 锯齿边框 */
+.dotted {
+    position: relative;
+}
+.dotted::after {
+    content: ' ';
+    width: 100%;
+    height: 0;
+    position: absolute;
+    /* 小球形状 */
+    border-bottom: 6px dotted white;
+    left: 0;
+    bottom: -3px;
+}
+/* 圆环 */
+.d-circle {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    width: 58px;
+    height: 58px;
+    font-size: 14px;
+    line-height: 24px;
+    color: #CACBCC;
+    border: 2px solid #CACBCC;
+    border-radius: 50%;
+}
+.d-circle .d-circle-inset {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    width: 47px;
+    height: 47px;
+    border: 1px solid #CACBCC;
+    border-radius: 50%;
+    transform: rotate(15deg);
+}
+/* no-data */
+.no-data {
+    margin: 0 auto;
+    margin-top: 100px;
+    text-align: center;
+}
+.no-data .el-image {
+    width: 200px;
+    overflow: visible;
+}
+.no-data .tip-text {
+    margin-top: 14px;
+    color: #686868;
+    font-size: 16px;
+    line-height: 24px;
+}
+
+/* coupon-item style */
+.coupon-list {
+    margin-bottom: 40px;
+    background-color: #fff;
+}
+.coupon-item {
+    float: left;
+    margin-top: 24px;
+    margin-right: 24px;
+    width: 282px;
+    border-radius: 8px;
+    box-shadow: 0px 0px 28px 0px rgba(0,0,0,.08);
+    overflow: hidden;
+}
+.coupon-item:nth-of-type(4n) {
+    margin-right: 0;
+}
+.coupon-item .coupon-item-header {
+    position: relative;
+    width: 100%;
+    height: 120px;
+    background: linear-gradient(281deg, #28C1E2 3.53%, #5FD4E3 98.32%);
+}
+.coupon-item .c-i-h-type {
+    position: absolute;
+    left: 0;
+    top: 0;
+    color: #0DA6BB;
+    padding: 2px 16px 2px 8px;
+    font-size: 12px;
+    line-height: 20px;
+    background-color: rgba(255, 255, 255, 0.7);
+    border-bottom-right-radius: 20px;
+}
+.coupon-item .info-content {
+    padding-top: 24px;
+    text-align: center;
+    color: #fff;
+}
+.coupon-item .c-i-h-full-cut {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+.coupon-item .i-yen {
+    font-size: 16px;
+    line-height: 24px;
+}
+.coupon-item .i-num {
+    margin-left: 4px;
+    margin-right: 16px;
+    font-size: 36px;
+    line-height: 48px;
+    font-weight: bold;
+}
+.coupon-item .info-denomination {
+    display: inline-block;
+}
+.coupon-item .info-condition {
+    font-size: 12px;
+    line-height: 20px;
+}
+.coupon-item .c-i-h-date {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 12px;
+    font-size: 12px;
+    line-height: 20px;
+    text-align: center;
+    color: rgba(255, 255, 255, 0.8);
+}
+
+.coupon-item .coupon-item-content {
+    padding: 16px;
+    text-align: center;
+}
+.coupon-item .ch-container {
+    display: flex;
+    align-items: center;
+    font-size: 12px;
+    line-height: 20px;
+    color: #686868;
+}
+.coupon-item .ch-text {
+    flex: 1;
+}
+.coupon-item .ch-icon {
+    cursor: pointer;
+}
+.coupon-item .c-i-h-rules {
+    margin-top: 4px;
+}
+.coupon-item .c-i-h-to-use {
+    margin: 24px 0;
+    display: inline-block;
+    padding: 3px 24px;
+    font-size: 14px;
+    line-height: 24px;
+    color: #fff;
+    background-color: #2CB7CA;
+    border-radius: 4px;
+    cursor: pointer;
+}
+.coupon-item .c-i-h-date-r {
+    margin-left: 8px;
+    padding: 0 8px;
+    font-size: 12px;
+    line-height: 20px;
+    color: #FF3A20;
+    background: rgba(255, 255, 255, 0.8);
+    border-radius: 10px;
+}
+
+.product-list {
+    /* max-height: 200px;
+    overflow-y: scroll; */
+}
+.product-item {
+    margin-bottom: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
+.product-item.last {
+    margin-bottom: 0;
+}
+.product-name {
+    font-size: 12px;
+    line-height: 20px;
+    color: #686868;
+    flex: 1;
+}
+.product-action {
+    padding: 2px 16px;
+    font-size: 12px;
+    line-height: 20px;
+    color: #2CB7CA;
+    border-radius: 4px;
+    border: 1px solid #2CB7CA;
+    cursor: pointer;
+}
+.product-action:hover {
+    color: #fff;
+    background-color: #2CB7CA;
+    text-decoration: none;
+}
+
+.coupon-item.expired .coupon-item-header,
+.coupon-item.used .coupon-item-header {
+    background: #CACBCC;
+}
+.coupon-item.expired .c-i-h-type,
+.coupon-item.used .c-i-h-type {
+    color: #fff;
+    background: #999999;
+}
+.coupon-item .c-i-h-used,
+.coupon-item .c-i-h-expired {
+    margin-top: 15px;
+    float: right;
+}
+
+.tab-title {
+    margin: 40px 0 44px;
+    font-size: 24px;
+    line-height: 36px;
+}

+ 139 - 0
src/web/staticres/frontRouter/pc/squeeze/sess/css/base.css

@@ -0,0 +1,139 @@
+* {
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    -webkit-overflow-scrolling: touch;
+    -webkit-tap-highlight-color:rgba(0,0,0,0);
+    -webkit-tap-highlight-color:transparent;
+}
+body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
+    margin: 0;
+    padding: 0;
+}
+html,body {
+    /* max-width: 750px; */
+    -webkit-text-size-adjust: 100%;
+    margin: 0 auto;
+    height: 100%;
+    overflow-x: hidden;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    font-size: .24rem;
+    background:rgba(245,244,249,1);;
+    color: #3d3d3d;
+    font-family:  "Microsoft YaHei","Helvetica Neue", "Roboto", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
+}
+
+ul,ol {
+    list-style: none;
+}
+
+/*清除输入框内阴影*/
+input,textarea,select,button {
+    outline: none;
+    border: 0;
+    -webkit-appearance: none;
+    appearance:none;
+}
+
+button,span,div {
+    -webkit-tap-highlight-color:rgba(0,0,0,0);
+	/* -webkit-user-modify:read-only; */
+}
+
+img {
+    border: 0;
+    vertical-align: middle;
+    max-width: 100%;
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+a {
+    text-decoration: none;
+    color: #3d3d3d;
+	-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
+	-webkit-user-select: none;
+	-moz-user-focus: none;
+	-moz-user-select: none;
+}
+
+/*禁用长按页面时的弹出菜单(iOS下有效) ,img和a标签都要加*/
+img, a {
+    -webkit-touch-callout:none;
+}
+em,i{
+	font-style: normal;
+}
+/*兼容ios调取h5页面的头部*/
+.ios-head {
+    display: none;
+    position: fixed;
+    top: 0;
+    padding-top: 15px;
+    background: #18974b;
+    width: 100%;
+    z-index: 100;
+}
+
+/* 清除浮动 */
+.clearfix {
+    zoom: 1;
+}
+.clearfix:after{
+    clear: both;
+    height: 0;
+    overflow: hidden;
+    display: block;
+    visibility: hidden;
+    content: "";
+}
+
+.left {
+    float: left;
+}
+
+.right {
+    float: right;
+}
+.ellipsis {
+    overflow:hidden;
+    text-overflow:ellipsis;
+    white-space:nowrap;
+}
+.show{
+	display: block;
+}
+.hide{
+	display: none;
+}
+[v-cloak] {
+    display: none!important;
+}
+
+
+.jy-app-header {
+    position: absolute;
+    width: 100%;
+    height: 21.33333vw;
+    padding: 10.66667vw 3.2vw 0 3.2vw;
+    box-sizing: border-box;
+    background: #fff;
+    font-family: "Avenir", Helvetica, Arial, sans-serif;
+    display: flex;
+    align-items: center;
+    z-index: 999;
+  }
+
+  .jy-app-header .fanhui {
+    width: 0.48rem;
+    height: 0.48rem;
+    font-size: 0.36rem;
+  }
+
+  .jy-app-header .subreport_title {
+    width: 6.1rem;
+    height: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 0.36rem;
+  }

+ 165 - 0
src/web/staticres/frontRouter/pc/squeeze/sess/css/squeezePc.css

@@ -0,0 +1,165 @@
+body,
+html {
+  width: 100%;
+  height: 100%;
+}
+.squeeze-pc {
+  width: 100%;
+  height: 100vh;
+  overflow-y: auto;
+  background-color: #ed322a;
+}
+.squeeze-pc .w {
+  width: 1215px;
+  margin: 0 auto;
+}
+.squeeze-pc .activity {
+  padding-top: 90px;
+  min-width: 1215px;
+  height: 100%;
+  background: url(../images/pc/bg.png) no-repeat center top;
+  background-size: cover;
+  text-align: center;
+}
+.squeeze-pc .activity .ac-tit {
+  margin: 0 auto;
+  display: block;
+  width: 627px;
+}
+.squeeze-pc .activity .ac-time {
+  margin-top: 20px;
+  font-size: 24px;
+  line-height: 24px;
+  font-weight: 700;
+  color: #fff;
+}
+.squeeze-pc .activity .ac-discount {
+  margin-top: 30px;
+  width: 936px;
+}
+.squeeze-pc .activity .box {
+  padding-bottom: 100px;
+  position: relative;
+  top: -186px;
+}
+.squeeze-pc .activity .box .ticket {
+  margin: 0 auto;
+  height: 522px;
+  width: 100%;
+  background: url(../images/pc/ticketBg.png) no-repeat;
+  background-size: cover;
+  overflow: hidden;
+  text-align: center;
+}
+.squeeze-pc .activity .box .ticket ul {
+  margin: 0 auto;
+  margin-top: 102px;
+  width: 900px;
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: center;
+}
+.squeeze-pc .activity .box .ticket ul li {
+  position: relative;
+  width: 244px;
+  margin: 0 28px;
+  margin-bottom: 33px;
+}
+.squeeze-pc .activity .box .ticket ul li .ticket-btn {
+  position: absolute;
+  bottom: 18px;
+  right: 26px;
+  width: 86px;
+  height: 33px;
+  text-align: center;
+}
+.squeeze-pc .activity .box .ticket ul li .ticket-btn button {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border: 1px solid #fff;
+  border-radius: 18px;
+  font-size: 16px;
+  cursor: pointer;
+}
+.squeeze-pc .activity .box .ticket ul li .ticket-btn button.use {
+  color: #fff;
+  background-color: #da1f0f;
+}
+.squeeze-pc .activity .box .ticket ul li .ticket-btn button.get {
+  color: #da1f0f;
+  background-color: #fff;
+}
+.squeeze-pc .activity .box .ticket ul li .ticket-btn span {
+  font-size: 23px;
+  color: rgba(255, 255, 255, 0.5);
+  cursor: no-drop;
+}
+.squeeze-pc .activity .box .ticket #getAll {
+  margin-top: 8px;
+  width: 237px;
+  height: 54px;
+  color: #ed322a;
+  background-color: #fff;
+  border-radius: 27px;
+  font-size: 23px;
+  cursor: pointer;
+}
+.squeeze-pc .activity .box .ticket #getAll.dis {
+  color: #fff;
+  background-color: #da1f0f;
+  border: 1px solid #fff;
+  opacity: 0.5;
+  cursor: no-drop;
+}
+.squeeze-pc .activity .box .product {
+  position: relative;
+  margin: 0 auto;
+  margin-top: 47px;
+}
+.squeeze-pc .activity .box .product img {
+  display: block;
+  width: 100%;
+}
+.squeeze-pc .activity .box .product button {
+  position: absolute;
+  top: 347px;
+  width: 148px;
+  height: 38px;
+  cursor: pointer;
+  opacity: 0;
+}
+.squeeze-pc .activity .box .product button#buy1 {
+  left: 167px;
+}
+.squeeze-pc .activity .box .product button#buy2 {
+  left: 535px;
+}
+.squeeze-pc .activity .box .product button#buy3 {
+  left: 902px;
+}
+#toast {
+  display: none;
+  position: fixed;
+  left: 0;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 99;
+}
+#toast .toast-content {
+  position: absolute;
+  top: 200px;
+  left: 50%;
+  transform: translateX(-50%);
+  height: 38px;
+  width: 92px;
+  border-radius: 8px;
+  background: rgba(0, 0, 0, 0.72);
+  font-size: 15px;
+  text-align: center;
+  line-height: 38px;
+  color: #ffffff;
+}

BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/bg.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/hongbao.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/product.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/rule.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket100.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket15.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket250.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket38.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/ticket5.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/ticketBg.png


BIN
src/web/staticres/frontRouter/pc/squeeze/sess/images/tit.png


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
src/web/staticres/frontRouter/pc/squeeze/sess/js/jquery-2.1.4.min.js


+ 125 - 0
src/web/staticres/frontRouter/pc/squeeze/sess/js/squeeze_pc.js

@@ -0,0 +1,125 @@
+// let activityInfo; // 活动信息
+let ticketList // 奖券列表
+let baseUrl = getEVN('http://192.168.20.67:8080')
+let ticket // 可领取的奖券
+let activityId // 活动id
+ticketImg = [
+  './images/app/ticket5.png',
+  './images/app/ticket15.png',
+  './images/app/ticket38.png',
+  './images/app/ticket100.png',
+  './images/app/ticket250.png'
+]
+ 
+activityId = GetRequest()
+console.log(activityId);
+getTicket()
+
+// 获取奖券信息
+function getTicket() {
+  request('/jyMarketing/lottery/activityLottery', 'GET', {
+    userId: 123,
+    appId: 10000,
+    activityId
+  }).then(data => {
+    console.log(data)
+    ticketList = data.data
+    let lis = ''
+    ticket = []
+    ticketList.forEach((item, index) => {
+      // console.log(item);
+      if (item.IsReceive) {
+        li = `<li>
+                <img src="${ticketImg[index]}" alt="">
+                <div class="ticket-btn">
+                  <button class="use"><i>立即使用</i></button>
+                </div>
+              </li>`
+        if (item.StockNumber > 0) {
+          lis += `<li>
+                    <img src="${ticketImg[index]}" alt="">
+                    <div class="ticket-btn">
+                      <button class="get" type="button" is-receive="${item.IsReceive}" data-id="${item.LotteryIdStr}"><i>点击领取</i></button>
+                    </div>
+                  </li>`
+          ticket.push(item.LotteryIdStr)
+        } else {
+          lis += `<li>
+                    <img src="${ticketImg[index]}" alt="">
+                    <div class="ticket-btn">
+                      <span data-id="${item.LotteryIdStr}">抢光了</span>
+                    </div>
+                  </li>`
+        }
+      } else {
+        lis +=`<li>
+                <img src="${ticketImg[index]}" alt="">
+                <div class="ticket-btn">
+                  <button class="use" type="button" is-receive="${item.IsReceive}" data-id="${item.LotteryIdStr}"><i>立即使用</i></button>
+                </div>
+              </li>`
+      }
+    })
+    $('.ticket ul').html(lis)
+    console.log(ticket);
+    if (ticket.length == 0) {
+      $('#getAll').attr('disabled', true).addClass('dis').text('已领光')
+    }
+  })
+}
+// 领取奖券
+function drawTicket(id) {
+  request('/jyMarketing/lottery/lotteryReceive', 'POST', {
+    userId: 123,
+    appId: 10000,
+    lotteryIdArr: id.join(',')
+  }).then(data => {
+    // console.log(data);
+    if (data.code === 1) {
+      $('#toast .toast-content').text('领取成功')
+      // $('#toast').show()
+      getTicket()
+      setTimeout(() => {
+        $('#toast').hide()
+      }, 1500)
+    } else {
+      $('#toast .toast-content').text('领取失败')
+      // $('#toast').show()
+      setTimeout(() => {
+        $('#toast').hide()
+      }, 1500)
+    }
+  })
+}
+$('.ticket ul').on('click', 'li button', function () {
+  // 领取
+  if($(this).attr('is-receive') === 'true') {
+    $('#toast .toast-content').text('领取中')
+    $('#toast').show()
+    let ids = []
+    ids.push($(this).attr('data-id'))
+    drawTicket(ids)
+  } else { // 使用
+    
+  }
+ 
+})
+$('#getAll').click(function () {
+  if (ticket.length != 0) {
+    $('#toast .toast-content').text('领取中')
+    $('#toast').show()
+    drawTicket(ticket)
+  }
+})
+
+$('#buy1').click(function() {
+  location.href = "/front/subscribe.html"
+})
+
+$('#buy2').click(function() {
+  location.href = "/front/dataExport/toSieve"
+})
+
+$('#buy3').click(function() {
+  location.href = "/swordfish/integral/index"
+})

+ 52 - 0
src/web/staticres/frontRouter/pc/squeeze/sess/js/tool.js

@@ -0,0 +1,52 @@
+// 防抖
+function debounce(fn, wait) {
+  let timer = null
+  return function(...args) {
+    if(timer) clearTimeout(timer)
+    timer = setTimeout(()=> {
+      fn.apply(this, ...args)
+    }, wait)
+  }
+}
+
+// 获取url上的id
+function GetRequest() {
+  let url = location.search; //获取url中"?"符后的字串 
+  let theRequest = '';
+  theRequest = url.split('?')[1]
+  return theRequest;
+}
+
+// 获取环境
+function getEVN(ip) {
+  let url = location.href
+  let baseUrl = url.includes('jianyu360')?'':ip
+  return baseUrl
+}
+
+// 接口请求封装
+function request(url, type, data = {}) {
+  return new Promise((resolve, reject) => {
+    $.ajax({
+      url: baseUrl + url,
+      type,
+      dataType: 'json',
+      data,
+      success(data) {
+        resolve(data)
+      }
+    })
+  })
+}
+
+// 判断是否为微信浏览器
+function isWeChat(){
+  //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息,这个属性可以用来判断浏览器类型
+  var ua = window.navigator.userAgent.toLowerCase();
+  //通过正则表达式匹配ua中是否含有MicroMessenger字符串
+  if(ua.match(/MicroMessenger/i) == 'micromessenger'){
+  return true;
+  }else{
+  return false;
+  }
+}

+ 139 - 0
src/web/staticres/frontRouter/wx/squeeze/css/base.css

@@ -0,0 +1,139 @@
+* {
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    -webkit-overflow-scrolling: touch;
+    -webkit-tap-highlight-color:rgba(0,0,0,0);
+    -webkit-tap-highlight-color:transparent;
+}
+body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
+    margin: 0;
+    padding: 0;
+}
+html,body {
+    /* max-width: 750px; */
+    -webkit-text-size-adjust: 100%;
+    margin: 0 auto;
+    height: 100%;
+    overflow-x: hidden;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    font-size: .24rem;
+    background:rgba(245,244,249,1);;
+    color: #3d3d3d;
+    font-family:  "Microsoft YaHei","Helvetica Neue", "Roboto", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
+}
+
+ul,ol {
+    list-style: none;
+}
+
+/*清除输入框内阴影*/
+input,textarea,select,button {
+    outline: none;
+    border: 0;
+    -webkit-appearance: none;
+    appearance:none;
+}
+
+button,span,div {
+    -webkit-tap-highlight-color:rgba(0,0,0,0);
+	/* -webkit-user-modify:read-only; */
+}
+
+img {
+    border: 0;
+    vertical-align: middle;
+    max-width: 100%;
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+a {
+    text-decoration: none;
+    color: #3d3d3d;
+	-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
+	-webkit-user-select: none;
+	-moz-user-focus: none;
+	-moz-user-select: none;
+}
+
+/*禁用长按页面时的弹出菜单(iOS下有效) ,img和a标签都要加*/
+img, a {
+    -webkit-touch-callout:none;
+}
+em,i{
+	font-style: normal;
+}
+/*兼容ios调取h5页面的头部*/
+.ios-head {
+    display: none;
+    position: fixed;
+    top: 0;
+    padding-top: 15px;
+    background: #18974b;
+    width: 100%;
+    z-index: 100;
+}
+
+/* 清除浮动 */
+.clearfix {
+    zoom: 1;
+}
+.clearfix:after{
+    clear: both;
+    height: 0;
+    overflow: hidden;
+    display: block;
+    visibility: hidden;
+    content: "";
+}
+
+.left {
+    float: left;
+}
+
+.right {
+    float: right;
+}
+.ellipsis {
+    overflow:hidden;
+    text-overflow:ellipsis;
+    white-space:nowrap;
+}
+.show{
+	display: block;
+}
+.hide{
+	display: none;
+}
+[v-cloak] {
+    display: none!important;
+}
+
+
+.jy-app-header {
+    position: absolute;
+    width: 100%;
+    height: 21.33333vw;
+    padding: 10.66667vw 3.2vw 0 3.2vw;
+    box-sizing: border-box;
+    background: #fff;
+    font-family: "Avenir", Helvetica, Arial, sans-serif;
+    display: flex;
+    align-items: center;
+    z-index: 999;
+  }
+
+  .jy-app-header .fanhui {
+    width: 0.48rem;
+    height: 0.48rem;
+    font-size: 0.36rem;
+  }
+
+  .jy-app-header .subreport_title {
+    width: 6.1rem;
+    height: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 0.36rem;
+  }

+ 177 - 0
src/web/staticres/frontRouter/wx/squeeze/css/squeezeMobile.css

@@ -0,0 +1,177 @@
+body,
+html {
+  width: 100%;
+  height: 100%;
+}
+.squeeze-mobile {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  height: 100%;
+  background-color: #fff;
+}
+.squeeze-mobile main {
+  flex: 1;
+  overflow-y: auto;
+  background-color: #ed322a;
+}
+.squeeze-mobile main .activity {
+  height: 6.1rem;
+  position: relative;
+}
+.squeeze-mobile main .activity .ac-bg {
+  display: block;
+  position: absolute;
+  width: 100%;
+}
+.squeeze-mobile main .activity .ac-content {
+  position: absolute;
+  top: 0.85rem;
+  left: 50%;
+  transform: translateX(-50%);
+  width: 5.72rem;
+}
+.squeeze-mobile main .activity .ac-content img {
+  display: block;
+  width: 100%;
+}
+.squeeze-mobile main .activity .ac-content p {
+  margin-top: 0.2rem;
+  font-size: 0.24rem;
+  color: #fff;
+  font-weight: 700;
+  text-align: center;
+}
+.squeeze-mobile main .activity .ac-discount {
+  position: absolute;
+  top: 3.95rem;
+}
+.squeeze-mobile main .ticket {
+  background-color: #f14939;
+  position: relative;
+  z-index: 1;
+  margin: 0 auto;
+  width: 6.86rem;
+  height: 7.58rem;
+  background: url(../images/app/ticketBg.png) no-repeat;
+  background-size: cover;
+  text-align: center;
+  overflow: hidden;
+}
+.squeeze-mobile main .ticket ul {
+  height: 5.04rem;
+  margin-top: 1.26rem;
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: center;
+}
+.squeeze-mobile main .ticket ul li {
+  position: relative;
+  margin: 0 0.12rem;
+  margin-bottom: 0.27rem;
+  width: 3.03rem;
+  height: 1.41rem;
+}
+.squeeze-mobile main .ticket ul li img {
+  width: 100%;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn {
+  position: absolute;
+  bottom: 0.21rem;
+  right: 0.32rem;
+  width: 1.07rem;
+  height: 0.41rem;
+  text-align: center;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn button {
+  width: 100%;
+  height: 100%;
+  border: 0.02rem solid #fff;
+  border-radius: 0.23rem;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn button i {
+  text-align: center;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 200%;
+  height: 200%;
+  font-size: 0.42rem;
+  transform: scale(0.5) translate(-50%, -50%);
+}
+.squeeze-mobile main .ticket ul li .ticket-btn button.use {
+  color: #fff;
+  background-color: #da1f0f;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn button.get {
+  color: #da1f0f;
+  background-color: #fff;
+}
+.squeeze-mobile main .ticket ul li .ticket-btn span {
+  font-size: 0.29rem;
+  color: rgba(255, 255, 255, 0.5);
+}
+.squeeze-mobile main .ticket #getAll {
+  width: 2.94rem;
+  height: 0.67rem;
+  background-color: #fff;
+  color: #da1f0f;
+  font-size: 0.28rem;
+  border: 1px solid #fff;
+  border-radius: 0.33rem;
+}
+.squeeze-mobile main .ticket #getAll.dis {
+  color: #fff;
+  background-color: #da1f0f;
+  border: 1px solid #fff;
+  opacity: 0.5;
+}
+.squeeze-mobile main .product {
+  position: relative;
+  width: 7.07rem;
+  margin: 0 auto;
+  margin-top: 0.33rem;
+}
+.squeeze-mobile main .product img {
+  display: block;
+  width: 100%;
+}
+.squeeze-mobile main .product button {
+  width: 2.1rem;
+  height: 0.52rem;
+  position: absolute;
+  left: 1.8rem;
+  opacity: 0;
+}
+.squeeze-mobile main .product button#buy1 {
+  top: 3.28rem;
+}
+.squeeze-mobile main .product button#buy2 {
+  top: 6.52rem;
+}
+.squeeze-mobile main .product button#buy3 {
+  top: 9.76rem;
+}
+#toast {
+  display: none;
+  position: fixed;
+  left: 0;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 99;
+}
+#toast .toast-content {
+  position: absolute;
+  top: 4rem;
+  left: 50%;
+  transform: translateX(-50%);
+  height: 0.76rem;
+  width: 1.85rem;
+  border-radius: 0.16rem;
+  background: rgba(0, 0, 0, 0.72);
+  font-size: 0.3rem;
+  text-align: center;
+  line-height: 0.76rem;
+  color: #ffffff;
+}

BIN
src/web/staticres/frontRouter/wx/squeeze/images/bg.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/hongbao.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/product.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/rule.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/ticket100.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/ticket15.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/ticket250.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/ticket38.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/ticket5.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/ticketBg.png


BIN
src/web/staticres/frontRouter/wx/squeeze/images/tit.png


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
src/web/staticres/frontRouter/wx/squeeze/js/jquery-2.1.4.min.js


+ 13 - 0
src/web/staticres/frontRouter/wx/squeeze/js/rem.js

@@ -0,0 +1,13 @@
+;(function (doc, win) {
+  const docEl = doc.documentElement
+  const resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
+  const recalc = function () {
+    let clientWidth = docEl.clientWidth
+    if (!clientWidth) { return };
+    if (clientWidth > 750) { clientWidth = 750 }
+    docEl.style.fontSize = clientWidth / 7.5 + 'px'
+  }
+  if (!doc.addEventListener) { return };
+  win.addEventListener(resizeEvt, recalc, false)
+  doc.addEventListener('DOMContentLoaded', recalc, false)
+})(document, window)

+ 138 - 0
src/web/staticres/frontRouter/wx/squeeze/js/squeeze_mobile.js

@@ -0,0 +1,138 @@
+// let activityInfo; // 活动信息
+let ticketList // 奖券列表
+let baseUrl = getEVN('http://192.168.20.67:8080')
+let ticket // 可领取的奖券
+let activityId // 活动id
+let isWX = isWeChat()
+console.log(isWX);
+ticketImg = [
+  './images/app/ticket5.png',
+  './images/app/ticket15.png',
+  './images/app/ticket38.png',
+  './images/app/ticket100.png',
+  './images/app/ticket250.png'
+]
+ 
+activityId = GetRequest()
+console.log(activityId);
+getTicket()
+
+// 获取奖券信息
+function getTicket() {
+  request('/jyMarketing/lottery/activityLottery', 'GET', {
+    userId: 123,
+    appId: 10000,
+    activityId
+  }).then(data => {
+    console.log(data)
+    ticketList = data.data
+    let lis = ''
+    ticket = []
+    ticketList.forEach((item, index) => {
+      // console.log(item);
+      if (item.IsReceive) {
+        li = `<li>
+                <img src="${ticketImg[index]}" alt="">
+                <div class="ticket-btn">
+                  <button class="use"><i>立即使用</i></button>
+                </div>
+              </li>`
+        if (item.StockNumber > 0) {
+          lis += `<li>
+                    <img src="${ticketImg[index]}" alt="">
+                    <div class="ticket-btn">
+                      <button class="get" type="button" is-receive="${item.IsReceive}" data-id="${item.LotteryIdStr}"><i>点击领取</i></button>
+                    </div>
+                  </li>`
+          ticket.push(item.LotteryIdStr)
+        } else {
+          lis += `<li>
+                    <img src="${ticketImg[index]}" alt="">
+                    <div class="ticket-btn">
+                      <span data-id="${item.LotteryIdStr}">抢光了</span>
+                    </div>
+                  </li>`
+        }
+      } else {
+        lis +=`<li>
+                <img src="${ticketImg[index]}" alt="">
+                <div class="ticket-btn">
+                  <button class="use" type="button" is-receive="${item.IsReceive}" data-id="${item.LotteryIdStr}"><i>立即使用</i></button>
+                </div>
+              </li>`
+      }
+    })
+    $('.ticket ul').html(lis)
+    console.log(ticket);
+    if (ticket.length == 0) {
+      $('#getAll').attr('disabled', true).addClass('dis').text('已领光')
+    }
+  })
+}
+// 领取奖券
+function drawTicket(id) {
+  request('/jyMarketing/lottery/lotteryReceive', 'POST', {
+    userId: 123,
+    appId: 10000,
+    lotteryIdArr: id.join(',')
+  }).then(data => {
+    // console.log(data);
+    if (data.code === 1) {
+      $('#toast .toast-content').text('领取成功')
+      // $('#toast').show()
+      getTicket()
+      setTimeout(() => {
+        $('#toast').hide()
+      }, 1500)
+    } else {
+      $('#toast .toast-content').text('领取失败')
+      // $('#toast').show()
+      setTimeout(() => {
+        $('#toast').hide()
+      }, 1500)
+    }
+  })
+}
+$('.ticket ul').on('click', 'li button', function () {
+  // 领取
+  if($(this).attr('is-receive') === 'true') {
+    $('#toast .toast-content').text('领取中')
+    $('#toast').show()
+    let ids = []
+    ids.push($(this).attr('data-id'))
+    drawTicket(ids)
+  } else { // 使用
+    if(isWX) {
+      location.href = '/weixin/frontPage/coupon/free/selectProduct?couponId=' + $(this).attr('data-id')
+    } else {
+      location.href = '/jyapp/frontPage/coupon/free/selectProduct?couponId=' + $(this).attr('data-id')
+    }
+  }
+ 
+})
+$('#getAll').click(function () {
+  if (ticket.length != 0) {
+    $('#toast .toast-content').text('领取中')
+    $('#toast').show()
+    drawTicket(ticket)
+  }
+})
+$('#buy1').click(function() {
+  if(isWX) {
+    location.href = "/front/vipsubscribe/introducePage"
+  } else {
+    location.href = "/jyapp/vipsubscribe/introducePage"
+  }
+})
+
+$('#buy2').click(function() {
+  if(isWX) {
+    location.href = "/front/wx_dataExport/toSieve"
+  } else {
+    location.href = "/jyapp/front/dataExport/toSieve"
+  }
+})
+
+$('#buy3').click(function() {
+  location.href = "/page_points_mobile/home"
+})

+ 52 - 0
src/web/staticres/frontRouter/wx/squeeze/js/tool.js

@@ -0,0 +1,52 @@
+// 防抖
+function debounce(fn, wait) {
+  let timer = null
+  return function(...args) {
+    if(timer) clearTimeout(timer)
+    timer = setTimeout(()=> {
+      fn.apply(this, ...args)
+    }, wait)
+  }
+}
+
+// 获取url上的id
+function GetRequest() {
+  let url = location.search; //获取url中"?"符后的字串 
+  let theRequest = '';
+  theRequest = url.split('?')[1]
+  return theRequest;
+}
+
+// 获取环境
+function getEVN(ip) {
+  let url = location.href
+  let baseUrl = url.includes('jianyu360')?'':ip
+  return baseUrl
+}
+
+// 接口请求封装
+function request(url, type, data = {}) {
+  return new Promise((resolve, reject) => {
+    $.ajax({
+      url: baseUrl + url,
+      type,
+      dataType: 'json',
+      data,
+      success(data) {
+        resolve(data)
+      }
+    })
+  })
+}
+
+// 判断是否为微信浏览器
+function isWeChat(){
+  //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息,这个属性可以用来判断浏览器类型
+  var ua = window.navigator.userAgent.toLowerCase();
+  //通过正则表达式匹配ua中是否含有MicroMessenger字符串
+  if(ua.match(/MicroMessenger/i) == 'micromessenger'){
+  return true;
+  }else{
+  return false;
+  }
+}

+ 75 - 0
src/web/staticres/js/coupon-item-template.js

@@ -0,0 +1,75 @@
+var couponItemString = `
+<div class="coupon-item" :class="lotteryStateClass">
+    <div class="coupon-item-header dotted">
+        <div class="c-i-h-type">{{attribute}}</div>
+        <div class="c-i-h-info">
+            <div class="info-content c-i-h-discount" key="content" v-if="attribute.indexOf('折扣') != -1">折扣券</div>
+            <div class="info-content c-i-h-full-cut" key="content" v-else-if="attribute.indexOf('满减') != -1">
+                <span class="info-denomination">
+                    <span class="i-yen">&yen;</span>
+                    <span class="i-num">{{ reduce }}</span>
+                </span>
+                <span class="info-condition">满{{ full }}可用</span>
+            </div>
+            <div class="info-content c-i-h-p-voucher" key="content" v-else-if="attribute.indexOf('实物') != -1">实物券</div>
+            <div class="info-content c-i-h-others" key="content" v-else>优惠券</div>
+        </div>
+        <div class="c-i-h-date">
+            <span class="c-i-h-date-l">{{ useDate }}</span>
+            <span class="c-i-h-date-r" v-if="expireDays && lotteryState == '4'">{{ expireDays }}</span>
+        </div>
+    </div>
+    <div class="coupon-item-content">
+        <div class="c-i-h-range ch-container">
+            <span class="ch-label">适用产品:</span>
+            <span class="ch-text ellipsis">{{ productionsListStr }}</span>
+            <el-popover
+                v-if="productionsListStr.length >= 15"
+                class="ch-icon"
+                :placement="popoverConf.placement"
+                :width="popoverConf.width"
+                :offset="16"
+                :trigger="popoverConf.trigger"
+                title="适用产品"
+                :content="productionsListStr">
+                <el-link slot="reference" icon="icon-expand"></el-link>
+            </el-popover>
+        </div>
+        <div class="c-i-h-rules ch-container" v-if="rulesStr">
+            <span class="ch-label">使用规则:</span>
+            <span class="ch-text ellipsis">{{ rulesStr }}</span>
+            <el-popover
+                v-if="rulesStr.length >= 15"
+                class="ch-icon"
+                :placement="popoverConf.placement"
+                :width="popoverConf.width"
+                :offset="16"
+                :trigger="popoverConf.trigger"
+                title="使用规则"
+                :content="rulesStr">
+                <el-link slot="reference" icon="icon-expand"></el-link>
+            </el-popover>
+        </div>
+        <el-popover
+            v-if="lotteryState == '4' && available"
+            :placement="popoverConf.placement"
+            :width="popoverConf.width"
+            :offset="96"
+            :trigger="popoverConf.trigger">
+            <div slot="reference" class="c-i-h-to-use">去使用</div>
+            <div class="product-list">
+                <div class="product-item" :class="productions.length - 1 == index ? 'last' : ''" v-for="(item,index) in productions" :key="index">
+                    <span class="product-name ellipsis">{{ item.name }}</span>
+                    <a class="product-action" :href="item.url" target="_blank">去使用</a>
+                </div>
+            </div>
+        </el-popover>
+        <div class="d-circle c-i-h-used" v-if="lotteryState == '2'">
+            <div class="d-circle-inset">已使用</div>
+        </div>
+        <div class="d-circle c-i-h-expired" v-if="lotteryState == '3'">
+            <div class="d-circle-inset">已失效</div>
+        </div>
+    </div>
+</div>
+`

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
src/web/staticres/js/coupon-item-template.min.js


+ 214 - 0
src/web/staticres/js/coupon-list.js

@@ -0,0 +1,214 @@
+// item组件
+Vue.component('coupon-item', {
+    template: couponItemString,
+    props: {
+        // 卡券状态: 2:已过期;3:已使用;4:未使用
+        lotteryState: {
+            type: String,
+            default: '4'
+        },
+        // 是否可用
+        available: {
+            type: Boolean,
+            default: true
+        },
+        // 卡券类型: 满减券 折扣券 实物券
+        attribute: {
+            type: String,
+            default: ''
+        },
+        // 有效期开始时间
+        startDate: {
+            type: String,
+            default: ''
+        },
+        endDate: {
+            type: String,
+            default: ''
+        },
+        full: {
+            type: [String, Number],
+            default: -1
+        },
+        reduce: {
+            type: [String, Number],
+            default: 0
+        },
+        // 使用说明
+        instructions: {
+            type: String,
+            default: ''
+        },
+        // 可用产品
+        productions: {
+            type: Array,
+            default: function () {
+                return []
+            }
+        }
+    },
+    computed: {
+        lotteryStateClass: function () {
+            switch (this.lotteryState) {
+                case '2': {
+                    return 'expired'
+                }
+                case '3': {
+                    return 'used'
+                }
+                case '4': {
+                    return ''
+                }
+                default: {
+                    return ''
+                }
+            }
+        },
+        useDate: function () {
+            var s = this.startDate.replace(/-/g, '.')
+            var e = this.endDate.replace(/-/g, '.')
+            return s + ' - ' + e
+        },
+        productionsListStr: function () {
+            var arr = []
+            this.productions.forEach(function (item) {
+                if (item && item.name) {
+                    arr.push(item.name)
+                }
+            })
+            return arr.join('、')
+        },
+        rulesStr: function () {
+            return this.instructions
+        },
+        expireDays: function () {
+            var endTime = this.endDate.replace(/-/g, '/')
+            var endTimeStamp = new Date(endTime).getTime()
+            // 得到当天的时间
+            var nowYear = new Date().getFullYear()
+            var nowMonth = new Date().getMonth() + 1
+            var nowDay = new Date().getDate()
+            var nowDayStamp = new Date(nowYear + '/' + nowMonth + '/' + nowDay)
+            var diffStamp = endTimeStamp - nowDayStamp
+            var diffDay = diffStamp / (24 * 60 * 60 * 1000)
+            var intDiffDay = parseInt(diffDay) + 1
+            if (intDiffDay <= 7) {
+                return intDiffDay + '天后到期'
+            } else {
+                return ''
+            }
+        }
+    },
+    data: function () {
+        return {
+            popoverConf: {
+                placement: 'bottom-end',
+                width: 282,
+                trigger: 'hover'
+            }
+        }
+    }
+})
+
+var vm = new Vue({
+    el: '#app',
+    data: function () {
+        return {
+            tabActiveName: 'notUsed',
+            tabList: [
+                {
+                    label: '未使用',
+                    name: 'notUsed'
+                },
+                {
+                    label: '已使用',
+                    name: 'used'
+                },
+                {
+                    label: '已失效',
+                    name: 'expired'
+                }
+            ],
+            tabStateMap: {
+                notUsed: {
+                    lotteryState: '4',
+                    index: 0,  // tab标签索引
+                    pageSize: 8,  // 每页多少条数据
+                    pageNum: 1,  // 当前页码
+                    total: 0,  // 总共多少条数据
+                    loaded: false,
+                    loading: true,
+                    list: []
+                },
+                used: {
+                    lotteryState: '2',
+                    index: 1,
+                    pageSize: 8,
+                    pageNum: 1,
+                    total: 0,
+                    loaded: false,
+                    loading: true,
+                    list: []
+                },
+                expired: {
+                    lotteryState: '3',
+                    index: 2,
+                    pageSize: 8,
+                    pageNum: 1,
+                    total: 0,
+                    loaded: false,
+                    loading: true,
+                    list: []
+                }
+            }
+        }
+    },
+    computed: {
+        tabState: function () {
+            return this.tabStateMap[this.tabActiveName]
+        }
+    },
+    created: function () {
+        this.getCouponList()
+    },
+    methods: {
+        // query: 传入一些参数,用来覆盖默认从全局取到的参数
+        getCouponList: function (query) {
+            var _this = this
+            var state = this.tabState
+            var data = {
+                mold: state.lotteryState,
+                currentPage: state.pageNum,
+                pageSize: state.pageSize,
+                platform: 'P'
+            }
+            Object.assign(data, query)
+            state.loading = true
+            state.loaded = false
+            $.ajax({
+                url: '/jyCoupon/getInfoByUser',
+                type: 'POST',
+                data: data,
+                success: function (res) {
+                    if (res && res.data) {
+                        state.total = res.data.count
+                        state.list = res.data.list || []
+                    }
+                },
+                complete: function () {
+                    state.loading = false
+                    state.loaded = true
+                }
+            })
+        },
+        tabClick: function () {
+            // 如果loaded为true,说明已经请求过,则不需要在tab切换时候再次请求
+            if (this.tabState.loaded) return
+            this.getCouponList()
+        },
+        onPageChange: function (p) {
+            this.tabState.pageNum = p
+            this.getCouponList()
+        }
+    },
+})

+ 6 - 0
src/web/staticres/js/login.js

@@ -366,6 +366,9 @@ var logic = function(data,num){
           +"<div class=\"myorderDiv\" onclick=\"window.location.href='/swordfish/integral/index'\">"
           +"<span>我的剑鱼币</span>"
           +"</div>"
+          +"<div class=\"myorderDiv\" onclick=\"window.location.href='/swordfish/coupon/'\">"
+          +"<span>我的奖券</span>"
+          +"</div>"
           +"<div class=\"myorderDiv\" onclick=\"window.location.href='/front/swordfish/toMyOrder'\">"
           +"<span>我的订单</span>"
           +"</div>"
@@ -614,6 +617,9 @@ var haslogin = function(num,kyorpn,url){
             +"<div class=\"myorderDiv\" onclick=\"window.location.href='/swordfish/integral/index'\">"
               +"<span>我的剑鱼币</span>"
             +"</div>"
+            +"<div class=\"myorderDiv\" onclick=\"window.location.href='/swordfish/coupon/'\">"
+            +"<span>我的奖券</span>"
+            +"</div>"
             +"<div class=\"myorderDiv\" onclick=\"window.location.href='/front/swordfish/toMyOrder'\">"
             +"<span>我的订单</span>"
             +"</div>"

+ 96 - 6
src/web/templates/frontRouter/pc/coupon/sess/index.html

@@ -1,10 +1,100 @@
 <!DOCTYPE html>
-<html lang="en">
+<html>
 <head>
-    <meta charset="UTF-8">
-    <title>我的奖券</title>
+    <title>剑鱼奖券_剑鱼标讯,全行业招标信息智能推送领导者</title>
+    <meta content="IE=edge,Chrome=1" http-equiv="X-UA-Compatible"/>
+    <meta content="招标订阅,招标项目,中标项目,招标信息,剑鱼标讯" name="Keywords"/>
+    <meta content="使用剑鱼标讯,可以精准匹配招标信息,只需要微信关注剑鱼标讯公众号,然后自行设定所关注的招标关键词和地区,满足订阅需求的招标信息就会在两个小时内自动推送。" name="Description"/>
+    <meta content="webkit" name="renderer">
+    <meta content="telephone=no" name="format-detection"/>
+    <meta content="剑鱼文库" theme="light" name="enable-header">
+    {{include "/common/pnc.html"}}
+    <link href='{{Msg "seo" "cdn"}}/css/reset.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
+    <link href='{{Msg "seo" "cdn"}}/pccss/reset_pc.css' rel="stylesheet" type="text/css"/>
+    <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet"/>
+    <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
+    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/element-ui@2.9.2/lib/theme-chalk/index.css">
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/css/coupon-list.css?v={{Msg "seo" "version"}}'>
+    <style>
+        #public-nav {
+            border-bottom: 1px solid #e0e0e0;
+            background: #fff;
+        }
+        .page--docs--index .page-container {
+            min-height: calc(100vh - 364px);
+            padding-top: 77px;
+            box-sizing: border-box;
+        }
+        .page--docs--index .w-box .w1200 {
+            width: 1200px;
+            margin: 0 auto;
+            min-width: 1200px;
+        }
+    </style>
 </head>
-<body>
-pc 我的奖券
+<body class="page--docs--index">
+{{include "/common/pchead.html"}}
+<!-- S-注入  -->
+<div class="w-box page-container">
+    <div class="w1200">
+        <div id="app">
+            <h3 class="tab-title">我的奖券</h3>
+            <el-tabs v-model="tabActiveName" @tab-click="tabClick">
+                <el-tab-pane
+                    v-for="(tabPane, tabIndex) in tabList"
+                    :label="tabPane.label"
+                    :name="tabPane.name"
+                    :key="tabIndex"
+                    v-loading="tabState.loading">
+                    <div class="coupon-list clearfix">
+                        <coupon-item
+                            v-for="(item,index) in tabState.list"
+                            :key="index"
+                            :start-date="item.lotteryBeginDate"
+                            :end-date="item.lotteryEndDate"
+                            :productions="item.products"
+                            :lottery-state="tabStateMap[tabPane.name].lotteryState"
+                            :available="item.available"
+                            :attribute="item.lotteryAttribute"
+                            :instructions="item.instructions"
+                            :full="item.full"
+                            :reduce="item.reduce"
+                        ></coupon-item>
+                    </div>
+                    <div class="no-data" style="display: none;" v-show="tabState.list.length === 0 && tabState.loaded">
+                        <el-image src="/images/pc_12.png"></el-image>
+                        <div class="tip-text"><p v-text="'暂无' + tabPane.label + '奖券'"></p></div>
+                    </div>
+                </el-tab-pane>
+            </el-tabs>
+            <el-pagination
+                background
+                layout="prev, pager, next, ->"
+                :hide-on-single-page="true"
+                :current-page="tabState.pageNum"
+                :page-size="tabState.pageSize"
+                :total="tabState.total"
+                @current-change="onPageChange"
+            ></el-pagination>
+        </div>
+    </div>
+</div>
+<script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+
+<script src='//cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js' type="text/javascript"></script>
+<script src='//cdn.jsdelivr.net/npm/element-ui@2.9.2/lib/index.js' type="text/javascript"></script>
+<script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/js/coupon-item-template.min.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/js/coupon-list.js?v={{Msg "seo" "version"}}'></script>
+<script>
+    $(function () {
+      haslogin({{.T.logid}});
+    })
+</script>
+<!--S-百度统计-->
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<!--E-百度统计-->
 </body>
-</html>
+</html>

+ 81 - 0
src/web/templates/frontRouter/pc/squeeze/sess/squeeze_pc.html

@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+  <meta charset="UTF-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta http-equiv="Access-Control-Allow-Origin" content="*">
+  <title>领取优惠券</title>
+  <link rel="stylesheet" href="./css/base.css">
+  <link rel="stylesheet" href="./css/squeezePc.css">
+</head>
+
+<body>
+  <div class="squeeze-pc">
+    <div class="activity">
+      <div class="w">
+        <img class="ac-tit" src="./images/pc/tit.png" alt="">
+        <p class="ac-time">活动时间:2021年4月20日-2021年5月7日</p>
+        <img class="ac-discount" src="./images/pc/hongbao.png" alt="">
+      </div>
+      <div class="box w">
+        <div class="ticket">
+          <ul>
+            <li>
+              <img src="./images/pc/ticket5.png" alt="">
+              <div class="ticket-btn">
+                <button class="use">立即使用</button>
+              </div>
+            </li>
+            <li>
+              <img src="./images/pc/ticket15.png" alt="">
+              <div class="ticket-btn">
+                <button class="get">点击领取</button>
+              </div>
+            </li>
+            <li>
+              <img src="./images/pc/ticket38.png" alt="">
+              <div class="ticket-btn">
+                <button class="use">立即使用</button>
+              </div>
+            </li>
+            <li>
+              <img src="./images/pc/ticket100.png" alt="">
+              <div class="ticket-btn">
+                <button class="get">点击领取</button>
+              </div>
+            </li>
+            <li>
+              <img src="./images/pc/ticket250.png" alt="">
+              <div class="ticket-btn">
+                <span>抢光了</span>
+              </div>
+            </li>
+          </ul>
+          <button id="getAll">一键领取</button>
+        </div>
+        <div class="product">
+          <img src="./images/pc/product.png" alt="">
+          <button id="buy1">购买</button>
+          <button id="buy2">购买</button>
+          <button id="buy3">购买</button>
+        </div>
+        <div class="product">
+          <img src="./images/pc/rule.png" alt="">
+        </div>
+      </div>
+    </div>
+  </div>
+  <div id="toast">
+    <div class="toast-content">
+      领取成功
+    </div>
+  </div>
+
+  <script src="./js/jquery-2.1.4.min.js"></script>
+  <script src="./js/tool.js"></script>
+  <script src="./js/squeeze_pc.js"></script>
+</body>
+
+</html>

+ 86 - 0
src/web/templates/frontRouter/wx/squeeze/sess/squeeze_mobile.html

@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+  <meta name="apple-mobile-web-app-capable" content="yes">
+  <meta name="apple-mobile-web-app-status-bar-style" content="black">
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <title>领取优惠券</title>
+  <script src="./js/rem.js"></script>
+  <link rel="stylesheet" href="./css/base.css">
+  <link rel="stylesheet" href="./iconfont/iconfont.css">
+  <link rel="stylesheet" href="./css/squeezeMobile.css">
+</head>
+<body>
+  <div class="squeeze-mobile">
+    <!-- <header class="header">
+      <div class="iconfont icon-fanhui fanhui"></div>
+      <div class="subreport_title">领取优惠券</div>
+    </header> -->
+    <main>
+      <div class="activity">
+        <img class="ac-bg" src="./images/app/bg.png" alt="">
+        <div class="ac-content">
+          <img src="./images/app/tit.png" alt="">
+          <p>活动时间:2021年4月20日-2021年5月7日</p>
+        </div>
+        <img class="ac-discount" src="./images/app/hongbao.png" alt="">
+      </div>
+      <div class="ticket">
+        <ul>
+          <!-- <li>
+            <img src="./images/app/ticket5.png" alt="">
+            <div class="ticket-btn">
+              <button class="use"><i>立即使用</i></button>
+            </div>
+          </li>
+          <li>
+            <img src="./images/app/ticket15.png" alt="">
+            <div class="ticket-btn">
+              <button class="get"><i>点击领取</i></button>
+            </div>
+          </li>
+          <li>
+            <img src="./images/app/ticket38.png" alt="">
+            <div class="ticket-btn">
+              <button class="get"><i>点击领取</i></button>
+            </div>
+          </li>
+          <li>
+            <img src="./images/app/ticket100.png" alt="">
+            <div class="ticket-btn">
+              <button class="get"><i>点击领取</i></button>
+            </div>
+          </li>
+          <li>
+            <img src="./images/app/ticket250.png" alt="">
+            <div class="ticket-btn">
+              <span>抢光了</span>
+            </div>
+          </li> -->
+        </ul>
+        <button id="getAll">一键领取</button>
+      </div>
+      <div class="product">
+        <img src="./images/app/product.png" alt="">
+        <button id="buy1">购买</button>
+        <button id="buy2">购买</button>
+        <button id="buy3">购买</button>
+      </div>
+      <div class="product">
+        <img src="./images/app/rule.png" alt="">
+      </div>
+    </main>
+  </div>
+  <div id="toast">
+    <div class="toast-content">
+      领取成功
+    </div>
+  </div>
+  <script src="./js/jquery-2.1.4.min.js"></script>
+  <script src="./js/tool.js"></script>
+  <script src="./js/squeeze_mobile.js"></script>
+</body>
+</html>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott