Kaynağa Gözat

修改收藏按钮

zs 1 yıl önce
ebeveyn
işleme
73f9e0fa20

+ 5 - 22
pagesHome/hotel/detail.vue

@@ -11,12 +11,7 @@
 		</view>
 		<view class="bottom">
 			<view class="two">
-				<view class="two_1">
-					<view class="name textOne">{{info.name||'暂无'}}</view>
-					<view class="collect">
-						<uni-fav :checked="info.is_collect" @click="onClick(info)" />
-					</view>
-				</view>
+				<view class="name">{{info.name||'暂无'}}</view>
 			</view>
 			<view class="thr">
 				<view class="thr_1">
@@ -109,11 +104,6 @@
 					}).replace(/\<img/gi, '<img style="width:100%;"') // 对 img 元素增加 style 属性,并设置宽度为 100%
 				}
 			},
-			// 收藏
-			onClick() {
-				const that = this;
-				console.log("收藏");
-			},
 			// 预订
 			toBuy(item) {
 				const that = this;
@@ -167,17 +157,10 @@
 			.two {
 				padding: 4vw 2vw;
 
-				.two_1 {
-					display: flex;
-					justify-content: space-between;
-
-					.name {
-						width: 80vw;
-						padding: 1vw 0;
-						font-weight: bold;
-						font-size: var(--font16Size);
-					}
-
+				.name {
+					padding: 1vw 0;
+					font-weight: bold;
+					font-size: var(--font16Size);
 				}
 
 				.two_2 {

+ 1 - 0
pagesHome/hotel/index.vue

@@ -216,6 +216,7 @@
 					.top {
 						display: flex;
 						justify-content: space-between;
+						align-items: center;
 
 						.name {
 							width: 50vw;

+ 22 - 4
pagesHome/hotel/info.vue

@@ -11,7 +11,12 @@
 		</view>
 		<view class="bottom">
 			<view class="two">
-				<view class="two_1">{{info.name||'暂无'}}</view>
+				<view class="two_1">
+					<view class="name textOne">{{info.name||'暂无'}}</view>
+					<view class="collect">
+						<uni-fav :checked="info.is_collect" @click="onClick(info)" />
+					</view>
+				</view>
 				<view class="two_2">入住时间:{{info.start_time||'暂无'}}</view>
 				<view class="two_2">退房时间:{{info.end_time||'暂无'}}</view>
 			</view>
@@ -200,6 +205,11 @@
 					})
 				}
 			},
+			// 收藏
+			onClick() {
+				const that = this;
+				console.log("收藏");
+			},
 			// 分页
 			toPage(e) {
 				const that = this;
@@ -270,9 +280,17 @@
 				padding: 4vw 2vw;
 
 				.two_1 {
-					padding: 1vw 0;
-					font-weight: bold;
-					font-size: var(--font16Size);
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.name {
+						width: 80vw;
+						padding: 1vw 0;
+						font-weight: bold;
+						font-size: var(--font16Size);
+					}
+
 				}
 
 				.two_2 {

+ 1 - 0
pagesHome/type/index.vue

@@ -215,6 +215,7 @@
 					.top {
 						display: flex;
 						justify-content: space-between;
+						align-items: center;
 
 						.name {
 							width: 50vw;

+ 1 - 0
pagesHome/type/info.vue

@@ -166,6 +166,7 @@
 				.two_1 {
 					display: flex;
 					justify-content: space-between;
+					align-items: center;
 
 					.name {
 						width: 80vw;

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/hotel/detail.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/hotel/index.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/hotel/info.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/type/index.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/type/info.js.map


+ 0 - 33
unpackage/dist/dev/mp-weixin/pagesHome/hotel/detail.js

@@ -98,29 +98,6 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
 var components
-try {
-  components = {
-    uniFav: function () {
-      return Promise.all(/*! import() | uni_modules/uni-fav/components/uni-fav/uni-fav */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-fav/components/uni-fav/uni-fav")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-fav/components/uni-fav/uni-fav.vue */ 587))
-    },
-  }
-} catch (e) {
-  if (
-    e.message.indexOf("Cannot find module") !== -1 &&
-    e.message.indexOf(".vue") !== -1
-  ) {
-    console.error(e.message)
-    console.error("1. 排查组件名称拼写是否正确")
-    console.error(
-      "2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
-    )
-    console.error(
-      "3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
-    )
-  } else {
-    throw e
-  }
-}
 var render = function () {
   var _vm = this
   var _h = _vm.$createElement
@@ -218,11 +195,6 @@ var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/r
 //
 //
 //
-//
-//
-//
-//
-//
 var _default = {
   data: function data() {
     return {
@@ -345,11 +317,6 @@ var _default = {
         }).replace(/\<img/gi, '<img style="width:100%;"'); // 对 img 元素增加 style 属性,并设置宽度为 100%
       }
     },
-    // 收藏
-    onClick: function onClick() {
-      var that = this;
-      console.log("收藏");
-    },
     // 预订
     toBuy: function toBuy(item) {
       var that = this;

+ 1 - 3
unpackage/dist/dev/mp-weixin/pagesHome/hotel/detail.json

@@ -1,6 +1,4 @@
 {
   "navigationBarTitleText": "房间信息",
-  "usingComponents": {
-    "uni-fav": "/uni_modules/uni-fav/components/uni-fav/uni-fav"
-  }
+  "usingComponents": {}
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/hotel/detail.wxml


+ 1 - 6
unpackage/dist/dev/mp-weixin/pagesHome/hotel/detail.wxss

@@ -20,12 +20,7 @@
 .main .bottom .two.data-v-38f4bfe6 {
   padding: 4vw 2vw;
 }
-.main .bottom .two .two_1.data-v-38f4bfe6 {
-  display: flex;
-  justify-content: space-between;
-}
-.main .bottom .two .two_1 .name.data-v-38f4bfe6 {
-  width: 80vw;
+.main .bottom .two .name.data-v-38f4bfe6 {
   padding: 1vw 0;
   font-weight: bold;
   font-size: var(--font16Size);

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesHome/hotel/index.wxss

@@ -46,6 +46,7 @@
 .main .two .list .list_1 .top.data-v-fde50d66 {
   display: flex;
   justify-content: space-between;
+  align-items: center;
 }
 .main .two .list .list_1 .top .name.data-v-fde50d66 {
   width: 50vw;

+ 13 - 0
unpackage/dist/dev/mp-weixin/pagesHome/hotel/info.js

@@ -100,6 +100,9 @@ __webpack_require__.r(__webpack_exports__);
 var components
 try {
   components = {
+    uniFav: function () {
+      return Promise.all(/*! import() | uni_modules/uni-fav/components/uni-fav/uni-fav */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-fav/components/uni-fav/uni-fav")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-fav/components/uni-fav/uni-fav.vue */ 587))
+    },
     uniCollapse: function () {
       return __webpack_require__.e(/*! import() | uni_modules/uni-collapse/components/uni-collapse/uni-collapse */ "uni_modules/uni-collapse/components/uni-collapse/uni-collapse").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue */ 495))
     },
@@ -281,6 +284,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
 //
 //
 //
+//
+//
+//
+//
+//
 var _default = {
   data: function data() {
     return {
@@ -452,6 +460,11 @@ var _default = {
         });
       }
     },
+    // 收藏
+    onClick: function onClick() {
+      var that = this;
+      console.log("收藏");
+    },
     // 分页
     toPage: function toPage(e) {
       var that = this;

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesHome/hotel/info.json

@@ -1,6 +1,7 @@
 {
   "navigationBarTitleText": "酒店详情",
   "usingComponents": {
+    "uni-fav": "/uni_modules/uni-fav/components/uni-fav/uni-fav",
     "uni-collapse": "/uni_modules/uni-collapse/components/uni-collapse/uni-collapse",
     "uni-collapse-item": "/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item"
   }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/hotel/info.wxml


+ 6 - 0
unpackage/dist/dev/mp-weixin/pagesHome/hotel/info.wxss

@@ -25,6 +25,12 @@
   padding: 4vw 2vw;
 }
 .main .bottom .two .two_1.data-v-1041d103 {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.main .bottom .two .two_1 .name.data-v-1041d103 {
+  width: 80vw;
   padding: 1vw 0;
   font-weight: bold;
   font-size: var(--font16Size);

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesHome/type/index.wxss

@@ -46,6 +46,7 @@
 .main .two .list .list_1 .top.data-v-3031ac97 {
   display: flex;
   justify-content: space-between;
+  align-items: center;
 }
 .main .two .list .list_1 .top .name.data-v-3031ac97 {
   width: 50vw;

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesHome/type/info.wxss

@@ -23,6 +23,7 @@
 .main .bottom .two .two_1.data-v-ecf5e70e {
   display: flex;
   justify-content: space-between;
+  align-items: center;
 }
 .main .bottom .two .two_1 .name.data-v-ecf5e70e {
   width: 80vw;