This commit is contained in:
unknown 2025-10-31 10:06:01 +08:00
parent 01467fcd2f
commit 6e2c161a70
4 changed files with 255 additions and 25 deletions

View File

@ -1,6 +1,6 @@
<template>
<view class="content2">
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="1">
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="maxCount">
<slot name="upLoadImg"></slot>
</u-upload>
</view>
@ -9,6 +9,12 @@
<script>
export default {
props:{
maxCount: {
type: Number,
default: 1
},
},
data() {
return {
fileList1: [],
@ -64,8 +70,9 @@
resolve(res.data.data);
}, 1000);
// resolve(res.data);
this.imgList= this.imgList.concat([res.data.url])
this.$emit('imgList',res.data.url);
this.imgList = this.imgList.concat([res.data.url])
this.$emit('imgList', this.imgList);
// this.$emit('imgList',res.data.url);
console.log(res.data, this.imgList, '-----------')
}else{
uni.showToast({ title: res.msg , icon: 'fail' })

View File

@ -187,4 +187,6 @@ export const priceList = (data, callback) => get('api/recover/personmoney/index'
export const uploadImg = (data, callback) => upload('api/feedback/upload', data, callback);
export const allarealist = (data, callback) => post('api/recover/area/allarealist', data, callback);
export const qrcode = (data, callback) => post('api/promotion/generate', data, callback);
export const cityarealist = (data, callback) => post('api/recover/area/cityarealist', data, callback);
export const createRecharge = (data, callback) => post('api/recover/recharge/createRecharge', data, callback);

View File

@ -38,7 +38,7 @@
<image @click="clickEye" v-if="eyeOpen" :src="path+'/assets/img/icon/eyeOpen.png'" class="img2"></image>
<image @click="clickEye" v-else :src="path+'/assets/img/icon/eyeCloese.png'" class="img3"></image>
</view>
<view class="priceBtn flex-center">充值</view>
<view class="priceBtn flex-center" @click="chargeShow = true">充值</view>
</view>
</view>
</view>
@ -176,6 +176,22 @@
</view>
</view>
</u-popup>
<u-popup :show="chargeShow" mode="center" @close="close" @open="open" :round="10">
<view class="passwordBox">
<view class="flex-between">
<text class="text2">充值</text>
<u-icon name="close" color="#333333" size="18" @click="chargeShow = false"></u-icon>
</view>
<view class="passwordView flex-between">
<text class="text1">充值金额:</text>
<input v-model="chargeNum" type="number" class="input1" placeholder="请输入充值金额" />
</view>
<view class="flex-center" style="margin-top: 50rpx;">
<view class="cancleBtn flex-center" @click="chargeShow = false">取消</view>
<view class="confirmBtn flex-center" @click="createRecharge" style="margin-left: 30rpx;">确定</view>
</view>
</view>
</u-popup>
<!-- <view class="fuwu mainwidth2">
<view class="h3-title fsz32">
我的服务
@ -285,7 +301,9 @@
shareShow: false,
path: this.path,
passwordShow: false,
eyeOpen: false
eyeOpen: false,
chargeShow: true,
chargeNum: ''
}
},
components:{
@ -316,6 +334,21 @@
},
methods: {
createRecharge(){
console.log(this.person)
let data = {
amount: Number(this.chargeNum),
person_id: this.person.id
}
this.$api.createRecharge(data,res=>{
if(res.code == '1'){
// this.typelist = res.data.type
uni.showToast({ title: "充值成功" , icon: 'success' })
}else{
uni.showToast({ title: res.msg, icon: 'none' })
}
})
},
clickEye(){
this.eyeOpen = !this.eyeOpen
},
@ -897,5 +930,23 @@ button::after{
font-size: 30rpx;
}
}
}
}
.cancleBtn{
width: 260rpx;
height: 90rpx;
background: #F2F2F2;
border-radius: 45rpx;
font-weight: 500;
font-size: 28rpx;
color: #444444;
}
.confirmBtn{
width: 260rpx;
height: 90rpx;
background: #FB8F0C;
border-radius: 45rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
}
</style>

View File

