付延余
2023-03-24 eb9ae89c3e9f66fe5d0f39092a41e5c09bd86fc6
获取司机定位微信接口签到,货代首页列表详情
10个文件已修改
280 ■■■■■ 已修改文件
manifest.json 156 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/customer-index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-my/customer-my.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/userPassword.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -1,75 +1,83 @@
{
    "name" : "unattended-app",
    "appid" : "__UNI__103882A",
    "description" : "",
    "versionName" : "1.0.0",
    "versionCode" : "100",
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
        "usingComponents" : true,
        "nvueStyleCompiler" : "uni-app",
        "compilerVersion" : 3,
        "splashscreen" : {
            "alwaysShowBeforeRender" : true,
            "waiting" : true,
            "autoclose" : true,
            "delay" : 0
        },
        /* 模块配置 */
        "modules" : {},
        /* 应用发布信息 */
        "distribute" : {
            /* android打包配置 */
            "android" : {
                "permissions" : [
                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                ]
            },
            /* ios打包配置 */
            "ios" : {},
            /* SDK配置 */
            "sdkConfigs" : {}
        }
    },
    /* 快应用特有相关 */
    "quickapp" : {},
    /* 小程序特有相关 */
    "mp-weixin" : {
        "appid" : "wx4a62fc1684c429a9",
        "setting" : {
            "urlCheck" : false,
            "es6" : true,
            "minified" : true,
            "postcss" : false
        },
        "usingComponents" : true
    },
    "mp-alipay" : {
        "usingComponents" : true
    },
    "mp-baidu" : {
        "usingComponents" : true
    },
    "mp-toutiao" : {
        "usingComponents" : true
    },
    "uniStatistics" : {
        "enable" : false
    },
    "vueVersion" : "2"
}
    "name": "unattended-app",
    "appid": "__UNI__103882A",
    "description": "",
    "versionName": "1.0.0",
    "versionCode": "100",
    "transformPx": false,
    /* 5+App特有相关 */
    "app-plus": {
        "usingComponents": true,
        "nvueStyleCompiler": "uni-app",
        "compilerVersion": 3,
        "splashscreen": {
            "alwaysShowBeforeRender": true,
            "waiting": true,
            "autoclose": true,
            "delay": 0
        },
        /* 模块配置 */
        "modules": {},
        /* 应用发布信息 */
        "distribute": {
            /* android打包配置 */
            "android": {
                "permissions": [
                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                ]
            },
            /* ios打包配置 */
            "ios": {},
            /* SDK配置 */
            "sdkConfigs": {}
        }
    },
    /* 快应用特有相关 */
    "quickapp": {},
    /* 小程序特有相关 */
    "mp-weixin": {
        "appid": "wx4a62fc1684c429a9",
        "permission": {
            "scope.userFuzzyLocation": {
                "desc": "你的位置信息将用于小程序位置接口的效果展示"
            }
        },
        "requiredPrivateInfos": [
            "getFuzzyLocation"
        ],
        "setting": {
            "urlCheck": false,
            "es6": true,
            "minified": true,
            "postcss": false
        },
        "usingComponents": true
    },
    "mp-alipay": {
        "usingComponents": true
    },
    "mp-baidu": {
        "usingComponents": true
    },
    "mp-toutiao": {
        "usingComponents": true
    },
    "uniStatistics": {
        "enable": false
    },
    "vueVersion": "2"
}
pages.json
@@ -153,7 +153,6 @@
                "navigationBarTitleText": "矿场签到",
                "enablePullDownRefresh": false
            }
        }
    ],
    "tabBar": {
@@ -205,4 +204,4 @@
            "query": "" //启动参数,在页面的onLoad函数里面得到
        }]
    }
}
}
pages/customer-page/customer-index/customer-index.vue
@@ -192,7 +192,6 @@
        },
        // 提煤单详情
        cardBodyClick(name) {
            console.log('提煤单详情', name);
            let code = null;
            this.orderPlanData.forEach(item => {
                if (item.id == name) {
pages/customer-page/customer-my/customer-my.vue
@@ -131,25 +131,27 @@
    },
    methods: {
        init() {
            uni.showLoading({
                title: '加载中...'
            });
            this.getAllHuoDaiByCustomerId();
            this.getFleet();
            uni.hideLoading();
        },
        // 获取货代列表
        getAllHuoDaiByCustomerId() {
            uni.showLoading({
                title: '加载中...'
            });
            this.$reqGet('getAllHuoDaiByCustomerId').then(res => {
                uni.hideLoading();
                this.huoDaiData = res.data;
                console.log('货代列表', res);
            });
        },
        // 获取车队列表
        getFleet() {
            uni.showLoading({
                title: '加载中...'
            });
            this.$reqGet('getFleet').then(res => {
                uni.hideLoading();
                this.fleetData = res.data;
                console.log('车队列表', res);
            });
        },
        // 添加货代
@@ -160,7 +162,6 @@
        },
        // 添加车队
        addFleet() {
            console.log('添加车队');
            this.updateGroupShow = true;
        },
        addNewFleetPopupClose() {
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -52,6 +52,7 @@
            yyId: null,
            dayRZ: [],
            coalDetailsData: {}, // 提煤单详情
            currentPageCoalStatus:0,// 当前页面提煤单状态
            // 获取所在磅房参数
            getWeightHouseObj: {
                deptId: '',
@@ -76,7 +77,8 @@
                openId: null,
                openName: ''
            },
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'] // 状态
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'] ,// 状态
        };
    },
    onShow() {
@@ -128,6 +130,8 @@
                    // 获取客服openId参数赋值
                    this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
                    this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
                    // 获取提煤单状态
                    this.currentPageCoalStatus = this.coalDetailsData.status
                }
            });
        },
