qingyiay
2023-03-28 5c01be6370291febe52adfa74fad8101a197c388
微信绑定测试
6个文件已修改
232 ■■■■ 已修改文件
manifest.json 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 112 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/driver-index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/userPassword.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabbar-page/index-tabbar/index-tabbar.vue 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -56,6 +56,9 @@
                "desc": "你的位置信息将用于小程序位置接口的效果展示"
            }
        },
        "optimization": {
            "subPackages": true
        },
        "requiredPrivateInfos": [
            "getFuzzyLocation"
        ],
@@ -80,4 +83,4 @@
        "enable": false
    },
    "vueVersion": "2"
}
}
pages.json
@@ -14,13 +14,13 @@
        //         "enablePullDownRefresh": false
        //     }
        // },
        {
            "path": "pages/register/register",
            "style": {
                "navigationBarTitleText": "注册",
                "enablePullDownRefresh": false
            }
        },
        // {
        //     "path": "pages/register/register",
        //     "style": {
        //         "navigationBarTitleText": "注册",
        //         "enablePullDownRefresh": false
        //     }
        // },
        {
            "path": "pages/tabbar-page/index-tabbar/index-tabbar",
            "style": {
@@ -85,14 +85,15 @@
                "enablePullDownRefresh": false
            }
        }, {
        },
        {
            "path": "pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details",
            "style": {
                "navigationBarTitleText": "提煤单详情",
                "enablePullDownRefresh": false
            }
        }, {
        },
        {
            "path": "pages/customer-page/freight-forwarder-details/freight-forwarder-details",
            "style": {
                "navigationBarTitleText": "",
@@ -106,55 +107,112 @@
                "enablePullDownRefresh": false
            }
        }, {
            "path": "pages/public-page/forward/forward",
            "style": {
                "navigationBarTitleText": "转发",
                "enablePullDownRefresh": false
            }
        }, {
            "path": "pages/driver-page/appointment/appointment",
            "style": {
                "navigationBarTitleText": "时段",
                "enablePullDownRefresh": false
            }
        },
        // {
        //     "path": "pages/public-page/forward/forward",
        //     "style": {
        //         "navigationBarTitleText": "转发",
        //         "enablePullDownRefresh": false
        //     }
        // },
        // {
        //     "path": "pages/driver-page/appointment/appointment",
        //     "style": {
        //         "navigationBarTitleText": "时段",
        //         "enablePullDownRefresh": false
        //     }
        }, {
        // },
        {
            "path": "pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails",
            "style": {
                "navigationBarTitleText": "发运计划详情",
                "enablePullDownRefresh": false
            }
        }, {
        },
        {
            "path": "pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill",
            "style": {
                "navigationBarTitleText": "提煤单",
                "enablePullDownRefresh": false
            }
        }, {
        },
        {
            "path": "pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice",
            "style": {
                "navigationBarTitleText": "称重",
                "enablePullDownRefresh": false
            }
        }, {
        },
        {
            "path": "pages/login/wxLogin",
            "style": {
                "navigationBarTitleText": "",
                "enablePullDownRefresh": false
            }
        }, {
        },
        {
            "path": "pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock",
            "style": {
                "navigationBarTitleText": "矿场签到",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore",
            "style": {
                "navigationBarTitleText": "更多",
                "enablePullDownRefresh": false
            }
        }
    ],
    "subPackages": [{
        "root": "pages/register",
        "pages": [{
            "path": "register",
            "style": {
                "navigationBarTitleText": "注册",
                "enablePullDownRefresh": false
            }
        }]
    }, {
        "root": "pages/public-page",
        "pages": [{
            "path": "forward/forward",
            "style": {
                "navigationBarTitleText": "转发",
                "enablePullDownRefresh": false
            }
        }]
    }, {
        "root": "pages/driver-page/appointment",
        "pages": [{
            "path": "appointment",
            "style": {
                "navigationBarTitleText": "时段",
                "enablePullDownRefresh": false
            }
        }]
    }],
    "preloadRule": {
        "pages/login/login": {
            "network": "all",
            "packages": ["pages/register"]
        },
        "pages/tabbar-page/index-tabbar/index-tabbar": {
            "network": "all",
            "packages": ["pages/public-page"]
        },
        "pages/tabbar-page/index-tabbar/index-tabbar": {
            "network": "all",
            "packages": ["pages/driver-page/appointment"]
        }
    },
    "tabBar": {
        // "color": "#999794",
        // "selectedColor": "#007AFF",
pages/driver-page/driver-index/driver-index.vue
@@ -130,6 +130,21 @@
import { customerId } from '@/utils/status';
export default {
    props: {
        indexdriverBillOfLoadingData: {
            type: Array,
            default: []
        }
    },
    watch: {
        indexdriverBillOfLoadingData: {
            handler(v) {
                this.driverBillOfLoadingData = v;
            },
            deep: true,
            immediate: true
        }
    },
    data() {
        return {
            driverBillOfLoadingData: [],
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -61,6 +61,32 @@
<script>
import combinedTitle from '@/components/combined-title/combined-title.vue';
export default {
    props: {
        indexHistoryCoalData: {
            type: Array,
            default: []
        },
        indexHuoDaiOrderPlanData: {
            type: Array,
            default: []
        }
    },
    watch: {
        indexHistoryCoalData: {
            handler(v) {
                this.historyCoalData = v;
            },
            deep: true,
            immediate: true
        },
        indexHuoDaiOrderPlanData: {
            handler(v) {
                this.orderPlanData = v;
            },
            deep: true,
            immediate: true
        }
    },
    components: {
        combinedTitle
    },
@@ -90,6 +116,7 @@
        }
    },
    methods: {
        // 获取历史提煤单
        getJhOrderPlanDataPage() {
            this.loading = true;
            this.$reqGet('getJhOrderPlanDataPage', { current: this.pageCurrent, size: this.pageSize }).then(res => {
pages/login/userPassword.vue
@@ -107,17 +107,26 @@
                            this.$u.toast(res.msg);
                        }
                    } else {
                        this.$reqPost('wxBind', { state: 'MINI', code: uni.getStorageSync('code') }, 'params').then(res => {
                            uni.hideLoading();
                            if (res.code == 0) {
                                this.$u.toast('绑定成功!即将回到登录页!');
                                setTimeout(() => {
                                    uni.navigateBack();
                                }, 1000);
                            } else {
                                this.$u.toast(res.msg ? res.msg : '绑定失败');
                        uni.login({
                            success: res => {
                                if (res.code) {
                                    uni.setStorageSync('bindcode', res.code);
                                }
                            }
                        });
                        if (uni.getStorageSync('bindcode')) {
                            this.$reqPost('wxBind', { state: 'MINI', code: uni.getStorageSync('bindcode') }, 'params').then(res => {
                                uni.hideLoading();
                                if (res.code == 0) {
                                    this.$u.toast('绑定成功!即将回到登录页!');
                                    setTimeout(() => {
                                        uni.navigateBack();
                                    }, 1000);
                                } else {
                                    this.$u.toast(res.msg ? res.msg : '绑定失败');
                                }
                            });
                        }
                    }
                })
                .catch(e => {
pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -1,8 +1,13 @@
<template>
    <view>
        <customer-index v-if="roleType == 1" ref="customerIndexRef" :orderPlanDataStore="orderPlanDataStore"></customer-index>
        <freight-forwarder-index v-if="roleType == 2" ref="freightForwarderIndexRef"></freight-forwarder-index>
        <driver-index v-if="roleType == 3" ref="driverIndexRef"></driver-index>
        <freight-forwarder-index
            v-if="roleType == 2"
            ref="freightForwarderIndexRef"
            :indexHistoryCoalData="indexHistoryCoalData"
            :indexHuoDaiOrderPlanData="indexHuoDaiOrderPlanData"
        ></freight-forwarder-index>
        <driver-index v-if="roleType == 3" ref="driverIndexRef" :indexdriverBillOfLoadingData="indexdriverBillOfLoadingData"></driver-index>
        <tab-bar :current="0"></tab-bar>
    </view>
</template>
@@ -18,17 +23,39 @@
        driverIndex,
        freightForwarderIndex
    },
    //首页下拉刷新
    onPullDownRefresh() {
        uni.showLoading({
            title: '加载中...'
        });
        this.$reqGet('GetOrderPlan').then(res => {
            if (res.data) {
                this.orderPlanDataStore = res.data;
        // 客户获取日计划
        if (this.roleType == 1) {
            this.$reqGet('GetOrderPlan').then(res => {
                if (res.data) {
                    this.orderPlanDataStore = res.data;
                    uni.hideLoading();
                    uni.stopPullDownRefresh();
                }
            });
        } else if (this.roleType == 2) {
            this.$reqGet('huoDaiList').then(res => {
                this.indexHuoDaiOrderPlanData = res.data;
            });
            // 获取历史提煤单
            this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => {
                if (res.data.records) {
                    this.indexHistoryCoalData = [...this.historyCoalData, ...res.data.records];
                    uni.hideLoading();
                    uni.stopPullDownRefresh();
                }
            });
        } else {
            this.$reqGet('qiangDanList').then(res => {
                this.indexdriverBillOfLoadingData = res.data;
                uni.hideLoading();
                uni.stopPullDownRefresh();
            }
        });
            });
        }
    },
    onLoad() {
        // 开启双人通话
@@ -50,7 +77,10 @@
    data() {
        return {
            roleType: null,
            orderPlanDataStore: []
            orderPlanDataStore: [],
            indexHuoDaiOrderPlanData: [],
            indexHistoryCoalData: [],
            indexdriverBillOfLoadingData: []
        };
    },
    onShow() {