diff --git a/app.json b/app.json index 5ac98a3..bfed136 100644 --- a/app.json +++ b/app.json @@ -51,6 +51,7 @@ "pages/managelicenseplate/managelicenseplate", "pages/payrule/payrule", "pages/grade/grade", + "pages/gradeII/gradeII", "pages/exchange/exchange", "pages/exchangeCard/exchangeCard", "pages/game/index", diff --git a/config/config.js b/config/config.js index 3392ef7..a9f0c1f 100755 --- a/config/config.js +++ b/config/config.js @@ -174,6 +174,7 @@ var config = { * 车场信息获取 */ scoreLevelInfo: '/mall/scoreLevelInfo', + creditRules: '/credit/credit_rules', getParkInfo: "/wxPark/info", /** * 用户所绑车牌获取 diff --git a/pages/czdetail/czdetail.js b/pages/czdetail/czdetail.js index 7c8a0a8..cc2d325 100644 --- a/pages/czdetail/czdetail.js +++ b/pages/czdetail/czdetail.js @@ -12,9 +12,9 @@ Page({ data: { navigationBarHeight, score: 10, - pageNum:1, - list:[], - showcontent:false, + pageNum: 1, + list: [], + showcontent: false, loadingUrl: imgurl.loading.url, bgg: imgurl.bgg.url, allow_load: true @@ -23,14 +23,19 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function(options) { + onLoad: function (options) { }, - gotorule: function() { + gotoGrowRule() { wx.navigateTo({ url: '/pages/grade/grade', }) }, + gotoMarkRule() { + wx.navigateTo({ + url: '/pages/gradeII/gradeII', + }) + }, /** * 生命周期函数--监听页面显示 */ @@ -88,12 +93,12 @@ Page({ }); that.record(1); }, - getScore: function() { + getScore: function () { let that = this; Http.get({ - url: config.api.getScore, - data: {} - }) + url: config.api.getScore, + data: {} + }) .then(res => { console.log(res) that.setData({ diff --git a/pages/czdetail/czdetail.wxml b/pages/czdetail/czdetail.wxml index 544005f..2080ecc 100644 --- a/pages/czdetail/czdetail.wxml +++ b/pages/czdetail/czdetail.wxml @@ -1,9 +1,10 @@ - + 当前 {{score}} - 规则 + 成长值规则 + 积分规则 diff --git a/pages/czdetail/czdetail.wxss b/pages/czdetail/czdetail.wxss index aba46cc..64440de 100644 --- a/pages/czdetail/czdetail.wxss +++ b/pages/czdetail/czdetail.wxss @@ -1,4 +1,5 @@ @import "../../app.wxss"; + .head { height: 232rpx; padding-top: 20rpx; @@ -6,13 +7,31 @@ position: relative; } -.rule { +.growRule { position: absolute; right: 0; - top: 0; + top: -60rpx; bottom: 0; margin: auto; - width: 124rpx; + width: 180rpx; + height: 48rpx; + line-height: 48rpx; + text-align: center; + background: #fff; + font-size: 28rpx; + font-weight: 400; + color: #fc5b24; + border-bottom-left-radius: 50rpx; + border-top-left-radius: 50rpx; +} + +.markRule { + position: absolute; + right: 0; + top: 60rpx; + bottom: 0; + margin: auto; + width: 180rpx; height: 48rpx; line-height: 48rpx; text-align: center; @@ -101,9 +120,11 @@ font-weight: 400; color: rgba(51, 51, 51, 1); } -.fr text{ + +.fr text { color: #FF3535; } + .loading { text-align: center; height: 80rpx; @@ -118,7 +139,8 @@ vertical-align: middle; margin-right: 10rpx; } -.nonecontent{ + +.nonecontent { text-align: center; font-size: 30rpx; color: #999; diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js index ed43fa6..016f59c 100755 --- a/pages/getphoneInfo/index.js +++ b/pages/getphoneInfo/index.js @@ -264,8 +264,8 @@ Page({ } }).catch(err => { wx.showToast({ - title: err.message, - icon: 'none', + title: '授权失败', + icon: 'error', duration: 2000, mask: false }); diff --git a/pages/gradeII/gradeII.js b/pages/gradeII/gradeII.js new file mode 100644 index 0000000..f3490a4 --- /dev/null +++ b/pages/gradeII/gradeII.js @@ -0,0 +1,58 @@ +const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' +const Http = require("../../utils/HttpBasics"); +const config = require("../../config/config"); +let app = getApp(); +const imgurl = require("../../utils/imgurl"); +Page({ + + /** + * 页面的初始数据 + */ + data: { + navigationBarHeight, + src: imgurl.grade.url, + actUrl: imgurl.act.url, + gradeUrl: imgurl.grade.url, + grade1Url: imgurl.grade1.url, + grade2Url: imgurl.grade2.url, + grade3Url: imgurl.grade3.url, + growthbgUrl: imgurl.growthbg.url, + }, + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + Http.get({ + url: config.api.creditRules, + data: {} + }) + .then(res => { + let childs = [] + JSON.parse(res.data.rules).forEach(item => { + if (item.id == 2) { + childs = item.childs + } + }) + that.setData({ + flags: 'have', + rules: JSON.parse(res.data.rules), + rules1: childs || [], + levelList: res.data.levelList + }) + console.log(that.data.rules) + console.log(that.data.rules1) + }) + .catch(res => { + that.setData({ + flags: 'nothave' + }) + }) + }, + // 点击跳转到我的特享优惠 + gotospecialcourtesy: function () { + wx.navigateTo({ + url: '/pages/specialcourtesy/specialcourtesy', + }) + } +}) \ No newline at end of file diff --git a/pages/gradeII/gradeII.json b/pages/gradeII/gradeII.json new file mode 100644 index 0000000..d82a6ce --- /dev/null +++ b/pages/gradeII/gradeII.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "navbar": "../../../components/navbar/navbar" + } +} \ No newline at end of file diff --git a/pages/gradeII/gradeII.wxml b/pages/gradeII/gradeII.wxml new file mode 100644 index 0000000..e773b7c --- /dev/null +++ b/pages/gradeII/gradeII.wxml @@ -0,0 +1,67 @@ + + + + 积分增长规则 + + + + + + + {{item.title}} + {{item.desc}} + + + + {{item.score}}积分 + + + + 交易规则 + + + + + + + {{item.title}} + 线上交易 + {{item.step}}元 + + + + {{item.score}}积分 + + + + + + + + + 暂无配置信息 + + + + \ No newline at end of file diff --git a/pages/gradeII/gradeII.wxss b/pages/gradeII/gradeII.wxss new file mode 100644 index 0000000..cedf480 --- /dev/null +++ b/pages/gradeII/gradeII.wxss @@ -0,0 +1,263 @@ +.scroll-header { + display: flex; + white-space: nowrap; +} + +.scroll-view-item:first-child { + margin-left: 20rpx !important; +} + +.thin_circle { + position: relative; + height: 140rpx; + width: 140rpx; + border: 1px solid #f69948; + display: inline-block; + border-radius: 50%; + margin-right: 46rpx; +} + +.thin_circle1 { + border: 1px solid #4e9efe; +} + +.page { + height: auto; + font-weight: 400; +} + +.scroll { + padding: 0 30rpx 20rpx 30rpx; + margin-top: 22rpx; +} + +.title { + border-top: 20rpx solid #fafafa; + font-size: 34rpx; + font-weight: bold; + color: rgba(85, 85, 85, 1); + padding: 30rpx 0 10rpx; + line-height: 34rpx; + text-indent: 1em; +} + +.img { + width: 320rpx; + display: block; + margin: 160rpx auto 0; +} + +.txt { + display: block; + text-align: center; + font-size: 30rpx; + color: #ccc; +} + +.scroll-view-item { + position: relative; + text-align: center; + display: inline-block; + padding-left: 3rpx; + margin-right: 30rpx; +} + +.scroll-view-item1, +.scroll-view-item2 { + margin-right: 0; +} + +.scroll-view-item:nth-of-type(1) { + margin-right: 0; +} + +.view text { + font-size: 23rpx; + display: block; + text-align: center; + color: #fd9643; + line-height: 32rpx; + width: 80rpx; + margin: 0 auto; + white-space: normal; +} + +.viewX text { + font-size: 20rpx; + display: block; + text-align: center; + color: #fd9643; + line-height: 32rpx; + width: 80rpx; + margin: 0 auto; + white-space: normal; +} + +.view1 text { + color: #4e9efe; +} + +.scroll-view-item>text { + display: block; + width: 132rpx; + font-size: 21rpx; + font-weight: 400; + color: rgba(253, 150, 67, 1); + line-height: 29rpx; +} + +.scroll-view-item1>text { + color: #4e9efe; +} + +.view { + position: absolute; + display: flex; + justify-content: center; + flex-direction: column; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + width: 120rpx !important; + height: 120rpx !important; + border: 3px solid #f69948; + border-radius: 50%; +} + +.viewX { + position: absolute; + display: flex; + justify-content: center; + flex-direction: column; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + width: 120rpx !important; + height: 120rpx !important; + border: 3px solid #f69948; + border-radius: 50%; +} + +.view1 { + border: 3px solid #4e9efe; +} + +.last { + margin-right: 0; +} + +.quanyi { + margin-top: 20rpx; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +.clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.grade { + width: 30rpx !important; +} + +.quanyi>view .titles { + display: inline-block; + font-size: 30rpx; + font-family: PingFang-SC-Bold; + font-weight: bold; + line-height: 30rpx; + padding: 0 0 0 10rpx; +} + +.quanyi>view:nth-of-type(1) .titles { + color: #fd9643; +} + +.quanyi>view:nth-of-type(2) .titles { + color: #ffba00; +} + +.quanyi>view:nth-of-type(3) .titles { + color: #6cb043; +} + +.quanyi>view:nth-of-type(4) .titles { + color: #2ac19c; +} + +.quanyi>view:nth-of-type(5) .titles { + color: #2ac19c; +} + +.part { + padding: 0 34rpx; + margin-top: 20rpx; +} + +.des { + padding-left: 25rpx; + font-size: 26rpx; + font-weight: 400; + color: rgba(153, 153, 153, 1); + line-height: 40rpx; + margin-left: 12rpx; + padding-top: 10rpx; + padding-bottom: 10rpx; + margin-top: 10rpx; +} + +.quanyi>view:nth-of-type(1) .des { + border-left: 6rpx dotted #fd9643; +} + +.quanyi>view:nth-of-type(2) .des { + border-left: 6rpx dotted #ffba00; +} + +.quanyi>view:nth-of-type(3) .des { + border-left: 6rpx dotted #6cb043; +} + +.quanyi>view:nth-of-type(4) .des { + border-left: 6rpx dotted #2ac19c; +} + +.quanyi>view:nth-of-type(5) .des { + border-left: 6rpx dotted #2ac19c; +} + +.titles text:nth-of-type(1) { + float: left; +} + +.titles text:nth-of-type(2) { + float: left; + font-weight: 400; + color: #999; + font-size: 26rpx; + margin-left: 10rpx; +} + +.growthbg { + margin: 80rpx auto 30rpx; + width: 700rpx; +} + +.growthbg image { + display: block; + width: 100%; +} \ No newline at end of file