作者 姚富强

合并分支 'ddd' 到 'master'

1232



查看合并请求 !20
  1 +import request from '@/utils/http'
  2 +/**
  3 + *
  4 + *
  5 + */
  6 +export const getindex = (id) => {
  7 + return request({
  8 + method: 'GET',
  9 + url: `/list/${id}`,
  10 + })
  11 +}
  12 +export const getImage = (data) => {
  13 + return request({
  14 + method: 'PATCH',
  15 + url: `/update/`,
  16 + data: {
  17 + tNum: data.id,
  18 + url: data.url
  19 + }
  20 + })
  21 +}
  22 +export const choosepasswd = (data) => {
  23 + return request({
  24 + method: 'PATCH',
  25 + url: `/updatePassword/${data.id}`,
  26 + data :{
  27 + oldPwd: data.oldPwd,
  28 + newPwd: data.newPwd,
  29 + rePwd: data.rePwd
  30 + }
  31 + })
  32 +}
1 import request from "@/utils/http" 1 import request from "@/utils/http"
2 2
3 -export const dengluAPI = (data) => { 3 +export const dengluAPI = (name, password) => {
4 return request({ 4 return request({
5 - url: '/information/login', 5 + url: '/login',
6 method: 'GET', 6 method: 'GET',
7 data: { 7 data: {
8 - tNum: 2024001,  
9 - password: 123456 8 + tNum: name,
  9 + password: password
10 } 10 }
11 11
  12 +
12 }) 13 })
13 } 14 }
@@ -4,7 +4,7 @@ import router from '../router' @@ -4,7 +4,7 @@ import router from '../router'
4 import store from '@/store' 4 import store from '@/store'
5 import { ElMessage } from 'element-plus' 5 import { ElMessage } from 'element-plus'
6 const request = axios.create({ 6 const request = axios.create({
7 - baseURL: 'http://192.168.3.48:8080/study', 7 + baseURL: 'http://192.168.3.48:8080/manageSystem/teacher',
8 timeout: 15000, //请求超时 8 timeout: 15000, //请求超时
9 }) 9 })
10 10
1 <script setup> 1 <script setup>
  2 +import { choosepasswd, getImage, getindex } from '@/aip/account'
2 import { ref } from 'vue' 3 import { ref } from 'vue'
3 const active = ref(0) 4 const active = ref(0)
4 const showCenter = ref(false) 5 const showCenter = ref(false)
@@ -8,6 +9,32 @@ const showPopup = () => { @@ -8,6 +9,32 @@ const showPopup = () => {
8 console.log(111) 9 console.log(111)
9 showCenter.value = true 10 showCenter.value = true
10 } 11 }
  12 +
  13 +const getindexdata = async () => {
  14 + const res = await getindex(2024001)
  15 + console.log(res)
  16 +}
  17 +const getImageCode = async () => {
  18 + const data = {
  19 + id: 2024001,
  20 + url: 'http://127.0.0.1:8090/api/account/getImageCode',
  21 + }
  22 + const res = await getImage(data)
  23 + console.log(res)
  24 +}
  25 +const choosepasswddata = async () => {
  26 + const data = {
  27 + id: 2024001,
  28 + oldPwd: '654321',
  29 + newPwd: '123456',
  30 + rePwd: '123456',
  31 + }
  32 + const res = await choosepasswd(data)
  33 + console.log(res)
  34 +}
  35 +// getindexdata()
  36 +getImageCode()
  37 +// choosepasswddata()
11 </script> 38 </script>
12 <template> 39 <template>
13 <div class="right"> 40 <div class="right">
@@ -28,7 +55,7 @@ const showPopup = () => { @@ -28,7 +55,7 @@ const showPopup = () => {
28 </div> 55 </div>
29 <div class="lie"> 56 <div class="lie">
30 <div>工号</div> 57 <div>工号</div>
31 - <div class="lin">1111111</div> 58 + <div class="lin">{{ 111 }}</div>
32 </div> 59 </div>
33 <div class="lie"> 60 <div class="lie">
34 <div>手机号</div> 61 <div>手机号</div>
@@ -61,14 +88,15 @@ const showPopup = () => { @@ -61,14 +88,15 @@ const showPopup = () => {
61 <!-- 手机号 --> 88 <!-- 手机号 -->
62 <van-field v-model="value" placeholder="187159***14" /> 89 <van-field v-model="value" placeholder="187159***14" />
63 <!-- 验证码 --> 90 <!-- 验证码 -->
64 - <van-field  
65 - v-model="sms"  
66 - center  
67 - clearable  
68 - placeholder="验证码"  
69 - > 91 + <van-field v-model="sms" center clearable placeholder="验证码">
70 <template #button> 92 <template #button>
71 - <van-button size="small" color="#6170c3" :text="text" round="true" @click="dbclick"></van-button> 93 + <van-button
  94 + size="small"
  95 + color="#6170c3"
  96 + :text="text"
  97 + round="true"
  98 + @click="dbclick"
  99 + ></van-button>
72 </template> 100 </template>
73 </van-field> 101 </van-field>
74 <!-- 底部按钮 --> 102 <!-- 底部按钮 -->
@@ -143,7 +171,7 @@ const showPopup = () => { @@ -143,7 +171,7 @@ const showPopup = () => {
143 } 171 }
144 .code { 172 .code {
145 margin-top: 60px; 173 margin-top: 60px;
146 - .van-cell{ 174 + .van-cell {
147 margin-bottom: 20px; 175 margin-bottom: 20px;
148 border: 1px solid #cacaca; 176 border: 1px solid #cacaca;
149 border-radius: 18px; 177 border-radius: 18px;
@@ -7,8 +7,13 @@ import { ref } from 'vue' @@ -7,8 +7,13 @@ import { ref } from 'vue'
7 const username = ref('') 7 const username = ref('')
8 const password = ref('') 8 const password = ref('')
9 const onSubmit = async(values) => { 9 const onSubmit = async(values) => {
10 - console.log(values)  
11 - const res = await dengluAPI(values) 10 + console.log()
  11 + const data = {
  12 + tNum : username.value,
  13 + password : password.value
  14 + }
  15 + console.log(data);
  16 + const res = await dengluAPI(data)
12 console.log(res) 17 console.log(res)
13 } 18 }
14 </script> 19 </script>