小程序审核发布通过后协议才会生效
代商家管理小程序已经设置了隐私保护指引,但是chooseImage会报112错误https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/privacy-management/setPrivacySetting.html 从接口获取到的隐私保护指引如下 { "errcode": 0, "errmsg": "ok", "code_exist": 1, "privacy_list": [ "Record", "Camera", "BlueTooth" ], "setting_list": [ { "privacy_key": "PhoneNumber", "privacy_text": "注册、登录小程序", "privacy_label": "" }, { "privacy_key": "BlueTooth", "privacy_text": "智能设备连接", "privacy_label": "" }, { "privacy_key": "Camera", "privacy_text": "扫码连接智能设备", "privacy_label": "" }, { "privacy_key": "Album", "privacy_text": "选择相册图片上传头像", "privacy_label": "" }, { "privacy_key": "Record", "privacy_text": "使用摄像头功能拍照上传头像", "privacy_label": "" }, { "privacy_key": "DeviceInfo", "privacy_text": "设备发生问题时准确定位到设备编号", "privacy_label": "" }, { "privacy_key": "Contact", "privacy_text": "将设备告警通知的电话添加到通讯录,以防被拦截", "privacy_label": "" } ], "update_time": 1693967199, "owner_setting": { "contact_phone": "", "contact_email": "***@***.com", "contact_qq": "", "contact_weixin": "", "store_expire_timestamp": "", "ext_file_media_id": "", "notice_method": "页面弹窗方式告知", "store_region": 0 }, "privacy_desc": { "privacy_desc_list": [ { "privacy_key": "UserInfo", "privacy_desc": "用户信息(微信昵称、头像)" }, { "privacy_key": "Location", "privacy_desc": "位置信息" }, { "privacy_key": "Address", "privacy_desc": "地址" }, { "privacy_key": "Invoice", "privacy_desc": "发票信息" }, { "privacy_key": "RunData", "privacy_desc": "微信运动数据" }, { "privacy_key": "Record", "privacy_desc": "麦克风" }, { "privacy_key": "Album", "privacy_desc": "选中的照片或视频信息" }, { "privacy_key": "Camera", "privacy_desc": "摄像头" }, { "privacy_key": "PhoneNumber", "privacy_desc": "手机号" }, { "privacy_key": "Contact", "privacy_desc": "通讯录(仅写入)权限" }, { "privacy_key": "DeviceInfo", "privacy_desc": "设备信息" }, { "privacy_key": "EXIDNumber", "privacy_desc": "身份证号码" }, { "privacy_key": "EXOrderInfo", "privacy_desc": "订单信息" }, { "privacy_key": "EXUserPublishContent", "privacy_desc": "发布内容" }, { "privacy_key": "EXUserFollowAcct", "privacy_desc": "所关注账号" }, { "privacy_key": "EXUserOpLog", "privacy_desc": "操作日志" }, { "privacy_key": "AlbumWriteOnly", "privacy_desc": "相册(仅写入)权限" }, { "privacy_key": "LicensePlate", "privacy_desc": "车牌号" }, { "privacy_key": "BlueTooth", "privacy_desc": "蓝牙" }, { "privacy_key": "CalendarWriteOnly", "privacy_desc": "日历(仅写入)权限" }, { "privacy_key": "Email", "privacy_desc": "邮箱" }, { "privacy_key": "MessageFile", "privacy_desc": "选中的文件" }, { "privacy_key": "ChooseLocation", "privacy_desc": "选择的位置信息" }, { "privacy_key": "Accelerometer", "privacy_desc": "加速传感器" }, { "privacy_key": "Compass", "privacy_desc": "磁场传感器" }, { "privacy_key": "DeviceMotion", "privacy_desc": "方向传感器" }, { "privacy_key": "Gyroscope", "privacy_desc": "陀螺仪传感器" }, { "privacy_key": "Clipboard", "privacy_desc": "剪切板" } ] }, "sdk_privacy_info_list": [] } 报错信息如下: {"errMsg":"chooseImage:fail api scope is not declared in the privacy agreement","errno":112} 还需要怎样代商家设置小程序的隐私配置?
2023-09-11问题解决了,在 pan-gesture-handler 外再包一层view,给view 绑定 tap事件来触发openChat <view bindtap="openChat"> <pan-gesture-handler on-gesture-event="handlePan"> <image src="" /> </pan-gesture-handler> </view>
worklet 从UI线程调回JS线程执行 openCustomerServiceChat 无效果Component({ options: { styleIsolation: "apply-shared", }, lifetimes: { attached() { }, }, methods: { handlePan(evt) { 'worklet'; if (evt.state === GestureState.CANCELLED) { wx.worklet.runOnJS(this.openChat.bind(this))(); } }, openChat() { wx.showToast({ title: '测试' }); wx.openCustomerServiceChat({ extInfo: { url: "https://work.weixin.qq.com/kfid/xxxxx" }, corpId: 'xxxxx', }); } } }); // skyline 模式下,调会JS线程执行openChat时,showToast 能正常运行,但是 openCustomerServiceChat 没有响应 // webview 模式下,直接给节点绑定click事件,openCustomerServiceChat 可以正常调用
2023-08-07