diff --git a/components/uni-searchbar.vue b/components/uni-searchbar.vue index 7b37d01..f605fd7 100644 --- a/components/uni-searchbar.vue +++ b/components/uni-searchbar.vue @@ -12,7 +12,10 @@ :focus="true" placeholder="搜索优质产品" prefixIcon="search" - :border="false" style="background-color: #fff;border: none;"/> + :border="false" + style="background-color: #fff;border: none;" + confirm-type="go" + @confirm="goSearch(queryParamF)"/> 搜索优质商品 @@ -49,19 +52,25 @@ }, data() { return { - queryParamF: null + queryParamF: '' } }, watch: { queryParam: { handler(val) { - this.queryParamF = this.queryParam + this.queryParamF = this.queryParam || '' }, immediate: true } }, methods: { - goSearch() { + goSearch(value) { + console.log('---enter') + console.log(value) + console.log(this.queryParamF) + if(!this.queryParamF && value) { + this.queryParamF = value + } if(this.readOnly) { this.$emit('navigate') return diff --git a/packageMy/myRelease/myRelease.vue b/packageMy/myRelease/myRelease.vue index 157bfc4..55949ca 100644 --- a/packageMy/myRelease/myRelease.vue +++ b/packageMy/myRelease/myRelease.vue @@ -77,7 +77,14 @@ ideasList: [] } }, - onLoad() { + onLoad(options) { + console.log(options) + if(options && options.index) { + console.log(options) + options.index = options.index - 1 + this.tabChange(options) + return + } this.getIdeasAndNeeds() }, methods: { diff --git a/packageSearch/goods-category-search/category-index.vue b/packageSearch/goods-category-search/category-index.vue index e558059..fd096fc 100644 --- a/packageSearch/goods-category-search/category-index.vue +++ b/packageSearch/goods-category-search/category-index.vue @@ -16,7 +16,7 @@ - + {{item.name}} @@ -392,7 +392,7 @@ this.goodsParam.pageNum++ this.getGoodsList(false) } else { - this.$toast.warn('没有更多数据了') + this.$toast.warn('暂无数据') } setTimeout(() => { uni.hideLoading() diff --git a/pages/ideasAndNeeds/ideasAndNeeds.vue b/pages/ideasAndNeeds/ideasAndNeeds.vue index 7c7df9e..d8d92b9 100644 --- a/pages/ideasAndNeeds/ideasAndNeeds.vue +++ b/pages/ideasAndNeeds/ideasAndNeeds.vue @@ -403,6 +403,14 @@ apiService.submitIdeasAndNeeds(data).then(res => { this.$toast.success('提交成功') console.log('esf=', res); + if(this.needsPublishForm.id) { + uni.navigateTo({ + url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1) + }) + } + this.tabCurrent = 0 + this.fileList1 = [] + this.needsPublishForm = {} // this.$toast.success(res.data.msg) }).catch(error => { this.$toast.warn(error) @@ -425,6 +433,17 @@ failToLoad() { console.log('----------------false') this.$toast.warn('登录失败请重试') + uni.navigateTo({ + url: '/pages/index/index' + }) + // uni.navigateBack({ + // success: () => { + // let page = getCurrentPages().pop(); + // if (page) { + // page.onLoad(page.options);//执行上个页面的方法 + // }; + // } + // }) } }