刘忠健 2 years ago
parent
commit
4a9f2c3706
3 changed files with 10 additions and 7 deletions
  1. 2 2
      uniapp_cli/package.json
  2. 5 2
      uniapp_cli/src/config.js
  3. 3 3
      uniapp_cli/src/pages/index/reg.vue

+ 2 - 2
uniapp_cli/package.json

@@ -1,6 +1,6 @@
 {
   "name": "uniapp_cli",
-  "version": "0.1.0",
+  "version": "0.1.2",
   "private": true,
   "scripts": {
     "serve": "npm run dev:h5",
@@ -106,4 +106,4 @@
   "uni-app": {
     "scripts": {}
   }
-}
+}

+ 5 - 2
uniapp_cli/src/config.js

@@ -1,9 +1,12 @@
 const config = {
-	host: "https://ssl.ycxxkj.com/yckj_framework/api/public/index.php", //请求地址
+	domain: "https://ssl.ycxxkj.com/yckj_framework/api/public/",//接口网址,对应public目录,一般也是用于存放前端资源文件的根目录
+	api: "index.php",//接口文件地址
+	host: "", //接口请求地址 = config.domain + config.api
 	api_sign_key: "37fba926fc83be1cf4a7e3ee09110bef",//接口签名参数
 };
 if (process.env.NODE_ENV === 'development') {
 	//开发环境配置
-	config.host = "http://local.lzj/yckj_framework/api/public/index.php";
+	config.domain = "http://local.lzj/yckj_framework/api/public/";
 }
+config.host = config.domain + config.api;
 export default config;

+ 3 - 3
uniapp_cli/src/pages/index/reg.vue

@@ -7,13 +7,13 @@
 				<u-input v-model="form.login_name" maxlength="20" prefixIcon="account" placeholder="请输入账号" border="surround" clearable></u-input>
 			</view>
 			<view class="p20">
-				<u-input v-model="form.password" maxlength="25" prefixIcon="lock" placeholder="请输入密码" border="surround" password clearable></u-input>
+				<u-input v-model="form.password" maxlength="25" prefixIcon="lock" placeholder="请输入密码" border="surround" type="password" clearable></u-input>
 			</view>
 			<view class="p20">
-				<u-input v-model="form.repassword" maxlength="25" prefixIcon="lock" placeholder="请再次输入密码" border="surround" password clearable></u-input>
+				<u-input v-model="form.repassword" maxlength="25" prefixIcon="lock" placeholder="请再次输入密码" border="surround" type="password" clearable></u-input>
 			</view>
 			<view class="p20">
-				<u-button type="primary" text="注册" @click="reg"></u-button>
+				<u-button type="primary" text="注册" @click="reg">注册</u-button>
 			</view>
 			<view class="p20 fs24 tc"> <text class="font_color_content">已有账号,</text><text class="font_color_primary" @click="navigateTo('index')">立即登录 </text> </view>
 		</view>