|
@@ -5,13 +5,27 @@ const wx = Vue.prototype.wx;
|
|
|
import { wxLogin } from '@/api/digest';
|
|
import { wxLogin } from '@/api/digest';
|
|
|
|
|
|
|
|
export function WXdigest() {
|
|
export function WXdigest() {
|
|
|
|
|
+ // wx.login({
|
|
|
|
|
+ // suiteId: 'wwxxxxxx', //非必填,第三方应用的suiteid,自建应用不填。若第三方小程序绑定多个第三方应用时,建议填上该字段
|
|
|
|
|
+ // success: function (res) {
|
|
|
|
|
+ // console.log(res);
|
|
|
|
|
+ // },
|
|
|
|
|
+ // fail: function (res) {
|
|
|
|
|
+ // console.log(res);
|
|
|
|
|
+ // },
|
|
|
|
|
+ // complete: function (res) {
|
|
|
|
|
+ // console.log(res);
|
|
|
|
|
+ // },
|
|
|
|
|
+ // });
|
|
|
getTicketFun(['getCurExternalContact'], 'agentConfig')
|
|
getTicketFun(['getCurExternalContact'], 'agentConfig')
|
|
|
- .then(() => {
|
|
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ window.open(
|
|
|
|
|
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${res.appId}&redirect_uri=https://ssbsfatest.nipponpaint.com.cn/mobile&response_type=code&scope=SCOPE&state=STATE#wechat_redirect`
|
|
|
|
|
+ );
|
|
|
// 获取用户code
|
|
// 获取用户code
|
|
|
- getWeChatCode();
|
|
|
|
|
|
|
+ // getWeChatCode();
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
|
- debugger;
|
|
|
|
|
console.log(err);
|
|
console.log(err);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|