purui 2 months ago
parent
commit
b5e48f0640

+ 3 - 1
packages/app/src/components/moment-item.vue

@@ -190,7 +190,9 @@ onMounted(async () => {
             </div>
           </div>
         </template>
-        <template v-else>{{ options.circleDesc }}</template>
+        <template v-else>
+			<div class="text-ellipsis line-clamp-2 overflow-hidden">{{ options.circleDesc }}</div>
+		</template>
       </view>
       <view
         v-if="props.options.tagName && props.options.tagName?.split(',').length > 0"

+ 3 - 1
packages/app/src/components/page-helper.vue

@@ -79,7 +79,9 @@ defineExpose({
       :default-page-size="10"
       :default-page-no="1"
       :use-page-scroll="true"
-      :auto-full-height="true"
+      :auto-full-height="false"
+	  :auto-height="false"
+	  :fixed="false"
       custom-class="h-full"
       @query="queryList"
     >

+ 1 - 0
packages/app/src/core/libs/message-types.ts

@@ -87,6 +87,7 @@ export const messageTypes = [
   { subType: 34, desc: '点赞圈子', path: '/pages-sub/home/moment/index' },
   { subType: 35, desc: '点赞评论', path: '/pages-sub/home/moment/index' },
   { subType: 36, desc: '分享', path: '/pages-sub/home/moment/index' },
+  { subType: 37, desc: '积分抽奖' },
 ]
 export const getMessageType = (subType: number) =>
   messageTypes.find((item) => item.subType === subType)

+ 19 - 0
packages/app/src/core/libs/requests.ts

@@ -977,6 +977,25 @@ export const getHonorStatistics = (query = {}) =>
     certCount: number
     badgeCount: number
   }>('/app-api/member/stylist-honor/get-honor-count', query)
+  
+/**
+ * 扫码抢红包
+ */
+export const getRedPacket = (query = {}) =>
+  httpGet<{
+    userId: number
+    redId: number
+	points:number
+  }>('/app-api/member/user/getRedPacket', query)
+/**
+ * 扫码抢红包
+ */
+export const getListRedPacket = (query = {}) =>
+  httpGet<{
+    userId: number
+    redId: number
+	points:number
+  }>('/app-api/member/user/listRedPacket', query)    
 /**
  * 获取骑行下拉
  */

+ 1 - 1
packages/app/src/core/utils/common.ts

@@ -139,7 +139,7 @@ export const qrCodeString2Object = (str: string): Record<string, any> => {
   if (!str || typeof str !== 'string') {
     return {}
   }
-  const [type, ...options] = str.split(':')
+  const [type, ...options] = str.split(':')  
   const obj = {} as Record<string, any>
   for (const item of options.join(':').split(';' as const)) {
     const [key, value] = item.split(':')

+ 35 - 32
packages/app/src/pages-sub/home/activity/detail/index.vue

@@ -475,38 +475,41 @@ onShareTimeline(() => ({ title: data.value.name, imageUrl: data.value.thumbnailU
       <view class="flex px-10 h-full items-center justify-center">
         <div class="w-full flex flex-col gap-5 aspect-[0.71/1] relative">
           <div class="absolute top-0 left-0 right-0 bottom-0 z--1">
-            <wd-img width="100%" height="100%" :src="signupListDialogBg"></wd-img>
-          </div>
-          <div class="h-full box-border py-5 px-7.25 flex flex-col justify-between">
-            <div class="flex justify-between">
-              <div class="text-justify text-white text-2xl font-bold font-['Alimama_ShuHeiTi']">
-                报名详情
-              </div>
-              <div @click="listShow = true">
-                <wd-icon name="close" size="22px" color="#ffff"></wd-icon>
-              </div>
-            </div>
-
-            <div class="flex flex-col justify-center aspect-[0.7/1] gap-5 p-6.5">
-              <PageHelper
-                :request="isActivity ? getActivitySignups : getStudyTourSignups"
-                :query="isActivity ? { activityId: id } : { studyId: id }"
-                class="flex-grow flex flex-col"
-              >
-                <template #default="{ source }">
-                  <div class="flex flex-col gap-5">
-                    <template v-for="(it, i) in source.list" :key="i">
-                      <div
-                        class="text-black text-sm font-normal font-['PingFang_SC'] leading-normal"
-                      >
-                        {{ dayjs(it.createTime).format('YYYY-MM-DD') }} {{ it.name }}已报名
-                      </div>
-                    </template>
-                  </div>
-                </template>
-              </PageHelper>
-            </div>
-          </div>
+			  <div class="absolute top-0 left-0 w-full">
+			    <!-- <wd-img class="block" width="100%" height="100%" :src="signupListDialogBg"></wd-img> -->
+				<image mode="widthFix" :src="signupListDialogBg"></image>
+			  </div>
+			  <div class="h-full box-border py-5 px-7.25 flex flex-col justify-between relative z-10 pt-[40px]">
+			    <div class="flex justify-between">
+			      <div class="text-justify text-white text-2xl font-bold font-['Alimama_ShuHeiTi']">
+			        报名详情
+			      </div>
+			      <div @click="listShow = true">
+			        <wd-icon name="close" size="22px" color="#ffff"></wd-icon>
+			      </div>
+			    </div>
+			  
+			    <div class="flex flex-col justify-center aspect-[0.7/1] gap-5 p-4 relative">
+			      <PageHelper
+			        :request="isActivity ? getActivitySignups : getStudyTourSignups"
+			        :query="isActivity ? { activityId: id } : { studyId: id }"
+			        class="flex-grow flex flex-col"
+			      >
+			        <template #default="{ source }">
+			          <div class="flex flex-col gap-5">
+			            <template v-for="(it, i) in source.list" :key="i">
+			              <div
+			                class="text-black text-sm font-normal font-['PingFang_SC'] leading-normal"
+			              >
+			                {{ dayjs(it.createTime).format('YYYY-MM-DD') }} {{ it.name }}已报名
+			              </div>
+			            </template>
+			          </div>
+			        </template>
+			      </PageHelper>
+			    </div>
+			  </div>
+		  </div>
         </div>
       </view>
     </wd-overlay>

+ 46 - 12
packages/app/src/pages-sub/home/activity/raffle/index.vue

@@ -6,25 +6,59 @@
 }
 </route>
 <script setup lang="ts">
-	import NavbarEvo from '@/components/navbar-evo.vue'
+import NavbarEvo from '@/components/navbar-evo.vue'
+import { NetImages } from '../../../../core/libs/net-images'
+import { getRedPacket, getListRedPacket } from '../../../../core/libs/requests'
+import { useUserStore } from '@/store'
+import { storeToRefs } from 'pinia'
+
+const userStore = useUserStore()
+const { userInfo } = storeToRefs(userStore)
+const redId = ref(1)
+const flag = ref(true)
+const error = ref(true)
+const { data: redPacket, run: setRedPacket } = useRequest(() => getRedPacket({ userId: userInfo.value.id, redId:redId.value }))
+const { data: redList, run: setListRedPacket} = useRequest(() => getListRedPacket({ redId:redId.value }))
+onLoad(async(options)=>{
+	if(options.redId){
+		redId.value = options.redId
+	}
+	try{
+		await setRedPacket()
+		flag.value = false
+	}catch(e){
+		console.log(e)
+		error.value = e
+	}
+	finally{
+		await setListRedPacket()
+	}
+})
 </script>
 <template>
 	<div>
 		<NavbarEvo dark transparent></NavbarEvo>
-		<div class="w-full"></div>
-		<div class="w-full bg-white mb-[16rpx]">
-			<div class="text-center">
-				<div class="text-[32rpx]">恭喜您获得</div>
-				<div class="text-[80rpx] text-[#EF4343]">38888<text class="text-[32rpx]">积分</text></div>
+		<div class="w-full pb-[40rpx] bg-white">
+			<image mode="widthFix" src="https://image.zhuchaohui.com/zhucaohui/d44e780c6fda38ace065da60a7c536f0822ec997689e25df7e9d913a2b4c3a02.png"></image>
+		</div>
+		<div class="w-full bg-white mb-[16rpx] pb-[40rpx]">
+			<div class="text-center" v-if="flag">
+				<div class="text-[32rpx] text-[#EF4343]">{{error.msg}}</div>
 			</div>
+			<div class="text-center" v-else>
+				<div class="text-[32rpx] mb-[12rpx]">恭喜您获得</div>
+				<div class="text-[80rpx] text-[#EF4343]">{{redPacket.points}}<text class="text-[32rpx]">积分</text></div>
+			</div>		
 		</div>
-		<div class="w-full bg-white py-[10rpx] px-[32rpx]">
-			<div class="text-black/60 border-b-[#e1e1e1] text-[32rpx]">已领取</div>
-			<div class="w-full">
-				<div class="flex justify-center items-center">
-					<div class="w-[128rpx] h-[128rpx]">
-						
+		<div class="bg-white py-[10rpx] box-border px-[32rpx]">
+			<div class="text-black/60 border-b-[#e1e1e1] text-[32rpx] py-[14rpx]">已领取</div>
+			<div class="" v-for="(it, i) in redList" :key="i">
+				<div class="flex items-center py-[14rpx] border-b">
+					<div class="w-[78rpx] h-[78rpx] mr-[24rpx] rounded-full overflow-hidden">
+						<image mode="widthFix" :src="it.userAvatar || NetImages.DefaultAvatar"></image>
 					</div>
+					<div class="text-black text-[32rpx] flex-grow">{{ it.userName }}</div>
+					<div class="text-black text-[32rpx]">{{ it.points }}积分</div>
 				</div>
 			</div>
 		</div>

+ 1 - 1
packages/app/src/pages-sub/home/mall/components/product.vue

@@ -59,7 +59,7 @@ const handleAddToCart = async () => {
       <div class="flex-1"></div>
       <div
         v-if="Number(options.productPrice)"
-        class="w-[26px] text-black/30 text-xs font-normal font-['PingFang_SC'] line-through leading-normal"
+        class="shrink-0 pr-[4rpx] text-black/30 text-xs font-normal font-['PingFang_SC'] line-through leading-normal"
       >
         <!-- ¥60 -->
         ¥{{ options.productPrice }}

+ 3 - 3
packages/app/src/pages-sub/mine/scan/result/index.vue

@@ -49,10 +49,10 @@ onLoad(async (query: { result: string }) => {
     const { type, options } = qrCodeString2Object(query.result)
     scanType.value = type
     data.value = options
-    console.log(scanType.value)
-    console.log(data.value)
+    // console.log(scanType.value)
+    // console.log(data.value)
 
-    console.log(isInStoreClockIn.value)
+    // console.log(isInStoreClockIn.value)
 
     if (isPointsCheckout.value) uni.setNavigationBarTitle({ title: '付款' })
     // if (isInStoreClockIn.value) {

+ 3 - 1
packages/app/src/pages/mine/index.vue

@@ -177,8 +177,9 @@ const handleMenuClick = (path) => {
 }
 const handleClickScan = async () => {
   const { result } = await uni.scanCode({})
-  console.log(result)
+  // console.log(result)
   const { type, options } = qrCodeString2Object(result)
+  console.log(type)
   if (type === QrCodeBusinessType.InStoreClockIn) {
     if (!features.value.checkInAtStoreTask)
       return router.push('/pages-sub/mine/authentication/index')
@@ -201,6 +202,7 @@ const handleClickScan = async () => {
     }
     return
   }
+  // console.log(options.path)
   if (type === QrCodeBusinessType.PagePath) {
     await router.push(options.path)
     return