Commit 777a7291 by 梁建民

css、

parent d17cd5e8
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
"pages/person/invitation/index", "pages/person/invitation/index",
"pages/person/invitationrecord/index", "pages/person/invitationrecord/index",
"pages/form/report/index", "pages/form/report/index",
"pages/list/notice/index" "pages/list/notice/index",
"pages/person/helpfriend/index"
], ],
"subPackages": [ "subPackages": [
{ {
......
const http = require('../../../utils/util.js');
import {
apis
} from '../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
exchange_id: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getData();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 获取数据
*/
getData: function (type) {
http.getData(apis.assistsList, 'GET', {
exchange_id: 24
}, (res) => {
if (res.errcode === 0) {
}
}, true, false, true);
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "好友助力",
"navigationBarBackgroundColor": "#e9196c",
"navigationBarTextStyle": "white",
"backgroundColor": "#0d84d1"
}
\ No newline at end of file
.helpfriend {
background: #e01b34;
width: 100%;
padding-bottom: 57rpx;
overflow-x: hidden;
.wrap {
position: relative;
width: 100%;
height: 970rpx;
background: url('http://img.ichunt.com/images/ichunt/minProgram/3e45f01531a74905046d3366b17a858d.png') no-repeat center;
background-size: cover;
.con {
position: absolute;
top: 374rpx;
left: 0;
right: 0;
width: 100%;
height: 746rpx;
background: url('http://img.ichunt.com/images/ichunt/minProgram/14a97c92b299de4fd8e0d7fc014b022a.png') no-repeat center;
background-size: cover;
z-index: 11;
.im {
position: absolute;
top: -72rpx;
left: 0;
right: 0;
width: 160rpx;
height: 160rpx;
border-radius: 50%;
border: 2px solid #fff;
box-sizing: border-box;
margin: 0 auto;
}
.t1 {
margin-top: 121rpx;
display: block;
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
}
.t2 {
margin: 55rpx auto 29rpx;
color: #1a1a1a;
font-size: 32rpx;
text-align: center;
text {
font-size: 38rpx;
color: #de1c27;
font-weight: 600;
}
}
.t3 {
text-align: center;
display: block;
font-size: 32rpx;
color: #1a1a1a;
}
.t4 {
margin-top: 36rpx;
text-align: center;
font-size: 28rpx;
color: #1a1a1a;
text {
color: #de1c27;
font-weight: 600;
}
}
.btn {
margin: 168rpx auto 0;
width: 380rpx;
height: 80rpx;
background-image: linear-gradient(0deg, #ff7316 0%, #f3cc14 100%);
box-shadow: 0px 6rpx 0px 0px #cb7700, 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;
}
}
}
.bar {
padding-top: 155rpx;
text-align: center;
.t1 {
text-align: center;
font-size: 24rpx;
color: #ed6f6f;
}
.bg {
width: 222rpx;
height: 47rpx;
background: url('http://img.ichunt.com/images/ichunt/minProgram/4b9701dd685f038d017ef70fb9f40b23.png') no-repeat center;
background-size: contain;
font-size: 36rpx;
color: #ffffff;
text-align: center;
line-height: 47rpx;
margin: 84rpx auto 0;
}
.pic {
margin: 60rpx auto 0;
.list {
width: 101rpx;
height: 100rpx;
background: rgba(5, 5, 5, 0.2);
border: dashed 2px #ffffff;
color: #fff;
text-align: center;
line-height: 100rpx;
border-radius: 50%;
&:first-child {
margin-right: 59rpx;
}
}
}
}
.text {
margin: 57rpx auto 83rpx;
padding: 0 0 0 55rpx;
text {
font-size: 24rpx;
color: #ff9292;
line-height: 31rpx;
display: block;
margin-bottom: 24rpx;
}
}
.footer {
display: block;
font-size: 22rpx;
color: #ed6f6f;
text-align: center;
}
}
\ No newline at end of file
<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>
<view class="t2">
我正在提现
<text>5元</text>
现金红包,
</view>
<text class="t3">请帮我助力吧! 谢谢!</text>
<button class="btn">分享给好友</button>
<view class="t4">
还需
<text>1人</text>
助力
</view>
</view>
</view>
<view class="bar">
<text class="t1">*助力好友需要登录后,才能帮助好友助力</text>
<view class="bg">助力记录</view>
<view class="pic row rowCenter">
<view class="list">?</view>
<view class="list">?</view>
</view>
<view class="bg">活动规则</view>
</view>
<view class="text">
<text>1. 用户需邀请2名芯掌柜用户助力即可提现;</text>
<text>2. 每位用户每天只能提现1次;</text>
<text>3. 助力成功申请现金提现于1-3个工作日内通过微信钱包入帐;</text>
<text>4. 不得使用任何不正当手段破坏活动规则,否则驳回提现申请。</text>
</view>
<text class="footer">*在法律允许范围内,本活动最终解释权归芯掌柜所有*</text>
</view>
\ No newline at end of file
.helpfriend {
background: #e01b34;
width: 100%;
padding-bottom: 57rpx;
overflow-x: hidden;
}
.helpfriend .wrap {
position: relative;
width: 100%;
height: 970rpx;
background: url('http://img.ichunt.com/images/ichunt/minProgram/3e45f01531a74905046d3366b17a858d.png') no-repeat center;
background-size: cover;
}
.helpfriend .wrap .con {
position: absolute;
top: 374rpx;
left: 0;
right: 0;
width: 100%;
height: 746rpx;
background: url('http://img.ichunt.com/images/ichunt/minProgram/14a97c92b299de4fd8e0d7fc014b022a.png') no-repeat center;
background-size: cover;
z-index: 11;
}
.helpfriend .wrap .con .im {
position: absolute;
top: -72rpx;
left: 0;
right: 0;
width: 160rpx;
height: 160rpx;
border-radius: 50%;
border: 2px solid #fff;
box-sizing: border-box;
margin: 0 auto;
}
.helpfriend .wrap .con .t1 {
margin-top: 121rpx;
display: block;
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
}
.helpfriend .wrap .con .t2 {
margin: 55rpx auto 29rpx;
color: #1a1a1a;
font-size: 32rpx;
text-align: center;
}
.helpfriend .wrap .con .t2 text {
font-size: 38rpx;
color: #de1c27;
font-weight: 600;
}
.helpfriend .wrap .con .t3 {
text-align: center;
display: block;
font-size: 32rpx;
color: #1a1a1a;
}
.helpfriend .wrap .con .t4 {
margin-top: 36rpx;
text-align: center;
font-size: 28rpx;
color: #1a1a1a;
}
.helpfriend .wrap .con .t4 text {
color: #de1c27;
font-weight: 600;
}
.helpfriend .wrap .con .btn {
margin: 168rpx auto 0;
width: 380rpx;
height: 80rpx;
background-image: linear-gradient(0deg, #ff7316 0%, #f3cc14 100%);
box-shadow: 0px 6rpx 0px 0px #cb7700, 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;
}
.helpfriend .bar .t1 {
text-align: center;
font-size: 24rpx;
color: #ed6f6f;
}
.helpfriend .bar .bg {
width: 222rpx;
height: 47rpx;
background: url('http://img.ichunt.com/images/ichunt/minProgram/4b9701dd685f038d017ef70fb9f40b23.png') no-repeat center;
background-size: contain;
font-size: 36rpx;
color: #ffffff;
text-align: center;
line-height: 47rpx;
margin: 84rpx auto 0;
}
.helpfriend .bar .pic {
margin: 60rpx auto 0;
}
.helpfriend .bar .pic .list {
width: 101rpx;
height: 100rpx;
background: rgba(5, 5, 5, 0.2);
border: dashed 2px #ffffff;
color: #fff;
text-align: center;
line-height: 100rpx;
border-radius: 50%;
}
.helpfriend .bar .pic .list:first-child {
margin-right: 59rpx;
}
.helpfriend .text {
margin: 57rpx auto 83rpx;
padding: 0 0 0 55rpx;
}
.helpfriend .text text {
font-size: 24rpx;
color: #ff9292;
line-height: 31rpx;
display: block;
margin-bottom: 24rpx;
}
.helpfriend .footer {
display: block;
font-size: 22rpx;
color: #ed6f6f;
text-align: center;
}
...@@ -15,6 +15,8 @@ Page({ ...@@ -15,6 +15,8 @@ Page({
can_exchange: '', can_exchange: '',
mobile: '', mobile: '',
indexOf: -1, indexOf: -1,
exchanging: false,
exchange_id: '',
weixin_exchange_info: {} weixin_exchange_info: {}
}, },
...@@ -67,6 +69,15 @@ Page({ ...@@ -67,6 +69,15 @@ Page({
}, },
/** /**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return {
title: '好友助力',
path: "/pages/person/helpfriend/index"
}
},
/**
* 获取数据 * 获取数据
*/ */
getData: function (type) { getData: function (type) {
...@@ -81,7 +92,8 @@ Page({ ...@@ -81,7 +92,8 @@ Page({
integral: res.integral, integral: res.integral,
can_exchange: res.can_exchange, can_exchange: res.can_exchange,
mobile: res.mobile, mobile: res.mobile,
weixin_exchange_info: res.weixin_exchange_info weixin_exchange_info: res.weixin_exchange_info,
exchange_id: res.weixin_exchange_info.exchange_id
}); });
} }
...@@ -151,6 +163,25 @@ Page({ ...@@ -151,6 +163,25 @@ Page({
let exchange_id = this.data.exchangeSettings[this.data.indexOf].id; 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) {
this.setData({
exchanging: true
})
} else {
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, true, false, true);
}
......
...@@ -182,6 +182,21 @@ ...@@ -182,6 +182,21 @@
line-height: 98rpx; line-height: 98rpx;
} }
.btns {
margin: 36rpx 55rpx 0 55rpx;
height: 98rpx;
background: rgba(255, 255, 255, 1);
border-radius: 8rpx;
font-size: 32rpx;
text-align: center;
display: block;
line-height: 98rpx;
border: 2rpx solid rgba(216, 223, 230, 1);
color: #0D84D1;
box-sizing: border-box;
}
.fr-txt { .fr-txt {
margin-top: 40rpx; margin-top: 40rpx;
font-size: 26rpx; font-size: 26rpx;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<view class="content"> <view class="content">
<view class="inp boxsiz row bothSide verCenter"> <view class="inp boxsiz row bothSide verCenter">
<view class="boxFlexs"> <view class="boxFlexs">
<input type="text" placeholder="" value="{{mobile}}" class="inpt" disabled></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>
...@@ -38,7 +38,9 @@ ...@@ -38,7 +38,9 @@
</view> </view>
</block> </block>
</view> </view>
<button class="btn {{can_exchange == -1 ? 'opacity':''}}" bind:tap="submit">立即兑换</button> <button class="btn {{can_exchange == -1 || can_exchange == 0 ? 'opacity':''}}" bind:tap="submit">
立即兑换
</button>
</view> </view>
</block> </block>
<block wx:elif="{{tabIndex == 2}}"> <block wx:elif="{{tabIndex == 2}}">
...@@ -55,8 +57,15 @@ ...@@ -55,8 +57,15 @@
</view> </view>
</block> </block>
</view> </view>
<button class="btn {{can_exchange == -1 ? 'opacity':''}}" bind:tap="submit">申请提现</button> <block wx:if="{{weixin_exchange_info.exchanging == 0 || exchanging}}">
<text class="fr-txt">好友助力,已完成({{weixin_exchange_info.exchanging}}/2)</text> <button class="btn {{can_exchange == -1 || can_exchange == 0 ? 'opacity':''}}" bind:tap="withdrawal">
申请提现
</button>
</block>
<block wx:else>
<button class="btns">分享给好友助力,可提现</button>
</block>
<text class="fr-txt">好友助力,已完成({{weixin_exchange_info.assist_count}}/2)</text>
</view> </view>
</block> </block>
<view class="txt column"> <view class="txt column">
......
...@@ -149,6 +149,19 @@ ...@@ -149,6 +149,19 @@
display: block; display: block;
line-height: 98rpx; line-height: 98rpx;
} }
.withdrawal .content .btns {
margin: 36rpx 55rpx 0 55rpx;
height: 98rpx;
background: #ffffff;
border-radius: 8rpx;
font-size: 32rpx;
text-align: center;
display: block;
line-height: 98rpx;
border: 2rpx solid #d8dfe6;
color: #0D84D1;
box-sizing: border-box;
}
.withdrawal .content .fr-txt { .withdrawal .content .fr-txt {
margin-top: 40rpx; margin-top: 40rpx;
font-size: 26rpx; font-size: 26rpx;
......
...@@ -102,6 +102,12 @@ ...@@ -102,6 +102,12 @@
"pathName": "pages/person/packet/index", "pathName": "pages/person/packet/index",
"query": "", "query": "",
"scene": null "scene": null
},
{
"id": -1,
"name": "pages/person/helpfriend/index",
"pathName": "pages/person/helpfriend/index",
"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