修改项目配置,完成要加入的等待和审批操作,修改了部分接口定义和参数
This commit is contained in:
@@ -1,20 +1,34 @@
|
||||
// pages/qrCode/index.js
|
||||
import request from "../../utils/request"
|
||||
import { getWxCode } from "../../service/user"
|
||||
import { alertInfo } from "../../utils/index";
|
||||
|
||||
const { OK } = request;
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
url: ""
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getCode()
|
||||
},
|
||||
async getCode() {
|
||||
const { code, message, data } = await getWxCode()
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return
|
||||
}
|
||||
this.setData({
|
||||
url: data
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
@@ -1,3 +1,7 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"van-image": "@vant/weapp/image/index"
|
||||
},
|
||||
"navigationBarTitleText": "二维码"
|
||||
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
<!--pages/qrCode/index.wxml-->
|
||||
<view class="wrapper">
|
||||
<view style="margin-bottom: 10vh;">
|
||||
<van-image width="400rpx" height="400rpx" src="{{url}}" />
|
||||
</view>
|
||||
<view class="text"> 扫码二维码,管理员同意后可进入 </view>
|
||||
<van-icon name="qr" />
|
||||
</view>
|
@@ -5,9 +5,10 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
margin-bottom: 10vh;
|
||||
margin-bottom: 15vh;
|
||||
}
|
Reference in New Issue
Block a user