| // logs.unshift(Date.now()) | // logs.unshift(Date.now()) | ||||
| // wx.setStorageSync('logs', logs) | // wx.setStorageSync('logs', logs) | ||||
| var openid = wx.getStorageSync('openid') || ""; | var openid = wx.getStorageSync('openid') || ""; | ||||
| console.log(this.globalData.present_id) | |||||
| // 登录 | // 登录 | ||||
| if (!openid){ | if (!openid){ | ||||
| wx.login({ | wx.login({ | ||||
| }, | }, | ||||
| globalData: { | globalData: { | ||||
| userInfo: null, | userInfo: null, | ||||
| present_id:"",//判断用户是通过领取优惠券进来的还是直接进的 | |||||
| number:"",//赠送优惠券的数量 | |||||
| openId:"", | openId:"", | ||||
| session_key:"", | session_key:"", | ||||
| token:"", | token:"", |
| "pages/personalCenter/personalCenter", | "pages/personalCenter/personalCenter", | ||||
| "pages/buyTicket/buyTicket", | "pages/buyTicket/buyTicket", | ||||
| "pages/TicketDetails/TicketDetails", | "pages/TicketDetails/TicketDetails", | ||||
| "pages/givePage/givePage" | |||||
| "pages/givePage/givePage", | |||||
| "pages/receiveTicket/receiveTicket" | |||||
| ], | ], | ||||
| "window":{ | "window":{ | ||||
| "backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
| "navigationBarTitleText": "老门框优惠券售卖系统", | "navigationBarTitleText": "老门框优惠券售卖系统", | ||||
| "navigationBarTextStyle": "black" | "navigationBarTextStyle": "black" | ||||
| }, | }, | ||||
| "style": "v2", | |||||
| "sitemapLocation": "sitemap.json", | "sitemapLocation": "sitemap.json", | ||||
| "tabBar":{ | "tabBar":{ | ||||
| "color": "#666666", | "color": "#666666", |
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| var dataArr = JSON.parse(options.dataArr); | |||||
| console.log(dataArr) | |||||
| this.setData({ | |||||
| ticketUser: dataArr | |||||
| }) | |||||
| this.ticketState(this.data.ticketUser.coupon_sell_id); | |||||
| console.log(options.id) | |||||
| this.getTicketUser(options.id,1) | |||||
| }, | }, | ||||
| ticketState:function(id){//优惠券使用状态 | |||||
| app.wxRequest(app.globalData.httpUrl + 'couponbuy/uniquehistory/'+id, {}, e => { | |||||
| getTicketUser: function (id,from) {//获取优惠券信息 | |||||
| app.wxRequest(app.globalData.httpUrl + 'couponsell/detail', { coupon_sell_id: id, from: from}, e => { | |||||
| console.log(e) | console.log(e) | ||||
| if (e.code == 200) { | if (e.code == 200) { | ||||
| this.setData({ | this.setData({ | ||||
| ticketStateArr:e.data | |||||
| ticketUser: e.data | |||||
| }) | }) | ||||
| } | } | ||||
| }, this) | }, this) |
| </view> | </view> | ||||
| </view> | </view> | ||||
| <scroll-view class="scrollY" scroll-y="true"> | |||||
| <view class="lookView"> | |||||
| <button plain="true" size="mini" class="lookCode">点击查看二维码</button> | |||||
| </view> | |||||
| <!-- <scroll-view class="scrollY" scroll-y="true"> | |||||
| <view class="history" wx:for="{{ticketStateArr}}"> | <view class="history" wx:for="{{ticketStateArr}}"> | ||||
| <view class="historyLeft"> | <view class="historyLeft"> | ||||
| <image class="historyTicketBg" src="../images/historyTicketBg.png"></image> | <image class="historyTicketBg" src="../images/historyTicketBg.png"></image> | ||||
| <view class="tickType" wx:if="{{item.coupon_state==2}}">已使用</view> | <view class="tickType" wx:if="{{item.coupon_state==2}}">已使用</view> | ||||
| <view class="tickType" wx:if="{{item.coupon_state==3}}">锁定</view> | <view class="tickType" wx:if="{{item.coupon_state==3}}">锁定</view> | ||||
| </view> | </view> | ||||
| </scroll-view> | |||||
| </scroll-view> --> | |||||
| </view> | </view> |
| width: 613rpx; | width: 613rpx; | ||||
| margin-left: 69rpx; | margin-left: 69rpx; | ||||
| } | } | ||||
| .scrollY{ | |||||
| .lookView{ | |||||
| width: 100%; | |||||
| text-align: center; | |||||
| margin-top: 100rpx; | |||||
| } | |||||
| /* .scrollY{ | |||||
| height: 200rpx; | height: 200rpx; | ||||
| margin-top: 107rpx; | margin-top: 107rpx; | ||||
| } | } | ||||
| font-family:SourceHanSansCN; | font-family:SourceHanSansCN; | ||||
| font-weight:bold; | font-weight:bold; | ||||
| color:rgba(235,97,0,1); | color:rgba(235,97,0,1); | ||||
| } | |||||
| } */ |
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| console.log(options) | console.log(options) | ||||
| this.getTicketUser(options.index) | |||||
| this.getTicketUser(options.index,1) | |||||
| }, | }, | ||||
| getTicketUser:function(index){//获取优惠券信息 | |||||
| app.wxRequest(app.globalData.httpUrl + 'couponsell/detail/' + index, {}, e => { | |||||
| getTicketUser:function(index,from){//获取优惠券信息 | |||||
| app.wxRequest(app.globalData.httpUrl + 'couponsell/detail', { coupon_sell_id: index, from: from}, e => { | |||||
| console.log(e) | console.log(e) | ||||
| if (e.code == 200) { | if (e.code == 200) { | ||||
| this.setData({ | this.setData({ | ||||
| }, | }, | ||||
| addFn:function(){ | addFn:function(){ | ||||
| if (this.data.num<5){ | |||||
| // if (this.data.num<5){ | |||||
| this.data.num++; | this.data.num++; | ||||
| this.setData({ | this.setData({ | ||||
| buyNumber: this.data.num | buyNumber: this.data.num | ||||
| }) | }) | ||||
| } | |||||
| // } | |||||
| }, | }, | ||||
| subtractFn:function(){ | subtractFn:function(){ | ||||
| if (this.data.num > 1) { | if (this.data.num > 1) { |
| // pages/givePage/givePage.js | // pages/givePage/givePage.js | ||||
| const app = getApp() | |||||
| Page({ | Page({ | ||||
| /** | /** | ||||
| buyNumber: 1, | buyNumber: 1, | ||||
| ticketNum: 1, | ticketNum: 1, | ||||
| ticketUser: [],//优惠券信息 | ticketUser: [],//优惠券信息 | ||||
| getBackData:"",//赠送回传字段 | |||||
| surplusNum:0,//剩余张数 | |||||
| yesMask:false,//提示赠送弹框 | |||||
| shareId:"",//获取用户标识 | |||||
| sellId:"",//优惠券券码 | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| var dataArr = JSON.parse(options.dataArr); | |||||
| console.log(dataArr) | |||||
| this.setData({ | |||||
| ticketUser: dataArr | |||||
| }) | |||||
| console.log(options.id) | |||||
| this.data.sellId = options.id; | |||||
| this.getTicketUser(options.id,2) | |||||
| }, | |||||
| getTicketUser: function (id, from) {//获取优惠券信息 | |||||
| app.wxRequest(app.globalData.httpUrl + 'couponsell/detail', { coupon_sell_id: id, from: from }, e => { | |||||
| console.log(e) | |||||
| if (e.code == 200) { | |||||
| this.setData({ | |||||
| ticketUser: e.data, | |||||
| surplusNum:e.data.num, | |||||
| shareId: e.data.present_id | |||||
| }) | |||||
| } | |||||
| }, this) | |||||
| }, | }, | ||||
| /** | /** | ||||
| /** | /** | ||||
| * 用户点击右上角分享 | * 用户点击右上角分享 | ||||
| */ | */ | ||||
| onShareAppMessage: function () { | |||||
| onShareAppMessage: function (options) { | |||||
| var shareUrl = "";//分享指定路径 | |||||
| if (options.from === "button"){ | |||||
| shareUrl = '/pages/receiveTicket/receiveTicket?shareId=' + this.data.shareId + "&number=" + this.data.buyNumber | |||||
| } | |||||
| return{ | |||||
| title:"赠送给好友", | |||||
| imageUrl: this.data.ticketUser.coupon_img_small, | |||||
| path: shareUrl, | |||||
| success: res=> { | |||||
| console.log(res, "转发成功") | |||||
| }, | |||||
| } | |||||
| }, | }, | ||||
| addFn: function () { | addFn: function () { | ||||
| if (this.data.ticketNum < this.data.ticketUser.num) { | if (this.data.ticketNum < this.data.ticketUser.num) { |
| <view class="line"></view> | <view class="line"></view> | ||||
| <view class="lineRig"> | <view class="lineRig"> | ||||
| <text class="surplus">剩余</text> | <text class="surplus">剩余</text> | ||||
| <text class="bigWord">{{ticketUser.num}}</text> | |||||
| <text class="bigWord">{{surplusNum}}</text> | |||||
| <text class="smaWord">张</text> | <text class="smaWord">张</text> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <image class="giveBtn" src="../images/giveBtn.jpg"></image> | |||||
| <button class="shareBtn" open-type = "share"> | |||||
| <image class="giveBtn" src="../images/giveBtn.jpg"></image> | |||||
| </button> | |||||
| </view> | </view> |
| /* pages/givePage/givePage.wxss */ | /* pages/givePage/givePage.wxss */ | ||||
| page{ | |||||
| height: 100%; | |||||
| } | |||||
| .all{ | |||||
| height: 100%; | |||||
| } | |||||
| .ticketImg{ | .ticketImg{ | ||||
| width: 100%; | width: 100%; | ||||
| height: 472rpx; | height: 472rpx; | ||||
| .giveBtn{ | .giveBtn{ | ||||
| width: 100%; | width: 100%; | ||||
| height: 98rpx; | height: 98rpx; | ||||
| } | |||||
| .shareBtn{ | |||||
| width: 100%; | |||||
| height: 98rpx; | |||||
| margin-top: 12rpx; | margin-top: 12rpx; | ||||
| padding: 0; | |||||
| border-radius: 0; | |||||
| } | } |
| mydeg: -90, | mydeg: -90, | ||||
| historydeg: -90, | historydeg: -90, | ||||
| historyArr: [],//优惠券使用记录列表 | historyArr: [],//优惠券使用记录列表 | ||||
| myTicketArr: [],//我的优惠券列表 | |||||
| myTicketArr: [ | |||||
| // { "coupon_img_small": "../images/smallTicket.jpg", "coupon_sell_id": 1, "coupon_name": "哈哈哈", "coupon_memo": "嘻嘻嘻","end_date":"2020/3/5"}, | |||||
| // { "coupon_img_small": "../images/smallTicket.jpg", "coupon_sell_id": 1, "coupon_name": "哈哈哈", "coupon_memo": "嘻嘻嘻", "end_date": "2020/3/5" }, | |||||
| // { "coupon_img_small": "../images/smallTicket.jpg", "coupon_sell_id": 1, "coupon_name": "哈哈哈", "coupon_memo": "嘻嘻嘻", "end_date": "2020/3/5" }, | |||||
| // { "coupon_img_small": "../images/smallTicket.jpg", "coupon_sell_id": 1, "coupon_name": "哈哈哈", "coupon_memo": "嘻嘻嘻", "end_date": "2020/3/5" }, | |||||
| // { "coupon_img_small": "../images/smallTicket.jpg", "coupon_sell_id": 1, "coupon_name": "哈哈哈", "coupon_memo": "嘻嘻嘻", "end_date": "2020/3/5" }, | |||||
| ],//我的优惠券列表 | |||||
| }, | }, | ||||
| /** | /** | ||||
| this.historyTicket(); | this.historyTicket(); | ||||
| }, | }, | ||||
| myTicket:function(){//获取我的优惠券列表 | myTicket:function(){//获取我的优惠券列表 | ||||
| app.wxRequest(app.globalData.httpUrl + 'couponbuy/buytype', {}, e => { | |||||
| app.wxRequest(app.globalData.httpUrl + 'couponbuy/validtype', {}, e => { | |||||
| console.log(e) | console.log(e) | ||||
| if (e.code == 200) { | if (e.code == 200) { | ||||
| this.setData({ | this.setData({ | ||||
| } | } | ||||
| }, this) | }, this) | ||||
| }, | }, | ||||
| lower:function(){//检测上拉是否到底 | |||||
| console.log("到底了") | |||||
| }, | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| }, | }, | ||||
| lookTicket: function (e) {//查看优惠券 | lookTicket: function (e) {//查看优惠券 | ||||
| console.log(e) | console.log(e) | ||||
| console.log(this.data.myTicketArr) | |||||
| var index = e.currentTarget.dataset.index; | |||||
| var dataArr = this.data.myTicketArr[index]; | |||||
| dataArr = JSON.stringify(dataArr); | |||||
| console.log(dataArr) | |||||
| var id = e.currentTarget.dataset.id; | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '../TicketDetails/TicketDetails?dataArr=' + dataArr, | |||||
| url: '../TicketDetails/TicketDetails?id=' + id, | |||||
| }) | }) | ||||
| }, | }, | ||||
| giveTicket:function(e){//赠送优惠券 | giveTicket:function(e){//赠送优惠券 | ||||
| var index = e.target.dataset.index; | |||||
| var dataArr = this.data.myTicketArr[index]; | |||||
| dataArr = JSON.stringify(dataArr); | |||||
| console.log(dataArr) | |||||
| var id = e.target.dataset.id; | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '../givePage/givePage?dataArr=' + dataArr, | |||||
| url: '../givePage/givePage?id=' + id, | |||||
| }) | }) | ||||
| }, | }, | ||||
| getUser:function(e){//点击登陆获取用户信息 | getUser:function(e){//点击登陆获取用户信息 |
| <image style="transform:rotate({{mydeg}}deg)" class="ticketArrows" src="../images/ticketArrows.png"></image> | <image style="transform:rotate({{mydeg}}deg)" class="ticketArrows" src="../images/ticketArrows.png"></image> | ||||
| </view> | </view> | ||||
| <scroll-view class="scrollY1" scroll-y="true" wx:if="{{myTicketArrows}}"> | |||||
| <scroll-view class="scrollY1" scroll-y="true" wx:if="{{myTicketArrows}}" bindscrolltolower="lower"> | |||||
| <view class="contAll" wx:for="{{myTicketArr}}"> | <view class="contAll" wx:for="{{myTicketArr}}"> | ||||
| <view class="ticketCont"> | |||||
| <view class="ticketCont" bindtap="lookTicket" data-id = "{{item.coupon_sell_id}}"> | |||||
| <view class="ticketImg"> | <view class="ticketImg"> | ||||
| <image class="ticketImg" src="{{item.coupon_img_small}}"></image> | <image class="ticketImg" src="{{item.coupon_img_small}}"></image> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="look"> | <view class="look"> | ||||
| <view bindtap="lookTicket" data-index = "{{index}}" class="clickLook">点击查看券码</view> | |||||
| <image bindtap="giveTicket" class="giveFrinedBtn" data-index = "{{index}}" src="../images/giveFrinedBtn.png"></image> | |||||
| <!-- <view bindtap="lookTicket" data-index = "{{index}}" class="clickLook">点击查看券码</view> --> | |||||
| <image bindtap="giveTicket" class="giveFrinedBtn" data-id = "{{item.coupon_sell_id}}" src="../images/giveFrinedBtn.png"></image> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </scroll-view> | </scroll-view> |
| color:rgba(153,153,153,1); | color:rgba(153,153,153,1); | ||||
| } | } | ||||
| .look{ | .look{ | ||||
| display: flex; | |||||
| /* display: flex; | |||||
| justify-content: space-between; | justify-content: space-between; | ||||
| align-items: center; | |||||
| align-items: center;*/ | |||||
| margin-top: 41rpx; | margin-top: 41rpx; | ||||
| margin-bottom: 33rpx; | |||||
| margin-bottom: 33rpx; | |||||
| } | } | ||||
| .giveFrinedBtn{ | .giveFrinedBtn{ | ||||
| width: 240rpx; | width: 240rpx; | ||||
| height: 64rpx; | height: 64rpx; | ||||
| float: right; | |||||
| } | } | ||||
| .clickLook{ | .clickLook{ | ||||
| font-size:30rpx; | font-size:30rpx; |
| // pages/receiveTicket/receiveTicket.js | |||||
| const app = getApp(); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| yesGet: true,//是否被领取 | |||||
| ticketUser:[],//优惠券信息 | |||||
| titleWord:"", | |||||
| presentId:"",//接受的id | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| app.globalData.present_id = options.shareId; | |||||
| this.data.presentId = options.shareId; | |||||
| app.globalData.number = options.number; | |||||
| this.getTicketUser(options.shareId, options.number); | |||||
| // wx.showToast({ | |||||
| // title: options.number, | |||||
| // duration:2000 | |||||
| // }) | |||||
| }, | |||||
| getTicketUser: function (id,number) {//获取优惠券信息 | |||||
| app.wxRequest(app.globalData.httpUrl + 'couponbuy/presentstate', { present_id: id, present_num: number }, e => { | |||||
| console.log(e) | |||||
| if (e.code == 201) { | |||||
| this.setData({ | |||||
| ticketUser: e.data, | |||||
| yesGet: true | |||||
| }) | |||||
| } else if (e.code == 202){ | |||||
| this.setData({ | |||||
| yesGet: false, | |||||
| titleWord:"此券已被领取" | |||||
| }) | |||||
| } else if (e.code == 203){ | |||||
| this.setData({ | |||||
| yesGet: false, | |||||
| titleWord: "此券已失效" | |||||
| }) | |||||
| } else if (e.code == -201) { | |||||
| this.setData({ | |||||
| yesGet: false, | |||||
| titleWord: "没有相关赠送记录" | |||||
| }) | |||||
| } else if (e.code == 204) { | |||||
| this.setData({ | |||||
| yesGet: false, | |||||
| titleWord: "赠送优惠券不足,无法领取" | |||||
| }) | |||||
| } else if (e.code == 205) { | |||||
| this.setData({ | |||||
| yesGet: false, | |||||
| titleWord: "优惠券超限,无法领取" | |||||
| }) | |||||
| } | |||||
| }, this) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function () { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function () { | |||||
| }, | |||||
| // "p1583395285z86" | |||||
| getTicketFn:function(){//点击领取优惠券 | |||||
| var id = this.data.presentId; | |||||
| app.wxRequest(app.globalData.httpUrl + 'couponbuy/receive', { present_id: id }, e => { | |||||
| console.log(e) | |||||
| if (e.code == 200) { | |||||
| wx.showToast({ | |||||
| title: '领取成功', | |||||
| duration:500 | |||||
| }) | |||||
| setTimeout(()=>{ | |||||
| wx.switchTab({ | |||||
| url: '/pages/index/index' | |||||
| }) | |||||
| },500) | |||||
| } else if (e.code == -201) {//用户未注册 | |||||
| console.log(e.message) | |||||
| } else if (e.code == -202) {//没有相应赠品记录 | |||||
| console.log(e.message) | |||||
| }else if (e.code == -203){//无法领取自己的优惠券 | |||||
| console.log(e.message) | |||||
| wx.showToast({ | |||||
| title: '领取失败', | |||||
| duration: 500 | |||||
| }) | |||||
| } else if (e.code == -204) {//赠送优惠券已领取 | |||||
| console.log(e.message) | |||||
| } else if (e.code == -205) {//优惠券已失效 | |||||
| console.log(e.message) | |||||
| wx.showToast({ | |||||
| title: '优惠券已失效', | |||||
| duration: 500 | |||||
| }) | |||||
| } | |||||
| }, this,"POST") | |||||
| }, | |||||
| backIndex:function(){//优惠券已被领取,点击确定返回首页 | |||||
| }, | |||||
| }) |
| { | |||||
| "usingComponents": {}, | |||||
| "navigationBarTitleText": "领取优惠券" | |||||
| } |
| <!--pages/receiveTicket/receiveTicket.wxml--> | |||||
| <image class="getBg" src="../images/getBg.png"></image> | |||||
| <view class="all" wx:if="{{yesGet}}"> | |||||
| <view class="content"> | |||||
| <view class="userName">你的好友{{ticketUser.nickname}}</view> | |||||
| <view class="userPhone">{{ticketUser.user_phone}}</view> | |||||
| <view class="giveTo">赠送给您</view> | |||||
| <view class="giveNum"> | |||||
| <text class="textNum">{{ticketUser.count}}</text> | |||||
| <text class="text">张</text> | |||||
| </view> | |||||
| <view class="ticketType">{{ticketUser.coupon_type}}</view> | |||||
| <view class="line"></view> | |||||
| </view> | |||||
| <view class="contBot"> | |||||
| <view class="picView"> | |||||
| <image class="smallTicket" src="{{ticketUser.coupon_img_small}}"></image> | |||||
| </view> | |||||
| <view class="textView"> | |||||
| <text class="nameText">{{ticketUser.coupon_name}}</text> | |||||
| <text class="timeText">{{ticketUser.coupon_memo}}</text> | |||||
| <text class="timeText">(有效期:{{ticketUser.end_date}})</text> | |||||
| </view> | |||||
| </view> | |||||
| <image bindtap="getTicketFn" class="getTicket" src="../images/getTicket.png"></image> | |||||
| </view> | |||||
| <view wx:if="{{!yesGet}}"> | |||||
| <view class="ticketState">{{titleWord}}</view> | |||||
| <view class="question">如有疑问请联系</view> | |||||
| <view class="wx">{{ticketUser.nickname}}</view> | |||||
| <view class="phone">{{ticketUser.user_phone}}</view> | |||||
| <image bindtap="backIndex" class="sureTicket" src="../images/sureTicket.png"></image> | |||||
| </view> |
| /* pages/receiveTicket/receiveTicket.wxss */ | |||||
| page{ | |||||
| height:100%; | |||||
| position: fixed; | |||||
| } | |||||
| .all{ | |||||
| width: 100%; | |||||
| height:100%; | |||||
| } | |||||
| .getBg{ | |||||
| width: 700rpx; | |||||
| height: 846rpx; | |||||
| position: absolute; | |||||
| left: 50%; | |||||
| top: 10%; | |||||
| transform: translateX(-50%); | |||||
| z-index: 9; | |||||
| } | |||||
| .userName{ | |||||
| text-align: center; | |||||
| font-size:40rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:500; | |||||
| color:rgba(0,0,0,1); | |||||
| } | |||||
| .userPhone{ | |||||
| text-align: center; | |||||
| font-size:24rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:500; | |||||
| color:rgba(153,153,153,1); | |||||
| margin-top: 10rpx; | |||||
| margin-bottom: 20rpx; | |||||
| } | |||||
| .giveTo{ | |||||
| text-align: center; | |||||
| font-size:30rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:bold; | |||||
| color:rgba(0,0,0,1); | |||||
| } | |||||
| .giveNum{ | |||||
| text-align: center; | |||||
| } | |||||
| .ticketType{ | |||||
| text-align: center; | |||||
| font-size:40rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:500; | |||||
| color:rgba(51,51,51,1); | |||||
| } | |||||
| .textNum{ | |||||
| font-size:80rpx; | |||||
| font-family:DINPro; | |||||
| font-weight:500; | |||||
| color:rgba(235,97,0,1); | |||||
| } | |||||
| .text{ | |||||
| font-size:30rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:500; | |||||
| color:rgba(51,51,51,1); | |||||
| } | |||||
| .content{ | |||||
| margin-top: 220rpx; | |||||
| } | |||||
| .picView{ | |||||
| width: 248rpx; | |||||
| height: 248rpx; | |||||
| border-radius: 10rpx; | |||||
| overflow: hidden; | |||||
| } | |||||
| .smallTicket{ | |||||
| width: 248rpx; | |||||
| height: 248rpx; | |||||
| } | |||||
| .contBot{ | |||||
| display: flex; | |||||
| justify-content: center; | |||||
| align-items: center; | |||||
| margin-top: 80rpx; | |||||
| } | |||||
| .textView{ | |||||
| width: 318rpx; | |||||
| height: 248rpx; | |||||
| padding-left: 33rpx; | |||||
| } | |||||
| .textView text{ | |||||
| display: block; | |||||
| } | |||||
| .nameText{ | |||||
| font-size:60rpx; | |||||
| font-family:DINPro; | |||||
| font-weight:bold; | |||||
| color:rgba(106,10,14,1); | |||||
| margin-top: 42rpx; | |||||
| margin-bottom: 25rpx | |||||
| } | |||||
| .timeText{ | |||||
| font-size:20rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:300; | |||||
| color:rgba(153,153,153,1); | |||||
| } | |||||
| .getTicket{ | |||||
| display: block; | |||||
| width: 670rpx; | |||||
| height: 98rpx; | |||||
| margin: 180rpx auto 0 auto; | |||||
| } | |||||
| .ticketState{ | |||||
| margin-top: 380rpx; | |||||
| margin-bottom: 203rpx; | |||||
| text-align: center; | |||||
| font-size:60rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:500; | |||||
| color:rgba(0,0,0,1); | |||||
| } | |||||
| .question{ | |||||
| text-align: center; | |||||
| font-size:30rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:500; | |||||
| color:rgba(102,102,102,1); | |||||
| } | |||||
| .wx{ | |||||
| text-align: center; | |||||
| font-size:24rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:500; | |||||
| color:rgba(153,153,153,1); | |||||
| } | |||||
| .phone{ | |||||
| text-align: center; | |||||
| font-size:30rpx; | |||||
| font-family:SourceHanSansCN; | |||||
| font-weight:500; | |||||
| color:rgba(102,102,102,1); | |||||
| } | |||||
| .sureTicket{ | |||||
| display: block; | |||||
| width: 670rpx; | |||||
| height: 98rpx; | |||||
| margin: 310rpx auto 0 auto; | |||||
| } |
| duration: 500 | duration: 500 | ||||
| }) | }) | ||||
| setTimeout(function () { | setTimeout(function () { | ||||
| wx.switchTab({ | |||||
| url: '../index/index' | |||||
| }) | |||||
| if (app.globalData.present_id){ | |||||
| wx.switchTab({ | |||||
| url: '/pages/receiveTicket/receiveTicket?shareId=' + app.globalData.present_id + "&number=" + app.globalData.number | |||||
| }) | |||||
| } else { | |||||
| wx.switchTab({ | |||||
| url: '../index/index' | |||||
| }) | |||||
| } | |||||
| }, 1000) | }, 1000) | ||||
| } | } | ||||
| }, this,"POST") | }, this,"POST") |
| "pathName": "pages/register/register", | "pathName": "pages/register/register", | ||||
| "query": "", | "query": "", | ||||
| "scene": null | "scene": null | ||||
| }, | |||||
| { | |||||
| "id": 0, | |||||
| "name": "领取优惠券", | |||||
| "pathName": "pages/receiveTicket/receiveTicket", | |||||
| "query": "", | |||||
| "scene": null | |||||
| } | } | ||||
| ] | ] | ||||
| } | } |