wanshenmean
2025-04-10 54a7df532e4fd82a1462edd4475403ed9b2be0cc
添加接口地址更改
已修改7个文件
180 ■■■■■ 文件已修改
代码管理/NEWCode/WIDESEAWCS_PDA/common/http.interceptor.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/NEWCode/WIDESEAWCS_PDA/pages/SetAddress/SetAddress.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/NEWCode/WIDESEAWCS_PDA/pages/login/login.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/NEWCode/WIDESEAWCS_PDA/pages/叫料/正极叫料.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/NEWCode/WIDESEAWCS_PDA/pages/叫料/负极叫料.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/NEWCode/WIDESEAWCS_PDA/uview-ui/libs/request/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/NEWCode/WIDESEAWCS_PDA/common/http.interceptor.js
@@ -1,9 +1,10 @@
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,
@@ -13,21 +14,35 @@
    // è¯·æ±‚拦截,配置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';
´úÂë¹ÜÀí/NEWCode/WIDESEAWCS_PDA/pages/SetAddress/SetAddress.vue
@@ -82,6 +82,11 @@
        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,
@@ -91,10 +96,12 @@
                        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 => {
´úÂë¹ÜÀí/NEWCode/WIDESEAWCS_PDA/pages/login/login.vue
@@ -1,8 +1,12 @@
<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> -->
@@ -17,11 +21,11 @@
                        :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">
                    ç™»å½•
@@ -48,13 +52,17 @@
                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) {
@@ -67,19 +75,19 @@
                //                 }
                //             }
                //         })
                        //如果验证码开关是开就加载验证码
                        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() {
@@ -104,12 +112,12 @@
                    //     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()
@@ -136,6 +144,14 @@
</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;
´úÂë¹ÜÀí/NEWCode/WIDESEAWCS_PDA/pages/½ÐÁÏ/Õý¼«½ÐÁÏ.vue
@@ -92,21 +92,32 @@
                }
            },
            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) {
@@ -151,8 +162,9 @@
                };
                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('呼叫成功');
´úÂë¹ÜÀí/NEWCode/WIDESEAWCS_PDA/pages/½ÐÁÏ/¸º¼«½ÐÁÏ.vue
@@ -101,7 +101,7 @@
                            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();
@@ -162,10 +162,11 @@
                    // ...其他需要传递的参数
                };
                // ä½¿ç”¨åˆ›æ™ºå®Œæ•´æŽ¥å£
                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('呼叫成功');
´úÂë¹ÜÀí/NEWCode/WIDESEAWCS_PDA/uview-ui/libs/request/index.js
@@ -30,6 +30,7 @@
            options.complete = (response) => {
                // è¯·æ±‚返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
                uni.hideLoading();
                // æ¸…除定时器,如果请求回来了,就无需loading
                clearTimeout(this.config.timer);
                this.config.timer = null;
@@ -74,7 +75,6 @@
                    }
                }
            }
            // åˆ¤æ–­æ˜¯å¦ä¸ºå®Œæ•´ URL,如果是则不使用 baseUrl
            if (options.url.includes('http://') || options.url.includes('https://')) {
                options.url = options.url;
´úÂë¹ÜÀí/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS.xml
@@ -32,6 +32,13 @@
            <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 é…ç½®æ–‡ä»¶