学习?学个屁 1 долоо хоног өмнө
parent
commit
d19bec93c3

+ 1 - 0
src/components/sunui-upimg/sunui-upimg.vue

@@ -159,6 +159,7 @@ export default {
 			_self.upload_cache_list.splice(idx, 1);
 			_self.upload_len = _self.upload_before_list.length;
 			_self.emit();
+			_self.$emit('remove');
 		},
 		emit() {
 			let _self = this;

+ 2 - 2
src/manifest.json

@@ -51,8 +51,8 @@
     /* 小程序特有相关 */
     "mp-weixin" : {
         // "appid" : "wx6260718c6fd46efb", //已更为商家端
-        // "appid" : "wxe70e6c132e5b4c28", //当前用户端使用
-         "appid" : "wxc032a09413289004",  //嘉年华用来测试支付流程
+        "appid" : "wxe70e6c132e5b4c28", //当前用户端使用
+        //  "appid" : "wxc032a09413289004",  //嘉年华用来测试支付流程
         "setting" : {
             "urlCheck" : false,
             "minified" : true

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

@@ -38,7 +38,7 @@
 			<view class="form-item-upload">
 				<view class="">近期照片</view>
 				<sunui-upimg :url="upPicUrl" :header="{ 'x-access-token': cache.get('TOKEN') }" ref="upload1"
-					title="店铺logo" @upload="handleLoaded1" @change="handleChange" :upload_count="1"></sunui-upimg>
+					title="店铺logo" @change="handleChange" :upload_count="1" @remove="removeImages"></sunui-upimg>
 			</view>
 			<view class="form-tips-upload">请上传本人近期高清、无遮挡照片</view>
 		</view>
@@ -69,27 +69,8 @@ const formData = ref({
 
 const frontImg = ref('')
 const flipSideImg = ref('')
-const chooseImage = (e) => {
-	uni.chooseImage({
-		count: 1,
-		sizeType: ['compressed'],
-		sourceType: ['album', 'camera'],
-		success: function (res) {
-			if (e == 1) {
-				frontImg.value = res.tempFilePaths;
-				uploadImage(frontImg.value[0], (url) => {
-					formData.value.idCardFrontImg = url;
-				})
-			} else {
-				flipSideImg.value = res.tempFilePaths;
-				uploadImage(flipSideImg.value[0], (url) => {
-					formData.value.idCardBackImg = url;
-				})
-			}
-		}
-	});
-}
 
+// 压缩图片处理
 const handleChange = async (e) => {
 	try {
 		const imageUrl = e.join(','); // 获取网络图片URL
@@ -122,7 +103,11 @@ const handleChange = async (e) => {
 	}
 }
 
-// 图片压缩处理
+// 移除图片
+const removeImages = () => {
+	 formData.value.realNameImg = ''
+	console.log('触发清空:', formData.value.realNameImg);
+}
 
 const submit = () => {
 	console.log(formData.value.realNameImg, '本人图片');
@@ -167,7 +152,7 @@ const getFaceRecognition = () => {
 							uni.navigateBack()
 						})
 					} else {
-						TipsUtils.tips_toast(res.result.LiveMsg||'核身失败,请重新核身')
+						TipsUtils.tips_toast(res.result.LiveMsg || '核身失败,请重新核身')
 					}
 				})
 			},

+ 2 - 0
src/pages/index/eventsRegister/index.vue

@@ -488,7 +488,9 @@ const paymentOrder = (payInfo: object) => {
 		...payInfo,
 		success: function (res) {
 			console.log('支付成功', res);
+			setTimeout(()=>{
 			getOrderQuery(orderCode.value, orderId.value)
+			},500)
 		},
 		fail: function (err) {
 			console.log('支付失败', err);

+ 2 - 0
src/pages/index/gymDetail/components/popup.vue

@@ -302,7 +302,9 @@ const paymentOrder = (payInfo: object) => {
 		...payInfo,
 		success: function (res) {
 			console.log('支付成功', res);
+			setTimeout(()=>{
 			getOrderQuery(orderCode.value, orderId.value)
+			},500)
 		},
 		fail: function (err) {
 			console.log('支付失败', err);

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

@@ -12,7 +12,7 @@
 				<block v-if="detailInfo.video">
 					<video v-for="(item, index) in videoList" :key="index" :src="item"></video>
 				</block>
-				<image v-for="(item, index) in bannerList" :key="index" :src="item" mode=""></image>
+				<image v-for="(item, index) in bannerList" @click="_previewImage(bannerList, item)" :key="index" :src="item" mode=""></image>
 			</view>
 		</scroll-view>
 	</view>

+ 9 - 5
src/pages/index/gymPay/index.vue

@@ -181,9 +181,11 @@
 				</view>
 				<view class="discount">优惠¥
 					<text v-if="buyType == 1">{{ previewCourseInfo?.sellingPrice.toFixed(2) }}</text>
-					<text v-else>{{ previewCourseInfo?.originalPrice ? previewCourseInfo?.originalPrice :
-						((previewCourseInfo?.sellingPrice - previewCourseInfo?.totalPrice.toFixed(2))) * countTotal
-					}}</text>
+					<text v-else>{{
+						previewCourseInfo?.originalPrice ? (previewCourseInfo?.originalPrice -
+							previewCourseInfo?.sellingPrice.toFixed(2)) * countTotal : ((previewCourseInfo?.sellingPrice
+								-
+								previewCourseInfo?.totalPrice.toFixed(2))) * countTotal }}</text>
 				</view>
 			</view>
 			<view class="footer-btn" @click="submitOrder">
@@ -504,14 +506,16 @@ const paymentOrder = (payInfo: object) => {
 		...payInfo,
 		success: function (res) {
 			console.log('支付成功', res);
-			getOrderQuery(orderCode.value, orderId.value)
+			setTimeout(() => {
+				getOrderQuery(orderCode.value, orderId.value)
+			}, 500)
 		},
 		fail: function (err) {
 			console.log('支付失败', err);
 			if (err.errMsg == 'requestPayment:fail cancel') {
 				RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${orderId.value}&orderType=${orderFormData.value.orderType}`)
 				return
-			}else{
+			} else {
 				RouterUtils.to_page(`/pages/index/payError/index?errMsg=${err.errMsg}`)
 			}
 			// TipsUtils.tips_toast('支付失败,请稍后重试');

+ 19 - 36
src/pages/index/index.vue

@@ -34,13 +34,9 @@
 			<view style="height: 200rpx;line-height: 200rpx;" v-if="indexLoading">
 				<zs-loading></zs-loading>
 			</view>
-			<swiper class="header-swiper" :autoplay="true" :current="currentIndex" :circular="true"
-				previous-margin="80rpx" next-margin="80rpx" :interval="4000" :duration="500" @change="swierChange"
-				v-else>
-				<swiper-item v-for="(item, i) in bannerList" :key="i">
-					<image :src="item.imageUrl" class="slide-image" :class="currentIndex === i ? 'active' : ''"></image>
-				</swiper-item>
-			</swiper>
+			<view style="height: 34rpx;"></view>
+				<liu-slide-img :list="bannerList" :type="2" :interval="3000" @change="change"
+					@click="click"></liu-slide-img>
 		</view>
 	</view>
 	<view class="content">
@@ -198,7 +194,7 @@
 <script setup lang="ts">
 import zsLoading from '@/components/zzx-loading/zzx-loading.vue'
 import { ref, onMounted, computed } from 'vue'
-import { onLoad, onPageScroll, onPullDownRefresh, onShareAppMessage } from '@dcloudio/uni-app';
+import { onShow, onLoad, onPageScroll, onPullDownRefresh, onShareAppMessage } from '@dcloudio/uni-app';
 import zsEmpty from '@/components/zs-empty/index.vue'
 import { TipsUtils, RouterUtils } from '@/utils/util';
 import { http } from '@/utils/http'
@@ -215,6 +211,21 @@ const instructorList = ref();
 const indexLoading = ref(true);
 const hotInstructorImg1 = ref('https://national-motion.oss-cn-beijing.aliyuncs.com/opt/upFiles/dxVfKxD7aH2397154f377d68fb59a71226c9c2f078a9_1758071827887.png')
 const hotInstructorImg2 = ref('https://national-motion.oss-cn-beijing.aliyuncs.com/opt/upFiles/uv0VmclIvXiJc1081e0e33e281a8a436d24ec9ca87c3_1758071769194.png')
+const list = ref([{
+	src: "https://cdn.pixabay.com/photo/2020/05/19/13/32/cartoon-5190837_1280.jpg"
+},
+{
+	src: "https://cdn.pixabay.com/photo/2020/05/19/13/35/cartoon-5190860_1280.jpg"
+},
+{
+	src: "https://cdn.pixabay.com/photo/2022/03/31/14/53/camp-7103189_1280.png"
+}
+],)
+// onShow(() => {
+// 	get_indexInfo()
+// 	get_message()
+// 	get_searchList()
+// })
 onLoad(() => {
 	get_location()
 	console.log(token.value, 'token是否刷新')
@@ -531,34 +542,6 @@ const searchInfoBtn = () => {
 		left: 0;
 		width: 100%;
 		height: 340rpx;
-
-		.header-swiper {
-			height: 340rpx;
-		}
-
-		.slide-image {
-			position: absolute;
-			height: 200rpx;
-			width: 570rpx;
-			border-radius: 15rpx;
-			z-index: 5;
-			opacity: 0.7;
-			top: 18%;
-			margin: 0 20rpx;
-		}
-
-		swiper {
-			height: 430rpx;
-		}
-
-		.active {
-			opacity: 1;
-			z-index: 10;
-			height: 316rpx;
-			width: 572rpx;
-			top: 7%;
-			transition: all 0.2s ease-in 0s;
-		}
 	}
 }
 

+ 10 - 6
src/pages/index/refundDetail/index.vue

@@ -2,14 +2,18 @@
 	<view class="content">
 		<view class="r-refund-card">
 			<view class="refund-status">
-				<view class="status">退款中</view>
-				<view class="price">¥{{ refundOrderInfo?.price.toFixed(2) }}</view>
+				<view class="status">
+					<text v-if="refundOrderInfo?.refundStatus==0">发起申请</text>
+					<text v-if="refundOrderInfo?.refundStatus==1">退款中</text>
+					<text v-if="refundOrderInfo?.refundStatus==2">退款成功</text>
+				</view>
+				<view class="price">¥{{ (refundOrderInfo?.price||0).toFixed(2) }}</view>
 			</view>
 			<view class="r-tips">预计04月18日前退回原账户</view>
 			<view class="refund-order-card">
 				<view class="order-total">
 					<view class="total">订单总价(共{{refundOrderInfo?.orderNum}}件)</view>
-					<view class="price">¥{{ refundOrderInfo?.price.toFixed(2) }}</view>
+					<view class="price">¥{{ (refundOrderInfo?.price||0).toFixed(2) }}</view>
 				</view>
 				<!-- <view class="preferential-list">
 					<view class="">团购优惠</view>
@@ -18,18 +22,18 @@
 				<view class="r-line"></view>
 				<view class="r-pay">
 					<view class="pay">实付金额</view>
-					<view class="price">-¥{{ refundOrderInfo?.price.toFixed(2) }}</view>
+					<view class="price">-¥{{ (refundOrderInfo?.price||0).toFixed(2) }}</view>
 				</view>
 				<view class="r-pay">
 					<view class="pay">退款金额</view>
-					<view class="price">-¥{{ refundOrderInfo?.amount.toFixed(2) }}</view>
+					<view class="price">-¥{{ (refundOrderInfo?.amount||0).toFixed(2) }}</view>
 				</view>
 			</view>
 			<view class="">
 				<uv-steps :current="refundOrderInfo?.refundStatus" direction="column" activeColor="#c0fa03">
 					<uv-steps-item title="提交申请" :desc="refundOrderInfo?.createTime"></uv-steps-item>
 					<uv-steps-item title="退款受理完成" :desc="refundOrderInfo?.acceptedTime"></uv-steps-item>
-					<uv-steps-item title="到账成功" :desc="'如您未查询到退款信息,请咨询微信客服。'+(refundOrderInfo?.successTime?refundOrderInfo?.successTime:'')"></uv-steps-item>
+					<uv-steps-item title="到账成功" :desc="'如您未查询到退款信息,请咨询微信客服。\n'+(refundOrderInfo?.successTime?refundOrderInfo?.successTime:'')"></uv-steps-item>
 				</uv-steps>
 			</view>
 		</view>

+ 5 - 4
src/pages/index/search/index.vue

@@ -74,6 +74,7 @@
 		background: #F6F6F6;
 		width: 700rpx;
 		border-radius: 40rpx;
+		height: 70rpx;
 		&>input {
 			width: 670rpx;
 			font-weight: bold;
@@ -82,14 +83,14 @@
 		}
 
 		.search-btn {
-			width: 200rpx;
-			height: 52rpx;
+			width: 240rpx;
+			height: 70rpx;
 			background: #222222;
-			border-radius: 28rpx;
+			border-radius: 40rpx;
 			font-weight: bold;
 			font-size: 28rpx;
 			color: #C8FF0C;
-			line-height: 52rpx;
+			line-height: 70rpx;
 			text-align: center;
 		}
 	}

+ 2 - 0
src/pages/index/submitOrder/index.vue

@@ -411,7 +411,9 @@ const paymentOrder = (payInfo: object) => {
 		...payInfo,
 		success: function (res) {
 			console.log('支付成功', res);
+			setTimeout(()=>{
 			getOrderQuery(orderCode.value, orderId.value)
+			},500)
 		},
 		fail: function (err) {
 			console.log('支付失败', err);

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

@@ -162,7 +162,8 @@
 						<zzx-icon v-if="item.type != 6" name="ashRight" size="12"></zzx-icon>
 						<!-- <text v-if="item.type != 6 && orderPageInfo?.orderType == 1">{{ item.expireTime }}到期</text> -->
 					</view>
-					<view class="application-btn" @click="openRefund(item)" v-if="item.orderStatus == 1">申请退款</view>
+					<!-- &&item.type != 5 -->
+					<view class="application-btn" @click="openRefund(item)" v-if="item.orderStatus == 1&&item.type != 5 ">申请退款</view>
 				</view>
 			</view>
 		</view>
@@ -507,6 +508,7 @@ const refund_btn = async () => {
 		http.post('/order/refundOrder', refundFromData.value, { loading: true }).then((res) => {
 			TipsUtils.tips_toast(res.result.message)
 			RouterUtils.to_page(`/pages/index/refundDetail/index?orderId=${orderDetailInfo?.value.id}&orderProInfoId=${refundFromData.value.orderProInfoIds}`)
+			refundPopup?.value.close()
 		})
 	}
 }
@@ -747,7 +749,9 @@ const paymentOrder = (payInfo: object) => {
 		...payInfo,
 		success: function (res) {
 			console.log('支付成功', res);
+			setTimeout(()=>{
 			getOrderQuery(orderCode.value, orderId.value)
+			},500)
 		},
 		fail: function (err) {
 			console.log('支付失败', err);

+ 7 - 3
src/pages/mine/orderInfo/index.vue

@@ -91,7 +91,7 @@
 <script lang="ts" setup>
 import { ref, onMounted, onUnmounted } from 'vue'
 import { http } from '@/utils/http'
-import { onLoad, onReachBottom } from '@dcloudio/uni-app';
+import { onLoad, onReachBottom,onShow } from '@dcloudio/uni-app';
 import zsEmpty from '@/components/zs-empty/index.vue'
 import { RouterUtils, TipsUtils } from '@/utils/util'
 const selected = ref(0)
@@ -116,14 +116,16 @@ onLoad((option) => {
 		orderFormData.value.orAfterSale = 1
 	}
 })
-
+onShow(()=>{
+	getOrderList()
+})
 onReachBottom(() => {
 	orderFormData.value.pageNo++;
 	getOrderList()
 })
 
 onMounted(() => {
-	getOrderList()
+	// getOrderList()
 })
 const selectedItem = (i) => {
 	selected.value = i
@@ -164,7 +166,9 @@ const paymentOrder = (payInfo: object) => {
 		...payInfo,
 		success: function (res) {
 			console.log('支付成功', res);
+			setTimeout(()=>{
 			getOrderQuery(orderCode.value, orderId.value)
+			},500)
 		},
 		fail: function (err) {
 			console.log('支付失败', err);

+ 16 - 0
src/uni_modules/liu-slide-img/changelog.md

@@ -0,0 +1,16 @@
+## 1.0.7(2023-06-09)
+增加预览二维码
+## 1.0.6(2023-05-15)
+增加点击事件
+## 1.0.5(2023-05-14)
+卡片轮播
+## 1.0.4(2023-05-14)
+增加卡片模式
+## 1.0.3(2023-04-14)
+增加示例
+## 1.0.2(2023-03-24)
+优化功能
+## 1.0.1(2023-03-14)
+初始发布
+## 1.0.0(2023-03-14)
+初始发布

+ 155 - 0
src/uni_modules/liu-slide-img/components/liu-slide-img/liu-slide-img.vue

@@ -0,0 +1,155 @@
+<template>
+	<view class="slide">
+		<swiper :style="'height:'+heightNumber+'rpx'" :autoplay="autoplay" :interval="interval" :circular="circular"
+			:current="current" :previous-margin="type==2?'30rpx':'0rpx'" :next-margin="type==2?'30rpx':'0rpx'"
+			@change="handleChange">
+			<swiper-item
+				:class="{'swiper-item':type==1,'swiper-item-card':type==2,'swiper-item-card-margin':(type==2 && swiperCurrent!=index)}"
+				v-for="(item, index) in list" :key="index" @click="click(index)">
+				<image :src="item.imageUrl" lazy-load :style="'border-radius:'+borderRadius+'rpx;'"
+					:class="{'defaut-img':type==1 || (type==2 && swiperCurrent==index),'card-img':type==2 && swiperCurrent!=index,'card-margin':type==2 && swiperCurrent==index}" />
+			</swiper-item>
+		</swiper>
+		<view class="custom-indicator">
+			<view v-for="(item,index) in list" :key="index"
+				:class="['indicator-item',swiperCurrent==index?'indicator-item-active':'']"></view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			//轮播图数据源
+			list: {
+				type: Array,
+				default: () => {
+					return []
+				}
+			},
+			//轮播模式(1:默认;2:卡片)
+			type: {
+				type: Number,
+				default: 1
+			},
+			//轮播图高度(rpx)
+			heightNumber: {
+				type: Number,
+				default: 300
+			},
+			//轮播图圆角(rpx)
+			borderRadius: {
+				type: Number,
+				default: 8
+			},
+			//是否自动切换
+			autoplay: {
+				type: Boolean,
+				default: true
+			},
+			//自动切换时间间隔
+			interval: {
+				type: Number,
+				default: 5000
+			},
+			//是否采用衔接滑动,即播放到末尾后重新回到开头
+			circular: {
+				type: Boolean,
+				default: true
+			},
+			//当前所在滑块的index
+			current: {
+				type: Number,
+				default: 0
+			},
+		},
+		data() {
+			return {
+				swiperCurrent: 0
+			}
+		},
+		mounted() {
+			this.swiperCurrent = this.current
+		},
+		methods: {
+			handleChange(e) {
+				this.swiperCurrent = e.detail.current
+				this.$emit("change", e.detail.current)
+			},
+			click(index) {
+				this.$emit("click", index)
+			}
+		}
+	};
+</script>
+
+<style scoped>
+	.slide {
+		width: 100%;
+		position: relative;
+	}
+
+	.swiper-item {
+		width: 100%;
+		height: 100%;
+		overflow: hidden;
+		box-sizing: border-box;
+	}
+
+	.swiper-item-card {
+		width: 92% !important;
+		height: 100%;
+		margin: 0 4%;
+		overflow: hidden;
+		box-sizing: border-box;
+		display: flex;
+		align-items: flex-start;
+		justify-content: center;
+	}
+
+	.swiper-item-card-margin {
+		padding: 4% 0;
+	}
+
+	.defaut-img {
+		width: 100%;
+		height: 100%;
+		overflow: hidden;
+	}
+
+	.card-img {
+		width: 100%;
+		height: 100%;
+		overflow: hidden;
+	}
+
+	.card-margin {
+		width: calc(100% - 40rpx);
+		margin: 0 20rpx;
+		overflow: hidden;
+	}
+
+	.custom-indicator {
+		width: 100%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		position: absolute;
+		margin: 0 auto;
+		bottom: 30rpx;
+	}
+
+	.indicator-item {
+		width: 10rpx;
+		height: 10rpx;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+		margin: 0 6rpx;
+		opacity: 0.6;
+	}
+
+	.indicator-item-active {
+		background-color: #FFFFFF;
+		opacity: 1;
+	}
+</style>

+ 6 - 0
src/uni_modules/liu-slide-img/license.md

@@ -0,0 +1,6 @@
+### 1、本插件可免费下载使用;
+### 2、未经许可,严禁复制本插件派生同类插件上传插件市场;
+### 3、未经许可,严禁在插件市场恶意复制抄袭本插件进行违规获利;
+### 4、对本软件的任何使用都必须遵守这些条款,违反这些条款的个人或组织将面临法律追究。
+
+

+ 85 - 0
src/uni_modules/liu-slide-img/package.json

@@ -0,0 +1,85 @@
+{
+	"id": "liu-slide-img",
+	"displayName": "轮播图、轮播图组件",
+	"version": "1.0.7",
+	"description": "好看、好用、简单的轮播图组件,支持自动切换、轮播模式、切换时间设置、轮播图高度设置、轮播图圆角、轮播内容设置等",
+	"keywords": [
+        "轮播图",
+        "轮播",
+        "走马灯",
+        "swiper",
+        "图片"
+    ],
+	"repository": "",
+	"engines": {
+		"HBuilderX": "^3.1.0"
+	},
+	"dcloudext": {
+		"type": "component-vue",
+		"sale": {
+			"regular": {
+				"price": "0.00"
+			},
+			"sourcecode": {
+				"price": "0.00"
+			}
+		},
+		"contact": {
+			"qq": ""
+		},
+		"declaration": {
+			"ads": "无",
+			"data": "无",
+			"permissions": "无"
+		},
+		"npmurl": ""
+	},
+	"uni_modules": {
+		"dependencies": [],
+		"encrypt": [],
+		"platforms": {
+			"cloud": {
+				"tcb": "y",
+				"aliyun": "y"
+			},
+			"client": {
+				"Vue": {
+					"vue2": "y",
+					"vue3": "u"
+				},
+				"App": {
+					"app-vue": "u",
+					"app-nvue": "u"
+				},
+				"H5-mobile": {
+					"Safari": "y",
+					"Android Browser": "y",
+					"微信浏览器(Android)": "y",
+					"QQ浏览器(Android)": "y"
+				},
+				"H5-pc": {
+					"Chrome": "y",
+					"IE": "u",
+					"Edge": "u",
+					"Firefox": "u",
+					"Safari": "u"
+				},
+				"小程序": {
+					"微信": "y",
+					"阿里": "u",
+					"百度": "u",
+					"字节跳动": "u",
+					"QQ": "u",
+					"钉钉": "u",
+					"快手": "u",
+					"飞书": "u",
+					"京东": "u"
+				},
+				"快应用": {
+					"华为": "u",
+					"联盟": "u"
+				}
+			}
+		}
+	}
+}

+ 70 - 0
src/uni_modules/liu-slide-img/readme.md

@@ -0,0 +1,70 @@
+### liu-slide-img适用于uni-app项目的轮播图组件
+### 本组件目前兼容微信小程序、H5
+### 本组件支持自定义自动切换、切换时间、轮播图高度、轮播内容
+# --- 扫码预览、关注我们 ---
+
+## 扫码关注公众号,查看更多插件信息,预览插件效果! 
+
+![](https://uni.ckapi.pro/uniapp/publicize.png)
+
+### 使用方式
+``` 
+<template>
+	<view class="page-main">
+		<view style="margin: 30rpx;">卡片模式:</view>
+		<liu-slide-img :list="list" :type="2" :autoplay="autoplay" :interval="interval" @change="change"
+			@click="click"></liu-slide-img>
+		<view style="margin: 30rpx;">默认模式:</view>
+		<liu-slide-img :list="list" :autoplay="autoplay" :interval="interval" @change="change"
+			@click="click">></liu-slide-img>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list: [{
+						src: "https://cdn.pixabay.com/photo/2020/05/19/13/32/cartoon-5190837_1280.jpg"
+					},
+					{
+						src: "https://cdn.pixabay.com/photo/2020/05/19/13/35/cartoon-5190860_1280.jpg"
+					},
+					{
+						src: "https://cdn.pixabay.com/photo/2022/03/31/14/53/camp-7103189_1280.png"
+					}
+				],
+				autoplay: true,
+				interval: 3000
+			}
+		},
+		methods: {
+			//当前轮播索引
+			change(e) {
+				console.log('==========', e)
+			},
+			//点击轮播
+			click(e) {
+				console.log('点击轮播', e)
+			}
+		}
+	}
+</script>
+```
+
+### 属性说明
+| 名称                         | 类型           | 默认值                  | 描述             |
+| ----------------------------|--------------- | ---------------------- | ---------------|
+| list                        | Array          | []                     | 轮播图数据源
+| type                        | Number         | 1                      | 轮播模式(1:默认;2:卡片)
+| heightNumber                | Number         | 300                    | 轮播图高度(rpx)
+| borderRadius                | Number         | 8                      | 轮播图圆角(rpx)
+| autoplay                    | Boolean        | true                   | 是否自动切换
+| interval                    | Number         | 5000                   | 自动切换时间间隔
+| circular                    | Boolean        | true                   | 是否采用衔接滑动,即播放到末尾后重新回到开头
+| current                     | Number         | 0                      | 当前所在滑块的index
+| @change                     | Function        |                        | 轮播回调
+| @click                      | Function        |                        | 点击轮播
+ 
+
+

+ 6 - 0
src/utils/common/upload.ts

@@ -3,6 +3,10 @@ import { useCacheStore } from '@/stores/cache'
 
 export function uploadImage(tempFilePath: string, onSuccess?: (url: string) => void, onFail?: (err: any) => void) {
     const cache = useCacheStore()
+    uni.showLoading({
+        title: '上传中...'
+        , mask: true
+    })
     uni.uploadFile({
         url: 'https://api.qlapp.cn/jeecgboot/sys/common/upload',
         filePath: tempFilePath,
@@ -11,6 +15,7 @@ export function uploadImage(tempFilePath: string, onSuccess?: (url: string) => v
             'x-access-token': cache.get('TOKEN')
         },
         success: (res) => {
+            uni.hideLoading()
             const data =JSON.parse(res.data)
             if (res.statusCode == 200){
                 // uni.showToast({ title: '上传成功', icon: 'success' })
@@ -22,6 +27,7 @@ export function uploadImage(tempFilePath: string, onSuccess?: (url: string) => v
         },
         fail: (err) => {
             console.log(err)
+            uni.hideLoading()
             uni.showToast({ title: '上传失败', icon: 'none' })
             onFail && onFail(err)
         }

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

@@ -178,9 +178,9 @@ export class HttpClient {
 
 // 创建实例
 export const http = new HttpClient({
-  // baseURL: 'http://192.168.0.217:8080/jeecg-boot/app',
+  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: 'http://192.168.0.11:8080/jeecg-boot/app',
   // baseURL: 'https://api.qlapp.cn/jeecgboot/app', //生产
   headers: {
     'Content-Type': 'application/json'