shish 2 ay önce
ebeveyn
işleme
f5221e6dd3

+ 1 - 1
hdApp/src/admin/clear/info.vue

@@ -145,7 +145,7 @@ export default {
 		},
 		remindLogin(){
 			let that = this
-			this.$util.confirmModal({content:'您还没有登录,请先登录',okText:'登录'},() => {
+			this.$util.confirmModal({content:'您还没有登录,请先登录',okText:'登录'},() => {
 				that.pageTo({url:'/admin/home/login'})
 			})
 		},

+ 342 - 43
hdApp/src/admin/home/me.vue

@@ -1,54 +1,52 @@
 <template>
   <view class="me-page app-content">
-    <view class="page-hero">
-      <view class="status-space" :style="{ height: statusBarHeight + 'px' }"></view>
-
-      <view class="hero-panel">
-        <view class="profile-card">
-          <view
-            class="profile-main"
-            @click="isLoggedIn ? pageTo({ url: '/admin/staff/admin' }) : pageTo({ url: '/admin/home/login' })"
-          >
-            <image v-if="myInfo.shopImg" class="shop-avatar" :src="myInfo.shopImg" mode="aspectFill"></image>
-            <view v-else class="shop-avatar avatar-placeholder">
-              <zui-svg-icon icon="home-flour" :width="60" :height="60" />
+    <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-main" @click="pageTo({ url: '/admin/staff/admin' })">
+              <image v-if="myInfo.shopImg" class="shop-avatar" :src="myInfo.shopImg" mode="aspectFill"></image>
+              <view v-else class="shop-avatar avatar-placeholder">
+                <zui-svg-icon icon="home-flour" :width="60" :height="60" />
+              </view>
+              <view class="profile-text">
+                <view class="shop-title">{{ shopTitle }}</view>
+                <view class="admin-name">{{ adminLineText }}</view>
+              </view>
             </view>
-            <view class="profile-text">
-              <view class="shop-title">{{ isLoggedIn ? shopTitle : '登录/注册' }}</view>
-              <view class="admin-name">{{ adminLineText }}</view>
+
+            <view class="quick-actions">
+              <view class="quick-action" @click.stop="changeShop">
+                <image class="quick-action-icon" :src="iconSrc('my-switch-shop')" mode="aspectFit" />
+                <text>切换门店</text>
+              </view>
+              <view class="quick-action" @click.stop="suggest">
+                <image class="quick-action-icon" :src="iconSrc('my-service')" mode="aspectFit" />
+                <text>客服</text>
+              </view>
+              <view class="quick-action" @click.stop="pageTo({ url: '/admin/shop/sk' })">
+                <image class="quick-action-icon" :src="iconSrc('my-settings-outline')" mode="aspectFit" />
+                <text>设置</text>
+              </view>
             </view>
           </view>
 
-          <view class="quick-actions" v-if="isLoggedIn">
-            <view class="quick-action" @click.stop="changeShop">
-              <image class="quick-action-icon" :src="iconSrc('my-switch-shop')" mode="aspectFit" />
-              <text>切换门店</text>
-            </view>
-            <view class="quick-action" @click.stop="suggest">
-              <image class="quick-action-icon" :src="iconSrc('my-service')" mode="aspectFit" />
-              <text>专属客服</text>
+          <view class="expire-card" @click="goRenew">
+            <view class="expire-main">
+              <text class="expire-label">到期时间</text>
+              <text class="expire-date">{{ deadlineText }}</text>
             </view>
-            <view class="quick-action" @click.stop="pageTo({ url: '/admin/shop/sk' })">
-              <image class="quick-action-icon" :src="iconSrc('my-settings-outline')" mode="aspectFit" />
-              <text>设置</text>
+            <view class="renew-link">
+              <text class="renew-text">去续费</text>
+              <view class="renew-arrow">›</view>
             </view>
           </view>
         </view>
-
-        <view class="expire-card" v-if="isLoggedIn" @click="goRenew">
-          <view class="expire-main">
-            <text class="expire-label">到期时间</text>
-            <text class="expire-date">{{ deadlineText }}</text>
-          </view>
-          <view class="renew-link">
-            <text class="renew-text">去续费</text>
-            <view class="renew-arrow">›</view>
-          </view>
-        </view>
       </view>
-    </view>
 
-    <view class="content-wrap" v-if="isLoggedIn">
+      <view class="content-wrap">
       <view class="finance-card">
         <view class="finance-col" v-if="lookMoney == 1">
           <view class="finance-label">账户余额(元)</view>
@@ -92,7 +90,76 @@
       </view>
       <view class="bottom-version">中央编号 {{ myInfo && myInfo.mainId ? myInfo.mainId : 0 }} | version {{ version }}</view>
       <view class="bottom-version">闽ICP备15017325号-11A</view>
-    </view>
+      </view>
+    </block>
+
+    <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>
+          </view>
+        </view>
+
+        <view class="guest-body">
+          <view class="guest-profile-card">
+            <view class="guest-profile-row" @click="goLogin">
+              <view class="shop-avatar guest-avatar">
+                <image
+                  class="guest-avatar-img"
+                  :src="constant.hostUrl + '/image/hhb_small.png'"
+                  mode="aspectFill"
+                />
+              </view>
+              <view class="guest-profile-text">
+                <text class="guest-profile-title">登录 / 注册</text>
+                <text class="guest-profile-desc">使用花店账号登录</text>
+              </view>
+              <text class="guest-profile-arrow">›</text>
+            </view>
+            <button class="guest-login-btn" @click.stop="goLogin">登录</button>
+          </view>
+
+          <view class="guest-guide-card">
+            <view class="guest-guide-item">
+              <view class="guest-guide-icon-wrap">
+                <image class="guest-guide-icon" :src="iconSrc('shop-filled')" mode="aspectFit" />
+              </view>
+              <view class="guest-guide-main">
+                <text class="guest-guide-title">门店管理</text>
+                <text class="guest-guide-desc">订单、客户、资金与店铺设置</text>
+              </view>
+            </view>
+            <view class="guest-guide-divider"></view>
+            <view class="guest-guide-item">
+              <view class="guest-guide-icon-wrap guest-guide-icon-wrap--green">
+                <image class="guest-guide-icon" :src="iconSrc('my-filled')" mode="aspectFit" />
+              </view>
+              <view class="guest-guide-main">
+                <text class="guest-guide-title">账号中心</text>
+                <text class="guest-guide-desc">登录后可查看余额、现金与个人信息</text>
+              </view>
+            </view>
+          </view>
+
+          <view class="guest-register" @click="goRegister">
+            <text class="guest-register-tip">还没有花店账号?</text>
+            <text class="guest-register-link">花店注册</text>
+          </view>
+
+          <view class="guest-footer">
+            <view class="guest-agreement">
+              <text @click.stop="goToService">服务协议</text>
+              <text @click.stop="goToPrivacy">隐私政策</text>
+            </view>
+            <view class="guest-version">version {{ version }}</view>
+            <view class="guest-version">闽ICP备15017325号-11A</view>
+          </view>
+        </view>
+      </view>
+    </block>
 
     <modal-module :show="outAmountShow" @click="outAmountConfirm" :maskClosable="true" title="提取金额" padding="30rpx 30rpx">
       <template v-slot:content>
@@ -149,9 +216,6 @@ export default {
       return `${sjName}·${shopName}`;
     },
     adminLineText () {
-      if (!this.isLoggedIn) {
-        return "点击登录花店账号";
-      }
       const name = this.myInfo.adminName || "";
       const mobile = this.myInfo.adminMobile || "";
       if (name && mobile) {
@@ -177,6 +241,7 @@ export default {
   },
   data () {
     return {
+      constant: this.$constant,
       statusBarHeight: 0,
       myInfo: {},
       version: "1.0.0",
@@ -213,6 +278,12 @@ export default {
   },
   methods: {
     iconSrc,
+    goLogin () {
+      this.$util.pageTo({ url: "/admin/home/login" });
+    },
+    goRegister () {
+      this.$util.pageTo({ url: "/pagesClient/official/apply" });
+    },
     setStatusBarHeight () {
       try {
         const systemInfo = uni.getSystemInfoSync();
@@ -757,4 +828,232 @@ export default {
   font-size: 34upx;
   box-sizing: border-box;
 }
+
+.guest-page {
+  min-height: 100vh;
+  background: #f2f7f4;
+}
+
+.guest-hero {
+  position: relative;
+  padding: 0 24upx 28upx;
+  overflow: hidden;
+  background: linear-gradient(180deg, #e8f5ed 0%, #ecf6f0 72%, #f2f7f4 100%);
+}
+
+.guest-hero-inner {
+  position: relative;
+  z-index: 2;
+  padding: 56upx 8upx 0;
+}
+
+.guest-hero-title {
+  display: block;
+  color: #161819;
+  font-size: 50upx;
+  font-weight: 700;
+  line-height: 56upx;
+}
+
+.guest-hero-desc {
+  display: block;
+  margin-top: 14upx;
+  color: #6b737c;
+  font-size: 28upx;
+  line-height: 40upx;
+}
+
+.guest-body {
+  padding: 8upx 24upx 48upx;
+}
+
+.guest-profile-card {
+  padding: 28upx 24upx 24upx;
+  border-radius: 20upx;
+  background: #fff;
+  box-shadow: 0 8upx 24upx rgba(9, 197, 103, 0.08);
+}
+
+.guest-profile-row {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  min-width: 0;
+}
+
+.guest-avatar {
+  width: 120upx;
+  height: 120upx;
+  background: #fff;
+  overflow: hidden;
+}
+
+.guest-avatar-img {
+  width: 100%;
+  height: 100%;
+  display: block;
+}
+
+.guest-profile-text {
+  flex: 1;
+  min-width: 0;
+  margin-left: 22upx;
+}
+
+.guest-profile-title {
+  display: block;
+  color: #111416;
+  font-size: 38upx;
+  line-height: 48upx;
+  font-weight: 800;
+}
+
+.guest-profile-desc {
+  display: block;
+  margin-top: 12upx;
+  color: #8a9199;
+  font-size: 28upx;
+  line-height: 36upx;
+}
+
+.guest-profile-arrow {
+  margin-left: 8upx;
+  color: #b5bcc4;
+  font-size: 44upx;
+  line-height: 1;
+  flex-shrink: 0;
+}
+
+.guest-login-btn {
+  width: 100%;
+  height: 90upx;
+  margin: 24upx 0 0;
+  padding: 0;
+  line-height: 90upx;
+  border: none;
+  border-radius: 33upx;
+  color: #fff;
+  font-size: 32upx;
+  font-weight: 600;
+  text-align: center;
+  background: #09c567;
+}
+
+.guest-login-btn::after {
+  border: none;
+}
+
+.guest-guide-card {
+  margin-top: 24upx;
+  padding: 8upx 24upx;
+  border-radius: 20upx;
+  background: #fff;
+  box-shadow: 0 8upx 24upx rgba(24, 37, 30, 0.05);
+}
+
+.guest-guide-item {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  padding: 20upx 0;
+}
+
+.guest-guide-divider {
+  height: 1upx;
+  background: #f0f2f1;
+}
+
+.guest-guide-icon-wrap {
+  width: 72upx;
+  height: 72upx;
+  border-radius: 18upx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-shrink: 0;
+  background: linear-gradient(135deg, #eef4ff 0%, #e3ecfa 100%);
+}
+
+.guest-guide-icon-wrap--green {
+  background: linear-gradient(135deg, #e8f8f0 0%, #d4f0e2 100%);
+}
+
+.guest-guide-icon {
+  width: 40upx;
+  height: 40upx;
+}
+
+.guest-guide-main {
+  flex: 1;
+  min-width: 0;
+  margin-left: 20upx;
+}
+
+.guest-guide-title {
+  display: block;
+  color: #15181c;
+  font-size: 30upx;
+  font-weight: 600;
+  line-height: 38upx;
+}
+
+.guest-guide-desc {
+  display: block;
+  margin-top: 8upx;
+  color: #8a9199;
+  font-size: 24upx;
+  line-height: 34upx;
+}
+
+.guest-register {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+  margin-top: 40upx;
+}
+
+.guest-register-tip {
+  color: #8a9199;
+  font-size: 28upx;
+  line-height: 40upx;
+}
+
+.guest-register-link {
+  margin-left: 8upx;
+  color: #09c567;
+  font-size: 28upx;
+  line-height: 40upx;
+  font-weight: 600;
+}
+
+.guest-footer {
+  margin-top: 48upx;
+}
+
+.guest-agreement {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+}
+
+.guest-agreement text {
+  margin-left: 40upx;
+  color: #9aa2ab;
+  font-size: 30upx;
+  line-height: 36upx;
+}
+
+.guest-agreement text:first-child {
+  margin-left: 0;
+}
+
+.guest-version {
+  margin-top: 16upx;
+  text-align: center;
+  color: #b0b6be;
+  font-size: 28upx;
+  line-height: 36upx;
+}
 </style>

+ 4 - 4
hdApp/src/admin/home/workbench.vue

@@ -39,7 +39,7 @@
             <button
               class="login-card-btn login-card-btn--primary"
               @click="pageTo({ url: '/admin/home/login' })"
-            >登录</button>
+            >登录</button>
           </view>
           <view class="login-register" @click="pageTo({ url: '/pagesClient/official/apply' })">
             <text class="login-register-tip">还没有花店账号?</text>
@@ -809,7 +809,7 @@ export default {
 }
 
 .login-body {
-  padding: 8upx 24upx 48upx;
+  padding: 14upx 24upx 48upx;
 }
 
 .login-card {
@@ -911,14 +911,14 @@ export default {
 
 .login-register-tip {
   color: #8a9199;
-  font-size: 32upx;
+  font-size: 36upx;
   line-height: 40upx;
 }
 
 .login-register-link {
   margin-left: 8upx;
   color: #09c567;
-  font-size: 32upx;
+  font-size: 36upx;
   line-height: 40upx;
   font-weight: 600;
 }

+ 1 - 1
hdApp/src/components/not-login.vue

@@ -4,7 +4,7 @@
       <view class="login-icon">🔒</view>
       <view class="login-title">您尚未登录</view>
       <view class="login-desc">点击此处前往登录,使用完整功能</view>
-      <view class="login-btn">登录</view>
+      <view class="login-btn">登录</view>
     </view>
   </view>
 </template>