Commit 25e6e733 by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsalesProgram

# Conflicts:
#	pages/person/certification/addcertification/index.wxml
#	pages/person/certification/certificationmanage/index.wxml
#	pages/tab/me/me.wxml
#	project.config.json
#	utils/util.js
parents c0e7b452 3c0f0d24
......@@ -27,7 +27,9 @@
"pages/person/privacy/index",
"pages/person/setpassword/index",
"pages/person/certification/addcertification/index",
"pages/person/certification/certificationmanage/index"
"pages/person/certification/certificationmanage/index",
"pages/person/company/index",
"pages/person/editcompany/index"
],
"window": {
"backgroundTextStyle": "light",
......
......@@ -112,6 +112,7 @@ image {
.placeholderClass {
color: #adb6bf;
font-size:28rpx;
}
/* /头部搜索公共样式 */
......
// pages/person/addcertification/index.js
const http = require('../../../../utils/util.js');
import {
chooseImg
} from '../../../../utils/util.js';
import {
apis
} from '../../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
status:false,
items: [
{name: 'auth_type', value: '企业', checked: 'true'},
{name: 'auth_type', value: '个人'}
]
authInfo: {},
status: true,
nameText: '公司名称',
index: 0,
companyType: [{
id: 1,
name: '贸易商'
}, {
id: 2,
name: '代理商'
}, {
id: 3,
name: '原厂'
}, {
id: 4,
name: '制造商'
}],
companyTypeText: '请选择经营性质',
placeholderText: '请输入公司名称',
name: '',
imgSrc: '',
disabled: false,
loading: false,
checked: 2
},
/**
......@@ -17,6 +43,40 @@ Page({
*/
onLoad: function (options) {
//更新认证信息
if (options.id) {
http.getData(apis.authInfo, 'GET', null, (res) => {
if (res.errcode === 0) {
this.setData({
status: false,
name: res.data.company_type_val,
imgSrc: res.data.auth_img,
checked: res.data.auth_type,
companyTypeText: res.data.company_type_val,
placeholderText:res.data.auth_type == 1 ? '请输入个人名称':'请输入公司名称',
nameText:res.data.auth_type == 1 ? '个人名称':'公司名称',
authInfo: res.data
});
//选中经营性质
for (let i = 0; i < this.data.companyType.length; i++) {
if (res.data.company_type_val == this.data.companyType[i].name) {
this.setData({
index: i
});
}
}
}
}, true, false, true);
}
},
/**
......@@ -66,5 +126,154 @@ Page({
*/
onShareAppMessage: function () {
},
/**
* 认证类型
*/
radioChange: function (e) {
if (e.detail.value) {
if (e.detail.value == 1) {
this.setData({
nameText: "个人名称",
placeholderText: '请输入个人名称'
});
} else if (e.detail.value == 2) {
this.setData({
nameText: "公司名称",
placeholderText: '请输入公司名称'
});
}
}
},
/**
* 上传资料
*/
uploadImg: function () {
chooseImg(apis.ossupload, 1, (res) => {
if (res) {
this.setData({
imgSrc: res,
status: false
});
}
});
},
/**
* 删除资料
*/
deleteImg: function () {
this.setData({
imgSrc: '',
status: true
})
},
/**
* 验证字段
*/
calcForm: function (val) {
let company_name = val.company_name;
let company_type = val.company_type;
let auth_img = this.data.imgSrc;
if (!company_name) {
wx.showToast({
title: this.data.placeholderText,
icon: 'none',
duration: 2000
});
return false;
}
if (!company_type) {
wx.showToast({
title: '请选择经营性质',
icon: 'none',
duration: 2000
});
return false;
}
if (!auth_img) {
wx.showToast({
title: '请上传资料',
icon: 'none',
duration: 2000
});
return false;
}
return true;
},
/**
* 认证提交
*/
formSubmit: function (e) {
if (this.calcForm(e.detail.value)) {
this.setData({
disabled: true,
loading: true
});
let company_type = e.detail.value.company_type * 1 + 1;
let params = Object.assign({}, e.detail.value, {
company_type: company_type,
auth_img: this.data.imgSrc
});
http.getData(apis.addAuth, 'GET', params, (res) => {
if (res.errcode === 0) {
wx.navigateTo({
url: '/pages/person/certification/certificationmanage/index',
success: (result) => {
this.setData({
disabled: false,
loading: false
});
}
});
} else {
this.setData({
disabled: false,
loading: false
});
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, false, false, true);
}
},
/**
*
* 经营性质
*/
bindPickerChange: function (e) {
this.setData({
index: e.detail.value,
companyTypeText: this.data.companyType[e.detail.value].name
})
}
})
\ No newline at end of file
......@@ -137,11 +137,11 @@
.btn {
margin: 0 55rpx;
height: 98rpx;
background: rgba(13, 132, 209, 1);
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3);
background: rgba(13, 132, 209, 1) !important;
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3) !important;
border-radius: 8rpx;
font-size: 32rpx;
color: #FFFFFF;
color: #FFFFFF !important;
text-align: center;
line-height: 89rpx;
}
......
......@@ -8,52 +8,60 @@
<text class="icon iconfont iconiconxiantiaoshouji13"></text>
</view>
</view>
<view class="item boxsiz row verCenter bothSide">
<view>
<text class="t1">认证类型</text>
</view>
<view>
<radio-group class="radio-group" bindchange="radioChange">
<label class="radio-wrap" wx:for="{{items}}">
<radio value="{{item.name}}" checked="{{item.checked}}" class="radio-text" />
<text class="va-m">{{item.value}}</text>
</label>
</radio-group>
</view>
</view>
<view class="hr"></view>
<view class="item boxsiz row verCenter bothSide">
<view class="flex-a">
<text class="t1">公司名称</text>
</view>
<view class="flex-b">
<input placeholder="请输入公司名称" placeholder-class="placeholderClass" name="company_name" data-type="1" bindinput='bindinputFn' class="inp"></input>
</view>
</view>
<view class="hr"></view>
<view class="item boxsiz row verCenter bothSide bor">
<view>
<text class="t1">经营性质</text>
<form bindsubmit="formSubmit">
<view class="item boxsiz row verCenter bothSide">
<view>
<text class="t1">认证类型</text>
</view>
<view>
<radio-group class="radio-group" bindchange="radioChange" name="auth_type">
<label class="radio-wrap">
<radio value="2" checked="{{checked == 2}}" class="radio-text" />
<text class="va-m">企业</text>
</label>
<label class="radio-wrap">
<radio value="1" checked="{{checked == 1}}" class="radio-text" />
<text class="va-m">个人</text>
</label>
</radio-group>
</view>
</view>
<view>
<text class="t2">请选择经营性质</text>
<text class="icon iconfont iconChevron"></text>
<view class="hr"></view>
<view class="item boxsiz row verCenter bothSide">
<view class="flex-a">
<text class="t1">{{nameText}}</text>
</view>
<view class="flex-b">
<input value="{{authInfo.company_name}}" placeholder="{{placeholderText}}" placeholder-class="placeholderClass" name="company_name" data-type="1" bindinput='bindinputFn' class="inp"></input>
</view>
</view>
</view>
<view class="upload-box column rowCenter verCenter">
<block wx:if="{{status}}">
<view class="add column rowCenter verCenter">
<text class="icon iconfont iconiconxiantiaoshouji15"></text>
<text class="t1">上传资料</text>
<view class="hr"></view>
<view class="item boxsiz row verCenter bothSide bor">
<view>
<text class="t1">经营性质</text>
</view>
</block>
<block wx:else>
<view class="view column rowCenter verCenter">
<image src="/res/images/imgs/test.jpg " class="img"></image>
<text class="icon iconfont iconiconxiantiaoshouji7"></text>
<view>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{companyType}}" name="company_type" range-key="{{'name'}}">
<text class="t2">{{companyTypeText}}</text>
<text class="icon iconfont iconChevron"></text>
</picker>
</view>
</block>
<text class="txt">请上传名片/工作,任意材料,证明您的身份信息</text>
</view>
<button class="btn">提交认证</button>
</view>
<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>
<text class="txt">请上传名片/工作,任意材料,证明您的身份信息</text>
</view>
<button class="btn" form-type="submit" disabled="{{disabled}}" loading="{{loading}}">提交认证</button>
</form>
</view>
\ No newline at end of file
......@@ -110,11 +110,11 @@
.certification .btn {
margin: 0 55rpx;
height: 98rpx;
background: #0d84d1;
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3);
background: #0d84d1 !important;
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3) !important;
border-radius: 8rpx;
font-size: 32rpx;
color: #FFFFFF;
color: #FFFFFF !important;
text-align: center;
line-height: 89rpx;
}
// pages/person/certification/certificationmanage/index.js
const http = require('../../../../utils/util.js');
import {
apis
} from '../../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
authinfo: {}
},
/**
......@@ -13,6 +18,17 @@ Page({
*/
onLoad: function (options) {
http.getData(apis.authInfo, 'GET', null, (res) => {
if (res.errcode == 0) {
this.setData({
authInfo: res.data
});
}
}, false, false, true);
},
/**
......@@ -62,5 +78,30 @@ Page({
*/
onShareAppMessage: function () {
},
/**
* 跳转认证信息
*/
toUrl: function (e) {
if(e.target.dataset.type == 1){
wx.navigateTo({
url: e.target.dataset.url+'?id='+e.target.dataset.id,
success: (result)=>{
}
});
}else if(e.target.dataset.type == 2){
wx.navigateTo({
url: e.target.dataset.url,
success: (result)=>{
}
});
}else if(e.target.dataset.type == 3){
wx.switchTab({
url:e.target.dataset.url
});
}
}
})
\ No newline at end of file
......@@ -9,28 +9,52 @@
</view>
</view>
<view class="content">
<text class="time">更新时间:2019-05-10</text>
<text class="time">更新时间:{{authInfo.update_time}}</text>
<view class="status row verCenter rowCenter">
<image src="/res/images/imgs/test.jpg " class="img"></image>
<text class=c"></text>
</view>
<view class="error">
<text class="icon iconfont iconiconxiantiaoshouji1 va-m"></text>
<text class="t1 va-m">驳回理由:上传的资料不清晰,无法确认资质。</text>
<cover-image src="{{authInfo.auth_img}}" class="img"></cover-image>
<block wx:if="{{authInfo.status === 1}}">
<text class="a"></text>
</block>
<block wx:elif="{{authInfo.status === 3}}">
<text class="b"></text>
</block>
<block wx:elif="{{authInfo.status === 2}}">
<text class="c"></text>
</block>
</view>
<block wx:if="{{authInfo.status === 2}}">
<view class="error">
<text class="icon iconfont iconiconxiantiaoshouji1 va-m"></text>
<text class="t1 va-m">驳回理由:{{authInfo.reject_reason}}。</text>
</view>
</block>
<view class="txt">
<text class="t1 boxsiz">深圳市猎芯科技有限公司</text>
<text class="t1 boxsiz">{{authInfo.company_name}}</text>
<view class="row verCenter rowCenter mb">
<view>
<text class="t2">资质:</text>
<text class="t3 t3-mr">企业认证</text>
<text class="t3 t3-mr">{{authInfo.auth_type_val}}</text>
</view>
<view>
<text class="t2">性质:</text>
<text class="t3">贸易商</text>
<text class="t3">{{authInfo.company_type_val}}</text>
</view>
</view>
</view>
</view>
<button class="btn">更新认证信息</button>
<block wx:if="{{authInfo.status === 1}}">
<button class="btn" data-type="1" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
更新认证信息
</button>
</block>
<block wx:elif="{{authInfo.status === 3}}">
<button class="btn" data-type="3" data-id="{{authInfo.id}}" data-url='/pages/tab/home/home' bind:tap="toUrl">
返回会员中心
</button>
</block>
<block wx:elif="{{authInfo.status === 2}}">
<button class="btn" data-type="2" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
重新提交信息
</button>
</block>
</view>
\ No newline at end of file
// pages/person/company/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "我的主页"
}
\ No newline at end of file
.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
<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
.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;
}
const http = require('../../../utils/util.js');
import {
chooseImg
} from '../../../utils/util.js';
import {
apis
} from '../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
status: true,
imgSrc: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
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
{
"usingComponents": {},
"navigationBarTitleText": "编辑企业简介"
}
\ 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
<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
.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;
}
<view class="success column rowCenter verCenter">
<image src="/res/images/imgs/success.png" class="img"></image>
<text class="tit">恭喜您,注册成功</text>
<navigator url="/pages/person/login/index" class="btn">资质认证</navigator>
<navigator url="/pages/person/certification/addcertification/index" class="btn">资质认证</navigator>
<view class="txt">
<text class="t1">为了保证询报价的真实性,请完成“</text>
<text class="t2">资质认证</text>
......
......@@ -10,9 +10,9 @@ Page({
*/
data: {
isShow: false,
userInfo:{
avatar:'',
mobile:''
userInfo: {
avatar: '',
mobile: ''
},
business: {
goods: '',
......@@ -97,15 +97,31 @@ Page({
onShareAppMessage: function () {
},
/**
/**
* 跳转地址
*/
toUrl: function (e) {
//认证管理
if (e.target.dataset.type == 'certification') {
if (e.target.dataset.status == null) {
wx.navigateTo({
url:"/pages/person/certification/addcertification/index"
});
}else if(e.target.dataset.status == 1){
}
}
if (e.target.dataset.url) {
wx.navigateTo({
url: e.target.dataset.url
})
});
}
}
......
......@@ -5,7 +5,8 @@
.pic {
margin-right: 24rpx;
background: #E6ECF2;
border-radius: 50%;
.im {
width: 120rpx;
height: 120rpx;
......@@ -130,6 +131,7 @@
.bar-list {
margin-top: 36rpx;
padding-bottom: 84rpx;
.hr {
height: 10rpx;
......@@ -137,6 +139,7 @@
}
.bar {
position: relative;
padding: 0 24rpx 0 0;
margin-left: 24rpx;
height: 100rpx;
......@@ -161,6 +164,14 @@
font-size: 40rpx;
}
.iconiconxiantiaoshouji26{
color: #FFB526;
font-size: 40rpx;
}
.iconiconxiantiaoshouji23{
color: #EA1717;
font-size: 40rpx;
}
.iconjuxing6 {
color: #61A0F2;
......
<view class="mine" hover-class="none" hover-stop-propagation="false">
<view class="mine">
<view class="head row verCenter">
<view class="pic">
<image class="im" src="{{userInfo.avatar ? userInfo.avatar:'/res/images/imgs/default.png'}}"></image>
<cover-image class="im" src="{{userInfo.avatar ? userInfo.avatar:'/res/images/imgs/heads.png'}}"></cover-image>
</view>
<view class="text">
<text class="t1">{{userInfo.company_name}}</text>
<view class="row verCenter">
<text class="t2" selectable="false" space="false" decode="false">普通会员</text>
<view>
<text class="t3">金币:</text>
<text class="t3">红包:</text>
<text class="t4">13,123</text>
</view>
</view>
......@@ -38,7 +38,7 @@
<text class='t2'>金币提现兑换、领红包</text>
</view>
<view class="bar-list boxsiz">
<view class="boxsiz bar row bothSide verCente">
<view class="boxsiz bar row bothSide verCenter">
<view>
<text class="icon iconfont iconiconcaiseshouye1"></text>
<text class="t1">个人主页</text>
......@@ -57,13 +57,37 @@
<text class="t2">{{userInfo.mobile}}</text>
</view>
</view>
<view class="boxsiz bar row bothSide verCenter">
<view class="boxsiz bar row bothSide verCenter" data-type="certification" data-status="{{userInfo.auth_status}}" bind:tap="toUrl">
<view>
<text class="icon iconfont iconiconxiantiaoshouji19"></text>
<text class="t1">认证管理</text>
</view>
<view>
<text class="t2">已认证</text>
<block wx:if="{{userInfo.auth_status_val == null}}">
<text class="t2">未认证</text>
</block>
<block wx:else>
<text class="t2">{{userInfo.auth_status_val}}</text>
</block>
<text class="icon iconfont iconChevron"></text>
</view>
</view>
<view class="hr"></view>
<view class="boxsiz bar row bothSide verCenter bor">
<view>
<text class="icon iconfont iconiconxiantiaoshouji26"></text>
<text class="t1">在线客服</text>
</view>
<view>
<text class="icon iconfont iconChevron"></text>
</view>
</view>
<view class="boxsiz bar row bothSide verCenter">
<view>
<text class="icon iconfont iconiconxiantiaoshouji23"></text>
<text class="t1">评价管理</text>
</view>
<view>
<text class="icon iconfont iconChevron"></text>
</view>
</view>
......@@ -91,7 +115,7 @@
<!-- 签到弹出层 -->
<view wx:if="{{isShow}}" class="layer-mask column verCenter rowCenter" hover-class="none" hover-stop-propagation="false">
<view class="layer column verCenter rowCenter">
<image class="im" src="/res/images/imgs/star.png"></image>
<cover-image class="im" src="/res/images/imgs/star.png"></cover-image>
<text class="t1">恭喜您获得</text>
<view class="txt">
<text class="t2">666</text>
......
......@@ -4,6 +4,8 @@
}
.mine .head .pic {
margin-right: 24rpx;
background: #E6ECF2;
border-radius: 50%;
}
.mine .head .pic .im {
width: 120rpx;
......@@ -107,12 +109,14 @@
}
.mine .bar-list {
margin-top: 36rpx;
padding-bottom: 84rpx;
}
.mine .bar-list .hr {
height: 10rpx;
background: #F5F9FC;
}
.mine .bar-list .bar {
position: relative;
padding: 0 24rpx 0 0;
margin-left: 24rpx;
height: 100rpx;
......@@ -133,6 +137,14 @@
color: #FFB526;
font-size: 40rpx;
}
.mine .bar-list .bar .iconiconxiantiaoshouji26 {
color: #FFB526;
font-size: 40rpx;
}
.mine .bar-list .bar .iconiconxiantiaoshouji23 {
color: #EA1717;
font-size: 40rpx;
}
.mine .bar-list .bar .iconjuxing6 {
color: #61A0F2;
font-size: 40rpx;
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
//数据请求(get,post)
const getData = (url, type, param, callBack, loading, isheader) => {
wx.showNavigationBarLoading();
var token, header;
//获取token
token = wx.getStorageSync('access_token');
//参数字段追加来源字段
var params = Object.assign({}, param, {
source: 1
});
//是否启用loading加载效果
if (loading) {
wx.showLoading();
}
//是否启用请求头token
if (isheader) {
header = {
"Content-Type": "applciation/json",
"Authorization": 'Bearer ' + token
}
} else {
header = {
"Content-Type": "applciation/json"
}
}
wx.request({
url: url,
data: params,
header: header,
method: type,
success: (res) => {
//处理token失效的情况
if (res.data.hasOwnProperty('data')) {
if (res.data.data.err_code === 501 || res.data.data.errcode === 501) {
wx.navigateTo({
url: '/pages/person/login/index'
});
} else {
typeof callBack == "function" && callBack(res.data, "");
}
} else {
typeof callBack == "function" && callBack(res.data, "");
}
wx.hideNavigationBarLoading();
if (loading) {
wx.hideLoading();
}
},
fail: (err) => {
typeof callBack == "function" && callBack(null, err.errMsg);
console.log(err);
wx.hideNavigationBarLoading();
if (loading) {
wx.hideLoading();
}
}
})
const getData = (url, type, param, callBack, loading, isheader, istoken) => {
wx.showNavigationBarLoading();
var token, header;
//获取token
token = wx.getStorageSync('access_token');
//参数字段追加来源字段,token字段
if (istoken) {
var params = Object.assign({}, param, {
source: 1,
token:token
});
} else {
var params = Object.assign({}, param, {
source: 1
});
}
//是否启用loading加载效果
if (loading) {
wx.showLoading();
}
//是否启用请求头token
if (isheader) {
header = {
"Content-Type": "applciation/json",
"Authorization": 'Bearer ' + token
}
} else {
header = {
"Content-Type": "applciation/json"
}
}
wx.request({
url: url,
data: params,
header: header,
method: type,
success: (res) => {
//处理token失效的情况
if (res.data.hasOwnProperty('data')) {
if (res.data.data.err_code === 501 || res.data.data.errcode === 501) {
wx.navigateTo({
url: '/pages/person/login/index'
});
} else {
typeof callBack == "function" && callBack(res.data, "");
}
} else {
typeof callBack == "function" && callBack(res.data, "");
}
wx.hideNavigationBarLoading();
if (loading) {
wx.hideLoading();
}
},
fail: (err) => {
typeof callBack == "function" && callBack(null, err.errMsg);
console.log(err);
wx.hideNavigationBarLoading();
if (loading) {
wx.hideLoading();
}
}
})
};
//上传文件
const uploadFile = (url, paths, callBack) => {
wx.showLoading({
title: '上传中',
mask: true
})
for (var i = 0; i < paths.length; i++) {
wx.uploadFile({
url: url,
filePath: paths[i],
name: 'upload',
formData: { token: wx.getStorageSync('access_token'), source: 2 },
header: {
"Content-Type": "multipart/form-data"
},
success: (res) => {
var data = JSON.parse(res.data);
if (data.errcode == 103200) {
wx.showToast({
title: '上传成功',
icon: 'none',
duration: 2000
});
callBack(data.data[0])
} else {
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
});
}
},
fail: (e) => {
console.log(e)
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
});
},
complete: () => {
wx.hideLoading();
}
})
}
wx.showLoading({
title: '上传中',
mask: true
})
for (var i = 0; i < paths.length; i++) {
wx.uploadFile({
url: url,
filePath: paths[i],
name: 'upload',
formData: {
token: wx.getStorageSync('access_token'),
source: 2
},
header: {
"Content-Type": "multipart/form-data"
},
success: (res) => {
var data = JSON.parse(res.data);
if (data.errcode == 103200) {
callBack(data.data[0])
} else {
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
});
}
},
fail: (e) => {
console.log(e)
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
});
},
complete: () => {
wx.hideLoading();
}
})
}
};
const chooseImg = (url, num, callback) => {
wx.chooseImage({
count: num,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
uploadFile(url, res.tempFilePaths, (rtn) => {
callback(rtn)
})
}
})
wx.chooseImage({
count: num,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
uploadFile(url, res.tempFilePaths, (rtn) => {
callback(rtn)
})
}
})
};
const tips = (text) => {
wx.showToast({
......@@ -148,11 +153,10 @@ const changeTime = (str) => {
var Day = date.getDate();
var time = date.getFullYear() + "-" + (Month < 10 ? "0" + Month : Month) + "-" + (Day < 10 ? "0" + Day : Day) + " "
+ (Hours < 10 ? "0" + Hours : Hours) + ":" + (Minutes < 10 ? "0" + Minutes : Minutes) + ":" + (Seconds < 10 ? "0" + Seconds : Seconds);
return time;
};
return time;}
module.exports = {
getData: getData,
getData: getData,
chooseImg: chooseImg,
tips: tips,
changeTime: changeTime
tips:tips,
changeTime:changeTime
}
\ No newline at end of file
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