更新确认地址信息

This commit is contained in:
zdx
2020-12-28 14:00:13 +08:00
parent 637e63b224
commit 734d3a9377
14 changed files with 169 additions and 74 deletions

View File

@@ -4,16 +4,19 @@ Page({
addressList: [],
info: '',
remark: '',
crowdfund_id: ''
crowdfund_id: '',
addressDel: {},
},
onLoad(e) {
wx.$api.companyModule.crowdfundsCreat(e.crowdfund_item_id).then(res => {
console.log(res);
if (res.address.length > 0) {
this.setData({
address_id: res.address[0].address_id,
addressList: res.address,
addressDel: res.address[0]
})
console.log(res);
console.log(this.data.addressDel)
}
this.setData({
crowdfund_item_id: e.crowdfund_item_id,
@@ -25,6 +28,9 @@ Page({
wx.navigateBack({})
})
},
onShow() {
console.log(this.data.addressDel)
},
input(e) {
this.setData({
remark: e.detail.value
@@ -35,7 +41,7 @@ Page({
title: '创建中...',
mask: 'true'
})
wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.address_id, this.data.remark).then(res => {
wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.addressDel.address_id, this.data.remark).then(res => {
var data = {};
if (res.trade_no) {
wx.login({
@@ -76,6 +82,12 @@ Page({
}).catch(res => {
wx.navigateBack({})
})
},
// 跳转到地址列表和新增地址页面
goAddress(){
wx.navigateTo({
url: '/pages/mall/mall_address/mall_address?type=selectAddress',
})
}
})

View File

@@ -1,10 +1,17 @@
<!-- 地址信息 -->
<view class="besure_address">
<view class="besure_address" wx:if='{{addressDel}}' catchtap="goAddress">
<view style="flex:1;">
<view class="userinfo">张冬雪 14745798066 <span class="type"> 学校 </span> <span class="moren"> 默认 </span></view>
<view class="des">黑龙江省哈尔滨市南岗区汉水路451号省科学院研究所7楼</view>
<view class="userinfo">{{addressDel.name}} {{addressDel.mobile}} <span class="type" wx:if='{{false}}'> 学校 </span>
<span class="moren"> 默认 </span></view>
<view class="des">{{addressDel.address}}</view>
</view>
<image class="icon_right" src="/static/images/icon_right.png" mode="widthFix" style="width:12rpx;"></image>
<image class="arrows-right" src="/static/mall_icon/address_back.png" mode="widthFix"></image>
</view>
<view wx:else class="besure_address jc_start" catchtap="goAddress">
添加收货地址
<image class="icon_right " src="/static/images/icon_right.png" mode="widthFix" style="width:13rpx;"></image>
<image class="arrows-right" src="/static/mall_icon/address_back.png" mode="widthFix"></image>
</view>
<!-- 商品信息 -->
<view class="besure_goods">

View File

@@ -17,9 +17,10 @@
height: 120rpx;
}
.besure_bottom .left{
.besure_bottom .left {
width: 160rpx;
}
.besure_now_act .left span {
font-size: 28rpx;
color: #333;
@@ -58,7 +59,8 @@
border-top: solid 1rpx #f7f7f7;
}
.besure_bottom input , .besure_bottom>span {
.besure_bottom input,
.besure_bottom>span {
flex: 1;
/* margin-left: 30rpx; */
padding-top: 4rpx;
@@ -138,6 +140,7 @@
justify-content: space-between;
align-items: center;
box-sizing: border-box;
position: relative;
}
.besure_address .userinfo {
@@ -179,4 +182,47 @@
.besure_address .des {
font-size: 24rpx;
padding-top: 10rpx;
}
.arrows-right {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
.order-add-address {
text-align: center;
padding: 30rpx 0;
position: relative;
}
.order-add-address navigator {
display: inline-block;
background: #e92344;
color: white;
line-height: 60rpx;
padding: 0 30rpx;
margin-right: 20rpx;
}
.arrows-add {
text-align: center;
width: 100%;
}
.arrows-add-img {
width: 30rpx;
vertical-align: middle;
margin: -8rpx 6rpx 0 0;
}
.arrows-add {
width: 100%;
background-color: red;
height: 90rpx;
}
.jc_start {
justify-content: start;
}

View File

@@ -7,17 +7,12 @@ Page({
selectMenuId: 0, //默认是企业信息0 视频1 活动2 项目筹集3
company_id: wx.getStorageSync('company_id'), //企业Id,
info: '', //企业信息
loaded:false
},
onLoad(e) {
console.log(e)
if(e.id){
this.company(e.id)
wx.setStorageSync('company_id', e.id)
}else{
this.company(this.company_id)
}
},
onShow() {
this.company(wx.getStorageSync('company_id'))
},
onUnload: function () {
wx.removeStorageSync('company_id')
@@ -65,7 +60,8 @@ Page({
wx.$api.companyModule.company(this.data.company_id, this.data.page).then(res => {
console.log(res)
this.setData({
info: res
info: res,
loaded:true,
})
})
},
@@ -77,5 +73,14 @@ Page({
wx.makePhoneCall({
phoneNumber: this.data.info.certification.phone,
})
},
/**
* 进入商城
*/
goMall(e){
console.log('1111')
wx.navigateTo({
url: '/pages/mall/index',
})
}
})

View File

@@ -1,45 +1,50 @@
<!-- 公司logo及基本信息 -->
<view class="company_info">
<image class="cop_bg" mode="widthFix" src="/static/images/company_bg4.png" alt="" />
<view class="cop_title">{{info.base.name}}</view>
<image class="cop_logo" mode="widthFix" src="{{info.base.cover || '/static/images/company_bg4.png'}}" alt="" />
</view>
<!-- 基本信息 -->
<view class="cop_info">
<view class="cop_info_item">
<image src="/static/images/com_tu.png" mode="widthFix"></image>
<span>注册资本:<span class="newTxt">{{info.base.registered_capital||'未完善' }}元</span></span>
<block wx:if='{{loaded}}'>
<view class="company_info">
<image class="cop_bg" mode="widthFix" src="/static/images/company_bg4.png" alt="" />
<view class="cop_title">{{info.base.name}}</view>
<image class="cop_logo" mode="widthFix" src="{{info.base.cover || '/static/images/company_bg4.png'}}" alt="" />
</view>
<view class="cop_info_item">
<image src="/static/images/com_date.png" mode="widthFix"></image>
<span>成立时间:<span class="newTxt">{{info.base.setup_at||'未完善' }}</span></span>
</view>
<view class="cop_info_item">
<image src="/static/images/com_person.png" mode="widthFix"></image>
<span>企业法人:<span class="newTxt">{{info.certification.name||'未完善' }}</span></span>
</view>
<view class="cop_call_shop">
<view class="cop_call" catchtap="call">
<image src="/static/images/com_call.png" mode="widthFix" ></image>拨打电话
<!-- 基本信息 -->
<view class="cop_info">
<view class="cop_info_item">
<image src="/static/images/com_tu.png" mode="widthFix"></image>
<span>注册资本:<span class="newTxt">{{info.base.registered_capital||'未完善' }}元</span></span>
</view>
<view class=" cop_call cop_shop">
<image src="/static/images/com_shop.png" mode="widthFix"></image>进入商城
<view class="cop_info_item">
<image src="/static/images/com_date.png" mode="widthFix"></image>
<span>成立时间:<span class="newTxt">{{info.base.setup_at||'未完善' }}</span></span>
</view>
<view class=" cop_call cop_focus">
<image src="/static/images/eye.png" mode="widthFix"></image>关注企业
<view class="cop_info_item">
<image src="/static/images/com_person.png" mode="widthFix"></image>
<span>企业法人:<span class="newTxt">{{info.certification.name||'未完善' }}</span></span>
</view>
<view class="cop_call_shop">
<view class="cop_call" catchtap="call">
<image src="/static/images/com_call.png" mode="widthFix"></image>拨打电话
</view>
<view class=" cop_call cop_shop" catchtap="goMall">
<image src="/static/images/com_shop.png" mode="widthFix"></image>进入商城
</view>
<view class=" cop_call cop_focus">
<image src="/static/images/eye.png" mode="widthFix"></image>关注企业
</view>
</view>
</view>
</view>
</block>
<!-- 滚动菜单 -->
<view class="scroll_menu">
<scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
<view id="menu1" catchtap="menuSelect" data-id='0' class="scroll-view-item_H {{selectMenuId==0?'scroll_view_select':''}}">企业信息</view>
<view id="menu1" catchtap="menuSelect" data-id='0'
class="scroll-view-item_H {{selectMenuId==0?'scroll_view_select':''}}">企业信息</view>
<!-- <view id="menu2" catchtap="menuSelect" data-id='1' class="scroll-view-item_H {{selectMenuId==1?'scroll_view_select':''}}">视频 28</view> -->
<view id="menu4" catchtap="menuSelect" data-id='4' class="scroll-view-item_H {{selectMenuId==4?'scroll_view_select':''}}">企业动态</view>
<view id="menu3" catchtap="menuSelect" data-id='2' class="scroll-view-item_H {{selectMenuId==2?'scroll_view_select':''}}">企业动</view>
<view id="menu4" catchtap="menuSelect" data-id='3' class="scroll-view-item_H {{selectMenuId==3?'scroll_view_select':''}}">项目筹集</view>
<view id="menu4" catchtap="menuSelect" data-id='4'
class="scroll-view-item_H {{selectMenuId==4?'scroll_view_select':''}}">企业动</view>
<view id="menu3" catchtap="menuSelect" data-id='2'
class="scroll-view-item_H {{selectMenuId==2?'scroll_view_select':''}}">企业活动</view>
<view id="menu4" catchtap="menuSelect" data-id='3'
class="scroll-view-item_H {{selectMenuId==3?'scroll_view_select':''}}">项目筹集</view>
</scroll-view>
</view>

View File

@@ -223,7 +223,8 @@ swiper {
height: 100%;
}
.project_now_act span , .project_now_act button {
.project_now_act span,
.project_now_act button {
margin-left: 60rpx;
flex: 1;
display: inline-block;
@@ -231,10 +232,11 @@ swiper {
color: #fff;
font-size: 30rpx !important;
border-radius: 10rpx !important;
padding: 20rpx 100rpx ;
padding: 20rpx 100rpx;
text-align: center;
font-weight: 600;
}
.project_now_act button {
padding: 10rpx 0 !important;
}
@@ -378,6 +380,7 @@ swiper {
color: #333;
font-weight: 600;
margin-left: 30rpx;
width: calc(100% - 180rpx);
}
/* 项目回报列表 */
@@ -447,7 +450,7 @@ swiper {
color: #999;
}
.project_list .seeAll span {
.project_list .seeAll span {
background-color: #378fff;
color: #fff;
padding: 8rpx 20rpx;
@@ -472,7 +475,7 @@ swiper {
border-radius: 50rpx;
background-color: #378fff;
color: #fff;
margin:30rpx 20rpx;
margin: 30rpx 20rpx;
font-size: 26rpx;
text-align: center;
width: 50%;

View File

@@ -1,11 +1,10 @@
Page({
/**
* 页面的初始数据
*/
data: {
info:{},//产品基本信息
info: {}, //产品基本信息
},
/**
@@ -30,6 +29,9 @@ Page({
title: '您的好友邀请你一起',
path: '/pages/companyModule/projectDetail/projectDetail?id=6',
imageUrl: this.data.info.pictures[0]
}
}
}
},
/**
* 跳转到个人
*/
})

View File

@@ -78,7 +78,8 @@ Page({
*/
goCompany(e) {
wx.navigateTo({
url: '/pages/home/index?id=' + e.currentTarget.dataset.id,
url: '/pages/home/index' ,
})
wx.setStorageSync('company_id', e.currentTarget.dataset.id)
}
})