| | |
| | | |
| | | // const BaseUrl = "http://192.168.3.159:9999/"; |
| | | import {BaseUrl as wrBaseUrl} from '@/api/request.js' |
| | | const BaseUrl = "http://192.168.0.120:9999" |
| | | // const BaseUrl = "http://192.168.0.120:9999" |
| | | const BaseUrl = "http://192.168.0.130:9999" |
| | | |
| | | // 登录 |
| | | // function apiLogin({ |
| | |
| | | 500: responseError |
| | | } |
| | | |
| | | // const BaseUrl = "http://192.168.3.159:9999/"; |
| | | // const BaseUrl = "http://192.168.0.120:9997"; |
| | | const BaseUrl = "http://192.168.0.120:9997"; |
| | | // const BaseUrl = "http://192.168.0.120:9997" |
| | | // const webSocketUrl = "ws://192.168.0.120:9997/wrzs/ws/info" |
| | | const BaseUrl = "http://192.168.0.130:9997"; |
| | | const webSocketUrl = "ws://192.168.0.130:9997/wrzs/ws/info" |
| | | |
| | | // 请求拦截 |
| | | const fetch = (url, opt) => { |
| | |
| | | |
| | | export { |
| | | fetch, |
| | | BaseUrl |
| | | BaseUrl, |
| | | webSocketUrl |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | ,{ |
| | | "path" : "pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | } |
| | | ], |
| | | "tabBar": { |
| | | // "color": "#999794", |
| | |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '未成功添加'); |
| | | this.$u.toast(res.data ? res.data : '未成功添加'); |
| | | } |
| | | console.log('邀请货代', res); |
| | | }); |
| | | }, |
| | | // 邀请司机 |
| | |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | title: res.data, |
| | | icon: 'null', |
| | | duration: 2000 |
| | | }); |
| | |
| | | <script> |
| | | import card from '@/components/card/card.vue'; |
| | | import { customerId } from '@/utils/status'; |
| | | // import colorGradient from '@/uni_modules/uview-ui/libs/function/colorGradient'; |
| | | import { todayDate } from '@/utils/util.js'; |
| | | export default { |
| | | components: { |
| | |
| | | }, |
| | | onShow() { |
| | | this.init(); |
| | | console.log(todayDate, '获取今天的日期'); |
| | | }, |
| | | methods: { |
| | | init() { |
| | |
| | | uni.hideLoading(); |
| | | }); |
| | | }, |
| | | // 领取点击 |
| | | // numInput(id) { |
| | | |
| | | // }, |
| | | popupDetermineClick() { |
| | | if (this.receiveNum) { |
| | | this.getOrderNum.num = this.receiveNum; |
| | |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }); |
| | | } else { |
| | | this.$u.toast(res.data ? res.data : '领取失败'); |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | }, |
| | | /** |
| | | * @客户领取 |
| | | * 领取弹框 |
| | | */ |
| | | receiveClick(item) { |
| | | this.show = true; |
| | | |
| | | this.getOrderNum.id = item.id; // 获取领取提煤单的id |
| | | }, |
| | | open() { |
| | | console.log('打开了'); |
| | | }, |
| | | open() {}, |
| | | close() { |
| | | console.log('关闭方法'); |
| | | this.show = false; |
| | | this.receiveNum = null; |
| | | }, |
| | |
| | | // 新建车队 |
| | | this.$reqPost('saveFleet', this.addGroupForm, 'params').then(res => { |
| | | uni.hideLoading(); |
| | | console.log('新建车队', res); |
| | | if (res.code == 0) { |
| | | this.$u.toast('添加成功'); |
| | | this.getFleet(); |
| | | } else { |
| | | this.$u.toast(res.data ? res.data : '添加失败'); |
| | | } |
| | | }); |
| | | this.updateGroupShow = false; |
| | | }, |
| | |
| | | }, |
| | | yuYuePostParams:{ |
| | | takeCoalId: null, |
| | | yuYueId: null, |
| | | yuYueId: null |
| | | }, |
| | | yuYueData: [], |
| | | isRCSQ: false, // 入场申请接口控制 |
| | |
| | | this.$reqPost('yuYue', { takeCoalId: this.yuYuePostParams.takeCoalId, yuYueId: this.yuYuePostParams.yuYueId }, 'params').then(res => { |
| | | if (res.code == 0) { |
| | | this.$u.toast('预约成功!'); |
| | | } else { |
| | | this.$u.toast(res.data ? res.data : '预约失败'); |
| | | } |
| | | setTimeout(() => { |
| | | this.yuYueList(); |
New file |
| | |
| | | <template> |
| | | <!-- 打卡 --> |
| | | <view class="punchTheClock"> |
| | | <!-- 打卡按钮 --> |
| | | <view class="punchTheClock_container"> |
| | | <view class="punchTheClock_btn">签到/打卡</view> |
| | | <view class="punchTheClock_text"><text>未进入考勤区域</text></view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return {}; |
| | | }, |
| | | methods: {} |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .punchTheClock{ |
| | | display:flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | .punchTheClock_container{ |
| | | .punchTheClock_btn{ |
| | | width:vww(240); |
| | | height:vww(240); |
| | | border-radius: 50%; |
| | | background-color: #ffd63e; |
| | | display:flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .punchTheClock_text{ |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | </style> |
| | |
| | | <view class="top"> |
| | | <view class="top_left"><text>41.5</text></view> |
| | | <view class="top_right"> |
| | | <view class="">称重: <u--text type="success" text="正常" size="34"></u--text></view> |
| | | <view class="">红外: <u--text type="success" text="正常" size="34"></u--text></view> |
| | | <view class="">雷达: <u--text type="success" text="正常" size="34"></u--text></view> |
| | | <view class=""> |
| | | 称重: |
| | | <u--text type="success" text="正常" size="34"></u--text> |
| | | </view> |
| | | <view class=""> |
| | | 红外: |
| | | <u--text type="success" text="正常" size="34"></u--text> |
| | | </view> |
| | | <view class=""> |
| | | 雷达: |
| | | <u--text type="success" text="正常" size="34"></u--text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom"><text>TIP:当前状态正常可以称重</text></view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | let socket = null; |
| | | import { webSocketUrl } from '@/api/request.js'; |
| | | export default { |
| | | onLoad(params) { |
| | | console.log('称重页面', params); |
| | |
| | | data() { |
| | | return { |
| | | takeCoalId: null, |
| | | weighList: {} |
| | | weighList: {}, |
| | | webSocket: null // webSocket实例 |
| | | // lockReconnect: false, // 重连锁,避免多次重连 |
| | | // maxReconnect: 6, // 最大重连次数, -1 标识无限重连 |
| | | // reconnectTime: 0, // 重连尝试次数 |
| | | // heartbeat: { |
| | | // interval: 30 * 1000, // 心跳间隔时间 |
| | | // timeout: 10 * 1000, // 响应超时时间 |
| | | // pingTimeoutObj: null, // 延时发送心跳的定时器 |
| | | // pongTimeoutObj: null, // 接收心跳响应的定时器 |
| | | // pingMessage: JSON.stringify({ type: 'ping' }) // 心跳请求信息 |
| | | // } |
| | | }; |
| | | }, |
| | | onShow() { |
| | | this.init(); |
| | | this.initWebSocket(); |
| | | }, |
| | | computed: { |
| | | token() { |
| | | return uni.getStorageSync('token'); |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | |
| | | // this.$reqPost('saveWeigh',{id:this.takeCoalId,skin:'',hair:''}).then(res=>{ |
| | | // console.log(res,"确认称重"); |
| | | // }) |
| | | }, |
| | | /** |
| | | * 初始化 weoSocket |
| | | */ |
| | | initWebSocket() { |
| | | // let wsUrl = `wss://192.168.0.120:9997/wrzs/ws/info?access_token=${this.token}`; |
| | | let wsUrl = `${webSocketUrl}?access_token=c954c7f5-f34b-453e-8c9d-e291747b401f`; |
| | | socket = uni.connectSocket({ |
| | | url: wsUrl, |
| | | header: { |
| | | CLIENT_TOC: 'Y' |
| | | }, |
| | | complete: res => { |
| | | console.log(res, 'socket结果'); |
| | | } |
| | | }); |
| | | socket.onOpen(() => { |
| | | console.log('onOpen'); |
| | | }); |
| | | socket.onMessage(res => { |
| | | console.log(res, '服务器返回的数据'); |
| | | }); // 获取服务器传来的数据,做相应处理 |
| | | socket.onClose(() => { |
| | | console.log('close'); |
| | | }); |
| | | socket.onError(err => { |
| | | console.log('socket报错', err); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | |
| | | }, |
| | | // 抢单请求 |
| | | qiangDan(id) { |
| | | // this.$reqPost('qiangDan', { orderPlanId: id, wxUserId: customerId }, 'params').then(res => { |
| | | this.$reqPost('qiangDan', { orderPlanId: id }, 'params').then(res => { |
| | | if (res.code == 0) { |
| | | this.$u.toast('抢单成功'); |
| | | } else { |
| | | this.$u.toast(res.data ? res.data : '抢单失败'); |
| | | } |
| | | console.log('抢单', res); |
| | | this.qiangDanList(); |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | username: '18804050607',// 客户 |
| | | username: 'appuser',// 客户 |
| | | // username: '18805080506',// 王楠(司机) |
| | | password: '123456', |
| | | remember: true, |
| | |
| | | <template> |
| | | <view class="register"> |
| | | <!-- <home-species title="注册"></home-species> --> |
| | | <view class="registerForm"> |
| | | <u--form :rules="rules" :model="registerFormModel" ref="regesterFormRef"> |
| | | <u-form-item labelWidth="20%" label="选择身份" borderBottom ref="roleRef" required> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import HomeSpecies from '@/components/home-species/HomeSpecies.vue'; |
| | | import { apiRegister } from '@/api/publicInterface.js'; |
| | | import { BaseUrl } from '@/api/publicInterface.js'; |
| | | export default { |
| | |
| | | // } |
| | | // }) |
| | | // }, |
| | | components: { |
| | | // HomeSpecies |
| | | }, |
| | | // 监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发 |
| | | onReady() { |
| | | // this.$refs.regesterFormRef.setRules(this.rules); |
| | |
| | | this.registerFormModel.username = this.registerFormModel.phone; |
| | | apiRegister(this.registerFormModel) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.data.code == 0) { |
| | | uni.showToast({ |
| | | title: '注册成功,即将进入登录!', |
| | |
| | | uni.redirectTo({ url: '/pages/login/login' }); |
| | | }, 1000); |
| | | } else { |
| | | this.$u.toast(res.data.msg); |
| | | this.$u.toast(res.data.data?res.data.data:'添加失败'); |
| | | } |
| | | }) |
| | | .catch(err => { |
| | |
| | | this.$u.toast('两次密码不一致'); |
| | | } |
| | | }, |
| | | // 音视频通话 |
| | | // callingIn() { |
| | | // uni.navigateTo({ |
| | | // url: '/pages/calling-index/calling-index' |
| | | // }); |
| | | // }, |
| | | // 单选框事件 |
| | | groupChange(e) { |
| | | console.log('单选框小组', e); |