whj il y a 1 semaine
Parent
commit
c8349222ee
3 fichiers modifiés avec 6 ajouts et 12 suppressions
  1. 2 2
      pages/user/components/phone.uvue
  2. 4 9
      pages/user/components/sms-btn.uvue
  3. 0 1
      vite.config.ts

+ 2 - 2
pages/user/components/phone.uvue

@@ -1,12 +1,12 @@
 <template>
 	<view class="flex flex-col w-[40vw]">
 		<view class="mb-3 flex flex-row ">
-			<cl-input class="" :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[100%]' }" v-model="form.username"
+			<cl-input class="" :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[40vw]' }" v-model="form.username"
 				placeholder="请输入手机号"></cl-input>
 		</view>
 
 		<view class="relative flex flex-row items-center mb-5">
-			<cl-input :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[100%]' }" v-model="form.code" :clearable="false"
+			<cl-input :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[40vw]' }" v-model="form.code" :clearable="false"
 				type="number">
 			</cl-input>
 			<view class="absolute right-0">

+ 4 - 9
pages/user/components/sms-btn.uvue

@@ -81,15 +81,10 @@ function startCountdown() {
 // 发送短信
 async function send() {
 	captcha.sending = true;
-	await request({
-		url: "/verify/sms/code/send",
-		method: "POST",
-		data: {
-			mobile: props.phone,
-			randomStr: 12,
-			messageType: 1
-		}
-
+	await sendSmsCode({
+		mobile: props.phone,
+		randomStr: 12,
+		messageType: 1
 	})
 	ui.showToast({
 		message: t("短信已发送,请查收")

+ 0 - 1
vite.config.ts

@@ -10,7 +10,6 @@ const resolve = (dir: string) => join(__dirname, dir);
 for (const i in proxy) {
 	proxy[`/${i}`] = proxy[i];
 }
-console.log(proxy);
 
 export default defineConfig({
 	plugins: [