2 lines
2.5 KiB
JavaScript
Raw Normal View History

2025-12-15 18:27:46 +08:00
"use strict";const e=require("../vendor.js"),n=require("./naviHelper.js");exports.navigateToMiniProgram=function(n){e.index.showLoading({title:"加载中",mask:!0}),e.index.navigateToMiniProgram({appId:"wx31500e871924b903",path:(null==n?void 0:n.path)||"",extraData:(null==n?void 0:n.extraData)||{},envVersion:(null==n?void 0:n.envVersion)||"release",success(){e.index.hideLoading()},fail(){e.index.hideLoading()}})},exports.sendChatMessage=function(o){if(!(null==o?void 0:o.page))return n.showToast("请设置跳转页面路径!");e.index.showLoading({title:"加载中...",mask:!0}),e.index.qy.sendChatMessage({msgtype:(null==o?void 0:o.msgtype)||"miniprogram",enterChat:(null==o?void 0:o.enterChat)||!1,miniprogram:{appid:"wx31500e871924b903",title:(null==o?void 0:o.title)||"邀请你绑定房屋",imgUrl:(null==o?void 0:o.imgUrl)||"https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K58GCT5DGWKBSYH0G7118XT4.jpg",page:null==o?void 0:o.page},success:function(){e.index.hideLoading(),n.showToast("发送成功!")},fail:function(o){console.log("sendChatMessage fail",o),e.index.hideLoading(),"qy__sendChatMessage:fail cancel"!==(null==o?void 0:o.errMsg)&&n.showToast((null==o?void 0:o.errMsg)||"当前操作,只能在企业微信上聊天工具栏操作")}})},exports.shareToExternalContact=function(o){if(!(null==o?void 0:o.page))return n.showToast("请设置跳转页面路径!");e.index.showLoading({title:"加载中...",mask:!0}),e.index.qy.shareToExternalContact({externalUserIds:(null==o?void 0:o.externalUserIds)||[],text:{content:(null==o?void 0:o.title)||"待缴费账单"},attachments:[{msgtype:(null==o?void 0:o.msgtype)||"miniprogram",miniprogram:{appid:"wx31500e871924b903",title:(null==o?void 0:o.title)||"待缴费账单",imgUrl:(null==o?void 0:o.imgUrl)||"https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K58GCT5DGWKBSYH0G7118XT4.jpg",page:null==o?void 0:o.page}}],success:function(){e.index.hideLoading(),n.showToast("发送成功!")},fail:function(o){console.log("sendChatMessage fail",o),e.index.hideLoading(),"qy__sendChatMessage:fail cancel"!==(null==o?void 0:o.errMsg)&&n.showToast((null==o?void 0:o.errMsg)||"当前操作,只能在企业微信上聊天工具栏操作")}})},exports.shareToExternalMoments=function(o){console.log("shareToExternalMoments",o),e.index.qy.shareToExternalMoments({text:{content:(null==o?void 0:o.content)||""},attachments:null==o?void 0:o.attachments},(function(e){"shareToExternalMoments:ok"==e.err_msg&&n.showToast("发送成功!")}))};