Commit 6e16d39b by 梁建民

js

parent 499404ce
......@@ -112,6 +112,7 @@ image {
.placeholderClass {
color: #adb6bf;
font-size:28rpx;
}
/* /头部搜索公共样式 */
......
.company {
.head {
padding: 0 24rpx;
flex-wrap: nowrap;
.pic {
width: 120rpx;
height: 120rpx;
.im {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
}
.txt {
margin-left: 24rpx;
.t1 {
font-weight: 600;
font-size: 36rpx;
line-height: 50rpx;
margin-bottom: 16rpx;
display: block;
}
.company-txt {
margin-right: 48rpx;
.iconiconxiantiaoshouji24 {
font-size: 30rpx;
color: #61A0F2;
}
.company-txt-t1 {
font-size: 26rpx;
color: #8A9299;
margin-left: 5rpx;
}
}
}
.iconiconxiantiaoshouji22 {
font-size: 40rpx;
color: #0D84D1;
margin-bottom: 13rpx;
}
.edit {
color: #0D84D1;
font-size: 22rpx;
font-weight: 400;
}
}
.tab {
margin: 38rpx 0 24rpx 0;
.v {
flex: 1;
text-align: center;
.t1 {
font-size: 32rpx;
font-weight: 600;
line-height: 45rpx;
color: #515559;
display: block;
}
.t2 {
font-size: 24rpx;
font-weight: 400;
line-height: 33rpx;
color: #8A9299;
}
}
}
.evaluation {
padding: 0 24rpx;
height: 100rpx;
.iconiconxiantiaoshouji23 {
font-size: 40rpx;
color: #EA1717;
}
.t1 {
font-size: 28rpx;
line-height: 46rpx;
color: #515559;
margin-left: 20rpx;
}
.iconChevron {
font-size: 27rpx;
color: #ADB6BF;
}
}
.txt-wrap {
margin: 24rpx 0 0 0;
padding: 0 24rpx 40rpx 24rpx;
.pic {
width: 702rpx;
height: 410rpx;
margin-bottom: 32rpx;
.im {
width: 702rpx;
height: 410rpx;
border-radius: 8rpx;
}
}
.text-introduced {
padding: 0 27rpx 40rpx 27rpx;
.tit {
font-size: 26rpx;
color: #515559;
margin-bottom: 24rpx;
font-weight: 600;
line-height:37rpx;
}
.t1 {
font-size: 26rpx;
line-height: 40rpx;
font-weight: 400;
color: #8A9299;
text-align: justify;
}
}
.btn {
padding: 0 27rpx;
height: 98rpx;
line-height: 98rpx;
text-align: center;
background: rgba(13, 132, 209, 1);
box-shadow: 0px 6px 10px 0px rgba(97, 160, 242, 0.3);
border-radius: 8rpx;
font-size: 32rpx;
color: #FFFFFF;
}
}
}
\ No newline at end of file
<!--pages/person/company/index.wxml-->
<text>pages/person/company/index.wxml</text>
<view class="company" hover-class="none" hover-stop-propagation="false">
<view class="head boxsiz row verCenter bothSide">
<view class="row">
<view class="pic">
<cover-image class="im" src="/res/images/imgs/test.jpg"></cover-image>
</view>
<view class="txt">
<text class="t1">深圳市猎芯科技有限公司</text>
<view class="row">
<view class="company-txt">
<text class="icon iconfont iconiconxiantiaoshouji24"></text>
<text class="company-txt-t1">公司认证</text>
</view>
<view class="company-txt">
<text class="icon iconfont iconiconxiantiaoshouji24"></text>
<text class="company-txt-t1">贸易商</text>
</view>
</view>
</view>
</view>
<view class="column">
<text class="icon iconfont iconiconxiantiaoshouji22"></text>
<text class="edit">编辑</text>
</view>
</view>
<view class="tab row rowCenter verCenter">
<view class="v">
<text class="t1">513</text>
<text class="t2">商品</text>
</view>
<view class="v">
<text class="t1">53</text>
<text class="t2">询价</text>
</view>
<view class="v">
<text class="t1">2</text>
<text class="t2">报价</text>
</view>
</view>
<view class="evaluation boxsiz row verCenter bothSide">
<view>
<text class="icon iconfont iconiconxiantiaoshouji23"></text>
<text class="t1">收到的评价</text>
</view>
<view>
<text class="icon iconfont iconChevron"></text>
</view>
</view>
<view class="txt-wrap boxsiz ">
<view class="pic">
<cover-image class="im" src="/res/images/imgs/test.jpg"></cover-image>
</view>
<view class="text-introduced column">
<text class="tit">企业简介</text>
<text class="t1">猎芯网是由深圳市猎芯科技有限公司开发运营的电子元器件交易服务平台,可为用户提供涵盖购买、报关、仓储、金融等整个交易环节的全闭环服务。 猎芯网于2015年7月上线,总部位于深圳,在北京、香港设有分公司,迄今已获得经纬中国、微光创投、华诺创投、京东、海通证券及文华海汇等多轮融资,及E络盟与Mouser贸泽电子等多家知名分销商授权; 猎芯网提供自营、联营、寄售、供应链金融等服务,并在深圳光明新区设有一万多平米的自营仓库,实现当天下单,当天发货,订单动态全透明,极大的提升了效率 ,降低了交易成本;同时与5500多家优质供应商合作,提供超过2000万的联营商品选择,极大地满足了广大用户的采购需求!</text>
</view>
<view class="text-introduced column">
<text class="tit">公司地址</text>
<text class="t1">广东省深圳市龙岗区坂田街道五和大道南路2号万科星火Online天枢仓6栋3楼</text>
</view>
<view class="btn">联系电话:15012479484</view>
</view>
</view>
\ No newline at end of file
/* pages/person/company/index.wxss */
\ No newline at end of file
.company .head {
padding: 0 24rpx;
flex-wrap: nowrap;
}
.company .head .pic {
width: 120rpx;
height: 120rpx;
}
.company .head .pic .im {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.company .head .txt {
margin-left: 24rpx;
}
.company .head .txt .t1 {
font-weight: 600;
font-size: 36rpx;
line-height: 50rpx;
margin-bottom: 16rpx;
display: block;
}
.company .head .txt .company-txt {
margin-right: 48rpx;
}
.company .head .txt .company-txt .iconiconxiantiaoshouji24 {
font-size: 30rpx;
color: #61A0F2;
}
.company .head .txt .company-txt .company-txt-t1 {
font-size: 26rpx;
color: #8A9299;
margin-left: 5rpx;
}
.company .head .iconiconxiantiaoshouji22 {
font-size: 40rpx;
color: #0D84D1;
margin-bottom: 13rpx;
}
.company .head .edit {
color: #0D84D1;
font-size: 22rpx;
font-weight: 400;
}
.company .tab {
margin: 38rpx 0 24rpx 0;
}
.company .tab .v {
flex: 1;
text-align: center;
}
.company .tab .v .t1 {
font-size: 32rpx;
font-weight: 600;
line-height: 45rpx;
color: #515559;
display: block;
}
.company .tab .v .t2 {
font-size: 24rpx;
font-weight: 400;
line-height: 33rpx;
color: #8A9299;
}
.company .evaluation {
padding: 0 24rpx;
height: 100rpx;
}
.company .evaluation .iconiconxiantiaoshouji23 {
font-size: 40rpx;
color: #EA1717;
}
.company .evaluation .t1 {
font-size: 28rpx;
line-height: 46rpx;
color: #515559;
margin-left: 20rpx;
}
.company .evaluation .iconChevron {
font-size: 27rpx;
color: #ADB6BF;
}
.company .txt-wrap {
margin: 24rpx 0 0 0;
padding: 0 24rpx 40rpx 24rpx;
}
.company .txt-wrap .pic {
width: 702rpx;
height: 410rpx;
margin-bottom: 32rpx;
}
.company .txt-wrap .pic .im {
width: 702rpx;
height: 410rpx;
border-radius: 8rpx;
}
.company .txt-wrap .text-introduced {
padding: 0 27rpx 40rpx 27rpx;
}
.company .txt-wrap .text-introduced .tit {
font-size: 26rpx;
color: #515559;
margin-bottom: 24rpx;
font-weight: 600;
line-height: 37rpx;
}
.company .txt-wrap .text-introduced .t1 {
font-size: 26rpx;
line-height: 40rpx;
font-weight: 400;
color: #8A9299;
text-align: justify;
}
.company .txt-wrap .btn {
padding: 0 27rpx;
height: 98rpx;
line-height: 98rpx;
text-align: center;
background: #0d84d1;
box-shadow: 0px 6px 10px 0px rgba(97, 160, 242, 0.3);
border-radius: 8rpx;
font-size: 32rpx;
color: #FFFFFF;
}
// pages/person/editcompany/index.js
const http = require('../../../utils/util.js');
import {
chooseImg
} from '../../../utils/util.js';
import {
apis
} from '../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
status: true,
imgSrc: ''
},
/**
......@@ -62,5 +70,35 @@ Page({
*/
onShareAppMessage: function () {
},
/**
* 上传企业形象
*/
uploadImg: function () {
chooseImg(apis.ossupload, 1, (res) => {
if (res) {
this.setData({
imgSrc: res,
status: false
});
}
});
},
/**
* 删除企业形象
*/
deleteImg: function () {
this.setData({
imgSrc: '',
status: true
})
},
/**
*
* 企业提交
*/
formSubmit: function (e) {
}
})
\ No newline at end of file
.company {
padding-top: 40rpx;
padding-bottom: 68rpx;
.upload-box {
.add {
width: 506rpx;
height: 296rpx;
background: rgba(245, 249, 252, 1);
border-radius: 8rpx;
.iconiconxiantiaoshouji15 {
font-size: 80rpx;
color: #ADB6BF;
}
.t1 {
margin-top: 19rpx;
font-size: 24rpx;
color: #8A9299;
}
}
.view {
position: relative;
width: 506rpx;
height: 296rpx;
.iconiconxiantiaoshouji7 {
position: absolute;
right: -15rpx;
top: -12rpx;
font-size: 30rpx;
color: #fff;
width: 44rpx;
height: 44rpx;
background: #EA1717;
border-radius: 50%;
text-align: center;
line-height: 44rpx;
}
}
}
.hr {
height: 10rpx;
background: #F5F9FC;
}
.txt {
margin-top: 87rpx;
padding: 0 24rpx;
.tarea {
width: 100%;
height: 310rpx !important;
}
}
.list {
padding: 0 24rpx 0 0;
margin-left: 24rpx;
height: 100rpx;
.l {
font-size: 28rpx;
font-weight: 400;
color: #515559;
flex: 1;
}
.r {
flex: 3;
}
.iconChevron {
font-size: 27rpx;
color: #ADB6BF;
margin-left: 12rpx;
}
.t1 {
font-size: 28rpx;
color: #8A9299;
font-weight: 400;
}
&.bor {
border-bottom: 1rpx solid #F5F9FC;
}
}
.btn-wrap {
margin-top: 100rpx;
padding: 0 55rpx;
.btn {
height: 98rpx;
line-height: 98rpx;
background: rgba(13, 132, 209, 1) !important;
box-shadow: 0px 6rpx 10rpx 0rpx rgba(97, 160, 242, 0.3) !important;
border-radius: 8rpx;
color: #fff !important;
font-size: 32rpx;
margin-top: 40rpx;
text-align: center;
}
}
}
\ No newline at end of file
<!--pages/person/editcompany/index.wxml-->
<text>pages/person/editcompany/index.wxml</text>
<view class="company">
<form bindsubmit="formSubmit">
<view class="upload-box column rowCenter verCenter">
<block wx:if="{{status}}">
<view class="add column rowCenter verCenter" bindtap="uploadImg">
<text class="icon iconfont iconiconxiantiaoshouji15"></text>
<text class="t1">上传企业形象</text>
</view>
</block>
<block wx:else>
<view class="view column rowCenter verCenter">
<cover-image src="{{imgSrc}}" class="img"></cover-image>
<text class="icon iconfont iconiconxiantiaoshouji7" bind:tap="deleteImg"></text>
</view>
</block>
</view>
<view class="txt">
<textarea bindblur="bindTextAreaBlur" auto-height placeholder="请输入企业简介" class="tarea" />
</view>
<view class="hr"></view>
<view class="list row verCenter bothSide bor">
<view class="l">所有地区</view>
<view class="sel">
<text class="t1">请选择省/市/区</text>
<text class="icon iconfont iconChevron"></text>
</view>
</view>
<view class="list row verCenter bothSide bor">
<view class="l">详细地址</view>
<view class="r">
<input type="text" placeholder="请输入详细地址" placeholder-class="placeholderClass" />
</view>
</view>
<view class="list row verCenter bothSide bor">
<view class="l">联系电话</view>
<view class="r">
<input type="text" placeholder="请输入联系电话" placeholder-class="placeholderClass" />
</view>
</view>
<view class="btn-wrap">
<button class="btn">确认修改</button>
</view>
</form>
</view>
\ No newline at end of file
/* pages/person/editcompany/index.wxss */
\ No newline at end of file
.company {
padding-top: 40rpx;
padding-bottom: 68rpx;
}
.company .upload-box .add {
width: 506rpx;
height: 296rpx;
background: #f5f9fc;
border-radius: 8rpx;
}
.company .upload-box .add .iconiconxiantiaoshouji15 {
font-size: 80rpx;
color: #ADB6BF;
}
.company .upload-box .add .t1 {
margin-top: 19rpx;
font-size: 24rpx;
color: #8A9299;
}
.company .upload-box .view {
position: relative;
width: 506rpx;
height: 296rpx;
}
.company .upload-box .view .iconiconxiantiaoshouji7 {
position: absolute;
right: -15rpx;
top: -12rpx;
font-size: 30rpx;
color: #fff;
width: 44rpx;
height: 44rpx;
background: #EA1717;
border-radius: 50%;
text-align: center;
line-height: 44rpx;
}
.company .hr {
height: 10rpx;
background: #F5F9FC;
}
.company .txt {
margin-top: 87rpx;
padding: 0 24rpx;
}
.company .txt .tarea {
width: 100%;
height: 310rpx !important;
}
.company .list {
padding: 0 24rpx 0 0;
margin-left: 24rpx;
height: 100rpx;
}
.company .list .l {
font-size: 28rpx;
font-weight: 400;
color: #515559;
flex: 1;
}
.company .list .r {
flex: 3;
}
.company .list .iconChevron {
font-size: 27rpx;
color: #ADB6BF;
margin-left: 12rpx;
}
.company .list .t1 {
font-size: 28rpx;
color: #8A9299;
font-weight: 400;
}
.company .list.bor {
border-bottom: 1rpx solid #F5F9FC;
}
.company .btn-wrap {
margin-top: 100rpx;
padding: 0 55rpx;
}
.company .btn-wrap .btn {
height: 98rpx;
line-height: 98rpx;
background: #0d84d1 !important;
box-shadow: 0px 6rpx 10rpx 0rpx rgba(97, 160, 242, 0.3) !important;
border-radius: 8rpx;
color: #fff !important;
font-size: 32rpx;
margin-top: 40rpx;
text-align: center;
}
......@@ -48,7 +48,7 @@
"list": []
},
"miniprogram": {
"current": 7,
"current": 8,
"list": [
{
"id": -1,
......@@ -103,6 +103,13 @@
"id": -1,
"name": "pages/person/company/index",
"pathName": "pages/person/company/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/editcompany/index",
"pathName": "pages/person/editcompany/index",
"scene": null
}
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment