import Platform from './platform';
import Service from "@/common/js/service";
import User from '@/common/js/user';

export default class WechatApi {
    static initShareConfig() {
        // if (Platform.isWeiXin()) {
        const data = { url: window.location.href.split('#')[0], storeId: User.getStoreId(), }
        Service.Hades('anon/hades/getWxWorkJSAPISignature', data).then((result) => {
            const res = result.result;
            wx.config({
                debug: false,
                appId: res.appId,
                timestamp: res.timestamp,
                nonceStr: res.nonceStr,
                signature: res.signature,
                jsApiList: []
            });
        });
        // }
    }

}