@@ -148,7 +152,7 @@
        // 签到
        arriveClick() {
            uni.navigateTo({
                url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}`
                url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}&coalStatus=${this.currentPageCoalStatus}`
            });
        },
        // 入场申请
@@ -238,7 +242,7 @@
        margin: vww(20);
        margin-bottom: vww(10);
        height: 40%;
        font-size: vww(16);
        font-size: vww(18);
        font-weight: 600;
        view {
            margin-bottom: vww(10);
pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue
@@ -3,13 +3,14 @@
        <view class="driver" style="background:url(../../../../../static/image/coalBackgroud/coal-background.png) no-repeat;background-size:100% 100%;">
            <view class="driver-coalOne">电子提煤单</view>
            <view class="driver-coalTwo">
                <view class="">{{ coalData.deptName || '暂无所属矿' }}</view>
                <view class="">{{ coalData.coalName || '暂无煤种' }}</view>
                <view class="">{{ coalData.carNo || '暂无车牌' }}</view>
                <view>{{ coalData.code || '暂无订单编号' }}</view>
                <view>{{ coalData.deptName || '暂无所属矿' }}</view>
                <view>{{ coalData.coalName || '暂无煤种' }}</view>
                <view>{{ coalData.carNo || '暂无车牌' }}</view>
            </view>
            <view class="driver-coalThree">
                <view class="">{{ coalData.customerName || '暂无单位' }}</view>
                <view class="">{{ coalData.yuYueTime || '暂无时间' }}</view>
                <view>{{ coalData.customerName || '暂无单位' }}</view>
                <view>{{ coalData.yuYueTime ? coalData.yuYueTime.slice(0, 10) + ' ' + coalData.yuYueTime.slice(11, 22) : '暂无时间' }}</view>
            </view>
            <view class="driver-coalFour"><image src="@/static/logo.gif" mode=""></image></view>
        </view>
@@ -85,9 +86,12 @@
            view:nth-child(3) {
                margin-top: vww(15);
            }
            view:nth-child(4) {
                margin-top: vww(15);
            }
        }
        &-coalThree {
            margin-top: vww(76);
            margin-top: vww(46);
            font-size: vww(18);
            font-family: Source Han Sans CN, Source Han Sans CN-Bold;
            font-weight: 700;
@@ -98,7 +102,7 @@
            }
        }
        &-coalFour {
            margin: vww(68) 0 0 45.5%;
            margin: vww(58.5) 0 0 45.5%;
            image {
                width: vww(35);
                height: vww(35);
pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue
@@ -5,7 +5,7 @@
        <view class="punchTheClock_container">
            <view class="punchTheClock_btn" @click="arrive">
                <view>
                    <p>签到/打卡</p>
                    <p>{{ coalStatus == 2 ? '已签到' : '签到/打卡' }}</p>
                    <p>{{ nowTime }}</p>
                </view>
            </view>
@@ -21,13 +21,15 @@
import { todayDate } from '@/utils/util.js';
export default {
    onLoad(params) {
        if (params.orderPlanId) {
        if (params.orderPlanId && params.coalStatus) {
            this.punchTheClockObj.id = params.orderPlanId;
            this.coalStatus = params.coalStatus;
        }
    },
    data() {
        return {
            nowTime: '',
            coalStatus: 0,
            punchTheClockObj: {
                latitude: null,
                longitude: null,
@@ -36,38 +38,39 @@
        };
    },
    onShow() {
        this.todayDate();
        // 获取权限信息
        wx.getSetting({
            success(res) {
                if (!res.authSetting['scope.userFuzzyLocation']) {
                    wx.authorize({
                        scope: 'scope.userFuzzyLocation',
                        success(res) {
                            console.log(res);
                            if (res.errMsg == 'authorize:ok') {
                                // 获取位置信息
                                this.getFuzzyLocation();
                            }
                        }
                    });
                } else {
                    this.getFuzzyLocation();
                }
            },
            fail() {
                console.log('获取失败');
            }
        });
        this.getSetting(); //获取授权
        this.getFuzzyLocation(); //获取位置
        this.todayDate(); //当前时间
    },
    methods: {
        getSetting() {
            // 获取权限信息
            wx.getSetting({
                success(res) {
                    if (!res.authSetting['scope.userFuzzyLocation']) {
                        wx.authorize({
                            scope: 'scope.userFuzzyLocation',
                            success(res) {
                                uni.showToast({
                                    title: '授权成功!'
                                });
                            }
                        });
                    }
                },
                fail() {
                    console.log('获取失败');
                }
            });
        },
        getFuzzyLocation() {
            let that = this;
            wx.getFuzzyLocation({
                type: 'wgs84',
                success(res) {
                    console.log(res, '获取位置');
                    this.punchTheClockObj.latitude = res.latitude;
                    this.punchTheClockObj.longitude = res.longitude;
                    console.log(res, '获取位置', that);
                    that.punchTheClockObj.latitude = res.latitude;
                    that.punchTheClockObj.longitude = res.longitude;
                }
            });
        },
@@ -120,6 +123,9 @@
            display: flex;
            justify-content: center;
            align-items: center;
            p{
                text-align: center;
            }
        }
        .punchTheClock_text {
            display: flex;
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -57,8 +57,14 @@
            });
        },
        cardBodyClick(id) {
            let code = null;
            this.orderPlanData.forEach(item => {
                if (item.id == id) {
                    code = item.code;
                }
            });
            uni.navigateTo({
                url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${id}`
                url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${id}&code=${code}`
            });
        },
        // 转发
pages/login/login.vue
@@ -92,7 +92,6 @@
            });
            this.$nextTick(() => {
                apiLoginWx({ code: uni.getStorageSync('openid') }).then(res => {
                    uni.hideLoading();
                    if (res.code != 1) {
                        this.$u.toast('恭喜您,登录成功!');
                        // 登陆成功,存储相关信息
@@ -104,6 +103,7 @@
                            this.setUserTabbar(res.data.type);
                            uni.setStorageSync('roleType', res.data.type);
                            setCustomerId(res.data.customerid);
                            uni.hideLoading();
                            //跳转页面
                            this.$nextTick(() => {
                                redirectHome();
pages/login/userPassword.vue
@@ -43,8 +43,9 @@
    },
    data() {
        return {
            // username: '12222222222', // 客户
            username: '13333333332',// 司机
            username: '12222222222', // 客户
            // username:'13333333331',//货代
            // username: '13333333332',// 司机
            password: '123456',
            remember: true,
            baseUrl: ''