@ -7,7 +7,7 @@
<view class='hs-list-hd'>
人身保险
</view>
<view class='hs-row-ft flex-center'>
<view class='hs-row-ft flex-center' @click="uploadClick('人身保险',1)">
<text class="rightText" v-if="userinfo.personal_insurance">已上传</text>
<view class="rightText2">待上传</view>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
@ -17,7 +17,7 @@
<view class='hs-list-hd'>
健康证
</view>
<view class='hs-row-ft flex-center'>
<view class='hs-row-ft flex-center' @click="uploadClick('健康证',2)">
<text class="rightText" v-if="userinfo.health_certificate">已上传</text>
<view class="rightText2">待上传</view>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
@ -29,8 +29,8 @@
<view class='hs-list-hd'>
服务区域
</view>
<view class='hs-row-ft flex-center'>
<text class="rightText">建邺区</text>
<view class='hs-row-ft flex-center' @click="showArea = true">
<text class="rightText">{{areaText}}</text>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
</view>
</view>
@ -38,8 +38,12 @@
<view class='hs-list-hd'>
回收分类
</view>
<view class='hs-row-ft flex-center'>
<text class="rightText">电视回收数码回收等<text class="colorText">3</text></text>
<view class='hs-row-ft flex-center' @click="showType = true">
<text class="rightText">
{{userinfo.typeText}}
<!-- 电视回收数码回收等 -->
<text class="colorText">{{userinfo.typeLength}}</text>
</text>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
</view>
</view>
@ -51,32 +55,32 @@
<view class='hs-list flex-between'>
<view class='hs-list-hd' style="width: 180px;">高空作业证</view>
<view class='hs-list-na flex-center'>
<view class='hs-list-na flex-center' @click="uploadClick('高空作业证',4)">
<view class="rightText" v-if="userinfo.high_altitude_certificate">>已上传</view>
<view class="rightText2">待上传</view>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
</view>
</view>
<view class='hs-list flex-between' @click="linkDetail('about')">
<view class='hs-list flex-between'>
<view class='hs-list-hd' style="width: 180px;">电工证</view>
<view class='hs-row-ft flex-center'>
<view class='hs-row-ft flex-center' @click="uploadClick('电工证',5)">
<!-- <text class="rightText">已上传</text> -->
<view class="rightText" v-if="userinfo.electrician_certificate">已上传</view>
<view class="rightText2">待上传</view>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
</view>
</view>
<view class='hs-list flex-between' @click="linkDetail('userProt')">
<view class='hs-list flex-between'>
<view class='hs-list-hd' style="width: 180px;">焊工证</view>
<view class='hs-row-ft flex-center'>
<view class='hs-row-ft flex-center' @click="uploadClick('焊工证',6)">
<text class="rightText" v-if="userinfo.welder_certificate">已上传</text>
<view class="rightText2">待上传</view>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
</view>
</view>
<view class='hs-list flex-between' @click="linkDetail('privacy')">
<view class='hs-list flex-between'>
<view class='hs-list-hd' style="width: 180px;">绿色回收认证证书</view>
<view class='hs-row-ft flex-center'>
<view class='hs-row-ft flex-center' @click="uploadClick('绿色回收认证证书',7)">
<text class="rightText" v-if="userinfo.green_recycle_certificate">已上传</text>
<view class="rightText2">待上传</view>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
@ -153,11 +157,49 @@
</view>
</view>
</view>
<!-- <u-popup :show="show" mode="top" @close="close" @open="open">
<view>
<text>人生若只如初见何事秋风悲画扇</text>
<u-popup :show="showUpload" mode="center" :round="10">
<view style="padding: 30rpx;width: 600rpx;">
<view class="flex-between" style="margin-bottom: 0rpx;">
<!-- <text>{{poptitle}}上传</text> -->
<text></text>
<u-icon @click="showUpload = false" name="close" color="#282F38" size="16" style="margin-left: 19rpx;"></u-icon>
</view>
<view class="uploadTitle">{{poptitle}}上传</view>
<commonUpload @imgList="imgList" :maxCount='9'></commonUpload>
<view class="flex-between" style="margin-top: 20rpx;">
<view class="cancleBtn flex-center" @click="showUpload = false">取消</view>
<view class="confirmBtn flex-center">确定</view>
</view>
</view>
</u-popup> -->
</u-popup>
<u-popup :show="showType" mode="bottom" :round="10">
<view style="padding: 30rpx;">
<view class="flex-between" style="margin-bottom: 30rpx;">
<!-- <text>{{poptitle}}上传</text> -->
<view class="uploadTitle" style="margin-bottom: 0;">选择回收类型</view>
<u-icon @click="showType = false" name="close" color="#282F38" size="16" style="margin-left: 19rpx;"></u-icon>
</view>
<u-checkbox-group
v-model="checkType"
placement="column"
@change="checkboxChange"
>
<u-checkbox
:customStyle="{marginBottom: '8px'}"
v-for="(item, index) in typelist"
:key="index"
:label="item.name"
:name="item.id"
>
</u-checkbox>
</u-checkbox-group>
<view class="flex-center" style="margin-top: 20rpx;">
<view class="cancleBtn flex-center" @click="showType = false">取消</view>
<view class="confirmBtn flex-center" style="margin-left: 30rpx;">确定</view>
</view>
</view>
</u-popup>
<u-picker :show="showArea" :defaultIndex="[areaIndex]" :columns="[areaList]" keyName="name" @cancel="showArea=false" @confirm="confirmArea"></u-picker>
<view style="height: 20rpx;"></view>
<view class="button-bottom">
<button class="btn btn-success" @click="checkPassword()" >保存</button>
@ -167,6 +209,7 @@
<script>
import commonUpload from '@/components/commonUpload.vue'
export default {
data() {
return {
@ -177,15 +220,33 @@
isConfigPassword: false,
yuanPassword: '',
pay_password: '',
rePassword: ''
rePassword: '',
areaList: [],
showArea: false,
showUpload: false,
showType: false,
areaIndex: 0,
typelist: [],
poptitle: '',
checkType: [],
areaText: '',
areaId: '',
personal_insurance: '', // | |
health_certificate: '', // | |
high_altitude_certificate: '', // | |
electrician_certificate: '', // | |
welder_certificate: '', // | |
green_recycle_certificate: '' // | 绿 |
}
},
components:{
commonUpload
},
onLoad() {
this.userinfo = uni.getStorageSync('userInfo');
// this.getAgreement()
this.checkPayPassword()
this.getdata()
},
onShow() {
var token = uni.getStorageSync('userToken');
@ -195,6 +256,72 @@
this.getauth()
},
methods: {
checkboxChange(res) {
// setTimeout(()=>{
// console.log(res,this.checkType,'gggg')
// },2000)
console.log(res,this.checkType,'gggg')
},
getdata(){
let data = {
}
this.$api.indexpage(data,res=>{
if(res.code == '1'){
this.typelist = res.data.type
}
})
},
confirmArea(val,i){
console.log(val.value[0],i)
this.areaId = val.value[0].id;
this.areaText = val.value[0].name;
this.areaList.some((item,index)=>{
if(item.id == this.areaId){
this.areaIndex = index;
}
})
// let view = this.areaList.find(ele=> ele.id == this.areaId);
// console.log(view,'gggg',this.areaIndex)
this.showArea = false
},
selectArea(){
console.log(this.userinfo)
var _this = this;
_this.$api.cityarealist({
pid: this.userinfo.city_id
},res=>{
if(res.code == '1'){
console.log(res.data)
this.areaList = res.data
res.data.some((item,index)=>{
if(item.id == _this.userinfo.area_id){
_this.areaIndex = index;
console.log(index,'====')
}
})
// uni.showToast({ title: res.msg , icon: 'success' })
}
})
},
uploadClick(val, type){
this.showUpload = true;
this.poptitle = val
},
imgList(list){
console.log(list,'jjj')
},
deelData(data){
let str = ''
data.some((item,index)=>{
if(index==0){
str += item
} else if(index<2){
str += ',' + item
}
})
return str+'等'
},
checkPayPassword(){
var _this = this;
_this.$api.checkPayPassword({},res=>{
@ -232,8 +359,17 @@
let data = {
realname: this.userinfo.nickname,
mobile: this.userinfo.mobile,
pay_password: this.pay_password
pay_password: this.pay_password,
area_id: this.areaId,
type_ids: this.checkType.join(","),
personal_insurance: this.personal_insurance, // | |
health_certificate: this.health_certificate, // | |
high_altitude_certificate: this.high_altitude_certificate, // | |
electrician_certificate: this.electrician_certificate, // | |
welder_certificate: this.welder_certificate, // | |
green_recycle_certificate: this.green_recycle_certificate // | 绿 |
}
console.log('data',data)
_this.$api.editperson(data,res=>{
if(res.code == '1'){
console.log(res.data)
@ -290,7 +426,18 @@
// }
// _this.nickname = res.data.user.nickname
// _this.userinfo = res.data.user
res.data.person.typeText = this.deelData(res.data.person.type_ids_show)
res.data.person.typeLength = res.data.person.type_ids_show.length
_this.userinfo = res.data.person
_this.areaId = res.data.person.area_id
_this.areaText = res.data.person.area_ids_show
_this.checkType = []
let arr = res.data.person.type_ids.split(',')
arr.some((item,index)=>{
_this.checkType.push(Number(item))
})
_this.selectArea();
console.log(_this.userinfo,'hhhhhh')
}else{
}
})
@ -477,4 +624,27 @@
.btn-success{
background: linear-gradient(90deg, #FFAD38 0%, #FF884E 100%);
}
.cancleBtn{
width: 260rpx;
height: 90rpx;
background: #F2F2F2;
border-radius: 45rpx;
font-weight: 500;
font-size: 28rpx;
color: #444444;
}
.confirmBtn{
width: 260rpx;
height: 90rpx;
background: #FB8F0C;
border-radius: 45rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
}
.uploadTitle{
margin-bottom: 30rpx;
font-size: 33rpx;
font-weight: 600;
}
</style>