Merge pull request '问题修复' (#75) from chenxuelian into dev

Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/75
This commit is contained in:
1171906056
2023-02-01 13:58:15 +00:00
4 changed files with 42 additions and 7 deletions

View File

@@ -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)"/>
<view v-else style="width: 360rpx;padding: 10rpx 20rpx;display: flex;align-items: center;" @click="goSearch">
<u-icon name="search" color="#969696" size="22"></u-icon>
<text style="margin-left:10rpx;font-size: 30rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #969696;line-height: 37rpx;">搜索优质商品</text>
@@ -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

View File

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

View File

@@ -16,7 +16,7 @@
<image :src="item.icon" mode="aspectFit" class="icon"
:style="{border: item.active?'2rpx #14CA65 solid':'0',}" />
</view>
<view class="name" :style="{width: item.active?'152rpx':'126rpx'}">
<view class="name" :style="{width: item.active?'156rpx':'126rpx'}">
<u-tag v-if="item.active" :text="item.name" bg-color="#14CA65" color="#fff"
borderColor="#14CA65" shape="circle" />
<text v-else class="no-active">{{item.name}}</text>
@@ -392,7 +392,7 @@
this.goodsParam.pageNum++
this.getGoodsList(false)
} else {
this.$toast.warn('没有更多数据')
this.$toast.warn('暂无数据')
}
setTimeout(() => {
uni.hideLoading()

View File

@@ -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);//执行上个页面的方法
// };
// }
// })
}
}