浏览代码

[券详情,成长值,增加走路的步数][修改,增加]:首页,个人中心

tags/2.2.4
meo 6 年前
父节点
当前提交
0afccf803a
共有 11 个文件被更改,包括 103 次插入36 次删除
  1. +1
    -0
      components/coupons/index.wxml
  2. +8
    -7
      config/config.js
  3. +1
    -2
      pages/coupon/detail/index.wxml
  4. +2
    -2
      pages/grade/grade.js
  5. +20
    -13
      pages/grade/grade.wxml
  6. +21
    -7
      pages/grade/grade.wxss
  7. +12
    -2
      pages/index/index.js
  8. +1
    -1
      pages/index/index.wxss
  9. +1
    -0
      pages/index/rushToBuy/index.js
  10. +33
    -2
      pages/user/index.js
  11. +3
    -0
      pages/user/index.wxss

+ 1
- 0
components/coupons/index.wxml 查看文件

@@ -27,6 +27,7 @@
<i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr==0&&data.remainInventory!=0}}" data-date='{{data}}'>免费领</i-button> <i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr==0&&data.remainInventory!=0}}" data-date='{{data}}'>免费领</i-button>
<i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0}}" data-date='{{data}}'>马上购</i-button> <i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0}}" data-date='{{data}}'>马上购</i-button>
<i-button i-class="coupons-btn-gms" wx:if="{{data.remainInventory==0}}" data-date='{{data}}'>已售罄</i-button> <i-button i-class="coupons-btn-gms" wx:if="{{data.remainInventory==0}}" data-date='{{data}}'>已售罄</i-button>
<i-button i-class="coupons-btn-gms" wx:if="{{data.status==1}}" data-date='{{data}}' disabled>已下架</i-button>
</view> </view>
<view class="coupons-info-name sy">剩余{{data.remainInventory}}</view> <view class="coupons-info-name sy">剩余{{data.remainInventory}}</view>
<view class="coupons-border"></view> <view class="coupons-border"></view>


+ 8
- 7
config/config.js 查看文件

@@ -27,7 +27,7 @@ var config = {
* 优惠券详情 * 优惠券详情
*/ */
couponDetail: "/wxCoupon/detail", couponDetail: "/wxCoupon/detail",
/** /**
* 业态查询 * 业态查询
*/ */
@@ -127,22 +127,23 @@ var config = {
* 和login页面 * 和login页面
* 页面的图标 * 页面的图标
*/ */
marketicon:'/mall/getAppIcon',
marketicon: '/mall/getAppIcon',
/** /**
* 检查核销的状态 * 检查核销的状态
*/ */
getStatus:"/couponOrder/getStatus",
getStatus: "/couponOrder/getStatus",
/** /**
* 获得成长值 * 获得成长值
*/ */
getScore:'/user/userinfo',
getScore: '/user/userinfo',
/** /**
* 小程序分享 * 小程序分享
* title * title
* 描述 * 描述
*/ */
getWeapNote:'/mall/getWeapNote',
scoreLevelInfo:'/mall/scoreLevelInfo'
getWeapNote: '/mall/getWeapNote',
scoreLevelInfo: '/mall/scoreLevelInfo',
getWeRunData: '/user/getWeRunData'
}, },


weapp: { weapp: {
@@ -159,4 +160,4 @@ for (var key in config.api) {
config.api[key] = apiPrefix + config.api[key]; config.api[key] = apiPrefix + config.api[key];
} }
*/ */
module.exports = config;
module.exports = config;

+ 1
- 2
pages/coupon/detail/index.wxml 查看文件

@@ -16,8 +16,6 @@
</view> </view>
<text class="restNum fr">剩余<text>{{data.remainInventory}}件</text></text> <text class="restNum fr">剩余<text>{{data.remainInventory}}件</text></text>
</view> </view>


<view class='rest' wx:if="{{data.endTime!=undefined&&data.endTime>=0&&data.type!=5}}"> <view class='rest' wx:if="{{data.endTime!=undefined&&data.endTime>=0&&data.type!=5}}">
<text class='txt01'>距结束:</text> <text class='txt01'>距结束:</text>
<text class='time'>{{endtime}}</text> <text class='time'>{{endtime}}</text>
@@ -65,5 +63,6 @@
<button bindtap='orderFunc' hover-class='active' class='buy' wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0}}"><text class='txt'>{{data.salePriceStr}}元</text>马上购买</button> <button bindtap='orderFunc' hover-class='active' class='buy' wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0}}"><text class='txt'>{{data.salePriceStr}}元</text>马上购买</button>
<button bindtap='orderFunc' class='buy' wx:elif="{{data.salePriceStr==0&&data.remainInventory!=0}}">免费领取</button> <button bindtap='orderFunc' class='buy' wx:elif="{{data.salePriceStr==0&&data.remainInventory!=0}}">免费领取</button>
<button class='buy' wx:elif="{{data.remainInventory==0}}" style="background:#999;color: #fff;">已售罄</button> <button class='buy' wx:elif="{{data.remainInventory==0}}" style="background:#999;color: #fff;">已售罄</button>
<button class='buy' wx:elif="{{data.status==1}}" style="background:#999;color: #fff;">已下架</button>
</view> </view>
</view> </view>

