提交 aeac786e 作者: 王进

更新SDK

上级 2218f9ee
/** /**
...@@ -178,7 +178,7 @@ class WechatSDK { ...@@ -178,7 +178,7 @@ class WechatSDK {
} else if (res.code == 3023) { } else if (res.code == 3023) {
const params = { const params = {
title: '支付提示', title: '支付提示',
content: '受苹果政策影响,IOS暂未开放充值,目前可前往安卓系统上充值' content: res.msg
} }
_selt.showModal(params) _selt.showModal(params)
} else { // 输出订单失败消息 } else { // 输出订单失败消息
......
...@@ -178,7 +178,7 @@ class WechatSDK { ...@@ -178,7 +178,7 @@ class WechatSDK {
} else if (res.code == 3023) { } else if (res.code == 3023) {
const params = { const params = {
title: '支付提示', title: '支付提示',
content: '受苹果政策影响,IOS暂未开放充值,目前可前往安卓系统上充值' content: res.msg
} }
_selt.showModal(params) _selt.showModal(params)
} else { // 输出订单失败消息 } else { // 输出订单失败消息
...@@ -432,10 +432,10 @@ class WechatSDK { ...@@ -432,10 +432,10 @@ class WechatSDK {
}) })
} }
// SDK上报接口 // SDK上报接口
private sdkRequest(link: string, portData) { private sdkRequest(link: string, portData, method?) {
this.md5_sign(portData) // 附上签名参数 this.md5_sign(portData) // 附上签名参数
console.log("##SDK激活上报参数", portData) console.log("##SDK激活上报参数", portData)
return this.request(link, portData) return this.request(link, portData, method)
} }
// 上报激活 // 上报激活
public ActiReport() { public ActiReport() {
...@@ -717,6 +717,33 @@ class WechatSDK { ...@@ -717,6 +717,33 @@ class WechatSDK {
}) })
} }
//动态消息
public async createActiveSahre() {
const _self = this;
let actInfo = await _self.sdkRequest(Links.getActShareId, _self.sdkParams, 'POST').catch(err => {
console.log("@@SDDK错误::createActiveSahre", err);
});
if (actInfo.code == 0) {
const actId = actInfo.data.activity_id;
(wx as any).updateShareMenu({
withShareTicket: true,
isUpdatableMessage: true,
activityId: actId, // 活动 ID
templateInfo: {
parameterList: [{
name: 'member_count',
value: 0
}, {
name: 'room_limit',
value: 0
}]
}
});
_self.ShareApp();
} else {
console.log("@@SDK错误::createActiveSahre", actInfo.msg);
}
}
private shareInit() { private shareInit() {
(wx as any).showShareMenu({ (wx as any).showShareMenu({
withShareTicket: 'true', withShareTicket: 'true',
...@@ -809,6 +836,7 @@ const Links = { ...@@ -809,6 +836,7 @@ const Links = {
saveNum: SDKConfig.sdk_domain + '/bind/mobile.php', // 保存手机号码 saveNum: SDKConfig.sdk_domain + '/bind/mobile.php', // 保存手机号码
playTime: SDKConfig.sdk_domain + '', // 获取用户在线时长 playTime: SDKConfig.sdk_domain + '', // 获取用户在线时长
bindPhone: SDKConfig.sdk_domain + '/bind/is_bind_mobile.php', // 用户手机绑定状态 bindPhone: SDKConfig.sdk_domain + '/bind/is_bind_mobile.php', // 用户手机绑定状态
getActShareId: SDKConfig.sdk_domain + '/v2/weixin/create_activity_id', // 获取活动消息id
} }
class shareInfo { class shareInfo {
title?: string title?: string
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论