|
@@ -20,8 +20,13 @@
|
|
|
<van-picker :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
|
|
|
</van-popup>
|
|
|
|
|
|
- <van-field v-model="location" name="地区名称" label="地区名称" placeholder="省市/地区名称" left-icon="location-o"
|
|
|
- :required="isRequired" :rules="[{ required: isRequired, message: '国内必须精确到省市' }]" />
|
|
|
+ <van-field v-model="location" name="地区名称" label="地区名称" placeholder="其他国家/地区名称" left-icon="location-o" />
|
|
|
+
|
|
|
+ <!-- <van-field v-model="location" name="地区名称" label="地区名称" placeholder="省市/地区名称" left-icon="location-o"
|
|
|
+ :required="isRequired" :rules="[{ required: isRequired, message: '国内必须精确到省市' }]" /> -->
|
|
|
+
|
|
|
+ <van-field v-model="message" rows="3" autosize label="修改原因" type="textarea" placeholder="修改原因"
|
|
|
+ left-icon="edit" maxlength="50" show-word-limit :rules="[{ required: true, message: '请输入修改原因' }]"/>
|
|
|
</van-cell-group>
|
|
|
<div style="margin: 16px; display: flex; justify-content: center; align-items: center;">
|
|
|
<van-button round class="custom-button" type="primary" size="small" native-type="submit" block>
|
|
@@ -38,7 +43,7 @@ import sHeader from "@/components/SimpleHeader";
|
|
|
import { updateLocInfo } from "../../service/fife/modifyLoc";
|
|
|
import { ref } from "vue";
|
|
|
import { showToast, showFailToast } from "vant";
|
|
|
-import { computed } from "vue";
|
|
|
+// import { computed } from "vue";
|
|
|
|
|
|
export default {
|
|
|
components: { sHeader },
|
|
@@ -52,7 +57,7 @@ export default {
|
|
|
const clientId = ref('');
|
|
|
const showPicker = ref(false);
|
|
|
const columns = [
|
|
|
- { text: '中国', value: '中国' },
|
|
|
+ // { text: '中国', value: '中国' },
|
|
|
{ text: '英国', value: '英国' },
|
|
|
{ text: '美国', value: '美国' },
|
|
|
{ text: '加拿大', value: '加拿大' },
|
|
@@ -98,6 +103,8 @@ export default {
|
|
|
{ text: '伊朗', value: '伊朗' },
|
|
|
];
|
|
|
|
|
|
+ const message = ref('');
|
|
|
+
|
|
|
const onConfirm = ({ selectedOptions }) => {
|
|
|
if (selectedOptions[0] != null) {
|
|
|
showPicker.value = false;
|
|
@@ -118,7 +125,8 @@ export default {
|
|
|
modUsername: modUsername.value,
|
|
|
clientId: clientId.value,
|
|
|
country: country.value,
|
|
|
- location: location.value
|
|
|
+ location: location.value,
|
|
|
+ message: message.value,
|
|
|
}
|
|
|
const { data } = await updateLocInfo(locationCheck);
|
|
|
|
|
@@ -131,9 +139,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const isRequired = computed(() => {
|
|
|
- return country.value === '中国';
|
|
|
- });
|
|
|
+ // const isRequired = computed(() => {
|
|
|
+ // return country.value === '中国';
|
|
|
+ // });
|
|
|
|
|
|
return {
|
|
|
onSubmit,
|
|
@@ -147,7 +155,8 @@ export default {
|
|
|
// modUsername,
|
|
|
modPhone,
|
|
|
location,
|
|
|
- isRequired
|
|
|
+ // isRequired,
|
|
|
+ message
|
|
|
};
|
|
|
}
|
|
|
}
|