完成简易版的充值和充值记录查询页面,简单的我的页面

This commit is contained in:
2024-02-21 16:24:39 +08:00
parent 719ee912a4
commit 66bc2262e4
517 changed files with 1092 additions and 12025 deletions

View File

@@ -1,10 +1,44 @@
import { throttle } from "../../utils/index"
Page({
data: {
motto: 'Hello World',
num: 1,
staffA: {firstName: 'Hulk', lastName: 'Hu'},
staffB: {firstName: 'Shang', lastName: 'You'},
staffC: {firstName: 'Gideon', lastName: 'Lin'}
},
onLoad() {
console.log('---', this.renderer)
},
onShow() {
},
test: throttle(function() {
console.log('test', this.data.motto)
}, 500),
payment: function() {
wx.requestPayment({
timeStamp: `${Date.now()}`,
nonceStr: 'qwertyuiop',
package: 'prepay_id=111',
signType: 'MD5',
paySign: '11',
success (res) {
console.log('success', res);
},
fail (res) {
console.log('res', res)
}
})
},
kefu(e) {
console.log('e', e);
},
increment() {
// this.data.num = this.data.num +=1 ;
this.setData({
num: this.data.num + 1
})
}
})

View File

@@ -1,4 +1,5 @@
{
"usingComponents": {
"navigator": "/components/navigator/index"
}
}

View File

@@ -1,6 +1,11 @@
<!--index.wxml-->
<scroll-view class="scrollarea" scroll-y type="list">
<view class="usermotto">
<text class="user-motto">{{motto}}</text>
</view>
</scroll-view>
<!-- <scroll-view class="scrollarea" scroll-y type="list">
<view class="usermotto" bind:tap="payment">
支付
</view>
<button open-type="contact" bindcontact="kefu"> 客服 </button>
{{num}}
<button bindtap="increment"> 增加 </button>
</scroll-view> -->
<navigator title="充值" />

View File

@@ -3,61 +3,10 @@ page {
height: 100vh;
display: flex;
flex-direction: column;
}
.scrollarea {
flex: 1;
overflow-y: hidden;
}
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
color: #aaa;
width: 80%;
}
.userinfo-avatar {
overflow: hidden;
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.usermotto {
margin-top: 200px;
text-align: center;
}
.avatar-wrapper {
padding: 0;
width: 56px !important;
border-radius: 8px;
margin-top: 40px;
margin-bottom: 40px;
}
.avatar {
display: block;
width: 56px;
height: 56px;
}
.nickname-wrapper {
display: flex;
width: 100%;
padding: 16px;
box-sizing: border-box;
border-top: .5px solid rgba(0, 0, 0, 0.1);
border-bottom: .5px solid rgba(0, 0, 0, 0.1);
color: black;
}
.nickname-label {
width: 105px;
}
.nickname-input {
flex: 1;
}