Commit 12b59369 by zhangleyuan

feat:处理代码冲突

parent 3dc32352
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wufan * @Author: wufan
* @Date: 2021-05-11 10:21:37 * @Date: 2021-05-11 10:21:37
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-19 15:24:27 * @LastEditTime: 2021-08-10 18:00:56
* @Description: 企业微信api * @Description: 企业微信api
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* *
...@@ -14,8 +14,10 @@ import Service from '@/common/js/service'; ...@@ -14,8 +14,10 @@ import Service from '@/common/js/service';
export default class WechatApi { export default class WechatApi {
static async initConfig(params = { isAgentConfig: false, url: '' }) { static async initConfig(params = { isAgentConfig: false, url: '' }) {
if(Platform.isWorkWx()){ if (Platform.isWorkWx()) {
return Service.Hades('anon/hades/getWxCorpJSAPISignature', {
return new Promise(async (resolve, reject) => {
Service.Hades('anon/hades/getWxCorpJSAPISignature', {
storeId: User.getStoreId(), storeId: User.getStoreId(),
url: params.url, url: params.url,
}).then((result) => { }).then((result) => {
...@@ -29,8 +31,6 @@ export default class WechatApi { ...@@ -29,8 +31,6 @@ export default class WechatApi {
signature: res.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法 signature: res.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
jsApiList: ['chooseImage', 'shareToExternalContact', 'selectExternalContact', 'selectEnterpriseContact'], jsApiList: ['chooseImage', 'shareToExternalContact', 'selectExternalContact', 'selectEnterpriseContact'],
}).then(() => { }).then(() => {
if (params.isAgentConfig) {
return new Promise(async (resolve, reject) => {
Service.Hades('anon/hades/getWxWorkJSAPISignature', { Service.Hades('anon/hades/getWxWorkJSAPISignature', {
storeId: User.getStoreId(), storeId: User.getStoreId(),
url: params.url, url: params.url,
...@@ -55,15 +55,16 @@ export default class WechatApi { ...@@ -55,15 +55,16 @@ export default class WechatApi {
}, },
}); });
}); });
});
}
}) })
}); });
}else{ })
} else {
if (params.isAgentConfig) { if (params.isAgentConfig) {
console.log(32132132,'cesgu') console.log(32132132, 'cesgu')
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
Service.Hades('anon/hades/getWxWorkJSAPISignature', { Service.Hades('anon/hades/getWxWorkJSAPISignature', {
storeId: User.getStoreId(), storeId: User.getStoreId(),
...@@ -113,19 +114,7 @@ export default class WechatApi { ...@@ -113,19 +114,7 @@ export default class WechatApi {
} }
static async agentConfig(config) { static async agentConfig(config) {
return new Promise((success, fail) => { wx.agentConfig({ ...config });
console.info('wx.agentConfig', config);
wx.agentConfig({ ...config, success, fail });
}).then(
(res) => {
console.info('wx.agentConfig success', res);
return res;
},
(error) => {
console.error('wx.agentConfig fail', error);
throw error;
}
);
} }
static getCurExternalContact() { static getCurExternalContact() {
...@@ -177,6 +166,7 @@ export default class WechatApi { ...@@ -177,6 +166,7 @@ export default class WechatApi {
wx.invoke('replayLiving', { wx.invoke('replayLiving', {
"livingId": id, "livingId": id,
}, function(res) { }, function(res) {
console.log("WorkWXAPI 进入直播间",res)
if (res.err_msg === "replayLiving:ok") { if (res.err_msg === "replayLiving:ok") {
resolve(true) resolve(true)
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment