From 734d3a93771f1b0e9b9f658e0cad5fb9f2610c49 Mon Sep 17 00:00:00 2001 From: zdx <731335498@qq.com> Date: Mon, 28 Dec 2020 14:00:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A1=AE=E8=AE=A4=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/company/enterprise/enterprise.js | 15 +++-- components/company/enterprise/enterprise.wxml | 2 +- .../company/fengcaiInfo/fengcaiInfo.wxss | 2 +- .../company/personalInfo/personalInfo.js | 9 ++- .../company/personalInfo/personalInfo.wxml | 2 +- components/company/videoInfo/videoInfo.wxss | 18 +++-- pages/home/beSureOrder/beSureOrder.js | 20 ++++-- pages/home/beSureOrder/beSureOrder.wxml | 13 +++- pages/home/beSureOrder/beSureOrder.wxss | 50 +++++++++++++- pages/home/index.js | 21 +++--- pages/home/index.wxml | 67 ++++++++++--------- pages/home/projectDetail/projectDetail.wxss | 11 +-- pages/home/projectSuccess/projectSuccess.js | 10 +-- pages/shortVideo/index.js | 3 +- 14 files changed, 169 insertions(+), 74 deletions(-) diff --git a/components/company/enterprise/enterprise.js b/components/company/enterprise/enterprise.js index 9011b38..9bdc664 100644 --- a/components/company/enterprise/enterprise.js +++ b/components/company/enterprise/enterprise.js @@ -4,8 +4,8 @@ Component({ * 组件的属性列表 */ properties: { - info:{ - type:Object + info: { + type: Object } }, @@ -73,9 +73,12 @@ Component({ break; } }, - - - - + // 跳转到员工名片详情 + goCard(e) { + console.log(e.currentTarget.dataset.cardid); + wx.navigateTo({ + url: '/pages/card/index?cardid='+e.currentTarget.dataset.cardid, + }) + } } }) \ No newline at end of file diff --git a/components/company/enterprise/enterprise.wxml b/components/company/enterprise/enterprise.wxml index 4f7cde5..0cc6af8 100644 --- a/components/company/enterprise/enterprise.wxml +++ b/components/company/enterprise/enterprise.wxml @@ -35,7 +35,7 @@ - + {{item.name}} {{item.job}} diff --git a/components/company/fengcaiInfo/fengcaiInfo.wxss b/components/company/fengcaiInfo/fengcaiInfo.wxss index 54547c2..38bd9ab 100644 --- a/components/company/fengcaiInfo/fengcaiInfo.wxss +++ b/components/company/fengcaiInfo/fengcaiInfo.wxss @@ -7,7 +7,7 @@ background-color: #fff; box-shadow: 0 0 14rpx rgba(0, 0, 0, 0.3); margin-top: 20rpx; - padding:30rpx 30rpx 20rpx 30rpx; + padding:30rpx 20rpx 20rpx 20rpx; } .enterprise_content .content{ diff --git a/components/company/personalInfo/personalInfo.js b/components/company/personalInfo/personalInfo.js index 14714a5..8cb8f8d 100644 --- a/components/company/personalInfo/personalInfo.js +++ b/components/company/personalInfo/personalInfo.js @@ -17,7 +17,12 @@ Component({ * 组件的方法列表 */ methods: { - // 获取员工列表 - + // 跳转到员工名片详情 + goCard(e) { + console.log(e.currentTarget.dataset.cardid); + wx.navigateTo({ + url: '/pages/card/index?cardid='+e.currentTarget.dataset.cardid, + }) + } } }) diff --git a/components/company/personalInfo/personalInfo.wxml b/components/company/personalInfo/personalInfo.wxml index 381f6d1..bf6e5d5 100644 --- a/components/company/personalInfo/personalInfo.wxml +++ b/components/company/personalInfo/personalInfo.wxml @@ -1,4 +1,4 @@ - + {{info.name}}({{info.job}}) diff --git a/components/company/videoInfo/videoInfo.wxss b/components/company/videoInfo/videoInfo.wxss index 54547c2..c416eb0 100644 --- a/components/company/videoInfo/videoInfo.wxss +++ b/components/company/videoInfo/videoInfo.wxss @@ -1,16 +1,21 @@ /* 企业视频*/ -.enterprise_content{ - font-size:29rpx ; +.enterprise_content { + font-size: 29rpx; color: #333; margin: 0 30rpx; border-radius: 12rpx; background-color: #fff; box-shadow: 0 0 14rpx rgba(0, 0, 0, 0.3); margin-top: 20rpx; - padding:30rpx 30rpx 20rpx 30rpx; + padding: 30rpx 20rpx 20rpx 20rpx; } -.enterprise_content .content{ + +.enterprise_content video { + width: 100%; +} + +.enterprise_content .content { position: relative; text-overflow: -o-ellipsis-lastline; overflow: hidden; @@ -23,7 +28,7 @@ } /* 播放 */ -.content .play{ +.content .play { background-color: rgba(0, 0, 0, 0.3); width: 100%; height: calc(100% - 10rpx); @@ -36,7 +41,8 @@ align-items: center; box-sizing: border-box; } -.content .play image{ + +.content .play image { width: 102rpx; height: 102rpx; } \ No newline at end of file diff --git a/pages/home/beSureOrder/beSureOrder.js b/pages/home/beSureOrder/beSureOrder.js index 71f062c..6fcac25 100644 --- a/pages/home/beSureOrder/beSureOrder.js +++ b/pages/home/beSureOrder/beSureOrder.js @@ -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', + }) } }) \ No newline at end of file diff --git a/pages/home/beSureOrder/beSureOrder.wxml b/pages/home/beSureOrder/beSureOrder.wxml index 4576274..32fcdf9 100644 --- a/pages/home/beSureOrder/beSureOrder.wxml +++ b/pages/home/beSureOrder/beSureOrder.wxml @@ -1,10 +1,17 @@ - + - 张冬雪 14745798066 学校 默认 - 黑龙江省哈尔滨市南岗区汉水路451号省科学院研究所7楼 + {{addressDel.name}} {{addressDel.mobile}} 学校 + 默认 + {{addressDel.address}} + + + + 添加收货地址 + + diff --git a/pages/home/beSureOrder/beSureOrder.wxss b/pages/home/beSureOrder/beSureOrder.wxss index 69f6422..8ee74ee 100644 --- a/pages/home/beSureOrder/beSureOrder.wxss +++ b/pages/home/beSureOrder/beSureOrder.wxss @@ -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; } \ No newline at end of file diff --git a/pages/home/index.js b/pages/home/index.js index 3b18f41..818cf6b 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -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', + }) } }) \ No newline at end of file diff --git a/pages/home/index.wxml b/pages/home/index.wxml index 5972307..41180f3 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -1,45 +1,50 @@ - - - {{info.base.name}} - - - - - - - - 注册资本:{{info.base.registered_capital||'未完善' }}元 + + + + {{info.base.name}} + - - - 成立时间:{{info.base.setup_at||'未完善' }} - - - - 企业法人:{{info.certification.name||'未完善' }} - - - - 拨打电话 + + + + + 注册资本:{{info.base.registered_capital||'未完善' }}元 - - 进入商城 + + + 成立时间:{{info.base.setup_at||'未完善' }} - - 关注企业 + + + 企业法人:{{info.certification.name||'未完善' }} + + + + 拨打电话 + + + 进入商城 + + + 关注企业 + - + - 企业信息 + 企业信息 - 企业动态 - 企业活动 - 项目筹集 + 企业动态 + 企业活动 + 项目筹集 diff --git a/pages/home/projectDetail/projectDetail.wxss b/pages/home/projectDetail/projectDetail.wxss index d22cd1a..768ed9d 100644 --- a/pages/home/projectDetail/projectDetail.wxss +++ b/pages/home/projectDetail/projectDetail.wxss @@ -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%; diff --git a/pages/home/projectSuccess/projectSuccess.js b/pages/home/projectSuccess/projectSuccess.js index ccaa772..e8c2a9d 100644 --- a/pages/home/projectSuccess/projectSuccess.js +++ b/pages/home/projectSuccess/projectSuccess.js @@ -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] - } - } + } + }, + /** + * 跳转到个人 + */ }) \ No newline at end of file diff --git a/pages/shortVideo/index.js b/pages/shortVideo/index.js index 36e2cae..663caa9 100644 --- a/pages/shortVideo/index.js +++ b/pages/shortVideo/index.js @@ -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) } }) \ No newline at end of file