|
@@ -141,27 +141,37 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="jump-box" @click="openApp">
|
|
|
+ <view v-if="!isWeiXin" class="jump-box" @click="openApp">
|
|
|
<image class="logo-img" src="/static/logo.png" mode="aspectFill"></image>
|
|
|
<view class="tip">打开宜格服务APP</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="wx-open">
|
|
|
+ <view class="wx-open" v-else>
|
|
|
<wx-open-launch-app id="launch-btn" appid="wx2cbf40f5fffa9e80" :extinfo="queryPath" @launch="launchApp"
|
|
|
@error="errorApp">
|
|
|
<script type="text/wxtag-template">
|
|
|
<style>
|
|
|
.btn {
|
|
|
+ border: none;
|
|
|
width: 150px;
|
|
|
- height: 50px;
|
|
|
- border: none;
|
|
|
- font-size: 14px;
|
|
|
- border-radius: 4px;
|
|
|
- background-color: #fff;
|
|
|
+ height: 40px;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #6be5f8;
|
|
|
+ border-radius: 20px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
+ .logo-img {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin-right: 5px;
|
|
|
+ box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.1);
|
|
|
+ }
|
|
|
</style>
|
|
|
- <button class="btn">打开宜格服务APP</button>
|
|
|
- <image src="/static/wxbtn.png" mode=""></image>
|
|
|
+ <button class="btn">
|
|
|
+ <!-- <image class="logo-img" src="../static/logo.png" mode="aspectFill"></image> -->
|
|
|
+ <text>打开宜格服务APP</text>
|
|
|
+ </button>
|
|
|
</script>
|
|
|
</wx-open-launch-app>
|
|
|
</view>
|
|
@@ -172,6 +182,7 @@
|
|
|
|
|
|
<script>
|
|
|
import comment from "@/components/ld-comment/ld-comment.vue";
|
|
|
+ import { isWeiXin } from "@/common/wx/util.js"
|
|
|
export default {
|
|
|
components: {
|
|
|
comment
|
|
@@ -202,7 +213,8 @@
|
|
|
goodsInfo: {},
|
|
|
timer: null,
|
|
|
showHint: false,
|
|
|
- queryPath: null
|
|
|
+ queryPath: null,
|
|
|
+ isWeiXin: isWeiXin()
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -217,6 +229,7 @@
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
+ // console.log(isWeiXin(),"=============")
|
|
|
this.type = this.options.type;
|
|
|
this.queryPath = `jumpType=goods&goodsType=${this.options.type}&goodsId=${this.options.id}`
|
|
|
alert('res=>' + uni.getStorageSync('wx_access_token'))
|
|
@@ -251,7 +264,11 @@
|
|
|
console.log(e, 1111)
|
|
|
},
|
|
|
errorApp(e) {
|
|
|
+ // alert(e + 1111111111111)
|
|
|
console.log(e, 1111)
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/down"
|
|
|
+ })
|
|
|
},
|
|
|
openApp() {
|
|
|
const ua = navigator.userAgent.toLowerCase()
|
|
@@ -1002,10 +1019,10 @@
|
|
|
|
|
|
.wx-open {
|
|
|
position: fixed;
|
|
|
- bottom: 400rpx;
|
|
|
+ bottom: 200rpx;
|
|
|
left: 50%;
|
|
|
width: 300rpx;
|
|
|
- height: 100rpx;
|
|
|
+ height: 80rpx;
|
|
|
color: red;
|
|
|
transform: translateX(-50%);
|
|
|
z-index: 9;
|