qingyiay
2023-08-28 54a0b7c1a758f958f7e6fd0b86fa8e0aecfeca75
呼叫客服增加选择呼叫类型
3个文件已修改
47 ■■■■ 已修改文件
manifest.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -57,6 +57,9 @@
            },
            "scope.userLocation": {
                "desc": "你的位置信息将用于小程序定位"
            },
            "scope.makePhoneCall": {
                "desc": "你的电话将用于拨打客服电话"
            }
        },
        "optimization": {
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -128,6 +128,14 @@
                @confirm="completeOutSaleConfirm"
                @cancel="completeOutSaleCancel"></u-modal>
        </view>
        <view class="serviece-customer">
            <u-action-sheet :actions="list"
                @select="selectClick"
                @close='serviceClose'
                title="呼叫方式"
                :show="servieceShow"
                cancelText="取消"></u-action-sheet>
        </view>
    </view>
</template>
@@ -176,7 +184,8 @@
                // 客服信息
                serviceInfoObj: {
                    openId: null,
                    openName: ''
                    openName: '',
                    serviecePhone: ''
                },
                coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤仓', '出煤仓', '放空', '作废', '入场申请',
                    '进入场院', '异常审核中'
@@ -210,8 +219,9 @@
                    clean: ""
                },
                completeOutSaleShow: false,
                overTmWaixiao: null
                overTmWaixiao: null,
                list: [{ name: '手机号', subname: '1213456', id: 1 }, { name: '微信语音', id: 2 }], //呼叫客服选项
                servieceShow: false
            };
        },
        onHide() {
@@ -277,6 +287,8 @@
                    } else {
                        this.serviceInfoObj.openId = res.data.openId;
                        this.serviceInfoObj.openName = res.data.openName;
                        this.serviceInfoObj.serviecePhone = res.data.serviecePhone
                        this.$set(this.list[0], 'subname', this.serviceInfoObj.serviecePhone)
                        uni.setStorageSync('customeropenId', this.serviceInfoObj.openId);
                        uni.setStorageSync('customerName', this.serviceInfoObj.openName);
                    }
@@ -383,8 +395,23 @@
                }&sendDate=${this.getYuYueDataParams.sendDate}`
                });
            },
            // 呼叫客服
            callCustomerService() {
                this.servieceShow = true
            },
            serviceClose() {
                this.servieceShow = false
            },
            selectClick(v) {
                if (v.id === 2) {
                    this.callCustomerServiceImpl()
                } else if (v.id === 1) {
                    wx.makePhoneCall({
                        phoneNumber: this.serviceInfoObj.serviecePhone
                    })
                }
            },
            // 呼叫客服
            callCustomerServiceImpl() {
                // if (!this.serviceInfoObj.openId) {
                // this.$u.toast('无客服信息');
                // }
@@ -428,14 +455,6 @@
                        console.log('获取失败');
                    }
                });
            },
            calling() {
                // wx.join1v1Chat({
                //     caller: { nickname: this.name, openid: this.openid }, //oZjXk5RRmbroAfl1m5aZ6hRNvqh4
                //     listener: { nickname: this.serviceInfoObj.openName, openid: 'orutI5YT0yEvARVngdsTmBpisWmw' }, // 这里的openid是fyy的,充当固定的客服openid
                //     backgroundType: 2,
                //     roomType: 'voice'
                // });
            },
            // 称重
            cengZhongClick() {
pages/login/login.vue
@@ -191,6 +191,7 @@
                console.log('打开了');
            },
            privacyConfirm() {
                this.loginPopupShow = false
                uni.navigateTo({
                    url: '/pages/register/register'
                });