Commit 250ef05d by 梁建民

add

parent c8d39dde
......@@ -10,7 +10,7 @@ image {
vertical-align: middle;
}
.va-m{
.va-m {
vertical-align: middle;
}
......@@ -53,7 +53,7 @@ image {
align-items: center;
}
.boxFlex{
.boxFlex {
-webkit-box-flex: 1;
-moz-box-flex: 1;
-webkit-flex: 1;
......@@ -61,7 +61,15 @@ image {
flex: 1;
}
.tc{
.boxFlexs {
-webkit-box-flex: 2;
-moz-box-flex: 2;
-webkit-flex: 2;
-ms-flex: 2;
flex: 2;
}
.tc {
text-align: center;
}
......@@ -123,8 +131,8 @@ image {
}
.placeholderClass {
color: #adb6bf;
font-size:28rpx;
color: #adb6bf;
font-size: 28rpx;
}
/* /头部搜索公共样式 */
......@@ -135,7 +143,7 @@ image {
.nodata .img {
width: 600rpx;
height:393rpx;
height: 393rpx;
margin: 0 auto;
}
......@@ -287,22 +295,26 @@ image {
background-color: #0d84d1;
box-shadow: 0px 6px 10px 0px rgba(97, 160, 242, 0.3);
}
.btn-com-disable{
.btn-com-disable {
background-color: #DAE1E7;
}
.data-bottom{
padding:24rpx 60rpx;
.data-bottom {
padding: 24rpx 60rpx;
}
.data-bottom .line{
height:1px;
border-top:1px solid #F0F4F7;
flex:0 0 200rpx;
.data-bottom .line {
height: 1px;
border-top: 1px solid #F0F4F7;
flex: 0 0 200rpx;
}
.data-bottom .text{
.data-bottom .text {
font-size: 26rpx;
color:#8A9299;
flex:1;
color: #8A9299;
flex: 1;
text-align: center;
}
......@@ -313,10 +325,12 @@ image {
overflow: hidden;
transition: height linear .25s;
}
.tip.noheight{
height:0;
.tip.noheight {
height: 0;
}
.tip .close-icon {
color: #d8dfe6;
}
......@@ -341,16 +355,19 @@ image {
.tip-c .pc-url {
color: #61a0f2;
}
/***消息模块的公共样式*/
.message-item {
margin-left: 25rpx;
padding: 24rpx 24rpx 24rpx 0;
}
.message-avar {
height: 68rpx;
width: 68rpx;
border-radius: 50% 50%;
}
.system-avar {
flex: 0 0 68rpx;
background-color: #52cca8;
......@@ -363,6 +380,7 @@ image {
font-size: 40rpx;
color: #fff;
}
.message-l-view {
margin-left: 24rpx;
}
......@@ -388,9 +406,11 @@ image {
color: #adb6bf;
padding-bottom: 12rpx;
}
.message-t-text{
.message-t-text {
white-space: normal;
}
/**询报价列表**/
/**字体**/
@import 'res/fonts/iconfont.wxss'
\ No newline at end of file
// pages/person/invitation/index.js
const http = require('../../../utils/util.js');
import {
apis
} from '../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
invitesInfo: {}
},
/**
......@@ -26,7 +31,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getData();
},
/**
......@@ -56,4 +61,54 @@ Page({
onReachBottom: function () {
},
/**
* 分享
*/
onShareAppMessage: function (res) {
http.getData(apis.invitesAdd, 'GET', {
user_id: this.data.invitesInfo.user_id
}, (res) => {
if (res.errcode === 0) {
}
}, false, false, true);
return {
title: '邀请好友',
path: "/pages/person/invitation/index"
}
},
toUrl: function (e) {
if (this.data.invitesInfo.amount <= 0) {
wx.showToast({
title: '您暂未成功邀请好友',
icon: 'none',
duration: 2000
});
return false;
} else {
wx.navigateTo({
url: '/pages/person/withdrawal/index'
});
}
},
/**
* 获取数据
*/
getData: function (type) {
http.getData(apis.invitesInfo, 'GET', null, (res) => {
if (res.errcode === 0) {
this.setData({
invitesInfo: res.data
});
}
}, true, false, true);
}
})
\ No newline at end of file
......@@ -16,20 +16,20 @@
<view class="show-text row verCenter rowCenter">
<view class="column boxFlex tc">
<text class="t1">邀请人数</text>
<text class="t2 mt">12</text>
<text class="t3">邀请记录</text>
<text class="t2 mt">{{invitesInfo.count}}</text>
<navigator url="/pages/person/invitationrecord/index" class="t3">邀请记录</navigator>
</view>
<view class="column boxFlex tc">
<text class="t1">获得红包</text>
<view class="mt">
<text class="t2">0.00</text>
<text class="t2">{{invitesInfo.amount}}</text>
<text class="t1">元</text>
</view>
<text class="t3">立即提现</text>
<text class="t3" bind:tap="toUrl">立即提现</text>
</view>
</view>
</view>
<button class="btn">立即邀请赚钱</button>
<button class="btn" open-type="share">立即邀请赚钱</button>
<view class="show-ico row verCenter avarage">
<view class="column">
<text class="icon iconfont iconjuxing6"></text>
......
// pages/person/invitationrecord/index.js
const http = require('../../../utils/util.js');
import {
apis
} from '../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
invitesList: []
},
/**
......@@ -26,7 +30,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getData();
},
/**
......@@ -56,4 +60,20 @@ Page({
onReachBottom: function () {
},
/**
* 获取数据
*/
getData: function (type) {
http.getData(apis.invitesList, 'GET', null, (res) => {
if (res.errcode === 0) {
this.setData({
invitesList: res.data
});
}
}, true, false, true);
}
})
\ No newline at end of file
<view class="invitationrecord" hover-class="none" hover-stop-propagation="false">
<view class="wrap row bothSide verCenter bor">
<view class="column">
<text class="t1">深圳市猎芯科技有限公司</text>
<text class="t2">2019-05-10 10:15</text>
<block wx:if="{{invitesList.length > 0}}">
<block wx:for="{{invitesList}}" wx:key="item">
<view class="wrap row bothSide verCenter bor">
<view class="column">
<text class="t1">{{item.invited_user_name}}</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="row verCenter">
<text class="t3">+</text>
<text class="t4">¥{{item.amount}}</text>
</view>
</view>
</block>
</block>
<block wx:else>
<view class="nodata">
<image src="/res/images/imgs/noxb.png" class="img"></image>
<view class="h3 bold">暂无邀请记录</view>
</view>
<view class="row verCenter">
<text class="t3">+</text>
<text class="t4">¥0.05</text>
</view>
</view>
<view class="wrap row bothSide verCenter bor">
<view class="column">
<text class="t1">深圳市猎芯科技有限公司</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="row verCenter">
<text class="t3">+</text>
<text class="t4">¥0.05</text>
</view>
</view>
</block>
</view>
\ No newline at end of file
// pages/person/withdrawal/index.js
const http = require('../../../utils/util.js');
import {
apis
} from '../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
tabIndex: 1
tabIndex: 1,
exchangeSettings: {},
integral: '',
can_exchange: '',
mobile: '',
indexOf: -1,
weixin_exchange_info: {}
},
/**
......@@ -26,7 +36,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getData(1);
},
/**
......@@ -57,6 +67,38 @@ Page({
},
/**
* 获取数据
*/
getData: function (type) {
http.getData(apis.exchangeSettings, 'GET', {
type: type
}, (res) => {
if (res.errcode === 0) {
this.setData({
exchangeSettings: res.data,
integral: res.integral,
can_exchange: res.can_exchange,
mobile: res.mobile,
weixin_exchange_info: res.weixin_exchange_info
});
}
}, true, false, true);
},
/**
* 选择金额
*/
tab: function (e) {
let index = e.currentTarget.dataset.index;
this.setData({
indexOf: index
});
},
/**
* tab切换
*/
switchTab: function (e) {
......@@ -64,13 +106,107 @@ Page({
if (i == 1) {
this.setData({
tabIndex: 1
tabIndex: 1,
indexOf: -1
});
this.getData(1);
} else if (i == 2) {
this.setData({
tabIndex: 2
tabIndex: 2,
indexOf: -1
});
this.getData(2);
}
},
/**
* 提现
*/
withdrawal: function (e) {
if (this.data.can_exchange === 0) {
wx.showToast({
title: '今天已经兑换过了,请明天再来吧',
icon: 'none',
duration: 2000
});
return false;
} else if (this.data.can_exchange === -1) {
wx.showToast({
title: '用户无法兑换,用户未认证',
icon: 'none',
duration: 2000
});
return false;
}
if (this.data.indexOf == -1) {
wx.showToast({
title: '请选择金额',
icon: 'none',
duration: 2000
});
return false;
}
let exchange_id = this.data.exchangeSettings[this.data.indexOf].id;
},
/**
* 提交
*/
submit: function (e) {
if (this.data.can_exchange === 0) {
wx.showToast({
title: '今天已经兑换过了,请明天再来吧',
icon: 'none',
duration: 2000
});
return false;
} else if (this.data.can_exchange === -1) {
wx.showToast({
title: '用户无法兑换,用户未认证',
icon: 'none',
duration: 2000
});
return false;
}
if (this.data.indexOf == -1) {
wx.showToast({
title: '请选择金额',
icon: 'none',
duration: 2000
});
return false;
}
let exchange_id = this.data.exchangeSettings[this.data.indexOf].id;
if (exchange_id) {
http.getData(apis.userExchanges, 'GET', {
exchange_id: exchange_id
}, (res) => {
if (res.errcode === 0) {
wx.navigateTo({
url: '/pages/person/withdrawalsuccess/index'
});
} else {
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, true, false, true);
}
}
})
\ No newline at end of file
......@@ -142,13 +142,13 @@
font-size: 32rpx;
color: #515559;
line-height: 45rpx;
font-weight: 600;
}
.t2 {
font-size: 22rpx;
color: #8A9299;
line-height: 30px;
line-height: 30rpx;
}
&.curr {
......@@ -209,4 +209,8 @@
color: #8A9299;
}
}
}
.opacity {
opacity: 0.5;
}
\ No newline at end of file
......@@ -18,81 +18,45 @@
<text class="t1">红包提现</text>
</view>
</view>
<block wx:if="{{tabIndex == '1'}}">
<block wx:if="{{tabIndex == 1}}">
<view class="content">
<view class="inp boxsiz row bothSide verCenter">
<view class="boxFlex">
<input type="text" placeholder="" value="15012479484" class="inpt"></input>
<view class="boxFlexs">
<input type="text" placeholder="" value="{{mobile}}" class="inpt" disabled></input>
</view>
<text class="boxFlex t1">默认注册号码</text>
</view>
<view class="bar boxsiz row verCenter">
<text class="t1">兑换话费</text>
<text class="t2">账户红包:¥10.94</text>
<text class="t2">账户红包:¥{{integral}}</text>
</view>
<view class="list row avarage boxsiz">
<view class="wrap column rowCenter verCenter">
<text class="t1">10元</text>
<text class="t2">剩余名额:10</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">20元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">30元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">50元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">100元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">200元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="list row boxsiz">
<block wx:for="{{exchangeSettings}}" wx:key="item" wx:for-index="index">
<view class="wrap column rowCenter verCenter boxsiz {{index == indexOf ? 'curr':''}}" data-index="{{index}}" data-id="{{item.id}}" data-stock="{{item.stock}}" bind:tap="tab">
<text class="t1">{{item.name}}</text>
<text class="t2">剩余名额:{{item.stock}}</text>
</view>
</block>
</view>
<button class="btn">立即兑换</button>
<button class="btn {{can_exchange == -1 ? 'opacity':''}}" bind:tap="submit">立即兑换</button>
</view>
</block>
<block wx:elif="{{tabIndex == '2'}}">
<block wx:elif="{{tabIndex == 2}}">
<view class="content">
<view class="bar boxsiz row verCenter">
<text class="t1">红包提现</text>
<text class="t2">账户红包:¥10.94</text>
<text class="t2">账户红包:¥{{integral}}</text>
</view>
<view class="list row avarage boxsiz">
<view class="wrap column rowCenter verCenter">
<text class="t1">1元</text>
<text class="t2">剩余名额:10</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">5元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">10元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">20元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">50元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">100元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="list row boxsiz">
<block wx:for="{{exchangeSettings}}" wx:key="item" wx:for-index="index">
<view class="wrap column rowCenter verCenter boxsiz {{index == indexOf ? 'curr':''}}" data-index="{{index}}" data-id="{{item.id}}" data-stock="{{item.stock}}" bind:tap="tab">
<text class="t1">{{item.name}}</text>
<text class="t2">剩余名额:{{item.stock}}</text>
</view>
</block>
</view>
<button class="btn">申请提现</button>
<text class="fr-txt">好友助力,已完成(2/2)</text>
<button class="btn {{can_exchange == -1 ? 'opacity':''}}" bind:tap="submit">申请提现</button>
<text class="fr-txt">好友助力,已完成({{weixin_exchange_info.exchanging}}/2)</text>
</view>
</block>
<view class="txt column">
......
......@@ -119,11 +119,12 @@
font-size: 32rpx;
color: #515559;
line-height: 45rpx;
font-weight: 600;
}
.withdrawal .content .list .wrap .t2 {
font-size: 22rpx;
color: #8A9299;
line-height: 30px;
line-height: 30rpx;
}
.withdrawal .content .list .wrap.curr {
background: #ffffff;
......@@ -171,3 +172,6 @@
line-height: 42rpx;
color: #8A9299;
}
.opacity {
opacity: 0.5;
}
......@@ -69,9 +69,31 @@
"scene": null
},
{
"id": 2,
"name": "pages/person/withdrawal/index",
"pathName": "pages/person/withdrawal/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/welfare/index",
"pathName": "pages/person/welfare/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/invitation/index",
"pathName": "pages/person/invitation/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/invitationrecord/index",
"pathName": "pages/person/invitationrecord/index",
"query": "",
"scene": null
}
]
......
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