Commit 4ee43272 by yuzhenWang

修复产品bug

parent 7e65a81d
...@@ -27,8 +27,10 @@ ...@@ -27,8 +27,10 @@
<view class="productBox"> <view class="productBox">
<view class="productList" :style="{marginTop}"> <view class="productList" :style="{marginTop}">
<view class="tabBox"> <view class="tabBox">
<view :class="{'actived': courseClassify==4}" @click="courseClassify=4;courseList()"><text>咨询产品</text></view> <!-- @click="courseClassify=4;courseList()" -->
<view :class="{'actived': courseClassify==3}" @click="courseClassify=3;courseList()"><text>规划产品</text></view> <view :class="{'actived': courseClassify==4}" @click="transform('consult')"><text>咨询产品</text></view>
<!-- @click="courseClassify=3;courseList()" -->
<view :class="{'actived': courseClassify==3}" @click="transform('plan')"><text>规划产品</text></view>
</view> </view>
<view class="productItem" v-for="item in localCourseInfos" :key="item.fileId" > <view class="productItem" v-for="item in localCourseInfos" :key="item.fileId" >
<view class="top" @click="goDetail(item)"> <view class="top" @click="goDetail(item)">
...@@ -200,6 +202,15 @@ ...@@ -200,6 +202,15 @@
} }
}, },
methods:{ methods:{
transform(value){
if(value == 'consult'){
this.courseClassify = 4
}else if(value == 'plan'){
this.courseClassify = 3
}
this.$emit('changeCourseClassify',this.courseClassify)
this.courseList()
},
gotoJoinPartner(){ gotoJoinPartner(){
dataHandling.pocessTracking( dataHandling.pocessTracking(
'点击', '点击',
......
...@@ -64,7 +64,11 @@ ...@@ -64,7 +64,11 @@
</view> </view>
</view> --> </view> -->
<view class="productList" v-if="cffpCourseInfos.length>0"> <view class="productList" v-if="cffpCourseInfos.length>0">
<courselist :showFlag="false" :cffpCourseInfos="cffpCourseInfos"></courselist> <courselist
:showFlag="false"
:cffpCourseInfos="cffpCourseInfos"
@changeCourseClassify="changeCourseClassify"
></courselist>
<view class="productListBox"> <view class="productListBox">
<!-- <view class="productListItem" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> --> <!-- <view class="productListItem" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> -->
...@@ -211,6 +215,7 @@ ...@@ -211,6 +215,7 @@
export default { export default {
data() { data() {
return { return {
productType: 4,
partnerStatistic:{}, //申请加盟统计 partnerStatistic:{}, //申请加盟统计
showSearch: true, showSearch: true,
searchQuery: '', searchQuery: '',
...@@ -280,7 +285,6 @@ ...@@ -280,7 +285,6 @@
}, },
onShow() { onShow() {
console.log('11111');
this.loginType = uni.getStorageSync('loginType') this.loginType = uni.getStorageSync('loginType')
this.init(); this.init();
this.showSearch = false; this.showSearch = false;
...@@ -314,6 +318,9 @@ ...@@ -314,6 +318,9 @@
uni.$off('loginUpdate', this.queryAreaCenterInfo); uni.$off('loginUpdate', this.queryAreaCenterInfo);
}, },
methods: { methods: {
changeCourseClassify(val){
this.productType = val
},
queryInfo() { queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
...@@ -504,7 +511,8 @@ ...@@ -504,7 +511,8 @@
}, },
courseList() { courseList() {
const param = { const param = {
queryName: this.queryName queryName: this.queryName,
courseClassify: this.productType
} }
api.courseList(param).then(res => { api.courseList(param).then(res => {
if (res['success']) { if (res['success']) {
...@@ -517,6 +525,18 @@ ...@@ -517,6 +525,18 @@
} }
}) })
}, },
getOneProduct() {
api.courseList().then(res => {
if (res['success']) {
let result = res['data']['data'];
if(result.length>0){
result.forEach(item=>{
item.coursePrice =Number(item.coursePrice).toFixed(2) || '0.00'
})
}
}
})
},
tokefu() { tokefu() {
let url = 'http://q.url.cn/abkzV9?_type=wpa&qidian=true' // URL是要跳转的外部地址 作为参数 let url = 'http://q.url.cn/abkzV9?_type=wpa&qidian=true' // URL是要跳转的外部地址 作为参数
// #ifdef APP-PLUS // #ifdef APP-PLUS
......
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