Browse Source

[成长值][增加]:成长值增加

tags/2.2.4
meo 6 years ago
parent
commit
60ed19ed92
17 changed files with 385 additions and 10 deletions
  1. +4
    -0
      app.json
  2. BIN
      assets/img/grade.png
  3. BIN
      assets/img/grade1.png
  4. BIN
      assets/img/grade2.png
  5. BIN
      assets/img/grade3.png
  6. BIN
      assets/img/shang.png
  7. +2
    -1
      config/config.js
  8. +94
    -0
      pages/grade/grade.js
  9. +3
    -0
      pages/grade/grade.json
  10. +81
    -0
      pages/grade/grade.wxml
  11. +171
    -0
      pages/grade/grade.wxss
  12. +12
    -2
      pages/passCar/passCar.js
  13. +2
    -1
      pages/passCar/passCar.wxml
  14. +4
    -1
      pages/passCar/passCar.wxss
  15. +8
    -0
      pages/user/index.js
  16. +2
    -2
      pages/user/index.wxml
  17. +2
    -3
      pages/user/index.wxss

+ 4
- 0
app.json View File

@@ -29,7 +29,11 @@
"pages/passCar/couponDetail/couponDetail",
"pages/managelicenseplate/managelicenseplate",
"pages/payrule/payrule",
<<<<<<< HEAD
"pages/game/index"
=======
"pages/grade/grade"
>>>>>>> [成长值][增加]:成长值增加
],
"tabBar": {
"color": "#9F9F9F",


BIN
assets/img/grade.png View File

Before After
Width: 44  |  Height: 38  |  Size: 1.4 KiB

BIN
assets/img/grade1.png View File

Before After
Width: 45  |  Height: 38  |  Size: 1.3 KiB

BIN
assets/img/grade2.png View File

Before After
Width: 44  |  Height: 38  |  Size: 1.5 KiB

BIN
assets/img/grade3.png View File

Before After
Width: 45  |  Height: 38  |  Size: 1.5 KiB

BIN
assets/img/shang.png View File

Before After
Width: 22  |  Height: 22  |  Size: 274 B Width: 128  |  Height: 128  |  Size: 5.6 KiB

+ 2
- 1
config/config.js View File

@@ -141,7 +141,8 @@ var config = {
* title
* 描述
*/
getWeapNote:'/mall/getWeapNote'
getWeapNote:'/mall/getWeapNote',
scoreLevelInfo:'/mall/scoreLevelInfo'
},

weapp: {


+ 94
- 0
pages/grade/grade.js View File

@@ -0,0 +1,94 @@
const Http = require("../../utils/HttpBasics");
const config = require("../../config/config");
let app = getApp();
Page({

/**
* 页面的初始数据
*/
data: {
src:'./../../../assets/img/grade.png'
},

/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that = this;
Http.get({
url: config.api.scoreLevelInfo,
data: {
appId: config.weapp.AppId,
}
})
.then(res=>{
console.log(res);

that.setData({
flags: 'have',
logincount: res.data.score.loginCount,
loginscoreNumber: res.data.score.loginScoreNumber,
personscoreNumber: res.data.score.personScoreNumber,
phonescoreNumber: res.data.score.phoneScoreNumber,
wifiscoreNumber: res.data.score.wifiScoreNumber,
wifinumber: res.data.score.wifiNumber,
levelList: res.data.levelList
})
})
.catch(res=>{
that.setData({
flags: 'nothave'
})
})
},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {

}
})

+ 3
- 0
pages/grade/grade.json View File

@@ -0,0 +1,3 @@
{
"navigationBarTitleText": "我的成长值"
}

+ 81
- 0
pages/grade/grade.wxml View File

@@ -0,0 +1,81 @@
<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">
<view class='thin_circle'>
<view class='view'>
<text>访问</text>
<text>登陆</text>
</view>
</view>
<text>{{logincount}}成长值</text>
</view>
<view class="scroll-view-item">
<view class='thin_circle'>
<view class='view'>
<text>线上</text>
<text>交易</text>
</view>
</view>
<text>{{loginscoreNumber}}成长值</text>
</view>
<view class="scroll-view-item">
<view class='thin_circle'>
<view class='view'>
<text>授权</text>
<text>个人信息</text>
</view>
</view>
<text>{{personscoreNumber}}成长值</text>
</view>
<view class="scroll-view-item">
<view class='thin_circle'>
<view class='view'>
<text>授权</text>
<text>手机号</text>
</view>
</view>
<text>{{phonescoreNumber}}成长值</text>
</view>
<view class="scroll-view-item">
<view class='thin_circle'>
<view class='view'>
<text>链接</text>
<text>系统WIFI</text>
</view>
</view>
<text>{{wifiscoreNumber}}成长值</text>
</view>
<view class="scroll-view-item">
<view class='thin_circle last'>
<view class="view">
<text>补充</text>
<text>个人信息</text>
</view>
</view>
<text>{{wifinumber}}成长值</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="./../../assets/img/grade.png" ></image>
<image wx:if="{{index==1}}" class="grade fl" mode='widthFix' src="./../../assets/img/grade1.png" ></image>
<image wx:if="{{index==2}}" class="grade fl" mode='widthFix' src="./../../assets/img/grade2.png" ></image>
<image wx:if="{{index==3}}" class="grade fl" mode='widthFix' src="./../../assets/img/grade3.png" ></image>
<image wx:if="{{index==4}}" class="grade fl" mode='widthFix' src="./../../assets/img/grade.png" ></image>
<image wx:if="{{index==5}}" class="grade fl" mode='widthFix' src="./../../assets/img/grade.png" ></image>
<text class='titles fl'>{{item.level}}</text>
</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='./../../assets/img/act.png' mode='widthFix'></image>
<text class="txt">暂无配置信息</text>
</view>

+ 171
- 0
pages/grade/grade.wxss View File

@@ -0,0 +1,171 @@
.scroll-header {
display: flex;
white-space: nowrap;
}

.thin_circle {
position: relative;
height: 132rpx;
width: 132rpx;
border: 1px solid #f69948;
display: inline-block;
border-radius: 50%;
margin-right: 46rpx;
}

.page {
height: 100%;
font-weight: 400;
}

.scroll {
padding: 0 56rpx 20rpx;
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;
}

.view text {
font-size: 23rpx;
display: block;
text-align: center;
color: #fd9643;
line-height: 32rpx;
}

.scroll-view-item > text {
display: block;
width: 132rpx;
font-size: 21rpx;
font-weight: 400;
color: rgba(253, 150, 67, 1);
line-height: 29rpx;
}

.view {
position: absolute;
display: flex;
justify-content: center;
flex-direction: column;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
width: 108rpx !important;
height: 108rpx !important;
border: 3px solid #f69948;
border-radius: 50%;
}

.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: #fd9643;
}

