@tencentcloud/chat-cs-uniapp
Advanced tools
Comparing version 0.0.1 to 0.0.2
export const apiBaseUrl = (() => { | ||
return "https://test.ccclogic.pstn.avc.qcloud.com"; | ||
// return "https://test.ccclogic.pstn.avc.qcloud.com"; | ||
return "https://api.tccc.qcloud.com"; | ||
})(); | ||
@@ -15,5 +15,6 @@ import { getQuery } from '../../utils/web/index'; | ||
return "https://test.ccclogic.pstn.avc.qcloud.com" ?? 'https://api.tccc.qcloud.com'; | ||
// return "https://test.ccclogic.pstn.avc.qcloud.com" ?? 'https://api.tccc.qcloud.com'; | ||
return 'https://api.tccc.qcloud.com'; | ||
})(); | ||
{ | ||
"name": "@tencentcloud/chat-cs-uniapp", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "TCCC uniapp UIKit", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -21,3 +21,3 @@ import { ulid } from './ulid'; | ||
export const getBaseUrl = () => { | ||
return UrlMap.development; | ||
return UrlMap.production; | ||
}; | ||
@@ -24,0 +24,0 @@ |
@@ -1,1 +0,1 @@ | ||
var e=function(){return e=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},e.apply(this,arguments)};function n(e,n,t,o){return new(t||(t=Promise))((function(r,c){function i(e){try{s(o.next(e))}catch(e){c(e)}}function a(e){try{s(o.throw(e))}catch(e){c(e)}}function s(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,a)}s((o=o.apply(e,n||[])).next())}))}function t(e,n){var t,o,r,c,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return c={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function a(c){return function(a){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,o=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(e,i)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}function o(e){if(!l(e,"Object"))return console.error("输入不合法@setCookie");var n=s(),t={};Object.keys(e).forEach((function(n){if(l(e[n],"Object")){var o=e[n],r=o.value,i=o.expires,a=o.maxAge;t[n]=c({name:n,value:r,expires:i,maxAge:a})}else t[n]=c({name:n,value:e[n]})})),r(Object.assign({},n,t))}function r(e){try{wx.setStorageSync("cookies",e)}catch(e){console.error("saveCookiesToStorage失败:",e)}}function c(e){var n=e.name,t=e.value,o=e.expires,r=e.maxAge;return void 0===n||void 0===t?(console.error("输入不合法@getStandardCookieItem"),{}):{name:n,value:t,expires:o||i(r)}}function i(e){var n=1e3*(e||31536e3);return new Date((new Date).getTime()+n).toGMTString()}function a(e){void 0===e&&(e="");var n=s()[e],t="";return n?t=decodeURIComponent(n.value):(console.warn("该cookie项不存在,或者已过期:",e),t=""),t}function s(){var e;try{e=wx.getStorageSync("cookies")}catch(e){console.error("cookies初始化失败:",e)}return l(e,"Object")||(e={}),function(e){var n=e,t=!1,o=new Date;Object.keys(n).forEach((function(e){new Date(n[e].expires)<=o&&(t=!0,delete n[e])})),t&&r(Object.assign({},n))}(e),e}function u(e){var n=s();delete n[e],r(Object.assign({},n))}function p(e){if(e){var n=[],t={};0!==(n=e.replace(/(Expires=[A-Za-z]{3}),/gi,"$1_").split(",").map((function(e){return e.replace(/(Expires=[A-Za-z]{3})_/gi,"$1,")}))).length&&(n.forEach((function(e){var n=function(e){var n=e.split(";"),t={},o=n.shift(),r=o.indexOf("=");if(-1===r)return console.error("cookie value error ",e);var c=[o.slice(0,r),o.slice(r+1)];return c.length<2?console.error("cookie value error ",e):(t.name=c[0],t.value=c[1],n.forEach((function(e){e.match(/^\s*Expires=/i)&&(t.expires=new Date(e.split("=")[1]).toGMTString()),e.match(/^\s*Max-age=/i)&&(t.maxAge=+e.split("=")[1])})),t)}(e);n&&n.name&&(t[n.name]=n)})),o(t))}}function l(e,n){return Object.prototype.toString.call(e)==="[object ".concat(n,"]")}var d=function(){for(var e=[],n="0123456789abcdef",t=0;t<36;t++)e[t]=n.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=n.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")},f={};if(wx.canIUse("getDeviceInfo"))Object.assign(f,wx.getDeviceInfo());else if(wx.canIUse("getSystemInfoSync")){var g=wx.getSystemInfoSync(),v=g.brand,h=g.model,m=g.system,y=g.platform;Object.assign(f,{brand:v,model:h,system:m,platform:y})}var I=function(){return{deviceInfo:f,version:"0.1.0"}},w=function(){function n(n){var t=this;this.now=function(){var e=new Date;return"".concat([e.getFullYear(),e.getMonth()+1,e.getDate()].join("-")," ").concat([e.getHours(),e.getMinutes()<10?"0".concat(e.getMinutes()):e.getMinutes(),e.getSeconds()<10?"0".concat(e.getSeconds()):e.getSeconds()].join(":"))},this.convertAnyTypeToString=function(e){try{switch(typeof e){case"object":return e instanceof Error?"".concat(e.name," ").concat(e.message):JSON.stringify(e);case"function":return"";default:return"".concat(e)}}catch(e){return"convert failed"}},this.request=function(n,o){var r=uni.getAccountInfoSync().miniProgram,c=r.version,i=r.envVersion;return new Promise((function(r,s){wx.request({url:"https://test.ccclogic.pstn.avc.qcloud.com/ccc/debug/seatLog",method:"POST",enableHttp2:!0,data:e(e({log:"[".concat(t.now(),"] [").concat(c||i,"] ").concat(n),level:o,timestamp:Date.now()},I()),{staff:{userId:a("openId"),sdkAppId:t.sdkAppId}}),success:r,fail:s})}))},this.log=function(e,n){void 0===n&&(n="debug"),a("sdkAppId")?t.sdkAppId=a("sdkAppId"):t.sdkAppId=uni.getAccountInfoSync().miniProgram.appId,t.request("[".concat(n.toUpperCase(),"] [").concat(e,"]"),n).then((function(){console.debug(e)})).catch((function(){return console.warn("log failed")}))},this.level=n||"debug",this.sdkAppId=uni.getAccountInfoSync().miniProgram.appId}return n.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=e.map(this.convertAnyTypeToString).join(" ");this.log(t,"info")},n.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=e.map(this.convertAnyTypeToString).join(" ");this.log(t,"debug")},n.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=e.map(this.convertAnyTypeToString).join(" ");this.log(t,"warn")},n.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=e.map(this.convertAnyTypeToString).join(" ");this.log(t,"error")},n}(),k=new w,b=["/tccclogin/visitor/miniappLogin","/ccc/wxlogin"],A=function(e){var n=a("userKey"),t="";return!b.includes(e)&&n&&(t="Bearer ".concat(n)),t?{Authorization:t}:{}},S={development:{http:"https://test.ccclogic.pstn.avc.qcloud.com",socket:"wss://test.cccstate.pstn.avc.qcloud.com/staff"},preproduction:{http:"https://pre.ccclogic.pstn.avc.qcloud.com",socket:"wss://pre.cccstate.pstn.avc.qcloud.com/staff"},production:{http:"https://test.ccclogic.pstn.avc.qcloud.com",socket:"wss://api.tccc.qcloud.com/staff"}},x=function(){var e=wx.getEnterOptionsSync().query;if("string"==typeof e.scene){var n=e.scene.toUpperCase();if(n.startsWith("DEV-"))return S.development;if(n.startsWith("TEST-"))return S.preproduction}return S.production};function j(n,t){void 0===t&&(t={});var o=d();return new Promise((function(r,c){var i,a;wx.request({url:"".concat(x().http,"/").concat(n.replace(/^\//,"")),method:"POST",header:e({Cookie:(i=[],a=s(),Object.keys(a).forEach((function(e){i.push("".concat(e,"=").concat(a[e].value))})),i.join(";"))},A(n)),enableHttp2:!0,data:e(e({nonce:o,requestId:o,timestamp:"".concat(Date.now()),clientType:"3"},I()),t),success:function(t){var i=t.data,a=t.header,s=i;if(p(a["Set-Cookie"]||a["set-cookie"]||""),"0"===s.errorCode)return r(s);k.error("url: ".concat(n),"nonce: ".concat(o),t),"-2015"===s.errorCode&&(u("openId"),u("userKey")),c(e(e({},s),{message:null==s?void 0:s.msg}))},fail:function(e){c(e)}})}))}var O=function(n){return j("/tccclogin/visitor/miniappLogin",e(e({},n),{wxAppId:uni.getAccountInfoSync().miniProgram.appId})).then((function(e){return k.info("miniappLogin success",e),o({openId:e.openId,sdkAppId:n.sdkAppId}),{openId:e.openId,sdkAppId:n.sdkAppId}})).catch((function(e){throw k.warn("miniappLogin failed",n,"".concat(null==e?void 0:e.errorCode,": ").concat(null==e?void 0:e.msg)),new Error((null==e?void 0:e.msg)||"login failed")}))},T=function(e){return new Promise((function(n,t){return!!a("userKey")?(null==e?void 0:e.sdkAppId)?void j("/tccclogin/visitor/checkLogin").then((function(o){"".concat(e.sdkAppId)==="".concat(o.sdkAppId)?n({openId:o.wxOpenId,sdkAppId:o.sdkAppId}):(k.warn("checkLogin failed","".concat(o.sdkAppId).concat(typeof o.sdkAppId," != ").concat(e.sdkAppId).concat(typeof e.sdkAppId)),t(new Error("sdkAppId not match")))})).catch((function(e){t(new Error(e.msg||"checkLogin failed"))})):t(new Error("sdkAppId not found")):t(new Error("userKey not found"))}))},E=function(e){return n(void 0,void 0,void 0,(function(){var n,o,r,c;return t(this,(function(t){switch(t.label){case 0:return[4,j("/tcccadmin/app/getChannelQRCodeInfo",{scene:e})];case 1:return n=t.sent(),o=n.sdkAppId,r=n.type,c=n.channelId,[2,{sdkAppId:o,channelId:c,type:r}]}}))}))},C=function(e){return n(void 0,void 0,void 0,(function(){var n,o,r,c,i,a,s,u;return t(this,(function(t){switch(t.label){case 0:n="感谢您使用我们的服务,请对此次服务进行评价!",o="感谢您对此次服务作出评价,祝您生活愉快,再见!",r=[],c=1,i=0,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,j("/tcccadmin/satisfaction/getByWeb",{clientId:e.channelId})];case 2:return a=t.sent(),s=JSON.parse(a.menuContent),k.info("getSatisfaction success",s),n=s.head,o=s.tail,r=s.menu,c=s.type,i=+a.menuSendRuleFlag,[3,4];case 3:return u=t.sent(),k.error("getSatisfaction failed",e,u),[3,4];case 4:return[2,{head:n,tail:o,menu:r,type:c,menuSendRuleFlag:i}]}}))}))};export{T as checkLogin,E as getChannelInfo,C as getSatisfaction,O as login}; | ||
var e=function(){return e=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},e.apply(this,arguments)};function n(e,n,t,o){return new(t||(t=Promise))((function(r,c){function i(e){try{s(o.next(e))}catch(e){c(e)}}function a(e){try{s(o.throw(e))}catch(e){c(e)}}function s(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,a)}s((o=o.apply(e,n||[])).next())}))}function t(e,n){var t,o,r,c,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return c={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function a(c){return function(a){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,o=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(e,i)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}function o(e){if(!l(e,"Object"))return console.error("输入不合法@setCookie");var n=s(),t={};Object.keys(e).forEach((function(n){if(l(e[n],"Object")){var o=e[n],r=o.value,i=o.expires,a=o.maxAge;t[n]=c({name:n,value:r,expires:i,maxAge:a})}else t[n]=c({name:n,value:e[n]})})),r(Object.assign({},n,t))}function r(e){try{wx.setStorageSync("cookies",e)}catch(e){console.error("saveCookiesToStorage失败:",e)}}function c(e){var n=e.name,t=e.value,o=e.expires,r=e.maxAge;return void 0===n||void 0===t?(console.error("输入不合法@getStandardCookieItem"),{}):{name:n,value:t,expires:o||i(r)}}function i(e){var n=1e3*(e||31536e3);return new Date((new Date).getTime()+n).toGMTString()}function a(e){void 0===e&&(e="");var n=s()[e],t="";return n?t=decodeURIComponent(n.value):(console.warn("该cookie项不存在,或者已过期:",e),t=""),t}function s(){var e;try{e=wx.getStorageSync("cookies")}catch(e){console.error("cookies初始化失败:",e)}return l(e,"Object")||(e={}),function(e){var n=e,t=!1,o=new Date;Object.keys(n).forEach((function(e){new Date(n[e].expires)<=o&&(t=!0,delete n[e])})),t&&r(Object.assign({},n))}(e),e}function u(e){var n=s();delete n[e],r(Object.assign({},n))}function p(e){if(e){var n=[],t={};0!==(n=e.replace(/(Expires=[A-Za-z]{3}),/gi,"$1_").split(",").map((function(e){return e.replace(/(Expires=[A-Za-z]{3})_/gi,"$1,")}))).length&&(n.forEach((function(e){var n=function(e){var n=e.split(";"),t={},o=n.shift(),r=o.indexOf("=");if(-1===r)return console.error("cookie value error ",e);var c=[o.slice(0,r),o.slice(r+1)];return c.length<2?console.error("cookie value error ",e):(t.name=c[0],t.value=c[1],n.forEach((function(e){e.match(/^\s*Expires=/i)&&(t.expires=new Date(e.split("=")[1]).toGMTString()),e.match(/^\s*Max-age=/i)&&(t.maxAge=+e.split("=")[1])})),t)}(e);n&&n.name&&(t[n.name]=n)})),o(t))}}function l(e,n){return Object.prototype.toString.call(e)==="[object ".concat(n,"]")}var d=function(){for(var e=[],n="0123456789abcdef",t=0;t<36;t++)e[t]=n.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=n.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")},f={};if(wx.canIUse("getDeviceInfo"))Object.assign(f,wx.getDeviceInfo());else if(wx.canIUse("getSystemInfoSync")){var g=wx.getSystemInfoSync(),v=g.brand,h=g.model,m=g.system,y=g.platform;Object.assign(f,{brand:v,model:h,system:m,platform:y})}var I=function(){return{deviceInfo:f,version:"0.1.0"}},w=function(){function n(n){var t=this;this.now=function(){var e=new Date;return"".concat([e.getFullYear(),e.getMonth()+1,e.getDate()].join("-")," ").concat([e.getHours(),e.getMinutes()<10?"0".concat(e.getMinutes()):e.getMinutes(),e.getSeconds()<10?"0".concat(e.getSeconds()):e.getSeconds()].join(":"))},this.convertAnyTypeToString=function(e){try{switch(typeof e){case"object":return e instanceof Error?"".concat(e.name," ").concat(e.message):JSON.stringify(e);case"function":return"";default:return"".concat(e)}}catch(e){return"convert failed"}},this.request=function(n,o){var r=uni.getAccountInfoSync().miniProgram,c=r.version,i=r.envVersion;return new Promise((function(r,s){wx.request({url:"https://api.tccc.qcloud.com/ccc/debug/seatLog",method:"POST",enableHttp2:!0,data:e(e({log:"[".concat(t.now(),"] [").concat(c||i,"] ").concat(n),level:o,timestamp:Date.now()},I()),{staff:{userId:a("openId"),sdkAppId:t.sdkAppId}}),success:r,fail:s})}))},this.log=function(e,n){void 0===n&&(n="debug"),a("sdkAppId")?t.sdkAppId=a("sdkAppId"):t.sdkAppId=uni.getAccountInfoSync().miniProgram.appId,t.request("[".concat(n.toUpperCase(),"] [").concat(e,"]"),n).then((function(){console.debug(e)})).catch((function(){return console.warn("log failed")}))},this.level=n||"debug",this.sdkAppId=uni.getAccountInfoSync().miniProgram.appId}return n.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=e.map(this.convertAnyTypeToString).join(" ");this.log(t,"info")},n.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=e.map(this.convertAnyTypeToString).join(" ");this.log(t,"debug")},n.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=e.map(this.convertAnyTypeToString).join(" ");this.log(t,"warn")},n.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=e.map(this.convertAnyTypeToString).join(" ");this.log(t,"error")},n}(),k=new w,b=["/tccclogin/visitor/miniappLogin","/ccc/wxlogin"],A=function(e){var n=a("userKey"),t="";return!b.includes(e)&&n&&(t="Bearer ".concat(n)),t?{Authorization:t}:{}},S={development:{http:"https://api.tccc.qcloud.com",socket:"wss://test.cccstate.pstn.avc.qcloud.com/staff"},preproduction:{http:"https://pre.ccclogic.pstn.avc.qcloud.com",socket:"wss://pre.cccstate.pstn.avc.qcloud.com/staff"},production:{http:"https://api.tccc.qcloud.com",socket:"wss://api.tccc.qcloud.com/staff"}},x=function(){var e=wx.getEnterOptionsSync().query;if("string"==typeof e.scene){var n=e.scene.toUpperCase();if(n.startsWith("DEV-"))return S.development;if(n.startsWith("TEST-"))return S.preproduction}return S.production};function j(n,t){void 0===t&&(t={});var o=d();return new Promise((function(r,c){var i,a;wx.request({url:"".concat(x().http,"/").concat(n.replace(/^\//,"")),method:"POST",header:e({Cookie:(i=[],a=s(),Object.keys(a).forEach((function(e){i.push("".concat(e,"=").concat(a[e].value))})),i.join(";"))},A(n)),enableHttp2:!0,data:e(e({nonce:o,requestId:o,timestamp:"".concat(Date.now()),clientType:"3"},I()),t),success:function(t){var i=t.data,a=t.header,s=i;if(p(a["Set-Cookie"]||a["set-cookie"]||""),"0"===s.errorCode)return r(s);k.error("url: ".concat(n),"nonce: ".concat(o),t),"-2015"===s.errorCode&&(u("openId"),u("userKey")),c(e(e({},s),{message:null==s?void 0:s.msg}))},fail:function(e){c(e)}})}))}var O=function(n){return j("/tccclogin/visitor/miniappLogin",e(e({},n),{wxAppId:uni.getAccountInfoSync().miniProgram.appId})).then((function(e){return k.info("miniappLogin success",e),o({openId:e.openId,sdkAppId:n.sdkAppId}),{openId:e.openId,sdkAppId:n.sdkAppId}})).catch((function(e){throw k.warn("miniappLogin failed",n,"".concat(null==e?void 0:e.errorCode,": ").concat(null==e?void 0:e.msg)),new Error((null==e?void 0:e.msg)||"login failed")}))},T=function(e){return new Promise((function(n,t){return!!a("userKey")?(null==e?void 0:e.sdkAppId)?void j("/tccclogin/visitor/checkLogin").then((function(o){"".concat(e.sdkAppId)==="".concat(o.sdkAppId)?n({openId:o.wxOpenId,sdkAppId:o.sdkAppId}):(k.warn("checkLogin failed","".concat(o.sdkAppId).concat(typeof o.sdkAppId," != ").concat(e.sdkAppId).concat(typeof e.sdkAppId)),t(new Error("sdkAppId not match")))})).catch((function(e){t(new Error(e.msg||"checkLogin failed"))})):t(new Error("sdkAppId not found")):t(new Error("userKey not found"))}))},E=function(e){return n(void 0,void 0,void 0,(function(){var n,o,r,c;return t(this,(function(t){switch(t.label){case 0:return[4,j("/tcccadmin/app/getChannelQRCodeInfo",{scene:e})];case 1:return n=t.sent(),o=n.sdkAppId,r=n.type,c=n.channelId,[2,{sdkAppId:o,channelId:c,type:r}]}}))}))},C=function(e){return n(void 0,void 0,void 0,(function(){var n,o,r,c,i,a,s,u;return t(this,(function(t){switch(t.label){case 0:n="感谢您使用我们的服务,请对此次服务进行评价!",o="感谢您对此次服务作出评价,祝您生活愉快,再见!",r=[],c=1,i=0,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,j("/tcccadmin/satisfaction/getByWeb",{clientId:e.channelId})];case 2:return a=t.sent(),s=JSON.parse(a.menuContent),k.info("getSatisfaction success",s),n=s.head,o=s.tail,r=s.menu,c=s.type,i=+a.menuSendRuleFlag,[3,4];case 3:return u=t.sent(),k.error("getSatisfaction failed",e,u),[3,4];case 4:return[2,{head:n,tail:o,menu:r,type:c,menuSendRuleFlag:i}]}}))}))};export{T as checkLogin,E as getChannelInfo,C as getSatisfaction,O as login}; |
@@ -23,3 +23,3 @@ import { ulid } from './ulid'; | ||
export const getBaseUrl = () => { | ||
return UrlMap.development; | ||
return UrlMap.production; | ||
const { query } = wx.getEnterOptionsSync(); | ||
@@ -26,0 +26,0 @@ if (typeof query.scene === 'string') { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package