| @@ -1,3 +1,4 @@ | |||||
| const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
| var config = require("../../config/config.js"); | var config = require("../../config/config.js"); | ||||
| var app = getApp(); | var app = getApp(); | ||||
| const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
| @@ -9,6 +10,7 @@ Page({ | |||||
| * 页面的初始数据 | * 页面的初始数据 | ||||
| */ | */ | ||||
| data: { | data: { | ||||
| navigationBarHeight, | |||||
| score: 10, | score: 10, | ||||
| pageNum:1, | pageNum:1, | ||||
| list:[], | list:[], | ||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "成长值", | "navigationBarTitleText": "成长值", | ||||
| "enablePullDownRefresh": true | |||||
| "enablePullDownRefresh": true, | |||||
| "usingComponents": { | |||||
| "navbar": "../../../components/navbar/navbar" | |||||
| } | |||||
| } | } | ||||
| @@ -1,4 +1,5 @@ | |||||
| <view class='head'> | |||||
| <navbar back home text="成长值"></navbar> | |||||
| <view class='head' style="padding-top:{{navigationBarHeight}}!important"> | |||||
| <text>当前</text> | <text>当前</text> | ||||
| <text>{{score}}</text> | <text>{{score}}</text> | ||||
| <view class='rule' bindtap='gotorule'>规则</view> | <view class='rule' bindtap='gotorule'>规则</view> | ||||
| @@ -35,6 +35,7 @@ | |||||
| font-family: PingFang-SC-Regular; | font-family: PingFang-SC-Regular; | ||||
| font-weight: 400; | font-weight: 400; | ||||
| color: rgba(255, 255, 255, 1); | color: rgba(255, 255, 255, 1); | ||||
| padding-top: 25rpx; | |||||
| } | } | ||||
| .head text:nth-of-type(2) { | .head text:nth-of-type(2) { | ||||
| @@ -1,3 +1,4 @@ | |||||
| const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
| const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
| const config = require("../../config/config"); | const config = require("../../config/config"); | ||||
| let app = getApp(); | let app = getApp(); | ||||
| @@ -8,6 +9,7 @@ Page({ | |||||
| * 页面的初始数据 | * 页面的初始数据 | ||||
| */ | */ | ||||
| data: { | data: { | ||||
| navigationBarHeight, | |||||
| src: imgurl.grade.url, | src: imgurl.grade.url, | ||||
| actUrl: imgurl.act.url, | actUrl: imgurl.act.url, | ||||
| gradeUrl: imgurl.grade.url, | gradeUrl: imgurl.grade.url, | ||||
| @@ -16,21 +18,6 @@ Page({ | |||||
| grade3Url: imgurl.grade3.url, | grade3Url: imgurl.grade3.url, | ||||
| growthbgUrl: imgurl.growthbg.url, | growthbgUrl: imgurl.growthbg.url, | ||||
| }, | }, | ||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function(options) { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function() { | |||||
| }, | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| @@ -43,7 +30,8 @@ Page({ | |||||
| .then(res=>{ | .then(res=>{ | ||||
| that.setData({ | that.setData({ | ||||
| flags: 'have', | flags: 'have', | ||||
| rules: JSON.parse(res.data.score.rules).concat(JSON.parse(res.data.score.rules)[1].childs), | |||||
| rules: JSON.parse(res.data.score.rules), | |||||
| rules1: JSON.parse(res.data.score.rules)[1].childs, | |||||
| levelList: res.data.levelList | levelList: res.data.levelList | ||||
| }) | }) | ||||
| console.log(that.data.rules) | console.log(that.data.rules) | ||||
| @@ -1,3 +1,5 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "我的成长值" | |||||
| "usingComponents": { | |||||
| "navbar": "../../../components/navbar/navbar" | |||||
| } | |||||
| } | } | ||||
| @@ -1,14 +1,29 @@ | |||||
| <view class='page' wx:if="{{flags=='have'}}"> | |||||
| <navbar home back text="成长值规则" background="#ffff"></navbar> | |||||
| <view class='page' style="padding-top:{{navigationBarHeight}}" wx:if="{{flags=='have'}}"> | |||||
| <view class='title'>成长值增长规则</view> | <view class='title'>成长值增长规则</view> | ||||
| <view class='scroll'> | <view class='scroll'> | ||||
| <scroll-view scroll-x class="scroll-header"> | <scroll-view scroll-x class="scroll-header"> | ||||
| <view class="scroll-view-item" wx:for="{{rules}}" wx:key="index"> | |||||
| <view class='thin_circle last' wx:if="{{item.desc}}"> | |||||
| <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"> | <view class="view"> | ||||
| <text>{{item.title}}{{item.desc}}</text> | <text>{{item.title}}{{item.desc}}</text> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <text wx:if="{{item.score}}">{{item.score}}成长值</text> | |||||
| <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="view view1"> | |||||
| <text>{{item.title}}{{item.desc}}</text> | |||||
| </view> | |||||
| </view> | |||||
| <text>{{item.score}}成长值</text> | |||||
| </view> | </view> | ||||
| </scroll-view> | </scroll-view> | ||||
| </view> | </view> | ||||
| @@ -36,7 +51,7 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view wx:if="{{flags=='nothave'}}"> | |||||
| <view wx:if="{{flags=='nothave'}}" style="padding-top:{{navigationBarHeight}}"> | |||||
| <image class='img' src='{{actUrl}}' mode='widthFix'></image> | <image class='img' src='{{actUrl}}' mode='widthFix'></image> | ||||
| <text class="txt">暂无配置信息</text> | <text class="txt">暂无配置信息</text> | ||||
| </view> | </view> | ||||
| @@ -16,7 +16,9 @@ | |||||
| border-radius: 50%; | border-radius: 50%; | ||||
| margin-right: 46rpx; | margin-right: 46rpx; | ||||
| } | } | ||||
| .thin_circle1 { | |||||
| border: 1px solid #4e9efe; | |||||
| } | |||||
| .page { | .page { | ||||
| height: auto; | height: auto; | ||||
| font-weight: 400; | font-weight: 400; | ||||
| @@ -57,6 +59,9 @@ | |||||
| padding-left: 3rpx; | padding-left: 3rpx; | ||||
| margin-right: 30rpx; | margin-right: 30rpx; | ||||
| } | } | ||||
| .scroll-view-item1,.scroll-view-item2 { | |||||
| margin-right: 0; | |||||
| } | |||||
| .scroll-view-item:nth-of-type(1){ | .scroll-view-item:nth-of-type(1){ | ||||
| margin-right: 0; | margin-right: 0; | ||||
| } | } | ||||
| @@ -71,7 +76,9 @@ | |||||
| margin: 0 auto; | margin: 0 auto; | ||||
| white-space: normal; | white-space: normal; | ||||
| } | } | ||||
| .view1 text { | |||||
| color: #4e9efe; | |||||
| } | |||||
| .scroll-view-item > text { | .scroll-view-item > text { | ||||
| display: block; | display: block; | ||||
| width: 132rpx; | width: 132rpx; | ||||
| @@ -80,7 +87,9 @@ | |||||
| color: rgba(253, 150, 67, 1); | color: rgba(253, 150, 67, 1); | ||||
| line-height: 29rpx; | line-height: 29rpx; | ||||
| } | } | ||||
| .scroll-view-item1 > text { | |||||
| color:#4e9efe; | |||||
| } | |||||
| .view { | .view { | ||||
| position: absolute; | position: absolute; | ||||
| display: flex; | display: flex; | ||||
| @@ -96,7 +105,9 @@ | |||||
| border: 3px solid #f69948; | border: 3px solid #f69948; | ||||
| border-radius: 50%; | border-radius: 50%; | ||||
| } | } | ||||
| .view1 { | |||||
| border: 3px solid #4e9efe; | |||||
| } | |||||
| .last { | .last { | ||||
| margin-right: 0; | margin-right: 0; | ||||
| } | } | ||||
| @@ -31,7 +31,7 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <!-- 自由图文格式 --> | <!-- 自由图文格式 --> | ||||
| <view wx:if="{{data.type == 2}}"> | |||||
| <view wx:if="{{data.type == 2}}" style='padding-top:{{navigationBarHeight}}'> | |||||
| <view class="content"> | <view class="content"> | ||||
| <template is="wxParse" data="{{wxParseData:article.nodes}}" /> | <template is="wxParse" data="{{wxParseData:article.nodes}}" /> | ||||
| </view> | </view> | ||||