.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 #fd9643;
}

+ 12
- 2
pages/passCar/passCar.js View File

@@ -19,6 +19,7 @@ Page({
duration: 1000,
current: 0,
stopFees: {},
canIUse: wx.canIUse("navigator")
},
/**
* 车牌轮播滑动
@@ -43,6 +44,13 @@ Page({
url: '/pages/managelicenseplate/managelicenseplate',
})
},
gotoetcp:function(){
wx.navigateToMiniProgram({
appId:'wx192b7d2e8dcbefd0',
extraData: this.data.extraData,
envVersion:'release'
})
},
showquan: function() {
wx.navigateTo({
url: '/pages/passCar/couponList/couponList',
@@ -53,8 +61,10 @@ Page({
*/
gotodetail: function(e) {
console.log(e.target.dataset.rule);
wx.navigateTo({
url: `/pages/payrule/payrule?rule=${e.target.dataset.rule}`,
wx.showModal({
title: '缴费规则',
content: e.target.dataset.rule,
showCancel: false,
})
},
onShow: function(options) {


+ 2
- 1
pages/passCar/passCar.wxml View File

@@ -61,9 +61,10 @@


<view class="buy-view" wx:if="{{stopFees.remainingFee}}">
<navigator class='buy' target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" extra-data='{{extraData}}' version="release">
<navigator wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" extra-data='{{extraData}}' version="release">
立即支付
</navigator>
<view wx:if="{{!canIUse}}" class='buy' bindtap='gotoetcp'>立即支付</view>
</view>
</view>



+ 4
- 1
pages/passCar/passCar.wxss View File

@@ -173,6 +173,9 @@ page {
margin-bottom: 80rpx;
border-top: 16rpx #f8f8f8 solid;
}
.bottonBox view:nth-of-type(1) image{
height: 45rpx;
}

.textStyle {
background-color: white;
@@ -189,7 +192,7 @@ page {
.textStyle image {
width: 40rpx;
height: 40rpx;
top: 27rpx;
top: 24rpx;
left: 27rpx;
position: absolute;
}


+ 8
- 0
pages/user/index.js View File

@@ -10,6 +10,14 @@ Page({
flag: 'hidden',
score:'0'
},
/**
* 跳转到成长值的页面
*/
gotograde:function(){
wx.navigateTo({
url: '/pages/grade/grade',
})
},
navigateTo() {
wx.navigateTo({
url: `/pages/login/index`


+ 2
- 2
pages/user/index.wxml View File

@@ -10,7 +10,7 @@
<open-data type="userNickName"></open-data>
<view class='chengzhang'>等级:{{levelName}}</view>
</view>
<view class='chengzhang1'>
<view class='chengzhang1' bindtap='gotograde'>
<view class="view">{{score}}
<image src='./../../assets/img/shang.png' mode="widthFix"></image>
</view>
@@ -67,7 +67,7 @@
<view class="margin"></view>
<!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> -->
<view bindlongtap='showVersion' class='version'>
<view wx:if="{{flag=='show'}}">版本号:2.1.2</view>
<view wx:if="{{flag=='show'}}">版本号:2.1.4</view>
<view wx:if="{{flag=='hidden'}}"></view>
</view>
</view>


+ 2
- 3
pages/user/index.wxss View File

@@ -104,10 +104,9 @@
}

.chengzhang1 image {
width: 24rpx;
height: 24rpx;
width: 30rpx;
height: 30rpx;
vertical-align: top;
margin-top: 10rpx;
}

.chengzhang1 .view {


Loading…
Cancel
Save