diff --git a/common/api.js b/common/api.js index bc69638..4ab2d2d 100644 --- a/common/api.js +++ b/common/api.js @@ -31,7 +31,7 @@ export const queryNewsList = (params) => http.get('/carrent-admin/api/news/query // 新闻资讯-根据id获取新闻详情 export const queryNewsById = (params) => http.get('/carrent-admin/api/news/queryNewsById', {params:params}) // 寻车申请-添加申请 -export const addApply = (params) => http.get('/carrent-admin/api/apply/addApply', {params:params}) +export const addApply = (params) => http.post('/carrent-admin/api/apply/addApply', params) // 寻车申请-申请列表 export const queryApplyList = (params) => http.get('/carrent-admin/api/apply/queryApplyList', {params:params}) @@ -87,3 +87,7 @@ export const queryCategoryList = (params) => http.get('/carrent-admin/api/config export const queryAuthenticationPerson = (params) => http.get('/carrent-admin/api/user/queryAuthenticationPerson', {params:params}) // 查询企业实名 export const queryAuthenticationCompany = (params) => http.get('/carrent-admin/api/company/queryAuthenticationCompany', {params:params}) + +// 商品信息-车辆信息删除 +export const deleteGoods = (params) => http.post('/carrent-admin/api/goods/deleteGoods', params) + diff --git a/common/config.js b/common/config.js index a6c3534..d821f64 100644 --- a/common/config.js +++ b/common/config.js @@ -1,5 +1,5 @@ module.exports = { - baseUrl:"https://carrentadmin.augcl.com" + // baseUrl:"https://carrentadmin.augcl.com" // baseUrl:"http://augcl.natapp1.cc" - + baseUrl:"https://carrentadmin.jthj8.com" } diff --git a/config.js b/config.js index 90acad8..c3ed9e7 100644 --- a/config.js +++ b/config.js @@ -22,17 +22,22 @@ const config = { const defaultConfig = { mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU', aliOss : { - url : 'https://tennis-oss.xzaiyp.top/', + // url : 'https://tennis-oss.xzaiyp.top/', + url:"https://image.jthj8.com/", config : { //桶的地址 region: 'oss-cn-guangzhou', //id - accessKeyId:'LTAI5tNycA46YTwm383dRvMV', + // accessKeyId:'LTAI5tNycA46YTwm383dRvMV', + accessKeyId:"LTAI5tMJitfHeQ8jNAikvEu7", //密钥 - accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG', + // accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG', + accessKeySecret:"GodE2mPZiW2WhiMtEkPhNNOThLlSRj", //桶的名字 - bucket: 'zhuoqiu-image', - endpoint:'oss-cn-guangzhou.aliyuncs.com', + // bucket: 'zhuoqiu-image', + bucket:"jthj8", + // endpoint:'oss-cn-guangzhou.aliyuncs.com', + endpoint:"oss-cn-guangzhou.aliyuncs.com" } }, } diff --git a/pages.json b/pages.json index 735d33a..d2dfd2f 100644 --- a/pages.json +++ b/pages.json @@ -84,7 +84,9 @@ "navigationBarTitleText": "寻车列表", "navigationStyle":"default", "navigationBarBackgroundColor": "#669A32", - "navigationBarTextStyle": "white" + "navigationBarTextStyle": "white", + "enablePullDownRefresh": true, + "onReachBottomDistance": 100 } }, { @@ -165,7 +167,9 @@ "navigationBarTitleText": "发布列表", "navigationStyle":"default", "navigationBarBackgroundColor": "#669A32", - "navigationBarTextStyle": "white" + "navigationBarTextStyle": "white", + "enablePullDownRefresh": true, + "onReachBottomDistance": 100 } }, { diff --git a/pages/home/index.vue b/pages/home/index.vue index 5acfa28..e84e467 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -49,7 +49,7 @@ {{ items.goodsName }} - + {{items.brand}} @@ -62,7 +62,7 @@ - {{items.price}}/月 + {{items.price | getPersonAuthentication}}/月 查看详情 @@ -131,6 +131,20 @@ console.info(share) return share }, + filters:{ + getPersonAuthentication(price){ + let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus") + if(companyAuthenticationStatus==1){ + return price + } + + let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus") + if (personAuthenticationStatus != 1){ + return '***'; + } + return price + } + }, methods:{ onQueryModuleList(){ const that = this; @@ -155,6 +169,26 @@ console.info(event) }, onDetail(event){ + let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus") + if(companyAuthenticationStatus==1){ + uni.navigateTo({ + url:"/pages_subpack/detail/index?goodsId="+event.id + }) + return; + } + let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus") + if (personAuthenticationStatus != 1){ + return uni.showModal({ + title:"未认证", + showCancel:false, + content:"立即前往认证", + success() { + uni.navigateTo({ + url:"/pages/identity/index?userStatus=1" + }) + } + }) + } uni.navigateTo({ url:"/pages_subpack/detail/index?goodsId="+event.id }) @@ -246,6 +280,7 @@ onPageList(){ let that = this let params={ + status:1, pageNo:that.pageNo, pageSize:that.pageSize, } diff --git a/pages/user/index.vue b/pages/user/index.vue index d46a2bd..6559525 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -167,15 +167,15 @@ }, onRelease(){ let that = this - if (that.companyAuthenticationStatus == 1 || that.personAuthenticationStatus == 1){ + if (that.companyAuthenticationStatus == 1){ uni.navigateTo({ url:"/pages_subpack/release/list" }) }else{ uni.showModal({ - title:"未实名认证", + title:"未企业认证", showCancel:false, - content:"立即前往实名认证", + content:"立即前往认证", success() { that.onIdentity() } diff --git a/pages_subpack/apply/index.vue b/pages_subpack/apply/index.vue index f68d6b7..5ba5548 100644 --- a/pages_subpack/apply/index.vue +++ b/pages_subpack/apply/index.vue @@ -18,10 +18,13 @@ - - - - + + @@ -57,14 +60,16 @@ @select="categoryTwoSelect" > - + @@ -80,6 +85,7 @@ }, data() { return { + columns:[['2025', '2024', '2023', '2022', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012', '2011', '2010', '2009', '2008', '2007', '2006', '2005', '2004', '2003', '2002', '2001', '2000']], maxDate:startOfYesterday, categoryTwoList:[], categoryList:[], @@ -118,14 +124,16 @@ trigger: ['blur', 'change'] } ], - date:[ - { - type: 'string', - required: true, - message: '请填写时间', - trigger: ['blur', 'change'] - } - ], + // date:[ + // { + // validator: (rule, value, callback) => { + // console.info(this.form.cartypeName) + // return this.form.cartypeName=='新车' ? false : callback(new Error('请填写时间')) + // }, + // message: '请填写时间', + // trigger: ['blur', 'change'] + // } + // ], distance:[ { type: 'string', @@ -162,7 +170,7 @@ } }, onLoad(options) { - this.onQueryTypeList() + // this.onQueryTypeList() this.onQueryCategoryList() }, watch: { @@ -175,6 +183,9 @@ this.categoryTwoList =event.carrentCategorytwoList this.form.categorytwoId = "" this.form.categorytwoName = "" + if(this.form.cartypeName=='新车'){ + this.form.date = "" + } }, onQueryCategoryList(){ let that = this @@ -192,16 +203,19 @@ }) }, onCancel(){ + this.form.date = ''; this.showDate = false }, onConfirm(e){ - console.info('e',e) - const date = new Date(e.value); - const year = date.getFullYear(); - const month = String(date.getMonth() + 1).padStart(2, '0'); - const day = String(date.getDate()).padStart(2, '0'); - this.form.date = `${year}-${month}-${day}`; + this.form.date = e.value[0]; this.showDate = false + // console.info('e',e) + // const date = new Date(e.value); + // const year = date.getFullYear(); + // const month = String(date.getMonth() + 1).padStart(2, '0'); + // const day = String(date.getDate()).padStart(2, '0'); + // this.form.date = `${year}-${month}-${day}`; + // this.showDate = false }, categoryTwoSelect(event){ this.form.categorytwoId = event.id @@ -221,16 +235,20 @@ this.onAddApply() // uni.$u.toast('校验通过') }).catch(errors => { + console.info(errors) // uni.$u.toast('校验失败') }) }, onAddApply(){ let that = this + if(that.form.cartypeName!='新车' && !that.form.date){ + return uni.$u.toast('请选择时间') + } let params={ - cartypeId:that.form.cartypeId, + categoryoneId:that.form.cartypeId, categorytwoId:that.form.categorytwoId, model:that.form.model, - carTime:that.form.date, + carTime:Number(that.form.date), mileage:that.form.distance, name:that.form.contacts, phone:that.form.phone, diff --git a/pages_subpack/category/index.vue b/pages_subpack/category/index.vue index c76dde0..b18001f 100644 --- a/pages_subpack/category/index.vue +++ b/pages_subpack/category/index.vue @@ -29,7 +29,7 @@ {{ items.goodsName }} - + {{items.brand}} @@ -42,7 +42,7 @@ - {{items.price}}/月 + {{items.price | getPersonAuthentication}}/月 查看详情 @@ -53,13 +53,15 @@ - + > --> + @@ -68,6 +70,7 @@ export default{ data(){ return{ + columns:[["全部",'2025', '2024', '2023', '2022', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012', '2011', '2010', '2009', '2008', '2007', '2006', '2005', '2004', '2003', '2002', '2001', '2000']], mileageShow:false, showDate:false, goodsName:null, @@ -104,6 +107,19 @@ that.pageNo = that.pageNo + 1 that.onPageList() }, + filters:{ + getPersonAuthentication(price){ + let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus") + if(companyAuthenticationStatus==1){ + return price + } + let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus") + if (personAuthenticationStatus != 1){ + return '***'; + } + return price + } + }, methods:{ onCancel(){ this.goodsTime="" @@ -111,13 +127,15 @@ this.onPageList() }, onConfirm(e){ - console.info('e',e) - const date = new Date(e.value); - const year = date.getFullYear(); - const month = String(date.getMonth() + 1).padStart(2, '0'); - const day = String(date.getDate()).padStart(2, '0'); - this.goodsTime = `${year}-${month}-${day}`; + this.goodsTime = e.value[0]; this.showDate = false + // console.info('e',e) + // const date = new Date(e.value); + // const year = date.getFullYear(); + // const month = String(date.getMonth() + 1).padStart(2, '0'); + // const day = String(date.getDate()).padStart(2, '0'); + // this.goodsTime = `${year}-${month}-${day}`; + // this.showDate = false this.pageNo = 1 this.onPageList() }, @@ -162,7 +180,8 @@ // queryCategoryTwoList(params).then(response=>{ console.info("queryCategoryTwoList",response) if(response.result.length>0){ - that.categoryTwoList = response.result[0].carrentCategorytwoList + let arr = [{id:null,name:"全部"}] + that.categoryTwoList = arr.concat(response.result[0].carrentCategorytwoList) } }).catch(error=>{ @@ -177,7 +196,8 @@ response.result.forEach(items=>{ items.name = items.mileage }) - that.mileageList = response.result + let arr = [{id:null,name:"全部"}] + that.mileageList = arr.concat(response.result) }).catch(error=>{ }) @@ -189,10 +209,11 @@ onPageList(){ let that = this let params={ + status:1, cartypeId:that.id, categorytwoId:that.categorytwoId, mileage:that.mileageName, - goodsTime:that.goodsTime, + goodsTime:that.goodsTime!='全部'?that.goodsTime:'', goodsName:that.goodsName, pageNo:that.pageNo, pageSize:that.pageSize, @@ -242,6 +263,26 @@ }) }, onDetail(event){ + let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus") + if(companyAuthenticationStatus==1){ + uni.navigateTo({ + url:"/pages_subpack/detail/index?goodsId="+event.id + }) + return; + } + let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus") + if (personAuthenticationStatus != 1){ + return uni.showModal({ + title:"未认证", + showCancel:false, + content:"立即前往认证", + success() { + uni.navigateTo({ + url:"/pages/identity/index?userStatus=1" + }) + } + }) + } uni.navigateTo({ url:"/pages_subpack/detail/index?goodsId="+event.id }) diff --git a/pages_subpack/detail/index.vue b/pages_subpack/detail/index.vue index dfbe1c9..a075ee6 100644 --- a/pages_subpack/detail/index.vue +++ b/pages_subpack/detail/index.vue @@ -9,11 +9,12 @@ {{detail.goodsName}} - ¥{{detail.price}}/月 + ¥{{detail.price | getPersonAuthentication}}/月 - 销售量{{detail.views}}+ + 销售量{{detail.views}}+ + 浏览量{{detail.views}}+ + + + - + { let result = response.result - let list =[] - response.result.cerImage.split(',').forEach(item=>{ - list.push({ - url: item - }) - }) + // let list =[] + // response.result.cerImage.split(',').forEach(item=>{ + // list.push({ + // url: item + // }) + // }) this.form={ name: result.name, mobile: result.phone, idCard:result.cerNo, - fileList:list, + company:result.company, + fileList:[], } }).catch(error=>{ @@ -155,11 +160,13 @@ onAddUser(){ let that = this let params={ - cerImage:that.form.fileList.map(item => item.url).join(','), + // cerImage:that.form.fileList.map(item => item.url).join(','), + cerImage:[], cerNo:that.form.idCard, id:uni.getStorageSync('userInfo').id, name:that.form.name, - phone:that.form.mobile + phone:that.form.mobile, + company:that.form.company } addUser(params).then(response=>{ uni.$u.toast(response.result) diff --git a/pages_subpack/release/index.vue b/pages_subpack/release/index.vue index 1c8c342..5f485f7 100644 --- a/pages_subpack/release/index.vue +++ b/pages_subpack/release/index.vue @@ -41,27 +41,27 @@ - + - +
/月
- + - + @@ -132,22 +132,23 @@ - 发布订单 + 提交订单 - - +
@@ -158,7 +159,7 @@ const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime(); const startOfYesterday = startOfToday - 24 * 60 * 60 * 1000; - import { queryTypeList,addGoods,queryCategoryOneList,queryCategoryTwoList,queryCategoryList } from "@/common/api.js" + import { queryTypeList,addGoods,queryCategoryOneList,queryCategoryTwoList,queryCategoryList,queryGoodsById } from "@/common/api.js" import QQMapWX from "@/util/qqmap-wx-jssdk.min.js" export default { components:{ @@ -166,6 +167,8 @@ }, data() { return { + id:null, + columns:[['2025', '2024', '2023', '2022', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012', '2011', '2010', '2009', '2008', '2007', '2006', '2005', '2004', '2003', '2002', '2001', '2000']], maxDate:startOfYesterday, actions:[], showType:false, @@ -237,12 +240,14 @@ // } // ],//车辆照片右 // fileCabList:[ -// { -// url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png" -// }, -// { -// url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png" -// } + // { + // status:1, + // url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png" + // }, + // { + // status:0, + // url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png" + // } // ],//车辆照片 驾驶室 // introduce:`车型名称:车辆的品牌和型号,例如 "Toyota Corolla 2024"。 // 车辆类型:轿车、SUV、MPV、皮卡、跑车等。 @@ -279,7 +284,6 @@ rules: { typeId:[ { - type: 'string', required: true, message: '请选择类型', trigger: ['blur', 'change'] @@ -287,7 +291,6 @@ ], goodsName:[ { - type: 'string', required: true, message: '请填写标题', trigger: ['blur', 'change'] @@ -295,7 +298,6 @@ ], brand:[ { - type: 'string', required: true, message: '请填写品牌', trigger: ['blur', 'change'] @@ -303,7 +305,6 @@ ], model:[ { - type: 'string', required: true, message: '请填写型号', trigger: ['blur', 'change'] @@ -311,7 +312,6 @@ ], area:[ { - type: 'string', required: true, message: '请选择所在地区', trigger: ['blur', 'change'] @@ -319,7 +319,6 @@ ], date:[ { - type: 'string', required: true, message: '请填写时间', trigger: ['blur', 'change'] @@ -327,7 +326,6 @@ ], mileage:[ { - type: 'string', required: true, message: '请填写公里数', trigger: ['blur', 'change'] @@ -335,23 +333,20 @@ ], price:[ { - type: 'string', required: true, message: '请填写价格', - trigger: ['blur', 'change'] + trigger: ['blur'] } ], inventory:[ { - type: 'string', required: true, message: '请填写库存', - trigger: ['blur', 'change'] + trigger: ['blur'] } ], contacts:[ { - type: 'string', required: true, message: '请填写联系人', trigger: ['blur', 'change'] @@ -359,7 +354,6 @@ ], phone:[ { - type: 'string', required: true, message: '请填写联系电话', trigger: ['blur', 'change'] @@ -367,10 +361,9 @@ ], views:[ { - type: 'string', required: true, message: '请填写浏览量', - trigger: ['blur', 'change'] + trigger: ['blur'] } ], fileCarList:[ @@ -450,24 +443,79 @@ } }, onLoad(options) { + let that = this + + if(options.id){ + that.id = options.id + that.getQueryGoodsById() + }else{ + that.onQueryCategoryList() + } // this.onQueryTypeList() // this.onQueryCategoryOneList() // this.onQueryCategoryTwoList() - this.onQueryCategoryList() }, watch: { + // "form.categorytwoId": function (newVal, oldVal) { + // if (newVal) { + // this.$nextTick(() => { + // this.form.categorytwoName = this.categoryTwoList + // .filter((item) => item.id == newVal) + // .map((item) => item.name) + // .join(''); + // }); + // } + // } }, methods: { + getQueryGoodsById(){ + let that = this + queryGoodsById({goodsId:that.id}).then(response=>{ + let items = response.result; + console.info("queryGoodsById",response) + that.form.cartypeId=items.cartypeId + that.form.categorytwoId=items.categorytwoId + that.form.categorytwoName=items.categorytwoName + that.form.goodsName=items.goodsName + that.form.brand=items.brand + that.form.model=items.model + that.form.area=items.area + that.form.latitude=items.latitude + that.form.date=String(items.goodsTime) + that.form.inventory=String(items.inventory) + that.form.mileage=String(items.mileage) + that.form.contacts=items.userName + that.form.phone=items.phone + that.form.price=String(items.price) + that.form.views=String(items.views) + that.form.introduce=items.detail + that.form.fileCarList=items.image.split(',').map((url) => ({ url })) + that.form.fileBackList=items.imageBack.split(',').map((url) => ({ url })) + that.form.fileCabList=items.imageCab.split(',').map((url) => ({ url })) + that.form.fileFrontList=items.imageFront.split(',').map((url) => ({ url })) + that.form.fileLeftList=items.imageLeft.split(',').map((url) => ({ url })) + that.form.fileRightList=items.imageRight.split(',').map((url) => ({ url })) + that.onQueryCategoryList() + + // this.$refs.uForm.setRules(this.rules) + }).catch(error=>{ + + }) + }, onQueryCategoryList(){ let that = this queryCategoryList({}).then(response=>{ console.info("queryCategoryList",response) if(response.result.length>0){ that.categoryList = response.result - that.form.cartypeId = response.result[0].id - that.form.cartypeName = response.result[0].name - that.categoryTwoList = response.result[0].carrentCategorytwoList + if(!that.id){ + that.form.cartypeId = response.result[0].id + that.form.cartypeName = response.result[0].name + that.categoryTwoList = response.result[0].carrentCategorytwoList + }else{ + that.categoryTwoList = response.result.find(item => item.id == that.form.cartypeId).carrentCategorytwoList + } } }).catch(error=>{ @@ -530,12 +578,14 @@ }, onConfirm(e){ console.info('e',e) - const date = new Date(e.value); - const year = date.getFullYear(); - const month = String(date.getMonth() + 1).padStart(2, '0'); - const day = String(date.getDate()).padStart(2, '0'); - this.form.date = `${year}-${month}-${day}`; + this.form.date = e.value[0]; this.showDate = false + // const date = new Date(e.value); + // const year = date.getFullYear(); + // const month = String(date.getMonth() + 1).padStart(2, '0'); + // const day = String(date.getDate()).padStart(2, '0'); + // this.form.date = `${year}-${month}-${day}`; + // this.showDate = false }, handleAreaChange(){ const that = this; @@ -661,7 +711,7 @@ }) }, onSubmit() { - // console.info(this.form) + console.info(this.form) // uni.navigateTo({ // url:"/pages_subpack/success/index" // }) @@ -676,9 +726,8 @@ onAddGoods(){ let that = this let params={ + id:that.id?that.id:null, cartypeId:that.form.cartypeId, - // categorytwoId:"1867040891523936258", - // cartypeId:that.form.typeId, categorytwoId:that.form.categorytwoId, goodsName:that.form.goodsName,//商品名称 brand:that.form.brand,//品牌 @@ -686,7 +735,7 @@ area:that.form.area,//所在区域 latitude:that.form.latitude, longitude:that.form.longitude, - goodsTime:that.form.date,//时间 + goodsTime:Number(that.form.date),//时间 inventory:that.form.inventory,//库存 mileage:that.form.mileage,//公里数 userName:that.form.contacts,//联系人 @@ -701,19 +750,30 @@ imageRight:that.form.fileRightList.map(item => item.url).join(','),//车辆照片(右) detail:that.form.introduce,//车辆介绍 } + uni.showLoading({ + title:"提交中..." + }) addGoods(params).then(response=>{ console.info('response',response) - uni.showToast({ - title: response.message, - mask: false, - icon: 'none', - duration: 2000 - }) - setTimeout(()=>{ - uni.switchTab({ - url:"/pages/home/index" + uni.hideLoading() + if(that.id){ + uni.navigateBack({ + delta:1 }) - },1500) + }else{ + uni.showToast({ + title: response.message, + mask: false, + icon: 'none', + duration: 2000 + }) + setTimeout(()=>{ + uni.switchTab({ + url:"/pages/home/index" + }) + },1500) + } + }).catch(error=>{ }) diff --git a/pages_subpack/release/list.vue b/pages_subpack/release/list.vue index 5ecc009..f315668 100644 --- a/pages_subpack/release/list.vue +++ b/pages_subpack/release/list.vue @@ -2,12 +2,15 @@ - - - + + 未通过 + 已通过 + 审核中 + + {{ items.goodsName }} - + {{items.brand}} @@ -18,11 +21,15 @@ {{items.mileage}}公里 - + {{items.price}}/月 + + 删除 + 修改 + @@ -38,7 +45,7 @@ @@ -132,6 +166,19 @@ box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0,0,0,0.05); padding: 20rpx; } + .se-status{ + padding: 5rpx 10rpx; + border-radius: 5rpx 0 0 0; + border: 2rpx solid rgba(0,0,0,0.00); + font-size: 18rpx; + font-family: PingFang SC, PingFang SC-Bold; + font-weight: 700; + text-align: center; + color: #ffffff; + position: absolute; + left: 0px; + top: 0px; + } .se-tag{ padding: 5rpx 10rpx; background: #fff2df; diff --git a/pages_subpack/spare/index.vue b/pages_subpack/spare/index.vue index da84721..d08a45d 100644 --- a/pages_subpack/spare/index.vue +++ b/pages_subpack/spare/index.vue @@ -25,7 +25,7 @@ --> - {{items.price}}/月 + {{items.price | getPersonAuthentication}}/月 @@ -53,6 +53,20 @@ this.id = options.id this.onQueryCategoryTwoList() }, + filters:{ + getPersonAuthentication(price){ + let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus") + if(companyAuthenticationStatus==1){ + return price + } + + let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus") + if (personAuthenticationStatus != 1){ + return '***'; + } + return price + } + }, methods:{ onItems(indexs,items){ this.current=indexs @@ -76,6 +90,7 @@ onPageList(){ let that = this let params={ + status:1, cartypeId:that.id, categorytwoId:that.categorytwoId, pageNo:that.pageNo, @@ -126,6 +141,26 @@ }) }, onDetail(event){ + let companyAuthenticationStatus = uni.getStorageSync("companyAuthenticationStatus") + if(companyAuthenticationStatus==1){ + uni.navigateTo({ + url:"/pages_subpack/detail/index?goodsId="+event.id + }) + return; + } + let personAuthenticationStatus =uni.getStorageSync("personAuthenticationStatus") + if (personAuthenticationStatus != 1){ + return uni.showModal({ + title:"未认证", + showCancel:false, + content:"立即前往认证", + success() { + uni.navigateTo({ + url:"/pages/identity/index?userStatus=1" + }) + } + }) + } uni.navigateTo({ url:"/pages_subpack/detail/index?goodsId="+event.id })