Commit a918d42f by 梁建民

公司

parent 1b9e15ba
......@@ -24,7 +24,10 @@
"pages/detail/xj/index",
"pages/list/qd/index",
"pages/person/setting/index",
"pages/person/privacy/index"
"pages/person/privacy/index",
"pages/person/setpassword/index",
"pages/person/certification/addcertification/index",
"pages/person/certification/certificationmanage/index"
],
"window": {
"backgroundTextStyle": "light",
......
......@@ -10,6 +10,10 @@ image {
vertical-align: middle;
}
.va-m{
vertical-align: middle;
}
.column {
display: flex;
flex-direction: column;
......@@ -106,8 +110,8 @@ image {
font-size: 24rpx;
}
.search-com .placeholderClass {
color: #adb6bf;
.placeholderClass {
color: #adb6bf;
}
/* /头部搜索公共样式 */
......
// pages/person/addcertification/index.js
Page({
/**
* 页面的初始数据
*/
data: {
status:false,
items: [
{name: 'auth_type', value: '企业', checked: 'true'},
{name: 'auth_type', value: '个人'}
]
},
/**
* 生命周期函数--监听页面加载
*/
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
.certification {
.flex-a {
flex: 1;
}
.flex-b {
flex: 2;
}
.prompt {
padding: 0 24rpx;
height: 68rpx;
background: #FFF6E6;
.iconiconxiantiaoshouji12 {
font-size: 30rpx;
color: #EAAD37;
}
.t1 {
font-size: 24rpx;
color: #EAA217;
margin-left: 12rpx;
}
.iconiconxiantiaoshouji13 {
font-size: 30rpx;
color: #D8DFE6;
}
}
.hr {
height: 10rpx;
background: #F5F9FC;
}
.item {
padding: 0 24rpx 0 0;
margin-left: 24rpx;
height: 100rpx;
.radio-group {
.radio-wrap {
font-size: 28rpx;
color: #515559;
font-weight: 400;
}
}
.t1 {
font-size: 28rpx;
color: #515559;
font-weight: 400;
}
.t2 {
font-size: 28rpx;
color: #8A9299;
font-weight: 400;
}
.inp {
width: 492r px;
height: 100rpx;
}
.radio-wrap:first-child {
margin-right: 50rpx;
.radio-text {
font-size: 28rpx;
font-weight: 400;
color: #515559;
}
}
.iconChevron {
font-size: 27rpx;
color: #ADB6BF;
margin-left: 12rpx;
}
&.bor {
border-bottom: 1px solid #F5F9FC;
}
}
.upload-box {
margin-top: 60rpx;
margin-bottom: 60rpx;
.add {
width: 220rpx;
height: 220rpx;
background: #F0F6FA;
.iconiconxiantiaoshouji15 {
font-size: 80rpx;
color: #ADB6BF;
}
.t1 {
margin-top: 19rpx;
font-size: 24rpx;
color: #8A9299;
}
}
.view {
position: relative;
width: 220rpx;
height: 220rpx;
.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;
}
}
.txt {
margin-top: 24rpx;
font-size: 24rpx;
color: #8A9299;
}
}
.btn {
margin: 0 55rpx;
height: 98rpx;
background: rgba(13, 132, 209, 1);
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3);
border-radius: 8rpx;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 89rpx;
}
}
\ No newline at end of file
<view class="certification" hover-class="none" hover-stop-propagation="false">
<view class="prompt boxsiz row verCenter bothSide">
<view>
<text class="icon iconfont iconiconxiantiaoshouji12"></text>
<text class="t1">请如实填写认证信息,不符合的认证将被拒绝</text>
</view>
<view>
<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>
</view>
<view>
<text class="t2">请选择经营性质</text>
<text class="icon iconfont iconChevron"></text>
</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>
</block>
<block wx:else>
<view class="view column rowCenter verCenter">
<cover-image src="/res/images/imgs/test.jpg " class="img"></cover-image>
<text class="icon iconfont iconiconxiantiaoshouji7"></text>
</view>
</block>
<text class="txt">请上传名片/工作,任意材料,证明您的身份信息</text>
</view>
<button class="btn">提交认证</button>
</view>
\ No newline at end of file
.certification .flex-a {
flex: 1;
}
.certification .flex-b {
flex: 2;
}
.certification .prompt {
padding: 0 24rpx;
height: 68rpx;
background: #FFF6E6;
}
.certification .prompt .iconiconxiantiaoshouji12 {
font-size: 30rpx;
color: #EAAD37;
}
.certification .prompt .t1 {
font-size: 24rpx;
color: #EAA217;
margin-left: 12rpx;
}
.certification .prompt .iconiconxiantiaoshouji13 {
font-size: 30rpx;
color: #D8DFE6;
}
.certification .hr {
height: 10rpx;
background: #F5F9FC;
}
.certification .item {
padding: 0 24rpx 0 0;
margin-left: 24rpx;
height: 100rpx;
}
.certification .item .radio-group .radio-wrap {
font-size: 28rpx;
color: #515559;
font-weight: 400;
}
.certification .item .t1 {
font-size: 28rpx;
color: #515559;
font-weight: 400;
}
.certification .item .t2 {
font-size: 28rpx;
color: #8A9299;
font-weight: 400;
}
.certification .item .inp {
width: 492r px;
height: 100rpx;
}
.certification .item .radio-wrap:first-child {
margin-right: 50rpx;
}
.certification .item .radio-wrap:first-child .radio-text {
font-size: 28rpx;
font-weight: 400;
color: #515559;
}
.certification .item .iconChevron {
font-size: 27rpx;
color: #ADB6BF;
margin-left: 12rpx;
}
.certification .item.bor {
border-bottom: 1px solid #F5F9FC;
}
.certification .upload-box {
margin-top: 60rpx;
margin-bottom: 60rpx;
}
.certification .upload-box .add {
width: 220rpx;
height: 220rpx;
background: #F0F6FA;
}
.certification .upload-box .add .iconiconxiantiaoshouji15 {
font-size: 80rpx;
color: #ADB6BF;
}
.certification .upload-box .add .t1 {
margin-top: 19rpx;
font-size: 24rpx;
color: #8A9299;
}
.certification .upload-box .view {
position: relative;
width: 220rpx;
height: 220rpx;
}
.certification .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;
}
.certification .upload-box .txt {
margin-top: 24rpx;
font-size: 24rpx;
color: #8A9299;
}
.certification .btn {
margin: 0 55rpx;
height: 98rpx;
background: #0d84d1;
box-shadow: 0px 6rpx 10rpx 0px rgba(97, 160, 242, 0.3);
border-radius: 8rpx;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 89rpx;
}
// pages/person/certification/certificationmanage/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
This diff could not be displayed because it is too large.
<view class="certification" hover-class="none" hover-stop-propagation="false">
<view class="prompt boxsiz row verCenter bothSide">
<view>
<text class="icon iconfont iconiconxiantiaoshouji12"></text>
<text class="t1">请如实填写认证信息,不符合的认证将被拒绝</text>
</view>
<view>
<text class="icon iconfont iconiconxiantiaoshouji13"></text>
</view>
</view>
<view class="content">
<text class="time">更新时间:2019-05-10</text>
<view class="status row verCenter rowCenter">
<cover-image src="/res/images/imgs/test.jpg " class="img"></cover-image>
<text class=c"></text>
</view>
<view class="error">
<text class="icon iconfont iconiconxiantiaoshouji1 va-m"></text>
<text class="t1 va-m">驳回理由:上传的资料不清晰,无法确认资质。</text>
</view>
<view class="txt">
<text class="t1 boxsiz">深圳市猎芯科技有限公司</text>
<view class="row verCenter rowCenter mb">
<view>
<text class="t2">资质:</text>
<text class="t3 t3-mr">企业认证</text>
</view>
<view>
<text class="t2">性质:</text>
<text class="t3">贸易商</text>
</view>
</view>
</view>
</view>
<button class="btn">更新认证信息</button>
</view>
\ No newline at end of file
This diff could not be displayed because it is too large.
<!-- 注册 -->
<!-- 忘记密码 -->
<view class="person">
<view class="column tit" wx:if="{{type === 1 || type === 2}}">
......
const http = require('../../../utils/util.js');
import { apis } from '../../../utils/api.js';
import {
apis
} from '../../../utils/api.js';
Page({
......@@ -14,7 +16,7 @@ Page({
passwordType: true,
mobileFlag: false,
passwordFlag: false,
disabled: false,
disabled: false,
loading: false,
formData: {
mobile: '',
......@@ -218,6 +220,12 @@ Page({
data: res.data.access_token
});
//注入用户id
wx.setStorage({
key: "user_id",
data: res.data.user_id
});
wx.switchTab({
url: '/pages/tab/home/home'
})
......
const http = require('../../../utils/util.js');
import {
apis
} from '../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
error: false,
errorText: '',
visiblePwd: false,
passwordType: true,
mobileFlag: false,
passwordFlag: false,
disabled: false,
loading: false,
formData: {
password: ''
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
/**
* 校验字段
*/
bindinputFn: function(e) {
let value = e.detail.value
let reg_pwd = /^[0-9A-Za-z]{6,}$/;
if (e.currentTarget.dataset.type == 4) {
if (value) {
this.setData({
error: true,
errorText: '密码由字母和数字组成,且不能少于6位',
passwordFlag: true
});
if (reg_pwd.test(value)) {
this.setData({
'formData.password': value,
error: false,
errorText: '',
passwordFlag: false
});
}
}
}
},
/**
* 校验字段
*/
calcForm: function(val, type) {
let password = val.password;
let reg_pwd = /^[0-9A-Za-z]{6,}$/;
if (!password) {
this.setData({
error: true,
errorText: '密码不能为空',
mobileFlag: false,
passwordFlag: true
});
return false;
}
if (!reg_pwd.test(password)) {
this.setData({
error: true,
errorText: '密码由字母和数字组成,且不能少于6位',
mobileFlag: false,
passwordFlag: true
});
return false;
}
this.setData({
error: false,
errorText: '',
codeFlag: false,
mobileFlag: false
});
return true;
},
/**
*设置密码
*/
formSubmit: function(e) {
if (this.calcForm(e.detail.value)) {
this.setData({
disabled: true,
loading: true
});
http.getData(apis.editPwd, 'POST', e.detail.value, (res) => {
if (res.err_code === 0) {
wx.navigateBack({
delta: 2
});
} else {
this.setData({
disabled: false,
loading: false
});
wx.showToast({
title: res.err_msg,
icon: 'none',
duration: 2000
});
}
},true,true);
}
},
/**
* 密码是否可见
*/
toggleFn: function(e) {
if (this.data['visiblePwd']) {
this.setData({
visiblePwd: false,
passwordType: true
});
} else {
this.setData({
visiblePwd: true,
passwordType: false
});
}
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "设置密码"
}
\ No newline at end of file
.person {
margin: 0 55rpx;
padding-top: 32rpx;
.tit {
margin-bottom: 42rpx;
.t1 {
font-size: 48rpx;
color: #2e3033;
font-weight: 600;
line-height: 67rpx;
}
.t2 {
font-size: 26rpx;
font-weight: 400;
line-height: 40px;
color: #8a9299;
}
}
.inp-wrap {
height: 98rpx;
border-bottom: 1px solid #d8dfe6;
padding-left: 10rpx;
input {
padding-left: 35rpx;
width: 340rpx;
}
.icon {
color: #adb6bf;
}
.pwd-ico {
padding-left: 160rpx;
}
.vcode {
font-size: 32rpx;
color: #61a0f2;
background: none;
font-weight: 400;
border: 0 !important;
&::after {
border: 0 !important;
}
}
.areacode {
border-left: 1px solid #d8dfe6;
.tel-value {
font-size: 32rpx;
color: #515559;
padding: 7rpx 11rpx 7rpx 16rpx;
}
.icon {
color: #d8dfe6;
font-size: 26rpx;
}
}
}
.register-button {
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;
}
.error-wrap {
margin-top: 24rpx;
.error {
.iconfont {
color: #ea1717;
}
.txt {
font-size: 24rpx;
color: #ea1717;
margin-left: 15rpx;
}
}
.forget {
font-size: 28rpx;
color: #61a0f2;
}
}
.placeholderClass {
color: #adb6bf;
font-size: 32rpx;
}
.inp-error {
border-bottom: 1px solid #ea1717;
.icon {
color: #ea1717;
}
input {
color: #ea1717;
}
}
}
.success {
width: 100%;
padding-top: 50rpx;
.img {
width: 480rpx;
height: 346rpx;
}
.t1 {
padding-top: 40rpx;
margin-bottom: 14rpx;
font-size: 48rpx;
color: #2e3033;
line-height: 67rpx;
font-weight: 600;
display: block;
}
.t2 {
font-size: 26rpx;
font-weight: 400;
color: #8a9299;
margin-bottom: 66rpx;
}
}
<view class="person">
<view class="column tit">
<text class="t1">设置登录密码</text>
<text class="t2">请保管好您的登录密码。</text>
</view>
<form bindsubmit="formSubmit">
<view class="inp-wrap row verCenter {{passwordFlag ? 'inp-error':''}}">
<text class="icon iconfont iconiconxiantiaoshouji2"></text>
<view class="form-item-right row verCenter bothSide">
<input placeholder="请输入登录密码" placeholder-class="placeholderClass" class="pwd" name="password" data-type="4" password='{{passwordType}}' bindinput='bindinputFn'></input>
<block wx:if="{{visiblePwd}}">
<text class="icon iconfont iconiconxiantiaoshouji3 pwd-ico" bindtap="toggleFn"></text>
</block>
<block wx:else>
<text class="icon iconfont iconiconxiantiaoshouji4 pwd-ico" bindtap="toggleFn"></text>
</block>
</view>
</view>
<view class="error-wrap row bothSide verCenter">
<view class="error">
<block wx:if="{{error}}">
<text class="icon iconfont iconiconxiantiaoshouji1"></text>
<text class="txt">{{errorText}}</text>
</block>
</view>
</view>
<button class="register-button" form-type="submit" disabled="{{disabled}}" loading="{{loading}}">设置密码</button>
</form>
</view>
\ No newline at end of file
.person {
margin: 0 55rpx;
padding-top: 32rpx;
}
.person .tit {
margin-bottom: 42rpx;
}
.person .tit .t1 {
font-size: 48rpx;
color: #2e3033;
font-weight: 600;
line-height: 67rpx;
}
.person .tit .t2 {
font-size: 26rpx;
font-weight: 400;
line-height: 40px;
color: #8a9299;
}
.person .inp-wrap {
height: 98rpx;
border-bottom: 1px solid #d8dfe6;
padding-left: 10rpx;
}
.person .inp-wrap input {
padding-left: 35rpx;
width: 340rpx;
}
.person .inp-wrap .icon {
color: #adb6bf;
}
.person .inp-wrap .pwd-ico {
padding-left: 160rpx;
}
.person .inp-wrap .vcode {
font-size: 32rpx;
color: #61a0f2;
background: none;
font-weight: 400;
border: 0 !important;
}
.person .inp-wrap .vcode::after {
border: 0 !important;
}
.person .inp-wrap .areacode {
border-left: 1px solid #d8dfe6;
}
.person .inp-wrap .areacode .tel-value {
font-size: 32rpx;
color: #515559;
padding: 7rpx 11rpx 7rpx 16rpx;
}
.person .inp-wrap .areacode .icon {
color: #d8dfe6;
font-size: 26rpx;
}
.person .register-button {
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;
}
.person .error-wrap {
margin-top: 24rpx;
}
.person .error-wrap .error .iconfont {
color: #ea1717;
}
.person .error-wrap .error .txt {
font-size: 24rpx;
color: #ea1717;
margin-left: 15rpx;
}
.person .error-wrap .forget {
font-size: 28rpx;
color: #61a0f2;
}
.person .placeholderClass {
color: #adb6bf;
font-size: 32rpx;
}
.person .inp-error {
border-bottom: 1px solid #ea1717;
}
.person .inp-error .icon {
color: #ea1717;
}
.person .inp-error input {
color: #ea1717;
}
.success {
width: 100%;
padding-top: 50rpx;
}
.success .img {
width: 480rpx;
height: 346rpx;
}
.success .t1 {
padding-top: 40rpx;
margin-bottom: 14rpx;
font-size: 48rpx;
color: #2e3033;
line-height: 67rpx;
font-weight: 600;
display: block;
}
.success .t2 {
font-size: 26rpx;
font-weight: 400;
color: #8a9299;
margin-bottom: 66rpx;
}
......@@ -86,11 +86,12 @@ Page({
wx.showModal({
title: '提示',
content: '您确定退出系统?',
content: '您确定退出系统?',
success(res) {
if (res.confirm) {
http.getData(apis.authLogout, 'POST', null, (res) => {
if (res.err_code === 0) {
wx.switchTab({
url: '/pages/tab/home/home'
......@@ -101,9 +102,11 @@ Page({
icon: 'none',
duration: 2000
});
}
}, false, true);
} else if (res.cancel) {
console.log('用户点击取消')
}
}
......
<view class="setting" hover-class="none" hover-stop-propagation="false">
<view class="boxsiz bar row bothSide verCenter bor">
<view class="boxsiz bar row bothSide verCenter bor" bind:tap="toUrl" data-url="/pages/person/setpassword/index">
<view>
<text class="t1">登录密码</text>
</view>
......
......@@ -4,7 +4,7 @@
<cover-image class="im" src="{{userInfo.avatar ? userInfo.avatar:'/res/images/imgs/default.png'}}"></cover-image>
</view>
<view class="text">
<text class="t1">深圳市猎芯科技有限公司</text>
<text class="t1">{{userInfo.company_name}}</text>
<view class="row verCenter">
<text class="t2" selectable="false" space="false" decode="false">普通会员</text>
<view>
......
......@@ -48,7 +48,7 @@
"list": []
},
"miniprogram": {
"current": 0,
"current": 11,
"list": [
{
"id": 0,
......@@ -105,6 +105,34 @@
"pathName": "pages/detail/good/index",
"query": "goodId=156039271518289&type=2",
"scene": null
},
{
"id": -1,
"name": "pages/person/setting/index",
"pathName": "pages/person/setting/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/setpassword/index",
"pathName": "pages/person/setpassword/index",
"query": "",
"scene": null
},
{
"id": 10,
"name": "pages/person/certification/addcertification/index",
"pathName": "pages/person/certification/addcertification/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/certification/certificationmanage/index",
"pathName": "pages/person/certification/certificationmanage/index",
"query": "",
"scene": null
}
]
}
......
......@@ -6,12 +6,12 @@ const goods_url = 'http://goodsapi.icsales.cc';
const inquiry_url = 'http://inquiryapi.icsales.cc';
const index_url = 'http://www.icsales.cc';
const apis = {
const apis = {
/**
* 授权接口
*/
getOpenId: auth_url + '/v1/getOpenId',
/**
/**
* 刷新token
*/
authRefresh: auth_url + '/auth/refresh',
......@@ -44,10 +44,14 @@ const apis = {
*/
getRegistCode: auth_url + '/v1/getRegistCode',
/**
* 微信验证码
*/
* 微信验证码
*/
getWxCode: auth_url + '/v1/getwxcode',
/**
* 小程序修改密码
*/
editPwd: auth_url + '/auth/editPwd',
/**
* 退出
*/
authLogout: auth_url + '/auth/logout',
......@@ -185,4 +189,4 @@ const apis = {
module.exports = {
apis: apis
}
}
\ 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