File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11ENV = ' development'
22
3- VUE_APP_BASE_URL = ' http://pedro.7yue.pro /'
3+ VUE_APP_BASE_URL = ' http://face.api.talelin.com /'
Original file line number Diff line number Diff line change 2121 </div >
2222</template >
2323
24- <script setup >
24+ <script >
2525import { reactive , ref , onMounted } from ' vue'
2626import { Message } from ' element-plus'
2727import { useStore } from ' vuex'
28+ import { useRouter } from ' vue-router'
2829import UserModel from ' @/lin/model/user'
2930import Utils from ' @/lin/util/util'
3031
3132export default {
32- setup (props , ctx ) {
33+ setup () {
3334 const wait = 2000 // 2000ms之内不能重复发起请求
3435 const loading = ref (false )
3536 const store = useStore ()
37+ const router = useRouter ()
3638 const throttleLogin = ref (null )
3739
3840 const account = reactive ({
@@ -50,7 +52,6 @@ export default {
5052 await UserModel .getToken (username, password)
5153 await getInformation ()
5254 loading .value = false
53- const { router } = ctx .root .$options
5455 router .push (' /about' )
5556 Message .success (' 登录成功' )
5657 } catch (e) {
You can’t perform that action at this time.
0 commit comments