|
|
@@ -10,6 +10,7 @@ const tel = ref('')
|
|
|
const address = ref('')
|
|
|
const password = ref('')
|
|
|
const confirmPassword = ref('')
|
|
|
+const storeId = ref()
|
|
|
|
|
|
// 电话号码是否为空
|
|
|
const hasTelInput = computed(() => tel.value != '')
|
|
|
@@ -40,6 +41,7 @@ function handleRegister() {
|
|
|
phone: tel.value,
|
|
|
password: password.value,
|
|
|
address: address.value,
|
|
|
+ storeId: storeId.value
|
|
|
}).then(res => {
|
|
|
if (res.data.code === '000') { //类型守卫,它检查 res.data 对象中是否存在名为 code 的属性
|
|
|
ElMessage({
|
|
|
@@ -57,6 +59,10 @@ function handleRegister() {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+// const storeList = await getAllStore().then(res => res.data.result)
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
|
|
|
@@ -116,7 +122,7 @@ function handleRegister() {
|
|
|
|
|
|
<el-col :span="1"></el-col>
|
|
|
|
|
|
- <el-col :span="15">
|
|
|
+ <el-col :span="15" v-if="identity!=='STAFF'">
|
|
|
<el-form-item>
|
|
|
<label for="address">
|
|
|
地址
|
|
|
@@ -126,6 +132,32 @@ function handleRegister() {
|
|
|
placeholder="请输入地址"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
+ <el-col :span="7" v-if="identity==='STAFF'">
|
|
|
+ <el-form-item>
|
|
|
+ <label for="address">
|
|
|
+ 地址
|
|
|
+ </label>
|
|
|
+ <el-input id="address"
|
|
|
+ v-model="address"
|
|
|
+ placeholder="请输入地址"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="1" v-if="identity==='STAFF'"></el-col>
|
|
|
+
|
|
|
+ <el-col :span="7" v-if="identity==='STAFF'">
|
|
|
+ <el-form-item>
|
|
|
+ <label for="address">
|
|
|
+ 所属商店
|
|
|
+ </label>
|
|
|
+ <el-input id="storeId"
|
|
|
+ v-model="storeId"
|
|
|
+ placeholder="请输入商店编号"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+
|
|
|
</el-row>
|
|
|
|
|
|
<el-form-item>
|