| @@ -1,97 +1,105 @@ | |||
| @import 'weui.wxss'; | |||
| @import "weui.wxss"; | |||
| @font-face { | |||
| font-family: 'iconfont'; /* project id 777313 */ | |||
| src: url('//at.alicdn.com/t/font_777313_jq7td4d3uab.eot'); | |||
| src: url('//at.alicdn.com/t/font_777313_jq7td4d3uab.eot?#iefix') format('embedded-opentype'), | |||
| url('//at.alicdn.com/t/font_777313_jq7td4d3uab.woff') format('woff'), | |||
| url('//at.alicdn.com/t/font_777313_jq7td4d3uab.ttf') format('truetype'), | |||
| url('//at.alicdn.com/t/font_777313_jq7td4d3uab.svg#iconfont') format('svg'); | |||
| } | |||
| font-family: "iconfont"; /* project id 777313 */ | |||
| src: url("//at.alicdn.com/t/font_777313_jq7td4d3uab.eot"); | |||
| src: url("//at.alicdn.com/t/font_777313_jq7td4d3uab.eot?#iefix") | |||
| format("embedded-opentype"), | |||
| url("//at.alicdn.com/t/font_777313_jq7td4d3uab.woff") format("woff"), | |||
| url("//at.alicdn.com/t/font_777313_jq7td4d3uab.ttf") format("truetype"), | |||
| url("//at.alicdn.com/t/font_777313_jq7td4d3uab.svg#iconfont") format("svg"); | |||
| } | |||
| .iconfont { | |||
| font-family: "iconfont" !important; | |||
| font-size: 36rpx; | |||
| font-style: normal; | |||
| -webkit-font-smoothing: antialiased; | |||
| -webkit-text-stroke-width: 0.2rpx; | |||
| -moz-osx-font-smoothing: grayscale; | |||
| font-family: "iconfont" !important; | |||
| font-size: 36rpx; | |||
| font-style: normal; | |||
| -webkit-font-smoothing: antialiased; | |||
| -webkit-text-stroke-width: 0.2rpx; | |||
| -moz-osx-font-smoothing: grayscale; | |||
| } | |||
| /* 定位 */ | |||
| .icon-dingweib:before { content: "\e652"; } | |||
| .icon-dingweib:before { | |||
| content: "\e652"; | |||
| } | |||
| /* 三角 */ | |||
| .icon-choose:before { content: "\e601"; } | |||
| .icon-choose:before { | |||
| content: "\e601"; | |||
| } | |||
| /* 右箭头 */ | |||
| .icon-right:before { content: "\e612"; } | |||
| .icon-right:before { | |||
| content: "\e612"; | |||
| } | |||
| /* 边框 */ | |||
| .app-border-top, | |||
| .app-border-bottom { | |||
| position: relative; | |||
| width: 100%; | |||
| position: relative; | |||
| width: 100%; | |||
| } | |||
| .app-border-top::after, | |||
| .app-border-bottom::after { | |||
| content: ''; | |||
| position: absolute; | |||
| background-color: #ddd; | |||
| display: block !important; | |||
| z-index: 1; | |||
| top: auto; | |||
| right: auto; | |||
| width: 100%; | |||
| height: 1rpx; | |||
| transform-origin: 50% 100%; | |||
| transform: scaleY(0.5); | |||
| content: ""; | |||
| position: absolute; | |||
| background-color: #ddd; | |||
| display: block !important; | |||
| z-index: 1; | |||
| top: auto; | |||
| right: auto; | |||
| width: 100%; | |||
| height: 1rpx; | |||
| transform-origin: 50% 100%; | |||
| transform: scaleY(0.5); | |||
| } | |||
| .app-border-top:last-child:after, | |||
| .app-border-bottom:last-child::after { | |||
| display: none !important; | |||
| display: none !important; | |||
| } | |||
| .app-border-top::after { | |||
| top: 0; | |||
| top: 0; | |||
| } | |||
| .app-border-bottom::after { | |||
| bottom: 0; | |||
| bottom: 0; | |||
| } | |||
| .app-border-left, | |||
| .app-border-right { | |||
| position: relative; | |||
| height: 100%; | |||
| position: relative; | |||
| height: 100%; | |||
| } | |||
| .app-border-left::before, | |||
| .app-border-right::before { | |||
| content: ''; | |||
| position: absolute; | |||
| background-color: #ddd; | |||
| display: block; | |||
| z-index: 1; | |||
| top: 0; | |||
| bottom: 0; | |||
| height: 100%; | |||
| width: 1rpx; | |||
| transform-origin: 50% 100%; | |||
| transform: scaleX(0.5); | |||
| content: ""; | |||
| position: absolute; | |||
| background-color: #ddd; | |||
| display: block; | |||
| z-index: 1; | |||
| top: 0; | |||
| bottom: 0; | |||
| height: 100%; | |||
| width: 1rpx; | |||
| transform-origin: 50% 100%; | |||
| transform: scaleX(0.5); | |||
| } | |||
| .app-border-left::before { | |||
| left: 0; | |||
| left: 0; | |||
| } | |||
| .app-border-right::before { | |||
| right: 0; | |||
| right: 0; | |||
| } | |||
| view{ | |||
| font-family: PingFangSC-Semibold; | |||
| view, | |||
| text { | |||
| font-family: PingFangSC-Semibold; | |||
| } | |||
| page{ | |||
| page { | |||
| width: 100%; | |||
| height: 100%; | |||
| font-weight: 400; | |||
| } | |||
| @@ -1 +0,0 @@ | |||
| <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cbc8c2" d="M22.311657 420.524612c-10.023284 8.991792-17.588587 22.285562-17.588587 37.752836 0 27.185152 22.001083 49.212842 49.155537 49.212842l98.397031 0 0 467.197608c0 27.213805 22.00006 49.15656 49.155537 49.15656l163.104775 0c27.127847 0 49.15349-21.971407 49.15349-49.15656l0-196.72857 196.708104 0 0 196.72857c0 27.185152 21.912056 49.15656 49.127907 49.15656l163.073052 0c27.158547 0 49.157583-21.942755 49.157583-49.15656l0-467.197608 98.367355 0c27.211758 0 49.154513-22.026666 49.154513-49.212842 0-15.46625-7.504928-28.760021-18.822694-37.752836-168.776961-142.224212-488.427118-420.36907-488.427118-420.36907S192.293049 278.3004 22.311657 420.524612zM432.279842 64.149019" /></svg> | |||
| @@ -1 +0,0 @@ | |||
| <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#0ac4ff" d="M22.311657 420.524612c-10.023284 8.991792-17.588587 22.285562-17.588587 37.752836 0 27.185152 22.001083 49.212842 49.155537 49.212842l98.397031 0 0 467.197608c0 27.213805 22.00006 49.15656 49.155537 49.15656l163.104775 0c27.127847 0 49.15349-21.971407 49.15349-49.15656l0-196.72857 196.708104 0 0 196.72857c0 27.185152 21.912056 49.15656 49.127907 49.15656l163.073052 0c27.158547 0 49.157583-21.942755 49.157583-49.15656l0-467.197608 98.367355 0c27.211758 0 49.154513-22.026666 49.154513-49.212842 0-15.46625-7.504928-28.760021-18.822694-37.752836-168.776961-142.224212-488.427118-420.36907-488.427118-420.36907S192.293049 278.3004 22.311657 420.524612zM432.279842 64.149019" /></svg> | |||
| @@ -1 +0,0 @@ | |||
| <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#cbc8c2" d="M512 535.272727c141.963636 0 256-114.036364 256-256S730.763636 0 512 0c-214.109091 0-256 137.309091-256 279.272727s114.036364 256 256 256z m232.727273 23.272728H279.272727C151.272727 558.545455 46.545455 663.272727 46.545455 791.272727s104.727273 232.727273 232.727272 232.727273h465.454546c128 0 232.727273-104.727273 232.727272-232.727273s-104.727273-232.727273-232.727272-232.727272z" /></svg> | |||
| @@ -1 +0,0 @@ | |||
| <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#0ac4ff" d="M512 535.272727c141.963636 0 256-114.036364 256-256S730.763636 0 512 0c-214.109091 0-256 137.309091-256 279.272727s114.036364 256 256 256z m232.727273 23.272728H279.272727C151.272727 558.545455 46.545455 663.272727 46.545455 791.272727s104.727273 232.727273 232.727272 232.727273h465.454546c128 0 232.727273-104.727273 232.727272-232.727273s-104.727273-232.727273-232.727272-232.727272z" /></svg> | |||
| @@ -19,12 +19,14 @@ | |||
| width: 248rpx; | |||
| height: 184rpx; | |||
| overflow: hidden; | |||
| border-radius: 10rpx; | |||
| border: 1px solid #f8f8f8; | |||
| border-radius: 10rpx; | |||
| } | |||
| .coupons-img image { | |||
| width: 100%; | |||
| height: 100%; | |||
| border-radius: 10rpx; | |||
| } | |||
| .coupons-info { | |||
| @@ -32,8 +34,8 @@ | |||
| } | |||
| .coupons-info-name { | |||
| font-size: 28rpx; | |||
| color: #000000; | |||
| font-size: 30rpx; | |||
| color: #343434; | |||
| letter-spacing: 0; | |||
| line-height: 38rpx; | |||
| } | |||
| @@ -41,7 +43,7 @@ | |||
| padding: 32rpx 0 0; | |||
| } | |||
| .i{ | |||
| font-size: 20rpx; | |||
| font-size: 24rpx; | |||
| font-style: normal; | |||
| } | |||
| .coupons-info-price-p { | |||
| @@ -49,14 +51,17 @@ | |||
| font-size: 36rpx; | |||
| color: #f96563; | |||
| line-height: 50rpx; | |||
| font-weight: 600; | |||
| } | |||
| .tit{ | |||
| margin-top: 32rpx; | |||
| margin-top: 14rpx; | |||
| overflow: hidden; | |||
| white-space: nowrap; | |||
| text-overflow: ellipsis; | |||
| width: 300rpx; | |||
| height: 40rpx; | |||
| font-weight:600; | |||
| font-size: 30rpx; | |||
| } | |||
| .coupons-info-price-o { | |||
| display: block; | |||
| @@ -103,18 +108,19 @@ | |||
| line-height: 50rpx !important; | |||
| } | |||
| .subtitle { | |||
| font-size: 22rpx; | |||
| color: #333; | |||
| font-weight: 100; | |||
| font-size: 24rpx; | |||
| color: #6f6f6f; | |||
| text-align: left; | |||
| overflow: hidden; | |||
| overflow: hidden; | |||
| white-space: nowrap; | |||
| text-overflow: ellipsis; | |||
| width: 300rpx; | |||
| height: 40rpx; | |||
| margin-top: 8rpx; | |||
| } | |||
| .coupons-info-manjian { | |||
| color: #fa7c7a; | |||
| color: #6f6f6f!important; | |||
| font-weight: normal; | |||
| font-size: 20rpx; | |||
| line-height: 34rpx; | |||
| display: inline-block; | |||
| @@ -132,6 +132,14 @@ Page({ | |||
| console.log(that.data.couponChannelId); | |||
| console.log(that.data.couponId); | |||
| console.log("我即将要跳转到用户手机号授权的页面"); | |||
| if (err.code == "3000") { | |||
| wx.showToast({ | |||
| title: "库存不足", | |||
| image: "./../../../assets/img/fail.png", | |||
| duration: 2000, | |||
| mask: false | |||
| }); | |||
| } | |||
| if (err.code == "3001") { | |||
| wx.showToast({ | |||
| title: "领取达到上限", | |||
| @@ -164,6 +172,7 @@ Page({ | |||
| mask: false | |||
| }); | |||
| } | |||
| if (err.code == "4003") { | |||
| wx.showToast({ | |||
| title: "卡券已作废", | |||
| @@ -237,10 +246,21 @@ Page({ | |||
| image: "./../../../assets/img/success.png", | |||
| duration: 2000, | |||
| mask: false, | |||
| success:function(){ | |||
| wx.redirectTo({ | |||
| url: `/pages/order/detail/index?orderId=${that.data.orderId}`, | |||
| }) | |||
| success: function() { | |||
| wx.showLoading({ | |||
| title: "加载中..." | |||
| }); | |||
| setTimeout(function() { | |||
| wx.hideLoading(); | |||
| }, 1600); | |||
| setTimeout(() => { | |||
| wx.redirectTo({ | |||
| url: `/pages/order/detail/index?orderId=${ | |||
| that.data.orderId | |||
| }` | |||
| }); | |||
| }, 1600); | |||
| } | |||
| }); | |||
| @@ -7,7 +7,8 @@ | |||
| <view class='coupons_info'> | |||
| <view> | |||
| <text>{{data.title}}<text>限购{{data.useLimitQuantity}}件</text></text> | |||
| <text wx:if="{{data.endTime!=undefined}}">剩余时间:<text>{{endtime}}</text></text> | |||
| <text wx:if="{{data.endTime!=undefined&&data.type!=5}}">剩余时间:<text>{{endtime}}</text></text> | |||
| <text wx:if="{{data.type==5}}"><text>当次有效</text></text> | |||
| <text>剩余件数:<text>{{data.remainInventory}}件</text></text> | |||
| </view> | |||
| <view> | |||
| @@ -170,9 +170,9 @@ | |||
| } | |||
| .notes view:nth-child(2)>text { | |||
| font-size: 28rpx; | |||
| font-size: 26rpx; | |||
| color: #a9a9a9; | |||
| line-height: 56rpx; | |||
| line-height: 45rpx; | |||
| } | |||
| .spot { | |||
| @@ -1,6 +1,5 @@ | |||
| const format = require("../../../utils/util.js"); | |||
| const util = require("../../../utils/util.js"); | |||
| const config = require("../../../config/config.js"); | |||
| const app = getApp(); | |||
| const Http = require("../../../utils/HttpBasics"); | |||
| Page({ | |||
| data: { | |||
| @@ -70,10 +69,7 @@ Page({ | |||
| }).then(res => { | |||
| console.log(res); | |||
| res.data.list.map(file => { | |||
| file.expiredTime = format.formatTime( | |||
| file.expiredTime, | |||
| "yyyy-MM-dddd hh:mm:ss" | |||
| ); | |||
| file.expiredTime = util.fmtDate(file.expiredTime); | |||
| }); | |||
| console.log("姐姐的订单列表"); | |||
| setTimeout(function() { | |||
| @@ -20,6 +20,10 @@ Page({ | |||
| onLoad: function(options) { | |||
| var that = this; | |||
| var scene = decodeURIComponent(options.scene); | |||
| }, | |||
| onShow:function(){ | |||
| let that = this; | |||
| if (app.globalData.token && app.globalData.token != null) { | |||
| } else { | |||
| wx.login({ | |||
| @@ -1,5 +1,5 @@ | |||
| <view class="index-rushToBuy"> | |||
| <view class="index-rushToBuy-title">限时抢购<text bindtap="gotomore">查看更多></text></view> | |||
| <view class="index-rushToBuy-title">限时抢购<text bindtap="gotomore">查看更多</text></view> | |||
| <scroll-view scroll-x class="index-scroll-view"> | |||
| <view class="commodity" wx:for="{{list}}" wx:key="unique"> | |||
| <view bindtap="gotodetail" data-couponChannelId="{{item.id}}" data-couponId="{{item.couponId}}" data-targetAd="{{item.targetAd}}"> | |||
| @@ -25,10 +25,16 @@ Page({ | |||
| // 2 已过期 | |||
| // 3 已经退款 | |||
| console.log(e); | |||
| wx.navigateTo({ | |||
| url: `/pages/orderquanma/index?quancode=${e.currentTarget.dataset.quancode}&title=${e.currentTarget.dataset.title}&subtitle=${e.currentTarget.dataset.subtitle}&remark=${e.currentTarget.dataset.remark}&couponorderstatus=${e.currentTarget.dataset.couponorderstatus}`, | |||
| }) | |||
| url: `/pages/orderquanma/index?quancode=${ | |||
| e.currentTarget.dataset.quancode | |||
| }&title=${e.currentTarget.dataset.title}&subtitle=${ | |||
| e.currentTarget.dataset.subtitle | |||
| }&remark=${e.currentTarget.dataset.remark}&couponorderstatus=${ | |||
| e.currentTarget.dataset.couponorderstatus | |||
| }` | |||
| }); | |||
| console.log(e.currentTarget.dataset.quancode); | |||
| console.log(e.currentTarget.dataset.couponorderstatus); | |||
| }, | |||
| @@ -42,7 +48,7 @@ Page({ | |||
| this.setData({ | |||
| orderId: options.orderId | |||
| }) | |||
| }); | |||
| Http.get({ | |||
| url: config.api.orderDetail, | |||
| @@ -104,11 +110,22 @@ Page({ | |||
| title: "购买成功", | |||
| duration: 2000, | |||
| image: "./../../../assets/img/success.png", | |||
| mask:false, | |||
| success:function(){ | |||
| wx.redirectTo({ | |||
| url: `/pages/order/detail/index?orderId=${that.data.orderId}`, | |||
| }) | |||
| mask: false, | |||
| success: function() { | |||
| wx.showLoading({ | |||
| title: "加载中..." | |||
| }); | |||
| setTimeout(function() { | |||
| wx.hideLoading(); | |||
| }, 1600); | |||
| setTimeout(() => { | |||
| wx.redirectTo({ | |||
| url: `/pages/order/detail/index?orderId=${ | |||
| that.data.orderId | |||
| }` | |||
| }); | |||
| }, 1600); | |||
| } | |||
| }); | |||
| } | |||
| @@ -136,12 +153,13 @@ Page({ | |||
| }); | |||
| } else { | |||
| // 免费券 | |||
| that.payOrderUpdate(orderId, "0", 1) // 支付成功 | |||
| that | |||
| .payOrderUpdate(orderId, "0", 1) // 支付成功 | |||
| .then(res => { | |||
| wx.showToast({ | |||
| title: "支付成功", | |||
| duration: 2000, | |||
| image: "./../../../assets/img/success.png", | |||
| image: "./../../../assets/img/success.png" | |||
| }); | |||
| }); | |||
| } | |||
| @@ -152,14 +170,14 @@ Page({ | |||
| payOrderUpdate: (orderId, payOrderId, status, reason) => { | |||
| // 支付成功 | |||
| Http.post({ | |||
| url: config.api.payOrderUpdate, | |||
| data: { | |||
| payOrderId: payOrderId, | |||
| orderId: orderId, | |||
| status: status, | |||
| reason: reason | |||
| } | |||
| }) | |||
| url: config.api.payOrderUpdate, | |||
| data: { | |||
| payOrderId: payOrderId, | |||
| orderId: orderId, | |||
| status: status, | |||
| reason: reason | |||
| } | |||
| }) | |||
| .then(res => { | |||
| console.log("payOrderUpdate then", res); | |||
| // wx.showToast({ | |||
| @@ -206,4 +224,4 @@ Page({ | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function() {} | |||
| }); | |||
| }); | |||
| @@ -43,6 +43,7 @@ | |||
| display: flex; | |||
| justify-content: space-between; | |||
| padding: 0 4%; | |||
| margin-top: 8rpx; | |||
| } | |||
| .info { | |||
| @@ -50,7 +51,6 @@ | |||
| } | |||
| .info view:nth-child(1) { | |||
| margin-top: 20rpx; | |||
| margin-bottom: 15rpx; | |||
| } | |||
| @@ -59,7 +59,7 @@ | |||
| } | |||
| .info view:nth-child(1) text:nth-child(2) { | |||
| color: #ffae00; | |||
| color: #f96563; | |||
| font-size: 24rpx; | |||
| } | |||