Просмотр исходного кода

杜绝:在 Get 请求中展示出用户密码(或token),统一替换为 Post 请求

shizhongqi 11 месяцев назад
Родитель
Сommit
da345b3271

+ 1 - 1
ghsApp/src/admin/home/login.vue

@@ -62,7 +62,7 @@ import { mapActions } from "vuex";
 import { getShopInfo} from "@/utils/auth";
 import {appLogin} from '@/api/common'
 import { getDictionaries,postWxCode } from '@/api/mini'
-import { replaceClientId } from '@/api/admin'
+//import { replaceClientId } from '@/api/admin'
 import { phoneLogin,wxMobileLogin } from "@/api/auth";
 export default {
 	name: "login",

+ 2 - 2
ghsApp/src/admin/home/workbench.vue

@@ -220,11 +220,11 @@
 
 <script>
 import { mapGetters,mapActions } from "vuex";
-import { getShopInfo } from "@/utils/auth";
+//import { getShopInfo } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
 import { closeBook } from "@/api/book";
 import productMins from "@/mixins/product";
-import { allProduct } from '@/api/product'
+//import { allProduct } from '@/api/product'
 import {currentShop} from "@/api/shop";
 import { getStat,getStrokeCount,getYesterdayIncome } from '@/api/console'
 import autoUpdateMixins from "@/mixins/autoUpdate";

+ 1 - 1
ghsApp/src/api/common/index.js

@@ -47,7 +47,7 @@ export const initSocket = async clientId => {
 };
 
 //app登陆
-export const appLogin = data => https.get("/auth/app-login", data);
+export const appLogin = data => https.post("/auth/app-login", data);
 
 //app重新获取登陆信息
 export const hasTokenAutoLogin = data => https.get("/admin/has-token-auto-login", data);

+ 1 - 1
ghsApp/src/api/mini/index.js

@@ -10,7 +10,7 @@ export const postWxCode = data => {
 	* 点击授权获取字典
 	*/
 export const getDictionaries = data => {
-	return https.get('/console/init', data)
+	return https.post('/console/init', data)
 }
 /** *
  * 点击授权获取用户信息 mini

+ 1 - 1
ghsPad/src/api/mini/index.js

@@ -10,7 +10,7 @@ export const postWxCode = data => {
 	* 点击授权获取字典
 	*/
 export const getDictionaries = data => {
-	return https.get('/console/init', data)
+	return https.post('/console/init', data)
 }
 /** *
  * 点击授权获取用户信息 mini

+ 1 - 1
hdApp/src/admin/home/login.vue

@@ -70,7 +70,7 @@ import { mapActions } from "vuex";
 import { getShopInfo} from "@/utils/auth";
 import {appLogin} from '@/api/common'
 import { getDictionaries,postWxCode } from '@/api/mini'
-import { replaceClientId } from '@/api/admin'
+//import { replaceClientId } from '@/api/admin'
 import { phoneLogin,wxMobileLogin } from "@/api/auth";
 import { ghsInfo } from "@/api/ghs/index";
 export default {

+ 1 - 1
hdApp/src/api/common/index.js

@@ -48,7 +48,7 @@ export const initSocket = async clientId => {
 };
 
 //app登陆
-export const appLogin = data => https.get("/auth/app-login", data);
+export const appLogin = data => https.post("/auth/app-login", data);
 
 //app重新获取登陆信息
 export const hasTokenAutoLogin = data => https.get("/admin/has-token-auto-login", data);

+ 1 - 1
hdApp/src/api/mini/index.js

@@ -10,7 +10,7 @@ export const postWxCode = data => {
 	* 点击授权获取字典
 	*/
 export const getDictionaries = data => {
-	return https.get('/console/init', data)
+	return https.post('/console/init', data)
 }
 /** *
  * 点击授权获取用户信息 mini

+ 1 - 1
hdPad/src/api/mini/index.js

@@ -10,7 +10,7 @@ export const postWxCode = data => {
 	* 点击授权获取字典
 	*/
 export const getDictionaries = data => {
-	return https.get('/console/init', data)
+	return https.post('/console/init', data)
 }
 /** *
  * 点击授权获取用户信息 mini

+ 1 - 1
mallApp/src/api/mini/index.js

@@ -23,5 +23,5 @@ export const getWxPhone = data => {
 
 //点击授权获取字典
 export const getDictionaries = data => {
-	return https.get('/console/init', data)
+	return https.post('/console/init', data)
 }

+ 1 - 1
mallApp/src/api/user/index.js

@@ -17,7 +17,7 @@ export const create = data => {
 }
 
 export const accountLogin = data => {
-	return https.get('/user/account-login', data)
+	return https.post('/user/account-login', data)
 }
 
 export const clearLogin = data => {