在common目录下新建 ddhide.js
ddhide.js
import * as dd from 'dingtalk-jsapi'
export const ddhide = {
data(){
return{
}
},
created(){
if (dd.env.platform !== "notInDingTalk") {
dd.biz.navigation.hideBar({
hidden: true, // true:隐藏,false:显示
onSuccess: function(result) {},
onFail: function(err) {}
})
}
}
}
在需要使用的页面混入ddhide:
修改前:
修改后: