nanMing 1 ano atrás
pai
commit
a40d857667
8 arquivos alterados com 45 adições e 34 exclusões
  1. 0 1
      App.vue
  2. 1 1
      api/login.js
  3. 9 5
      main.js
  4. 3 2
      manifest.json
  5. 9 8
      package.json
  6. 13 10
      pages.json
  7. 8 7
      pages/login/login.vue
  8. 2 0
      uni.scss

+ 0 - 1
App.vue

@@ -14,5 +14,4 @@
 </script>
 
 <style>
-	/*每个页面公共css */
 </style>

+ 1 - 1
api/login.js

@@ -16,7 +16,7 @@ export function login(username, password) {
 		password
 	}
 	return request({
-		url: '/auth/wxlogin',
+		url: '/auth/firstLogin',
 		headers: {
 			isToken: false
 		},

+ 9 - 5
main.js

@@ -1,12 +1,16 @@
+import uView from 'uview-ui'
+import "uview-ui/index.scss";
 import App from './App'
 
+Vue.use(uView)
+
 // #ifndef VUE3
 import Vue from 'vue'
 import './uni.promisify.adaptor'
 Vue.config.productionTip = false
 App.mpType = 'app'
 const app = new Vue({
-  ...App
+	...App
 })
 app.$mount()
 // #endif
@@ -14,9 +18,9 @@ app.$mount()
 // #ifdef VUE3
 import { createSSRApp } from 'vue'
 export function createApp() {
-  const app = createSSRApp(App)
-  return {
-    app
-  }
+	const app = createSSRApp(App)
+	return {
+		app
+	}
 }
 // #endif

+ 3 - 2
manifest.json

@@ -50,11 +50,12 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx3698a63d3e6b3652",
+        "appid" : "wx52fe622305759379",
         "setting" : {
             "urlCheck" : false
         },
-        "usingComponents" : true
+        "usingComponents" : true,
+				"libVersion": "latest"  
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 9 - 8
package.json

@@ -1,9 +1,10 @@
 {
-  "devDependencies": {
-    "sass": "^1.69.7",
-    "sass-loader": "^10.1.1"
-  },
-  "dependencies": {
-    "@dcloudio/uni-app": "^2.0.2-3090920231225001"
-  }
-}
+	"devDependencies": {
+		"sass": "^1.69.7",
+		"sass-loader": "^10.1.1"
+	},
+	"dependencies": {
+		"@dcloudio/uni-app": "^2.0.2-3090920231225001",
+		"uview-ui": "^2.0.36"
+	}
+}

+ 13 - 10
pages.json

@@ -24,7 +24,11 @@
 			}
 		]
 	},
-
+	
+	"easycom": {
+		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
+	},
+	
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
 			"path": "pages/index/index",
@@ -32,12 +36,19 @@
 				"navigationBarTitleText": "首页"
 			}
 		},
+		{
+			"path": "pages/login/login",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
 		{
 			"path": "pages/my/index",
 			"style": {
 				"navigationBarTitleText": "个人中心",
 				"enablePullDownRefresh": true,
-				"onReachBottomDistance":100//距离底部100像素时,触发加载更多功能
+				"onReachBottomDistance": 100 //距离底部100像素时,触发加载更多功能
 			}
 		},
 		{
@@ -45,14 +56,6 @@
 			"style": {
 				"navigationBarTitleText": "添加客户信息"
 			}
-		},
-		{
-			"path" : "pages/login/login",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
-			}
 		}
 	],
 	"globalStyle": {

+ 8 - 7
pages/login/login.vue

@@ -1,6 +1,7 @@
 <template>
-	<view>
-		
+	<view class="u-line-1">
+		<u-icon name="photo-fill" color="#2979ff" size="28"></u-icon>
+		<u-input v-model="value" type="number" placeholder="请输入手机号" :border="true" clearable />
 	</view>
 </template>
 
@@ -8,15 +9,15 @@
 	export default {
 		data() {
 			return {
-				
+				value: '',
 			}
 		},
 		methods: {
-			
+
 		}
 	}
 </script>
 
-<style>
-
-</style>
+<style lang="scss">
+	@import "uview-ui/index.scss";
+</style>

+ 2 - 0
uni.scss

@@ -12,6 +12,8 @@
  * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  */
 
+@import 'uview-ui/theme.scss';
+
 /* 颜色变量 */
 
 /* 行为相关颜色 */