diff --git a/.env.production b/.env.production
index 22641718..80b9b345 100644
--- a/.env.production
+++ b/.env.production
@@ -2,4 +2,4 @@
ENV = 'production'
# base api
-VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
+VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
diff --git a/certificate/ios/CertificateSigningRequest.certSigningRequest b/certificate/ios/CertificateSigningRequest.certSigningRequest
new file mode 100644
index 00000000..73f15c38
--- /dev/null
+++ b/certificate/ios/CertificateSigningRequest.certSigningRequest
@@ -0,0 +1,16 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICizCCAXMCAQAwRjEjMCEGCSqGSIb3DQEJARYUeGlhbmd5dWFuaHVhQDEyNi5j
+b20xEjAQBgNVBAMMCWpsYmFuay1haTELMAkGA1UEBhMCQ04wggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQDJpWVb8H9S3V1Ttb7OIsdvi6NoN72saXbd5ywg
+bH5SON/46eZQh3hohSDM+6wrLS8FDylZ1U1WbfOfDbfWQH9qzkY7s7guSxqXOeaS
+iQEMginiMv2MHpD3lKzPimys50QHNtDCIZbq+uHQH71BrtKdkzJQvtJCP3vljlMA
+g1irjjporhswoaX20snM+FsYEVvy+3y8CxkCZuTKnZuDY9vwwkqxWnrZ3LhSVULo
+H2PIF9R5G48lk4EOMhcsHywnN6FmTKJznENjXY8sl8yJyxjdFb1clTJl4Sg9VJqo
+BbosZ8m3s/bwDkBNI3opSE9GGievsn1J3L4eLZHoaAk7NykhAgMBAAGgADANBgkq
+hkiG9w0BAQsFAAOCAQEAOrUvUNb8ZdvWlPobOa2E3u91M8oJk/BFP5z+J0OSvjzf
+y7FiTSLK+wBd9gPftvQ2H8HzkirYTk6q9+UZUwTr4Ie1CswkxK8axBuEUkzDUJ6R
+yAttKL6fNPg8w0QwvWC2IGKaSyJYjNQWOcgsz5UpCFVVpQbt1mWZ2d4nKCUhwnBB
+2W0EraA8TzPzaAket0eY8P1r72J6fQ4MW4AFcLtJL/LxdFQCtc0TyYGx+W7XBz4p
+7pxUXc3pnwnhbg74wDzIIZkXE+NreZ9RNwYFIgvj7Gi9XGzEqIBaYGe5XhwA1DCF
+fOjouLkQFaQ3cV+8eXN1NIhH1PnJ6dzsZE32YN99sw==
+-----END CERTIFICATE REQUEST-----
diff --git a/certificate/ios/jiaixue.mobileprovision b/certificate/ios/jiaixue.mobileprovision
deleted file mode 100644
index 45c182ff..00000000
Binary files a/certificate/ios/jiaixue.mobileprovision and /dev/null differ
diff --git a/certificate/ios/jiaixuedev.mobileprovision b/certificate/ios/jiaixuedev.mobileprovision
new file mode 100644
index 00000000..319156da
Binary files /dev/null and b/certificate/ios/jiaixuedev.mobileprovision differ
diff --git a/certificate/ios/开发证书.p12 b/certificate/ios/开发证书.p12
new file mode 100644
index 00000000..723bec85
Binary files /dev/null and b/certificate/ios/开发证书.p12 differ
diff --git a/certificate/ios/自动化打包/ApiKey_X0R2V2N9G2XP.p8 b/certificate/ios/自动化打包/ApiKey_X0R2V2N9G2XP.p8
new file mode 100644
index 00000000..9081f60f
--- /dev/null
+++ b/certificate/ios/自动化打包/ApiKey_X0R2V2N9G2XP.p8
@@ -0,0 +1,5 @@
+-----BEGIN PRIVATE KEY-----
+MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgsdhY0r0E1MN6bBxs
+2QH9B5F8X7ipv1Q4y59RfVMFuB6hRANCAATLapDSZrlDs0l4V5GMpNgrSzT71Y3c
+4G2GhjuEVhQTv+JBEMHlzsWA9mdl/K657txD+kJtkKQePTYq75wHOUfy
+-----END PRIVATE KEY-----
\ No newline at end of file
diff --git a/certificate/ios/自动化打包/key.txt b/certificate/ios/自动化打包/key.txt
new file mode 100644
index 00000000..386403f2
--- /dev/null
+++ b/certificate/ios/自动化打包/key.txt
@@ -0,0 +1,2 @@
+X0R2V2N9G2XP
+69a6de7f-3378-47e3-e053-5b8c7c11a4d1
\ No newline at end of file
diff --git a/certificate/ios/自动化打包/payload.json b/certificate/ios/自动化打包/payload.json
new file mode 100644
index 00000000..2a05ee0c
--- /dev/null
+++ b/certificate/ios/自动化打包/payload.json
@@ -0,0 +1,27 @@
+import jwt
+import time
+
+key_id = "X0R2V2N9G2XP" # 替换为您的 Key ID
+issuer_id = "69a6de7f-3378-47e3-e053-5b8c7c11a4d1" # 待验证的 Issuer ID
+private_key_path = "./ApiKey_X0R2V2N9G2XP.p8"
+
+with open(private_key_path, "r") as f:
+ private_key = f.read()
+
+# 生成当前时间戳(有效期 20 分钟)
+issued_at = int(time.time()) - 60 # 前推 1 分钟避免时钟偏差
+expires = issued_at + 1200
+
+token = jwt.encode(
+ {
+ "iss": issuer_id,
+ "iat": issued_at,
+ "exp": expires,
+ "aud": "appstoreconnect-v1",
+ },
+ private_key,
+ algorithm="ES256",
+ headers={"kid": key_id},
+)
+
+print(token)
\ No newline at end of file
diff --git a/certificate/ios/苹果账号.txt b/certificate/ios/苹果账号.txt
index 060280ce..2b310888 100644
--- a/certificate/ios/苹果账号.txt
+++ b/certificate/ios/苹果账号.txt
@@ -1,7 +1,9 @@
包名:cn.com.jlbank.aits
苹果账号
xiangyuanhua@126.com
-Xiang@1987
+Xiang@1987
+你的 App 专用密码:wais-pyeh-cmww-zqvc
+
田岩UDID:
00008101-001911401152001E
官网地址:https://appstoreconnect.apple.com/
@@ -33,4 +35,13 @@ Hb修改流程:
255.255.255.0
25.64.16.254
-http://25.13.9.101:9000/
\ No newline at end of file
+http://25.13.9.101:9000/
+
+
+
+echo '{
+ "iss": "69a6de7f-3378-47e3-e053-5b8c7c11a4d1",
+ "iat": '$((`date +%s` - 60))',
+ "exp": '$((`date +%s` + 3600))',
+ "aud": "appstoreconnect-v1"
+}' > payload.json
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 39a9f809..6c54579d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -7,6 +7,7 @@ export default {
animationType: 'slide-in-bottom'
});
})
+ // console.log('预加载');
},
onShow: function () {
// console.log('App Show')
diff --git a/src/api/request.js b/src/api/request.js
index 201569e6..d78bf0f1 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -17,7 +17,7 @@ export const get_base_url = url => {
return baseUrl
// #endif
// #ifdef APP-PLUS
- return ENV.VITE_APP_BASE_API_Url
+ return ENV.VITE_APP_BASE_API_Url
// #endif
} else { // 其他环境,包括生产环境,sit环境,uat环境
return ENV.VITE_APP_BASE_API_Url
@@ -32,15 +32,28 @@ export const REQUES_ERROR_CODES = {
// 去登录弹窗状态
let no_login_show_modal_state = false
// 去登录方法
-export const goto_login_fun = () => {
+export const goto_login_fun = (from = 'http') => {
if (no_login_show_modal_state) return;
no_login_show_modal_state = true
+ let page_route = ''
+ const pages = getCurrentPages();
+ if (pages.length >= 1) {
+ const page = pages[pages.length - 1];
+ page_route = page.route
+ }
+ if (page_route === 'pages/login/login') return;
common.hideLoading()
- common.show('未登录', '现在去登录').then(() => {
+ common.show('未登录', '现在去登录', false).then(() => {
common.navigateTo('/pages/login/login')
+ if (from === 'socket' && page_route !== '') {
+ common.redirectTo('/pages/login/login?path=' + page_route)
+ } else {
+ common.navigateTo('/pages/login/login')
+ }
+
}).finally(() => {
no_login_show_modal_state = false
- })
+ })
}
export default function request({
@@ -73,7 +86,7 @@ export default function request({
data: data,
method: method,
header: headers_base,
- timeout:timeout,
+ timeout: timeout,
success: (response) => {
if (isStream) { // 流式传输,直接返回
return resolve(response);
@@ -83,8 +96,8 @@ export default function request({
const res = response.data
if (res?.rtnCode === '0000') {
return resolve(res)
- }else{
- if(toastErrors){
+ } else {
+ if (toastErrors) {
common.msg(res?.message)
}
}
diff --git a/src/api/socket.js b/src/api/socket.js
index 9d7427f5..03bb31f0 100644
--- a/src/api/socket.js
+++ b/src/api/socket.js
@@ -69,13 +69,13 @@ export default class WebSocketUtil {
clearInterval(this.reconnectTimer);
this.reconnectTimer = null
this.close()
- goto_login_fun();
+ goto_login_fun('socket');
return
}
}else{
clearInterval(this.reconnectTimer); // 清除重连计时器
this.reconnectTimer = null
- goto_login_fun();
+ goto_login_fun('socket');
return
}
this.triggerEvent('message', res); // 触发消息接收事件
@@ -224,7 +224,7 @@ export default class WebSocketUtil {
this.triggerEvent('error', new Error('达到最大重连次数'));
this.reconnectTimer = null
this.close()
- goto_login_fun()
+ goto_login_fun('socket')
}
}
diff --git a/src/common/common.js b/src/common/common.js
index 665d1ade..9628f88f 100644
--- a/src/common/common.js
+++ b/src/common/common.js
@@ -62,11 +62,36 @@ const loading = (title = '加载中', mask = true) => uni.showLoading({
})
const hideLoading = () => uni.hideLoading()
+
+// 防抖工具函数
+function debounce(fn, wait = 300) {
+ let isLocked = false; // 锁定状态标记
+ return function(...args) {
+ // 如果处于锁定状态,直接返回不执行
+ if (isLocked) {
+ return;
+ }
+ // 执行函数
+ fn.apply(this, args);
+
+ // 锁定,防止再次执行
+ isLocked = true;
+
+ // 等待指定时间后解锁
+ setTimeout(() => {
+ isLocked = false;
+ }, wait);
+ };
+}
+
// 保留当前页面,跳转到应用内的某个页面,使用uni.navigateBack可以返回到原页面。
-const navigateTo = (url, data = {}) => uni.navigateTo({
- url: url,
- ...data
-});
+const navigateTo = debounce(function(url, data = {}) {
+ uni.navigateTo({
+ url: url,
+ ...data
+ });
+})
+
// 关闭所有页面,打开到应用内的某个页面。
const reLaunch = url => {
uni.reLaunch({
@@ -80,9 +105,10 @@ const switchTab = url => {
});
}
// 关闭当前页面,返回上一页面或多级页面。可通过 getCurrentPages() 获取当前的页面栈,决定需要返回几层。
-const navigateBack = (delta = 1, fun = () => {}) => {
+const navigateBack = (delta = 1, fun = () => {}, data = {}) => {
uni.navigateBack({
delta: delta,
+ ...data,
success() {
fun()
}
diff --git a/src/common/mascot.js b/src/common/mascot.js
index ac78daa5..1adf0390 100644
--- a/src/common/mascot.js
+++ b/src/common/mascot.js
@@ -1,30 +1,28 @@
// 设置科技鹿
-import {getUserInfo} from "@/common/common.js"
+import {
+ getUserInfo
+} from "@/common/common.js"
import common from "@/common/common.js"
export const setMascot = () => {
- // const mascotState = common.getValue('mascotState') || false
const mascotState = false
- // console.log('设置科技鹿', mascotState);
if (!mascotState) {
-
- try{
+ try {
const userInfo = getUserInfo()
const mascotInfo = userInfo?.mascotInfo
- console.log('设置科技鹿', mascotInfo);
- uni.setTabBarStyle({
- midButton: {
- iconPath: "/static/images/icon/fawn-" + (mascotInfo?.mascotNo || '1') + ".png",
- width: "86px",
- height: "86px",
- iconWidth: "90px"
- },
- success: () => {
- common.setValue('mascotState', true)
- }
- })
- } catch(e){
-
- }
+ if (mascotInfo) {
+ uni.setTabBarStyle({
+ midButton: {
+ iconPath: "/static/images/icon/fawn-" + (mascotInfo?.mascotNo || '1') + ".png",
+ width: "86px",
+ height: "86px",
+ iconWidth: "90px"
+ },
+ success: () => {
+ common.setValue('mascotState', true)
+ }
+ })
+ }
+ } catch (e) {}
}
return mascotState
}
\ No newline at end of file
diff --git a/src/manifest.json b/src/manifest.json
index b5ec2a1c..a5c86ea8 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -2,8 +2,8 @@
"name" : "tra-app",
"appid" : "__UNI__EDE0E52",
"description" : "",
- "versionName" : "0.0.5",
- "versionCode" : 5,
+ "versionName" : "0.0.1",
+ "versionCode" : 1,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
diff --git a/src/pages.json b/src/pages.json
index f18d44d0..9069a2c4 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -1,5 +1,15 @@
{
"pages": [
+ {
+ "path": "pages/index/dialog",
+ "style": {
+ "navigationBarTitleText": "AI问答",
+ "app-plus": {
+ "titleNView": false,
+ "animationType": "fade-in"
+ }
+ }
+ },
{
"path": "pages/index/index",
"style": {
@@ -63,15 +73,6 @@
}
}
},
- {
- "path": "pages/intelligentAnswering/index",
- "style": {
- "navigationBarTitleText": "智能问答",
- "app-plus": {
- "titleNView": false
- }
- }
- },
{
"path": "pages/scene/index",
"style": {
@@ -152,15 +153,6 @@
"titleNView": false
}
}
- },
- {
- "path": "pages/index/dialog",
- "style": {
- "navigationBarTitleText": "AI问答",
- "app-plus": {
- "titleNView": false
- }
- }
}
],
"tabBar": {
diff --git a/src/pages/courseDetail/components/comment.vue b/src/pages/courseDetail/components/comment.vue
index a2ddf35e..8493088d 100644
--- a/src/pages/courseDetail/components/comment.vue
+++ b/src/pages/courseDetail/components/comment.vue
@@ -70,7 +70,7 @@
这里什么都没有
-
+