purui 1 month ago
parent
commit
88cd75c54e

+ 1 - 1
packages/app/env/.env

@@ -1,7 +1,7 @@
 VITE_APP_TITLE = '筑巢荟'
 VITE_APP_PORT = 9000
 
-VITE_UNI_APPID = 'H57F2ACE4'
+VITE_UNI_APPID = '__UNI__BA668E1'
 VITE_WX_APPID = 'wx4d95c9addba81089'
 
 # h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base

+ 8 - 0
packages/app/pages.config.ts

@@ -182,6 +182,14 @@ export default defineUniPages({
             navigationBarBackgroundColor: '#ffffff',
           },
         },
+		{
+		  path: 'home/activity/raffle/index',
+		  type: 'page',
+		  style: {
+		    navigationStyle: "custom",
+		    navigationBarBackgroundColor: '#ffffff',
+		  },
+		},
         {
           path: 'home/mall/confirm-order/index',
           type: 'page',

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

@@ -564,6 +564,10 @@ export const getPointsOrder = (id) =>
  * 取消订单
  */
 export const cancelOrder = (id) => httpGet('/app-api/member/points-order/orderCancel', { id })
+// export const getActivities = (query) =>
+//   httpGet<{
+//     list: Activity[]
+//   }>('/app-api/member/activity/page', query)
 export const getActivities = (query) =>
   httpGet<{
     list: Activity[]

+ 1 - 1
packages/app/src/manifest.json

@@ -1,6 +1,6 @@
 {
   "name": "筑巢荟",
-  "appid": "H57F2ACE4",
+  "appid": "__UNI__BA668E1",
   "description": "",
   "versionName": "1.0.0",
   "versionCode": "100",

+ 34 - 0
packages/app/src/pages-sub/home/activity/raffle/index.vue

@@ -0,0 +1,34 @@
+<route lang="json5">
+{
+  "style": {
+    "navigationStyle": "custom"
+  }
+}
+</route>
+<script setup lang="ts">
+	import NavbarEvo from '@/components/navbar-evo.vue'
+</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>
+		</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>
+				</div>
+			</div>
+		</div>
+	</div>
+</template>
+<style>
+</style>

+ 10 - 1
packages/app/src/pages-sub/home/components/elegant-info-card.vue

@@ -46,7 +46,7 @@ const router = useRouter()
     <div
       class="w-full h-[145px] pl-39 pt-6 pr-6 pb-6 flex flex-col box-border bg-white rounded-2xl shadow"
     >
-      <div class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-normal">
+      <div class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-normal over-two">
         {{ options.title }}
       </div>
 
@@ -77,3 +77,12 @@ const router = useRouter()
     </div>
   </view>
 </template>
+<style scoped>
+	.over-two{
+		display: -webkit-box;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		-webkit-line-clamp: 2;
+		-webkit-box-orient: vertical;
+	}
+</style>

+ 9 - 6
packages/app/src/pages-sub/home/offline-activity/cycling-rankings/index.vue

@@ -124,7 +124,7 @@ onShareTimeline(() => ({
             >
               <div
                 class="flex-1 py-2 relative"
-                :class="`${i === 0 ? 'w-[143px] h-[141px] bg-white rounded-xl relative bottom-8 pt-4 order-1 ' : ''}`"
+                :class="`${i === 0 ? 'w-[143px] h-[141px] bg-white rounded-xl relative bottom-12 pt-4 order-1 ' : ''}`"
                 :style="{ order: i === 0 ? 1 : i - 1 }"
               >
                 <div
@@ -185,11 +185,14 @@ onShareTimeline(() => ({
                 >
                   {{ i < 9 ? '0' + (i + 1) : i + 1 }}
                 </div>
-                <wd-img
-                  class="w-8 h-8 rounded-full"
-                  round
-                  :src="it.avatar || NetImages.DefaultAvatar"
-                />
+                <div class="w-8 h-8 shrink-0 rounded-full">
+					<image :src="it.avatar || NetImages.DefaultAvatar"></image>
+					<!-- <wd-img
+					  class="rounded-full w-full h-full"
+					  round
+					  :src="it.avatar || NetImages.DefaultAvatar"
+					/> -->
+				</div>
                 <div
                   class="text-center text-black/80 text-sm font-normal font-['PingFang_SC'] leading-relaxed"
                 >

+ 10 - 1
packages/app/src/pages-sub/home/offline-activity/list/index.vue

@@ -61,7 +61,7 @@ onShareTimeline(() => ({
                     ></wd-img>
                     <div class="flex flex-col justify-between">
                       <div
-                        class="w-[168px] text-black text-base font-normal font-['PingFang_SC'] leading-relaxed"
+                        class="w-[168px] text-black text-base font-normal font-['PingFang_SC'] leading-relaxed over-two"
                       >
                         {{ it.name }}
                       </div>
@@ -147,3 +147,12 @@ onShareTimeline(() => ({
     </div>
   </div>
 </template>
+<style scoped>
+	.over-two{
+		display: -webkit-box;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		-webkit-line-clamp: 2;
+		-webkit-box-orient: vertical;
+	}
+</style>

+ 46 - 30
packages/app/src/pages-sub/login/index.vue

@@ -16,6 +16,10 @@ const phoneCode = ref('')
 const loginType = ref()
 const mobile = ref('')
 const getPhoneNumber = async ({ detail: { code: phoneCode } }) => {
+	if(!agree.value){
+		  await uni.showToast({ title: "请勾选阅读并同意服务使用协议",icon:"none" })
+		  return false
+	}	
   const { code } = await uni.login()
   console.log(code, phoneCode)
   const { data } = await weixinMiniAppLogin(phoneCode, code, '9b2ffbc1-7425-4155-9894-9d5c08541d62')
@@ -51,6 +55,10 @@ const handleTestLogin = async () => {
     url: '/pages/mine/index',
   })
 }
+const agree = ref(false)
+const agreeChange = ({ value }) =>{
+	agree.value = value
+}
 onLoad(async (query: { type?: 'test' }) => {
   if (query.type) {
     loginType.value = query.type
@@ -86,37 +94,45 @@ onLoad(async (query: { type?: 'test' }) => {
         >
           手机号一键登录
         </button>
-        <div class="w-[318px] mt-8">
-          <span class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-tight">
+        <div class="w-[318px] mt-8 flex">
+          <!-- <span class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-tight">
             如您点击授权,您将同意并授权
-          </span>
-          <span
-            @click="
-              toContentHtml({
-                title: '筑巢荟用户服务协议',
-                type: AgreementType.ZCHServiceAgreement,
-              })
-            "
-            class="text-[#0cbe7c] text-xs font-normal font-['PingFang_SC'] leading-tight"
-          >
-            《筑巢荟用户服务协议》、
-          </span>
-          <span
-            @click="
-              toContentHtml({ title: '隐私政策', type: AgreementType.ZCHUserPrivacyAgreement })
-            "
-            class="text-[#0cbe7c] text-xs font-normal font-['PingFang_SC'] leading-tight"
-          >
-            《隐私政策》、
-          </span>
-          <span
-            @click="
-              toContentHtml({ title: '注册协议', type: AgreementType.ZCHUserRegistrationAgreement })
-            "
-            class="text-[#0cbe7c] text-xs font-normal font-['PingFang_SC'] leading-tight"
-          >
-            《注册协议》
-          </span>
+          </span> -->
+		  <div class="pt-[4px] pr-[4px]">
+			  <wd-checkbox :modelValue="agree" shape="circle" @change="agreeChange"></wd-checkbox>
+		  </div>
+		  <div>
+			  <span class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-tight">
+			    我已阅读并同意筑巢荟的
+			  </span>
+			  <span
+			    @click="
+			      toContentHtml({
+			        title: '筑巢荟用户服务协议',
+			        type: AgreementType.ZCHServiceAgreement,
+			      })
+			    "
+			    class="text-[#0cbe7c] text-xs font-normal font-['PingFang_SC'] leading-tight"
+			  >
+			    《筑巢荟用户服务协议》、
+			  </span>
+			  <span
+			    @click="
+			      toContentHtml({ title: '隐私政策', type: AgreementType.ZCHUserPrivacyAgreement })
+			    "
+			    class="text-[#0cbe7c] text-xs font-normal font-['PingFang_SC'] leading-tight"
+			  >
+			    《隐私政策》、
+			  </span>
+			  <span
+			    @click="
+			      toContentHtml({ title: '注册协议', type: AgreementType.ZCHUserRegistrationAgreement })
+			    "
+			    class="text-[#0cbe7c] text-xs font-normal font-['PingFang_SC'] leading-tight"
+			  >
+			    《注册协议》
+			  </span>
+		  </div>
         </div>
       </template>
     </div>

+ 8 - 0
packages/app/src/pages.json

@@ -207,6 +207,14 @@
           }
         },
         {
+          "path": "home/activity/raffle/index",
+          "type": "page",
+          "style": {
+            "navigationStyle": "custom",
+            "navigationBarBackgroundColor": "#ffffff"
+          }
+        },
+        {
           "path": "home/mall/confirm-order/index",
           "type": "page",
           "style": {

+ 1 - 0
packages/app/src/types/uni-pages.d.ts

@@ -27,6 +27,7 @@ interface NavigateToOptions {
        "/pages-sub/home/study-tour/list" |
        "/pages-sub/home/activity/detail/index" |
        "/pages-sub/home/activity/images/index" |
+       "/pages-sub/home/activity/raffle/index" |
        "/pages-sub/home/mall/confirm-order/index" |
        "/pages-sub/home/mall/detail/index" |
        "/pages-sub/home/mall/shopping-cart/index" |