Эх сурвалжийг харах

feat: ✨ 引入logo图片,以及一些bug修复

zhangtao 1 өдөр өмнө
parent
commit
7c30d28b8d

+ 1 - 1
src/api/globals.d.ts

@@ -130,7 +130,7 @@ declare global {
     user: {
       loginUser<
         Config extends Alova2MethodConfig<any> & {
-          params: {
+          data: {
             username: string;
             password: string;
           };

+ 3 - 1
src/components/classItem/index.vue

@@ -9,7 +9,9 @@
     </view>
     <view class="mt20rpx flex items-center justify-between pl20rpx">
       <!-- <view class="text-28rpx">{{ item.name }}</view> -->
-      <wd-text :text="item.name" size="28rpx" :lines="1"></wd-text>
+      <view class="max-w-500rpx">
+        <wd-text :text="item.name" size="28rpx" :lines="1"></wd-text>
+      </view>
       <commonbtn
         bg-color="#0074FF"
         @click="handleGoPath(`/subPack/selectClass/index?id=${item.id}`)"

+ 2 - 1
src/components/course/index.vue

@@ -4,7 +4,8 @@
     @click="handleDetailes"
   >
     <image
-      :src="getImageURL(item.cover)"
+      :src="item.cover"
+      mode="aspectFill"
       class="w-200rpx h-200rpx rounded-32rpx min-w-200rpx"
     />
 

+ 9 - 1
src/manifest.json

@@ -48,7 +48,15 @@
     },
     "usingComponents": true,
     "darkmode": true,
-    "themeLocation": "theme.json"
+    "themeLocation": "theme.json",
+    "requiredPrivateInfos": [
+      "getLocation"
+    ],
+    "permission": {
+      "scope.userLocation": {
+        "desc": "将获取你的位置,以添加到水印相机"
+      }
+    }
   },
   "mp-alipay": {
     "usingComponents": true,

+ 12 - 2
src/pages/index/index.vue

@@ -42,6 +42,13 @@ function handleCommenPath(url: string) {
           });
         }
       },
+      fail(result) {
+        console.log(result, "获取二维码失败");
+        uni.showToast({
+          title: "请检查二维码是否正确",
+          icon: "none",
+        });
+      },
     });
   } else {
     router.push(url);
@@ -177,10 +184,13 @@ function getItemClass(path: string) {
               item.name
             }}</view>
           </view>
-          <view class="flex items-center justify-center flex-col">
+          <button
+            open-type="contact"
+            class="bg-transparent after:border-none after:h-full flex flex-col items-center justify-center p-l-0 pr-0"
+          >
             <image src="@/static/index/kf.png" class="w-52rpx h-52rpx"></image>
             <view class="text-24rpx text-[rgb(0,0,0,0.6)] mt-3">平台客服</view>
-          </view>
+          </button>
         </view>
       </view>
     </view>

+ 21 - 16
src/pages/login/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="header-top h-screen">
+  <view class="bg-white h-screen">
     <wd-navbar
       title="账户密码登录"
       fixed
@@ -12,34 +12,35 @@
     ></wd-navbar>
     <view class="flex items-center justify-center mt114rpx">
       <view class="flex flex-col items-center">
-        <view
-          class="bg-white rounded-full w160rpx h160rpx flex items-center justify-center"
-          >logo</view
-        >
-        <view class="text-40rpx mt-32rpx text-[rgb(0,0,0,.9))]"
-          >全龄运动商家端</view
-        >
+        <view class="flex items-center justify-center">
+          <image src="@/static/logo.png" class="w240rpx h238rpx"
+        /></view>
       </view>
     </view>
     <view class="px32rpx mt68rpx">
-      <customFormItem label="账号">
+      <view class="px48rpx">
         <wd-input
           type="text"
           placeholder="请输入账号"
           clearable
+          label="账号"
+          label-width="120rpx"
           v-model:model-value="modelForm.username"
-          custom-class="inputClass"
         />
-      </customFormItem>
-      <customFormItem label="密码">
+        <wd-divider color="rgba(0,0,0,0.1)"></wd-divider>
+      </view>
+      <view class="px48rpx mt32rpx">
         <wd-input
           show-password
           placeholder="请输入密码"
-          custom-class="inputClass"
+          label-width="120rpx"
           clearable
+          label="密码"
           v-model:model-value="modelForm.password"
         />
-      </customFormItem>
+        <wd-divider color="rgba(0,0,0,0.1)"></wd-divider>
+      </view>
+
       <view class="mt94rpx">
         <wd-button type="primary" size="large" block @click="handleLogin"
           >提交
@@ -75,8 +76,8 @@ const {
 ).onError((error) => {});
 
 const modelForm = reactive({
-  username: "mdadmin",
-  password: "admin123.",
+  username: "",
+  password: "",
 });
 function handleClickLeft() {
   uni.navigateBack();
@@ -106,6 +107,10 @@ async function handleLogin() {
 </script>
 
 <style scoped lang="scss">
+:deep(.wd-input__label-inner) {
+  font-size: 32rpx !important;
+  font-weight: 700;
+}
 :deep(.wd-input.is-not-empty:not(.is-disabled)::after) {
   background-color: var(--wot-input-border-color, #dadada) !important;
 }

BIN
src/static/logo.png


+ 3 - 5
src/subPack/Camera/index.vue

@@ -18,9 +18,7 @@
         </view>
       </view>
       <view class="px8rpx border-l border-l-solid border-l-amber">
-        <view class=""
-          >贵州省贵阳市观山湖区世纪城街道北京西路8号观山湖区办公大楼13层观山湖区文体广电旅游局</view
-        >
+        <view class="">{{ courseItem.siteAddress }}</view>
         <view class="mt2">
           {{ dayjs().format("YYYY.MM.DD") }} {{ dayjs().format("dddd") }}
         </view>
@@ -75,6 +73,7 @@ dayjs.locale("zh-cn");
 const cavansInfo = ref<UniApp.GetImageInfoSuccessData>();
 const isShow = ref(false);
 const FilePath = ref();
+const { courseItem } = storeToRefs(useCourseStore());
 async function initdone() {
   console.log("相机初始化完成!!!");
 }
@@ -165,8 +164,7 @@ function addWatermarkToImage(imagePath: string): Promise<string> {
         ctx.setFontSize(fontSize);
         const timeText = dayjs().format("HH:mm");
         const checkInText = "打卡";
-        const addressText =
-          "贵州省贵阳市观山湖区世纪城街道北京西路8号观山湖区办公大楼13层观山湖区文体广电旅游局";
+        const addressText = String(courseItem.value.siteAddress);
         const dateText = `${dayjs().format("YYYY.MM.DD")} ${dayjs().format("dddd")}`;
         const timeWidth = ctx.measureText(timeText).width;
         const checkInWidth = ctx.measureText(checkInText).width + padding * 4; // 增加padding确保文字不溢出

+ 1 - 0
src/subPack/ExtensionClass/index.vue

@@ -44,6 +44,7 @@
         <wd-textarea
           v-model="postponeReason"
           placeholder="请填写延课原因"
+          :maxlength="20"
           border
         />
       </view>

+ 2 - 1
src/subPack/classInspection/index.vue

@@ -13,11 +13,12 @@
     @scrolltolower="handleBottom"
     :style="{ height: `calc(100vh - ${statusBarHeight}px - ${height}px)` }"
   >
-    <view class="px32rpx py-24rpx">
+    <view class="px32rpx py-24rpx" v-if="data.length">
       <view v-for="item in data" class="mb24rpx" :key="item.appCourseId">
         <course :type="type" :item="item"></course>
       </view>
     </view>
+    <wd-status-tip image="content" tip="暂无内容" v-else />
     <view class="h80rpx"></view>
   </scroll-view>
 </template>

+ 1 - 0
src/subPack/notification/index.vue

@@ -20,6 +20,7 @@
       <image
         :src="item.imgUrl"
         class="w-160rpx h-160rpx rounded-32rpx min-w-160rpx"
+        mode="aspectFill"
       />
     </view>
   </view>

+ 4 - 3
src/subPack/selectClass/index.vue

@@ -13,7 +13,7 @@
       <view class="font-semibold text-32rpx">{{ item.useUserName }}</view>
       <upload
         :disabled="false"
-        @click="handleGoCamera(String(item.id))"
+        @click="handleGoCamera(item)"
         :imgUrl="item.verifyImage"
         :key="item.id"
         :id="item.id"
@@ -27,6 +27,7 @@
 </template>
 
 <script setup lang="ts">
+import type { AppCoursesVerificationRecord } from "@/api/globals";
 import router from "@/router";
 import upload from "@/subPack/EmployeeListAdd/components/CustomUpload/index.vue";
 const { dataId, img } = storeToRefs(useCameraStore());
@@ -75,8 +76,8 @@ async function handleSubmit() {
     router.back();
   }, 2000);
 }
-function handleGoCamera(id: string) {
-  dataId.value = id;
+function handleGoCamera(item: AppCoursesVerificationRecord) {
+  dataId.value = String(item.id);
   router.push({ name: "Camera" });
 }
 watch(

+ 2 - 1
src/subPack/writeOffDetaile/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="px32rpx py20rpx">
+  <view class="px32rpx py20rpx" v-if="data.length">
     <view
       class="bg-white mb20rpx rounded-32rpx p24rpx box-border"
       v-for="item in data"
@@ -57,6 +57,7 @@
       </view>
     </view>
   </view>
+  <wd-status-tip image="content" tip="暂无内容" v-else />
 </template>
 
 <script setup lang="ts">