暂存c端账号管理和商户信息
This commit is contained in:
@@ -36,7 +36,7 @@ Component({
|
||||
*/
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
const { data = {}, tenement, park, editType } = this.data;
|
||||
const { data = {}, tenement, park, type } = this.data;
|
||||
if (!data.phone) {
|
||||
alertInfo("请输入手机号")
|
||||
return
|
||||
@@ -45,17 +45,16 @@ Component({
|
||||
alertInfo("请输入昵称")
|
||||
return
|
||||
}
|
||||
if (editType === 'add') {
|
||||
const { code, message } = await createTenementWxUser({ ...data, tenement, park })
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
this.triggerEvent("cancel")
|
||||
return;
|
||||
}
|
||||
alertSuccess("操作成功")
|
||||
this.triggerEvent("ok")
|
||||
const { code, message } = await createTenementWxUser({ ...data, tenement, park })
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
this.triggerEvent("cancel")
|
||||
return;
|
||||
}
|
||||
alertSuccess("操作成功")
|
||||
this.triggerEvent("ok")
|
||||
return;
|
||||
|
||||
|
||||
},
|
||||
onChange(e) {
|
||||
|
@@ -0,0 +1,62 @@
|
||||
// pages/workBench/components/account/components/updatePhoneModa/index.js
|
||||
import { alertInfo, alertSuccess } from "../../../../../../utils/index";
|
||||
import { updateAdminPhone } from "../../../../../../service/tenement";
|
||||
import request from "../../../../../../utils/request"
|
||||
const { OK } = request
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
type: String,
|
||||
title: String,
|
||||
visible: Boolean,
|
||||
onCancel: Function,
|
||||
park: String,
|
||||
tenement: String,
|
||||
parentPhone:String,
|
||||
parentName:String,
|
||||
parentId:String,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
phone: "",
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
const { phone, tenement, park, type } = this.data;
|
||||
if (!phone) {
|
||||
alertInfo("请输入手机号")
|
||||
return
|
||||
}
|
||||
const { code, message } = await updateAdminPhone({tenement, phone: phone })
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
this.triggerEvent("cancel")
|
||||
return;
|
||||
}
|
||||
alertSuccess("操作成功")
|
||||
this.triggerEvent("ok")
|
||||
return;
|
||||
|
||||
|
||||
},
|
||||
onChange(e) {
|
||||
|
||||
this.setData({
|
||||
phone: e.detail,
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
this.triggerEvent("cancel")
|
||||
}
|
||||
}
|
||||
})
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"search-select": "/components/searchSelect/index",
|
||||
"van-field": "@vant/weapp/field/index"
|
||||
}
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
<!--pages/workBench/components/account/components/updatePhoneModa/index.wxml-->
|
||||
<van-dialog
|
||||
use-slot
|
||||
title="编辑管理员手机号"
|
||||
show="{{ visible }}"
|
||||
show-cancel-button
|
||||
bind:confirm="onSubmit"
|
||||
bind:cancel="onCancel"
|
||||
>
|
||||
<view class="modalContentWrapper">
|
||||
<van-field
|
||||
value="{{ phone }}"
|
||||
placeholder="请输入新管理员手机号"
|
||||
label="手机号"
|
||||
border="{{ false }}"
|
||||
title-width="120rpx"
|
||||
data-name="phone"
|
||||
bind:change="onChange"
|
||||
>
|
||||
</van-field>
|
||||
</view>
|
||||
|
||||
</van-dialog>
|
@@ -0,0 +1 @@
|
||||
/* pages/workBench/components/account/components/updatePhoneModa/index.wxss */
|
Reference in New Issue
Block a user