|
@@ -1,69 +1,12 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view>
|
|
<view>
|
|
|
- <block v-if="loginStyle == 0">
|
|
|
|
|
- <view class="login-page">
|
|
|
|
|
- <view class="login-hero">
|
|
|
|
|
- <image
|
|
|
|
|
- class="login-hero-bg"
|
|
|
|
|
- :src="constant.hostUrl + '/image//workbench-header-bg.webp'"
|
|
|
|
|
- mode="aspectFill"
|
|
|
|
|
- />
|
|
|
|
|
- <view class="login-hero-scrim"></view>
|
|
|
|
|
- <view class="status-space" :style="{ height: statusBarHeight + 'px' }"></view>
|
|
|
|
|
- <view class="login-hero-inner">
|
|
|
|
|
- <text class="login-hero-title">花掌柜</text>
|
|
|
|
|
- <text class="login-hero-desc">登录查看我的门店</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="login-body">
|
|
|
|
|
- <!-- #ifdef MP-WEIXIN -->
|
|
|
|
|
- <view class="login-card">
|
|
|
|
|
- <view class="login-card-top">
|
|
|
|
|
- <view class="login-card-icon-wrap login-card-icon-wrap--buy">
|
|
|
|
|
- <image class="login-card-icon" :src="iconSrc('bouquet')" mode="aspectFit" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="login-card-main">
|
|
|
|
|
- <text class="login-card-title">个人买花</text>
|
|
|
|
|
- <text class="login-card-desc">购买花材、花束和绿植</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <button class="login-card-btn login-card-btn--outline" @click="buyItem">买花</button>
|
|
|
|
|
- </view>
|
|
|
|
|
- <!-- #endif -->
|
|
|
|
|
- <view class="login-card">
|
|
|
|
|
- <view class="login-card-top">
|
|
|
|
|
- <view class="login-card-icon-wrap login-card-icon-wrap--supply">
|
|
|
|
|
- <image class="login-card-icon" :src="iconSrc('procurement')" mode="aspectFit" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="login-card-main">
|
|
|
|
|
- <text class="login-card-title">花店进货</text>
|
|
|
|
|
- <text class="login-card-desc">花店买花材、采购和管理</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <button
|
|
|
|
|
- class="login-card-btn login-card-btn--primary"
|
|
|
|
|
- @click="pageTo({ url: '/admin/home/login' })"
|
|
|
|
|
- >登录</button>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="login-register" @click="pageTo({ url: '/pagesClient/official/apply' })">
|
|
|
|
|
- <text class="login-register-tip">还没有花店账号?</text>
|
|
|
|
|
- <text class="login-register-link">花店注册</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </block>
|
|
|
|
|
- <block v-else>
|
|
|
|
|
- <purchase-ghs-panel ref="ghsPanel" :statusBarHeight="statusBarHeight" />
|
|
|
|
|
- </block>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <purchase-ghs-panel ref="ghsPanel" :statusBarHeight="statusBarHeight" />
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
<script>
|
|
<script>
|
|
|
-import { mapGetters } from "vuex";
|
|
|
|
|
-import { getWeixinId } from "@/api/invite";
|
|
|
|
|
import autoUpdateMixins from "@/mixins/autoUpdate";
|
|
import autoUpdateMixins from "@/mixins/autoUpdate";
|
|
|
import PurchaseGhsPanel from "@/admin/home/components/purchase-ghs-panel.vue";
|
|
import PurchaseGhsPanel from "@/admin/home/components/purchase-ghs-panel.vue";
|
|
|
-import { iconSrc } from "@/utils/iconSrc";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "purchaseOrder",
|
|
name: "purchaseOrder",
|
|
@@ -71,24 +14,11 @@ export default {
|
|
|
mixins: [autoUpdateMixins],
|
|
mixins: [autoUpdateMixins],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- constant: this.$constant,
|
|
|
|
|
- getappIdList: {},
|
|
|
|
|
- loginStyle: 0,
|
|
|
|
|
statusBarHeight: 0
|
|
statusBarHeight: 0
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- computed: {
|
|
|
|
|
- ...mapGetters({ loginInfo: "getLoginInfo" })
|
|
|
|
|
- },
|
|
|
|
|
- watch: {
|
|
|
|
|
- loginInfo(newVal) {
|
|
|
|
|
- if (!this.$util.isEmpty(newVal.admin) && newVal.admin.currentShopId > 0) {
|
|
|
|
|
- this.handleLoginStyle();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
|
- if (this.loginStyle === 1 && this.$refs.ghsPanel) {
|
|
|
|
|
|
|
+ if (this.$refs.ghsPanel) {
|
|
|
this.$refs.ghsPanel.handlePullDownRefresh();
|
|
this.$refs.ghsPanel.handlePullDownRefresh();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -101,21 +31,14 @@ export default {
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
this.statusBarHeight = 0;
|
|
this.statusBarHeight = 0;
|
|
|
}
|
|
}
|
|
|
- getWeixinId().then(res => {
|
|
|
|
|
- this.getappIdList = res.data;
|
|
|
|
|
- });
|
|
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
- if (!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0) {
|
|
|
|
|
- this.handleLoginStyle();
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- if (this.$refs.ghsPanel) {
|
|
|
|
|
- this.$refs.ghsPanel.handlePageShow();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- this.loginStyle = 0;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ if (this.$refs.ghsPanel) {
|
|
|
|
|
+ this.$refs.ghsPanel.handlePageShow();
|
|
|
|
|
+ this.$refs.ghsPanel.toRemindCustom();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
onShareAppMessage(res) {
|
|
onShareAppMessage(res) {
|
|
|
if (this.$refs.ghsPanel) {
|
|
if (this.$refs.ghsPanel) {
|
|
@@ -123,223 +46,6 @@ export default {
|
|
|
if (msg) return msg;
|
|
if (msg) return msg;
|
|
|
}
|
|
}
|
|
|
return { title: "花掌柜,花店管家婆", desc: "", imageUrl: "", path: "pagesPurchase/order" };
|
|
return { title: "花掌柜,花店管家婆", desc: "", imageUrl: "", path: "pagesPurchase/order" };
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- iconSrc,
|
|
|
|
|
- buyItem() {
|
|
|
|
|
- const that = this;
|
|
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
|
|
- uni.navigateToMiniProgram({
|
|
|
|
|
- appId: that.getappIdList.mall.miniAppId,
|
|
|
|
|
- path: "pages/home/recent",
|
|
|
|
|
- envVersion: process.env.NODE_ENV === "development" ? "develop" : "release",
|
|
|
|
|
- extraData: {},
|
|
|
|
|
- success() {}
|
|
|
|
|
- });
|
|
|
|
|
- // #endif
|
|
|
|
|
- // #ifdef APP-PLUS
|
|
|
|
|
- that.$msg("请用微信打开");
|
|
|
|
|
- // #endif
|
|
|
|
|
- },
|
|
|
|
|
- handleLoginStyle() {
|
|
|
|
|
- this.loginStyle = 1;
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- if (this.$refs.ghsPanel) {
|
|
|
|
|
- this.$refs.ghsPanel.toRemindCustom();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
-<style lang="scss" scoped>
|
|
|
|
|
-.login-page {
|
|
|
|
|
- min-height: 100vh;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- background: #f2f7f4;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-hero {
|
|
|
|
|
- position: relative;
|
|
|
|
|
- padding: 0 24upx 36upx;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- background: linear-gradient(180deg, #e8f5ed 0%, #ecf6f0 72%, #f2f7f4 100%);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-hero-bg {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- left: 0;
|
|
|
|
|
- top: 0;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- height: 360upx;
|
|
|
|
|
- z-index: 0;
|
|
|
|
|
- opacity: 0.55;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-hero-scrim {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- left: 0;
|
|
|
|
|
- right: 0;
|
|
|
|
|
- top: 0;
|
|
|
|
|
- height: 360upx;
|
|
|
|
|
- z-index: 1;
|
|
|
|
|
- background: linear-gradient(
|
|
|
|
|
- 180deg,
|
|
|
|
|
- rgba(255, 255, 255, 0.78) 0%,
|
|
|
|
|
- rgba(237, 248, 242, 0.52) 48%,
|
|
|
|
|
- rgba(255, 255, 255, 0) 100%
|
|
|
|
|
- );
|
|
|
|
|
- pointer-events: none;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.status-space {
|
|
|
|
|
- position: relative;
|
|
|
|
|
- z-index: 2;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-hero-inner {
|
|
|
|
|
- position: relative;
|
|
|
|
|
- z-index: 2;
|
|
|
|
|
- padding: 56upx 8upx 0;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-hero-title {
|
|
|
|
|
- display: block;
|
|
|
|
|
- color: #161819;
|
|
|
|
|
- font-size: 58upx;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- line-height: 60upx;
|
|
|
|
|
- text-shadow:
|
|
|
|
|
- 0 0 12upx rgba(255, 255, 255, 0.92),
|
|
|
|
|
- 0 2upx 6upx rgba(255, 255, 255, 0.75);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-hero-desc {
|
|
|
|
|
- display: block;
|
|
|
|
|
- margin-top: 14upx;
|
|
|
|
|
- color: #192129;
|
|
|
|
|
- font-size: 34upx;
|
|
|
|
|
- line-height: 44upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-body {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- padding: 28upx 24upx 64upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- align-items: stretch;
|
|
|
|
|
- padding: 36upx 32upx 32upx;
|
|
|
|
|
- background: #fff;
|
|
|
|
|
- border-radius: 24upx;
|
|
|
|
|
- box-shadow: 0 8upx 24upx rgba(9, 197, 103, 0.08);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card + .login-card {
|
|
|
|
|
- margin-top: 36upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-top {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: row;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- min-width: 0;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-icon-wrap {
|
|
|
|
|
- width: 104upx;
|
|
|
|
|
- height: 104upx;
|
|
|
|
|
- border-radius: 26upx;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- flex-shrink: 0;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-icon-wrap--buy {
|
|
|
|
|
- background: linear-gradient(135deg, #fff4e8 0%, #ffe8d6 100%);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-icon-wrap--supply {
|
|
|
|
|
- background: linear-gradient(135deg, #e8f8f0 0%, #d4f0e2 100%);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-icon {
|
|
|
|
|
- width: 56upx;
|
|
|
|
|
- height: 56upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-main {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- min-width: 0;
|
|
|
|
|
- margin-left: 24upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-title {
|
|
|
|
|
- display: block;
|
|
|
|
|
- color: #161819;
|
|
|
|
|
- font-size: 38upx;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- line-height: 48upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-desc {
|
|
|
|
|
- display: block;
|
|
|
|
|
- margin-top: 12upx;
|
|
|
|
|
- color: #8a9199;
|
|
|
|
|
- font-size: 30upx;
|
|
|
|
|
- line-height: 40upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-btn {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- margin: 36upx 0 0;
|
|
|
|
|
- padding: 0;
|
|
|
|
|
- min-width: 0;
|
|
|
|
|
- height: 101upx;
|
|
|
|
|
- line-height: 101upx;
|
|
|
|
|
- font-size: 38upx;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- border-radius: 40upx;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- border: none;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- background: #09c567;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-btn::after {
|
|
|
|
|
- border: none;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-card-btn--primary,
|
|
|
|
|
-.login-card-btn--outline {
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- background: #09c567;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-register {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: row;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- margin-top: 56upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-register-tip {
|
|
|
|
|
- color: #8a9199;
|
|
|
|
|
- font-size: 40upx;
|
|
|
|
|
- line-height: 44upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.login-register-link {
|
|
|
|
|
- margin-left: 8upx;
|
|
|
|
|
- color: #09c567;
|
|
|
|
|
- font-size: 40upx;
|
|
|
|
|
- line-height: 44upx;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
-}
|
|
|
|
|
-</style>
|
|
|