mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
微信登录版
This commit is contained in:
30
wechat_v2/miniprogram_npm/@vant/weapp/mixins/link.js
Normal file
30
wechat_v2/miniprogram_npm/@vant/weapp/mixins/link.js
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
exports.link = void 0;
|
||||
exports.link = Behavior({
|
||||
properties: {
|
||||
url: String,
|
||||
linkType: {
|
||||
type: String,
|
||||
value: 'navigateTo',
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
jumpLink: function (urlKey) {
|
||||
if (urlKey === void 0) {
|
||||
urlKey = 'url';
|
||||
}
|
||||
var url = this.data[urlKey];
|
||||
if (url) {
|
||||
if (
|
||||
this.data.linkType === 'navigateTo' &&
|
||||
getCurrentPages().length > 9
|
||||
) {
|
||||
wx.redirectTo({ url: url });
|
||||
} else {
|
||||
wx[this.data.linkType]({ url: url });
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user