Merge commit 'fb0ef19158b6b035cf80fb1ac9564b0bdf2f3cc9' into pro

This commit is contained in:
Pang 2023-09-05 19:41:58 +08:00
commit 7c16f9f134
13 changed files with 28 additions and 30 deletions

View File

@ -1180,7 +1180,7 @@ class UsersController extends AbstractController
}
$uid = intval(str_pad(Base::generatePassword(4,1), 9, 8, STR_PAD_LEFT));
if($user){
$uid = intval(str_pad(Base::generatePassword(4,1), 5, 9, STR_PAD_LEFT).$user->userid);
$uid = intval(str_pad(Base::generatePassword(5,1), 6, 9, STR_PAD_LEFT).$user->userid);
}
try {
$service = new AgoraTokenGenerator($meetingSetting['appid'], $meetingSetting['app_certificate'], $meeting->channel, $uid);

View File

@ -176,7 +176,7 @@ services:
okr:
container_name: "dootask-okr-${APP_ID}"
image: "kuaifan/doookr:0.0.6"
image: "kuaifan/doookr:0.0.7"
environment:
TZ: "${TIMEZONE:-PRC}"
DOO_TASK_URL: "http://${APP_IPPR}.3"

View File

@ -338,7 +338,7 @@ export default {
this.$store.dispatch("call", {
url: isTourist ? 'users/meeting/tourist' : 'users/basic',
data: {
userid: uuid,
userid: isTourist ? uuid : (uuid+'').substring(6),
tourist_id: uuid,
}
}).then(({data}) => {

View File

@ -2,8 +2,6 @@ const isElectron = !!(window && window.process && window.process.type);
const isEEUiApp = window && window.navigator && /eeui/i.test(window.navigator.userAgent);
import microappInit from "./microapp"
microappInit()
import {switchLanguage as $L} from "./language";
import './functions/common'
@ -210,6 +208,9 @@ Vue.mixin(mixin)
let app;
store.dispatch("init").then(action => {
microappInit();
app = new Vue({
router,
store,

View File

@ -96,7 +96,7 @@ export default {
handler(to) {
if(to.name == 'manage-apps'){
this.appData = {
path: to.hash
path: to.hash || to.fullPath
}
}
},
@ -120,6 +120,7 @@ export default {
getAppData(){
return {
type: 'init',
url: this.url,
vues: {
Vue,
store,

View File

@ -1,11 +1,7 @@
import microApp from '@micro-zoe/micro-app'
const getUrl = (s) => {
let url = $A.apiUrl('../' + s)
if (url.indexOf('http') == -1) {
url = window.location.origin + url
}
return import.meta.env.VITE_OKR_WEB_URL || url;
const getUrl = (url) => {
return import.meta.env.VITE_OKR_WEB_URL || $A.apiUrl(url);
}
export default function() {
@ -21,7 +17,7 @@ export default function() {
route = urls.replace(match[0].replace("@vite/client",""),"");
}
// 这里 /basename/ 需要和子应用vite.config.js中base的配置保持一致
code = code.replace( eval(`/(from|import)(\\s*['"])(${route.replace(/\//g,"\\/")})/g`) , all => {
code = code.replace(new RegExp(`(from|import)(\\s*['"])(${route.replace(/\//g,"\\/")})`,'g') , all => {
return all.replace(route, urls)
})
}
@ -44,7 +40,7 @@ export default function() {
microApp.preFetch([
{
name: 'micro-app',
url: getUrl("/apps/okr"),
url: getUrl("../apps/okr"),
disableSandbox: true
}
])

View File

@ -474,11 +474,7 @@ export default {
// okr
okrUrl() {
let url = $A.apiUrl("../apps/okr")
if (url.indexOf('http') == -1) {
url = window.location.origin + url
}
return import.meta.env.VITE_OKR_WEB_URL || url
return import.meta.env.VITE_OKR_WEB_URL || $A.apiUrl("../apps/okr")
},
/**

View File

@ -356,7 +356,7 @@ export default {
case 'okr':
case 'okrAnalyze':
this.goForward({
path: '/manage/apps/' + (item.value == 'okr' ? '/#/list' : '/#/analysis'),
path: '/manage/apps/okr/' + (item.value == 'okr' ? 'list' : 'analysis'),
});
break;
case 'report':

View File

@ -26,11 +26,7 @@ export default {
if (to.name == 'manage-apps') {
this.$nextTick(() => {
this.loading = false;
let url = $A.apiUrl("../apps/okr")
if (url.indexOf('http') == -1) {
url = window.location.origin + url
}
this.appUrl = import.meta.env.VITE_OKR_WEB_URL || url
this.appUrl = import.meta.env.VITE_OKR_WEB_URL || $A.apiUrl("../apps/okr")
this.path = this.$route.query.path || '';
})
}

View File

@ -85,7 +85,9 @@ export default {
},
mounted() {
this.initData()
this.onMonitorWheel()
if(!this.$store.state.windowPortrait){
this.onMonitorWheel()
}
},
watch: {
type() {
@ -127,7 +129,7 @@ export default {
showEmojiMenuScrollRightBtn(){
const container = this.$refs['chatEmojiMenuRef'];
const liWidth = container?.querySelector('li')?.offsetWidth || 48;
return this.emojiMenuScrollLeft < this.emoticonData.length * liWidth - 34
return this.emojiMenuScrollLeft < this.emoticonData.length * liWidth - (this.$store.state.windowPortrait ? 34 : 0)
}
},
methods: {

View File

@ -67,7 +67,7 @@ export default {
this.getTouristInfo();
return 0;
}
return parseInt( (this.player.uid+"").substring(5) ) || 0
return parseInt( (this.player.uid+"").substring(6) ) || 0
}
return 0
},

View File

@ -3639,7 +3639,7 @@ export default {
if (link_id > 0) {
if (window.innerWidth < 910) {
$A.goForward({
path:'/manage/apps/#/okrDetails?data='+link_id,
path:'/manage/apps/okr/okrDetails?data=' + link_id,
});
}else{
state.okrWindow = {

8
vite.config.js vendored
View File

@ -68,7 +68,13 @@ export default defineConfig(({command, mode}) => {
chunkSizeWarningLimit: 3000,
},
plugins: [
createVuePlugin(),
createVuePlugin({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.includes('micro-app') ,
}
}
}),
vitePluginRequire(),
vitePluginFileCopy([{
src: resolve(__dirname, 'resources/assets/statics/public'),