|
|
@@ -2,7 +2,7 @@
|
|
|
<u-popup :show="popShow" @close="cancel" mode="center" :is-mask-click="false">
|
|
|
<view class="popup-wrapper">
|
|
|
<view class="title">服务器设置</view>
|
|
|
-
|
|
|
+
|
|
|
<u-form labelPosition="left" labelAlign="right" :model="formData" :rules="rules" ref="formRef"
|
|
|
label-width="180">
|
|
|
<u-form-item label="服务器地址" prop="hostname" class="form-required">
|
|
|
@@ -33,7 +33,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+
|
|
|
popShow: false,
|
|
|
setServerStatus: false,
|
|
|
formData: {
|
|
|
@@ -77,6 +77,10 @@
|
|
|
// this.$refs.formRef && this.$refs.formRef.resetFields()
|
|
|
this.popShow = false
|
|
|
},
|
|
|
+
|
|
|
+ serverCheck() {
|
|
|
+
|
|
|
+ },
|
|
|
handleTest() {
|
|
|
this.setServerStatus = false
|
|
|
this.$refs.formRef.validate().then(res => {
|
|
|
@@ -92,7 +96,7 @@
|
|
|
this.url = res.data.code
|
|
|
if (res.data.code == 0) {
|
|
|
uni.$u.toast('连接成功!')
|
|
|
- this.setServerStatus = true
|
|
|
+ this.setServerStatus = true
|
|
|
} else {
|
|
|
uni.$u.toast('连接失败!')
|
|
|
}
|
|
|
@@ -104,8 +108,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
handleCheck() {
|