Parcourir la source

1.全屏页面添加返回按钮

DaMowang il y a 2 ans
Parent
commit
beb212480c

+ 3 - 3
src/components/navigationCustom/navigation-custom.vue

@@ -4,11 +4,11 @@
 			<!-- capsule or normal -->
 			<view v-if="[1,2].indexOf(config.type)!= -1" :class="config.type==1?'navigation-bar-capsule':'navigation-bar-textbox'" :style="{top:marginTop}">
 				<view class="button-action" hover-class="button-action-active" @click="back_">
-					<view class="iconfont">&#xe603;</view>
+					<view class="iconfont" :style="'color:'+config.fontcolor">&#xe603;</view>
 				</view>
 				<view class="button-v-line"></view>
 				<view v-if="!config.share" class="button-action" hover-class="button-action-active" @click="home_">
-					<view class="iconfont">&#xe8c6;</view>
+					<view class="iconfont" :style="'color:'+config.fontcolor">&#xe8c6;</view>
 				</view>
 				<view v-if="config.share" class="button-action" hover-class="button-action-active">
 					<button class="button_clear" open-type="share" hover-class="none">
@@ -18,7 +18,7 @@
 			</view>
 			<!-- custom button -->
 			<view v-if="[3,4].indexOf(config.type)!= -1" @click="conduct_" :class="config.type == 3?'navigation-bar-custom-capsule':'navigation-bar-custom-textbox'" :style="{top:marginTop}">
-				<view class="iconfont">&#xe603;</view>
+				<view class="iconfont" :style="'color:'+config.fontcolor">&#xe603;</view>
 				<text class="custom-describe">{{config.menuText}}</text>
 			</view>
 			<!-- title -->

+ 13 - 13
src/pages.json

@@ -75,12 +75,12 @@
 		// 		"navigationBarTitleText": "财富"
 		// 	}
 		// },
-		// {
-		// 	"path": "pages/account/consignment",
-		// 	"style": {
-		// 		"navigationBarTitleText": "寄卖"
-		// 	}
-		// },
+		{
+			"path": "pages/account/consignment",
+			"style": {
+				"navigationBarTitleText": "寄卖"
+			}
+		},
 		{
 			"path": "pages/account/giveAsPresent",
 			"style": {
@@ -93,12 +93,12 @@
 		// 		"navigationBarTitleText": "转化"
 		// 	}
 		// },
-		// {
-		// 	"path": "pages/speed-up/index",
-		// 	"style": {
-		// 		"navigationBarTitleText": "加速"
-		// 	}
-		// },
+		{
+			"path": "pages/speed-up/index",
+			"style": {
+				"navigationBarTitleText": "加速"
+			}
+		},
 		{
 			"path": "pages/accountDetails/running",
 			"style": {
@@ -247,7 +247,7 @@
 					"path": "orderingfood/payTheBill",
 					"style": {
 						"navigationBarTitleText": "买单"
-					}
+					} 
 				},
 				{
 					"path": "orderingfood/activationcode",

+ 1 - 1
src/pages/index/index.vue

@@ -7,7 +7,7 @@
             <!-- 轮播图-end -->
             <!-- 公告 -->
             <view class="head_notice clearfix">
-                <view class="notice_title">
+                <view class="notice_title" @click="goNoticeList">
                     <image class="gg_img" src="@/static/img/gg.png"></image>
                 </view>
                 <swiper class="notice_swiper" vertical autoplay circular :interval="5000" :duration="1000">

+ 1 - 0
src/pagesB/components/swiper-preview/index.vue

@@ -82,6 +82,7 @@ export default {
         },
         onBack() {
             this.show = false;
+			this.$emit("close")
         },
         open(da){
             let { imgs, current } = da;

+ 26 - 3
src/pagesB/hotel/hotel.vue

@@ -1,5 +1,6 @@
 <template>
     <div class="hotel">
+        <navcustom :config="config" class="navcustom" v-if="customShow"/>
         <div class="head_img" @click="onpreview">
             <image :src="detail.mainImage" mode="aspectFill" class="bg_img" />
         </div>
@@ -8,7 +9,7 @@
             <div class="h_address flex_r flex_jb flex_ac">
                 <div class="hil">
                     <div class="h_tags">
-                        <span>{{ detail.avgScore }}分</span>
+                        <span>{{ detail.avgScore || 0 }}分</span>
                         <span>{{ hotelStarF(detail.hotelStar) }}</span>
                     </div>
                     <div class="address">{{ detail.address }}</div>
@@ -62,23 +63,35 @@
             </div>
         </div>
         <!-- 图片查看组件 -->
-        <preview ref="previewimg" />
+        <preview ref="previewimg" @close="previewclose"/>
     </div>
 </template>
 <script>
 import preview from "@/pagesB/components/swiper-preview/index.vue";
+import navcustom from "@/components/navigationCustom/navigation-custom.vue"
 import { setCache, getCache } from "@/utils/storage.js";
 import { post } from "@/request/api.js";
 export default {
     name: "hotel",
     props: {},
-    components: { preview },
+    components: { preview, navcustom },
     data() {
         return {
             query: {},
             hotelID: "",
             detail: {},
             RatePlan: [],
+            config: {
+                title: "",
+                bgcolor: "",
+                type: 1,
+                linear: false,
+                transparent: true,
+                fontcolor: "#000",
+                menuIcon: "",
+                menuText: ""
+            },
+            customShow: true
         };
     },
     methods: {
@@ -107,6 +120,7 @@ export default {
         },
         onpreview() {
             if (this.detail.pictures.length) {
+                this.customShow = false
                 this.$refs.previewimg.open({
                     imgs: this.detail.pictures,
                     current: 0,
@@ -115,12 +129,16 @@ export default {
         },
         onpreview2(arr) {
             if (arr.length) {
+                this.customShow = false
                 this.$refs.previewimg.open({
                     imgs: arr,
                     current: 0,
                 });
             }
         },
+        previewclose(){
+            this.customShow = true
+        },
         onshow(i) {
             this.$set(this.RatePlan[i], 'show', !this.RatePlan[i].show)
         },
@@ -153,6 +171,11 @@ export default {
 };
 </script>
 <style scoped lang='scss'>
+.navcustom{
+    position: absolute;
+    left: 0;
+    top: 0;
+}
 .head_img {
     .bg_img {
         width: 100%;

+ 24 - 3
src/pagesB/scenicSpotTicket/scenic.vue

@@ -1,5 +1,6 @@
 <template>
     <div class="scenic">
+        <navcustom :config="config" class="navcustom" v-if="customShow"/>
         <div class="head_img" @click="onpreview">
             <image :src="detail.mainImage" mode="aspectFill" class="bg_img" />
         </div>
@@ -47,24 +48,35 @@
             </div>
         </div>
         <!-- 图片查看组件 -->
-        <preview ref="previewimg" listType="2" />
-        <navigation-custom  :config="config"/>
+        <preview ref="previewimg" listType="2" @close="previewclose"/>
     </div>
 </template>
 <script>
+import navcustom from "@/components/navigationCustom/navigation-custom.vue"
 import mpHtml from "@/uni_modules/mp-html/components/mp-html/mp-html.vue"
 import preview from "@/pagesB/components/swiper-preview/index.vue";
 import { post } from "@/request/api.js";
 export default {
     name: "scenic",
     props: {},
-    components: { preview, mpHtml },
+    components: { navcustom, preview, mpHtml },
     data() {
         return {
             query: {},
             scenicID: "",
             detail: {},
             RatePlan: [],
+            config: {
+                title: "",
+                bgcolor: "",
+                type: 1,
+                linear: false,
+                transparent: true,
+                fontcolor: "#000",
+                menuIcon: "",
+                menuText: ""
+            },
+            customShow: true
         };
     },
     methods: {
@@ -83,12 +95,16 @@ export default {
         },
         onpreview() {
             if (this.detail.images.length) {
+                this.customShow = false
                 this.$refs.previewimg.open({
                     imgs: this.detail.images,
                     current: 0,
                 });
             }
         },
+        previewclose(){
+            this.customShow = true
+        },
         scenicDetail(id) {
             this.goto("/pagesB/scenicSpotTicket/scenicDetail",{ productId: id, scenicID: this.scenicID });
         },
@@ -122,6 +138,11 @@ page {
 }
 </style>
 <style scoped lang='scss'>
+.navcustom{
+    position: absolute;
+    left: 0;
+    top: 0;
+}
 .head_img {
     .bg_img {
         width: 100%;

+ 1 - 1
src/pagesB/topUp/Local.vue

@@ -14,7 +14,7 @@
         </div>
         <div class="money card">
             <div class="li flex_r flex_jb">
-                <span>赠送宝</span>
+                <span>赠送宝</span>
                 <span>{{ selectItem.user_money || 0 }}</span>
             </div>
             <div class="li flex_r flex_jb">

BIN
src/static/my/consign.png