浏览代码

更换图片+字体大小

Shan9312 8 月之前
父节点
当前提交
6be1761459

+ 11 - 18
src/pages.json

@@ -38,21 +38,6 @@
     ]
   },
   "pages": [
-    {
-      "path": "pages/my/my",
-      "type": "home",
-      "style": {
-        "navigationBarTitleText": "我的",
-        "navigationBarBackgroundColor": "#f59e0b"
-      }
-    },
-    {
-      "path": "pages/index/index2",
-      "type": "home",
-      "style": {
-        "navigationBarTitleText": "首页"
-      }
-    },
     {
       "path": "pages/index/index",
       "type": "home",
@@ -62,12 +47,20 @@
       }
     },
     {
-      "path": "pages/about/about",
-      "type": "page",
+      "path": "pages/my/my",
+      "type": "home",
       "style": {
-        "navigationBarTitleText": "工作台"
+        "navigationBarTitleText": "我的",
+        "navigationBarBackgroundColor": "#f59e0b"
       }
     },
+    // {
+    //   "path": "pages/about/about",
+    //   "type": "page",
+    //   "style": {
+    //     "navigationBarTitleText": "工作台"
+    //   }
+    // },
     {
       "path": "pages/approach/approach",
       "type": "page",

+ 10 - 10
src/pages/editPassword/editPassword.vue

@@ -12,10 +12,10 @@
   <view class="text-center container">
     <view class="pt-10 pb-20 top-box px-5">
       <image src="../../static/logo.png" mode="scaleToFill" class="logo" />
-      <!-- <view class="con-top">
-            <view class="h1 mb-6 mt-2">科湃腾肉牛系统</view>
-            <view class="h3 mb-10 pt-4">简化牧场管理,从这里开始!</view>
-          </view> -->
+      <view class="con-top">
+        <view class="h1 mb-6 mt-2">科湃腾肉牛系统</view>
+        <view class="h3 mb-10 pt-4">简化牧场管理,从这里开始!</view>
+      </view>
 
       <wd-form ref="form" :model="model">
         <wd-cell-group border>
@@ -64,7 +64,7 @@
         </wd-cell-group>
         <view class="flex justify-between mt-4 bot px-4">
           <!-- <text @click="handleRegist">注册</text> -->
-          <text @click="handleLogin">登录</text>
+          <text @click="handleLogin">登录</text>
         </view>
 
         <view class="footer mt-8">
@@ -116,13 +116,13 @@ function handleSubmit() {
     })
 }
 
-function handleRegist() {
-  uni.navigateTo({ url: '/pages/regist/regist' })
-}
+// function handleRegist() {
+//   uni.navigateTo({ url: '/pages/regist/regist' })
+// }
 
 function handleLogin() {
-  // uni.navigateTo({ url: '/pages/login/login' })
-  uni.switchTab({ url: '/pages/my/my' })
+  uni.navigateTo({ url: '/pages/login/login' })
+  // uni.switchTab({ url: '/pages/my/my' })
 }
 </script>
 

+ 16 - 6
src/pages/index/index.vue

@@ -26,8 +26,8 @@
         <view class="work-box-t flex justify-left flex-row flex-wrap">
           <view class="work-item mb-4 px-2" v-for="(child, index) in item.children" :key="index">
             <navigator :url="child.url">
-              <image :src="child.img" mode="scaleToFill" class="image" />
-              <view class="item-title">
+              <i class="iconfont icon" :class="child.icon"></i>
+              <view class="item-title mt-2">
                 {{ child.title }}
               </view>
             </navigator>
@@ -72,12 +72,14 @@ const navList = ref([
         img: '../../static/images/work/jinchang.png',
         title: '购牛',
         url: '/pages/purchase/purchase',
+        icon: 'icon-maijin',
       },
       {
         id: '1-2',
         img: '../../static/images/work/lichang.png',
         title: '肉牛进场',
         url: '/pages/approach/approach',
+        icon: 'icon-jinchang1',
       },
 
       {
@@ -85,24 +87,28 @@ const navList = ref([
         img: '../../static/images/work/bohuan1.png',
         title: '脖环绑定',
         url: '/pages/neckRing/neckRing',
+        icon: 'icon-bohuanbangding',
       },
       {
         id: '1-5',
         img: '../../static/images/work/weight.png',
         title: '称重',
         url: '/pages/weight/weight',
+        icon: 'icon-chengzhong',
       },
       {
         id: '1-6',
         img: '../../static/images/work/bohuan1.png',
         title: '脖环解绑',
         url: '/pages/untyNeckRing/untyNeckRing',
+        icon: 'icon-bohuanjiechu',
       },
       {
         id: '1-2',
         img: '../../static/images/work/lichang.png',
         title: '繁殖进场',
         url: '/pages/approach/approach',
+        icon: 'icon-jinchang',
       },
     ],
   },
@@ -115,30 +121,35 @@ const navList = ref([
         img: '../../static/images/work/fabing.png',
         title: '发病',
         url: '/pages/treat/treat',
+        icon: 'icon-fabingjizhi',
       },
       {
         id: '2-2',
         img: '../../static/images/work/zhiliao.png',
         title: '去势',
         url: '',
+        icon: 'icon-fengebujian',
       },
       {
         id: '2-2',
         img: '../../static/images/work/zhiliao.png',
         title: '检疫',
         url: '',
+        icon: 'icon-a-1form-insert',
       },
       {
         id: '2-2',
         img: '../../static/images/work/zhiliao.png',
         title: '驱虫',
         url: '',
+        icon: 'icon-quchongdengji',
       },
       {
         id: '2-2',
         img: '../../static/images/work/zhiliao.png',
         title: '免疫',
         url: '',
+        icon: 'icon-yimiaoguanli',
       },
     ],
   },
