xiaoxin 1 年間 前
コミット
3e679fb4a8

+ 1 - 1
api/index.js

@@ -109,7 +109,7 @@ export const getDetailInfoById = async (data) => {
 // 发布照片--活动
 export const getReleaseImage = async (data) => {
 	return await myRequest({
-		url: '/alumniActvity/confirmReleaseImage',
+		url: '/alumniActivity/confirmReleaseImage',
 		method: 'post',
 		data
 	})

+ 1 - 1
components/my-join/my-join.vue

@@ -10,7 +10,7 @@
 					<view class="top_msg">
 						<view class="msg_title">{{ item.theme }}</view>
 						<view class="msg_name">{{ item.orgName }}</view>
-						<view class="">{{ item.startTime }} 至 {{ item.startTime }}</view>
+						<view class="">{{ item.startTime }} 至 {{ item.endTime }}</view>
 					</view>
 				</view>
 				<view v-if="item.statuName == '报名进行中'" class="box_bottom on">报名进行中</view>

+ 1 - 1
node_modules/.package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "H5_schoolFellow",
-  "lockfileVersion": 2,
+  "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "node_modules/call-bind": {

+ 48 - 10
pages/act_detail/act_detail.vue

@@ -12,6 +12,14 @@
 			<uni-icons type="location" size="20" color="#007AFF"></uni-icons>
 		</view>
 
+		<!-- 咨询方式 -->
+		<view class="phone">
+			咨询方式:
+			<view class="phone_value" @click="clickPhone(info.phone)">
+				{{ info.phone }}
+			</view>
+		</view>
+
 		<!-- 富文本区域 -->
 		<view class="richtext">
 			<uv-parse :content="info.themeDetail" :tagStyle="tagStyle"></uv-parse>
@@ -61,11 +69,11 @@
 		</view>
 
 		<!-- 活动相册区域 -->
-		<view class="box" v-if="info.isImage == 1 && info.images?.length">
+		<view class="box" v-if="info.isImage == 1 && info.isReport == 1">
 			<view class="box_icon"></view>
 			<view class="box_title">活动相册</view>
 			<view class="box_more" @click="goDetail(3)">
-				查看更多&nbsp;
+				{{ info.images?.length ? '查看更多&nbsp;' : '去上传&nbsp;' }}
 				<uni-icons type="right" size="18" color="#007AFF"></uni-icons>
 			</view>
 		</view>
@@ -82,7 +90,7 @@
 				<view class="btn_text">{{ dayjs(info.signsTime).format('YYYY-MM-DD HH:mm:ss') }} 开始报名</view>
 			</view>
 
-			<view v-if="dayjs(info.signeTime).valueOf() > Date.now()" class="btn" @click="handleApply(info.id)">
+			<view v-if="dayjs(info.signeTime).valueOf() > Date.now()" class="btn" @click="handleApply_throttle">
 				我要报名
 				<view class="btn_text">{{ dayjs(info.signeTime).format('YYYY-MM-DD HH:mm:ss') }} 报名截止</view>
 			</view>
@@ -98,7 +106,7 @@
 				<view class="btn_text">{{ dayjs(info.startTime).format('YYYY-MM-DD HH:mm:ss') }} 开始签到</view>
 			</view>
 
-			<view v-if="dayjs(info.endTime).valueOf() > Date.now()" class="btn" @click="handleSign(info.id)">
+			<view v-if="dayjs(info.endTime).valueOf() > Date.now()" class="btn" @click="handleSign_throttle">
 				我要签到
 				<view class="btn_text">{{ dayjs(info.endTime).format('YYYY-MM-DD HH:mm:ss') }} 签到截止</view>
 			</view>
@@ -116,6 +124,7 @@ import { ref } from 'vue'
 import { getDetailInfoById, getReportById, getSigninById } from '@/api/index.js'
 import dayjs from 'dayjs'
 import { calculateDistance } from '@/utils/calculateDistance.js'
+import lodash from 'lodash'
 
 // 富文本样式
 let tagStyle = {
@@ -179,14 +188,14 @@ const goDetail = (e) => {
 }
 
 // 我要报名按钮回调
-const handleApply = (id) => {
+const handleApply = () => {
 	uni.showModal({
 		title: '提示',
 		content: '确定报名吗?',
 		success: async (res) => {
 			if (res.confirm) {
 				let data = {
-					id
+					id: currentId.value
 				}
 				const res = await getReportById(data)
 				// console.log(res)
@@ -197,7 +206,7 @@ const handleApply = (id) => {
 						mask: true
 					})
 					setTimeout(() => {
-						getData(info.id)
+						getData(currentId.value)
 					}, 1500)
 				}
 			}
@@ -205,8 +214,13 @@ const handleApply = (id) => {
 	})
 }
 
+// 节流
+const handleApply_throttle = lodash.throttle(handleApply, 1000, {
+	trailing: false
+})
+
 // 我要签到按钮回调
-const handleSign = (id) => {
+const handleSign = () => {
 	let rangValue = 500
 
 	// 计算出距离
@@ -220,7 +234,7 @@ const handleSign = (id) => {
 			success: async (res) => {
 				if (res.confirm) {
 					let data = {
-						id
+						id: currentId.value
 					}
 					const res = await getSigninById(data)
 					// console.log(res)
@@ -231,7 +245,7 @@ const handleSign = (id) => {
 							mask: true
 						})
 						setTimeout(() => {
-							getData(info.id)
+							getData(currentId.value)
 						}, 1500)
 					}
 				}
@@ -245,6 +259,18 @@ const handleSign = (id) => {
 		})
 	}
 }
+
+// 节流
+const handleSign_throttle = lodash.throttle(handleSign, 1000, {
+	trailing: false
+})
+
+// 拨打电话回调
+const clickPhone = (phone) => {
+	uni.makePhoneCall({
+		phoneNumber: phone
+	})
+}
 </script>
 
 <style lang="scss" scoped>
@@ -272,6 +298,18 @@ const handleSign = (id) => {
 		color: #808080;
 	}
 
+	.phone {
+		display: flex;
+		margin-top: 15rpx;
+		line-height: 45rpx;
+		font-size: 24rpx;
+		color: #808080;
+
+		.phone_value {
+			color: #007aff;
+		}
+	}
+
 	.richtext {
 		margin: 15rpx 0;
 	}

+ 1 - 1
pages/index/index.vue

@@ -94,4 +94,4 @@ const getCardnumberURL = () => {
 }
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped></style>

+ 1 - 1
unpackage/dist/build/web/index.html

@@ -14,7 +14,7 @@
     <title>H5_schoolFellow</title>
     <!--preload-links-->
     <!--app-context-->
-    <script type="module" crossorigin src="/alumnus/alumniH5/assets/index-CDU6Vt0w.js"></script>
+    <script type="module" crossorigin src="/alumnus/alumniH5/assets/index-B7wpxaRz.js"></script>
     <link rel="stylesheet" crossorigin href="/alumnus/alumniH5/assets/index-DKUHF3PI.css">
   </head>
   <body>

+ 11 - 5
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -2,30 +2,36 @@
   "hash": "09146d7d",
   "configHash": "b27acba1",
   "lockfileHash": "e9149135",
-  "browserHash": "2849c63b",
+  "browserHash": "64a48bfe",
   "optimized": {
     "dayjs": {
       "src": "../../../../../node_modules/dayjs/dayjs.min.js",
       "file": "dayjs.js",
-      "fileHash": "6756914b",
+      "fileHash": "f8d65cae",
       "needsInterop": true
     },
     "quill": {
       "src": "../../../../../node_modules/quill/dist/quill.js",
       "file": "quill.js",
-      "fileHash": "0ba450d8",
+      "fileHash": "98ff153c",
       "needsInterop": true
     },
     "lodash/throttle": {
       "src": "../../../../../node_modules/lodash/throttle.js",
       "file": "lodash_throttle.js",
-      "fileHash": "fd4c4550",
+      "fileHash": "f57c1a3a",
       "needsInterop": true
     },
     "lodash/debounce": {
       "src": "../../../../../node_modules/lodash/debounce.js",
       "file": "lodash_debounce.js",
-      "fileHash": "8d8897a5",
+      "fileHash": "8484c02b",
+      "needsInterop": true
+    },
+    "lodash": {
+      "src": "../../../../../node_modules/lodash/lodash.js",
+      "file": "lodash.js",
+      "fileHash": "39ceec91",
       "needsInterop": true
     }
   },