first@qq.com123 1 rok pred
rodič
commit
4e25921cfb

+ 2 - 6
admin/.env.production

@@ -10,18 +10,14 @@ VITE_BASE_PATH = './'
 
 # 管理系统/生产环境
 VITE_APP_BASE_API = 'https://hnapi.kdboss.cn'
-# VITE_APP_BASE_API = 'http://153.0.193.129:5001'
-# VITE_APP_BASE_API = '/prod-api'
 
 # 附件地址
 # h5
 VITE_Hw_File_Path = 'https://hnapi.kdboss.cn'
-# VITE_Hw_File_Path = 'http://153.0.193.129:5001'
-# VITE_Hw_File_Path = '/prod-api'
+
 # PC
 VITE_Pc_File_Path = 'https://hnapi.kdboss.cn'
-# VITE_Pc_File_Path = 'http://153.0.193.129:5001'
-# VITE_Pc_File_Path = '/prod-api'
+
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 # VITE_BUILD_COMPRESS = gzip

+ 1 - 1
admin/vite.config.ts

@@ -19,7 +19,7 @@ export default defineConfig(({ mode, command }) => {
       proxy: {
         // https://cn.vitejs.dev/config/#server-proxy
         '/dev-api': {
-          target: 'http://153.0.193.129:5001', //正式
+          target: 'https://hnapi.kdboss.cn', //正式
           // target: 'http://211.149.199.65:5007', //测试
           ws: true,
           changeOrigin: true,

+ 1 - 0
hn-shop-uniapp/App.vue

@@ -40,6 +40,7 @@
 		methods: {
 			// app启动参数
 			onStartupQuery(path) {
+				console.log(path, 'app启动参数')
 				const query = path.query
 				// 微信鉴权
 				StoreModel.getApiData(query).then((res) => {

+ 13 - 12
hn-shop-uniapp/common/model/Store.js

@@ -48,14 +48,14 @@ const getStorage = () => {
 
 // 获取后端接口鉴权设置
 const getApiData = async (data) => {
-	return new Promise(async (resolve, reject) => {
-		// console.log(data, 'getApiData - 鉴权')
-		let param = data?.param ? data?.param.split(',') : ['', '']
-		
-		// 临时调试 --start--
-		// let resCode = getWxOpen('')
-		// let param = 'pages/user/index,shopping'.split(',')
-		// 临时调试 --ebd--
+	return new Promise(async (resolve, reject) => {
+		// console.log(data, 'getApiData - 鉴权')
+		let param = data?.param ? data?.param.split(',') : ['', '']
+		
+		// 临时调试 --start--
+		// let resCode = getWxOpen('')
+		// let param = 'pages/user/index,shopping'.split(',')
+		// 临时调试 --ebd--
 		
 		if (param[1]) {
 			storage.set('wx_v', param[1])
@@ -123,9 +123,10 @@ const initStoreData = data => {
 const getWxOpen = async (wxCode) => {
 	return new Promise(async (resolve, reject) => {
 		try {
+			console.log(wxCode, 'wxCodewxCodewxCodewxCodewxCode')
 			// 鉴权
-			const res = await openidCode({ code: wxCode, qym: storage.get('wx_qym') || '' })
-			
+			const res = await openidCode({ code: wxCode, qym: storage.get('wx_qym') || '' })
+			
 			// 临时调试 --start--
 			// const res = {
 			// 	"Status": 0,
@@ -140,8 +141,8 @@ const getWxOpen = async (wxCode) => {
 			// 	},
 			// 	"Message": "操作成功",
 			// 	"OtherData": null
-			// }
-			// 临时调试 --end--
+			// }
+			// 临时调试 --end--
 			
 			if (res.Data.userid) {
 				storage.set('wx_openid', res.Data.openid)