Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d17cd5e8
authored
Sep 04, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
hot red
parent
16011375
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
19 deletions
pages/person/invitation/index.js
pages/person/packet/index.js
pages/person/packet/index.less
pages/person/packet/index.wxml
pages/person/packet/index.wxss
project.config.json
pages/person/invitation/index.js
View file @
d17cd5e8
...
...
@@ -102,7 +102,7 @@ Page({
http
.
getData
(
apis
.
invitesInfo
,
'GET'
,
null
,
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
invitesInfo
:
res
.
data
});
...
...
pages/person/packet/index.js
View file @
d17cd5e8
// pages/person/packet/index.js
const
http
=
require
(
'../../../utils/util.js'
);
import
{
apis
}
from
'../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
isShow
:
true
isShow
:
false
,
flag
:
false
,
code
:
''
,
codesAdd
:{}
},
/**
...
...
@@ -26,7 +33,13 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
let
code
=
wx
.
getStorageSync
(
'code'
);
if
(
code
)
{
this
.
setData
({
flag
:
true
,
code
:
code
});
}
},
/**
...
...
@@ -63,5 +76,40 @@ Page({
this
.
setData
({
isShow
:
false
});
},
formSubmit
:
function
(
e
)
{
let
code
=
e
.
detail
.
value
.
code
;
if
(
!
code
)
{
wx
.
showToast
({
title
:
'请输入红包码'
,
icon
:
'none'
,
duration
:
2000
});
return
false
;
}
http
.
getData
(
apis
.
codesAdd
,
'GET'
,
{
code
:
code
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
flag
:
true
,
isShow
:
true
,
codesAdd
:
res
.
data
})
wx
.
setStorage
({
key
:
"code"
,
data
:
res
.
data
.
code
});
}
else
{
wx
.
showToast
({
title
:
res
.
errmsg
,
icon
:
'none'
,
duration
:
2000
});
}
},
true
,
false
,
true
);
}
})
\ No newline at end of file
pages/person/packet/index.less
View file @
d17cd5e8
...
...
@@ -169,11 +169,16 @@
width: 64rpx;
height: 64rpx;
border: 2rpx solid #ffffff;
border-radius: 50%;
.icon{
font-size:40rpx;
color:#fff;
border-radius: 50%;
.icon {
font-size: 40rpx;
color: #fff;
}
}
}
}
.opac {
opacity: 0.5;
}
\ No newline at end of file
pages/person/packet/index.wxml
View file @
d17cd5e8
<view class="packet" hover-class="none" hover-stop-propagation="false">
<view class="head">
<view class="wrap column rowCenter verCenter">
<text class="t1">输入好友的红包码</text>
<text class="t2">领取随机红包</text>
<form bindsubmit='formSubmit'>
<view class="head">
<view class="wrap column rowCenter verCenter">
<text class="t1">输入好友的红包码</text>
<text class="t2">领取随机红包</text>
</view>
<view class="inp">
<input type="text" value="{{code}}" placeholder="请输入红包码" class="inpt" placeholder-class="plac" name='code' disabled="{{flag}}"></input>
</view>
</view>
<view class="inp">
<input type="text" placeholder="请输入红包码" class="inpt" placeholder-class="plac"></input>
</view>
</view>
<button class="btn">兑换好友红包</button>
<button class="btn {{flag? 'opac':''}}" form-type="submit">兑换好友红包</button>
</form>
<view class="txt column">
<text class="tit">温馨提示:</text>
<text class="t1">1.红包码可向已注册好友索要,填写后可获得随机红包。</text>
...
...
@@ -16,7 +18,6 @@
<text class="t1">3.本活动最终解释权归深圳市电界网络科技有限公司所有。</text>
</view>
</view>
<!-- 弹出层 -->
<view wx:if="{{isShow}}" class="layer-mask column verCenter rowCenter" hover-class="none" hover-stop-propagation="false">
<view class="layer column verCenter rowCenter">
...
...
@@ -24,7 +25,7 @@
<text class="t1">恭喜您</text>
<text class="t2">获得</text>
<view class="mt">
<text class="t3">
0.06
</text>
<text class="t3">
{{codesAdd.amount}}
</text>
<text class="t4">元</text>
</view>
<view class="btn">收下红包</view>
...
...
pages/person/packet/index.wxss
View file @
d17cd5e8
...
...
@@ -155,3 +155,6 @@
font-size: 40rpx;
color: #fff;
}
.opac {
opacity: 0.5;
}
project.config.json
View file @
d17cd5e8
...
...
@@ -95,6 +95,13 @@
"pathName"
:
"pages/person/invitationrecord/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/packet/index"
,
"pathName"
:
"pages/person/packet/index"
,
"query"
:
""
,
"scene"
:
null
}
]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment