| @@ -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", | |||
| @@ -174,6 +174,7 @@ var config = { | |||
| * 车场信息获取 | |||
| */ | |||
| scoreLevelInfo: '/mall/scoreLevelInfo', | |||
| creditRules: '/credit/credit_rules', | |||
| getParkInfo: "/wxPark/info", | |||
| /** | |||
| * 用户所绑车牌获取 | |||
| @@ -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({ | |||
| @@ -1,9 +1,10 @@ | |||
| <navbar back home text="成长值"></navbar> | |||
| <view style="height:{{navigationBarHeight}} "></view> | |||
| <view class='head' > | |||
| <view class='head'> | |||
| <text>当前</text> | |||
| <text>{{score}}</text> | |||
| <view class='rule' bindtap='gotorule'>规则</view> | |||
| <view class='growRule' bindtap='gotoGrowRule'>成长值规则</view> | |||
| <view class='markRule' bindtap='gotoMarkRule'>积分规则</view> | |||
| <image class='bg' src='{{bgg}}' mode='widthFix'></image> | |||
| </view> | |||
| <view class=''> | |||
| @@ -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; | |||
| @@ -264,8 +264,8 @@ Page({ | |||
| } | |||
| }).catch(err => { | |||
| wx.showToast({ | |||
| title: err.message, | |||
| icon: 'none', | |||
| title: '授权失败', | |||
| icon: 'error', | |||
| duration: 2000, | |||
| mask: false | |||
| }); | |||
| @@ -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', | |||
| }) | |||
| } | |||
| }) | |||
| @@ -0,0 +1,5 @@ | |||
| { | |||
| "usingComponents": { | |||
| "navbar": "../../../components/navbar/navbar" | |||
| } | |||
| } | |||
| @@ -0,0 +1,67 @@ | |||
| <navbar home back text="积分规则"></navbar> | |||
| <view style="height:{{navigationBarHeight}} "></view> | |||
| <view class='page' wx:if="{{flags=='have'}}"> | |||
| <view class='title'>积分增长规则</view> | |||
| <view class='scroll'> | |||
| <scroll-view scroll-x class="scroll-header"> | |||
| <view class="scroll-view-item scroll-view-item2" wx:for="{{rules}}" wx:key="index"> | |||
| <view class='thin_circle' wx:if="{{item.id!=2}}"> | |||
| <view class="view"> | |||
| <text> | |||
| <text>{{item.title}}</text> | |||
| <text>{{item.desc}}</text> | |||
| </text> | |||
| </view> | |||
| </view> | |||
| <text wx:if="{{item.id!=2}}">{{item.score}}积分</text> | |||
| </view> | |||
| </scroll-view> | |||
| </view> | |||
| <view class='title'>交易规则</view> | |||
| <view class='scroll'> | |||
| <scroll-view scroll-x class="scroll-header"> | |||
| <view class="scroll-view-item scroll-view-item1" wx:for="{{rules1}}" wx:key="index"> | |||
| <view class='thin_circle thin_circle1'> | |||
| <view class="viewX view1"> | |||
| <text> | |||
| <text>{{item.title}}</text> | |||
| <text>线上交易</text> | |||
| <text>{{item.step}}元</text> | |||
| </text> | |||
| </view> | |||
| </view> | |||
| <text>{{item.score}}积分</text> | |||
| </view> | |||
| </scroll-view> | |||
| </view> | |||
| <!-- <view class='title'>积分权益</view> --> | |||
| <!-- <view class='quanyi'> | |||
| <view class='part' wx:for="{{levelList}}" wx:key="index"> | |||
| <view class='clearfix'> | |||
| <image wx:if="{{index==0}}" class="grade fl" mode='widthFix' src="{{gradeUrl}}"></image> | |||
| <image wx:if="{{index==1}}" class="grade fl" mode='widthFix' src="{{grade1Url}}"></image> | |||
| <image wx:if="{{index==2}}" class="grade fl" mode='widthFix' src="{{grade2Url}}"></image> | |||
| <image wx:if="{{index==3}}" class="grade fl" mode='widthFix' src="{{grade3Url}}"></image> | |||
| <image wx:if="{{index==4}}" class="grade fl" mode='widthFix' src="{{grade3Url}}"></image> | |||
| <view class='titles fl clearfix'> | |||
| <text>{{item.level}}</text> | |||
| <text wx:if="{{index==0}}">{{item.points}}积分</text> | |||
| <text wx:if="{{index==1}}">{{item.points}}积分</text> | |||
| <text wx:if="{{index==2}}">{{item.points}}积分</text> | |||
| <text wx:if="{{index==3}}">{{item.points}}积分</text> | |||
| <text wx:if="{{index==4}}">{{item.points}}积分</text> | |||
| <text wx:if="{{index==5}}">{{item.points}}积分</text> | |||
| </view> | |||
| </view> | |||
| <view class='des' wx:if="{{item.description==''}}">无</view> | |||
| <view class='des' wx:if="{{item.description!=''}}">{{item.description}}</view> | |||
| </view> | |||
| </view> --> | |||
| </view> | |||
| <view wx:if="{{flags=='nothave'}}"> | |||
| <image class='img' src='{{actUrl}}' mode='widthFix'></image> | |||
| <text class="txt">暂无配置信息</text> | |||
| </view> | |||
| <view class='growthbg' bindtap='gotospecialcourtesy'> | |||
| <image src='{{growthbgUrl}}' mode='widthFix'></image> | |||
| </view> | |||
| @@ -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%; | |||
| } | |||