Selaa lähdekoodia

解决app上传问题

liurongli 1 kuukausi sitten
vanhempi
commit
46193a59a5

+ 5 - 2
components/navBar.vue

@@ -2,8 +2,11 @@
 	<!-- 头部 -->
 	<uni-nav-bar :class="{'custom_uni_nav_bar':!onlyTitle,'custom_navbar_only_title':onlyTitle,'custom_only_title_back_icon':!showHeadSearchInput}"
 		:height="`${height}rpx`" :backgroundColor="backgroundColor" :title="title" color="#333333" :fixed="true"
-		:border="showHeaderborder" :statusBar="true" :leftWidth="leftWidth" :rightWidth="rightWidth" left-icon="left"
-		@clickLeft="GoBack()">
+		:border="showHeaderborder" :statusBar="true" :leftWidth="leftWidth" :rightWidth="rightWidth">
+		<!-- 返回按钮 -->
+		<template v-slot:left>
+			<uni-icons class="left_icon" type="left" color="#333333" @click="GoBack()" />
+		</template>
 		<!-- 表头内容 -->
 		<view :class="['nav_head',{'only_title':!showHeadSearchInput}]" v-if="!onlyTitle">
 			<text class="nav_title">{{title}}</text>

+ 1 - 1
config.js

@@ -1,6 +1,6 @@
 
 export default {
-  apiBaseUrl: 'https://dev3.k12100.net/teaching',
+  apiBaseUrl: 'https://index.k12100.net/teaching',
   // apiBaseUrl: 'https://www.k12100.com/teaching',
   proxyBaseUrl:'',//h5 代理接口地址
   // apiBaseUrl:'http://192.168.0.42:47001'

+ 7 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "贯通慧教研",
     "appid" : "__UNI__07352BD",
     "description" : "",
-    "versionName" : "1.4.0",
-    "versionCode" : 20260812,
+    "versionName" : "1.6",
+    "versionCode" : 202608251,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -49,7 +49,11 @@
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
+                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
+                    "<uses-permission android:name=\"android.permission.READ_MEDIA_IMAGES\" />",
+                    "<uses-permission android:name=\"android.permission.READ_MEDIA_VIDEO\" />"
                 ],
                 "minSdkVersion" : 21,
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]

+ 7 - 3
pages/teacherHonor/honorOverview/index.vue

@@ -22,7 +22,7 @@
 		</view>
 		<view class="list_title">
 			<view class="title">荣誉类型</view>
-			<view class="add_btn" @click="AddEditHonorType('add')">
+			<view class="add_btn" v-if="roleCodes?.includes('SCHOOL_MANAGER')" @click="AddEditHonorType('add')">
 				<uni-icons class="btn_icon" type="plusempty"></uni-icons>
 				<text class="btn_text">新建类型</text>
 			</view>
@@ -32,7 +32,7 @@
 				<view class="list_item" v-for="item in state.tableData" :key="item.honorTypeId" @click="HonorTypeAuditDetail(item.honorTypeId,item.reviewStatus,item.honorTypeName)">
 					<view class="item_name">
 						<text class="name">{{item.honorTypeName}}</text>
-						<view class="more_icon" @click.stop="ShowMorePopupDialog(item.honorTypeName,item.honorTypeId,item.deleteStatus)">
+						<view class="more_icon" v-if="roleCodes?.includes('SCHOOL_MANAGER') || roleCodes?.includes('SCHOOL_MASTER')" @click.stop="ShowMorePopupDialog(item.honorTypeName,item.honorTypeId,item.deleteStatus)">
 							<uni-icons type="more-filled" style="color: #999999;font-size: 32rpx;"></uni-icons>
 						</view>
 					</view>
@@ -83,8 +83,11 @@
 		ref,
 		onMounted,
 		onUnmounted,
-		nextTick
+		nextTick,
+		computed
 	} from 'vue';
