修改手动绑定结构,,调整用户最新信息
This commit is contained in:
parent
c9abd2cfa0
commit
567133455c
3
app.json
3
app.json
|
@ -40,5 +40,6 @@
|
|||
},
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"rendererOptions": {},
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"lazyCodeLoading": "requiredComponents"
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
<van-field
|
||||
value="{{ value }}"
|
||||
placeholder="{{'请选择' + label}}"
|
||||
border="{{ false }}"
|
||||
border="{{ true }}"
|
||||
label="{{label}}"
|
||||
custom-style="height:100rpx"
|
||||
bind:input="onInput"
|
||||
|
|
|
@ -47,6 +47,12 @@ Page({
|
|||
tenementName: data.name
|
||||
})
|
||||
},
|
||||
callPhone(e) {
|
||||
const { phone } = e.currentTarget.dataset;
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: phone,
|
||||
})
|
||||
},
|
||||
handleSubmit() {
|
||||
const { park, tenement, name, phone } = this.data;
|
||||
if (!park) {
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
"topbar": "/components/topbar/index",
|
||||
"select": "/components/select/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-field": "@vant/weapp/field/index"
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-icon": "@vant/weapp/icon/index"
|
||||
},
|
||||
"navigationBarTitleText": "手动绑定"
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
value="{{ phone }}"
|
||||
label="联系人手机号"
|
||||
placeholder="请输入联系人手机号"
|
||||
border="{{ false }}"
|
||||
border="{{ true }}"
|
||||
bind:change="onChangePhone"
|
||||
/>
|
||||
<van-field
|
||||
|
@ -16,10 +16,18 @@
|
|||
value="{{ name }}"
|
||||
label="你的昵称"
|
||||
placeholder="请输入你的昵称"
|
||||
border="{{ false }}"
|
||||
border="{{ true }}"
|
||||
bind:change="onChangeName"
|
||||
/>
|
||||
<view class="submit">
|
||||
<van-button type="info" block bind:click="handleSubmit"> 提交 </van-button>
|
||||
</view>
|
||||
<view class="way">
|
||||
<view>
|
||||
不知道预留的手机号?可联系后台管理员查询!
|
||||
</view>
|
||||
<view class="phone" bind:tap="callPhone" data-phone="13266911877">
|
||||
<van-icon name="phone-o" class="phoneIcon" /> 13266911877
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
|
@ -1,5 +1,21 @@
|
|||
/* pages/handleLogin/index.wxss */
|
||||
|
||||
@import "/app.wxss";
|
||||
|
||||
.submit {
|
||||
margin-top: 40rpx;
|
||||
margin-top: 60rpx;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.way {
|
||||
margin-top: 60rpx;
|
||||
margin-left: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.phone {
|
||||
margin-top: 30rpx;
|
||||
color: var(--middle-green);
|
||||
display: inline-block;
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
}
|
||||
|
||||
.park {
|
||||
margin-left: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.parkContent {
|
||||
|
@ -123,4 +123,9 @@
|
|||
align-items: center;
|
||||
border: 1rpx solid #ccc;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.moneyInput {
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
import { approveUser, getApproveList, removeUser } from "../../../../service/user"
|
||||
import { approveUser, getApproveList, getUserInfo, removeUser } from "../../../../service/user"
|
||||
import { alertInfo, alertSuccess, wxModal } from "../../../../utils/index";
|
||||
import request from "../../../../utils/request"
|
||||
|
||||
|
@ -46,9 +46,6 @@ Component({
|
|||
return;
|
||||
}
|
||||
|
||||
const newUser = wx.getStorageSync('user')
|
||||
newUser.isAdmin = false;
|
||||
wx.setStorageSync('user', newUser)
|
||||
wx.switchTab({
|
||||
url: '/pages/home/index',
|
||||
})
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
import { alertInfo } from "../../utils/index";
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
import { getUserInfo } from "../../service/user";
|
||||
import request from "../../utils/request"
|
||||
const { OK } = request;
|
||||
|
||||
// pages/my/index.js
|
||||
Page({
|
||||
|
||||
|
@ -50,7 +54,15 @@ Page({
|
|||
alertInfo("请先登录");
|
||||
return false;
|
||||
}
|
||||
this.setData({ user })
|
||||
this.init()
|
||||
},
|
||||
async init() {
|
||||
const result = await getUserInfo();
|
||||
if (result.code !== OK) {
|
||||
alertInfo(result.message)
|
||||
return;
|
||||
}
|
||||
wx.setStorageSync('user', result.data)
|
||||
},
|
||||
connect() {
|
||||
Dialog.alert({
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "electricity_bill_calc_wx",
|
||||
"setting": {
|
||||
"compileHotReLoad": false,
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": false,
|
||||
"skylineRenderEnable": true
|
||||
},
|
||||
|
|
|
@ -44,4 +44,9 @@ export const reApprove = async function() {
|
|||
// 非管理员扫码
|
||||
export const userApply = async function(data) {
|
||||
return await POST('/wx/apply', data);
|
||||
}
|
||||
|
||||
// 获取所有的园区和商户
|
||||
export const getUserParksAndTenementsList = async function() {
|
||||
return await GET('/wx/getUserParksAndTenementsList');
|
||||
}
|
Loading…
Reference in New Issue
Block a user