+ 2
- 2
pages/grade/grade.js 查看文件

@@ -40,12 +40,12 @@ Page({


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


+ 20
- 13
pages/grade/grade.wxml 查看文件

@@ -5,20 +5,20 @@
<view class="scroll-view-item"> <view class="scroll-view-item">
<view class='thin_circle'> <view class='thin_circle'>
<view class='view'> <view class='view'>
<text>访问</text>
<text>登</text>
<text>每日</text>
<text>登</text>
</view> </view>
</view> </view>
<text>{{logincount}}成长值</text>
<text>{{loginscoreNumber}}成长值</text>
</view> </view>
<view class="scroll-view-item"> <view class="scroll-view-item">
<view class='thin_circle'> <view class='thin_circle'>
<view class='view'> <view class='view'>
<text>线上</text> <text>线上</text>
<text>交易</text>
<text>交易1元</text>
</view> </view>
</view> </view>
<text>{{loginscoreNumber}}成长值</text>
<text>{{consumptionScoreNumber}}成长值</text>
</view> </view>
<view class="scroll-view-item"> <view class="scroll-view-item">
<view class='thin_circle'> <view class='thin_circle'>
@@ -41,8 +41,8 @@
<view class="scroll-view-item"> <view class="scroll-view-item">
<view class='thin_circle'> <view class='thin_circle'>
<view class='view'> <view class='view'>
<text>接</text>
<text>系统WIFI</text>
<text>接</text>
<text>WIFI一次</text>
</view> </view>
</view> </view>
<text>{{wifiscoreNumber}}成长值</text> <text>{{wifiscoreNumber}}成长值</text>
@@ -50,11 +50,11 @@
<view class="scroll-view-item"> <view class="scroll-view-item">
<view class='thin_circle last'> <view class='thin_circle last'>
<view class="view"> <view class="view">
<text>补充</text>
<text>个人信息</text>
<text>绑定</text>
<text>车牌一个</text>
</view> </view>
</view> </view>
<text>{{wifinumber}}成长值</text>
<text>{{bindCarScoreNumber}}成长值</text>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@@ -66,9 +66,16 @@
<image wx:if="{{index==1}}" class="grade fl" mode='widthFix' src="./../../assets/img/grade1.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==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==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>
<image wx:if="{{index==4}}" class="grade fl" mode='widthFix' src="./../../assets/img/grade3.png"></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>
<view class='des' wx:if="{{item.description==''}}">无</view> <view class='des' wx:if="{{item.description==''}}">无</view>
<view class='des' wx:if="{{item.description!=''}}">{{item.description}}</view> <view class='des' wx:if="{{item.description!=''}}">{{item.description}}</view>


+ 21
- 7
pages/grade/grade.wxss 查看文件

@@ -3,10 +3,14 @@
white-space: nowrap; white-space: nowrap;
} }


.scroll-view-item:first-child{
margin-left: 20rpx!important;
}

.thin_circle { .thin_circle {
position: relative; position: relative;
height: 132rpx;
width: 132rpx;
height: 140rpx;
width: 140rpx;
border: 1px solid #f69948; border: 1px solid #f69948;
display: inline-block; display: inline-block;
border-radius: 50%; border-radius: 50%;
@@ -19,7 +23,7 @@
} }


.scroll { .scroll {
padding: 0 56rpx 20rpx;
padding: 0 30rpx 20rpx 30rpx;
margin-top: 22rpx; margin-top: 22rpx;
} }


@@ -80,8 +84,8 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
margin: auto; margin: auto;
width: 108rpx !important;
height: 108rpx !important;
width: 120rpx !important;
height: 120rpx !important;
border: 3px solid #f69948; border: 3px solid #f69948;
border-radius: 50%; border-radius: 50%;
} }
@@ -135,7 +139,7 @@ visibility: hidden;
} }


