Browse Source

修改优化

zouzexu 4 weeks ago
parent
commit
13301abb27

+ 11 - 0
src/App.vue

@@ -82,6 +82,17 @@ onLaunch((options) => {
 	}
 	//  =============获取经纬度end============
 
+	// 自动更新管理-------------------------------------------------------------------
+	const updateManager = uni.getUpdateManager();
+		updateManager.onUpdateReady(function(res) {
+			uni.showModal({
+				title: '更新提示',
+				content: '新版本已经准备好,是否重启应用?',
+			    success(res) {
+				if (res.confirm) updateManager.applyUpdate();
+					}
+				});
+			});
 });
 onShow(() => {
 	console.log("App Show");

+ 6 - 1
src/pages/index/courseDetail/index.vue

@@ -39,7 +39,7 @@
 			<view class="c-instructor">
 				<view class="c-instructor-title">授课教练:</view>
 				<view class="c-instructor-name">
-					<view class="instructor-item" v-for="(avatar, index) in instructorAvatars" :key="index">
+					<view class="instructor-item" v-for="(avatar, index) in instructorAvatars" :key="index" @click="RouterUtils.to_page(`/pages/index/instructorDetail/index?id=${instructorId[index]}`)">
 						<image :src="avatar" mode="" />
 						<view class="instructor-name-text">{{ instructorName[index] || '' }}</view>
 					</view>
@@ -200,6 +200,11 @@ const instructorName = computed(() => {
 	return name ? name.split(',') : []
 })
 
+const instructorId = computed(() => {
+	const insId = courseDetailInfo.value?.instructorId
+	return insId ? insId.split(',') : []
+})
+
 onShareAppMessage((res) => {
 	if (res.from === 'button') {// 来自页面内分享按钮
 		console.log(res.target)

+ 8 - 8
src/pages/index/index.vue

@@ -219,7 +219,7 @@ onLoad(() => {
 onShareAppMessage(() => {
 	return {
 		title: '邀请您加入',
-		path: `pages/index/userList/index`
+		path: `pages/index/index`
 	}
 })
 onPullDownRefresh(() => {
@@ -394,13 +394,13 @@ const openSellocation = () => {
 }
 
 const processBannerImages = (bannerList) => {
-  return bannerList.map(item => {
-    return {
-      ...item,
-      // 添加图片处理参数,例如缩放到宽度为750px,质量为80%
-      imageUrl: item.imageUrl ? `${item.imageUrl}?x-oss-process=image/resize,w_750/quality,Q_80` : item.imageUrl
-    }
-  })
+	return bannerList.map(item => {
+		return {
+			...item,
+			// 添加图片处理参数,例如缩放到宽度为750px,质量为80%
+			imageUrl: item.imageUrl ? `${item.imageUrl}?x-oss-process=image/resize,w_750/quality,Q_80` : item.imageUrl
+		}
+	})
 }
 
 // 首页基础信息

+ 1 - 0
src/pages/index/instructorDetail/index.vue

@@ -128,6 +128,7 @@ import { RouterUtils, _previewImage, DateUtils } from '@/utils/util';
 const cache = useCacheStore()
 const statusBarHeight = ref(0);
 onLoad((option) => {
+	console.log(option,'load信息');
 	detailId.value = option.id
 	appraiseFormData.value.instructorId = option.id
 	get_navheight()

+ 1 - 1
src/pages/index/toBeUsed/index.vue

@@ -167,7 +167,7 @@
 					</view>
 					<!-- &&item.type != 5 -->
 					<view class="application-btn" @click="openRefund(item)"
-						v-if="(item.type == 1 || item.type == 2) && (item.orderStatus == 1 && orderDetailInfo?.refundType != 2)">
+						v-if="(item.type == 1 || item.type == 2||item.type == 5) && (item.orderStatus == 1 && orderDetailInfo?.refundType != 2)">
 						申请退款</view>
 				</view>
 			</view>

+ 2 - 2
src/utils/http/index.ts

@@ -181,8 +181,8 @@ export class HttpClient {
 export const http = new HttpClient({
   // baseURL: 'http://192.168.0.217:8080/jeecg-boot/app',
   // baseURL: 'http://192.168.1.166:8080/jeecg-boot/app',
-  // baseURL: 'http://192.168.0.11:8080/jeecg-boot/app',
-  baseURL: 'https://api.qlapp.cn/jeecgboot/app', //生产
+  baseURL: 'http://192.168.0.11:8080/jeecg-boot/app',
+  // baseURL: 'https://api.qlapp.cn/jeecgboot/app', //生产
   headers: {
     'Content-Type': 'application/json'
   }