DingTalk judges when jumping. DingTalk determines the navigation bar based on the title of the page when it is refreshed, so we can only use Widow to jump to achieve real-time tracking.
安装
npm install dingtalk-jsapi --save
引入
import * as dd from 'dingtalk-jsapi';
跳转是判断
if (dd.env.platform !== "notInDingTalk") {
console.log('是钉钉', url)
window.location.href = url;
} else {
if (type == "redirect") {
uni.redirectTo({
url: url,
});
} else if (type == "reLaunch") {
uni.reLaunch({
url: url,
});
} else {
uni.navigateTo({
url: url,
});
}
}