Commit 21187fc9 by 梁建民

小程序

parent cbde107e
<!-- pages/list/signin/index.wxml -->
<view class="signin-view">
<view class="today-topic">
<view class="top-line"></view>
<!-- <view class="top-line"></view> -->
<view class="topic-content">
<view class="content-top row bothSide verCenter">
<text class="content-title bold">{{topicInfo.title}}</text>
......
......@@ -13,14 +13,11 @@
}
.topic-content {
background: linear-gradient(360deg, rgba(126, 178, 246, 1) 0%, rgba(0, 133, 218, 1) 100%);
border-radius: 0 0 20rpx 20rpx;
background: linear-gradient(180deg, rgba(126, 178, 246, 1) 0%, rgba(0, 133, 218, 1) 100%);
color: #fff;
margin: 0 24rpx;
padding: 24rpx;
padding: 24rpx 48rpx;
position: relative;
z-index: 3;
transform: translateY(-16rpx)
}
.content-top {
......@@ -43,6 +40,7 @@
.topic-item {
padding: 0 24rpx 24rpx;
border-bottom: 10rpx solid #F5F9FC;
}
.item-top {
......@@ -53,7 +51,7 @@
height: 48rpx;
width: 48rpx;
border-radius: 50%;
background: #E6ECF2;
background: #E6ECF2;
}
.name {
......
......@@ -39,7 +39,8 @@ Page({
checked: 2,
uploaderList: [], //图片集合
uploaderNum: 0,
showUpload: true
showUpload: true,
auth_img: []
},
/**
......@@ -186,7 +187,7 @@ Page({
calcForm: function (val) {
let company_name = val.company_name;
let company_type = val.company_type;
let auth_img = this.data.imgSrc;
let auth_img = this.data.auth_img;
if (!company_name) {
......@@ -240,17 +241,15 @@ Page({
let params = Object.assign({}, e.detail.value, {
company_type: company_type,
auth_img: this.data.imgSrc
auth_img: this.data.auth_img
});
http.getData(apis.addAuth, 'GET', params, (res) => {
if (res.errcode === 0) {
wx.switchTab({
url: '/pages/tab/me/me',
wx.navigateTo({
url: '/pages/person/certification/certificationmanage/index',
success: (result) => {
this.setData({
disabled: false,
......@@ -286,11 +285,16 @@ Page({
companyTypeText: this.data.companyType[e.detail.value].name
})
},
// 删除图片
/**
* 删除图片
*/
clearImg: function (e) {
var nowList = []; //新数据
var uploaderList = this.data.uploaderList; //原数据
var authlist = [];
var auth_img = this.data.auth_img; //原数据
for (let i = 0; i < uploaderList.length; i++) {
if (i == e.currentTarget.dataset.index) {
continue;
......@@ -298,13 +302,27 @@ Page({
nowList.push(uploaderList[i])
}
}
for (let i = 0; i < auth_img.length; i++) {
if (i == e.currentTarget.dataset.index) {
continue;
} else {
authlist.push(auth_img[i])
}
}
this.setData({
uploaderNum: this.data.uploaderNum - 1,
uploaderList: nowList,
auth_img: authlist,
showUpload: true
})
},
//展示图片
/**
*
* 展示图片
*/
showImg: function (e) {
var that = this;
wx.previewImage({
......@@ -312,13 +330,16 @@ Page({
current: that.data.uploaderList[e.currentTarget.dataset.index]
})
},
//上传图片
/**
*
* 上传图片
*/
upload: function (e) {
var that = this;
wx.chooseImage({
count: 3 - that.data.uploaderNum, // 默认3
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有 sizeType: ['original', 'compressed']
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
count: 5 - that.data.uploaderNum,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: function (res) {
console.log(res)
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
......@@ -329,11 +350,59 @@ Page({
showUpload: false
})
}
that.setData({
uploaderList: uploaderList,
uploaderNum: uploaderList.length,
})
},
complete: function (res) {
that.uploadimg(apis.ossupload, that.data.uploaderList);
}
})
},
/**
*多张图片上传
*/
uploadimg: function (url, data) {
console.log(data.length)
wx.showLoading({
title: '上传中...',
mask: true,
});
var that = this,
i = data.i ? data.i : 0;
wx.uploadFile({
url: url,
filePath: data[i],
name: 'upload',
formData: {
token: wx.getStorageSync('access_token'),
source: 2
},
success: (res) => {
wx.hideLoading();
var data = JSON.parse(res.data);
if (data.errcode === 103200) {
this.data.auth_img.push(data.data[0]);
}
},
fail: (res) => {
},
complete: () => {
i++;
if (i == data.length) {
console.log('执行完毕');
} else {
data.i = i;
that.uploadimg(apis.ossupload, data);
}
}
});
}
})
\ No newline at end of file
......@@ -37,15 +37,33 @@
.status {
position: relative;
.img {
width: 400rpx;
height: 400rpx;
.list {
width: 100%;
margin: 0 auto;
flex-wrap: wrap;
padding: 0 24rpx;
.list-img {
margin-right: 25rpx;
margin-bottom: 25rpx;
&:nth-of-type(3n) {
margin-right: 0;
}
.img {
width: 218rpx;
height: 218rpx;
}
}
}
.a {
position: absolute;
bottom: -50rpx;
right: 89rpx;
bottom: 148rpx;
right: 132rpx;
width: 180rpx;
height: 180rpx;
background-repeat: no-repeat;
......@@ -56,8 +74,8 @@
.b {
position: absolute;
bottom: -50rpx;
right: 89rpx;
bottom: 148rpx;
right: 132rpx;
width: 180rpx;
height: 180rpx;
background-repeat: no-repeat;
......@@ -68,8 +86,8 @@
.c {
position: absolute;
bottom: -50rpx;
right: 89rpx;
bottom: 148rpx;
right: 132rpx;
width: 180rpx;
height: 180rpx;
background-repeat: no-repeat;
......
......@@ -9,7 +9,11 @@
<view class="content">
<text class="time">更新时间:{{authInfo.update_time}}</text>
<view class="status row verCenter rowCenter">
<image src="{{authInfo.auth_img}}" class="img"></image>
<view class="list row boxsiz">
<view class="list-img boxsiz" wx:for="{{authInfo.auth_img}}" wx:for-item="item">
<image src="{{item}}" class="img"></image>
</view>
</view>
<block wx:if="{{authInfo.status === 1}}">
<text class="a"></text>
</block>
......
.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 .content{margin-top:24rpx}.certification .content .time{font-size:22rpx;color:#ADB6BF;font-weight:400;text-align:right;padding:0 24rpx;display:block;margin-bottom:32rpx}.certification .content .status{position:relative}.certification .content .status .img{width:400rpx;height:400rpx}.certification .content .status .a{position:absolute;bottom:-50rpx;right:89rpx;width:180rpx;height:180rpx;background-repeat:no-repeat;background-size:cover;background-image:url('http://img.ichunt.com/images/ichunt/minProgram/34e2f4ea45944c280b39767f2e206edd.png');z-index:999}.certification .content .status .b{position:absolute;bottom:-50rpx;right:89rpx;width:180rpx;height:180rpx;background-repeat:no-repeat;background-size:cover;background-image:url('http://img.ichunt.com/images/ichunt/minProgram/8e19d4b5f49b92d5840e9f304dcc1f0f.png');z-index:999}.certification .content .status .c{position:absolute;bottom:-50rpx;right:89rpx;width:180rpx;height:180rpx;background-repeat:no-repeat;background-size:cover;background-image:url('http://img.ichunt.com/images/ichunt/minProgram/4737e38d6682dd22f547de614756ab95.png');z-index:999}.certification .content .error{margin-top:64rpx;text-align:center}.certification .content .error .iconiconxiantiaoshouji1{font-size:40rpx;color:#EA1717}.certification .content .error .t1{font-size:24rpx;color:#EA1717;font-weight:400;margin-left:15rpx}.certification .content .txt{margin-top:60rpx}.certification .content .txt .mb{margin-top:24rpx;margin-bottom:60rpx}.certification .content .txt .t1{margin:0 59rpx 0 57rpx;padding:0 0 24rpx 0;color:#515559;font-size:36rpx;font-weight:600;line-height:50rpx;border-bottom:1px solid #F5F9FC;text-align:center;display:block}.certification .content .txt .t2{font-size:26rpx;color:#8A9299;font-weight:400}.certification .content .txt .t3{font-size:26rpx;color:#515559;font-weight:400}.certification .content .txt .t3.t3-mr{margin-right:123rpx}.certification .btn{margin:0 55rpx;height:98rpx;background:#0d84d1;box-shadow:0 6rpx 10rpx 0 rgba(97,160,242,0.3);border-radius:8rpx;font-size:32rpx;color:#FFFFFF;text-align:center;line-height:89rpx}.certification .btn.opac{opacity:.5}
\ No newline at end of file
.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 .content{margin-top:24rpx}.certification .content .time{font-size:22rpx;color:#ADB6BF;font-weight:400;text-align:right;padding:0 24rpx;display:block;margin-bottom:32rpx}.certification .content .status{position:relative}.certification .content .status .list{width:100%;margin:0 auto;flex-wrap:wrap;padding:0 24rpx}.certification .content .status .list .list-img{margin-right:25rpx;margin-bottom:25rpx}.certification .content .status .list .list-img:nth-of-type(3n){margin-right:0}.certification .content .status .list .list-img .img{width:218rpx;height:218rpx}.certification .content .status .a{position:absolute;bottom:148rpx;right:132rpx;width:180rpx;height:180rpx;background-repeat:no-repeat;background-size:cover;background-image:url('http://img.ichunt.com/images/ichunt/minProgram/34e2f4ea45944c280b39767f2e206edd.png');z-index:999}.certification .content .status .b{position:absolute;bottom:148rpx;right:132rpx;width:180rpx;height:180rpx;background-repeat:no-repeat;background-size:cover;background-image:url('http://img.ichunt.com/images/ichunt/minProgram/8e19d4b5f49b92d5840e9f304dcc1f0f.png');z-index:999}.certification .content .status .c{position:absolute;bottom:148rpx;right:132rpx;width:180rpx;height:180rpx;background-repeat:no-repeat;background-size:cover;background-image:url('http://img.ichunt.com/images/ichunt/minProgram/4737e38d6682dd22f547de614756ab95.png');z-index:999}.certification .content .error{margin-top:64rpx;text-align:center}.certification .content .error .iconiconxiantiaoshouji1{font-size:40rpx;color:#EA1717}.certification .content .error .t1{font-size:24rpx;color:#EA1717;font-weight:400;margin-left:15rpx}.certification .content .txt{margin-top:60rpx}.certification .content .txt .mb{margin-top:24rpx;margin-bottom:60rpx}.certification .content .txt .t1{margin:0 59rpx 0 57rpx;padding:0 0 24rpx 0;color:#515559;font-size:36rpx;font-weight:600;line-height:50rpx;border-bottom:1px solid #F5F9FC;text-align:center;display:block}.certification .content .txt .t2{font-size:26rpx;color:#8A9299;font-weight:400}.certification .content .txt .t3{font-size:26rpx;color:#515559;font-weight:400}.certification .content .txt .t3.t3-mr{margin-right:123rpx}.certification .btn{margin:0 55rpx;height:98rpx;background:#0d84d1;box-shadow:0 6rpx 10rpx 0 rgba(97,160,242,0.3);border-radius:8rpx;font-size:32rpx;color:#FFFFFF;text-align:center;line-height:89rpx}.certification .btn.opac{opacity:.5}
\ No newline at end of file
......@@ -443,6 +443,34 @@
"id": -1,
"name": "pages/tab/good/good",
"pathName": "pages/tab/good/good",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/certification/addcertification/index",
"pathName": "pages/person/certification/addcertification/index",
"query": "",
"scene": null
},
{
"id": -1,
"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
},
{
"id": -1,
"name": "pages/list/signin/index",
"pathName": "pages/list/signin/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