Răsfoiți Sursa

hdApp -- 订单、客户、我的页面使用自定义导航栏

shizhongqi 2 luni în urmă
părinte
comite
306c976317

+ 70 - 8
hdApp/src/admin/home/me.vue

@@ -2,6 +2,7 @@
   <view class="me-page app-content">
     <block v-if="isLoggedIn">
       <view class="page-hero">
+        <view class="status-space" :style="{ height: statusBarHeight + 'px' }"></view>
         <view class="hero-panel">
           <view class="profile-card">
             <view class="profile-header-row">
@@ -47,10 +48,12 @@
         <view class="finance-col" v-if="lookMoney == 1">
           <view class="finance-label">账户余额(元)</view>
           <view class="finance-amount">¥{{ moneyFormat(myInfo.balance) }}</view>
-          <view class="finance-actions">
-            <view class="pill-btn" @click="pageTo({ url: '/pagesStore/me/shopYeChange' })">变动明细</view>
-            <view class="pill-btn" @click="pageTo({ url: '/pagesStore/me/withdraw' })">提现记录</view>
-            <view class="pill-btn pill-btn-solid" v-if="Number(myInfo.txBalance) > 0" @click="checkToApplyCash">提现</view>
+          <view class="finance-actions balance-actions">
+            <view class="balance-action-row">
+              <view class="pill-btn" @click="pageTo({ url: '/pagesStore/me/shopYeChange' })">变动明细</view>
+              <view class="pill-btn" @click="pageTo({ url: '/pagesStore/me/withdraw' })">提现记录</view>
+            </view>
+            <view class="pill-btn pill-btn-solid balance-withdraw-btn" v-if="Number(myInfo.txBalance) > 0" @click="checkToApplyCash">提现</view>
           </view>
         </view>
 
@@ -92,6 +95,7 @@
     <block v-else>
       <view class="guest-page">
         <view class="guest-hero">
+          <view class="status-space" :style="{ height: statusBarHeight + 'px' }"></view>
           <view class="guest-hero-inner">
             <text class="guest-hero-title">我的</text>
             <text class="guest-hero-desc">登录后管理门店</text>
