|
@@ -226,18 +226,18 @@
|
|
|
openApp() {
|
|
|
const ua = navigator.userAgent.toLowerCase()
|
|
|
const isWeixin = ua.indexOf('micromessenger') != -1;
|
|
|
- if(isWeixin){
|
|
|
- this.showHint = isWeixin;
|
|
|
- uni.pageScrollTo({
|
|
|
- scrollTop:0
|
|
|
- })
|
|
|
- }else{
|
|
|
- const osName = uni.getSystemInfoSync().osName
|
|
|
- if (osName == 'android') {
|
|
|
- this.getData(0)
|
|
|
- } else {
|
|
|
- this.getData(1)
|
|
|
- }
|
|
|
+ if (isWeixin) {
|
|
|
+ this.showHint = isWeixin;
|
|
|
+ uni.pageScrollTo({
|
|
|
+ scrollTop: 0
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const osName = uni.getSystemInfoSync().osName
|
|
|
+ if (osName == 'android') {
|
|
|
+ this.getData(0)
|
|
|
+ } else {
|
|
|
+ this.getData(1)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
getData(type) {
|
|
@@ -260,9 +260,14 @@
|
|
|
browserOpenApp(type, url) {
|
|
|
let that = this
|
|
|
that.opening = true
|
|
|
+ let params = JSON.stringify({
|
|
|
+ goodsTypeJump: that.options.type,
|
|
|
+ goodsIdJump: that.options.id
|
|
|
+ })
|
|
|
+ let schemeUrl = `ygfwUrlSchemes://jumpType=goods&goodsType=${that.options.type}&goodsId=${that.options.id}`
|
|
|
if (type == 0) { // 安卓处理
|
|
|
let ifr = document.createElement('iframe');
|
|
|
- ifr.src = `ygfwUrlSchemes://goodsTypeJump=${this.options.type}&goodsIdJump=${this.options.id}`;
|
|
|
+ ifr.src = schemeUrl;
|
|
|
ifr.style.display = 'none';
|
|
|
document.body.appendChild(ifr);
|
|
|
that.timer = window.setTimeout(function() { // 未安装的情况
|
|
@@ -277,9 +282,7 @@
|
|
|
}
|
|
|
}, 5000)
|
|
|
} else { // IOS处理
|
|
|
- let url = `ygfwUrlSchemes://goodsTypeJump=${this.options.type}&goodsIdJump=${this.options.id}`
|
|
|
- alert(url)
|
|
|
- window.location = url
|
|
|
+ window.location = schemeUrl
|
|
|
that.timer = setTimeout(function() { // 未安装的情况
|
|
|
that.opening = false
|
|
|
// 跳转app store
|
|
@@ -934,36 +937,36 @@
|
|
|
font-size: 28rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.view-alert {
|
|
|
- /* position: absolute;
|
|
|
+ /* position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
|
z-index: 9; */
|
|
|
- width: 750rpx;
|
|
|
- background: rgb(52, 52, 52);
|
|
|
- margin-left: 0px;
|
|
|
- margin-right: 0px;
|
|
|
- padding: 60rpx 30rpx 60rpx 60rpx;
|
|
|
- box-shadow: rgba(22, 22, 23, 0.62) 0px -10px 16px inset;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: stretch;
|
|
|
- box-sizing: border-box;
|
|
|
-
|
|
|
- .alert-text {
|
|
|
- flex: 1;
|
|
|
- color: #7f7e7e;
|
|
|
- font-weight: 400 !important;
|
|
|
- padding-right: 60rpx;
|
|
|
- line-height: 1.5;
|
|
|
- }
|
|
|
-
|
|
|
- .alert-arrow {
|
|
|
- flex-shrink: 0;
|
|
|
- width: 60rpx;
|
|
|
- height: 60rpx;
|
|
|
- margin-top: -30rpx;
|
|
|
- }
|
|
|
+ width: 750rpx;
|
|
|
+ background: rgb(52, 52, 52);
|
|
|
+ margin-left: 0px;
|
|
|
+ margin-right: 0px;
|
|
|
+ padding: 60rpx 30rpx 60rpx 60rpx;
|
|
|
+ box-shadow: rgba(22, 22, 23, 0.62) 0px -10px 16px inset;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: stretch;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ .alert-text {
|
|
|
+ flex: 1;
|
|
|
+ color: #7f7e7e;
|
|
|
+ font-weight: 400 !important;
|
|
|
+ padding-right: 60rpx;
|
|
|
+ line-height: 1.5;
|
|
|
+ }
|
|
|
+
|
|
|
+ .alert-arrow {
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 60rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ margin-top: -30rpx;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|