Browse Source

合并代码

zys
杨豪 3 years ago
parent
commit
285a7d50ed
  1. 2
      pages/home/index.vue
  2. 2
      pages/life/index.vue
  3. 75
      pages/release/index2.vue
  4. 61
      pages/user/editNeeds/index.vue

2
pages/home/index.vue

@ -204,7 +204,7 @@ export default {
onReady:function(){
const that = this;
// that.$refs.skeleton.attachedAction();
that.$refs.skeleton.attachedAction();
that.$refs.skeleton.readyAction();
},

2
pages/life/index.vue

@ -93,7 +93,7 @@
@loadmore="addRandomData"
></u-loadmore>
</view>
<tabbar :current="currentTabIndex" @click="tabBarClick"></tabbar>
<!-- <tabbar :current="currentTabIndex" @click="tabBarClick"></tabbar> -->
</view>
</template>
<script>

75
pages/release/index2.vue

@ -8,7 +8,7 @@
<image src="../../static/images/arror-right.png" class="arror-r"></image>
</view>
<view class="auth-btn-box acea-row row-column row-middle">
<view class="auth-btn acea-row row-middle" @tap="toCompanyAuth" v-if="authStatus == 0 || authStatus == 3">
<view class="auth-btn acea-row row-middle" @tap="toPersonlAuth">
<view><image src="/static/images/user/person.png" class="auth-headimg person-img"></image></view>
<view>
<view class="auth-title">个人认证</view>
@ -16,7 +16,7 @@
</view>
<image src="/static/images/home/arrow-r.png" class="tojump"></image>
</view>
<view class="auth-btn acea-row row-middle" @tap="toPersonlAuth" v-if="authStatus == 0 || authStatus == 3">
<view class="auth-btn acea-row row-middle" @tap="toCompanyAuth">
<view><image src="/static/images/user/business.png" class="auth-headimg business-img"></image></view>
<view>
<view class="auth-title">企业认证</view>
@ -24,7 +24,7 @@
</view>
<image src="/static/images/home/arrow-r.png" class="tojump"></image>
</view>
<view class="auth-btn acea-row row-middle" @tap="toPersonlAuth" v-if="authStatus == 0 || authStatus == 3">
<view class="auth-btn acea-row row-middle" @tap="toPersonlAuth">
<view><image src="/static/images/user/investor.png" class="auth-headimg investor-img"></image></view>
<view>
<view class="auth-title">投资方认证</view>
@ -34,9 +34,9 @@
</view>
</view>
<view :class="'posi ' + (authStatus == 1 || authStatus == 2 ? 'top30' : '')">
<view class="tips-box">
<view class="tips acea-row-nowrap row-middle" v-if="authStatus == 0 || authStatus == 3">
<!-- <view class="icon">!</view> -->
<!-- <view class="tips-box">
<view class="tips acea-row-nowrap row-middle">
<view class="icon">!</view>
<view>完成企业认证后可以发布资源及需求个人认证后只可发布需求</view>
</view>
<view class="tips acea-row row-middle" v-if="authStatus == 0">
@ -56,24 +56,24 @@
<view>{{authType == 1 ? '企业信息未审核通过, 请重新提交审核信息!' : '个人信息未审核通过, 请重新提交审核信息!'}}</view>
<view>未通过理由{{reason}}</view>
</view>
</view>
</view> -->
<view class="btn-box ">
<view :class="'btn ' + (authStatus == 2 && authType == 1 ? 'auth' : '' )" @tap="toResources" class="acea-row row-middle btn-res">
<image :class="authStatus == 2 && authType == 1 ? '' : 'default'" src="/static/images/auth-icon1.png"></image>
<view :class="'btn ' + (authStatus == 2 && authType == 1 ? '' : 'default' )" @tap="toResources" class="acea-row row-middle btn-res">
<image src="/static/images/auth-icon1.png"></image>
<view>
<view class="tip">发布资源</view>
<view class="tip-s">我要发布我的资源展示在供应广场</view>
</view>
</view>
<view :class="'btn ' + (authStatus == 2 ? 'auth' : '' )" @tap="toNeeds" class="acea-row row-middle btn-need">
<image :class="authStatus == 2 ? '' : 'default'" src="/static/images/auth-icon2.png"></image>
<view :class="'btn ' + (authStatus == 2 ? '' : 'default' )" @tap="toNeeds" class="acea-row row-middle btn-need">
<image src="/static/images/auth-icon2.png"></image>
<view>
<view class="tip">发布资源</view>
<view class="tip">发布需求</view>
<view class="tip-s">我要发布我的资源展示在供应广场</view>
</view>
</view>
<view :class="'btn ' + (authStatus == 2 ? 'auth' : '' )" @tap="toNeeds" class="acea-row row-middle btn-demo">
<image :class="authStatus == 2 ? '' : 'default'" src="/static/images/auth-icon3.png"></image>
<view :class="'btn ' + (authStatus == 2 ? '' : 'default' )" @tap="" class="acea-row row-middle btn-demo">
<image src="/static/images/auth-icon3.png"></image>
<view>
<view class="tip">发布项目</view>
<view class="tip-s">发布优质项目精准推荐投资方</view>
@ -115,30 +115,6 @@ export default {
this.isAuthentication();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
methods: {
back() {
let pages = getCurrentPages();
@ -173,7 +149,12 @@ export default {
title: '认证申请审核中,请等待!',
icon: 'none'
});
}
} else if(this.authStatus == 2){
uni.showToast({
title: '已完成认证',
icon: 'none'
});
}
},
toCompanyAuth() {
@ -191,7 +172,12 @@ export default {
title: '认证申请审核中,请等待!',
icon: 'none'
});
}
} else if(this.authStatus == 2){
uni.showToast({
title: '已完成认证',
icon: 'none'
});
}
},
isAuthentication() {
@ -335,8 +321,8 @@ export default {
height: 73rpx;
}
.investor-img{
width: 71rpx;
height: 79rpx;
width: 65rpx;
height: 73rpx;
}
.auth-title{
width: 454rpx;
@ -408,7 +394,10 @@ export default {
margin: 0 32rpx 0 42rpx;
}
.btn-box .default{
filter: grayscale(1);
filter: grayscale(100%);
}
.bgGary{
/* -webkit-filter:grayscale(100%); */
}
.btn .tip{
color: #FFFFFF;

61
pages/user/editNeeds/index.vue

@ -4,17 +4,17 @@
<view class="form-box">
<form @submit="submit">
<view class="form-item chose-box acea-row row-between">
<view class="label">我是供应/需求</view>
<view> {{form.resourceType == 1 ? '供应' : '需求'}} </view>
<view class="label">我是{{title}}</view>
<view> {{title}} </view>
</view>
<view class="form-item">
<view class="label">{{form.resourceType == 1 ? '供应' : '需求'}}标题<text class="red">*</text></view>
<view class="label">{{title}}标题<text class="red">*</text></view>
<view class="inp-box">
<input type="text" :placeholder="'我' + (form.resourceType == 1 ? '供应' : '需求') + '...'" :value="form.title" name="title">
<input type="text" :placeholder="'我' + (title) + '...'" :value="form.title" name="title">
</view>
</view>
<view class="form-item">
<view class="label">{{form.resourceType == 1 ? '供应' : '需求'}}类型<text class="red">*</text></view>
<view class="label">{{title}}类型<text class="red">*</text></view>
<!-- <view class="inp-box"><input type="text" placeholder="我供应/需求..." value="{{form.resourceCagetoryId}}" name="resourceCagetoryId" /></view> -->
<view class="inp-box acea-row-nowrap row-between row-middle">
<picker class="pick-box" @change="resourcesChange" :value="idx" :range="resourcesList" :range-key="'cagetoryName'" mode="selector">
@ -25,11 +25,11 @@
</view>
<view class="form-item">
<view class="label acea-row row-between">
<view>{{form.resourceType == 1 ? '供应' : '需求'}}内容<text class="red">*</text></view>
<view>{{title}}内容<text class="red">*</text></view>
<!-- <view class="colO">看看别人怎么写></view> -->
</view>
<view class="area-box">
<textarea :placeholder="'请详细描述您的' + (form.resourceType == 1 ? '供应' : '需求')" :value="form.detailedDescription" name="detailedDescription"></textarea>
<textarea :placeholder="'请详细描述您的' + (title)" :value="form.detailedDescription" name="detailedDescription"></textarea>
</view>
</view>
<view class="form-item">
@ -41,7 +41,7 @@
</view>
<view class="form-item">
<view class="label acea-row row-between">
<view>{{form.resourceType == 1 ? '供应' : '需求'}}预算<text class="red">*</text></view>
<view>{{title}}预算<text class="red">*</text></view>
<view class="tab-box acea-row ">
<view :class="'tab-item ' + (active == 1 ? 'tab-a' : '')" data-i="1" @tap="tabClick">明确预算</view>
<view :class="'tab-item ' + (active == 2 ? 'tab-a' : '')" data-i="2" @tap="tabClick">价格可议</view>
@ -91,6 +91,7 @@ import WxValidate from '../../../utils/WxValidate.js';
export default {
data() {
return {
title: '',
form: {
resourceType: 0,
title: '',
@ -120,10 +121,10 @@ export default {
this.getDetail(options.id);
}
if (options.type) {
this.setData({//['form.resourceType']: Number(options.type)
});
//try fix
this.form.resourceType = Number(options.type);
console.log(this.form.resourceType)
this.title = this.form.resourceType == 1? '供应' : '需求'
uni.setNavigationBarTitle({ title: this.title+ '发布' })
}
this.initValidate(); //
@ -134,9 +135,6 @@ export default {
let i = e.currentTarget.dataset.i;
if (i == 2) {
this.setData({//['form.capital']: ''
});
//try fix
this.form.capital = '价格可议';
}
@ -146,9 +144,6 @@ export default {
},
capitalChange(e) {
this.setData({//['form.capital']: e.detail.value
});
//try fix
this.form.capital = e.detail.value;
},
@ -156,26 +151,15 @@ export default {
console.log(e.detail.value);
let timeArr = e.detail.value.split('-');
let year = Number(timeArr[0]) + 1;
this.setData({//['form.resourceStartTime']: e.detail.value
//['form.resourceEndTime']: year + '-' + timeArr[1] + '-' + timeArr[2]
});
//try fix
this.form.resourceEndTime = year + '-' + timeArr[1] + '-' + timeArr[2];
//try fix
this.form.resourceStartTime = e.detail.value;
},
endTimeChange(e) {
this.setData({//['form.resourceEndTime']: e.detail.value
});
//try fix
this.form.resourceEndTime = e.detail.value;
},
bindPickerChange(e) {
this.setData({//['form.resourceType']: this.data.typeArr[e.detail.value]
});
//try fix
this.form.resourceType = this.typeArr[e.detail.value];
},
@ -194,9 +178,6 @@ export default {
resourcesChange(e) {
// console.log(e)
let idx = Number(e.detail.value);
// this.setData({//['form.resourceCagetoryId']: this.data.resourcesList[idx].id
// resourcesIdx: idx,
// });
this.resourcesIdx = idx;
//try fix
this.form.resourceCagetoryId = this.resourcesList[idx].id;
@ -209,27 +190,12 @@ export default {
}).then(res => {
if (res.data.success) {
let data = res.data.data;
this.setData({//['form.resourceType']: data.resourceType
//['form.title']: data.title
//['form.detailedDescription']: data.detailedDescription
//['form.resourceImgs']: data.resourceImgs
//['form.capital']: data.capital
//['form.resourceStartTime']: data.resourceStartTime
//['form.resourceEndTime']: data.resourceEndTime
});
//try fix
this.form.resourceEndTime = data.resourceEndTime;
//try fix
this.form.resourceStartTime = data.resourceStartTime;
//try fix
this.form.capital = data.capital;
//try fix
this.form.resourceImgs = data.resourceImgs;
//try fix
this.form.detailedDescription = data.detailedDescription;
//try fix
this.form.title = data.title;
//try fix
this.form.resourceType = data.resourceType;
if (isNaN(Number(data.capital))) {
@ -283,9 +249,6 @@ export default {
util.chooseImages2(img => {
let imgs = this.form.resourceImgs;
imgs.push(img);
this.setData({//['form.resourceImgs']: imgs
});
//try fix
this.form.resourceImgs = imgs;
});
},

Loading…
Cancel
Save