修改小程序bug
This commit is contained in:
@@ -155,22 +155,13 @@
|
||||
this.showUpdating = true
|
||||
}
|
||||
|
||||
|
||||
if (detail) {
|
||||
detail.pub_time = dateFormatDetail(detail.pub_time)
|
||||
if (detail.tags) {
|
||||
detail.tags = detail.tags.split(',')
|
||||
}
|
||||
//点赞数
|
||||
if (detail.thumbcount !== 0 && detail.is_thumb == 0) {
|
||||
detail.thumb = parseInt(detail.thumb) + parseInt(detail.thumbcount)
|
||||
} else {
|
||||
if (detail.is_thumb == 1) {
|
||||
detail.thumb = parseInt(detail.thumb) + parseInt(detail.thumbcount)
|
||||
} else {
|
||||
detail.thumb = parseInt(detail.thumb) - parseInt(detail.thumbcount)
|
||||
}
|
||||
}
|
||||
detail.thumb = parseInt(detail.thumb) + parseInt(detail.thumbcount)
|
||||
this.detailList = detail
|
||||
}
|
||||
}).finally(_ => {})
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
<view style="margin-bottom: 20rpx;">
|
||||
<u-form-item label="姓名" borderBottom>
|
||||
<u-input v-model="needsPublishForm.name" :border="false" placeholder="请输入您的名称"
|
||||
placeholder-style="color:#CCCCCC" />
|
||||
placeholder-style="color:#CCCCCC" :disabled="btnDisabled" disabledColor="#ffffff" />
|
||||
</u-form-item>
|
||||
<u-form-item label="城市">
|
||||
<view class="select-view" @tap="showCityPicker = true">
|
||||
<view class="select-view" @tap="btnDisabled==true?showCityPicker=false:showCityPicker = true">
|
||||
<text v-if="needsPublishForm.area_name">{{needsPublishForm.area_name}}</text>
|
||||
<text v-else style="color:#CCCCCC;">请选择所在城市</text>
|
||||
<u-icon name="arrow-right" color="#969696" size="14"></u-icon>
|
||||
@@ -26,39 +26,46 @@
|
||||
<view v-if="tabCurrent === 1">
|
||||
<u-form-item label="品名" borderBottom>
|
||||
<u-input v-model="needsPublishForm.pname" :border="false" placeholder="请输入您的产品名称"
|
||||
placeholder-style="color:#CCCCCC" />
|
||||
placeholder-style="color:#CCCCCC" :disabled="btnDisabled" disabledColor="#ffffff" />
|
||||
</u-form-item>
|
||||
<u-form-item label="分类" borderBottom>
|
||||
<view class="select-view" @tap="showCategoryPicker = true">
|
||||
<view class="select-view"
|
||||
@tap="btnDisabled==true?showCategoryPicker=false: showCategoryPicker=true">
|
||||
<text v-if="needsPublishForm.class">{{needsPublishForm.class}}</text>
|
||||
<text v-else style="color:#CCCCCC;">请选择分类</text>
|
||||
<u-icon name="arrow-right" color="#969696" size="14"></u-icon>
|
||||
</view>
|
||||
<u-picker :show="showCategoryPicker" :columns="categoryPickerList"
|
||||
@cancel="showCategoryPicker = false" @confirm="getCategoryValue"></u-picker>
|
||||
@cancel="showCategoryPicker = false" @confirm="getCategoryValue">
|
||||
</u-picker>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<u-form-item label="产品" borderBottom>
|
||||
<view class="select-view" @tap="showProductPicker = true">
|
||||
<view class="select-view"
|
||||
@tap="btnDisabled==true?showProductPicker=false: showProductPicker = true">
|
||||
<text v-if="needsPublishForm.product">{{needsPublishForm.product}}</text>
|
||||
<text v-else style="color:#CCCCCC;">请选择产品类型</text>
|
||||
<u-icon name="arrow-right" color="#969696" size="14"></u-icon>
|
||||
</view>
|
||||
<u-picker :show="showProductPicker" :columns="productPickerColumn"
|
||||
@cancel="showProductPicker = false" @confirm="getProductValue"></u-picker>
|
||||
@cancel="showProductPicker = false" @confirm="getProductValue">
|
||||
</u-picker>
|
||||
</u-form-item>
|
||||
<u-form-item label="定位" borderBottom>
|
||||
<view class="select-view" @tap="showPositionPicker = true">
|
||||
<view class="select-view"
|
||||
@tap="btnDisabled==true?showPositionPicker=false:showPositionPicker = true">
|
||||
<text v-if="needsPublishForm.loc">{{needsPublishForm.loc}}</text>
|
||||
<text v-else style="color:#CCCCCC;">请选择产品定位</text>
|
||||
<u-icon name="arrow-right" color="#969696" size="14"></u-icon>
|
||||
</view>
|
||||
<u-picker :show=showPositionPicker :columns="positionPickerColumn"
|
||||
@cancel="showPositionPicker = false" @confirm="getPositionValue"></u-picker>
|
||||
@cancel="showPositionPicker = false" @confirm="getPositionValue">
|
||||
</u-picker>
|
||||
</u-form-item>
|
||||
<view style="padding: 20rpx 15rpx;background-color: #fff;">
|
||||
<u-textarea v-model="needsPublishForm.desc" border="surround" placeholder="请输入具体描述(限120字)"
|
||||
:maxlength="120" placeholder-style="color:#CCCCCC"></u-textarea>
|
||||
:maxlength="120" placeholder-style="color:#CCCCCC" :disabled="btnDisabled"
|
||||
disabledColor="#ffffff"></u-textarea>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -66,7 +73,7 @@
|
||||
<u-form-item label="上传图片" labelPosition="top">
|
||||
<view style="padding-left: 20rpx;margin-top: 20rpx;">
|
||||
<u-upload :fileList="fileList1" :auto-upload="false" @afterRead="afterRead" @delete="deletePic"
|
||||
name="1" multiple :maxCount="10"></u-upload>
|
||||
name="1" multiple :maxCount="10" :disabled="btnDisabled"></u-upload>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
@@ -74,7 +81,7 @@
|
||||
<view style="background-color: #fff;">
|
||||
<u-form-item label="手机" borderBottom>
|
||||
<u--input placeholder="请输入手机号" :border="false" v-model="needsPublishForm.mobile"
|
||||
placeholder-style="color:#CCCCCC"></u--input>
|
||||
placeholder-style="color:#CCCCCC" :disabled="btnDisabled" disabledColor="#ffffff"></u--input>
|
||||
</u-form-item>
|
||||
<!-- <u-form-item label="验证" borderBottom>
|
||||
<view style="display: flex;padding-right: 20rpx;align-items: center;">
|
||||
@@ -97,7 +104,6 @@
|
||||
style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;"
|
||||
v-if="tabCurrent === 1">{{claim_c}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u--form>
|
||||
<view style="margin:0 20rpx;">
|
||||
@@ -143,18 +149,13 @@
|
||||
productPickerList: [],
|
||||
productPickerColumn: [
|
||||
[]
|
||||
// {name: '烘焙', val: 'hongbei'}
|
||||
// {name: '零食', val: 'ls'}
|
||||
// {name: '饮料', val: 'yl'}
|
||||
],
|
||||
positionPickerList: [],
|
||||
positionPickerColumn: [
|
||||
[]
|
||||
],
|
||||
categoryPickerList: [],
|
||||
fileList1: [
|
||||
// uploads/images/20230117/202301172309397deda1543.jpg
|
||||
],
|
||||
fileList1: [],
|
||||
isLoad: true,
|
||||
cateName: null,
|
||||
tagName: null,
|
||||
@@ -166,9 +167,6 @@
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
||||
this.isLoad = false
|
||||
// uni.navigateTo({
|
||||
// url: '../../pages/my/login/login'
|
||||
// })
|
||||
return
|
||||
}
|
||||
this.isLoad = true
|
||||
@@ -193,14 +191,14 @@
|
||||
this.$toast.warn(error)
|
||||
}
|
||||
}
|
||||
if (options.view == 11) {
|
||||
this.btnDisabled = true
|
||||
}
|
||||
if (options.index == 0) {
|
||||
this.tabCurrent = 0
|
||||
} else if (options.index == 1) {
|
||||
this.tabCurrent = 1
|
||||
}
|
||||
if (options.view == 11) {
|
||||
this.btnDisabled = true
|
||||
}
|
||||
// this.getProductPickerList()
|
||||
},
|
||||
onShow() {
|
||||
@@ -210,6 +208,8 @@
|
||||
tabChange(data) {
|
||||
this.tabCurrent = data.index
|
||||
this.needsPublishForm = {}
|
||||
this.fileList1 = []
|
||||
this.btnDisabled = this.btnDisabled == true ? false : false;
|
||||
},
|
||||
getFormData() {
|
||||
this.$apiServe.getIdeasAndNeedsFormdata().then(res => {
|
||||
@@ -427,6 +427,10 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/deep/.u-textarea--disabled {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
.content {
|
||||
background-color: #F8F8F8;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user