Merge pull request 'dengjie' (#94) from dengjie into dev

Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/94
This commit is contained in:
odjbin
2023-02-22 06:33:39 +00:00
5 changed files with 17 additions and 7 deletions

View File

@@ -27,7 +27,7 @@
}
},
created() {
this.imgUrl = uni.getStorageSync('img_url')
this.imgUrl = uni.getStorageSync('img_url')
this.getCertifiedCj()
},
methods: {

View File

@@ -49,7 +49,7 @@
return new Promise((resolve, reject) => {
const token = uni.getStorageSync('loginToken')
const a = uni.uploadFile({
url: apiService.uploadImgUrl + '/upload/image/',
url: apiService.uploadImgUrl,
filePath: filePath,
name: 'file',
header: {

View File

@@ -31,7 +31,7 @@
}
},
onLoad() {
this.imgUrl = uni.getStorageSync('img_url')
this.imgUrl = uni.getStorageSync('img_url')
this.getCertifiedCj()
},
onReachBottom() {

View File

@@ -124,7 +124,7 @@
}
},
onLoad(option) {
this.imgUrl = uni.getStorageSync('img_url')
this.imgUrl = uni.getStorageSync('img_url')
this.id = option.id
this.getProductDetail()
this.getCsTel()
@@ -139,7 +139,7 @@
//获取详情信息
getProductDetail() {
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 dataCode = res.data.code
//授权登录拦截

View File

@@ -24,7 +24,9 @@
</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>
<!-- 选项卡: 上架时间和点赞量 -->
@@ -64,6 +66,7 @@
initStart: false,
swiperList: [],
reachBottomLength: '',
currentNum: ''
}
},
onReachBottom() {
@@ -81,7 +84,7 @@
},
methods: {
init() {
this.imgUrl = uni.getStorageSync('img_url')
this.imgUrl = uni.getStorageSync('img_url')
this.getCategories()
this.getBanner()
wx.showShareMenu({
@@ -144,6 +147,13 @@
this.swiperList = res.data.data
}).finally(_ => {})
},
//点击轮播图
handleSwiperList(currentNum, swiperList) {
swiperList[currentNum].link = swiperList[currentNum].link.replace(/\s*/g, "")
uni.navigateTo({
url: '/' + swiperList[currentNum].link
})
},
//点击搜索框跳转到搜索页面
toSearch() {
uni.navigateTo({