Commit 250ef05d by 梁建民

add

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