lijuncheng
6 months ago
20 changed files with 340 additions and 92 deletions
@ -0,0 +1,233 @@ |
|||
<template> |
|||
<view class=""> |
|||
<view class="bgf login_wrap"> |
|||
<view class="loginbox"> |
|||
<form> |
|||
|
|||
<view class="mybox" > |
|||
|
|||
<view class="conone"> |
|||
<view class="title uni-flex"> |
|||
<uni-icons type="paperplane-filled" size="25"></uni-icons> |
|||
<text style="font-size: 30rpx;">请求地址</text> |
|||
|
|||
</view> |
|||
<view> |
|||
<input class="uni-input" style="padding:25rpx" placeholder="请输入请求地址" v-model="requestUrl" /> |
|||
</view> |
|||
</view> |
|||
<view class="conone"> |
|||
<view class="title uni-flex"> |
|||
<uni-icons type="gear-filled" size="25"></uni-icons> |
|||
<text style="font-size: 30rpx;">应用无操作退出时间(分钟)</text> |
|||
</view> |
|||
<view> |
|||
<input class="uni-input" type="number" style="padding:25rpx" placeholder="请输入超时时间" v-model="timeOut" /> |
|||
</view> |
|||
</view> |
|||
<view class="conone"> |
|||
<view class="title uni-flex"> |
|||
<uni-icons type="download-filled" size="25"></uni-icons> |
|||
<text style="font-size: 30rpx;">app更新地址</text> |
|||
</view> |
|||
<view> |
|||
<input class="uni-input" style="padding:25rpx" placeholder="请输入app更新地址" v-model="appUpdateUrl" /> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class="loginbtnbox"> |
|||
<button @click="confirm()" class="loginbtn">确认修改</button> |
|||
</view> |
|||
</form> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import config from '@/static/config.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
requestUrl:"", |
|||
timeOut:30, |
|||
appUpdateUrl:"" |
|||
} |
|||
}, |
|||
onLoad() { |
|||
|
|||
console.log("请求地址1:"+ uni.getStorageSync("requestUrl")) |
|||
this.requestUrl = uni.getStorageSync("requestUrl")? uni.getStorageSync("requestUrl"):config.request_url |
|||
console.log("请求地址2:"+ this.requestUrl) |
|||
this.timeOut = uni.getStorageSync("timeOut")?uni.getStorageSync("timeOut"):config.pageTimeOut |
|||
this.appUpdateUrl =uni.getStorageSync("appUpdateUrl")? uni.getStorageSync("appUpdateUrl"):config.appUpdateUrl |
|||
}, |
|||
methods: { |
|||
confirm(){ |
|||
if(!this.requestUrl ){ |
|||
uni.showModal({ |
|||
title:"地址不能为空" |
|||
}) |
|||
return; |
|||
} |
|||
|
|||
if(!this.timeOut ){ |
|||
uni.showModal({ |
|||
title:"时间不能为空" |
|||
}) |
|||
return; |
|||
} |
|||
|
|||
if(this.timeOut<=0 ){ |
|||
uni.showModal({ |
|||
title:"时间不能小于0" |
|||
}) |
|||
return; |
|||
} |
|||
|
|||
if(!this.appUpdateUrl){ |
|||
uni.showModal({ |
|||
title:"地址不能为空" |
|||
}) |
|||
return; |
|||
} |
|||
|
|||
uni.setStorageSync("requestUrl",this.requestUrl) |
|||
uni.setStorageSync("timeOut",this.timeOut) |
|||
uni.setStorageSync("appUpdateUrl",this.appUpdateUrl) |
|||
uni.showToast({ |
|||
title:"修改成功" |
|||
}) |
|||
uni.navigateBack() |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
page { |
|||
background-color: #fff; |
|||
} |
|||
|
|||
.content { |
|||
width: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
justify-content: center; |
|||
background-color: #FFFFFF; |
|||
} |
|||
|
|||
.cs { |
|||
margin-bottom: 20upx; |
|||
} |
|||
|
|||
.mytab { |
|||
display: flex; |
|||
} |
|||
|
|||
.mytabline { |
|||
flex: 1; |
|||
text-align: center; |
|||
padding: 20rpx 0; |
|||
color: #666; |
|||
position: relative; |
|||
font-size: 0.875rem; |
|||
} |
|||
|
|||
.active_in { |
|||
color: #101010; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.active_in::after { |
|||
content: ""; |
|||
position: absolute; |
|||
bottom: 0; |
|||
left: 50%; |
|||
transform: translateX(-50%); |
|||
height: 8rpx; |
|||
background-color: #007AFF; |
|||
width: 40rpx; |
|||
border-radius: 8rpx; |
|||
} |
|||
|
|||
.loginbox { |
|||
box-sizing: border-box; |
|||
padding: 30rpx; |
|||
|
|||
} |
|||
|
|||
.loginimg { |
|||
width: 100%; |
|||
} |
|||
|
|||
.logo { |
|||
height: 200rpx; |
|||
width: 200rpx; |
|||
margin-left: auto; |
|||
margin-right: auto; |
|||
margin-bottom: 50rpx; |
|||
} |
|||
|
|||
.conone { |
|||
margin: 30rpx 0; |
|||
align-items: center; |
|||
} |
|||
|
|||
.conone .uni-input-wrapper { |
|||
position: relative; |
|||
} |
|||
|
|||
.conone .uni-input { |
|||
background-color: #F7F9FF; |
|||
height: 90rpx; |
|||
line-height: 90rpx; |
|||
padding: 0 0 0 20rpx; |
|||
} |
|||
|
|||
.conone .title { |
|||
font-size: .875rem; |
|||
align-items: center; |
|||
margin-bottom: 20rpx; |
|||
letter-spacing: 1rpx; |
|||
} |
|||
|
|||
.conone .title image { |
|||
margin-right: 6rpx; |
|||
} |
|||
|
|||
.uni-easyinput .is-input-border { |
|||
border-color: transparent !important; |
|||
} |
|||
|
|||
.loginbtnbox { |
|||
margin-top: 40rpx; |
|||
} |
|||
|
|||
.loginbtn { |
|||
color: #fff; |
|||
font-size: 0.875rem; |
|||
height: 100rpx; |
|||
line-height: 100rpx; |
|||
background: #3C9CFF; |
|||
border-radius: 8rpx; |
|||
border: none; |
|||
outline: none; |
|||
} |
|||
|
|||
.conone .uni-icon { |
|||
float: right; |
|||
position: absolute; |
|||
right: 20rpx; |
|||
color: #ccc; |
|||
font-size: 1.25rem; |
|||
} |
|||
|
|||
.conone .uni-eye-active { |
|||
color: #5a7cf3; |
|||
} |
|||
</style> |
@ -1,12 +1,16 @@ |
|||
let request_url = "http://123.56.115.74:8088/api" |
|||
let request_url = "http://10.117.133.80:8088/api" |
|||
// let request_url = "http://192.168.0.113:12080/admin-api"
|
|||
let appUpdateUrl = "http://10.117.133.80:8088/appUpdate.json" |
|||
|
|||
|
|||
let isDevelopment = true |
|||
//30分钟
|
|||
let pageTimeOut =30*60*1000 |
|||
let pageTimeOut =30 |
|||
|
|||
export default { |
|||
request_url, |
|||
appUpdateUrl, |
|||
isDevelopment, |
|||
pageTimeOut |
|||
|
|||
} |
|||
|
Loading…
Reference in new issue