From 3f7359d25f2f4bcd3553862f06e8cf73ed7ec57e Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Fri, 21 Dec 2018 15:17:06 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BC=98=E6=83=A0=E5=8D=A1=E4=BB=98=E6=AC=BE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 6 +- app.wxss | 6 + config/config.js | 12 +- pages/cardListDetail/cardListDetail.js | 2 - pages/cardorder/index/index.js | 43 ++++- pages/cardorder/index/index.wxml | 6 +- pages/coupon/detail/index.wxss | 2 +- pages/order/detail/index.wxml | 2 +- .../detail/index.js => scanPay/scanPay.js} | 19 +- pages/scanPay/scanPay.json | 3 + pages/scanPay/scanPay.wxml | 12 ++ pages/scanPay/scanPay.wxss | 43 +++++ pages/shop/detail/index.json | 6 - pages/shop/detail/index.wxml | 93 ---------- pages/shop/detail/index.wxss | 174 ------------------ pages/shop/index/index.js | 55 ------ pages/shop/index/index.json | 8 - pages/shop/index/index.wxml | 5 - pages/shop/index/index.wxss | 15 -- pages/user/index.wxml | 10 + pages/user/scoreHistory/index.js | 28 +++ pages/user/scoreHistory/index.json | 3 + pages/user/scoreHistory/index.wxml | 13 ++ pages/user/scoreHistory/index.wxss | 14 ++ 24 files changed, 193 insertions(+), 387 deletions(-) rename pages/{shop/detail/index.js => scanPay/scanPay.js} (95%) create mode 100644 pages/scanPay/scanPay.json create mode 100644 pages/scanPay/scanPay.wxml create mode 100644 pages/scanPay/scanPay.wxss delete mode 100644 pages/shop/detail/index.json delete mode 100644 pages/shop/detail/index.wxml delete mode 100644 pages/shop/detail/index.wxss delete mode 100644 pages/shop/index/index.js delete mode 100644 pages/shop/index/index.json delete mode 100644 pages/shop/index/index.wxml delete mode 100644 pages/shop/index/index.wxss create mode 100644 pages/user/scoreHistory/index.js create mode 100644 pages/user/scoreHistory/index.json create mode 100644 pages/user/scoreHistory/index.wxml create mode 100644 pages/user/scoreHistory/index.wxss diff --git a/app.json b/app.json index b650123..6ce0c09 100644 --- a/app.json +++ b/app.json @@ -10,9 +10,7 @@ "pages/market/index", "pages/user/index", "pages/coupon/detail/index", - "pages/shop/detail/index", "pages/rushToBuy/index", - "pages/shop/index/index", "pages/couponorder/index/index", "pages/couponorder/detail/index", "pages/cardorder/index/index", @@ -38,7 +36,9 @@ "pages/specialcourtesy/specialcourtesy", "pages/discountCardList/discountCardList", "pages/cardListDetail/cardListDetail", - "pages/freeBannerDetail/index" + "pages/freeBannerDetail/index", + "pages/user/scoreHistory/index", + "pages/scanPay/scanPay" ], "navigateToMiniProgramAppIdList": [ "wx192b7d2e8dcbefd0", diff --git a/app.wxss b/app.wxss index 0969497..07ea99e 100644 --- a/app.wxss +++ b/app.wxss @@ -110,3 +110,9 @@ page { height: 100%; font-weight: 400; } +.fl{ + float: left; +} +.fr{ + float: right; +} diff --git a/config/config.js b/config/config.js index d0811cf..b85b3ac 100755 --- a/config/config.js +++ b/config/config.js @@ -3,7 +3,7 @@ var config = { // url:"https://c.malls.iformall.com/C/api", // url:'https://ctest.malls.iformall.com/C/api', // url:'http://10.100.33.66:7000/C/api', - // url: 'http://10.100.35.203:7000/C/api', + // url: 'http://10.100.30.172:7000/C/api', api: { /** * 接口用途:login @@ -181,7 +181,15 @@ var config = { /** * C端扫B端储值卡支付订单 */ - orderCreate:"/carday/order_create" + orderCreate:"/carday/order_create", + /** + * 兑换历史列表 + */ + scoreHistory:"/scoreHistory/list", + /** + * 获取用户折扣率 + */ + getDiscount:"/user/getDiscount" }, weapp: { diff --git a/pages/cardListDetail/cardListDetail.js b/pages/cardListDetail/cardListDetail.js index 7ce0f87..948d471 100644 --- a/pages/cardListDetail/cardListDetail.js +++ b/pages/cardListDetail/cardListDetail.js @@ -66,8 +66,6 @@ Page({ else if (e.currentTarget.dataset.flags == 'single') { var answserIs = e.detail.value; } - console.log(answserIs) - console.log(e.currentTarget.dataset.questionid) Http.post({ url: config.api.answerQuestion, data: { diff --git a/pages/cardorder/index/index.js b/pages/cardorder/index/index.js index 85d5844..bec153e 100644 --- a/pages/cardorder/index/index.js +++ b/pages/cardorder/index/index.js @@ -38,18 +38,41 @@ Page({ }, // 扫一扫去支付 gotoPay:function(e){ - console.log(e.currentTarget.dataset.cardid) - Http.post({ - url: config.api.orderCreate, - data: { - cardId: e.currentTarget.dataset.cardid, - merchantCode: "234567451101102080", - totalFee: "5" + let that = this; + wx.scanCode({ + success: (res) => { + that.merChantId = res.result; + console.log(res); + wx.navigateTo({ + url: `/pages/scanPay/scanPay?`, + }) + }, + fail: (res) => { + console.log(res); } - }).then(res=>{ - console.log(res) }) }, + // gotoPayMoney:function(){ + // let that = this; + // Http.post({ + // url: config.api.orderCreate, + // data: { + // cardId: e.currentTarget.dataset.cardid, + // merchantCode: that.data.merChantId, + // totalFee: "5" + // } + // }) + // .then(res => { + // console.log(res) + // }) + // .catch(err => { + // wx.showModal({ + // title: "抱歉", + // content: err.message, + // showCancel: false + // }) + // }) + // }, //点击跳转到券详情页面 gotouse: function (e) { if (this.data.mystatus == '' || this.data.mystatus == 'undefined') { @@ -87,7 +110,7 @@ Page({ } Http.get({ url: config.api.cardorderList, - data: data + data:data }) .then(res => { if(res.code == 200){ diff --git a/pages/cardorder/index/index.wxml b/pages/cardorder/index/index.wxml index 5ecb16b..c7b80b5 100644 --- a/pages/cardorder/index/index.wxml +++ b/pages/cardorder/index/index.wxml @@ -13,7 +13,7 @@ - + diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss index 002c4dd..6ca0180 100644 --- a/pages/coupon/detail/index.wxss +++ b/pages/coupon/detail/index.wxss @@ -442,6 +442,6 @@ page { border-radius:8rpx; font-style: normal; font-size: 30rpx; - line-height: 50rpx; + line-height: 40rpx; padding: 0 6rpx; } \ No newline at end of file diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml index 7d8945f..38755fc 100644 --- a/pages/order/detail/index.wxml +++ b/pages/order/detail/index.wxml @@ -40,7 +40,7 @@ 只有支付完成的时 才显示兑换码 --> - + 兑换码 {{order.couponOrderId}} diff --git a/pages/shop/detail/index.js b/pages/scanPay/scanPay.js similarity index 95% rename from pages/shop/detail/index.js rename to pages/scanPay/scanPay.js index daae2ca..240cb3c 100644 --- a/pages/shop/detail/index.js +++ b/pages/scanPay/scanPay.js @@ -1,65 +1,66 @@ +// pages/scanPay/scanPay.js Page({ /** * 页面的初始数据 */ data: { - + }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { - + }, /** * 生命周期函数--监听页面显示 */ onShow: function () { - + }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { - + }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { - + }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { - + }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { - + }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { - + } }) \ No newline at end of file diff --git a/pages/scanPay/scanPay.json b/pages/scanPay/scanPay.json new file mode 100644 index 0000000..76e73cc --- /dev/null +++ b/pages/scanPay/scanPay.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "付款" +} \ No newline at end of file diff --git a/pages/scanPay/scanPay.wxml b/pages/scanPay/scanPay.wxml new file mode 100644 index 0000000..82aceb3 --- /dev/null +++ b/pages/scanPay/scanPay.wxml @@ -0,0 +1,12 @@ + + + 付款给呷脯呷脯 + + + 金额 + + ¥ + 200 + + + \ No newline at end of file diff --git a/pages/scanPay/scanPay.wxss b/pages/scanPay/scanPay.wxss new file mode 100644 index 0000000..a8c3b28 --- /dev/null +++ b/pages/scanPay/scanPay.wxss @@ -0,0 +1,43 @@ +.content{ + padding:0 57rpx; +} +.head image{ + width: 100rpx; + height: 100rpx; + border-radius:50%; +} +.head{ + margin-top: 80rpx; +} +.head .fl{ + font-size:32rpx; + font-family:PingFang-SC-Bold; + font-weight:bold; + color:rgba(51,51,51,1); +} +.txt1{ + font-size:32rpx; + font-family:PingFang-SC-Regular; + font-weight:400; + color:rgba(134,134,134,1); +} +.money button{ + width:636rpx; + height:95rpx; + margin:80rpx auto 0; + background:rgba(2,192,255,1); + border-radius:48rpx; + color: #fff; +} +.money .icon{ + font-size:38rpx; + font-family:PingFang-SC-Medium; + font-weight:500; + color:rgba(51,51,51,1); +} +.money .num{ + font-size:77rpx; + font-family:PingFang-SC-Bold; + font-weight:bold; + color:rgba(51,51,51,1); +} \ No newline at end of file diff --git a/pages/shop/detail/index.json b/pages/shop/detail/index.json deleted file mode 100644 index 8077922..0000000 --- a/pages/shop/detail/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": { - - }, - "navigationBarTitleText": "店铺详情" - } \ No newline at end of file diff --git a/pages/shop/detail/index.wxml b/pages/shop/detail/index.wxml deleted file mode 100644 index 8120c1a..0000000 --- a/pages/shop/detail/index.wxml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - IFROMALL (西单大悦城店) - 北京市西城区西单北大街131号 - - - - - - - - 北京市西城区西单北大街131号 - - 12.5km - 到这里去 - - - - - - 门店优惠 - - - - - - 黑椒牛排 - - - ¥1.00 - 59.00 - - - 已售16张 - 购买 - - - - - - - - 黑椒牛排 - - - ¥1.00 - 59.00 - - - 已售16张 - 购买 - - - - - - - - 黑椒牛排 - - - ¥1.00 - 59.00 - - - 已售16张 - 购买 - - - - - - - - 黑椒牛排 - - - ¥1.00 - 59.00 - - - 已售16张 - 购买 - - - - - - \ No newline at end of file diff --git a/pages/shop/detail/index.wxss b/pages/shop/detail/index.wxss deleted file mode 100644 index 1ea9253..0000000 --- a/pages/shop/detail/index.wxss +++ /dev/null @@ -1,174 +0,0 @@ -.spdetailContainer{ - width: 100%; - height: 100%; - background: #eee; -} -.spheader{ - width: 100%; - height: 186rpx; - background: #fff; - display: flex; - flex-direction: row; -} -.spheaderL{ - flex: 1; - display: flex; - justify-content: center; - align-items: center; -} -.spheaderM{ - flex: 2; - display: flex; - flex-direction: column; - justify-content: left; - align-self: center; -} -.shopname{ - font-size: 31rpx; - color: #000; -} -.shopaddress{ - font-size: 22rpx; - color: #B8B8B8; - margin-top: 20rpx; -} -.spheaderR{ - flex: 1; - display: flex; - justify-content: center; - align-items: center; -} -.splogo{ - width: 150rpx; - height: 150rpx; -} -.spcode{ - width: 100rpx; - height: 100rpx; -} -.spheaderNext{ - width: 100%; - height: 150rpx; - background: #fff; - display: flex; - flex-direction: column; - padding-top: 10rpx; -} -.NextTop{ - margin-left: 30rpx; - font-size: 30rpx; - color: #000; -} -.NextBottom{ - margin-top: 23rpx; - display: flex; - flex-direction: row; - margin-left: 30rpx; -} -.addresslogo{ - width: 20rpx; - height: 20rpx; -} -.spphone{ - width: 44rpx; - height: 44rpx; -} -.NextBottomL{ - flex: 1; - color: #c0c0c0; - font-size: 22rpx; - align-self: center; -} -.NextBottomM{ - flex: 3.5; - justify-content: left; - font-size:22rpx; - color: #00C0FF; - align-self: center; - border-top-width: 2rpx; - border-color: #00C0FF; -} -.NextBottomR{ - flex: .5 -} -.storeDiscount{ - width: 100%; - height: auto; - background: #fff; - margin-top: 30rpx -} -.storeDiscountTitle{ - width: 100%; - height: 87rpx; - line-height: 87rpx; -} -.storeDiscountTitle text{ - margin-left: 30rpx; - font-size:28rpx; - color: #000; - border-bottom: 1px solid #fff; -} -.storeDiscountCon{ - width: 100%; - height: auto; - background: #fff; - flex-direction: column; -} -.storeDiscountConItem{ - width: 100%; - height: 244rpx; - display: flex; - flex-direction: row; -} -.ConItemL{ - flex: 1; - align-self: center; -} -.foodpng{ - width: 248rpx; - height: 184rpx; - margin-left: 30rpx; -} -.ConItemR{ - margin-top: 22rpx; - flex: 4; - padding-left: 20rpx; -} -.ConItemRT{ - color: #000; - font-size: 30rpx; -} -.ConItemRM{ - margin-top: 10rpx; -} -.presentPrice{ - font-size: 36rpx; - color: #FF3434; - margin-right: 20rpx; -} -.originalPrice{ - font-size: 24rpx; - color: #B4B4B4; - text-decoration: line-through; -} -.ConItemRB{ - margin-top: 35rpx; -} -.soldnum{ - color: #585858; - font-size: 22rpx; -} -.buy{ - margin-left: 215rpx; - background: #00C0FF; - color: #fff; - font-size: 28rpx; - width: 114rpx; - height: 50rpx; - line-height: 50rpx; - text-align: center; - border-radius: 10rpx; - display: inline-block; - -} - diff --git a/pages/shop/index/index.js b/pages/shop/index/index.js deleted file mode 100644 index 96ed282..0000000 --- a/pages/shop/index/index.js +++ /dev/null @@ -1,55 +0,0 @@ -Page({ - data: { - tabs: [{ - key: 1, - name: "全部" - }, - { - key: 2, - name: "待付款" - }, - { - key: 3, - name: "已完成" - } - ], - list: [ - { - key: '1', - data: [ - { - name: '111' - } - ] - }, - { - key: '2', - data: [ - { - name: '222' - } - ] - }, - { - key: '3', - data: [ - { - name: '333' - } - ] - } - ], - current: '', - current_scroll: '1' - }, - handleChange({ detail }) { - this.setData({ - current: detail.key - }); - }, - handleChangeScroll({ detail }) { - this.setData({ - current_scroll: detail.key - }); - }, -}) \ No newline at end of file diff --git a/pages/shop/index/index.json b/pages/shop/index/index.json deleted file mode 100644 index ea5b72c..0000000 --- a/pages/shop/index/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "usingComponents": { - "i-tab": "../../../dist/tab/index", - "i-tabs": "../../../dist/tabs/index", - "c-coupons": "../../../components/coupons/index" - }, - "navigationBarTitleText": "我的订单" -} \ No newline at end of file diff --git a/pages/shop/index/index.wxml b/pages/shop/index/index.wxml deleted file mode 100644 index 097d025..0000000 --- a/pages/shop/index/index.wxml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/shop/index/index.wxss b/pages/shop/index/index.wxss deleted file mode 100644 index 20eee2f..0000000 --- a/pages/shop/index/index.wxss +++ /dev/null @@ -1,15 +0,0 @@ -.market { - width: 100%; - height: 100%; -} - -.tabs { - width: 100% !important; - height: 88rpx; - text-align: center; -} - -.i-tab { - width: 30% !important; - display: inline-block; -} \ No newline at end of file diff --git a/pages/user/index.wxml b/pages/user/index.wxml index d9fb425..72f980f 100644 --- a/pages/user/index.wxml +++ b/pages/user/index.wxml @@ -90,6 +90,16 @@ + + + + + 成长值记录 + + + + + diff --git a/pages/user/scoreHistory/index.js b/pages/user/scoreHistory/index.js new file mode 100644 index 0000000..e0751ab --- /dev/null +++ b/pages/user/scoreHistory/index.js @@ -0,0 +1,28 @@ +var config = require("../../../config/config.js"); +var app = getApp(); +const Http = require("../../../utils/HttpBasics"); +Page({ + /** + * 页面的初始数据 + */ + data: { + }, + onShow(options){ + this.record(); + }, + record:function(){ + Http.get({ + url: config.api.scoreHistory, + data: { + token:"d012a284-5e83-4062-be18-9bb01eaf868d", + pageNum:1, + pageSize:100 + } + }) + .then(res => { + console.log(res) + }) + .catch(err => { + }) + } +}); \ No newline at end of file diff --git a/pages/user/scoreHistory/index.json b/pages/user/scoreHistory/index.json new file mode 100644 index 0000000..afe34e0 --- /dev/null +++ b/pages/user/scoreHistory/index.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "成长值记录" +} \ No newline at end of file diff --git a/pages/user/scoreHistory/index.wxml b/pages/user/scoreHistory/index.wxml new file mode 100644 index 0000000..f9131c3 --- /dev/null +++ b/pages/user/scoreHistory/index.wxml @@ -0,0 +1,13 @@ + + 成长值记录 + + 1.jdiueh dheude hdeuhdei + 1.jdiueh dheude hdeuhdei + 1.jdiueh dheude hdeuhdei + 1.jdiueh dheude hdeuhdei + 1.jdiueh dheude hdeuhdei + 1.jdiueh dheude hdeuhdei + 1.jdiueh dheude hdeuhdei + 1.jdiueh dheude hdeuhdei + + \ No newline at end of file diff --git a/pages/user/scoreHistory/index.wxss b/pages/user/scoreHistory/index.wxss new file mode 100644 index 0000000..fbef774 --- /dev/null +++ b/pages/user/scoreHistory/index.wxss @@ -0,0 +1,14 @@ +.content .title{ + display: block; + text-align: center; + font-size: 30rpx; + color: #333; + height: 80rpx; + line-height: 80rpx; +} +.list{ + width: 690rpx; + margin: 0 auto; + color:#666; + font-size: 28rpx; +} \ No newline at end of file