+	import { useStore } from 'vuex';
+	const store = useStore();
 	const state = reactive({
 		queryStr: '',
 		countList:{
@@ -107,6 +110,7 @@
 	//提示框
 	const popupDialogRef = ref(null);
 	const popupDelDialogRef = ref(null);
+	const roleCodes = computed(()=>store.state?.userStore?.userInfo?.roleCodes || []);
 	onShow(()=>{
 		const isLoadHonorOverview = uni.getStorageSync('isLoadHonorOverview');
 		if(isLoadHonorOverview){

+ 8 - 9
pages/teacherHonor/index.vue

@@ -25,6 +25,11 @@
 	const state = reactive({
 		tabBarValue:'',
 		tabBarList:[{
+			"pathName":"honorOverview",
+			"iconPath": "/static/image/tabbar/honorOverview.png",
+			"selectedIconPath": "/static/image/tabbar/honorOverview_cur.png",
+			"text": "荣誉总览"
+		},{
 			"pathName":"myHonor",
 			"iconPath": "/static/image/tabbar/myHonor.png",
 			"selectedIconPath": "/static/image/tabbar/myHonor_cur.png",
@@ -44,21 +49,15 @@
 		const roleCodes  = store.state?.userStore?.userInfo?.roleCodes || [];
 		// 管理员和校长包含荣誉总览和荣誉教师,其他用户没有荣誉总览和荣誉教师
 		if(roleCodes.includes('SCHOOL_MANAGER') || roleCodes.includes('SCHOOL_MASTER')){//管理员和校长
-			const tabList = [{
-				"pathName":"honorOverview",
-				"iconPath": "/static/image/tabbar/honorOverview.png",
-				"selectedIconPath": "/static/image/tabbar/honorOverview_cur.png",
-				"text": "荣誉总览"
-			},{
+			state.tabBarList.splice(1, 0, {
 				"pathName":"honorTeacher",
 				"iconPath": "/static/image/tabbar/honorTeacher.png",
 				"selectedIconPath": "/static/image/tabbar/honorTeacher_cur.png",
 				"text": "荣誉教师"
-			}]
-			state.tabBarList = [...tabList,...state.tabBarList];
+			});
 			state.tabBarValue = 'honorOverview';
 		}else{
-			state.tabBarValue = 'myHonor';
+			state.tabBarValue = 'honorOverview';
 		}
 	})
 </script>

+ 1 - 0
pages/teacherHonor/myHonor/uploadEditMyHonor.vue

@@ -111,6 +111,7 @@
 	import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue';
 	import uniDateformat from '@/uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.vue';
 	import uvUpload from '@/uni_modules/uv-upload/components/uv-upload/uv-upload.vue';
+	import kexFileUploader from '@/uni_modules/kex-file-uploader/components/kex-file-uploader/kex-file-uploader.vue';
 	import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue';
 	import ssDownload from '@/uni_modules/ss-download/components/ss-download/ss-download.vue';
 	import popupPreviewFile from '@/components/popupPreviewFile.vue';//图片 音视频 zip等预览

+ 1 - 0
uni_modules/cjx-previewOffice/components/cjx-previewOffice/cjx-previewOffice.vue

@@ -45,6 +45,7 @@
 
 
 <script lang="ts" setup>
+import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue';
 import { onMounted, ref } from 'vue'
 import type { CSSProperties } from 'vue'
 import { previewOfficeProps, FileType } from './interface'

+ 2 - 2
uni_modules/kex-file-uploader/components/kex-file-uploader/kex-file-uploader.vue

@@ -1901,7 +1901,7 @@
 						img.src = blobUrl
 					})
 				}
-				this.$nextTick(() => {
+				// this.$nextTick(() => {
 					// 每次重建 input,避免安卓 WebView 缓存导致 multiple 不生效
 					let old = document.getElementById('kex-fu-input')
 					if (old && old.parentNode) {
@@ -1985,7 +1985,7 @@
 						this.$ownerInstance.callMethod('onAppFilesChosen', out)
 					}
 					input.click()
-				})
+				// })
 			},
 			removeHandle(payload) {
 				if (!payload) return

+ 1 - 1
vite.config.js

@@ -25,7 +25,7 @@ export default defineConfig({
 		proxy: {
 			'/api': {
 				// target: 'http://192.168.1.32:47001/api/',
-				target: 'https://dev3.k12100.net/teaching/api/', // 目标后端服务器地址
+				target: 'https://index.k12100.net/teaching/api/', // 目标后端服务器地址
 				// target: 'https://www.k12100.com/teaching/api/',
 				changeOrigin: true, // 是否改变源
 				// rewrite: (path) => path.replace(/^\/api/, '/') // 重写路径