Merge pull request 'dengjie' (#95) from dengjie into dev
Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/95
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<view style="margin-top: 10rpx;margin-bottom: 4rpx;">
|
<view style="margin-top: 10rpx;margin-bottom: 4rpx;">
|
||||||
<u--image v-if="member=='2'" :src="normal" width="84rpx" height="30rpx">
|
<u--image v-if="member=='2'" :src="normal" width="84rpx" height="30rpx">
|
||||||
</u--image>
|
</u--image>
|
||||||
<u--image v-if="member=='3'" :src="VIP" width="84rpx" height="30rpx">
|
<u--image v-if="member=='4'" :src="VIP" width="84rpx" height="30rpx">
|
||||||
</u--image>
|
</u--image>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
member: false,
|
member: '',
|
||||||
showEdit: true,
|
showEdit: true,
|
||||||
avatar: '',
|
avatar: '',
|
||||||
nickname: '用户',
|
nickname: '用户',
|
||||||
@@ -67,7 +67,6 @@
|
|||||||
//获取头像昵称和普通会员和VIP会员
|
//获取头像昵称和普通会员和VIP会员
|
||||||
getUser() {
|
getUser() {
|
||||||
this.$apiServe.getUser().then(res => {
|
this.$apiServe.getUser().then(res => {
|
||||||
console.log('个人信息==', res.data);
|
|
||||||
if (res.data.msg === "登录超时,请重新登录") {
|
if (res.data.msg === "登录超时,请重新登录") {
|
||||||
this.isLoad = false
|
this.isLoad = false
|
||||||
}
|
}
|
||||||
@@ -75,6 +74,8 @@
|
|||||||
this.avatar = uni.getStorageSync('img_url') + data.avatar
|
this.avatar = uni.getStorageSync('img_url') + data.avatar
|
||||||
this.nickname = data.nickname
|
this.nickname = data.nickname
|
||||||
this.member = data.member
|
this.member = data.member
|
||||||
|
uni.setStorageSync('member', data.member)
|
||||||
|
uni.setStorageSync('agreement', data.agreement)
|
||||||
uni.setStorageSync('com_name', data.com_name)
|
uni.setStorageSync('com_name', data.com_name)
|
||||||
uni.setStorageSync('com_mobile', data.com_mobile)
|
uni.setStorageSync('com_mobile', data.com_mobile)
|
||||||
}).finally(_ => {})
|
}).finally(_ => {})
|
||||||
|
|||||||
@@ -12,13 +12,13 @@
|
|||||||
</u-image>
|
</u-image>
|
||||||
<view class="img_tag">{{item.cate_name}}</view>
|
<view class="img_tag">{{item.cate_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding: 14rpx 22rpx;">
|
<view style="padding: 14rpx 24rpx 14rpx 16rpx;">
|
||||||
<view class="title_box">
|
<view class="title_box">
|
||||||
<text class="title">{{item.name}}</text>
|
<text class="title">{{item.name}}</text>
|
||||||
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
|
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
|
||||||
</view>
|
</view>
|
||||||
<view class="product_desc">
|
<view class="product_desc">
|
||||||
{{item.desc}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
<view class="releaseDate">
|
<view class="releaseDate">
|
||||||
<u-image src="/static/products/xp_icon_sjf.png" width="22rpx" height="22rpx"
|
<u-image src="/static/products/xp_icon_sjf.png" width="22rpx" height="22rpx"
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
styleIsolation: 'shared', // 解除样式隔离
|
styleIsolation: 'shared', // 解除样式隔离
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.imgUrl = uni.getStorageSync('img_url')
|
this.imgUrl = uni.getStorageSync('img_url')
|
||||||
this.getHistoryOrCollection()
|
this.getHistoryOrCollection()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</u-image>
|
</u-image>
|
||||||
<view class="img_tag">{{item.cate_name}}</view>
|
<view class="img_tag">{{item.cate_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding: 14rpx 22rpx;">
|
<view style="padding: 14rpx 24rpx 14rpx 16rpx;">
|
||||||
<view class="title_box">
|
<view class="title_box">
|
||||||
<text class="title">{{item.name}}</text>
|
<text class="title">{{item.name}}</text>
|
||||||
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
|
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
// this.sortType = 2
|
// this.sortType = 2
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
this.imgUrl = uni.getStorageSync('img_url')
|
this.imgUrl = uni.getStorageSync('img_url')
|
||||||
this.getProductsByThumb()
|
this.getProductsByThumb()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</u-image>
|
</u-image>
|
||||||
<view class="img_tag">{{item.cate_name}}</view>
|
<view class="img_tag">{{item.cate_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding: 14rpx 22rpx;">
|
<view style="padding: 14rpx 24rpx 14rpx 16rpx;">
|
||||||
<view class="title_box">
|
<view class="title_box">
|
||||||
<text class="title">{{item.name}}</text>
|
<text class="title">{{item.name}}</text>
|
||||||
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
|
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
|
||||||
|
|||||||
@@ -7,18 +7,14 @@
|
|||||||
<u-icon name="arrow-left" color="#fff;" />
|
<u-icon name="arrow-left" color="#fff;" />
|
||||||
</view>
|
</view>
|
||||||
<view class="search-input">
|
<view class="search-input">
|
||||||
<u-input v-if="!readOnly"
|
<u-input v-if="!readOnly" v-model="queryParamF" :focus="true" placeholder="搜索优质产品"
|
||||||
v-model="queryParamF"
|
prefixIcon="search" :border="false" style="background-color: #fff;border: none;"
|
||||||
:focus="true"
|
confirm-type="go" @confirm="goSearch(queryParamF)" />
|
||||||
placeholder="搜索优质产品"
|
<view v-else style="width: 360rpx;padding: 10rpx 20rpx;display: flex;align-items: center;"
|
||||||
prefixIcon="search"
|
@click="goSearch">
|
||||||
: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>
|
<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>
|
<text
|
||||||
|
style="margin-left:10rpx;font-size: 30rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #969696;line-height: 37rpx;">搜索优质商品</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-btn" @click="goSearch">搜索</view>
|
<view class="search-btn" @click="goSearch">搜索</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -65,10 +61,10 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goSearch(value) {
|
goSearch(value) {
|
||||||
if(!this.queryParamF && value) {
|
if (!this.queryParamF && value) {
|
||||||
this.queryParamF = value
|
this.queryParamF = value
|
||||||
}
|
}
|
||||||
if(this.readOnly) {
|
if (this.readOnly) {
|
||||||
this.$emit('navigate')
|
this.$emit('navigate')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -94,12 +90,14 @@
|
|||||||
margin: 10rpx 10rpx;
|
margin: 10rpx 10rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.top-left {
|
.top-left {
|
||||||
width: calc(100% - 200rpx);
|
width: calc(100% - 200rpx);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.search-input {
|
.search-input {
|
||||||
display: flex;
|
display: flex;
|
||||||
border: 2rpx solid #fff;
|
border: 2rpx solid #fff;
|
||||||
@@ -107,6 +105,7 @@
|
|||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
|
|
||||||
.search-btn {
|
.search-btn {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
<u-navbar :autoBack="true" title="会员中心"></u-navbar>
|
<u-navbar :autoBack="true" title="会员中心"></u-navbar>
|
||||||
<u--image src="/static/my/wo_icon_hyzxbj.png" width="750rpx" height="349rpx" :lazy-load="true">
|
<u--image src="/static/my/wo_icon_hyzxbj.png" width="750rpx" height="349rpx" :lazy-load="true">
|
||||||
</u--image>
|
</u--image>
|
||||||
<myAvatar :center="show"></myAvatar>
|
<myAvatar ref="myavatar" :center="show"></myAvatar>
|
||||||
<view style="height: 56rpx;"></view>
|
<view style="height: 56rpx;"></view>
|
||||||
<myForm ref="nameAndphone"></myForm>
|
<myForm ref="nameAndphone"></myForm>
|
||||||
<view class="commitment">
|
<view class="commitment">
|
||||||
{{commitment}}
|
{{commitment}}
|
||||||
</view>
|
</view>
|
||||||
<u-button type="success" text="升级VIP" color="#0EBB5B" @click="handleSureClick()"></u-button>
|
<u-button type="success" :text="btnText" color="#0EBB5B" @click="handleSureClick()" :disabled="btnDisabled">
|
||||||
|
</u-button>
|
||||||
<u-modal :show="showM" closeOnClickOverlay="false" confirmText="确定" @confirm="confirm">
|
<u-modal :show="showM" closeOnClickOverlay="false" confirmText="确定" @confirm="confirm">
|
||||||
<rich-text :nodes="content"></rich-text>
|
<rich-text :nodes="content"></rich-text>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
@@ -23,17 +24,28 @@
|
|||||||
name: '',
|
name: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
showM: false,
|
showM: false,
|
||||||
|
btnText: '升级VIP',
|
||||||
|
btnDisabled: false,
|
||||||
//部分产品无权限访问,需升级VIP
|
//部分产品无权限访问,需升级VIP
|
||||||
needAsk: '',
|
needAsk: '',
|
||||||
//会员中心的用户名旁边不显示edit图标
|
//会员中心的用户名旁边不显示edit图标
|
||||||
show: false,
|
show: false,
|
||||||
content: `请保持手机畅通<br>
|
content: `请保持手机畅通<br>
|
||||||
客服会及时联系您`,
|
客服会及时联系您`,
|
||||||
commitment: '承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置'
|
commitment: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
console.log('ask', option.ask);
|
if (uni.getStorageSync('member') == 2) {
|
||||||
|
this.btnText = '升级VIP'
|
||||||
|
} else if (uni.getStorageSync('member') == 3) {
|
||||||
|
this.btnText = '升级vip,正在审核中'
|
||||||
|
this.btnDisabled = true
|
||||||
|
} else if (uni.getStorageSync('member') == 4) {
|
||||||
|
this.btnText = '升级VIP'
|
||||||
|
this.btnDisabled = true
|
||||||
|
}
|
||||||
|
this.commitment = uni.getStorageSync('agreement')
|
||||||
if (option.ask == 1) {
|
if (option.ask == 1) {
|
||||||
this.needAsk = option.ask
|
this.needAsk = option.ask
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
<view class="time_line">
|
<view class="time_line">
|
||||||
<view class="release_time">
|
<view class="release_time">
|
||||||
<text>{{item.pub_time}}</text>
|
<text v-if="updateIndex==0||updateIndex==1">{{item.update_time}}</text>
|
||||||
|
<text v-else>{{item.pub_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
<view class="btn" @click="editIdeasAndNeeds(item)">
|
<view class="btn" @click="editIdeasAndNeeds(item)">
|
||||||
@@ -32,7 +33,9 @@
|
|||||||
<text class="needs_text">{{item.pname}}</text>
|
<text class="needs_text">{{item.pname}}</text>
|
||||||
<view class="time_line">
|
<view class="time_line">
|
||||||
<view class="release_time">
|
<view class="release_time">
|
||||||
<text>{{item.pub_time}}</text>
|
|
||||||
|
<text v-if="updateIndex==0||updateIndex==1">{{item.update_time}}</text>
|
||||||
|
<text v-else>{{item.pub_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
<view class="btn" @click="editIdeasAndNeeds(item)">
|
<view class="btn" @click="editIdeasAndNeeds(item)">
|
||||||
@@ -74,26 +77,27 @@
|
|||||||
name: '创意发布'
|
name: '创意发布'
|
||||||
}],
|
}],
|
||||||
needsList: [],
|
needsList: [],
|
||||||
ideasList: []
|
ideasList: [],
|
||||||
|
updateIndex: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log(options)
|
|
||||||
if (options && options.index) {
|
if (options && options.index) {
|
||||||
console.log(options)
|
|
||||||
options.index = options.index - 1
|
options.index = options.index - 1
|
||||||
|
this.updateIndex = options.index
|
||||||
this.tabChange(options)
|
this.tabChange(options)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.getIdeasAndNeeds()
|
this.getIdeasAndNeeds()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取创意发布
|
//获取创意发布或需求发布
|
||||||
getIdeasAndNeeds() {
|
getIdeasAndNeeds() {
|
||||||
this.$apiServe.getIdeasAndNeeds(this.type).then(res => {
|
this.$apiServe.getIdeasAndNeeds(this.type).then(res => {
|
||||||
let data = res.data.data
|
let data = res.data.data
|
||||||
for (const item of data) {
|
for (const item of data) {
|
||||||
item.pub_time = dateFormatXwDetail(item.pub_time)
|
item.pub_time = dateFormatXwDetail(item.pub_time)
|
||||||
|
item.update_time = dateFormatXwDetail(item.update_time)
|
||||||
const imagesList = item.images && item.images.length > 0 ? item.images.split(';') : []
|
const imagesList = item.images && item.images.length > 0 ? item.images.split(';') : []
|
||||||
item.images = imagesList.map(item1 => {
|
item.images = imagesList.map(item1 => {
|
||||||
item1 = uni.getStorageSync('img_url') + '/' + item1
|
item1 = uni.getStorageSync('img_url') + '/' + item1
|
||||||
@@ -112,7 +116,6 @@
|
|||||||
//切换需求发布和创意发布
|
//切换需求发布和创意发布
|
||||||
tabChange(data) {
|
tabChange(data) {
|
||||||
this.tabCurrent = data.index
|
this.tabCurrent = data.index
|
||||||
// console.log('data.index', data.index);
|
|
||||||
if (data.index == 0) {
|
if (data.index == 0) {
|
||||||
this.type = 1
|
this.type = 1
|
||||||
} else if (data.index == 1) {
|
} else if (data.index == 1) {
|
||||||
@@ -143,7 +146,6 @@
|
|||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
that.$apiServe.deleteIdeasAndNeeds(item.id).then(res => {
|
that.$apiServe.deleteIdeasAndNeeds(item.id).then(res => {
|
||||||
// console.log('删除发布', res);
|
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
that.$toast.warn('删除成功')
|
that.$toast.warn('删除成功')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
</u-image>
|
</u-image>
|
||||||
<view class="img_tag">{{item.cate_name}}</view>
|
<view class="img_tag">{{item.cate_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding: 14rpx 22rpx;">
|
<view style="padding: 14rpx 24rpx 14rpx 16rpx;">
|
||||||
<view class="title_box">
|
<view class="title_box">
|
||||||
<text class="title">{{item.name}}</text>
|
<text class="title">{{item.name}}</text>
|
||||||
<u-tag :text="item.tag" type="warning" shape="circle"></u-tag>
|
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
|
||||||
</view>
|
</view>
|
||||||
<view class="product_desc">
|
<view class="product_desc">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
:lazy-load="true">
|
:lazy-load="true">
|
||||||
</u-image>
|
</u-image>
|
||||||
<text class="release">发布日期:</text>
|
<text class="release">发布日期:</text>
|
||||||
<text>{{item.pub_time}}</text>
|
<text>{{item.pub_time_str}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -44,7 +44,8 @@
|
|||||||
},
|
},
|
||||||
queryTitle: null,
|
queryTitle: null,
|
||||||
imgUrl: null,
|
imgUrl: null,
|
||||||
productList: []
|
productList: [],
|
||||||
|
tagsArray: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@@ -58,8 +59,17 @@
|
|||||||
...this.queryParam,
|
...this.queryParam,
|
||||||
title: this.queryTitle
|
title: this.queryTitle
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$apiServe.getProductList(data).then(res => {
|
this.$apiServe.getProductList(data).then(res => {
|
||||||
this.productList = res.data.data
|
let tags = res.data.data
|
||||||
|
if (tags) {
|
||||||
|
for (const item of tags) {
|
||||||
|
let tag = item.tags
|
||||||
|
this.tagsArray = tag.split(',')
|
||||||
|
item.tags = this.tagsArray[0]
|
||||||
|
}
|
||||||
|
this.productList = tags
|
||||||
|
}
|
||||||
}).finally(_ => {})
|
}).finally(_ => {})
|
||||||
},
|
},
|
||||||
//点击图片跳转到详情页
|
//点击图片跳转到详情页
|
||||||
|
|||||||
@@ -58,7 +58,6 @@
|
|||||||
this.getDiscover()
|
this.getDiscover()
|
||||||
const tempList = uni.getStorageSync('storage_search_record')
|
const tempList = uni.getStorageSync('storage_search_record')
|
||||||
this.recentRecordList = tempList ? tempList : [];
|
this.recentRecordList = tempList ? tempList : [];
|
||||||
console.log(this.recentRecordList)
|
|
||||||
const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
this.searchBarTop = menuButtonInfo.top;
|
this.searchBarTop = menuButtonInfo.top;
|
||||||
this.searchBarHeight = menuButtonInfo.height;
|
this.searchBarHeight = menuButtonInfo.height;
|
||||||
@@ -104,7 +103,6 @@
|
|||||||
getDiscover() {
|
getDiscover() {
|
||||||
this.$apiServe.getDiscover().then(res => {
|
this.$apiServe.getDiscover().then(res => {
|
||||||
this.foundList = res.data.data
|
this.foundList = res.data.data
|
||||||
console.log(res.data.data)
|
|
||||||
}).finally(_ => {})
|
}).finally(_ => {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,18 +48,18 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- thumb无值,显示‘点赞’二字 ,用户进行一次点赞之后,显示1赞-->
|
<!-- thumb无值,显示‘点赞’二字 ,用户进行一次点赞之后,显示1赞-->
|
||||||
<view v-else class="heart">
|
<view v-else class="heart">
|
||||||
<view v-if="detailList.is_thumb==0">
|
<view v-if="detailList.is_thumb==0" style="display: flex;">
|
||||||
<u-image src="/static/detail/xp_icon_heart.png" width="34rpx" height="32rpx"
|
<u-image src="/static/detail/xp_icon_heart.png" width="34rpx" height="32rpx"
|
||||||
@click="heartTap">
|
@click="heartTap">
|
||||||
</u-image>
|
</u-image>
|
||||||
<text class="thumb" @click="heartTap">点赞</text>
|
<text class="thumb" @click="heartTap">点赞</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="detailList.is_thumb==1">
|
<view v-if="detailList.is_thumb==1" style="display: flex;">
|
||||||
<!-- 用户是否点赞字段 showHeart -->
|
<!-- 用户是否点赞字段 showHeart -->
|
||||||
<u-image src="/static/detail/xp_icon_ysc.png" width="34rpx" height="32rpx"
|
<u-image src="/static/detail/xp_icon_ysc.png" width="34rpx" height="32rpx"
|
||||||
@click="cancelHeartTap(detailList.thumb_id)">
|
@click="cancelHeartTap(detailList.thumb_id)">
|
||||||
</u-image>
|
</u-image>
|
||||||
<text class="thumb">{{detailList.thumb}} 赞</text>
|
<text class="thumb">{{detailList.thumb==NaN?1:detailList.thumb}} 赞</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -151,12 +151,16 @@
|
|||||||
this.showUpdate = true
|
this.showUpdate = true
|
||||||
}
|
}
|
||||||
//升级VIP正在审核中
|
//升级VIP正在审核中
|
||||||
if (dataCode == 0 && detail.mytpe == 0) {
|
if (dataCode == 0 && detail.mytpe == 3) {
|
||||||
this.showUpdating = true
|
this.showUpdating = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (detail) {
|
if (detail) {
|
||||||
detail.pub_time = dateFormatDetail(detail.pub_time)
|
detail.pub_time = dateFormatDetail(detail.pub_time)
|
||||||
detail.tags = detail.tags.split(',')
|
if (detail.tags) {
|
||||||
|
detail.tags = detail.tags.split(',')
|
||||||
|
}
|
||||||
//点赞数
|
//点赞数
|
||||||
if (detail.thumbcount !== 0 && detail.is_thumb == 0) {
|
if (detail.thumbcount !== 0 && detail.is_thumb == 0) {
|
||||||
detail.thumb = parseInt(detail.thumb) + parseInt(detail.thumbcount)
|
detail.thumb = parseInt(detail.thumb) + parseInt(detail.thumbcount)
|
||||||
|
|||||||
@@ -89,10 +89,15 @@
|
|||||||
<view style="padding: 30rpx;background-color: #fff;">
|
<view style="padding: 30rpx;background-color: #fff;">
|
||||||
<u-button color="#0EBB5B" text="确定发布" @tap.stop="submitForm"></u-button>
|
<u-button color="#0EBB5B" text="确定发布" @tap.stop="submitForm"></u-button>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding: 20rpx;text-align: center;background-color: #fff;">
|
<view style="padding: 12rpx 30rpx 20rpx 30rpx;background-color: #fff;">
|
||||||
<text
|
<text
|
||||||
style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;">承诺声明预留文字位置承诺声明预留文字位置</text>
|
style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;"
|
||||||
|
v-if="tabCurrent === 0">{{claim_r}}</text>
|
||||||
|
<text
|
||||||
|
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>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</u--form>
|
</u--form>
|
||||||
<view style="margin:0 20rpx;">
|
<view style="margin:0 20rpx;">
|
||||||
@@ -115,6 +120,8 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
claim_r: '',
|
||||||
|
claim_c: '',
|
||||||
tabsList: [{
|
tabsList: [{
|
||||||
name: '需求发布'
|
name: '需求发布'
|
||||||
}, {
|
}, {
|
||||||
@@ -155,10 +162,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onTabItemTap() {
|
onTabItemTap() {
|
||||||
this.imgUrl = uni.getStorageSync('img_url')
|
this.imgUrl = uni.getStorageSync('img_url')
|
||||||
console.log('----onShow')
|
|
||||||
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
||||||
console.log(uni.getStorageSync('loginToken'))
|
|
||||||
this.isLoad = false
|
this.isLoad = false
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: '../../pages/my/login/login'
|
// url: '../../pages/my/login/login'
|
||||||
@@ -177,14 +182,11 @@
|
|||||||
if (options && options.item && uni.getStorageSync(options.item)) {
|
if (options && options.item && uni.getStorageSync(options.item)) {
|
||||||
try {
|
try {
|
||||||
let publishFormList = uni.getStorageSync(options.item)
|
let publishFormList = uni.getStorageSync(options.item)
|
||||||
console.log(publishFormList.images)
|
|
||||||
this.fileList1 = publishFormList.images.map(item => {
|
this.fileList1 = publishFormList.images.map(item => {
|
||||||
console.log(this.imgUrl)
|
|
||||||
return {
|
return {
|
||||||
url: item
|
url: item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.fileList1)
|
|
||||||
this.needsPublishForm = publishFormList
|
this.needsPublishForm = publishFormList
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.warn(error)
|
this.$toast.warn(error)
|
||||||
@@ -207,11 +209,12 @@
|
|||||||
},
|
},
|
||||||
getFormData() {
|
getFormData() {
|
||||||
this.$apiServe.getIdeasAndNeedsFormdata().then(res => {
|
this.$apiServe.getIdeasAndNeedsFormdata().then(res => {
|
||||||
console.log(res.data.data)
|
|
||||||
const formData = res.data.data
|
const formData = res.data.data
|
||||||
this.productPickerColumn[0] = formData.product
|
this.productPickerColumn[0] = formData.product
|
||||||
this.positionPickerColumn[0] = formData.loc
|
this.positionPickerColumn[0] = formData.loc
|
||||||
this.categoryPickerList[0] = formData.class
|
this.categoryPickerList[0] = formData.class
|
||||||
|
this.claim_r = formData.claim_r
|
||||||
|
this.claim_c = formData.claim_c
|
||||||
// this.productPickerList = res.data.data.map((item, index) => {
|
// this.productPickerList = res.data.data.map((item, index) => {
|
||||||
// temp.push(item.name)
|
// temp.push(item.name)
|
||||||
// return item
|
// return item
|
||||||
@@ -248,7 +251,6 @@
|
|||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
getCityValue(data) {
|
getCityValue(data) {
|
||||||
console.log(data)
|
|
||||||
this.showCityPicker = false
|
this.showCityPicker = false
|
||||||
this.needsPublishForm.area_name = data[0].join('-')
|
this.needsPublishForm.area_name = data[0].join('-')
|
||||||
this.needsPublishForm.area_code = data[1]
|
this.needsPublishForm.area_code = data[1]
|
||||||
@@ -257,7 +259,6 @@
|
|||||||
this.showProductPicker = false
|
this.showProductPicker = false
|
||||||
this.showCategoryPicker = false
|
this.showCategoryPicker = false
|
||||||
this.needsPublishForm.product = data.value[0]
|
this.needsPublishForm.product = data.value[0]
|
||||||
// console.log(data)
|
|
||||||
// const obj = this.productPickerList.find(item => {
|
// const obj = this.productPickerList.find(item => {
|
||||||
// return item.name === data.value[0]
|
// return item.name === data.value[0]
|
||||||
// })
|
// })
|
||||||
@@ -311,9 +312,6 @@
|
|||||||
async afterRead(event) {
|
async afterRead(event) {
|
||||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
let lists = [].concat(event.file)
|
let lists = [].concat(event.file)
|
||||||
console.log(this.fileList1)
|
|
||||||
console.log(lists)
|
|
||||||
console.log(this[`fileList${event.name}`])
|
|
||||||
let fileListLen = this[`fileList${event.name}`].length
|
let fileListLen = this[`fileList${event.name}`].length
|
||||||
lists.map((item) => {
|
lists.map((item) => {
|
||||||
this[`fileList${event.name}`].push({
|
this[`fileList${event.name}`].push({
|
||||||
@@ -323,7 +321,6 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
for (let i = 0; i < lists.length; i++) {
|
for (let i = 0; i < lists.length; i++) {
|
||||||
console.log(lists[i])
|
|
||||||
const result = await this.uploadFilePromise(lists[i].url)
|
const result = await this.uploadFilePromise(lists[i].url)
|
||||||
let item = this[`fileList${event.name}`][fileListLen]
|
let item = this[`fileList${event.name}`][fileListLen]
|
||||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||||
@@ -336,16 +333,6 @@
|
|||||||
},
|
},
|
||||||
uploadFilePromise(url) {
|
uploadFilePromise(url) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// const data = {
|
|
||||||
// file: new File
|
|
||||||
// }
|
|
||||||
// let a = apiService.postImage(data).then(res => {
|
|
||||||
// console.log(res)
|
|
||||||
// })
|
|
||||||
console.log('--345')
|
|
||||||
console.log(url)
|
|
||||||
console.log(this.token)
|
|
||||||
console.log(apiService.uploadImgUrl)
|
|
||||||
let a = uni.uploadFile({
|
let a = uni.uploadFile({
|
||||||
url: apiService.uploadImgUrl,
|
url: apiService.uploadImgUrl,
|
||||||
filePath: url,
|
filePath: url,
|
||||||
@@ -356,8 +343,6 @@
|
|||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log('---355')
|
|
||||||
console.log(JSON.parse(res.data).data.url)
|
|
||||||
resolve(JSON.parse(res.data).data.url)
|
resolve(JSON.parse(res.data).data.url)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
@@ -365,7 +350,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
console.log(this.fileList1)
|
|
||||||
if (!/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
|
if (!/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
|
||||||
this.$toast.warn('请输入正确的手机号')
|
this.$toast.warn('请输入正确的手机号')
|
||||||
return false
|
return false
|
||||||
@@ -396,10 +380,8 @@
|
|||||||
pub_time: null,
|
pub_time: null,
|
||||||
...this.needsPublishForm
|
...this.needsPublishForm
|
||||||
}
|
}
|
||||||
console.log(data)
|
|
||||||
apiService.submitIdeasAndNeeds(data).then(res => {
|
apiService.submitIdeasAndNeeds(data).then(res => {
|
||||||
this.$toast.success('提交成功')
|
this.$toast.success('提交成功')
|
||||||
console.log('esf=', res);
|
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
||||||
@@ -414,7 +396,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
reOnLoad() {
|
reOnLoad() {
|
||||||
console.log('----------------true')
|
|
||||||
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
||||||
this.$toast.warn('登录失败请重试')
|
this.$toast.warn('登录失败请重试')
|
||||||
this.isLoad = false
|
this.isLoad = false
|
||||||
@@ -428,19 +409,10 @@
|
|||||||
this.getFormData()
|
this.getFormData()
|
||||||
},
|
},
|
||||||
failToLoad() {
|
failToLoad() {
|
||||||
console.log('----------------false')
|
|
||||||
this.$toast.warn('登录失败请重试')
|
this.$toast.warn('登录失败请重试')
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
// uni.navigateBack({
|
|
||||||
// success: () => {
|
|
||||||
// let page = getCurrentPages().pop();
|
|
||||||
// if (page) {
|
|
||||||
// page.onLoad(page.options);//执行上个页面的方法
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,10 +141,12 @@
|
|||||||
getBanner() {
|
getBanner() {
|
||||||
this.$apiServe.getBanner().then(res => {
|
this.$apiServe.getBanner().then(res => {
|
||||||
let banner = res.data.data
|
let banner = res.data.data
|
||||||
for (const item of banner) {
|
if (banner) {
|
||||||
item.img = this.imgUrl + item.img
|
for (const item of banner) {
|
||||||
|
item.img = this.imgUrl + item.img
|
||||||
|
}
|
||||||
|
this.swiperList = res.data.data
|
||||||
}
|
}
|
||||||
this.swiperList = res.data.data
|
|
||||||
}).finally(_ => {})
|
}).finally(_ => {})
|
||||||
},
|
},
|
||||||
//点击轮播图
|
//点击轮播图
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onTabItemTap() {
|
onTabItemTap() {
|
||||||
// this.$refs.myavatar.getUser()
|
this.$refs.myavatar.getUser()
|
||||||
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
||||||
this.isLoad = false
|
this.isLoad = false
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -8,10 +8,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
width:356rpx;
|
||||||
.u-image__image {
|
|
||||||
margin-left: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.img_tag {
|
.img_tag {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
Reference in New Issue
Block a user