dengjie : 解决banner跳转问题
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.imgUrl = uni.getStorageSync('img_url')
|
this.imgUrl = uni.getStorageSync('img_url')
|
||||||
this.getCertifiedCj()
|
this.getCertifiedCj()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.imgUrl = uni.getStorageSync('img_url')
|
this.imgUrl = uni.getStorageSync('img_url')
|
||||||
this.getCertifiedCj()
|
this.getCertifiedCj()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.imgUrl = uni.getStorageSync('img_url')
|
this.imgUrl = uni.getStorageSync('img_url')
|
||||||
this.id = option.id
|
this.id = option.id
|
||||||
this.getProductDetail()
|
this.getProductDetail()
|
||||||
this.getCsTel()
|
this.getCsTel()
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
//获取详情信息
|
//获取详情信息
|
||||||
getProductDetail() {
|
getProductDetail() {
|
||||||
this.$apiServe.getProductDetail(this.id).then(res => {
|
this.$apiServe.getProductDetail(this.id).then(res => {
|
||||||
console.log('产品详情mtype', res.data.data.mytpe);
|
console.log('产品详情mtype', res.data.data);
|
||||||
let detail = res.data.data
|
let detail = res.data.data
|
||||||
let dataCode = res.data.code
|
let dataCode = res.data.code
|
||||||
//授权登录拦截
|
//授权登录拦截
|
||||||
|
|||||||
@@ -24,7 +24,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 分类模块下的轮播图 -->
|
<!-- 分类模块下的轮播图 -->
|
||||||
<view>
|
<view>
|
||||||
<u-swiper :list="swiperList" keyName="img" indicatorMode="line" radius="0" circular></u-swiper>
|
<u-swiper :list="swiperList" keyName="img" indicatorMode="line" radius="0" circular
|
||||||
|
@change="e => currentNum = e.current"
|
||||||
|
@click="handleSwiperList(currentNum==''?0:currentNum,swiperList)"></u-swiper>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 选项卡: 上架时间和点赞量 -->
|
<!-- 选项卡: 上架时间和点赞量 -->
|
||||||
@@ -64,6 +66,7 @@
|
|||||||
initStart: false,
|
initStart: false,
|
||||||
swiperList: [],
|
swiperList: [],
|
||||||
reachBottomLength: '',
|
reachBottomLength: '',
|
||||||
|
currentNum: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -81,7 +84,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
this.imgUrl = uni.getStorageSync('img_url')
|
this.imgUrl = uni.getStorageSync('img_url')
|
||||||
this.getCategories()
|
this.getCategories()
|
||||||
this.getBanner()
|
this.getBanner()
|
||||||
wx.showShareMenu({
|
wx.showShareMenu({
|
||||||
@@ -144,6 +147,13 @@
|
|||||||
this.swiperList = res.data.data
|
this.swiperList = res.data.data
|
||||||
}).finally(_ => {})
|
}).finally(_ => {})
|
||||||
},
|
},
|
||||||
|
//点击轮播图
|
||||||
|
handleSwiperList(currentNum, swiperList) {
|
||||||
|
swiperList[currentNum].link = swiperList[currentNum].link.replace(/\s*/g, "")
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/' + swiperList[currentNum].link
|
||||||
|
})
|
||||||
|
},
|
||||||
//点击搜索框跳转到搜索页面
|
//点击搜索框跳转到搜索页面
|
||||||
toSearch() {
|
toSearch() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
Reference in New Issue
Block a user