| | |
| | | let baseUrl = 'http://192.168.0.191:9291' |
| | | let baseUrl = '' |
| | | const value = uni.getStorageSync('storage_key_ipAddress'); |
| | | const install = (Vue, vm) => { |
| | | |
| | | let resolvedBaseUrl = baseUrl === '' ? (value && value.WCSIP ? value.WCSIP : "") : baseUrl; |
| | | // æ¤ä¸ºèªå®ä¹é
ç½®åæ°ï¼å
·ä½åæ°è§ä¸æ¹è¯´æ |
| | | Vue.prototype.$u.http.setConfig({ |
| | | baseUrl: baseUrl, |
| | | baseUrl: resolvedBaseUrl, |
| | | loadingText: 'åªåå è½½ä¸~', |
| | | loadingTime: 5000, |
| | | originalData: true, |
| | |
| | | // è¯·æ±æ¦æªï¼é
ç½®Tokençåæ° |
| | | Vue.prototype.$u.http.interceptor.request = (config) => { |
| | | // 夿æ¯å¦ä¸ºå®æ´ URLï¼å¦ææ¯åä¸ä½¿ç¨ baseUrl |
| | | if (config.url.includes('http://') || config.url.includes('https://')) { |
| | | config.baseURL = ''; |
| | | if (resolvedBaseUrl === '') { |
| | | if (config.url.includes('http://') || config.url.includes('https://')) { |
| | | config.baseURL = ''; |
| | | resolve(config); |
| | | } else { |
| | | const storedValue = uni.getStorageSync('storage_key_ipAddress'); |
| | | if (storedValue && storedValue.WCSIP) { |
| | | config.baseURL = storedValue.WCSIP; |
| | | baseUrl = storedValue.WCSIP; |
| | | } else { |
| | | vm.$u.toast('请å
æ·»å åå°IPå°å'); |
| | | return false; // åæ¶æ¬æ¬¡è¯·æ± |
| | | } |
| | | // uni.getStorage({ |
| | | // key: 'storage_key_ipAddress', |
| | | // success: (res) => { |
| | | // debugger; |
| | | // console.log(res.data.WCSIP); |
| | | // config.baseURL = res.data.WCSIP; |
| | | // baseUrl = res.data.WCSIP |
| | | // }, |
| | | // fail: (err) => { |
| | | // debugger; |
| | | // vm.$u.toast('请å
æ·»å åå°IPå°å'); |
| | | // }, |
| | | // }); |
| | | } |
| | | } else { |
| | | uni.getStorage({ |
| | | key: 'storage_key_ipAddress', |
| | | success: (res) => { |
| | | debugger; |
| | | console.log(res.data.WCSIP); |
| | | config.baseURL = res.data.WCSIP; |
| | | }, |
| | | fail: (err) => { |
| | | console.log("æ²¡ææ¾å°åå¨çIPå°å,使ç¨é»è®¤BaseURL") |
| | | config.baseURL = baseUrl; |
| | | }, |
| | | }); |
| | | config.baseURL = resolvedBaseUrl; |
| | | } |
| | | |
| | | config.header.Token = 'xxxxxx'; |
| | |
| | | methods: { |
| | | submit() { |
| | | this.$refs.uForm.validate().then(res => { |
| | | debugger; |
| | | if (!res) { |
| | | this.$t.message.toast('éªè¯ä¸éè¿'); |
| | | return false; |
| | | } |
| | | const ipAddress = { |
| | | WCSIP: this.valiFormData.WCSIP, |
| | | CZZJip: this.valiFormData.CZZJip, |
| | |
| | | key: 'storage_key_ipAddress', |
| | | data: ipAddress, |
| | | success: (res) => { |
| | | // å¨éè¦å·æ°é¡µé¢çå°æ¹è°ç¨ |
| | | location.reload(); |
| | | this.$t.message.toast('ä¿åæå'); |
| | | uni.switchTab({ |
| | | url: '/pages/index/index' |
| | | }) |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | } |
| | | }); |
| | | }).catch(errors => { |
| | |
| | | <template> |
| | | <view class="login"> |
| | | <view class="tools"> |
| | | <uni-icons size="48rpx" color="#292C39" @click="doScan"></uni-icons> |
| | | <uni-icons type="gear-filled" size="48rpx" color="#292C39" @click="goSetAddress"></uni-icons> |
| | | </view> |
| | | <view class="login-main"> |
| | | <text class="login-main-title">欢è¿ç»å½</text> |
| | | <view class="login-main-subtitle">èè½æ°è½æºPDAç¨åº</view> |
| | | <view class="login-main-subtitle">èµ£éæ°è½æºPDAç¨åº</view> |
| | | <view class="login-main-body"> |
| | | <!-- <login-input key="username" v-model="user" clearable placeholder="ç¨æ·å" |
| | | :maxlength="20"></login-input> --> |
| | |
| | | :maxlength="10"></uni-easyinput> |
| | | <view class="canvas-img-code" @click="refresh()"> |
| | | <img :src="validCodeBase64" :style="{ width: width + 'px', height: height + 'px' }" |
| | | class="login-validCode-img"/> |
| | | <!-- <img v-show="validCodeBase64 != ''" :src="validCodeBase64" :style="{ width: width + 'px', height: height + 'px' }"/> --> |
| | | class="login-validCode-img" /> |
| | | <!-- <img v-show="validCodeBase64 != ''" :src="validCodeBase64" :style="{ width: width + 'px', height: height + 'px' }"/> --> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <u-button type="success" size="default" shape="circle" :ripple="true" ripple-bg-color="#909399" |
| | | @click="login"> |
| | | ç»å½ |
| | |
| | | SYS_DEFAULT_CAPTCHA_OPEN: true, |
| | | validCodeBase64: '', |
| | | validCodeReqNo: '', |
| | | code:'1234' |
| | | code: '1234' |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.configSysBaseList() |
| | | }, |
| | | methods: { |
| | | //跳转å°SetAddressé¡µé¢ |
| | | goSetAddress() { |
| | | this.$u.route('/pages/SetAddress/SetAddress'); |
| | | }, |
| | | configSysBaseList() { |
| | | // this.$u.get('/api/User/getVierificationCode', null).then(res => { |
| | | // if (res.code == 200) { |
| | |
| | | // } |
| | | // } |
| | | // }) |
| | | //妿éªè¯ç å¼å
³æ¯å¼å°±å è½½éªè¯ç |
| | | if (this.SYS_DEFAULT_CAPTCHA_OPEN) { |
| | | this.loginCaptcha() |
| | | } |
| | | // } |
| | | // }) |
| | | //妿éªè¯ç å¼å
³æ¯å¼å°±å è½½éªè¯ç |
| | | if (this.SYS_DEFAULT_CAPTCHA_OPEN) { |
| | | this.loginCaptcha() |
| | | } |
| | | // } |
| | | // }) |
| | | }, |
| | | loginCaptcha() { |
| | | this.$u.get('/api/User/getVierificationCode', null).then(res => { |
| | | |
| | | this.validCodeBase64 = "data:image/png;base64," + res.img; |
| | | |
| | | this.validCodeBase64 = "data:image/png;base64," + res.img; |
| | | this.validCodeReqNo = res.uuid |
| | | |
| | | |
| | | }) |
| | | }, |
| | | refresh() { |
| | |
| | | // UserName: this.user, |
| | | // VerificationCode: this.SYS_DEFAULT_CAPTCHA_OPEN ? this.code : null |
| | | // } |
| | | this.$u.post('/api/User/login', |
| | | {UUID: this.validCodeReqNo, |
| | | passWord: this.pass, |
| | | userName: this.user, |
| | | verificationCode: this.code} |
| | | ).then(res => { |
| | | this.$u.post('/api/User/login', { |
| | | UUID: this.validCodeReqNo, |
| | | passWord: this.pass, |
| | | userName: this.user, |
| | | verificationCode: this.code |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.$t.message.toast("ç»å½æå") |
| | | this.$t.message.closeLoading() |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .tools { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-bottom: 32rpx; |
| | | box-sizing: border-box; |
| | | padding: 0 12rpx; |
| | | } |
| | | |
| | | .login { |
| | | // font-family: PingFangSC-Regular, PingFang SC; |
| | | // background-color: $color-white; |
| | |
| | | } |
| | | }, |
| | | submit(cb) { |
| | | this.$t.message.loading(); |
| | | let formDataParam = { |
| | | current: this.current, |
| | | size: this.size |
| | | }; |
| | | // 使ç¨åæºå®æ´æ¥å£ |
| | | this.$u.post('/api/PDA/AGVPage', null).then(res => { |
| | | console.log(res); |
| | | this.$t.message.closeLoading(); |
| | | cb && cb(); |
| | | if (cb != null) this.listData = []; |
| | | this.listData = [...this.listData, ...res.data]; |
| | | console.log(this.listData); |
| | | }).catch((err) => { |
| | | this.$t.message.toast(err.message); |
| | | uni.getStorage({ |
| | | key: 'storage_key_ipAddress', |
| | | success: (res) => { |
| | | this.$t.message.loading(); |
| | | let formDataParam = { |
| | | current: this.current, |
| | | size: this.size |
| | | }; |
| | | // 使ç¨åæºå®æ´æ¥å£ |
| | | this.$u.post(res.data.CZFJiP + '/api/PDA/AGVPage', null).then(res => { |
| | | console.log(res); |
| | | this.$t.message.closeLoading(); |
| | | cb && cb(); |
| | | if (cb != null) this.listData = []; |
| | | this.listData = [...this.listData, ...res.data]; |
| | | console.log(this.listData); |
| | | }).catch((err) => { |
| | | this.$t.message.toast(err.message); |
| | | }); |
| | | }, |
| | | fail: (err) => { |
| | | this.$t.message.toast('请å
设置IPå°å'); |
| | | uni.navigateTo({ |
| | | url: '/pages/SetAddress/SetAddress', |
| | | }); |
| | | }, |
| | | }); |
| | | }, |
| | | clickLoadMore(e) { |
| | |
| | | }; |
| | | this.$u.post('/api/PDA/AddCZTask', formDataParam).then(res => { |
| | | if (res.status) { |
| | | const value = uni.getStorageSync('storage_key_ipAddress'); |
| | | // 使ç¨åæºå®æ´æ¥å£ |
| | | this.$u.post('/api/PDA/insertTask', formDataParam).then(res => { |
| | | this.$u.post(value.CZZJip + '/api/PDA/insertTask', formDataParam).then(res => { |
| | | this.$t.message.closeLoading(); |
| | | if (res.status) { |
| | | this.$t.message.toast('å¼å«æå'); |
| | |
| | | size: this.size |
| | | }; |
| | | // 使ç¨åæºå®æ´æ¥å£ |
| | | this.$u.post(res.data.CZFJiP, null).then(res => { |
| | | this.$u.post(res.data.CZFJiP + '/api/PDA/AGVPage', null).then(res => { |
| | | console.log(res); |
| | | this.$t.message.closeLoading(); |
| | | cb && cb(); |
| | |
| | | // ...å
¶ä»éè¦ä¼ éçåæ° |
| | | }; |
| | | |
| | | // 使ç¨åæºå®æ´æ¥å£ |
| | | this.$u.post('/api/PDA/insertTask', formDataParam).then(res => { |
| | | this.$u.post('/api/PDA/AddCZTask', formDataParam).then(res => { |
| | | if (res.status) { |
| | | this.$u.post('/api/PDA/AddCZTask', formDataParam).then(res => { |
| | | const value = uni.getStorageSync('storage_key_ipAddress'); |
| | | // 使ç¨åæºå®æ´æ¥å£ |
| | | this.$u.post(value.CZFJiP + '/api/PDA/insertTask', formDataParam).then(res => { |
| | | this.$t.message.closeLoading(); |
| | | if (res.status) { |
| | | this.$t.message.toast('å¼å«æå'); |
| | |
| | | options.complete = (response) => { |
| | | // 请æ±è¿ååï¼éèloading(å¦æè¯·æ±è¿åå¿«çè¯ï¼å¯è½ä¼æ²¡æloading) |
| | | uni.hideLoading(); |
| | | |
| | | // æ¸
é¤å®æ¶å¨ï¼å¦æè¯·æ±åæ¥äºï¼å°±æ éloading |
| | | clearTimeout(this.config.timer); |
| | | this.config.timer = null; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 夿æ¯å¦ä¸ºå®æ´ URLï¼å¦ææ¯åä¸ä½¿ç¨ baseUrl |
| | | if (options.url.includes('http://') || options.url.includes('https://')) { |
| | | options.url = options.url; |
| | |
| | | <param name="sysSchedule"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:WIDESEAWCS_WCSServer.Controllers.Task.TaskController.ReceiveWMSTask(System.Collections.Generic.List{WIDESEAWCS_DTO.TaskInfo.WMSTaskDTO})"> |
| | | <summary> |
| | | |
| | | </summary> |
| | | <param name="taskDTOs"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="T:WIDESEAWCS_WCSServer.Filter.AutoMapperConfig"> |
| | | <summary> |
| | | éæå
¨å± AutoMapper é
ç½®æä»¶ |