瀏覽代碼

收款工具

Admin 3 年之前
父節點
當前提交
7e4153f271
共有 2 個文件被更改,包括 20 次插入22 次删除
  1. 7 6
      pages.json
  2. 13 16
      pages/login/login-account.vue

+ 7 - 6
pages.json

@@ -1,5 +1,12 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		{
+			"path": "pages/login/login-account",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle":"custom"
+			}
+		},
 		{
 			"path": "pages/collection/sms",
 			"style": {
@@ -64,12 +71,6 @@
 			}
 		},
 		{
-			"path": "pages/login/login-account",
-			"style": {
-				"navigationBarTitleText": "",
-				"navigationStyle":"custom"
-			}
-		},{
 			"path": "pages/tabBar/user/mine",
 			"style": {
 				"navigationBarTitleText": "店铺",

+ 13 - 16
pages/login/login-account.vue

@@ -8,7 +8,7 @@
 						<tui-icon name="mobile" color="#6d7a87" :size="20"></tui-icon>
 						<input
 							:adjust-position="false"
-							v-model="mobile"
+							v-model="param.mobile"
 							placeholder="请输入账号/手机号"
 							placeholder-class="tui-phcolor"
 							type="text"
@@ -25,7 +25,7 @@
 						<input
 							v-if="isShowEye"
 							:adjust-position="false"
-							v-model="password"
+							v-model="param.password"
 							placeholder="请输入密码"
 							placeholder-class="tui-phcolor"
 							type="text"
@@ -34,23 +34,23 @@
 						<input
 							v-if="!isShowEye"
 							:adjust-position="false"
-							v-model="password"
+							v-model="param.password"
 							placeholder="请输入密码"
 							placeholder-class="tui-phcolor"
 							type="password"
 							maxlength="36"
 						/>
-						<view class="" v-show="password" style="margin: 0 20rpx 0 0;" @click.stop="changInputType">
+						<view class="" v-show="param.password" style="margin: 0 20rpx 0 0;" @click.stop="changInputType">
 							<tui-icon :name="isShowEye ? 'unseen' : 'eye'" :size="22" color="#bfbfbf"></tui-icon>
 						</view>
-						<view class="" v-show="password" @click.stop="clearInput(2)">
+						<view class="" v-show="param.password" @click.stop="clearInput(2)">
 							<tui-icon name="close-fill" :size="16" color="#bfbfbf" ></tui-icon>
 						</view>
 					</view>
 				</tui-list-cell>
 			</view>
 			<view class="tui-btn-box">
-				<tui-button type="warning" :disabledGray="true" :disabled="disabled" :shadow="true" shape="circle" @click="hanldeClick">登录</tui-button>
+				<tui-button type="primary" :disabledGray="true" :disabled="disabled" :shadow="true" shape="circle" @click="hanldeClick">登录</tui-button>
 			</view>
 		</view>
 	</view>
@@ -62,7 +62,7 @@ export default {
 	computed: {
 		disabled: function() {
 			let bool = true
-			if (this.mobile && this.password) {
+			if (this.param.mobile && this.param.password) {
 				bool = false
 			}
 			return bool
@@ -71,8 +71,10 @@ export default {
 	data() {
 		return {
 			CustomBar:this.CustomBar,// 顶部导航栏高度
-			mobile: '',
-			password: '', 
+			param:{
+				mobile: '',
+				password: '', 
+			},
 			popupShow: false,
 			passwordType:'password',
 			isShowEye:true
@@ -91,13 +93,8 @@ export default {
 			this.isShowEye = !this.isShowEye
 		},
 		hanldeClick(){
-			this.UserService.AccountLoginUser({username:this.mobile,password:this.password}).then(response =>{
-				uni.setStorageSync('token',response.data.token)
-				uni.setStorageSync('tokenHead',response.data.tokenHead)
-				this.AdminInfo()
-			}).catch(err =>{
-				this.$util.msg(err.message,2000)
-			})
+			
+			this.$api.navigateTo('/pages/collection/sms')
 		},
 		AdminInfo:function(){
 			this.UserService.AccountAdminInfo({}).then(admin =>{