| | |
| | | <!-- logo --> |
| | | <view class="logo"> |
| | | <view class="logo-box"> |
| | | <image src="../../static/img/logo.png" mode="aspectFit"></image> |
| | | <image src="../../static/img/logo1.png" mode="aspectFit"></image> |
| | | </view> |
| | | </view> |
| | | <view class="content"> |
| | |
| | | <view class="box-icon"> |
| | | <uni-icons type="person" size="20" color="#707070"></uni-icons> |
| | | </view> |
| | | <view class="box-text">账号:</view> |
| | | <view class="box-text">賬號:</view> |
| | | <view class="box-input"> |
| | | <input type="text" placeholder="请输入账号" v-model="user.userName" |
| | | placeholder-style="font-size:14px;color:#ccc;"> |
| | |
| | | <view class="box-icon"> |
| | | <uni-icons type="locked" size="20" color="#707070"></uni-icons> |
| | | </view> |
| | | <view class="box-text">密码:</view> |
| | | <view class="box-text">密碼:</view> |
| | | <view class="box-input"> |
| | | <input :password="!showPassword" placeholder="请输入密码" v-model="user.password" |
| | | placeholder-style="font-size:14px;color:#ccc;" > |
| | |
| | | <!-- 记住密码 --> |
| | | <view class="check"> |
| | | <view class="check-left"> |
| | | <view>记住密码</view> |
| | | <view>記住密碼</view> |
| | | </view> |
| | | <view class="check-right"> |
| | | <switch :checked='remberPassword' color="#FFCC33" style="zoom:.5" @change="remberChange"/> |
| | |
| | | <view class="popup-item-right"><input type="text" v-model="url.port"></view> |
| | | </view> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">项目:</view> |
| | | <view class="popup-item-left">URL:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="url.project"></view> |
| | | </view> |
| | | <view class="btn"> |
| | | <view class="btn-left" @click="close">取消</view> |
| | | <view class="btn-right" @click="settingConfirm">确认</view> |
| | | <view class="btn-right" @click="settingConfirm">確認</view> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | |
| | | }, |
| | | load: { |
| | | loading: false, |
| | | btnText: '登录' |
| | | btnText: '登錄' |
| | | }, |
| | | msgType: 'success', |
| | | filename: '', |
| | |
| | | fail(result) { |
| | | uni.showToast({ |
| | | icon: 'error', |
| | | title: '请求失败' |
| | | title: '請求失敗' |
| | | }) |
| | | }, |
| | | data: { |
| | |
| | | success(result) { |
| | | if (result.statusCode === 404) { |
| | | uni.showToast({ |
| | | title: '登录失败', |
| | | title: '登錄失敗', |
| | | icon: "error" |
| | | }) |
| | | return |
| | |
| | | let res = result.data |
| | | if (res.code === 200) { |
| | | that.load.loading = true; |
| | | that.load.btnText = '登录中'; |
| | | that.load.btnText = '登錄中'; |
| | | uni.setStorageSync('token', res.data.token); |
| | | if(that.remberPassword){ |
| | | uni.setStorageSync('user', that.user); |
| | |
| | | } |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: '登录成功' |
| | | title: '登錄成功' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | |
| | | var res = res.data |
| | | if (res.data) { |
| | | that.filename = res.data.path |
| | | that.dialogContent = '发现新版本:' + res.data.version + ', 是否立即更新' |
| | | that.dialogContent = '發現新版本:' + res.data.version + ', 是否立即更新' |
| | | that.$refs.upVersion.open() |
| | | } else { |
| | | uni.showToast({ |