@@ -240,10 +251,9 @@ onLoad(() => {
 .header-bg {
   background: linear-gradient(to bottom, #f59e0b, #f5d198);
 }
-.image {
-  width: 100rpx;
-  height: 100rpx;
-  margin-bottom: 30rpx;
+.icon {
+  font-size: 34px !important;
+  color: #f59e0b;
 }
 
 .input-box {

+ 65 - 82
src/pages/my/my.vue

@@ -10,93 +10,39 @@
 <template>
   <view class="containe">
     <!-- 渐变色 -->
-    <view class="top-content px-6 pt-8">
+    <view class="top-content">
       <view class="user-box flex">
         <!-- 左边 -->
         <view class="flex">
           <image src="../../static/logo.png" mode="scaleToFill" class="imgs" />
           <view class="user-text pt-4">
             <text>好闪闪</text>
-            <view>技术部:888888</view>
+            <view>牧场-兽医部-技术员</view>
           </view>
         </view>
         <!-- 右边 -->
-        <!-- <view>hhhh</view> -->
+        <!-- <view>消息</view> -->
       </view>
     </view>
-
     <!-- 工具 -->
     <view class="px-4">
       <view class="tool px-4 pt-2 pb-2">
         <view class="title">工具栏</view>
         <view class="tool-box">
-          <view class="tool-item">
-            <image class="icon pb-1" src="../../static/images/tool/lanya.png" mode="scaleToFill" />
-            <view>蓝牙</view>
-          </view>
-
-          <view class="tool-item">
-            <image
-              class="icon pb-1"
-              src="../../static/images/tool/editPsd.png"
-              mode="scaleToFill"
-            />
-            <view>扫一扫</view>
-          </view>
-
-          <view class="tool-item">
-            <image
-              class="icon pb-1"
-              src="../../static/images/work/bohuanjiechu.png"
-              mode="scaleToFill"
-            />
-            <view>探牛棒</view>
-          </view>
-
-          <view class="tool-item">
-            <image
-              class="icon pb-1"
-              src="../../static/images/work/zhuanqun.png"
-              mode="scaleToFill"
-            />
-            <view>脖环</view>
+          <view class="tool-item" v-for="(item, index) in workList" :key="index">
+            <i class="iconfont icon" :class="item.icon"></i>
+            <view class="mt-1">{{ item.name }}</view>
           </view>
         </view>
       </view>
     </view>
-
     <!-- 个人信息 -->
-    <view class="user-tool px-4 pt-1 pb-1 flex mb-2">
-      <view>
-        <image class="icons mr-1" src="../../static/images/tool/editPsd.png" mode="scaleToFill" />
-        修改密码
-      </view>
-      <navigator url="/pages/editPassword/editPassword">
-        <wd-icon name="arrow-right" color="#8e8e8e" size="22px"></wd-icon>
-      </navigator>
-    </view>
-    <view class="user-tool px-4 pt-1 pb-1 flex mb-2">
-      <view>
-        <image class="icons mr-1" src="../../static/images/tool/user.png" mode="scaleToFill" />
-        客服服务
-      </view>
-      <wd-icon name="arrow-right" color="#8e8e8e" size="22px"></wd-icon>
-    </view>
-    <view class="user-tool px-4 pt-1 pb-1 flex">
-      <view>
-        <image class="icons mr-1" src="../../static/images/tool/advice.png" mode="scaleToFill" />
-        服务条款
-      </view>
-      <navigator url="/pages/serviceText/serviceText">
-        <wd-icon name="arrow-right" color="#8e8e8e" size="20px"></wd-icon>
-      </navigator>
-    </view>
-    <view class="user-tool px-4 pt-1 pb-1 flex">
+    <view class="user-tool px-4 pt-1 pb-1 flex mb-2" v-for="(item, index) in userList" :key="index">
       <view>
-        <image class="icons mr-1" src="../../static/images/tool/service.png" mode="scaleToFill" />
-        意见反馈
+        <image class="icons mr-1" :src="item.img" mode="scaleToFill" />
+        {{ item.name }}
       </view>
-      <navigator url="/pages/feedBack/feedBack">
+      <navigator :url="item.url">
         <wd-icon name="arrow-right" color="#8e8e8e" size="22px"></wd-icon>
       </navigator>
     </view>
@@ -104,36 +50,69 @@
 </template>
 
 <script lang="ts" setup>
+import { ref } from 'vue'
 defineOptions({
   name: 'Home',
 })
 
+const workList = ref([
+  { id: 1, name: '消息', icon: 'icon-xiaoxi1' },
+  { id: 2, name: '工作日志', icon: 'icon-rizhiguanli' },
+])
+
+const userList = ref([
+  {
+    id: 1,
+    name: '修改密码',
+    img: '../../static/images/tool/editPsd.png',
+    url: '/pages/editPassword/editPassword',
+  },
+  {
+    id: 2,
+    name: '客服服务',
+    img: '../../static/images/tool/user.png',
+    url: '/pages/editPassword/editPassword',
+  },
+  {
+    id: 3,
+    name: '意见反馈',
+    img: '../../static/images/tool/advice.png',
+    url: '/pages/feedBack/feedBack',
+  },
+  {
+    id: 4,
+    name: '服务条款',
+    img: '../../static/images/tool/service.png',
+    url: '/pages/serviceText/serviceText',
+  },
+])
 onMounted(() => {})
 
 onLoad(() => {})
 </script>
 
 <style lang="scss" scoped>
+.icon {
+  font-size: 32px !important;
+  color: #f59e0b;
+}
 .containe {
-  font-size: 24rpx;
+  font-size: 28rpx;
   color: #333;
 }
 .top-content {
-  position: fixed;
-  top: 0;
-  right: 0;
-  left: 0;
-  z-index: -1;
-  height: 260rpx;
-  // border: 1px solid red;
+  height: 340rpx;
+  margin-bottom: 20rpx;
+  overflow: hidden;
   color: #fbeed8;
   text-align: center;
   background: linear-gradient(to bottom, #f59e0b, #f6c986);
 }
 .user-box {
   justify-content: space-between;
-  height: 260rpx;
-  // border: 4px solid #000;
+  width: 100;
+  padding-left: 40rpx;
+  margin-top: 100rpx;
   .imgs {
     width: 140rpx;
     height: 140rpx;
@@ -143,30 +122,34 @@ onLoad(() => {})
     border-radius: 50%;
   }
   .user-text {
+    font-size: 28rpx;
     color: #fff;
     text-align: left;
   }
 }
 .tool {
   position: relative;
-  top: -60rpx;
-  margin-top: 400rpx;
-  font-size: 24rpx;
+  top: -80rpx;
+  font-size: 28rpx;
   background: #fff;
   border-radius: 28rpx;
   box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);
 }
 .title {
+  padding-bottom: 10rpx;
   margin-bottom: 20rpx;
   font-size: 32rpx;
+  font-weight: 450;
+  border-bottom: 1px dotted #eee;
 }
 .icon {
   width: 80rpx;
   height: 80rpx;
 }
 .icons {
-  width: 60rpx;
-  height: 60rpx;
+  top: -4rpx;
+  width: 56rpx;
+  height: 56rpx;
 }
 .tool-item {
   width: 22%;
@@ -184,10 +167,10 @@ onLoad(() => {})
 
 .user-tool {
   justify-content: space-between;
-  height: 60rpx;
+  height: 80rpx;
   margin-bottom: 1rpx;
-  font-size: 24rpx;
-  line-height: 60rpx;
+  font-size: 28rpx;
+  line-height: 80rpx;
   background-color: #fff;
   border-bottom: 1px dotted #f5f5f5;
 }

+ 2 - 2
src/pages/purchase/purchase.vue

@@ -7,7 +7,7 @@
 <template>
   <view class="container">
     <wd-form ref="form" :model="model" class="px-2">
-      <wd-cell-group custom-class="group" title="购" border>
+      <wd-cell-group custom-class="group" title="购" border>
         <wd-input
           prop="earTag"
           clearable
@@ -30,7 +30,7 @@
           placeholder="请输入牛号"
         />
 
-        <wd-cell title="购体重" title-width="100px" prop="value1" right>
+        <wd-cell title="购体重" title-width="100px" prop="value1" right>
           <view style="text-align: left">
             <wd-input-number
               v-model="model.weight"

+ 3 - 1
src/pages/serviceText/serviceText.vue

@@ -52,13 +52,15 @@ defineOptions({
 .container {
   padding: 0 10rpx;
   margin: 20rpx auto;
+  font-size: 26rpx;
   background-color: #fff;
   // border: 1px solid red;
   box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);
 }
 
 .title {
+  margin: 10rpx 0;
   font-size: 32rpx;
-  font-weight: 600;
+  font-weight: 500;
 }
 </style>

二进制
src/static/images/tool/msg.png


文件差异内容过多而无法显示
+ 1 - 3
src/style/iconfont.css


部分文件因为文件数量过多而无法显示