Commit 21187fc9 by 梁建民

小程序

parent cbde107e
<!-- pages/list/signin/index.wxml --> <!-- pages/list/signin/index.wxml -->
<view class="signin-view"> <view class="signin-view">
<view class="today-topic"> <view class="today-topic">
<view class="top-line"></view> <!-- <view class="top-line"></view> -->
<view class="topic-content"> <view class="topic-content">
<view class="content-top row bothSide verCenter"> <view class="content-top row bothSide verCenter">
<text class="content-title bold">{{topicInfo.title}}</text> <text class="content-title bold">{{topicInfo.title}}</text>
......
...@@ -13,14 +13,11 @@ ...@@ -13,14 +13,11 @@
} }
.topic-content { .topic-content {
background: linear-gradient(360deg, rgba(126, 178, 246, 1) 0%, rgba(0, 133, 218, 1) 100%); background: linear-gradient(180deg, rgba(126, 178, 246, 1) 0%, rgba(0, 133, 218, 1) 100%);
border-radius: 0 0 20rpx 20rpx;
color: #fff; color: #fff;
margin: 0 24rpx; padding: 24rpx 48rpx;
padding: 24rpx;
position: relative; position: relative;
z-index: 3; z-index: 3;
transform: translateY(-16rpx)
} }
.content-top { .content-top {
...@@ -43,6 +40,7 @@ ...@@ -43,6 +40,7 @@
.topic-item { .topic-item {
padding: 0 24rpx 24rpx; padding: 0 24rpx 24rpx;
border-bottom: 10rpx solid #F5F9FC;
} }
.item-top { .item-top {
......
...@@ -39,7 +39,8 @@ Page({ ...@@ -39,7 +39,8 @@ Page({
checked: 2, checked: 2,
uploaderList: [], //图片集合 uploaderList: [], //图片集合
uploaderNum: 0, uploaderNum: 0,
showUpload: true showUpload: true,
auth_img: []
}, },
/** /**
...@@ -186,7 +187,7 @@ Page({ ...@@ -186,7 +187,7 @@ Page({
calcForm: function (val) { calcForm: function (val) {
let company_name = val.company_name; let company_name = val.company_name;
let company_type = val.company_type; let company_type = val.company_type;
let auth_img = this.data.imgSrc; let auth_img = this.data.auth_img;
if (!company_name) { if (!company_name) {
...@@ -240,17 +241,15 @@ Page({ ...@@ -240,17 +241,15 @@ Page({
let params = Object.assign({}, e.detail.value, { let params = Object.assign({}, e.detail.value, {
company_type: company_type, company_type: company_type,
auth_img: this.data.imgSrc auth_img: this.data.auth_img
}); });
http.getData(apis.addAuth, 'GET', params, (res) => { http.getData(apis.addAuth, 'GET', params, (res) => {
if (res.errcode === 0) { if (res.errcode === 0) {
wx.switchTab({ wx.navigateTo({
url: '/pages/tab/me/me', url: '/pages/person/certification/certificationmanage/index',
success: (result) => { success: (result) => {
this.setData({ this.setData({
disabled: false, disabled: false,
...@@ -286,11 +285,16 @@ Page({ ...@@ -286,11 +285,16 @@ Page({
companyTypeText: this.data.companyType[e.detail.value].name companyTypeText: this.data.companyType[e.detail.value].name
}) })
}, },
// 删除图片 /**
* 删除图片
*/
clearImg: function (e) { clearImg: function (e) {
var nowList = []; //新数据 var nowList = []; //新数据
var uploaderList = this.data.uploaderList; //原数据 var uploaderList = this.data.uploaderList; //原数据
var authlist = [];
var auth_img = this.data.auth_img; //原数据
for (let i = 0; i < uploaderList.length; i++) { for (let i = 0; i < uploaderList.length; i++) {
if (i == e.currentTarget.dataset.index) { if (i == e.currentTarget.dataset.index) {
continue; continue;
...@@ -298,13 +302,27 @@ Page({ ...@@ -298,13 +302,27 @@ Page({
nowList.push(uploaderList[i]) 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({ this.setData({
uploaderNum: this.data.uploaderNum - 1, uploaderNum: this.data.uploaderNum - 1,
uploaderList: nowList, uploaderList: nowList,
auth_img: authlist,
showUpload: true showUpload: true
}) })
}, },
//展示图片 /**
*
* 展示图片
*/
showImg: function (e) { showImg: function (e) {
var that = this; var that = this;
wx.previewImage({ wx.previewImage({
...@@ -312,13 +330,16 @@ Page({ ...@@ -312,13 +330,16 @@ Page({
current: that.data.uploaderList[e.currentTarget.dataset.index] current: that.data.uploaderList[e.currentTarget.dataset.index]
}) })
}, },
//上传图片 /**
*
* 上传图片
*/
upload: function (e) { upload: function (e) {
var that = this; var that = this;
wx.chooseImage({ wx.chooseImage({
count: 3 - that.data.uploaderNum, // 默认3 count: 5 - that.data.uploaderNum,
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有 sizeType: ['original', 'compressed'] sizeType: ['compressed'],
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 sourceType: ['album', 'camera'],
success: function (res) { success: function (res) {
console.log(res) console.log(res)
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
...@@ -329,11 +350,59 @@ Page({ ...@@ -329,11 +350,59 @@ Page({
showUpload: false showUpload: false
}) })
} }
that.setData({ that.setData({
uploaderList: uploaderList, uploaderList: uploaderList,
uploaderNum: uploaderList.length, 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 @@ ...@@ -37,15 +37,33 @@
.status { .status {
position: relative; position: relative;
.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 { .img {
width: 400rpx; width: 218rpx;
height: 400rpx; height: 218rpx;
}
}
} }
.a { .a {
position: absolute; position: absolute;
bottom: -50rpx; bottom: 148rpx;
right: 89rpx; right: 132rpx;
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -56,8 +74,8 @@ ...@@ -56,8 +74,8 @@
.b { .b {
position: absolute; position: absolute;
bottom: -50rpx; bottom: 148rpx;
right: 89rpx; right: 132rpx;
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
...@@ -68,8 +86,8 @@ ...@@ -68,8 +86,8 @@
.c { .c {
position: absolute; position: absolute;
bottom: -50rpx; bottom: 148rpx;
right: 89rpx; right: 132rpx;
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
......
...@@ -9,7 +9,11 @@ ...@@ -9,7 +9,11 @@
<view class="content"> <view class="content">
<text class="time">更新时间:{{authInfo.update_time}}</text> <text class="time">更新时间:{{authInfo.update_time}}</text>
<view class="status row verCenter rowCenter"> <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}}"> <block wx:if="{{authInfo.status === 1}}">
<text class="a"></text> <text class="a"></text>
</block> </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} .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 \ No newline at end of file
...@@ -443,6 +443,34 @@ ...@@ -443,6 +443,34 @@
"id": -1, "id": -1,
"name": "pages/tab/good/good", "name": "pages/tab/good/good",
"pathName": "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 "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