Commit 39f9ec23 authored by lijiongliang's avatar lijiongliang

首页按钮跳转修改

parent ce3b6016
......@@ -34,12 +34,12 @@
</view>
</view>
<view class="banner-other">
<view @click="goShopH5(1)">
<image src="../static/index/2.png"></image>
</view>
<view @click="goShopH5(2)">
<image src="../static/index/1.png"></image>
</view>
<view @click="goShopH5(1)">
<image src="../static/index/2.png"></image>
</view>
</view>
<u-gap bgColor="transparent" height="20"></u-gap>
</view>
......@@ -101,6 +101,7 @@
goShopH5(index){
let token = uni.getStorageSync('userToken');
if (!token) {
uni.setStorageSync('jdNavto',index)
uni.navigateTo({
url: '/pages/login/index/index'
})
......@@ -302,8 +303,10 @@
// uni.navigateTo({
// url: '/pages/webview/webview?url=' + link
// })
let url;
let token = uni.getStorageSync('userToken');
if (!token) {
uni.setStorageSync('jdNavto',1)
uni.navigateTo({
url: '/pages/login/index/index'
})
......@@ -478,16 +481,17 @@
.banner-other{
position: absolute;
right:-22rpx;top:-90rpx;
right:-22rpx;top:-80rpx;
z-index:100;
>view{
&:first-child{
width: 172rpx;height:140rpx;
}
&:last-child{
margin-top:80rpx;
margin-left:34rpx;
width: 120rpx;height:112rpx;
}
&:last-child{
margin-top:70rpx;
width: 172rpx;height:140rpx;
}
image{
width:100%;height:100%;
}
......
......@@ -334,7 +334,6 @@
duration: 2000
});
// 判断是否扫码进入
that.scene = uni.getStorageSync('scene')
// console.log(that.scene,"微信扫码进入")
......@@ -375,6 +374,21 @@
}
}
// 判断是否有京东跳转
let jdNavto = uni.setStorageSync('jdNavto',index)
if(jdNavto){
let url;
if(jdNavto == 1){
url = 'https://pro.m.jd.com/mall/active/3L2hs3R3aibYmosCRzA2Rp5z8pTR/index.html?babelChannel=ttt1'
}else{
url = 'https://jarvis.m.jd.com/start?source=2'
}
// uni.setStorageSync('h5url',url)
util.navigateToH5({page:url})
uni.removeStorageSync('jdNavto')
}
}else{
uni.hideLoading()
uni.showToast({
......
......@@ -282,6 +282,7 @@ export default {
// })
let token = uni.getStorageSync('userToken');
if (!token) {
uni.setStorageSync('jdNavto',1)
uni.navigateTo({
url: '/pages/login/index/index'
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment