init
This commit is contained in:
24
pages/subpages/activation/activation.js
Normal file
24
pages/subpages/activation/activation.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import kamiApi from "../../../api/kamiApi"
|
||||
import tool from "../../../utils/tool"
|
||||
|
||||
Page({
|
||||
|
||||
data: {
|
||||
code: null,
|
||||
logoImg: null,
|
||||
},
|
||||
goback(){
|
||||
wx.navigateBack(1)
|
||||
},
|
||||
handleJiHuo(){
|
||||
let code = this.data.code
|
||||
kamiApi.active({code}).then(res=>{
|
||||
|
||||
})
|
||||
},
|
||||
onLoad(){
|
||||
const clientConfig = tool.data.get('CLIENT_CONFIG')
|
||||
this.setData({logoImg: clientConfig.CLIENT_LOGO})
|
||||
}
|
||||
|
||||
})
|
||||
7
pages/subpages/activation/activation.json
Normal file
7
pages/subpages/activation/activation.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-nav-bar": "@vant/weapp/nav-bar/index",
|
||||
"van-sticky": "@vant/weapp/sticky/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
18
pages/subpages/activation/activation.wxml
Normal file
18
pages/subpages/activation/activation.wxml
Normal file
@@ -0,0 +1,18 @@
|
||||
<van-sticky>
|
||||
<van-nav-bar
|
||||
title="卡密激活"
|
||||
left-text="返回"
|
||||
left-arrow
|
||||
bind:click-left="goback"
|
||||
/>
|
||||
</van-sticky>
|
||||
<view class="activation">
|
||||
<image class="logoImg" src="{{logoImg}}" />
|
||||
<input type="text" model:value="{{code}}" placeholder="请输入卡密"/>
|
||||
<van-button type="info" block bindtap="handleJiHuo">激活</van-button>
|
||||
|
||||
<text class="explain">说明:卡密只能使用一次,激活后卡密将无效</text>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
31
pages/subpages/activation/activation.wxss
Normal file
31
pages/subpages/activation/activation.wxss
Normal file
@@ -0,0 +1,31 @@
|
||||
page{
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.activation{
|
||||
padding: 30px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.activation image{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.activation input{
|
||||
background-color: #F7F7F7;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
margin: 60px 0 40px 0 ;
|
||||
}
|
||||
|
||||
|
||||
.explain{
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user