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() { created() {
this.imgUrl = uni.getStorageSync('img_url') this.imgUrl = uni.getStorageSync('img_url')
this.getCertifiedCj() this.getCertifiedCj()
}, },
methods: { methods: {

View File

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

View File

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

View File

@@ -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
//授权登录拦截 //授权登录拦截

View File

@@ -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({