|
|
@@ -7,12 +7,10 @@
|
|
|
<div class="confirm-btn">
|
|
|
<button class="admin-button-com big blue" @click="downloadImg">保存图片</button>
|
|
|
</div>
|
|
|
- <!-- #ifdef MP-WEIXIN -->
|
|
|
<view style="margin:50upx 0 0 30upx;font-size:30upx;">打开直接分享给客户</view>
|
|
|
<div class="confirm-btn1">
|
|
|
- <button class="admin-button-com big blue" @click="goToMallPt('pages/home/index')">打开商城</button>
|
|
|
+ <button class="admin-button-com big blue" @click="goToMallPt()">打开商城</button>
|
|
|
</div>
|
|
|
- <!-- #endif -->
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -59,20 +57,54 @@ export default {
|
|
|
this.imgUrl = res.data.imgUrl
|
|
|
}).catch(err => {})
|
|
|
},
|
|
|
- goToMallPt (url) {
|
|
|
+ goToMallPt () {
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ let url = 'pages/home/index'
|
|
|
let self = this
|
|
|
console.log(url + '?account=' + self.loginInfo.shopId)
|
|
|
- uni.navigateToMiniProgram({
|
|
|
- appId: this.getappIdList.mall.miniAppId,
|
|
|
- path: url + '?account=' + self.loginInfo.shopId,
|
|
|
- //develop 开发版 trial 体验版 release 正式版
|
|
|
- envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
|
|
|
- extraData: {
|
|
|
- 'hdShopAdminId': self.loginInfo.shopAdminId
|
|
|
- },
|
|
|
- success (res) {
|
|
|
+ uni.navigateToMiniProgram({
|
|
|
+ appId: this.getappIdList.mall.miniAppId,
|
|
|
+ path: url + '?account=' + self.loginInfo.shopId,
|
|
|
+ //develop 开发版 trial 体验版 release 正式版
|
|
|
+ envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
|
|
|
+ extraData: {
|
|
|
+ 'hdShopAdminId': self.loginInfo.shopAdminId
|
|
|
+ },
|
|
|
+ success (res) {}
|
|
|
+ })
|
|
|
+ // #endif
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ let that = this
|
|
|
+ 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;
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
+ if (sweixin && sweixin.nativeClient) {
|
|
|
+ sweixin.launchMiniProgram({
|
|
|
+ id: 'gh_73b8b357d19a',
|
|
|
+ path: '/pages/home/index?account='+self.loginInfo.shopId,
|
|
|
+ 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 {
|
|
|
+ this.$msg("即将跳转小程序,请安装微信")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
},
|
|
|
}
|
|
|
}
|