Commit bd70bc50 authored by haiyoucuv's avatar haiyoucuv

21

parent bc8767ff
...@@ -4,8 +4,8 @@ import { ...@@ -4,8 +4,8 @@ import {
callShare, callShare,
Weixin, Weixin,
} from "@spark/share" } from "@spark/share"
/** /**
* @description: 小程序跳转 * @description: 小程序跳转
* @param {*} * @param {*}
...@@ -20,7 +20,7 @@ import { ...@@ -20,7 +20,7 @@ import {
export function isIos() { export function isIos() {
return navigator.userAgent.match(/iphone|ipod|ipad/gi) return navigator.userAgent.match(/iphone|ipod|ipad/gi)
} }
/** 判断微信环境 */ /** 判断微信环境 */
export function isWeChat() { export function isWeChat() {
const ua = window.navigator.userAgent.toLowerCase() const ua = window.navigator.userAgent.toLowerCase()
...@@ -29,7 +29,7 @@ import { ...@@ -29,7 +29,7 @@ import {
/** /**
* 初始化分享 * 初始化分享
*/ */
export async function onInitShare(cb) { export async function onInitShare(cb?) {
await start([Weixin], function (success) { await start([Weixin], function (success) {
console.log("share result:----", success) console.log("share result:----", success)
cb && cb() cb && cb()
...@@ -83,7 +83,6 @@ import { ...@@ -83,7 +83,6 @@ import {
} }
}); });
} }
\ No newline at end of file
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