liukang 2 years ago
parent
commit
d3a9133bf6
100 changed files with 1945 additions and 76 deletions
  1. 44 2
      App.vue
  2. 31 0
      common/amap-wx.130.js
  3. 22 10
      components/menuList/menuList.vue
  4. 110 59
      components/news-module/news-module.vue
  5. 163 0
      components/share-model/share-model.vue
  6. 4 2
      main.js
  7. 7 3
      manifest.json
  8. 15 0
      node_modules/.package-lock.json
  9. 0 0
      node_modules/uview-ui/LICENSE
  10. 104 0
      node_modules/uview-ui/README.md
  11. 326 0
      node_modules/uview-ui/changelog.md
  12. 0 0
      node_modules/uview-ui/components/u--form/u--form.vue
  13. 0 0
      node_modules/uview-ui/components/u--image/u--image.vue
  14. 72 0
      node_modules/uview-ui/components/u--input/u--input.vue
  15. 0 0
      node_modules/uview-ui/components/u--text/u--text.vue
  16. 0 0
      node_modules/uview-ui/components/u--textarea/u--textarea.vue
  17. 0 0
      node_modules/uview-ui/components/u-action-sheet/props.js
  18. 0 0
      node_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue
  19. 0 0
      node_modules/uview-ui/components/u-album/props.js
  20. 0 0
      node_modules/uview-ui/components/u-album/u-album.vue
  21. 0 0
      node_modules/uview-ui/components/u-alert/props.js
  22. 0 0
      node_modules/uview-ui/components/u-alert/u-alert.vue
  23. 0 0
      node_modules/uview-ui/components/u-avatar-group/props.js
  24. 0 0
      node_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue
  25. 0 0
      node_modules/uview-ui/components/u-avatar/props.js
  26. 0 0
      node_modules/uview-ui/components/u-avatar/u-avatar.vue
  27. 0 0
      node_modules/uview-ui/components/u-back-top/props.js
  28. 0 0
      node_modules/uview-ui/components/u-back-top/u-back-top.vue
  29. 0 0
      node_modules/uview-ui/components/u-badge/props.js
  30. 0 0
      node_modules/uview-ui/components/u-badge/u-badge.vue
  31. 0 0
      node_modules/uview-ui/components/u-button/nvue.scss
  32. 0 0
      node_modules/uview-ui/components/u-button/props.js
  33. 490 0
      node_modules/uview-ui/components/u-button/u-button.vue
  34. 0 0
      node_modules/uview-ui/components/u-button/vue.scss
  35. 0 0
      node_modules/uview-ui/components/u-calendar/header.vue
  36. 0 0
      node_modules/uview-ui/components/u-calendar/month.vue
  37. 0 0
      node_modules/uview-ui/components/u-calendar/props.js
  38. 0 0
      node_modules/uview-ui/components/u-calendar/u-calendar.vue
  39. 0 0
      node_modules/uview-ui/components/u-calendar/util.js
  40. 0 0
      node_modules/uview-ui/components/u-car-keyboard/props.js
  41. 0 0
      node_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue
  42. 0 0
      node_modules/uview-ui/components/u-cell-group/props.js
  43. 0 0
      node_modules/uview-ui/components/u-cell-group/u-cell-group.vue
  44. 0 0
      node_modules/uview-ui/components/u-cell/props.js
  45. 0 0
      node_modules/uview-ui/components/u-cell/u-cell.vue
  46. 0 0
      node_modules/uview-ui/components/u-checkbox-group/props.js
  47. 0 0
      node_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue
  48. 0 0
      node_modules/uview-ui/components/u-checkbox/props.js
  49. 0 0
      node_modules/uview-ui/components/u-checkbox/u-checkbox.vue
  50. 0 0
      node_modules/uview-ui/components/u-circle-progress/props.js
  51. 0 0
      node_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue
  52. 74 0
      node_modules/uview-ui/components/u-code-input/props.js
  53. 251 0
      node_modules/uview-ui/components/u-code-input/u-code-input.vue
  54. 0 0
      node_modules/uview-ui/components/u-code/props.js
  55. 0 0
      node_modules/uview-ui/components/u-code/u-code.vue
  56. 0 0
      node_modules/uview-ui/components/u-col/props.js
  57. 0 0
      node_modules/uview-ui/components/u-col/u-col.vue
  58. 0 0
      node_modules/uview-ui/components/u-collapse-item/props.js
  59. 0 0
      node_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue
  60. 0 0
      node_modules/uview-ui/components/u-collapse/props.js
  61. 0 0
      node_modules/uview-ui/components/u-collapse/u-collapse.vue
  62. 0 0
      node_modules/uview-ui/components/u-column-notice/props.js
  63. 0 0
      node_modules/uview-ui/components/u-column-notice/u-column-notice.vue
  64. 0 0
      node_modules/uview-ui/components/u-count-down/props.js
  65. 0 0
      node_modules/uview-ui/components/u-count-down/u-count-down.vue
  66. 0 0
      node_modules/uview-ui/components/u-count-down/utils.js
  67. 0 0
      node_modules/uview-ui/components/u-count-to/props.js
  68. 0 0
      node_modules/uview-ui/components/u-count-to/u-count-to.vue
  69. 0 0
      node_modules/uview-ui/components/u-datetime-picker/props.js
  70. 0 0
      node_modules/uview-ui/components/u-datetime-picker/u-datetime-picker.vue
  71. 0 0
      node_modules/uview-ui/components/u-divider/props.js
  72. 0 0
      node_modules/uview-ui/components/u-divider/u-divider.vue
  73. 0 0
      node_modules/uview-ui/components/u-dropdown-item/props.js
  74. 0 0
      node_modules/uview-ui/components/u-dropdown-item/u-dropdown-item.vue
  75. 0 0
      node_modules/uview-ui/components/u-dropdown/props.js
  76. 0 0
      node_modules/uview-ui/components/u-dropdown/u-dropdown.vue
  77. 0 0
      node_modules/uview-ui/components/u-empty/props.js
  78. 0 0
      node_modules/uview-ui/components/u-empty/u-empty.vue
  79. 0 0
      node_modules/uview-ui/components/u-form-item/props.js
  80. 0 0
      node_modules/uview-ui/components/u-form-item/u-form-item.vue
  81. 0 0
      node_modules/uview-ui/components/u-form/props.js
  82. 0 0
      node_modules/uview-ui/components/u-form/u-form.vue
  83. 0 0
      node_modules/uview-ui/components/u-gap/props.js
  84. 0 0
      node_modules/uview-ui/components/u-gap/u-gap.vue
  85. 0 0
      node_modules/uview-ui/components/u-grid-item/props.js
  86. 0 0
      node_modules/uview-ui/components/u-grid-item/u-grid-item.vue
  87. 0 0
      node_modules/uview-ui/components/u-grid/props.js
  88. 0 0
      node_modules/uview-ui/components/u-grid/u-grid.vue
  89. 0 0
      node_modules/uview-ui/components/u-icon/icons.js
  90. 0 0
      node_modules/uview-ui/components/u-icon/props.js
  91. 0 0
      node_modules/uview-ui/components/u-icon/u-icon.vue
  92. 0 0
      node_modules/uview-ui/components/u-image/props.js
  93. 232 0
      node_modules/uview-ui/components/u-image/u-image.vue
  94. 0 0
      node_modules/uview-ui/components/u-index-anchor/props.js
  95. 0 0
      node_modules/uview-ui/components/u-index-anchor/u-index-anchor.vue
  96. 0 0
      node_modules/uview-ui/components/u-index-item/props.js
  97. 0 0
      node_modules/uview-ui/components/u-index-item/u-index-item.vue
  98. 0 0
      node_modules/uview-ui/components/u-index-list/props.js
  99. 0 0
      node_modules/uview-ui/components/u-index-list/u-index-list.vue
  100. 0 0
      node_modules/uview-ui/components/u-input/props.js

+ 44 - 2
App.vue

@@ -1,5 +1,47 @@
 <script>
+	import amap from './common/amap-wx.130.js'
+	var amapPlugin = new amap.AMapWX({  
+		key: 'bb69713f3c3d3c85e2662d313daa47b9'
+	});  
 	export default {
+		globalData: {
+			
+			getLoca: function() {
+				var city = uni.getStorageSync('city')
+				return new Promise((resolve, reject) => {
+					if(!city) {
+						uni.authorize({
+						    scope: 'scope.userLocation',
+						    success() {
+						        wx.getLocation({
+						        	type: 'wgs84',
+						        	success(res) {
+						        		amapPlugin.getRegeo({
+						        			success(data) {
+						        				resolve(data)
+						        			},
+						        			fail(err) {
+						        				console.log('err=',err)
+						        			}
+						        		})
+						        	},
+						        	fail(err){
+						        		console.log('err=',err)
+						        	}
+						        })
+						    },
+							fail(err) {
+								closeLoading('error',err)
+							}
+						})
+					}
+				})
+				
+			}
+		},
+		onLoad() {
+			
+		},
 		onLaunch: function() {
 			console.log('App Launch')
 		},
@@ -8,13 +50,13 @@
 		},
 		onHide: function() {
 			console.log('App Hide')
-		}
+		},
 	}
 </script>
 
 <style lang="scss">
 	/*每个页面公共css */
-	@import "@/uni_modules/uview-ui/index.scss";
+	@import "uview-ui/index.scss";
 	
 	.content {
 		background-color: #ffffff;

+ 31 - 0
common/amap-wx.130.js

@@ -0,0 +1,31 @@
+function AMapWX(a){this.key=a.key;this.requestConfig={key:a.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};this.MeRequestConfig={key:a.key,serviceName:"https://restapi.amap.com/rest/me"}}
+AMapWX.prototype.getWxLocation=function(a,b){wx.getLocation({type:"gcj02",success:function(c){c=c.longitude+","+c.latitude;wx.setStorage({key:"userLocation",data:c});b(c)},fail:function(c){wx.getStorage({key:"userLocation",success:function(d){d.data&&b(d.data)}});a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getMEKeywordsSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.city&&(d.city=b.city);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&(d.pageSize=b.pageSize);b.sig&&(d.sig=
+b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/local",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEIdSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.id&&(d.id=b.id);b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/id",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&
+0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEPolygonSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.polygon&&(d.polygon=b.polygon);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&(d.pageSize=b.pageSize);
+b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/polygon",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEaroundSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.center&&(d.center=b.center);b.radius&&(d.radius=b.radius);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&
+(d.pageSize=b.pageSize);b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/around",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getGeo=function(a){var b=this.requestConfig,c=a.options;b={key:this.key,extensions:"all",s:b.s,platform:b.platform,appname:this.key,sdkversion:b.sdkversion,logversion:b.logversion};c.address&&(b.address=c.address);c.city&&(b.city=c.city);c.batch&&(b.batch=c.batch);c.sig&&(b.sig=c.sig);wx.request({url:"https://restapi.amap.com/v3/geocode/geo",data:b,method:"GET",header:{"content-type":"application/json"},success:function(d){(d=d.data)&&d.status&&"1"===d.status?a.success(d):a.fail({errCode:"0",
+errMsg:d})},fail:function(d){a.fail({errCode:"0",errMsg:d.errMsg||""})}})};
+AMapWX.prototype.getRegeo=function(a){function b(d){var e=c.requestConfig;wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:c.key,location:d,extensions:"all",s:e.s,platform:e.platform,appname:c.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(g){if(g.data.status&&"1"==g.data.status){g=g.data.regeocode;var h=g.addressComponent,f=[],k=g.roads[0].name+"\u9644\u8fd1",m=d.split(",")[0],n=d.split(",")[1];if(g.pois&&
+g.pois[0]){k=g.pois[0].name+"\u9644\u8fd1";var l=g.pois[0].location;l&&(m=parseFloat(l.split(",")[0]),n=parseFloat(l.split(",")[1]))}h.provice&&f.push(h.provice);h.city&&f.push(h.city);h.district&&f.push(h.district);h.streetNumber&&h.streetNumber.street&&h.streetNumber.number?(f.push(h.streetNumber.street),f.push(h.streetNumber.number)):f.push(g.roads[0].name);f=f.join("");a.success([{iconPath:a.iconPath,width:a.iconWidth,height:a.iconHeight,name:f,desc:k,longitude:m,latitude:n,id:0,regeocodeData:g}])}else a.fail({errCode:g.data.infocode,
+errMsg:g.data.info})},fail:function(g){a.fail({errCode:"0",errMsg:g.errMsg||""})}})}var c=this;a.location?b(a.location):c.getWxLocation(a,function(d){b(d)})};
+AMapWX.prototype.getWeather=function(a){function b(g){var h="base";a.type&&"forecast"==a.type&&(h="all");wx.request({url:"https://restapi.amap.com/v3/weather/weatherInfo",data:{key:d.key,city:g,extensions:h,s:e.s,platform:e.platform,appname:d.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(f){if(f.data.status&&"1"==f.data.status)if(f.data.lives){if((f=f.data.lives)&&0<f.length){f=f[0];var k={city:{text:"\u57ce\u5e02",data:f.city},
+weather:{text:"\u5929\u6c14",data:f.weather},temperature:{text:"\u6e29\u5ea6",data:f.temperature},winddirection:{text:"\u98ce\u5411",data:f.winddirection+"\u98ce"},windpower:{text:"\u98ce\u529b",data:f.windpower+"\u7ea7"},humidity:{text:"\u6e7f\u5ea6",data:f.humidity+"%"}};k.liveData=f;a.success(k)}}else f.data.forecasts&&f.data.forecasts[0]&&a.success({forecast:f.data.forecasts[0]});else a.fail({errCode:f.data.infocode,errMsg:f.data.info})},fail:function(f){a.fail({errCode:"0",errMsg:f.errMsg||""})}})}
+function c(g){wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:d.key,location:g,extensions:"all",s:e.s,platform:e.platform,appname:d.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(h){if(h.data.status&&"1"==h.data.status){h=h.data.regeocode;if(h.addressComponent)var f=h.addressComponent.adcode;else h.aois&&0<h.aois.length&&(f=h.aois[0].adcode);b(f)}else a.fail({errCode:h.data.infocode,errMsg:h.data.info})},
+fail:function(h){a.fail({errCode:"0",errMsg:h.errMsg||""})}})}var d=this,e=d.requestConfig;a.city?b(a.city):d.getWxLocation(a,function(g){c(g)})};
+AMapWX.prototype.getPoiAround=function(a){function b(e){e={key:c.key,location:e,s:d.s,platform:d.platform,appname:c.key,sdkversion:d.sdkversion,logversion:d.logversion};a.querytypes&&(e.types=a.querytypes);a.querykeywords&&(e.keywords=a.querykeywords);wx.request({url:"https://restapi.amap.com/v3/place/around",data:e,method:"GET",header:{"content-type":"application/json"},success:function(g){if(g.data.status&&"1"==g.data.status){if((g=g.data)&&g.pois){for(var h=[],f=0;f<g.pois.length;f++){var k=0==
+f?a.iconPathSelected:a.iconPath;h.push({latitude:parseFloat(g.pois[f].location.split(",")[1]),longitude:parseFloat(g.pois[f].location.split(",")[0]),iconPath:k,width:22,height:32,id:f,name:g.pois[f].name,address:g.pois[f].address})}a.success({markers:h,poisData:g.pois})}}else a.fail({errCode:g.data.infocode,errMsg:g.data.info})},fail:function(g){a.fail({errCode:"0",errMsg:g.errMsg||""})}})}var c=this,d=c.requestConfig;a.location?b(a.location):c.getWxLocation(a,function(e){b(e)})};
+AMapWX.prototype.getStaticmap=function(a){function b(e){c.push("location="+e);a.zoom&&c.push("zoom="+a.zoom);a.size&&c.push("size="+a.size);a.scale&&c.push("scale="+a.scale);a.markers&&c.push("markers="+a.markers);a.labels&&c.push("labels="+a.labels);a.paths&&c.push("paths="+a.paths);a.traffic&&c.push("traffic="+a.traffic);e="https://restapi.amap.com/v3/staticmap?"+c.join("&");a.success({url:e})}var c=[];c.push("key="+this.key);var d=this.requestConfig;c.push("s="+d.s);c.push("platform="+d.platform);
+c.push("appname="+d.appname);c.push("sdkversion="+d.sdkversion);c.push("logversion="+d.logversion);a.location?b(a.location):this.getWxLocation(a,function(e){b(e)})};
+AMapWX.prototype.getInputtips=function(a){var b=Object.assign({},this.requestConfig);a.location&&(b.location=a.location);a.keywords&&(b.keywords=a.keywords);a.type&&(b.type=a.type);a.city&&(b.city=a.city);a.citylimit&&(b.citylimit=a.citylimit);wx.request({url:"https://restapi.amap.com/v3/assistant/inputtips",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.tips&&a.success({tips:c.data.tips})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||
+""})}})};
+AMapWX.prototype.getDrivingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);a.strategy&&(b.strategy=a.strategy);a.waypoints&&(b.waypoints=a.waypoints);a.avoidpolygons&&(b.avoidpolygons=a.avoidpolygons);a.avoidroad&&(b.avoidroad=a.avoidroad);wx.request({url:"https://restapi.amap.com/v3/direction/driving",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths,
+taxi_cost:c.data.route.taxi_cost||""})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getWalkingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);wx.request({url:"https://restapi.amap.com/v3/direction/walking",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getTransitRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);a.strategy&&(b.strategy=a.strategy);a.city&&(b.city=a.city);a.cityd&&(b.cityd=a.cityd);wx.request({url:"https://restapi.amap.com/v3/direction/transit/integrated",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&(c=c.data.route,a.success({distance:c.distance||"",taxi_cost:c.taxi_cost||
+"",transits:c.transits}))},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getRidingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);wx.request({url:"https://restapi.amap.com/v3/direction/riding",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};module.exports.AMapWX=AMapWX;

+ 22 - 10
components/menuList/menuList.vue

@@ -3,8 +3,8 @@
 		<scroll-view scroll-y="true" style="height: 1190rpx;">
 			<view :style="[MobileLeft]">
 				<view v-show="!isNav">
-					<view v-for="(item,index) in menuLists" :class="menuIndex==index ? 'menuListSelect' : 'menuList' " @click="selectMenu(index,item)">
-						{{item.title}}
+					<view v-for="(item,index) in titleList" :key="index" :class="menuIndex==index ? 'menuListSelect' : 'menuList' " @click="selectMenu(index,item)">
+						{{item.name}}
 					</view>
 				</view>
 				<view v-show="isNav">
@@ -15,15 +15,15 @@
 		</scroll-view>
 		<scroll-view scroll-y="true" style="height: 1190rpx;">
 			<view :style="[MobileRight]">
-				<view v-show="!isSlot">
-					<view class="goodsList hflex acenter jbetween" v-for="(it,index) in goods">
-						<image :src="it.img" style="width: 144rpx;height: 144rpx;border-radius: 16rpx;" mode="aspectFill"></image>
+				<view v-show="!isSlot" :style="[MobileRight]">
+					<view class="goodsList hflex acenter jbetween" v-for="(it,index) in menuLists" :key="index" @click="listenMenu(index)">
+						<image :src="it.cover" style="width: 144rpx;height: 144rpx;border-radius: 16rpx;" mode="aspectFill"></image>
 						<view class="goodsDesc">
-							<text class="goods_text">{{it.label}}</text>
+							<text class="goods_text">{{it.name}}</text>
 							<!-- <view class="hot">月销量{{it.hot}}</view> -->
 							<view class="hflex acenter jbetween">
-								<view class="price">¥{{it.price}}</view>
-								<image src="/static/images/shop/add-cart.png" style="width: 44rpx;height: 44rpx;"></image>
+								<view class="price">¥{{it.price_selling}}</view>
+								<image src="/static/images/shop/add-cart.png" style="width: 44rpx;height: 44rpx;" @tap.stop="addCart(index)"></image>
 							</view>
 							<!-- <view class="type" @tap="onClick(it)">选规格</view> -->
 						</view>
@@ -46,6 +46,10 @@
 				type:[Array,Number,Object],
 				default:[]
 			},
+			titleList: {
+				type:[Array,Number,Object],
+				default:[]
+			},
 			bottomSize:{
 				type:String,
 				default:'0rpx'
@@ -78,7 +82,7 @@
 			if(this.menuLists == []){
 				
 			}
-			this.goods = this.menuLists[0].goods
+			// this.goods = this.menuLists[0].goods
 		},
 		mounted() {
 
@@ -136,6 +140,12 @@
 			onClick(e) {
 				this.$emit('listenEvent',e);
 			},
+			listenMenu(index) {
+				this.$emit('listenMenu',index)
+			},
+			addCart(index) {
+				this.$emit('addCart',index)
+			}
 		}
 	}
 </script>
