panhui 4 tahun lalu
induk
melakukan
01621a7eff
51 mengubah file dengan 633 tambahan dan 1114 penghapusan
  1. 24 18
      App.vue
  2. 13 7
      main.js
  3. 4 8
      manifest.json
  4. 18 782
      pages.json
  5. 298 0
      pages/Home.vue
  6. 178 0
      plugins/http.js
  7. TEMPAT SAMPAH
      static/uview/imgs/info_icon_01.png
  8. TEMPAT SAMPAH
      static/uview/imgs/info_icon_02.png
  9. TEMPAT SAMPAH
      static/uview/imgs/info_icon_03.png
  10. TEMPAT SAMPAH
      static/uview/imgs/info_icon_04.png
  11. TEMPAT SAMPAH
      static/uview/imgs/info_icon_05.png
  12. TEMPAT SAMPAH
      static/uview/imgs/info_icon_06.png
  13. TEMPAT SAMPAH
      static/uview/imgs/info_icon_collect@3x(1).png
  14. TEMPAT SAMPAH
      static/uview/imgs/info_icon_collect@3x(2).png
  15. TEMPAT SAMPAH
      static/uview/imgs/info_icon_collect@3x(3).png
  16. TEMPAT SAMPAH
      static/uview/imgs/info_icon_collect@3x.png
  17. TEMPAT SAMPAH
      static/uview/imgs/tabbar_icon_01.png
  18. TEMPAT SAMPAH
      static/uview/imgs/tabbar_icon_01_pre.png
  19. TEMPAT SAMPAH
      static/uview/imgs/tabbar_icon_02.png
  20. TEMPAT SAMPAH
      static/uview/imgs/tabbar_icon_02_pre.png
  21. TEMPAT SAMPAH
      static/uview/imgs/tabbar_icon_03.png
  22. TEMPAT SAMPAH
      static/uview/imgs/tabbar_icon_03_pre.png
  23. 0 27
      store/$u.mixin.js
  24. 63 85
      store/index.js
  25. 5 1
      uni.scss
  26. 0 0
      unpackage/dist/dev/app-plus/app-config-service.js
  27. 0 0
      unpackage/dist/dev/app-plus/app-service.js
  28. 26 133
      unpackage/dist/dev/app-plus/app-view.js
  29. 0 0
      unpackage/dist/dev/app-plus/manifest.json
  30. 0 10
      unpackage/dist/dev/app-plus/pages/componentsA/app-sub-service.js
  31. 0 10
      unpackage/dist/dev/app-plus/pages/componentsB/app-sub-service.js
  32. 0 9
      unpackage/dist/dev/app-plus/pages/componentsC/app-sub-service.js
  33. 0 10
      unpackage/dist/dev/app-plus/pages/library/app-sub-service.js
  34. 0 10
      unpackage/dist/dev/app-plus/pages/template/app-sub-service.js
  35. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_01.png
  36. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_02.png
  37. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_03.png
  38. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_04.png
  39. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_05.png
  40. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_06.png
  41. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_collect@3x(1).png
  42. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_collect@3x(2).png
  43. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_collect@3x(3).png
  44. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_collect@3x.png
  45. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_01.png
  46. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_01_pre.png
  47. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_02.png
  48. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_02_pre.png
  49. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_03.png
  50. TEMPAT SAMPAH
      unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_03_pre.png
  51. 4 4
      uview-ui/theme.scss

+ 24 - 18
App.vue

@@ -1,23 +1,29 @@
 <script>
 <script>
-	export default {
-		// 此处globalData为了演示其作用,不是uView框架的一部分
-		globalData: {
-			username: '白居易'
-		},
-		onLaunch() {
-			// 1.1.0版本之前关于http拦截器代码,已平滑移动到/common/http.interceptor.js中
-			// 注意,需要在/main.js中实例化Vue之后引入如下(详见文档说明):
-			// import httpInterceptor from '@/common/http.interceptor.js'
-			// Vue.use(httpInterceptor, app)
-			// process.env.VUE_APP_PLATFORM 为通过js判断平台名称的方法,结果分别如下:
-			/**
-			 * h5,app-plus(nvue下也为app-plus),mp-weixin,mp-alipay......
-			 */
-		},
+export default {
+	// 此处globalData为了演示其作用,不是uView框架的一部分
+	globalData: {
+		username: '白居易'
+	},
+	onLaunch() {
+		this.$store.dispatch('getUserInfo').then(res=>{
+			console.log(res)
+		}).catch(e=>{
+			console.log('未登录')
+		});
+		uni.getSystemInfo({
+			success:res=>{
+				console.log(res)
+				this.$store.commit('setSystemInfo', res);
+			}
+		})
 	}
 	}
+};
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-	@import "uview-ui/index.scss";
-	@import "common/demo.scss";
-</style>
+@import 'uview-ui/index.scss';
+@import 'common/demo.scss';
+.container {
+	min-height: 100vh;
+}
+</style>

+ 13 - 7
main.js

@@ -1,5 +1,7 @@
 import Vue from 'vue';
 import Vue from 'vue';
 import App from './App';
 import App from './App';
+import http from './plugins/http';
+import Vuex from 'vuex';
 
 
 Vue.config.productionTip = false;
 Vue.config.productionTip = false;
 
 
@@ -8,17 +10,21 @@ App.mpType = 'app';
 // 此处为演示Vue.prototype使用,非uView的功能部分
 // 此处为演示Vue.prototype使用,非uView的功能部分
 Vue.prototype.vuePrototype = '枣红';
 Vue.prototype.vuePrototype = '枣红';
 
 
+
+Vue.use(http);
+Vue.use(Vuex);
+
+Vue.prototype.$colors = {
+	prim: '#214BBE'
+};
+
 // 引入全局uView
 // 引入全局uView
 import uView from 'uview-ui';
 import uView from 'uview-ui';
 Vue.use(uView);
 Vue.use(uView);
 
 
 // 此处为演示vuex使用,非uView的功能部分
 // 此处为演示vuex使用,非uView的功能部分
-import store from '@/store';
-
-// 引入uView提供的对vuex的简写法文件
-let vuexStore = require('@/store/$u.mixin.js');
-Vue.mixin(vuexStore);
-
+const store = require('./store').default;
+Vue.prototype.$store = store;
 // 引入uView对小程序分享的mixin封装
 // 引入uView对小程序分享的mixin封装
 let mpShare = require('uview-ui/libs/mixin/mpShare.js');
 let mpShare = require('uview-ui/libs/mixin/mpShare.js');
 Vue.mixin(mpShare);
 Vue.mixin(mpShare);
@@ -61,4 +67,4 @@ Vue.use(httpInterceptor, app);
 import httpApi from '@/common/http.api.js';
 import httpApi from '@/common/http.api.js';
 Vue.use(httpApi, app);
 Vue.use(httpApi, app);
 
 
-app.$mount();
+app.$mount();

+ 4 - 8
manifest.json

@@ -25,24 +25,20 @@
         "nvueCompiler" : "uni-app",
         "nvueCompiler" : "uni-app",
         "compilerVersion" : 3,
         "compilerVersion" : 3,
         "modules" : {
         "modules" : {
-            "LivePusher" : {},
             "Geolocation" : {},
             "Geolocation" : {},
-            "Maps" : {}
+            "Maps" : {},
+            "Push" : {}
         },
         },
         "distribute" : {
         "distribute" : {
             "android" : {
             "android" : {
                 "permissions" : [
                 "permissions" : [
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
                     "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
                     "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
                     "<uses-permission android:name=\"android.permission.INTERNET\"/>",
                     "<uses-permission android:name=\"android.permission.INTERNET\"/>",
                     "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
                     "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
@@ -50,7 +46,6 @@
                     "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
@@ -74,7 +69,8 @@
                         "appkey_ios" : "eddad1cae03692114915a58285174177",
                         "appkey_ios" : "eddad1cae03692114915a58285174177",
                         "appkey_android" : "eddad1cae03692114915a58285174177"
                         "appkey_android" : "eddad1cae03692114915a58285174177"
                     }
                     }
-                }
+                },
+                "push" : {}
             },
             },
             "icons" : {
             "icons" : {
                 "android" : {
                 "android" : {

+ 18 - 782
pages.json

@@ -11,6 +11,15 @@
 	// 	}]
 	// 	}]
 	// },
 	// },
 	"pages": [
 	"pages": [
+		// 演示-组件
+		{
+			"path": "pages/Home",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white",
+				"backgroundColor": "#F2F3F5"
+			}
+		},
 		// 演示-组件
 		// 演示-组件
 		{
 		{
 			"path": "pages/example/components",
 			"path": "pages/example/components",
@@ -54,779 +63,6 @@
 			}
 			}
 		}
 		}
 	],
 	],
-	"subPackages": [{
-			"root": "pages/componentsC",
-			"pages": [
-				// test-测试
-				{
-					"path": "test/index",
-					"style": {
-						"navigationBarTitleText": "Test"
-						// "navigationStyle": "custom" ,// 隐藏系统导航栏
-						// "navigationBarTextStyle": "white" // 状态栏字体为白色
-					}
-				},
-				// gap-间隔槽
-				{
-					"path": "gap/index",
-					"style": {
-						"navigationBarTitleText": "gap-间隔槽"
-					}
-				},
-				// subsection分段器
-				{
-					"path": "subsection/index",
-					"style": {
-						"navigationBarTitleText": "subsection-分段器"
-					}
-				},
-				// section 查看更多
-				{
-					"path": "section/index",
-					"style": {
-						"navigationBarTitleText": "section-查看更多"
-					}
-				},
-				// link链接
-				{
-					"path": "link/index",
-					"style": {
-						"navigationBarTitleText": "link-链接"
-					}
-				},
-				// mask遮罩层
-				{
-					"path": "mask/index",
-					"style": {
-						"navigationBarTitleText": "mask-遮罩层"
-					}
-				},
-				// countTo数字滚动
-				{
-					"path": "countTo/index",
-					"style": {
-						"navigationBarTitleText": "countTo-数字滚动"
-					}
-				},
-				// color颜色
-				{
-					"path": "color/index",
-					"style": {
-						"navigationBarTitleText": "color-颜色"
-					}
-				},
-				// countDown倒计时
-				{
-					"path": "countDown/index",
-					"style": {
-						"navigationBarTitleText": "countDown-倒计时"
-					}
-				},
-				// progress进度条
-				{
-					"path": "progress/index",
-					"style": {
-						"navigationBarTitleText": "progress-进度条"
-					}
-				},
-				// alertTips警告提示
-				{
-					"path": "alertTips/index",
-					"style": {
-						"navigationBarTitleText": "alertTips-警告提示"
-					}
-				},
-				// badge 徽标数
-				{
-					"path": "badge/index",
-					"style": {
-						"navigationBarTitleText": "badge-徽标数"
-					}
-				},
-				// button按钮
-				{
-					"path": "button/index",
-					"style": {
-						"navigationBarTitleText": "button-按钮"
-					}
-				},
-				// collapse折叠面板
-				{
-					"path": "collapse/index",
-					"style": {
-						"navigationBarTitleText": "collapse-折叠面板"
-					}
-				},
-				// actionSheet操作菜单
-				{
-					"path": "actionSheet/index",
-					"style": {
-						"navigationBarTitleText": "actionSheet-操作菜单"
-					}
-				},
-				// messageInput验证码输入
-				{
-					"path": "messageInput/index",
-					"style": {
-						"navigationBarTitleText": "messageInput-验证码输入"
-					}
-				},
-				// popup弹窗
-				{
-					"path": "popup/index",
-					"style": {
-						"navigationBarTitleText": "popup-弹窗"
-					}
-				},
-				// listCell
-				{
-					"path": "cell/index",
-					"style": {
-						"navigationBarTitleText": "listCell-列表"
-					}
-				},
-				// numberBox数字输入框
-				{
-					"path": "numberBox/index",
-					"style": {
-						"navigationBarTitleText": "numberBox-步进器"
-					}
-				},
-				// grid宫格布局
-				{
-					"path": "grid/index",
-					"style": {
-						"navigationBarTitleText": "grid-宫格布局"
-					}
-				},
-				// layout栅格布局
-				{
-					"path": "layout/index",
-					"style": {
-						"navigationBarTitleText": "layout-栅格布局"
-					}
-				},
-				// 加载更多
-				{
-					"path": "loadmore/index",
-					"style": {
-						"navigationBarTitleText": "loadmore-加载更多"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/template",
-			"pages": [
-				// wxCenter 仿微信个人中心
-				{
-					"path": "wxCenter/index",
-					"style": {
-						"navigationBarTitleText": "wxCenter 仿微信个人中心",
-						"navigationStyle": "custom"
-					}
-				},
-				// keyboardPay 自定义键盘支付
-				{
-					"path": "keyboardPay/index",
-					"style": {
-						"navigationBarTitleText": "keyboardPay 自定义键盘支付"
-					}
-				},
-				// douyin 仿抖音
-				// {
-				// 	"path": "douyin/index",
-				// 	"style": {
-				// 		"navigationBarTitleText": "douyin 仿抖音"
-				// 	}
-				// },
-				// mallMenu商城分类
-				{
-					"path": "mallMenu/index2",
-					"style": {
-						"navigationBarTitleText": "mallMenu-商城分类"
-					}
-				},
-				// mallMenu商城分类
-				{
-					"path": "mallMenu/index1",
-					"style": {
-						"navigationBarTitleText": "mallMenu-商城分类"
-					}
-				},
-				// coupon优惠券
-				{
-					"path": "coupon/index",
-					"style": {
-						"navigationBarTitleText": "coupon-优惠券"
-					}
-				},
-				{
-					"path": "login/index",
-					"style": {
-						"navigationBarTitleText": "美团登录"
-					}
-				},
-				// 城市选择
-				{
-					"path": "citySelect/index",
-					"style": {
-						"navigationBarTitleText": "城市选择"
-					}
-				},
-				// SubmitBar提交订单栏
-				{
-					"path": "submitBar/index",
-					"style": {
-						"navigationBarTitleText": "提交订单栏"
-					}
-				},
-				// comment评论
-				{
-					"path": "comment/index",
-					"style": {
-						"navigationBarTitleText": "评论"
-					}
-				},
-				// comment评论详情
-				{
-					"path": "comment/reply",
-					"style": {
-						"navigationBarTitleText": "评论详情"
-					}
-				},
-				// order订单
-				{
-					"path": "order/index",
-					"style": {
-						"navigationBarTitleText": "订单"
-					}
-				},
-				// login登录获取验证码
-				{
-					"path": "login/code",
-					"style": {
-						"navigationBarTitleText": "登录获取验证码"
-					}
-				},
-				// address用户地址
-				{
-					"path": "address/index",
-					"style": {
-						"navigationBarTitleText": "用户地址"
-					}
-				},
-				// address添加用户地址
-				{
-					"path": "address/addSite",
-					"style": {
-						"navigationBarTitleText": "添加用户地址"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/library",
-			"pages": [
-				// debounce-节流防抖
-				{
-					"path": "debounce/index",
-					"style": {
-						"navigationBarTitleText": "throttle | debounce-节流防抖"
-					}
-				},
-				// deepClone-对象深度克隆
-				{
-					"path": "deepClone/index",
-					"style": {
-						"navigationBarTitleText": "deepClone-对象深度克隆"
-					}
-				},
-				// deepMerge-对象深度合并
-				{
-					"path": "deepMerge/index",
-					"style": {
-						"navigationBarTitleText": "deepMerge-对象深度合并"
-					}
-				},
-				// getRect-元素节点
-				{
-					"path": "getRect/index",
-					"style": {
-						"navigationBarTitleText": "getRect-元素节点"
-					}
-				},
-				// timeFrom-多久之前
-				{
-					"path": "timeFrom/index",
-					"style": {
-						"navigationBarTitleText": "timeFrom-多久之前"
-					}
-				},
-				// globalData-全局变量
-				{
-					"path": "globalVariable/globalData",
-					"style": {
-						"navigationBarTitleText": "globalData-全局变量"
-					}
-				},
-				// prototype-全局变量
-				{
-					"path": "globalVariable/prototype",
-					"style": {
-						"navigationBarTitleText": "prototype-全局变量"
-					}
-				},
-				// vuex-全局变量
-				{
-					"path": "globalVariable/vuex",
-					"style": {
-						"navigationBarTitleText": "vuex-全局变量"
-					}
-				},
-				// globalVariable-全局变量
-				{
-					"path": "globalVariable/index",
-					"style": {
-						"navigationBarTitleText": "globalVariable-全局变量"
-					}
-				},
-				// http-请求
-				{
-					"path": "http/index",
-					"style": {
-						"navigationBarTitleText": "http-请求"
-					}
-				},
-				// test-规则验证
-				{
-					"path": "test/index",
-					"style": {
-						"navigationBarTitleText": "test-规则验证"
-					}
-				},
-				// mpShare-小程序分享
-				{
-					"path": "mpShare/index",
-					"style": {
-						"navigationBarTitleText": "mpShare-小程序分享"
-					}
-				},
-				// color-JS调用颜色
-				{
-					"path": "color/index",
-					"style": {
-						"navigationBarTitleText": "color-JS调用颜色"
-					}
-				},
-				// trim-去除空格
-				{
-					"path": "trim/index",
-					"style": {
-						"navigationBarTitleText": "trim-去除空格"
-					}
-				},
-				// random-随机数生成
-				{
-					"path": "random/index",
-					"style": {
-						"navigationBarTitleText": "random-随机数生成"
-					}
-				},
-				// md5加密
-				{
-					"path": "md5/index",
-					"style": {
-						"navigationBarTitleText": "md5-加密"
-					}
-				},
-				// colorSwitch颜色转换
-				{
-					"path": "colorSwitch/index",
-					"style": {
-						"navigationBarTitleText": "colorSwitch-颜色转换"
-					}
-				},
-				// randomArray数组乱序
-				{
-					"path": "randomArray/index",
-					"style": {
-						"navigationBarTitleText": "randomArray-数组乱序"
-					}
-				},
-				// guid全局唯一标识符
-				{
-					"path": "guid/index",
-					"style": {
-						"navigationBarTitleText": "guid-全局唯一标识符"
-					}
-				},
-				// timeFormat时间格式化
-				{
-					"path": "timeFormat/index",
-					"style": {
-						"navigationBarTitleText": "timeFormat-时间格式化"
-					}
-				}, // route-路由
-				{
-					"path": "route/index",
-					"style": {
-						"navigationBarTitleText": "route-路由"
-					}
-				},
-				// route-路由跳转
-				{
-					"path": "route/routeTo",
-					"style": {
-						"navigationBarTitleText": "route-路由跳转"
-					}
-				},
-				// queryParams-对象转URL参数
-				{
-					"path": "queryParams/index",
-					"style": {
-						"navigationBarTitleText": "queryParams-对象转URL参数"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/componentsA",
-			"pages": [
-				// parse-富文本解析器
-				{
-					"path": "parse/index",
-					"style": {
-						"navigationBarTitleText": "parse-富文本解析器"
-					}
-				},
-				// backTop-返回顶部
-				{
-					"path": "backTop/index",
-					"style": {
-						"navigationBarTitleText": "backTop-返回顶部"
-					}
-				},
-				// calendar-日历
-				{
-					"path": "calendar/index",
-					"style": {
-						"navigationBarTitleText": "calendar-日历"
-					}
-				},
-				// form-表单
-				{
-					"path": "form/index",
-					"style": {
-						"navigationBarTitleText": "form-表单"
-					}
-				},
-				// select-列选择器
-				{
-					"path": "select/index",
-					"style": {
-						"navigationBarTitleText": "select-列选择器"
-					}
-				},
-				// slider-滑动选择器
-				{
-					"path": "slider/index",
-					"style": {
-						"navigationBarTitleText": "slider-滑动选择器"
-					}
-				},
-				// fullScreen-压窗屏
-				{
-					"path": "fullScreen/index",
-					"style": {
-						"navigationBarTitleText": "fullScreen-压窗屏"
-					}
-				},
-				// navbar-自定义导航栏
-				{
-					"path": "navbar/index",
-					"style": {
-						// "navigationBarTitleText": "navbar-自定义导航栏",
-						"navigationStyle": "custom", // 隐藏系统导航栏
-						"navigationBarTextStyle": "white" // 状态栏字体为白色
-					}
-				},
-				// field-输入框
-				{
-					"path": "field/index",
-					"style": {
-						"navigationBarTitleText": "field-输入框"
-					}
-				},
-				// modal-模态框
-				{
-					"path": "modal/index",
-					"style": {
-						"navigationBarTitleText": "modal-模态框"
-					}
-				},
-				// indexList索引列表
-				{
-					"path": "indexList/index",
-					"style": {
-						"navigationBarTitleText": "indexList-索引列表"
-					}
-				},
-				// empty内容为空
-				{
-					"path": "empty/index",
-					"style": {
-						"navigationBarTitleText": "empty-内容为空"
-					}
-				},
-				// avatarCropper-头像裁剪
-				{
-					"path": "avatarCropper/index",
-					"style": {
-						"navigationBarTitleText": "avatarCropper-头像裁剪"
-					}
-				}, // noNetwork没有网络
-				{
-					"path": "noNetwork/index",
-					"style": {
-						"navigationBarTitleText": "noNetwork-没有网络"
-					}
-				}, // icon字体图标
-				{
-					"path": "icon/index",
-					"style": {
-						"navigationBarTitleText": "icon-字体图标"
-					}
-				}, // avatar-用户头像展示
-				{
-					"path": "avatar/index",
-					"style": {
-						"navigationBarTitleText": "avatar-用户头像展示"
-					}
-				}, // keyboard键盘
-				{
-					"path": "keyboard/index",
-					"style": {
-						"navigationBarTitleText": "keyboard-键盘"
-					}
-				}, // 图片懒加载
-				{
-					"path": "lazyLoad/index",
-					"style": {
-						"navigationBarTitleText": "lazyLoad-懒加载"
-					}
-				},
-				// tabs切换
-				{
-					"path": "tabs/index",
-					"style": {
-						"navigationBarTitleText": "Tabs-切换"
-					}
-				},
-				// tag标签
-				{
-					"path": "tag/index",
-					"style": {
-						"navigationBarTitleText": "tag-标签"
-					}
-				},
-				// timeLine时间轴
-				{
-					"path": "timeLine/index",
-					"style": {
-						"navigationBarTitleText": "timeLine-时间轴"
-					}
-				},
-				// toast轻提示
-				{
-					"path": "toast/index",
-					"style": {
-						"navigationBarTitleText": "toast-轻提示"
-					}
-				},
-				// topTips消息提示
-				{
-					"path": "topTips/index",
-					"style": {
-						"navigationBarTitleText": "topTips-消息提示"
-					}
-				},
-				// Code-验证码倒计时
-				{
-					"path": "verificationCode/index",
-					"style": {
-						"navigationBarTitleText": "Code-验证码倒计时"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/componentsB",
-			"pages": [
-				// dropdown-下拉菜单
-				{
-					"path": "dropdown/index",
-					"style": {
-						"navigationBarTitleText": "dropdown-下拉菜单"
-					}
-				},
-				// tabbar-底部导航栏
-				{
-					"path": "tabbar/index",
-					"style": {
-						"navigationBarTitleText": "tabbar-底部导航栏"
-					}
-				},
-				// line-线条
-				{
-					"path": "line/index",
-					"style": {
-						"navigationBarTitleText": "line-线条"
-					}
-				},
-				// image-图片
-				{
-					"path": "image/index",
-					"style": {
-						"navigationBarTitleText": "image-图片"
-					}
-				},
-				// card-卡片
-				{
-					"path": "card/index",
-					"style": {
-						"navigationBarTitleText": "card-卡片"
-					}
-				},
-				// divider-分割线
-				{
-					"path": "divider/index",
-					"style": {
-						"navigationBarTitleText": "divider-分割线"
-					}
-				},
-				// picker选择器
-				{
-					"path": "picker/index",
-					"style": {
-						"navigationBarTitleText": "picker-选择器"
-					}
-				}, // noticeBar通告栏
-				{
-					"path": "noticeBar/index",
-					"style": {
-						"navigationBarTitleText": "noticeBar-通告栏"
-					}
-				},
-				// checkbox-复选框
-				{
-					"path": "checkbox/index",
-					"style": {
-						"navigationBarTitleText": "checkbox-复选框"
-					}
-				},
-				// radio-单选框
-				{
-					"path": "radio/index",
-					"style": {
-						"navigationBarTitleText": "radio-单选框"
-					}
-				},
-				// loading-加载动画
-				{
-					"path": "loading/index",
-					"style": {
-						"navigationBarTitleText": "loading-加载动画"
-					}
-				},
-				// switch-开关选择器
-				{
-					"path": "switch/index",
-					"style": {
-						"navigationBarTitleText": "switch-开关选择器"
-					}
-				},
-				// 骨架屏
-				{
-					"path": "skeleton/index",
-					"style": {
-						"navigationBarTitleText": "skeleton-骨架屏"
-					}
-				}, // upload上传
-				{
-					"path": "upload/index",
-					"style": {
-						"navigationBarTitleText": "upload-上传"
-					}
-				},
-				// waterfall瀑布流
-				// #ifndef MP-TOUTIAO 
-				{
-					"path": "waterfall/index",
-					"style": {
-						"navigationBarTitleText": "waterfall-瀑布流"
-					}
-				},
-				// #endif
-				// table表格
-				{
-					"path": "table/index",
-					"style": {
-						"navigationBarTitleText": "table-表格"
-					}
-				},
-				// rate评分
-				{
-					"path": "rate/index",
-					"style": {
-						"navigationBarTitleText": "rate-评分"
-					}
-				},
-				// readMore显示更多
-				{
-					"path": "readMore/index",
-					"style": {
-						"navigationBarTitleText": "readMore-查看更多"
-					}
-				},
-				// search搜索框
-				{
-					"path": "search/index",
-					"style": {
-						"navigationBarTitleText": "search-搜索框"
-					}
-				},
-				// steps步骤条
-				{
-					"path": "steps/index",
-					"style": {
-						"navigationBarTitleText": "steps-步骤条"
-					}
-				},
-				// sticky吸顶
-				{
-					"path": "sticky/index",
-					"style": {
-						"navigationBarTitleText": "sticky-吸顶"
-					}
-				},
-				// swiper轮播图
-				{
-					"path": "swiper/index",
-					"style": {
-						"navigationBarTitleText": "swiper-轮播图"
-					}
-				},
-				// swipeAction-左滑删除
-				{
-					"path": "swipeAction/index",
-					"style": {
-						"navigationBarTitleText": "swipeAction-左滑删除"
-					}
-				}
-			]
-		}
-	],
 	"preloadRule": {
 	"preloadRule": {
 		"pages/example/components": {
 		"pages/example/components": {
 			"network": "all",
 			"network": "all",
@@ -837,7 +73,7 @@
 		"navigationBarTextStyle": "black",
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uView",
 		"navigationBarTitleText": "uView",
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"navigationBarBackgroundColor": "#FFFFFF",
-		"backgroundColor": "#FFFFFF"
+		"backgroundColor": "#F2F3F5"
 	},
 	},
 	"tabBar": {
 	"tabBar": {
 		"color": "#808080",
 		"color": "#808080",
@@ -845,23 +81,23 @@
 		"backgroundColor": "#FFFFFF",
 		"backgroundColor": "#FFFFFF",
 		"borderStyle": "black",
 		"borderStyle": "black",
 		"list": [{
 		"list": [{
-				"pagePath": "pages/example/components",
-				"iconPath": "static/uview/example/component.png",
-				"selectedIconPath": "static/uview/example/component_select.png",
+				"pagePath": "pages/Home",
+				"iconPath": "static/uview/imgs/tabbar_icon_01.png",
+				"selectedIconPath": "static/uview/imgs/tabbar_icon_01_pre.png",
 				"text": "首页"
 				"text": "首页"
 			},
 			},
 			{
 			{
 				"pagePath": "pages/example/js",
 				"pagePath": "pages/example/js",
-				"iconPath": "static/uview/example/js.png",
-				"selectedIconPath": "static/uview/example/js_select.png",
+				"iconPath": "static/uview/imgs/tabbar_icon_02.png",
+				"selectedIconPath": "static/uview/imgs/tabbar_icon_02_pre.png",
 				"text": "订单管理"
 				"text": "订单管理"
 			},
 			},
 			{
 			{
 				"pagePath": "pages/example/template",
 				"pagePath": "pages/example/template",
-				"iconPath": "static/uview/example/template.png",
-				"selectedIconPath": "static/uview/example/template_select.png",
+				"iconPath": "static/uview/imgs/tabbar_icon_03.png",
+				"selectedIconPath": "static/uview/imgs/tabbar_icon_03_pre.png",
 				"text": "我的"
 				"text": "我的"
 			}
 			}
 		]
 		]
 	}
 	}
-}
+}

+ 298 - 0
pages/Home.vue

@@ -0,0 +1,298 @@
+<template>
+	<view class="bg container">
+		<view class="top" :style="{ paddingTop: `${systemInfo.statusBarHeight}px` }">
+			<view class="name">益禾堂</view>
+			<view class="sub">
+				<text>(江宁学院一食堂)</text>
+				<text class="status">营业中</text>
+			</view>
+		</view>
+
+		<u-row gutter="0" class="menu">
+			<u-col span="4">
+				<view class="menu-item">
+					<image src="../static/uview/imgs/info_icon_01.png" mode="widthFix"></image>
+					<text>商品管理</text>
+				</view>
+			</u-col>
+			<u-col span="4">
+				<view class="menu-item">
+					<image src="../static/uview/imgs/info_icon_02.png" mode="widthFix"></image>
+					<text>财务中心</text>
+				</view>
+			</u-col>
+			<u-col span="4">
+				<view class="menu-item">
+					<image src="../static/uview/imgs/info_icon_03.png" mode="widthFix"></image>
+					<text>营业状态</text>
+				</view>
+			</u-col>
+			<u-col span="4">
+				<view class="menu-item">
+					<image src="../static/uview/imgs/info_icon_04.png" mode="widthFix"></image>
+					<text>评价管理</text>
+				</view>
+			</u-col>
+			<u-col span="4">
+				<view class="menu-item">
+					<image src="../static/uview/imgs/info_icon_05.png" mode="widthFix"></image>
+					<text>消息中心</text>
+				</view>
+			</u-col>
+			<u-col span="4">
+				<view class="menu-item">
+					<image src="../static/uview/imgs/info_icon_06.png" mode="widthFix"></image>
+					<text>店铺工具</text>
+				</view>
+			</u-col>
+		</u-row>
+
+		<view class="card order">
+			<view class="name">
+				<text class="text1">代处理订单</text>
+				<view class="more">
+					<text>更多</text>
+					<u-icon name="arrow-right"></u-icon>
+				</view>
+			</view>
+
+			<u-row gutter="0" class="order-menu">
+				<u-col span="4">
+					<view class="text-item line">
+						<text class="text1">20</text>
+						<text class="text2">代付款</text>
+					</view>
+				</u-col>
+				<u-col span="4">
+					<view class="text-item line">
+						<text class="text1">20</text>
+						<text class="text2">待配送</text>
+					</view>
+				</u-col>
+				<u-col span="4">
+					<view class="text-item">
+						<text class="text1">20</text>
+						<text class="text2">带退款</text>
+					</view>
+				</u-col>
+			</u-row>
+		</view>
+
+		<view class="card datas">
+			<view class="name"><text class="text1">数据统计</text></view>
+			<u-tabs :list="tabs" :current="nowTab" :is-scroll="false" :active-color="$colors.prim" @change="changeTabs"></u-tabs>
+			<u-row gutter="0">
+				<u-col span="4">
+					<view class="text-item">
+						<text class="text1">22</text>
+						<text class="text2">营业收入(元)</text>
+					</view>
+				</u-col>
+				<u-col span="4">
+					<view class="text-item">
+						<text class="text1">22</text>
+						<text class="text2">营业收入(元)</text>
+					</view>
+				</u-col>
+				<u-col span="4">
+					<view class="text-item">
+						<text class="text1">22</text>
+						<text class="text2">营业收入(元)</text>
+					</view>
+				</u-col>
+				<u-col span="4">
+					<view class="text-item">
+						<text class="text1">22</text>
+						<text class="text2">营业收入(元)</text>
+					</view>
+				</u-col>
+				<u-col span="4">
+					<view class="text-item">
+						<text class="text1">22</text>
+						<text class="text2">营业收入(元)</text>
+					</view>
+				</u-col>
+				<u-col span="4">
+					<view class="text-item">
+						<text class="text1">22</text>
+						<text class="text2">营业收入(元)</text>
+					</view>
+				</u-col>
+			</u-row>
+		</view>
+
+		<view class="card">
+			<view class="name">
+				<text class="text1">销售数据</text>
+				<view class="btns"><button type="primary">本周</button></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapState } from 'vuex';
+export default {
+	data() {
+		return {
+			tabs: [
+				{
+					name: '今天'
+				},
+				{
+					name: '昨天'
+				},
+				{
+					name: '本周'
+				},
+				{
+					name: '本月'
+				},
+				{
+					name: '本周'
+				}
+			],
+			nowTab: 0
+		};
+	},
+	computed: {
+		...mapState(['systemInfo'])
+	},
+	methods: {
+		changeTabs(index) {
+			this.nowTab = index;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.container {
+	padding: 0 20px 50px;
+}
+.bg {
+	background: linear-gradient(180deg, #214bbe 0%, #214bbe 128px, #214bbe 150px, rgba(33, 75, 190, 0) 280px, #f2f3f5 280px);
+}
+
+.top {
+	.name {
+		font-size: 22px;
+		color: #fff;
+	}
+	.sub {
+		font-size: 16px;
+		font-weight: bold;
+		color: #ffffff;
+		line-height: 26px;
+
+		.status {
+			font-size: 13px;
+			font-weight: normal;
+			color: #f4f7ff;
+			background-color: rgba(255, 255, 255, 0.4);
+			padding: 2px 5px;
+			margin-left: 12px;
+		}
+	}
+}
+.menu {
+	margin: 20px 0;
+	border-radius: 12px;
+	background-color: #ffffff;
+	padding: 12px 0;
+}
+.menu-item {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	padding: 19px 0 23px;
+	&:active {
+		background-color: rgba($color: #000000, $alpha: 0.05);
+		border-radius: 12px;
+	}
+	image {
+		width: 36px;
+		height: 36px;
+	}
+	text {
+		font-size: 14px;
+		color: #000000;
+		line-height: 20px;
+		margin-top: 6px;
+	}
+}
+
+.card {
+	background: #ffffff;
+	border-radius: 16px;
+	padding-bottom: 10px;
+	margin-bottom: 20px;
+	.name {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 20px 12px 10px;
+
+		.text1 {
+			font-size: 18px;
+			font-weight: bolder;
+			color: #1c1c1c;
+			line-height: 26px;
+		}
+		.more {
+			font-size: 13px;
+			color: #aaabad;
+			line-height: 24px;
+			display: flex;
+			align-items: center;
+		}
+	}
+}
+
+.order {
+	.line {
+		&::after {
+			content: '';
+			width: 1px;
+			position: absolute;
+			right: 0;
+			top: 7px;
+			bottom: 6px;
+			background-color: #e5e5e5;
+		}
+	}
+}
+
+.text-item {
+	position: relative;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	padding: 10px 0;
+	&:active {
+		background-color: rgba($color: #000000, $alpha: 0.05);
+		border-radius: 4px;
+	}
+	.text1 {
+		font-size: 30px;
+		font-family: OSP;
+		color: $u-type-primary;
+		line-height: 40px;
+		margin-top: 0;
+	}
+	.text2 {
+		font-size: 13px;
+		color: $u-type-primary;
+		line-height: 18px;
+		margin-top: 5px;
+	}
+}
+
+.datas {
+	.text-item {
+		align-items: flex-start;
+		padding: 10px 12px;
+	}
+}
+</style>

+ 178 - 0
plugins/http.js

@@ -0,0 +1,178 @@
+let baseUrl = 'http://localhost:8080';
+switch (process.env.NODE_ENV) {
+	case 'development':
+		baseUrl = 'https://zhuoka.izouma.com';
+		break;
+	case 'test':
+		baseUrl = 'http://localhost:8080';
+		break;
+	case 'production':
+		baseUrl = 'https://zhuoka.izouma.com';
+		break;
+}
+
+function parseUrl(url) {
+	let _baseUrl = baseUrl;
+	console.log(baseUrl)
+	if (url.startsWith('http')) {
+		return url;
+	}
+	if (!_baseUrl.endsWith('/')) {
+		_baseUrl += '/';
+	}
+	if (url.startsWith('/')) {
+		url = url.slice(1);
+	}
+	return _baseUrl + url;
+}
+const http = {
+	parseUrl: parseUrl,
+	setToken(token) {
+		uni.setStorageSync('token', token);
+		this.token = token;
+	},
+	clearToken() {
+		this.token = '';
+		uni.removeStorageSync('token');
+		console.log('clear token');
+	},
+	getToken() {
+		if (!this.token) {
+			try {
+				this.token = uni.getStorageSync('token');
+			} catch (e) {}
+		}
+		return this.token;
+	},
+	get(url, params, options) {
+		options = options || {};
+		return new Promise((resolve, reject) => {
+			uni.request({
+				method: 'GET',
+				url: parseUrl(url),
+				data: params,
+				dataType: 'json',
+				header: {
+					Accept: 'application/json',
+					Authorization: this.getToken() ? 'Bearer ' + this.getToken() : 'Bearer ',
+					...(options.header || {})
+				},
+				success(res) {
+					if (res && res.statusCode === 200) {
+						resolve(res.data);
+					} else {
+						reject(res.data || res);
+					}
+				},
+				fail(err) {
+					reject(err.data || err);
+				}
+			});
+		});
+	},
+	post(url, data, options, backHeader = false) {
+		console.log('post');
+		options = options || {};
+		return new Promise((resolve, reject) => {
+			uni.request({
+				method: 'post',
+				url: parseUrl(url),
+				data: data,
+				dataType: 'json',
+				header: {
+					Accept: 'application/json',
+					'content-type': 'application/x-www-form-urlencoded',
+					Authorization: this.getToken() ? 'Bearer ' + this.getToken() : '',
+					...(options.header || {})
+				},
+				success(res) {
+					if (res && res.statusCode === 200) {
+						resolve(backHeader ? res : res.data);
+					} else {
+						reject(res.data || res);
+					}
+				},
+				fail(err) {
+					reject(err.data || err);
+				}
+			});
+		});
+	},
+	postJson(url, data, options, backHeader = false) {
+		options = options || {};
+		return new Promise((resolve, reject) => {
+			uni.request({
+				method: 'post',
+				url: parseUrl(url),
+				data: data,
+				dataType: 'json',
+				header: {
+					Accept: 'application/json',
+					'Content-Type': 'application/json',
+					Authorization: this.getToken() ? 'Bearer ' + this.getToken() : '',
+					...(options.header || {})
+				},
+				success(res) {
+					if (res && res.statusCode === 200) {
+						resolve(backHeader ? res : res.data);
+					} else {
+						reject(res.data || res);
+					}
+				},
+				fail(err) {
+					reject(err.data || err);
+				}
+			});
+		});
+	},
+	uploadFile(filePath, options) {
+		options = options || {};
+		return new Promise((resolve, reject) => {
+			uni.uploadFile({
+				url: baseUrl + '/upload/file',
+				filePath: filePath,
+				name: 'file',
+				header: {
+					Accept: 'application/json',
+					'content-type': 'application/x-www-form-urlencoded',
+					Authorization: this.getToken() ? 'Bearer ' + this.getToken() : '',
+					...(options.header || {})
+				},
+				formData: options.formData || {},
+				success(res) {
+					if (res && res.statusCode === 200) {
+						try {
+							resolve(res.data);
+						} catch (e) {
+							reject(e);
+						}
+					} else {
+						reject(res);
+					}
+				},
+				fail(err) {
+					reject(err);
+				}
+			});
+		});
+	}
+};
+export default {
+	http: http,
+	install(_Vue) {
+		_Vue.prototype.$baseUrl = baseUrl;
+		_Vue.prototype.$http = http;
+		_Vue.prototype.$request = options => {
+			options = options || {};
+			options.url = parseUrl(options.url);
+			return new Promise((resolve, reject) => {
+				options.success = res => {
+					resolve(res);
+				};
+				options.success = err => {
+					reject(err);
+				};
+			});
+		};
+	}
+};

TEMPAT SAMPAH
static/uview/imgs/info_icon_01.png


TEMPAT SAMPAH
static/uview/imgs/info_icon_02.png


TEMPAT SAMPAH
static/uview/imgs/info_icon_03.png


TEMPAT SAMPAH
static/uview/imgs/info_icon_04.png


TEMPAT SAMPAH
static/uview/imgs/info_icon_05.png


TEMPAT SAMPAH
static/uview/imgs/info_icon_06.png


TEMPAT SAMPAH
static/uview/imgs/info_icon_collect@3x(1).png


TEMPAT SAMPAH
static/uview/imgs/info_icon_collect@3x(2).png


TEMPAT SAMPAH
static/uview/imgs/info_icon_collect@3x(3).png


TEMPAT SAMPAH
static/uview/imgs/info_icon_collect@3x.png


TEMPAT SAMPAH
static/uview/imgs/tabbar_icon_01.png


TEMPAT SAMPAH
static/uview/imgs/tabbar_icon_01_pre.png


TEMPAT SAMPAH
static/uview/imgs/tabbar_icon_02.png


TEMPAT SAMPAH
static/uview/imgs/tabbar_icon_02_pre.png


TEMPAT SAMPAH
static/uview/imgs/tabbar_icon_03.png


TEMPAT SAMPAH
static/uview/imgs/tabbar_icon_03_pre.png


+ 0 - 27
store/$u.mixin.js

@@ -1,27 +0,0 @@
-import { mapState } from 'vuex'
-import store from "@/store"
-
-// 尝试将用户在根目录中的store/index.js的vuex的state变量,全部加载到全局变量中
-let $uStoreKey = [];
-try{
-	$uStoreKey = store.state ? Object.keys(store.state) : [];
-}catch(e){
-	
-}
-
-module.exports = {
-	beforeCreate() {
-		// 将vuex方法挂在到$u中
-		// 使用方法为:如果要修改vuex的state中的user.name变量为"史诗" => this.$u.vuex('user.name', '史诗')
-		// 如果要修改vuex的state的version变量为1.0.1 => this.$u.vuex('version', '1.0.1')
-		this.$u.vuex = (name, value) => {
-			this.$store.commit('$uStore', {
-				name,value
-			})
-		}
-	},
-	computed: {
-		// 将vuex的state中的所有变量,解构到全局混入的mixin中
-		...mapState($uStoreKey)
-	}
-}

+ 63 - 85
store/index.js

@@ -1,85 +1,63 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-Vue.use(Vuex)
-
-let lifeData = {};
-
-try{
-	// 尝试获取本地是否存在lifeData变量,第一次启动APP时是不存在的
-	lifeData = uni.getStorageSync('lifeData');
-}catch(e){
-	
-}
-
-// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
-let saveStateKeys = ['vuex_user', 'vuex_token'];
-
-// 保存变量到本地存储中
-const saveLifeData = function(key, value){
-	// 判断变量名是否在需要存储的数组中
-	if(saveStateKeys.indexOf(key) != -1) {
-		// 获取本地存储的lifeData对象,将变量添加到对象中
-		let tmp = uni.getStorageSync('lifeData');
-		// 第一次打开APP,不存在lifeData变量,故放一个{}空对象
-		tmp = tmp ? tmp : {};
-		tmp[key] = value;
-		// 执行这一步后,所有需要存储的变量,都挂载在本地的lifeData对象中
-		uni.setStorageSync('lifeData', tmp);
-	}
-}
-const store = new Vuex.Store({
-	state: {
-		// 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量
-		// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
-		vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {name: '明月'},
-		vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '',
-		// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
-		vuex_version: '1.0.1',
-		vuex_demo: '绛紫',
-		// 自定义tabbar数据
-		vuex_tabbar: [{
-				iconPath: "/static/uview/example/component.png",
-				selectedIconPath: "/static/uview/example/component_select.png",
-				text: '组件',
-				pagePath: '/pages/example/components'
-			},
-			{
-				iconPath: "/static/uview/example/js.png",
-				selectedIconPath: "/static/uview/example/js_select.png",
-				text: '工具',
-				midButton: true,
-				pagePath: '/pages/example/js'
-			},
-			{
-				iconPath: "/static/uview/example/template.png",
-				selectedIconPath: "/static/uview/example/template_select.png",
-				text: '模板',
-				pagePath: '/pages/example/template'
-			}
-		]
-	},
-	mutations: {
-		$uStore(state, payload) {
-			// 判断是否多层级调用,state中为对象存在的情况,诸如user.info.score = 1
-			let nameArr = payload.name.split('.');
-			let saveKey = '';
-			let len = nameArr.length;
-			if(len >= 2) {
-				let obj = state[nameArr[0]];
-				for(let i = 1; i < len - 1; i ++) {
-					obj = obj[nameArr[i]];
-				}
-				obj[nameArr[len - 1]] = payload.value;
-				saveKey = nameArr[0];
-			} else {
-				// 单层级变量,在state就是一个普通变量的情况
-				state[payload.name] = payload.value;
-				saveKey = payload.name;
-			}
-			// 保存变量到本地,见顶部函数定义
-			saveLifeData(saveKey, state[saveKey])
-		}
-	}
-})
-
-export default store
+import Vuex from 'vuex';
+import http from '../plugins/http';
+export default new Vuex.Store({
+    state: {
+        sessionKey: '',
+        safeArea: {
+            top: 0,
+            botton: 0
+        },
+        systemInfo: {
+            statusBarHeight: 44
+        },
+        userInfo: null,
+        userStoreInfo: null
+    },
+    mutations: {
+        setUserInfo(state, userInfo) {
+            state.userInfo = userInfo;
+        },
+        setSessionKey(state, sessionKey) {
+            state.sessionKey = sessionKey;
+        },
+        setSystemInfo(state, systemInfo) {
+            state.çç = systemInfo;
+        },
+        setUserStoreInfo(state, userStoreInfo) {
+            state.userStoreInfo = userStoreInfo;
+        }
+    },
+    actions: {
+        getUserInfo(context) {
+            return http.http.get('/user/my').then(res => {
+                if (res.sex || res.nickname.indexOf('用户') === -1) {
+                    context.commit('setUserInfo', res);
+                } else {
+                    context.commit('setUserInfo', null);
+                }
+
+                return Promise.resolve(res);
+            });
+        },
+        getUserStore(context) {
+            if (!context.state.userInfo) {
+                return Promise.reject();
+            }
+            return http.http
+                .postJson('/store/all', {
+                    query: {
+                        userId: context.state.userInfo.id
+                    }
+                })
+                .then(res => {
+                    if (res.empty) {
+                        context.commit('setUserStoreInfo', null);
+                        return Promise.reject();
+                    } else {
+                        context.commit('setUserStoreInfo', res.content[0]);
+                        return Promise.resolve(res.content[0]);
+                    }
+                });
+        }
+    }
+});

+ 5 - 1
uni.scss

@@ -3,5 +3,9 @@
  * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可
  * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可
  * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 
  * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 
  */
  */
-@import 'uview-ui/theme.scss';
+@import "uview-ui/theme.scss";
 
 
+@font-face {
+	font-family: 'OSP';
+	src: url(https://imttech.oss-cn-hangzhou.aliyuncs.com/micro/OSP-DIN.ttf);
+}

File diff ditekan karena terlalu besar
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


File diff ditekan karena terlalu besar
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


File diff ditekan karena terlalu besar
+ 26 - 133
unpackage/dist/dev/app-plus/app-view.js


File diff ditekan karena terlalu besar
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


File diff ditekan karena terlalu besar
+ 0 - 10
unpackage/dist/dev/app-plus/pages/componentsA/app-sub-service.js


File diff ditekan karena terlalu besar
+ 0 - 10
unpackage/dist/dev/app-plus/pages/componentsB/app-sub-service.js


File diff ditekan karena terlalu besar
+ 0 - 9
unpackage/dist/dev/app-plus/pages/componentsC/app-sub-service.js


File diff ditekan karena terlalu besar
+ 0 - 10
unpackage/dist/dev/app-plus/pages/library/app-sub-service.js


File diff ditekan karena terlalu besar
+ 0 - 10
unpackage/dist/dev/app-plus/pages/template/app-sub-service.js


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_01.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_02.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_03.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_04.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_05.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_06.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_collect@3x(1).png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_collect@3x(2).png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_collect@3x(3).png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/info_icon_collect@3x.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_01.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_01_pre.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_02.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_02_pre.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_03.png


TEMPAT SAMPAH
unpackage/dist/dev/app-plus/static/uview/imgs/tabbar_icon_03_pre.png


+ 4 - 4
uview-ui/theme.scss

@@ -9,10 +9,10 @@ $u-light-color: #c0c4cc;
 $u-border-color: #e4e7ed;
 $u-border-color: #e4e7ed;
 $u-bg-color: #f3f4f6;
 $u-bg-color: #f3f4f6;
 
 
-$u-type-primary: #2979ff;
-$u-type-primary-light: #ecf5ff;
-$u-type-primary-disabled: #a0cfff;
-$u-type-primary-dark: #2b85e4;
+$u-type-primary: #214BBE;
+$u-type-primary-light: #2454dc;
+$u-type-primary-disabled: #5fa7ff;
+$u-type-primary-dark: #112457;
 
 
 $u-type-warning: #ff9900;
 $u-type-warning: #ff9900;
 $u-type-warning-disabled: #fcbd71;
 $u-type-warning-disabled: #fcbd71;

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini