UNPKG

@tencentcloud/ai-desk-customer-wechat

Version:

AI Desk customer UIKit for wechat mini program

3 lines (2 loc) 1.87 kB
"use strict";const e=require("../../../common/vendor.js");require("../../adapter-vue-uniapp.js");const p=require("../../@aidesk/uikit-engine/index.js"),o=require("../../constant.js"),s=()=>"../common/uni-ui/uni-popup/components/uni-popup/uni-popup.js",a=()=>"../common/uni-ui/uni-popup/components/uni-popup-dialog/uni-popup-dialog.js",u={components:{uniPopup:s,uniPopupDialog:a},data(){return{promptType:"",TUITranslateService:p.jt}},computed:{showContent(){return p.jt.t(this.promptType)}},methods:{show(t){this.promptType=t,this.$refs.popup&&this.$refs.popup.open("center")},hide(){this.$refs.popup&&this.$refs.popup.close()},dialogConfirm(){this.promptType===o.PROMPT.TAKE_PHOTO?(e.index.setStorageSync("ai-desk-apply-camera",!0),p.Kt.update(p.a.CUSTOM,"applyTakePhoto",!0)):this.promptType===o.PROMPT.SELECT_IMAGE?(e.index.setStorageSync("ai-desk-apply-album",!0),p.Kt.update(p.a.CUSTOM,"applySelectImage",!0)):this.promptType===o.PROMPT.SELECT_VIDEO?(e.index.setStorageSync("ai-desk-apply-album",!0),p.Kt.update(p.a.CUSTOM,"applySelectVideo",!0)):this.promptType===o.PROMPT.RECORD&&(e.index.setStorageSync("ai-desk-apply-camera",!0),p.Kt.update(p.a.CUSTOM,"applyRecord",!0))}}};if(!Array){const t=e.resolveComponent("uniPopupDialog"),r=e.resolveComponent("uniPopup");(t+r)()}function c(t,r,m,d,n,i){return{a:e.o(i.dialogConfirm),b:e.p({type:"dialog",cancelText:n.TUITranslateService.t("取消"),confirmText:n.TUITranslateService.t("去申请"),title:n.TUITranslateService.t("权限申请提示"),content:i.showContent}),c:e.sr("popup","594431e7-0"),d:e.o(i.hide),e:e.p({type:"dialog",safeArea:!1,isMaskClick:!0,"background-color":"#fff",borderRadius:"20px 20px 20px 20px"})}}const l=e._export_sfc(u,[["render",c]]);wx.createComponent(l); //# sourceMappingURL=../../../../.sourcemap/mp-weixin/ai-desk-customer-uniapp/components/CustomerServiceChat/center-dialog.js.map