@@ -258,6 +262,7 @@ export default {
   data () {
     return {
       constant: this.$constant,
+      statusBarHeight: 0,
       myInfo: {},
       version: "1.0.0",
       lookMoney: 0,
@@ -304,6 +309,7 @@ export default {
     }
   },
   onLoad () {
+    this.setStatusBarHeight();
     // #ifdef APP-PLUS
     if (plus.runtime.version) {
       this.version = plus.runtime.version;
@@ -315,6 +321,14 @@ export default {
   },
   methods: {
     iconSrc,
+    setStatusBarHeight () {
+      try {
+        const systemInfo = uni.getSystemInfoSync();
+        this.statusBarHeight = systemInfo.statusBarHeight || 0;
+      } catch (e) {
+        this.statusBarHeight = 0;
+      }
+    },
     goLogin () {
       uni.removeStorageSync("manualLogout");
       this.$util.pageTo({ url: "/admin/home/login" });
@@ -514,10 +528,10 @@ export default {
   overflow: hidden;
   background: linear-gradient(
     180deg,
-    #a8d8bc 0%,
-    #b8e0c8 22%,
-    #c8e9d6 48%,
-    #daf0e4 76%,
+    #5db88a 0%,
+    #7acea7 35%,
+    #8ddcb7 58%,
+    #b4e5cd 76%,
     #f2f7f4 100%
   );
 }
@@ -539,6 +553,21 @@ export default {
   pointer-events: none;
 }
 
+/* #ifdef APP-PLUS */
+.page-hero {
+  overflow: visible;
+}
+
+.page-hero::after {
+  bottom: -150upx;
+  height: 260upx;
+}
+/* #endif */
+
+.status-space {
+  width: 100%;
+}
+
 .hero-panel {
   position: relative;
   z-index: 1;
@@ -662,6 +691,20 @@ export default {
   text-overflow: ellipsis;
 }
 
+/* #ifdef MP-WEIXIN */
+.quick-action-icon {
+  transform: translateY(40upx);
+}
+
+.quick-action + .quick-action {
+  margin-left: 60upx;
+}
+
+.quick-action-text {
+  display: none;
+}
+/* #endif */
+
 .expire-card {
   position: relative;
   overflow: hidden;
@@ -812,6 +855,25 @@ export default {
   margin-bottom: 0;
 }
 
+.balance-actions {
+  flex-direction: column;
+  align-items: flex-start;
+  justify-content: flex-start;
+}
+
+.balance-action-row {
+  display: flex;
+  align-items: center;
+}
+
+.balance-action-row .pill-btn + .pill-btn {
+  margin-left: 12upx;
+}
+
+.balance-withdraw-btn {
+  margin-top: 14upx;
+}
+
 .finance-col:not(.cash-col) .finance-actions .pill-btn {
   font-size: 24upx;
 }

+ 16 - 19
hdApp/src/admin/home/member.vue

@@ -1,7 +1,15 @@
 <template>
   <view class="member-page app-content">
-    <view class="top-sticky">
-      <view class="hero-panel">
+    <view class="page-header">
+      <view class="status-space" :style="{ height: statusBarHeight + 'px' }"></view>
+      <view class="custom-nav">
+        <view class="nav-side"></view>
+        <view class="nav-title">客户</view>
+        <view class="nav-side"></view>
+      </view>
+    </view>
+
+    <view class="hero-panel">
       <view class="toolbar">
         <view class="search-style-btn" @click="changeSearchStyle">
           <image class="toolbar-icon" :src="iconSrc('order-switch')" mode="aspectFit" />
@@ -52,7 +60,6 @@
         </view>
       </view>
     </view>
-    </view>
 
     <view class="list-wrap">
       <block v-if="!$util.isEmpty(list.data)">
@@ -312,13 +319,6 @@ export default {
   background: #f5f8f6;
 }
 
-.top-sticky {
-  position: sticky;
-  top: 0;
-  z-index: 20;
-  background: #fff;
-}
-
 .page-header {
   padding: 0 22upx;
   background: linear-gradient(180deg, #e9f8ef 0%, #edf9f2 62%, #f4fbf7 100%);
@@ -329,14 +329,14 @@ export default {
 }
 
 .custom-nav {
-  min-height: 112upx;
+  min-height: 90upx;
   display: flex;
   align-items: center;
   justify-content: space-between;
 }
 
 .hero-panel {
-  padding: 4upx 22upx 0;
+  padding: 0 22upx 0;
   background: linear-gradient(180deg, #f7fbf8 0%, #fafcfa 56upx, #ffffff 108upx, #ffffff 100%);
   box-sizing: border-box;
 }
@@ -346,8 +346,9 @@ export default {
 }
 
 .nav-title {
-  color: #111416;
-  font-size: 28upx;
+  color: #08b85a;
+  font-size: 36upx;
+  font-weight: 700;
   line-height: 48upx;
 }
 
@@ -367,11 +368,7 @@ export default {
 }
 
 .toolbar > view:first-child {
-  margin-left: 10upx;
-}
-
-.toolbar > view:last-child {
-  margin-right: 12upx;
+  margin-left: 0;
 }
 
 .search-style-btn,

+ 13 - 3
hdApp/src/admin/home/order.vue

@@ -1,5 +1,14 @@
 <template>
   <view class="order-page app-content">
+    <view class="page-header">
+      <view class="status-space" :style="{ height: statusBarHeight + 'px' }"></view>
+      <view class="custom-nav">
+        <view class="nav-side"></view>
+        <view class="nav-title">订单</view>
+        <view class="nav-side"></view>
+      </view>
+    </view>
+
     <view class="control-panel">
         <view class="filter-row">
           <view class="filter-chip date-chip">
@@ -731,7 +740,7 @@ export default {
 }
 
 .custom-nav {
-  min-height: 100upx;
+  min-height: 80upx;
   display: flex;
   align-items: center;
   justify-content: space-between;
@@ -742,8 +751,9 @@ export default {
 }
 
 .nav-title {
-  color: #252726;
-  font-size: 28upx;
+  color: #08b85a;
+  font-size: 36upx;
+  font-weight: 700;
   line-height: 48upx;
 }
 

+ 3 - 3
hdApp/src/pages.json

@@ -5,13 +5,13 @@
 		{ "path": "admin/home/login","style": {"navigationBarTitleText": "","enablePullDownRefresh": false}},
 		{ "path": "admin/home/loginRemind","style": {"navigationBarTitleText": "登录提示","enablePullDownRefresh": false}},
 		{ "path": "admin/home/appLoginRemind","style": {"navigationBarTitleText": "无法登录怎么办","enablePullDownRefresh": false}},
-		{ "path": "admin/home/order", "style": { "navigationBarTitleText": "订单", "enablePullDownRefresh": true} },
-		{ "path": "admin/home/member", "style": { "navigationBarTitleText": "客户", "enablePullDownRefresh": true} },
+		{ "path": "admin/home/order", "style": { "navigationBarTitleText": "订单", "enablePullDownRefresh": true, "navigationStyle": "custom" } },
+		{ "path": "admin/home/member", "style": { "navigationBarTitleText": "客户", "enablePullDownRefresh": true, "navigationStyle": "custom" } },
 		{ "path": "admin/home/apply", "style": { "navigationBarTitleText": "应用", "enablePullDownRefresh": true } },
 		{ "path": "admin/home/close","style": {"navigationBarTitleText": "申请注销账号"}},
 		{"path": "admin/home/register","style": {"navigationBarTitleText": "服务协议"}},
 		{"path": "admin/home/privacy","style": {"navigationBarTitleText": "隐私政策"}},
-		{ "path": "admin/home/me", "style": { "navigationBarTitleText": "我的", "enablePullDownRefresh": true} },
+		{ "path": "admin/home/me", "style": { "navigationBarTitleText": "我的", "enablePullDownRefresh": true, "navigationStyle": "custom" } },
 		{ "path": "admin/home/moneyChangeList", "style": { "navigationBarTitleText": "变动明细", "enablePullDownRefresh": true } },
 		{ "path": "admin/home/edit", "style": { "navigationBarTitleText": "花店名称修改" } },
 		{"path": "common/success","style": {"navigationBarBackgroundColor": "#ffffff","navigationBarTextStyle": "black"}},