shish 3 years ago
parent
commit
990a378b30

+ 3 - 3
mallApp/src/pages.json

@@ -1,11 +1,11 @@
 {
 {
     "pages": [{ "path": "pages/home/recent", "style": { "navigationBarTitleText": "我的花店" } },
     "pages": [{ "path": "pages/home/recent", "style": { "navigationBarTitleText": "我的花店" } },
         { "path": "pages/home/index", "style": { "navigationBarTitleText": "首页" } },
         { "path": "pages/home/index", "style": { "navigationBarTitleText": "首页" } },
-        { "path": "pages/home/category", "style": { "navigationBarTitleText": "所有分类" } },
+        { "path": "pages/home/category", "style": { "navigationBarTitleText": "花束花礼" } },
         { "path": "pages/home/shop", "style": { "navigationBarTitleText": "门店" } },
         { "path": "pages/home/shop", "style": { "navigationBarTitleText": "门店" } },
         { "path": "pages/home/user", "style": { "navigationBarTitleText": "我的" } },
         { "path": "pages/home/user", "style": { "navigationBarTitleText": "我的" } },
-        { "path": "pages/home/course", "style": { "navigationBarTitleText": "课程", "enablePullDownRefresh": true } },
-        { "path": "pages/item/item", "style": { "navigationBarTitleText": "鲜花", "enablePullDownRefresh": true } },
+        { "path": "pages/home/course", "style": { "navigationBarTitleText": "课程"}},
+        { "path": "pages/item/item", "style": { "navigationBarTitleText": "鲜花散花"} },
         { "path": "pages/item/detail", "style": { "navigationBarTitleText": "详情"} },
         { "path": "pages/item/detail", "style": { "navigationBarTitleText": "详情"} },
         { "path": "common/redirect", "style": { "navigationBarTitleText": "加载中..." } },
         { "path": "common/redirect", "style": { "navigationBarTitleText": "加载中..." } },
         { "path": "common/webview", "style": { "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black" } },
         { "path": "common/webview", "style": { "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black" } },

+ 62 - 15
mallApp/src/pages/home/category.vue

@@ -3,11 +3,15 @@
 
 
 		<view class="c_header" :class="myClass">
 		<view class="c_header" :class="myClass">
 			<view class="header_inside">
 			<view class="header_inside">
-				<image :src="ghsInfo.avatar"></image>
+				<image :src="shopImg"></image>
 				<view class="shop_info">
 				<view class="shop_info">
-					<view class="shop_title" @click="pageTo({url:'/pagesPurchase/level?id=1'})"> 国兰花尚 </view>
+					<view class="shop_title">{{shopName}}</view>
 				</view>
 				</view>
 			</view>
 			</view>
+			<view class="nav">
+				<text class="not-selected" @click="pageTo({url:'/pages/item/item?account='+option.account,type:2})">鲜花散花</text>
+				<text class="selected" @click="pageTo({url:'/pages/home/category?account='+option.account,type:2})">花束花礼</text>
+			</view>
 		</view>
 		</view>
 
 
     <scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
     <scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
@@ -49,6 +53,7 @@ import wangCg from "@/components/wangCg"
 import AppWrapperEmpty from '@/components/app-wrapper-empty'
 import AppWrapperEmpty from '@/components/app-wrapper-empty'
 import { getClass, getList } from '@/api/category'
 import { getClass, getList } from '@/api/category'
 import { list,share } from '@/mixins'
 import { list,share } from '@/mixins'
+import { getInfo } from "@/api/shop"
 export default {
 export default {
   name: 'category',
   name: 'category',
   components: {
   components: {
@@ -69,7 +74,9 @@ export default {
       currentTabIndex: 1,
       currentTabIndex: 1,
 			//0没有登录 1有登录
 			//0没有登录 1有登录
       loginStatus :0,
       loginStatus :0,
-      myClass: 'fadeIn'
+      myClass: 'fadeIn',
+			shopName:'',
+			shopImg:''
     }
     }
   },
   },
 	computed: {
 	computed: {
@@ -77,7 +84,7 @@ export default {
 	},
 	},
   onShareAppMessage(res) {
   onShareAppMessage(res) {
 		return {
 		return {
-			title: '花',
+			title: '花束花礼',
 			desc: "",
 			desc: "",
 			path: "pages/home/category?account="+this.option.account,
 			path: "pages/home/category?account="+this.option.account,
 		}
 		}
@@ -109,6 +116,19 @@ export default {
 		},
 		},
     init(){
     init(){
       this.sInit()
       this.sInit()
+
+			getInfo().then(res=>{
+				if(res.code == 1){
+					if(res.data.info && res.data.info.merchantName){
+						let sjName = res.data.info.merchantName
+						let shopName = res.data.info.shopName ? res.data.info.shopName : '首店'
+						let name = shopName == '首店' ? sjName : sjName+' '+shopName
+						this.shopName = name
+						this.shopImg = res.data.info.avatar
+					}
+				}
+			})
+
     },
     },
     onReachBottoms () {
     onReachBottoms () {
       if (!this.list.finished) {
       if (!this.list.finished) {
@@ -179,6 +199,33 @@ export default {
     padding: 0 15upx;
     padding: 0 15upx;
     box-sizing: border-box;
     box-sizing: border-box;
     background: linear-gradient(to bottom,#3385FF, #fff);
     background: linear-gradient(to bottom,#3385FF, #fff);
+    .nav{
+      position:absolute;
+      top:155upx;
+      .selected{
+        width:auto;
+        height:60upx;
+        line-height:60upx;
+        display:inline-block;
+        font-weight:bold;
+        font-size:38upx;
+        border-bottom:1upx solid red;
+        margin-left:40upx;
+        text-align:left;
+        color:red;
+      }
+      .not-selected{
+        width:auto;
+        height:60upx;
+        line-height:60upx;
+        display:inline-block;
+        font-weight:bold;
+        font-size:38upx;
+        margin-left:20upx;
+        text-align:left;
+        color:#2F4F4F;
+      }
+    }
     &>.header_inside{
     &>.header_inside{
       position: relative;
       position: relative;
       height: 124upx;
       height: 124upx;
@@ -189,8 +236,8 @@ export default {
       padding: 35upx 30upx 30upx 30upx;
       padding: 35upx 30upx 30upx 30upx;
       box-sizing: border-box;
       box-sizing: border-box;
       &>image{
       &>image{
-        height: 62upx;
-        width: 62upx;
+        height: 60upx;
+        width: 60upx;
         display: inline-block;
         display: inline-block;
         border-radius: 10upx;
         border-radius: 10upx;
         background-color: #eee;
         background-color: #eee;
@@ -203,13 +250,13 @@ export default {
         margin-left: 20upx;
         margin-left: 20upx;
         &>.shop_title{
         &>.shop_title{
           margin-top:0upx;
           margin-top:0upx;
-          font-size: 38upx;
+          font-size:40upx;
           font-weight: 600;
           font-weight: 600;
           color: #060606;
           color: #060606;
-		  width: 580upx;
-		  overflow: hidden;
-		  white-space: nowrap;
-		  .level{
+          width: 580upx;
+          overflow: hidden;
+          white-space: nowrap;
+		      .level{
             margin-left:20upx;
             margin-left:20upx;
             color:white;
             color:white;
             background:#6da3f5;
             background:#6da3f5;
@@ -217,8 +264,8 @@ export default {
             border-radius:50upx;
             border-radius:50upx;
             font-size:22upx;
             font-size:22upx;
             padding:6upx 10upx;
             padding:6upx 10upx;
-			position:absolute;
-		  }
+			      position:absolute;
+		      }
 		  .level-common{
 		  .level-common{
             margin-left:30upx;
             margin-left:30upx;
             color:white;
             color:white;
@@ -262,7 +309,7 @@ export default {
     animation-duration:.3s;
     animation-duration:.3s;
   }
   }
   .fadeIn{
   .fadeIn{
-    height: 150upx;
+    height: 220upx;
     overflow: hidden;
     overflow: hidden;
     animation-name: fadeInFrames;
     animation-name: fadeInFrames;
     animation-duration:.3s;
     animation-duration:.3s;
@@ -316,7 +363,7 @@ page {
 .right-box {
 .right-box {
   width: 100%;
   width: 100%;
   overflow: auto;
   overflow: auto;
-  height: calc(100vh - 140upx);
+  height: calc(100vh - 220upx);
   padding-left: 220upx;
   padding-left: 220upx;
   box-sizing: border-box;
   box-sizing: border-box;
   .page-view {
   .page-view {

+ 5 - 9
mallApp/src/pages/home/recent.vue

@@ -14,7 +14,7 @@
         <view class="ghs_list_area flex-col justify-end">
         <view class="ghs_list_area flex-col justify-end">
 
 
             <view class="ghs_box flex-col justify-end" v-for="item in list" :key="item.id">
             <view class="ghs_box flex-col justify-end" v-for="item in list" :key="item.id">
-              <view class="image-text_7 flex-row justify-between">
+              <view class="image-text_7 flex-row justify-between" @click.stop="bug(item)">
                 <view class="section_1 flex-col">
                 <view class="section_1 flex-col">
                   <image class="logo" :src="item.smallAvatar" />
                   <image class="logo" :src="item.smallAvatar" />
                 </view>
                 </view>
@@ -29,8 +29,7 @@
                 <view class="tag_2" @click="showTip()"> <text>结账记录</text> </view>
                 <view class="tag_2" @click="showTip()"> <text>结账记录</text> </view>
                 <view class="tag_2" @click="getBuyList()"> <text>买花记录</text> </view>
                 <view class="tag_2" @click="getBuyList()"> <text>买花记录</text> </view>
               </view>
               </view>
-              <view class="button_4 flex-col" @click="bugHs(item)"><text class="text_13">买花束</text></view>
-              <view class="button_5 flex-col" @click="bugFlower(item)"><text class="text_13">买鲜花</text></view>
+              <view class="button_4 flex-col" @click.stop="bug(item)"><text class="text_13">买花</text></view>
             </view>
             </view>
 
 
         </view>
         </view>
@@ -128,14 +127,11 @@ export default {
       this.pageTo({ url:'/pages/order/list'})
       this.pageTo({ url:'/pages/order/list'})
     },
     },
     showTip(){
     showTip(){
-      this.$msg('升级中...')
+      this.$msg('开发中')
     },
     },
-    bugFlower(item){
+    bug(item){
       this.pageTo({ url:'/pages/item/item?account='+item.shopId})
       this.pageTo({ url:'/pages/item/item?account='+item.shopId})
     },
     },
-    bugHs(item){
-      this.pageTo({ url:'/pages/home/category?account='+item.shopId})
-    },
     init () {
     init () {
         this.getShopList()
         this.getShopList()
     },
     },
@@ -420,7 +416,7 @@ export default {
         background-size: 137upx 137upx;
         background-size: 137upx 137upx;
         width: 130upx;
         width: 130upx;
         position: absolute;
         position: absolute;
-        left: 595upx;
+        left: 530upx;
         top:90upx;
         top:90upx;
         border-radius:20upx;
         border-radius:20upx;
         .text_13 {
         .text_13 {

+ 54 - 17
mallApp/src/pages/item/item.vue

@@ -3,11 +3,15 @@
 
 
 		<view class="c_header" :class="myClass">
 		<view class="c_header" :class="myClass">
 			<view class="header_inside">
 			<view class="header_inside">
-				<image :src="ghsInfo.avatar"></image>
+				<image :src="shopImg"></image>
 				<view class="shop_info">
 				<view class="shop_info">
-					<view class="shop_title" @click="pageTo({url:'/pagesPurchase/level?id=1'})"> 国兰花尚 </view>
+					<view class="shop_title">{{shopName}}</view>
 				</view>
 				</view>
 			</view>
 			</view>
+			<view class="nav">
+				<text class="selected" @click="pageTo({url:'/pages/item/item?account='+option.account,type:2})">鲜花散花</text>
+				<text class="not-selected" @click="pageTo({url:'/pages/home/category?account='+option.account,type:2})">花束花礼</text>
+			</view>
 		</view>
 		</view>
 
 
 		<view class="input-wrap" >
 		<view class="input-wrap" >
@@ -137,6 +141,7 @@ import ModalModule from "@/components/item/plugin/modal";
 import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
 import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
 import productMins from "@/mixins/cgProduct";
 import productMins from "@/mixins/cgProduct";
 import { COMMODITY_TYPE } from "@/utils/declare";
 import { COMMODITY_TYPE } from "@/utils/declare";
+import { getInfo } from "@/api/shop";
 export default {
 export default {
 	name: "item",
 	name: "item",
 	components: {
 	components: {
@@ -175,13 +180,6 @@ export default {
 			showSubmitModel: false,
 			showSubmitModel: false,
 			hdShopAdminId:0,
 			hdShopAdminId:0,
 			fromGhsId:0,
 			fromGhsId:0,
-			ghsInfo: {
-				avatar:'',
-				name:' ',
-				mobile:'',
-				expendAmount:'0.00',
-				debtAmount:'0.00'
-			},
 			myClass: 'fadeIn',
 			myClass: 'fadeIn',
 			shopId:0,
 			shopId:0,
 			infoData:{},
 			infoData:{},
@@ -191,9 +189,10 @@ export default {
 			ghsId:0,
 			ghsId:0,
 			newCustomGift:{xrFlAmount:0},
 			newCustomGift:{xrFlAmount:0},
 			isNewCustom:false,
 			isNewCustom:false,
-			//0没有登录 1有登录
       		loginStatus :0,
       		loginStatus :0,
-			cartItemShow:false
+			cartItemShow:false,
+			shopName:'',
+			shopImg:''
 		};
 		};
 	},
 	},
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -218,9 +217,8 @@ export default {
 		}
 		}
 	},
 	},
   	onShareAppMessage(res) {
   	onShareAppMessage(res) {
-		console.log("pages/item/item?account="+this.option.account)
 		return {
 		return {
-			title: '鲜花',
+			title: '鲜花散花',
 			desc: "",
 			desc: "",
 			path: "pages/item/item?account="+this.option.account,
 			path: "pages/item/item?account="+this.option.account,
 		}
 		}
@@ -324,6 +322,18 @@ export default {
 			this.init = false
 			this.init = false
 			const shopId = uni.getStorageSync('account')
 			const shopId = uni.getStorageSync('account')
 			this.option.shopId = shopId
 			this.option.shopId = shopId
+
+			getInfo().then(res=>{
+				if(res.code == 1){
+					if(res.data.info && res.data.info.merchantName){
+						let sjName = res.data.info.merchantName
+						let shopName = res.data.info.shopName ? res.data.info.shopName : '首店'
+						let name = shopName == '首店' ? sjName : sjName+' '+shopName
+						this.shopName = name
+						this.shopImg = res.data.info.avatar
+					}
+				}
+			})
 		},
 		},
 		scroll_detail(options){
 		scroll_detail(options){
 			// if(options.detail.scrollTop > 20) {
 			// if(options.detail.scrollTop > 20) {
@@ -500,6 +510,33 @@ export default {
     padding: 0 15upx;
     padding: 0 15upx;
     box-sizing: border-box;
     box-sizing: border-box;
     background: linear-gradient(to bottom,#3385FF, #fff);
     background: linear-gradient(to bottom,#3385FF, #fff);
+	.nav{
+		position:absolute;
+		top:155upx;
+		.selected{
+			width:auto;
+			height:60upx;
+			line-height:60upx;
+			display:inline-block;
+			font-weight:bold;
+			font-size:38upx;
+			border-bottom:1upx solid red;
+			margin-left:20upx;
+			text-align:left;
+			color:red;
+		}
+		.not-selected{
+			width:auto;
+			height:60upx;
+			line-height:60upx;
+			display:inline-block;
+			font-weight:bold;
+			font-size:38upx;
+			margin-left:40upx;
+			text-align:left;
+			color:#2F4F4F;
+		}
+	}
     &>.header_inside{
     &>.header_inside{
       position: relative;
       position: relative;
       height: 124upx;
       height: 124upx;
@@ -510,8 +547,8 @@ export default {
       padding: 35upx 30upx 30upx 30upx;
       padding: 35upx 30upx 30upx 30upx;
       box-sizing: border-box;
       box-sizing: border-box;
       &>image{
       &>image{
-        height: 62upx;
-        width: 62upx;
+        height: 60upx;
+        width: 60upx;
         display: inline-block;
         display: inline-block;
         border-radius: 10upx;
         border-radius: 10upx;
         background-color: #eee;
         background-color: #eee;
@@ -524,7 +561,7 @@ export default {
         margin-left: 20upx;
         margin-left: 20upx;
         &>.shop_title{
         &>.shop_title{
           margin-top:0upx;
           margin-top:0upx;
-          font-size: 38upx;
+          font-size:40upx;
           font-weight: 600;
           font-weight: 600;
           color: #060606;
           color: #060606;
 		  width: 580upx;
 		  width: 580upx;
@@ -714,7 +751,7 @@ export default {
     animation-duration:.3s;
     animation-duration:.3s;
   }
   }
   .fadeIn{
   .fadeIn{
-    height: 150upx;
+    height: 220upx;
     overflow: hidden;
     overflow: hidden;
     animation-name: fadeInFrames;
     animation-name: fadeInFrames;
     animation-duration:.3s;
     animation-duration:.3s;