|
@@ -401,7 +401,36 @@ export default {
|
|
|
})
|
|
})
|
|
|
// #endif
|
|
// #endif
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
|
- this.$msg('暂时只能在微信上操作')
|
|
|
|
|
|
|
+ if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
|
|
|
|
|
+ plus.share.getServices(function(s){
|
|
|
|
|
+ var sweixin
|
|
|
|
|
+ for (var i = 0; i < s.length; i++) {
|
|
|
|
|
+ var t = s[i];
|
|
|
|
|
+ if (t.id == 'weixin') {
|
|
|
|
|
+ sweixin = t;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.hd ? that.dictInfo.miniOriginalId.current.hd : ''
|
|
|
|
|
+ if (sweixin && sweixin.nativeClient) {
|
|
|
|
|
+ sweixin.launchMiniProgram({
|
|
|
|
|
+ id: miniOriginalId,
|
|
|
|
|
+ path: '/pagesPurchase/order',
|
|
|
|
|
+ type: 0
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$msg("没有找到微信")
|
|
|
|
|
+ //that.$msg("获取微信失败:" + e.message)
|
|
|
|
|
+ //console.log(JSON.stringify(e));
|
|
|
|
|
+ }
|
|
|
|
|
+ }, function(e){
|
|
|
|
|
+ that.$msg("没有找到微信哦")
|
|
|
|
|
+ //that.$msg("获取微信失败:" + e.message)
|
|
|
|
|
+ //console.log(JSON.stringify(e));
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$msg("请安装微信,再打开小程序")
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
// #endif
|
|
// #endif
|
|
|
}else if(item.url == 'buyRecord'){
|
|
}else if(item.url == 'buyRecord'){
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
@@ -416,7 +445,36 @@ export default {
|
|
|
})
|
|
})
|
|
|
// #endif
|
|
// #endif
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
|
- this.$msg('暂时只能在微信上操作')
|
|
|
|
|
|
|
+ if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
|
|
|
|
|
+ plus.share.getServices(function(s){
|
|
|
|
|
+ var sweixin
|
|
|
|
|
+ for (var i = 0; i < s.length; i++) {
|
|
|
|
|
+ var t = s[i];
|
|
|
|
|
+ if (t.id == 'weixin') {
|
|
|
|
|
+ sweixin = t;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.hd ? that.dictInfo.miniOriginalId.current.hd : ''
|
|
|
|
|
+ if (sweixin && sweixin.nativeClient) {
|
|
|
|
|
+ sweixin.launchMiniProgram({
|
|
|
|
|
+ id: miniOriginalId,
|
|
|
|
|
+ path: '/pagesPurchase/shopping',
|
|
|
|
|
+ type: 0
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$msg("没有找到微信")
|
|
|
|
|
+ //that.$msg("获取微信失败:" + e.message)
|
|
|
|
|
+ //console.log(JSON.stringify(e));
|
|
|
|
|
+ }
|
|
|
|
|
+ }, function(e){
|
|
|
|
|
+ that.$msg("没有找到微信哦")
|
|
|
|
|
+ //that.$msg("获取微信失败:" + e.message)
|
|
|
|
|
+ //console.log(JSON.stringify(e));
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$msg("请安装微信,再打开小程序")
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
// #endif
|
|
// #endif
|
|
|
}else{
|
|
}else{
|
|
|
this.$util.pageTo(item)
|
|
this.$util.pageTo(item)
|