@@ -154,9 +164,11 @@
 		font-weight: bold;
 	}
 	.goodsList{
+		width: 100%;
 		float: left;
 		border-bottom: 1rpx solid #f3f4f6;
-		padding: 10rpx;
+		box-sizing: border-box;
+		padding: 10rpx 30rpx 10rpx 10rpx;
 		text{
 			font-weight: bold;
 			font-size: 32rpx;

+ 110 - 59
components/news-module/news-module.vue

@@ -1,57 +1,68 @@
 <template>
 	<view class="news_module vflex">
-		<view class="news_title">
-			{{title}}
-		</view>
-		<view v-if="imgs.length > 0" class="imgList hflex acenter jbetween">
-			<block v-for="(item,index) in imgs" :key="index">
-				<image :src="item" mode="widthFix" style="width: 230rpx"></image>
-			</block>
-			
-		</view>
-		<view v-if="video !== ''" class="imgList">
-			<video :src="video" controls></video>o
-		</view>
-		<view class="hflex acenter bottom">
-			<view class="bottom_text">{{type}}</view>
-			<view class="bottom_text2">{{client}}</view>
-			<view class="bottom_text2">{{comment}}评论</view>
-		</view>
+		<block v-for="(item,index) in pageList" :key="index">
+			<view class="news_box" @click="toDetail(item.id)">
+				<view class="news_title">
+					{{item.title}}
+				</view>
+				<view class="hflex acenter user" v-if="item.user">
+					<view class="avatar_box">
+						<image :src="item.user.avatar" mode="aspectFill" class="avatar"></image>
+					</view>
+					<view class="user_text">{{item.user.name}}</view>
+					<view v-if="item.user.is_blueV" class="blue_v">
+						V
+					</view>
+				</view>
+				<view v-if="item.imgs.length > 0" class="imgList hflex acenter jbetween">
+					<block v-for="(item2,index2) in item.imgs" :key="index2">
+						<image :src="item2" mode="aspectFill" class="img" @tap.stop="priveImg(index,index2)"></image>
+					</block>
+					
+				</view>
+				<view v-if="item.video" class="imgList">
+					<video :src="item.video" controls></video>
+				</view>
+				<view class="hflex acenter bottom">
+					<view class="bottom_text">{{item.type}}</view>
+					<view class="bottom_text2">{{item.client}}</view>
+					<view class="bottom_text2">{{item.comment}}评论</view>
+				</view>
+			</view>
+		</block>
+		
 	</view>
 </template>
 
 <script>
+	import $api from '@/static/js/api.js'
 	export default {
 		name:"news-module",
 		props: {
-			title: {
-				type: String,
-				value: '' 
-			},
-			imgs: {
+			pageList: {
 				type: Array,
-				value: [] 
-			},
-			video: {
-				type: String,
-				value: '' 
-			},
-			type: {
-				type: String,
-				value: '' 
-			},
-			client: {
-				type: String,
-				value: '' 
-			},
-			comment: {
-				type: Number,
-				value: 0
+				value: []
 			}
+			
 		},
 		data() {
 			return {
-			};
+				
+			}
+		},
+		methods: {
+			// 打开详情
+			toDetail(id) {
+				$api.jump('/page_index/pages/index/newDetail?id=' + id)
+			},
+			// 查看图片
+			priveImg(index,index2) {
+				var that = this
+				uni.previewImage({
+					urls: that.pageList[index].imgs,
+					current: that.pageList[index].imgs[index2]
+				});
+			}
 		}
 	}
 </script>
@@ -59,28 +70,68 @@
 <style lang="scss">
 .news_module {
 	width: 100%;
-	padding-bottom: 20rpx;
-	border-bottom: 1rpx solid #f3f3f3;
 	
-	.news_title {
-		font-size: 36rpx;
-		color: #333;
-		line-height: 50rpx;
-	}
-	.imgList {
-		margin: 16rpx 0;
-	}
-	.bottom {
-		
-		.bottom_text {
-			font-size: 24rpx;
-			color: #3261FF;
+	
+	.news_box {
+		margin-top: 20rpx;
+		padding-bottom: 20rpx;
+		border-bottom: 1rpx solid #f3f3f3;
+		.news_title {
+			font-size: 36rpx;
+			color: #333;
+			line-height: 50rpx;
 		}
-		.bottom_text2 {
-			color: #999999;
-			font-size: 24rpx;
-			margin-left: 20rpx;
+		.user {
+			padding: 14rpx 0 0;
+			.avatar_box {
+				margin-right: 8rpx;
+				.avatar {
+					width: 32rpx;
+					height: 32rpx;
+					border-radius: 50%;
+				}
+			}
+			.user_text {
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #666666;
+				line-height: 34rpx;
+			}
+			.blue_v {
+				background: #506DFF;
+				border-radius: 12rpx 4rpx 12rpx 4rpx;
+				margin-left: 8rpx;
+				text-align: center;
+				line-height: 28rpx;
+				// padding: 6rpx;
+				width: 28rpx;
+				height: 28rpx;
+				color: #fff;
+				font-size: 14rpx;
+			}
+		}
+		.imgList {
+			margin: 16rpx 0;
+			.img {
+				width: 224rpx;
+				height: 148rpx;
+				border-radius: 8rpx 0px 0px 8rpx;
+				margin: 0 12rpx 20rpx 0;
+			}
+		}
+		.bottom {
+			
+			.bottom_text {
+				font-size: 24rpx;
+				color: #3261FF;
+			}
+			.bottom_text2 {
+				color: #999999;
+				font-size: 24rpx;
+				margin-left: 20rpx;
+			}
 		}
 	}
+	
 }
 </style>

+ 163 - 0
components/share-model/share-model.vue

@@ -0,0 +1,163 @@
+<template>
+	<view class="share_content" v-if="show">
+		<view class="share_box">
+			<view class="box_bottom hflex acenter jbetween">
+				<view class="vflex">
+					<view class="bottom_left1">船百知</view>
+					<view class="bottom_left2">船百知伴您一起扬帆起航,驶向成功彼岸。</view>
+				</view>
+				<image :src="data.ewm" class="bottom_right"></image>
+			</view>
+		</view>
+		<view class="share_bottom">
+			<view class="hflex acenter jbetween">
+				<button class="vflex acenter jcenter bottom_item" open-type="share">
+					<image src="/static/images/comment/wx.png" class="item_icon"></image>
+					<view class="item_text">微信好友</view>
+				</button>
+				<button class="vflex acenter jcenter bottom_item" open-type="share">
+					<image src="/static/images/comment/moments.png" class="item_icon"></image>
+					<view class="item_text">朋友圈</view>
+				</button>
+				<view class="vflex acenter jcenter bottom_item" @click="saveImg">
+					<image src="/static/images/comment/download.png" class="item_icon"></image>
+					<view class="item_text">保存图片</view>
+				</view>
+			</view>
+			<view class="share_cancel" @click="cancel">取消</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		name:"share-model",
+		props: {
+			show: {
+				type: Boolean,
+				value: false
+			},
+			data: {
+				type: Object,
+				value: {}
+			}
+		},
+		data() {
+			return {
+				
+			}
+		},
+		onLoad() {
+			that = this
+		},
+		onShareAppMessage(res) {
+		    if (res.from === 'button') {// 来自页面内分享按钮
+		        console.log(res.target)
+		    }
+		    return {
+		        title: '船百知', //分享的名称
+		    }
+		},
+		onShareTimeline(res) {
+		    return {
+		        title: '船百知',
+		        type: 0,
+		        summary: "",
+		    }
+		},
+		methods: {
+			// 取消
+			cancel() {
+				this.$emit('cancel', false)
+			},
+			saveImg() {
+				this.$emit('saveImg')
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.share_content::v-deep {
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 99;
+		width: 100vw;
+		height: 100vh;
+		background: rgba(0,0,0,0.5);
+		backdrop-filter: blur(5px);
+		.share_box {
+			margin: 148rpx auto;
+			width: 650rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			box-sizing: border-box;
+			padding: 0 40rpx;
+			.box_bottom {
+				width: 100%;
+				padding: 34rpx 0 16rpx;
+				border-top: 1rpx dashed #C3C3C3;
+				
+				.bottom_left1 {
+					font-size: 32rpx;
+					font-weight: 500;
+					color: #222222;
+					line-height: 44rpx;
+					padding-bottom: 20rpx;
+					
+				}
+				.bottom_left2 {
+					font-size: 22rpx;
+					font-weight: 400;
+					color: #999999;
+					line-height: 32rpx;
+				}
+				.bottom_right {
+					width: 136rpx;
+					height: 136rpx;
+				}
+			}
+		}
+		.share_bottom {
+			position: fixed;
+			bottom: 0;
+			width: 100%;
+			height: 388rpx;
+			background: #F5F7FF;
+			border-radius: 40rpx 40rpx 0px 0px;
+			.bottom_item {
+				width: 33%;
+				margin: 50rpx 0 90rpx;
+				border: none !important;
+				background-color: #F5F7FF !important;
+				
+				
+				.item_icon {
+					width: 76rpx;
+					height: 76rpx;
+				}
+				.item_text {
+					font-size: 26rpx;
+					font-weight: 400;
+					color: #333333;
+					line-height: 36rpx;
+					margin-top: 12rpx;
+				}
+			}
+			button::after {
+				border: none !important;
+			}
+			.share_cancel {
+				width: 100%;
+				text-align: center;
+				font-size: 32rpx;
+				font-weight: 400;
+				color: #333333;
+				line-height: 44rpx;
+			}
+		}
+	}
+</style>

+ 4 - 2
main.js

@@ -7,8 +7,10 @@ App.mpType = 'app'
 const app = new Vue({
     ...App
 })
-import uView from '@/uni_modules/uview-ui'
-Vue.use(uView)
+import uView from "uview-ui";
+Vue.use(uView);
+
+var amapFile = require('@/common/amap-wx.130.js');
 app.$mount()
 // #endif
 

+ 7 - 3
manifest.json

@@ -50,9 +50,10 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "",
+        "appid" : "wxa5033cf91977e574",
         "setting" : {
-            "urlCheck" : false
+            "urlCheck" : false,
+            "minified" : true
         },
         "usingComponents" : true,
         "optimization" : {
@@ -62,7 +63,10 @@
             "scope.userLocation" : {
                 "desc" : "提供更好的服务"
             }
-        }
+        },
+		"requiredPrivateInfos": [
+			"getLocation"
+		]
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 15 - 0
node_modules/.package-lock.json

@@ -0,0 +1,15 @@
+{
+  "name": "cbz",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {
+    "node_modules/uview-ui": {
+      "version": "2.0.31",
+      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.31.tgz",
+      "integrity": "sha512-I/0fGuvtiKHH/mBb864SGYk+SJ7WaF32tsBgYgeBOsxlUp+Th+Ac2tgz2cTvsQJl6eZYWsKZ3ixiSXCAcxZ8Sw==",
+      "engines": {
+        "HBuilderX": "^3.1.0"
+      }
+    }
+  }
+}

+ 0 - 0
uni_modules/uview-ui/LICENSE → node_modules/uview-ui/LICENSE


+ 104 - 0
node_modules/uview-ui/README.md

@@ -0,0 +1,104 @@
+<p align="center">
+    <img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
+</p>
+<h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView</h3>
+<h3 align="center">多平台快速开发的UI框架</h3>
+
+## 说明
+
+uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
+
+## 特性
+
+- 兼容安卓,iOS,微信小程序,H5,QQ小程序,百度小程序,支付宝小程序,头条小程序
+- 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用
+- 众多贴心的JS利器,让您飞镖在手,召之即来,百步穿杨
+- 众多的常用页面和布局,让您专注逻辑,事半功倍
+- 详尽的文档支持,现代化的演示效果
+- 按需引入,精简打包体积
+
+
+## 安装
+
+```bash
+# npm方式安装,插件市场导入无需执行此命令
+npm i uview-ui
+```
+
+## 快速上手
+
+1. `main.js`引入uView库
+```js
+// main.js
+import uView from 'uview-ui';
+Vue.use(uView);
+```
+
+2. `App.vue`引入基础样式(注意style标签需声明scss属性支持)
+```css
+/* App.vue */
+<style lang="scss">
+@import "uview-ui/index.scss";
+</style>
+```
+
+3. `uni.scss`引入全局scss变量文件
+```css
+/* uni.scss */
+@import "uview-ui/theme.scss";
+```
+
+4. `pages.json`配置easycom规则(按需引入)
+
+```js
+// pages.json
+{
+	"easycom": {
+		// npm安装的方式不需要前面的"@/",下载安装的方式需要"@/"
+		// npm安装方式
+		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
+		// 下载安装方式
+		// "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
+	},
+	// 此为本身已有的内容
+	"pages": [
+		// ......
+	]
+}
+```
+
+请通过[快速上手](https://www.uviewui.com/components/quickstart.html)了解更详细的内容 
+
+## 使用方法
+配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
+
+```html
+<template>
+	<u-button text="按钮"></u-button>
+</template>
+```
+
+请通过[快速上手](https://www.uviewui.com/components/quickstart.html)了解更详细的内容 
+
+## 链接
+
+- [官方文档](https://www.uviewui.com/)
+- [更新日志](https://www.www.uviewui.com/components/changelog.html)
+- [升级指南](https://www.uviewui.com/components/changelog.html)
+- [关于我们](https://www.uviewui.com/cooperation/about.html)
+
+## 预览
+
+您可以通过**微信**扫码,查看最佳的演示效果。
+<br>
+<br>
+<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" >
+
+## 捐赠uView的研发
+
+uView文档和源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
+
+<img src="https://uviewui.com/common/alipay.png" width="220" ><img style="margin-left: 100px;" src="https://uviewui.com/common/wechat.png" width="220" >
+
+## 版权信息
+uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。

+ 326 - 0
node_modules/uview-ui/changelog.md

@@ -0,0 +1,326 @@
+## 2.0.31(2022-04-19)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复`upload`在`vue`页面上传成功后没有成功标志的问题
+2. 解决演示项目中微信小程序模拟上传图片一直出于上传中问题
+3. 修复`u-code-input`组件在`nvue`页面编译到`app`平台上光标异常问题(`app`去除此功能)
+4. 修复`actionSheet`组件标题关闭按钮点击事件名称错误的问题
+5. 其他修复
+## 2.0.30(2022-04-04)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. `u-rate`增加`readonly`属性
+2. `tabs`滑块支持设置背景图片
+3. 修复`u-subsection` `mode`为`subsection`时,滑块样式不正确的问题
+4. `u-code-input`添加光标效果动画
+5. 修复`popup`的`open`事件不触发
+6. 修复`u-flex-column`无效的问题
+7. 修复`u-datetime-picker`索引在特定场合异常问题
+8. 修复`u-datetime-picker`最小时间字符串模板错误问题
+9. `u-swiper`添加`m3u8`验证
+10. `u-swiper`修改判断image和video逻辑
+11. 修复`swiper`无法使用本地图片问题,增加`type`参数
+12. 修复`u-row-notice`格式错误问题
+13. 修复`u-switch`组件当`unit`为`rpx`时,`nodeStyle`消失的问题
+14. 修复`datetime-picker`组件`showToolbar`与`visibleItemCount`属性无效的问题
+15. 修复`upload`组件条件编译位置判断错误,导致`previewImage`属性设置为`false`时,整个组件都会被隐藏的问题
+16. 修复`u-checkbox-group`设置`shape`属性无效的问题
+17. 修复`u-upload`的`capture`传入字符串的时候不生效的问题
+18. 修复`u-action-sheet`组件,关闭事件逻辑错误的问题
+19. 修复`u-list`触顶事件的触发错误的问题
+20. 修复`u-text`只有手机号可拨打的问题
+21. 修复`u-textarea`不能换行的问题
+22. 其他修复
+## 2.0.29(2022-03-13)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复`u--text`组件设置`decoration`属性未生效的问题
+2. 修复`u-datetime-picker`使用`formatter`后返回值不正确
+3. 修复`u-datetime-picker` `intercept` 可能为undefined
+4. 修复已设置单位 uni..config.unit = 'rpx'时,线型指示器 `transform` 的位置翻倍,导致指示器超出宽度
+5. 修复mixin中bem方法生成的类名在支付宝和字节小程序中失效
+6. 修复默认值传值为空的时候,打开`u-datetime-picker`报错,不能选中第一列时间的bug
+7. 修复`u-datetime-picker`使用`formatter`后返回值不正确
+8. 修复`u-image`组件`loading`无效果的问题
+9. 修复`config.unit`属性设为`rpx`时,导航栏占用高度不足导致塌陷的问题
+10. 修复`u-datetime-picker`组件`itemHeight`无效问题
+11. 其他修复
+## 2.0.28(2022-02-22)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. search组件新增searchIconSize属性
+2. 兼容Safari/Webkit中传入时间格式如2022-02-17 12:00:56
+3. 修复text value.js 判断日期出format错误问题
+4. priceFormat格式化金额出现精度错误
+5. priceFormat在部分情况下出现精度损失问题
+6. 优化表单rules提示
+7. 修复avatar组件src为空时,展示状态不对
+8. 其他修复
+## 2.0.27(2022-01-28)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1.样式修复
+## 2.0.26(2022-01-28)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1.样式修复
+## 2.0.25(2022-01-27)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复text组件mode=price时,可能会导致精度错误的问题
+2. 添加$u.setConfig()方法,可设置uView内置的config, props, zIndex, color属性,详见:[修改uView内置配置方案](https://uviewui.com/components/setting.html#%E9%BB%98%E8%AE%A4%E5%8D%95%E4%BD%8D%E9%85%8D%E7%BD%AE)
+3. 优化form组件在errorType=toast时,如果输入错误页面会有抖动的问题
+4. 修复$u.addUnit()对配置默认单位可能无效的问题
+## 2.0.24(2022-01-25)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复swiper在current指定非0时缩放有误
+2. 修复u-icon添加stop属性的时候报错
+3. 优化遗留的通过正则判断rpx单位的问题
+4. 优化Layout布局 vue使用gutter时,会超出固定区域
+5. 优化search组件高度单位问题(rpx -> px)
+6. 修复u-image slot 加载和错误的图片失去了高度
+7. 修复u-index-list中footer插槽与header插槽存在性判断错误
+8. 修复部分机型下u-popup关闭时会闪烁
+9. 修复u-image在nvue-app下失去宽高
+10. 修复u-popup运行报错
+11. 修复u-tooltip报错
+12. 修复box-sizing在app下的警告
+13. 修复u-navbar在小程序中报运行时错误
+14. 其他修复
+## 2.0.23(2022-01-24)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复image组件在hx3.3.9的nvue下可能会显示异常的问题
+2. 修复col组件gutter参数带rpx单位处理不正确的问题
+3. 修复text组件单行时无法显示省略号的问题
+4. navbar添加titleStyle参数
+5. 升级到hx3.3.9可消除nvue下控制台样式警告的问题
+## 2.0.22(2022-01-19)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. $u.page()方法优化,避免在特殊场景可能报错的问题
+2. picker组件添加immediateChange参数
+3. 新增$u.pages()方法
+## 2.0.21(2022-01-19)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 优化:form组件在用户设置rules的时候提示用户model必传
+2. 优化遗留的通过正则判断rpx单位的问题
+3. 修复微信小程序环境中tabbar组件开启safeAreaInsetBottom属性后,placeholder高度填充不正确
+4. 修复swiper在current指定非0时缩放有误
+5. 修复u-icon添加stop属性的时候报错
+6. 修复upload组件在accept=all的时候没有作用
+7. 修复在text组件mode为phone时call属性无效的问题
+8. 处理u-form clearValidate方法
+9. 其他修复
+## 2.0.20(2022-01-14)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复calendar默认会选择一个日期,如果直接点确定的话,无法取到值的问题
+2. 修复Slider缺少disabled props 还有注释
+3. 修复u-notice-bar点击事件无法拿到index索引值的问题
+4. 修复u-collapse-item在vue文件下,app端自定义插槽不生效的问题
+5. 优化头像为空时显示默认头像 
+6. 修复图片地址赋值后判断加载状态为完成问题
+7. 修复日历滚动到默认日期月份区域
+8. search组件暴露点击左边icon事件
+9. 修复u-form clearValidate方法不生效
+10. upload h5端增加返回文件参数(文件的name参数)
+11. 处理upload选择文件后url为blob类型无法预览的问题
+12. u-code-input 修复输入框没有往左移出一半屏幕
+13. 修复Upload上传 disabled为true时,控制台报hoverClass类型错误
+14. 临时处理ios app下grid点击坍塌问题
+15. 其他修复
+## 2.0.19(2021-12-29)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 优化微信小程序包体积可在微信中预览,请升级HbuilderX3.3.4,同时在“运行->运行到小程序模拟器”中勾选“运行时是否压缩代码”
+2. 优化微信小程序setData性能,处理某些方法如$u.route()无法在模板中使用的问题
+3. navbar添加autoBack参数
+4. 允许avatar组件的事件冒泡
+5. 修复cell组件报错问题
+6. 其他修复
+## 2.0.18(2021-12-28)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复app端编译报错问题
+2. 重新处理微信小程序端setData过大的性能问题
+3. 修复边框问题
+4. 修复最大最小月份不大于0则没有数据出现的问题
+5. 修复SwipeAction微信小程序端无法上下滑动问题
+6. 修复input的placeholder在小程序端默认显示为true问题
+7. 修复divider组件click事件无效问题
+8. 修复u-code-input maxlength 属性值为 String 类型时显示异常
+9. 修复当 grid只有 1到2时 在小程序端algin设置无效的问题
+10. 处理form-item的label为top时,取消错误提示的左边距
+11. 其他修复
+## 2.0.17(2021-12-26)
+## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 解决HBuilderX3.3.3.20211225版本导致的样式问题
+2. calendar日历添加monthNum参数
+3. navbar添加center slot
+## 2.0.16(2021-12-25)
+## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 解决微信小程序setData性能问题
+2. 修复count-down组件change事件不触发问题
+## 2.0.15(2021-12-21)
+## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复Cell单元格titleWidth无效
+2. 修复cheakbox组件ischecked不更新
+3. 修复keyboard是否显示"."按键默认值问题
+4. 修复number-keyboard是否显示键盘的"."符号问题
+5. 修复Input输入框 readonly无效
+6. 修复u-avatar 导致打包app、H5时候报错问题
+7. 修复Upload上传deletable无效
+8. 修复upload当设置maxSize时无效的问题
+9. 修复tabs lineWidth传入带单位的字符串的时候偏移量计算错误问题
+10. 修复rate组件在有padding的view内,显示的星星位置和可触摸区域不匹配,无法正常选中星星
+## 2.0.13(2021-12-14)
+## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复配置默认单位为rpx可能会导致自定义导航栏高度异常的问题
+## 2.0.12(2021-12-14)
+## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复tabs组件在vue环境下划线消失的问题
+2. 修复upload组件在安卓小程序无法选择视频的问题
+3. 添加uni.$u.config.unit配置,用于配置参数默认单位,详见:[默认单位配置](https://www.uviewui.com/components/setting.html#%E9%BB%98%E8%AE%A4%E5%8D%95%E4%BD%8D%E9%85%8D%E7%BD%AE)
+4. 修复textarea组件在没绑定v-model时,字符统计不生效问题
+5. 修复nvue下控制是否出现滚动条失效问题
+## 2.0.11(2021-12-13)
+## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. text组件align参数无效的问题
+2. subsection组件添加keyName参数
+3. upload组件无法判断[Object file]类型的问题
+4. 处理notify层级过低问题
+5. codeInput组件添加disabledDot参数
+6. 处理actionSheet组件round参数无效的问题
+7. calendar组件添加round参数用于控制圆角值
+8. 处理swipeAction组件在vue环境下默认被打开的问题
+9. button组件的throttleTime节流参数无效的问题
+10. 解决u-notify手动关闭方法close()无效的问题
+11. input组件readonly不生效问题
+12. tag组件type参数为info不生效问题
+## 2.0.10(2021-12-08)
+## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复button sendMessagePath属性不生效
+2. 修复DatetimePicker选择器title无效
+3. 修复u-toast设置loading=true不生效
+4. 修复u-text金额模式传0报错
+5. 修复u-toast组件的icon属性配置不生效
+6. button的icon在特殊场景下的颜色优化
+7. IndexList优化,增加#
+## 2.0.9(2021-12-01)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 优化swiper的height支持100%值(仅vue有效),修复嵌入视频时click事件无法触发的问题
+2. 优化tabs组件对list值为空的判断,或者动态变化list时重新计算相关尺寸的问题
+3. 优化datetime-picker组件逻辑,让其后续打开的默认值为上一次的选中值,需要通过v-model绑定值才有效
+4. 修复upload内嵌在其他组件中,选择图片可能不会换行的问题
+## 2.0.8(2021-12-01)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复toast的position参数无效问题
+2. 处理input在ios nvue上无法获得焦点的问题
+3. avatar-group组件添加extraValue参数,让剩余展示数量可手动控制
+4. tabs组件添加keyName参数用于配置从对象中读取的键名
+5. 处理text组件名字脱敏默认配置无效的问题
+6. 处理picker组件item文本太长换行问题
+## 2.0.7(2021-11-30)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复radio和checkbox动态改变v-model无效的问题。
+2. 优化form规则validator在微信小程序用法
+3. 修复backtop组件mode参数在微信小程序无效的问题
+4. 处理Album的previewFullImage属性无效的问题
+5. 处理u-datetime-picker组件mode='time'在选择改变时间时,控制台报错的问题
+## 2.0.6(2021-11-27)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 处理tag组件在vue下边框无效的问题。
+2. 处理popup组件圆角参数可能无效的问题。
+3. 处理tabs组件lineColor参数可能无效的问题。
+4. propgress组件在值很小时,显示异常的问题。
+## 2.0.5(2021-11-25)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. calendar在vue下显示异常问题。 
+2. form组件labelPosition和errorType参数无效的问题
+3. input组件inputAlign无效的问题
+4. 其他一些修复
+## 2.0.4(2021-11-23)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+0. input组件缺失@confirm事件,以及subfix和prefix无效问题
+1. component.scss文件样式在vue下干扰全局布局问题
+2. 修复subsection在vue环境下表现异常的问题
+3. tag组件的bgColor等参数无效的问题
+4. upload组件不换行的问题
+5. 其他的一些修复处理
+## 2.0.3(2021-11-16)
+## [点击加群交流反馈:1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. uView2.0已实现全面兼容nvue
+2. uView2.0对1.x进行了架构重构,细节和性能都有极大提升
+3. 目前uView2.0为公测阶段,相关细节可能会有变动
+4. 我们写了一份与1.x的对比指南,详见[对比1.x](https://www.uviewui.com/components/diff1.x.html)
+5. 处理modal的confirm回调事件拼写错误问题
+6. 处理input组件@input事件参数错误问题
+7. 其他一些修复
+## 2.0.2(2021-11-16)
+## [点击加群交流反馈:1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. uView2.0已实现全面兼容nvue
+2. uView2.0对1.x进行了架构重构,细节和性能都有极大提升
+3. 目前uView2.0为公测阶段,相关细节可能会有变动
+4. 我们写了一份与1.x的对比指南,详见[对比1.x](https://www.uviewui.com/components/diff1.x.html)
+5. 修复input组件formatter参数缺失问题
+6. 优化loading-icon组件的scss写法问题,防止不兼容新版本scss
+## 2.0.0(2020-11-15)
+## [点击加群交流反馈:1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. uView2.0已实现全面兼容nvue
+2. uView2.0对1.x进行了架构重构,细节和性能都有极大提升
+3. 目前uView2.0为公测阶段,相关细节可能会有变动
+4. 我们写了一份与1.x的对比指南,详见[对比1.x](https://www.uviewui.com/components/diff1.x.html)
+5. 修复input组件formatter参数缺失问题
+
+

+ 0 - 0
uni_modules/uview-ui/components/u--form/u--form.vue → node_modules/uview-ui/components/u--form/u--form.vue


+ 0 - 0
uni_modules/uview-ui/components/u--image/u--image.vue → node_modules/uview-ui/components/u--image/u--image.vue


+ 72 - 0
node_modules/uview-ui/components/u--input/u--input.vue

@@ -0,0 +1,72 @@
+<template>
+	<uvInput 
+		:value="value"
+		:type="type"
+		:fixed="fixed"
+		:disabled="disabled"
+		:disabledColor="disabledColor"
+		:clearable="clearable"
+		:password="password"
+		:maxlength="maxlength"
+		:placeholder="placeholder"
+		:placeholderClass="placeholderClass"
+		:placeholderStyle="placeholderStyle"
+		:showWordLimit="showWordLimit"
+		:confirmType="confirmType"
+		:confirmHold="confirmHold"
+		:holdKeyboard="holdKeyboard"
+		:focus="focus"
+		:autoBlur="autoBlur"
+		:disableDefaultPadding="disableDefaultPadding"
+		:cursor="cursor"
+		:cursorSpacing="cursorSpacing"
+		:selectionStart="selectionStart"
+		:selectionEnd="selectionEnd"
+		:adjustPosition="adjustPosition"
+		:inputAlign="inputAlign"
+		:fontSize="fontSize"
+		:color="color"
+		:prefixIcon="prefixIcon"
+		:suffixIcon="suffixIcon"
+		:suffixIconStyle="suffixIconStyle"
+		:prefixIconStyle="prefixIconStyle"
+		:border="border"
+		:readonly="readonly"
+		:shape="shape"
+		:customStyle="customStyle"
+		:formatter="formatter"
+		@focus="$emit('focus')"
+		@blur="$emit('blur')"
+		@keyboardheightchange="$emit('keyboardheightchange')"
+		@change="e => $emit('change', e)"
+		@input="e => $emit('input', e)"
+		@confirm="e => $emit('confirm', e)"
+		@clear="$emit('clear')"
+		@click="$emit('click')"
+	>
+		<!-- #ifdef MP -->
+		<slot name="prefix"></slot>
+		<slot name="suffix"></slot>
+		<!-- #endif -->
+		<!-- #ifndef MP -->
+		<slot name="prefix" slot="prefix"></slot>
+		<slot name="suffix" slot="suffix"></slot>
+		<!-- #endif -->
+	</uvInput>
+</template>
+
+<script>
+	/**
+	 * 此组件存在的理由是,在nvue下,u-input被uni-app官方占用了,u-input在nvue中相当于input组件
+	 * 所以在nvue下,取名为u--input,内部其实还是u-input.vue,只不过做一层中转
+	 */
+	import uvInput from '../u-input/u-input.vue';
+	import props from '../u-input/props.js'
+	export default {
+		name: 'u--input',
+		mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
+		components: {
+			uvInput
+		},
+	}
+</script>

+ 0 - 0
uni_modules/uview-ui/components/u--text/u--text.vue → node_modules/uview-ui/components/u--text/u--text.vue


+ 0 - 0
uni_modules/uview-ui/components/u--textarea/u--textarea.vue → node_modules/uview-ui/components/u--textarea/u--textarea.vue


+ 0 - 0
uni_modules/uview-ui/components/u-action-sheet/props.js → node_modules/uview-ui/components/u-action-sheet/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue → node_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue


+ 0 - 0
uni_modules/uview-ui/components/u-album/props.js → node_modules/uview-ui/components/u-album/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-album/u-album.vue → node_modules/uview-ui/components/u-album/u-album.vue


+ 0 - 0
uni_modules/uview-ui/components/u-alert/props.js → node_modules/uview-ui/components/u-alert/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-alert/u-alert.vue → node_modules/uview-ui/components/u-alert/u-alert.vue


+ 0 - 0
uni_modules/uview-ui/components/u-avatar-group/props.js → node_modules/uview-ui/components/u-avatar-group/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue → node_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue


+ 0 - 0
uni_modules/uview-ui/components/u-avatar/props.js → node_modules/uview-ui/components/u-avatar/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-avatar/u-avatar.vue → node_modules/uview-ui/components/u-avatar/u-avatar.vue


+ 0 - 0
uni_modules/uview-ui/components/u-back-top/props.js → node_modules/uview-ui/components/u-back-top/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-back-top/u-back-top.vue → node_modules/uview-ui/components/u-back-top/u-back-top.vue


+ 0 - 0
uni_modules/uview-ui/components/u-badge/props.js → node_modules/uview-ui/components/u-badge/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-badge/u-badge.vue → node_modules/uview-ui/components/u-badge/u-badge.vue


+ 0 - 0
uni_modules/uview-ui/components/u-button/nvue.scss → node_modules/uview-ui/components/u-button/nvue.scss


+ 0 - 0
uni_modules/uview-ui/components/u-button/props.js → node_modules/uview-ui/components/u-button/props.js


+ 490 - 0
node_modules/uview-ui/components/u-button/u-button.vue

@@ -0,0 +1,490 @@
+<template>
+    <!-- #ifndef APP-NVUE -->
+    <button
+        :hover-start-time="Number(hoverStartTime)"
+        :hover-stay-time="Number(hoverStayTime)"
+        :form-type="formType"
+        :open-type="openType"
+        :app-parameter="appParameter"
+        :hover-stop-propagation="hoverStopPropagation"
+        :send-message-title="sendMessageTitle"
+        :send-message-path="sendMessagePath"
+        :lang="lang"
+        :data-name="dataName"
+        :session-from="sessionFrom"
+        :send-message-img="sendMessageImg"
+        :show-message-card="showMessageCard"
+        @getphonenumber="getphonenumber"
+        @getuserinfo="getuserinfo"
+        @error="error"
+        @opensetting="opensetting"
+        @launchapp="launchapp"
+        :hover-class="!disabled && !loading ? 'u-button--active' : ''"
+        class="u-button u-reset-button"
+        :style="[baseColor, $u.addStyle(customStyle)]"
+        @tap="clickHandler"
+        :class="bemClass"
+    >
+        <template v-if="loading">
+            <u-loading-icon
+                :mode="loadingMode"
+                :size="textSize * 1.15"
+                :color="loadingColor"
+            ></u-loading-icon>
+            <text
+                class="u-button__loading-text"
+                :style="[{ fontSize: textSize + 'px' }]"
+                >{{ loadingText || text }}</text
+            >
+        </template>
+        <template v-else>
+            <u-icon
+                v-if="icon"
+                :name="icon"
+                :color="iconColorCom"
+                :size="textSize * 1.35"
+                :customStyle="{ marginRight: '2px' }"
+            ></u-icon>
+            <slot>
+                <text
+                    class="u-button__text"
+                    :style="[{ fontSize: textSize + 'px' }]"
+                    >{{ text }}</text
+                >
+            </slot>
+        </template>
+    </button>
+    <!-- #endif -->
+
+    <!-- #ifdef APP-NVUE -->
+    <view
+        :hover-start-time="Number(hoverStartTime)"
+        :hover-stay-time="Number(hoverStayTime)"
+        class="u-button"
+        :hover-class="
+            !disabled && !loading && !color && (plain || type === 'info')
+                ? 'u-button--active--plain'
+                : !disabled && !loading && !plain
+                ? 'u-button--active'
+                : ''
+        "
+        @tap="clickHandler"
+        :class="bemClass"
+        :style="[baseColor, $u.addStyle(customStyle)]"
+    >
+        <template v-if="loading">
+            <u-loading-icon
+                :mode="loadingMode"
+                :size="textSize * 1.15"
+                :color="loadingColor"
+            ></u-loading-icon>
+            <text
+                class="u-button__loading-text"
+                :style="[nvueTextStyle]"
+                :class="[plain && `u-button__text--plain--${type}`]"
+                >{{ loadingText || text }}</text
+            >
+        </template>
+        <template v-else>
+            <u-icon
+                v-if="icon"
+                :name="icon"
+                :color="iconColorCom"
+                :size="textSize * 1.35"
+            ></u-icon>
+            <text
+                class="u-button__text"
+                :style="[
+                    {
+                        marginLeft: icon ? '2px' : 0,
+                    },
+                    nvueTextStyle,
+                ]"
+                :class="[plain && `u-button__text--plain--${type}`]"
+                >{{ text }}</text
+            >
+        </template>
+    </view>
+    <!-- #endif -->
+</template>
+
+<script>
+import button from "../../libs/mixin/button.js";
+import openType from "../../libs/mixin/openType.js";
+import props from "./props.js";
+/**
+ * button 按钮
+ * @description Button 按钮
+ * @tutorial https://www.uviewui.com/components/button.html
+ *
+ * @property {Boolean}			hairline				是否显示按钮的细边框 (默认 true )
+ * @property {String}			type					按钮的预置样式,info,primary,error,warning,success (默认 'info' )
+ * @property {String}			size					按钮尺寸,large,normal,mini (默认 normal)
+ * @property {String}			shape					按钮形状,circle(两边为半圆),square(带圆角) (默认 'square' )
+ * @property {Boolean}			plain					按钮是否镂空,背景色透明 (默认 false)
+ * @property {Boolean}			disabled				是否禁用 (默认 false)
+ * @property {Boolean}			loading					按钮名称前是否带 loading 图标(App-nvue 平台,在 ios 上为雪花,Android上为圆圈) (默认 false)
+ * @property {String | Number}	loadingText				加载中提示文字
+ * @property {String}			loadingMode				加载状态图标类型 (默认 'spinner' )
+ * @property {String | Number}	loadingSize				加载图标大小 (默认 15 )
+ * @property {String}			openType				开放能力,具体请看uniapp稳定关于button组件部分说明
+ * @property {String}			formType				用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
+ * @property {String}			appParameter			打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 (注:只微信小程序、QQ小程序有效)
+ * @property {Boolean}			hoverStopPropagation	指定是否阻止本节点的祖先节点出现点击态,微信小程序有效(默认 true )
+ * @property {String}			lang					指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文(默认 en )
+ * @property {String}			sessionFrom				会话来源,openType="contact"时有效
+ * @property {String}			sendMessageTitle		会话内消息卡片标题,openType="contact"时有效
+ * @property {String}			sendMessagePath			会话内消息卡片点击跳转小程序路径,openType="contact"时有效
+ * @property {String}			sendMessageImg			会话内消息卡片图片,openType="contact"时有效
+ * @property {Boolean}			showMessageCard			是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效(默认false)
+ * @property {String}			dataName				额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
+ * @property {String | Number}	throttleTime			节流,一定时间内只能触发一次 (默认 0 )
+ * @property {String | Number}	hoverStartTime			按住后多久出现点击态,单位毫秒 (默认 0 )
+ * @property {String | Number}	hoverStayTime			手指松开后点击态保留时间,单位毫秒 (默认 200 )
+ * @property {String | Number}	text					按钮文字,之所以通过props传入,是因为slot传入的话(注:nvue中无法控制文字的样式)
+ * @property {String}			icon					按钮图标
+ * @property {String}			iconColor				按钮图标颜色
+ * @property {String}			color					按钮颜色,支持传入linear-gradient渐变色
+ * @property {Object}			customStyle				定义需要用到的外部样式
+ *
+ * @event {Function}	click			非禁止并且非加载中,才能点击
+ * @event {Function}	getphonenumber	open-type="getPhoneNumber"时有效
+ * @event {Function}	getuserinfo		用户点击该按钮时,会返回获取到的用户信息,从返回参数的detail中获取到的值同uni.getUserInfo
+ * @event {Function}	error			当使用开放能力时,发生错误的回调
+ * @event {Function}	opensetting		在打开授权设置页并关闭后回调
+ * @event {Function}	launchapp		打开 APP 成功的回调
+ * @example <u-button>月落</u-button>
+ */
+export default {
+    name: "u-button",
+    // #ifdef MP
+    mixins: [uni.$u.mpMixin, uni.$u.mixin, button, openType, props],
+    // #endif
+    // #ifndef MP
+    mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+    // #endif
+    data() {
+        return {};
+    },
+    computed: {
+        // 生成bem风格的类名
+        bemClass() {
+            // this.bem为一个computed变量,在mixin中
+            if (!this.color) {
+                return this.bem(
+                    "button",
+                    ["type", "shape", "size"],
+                    ["disabled", "plain", "hairline"]
+                );
+            } else {
+                // 由于nvue的原因,在有color参数时,不需要传入type,否则会生成type相关的类型,影响最终的样式
+                return this.bem(
+                    "button",
+                    ["shape", "size"],
+                    ["disabled", "plain", "hairline"]
+                );
+            }
+        },
+        loadingColor() {
+            if (this.plain) {
+                // 如果有设置color值,则用color值,否则使用type主题颜色
+                return this.color
+                    ? this.color
+                    : uni.$u.config.color[`u-${this.type}`];
+            }
+            if (this.type === "info") {
+                return "#c9c9c9";
+            }
+            return "rgb(200, 200, 200)";
+        },
+        iconColorCom() {
+            // 如果是镂空状态,设置了color就用color值,否则使用主题颜色,
+            // u-icon的color能接受一个主题颜色的值
+			if (this.iconColor) return this.iconColor;
+			if (this.plain) {
+                return this.color ? this.color : this.type;
+            } else {
+                return this.type === "info" ? "#000000" : "#ffffff";
+            }
+        },
+        baseColor() {
+            let style = {};
+            if (this.color) {
+                // 针对自定义了color颜色的情况,镂空状态下,就是用自定义的颜色
+                style.color = this.plain ? this.color : "white";
+                if (!this.plain) {
+                    // 非镂空,背景色使用自定义的颜色
+                    style["background-color"] = this.color;
+                }
+                if (this.color.indexOf("gradient") !== -1) {
+                    // 如果自定义的颜色为渐变色,不显示边框,以及通过backgroundImage设置渐变色
+                    // weex文档说明可以写borderWidth的形式,为什么这里需要分开写?
+                    // 因为weex是阿里巴巴为了部门业绩考核而做的你懂的东西,所以需要这么写才有效
+                    style.borderTopWidth = 0;
+                    style.borderRightWidth = 0;
+                    style.borderBottomWidth = 0;
+                    style.borderLeftWidth = 0;
+                    if (!this.plain) {
+                        style.backgroundImage = this.color;
+                    }
+                } else {
+                    // 非渐变色,则设置边框相关的属性
+                    style.borderColor = this.color;
+                    style.borderWidth = "1px";
+                    style.borderStyle = "solid";
+                }
+            }
+            return style;
+        },
+        // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
+        nvueTextStyle() {
+            let style = {};
+            // 针对自定义了color颜色的情况,镂空状态下,就是用自定义的颜色
+            if (this.type === "info") {
+                style.color = "#323233";
+            }
+            if (this.color) {
+                style.color = this.plain ? this.color : "white";
+            }
+            style.fontSize = this.textSize + "px";
+            return style;
+        },
+        // 字体大小
+        textSize() {
+            let fontSize = 14,
+                { size } = this;
+            if (size === "large") fontSize = 16;
+            if (size === "normal") fontSize = 14;
+            if (size === "small") fontSize = 12;
+            if (size === "mini") fontSize = 10;
+            return fontSize;
+        },
+    },
+    methods: {
+        clickHandler() {
+            // 非禁止并且非加载中,才能点击
+            if (!this.disabled && !this.loading) {
+				// 进行节流控制,每this.throttle毫秒内,只在开始处执行
+				uni.$u.throttle(() => {
+					this.$emit("click");
+				}, this.throttleTime);
+            }
+        },
+        // 下面为对接uniapp官方按钮开放能力事件回调的对接
+        getphonenumber(res) {
+            this.$emit("getphonenumber", res);
+        },
+        getuserinfo(res) {
+            this.$emit("getuserinfo", res);
+        },
+        error(res) {
+            this.$emit("error", res);
+        },
+        opensetting(res) {
+            this.$emit("opensetting", res);
+        },
+        launchapp(res) {
+            this.$emit("launchapp", res);
+        },
+    },
+};
+</script>
+
+<style lang="scss" scoped>
+@import "../../libs/css/components.scss";
+
+/* #ifndef APP-NVUE */
+@import "./vue.scss";
+/* #endif */
+
+/* #ifdef APP-NVUE */
+@import "./nvue.scss";
+/* #endif */
+
+$u-button-u-button-height: 40px !default;
+$u-button-text-font-size: 15px !default;
+$u-button-loading-text-font-size: 15px !default;
+$u-button-loading-text-margin-left: 4px !default;
+$u-button-large-width: 100% !default;
+$u-button-large-height: 50px !default;
+$u-button-normal-padding: 0 12px !default;
+$u-button-large-padding: 0 15px !default;
+$u-button-normal-font-size: 14px !default;
+$u-button-small-min-width: 60px !default;
+$u-button-small-height: 30px !default;
+$u-button-small-padding: 0px 8px !default;
+$u-button-mini-padding: 0px 8px !default;
+$u-button-small-font-size: 12px !default;
+$u-button-mini-height: 22px !default;
+$u-button-mini-font-size: 10px !default;
+$u-button-mini-min-width: 50px !default;
+$u-button-disabled-opacity: 0.5 !default;
+$u-button-info-color: #323233 !default;
+$u-button-info-background-color: #fff !default;
+$u-button-info-border-color: #ebedf0 !default;
+$u-button-info-border-width: 1px !default;
+$u-button-info-border-style: solid !default;
+$u-button-success-color: #fff !default;
+$u-button-success-background-color: $u-success !default;
+$u-button-success-border-color: $u-button-success-background-color !default;
+$u-button-success-border-width: 1px !default;
+$u-button-success-border-style: solid !default;
+$u-button-primary-color: #fff !default;
+$u-button-primary-background-color: $u-primary !default;
+$u-button-primary-border-color: $u-button-primary-background-color !default;
+$u-button-primary-border-width: 1px !default;
+$u-button-primary-border-style: solid !default;
+$u-button-error-color: #fff !default;
+$u-button-error-background-color: $u-error !default;
+$u-button-error-border-color: $u-button-error-background-color !default;
+$u-button-error-border-width: 1px !default;
+$u-button-error-border-style: solid !default;
+$u-button-warning-color: #fff !default;
+$u-button-warning-background-color: $u-warning !default;
+$u-button-warning-border-color: $u-button-warning-background-color !default;
+$u-button-warning-border-width: 1px !default;
+$u-button-warning-border-style: solid !default;
+$u-button-block-width: 100% !default;
+$u-button-circle-border-top-right-radius: 100px !default;
+$u-button-circle-border-top-left-radius: 100px !default;
+$u-button-circle-border-bottom-left-radius: 100px !default;
+$u-button-circle-border-bottom-right-radius: 100px !default;
+$u-button-square-border-top-right-radius: 3px !default;
+$u-button-square-border-top-left-radius: 3px !default;
+$u-button-square-border-bottom-left-radius: 3px !default;
+$u-button-square-border-bottom-right-radius: 3px !default;
+$u-button-icon-min-width: 1em !default;
+$u-button-plain-background-color: #fff !default;
+$u-button-hairline-border-width: 0.5px !default;
+
+.u-button {
+    height: $u-button-u-button-height;
+    position: relative;
+    align-items: center;
+    justify-content: center;
+    @include flex;
+    /* #ifndef APP-NVUE */
+    box-sizing: border-box;
+    /* #endif */
+    flex-direction: row;
+
+    &__text {
+        font-size: $u-button-text-font-size;
+    }
+
+    &__loading-text {
+        font-size: $u-button-loading-text-font-size;
+        margin-left: $u-button-loading-text-margin-left;
+    }
+
+    &--large {
+        /* #ifndef APP-NVUE */
+        width: $u-button-large-width;
+        /* #endif */
+        height: $u-button-large-height;
+        padding: $u-button-large-padding;
+    }
+
+    &--normal {
+        padding: $u-button-normal-padding;
+        font-size: $u-button-normal-font-size;
+    }
+
+    &--small {
+        /* #ifndef APP-NVUE */
+        min-width: $u-button-small-min-width;
+        /* #endif */
+        height: $u-button-small-height;
+        padding: $u-button-small-padding;
+        font-size: $u-button-small-font-size;
+    }
+
+    &--mini {
+        height: $u-button-mini-height;
+        font-size: $u-button-mini-font-size;
+        /* #ifndef APP-NVUE */
+        min-width: $u-button-mini-min-width;
+        /* #endif */
+        padding: $u-button-mini-padding;
+    }
+
+    &--disabled {
+        opacity: $u-button-disabled-opacity;
+    }
+
+    &--info {
+        color: $u-button-info-color;
+        background-color: $u-button-info-background-color;
+        border-color: $u-button-info-border-color;
+        border-width: $u-button-info-border-width;
+        border-style: $u-button-info-border-style;
+    }
+
+    &--success {
+        color: $u-button-success-color;
+        background-color: $u-button-success-background-color;
+        border-color: $u-button-success-border-color;
+        border-width: $u-button-success-border-width;
+        border-style: $u-button-success-border-style;
+    }
+
+    &--primary {
+        color: $u-button-primary-color;
+        background-color: $u-button-primary-background-color;
+        border-color: $u-button-primary-border-color;
+        border-width: $u-button-primary-border-width;
+        border-style: $u-button-primary-border-style;
+    }
+
+    &--error {
+        color: $u-button-error-color;
+        background-color: $u-button-error-background-color;
+        border-color: $u-button-error-border-color;
+        border-width: $u-button-error-border-width;
+        border-style: $u-button-error-border-style;
+    }
+
+    &--warning {
+        color: $u-button-warning-color;
+        background-color: $u-button-warning-background-color;
+        border-color: $u-button-warning-border-color;
+        border-width: $u-button-warning-border-width;
+        border-style: $u-button-warning-border-style;
+    }
+
+    &--block {
+        @include flex;
+        width: $u-button-block-width;
+    }
+
+    &--circle {
+        border-top-right-radius: $u-button-circle-border-top-right-radius;
+        border-top-left-radius: $u-button-circle-border-top-left-radius;
+        border-bottom-left-radius: $u-button-circle-border-bottom-left-radius;
+        border-bottom-right-radius: $u-button-circle-border-bottom-right-radius;
+    }
+
+    &--square {
+        border-bottom-left-radius: $u-button-square-border-top-right-radius;
+        border-bottom-right-radius: $u-button-square-border-top-left-radius;
+        border-top-left-radius: $u-button-square-border-bottom-left-radius;
+        border-top-right-radius: $u-button-square-border-bottom-right-radius;
+    }
+
+    &__icon {
+        /* #ifndef APP-NVUE */
+        min-width: $u-button-icon-min-width;
+        line-height: inherit !important;
+        vertical-align: top;
+        /* #endif */
+    }
+
+    &--plain {
+        background-color: $u-button-plain-background-color;
+    }
+
+    &--hairline {
+        border-width: $u-button-hairline-border-width !important;
+    }
+}
+</style>

+ 0 - 0
uni_modules/uview-ui/components/u-button/vue.scss → node_modules/uview-ui/components/u-button/vue.scss


+ 0 - 0
uni_modules/uview-ui/components/u-calendar/header.vue → node_modules/uview-ui/components/u-calendar/header.vue


+ 0 - 0
uni_modules/uview-ui/components/u-calendar/month.vue → node_modules/uview-ui/components/u-calendar/month.vue


+ 0 - 0
uni_modules/uview-ui/components/u-calendar/props.js → node_modules/uview-ui/components/u-calendar/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-calendar/u-calendar.vue → node_modules/uview-ui/components/u-calendar/u-calendar.vue


+ 0 - 0
uni_modules/uview-ui/components/u-calendar/util.js → node_modules/uview-ui/components/u-calendar/util.js


+ 0 - 0
uni_modules/uview-ui/components/u-car-keyboard/props.js → node_modules/uview-ui/components/u-car-keyboard/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue → node_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue


+ 0 - 0
uni_modules/uview-ui/components/u-cell-group/props.js → node_modules/uview-ui/components/u-cell-group/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-cell-group/u-cell-group.vue → node_modules/uview-ui/components/u-cell-group/u-cell-group.vue


+ 0 - 0
uni_modules/uview-ui/components/u-cell/props.js → node_modules/uview-ui/components/u-cell/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-cell/u-cell.vue → node_modules/uview-ui/components/u-cell/u-cell.vue


+ 0 - 0
uni_modules/uview-ui/components/u-checkbox-group/props.js → node_modules/uview-ui/components/u-checkbox-group/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue → node_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue


+ 0 - 0
uni_modules/uview-ui/components/u-checkbox/props.js → node_modules/uview-ui/components/u-checkbox/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue → node_modules/uview-ui/components/u-checkbox/u-checkbox.vue


+ 0 - 0
uni_modules/uview-ui/components/u-circle-progress/props.js → node_modules/uview-ui/components/u-circle-progress/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue → node_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue


+ 74 - 0
node_modules/uview-ui/components/u-code-input/props.js

@@ -0,0 +1,74 @@
+export default {
+    props: {
+        // 最大输入长度
+        maxlength: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.maxlength
+        },
+        // 是否用圆点填充
+        dot: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.dot
+        },
+        // 显示模式,box-盒子模式,line-底部横线模式
+        mode: {
+            type: String,
+            default: uni.$u.props.codeInput.mode
+        },
+        // 是否细边框
+        hairline: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.hairline
+        },
+        // 字符间的距离
+        space: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.space
+        },
+        // 预置值
+        value: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.value
+        },
+        // 是否自动获取焦点
+        focus: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.focus
+        },
+        // 字体是否加粗
+        bold: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.bold
+        },
+        // 字体颜色
+        color: {
+            type: String,
+            default: uni.$u.props.codeInput.color
+        },
+        // 字体大小
+        fontSize: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.fontSize
+        },
+        // 输入框的大小,宽等于高
+        size: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.size
+        },
+        // 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true
+        disabledKeyboard: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.disabledKeyboard
+        },
+        // 边框和线条颜色
+        borderColor: {
+            type: String,
+            default: uni.$u.props.codeInput.borderColor
+        },
+		// 是否禁止输入"."符号
+		disabledDot: {
+			type: Boolean,
+			default: uni.$u.props.codeInput.disabledDot
+		}
+    }
+}

+ 251 - 0
node_modules/uview-ui/components/u-code-input/u-code-input.vue

@@ -0,0 +1,251 @@
+<template>
+	<view class="u-code-input">
+		<view
+			class="u-code-input__item"
+			:style="[itemStyle(index)]"
+			v-for="(item, index) in codeLength"
+			:key="index"
+		>
+			<view
+				class="u-code-input__item__dot"
+				v-if="dot && codeArray.length > index"
+			></view>
+			<text
+				v-else
+				:style="{
+					fontSize: $u.addUnit(fontSize),
+					fontWeight: bold ? 'bold' : 'normal',
+					color: color
+				}"
+			>{{codeArray[index]}}</text>
+			<view
+				class="u-code-input__item__line"
+				v-if="mode === 'line'"
+				:style="[lineStyle]"
+			></view>
+			<!-- #ifndef APP-PLUS -->
+			<view v-if="isFocus && codeArray.length === index" :style="{backgroundColor: color}" class="u-code-input__item__cursor"></view>
+			<!-- #endif -->
+		</view>
+		<input
+			:disabled="disabledKeyboard"
+			type="number"
+			:focus="focus"
+			:value="inputValue"
+			:maxlength="maxlength"
+			class="u-code-input__input"
+			@input="inputHandler"
+			:style="{
+				height: $u.addUnit(size) 
+			}"
+			@focus="isFocus = true"
+			@blur="isFocus = false"
+		/>
+	</view>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * CodeInput 验证码输入
+	 * @description 该组件一般用于验证用户短信验证码的场景,也可以结合uView的键盘组件使用
+	 * @tutorial https://www.uviewui.com/components/codeInput.html
+	 * @property {String | Number}	maxlength			最大输入长度 (默认 6 )
+	 * @property {Boolean}			dot					是否用圆点填充 (默认 false )
+	 * @property {String}			mode				显示模式,box-盒子模式,line-底部横线模式 (默认 'box' )
+	 * @property {Boolean}			hairline			是否细边框 (默认 false )
+	 * @property {String | Number}	space				字符间的距离 (默认 10 )
+	 * @property {String | Number}	value				预置值
+	 * @property {Boolean}			focus				是否自动获取焦点 (默认 false )
+	 * @property {Boolean}			bold				字体和输入横线是否加粗 (默认 false )
+	 * @property {String}			color				字体颜色 (默认 '#606266' )
+	 * @property {String | Number}	fontSize			字体大小,单位px (默认 18 )
+	 * @property {String | Number}	size				输入框的大小,宽等于高 (默认 35 )
+	 * @property {Boolean}			disabledKeyboard	是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true (默认 false )
+	 * @property {String}			borderColor			边框和线条颜色 (默认 '#c9cacc' )
+	 * @property {Boolean}			disabledDot			是否禁止输入"."符号 (默认 true )
+	 * 
+	 * @event {Function}	change	输入内容发生改变时触发,具体见上方说明			value:当前输入的值
+	 * @event {Function}	finish	输入字符个数达maxlength值时触发,见上方说明	value:当前输入的值
+	 * @example	<u-code-input v-model="value4" :focus="true"></u-code-input>
+	 */
+	export default {
+		name: 'u-code-input',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+		data() {
+			return {
+				inputValue: '',
+				isFocus: this.focus
+			}
+		},
+		watch: {
+			value: {
+				immediate: true,
+				handler(val) {
+					// 转为字符串,超出部分截掉
+					this.inputValue = String(val).substring(0, this.maxlength)
+				}
+			},
+		},
+		computed: {
+			// 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for
+			codeLength() {
+				return new Array(Number(this.maxlength))
+			},
+			// 循环item的样式
+			itemStyle() {
+				return index => {
+					const addUnit = uni.$u.addUnit
+					const style = {
+						width: addUnit(this.size),
+						height: addUnit(this.size)
+					}
+					// 盒子模式下,需要额外进行处理
+					if (this.mode === 'box') {
+						// 设置盒子的边框,如果是细边框,则设置为0.5px宽度
+						style.border = `${this.hairline ? 0.5 : 1}px solid ${this.borderColor}`
+						// 如果盒子间距为0的话
+						if (uni.$u.getPx(this.space) === 0) {
+							// 给第一和最后一个盒子设置圆角
+							if (index === 0) {
+								style.borderTopLeftRadius = '3px'
+								style.borderBottomLeftRadius = '3px'
+							}
+							if (index === this.codeLength.length - 1) {
+								style.borderTopRightRadius = '3px'
+								style.borderBottomRightRadius = '3px'
+							}
+							// 最后一个盒子的右边框需要保留
+							if (index !== this.codeLength.length - 1) {
+								style.borderRight = 'none'
+							}
+						}
+					}
+					if (index !== this.codeLength.length - 1) {
+						// 设置验证码字符之间的距离,通过margin-right设置,最后一个字符,无需右边框
+						style.marginRight = addUnit(this.space)
+					} else {
+						// 最后一个盒子的有边框需要保留
+						style.marginRight = 0
+					}
+
+					return style
+				}
+			},
+			// 将输入的值,转为数组,给item历遍时,根据当前的索引显示数组的元素
+			codeArray() {
+				return String(this.inputValue).split('')
+			},
+			// 下划线模式下,横线的样式
+			lineStyle() {
+				const style = {}
+				style.height = this.hairline ? '2px' : '4px'
+				style.width = uni.$u.addUnit(this.size)
+				// 线条模式下,背景色即为边框颜色
+				style.backgroundColor = this.borderColor
+				return style
+			}
+		},
+		methods: {
+			// 监听输入框的值发生变化
+			inputHandler(e) {
+				const value = e.detail.value
+				this.inputValue = value
+				// 是否允许输入“.”符号
+				if(this.disabledDot) {
+					this.$nextTick(() => {
+						this.inputValue = value.replace('.', '')
+					})
+				}
+				// 未达到maxlength之前,发送change事件,达到后发送finish事件
+				this.$emit('change', value)
+				// 修改通过v-model双向绑定的值
+				this.$emit('input', value)
+				// 达到用户指定输入长度时,发出完成事件
+				if (String(value).length >= Number(this.maxlength)) {
+					this.$emit('finish', value)
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+	$u-code-input-cursor-width: 1px;
+	$u-code-input-cursor-height: 40%;
+	$u-code-input-cursor-animation-duration: 1s;
+	$u-code-input-cursor-animation-name: u-cursor-flicker;
+
+	.u-code-input {
+		@include flex;
+		position: relative;
+		overflow: hidden;
+
+		&__item {
+			@include flex;
+			justify-content: center;
+			align-items: center;
+			position: relative;
+
+			&__text {
+				font-size: 15px;
+				color: $u-content-color;
+			}
+
+			&__dot {
+				width: 7px;
+				height: 7px;
+				border-radius: 100px;
+				background-color: $u-content-color;
+			}
+
+			&__line {
+				position: absolute;
+				bottom: 0;
+				height: 4px;
+				border-radius: 100px;
+				width: 40px;
+				background-color: $u-content-color;
+			}
+			/* #ifndef APP-PLUS */
+			&__cursor {
+				position: absolute;
+				top: 50%;
+				left: 50%;
+				transform: translate(-50%,-50%);
+				width: $u-code-input-cursor-width;
+				height: $u-code-input-cursor-height;
+				animation: $u-code-input-cursor-animation-duration u-cursor-flicker infinite;
+			}
+			/* #endif */
+			
+		}
+
+		&__input {
+			// 之所以需要input输入框,是因为有它才能唤起键盘
+			// 这里将它设置为两倍的屏幕宽度,再将左边的一半移出屏幕,为了不让用户看到输入的内容
+			position: absolute;
+			left: -750rpx;
+			width: 1500rpx;
+			top: 0;
+			background-color: transparent;
+			text-align: left;
+		}
+	}
+	
+	/* #ifndef APP-PLUS */
+	@keyframes u-cursor-flicker {
+		0% {
+		    opacity: 0;
+		}
+		50% {
+		    opacity: 1;
+		}
+		100% {
+		    opacity: 0;
+		}
+	}
+	/* #endif */
+
+</style>

+ 0 - 0
uni_modules/uview-ui/components/u-code/props.js → node_modules/uview-ui/components/u-code/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-code/u-code.vue → node_modules/uview-ui/components/u-code/u-code.vue


+ 0 - 0
uni_modules/uview-ui/components/u-col/props.js → node_modules/uview-ui/components/u-col/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-col/u-col.vue → node_modules/uview-ui/components/u-col/u-col.vue


+ 0 - 0
uni_modules/uview-ui/components/u-collapse-item/props.js → node_modules/uview-ui/components/u-collapse-item/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue → node_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue


+ 0 - 0
uni_modules/uview-ui/components/u-collapse/props.js → node_modules/uview-ui/components/u-collapse/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-collapse/u-collapse.vue → node_modules/uview-ui/components/u-collapse/u-collapse.vue


+ 0 - 0
uni_modules/uview-ui/components/u-column-notice/props.js → node_modules/uview-ui/components/u-column-notice/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-column-notice/u-column-notice.vue → node_modules/uview-ui/components/u-column-notice/u-column-notice.vue


+ 0 - 0
uni_modules/uview-ui/components/u-count-down/props.js → node_modules/uview-ui/components/u-count-down/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-count-down/u-count-down.vue → node_modules/uview-ui/components/u-count-down/u-count-down.vue


+ 0 - 0
uni_modules/uview-ui/components/u-count-down/utils.js → node_modules/uview-ui/components/u-count-down/utils.js


+ 0 - 0
uni_modules/uview-ui/components/u-count-to/props.js → node_modules/uview-ui/components/u-count-to/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-count-to/u-count-to.vue → node_modules/uview-ui/components/u-count-to/u-count-to.vue


+ 0 - 0
uni_modules/uview-ui/components/u-datetime-picker/props.js → node_modules/uview-ui/components/u-datetime-picker/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-datetime-picker/u-datetime-picker.vue → node_modules/uview-ui/components/u-datetime-picker/u-datetime-picker.vue


+ 0 - 0
uni_modules/uview-ui/components/u-divider/props.js → node_modules/uview-ui/components/u-divider/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-divider/u-divider.vue → node_modules/uview-ui/components/u-divider/u-divider.vue


+ 0 - 0
uni_modules/uview-ui/components/u-dropdown-item/props.js → node_modules/uview-ui/components/u-dropdown-item/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-dropdown-item/u-dropdown-item.vue → node_modules/uview-ui/components/u-dropdown-item/u-dropdown-item.vue


+ 0 - 0
uni_modules/uview-ui/components/u-dropdown/props.js → node_modules/uview-ui/components/u-dropdown/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-dropdown/u-dropdown.vue → node_modules/uview-ui/components/u-dropdown/u-dropdown.vue


+ 0 - 0
uni_modules/uview-ui/components/u-empty/props.js → node_modules/uview-ui/components/u-empty/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-empty/u-empty.vue → node_modules/uview-ui/components/u-empty/u-empty.vue


+ 0 - 0
uni_modules/uview-ui/components/u-form-item/props.js → node_modules/uview-ui/components/u-form-item/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-form-item/u-form-item.vue → node_modules/uview-ui/components/u-form-item/u-form-item.vue


+ 0 - 0
uni_modules/uview-ui/components/u-form/props.js → node_modules/uview-ui/components/u-form/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-form/u-form.vue → node_modules/uview-ui/components/u-form/u-form.vue


+ 0 - 0
uni_modules/uview-ui/components/u-gap/props.js → node_modules/uview-ui/components/u-gap/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-gap/u-gap.vue → node_modules/uview-ui/components/u-gap/u-gap.vue


+ 0 - 0
uni_modules/uview-ui/components/u-grid-item/props.js → node_modules/uview-ui/components/u-grid-item/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-grid-item/u-grid-item.vue → node_modules/uview-ui/components/u-grid-item/u-grid-item.vue


+ 0 - 0
uni_modules/uview-ui/components/u-grid/props.js → node_modules/uview-ui/components/u-grid/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-grid/u-grid.vue → node_modules/uview-ui/components/u-grid/u-grid.vue


+ 0 - 0
uni_modules/uview-ui/components/u-icon/icons.js → node_modules/uview-ui/components/u-icon/icons.js


+ 0 - 0
uni_modules/uview-ui/components/u-icon/props.js → node_modules/uview-ui/components/u-icon/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-icon/u-icon.vue → node_modules/uview-ui/components/u-icon/u-icon.vue


+ 0 - 0
uni_modules/uview-ui/components/u-image/props.js → node_modules/uview-ui/components/u-image/props.js


+ 232 - 0
node_modules/uview-ui/components/u-image/u-image.vue

@@ -0,0 +1,232 @@
+<template>
+	<u-transition
+		mode="fade"
+		:show="show"
+		:duration="fade ? 1000 : 0"
+	>
+		<view
+			class="u-image"
+			@tap="onClick"
+			:style="[wrapStyle, backgroundStyle]"
+		>
+			<image
+				v-if="!isError"
+				:src="src"
+				:mode="mode"
+				@error="onErrorHandler"
+				@load="onLoadHandler"
+				:show-menu-by-longpress="showMenuByLongpress"
+				:lazy-load="lazyLoad"
+				class="u-image__image"
+				:style="{
+					borderRadius: shape == 'circle' ? '10000px' : $u.addUnit(radius),
+					width: $u.addUnit(width),
+					height: $u.addUnit(height)
+				}"
+			></image>
+			<view
+				v-if="showLoading && loading"
+				class="u-image__loading"
+				:style="{
+					borderRadius: shape == 'circle' ? '50%' : $u.addUnit(radius),
+					backgroundColor: this.bgColor,
+					width: $u.addUnit(width),
+					height: $u.addUnit(height)
+				}"
+			>
+				<slot name="loading">
+					<u-icon
+						:name="loadingIcon"
+						:width="width"
+						:height="height"
+					></u-icon>
+				</slot>
+			</view>
+			<view
+				v-if="showError && isError && !loading"
+				class="u-image__error"
+				:style="{
+					borderRadius: shape == 'circle' ? '50%' : $u.addUnit(radius),
+					width: $u.addUnit(width),
+					height: $u.addUnit(height)
+				}"
+			>
+				<slot name="error">
+					<u-icon
+						:name="errorIcon"
+						:width="width"
+						:height="height"
+					></u-icon>
+				</slot>
+			</view>
+		</view>
+	</u-transition>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * Image 图片
+	 * @description 此组件为uni-app的image组件的加强版,在继承了原有功能外,还支持淡入动画、加载中、加载失败提示、圆角值和形状等。
+	 * @tutorial https://uviewui.com/components/image.html
+	 * @property {String}			src 				图片地址
+	 * @property {String}			mode 				裁剪模式,见官网说明 (默认 'aspectFill' )
+	 * @property {String | Number}	width 				宽度,单位任意,如果为数值,则为px单位 (默认 '300' )
+	 * @property {String | Number}	height 				高度,单位任意,如果为数值,则为px单位 (默认 '225' )
+	 * @property {String}			shape 				图片形状,circle-圆形,square-方形 (默认 'square' )
+	 * @property {String | Number}	radius		 		圆角值,单位任意,如果为数值,则为px单位 (默认 0 )
+	 * @property {Boolean}			lazyLoad			是否懒加载,仅微信小程序、App、百度小程序、字节跳动小程序有效 (默认 true )
+	 * @property {Boolean}			showMenuByLongpress	是否开启长按图片显示识别小程序码菜单,仅微信小程序有效 (默认 true )
+	 * @property {String}			loadingIcon 		加载中的图标,或者小图片 (默认 'photo' )
+	 * @property {String}			errorIcon 			加载失败的图标,或者小图片 (默认 'error-circle' )
+	 * @property {Boolean}			showLoading 		是否显示加载中的图标或者自定义的slot (默认 true )
+	 * @property {Boolean}			showError 			是否显示加载错误的图标或者自定义的slot (默认 true )
+	 * @property {Boolean}			fade 				是否需要淡入效果 (默认 true )
+	 * @property {Boolean}			webp 				只支持网络资源,只对微信小程序有效 (默认 false )
+	 * @property {String | Number}	duration 			搭配fade参数的过渡时间,单位ms (默认 500 )
+	 * @property {String}			bgColor 			背景颜色,用于深色页面加载图片时,为了和背景色融合  (默认 '#f3f4f6' )
+	 * @property {Object}			customStyle  		定义需要用到的外部样式
+	 * @event {Function}	click	点击图片时触发
+	 * @event {Function}	error	图片加载失败时触发
+	 * @event {Function} load 图片加载成功时触发
+	 * @example <u-image width="100%" height="300px" :src="src"></u-image>
+	 */
+	export default {
+		name: 'u-image',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+		data() {
+			return {
+				// 图片是否加载错误,如果是,则显示错误占位图
+				isError: false,
+				// 初始化组件时,默认为加载中状态
+				loading: true,
+				// 不透明度,为了实现淡入淡出的效果
+				opacity: 1,
+				// 过渡时间,因为props的值无法修改,故需要一个中间值
+				durationTime: this.duration,
+				// 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
+				backgroundStyle: {},
+				// 用于fade模式的控制组件显示与否
+				show: false
+			};
+		},
+		watch: {
+			src: {
+				immediate: true,
+				handler(n) {
+					if (!n) {
+						// 如果传入null或者'',或者false,或者undefined,标记为错误状态
+						this.isError = true
+						
+					} else {
+						this.isError = false;
+						this.loading = true;
+					}
+				}
+			}
+		},
+		computed: {
+			wrapStyle() {
+				let style = {};
+				// 通过调用addUnit()方法,如果有单位,如百分比,px单位等,直接返回,如果是纯粹的数值,则加上rpx单位
+				style.width = this.$u.addUnit(this.width);
+				style.height = this.$u.addUnit(this.height);
+				// 如果是显示圆形,设置一个很多的半径值即可
+				style.borderRadius = this.shape == 'circle' ? '10000px' : uni.$u.addUnit(this.radius)
+				// 如果设置圆角,必须要有hidden,否则可能圆角无效
+				style.overflow = this.borderRadius > 0 ? 'hidden' : 'visible'
+				// if (this.fade) {
+				// 	style.opacity = this.opacity
+				// 	// nvue下,这几个属性必须要分开写
+				// 	style.transitionDuration = `${this.durationTime}ms`
+				// 	style.transitionTimingFunction = 'ease-in-out'
+				// 	style.transitionProperty = 'opacity'
+				// }
+				return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
+
+			}
+		},
+		mounted() {
+			this.show = true
+		},
+		methods: {
+			// 点击图片
+			onClick() {
+				this.$emit('click')
+			},
+			// 图片加载失败
+			onErrorHandler(err) {
+				this.loading = false
+				this.isError = true
+				this.$emit('error', err)
+			},
+			// 图片加载完成,标记loading结束
+			onLoadHandler() {
+				this.loading = false
+				this.isError = false
+				this.$emit('load')
+				this.removeBgColor()
+				// 如果不需要动画效果,就不执行下方代码,同时移除加载时的背景颜色
+				// 否则无需fade效果时,png图片依然能看到下方的背景色
+				// if (!this.fade) return this.removeBgColor();
+				// // 原来opacity为1(不透明,是为了显示占位图),改成0(透明,意味着该元素显示的是背景颜色,默认的灰色),再改成1,是为了获得过渡效果
+				// this.opacity = 0;
+				// // 这里设置为0,是为了图片展示到背景全透明这个过程时间为0,延时之后延时之后重新设置为duration,是为了获得背景透明(灰色)
+				// // 到图片展示的过程中的淡入效果
+				// this.durationTime = 0;
+				// // 延时50ms,否则在浏览器H5,过渡效果无效
+				// setTimeout(() => {
+				// 	this.durationTime = this.duration;
+				// 	this.opacity = 1;
+				// 	setTimeout(() => {
+				// 		this.removeBgColor();
+				// 	}, this.durationTime);
+				// }, 50);
+			},
+			// 移除图片的背景色
+			removeBgColor() {
+				// 淡入动画过渡完成后,将背景设置为透明色,否则png图片会看到灰色的背景
+				this.backgroundStyle = {
+					backgroundColor: 'transparent'
+				};
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	@import '../../libs/css/components.scss';
+
+	$u-image-error-top:0px !default;
+	$u-image-error-left:0px !default;
+	$u-image-error-width:100% !default;
+	$u-image-error-hight:100% !default;
+	$u-image-error-background-color:$u-bg-color !default;
+	$u-image-error-color:$u-tips-color !default;
+	$u-image-error-font-size: 46rpx !default;
+
+	.u-image {
+		position: relative;
+		transition: opacity 0.5s ease-in-out;
+
+		&__image {
+			width: 100%;
+			height: 100%;
+		}
+
+		&__loading,
+		&__error {
+			position: absolute;
+			top: $u-image-error-top;
+			left: $u-image-error-left;
+			width: $u-image-error-width;
+			height: $u-image-error-hight;
+			@include flex;
+			align-items: center;
+			justify-content: center;
+			background-color: $u-image-error-background-color;
+			color: $u-image-error-color;
+			font-size: $u-image-error-font-size;
+		}
+	}
+</style>

+ 0 - 0
uni_modules/uview-ui/components/u-index-anchor/props.js → node_modules/uview-ui/components/u-index-anchor/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-index-anchor/u-index-anchor.vue → node_modules/uview-ui/components/u-index-anchor/u-index-anchor.vue


+ 0 - 0
uni_modules/uview-ui/components/u-index-item/props.js → node_modules/uview-ui/components/u-index-item/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-index-item/u-index-item.vue → node_modules/uview-ui/components/u-index-item/u-index-item.vue


+ 0 - 0
uni_modules/uview-ui/components/u-index-list/props.js → node_modules/uview-ui/components/u-index-list/props.js


+ 0 - 0
uni_modules/uview-ui/components/u-index-list/u-index-list.vue → node_modules/uview-ui/components/u-index-list/u-index-list.vue


+ 0 - 0
uni_modules/uview-ui/components/u-input/props.js → node_modules/uview-ui/components/u-input/props.js


Some files were not shown because too many files changed in this diff