作者 王智

bug

... ... @@ -7,7 +7,8 @@ Page({
*/
data: {
id:'',
list:''
list:'',
shi:''
},
... ... @@ -24,7 +25,10 @@ Page({
}
app.post(url,d, head).then((res) => {
console.log(res)
let shi = res.content
shi = shi.replace(/\<img/gi, '<img style="width:100%;height:auto" ')
that.setData({
shi: shi,
list: res
})
... ... @@ -33,8 +37,6 @@ Page({
})
},
getshengqin(e) {
var id =e.currentTarget.dataset.id
console.log(e)
... ...
... ... @@ -17,7 +17,7 @@
<view bindtap="getadd">详情介绍</view>
<view class="goods_line"></view>
</view>
<rich-text nodes="{{list.content}}"></rich-text>
<rich-text nodes="{{shi}}"></rich-text>
<view class="shengqin">
<button wx:if="{{list.user_status ==0}}">未审核</button>
... ...
const app =getApp()
const app = getApp()
Page({
/**
... ... @@ -6,6 +6,7 @@ Page({
*/
data: {
list: '',
active: ''
},
... ... @@ -22,11 +23,11 @@ Page({
onShow: function () {
let that = this
that.getactive()
that.getList()
},
getactive() {
getList() {
let that = this;
let url = '/index/second/zhengJianInfo ';
let head = {
... ... @@ -45,12 +46,65 @@ Page({
},
// 生成图片
getPic(e) {
console.log(e)
var type = e.currentTarget.dataset.type
let that = this;
let url = '/index/second/zhengJianPic ';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
type: type
}
app.post(url, params, head).then((res) => {
console.log(res)
// this.setData({
// active: res.url
// })
wx.downloadFile({
url: res.url,
success: (res) => {
wx.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: (r) => {
wx.showToast({
title: '保存成功',
mask: true,
duration: 1000
})
}
})
}
})
})
},
//保存海报到本地
// save_poster() {
// wx.downloadFile({
// url: this.data.active,
// success: (res) => {
// wx.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success: (r) => {
// wx.showToast({
// title: '保存成功',
// mask: true,
// duration: 1000
// })
// }
// })
// }
// })
// },
... ...
<!-- 电子证件 -->
<view class="mycertificate">
<image src="/imgs/dianzizhengjian1.png"></image>
<image wx:if="{{list.status=='志愿者(待学习)'}}" src="http://volunteer.w.bronet.cn/imgs/idcard2.png"></image>
<image wx:else src="/imgs/dianzizhengjian1.png"></image>
<view class="mycertificate_text">
<view class="goods_left">
<view>姓名:{{list.name}}</view>
... ... @@ -13,7 +14,9 @@
</view>
<view class="mycertificate distance">
<image src="/imgs/dianzizhengjian.png"></image>
<image wx:if="{{list.status=='志愿者(待学习)'}}" src="http://volunteer.w.bronet.cn/imgs/idcard1.png"></image>
<image wx:else src="/imgs/dianzizhengjian.png"></image>
<view class="mycertificate_text">
<view class="goods_lefts">
<image class="logo" src="https://ftp.bmp.ovh/imgs/2020/10/6ce74d64f7aa1e53.png"></image>
... ... @@ -34,6 +37,8 @@
<view class="good_typeface">4. 如实体证件丢失请及时联系白求恩志愿者中心补办</view>
</view>
<view class="btn">
<button hover-class="none"> 将电子证件生成图片</button>
<view class="btn" wx:if="{{list.status!=='志愿者(待学习)'}}">
<!-- <button hover-class="none"> 将电子证件生成图片</button> -->
<view class="generate" bindtap="getPic" data-type="{{1}}">生成正面图片</view>
<view class="generate" bindtap="getPic" data-type="{{2}}">生成背面图片</view>
</view>
\ No newline at end of file
... ...
... ... @@ -9,8 +9,9 @@ page {
position: relative;
}
.distance{
margin-bottom: 142rpx;
.distance {
margin-bottom: 260rpx;
}
image {
... ... @@ -29,7 +30,6 @@ image {
left: 0;
top: 0;
display: flex;
justify-content: space-between;
... ... @@ -95,22 +95,26 @@ image {
}
.btn {
height: 122rpx;
padding-top: 21rpx;
height: 240rpx;
background-color: #ffffff;
display: flex;
align-items: center;
box-sizing: border-box;
/* display: flex; */
/* align-items: center; */
position: fixed;
left: 0;
right: 0;
bottom: 0;
}
button {
width: 622rpx;
.generate {
margin-bottom: 21rpx;
width: 100%;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
border-radius: 44px;
/* border-radius: 44px; */
color: #ffffff;
box-shadow: 0px 18px 38px 0px rgba(0, 116, 45, 0.42);
/* box-shadow: 0px 18px 38px 0px rgba(0, 116, 45, 0.42); */
}
\ No newline at end of file
... ...
... ... @@ -31,7 +31,6 @@ page {
.navbar .item.choose {
color: black;
/* background: linear-gradient(136deg, #4e8fff 2%, #55c2fa); */
}
.navbar .item.choose:after {
... ... @@ -79,16 +78,16 @@ page {
color: #323233;
line-height: 40rpx;
}
.list_real{
.list_real {
height: 80rpx;
font-size: 28rpx;
font-family: PingFangSC, PingFangSC-Regular;
font-weight: 400;
color: #7D7E80;
color: #7D7E80;
}
.list_status{
.list_status {
text-align: right;
color: #21AE58;
font-size: 32rpx;
... ...