.quanyi > view:nth-of-type(5) .titles { .quanyi > view:nth-of-type(5) .titles {
color: #fd9643;
color: #2ac19c;
} }


.part { .part {
@@ -167,5 +171,15 @@ visibility: hidden;
border-left:6rpx dotted #2ac19c; border-left:6rpx dotted #2ac19c;
} }
.quanyi > view:nth-of-type(5) .des{ .quanyi > view:nth-of-type(5) .des{
border-left:6rpx dotted #fd9643;
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;
}

+ 12
- 2
pages/index/index.js 查看文件

@@ -94,11 +94,20 @@ Page({
success: ({ success: ({
code code
}) => { }) => {
wx.getSystemInfo({
success: function (res) {
console.log(JSON.stringify(res))
that.setData({
systemInfo: JSON.stringify(res)
})
}
})
var usrdata = { var usrdata = {
appId: config.weapp.AppId, appId: config.weapp.AppId,
code: code, code: code,
sceneAddress: app.globalData.sceneAddress, sceneAddress: app.globalData.sceneAddress,
scene: that.data.scene
scene: that.data.scene,
systemInfo: that.data.systemInfo
}; };
if (app.globalData.locationInfo) { if (app.globalData.locationInfo) {
usrdata = { usrdata = {
@@ -107,7 +116,8 @@ Page({
sceneAddress: app.globalData.sceneAddress, sceneAddress: app.globalData.sceneAddress,
latitude: "" + app.globalData.locationInfo.latitude, latitude: "" + app.globalData.locationInfo.latitude,
longitude: "" + app.globalData.locationInfo.longitude, longitude: "" + app.globalData.locationInfo.longitude,
scene: that.data.scene
scene: that.data.scene,
systemInfo: that.data.systemInfo
}; };
} }
Http.post({ Http.post({


+ 1
- 1
pages/index/index.wxss 查看文件

@@ -25,7 +25,7 @@ page {
} }


.game { .game {
/* display: none; */
display: none;
position: relative; position: relative;
width: 750rpx; width: 750rpx;
height: 200rpx; height: 200rpx;


+ 1
- 0
pages/index/rushToBuy/index.js 查看文件

@@ -1,6 +1,7 @@
// pages/index/sw/index.js // pages/index/sw/index.js
let config = require("../../../config/config.js"); let config = require("../../../config/config.js");
let Http = require("../../../utils/HttpBasics"); let Http = require("../../../utils/HttpBasics");
// let Http = require("../../../utils/HttpBasics");
const app = getApp(); const app = getApp();
Component({ Component({
/** /**


+ 33
- 2
pages/user/index.js 查看文件

@@ -18,6 +18,36 @@ Page({
url: '/pages/grade/grade', url: '/pages/grade/grade',
}) })
}, },
getrun:function(){
let that = this;
wx.getWeRunData({
success: function (res) {
console.log(res);
Http.post({
url: config.api.getWeRunData,
data: {
encryptedData: res.encryptedData,
iv: res.iv
}
}).then(res => {
console.log(res);
that.setData({
step: res.data.stepInfoList[30].step
})
})
}
})
},
getxinghao:function(){
wx.getSystemInfo({
success:function(res){
console.log(res);
wx.showModal({
content: res.brand,
})
}
})
},
navigateTo() { navigateTo() {
wx.navigateTo({ wx.navigateTo({
url: `/pages/login/index` url: `/pages/login/index`
@@ -29,7 +59,7 @@ Page({
*/ */
let that = this; let that = this;
if (that.data.flag == 'hidden') { if (that.data.flag == 'hidden') {
that.setData({
that.setData({
flag: 'show' flag: 'show'
}); });
} }
@@ -79,7 +109,8 @@ Page({
score: res.data.score, score: res.data.score,
levelName: res.data.levelName levelName: res.data.levelName
}) })
})
});
that.getrun();
}, },


/** /**


+ 3
- 0
pages/user/index.wxss 查看文件

@@ -219,6 +219,9 @@
overflow: hidden; overflow: hidden;
box-shadow:0 6px 20px 0 rgba(0,0,0,0.15); box-shadow:0 6px 20px 0 rgba(0,0,0,0.15);
} }
.act{
display: none;
}
.of{ .of{
display: block; display: block;
} }

正在加载...
取消
保存