Commit 2192c2a1 by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsalesProgram

parents 9a4c0652 b0187041
// pages/person/exchange/index.js
const http = require('../../../utils/util.js');
import {
apis
} from '../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
tabIndex: 1
tabIndex: 1,
integralBillsList: [],
userExchanges: []
},
/**
......@@ -26,7 +33,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getData();
},
/**
......@@ -57,18 +64,61 @@ Page({
},
/**
* 获取数据
*/
getData: function () {
let url = '';
if (this.data.tabIndex == 1) {
url = apis.integralBillsList;
} else if (this.data.tabIndex == 2) {
url = apis.userExchangesList;
}
http.getData(url, 'GET', null, (res) => {
if (res.errcode === 0) {
if (this.data.tabIndex == 1) {
this.setData({
integralBillsList: res.data
});
} else if (this.data.tabIndex == 2) {
this.setData({
userExchanges: res.data
});
}
}
}, true, false, true);
},
/**
* tab切换
*/
switchTab: function (e) {
let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) {
return;
} else {
this.setData({
tabIndex: i,
})
}
});
this.getData();
},
/**
* 跳转地址
*/
toUrl: function () {
wx.navigateTo({
url: '/pages/person/withdrawal/index'
});
}
})
\ No newline at end of file
......@@ -17,7 +17,8 @@
font-size: 22rpx;
line-height: 30rpx;
}
.t2s{
.t2s {
color: #EA1717;
font-size: 22rpx;
line-height: 30rpx;
......@@ -45,6 +46,7 @@
font-size: 24rpx;
color: #8A9299;
}
}
}
......
......@@ -11,69 +11,46 @@
</view>
<block wx:if="{{tabIndex == 1}}">
<view class="content">
<block wx:for="{{integralBillsList}}" wx:key="item">
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">首次上传库存奖励</text>
<text class="t2">2019-05-10 10:15</text>
<text class="t1">{{item.name}}</text>
<text class="t2">{{item.add_time}}</text>
</view>
<view>
<text class="t3">+</text>
<text class="t4">¥0.05</text>
</view>
</view>
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">首次上传库存奖励</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view>
<text class="t3">+</text>
<text class="t4">¥0.05</text>
</view>
</view>
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">首次上传库存奖励</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view>
<text class="t3">+</text>
<text class="t4">¥0.05</text>
<text class="t4">¥{{item.amount}}</text>
</view>
</view>
</block>
</view>
</block>
<block wx:else>
<view class="content">
<block wx:for="{{userExchanges}}" wx:key="item">
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">话费充值</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="t6">
15012479484
<text class="t1">{{item.type}}</text>
<text class="t2">{{item.add_time}}</text>
</view>
<view class="t6">{{item.mobile}}</view>
<view class="column">
<text class="t5">¥50</text>
<text class="t5">¥{{item.amount}}</text>
<block wx:if="{{item.status == 1}}">
<text class="t2">充值成功</text>
</view>
</view>
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">话费充值</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="t6">
15012479484
</view>
<view class="column">
<text class="t5">¥50</text>
</block>
<block wx:elif="{{item.status == 0}}">
<text class="t2">审核中</text>
</block>
<block wx:else>
<text class="t2s">充值失败</text>
</block>
</view>
</view>
</block>
</view>
</block>
<view class="btn">
<view class="btn" bind:tap="toUrl">
<text class="icon iconfont iconiconxiantiaoshouji28"></text>
<text class="t1">提现兑换</text>
</view>
......
......@@ -10,6 +10,7 @@ Page({
* 页面的初始数据
*/
data: {
assistsList: '',
exchange_id: ''
},
......@@ -62,6 +63,24 @@ Page({
},
/**
* 助力
*/
assistance: function () {
http.getData(apis.assistsAdd, 'GET', {
exchange_id: 24
}, (res) => {
if (res.errcode === 0) {
this.getData();
} else {
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, true, false, true);
},
/**
* 获取数据
*/
getData: function (type) {
......@@ -70,7 +89,9 @@ Page({
exchange_id: 24
}, (res) => {
if (res.errcode === 0) {
this.setData({
assistsList: res.data
});
}
}, true, false, true);
......
......@@ -89,6 +89,19 @@
text-align: center;
line-height: 80rpx;
}
.btn_1 {
margin: 168rpx auto 0;
width: 380rpx;
height: 80rpx;
background-image: linear-gradient(0deg, #dd1b33 0%, #e9196c 100%);
box-shadow: 0px 6rpx 0px 0px #cb0a3f, inset 0px 0px 10rpx 0px rgba(255, 255, 255, 0.26);
border-radius: 40rpx;
color: #ffffff;
font-size: 38rpx;
text-align: center;
line-height: 80rpx;
}
}
}
......@@ -118,7 +131,7 @@
margin: 60rpx auto 0;
.list {
width: 101rpx;
width: 100rpx;
height: 100rpx;
background: rgba(5, 5, 5, 0.2);
border: dashed 2px #ffffff;
......@@ -126,6 +139,19 @@
text-align: center;
line-height: 100rpx;
border-radius: 50%;
box-sizing: border-box;
&.list-pic {
border: solid 2px transparent;
background: none;
image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
&:first-child {
margin-right: 59rpx;
......
<view class="helpfriend">
<view class="wrap">
<view class="con">
<image class="im" src="http://img.ichunt.com/images/ichunt/minProgram/4c42da6667beedcd6688f504138fa3be.jpg"></image>
<text class="t1">深圳市猎芯科技有限公司</text>
<image class="im" src="{{assistsList.user_info.avatar}}"></image>
<text class="t1">{{assistsList.user_info.company_name}}</text>
<view class="t2">
我正在提现
<text>5元</text>
<text>{{assistsList.amount}}元</text>
现金红包,
</view>
<text class="t3">请帮我助力吧! 谢谢!</text>
<button class="btn">分享给好友</button>
<block wx:if="{{assistsList.need_assist_count > 0 }}">
<button class="btn_1" bind:tap="assistance">助力好友</button>
</block>
<block wx:else>
<button class="btn">助力成功,我也要红包</button>
</block>
<view class="t4">
还需
<text>1人</text>
<text>{{assistsList.need_assist_count}}人</text>
助力
</view>
</view>
......@@ -20,9 +25,23 @@
<view class="bar">
<text class="t1">*助力好友需要登录后,才能帮助好友助力</text>
<view class="bg">助力记录</view>
<view class="pic row rowCenter">
<view class="pic row verCenter rowCenter">
<block wx:if="{{assistsList.assist_list.length > 0 && assistsList.assist_list[0]}}">
<view class="list list-pic row verCenter">
<image src="{{assistsList.assist_list[0].assist_user_avatar}}"></image>
</view>
</block>
<block wx:else>
<view class="list">?</view>
</block>
<block wx:if="{{assistsList.assist_list.length > 0 && assistsList.assist_list[1]}}">
<view class="list list-pic row verCenter">
<image src="{{assistsList.assist_list[1].assist_user_avatar}}"></image>
</view>
</block>
<block wx:else>
<view class="list">?</view>
</block>
</view>
<view class="bg">活动规则</view>
</view>
......
......@@ -81,6 +81,18 @@
text-align: center;
line-height: 80rpx;
}
.helpfriend .wrap .con .btn_1 {
margin: 168rpx auto 0;
width: 380rpx;
height: 80rpx;
background-image: linear-gradient(0deg, #dd1b33 0%, #e9196c 100%);
box-shadow: 0px 6rpx 0px 0px #cb0a3f, inset 0px 0px 10rpx 0px rgba(255, 255, 255, 0.26);
border-radius: 40rpx;
color: #ffffff;
font-size: 38rpx;
text-align: center;
line-height: 80rpx;
}
.helpfriend .bar {
padding-top: 155rpx;
text-align: center;
......@@ -105,7 +117,7 @@
margin: 60rpx auto 0;
}
.helpfriend .bar .pic .list {
width: 101rpx;
width: 100rpx;
height: 100rpx;
background: rgba(5, 5, 5, 0.2);
border: dashed 2px #ffffff;
......@@ -113,6 +125,16 @@
text-align: center;
line-height: 100rpx;
border-radius: 50%;
box-sizing: border-box;
}
.helpfriend .bar .pic .list.list-pic {
border: solid 2px transparent;
background: none;
}
.helpfriend .bar .pic .list.list-pic image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.helpfriend .bar .pic .list:first-child {
margin-right: 59rpx;
......
......@@ -52,7 +52,7 @@
"list": []
},
"miniprogram": {
"current": 8,
"current": 0,
"list": [
{
"id": -1,
......@@ -91,37 +91,29 @@
},
{
"id": -1,
"name": "pages/person/company/index",
"pathName": "pages/person/company/index",
"name": "pages/person/invitationrecord/index",
"pathName": "pages/person/invitationrecord/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/editcompany/index",
"pathName": "pages/person/editcompany/index",
"name": "pages/person/packet/index",
"pathName": "pages/person/packet/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/notice/index",
"pathName": "pages/person/notice/index",
"name": "pages/person/helpfriend/index",
"pathName": "pages/person/helpfriend/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/privacy/index",
"pathName": "pages/person/privacy/index",
"query": "",
"scene": null
},
{
"id": 8,
"name": "pages/detail/company/index",
"pathName": "pages/detail/company/index",
"query": "type=2&userId=93",
"name": "pages/person/exchange/index",
"pathName": "pages/person/exchange/index",
"scene": null
}
]
......
......@@ -282,7 +282,7 @@ const apis = {
/**
* 兑换记录(话费充值, 微信转账)
*/
userExchanges: welfare_url + '/user_exchanges/list',
userExchangesList: welfare_url + '/user_exchanges/list',
/**
* 兑换配置列表(话费, 微信兑换页面的可兑换项)
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment