Kaynağa Gözat

封装状态栏搜索组件(未完成)

asd123a20 3 yıl önce
ebeveyn
işleme
1bdf5e5083
76 değiştirilmiş dosya ile 4310 ekleme ve 319 silme
  1. 39 9
      App.vue
  2. 104 0
      components/nav-bar.vue
  3. 0 140
      components/uni-section/uni-section.vue
  4. 44 0
      lib/request.js
  5. 3 2
      main.js
  6. 14 7
      pages.json
  7. 25 0
      pages/details/index.vue
  8. 6 4
      pages/index/index.vue
  9. 25 0
      pages/list/index.vue
  10. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  11. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map
  12. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  13. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/nav-bar.js.map
  14. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/section.js.map
  15. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/details/index.js.map
  16. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  17. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/journal/index.js.map
  18. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/list/index.js.map
  19. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/market/index.js.map
  20. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index.js.map
  21. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/search/index.js.map
  22. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
  23. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js.map
  24. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.js.map
  25. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.js.map
  26. 1 0
      unpackage/dist/dev/mp-weixin/App.wxml
  27. 7 7
      unpackage/dist/dev/mp-weixin/app.json
  28. 44 12
      unpackage/dist/dev/mp-weixin/common/main.js
  29. 115 0
      unpackage/dist/dev/mp-weixin/common/runtime.js
  30. 1305 127
      unpackage/dist/dev/mp-weixin/common/vendor.js
  31. 237 0
      unpackage/dist/dev/mp-weixin/components/nav-bar.js
  32. 7 0
      unpackage/dist/dev/mp-weixin/components/nav-bar.json
  33. 1 0
      unpackage/dist/dev/mp-weixin/components/nav-bar.wxml
  34. 37 0
      unpackage/dist/dev/mp-weixin/components/nav-bar.wxss
  35. 179 0
      unpackage/dist/dev/mp-weixin/pages/details/index.js
  36. 3 0
      unpackage/dist/dev/mp-weixin/pages/details/index.json
  37. 1 0
      unpackage/dist/dev/mp-weixin/pages/details/index.wxml
  38. 7 0
      unpackage/dist/dev/mp-weixin/pages/details/index.wxss
  39. 1 0
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  40. 1 1
      unpackage/dist/dev/mp-weixin/pages/index/index.wxml
  41. 4 1
      unpackage/dist/dev/mp-weixin/pages/index/index.wxss
  42. 179 0
      unpackage/dist/dev/mp-weixin/pages/list/index.js
  43. 3 0
      unpackage/dist/dev/mp-weixin/pages/list/index.json
  44. 1 0
      unpackage/dist/dev/mp-weixin/pages/list/index.wxml
  45. 7 0
      unpackage/dist/dev/mp-weixin/pages/list/index.wxss
  46. 31 0
      unpackage/dist/dev/mp-weixin/pages/search/index.js
  47. 5 0
      unpackage/dist/dev/mp-weixin/pages/search/index.json
  48. 1 0
      unpackage/dist/dev/mp-weixin/pages/search/index.wxml
  49. 1 2
      unpackage/dist/dev/mp-weixin/project.config.json
  50. BIN
      unpackage/dist/dev/mp-weixin/static/c1.png
  51. BIN
      unpackage/dist/dev/mp-weixin/static/c2.png
  52. BIN
      unpackage/dist/dev/mp-weixin/static/c3.png
  53. BIN
      unpackage/dist/dev/mp-weixin/static/c4.png
  54. BIN
      unpackage/dist/dev/mp-weixin/static/c5.png
  55. BIN
      unpackage/dist/dev/mp-weixin/static/c6.png
  56. BIN
      unpackage/dist/dev/mp-weixin/static/c7.png
  57. BIN
      unpackage/dist/dev/mp-weixin/static/c8.png
  58. BIN
      unpackage/dist/dev/mp-weixin/static/c9.png
  59. BIN
      unpackage/dist/dev/mp-weixin/static/logo.png
  60. BIN
      unpackage/dist/dev/mp-weixin/static/uni.png
  61. 235 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js
  62. 4 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.json
  63. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxml
  64. 511 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxss
  65. 369 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js
  66. 7 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.json
  67. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.wxml
  68. 86 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.wxss
  69. 177 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.js
  70. 4 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.json
  71. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.wxml
  72. 7 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.wxss
  73. 6 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.bak.json
  74. 395 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.js
  75. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.wxml
  76. 51 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.wxss

+ 39 - 9
App.vue

@@ -1,15 +1,45 @@
 <script>
+  import Vue from 'vue'
 	export default {
+    globalData: {
+      // 全局设置状态栏和导航栏高度
+      statusBarH: 0,
+      customBarH: 0,
+    },
 		onLaunch: function() {
-			console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
-			console.log('App Launch')
-		},
-		onShow: function() {
-			console.log('App Show')
-		},
-		onHide: function() {
-			console.log('App Hide')
-		}
+      uni.getSystemInfo({
+        success: (e) => {
+          // 获取手机状态栏高度
+          let statusBar = e.statusBarHeight
+          let customBar
+          
+          // #ifndef MP
+          customBar = statusBar + (e.platform == 'android' ? 50 : 45)
+          // #endif
+          
+          // #ifdef MP-WEIXIN
+          // 获取胶囊按钮的布局位置信息
+          let menu = wx.getMenuButtonBoundingClientRect()
+          // 导航栏高度 = 胶囊下距离 + 胶囊上距离 - 状态栏高度
+          customBar = menu.bottom + menu.top - statusBar
+          // #endif
+          
+          // #ifdef MP-ALIPAY
+          customBar = statusBar + e.titleBarHeight
+          // #endif
+          
+          // 注意:此方法不支持原生Nvue页面
+          Vue.prototype.statusBarH = statusBar
+          Vue.prototype.customBarH = customBar
+          
+          // 支持nvue页面写法(兼容H5/小程序/APP/APP-Nvue)
+          this.globalData.statusBarH = statusBar
+          this.globalData.customBarH = customBar
+        }
+    })
+    },
+		onShow: function() {},
+		onHide: function() {}
 	}
 </script>
 

+ 104 - 0
components/nav-bar.vue

@@ -0,0 +1,104 @@
+<template>
+  <view class="box-bg" :style="{'height': customBarH + 'px', 'padding-top': statusBarH + 'px' }">
+    <uni-nav-bar>
+        <block class="uni-picker" slot="left">
+          <picker @change="bindPickerChange" :value="index" :range="array" :range-key="'name'">
+            <view>{{array[index].name}}</view>
+          </picker>
+          <uni-icons type="arrowdown" color="#666" size="18" />
+        </block>
+        <view class="input-view">
+          <uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
+          <input confirm-type="search" class="nav-bar-input" type="text" placeholder="输入搜索关键词"
+            @confirm="confirm" @focus="focus" />
+        </view>
+    </uni-nav-bar>
+  </view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+        statusBarH: 0,
+        customBarH: 0,
+				index: 0,
+				array: [
+          { name: '文章', code: 0 },
+          { name: '期刊', code: 1 }
+				]
+			}
+		},
+		methods: {
+      // 类型选项改变
+      bindPickerChange(e) {
+        this.index = e.target.value;
+        this.type = this.array[e.target.value].code;
+      },
+      // 搜索
+      confirm(e) {
+        console.log('搜索');
+      },
+      // 聚焦
+      focus(e) {
+        console.log('聚焦');
+      }
+    },
+    // 获取状态栏和导航条高度
+    created() {
+      const app = getApp()
+      this.statusBarH = app.globalData.statusBarH
+      this.customBarH = app.globalData.customBarH - this.statusBarH
+    },
+	}
+</script>
+
+<style lang="scss" scope>
+$nav-height: 30px;
+
+	.box-bg {
+		background-color: #F5F5F5;
+		padding: 5px 0;
+	}
+
+
+	.uni-picker {
+		/* #ifndef APP-PLUS-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: flex-start;
+		// width: 160rpx;
+		margin-left: 4px;
+	}
+
+	.input-view {
+		/* #ifndef APP-PLUS-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		// width: 500rpx;
+		// flex: 1;
+		background-color: #f8f8f8;
+		height: $nav-height;
+		border-radius: 15px;
+		flex-wrap: nowrap;
+		margin: 7px 0;
+		line-height: $nav-height;
+    width: 90%;
+	}
+
+	.input-uni-icon {
+		line-height: $nav-height;
+	}
+
+	.nav-bar-input {
+		height: $nav-height;
+		line-height: $nav-height;
+		width: 80%;
+		padding: 0 5px;
+		font-size: 12px;
+		background-color: #f8f8f8;
+	}
+</style>

+ 0 - 140
components/uni-section/uni-section.vue

@@ -1,140 +0,0 @@
-<template>
-	<view class="uni-section">
-		<view class="uni-section-header" nvue>
-			<view v-if="type" class="uni-section__head">
-				<view :class="type" class="uni-section__head-tag"/>
-			</view>
-			<view class="uni-section__content">
-				<text :class="{'distraction':!subTitle}" :style="{color:color}" class="uni-section__content-title">{{ title }}</text>
-				<text v-if="subTitle" class="uni-section__content-sub">{{ subTitle }}</text>
-			</view>
-		</view>
-		<view :style="{padding: padding ? '10px' : ''}">
-			<slot/>
-		</view>
-	</view>
-</template>
-
-<script>
-
-	/**
-	 * Section 标题栏
-	 * @description 标题栏
-	 * @property {String} type = [line|circle] 标题装饰类型
-	 * 	@value line 竖线
-	 * 	@value circle 圆形
-	 * @property {String} title 主标题
-	 * @property {String} subTitle 副标题
-	 */
-
-	export default {
-		name: 'UniSection',
-		emits:['click'],
-		props: {
-			type: {
-				type: String,
-				default: ''
-			},
-			title: {
-				type: String,
-				default: ''
-			},
-			color:{
-				type: String,
-				default: '#333'
-			},
-			subTitle: {
-				type: String,
-				default: ''
-			},
-			padding: {
-				type: Boolean,
-				default: false
-			}
-		},
-		data() {
-			return {}
-		},
-		watch: {
-			title(newVal) {
-				if (uni.report && newVal !== '') {
-					uni.report('title', newVal)
-				}
-			}
-		},
-		methods: {
-			onClick() {
-				this.$emit('click')
-			}
-		}
-	}
-</script>
-<style lang="scss" >
-	$uni-primary: #2979ff !default;
-	
-	.uni-section {
-		background-color: #fff;
-		// overflow: hidden;
-		margin-top: 10px;
-	}
-	.uni-section-header {
-		position: relative;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		align-items: center;
-		padding: 12px 10px;
-		// height: 50px;
-		font-weight: normal;
-	}
-	.uni-section__head {
-		flex-direction: row;
-		justify-content: center;
-		align-items: center;
-		margin-right: 10px;
-	}
-
-	.line {
-		height: 12px;
-		background-color: $uni-primary;
-		border-radius: 10px;
-		width: 4px;
-	}
-
-	.circle {
-		width: 8px;
-		height: 8px;
-		border-top-right-radius: 50px;
-		border-top-left-radius: 50px;
-		border-bottom-left-radius: 50px;
-		border-bottom-right-radius: 50px;
-		background-color: $uni-primary;
-	}
-
-	.uni-section__content {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-		flex: 1;
-		color: #333;
-	}
-
-	.uni-section__content-title {
-		font-size: 14px;
-		color: $uni-primary;
-	}
-
-	.distraction {
-		flex-direction: row;
-		align-items: center;
-	}
-
-	.uni-section__content-sub {
-		font-size: 12px;
-		color: #999;
-		line-height: 16px;
-		margin-top: 2px;
-	}
-</style>

+ 44 - 0
lib/request.js

@@ -0,0 +1,44 @@
+uni.addInterceptor('request', {
+  invoke(args) {
+    const token = uni.getStorageSync(token)
+    if (token) args.headers.authorization = token;
+  },
+  success(args) {
+    if (response.status == 401) {
+      // 返回登录处理
+      sessionStorage.removeItem('token');
+      // router.replace('/frame/login');
+    }
+    if (response.status == 500) {
+      // 错误处理
+      response.data.data = { errcode: -1001, errmsg: '服务器错误' };
+    }
+  }, 
+  fail(err) {
+      console.log('interceptor-fail',err)
+  }, 
+  complete(res) {
+      console.log('interceptor-complete',res)
+  }
+})
+// 私有方法
+const request = async ({ url, method, params, data, headers }) => {
+  return await uni.request({ url, method, params, data, headers });
+};
+
+// 定义类
+class Point {
+  get(url, params, headers) {
+    return request({ url, params, headers });
+  }
+
+  post(url, data, params, headers) {
+    return request({ url, method: 'post', data, params, headers });
+  }
+
+  delete(url, params, headers) {
+    return request({ url, method: 'delete', params, headers });
+  }
+}
+export default new Point();
+  

+ 3 - 2
main.js

@@ -2,11 +2,12 @@
 // #ifndef VUE3
 import Vue from 'vue'
 import App from './App'
-
+// 引入自定义组件
+import NavBar from './components/nav-bar.vue'
 Vue.config.productionTip = false
-
 App.mpType = 'app'
 
+Vue.component('navbar', NavBar)
 const app = new Vue({
     ...App
 })

+ 14 - 7
pages.json

@@ -11,17 +11,24 @@
 		},
 		{
 			"path": "pages/my/index"
+		},
+		{
+			"path": "pages/list/index"
+		},
+		{
+			"path": "pages/details/index"
 		}
 	],
 	// 用于设置应用的状态栏、导航条、标题、窗口背景色等。
 	"globalStyle": {
-		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "客户端",
-		"navigationBarBackgroundColor": "#F8F8F8",
-		"backgroundColor": "#F8F8F8",
-		"app-plus": {
-			"background": "#efeff4"
-		}
+		// "navigationBarTextStyle": "black",
+		// "navigationBarTitleText": "客户端",
+		// "navigationBarBackgroundColor": "#F8F8F8",
+		// "backgroundColor": "#F8F8F8",
+		// "app-plus": {
+		// 	"background": "#efeff4"
+		// }
+		"navigationStyle": "custom"
 	},
 	"tabBar": {
 		// tab上的文字默认颜色

+ 25 - 0
pages/details/index.vue

@@ -0,0 +1,25 @@
+<template>
+	<view class="container">
+		<view class="intro">详情</view>
+		<text class="intro">详见:详情</text>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style>
+.container {
+	padding: 20px;
+	font-size: 14px;
+	line-height: 24px;
+}
+</style>

+ 6 - 4
pages/index/index.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="container">
+    <navbar></navbar>
 		<view class="intro">首页</view>
 		<text class="intro">详见:首页</text>
 	</view>
@@ -10,16 +11,17 @@
 		data() {
 			return {}
 		},
-		methods: {
-
-		}
+		methods: {}
 	}
 </script>
 
 <style>
 	.container {
-		padding: 20px;
 		font-size: 14px;
 		line-height: 24px;
 	}
+	.searchInput {
+		width: 80%;
+		margin: 0 auto;
+	}
 </style>

+ 25 - 0
pages/list/index.vue

@@ -0,0 +1,25 @@
+<template>
+	<view class="container">
+		<view class="intro">list</view>
+		<text class="intro">详见:list</text>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style>
+	.container {
+		padding: 20px;
+		font-size: 14px;
+		line-height: 24px;
+	}
+</style>

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


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


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


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/nav-bar.js.map


+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/section.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"components/section.js","sourceRoot":""}

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


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


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


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


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


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


+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/search/index.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;AACA;AACA,6F,6FAFmBA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC;AAGnBC,UAAU,CAACC,cAAD,CAAV,C","file":"pages/search/index.js","sourcesContent":["import 'uni-pages';wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/search/index.vue'\ncreatePage(Page)"],"sourceRoot":""}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.js.map


+ 1 - 0
unpackage/dist/dev/mp-weixin/App.wxml

@@ -0,0 +1 @@
+<view class="container"><navbar vue-id="c31923fa-1" bind:__l="__l"></navbar><view class="intro">首页</view><text class="intro">详见:首页</text></view>

+ 7 - 7
unpackage/dist/dev/mp-weixin/app.json

@@ -3,14 +3,13 @@
     "pages/index/index",
     "pages/journal/index",
     "pages/market/index",
-    "pages/my/index"
+    "pages/my/index",
+    "pages/list/index",
+    "pages/details/index"
   ],
   "subPackages": [],
   "window": {
-    "navigationBarTextStyle": "black",
-    "navigationBarTitleText": "客户端",
-    "navigationBarBackgroundColor": "#F8F8F8",
-    "backgroundColor": "#F8F8F8"
+    "navigationStyle": "custom"
   },
   "tabBar": {
     "color": "#000000",
@@ -62,6 +61,7 @@
       "backgroundImage": ""
     }
   },
-  "usingComponents": {},
-  "sitemapLocation": "sitemap.json"
+  "usingComponents": {
+    "navbar": "/components/nav-bar"
+  }
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 44 - 12
unpackage/dist/dev/mp-weixin/common/main.js


+ 115 - 0
unpackage/dist/dev/mp-weixin/common/runtime.js

@@ -55,6 +55,11 @@
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
 /******/
+/******/ 	// object to store loaded CSS chunks
+/******/ 	var installedCssChunks = {
+/******/ 		"common/runtime": 0
+/******/ 	}
+/******/
 /******/ 	// object to store loaded and loading chunks
 /******/ 	// undefined = chunk not loaded, null = chunk preloaded/prefetched
 /******/ 	// Promise = chunk loading, 0 = chunk loaded
@@ -64,6 +69,11 @@
 /******/
 /******/ 	var deferredModules = [];
 /******/
+/******/ 	// script path function
+/******/ 	function jsonpScriptSrc(chunkId) {
+/******/ 		return __webpack_require__.p + "" + chunkId + ".js"
+/******/ 	}
+/******/
 /******/ 	// The require function
 /******/ 	function __webpack_require__(moduleId) {
 /******/
@@ -88,6 +98,108 @@
 /******/ 		return module.exports;
 /******/ 	}
 /******/
+/******/ 	// This file contains only the entry chunk.
+/******/ 	// The chunk loading function for additional chunks
+/******/ 	__webpack_require__.e = function requireEnsure(chunkId) {
+/******/ 		var promises = [];
+/******/
+/******/
+/******/ 		// mini-css-extract-plugin CSS loading
+/******/ 		var cssChunks = {"components/nav-bar":1,"uni_modules/uni-icons/components/uni-icons/uni-icons":1,"uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar":1,"uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar":1};
+/******/ 		if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
+/******/ 		else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
+/******/ 			promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
+/******/ 				var href = "" + ({"components/nav-bar":"components/nav-bar","uni_modules/uni-icons/components/uni-icons/uni-icons":"uni_modules/uni-icons/components/uni-icons/uni-icons","uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar":"uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar","uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar":"uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar"}[chunkId]||chunkId) + ".wxss";
+/******/ 				var fullhref = __webpack_require__.p + href;
+/******/ 				var existingLinkTags = document.getElementsByTagName("link");
+/******/ 				for(var i = 0; i < existingLinkTags.length; i++) {
+/******/ 					var tag = existingLinkTags[i];
+/******/ 					var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");
+/******/ 					if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve();
+/******/ 				}
+/******/ 				var existingStyleTags = document.getElementsByTagName("style");
+/******/ 				for(var i = 0; i < existingStyleTags.length; i++) {
+/******/ 					var tag = existingStyleTags[i];
+/******/ 					var dataHref = tag.getAttribute("data-href");
+/******/ 					if(dataHref === href || dataHref === fullhref) return resolve();
+/******/ 				}
+/******/ 				var linkTag = document.createElement("link");
+/******/ 				linkTag.rel = "stylesheet";
+/******/ 				linkTag.type = "text/css";
+/******/ 				linkTag.onload = resolve;
+/******/ 				linkTag.onerror = function(event) {
+/******/ 					var request = event && event.target && event.target.src || fullhref;
+/******/ 					var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")");
+/******/ 					err.code = "CSS_CHUNK_LOAD_FAILED";
+/******/ 					err.request = request;
+/******/ 					delete installedCssChunks[chunkId]
+/******/ 					linkTag.parentNode.removeChild(linkTag)
+/******/ 					reject(err);
+/******/ 				};
+/******/ 				linkTag.href = fullhref;
+/******/
+/******/ 				var head = document.getElementsByTagName("head")[0];
+/******/ 				head.appendChild(linkTag);
+/******/ 			}).then(function() {
+/******/ 				installedCssChunks[chunkId] = 0;
+/******/ 			}));
+/******/ 		}
+/******/
+/******/ 		// JSONP chunk loading for javascript
+/******/
+/******/ 		var installedChunkData = installedChunks[chunkId];
+/******/ 		if(installedChunkData !== 0) { // 0 means "already installed".
+/******/
+/******/ 			// a Promise means "currently loading".
+/******/ 			if(installedChunkData) {
+/******/ 				promises.push(installedChunkData[2]);
+/******/ 			} else {
+/******/ 				// setup Promise in chunk cache
+/******/ 				var promise = new Promise(function(resolve, reject) {
+/******/ 					installedChunkData = installedChunks[chunkId] = [resolve, reject];
+/******/ 				});
+/******/ 				promises.push(installedChunkData[2] = promise);
+/******/
+/******/ 				// start chunk loading
+/******/ 				var script = document.createElement('script');
+/******/ 				var onScriptComplete;
+/******/
+/******/ 				script.charset = 'utf-8';
+/******/ 				script.timeout = 120;
+/******/ 				if (__webpack_require__.nc) {
+/******/ 					script.setAttribute("nonce", __webpack_require__.nc);
+/******/ 				}
+/******/ 				script.src = jsonpScriptSrc(chunkId);
+/******/
+/******/ 				// create error before stack unwound to get useful stacktrace later
+/******/ 				var error = new Error();
+/******/ 				onScriptComplete = function (event) {
+/******/ 					// avoid mem leaks in IE.
+/******/ 					script.onerror = script.onload = null;
+/******/ 					clearTimeout(timeout);
+/******/ 					var chunk = installedChunks[chunkId];
+/******/ 					if(chunk !== 0) {
+/******/ 						if(chunk) {
+/******/ 							var errorType = event && (event.type === 'load' ? 'missing' : event.type);
+/******/ 							var realSrc = event && event.target && event.target.src;
+/******/ 							error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
+/******/ 							error.name = 'ChunkLoadError';
+/******/ 							error.type = errorType;
+/******/ 							error.request = realSrc;
+/******/ 							chunk[1](error);
+/******/ 						}
+/******/ 						installedChunks[chunkId] = undefined;
+/******/ 					}
+/******/ 				};
+/******/ 				var timeout = setTimeout(function(){
+/******/ 					onScriptComplete({ type: 'timeout', target: script });
+/******/ 				}, 120000);
+/******/ 				script.onerror = script.onload = onScriptComplete;
+/******/ 				document.head.appendChild(script);
+/******/ 			}
+/******/ 		}
+/******/ 		return Promise.all(promises);
+/******/ 	};
 /******/
 /******/ 	// expose the modules object (__webpack_modules__)
 /******/ 	__webpack_require__.m = modules;
@@ -141,6 +253,9 @@
 /******/ 	// __webpack_public_path__
 /******/ 	__webpack_require__.p = "/";
 /******/
+/******/ 	// on error function for async loading
+/******/ 	__webpack_require__.oe = function(err) { console.error(err); throw err; };
+/******/
 /******/ 	var jsonpArray = global["webpackJsonp"] = global["webpackJsonp"] || [];
 /******/ 	var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
 /******/ 	jsonpArray.push = webpackJsonpCallback;

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1305 - 127
unpackage/dist/dev/mp-weixin/common/vendor.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 237 - 0
unpackage/dist/dev/mp-weixin/components/nav-bar.js


+ 7 - 0
unpackage/dist/dev/mp-weixin/components/nav-bar.json

@@ -0,0 +1,7 @@
+{
+  "usingComponents": {
+    "uni-nav-bar": "/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar",
+    "uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
+  },
+  "component": true
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
unpackage/dist/dev/mp-weixin/components/nav-bar.wxml


+ 37 - 0
unpackage/dist/dev/mp-weixin/components/nav-bar.wxss

@@ -0,0 +1,37 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.box-bg {
+  background-color: #F5F5F5;
+  padding: 5px 0;
+}
+.uni-picker {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: flex-start;
+  margin-left: 4px;
+}
+.input-view {
+  display: flex;
+  flex-direction: row;
+  background-color: #f8f8f8;
+  height: 30px;
+  border-radius: 15px;
+  flex-wrap: nowrap;
+  margin: 7px 0;
+  line-height: 30px;
+  width: 90%;
+}
+.input-uni-icon {
+  line-height: 30px;
+}
+.nav-bar-input {
+  height: 30px;
+  line-height: 30px;
+  width: 80%;
+  padding: 0 5px;
+  font-size: 12px;
+  background-color: #f8f8f8;
+}
+

Dosya farkı çok büyük olduğundan ihmal edildi
+ 179 - 0
unpackage/dist/dev/mp-weixin/pages/details/index.js


+ 3 - 0
unpackage/dist/dev/mp-weixin/pages/details/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/details/index.wxml

@@ -0,0 +1 @@
+<view class="container"><view class="intro">详情</view><text class="intro">详见:详情</text></view>

+ 7 - 0
unpackage/dist/dev/mp-weixin/pages/details/index.wxss

@@ -0,0 +1,7 @@
+
+.container {
+	padding: 20px;
+	font-size: 14px;
+	line-height: 24px;
+}
+

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -143,6 +143,7 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =
 //
 //
 //
+//
 var _default =
 {
   data: function data() {

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml

@@ -1 +1 @@
-<view class="container"><view class="intro">首页</view><text class="intro">详见:首页</text></view>
+<view class="container"><navbar vue-id="8dd740cc-1" bind:__l="__l"></navbar><view class="intro">首页</view><text class="intro">详见:首页</text></view>

+ 4 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxss

@@ -1,7 +1,10 @@
 
 .container {
-	padding: 20px;
 	font-size: 14px;
 	line-height: 24px;
 }
+.searchInput {
+	width: 80%;
+	margin: 0 auto;
+}
 

Dosya farkı çok büyük olduğundan ihmal edildi
+ 179 - 0
unpackage/dist/dev/mp-weixin/pages/list/index.js


+ 3 - 0
unpackage/dist/dev/mp-weixin/pages/list/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/list/index.wxml

@@ -0,0 +1 @@
+<view class="container"><view class="intro">list</view><text class="intro">详见:list</text></view>

+ 7 - 0
unpackage/dist/dev/mp-weixin/pages/list/index.wxss

@@ -0,0 +1,7 @@
+
+.container {
+	padding: 20px;
+	font-size: 14px;
+	line-height: 24px;
+}
+

+ 31 - 0
unpackage/dist/dev/mp-weixin/pages/search/index.js

@@ -0,0 +1,31 @@
+(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/search/index"],{
+
+/***/ 60:
+/*!*************************************************************************************************!*\
+  !*** C:/Users/10428/Desktop/框架源码/微前端/代码/magazine-web/main.js?{"page":"pages%2Fsearch%2Findex"} ***!
+  \*************************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 5);
+var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
+var _index = _interopRequireDefault(__webpack_require__(/*! ./pages/search/index.vue */ 61));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
+createPage(_index.default);
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
+
+/***/ }),
+
+/***/ 61:
+/*!******************************************************************************!*\
+  !*** C:/Users/10428/Desktop/框架源码/微前端/代码/magazine-web/pages/search/index.vue ***!
+  \******************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+throw new Error("Module build failed (from ./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js):\nError: ENOENT: no such file or directory, open 'C:\\Users\\10428\\Desktop\\框架源码\\微前端\\代码\\magazine-web\\pages\\search\\index.vue'");
+
+/***/ })
+
+},[[60,"common/runtime","common/vendor"]]]);
+//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/search/index.js.map

+ 5 - 0
unpackage/dist/dev/mp-weixin/pages/search/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "uni-search-bar": "/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar"
+  }
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/search/index.wxml

@@ -0,0 +1 @@
+<uni-search-bar class="uni-mt-10" vue-id="bda12f3c-1" radius="5" placeholder="搜索内容" clearButton="auto" cancelButton="none" data-event-opts="{{[['^confirm',[['search']]]]}}" bind:confirm="__e" bind:__l="__l"></uni-search-bar>

+ 1 - 2
unpackage/dist/dev/mp-weixin/project.config.json

@@ -31,8 +31,7 @@
       "outputPath": ""
     },
     "disableUseStrict": false,
-    "useCompilerPlugins": false,
-    "minifyWXML": true
+    "useCompilerPlugins": false
   },
   "compileType": "miniprogram",
   "libVersion": "2.23.2",

BIN
unpackage/dist/dev/mp-weixin/static/c1.png


BIN
unpackage/dist/dev/mp-weixin/static/c2.png


BIN
unpackage/dist/dev/mp-weixin/static/c3.png


BIN
unpackage/dist/dev/mp-weixin/static/c4.png


BIN
unpackage/dist/dev/mp-weixin/static/c5.png


BIN
unpackage/dist/dev/mp-weixin/static/c6.png


BIN
unpackage/dist/dev/mp-weixin/static/c7.png


BIN
unpackage/dist/dev/mp-weixin/static/c8.png


BIN
unpackage/dist/dev/mp-weixin/static/c9.png


BIN
unpackage/dist/dev/mp-weixin/static/logo.png


BIN
unpackage/dist/dev/mp-weixin/static/uni.png


Dosya farkı çok büyük olduğundan ihmal edildi
+ 235 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js


+ 4 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "component": true
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxml

@@ -0,0 +1 @@
+<text data-event-opts="{{[['tap',[['_onClick',['$event']]]]]}}" class="{{['uni-icons','uniui-'+type,customPrefix,customPrefix?type:'']}}" style="{{'color:'+(color)+';'+('font-size:'+(iconSize)+';')}}" bindtap="__e"></text>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 511 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxss


Dosya farkı çok büyük olduğundan ihmal edildi
+ 369 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js


+ 7 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+  "usingComponents": {
+    "uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons",
+    "status-bar": "/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar"
+  }
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.wxml


+ 86 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.wxss

@@ -0,0 +1,86 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.uni-nav-bar-text.data-v-6bda1a90 {
+  font-size: 14px;
+}
+.uni-nav-bar-right-text.data-v-6bda1a90 {
+  font-size: 12px;
+}
+.uni-navbar__content.data-v-6bda1a90 {
+  position: relative;
+  background-color: transparent;
+}
+.uni-navbar-btn-text.data-v-6bda1a90 {
+  display: flex;
+  flex-direction: column;
+  justify-content: flex-start;
+  align-items: center;
+  line-height: 12px;
+}
+.uni-navbar__header.data-v-6bda1a90 {
+  display: flex;
+  padding: 0 10px;
+  flex-direction: row;
+  height: 44px;
+  font-size: 12px;
+}
+.uni-navbar__header-btns.data-v-6bda1a90 {
+  overflow: hidden;
+  display: flex;
+  flex-wrap: nowrap;
+  flex-direction: row;
+  width: 120rpx;
+  justify-content: center;
+  align-items: center;
+}
+.uni-navbar__header-btns-left.data-v-6bda1a90 {
+  display: flex;
+  width: 120rpx;
+  justify-content: flex-start;
+  align-items: center;
+}
+.uni-navbar__header-btns-right.data-v-6bda1a90 {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-end;
+  align-items: center;
+}
+.uni-navbar__header-container.data-v-6bda1a90 {
+  display: flex;
+  flex: 1;
+  padding: 0 10px;
+  overflow: hidden;
+}
+.uni-navbar__header-container-inner.data-v-6bda1a90 {
+  display: flex;
+  flex: 1;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+  font-size: 12px;
+  overflow: hidden;
+}
+.uni-navbar__placeholder-view.data-v-6bda1a90 {
+  height: 44px;
+}
+.uni-navbar--fixed.data-v-6bda1a90 {
+  position: fixed;
+  z-index: 998;
+  left: 0;
+  right: 0;
+}
+.uni-navbar--shadow.data-v-6bda1a90 {
+  box-shadow: 0 1px 6px #ccc;
+}
+.uni-navbar--border.data-v-6bda1a90 {
+  border-bottom-width: 1rpx;
+  border-bottom-style: solid;
+  border-bottom-color: #eee;
+}
+.uni-ellipsis-1.data-v-6bda1a90 {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+

Dosya farkı çok büyük olduğundan ihmal edildi
+ 177 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.js


+ 4 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "component": true
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.wxml

@@ -0,0 +1 @@
+<view class="uni-status-bar" style="{{'height:'+(statusBarHeight)+';'}}"><slot></slot></view>

+ 7 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.wxss

@@ -0,0 +1,7 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.uni-status-bar {
+  height: 20px;
+}
+

+ 6 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.bak.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
+  },
+  "component": true
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 395 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.wxml


+ 51 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.wxss

@@ -0,0 +1,51 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.uni-searchbar {
+  display: flex;
+  flex-direction: row;
+  position: relative;
+  padding: 10px;
+}
+.uni-searchbar__box {
+  display: flex;
+  box-sizing: border-box;
+  overflow: hidden;
+  position: relative;
+  flex: 1;
+  justify-content: center;
+  flex-direction: row;
+  align-items: center;
+  height: 36px;
+  padding: 5px 8px 5px 0px;
+}
+.uni-searchbar__box-icon-search {
+  display: flex;
+  flex-direction: row;
+  padding: 0 8px;
+  justify-content: center;
+  align-items: center;
+  color: #B3B3B3;
+}
+.uni-searchbar__box-search-input {
+  flex: 1;
+  font-size: 14px;
+  color: #333;
+}
+.uni-searchbar__box-icon-clear {
+  align-items: center;
+  line-height: 24px;
+  padding-left: 8px;
+}
+.uni-searchbar__text-placeholder {
+  font-size: 14px;
+  color: #B3B3B3;
+  margin-left: 5px;
+}
+.uni-searchbar__cancel {
+  padding-left: 10px;
+  line-height: 36px;
+  font-size: 14px;
+  color: #333333;
+}
+