achao 2 anni fa
parent
commit
16bbe40b11

+ 46 - 0
xiaochengxu/js_sdk/share.js

@@ -0,0 +1,46 @@
+export default {
+	data() {
+		return {
+
+		}
+	},
+	onLoad: function() {
+		wx.showShareMenu({
+			withShareTicket: true,
+			menus: ["shareAppMessage", "shareTimeline"]
+		})
+	},
+	onShareAppMessage(res) {
+		debugger
+		let that = this;
+		let imageUrl = that.shareUrl || '';
+		if (res.from === 'button') {
+		//这块需要传参,不然链接地址进去获取不到数据
+			let path = `/` + that.$scope.route + `?item=` + that.$scope.options.item;
+			return {
+				title: '商品分享~',
+				path: path,
+				imageUrl: imageUrl
+			};
+		}
+		// if (res.from === 'menu') {
+		// 	return {
+		// 		title: '商通线上商城',
+		// 		path: '/pages/tabBarPro/index/index',
+		// 		imageUrl: imageUrl
+		// 	};
+		// }
+	},
+	// 分享到朋友圈
+	onShareTimeline() {
+		return {
+			title: '商通线上商城',
+			path: '/pages/index/index',
+			imageUrl: 'https://cdn.uviewui.com/uview/swiper/1.jpg'
+		};
+	},
+	methods: {
+
+	}
+}
+

+ 2 - 0
xiaochengxu/main.js

@@ -9,6 +9,8 @@ import helper from '@/common/helper.js'
 import WXBizDataCrypt from '@/util/WXBizDataCrypt.js'
 import uView from '@/uni_modules/uview-ui'
 import store from './store'
+import share from '@/js_sdk/share.js'
+Vue.mixin(share)
 Vue.use(uView)
 import {parseTime} from '@/util/util'
 Vue.prototype.$request = request

+ 7 - 8
xiaochengxu/pages/mySet/cardType.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<mescroll-body  :up="upOption" ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback">
+		<mescroll-body  ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback">
 			<u-list @scrolltolower="scrolltolower">
 				<u-list-item  v-for='item in cardTypeList'>
 					<view class='flex'>
@@ -43,13 +43,7 @@
 				cardTypeList:[],
 				cardTypeData:{},
 				userInfo:{},
-				upOption:{
-					page:{
-					  num : 0 ,
-					  size : 10 ,
-					  time : null
-					} 
-				}
+				canReset:false,
 				
 			};
 		},
@@ -60,6 +54,11 @@
 		onShow() {
 			this.userInfo = uni.getStorageSync("userInfo")
 			this.cardTypeData.commonId=uni.getStorageSync("userInfo").id
+			this.$nextTick(function() {
+				this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页  
+				this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题  
+				this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
+			});
 		},
 		methods: {
 			mescrollInit(){

+ 263 - 279
xiaochengxu/pages/mySet/myCard.vue

@@ -1,205 +1,171 @@
 <template>
 	<view>
 		<view>
-			 <u-navbar placeholder
-			            title="我的证件"
-			           @leftClick="leftClick"
-			        >
-			        </u-navbar>
-				<view class="flex">
-			<!-- <view :style="{'margin-top':navHeight  +'px'}" class="flex"> -->
+			<u-navbar placeholder title="我的证件" @leftClick="leftClick">
+			</u-navbar>
+			<view class="flex">
+				<!-- <view :style="{'margin-top':navHeight  +'px'}" class="flex"> -->
 				<view @click='addclick' class="button">新增</view>
 				<view @click='share' class="button">分享</view>
 				<!-- <button ref='share' open-type="share" class="button">分享</button> -->
 				<view @click='imageOCR' class="button">识别号码</view>
 			</view>
-			
-			
-			<mescroll-body v-if='!addstatus&&cardList.length==0||cardList.length>0' :up="upOption" ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback">
+
+
+			<mescroll-body v-if='!addstatus&&cardList.length==0||cardList.length>0' ref="mescrollRef"
+				@init="mescrollInit" @up="upCallback" @down="downCallback">
 				<view v-if='cardList.length>0' class="">
-				<view v-for='(item,index) in cardList' class="">
-					<view v-if='!item.editstatus'>
-					{{item.certificateName}}  
-					<text v-if='item.personNo'>({{item.personNo1}})</text>
-					<u-icon v-if='item.personNo' @click='clip(0,item)' name="file-text-fill" color="#2979ff" size="28"></u-icon>
-					<text v-if='item.bankNo'>({{item.bankNo1}})</text>
-					<u-icon v-if='item.bankNo' @click='clip(1,item)' name="file-text-fill" color="#2979ff" size="28"></u-icon>
-				</view>
-					<u--input v-else
-					v-model="item.certificateName"
-					placeholder="输入证件名称"
-					border="none"
-					
-					></u--input>
-					<view @click='edit(item)'>{{!item.editstatus?'编辑':'完成'}}</view>
-					 <u-checkbox-group
-					    v-model="item.checked"
-					    placement="column"
-					    @change="checkboxChange($event,index,item)">
-					    <u-checkbox :name='index+1' :customStyle="{marginBottom: '8px'}" >
-					    </u-checkbox>
-					</u-checkbox-group>
-					
-					<image v-if='!item.editstatus' :src="item.certificateImage" mode=""></image>
-					<u-upload
-					v-else
-							@afterRead="afterRead"
-							:fileList="fileList2"
-							@delete="deletePic"
-							name="2"
-							multiple
-							:maxCount="1"
-						></u-upload>
-					<u-icon @click="del(item)" name="trash-fill" color="#2979ff" size="28"></u-icon>
+					<view v-for='(item,index) in cardList' class="">
+						<view v-if='!item.editstatus'>
+							{{item.certificateName}}
+							<text v-if='item.personNo'>({{item.personNo1}})</text>
+							<u-icon v-if='item.personNo' @click='clip(0,item)' name="file-text-fill" color="#2979ff"
+								size="28"></u-icon>
+							<text v-if='item.bankNo'>({{item.bankNo1}})</text>
+							<u-icon v-if='item.bankNo' @click='clip(1,item)' name="file-text-fill" color="#2979ff"
+								size="28"></u-icon>
+						</view>
+						<u--input v-else v-model="item.certificateName" placeholder="输入证件名称" border="none"></u--input>
+						<view @click='edit(item)'>{{!item.editstatus?'编辑':'完成'}}</view>
+						<u-checkbox-group v-model="item.checked" placement="column"
+							@change="checkboxChange($event,index,item)">
+							<u-checkbox :name='index+1' :customStyle="{marginBottom: '8px'}">
+							</u-checkbox>
+						</u-checkbox-group>
+
+						<image v-if='!item.editstatus' :src="item.certificateImage" mode=""></image>
+						<u-upload v-else @afterRead="afterRead" :fileList="fileList2" @delete="deletePic" name="2"
+							multiple :maxCount="1"></u-upload>
+						<u-icon @click="del(item)" name="trash-fill" color="#2979ff" size="28"></u-icon>
+					</view>
+					<view></view>
 				</view>
-				<view></view>
-			</view>
 			</mescroll-body>
 			<view v-if='addstatus' class="">
 				<view class="">
-					<u--input
-					v-model="cardData.certificateName"
-					placeholder="输入证件名称"
-					border="none"
-					
-					></u--input>
+					<u--input v-model="cardData.certificateName" placeholder="输入证件名称" border="none"></u--input>
 				</view>
 				<view @click='add'>提交</view>
 				<view>
-					<u-upload
-							@afterRead="afterRead"
-							:fileList="fileList1"
-							@delete="deletePic"
-							name="1"
-							multiple
-							:maxCount="1"
-						></u-upload>
+					<u-upload @afterRead="afterRead" :fileList="fileList1" @delete="deletePic" name="1" multiple
+						:maxCount="1"></u-upload>
 				</view>
 			</view>
 		</view>
-		
+
 		<u-picker @cancel='show=false' @confirm='pickerConfirm' title='识别类型' :show="show" :columns="columns"></u-picker>
-		<u-popup :show="popupshow" mode="bottom"  >
-		    <view>
-		    	<view class="share-to">
-		    		<text>分享到</text>
-		    	</view>
-		    	<view class="content">
-		    		<view class="block">
+		<u-popup :show="popupshow" mode="bottom">
+			<view>
+				<view class="share-to">
+					<text>分享到</text>
+				</view>
+				<view class="content">
+					<view class="block">
 						<button class="wechat" open-type="share">
 							<text class="iconfont icon-pengyouquan"></text>
-		    				<!-- <image src="/static/img/wechat.png" mode="aspectFill"></image> -->
-		    				<text>微信</text>
+							<!-- <image src="/static/img/wechat.png" mode="aspectFill"></image> -->
+							<button class="shareBtn" type="default" data-name="shareBtn">
+								分享微信</button>
 						</button>
-		    		</view>
-		    		<view class="block" @click="toUrl()">
-		    			<button class="moment">
+					</view>
+					<view class="block" @click="toUrl()">
+						<button class="moment">
 							<text class="iconfont icon-weixin"></text>
 							<!-- <image src="/static/img/moment.png" mode="aspectFill"></image>					 -->
-		    				<text>朋友圈</text>
+							<text>朋友圈</text>
 						</button>
-		    		</view>
-		    	</view>
-		    	<view class="cancel" @click.stop="handleHiddenShare">
-		    		<text>取消</text>
-		    	</view>
-		    </view>
+					</view>
+				</view>
+				<view class="cancel" @click.stop="handleHiddenShare">
+					<text>取消</text>
+				</view>
+			</view>
 		</u-popup>
-		<u-modal @cancel='modalshow=false' confirmText='删除' showCancelButton='true' @confirm='delConfirm' :show="modalshow" title="提示" content='确定删除证件?'></u-modal>
-		<u-modal @cancel='credentialscancel' cancelText='重新识别'  confirmText='确认号码' showCancelButton='true' @confirm='credentialsConfirm' :show="credentialsShow" title="提示" >
+		<u-modal @cancel='modalshow=false' confirmText='删除' showCancelButton='true' @confirm='delConfirm'
+			:show="modalshow" title="提示" content='确定删除证件?'></u-modal>
+		<u-modal @cancel='credentialscancel' cancelText='重新识别' confirmText='确认号码' showCancelButton='true'
+			@confirm='credentialsConfirm' :show="credentialsShow" title="提示">
 			<view class="slot-content">
 				证件号码
-				<u--input
-				v-if='shibie=="识别身份证号"'
-				v-model="credentials.recPersonNo"
-				placeholder="输入证件名称"
-				border="none"
-				></u--input>
-				<u--input
-				v-if='shibie=="识别银行卡号"'
-				v-model="credentials.bankNo"
-				placeholder="输入证件名称"
-				border="none"
-				></u--input>
+				<u--input v-if='shibie=="识别身份证号"' v-model="credentials.recPersonNo" placeholder="输入证件名称"
+					border="none"></u--input>
+				<u--input v-if='shibie=="识别银行卡号"' v-model="credentials.bankNo" placeholder="输入证件名称"
+					border="none"></u--input>
 			</view>
 		</u-modal>
-		<u-modal :show="modalstatusshow" confirmText='继续返回'  cancelText='取消' @confirm='confirm' @cancel='cancel' showCancelButton='true' title="提示" content='有证件处于编辑状态未提交。'></u-modal>
+		<u-modal :show="modalstatusshow" confirmText='继续返回' cancelText='取消' @confirm='confirm' @cancel='cancel'
+			showCancelButton='true' title="提示" content='有证件处于编辑状态未提交。'></u-modal>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
 <script>
-	import uploadImage from '@/components/ossutil/uploadFile.js'; 
+	import uploadImage from '@/components/ossutil/uploadFile.js';
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin],
-		
+
 		data() {
 			return {
-				show:false,
-				modalshow:false,
-				modalstatusshow:false,
-				popupshow:false,
-				columns:[['识别身份证号','识别银行卡号']],
-				userInfo:{},
-				cardData:{},
-				cardList:[],
-				fileList1:[],
-				fileList2:[],
-				checkedList:[],
-				addstatus:false,
-				id:'',
-				credentialsShow:false,
-				credentials:{},
-				shibie:'',
-				shibieList:[]
+				show: false,
+				modalshow: false,
+				modalstatusshow: false,
+				popupshow: false,
+				columns: [
+					['识别身份证号', '识别银行卡号']
+				],
+				userInfo: {},
+				cardData: {},
+				cardList: [],
+				fileList1: [],
+				fileList2: [],
+				checkedList: [],
+				addstatus: false,
+				id: '',
+				credentialsShow: false,
+				credentials: {},
+				shibie: '',
+				shibieList: [],
+				canReset: false
 			};
 		},
 		onLoad() {
-			
-				// this.getList()
+
+			// this.getList()
 		},
 		onShow() {
 			this.userInfo = uni.getStorageSync("userInfo")
-			this.cardData.commonId=uni.getStorageSync("userInfo").id
+			this.cardData.commonId = uni.getStorageSync("userInfo").id
+			this.$nextTick(function() {
+				this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页  
+				this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题  
+				this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
+			});
 		},
-		// onShareAppMessage(res) {
-		// 	console.log(res,111111111111)
-		// 	return {
-		// 	    title: '页面分享的标题',
-		// 	    path: '/pages/mySet/lookCard',
-		// 		imageUrl: '/static/imgs/mylogo.png'
-		// 	}
-		// },
-
-		// onShareTimeline() {
-		// 	return {
-		// 		title: '商通线上商城',
-		// 		path: '/pages/index/index',
-		// 		imageUrl: 'https://cdn.uviewui.com/uview/swiper/1.jpg'
-		// 	};
-		// },
 		methods: {
-			clip(status,item){
+			clip(status, item) {
 				uni.setClipboardData({
-				    data: status==1?item.bankNo:item.personNo, // e是你要保存的内容
-				    success: function () {
+					data: status == 1 ? item.bankNo : item.personNo, // e是你要保存的内容
+					success: function() {
 						uni.showToast({
-							title:'复制成功',
-							icon:'none'
+							title: '复制成功',
+							icon: 'none'
 						})
-				    }
+					}
 				})
 			},
 			toUrl() {
-				uni.navigateTo({
-					url: '/pages/share/poster?carId=' + this.carInfo.car_id,
-				})
-				this.handleHiddenShare()
+				// this.carInfo.car_id
+				// uni.navigateTo({
+				// 	url: '/pages/mySet/lookCard',
+				// })
+				// this.handleHiddenShare()
 			},
-			edit(item){
-				if(item.editstatus){
-					this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'update',{certificateManagementInfo:JSON.stringify(item)}, failres => {
+			edit(item) {
+				if (item.editstatus) {
+					this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'update', {
+						certificateManagementInfo: JSON.stringify(item)
+					}, failres => {
 						console.log('res+++++', failres.errmsg)
 						this.$refs.uToast.show({
 							type: 'error',
@@ -211,19 +177,23 @@
 							type: 'success',
 							message: '编辑成功',
 						})
-						this.modalshow=false
-						this.checkedList=[]
+						this.modalshow = false
+						this.checkedList = []
 						uni.hideLoading()
-						this.mescroll.resetUpScroll( )
+						this.mescroll.resetUpScroll()
 					})
-				}else{
-					item.editstatus=true
-					this.fileList2=[{url:item.certificateImage}]
+				} else {
+					item.editstatus = true
+					this.fileList2 = [{
+						url: item.certificateImage
+					}]
 				}
-				
+
 			},
-			delConfirm(){
-				this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'delete',{id:this.id}, failres => {
+			delConfirm() {
+				this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'delete', {
+					id: this.id
+				}, failres => {
 					console.log('res+++++', failres.errmsg)
 					this.$refs.uToast.show({
 						type: 'error',
@@ -235,30 +205,33 @@
 						type: 'success',
 						message: '删除成功',
 					})
-					this.modalshow=false
-					this.checkedList=[]
+					this.modalshow = false
+					this.checkedList = []
 					uni.hideLoading()
-					this.mescroll.resetUpScroll( )
+					this.mescroll.resetUpScroll()
 				})
 			},
-			pickerConfirm(e){
-				this.show=false
+			pickerConfirm(e) {
+				this.show = false
 				console.log(e)
 				uni.showLoading({
-						title: '数据加载中',
-						mask:true
-					})
-				var type='',type1=''
-				this.shibie=e.value[0]
-				this.shibieList=JSON.parse(JSON.stringify(this.cardList[this.checkedList[0]]))
-				if(e.value[0]=='识别身份证号'){
-					type='admin.unimall.certificateManagementInfo'
-					type1='personShibie'
-				}else if(e.value[0]=='识别银行卡号'){
-					type='admin.unimall.certificateManagementInfo'
-					type1='bankShibie'
+					title: '数据加载中',
+					mask: true
+				})
+				var type = '',
+					type1 = ''
+				this.shibie = e.value[0]
+				this.shibieList = JSON.parse(JSON.stringify(this.cardList[this.checkedList[0]]))
+				if (e.value[0] == '识别身份证号') {
+					type = 'admin.unimall.certificateManagementInfo'
+					type1 = 'personShibie'
+				} else if (e.value[0] == '识别银行卡号') {
+					type = 'admin.unimall.certificateManagementInfo'
+					type1 = 'bankShibie'
 				}
-				this.$request.baseRequest(type, type1,{certificateImage:this.cardList[this.checkedList[0]].certificateImage}, failres => {
+				this.$request.baseRequest(type, type1, {
+					certificateImage: this.cardList[this.checkedList[0]].certificateImage
+				}, failres => {
 					console.log('res+++++', failres.errmsg)
 					this.$refs.uToast.show({
 						type: 'error',
@@ -272,17 +245,19 @@
 						message: '识别成功',
 					})
 					uni.hideLoading()
-					this.credentials=res.data
-					this.credentialsShow=true
+					this.credentials = res.data
+					this.credentialsShow = true
 				})
 			},
-			checkboxChange(e,i){
-				console.log(e[0],i)
-				if(e[0]){
+			checkboxChange(e, i) {
+				console.log(e[0], i)
+				if (e[0]) {
 					this.checkedList.push(i)
-				}else{
-					var index=this.checkedList.findIndex((item)=>{return item==i})
-					this.checkedList.splice(index,1)
+				} else {
+					var index = this.checkedList.findIndex((item) => {
+						return item == i
+					})
+					this.checkedList.splice(index, 1)
 				}
 				// for(var i=0;i<this.cardList.length;i++){
 				// 	console.log(this.cardList[i].checked)
@@ -292,40 +267,41 @@
 				// }
 				console.log(this.checkedList)
 			},
-			share(){
-				if(this.checkedList.length==0){
+			share() {
+				if (this.checkedList.length == 0) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: '请勾选想要识别的证件!',
 					})
 					return
 				}
-				this.popupshow=true
+				this.popupshow = true
 			},
-			imageOCR(){
-				console.log(this.cardList,this.checkedList)
-				if(this.checkedList.length==0){
+			imageOCR() {
+				console.log(this.cardList, this.checkedList)
+				if (this.checkedList.length == 0) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: '请勾选想要识别的证件!',
 					})
 					return
 				}
-				if(this.checkedList.length>1){
+				if (this.checkedList.length > 1) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: '一次只能勾选一张证件!',
 					})
 					return
 				}
-				this.show=true
+				this.show = true
 			},
-			credentialsConfirm(){
-				var type='',type1=''
-				if(this.shibie=='识别身份证号'){
-					this.shibieList.personNo=this.credentials.recPersonNo
-				}else if(this.shibie=='识别银行卡号'){
-					this.shibieList.bankNo=this.credentials.bankNo
+			credentialsConfirm() {
+				var type = '',
+					type1 = ''
+				if (this.shibie == '识别身份证号') {
+					this.shibieList.personNo = this.credentials.recPersonNo
+				} else if (this.shibie == '识别银行卡号') {
+					this.shibieList.bankNo = this.credentials.bankNo
 				}
 				// if(this.shibie=='识别身份证号'){
 				// 	type='admin.unimall.certificateManagementInfo'
@@ -335,7 +311,9 @@
 				// 	type1='bankShibie'
 				// }
 
-				this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'update',{certificateManagementInfo:JSON.stringify(this.shibieList)}, failres => {
+				this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'update', {
+					certificateManagementInfo: JSON.stringify(this.shibieList)
+				}, failres => {
 					console.log('res+++++', failres.errmsg)
 					this.$refs.uToast.show({
 						type: 'error',
@@ -347,35 +325,35 @@
 						type: 'success',
 						message: '编辑成功',
 					})
-					this.credentialsShow=false
-					this.checkedList=[]
+					this.credentialsShow = false
+					this.checkedList = []
 					uni.hideLoading()
-					this.mescroll.resetUpScroll( )
+					this.mescroll.resetUpScroll()
 				})
 			},
-			confirm(){
+			confirm() {
 				uni.navigateBack()
 			},
-			cancel(){
-				this.modalstatusshow=false
+			cancel() {
+				this.modalstatusshow = false
 			},
-			leftClick(){
-				if(this.cardData.certificateImage){
+			leftClick() {
+				if (this.cardData.certificateImage) {
 					console.log(22222)
-					this.modalstatusshow=true
-				}else{
+					this.modalstatusshow = true
+				} else {
 					uni.navigateBack()
 				}
 			},
-			del(item){
-				this.modalshow=true
-				this.id=item.id
+			del(item) {
+				this.modalshow = true
+				this.id = item.id
 			},
-			addclick(){
-				this.addstatus=true
+			addclick() {
+				this.addstatus = true
 			},
-			add(){
-				if(!this.cardData.certificateImage){
+			add() {
+				if (!this.cardData.certificateImage) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: '请上传证件照片!',
@@ -383,10 +361,10 @@
 					return
 				}
 				uni.showLoading({
-						title: '数据加载中'
-					})
-				this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'add',{
-					certificateManagementInfo:JSON.stringify(this.cardData)
+					title: '数据加载中'
+				})
+				this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'add', {
+					certificateManagementInfo: JSON.stringify(this.cardData)
 				}, failres => {
 					console.log('res+++++', failres.errmsg)
 					this.$refs.uToast.show({
@@ -395,25 +373,27 @@
 					})
 					uni.hideLoading()
 				}).then(res => {
-					
+
 					this.$refs.uToast.show({
 						type: 'success',
 						message: '提交成功',
 					})
 					// if (res.errno == 200) {
 					uni.hideLoading()
-					this.fileList1=[]
-					this.addstatus=false
-					this.cardData={commonId:uni.getStorageSync("userInfo").id}
+					this.fileList1 = []
+					this.addstatus = false
+					this.cardData = {
+						commonId: uni.getStorageSync("userInfo").id
+					}
 					this.mescroll.resetUpScroll()
-					
+
 					// }
 				})
-				
+
 			},
 			deletePic(event) {
 				this[`fileList${event.name}`].splice(event.index, 1)
-				this.cardData.certificateImage =this[`fileList${event.name}`].toString()
+				this.cardData.certificateImage = this[`fileList${event.name}`].toString()
 			},
 			// 新增图片
 			async afterRead(event) {
@@ -421,25 +401,25 @@
 				let lists = [].concat(event.file)
 				let fileListLen = this[`fileList${event.name}`].length
 				lists.map((item) => {
-				     this[`fileList${event.name}`].push({
-				      ...item,
-				      status: 'uploading',
-				      message: '上传中'
-				     })
-				    })
+					this[`fileList${event.name}`].push({
+						...item,
+						status: 'uploading',
+						message: '上传中'
+					})
+				})
 				// console.log(event,111111,fileListLen)
 				for (let i = 0; i < lists.length; i++) {
 					const result = await this.uploadFilePromise(lists[i].url)
 					this.cardData.certificateImage = result
-					this[`fileList${event.name}`][fileListLen]={}
+					this[`fileList${event.name}`][fileListLen] = {}
 					let item = this[`fileList${event.name}`][fileListLen]
 					console.log(item)
-					 this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
-					  status: 'success',
-					  message: '',
-					  url: result
-					 }))
-					 fileListLen++
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						status: 'success',
+						message: '',
+						url: result
+					}))
+					fileListLen++
 				}
 				console.log(this[`fileList${event.name}`])
 			},
@@ -448,33 +428,33 @@
 				return new Promise((resolve, reject) => {
 					uploadImage(url, 'cardImages/',
 						result => {
-							console.log(result,22222)
-							
+							console.log(result, 22222)
+
 							resolve(result)
 						}
 					)
 				})
 			},
-			mescrollInit(){
-				
+			mescrollInit() {
+
 			},
-			downCallback(){
+			downCallback() {
 				var that = this
 				this.$nextTick(() => {
-				// mescroll.endSuccess(data.result);
-				that.mescroll.resetUpScroll()
+					// mescroll.endSuccess(data.result);
+					that.mescroll.resetUpScroll()
 				});
-				
+
 			},
-			upCallback(page){
+			upCallback(page) {
 				var that = this
 				uni.showLoading({
-						title: '数据加载中'
-					})
-				this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'list',{
-					page:page.num,
-					limit:page.size,
-					commonId:uni.getStorageSync("userInfo").id
+					title: '数据加载中'
+				})
+				this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'list', {
+					page: page.num,
+					limit: page.size,
+					commonId: uni.getStorageSync("userInfo").id
 				}, failres => {
 					console.log('res+++++', failres.errmsg)
 					this.$refs.uToast.show({
@@ -485,27 +465,29 @@
 					uni.hideLoading()
 				}).then(res => {
 					console.log(res)
-					if(page.num == 1) this.cardList = [];
+					if (page.num == 1) this.cardList = [];
 					let curPageLen = res.data.items.length;
 					let totalPage = res.data.total;
-					if(res.data.items.length>0){
-						for(var i=0;i<res.data.items.length;i++){
-							res.data.items[i].editstatus=false
-							if(res.data.items[i].personNo) res.data.items[i].personNo1='*'+(res.data.items[i].personNo.substring(res.data.items[i].personNo.length-4))
-							if(res.data.items[i].bankNo) res.data.items[i].bankNo1='*'+(res.data.items[i].bankNo.substring(res.data.items[i].bankNo.length-4))
+					if (res.data.items.length > 0) {
+						for (var i = 0; i < res.data.items.length; i++) {
+							res.data.items[i].editstatus = false
+							if (res.data.items[i].personNo) res.data.items[i].personNo1 = '*' + (res.data.items[i]
+								.personNo.substring(res.data.items[i].personNo.length - 4))
+							if (res.data.items[i].bankNo) res.data.items[i].bankNo1 = '*' + (res.data.items[i]
+								.bankNo.substring(res.data.items[i].bankNo.length - 4))
 						}
 					}
-					this.cardList=this.cardList.concat(res.data.items)
-					this.cardData.certificateName='证件'+'-'+(this.cardList.length+1)
+					this.cardList = this.cardList.concat(res.data.items)
+					this.cardData.certificateName = '证件' + '-' + (this.cardList.length + 1)
 					this.$nextTick(() => {
 						console.log(that)
-					// mescroll.endSuccess(data.result);
-					that.mescroll.endBySize(curPageLen, totalPage)
+						// mescroll.endSuccess(data.result);
+						that.mescroll.endBySize(curPageLen, totalPage)
 					});
-					
+
 					// if (res.errno == 200) {
 					uni.hideLoading()
-					
+
 					// }
 				})
 			},
@@ -514,12 +496,15 @@
 </script>
 
 <style lang="scss" scoped>
-button::after{border: initial;}
+	button::after {
+		border: initial;
+	}
+
 	.share {
 		width: 100%;
 		height: 100%;
 	}
- 
+
 	.share-box {
 		width: 100%;
 		height: 100%;
@@ -532,7 +517,7 @@ button::after{border: initial;}
 		transition: .3s;
 		z-index: 999;
 	}
- 
+
 	.block>button {
 		display: flex;
 		flex-direction: column;
@@ -545,23 +530,23 @@ button::after{border: initial;}
 		// outline:none;
 		// opacity: 0;
 	}
- 
+
 	// 进入分享动画
 	.share-show {
 		transition: all 0.3s ease;
 		transform: translateY(0%) !important;
 	}
- 
+
 	// 离开分享动画
 	.share-item {
- 
+
 		.share-to {
 			width: 100%;
 			height: 3rem;
 			display: flex;
 			justify-content: center;
 			align-items: center;
- 
+
 			&::after {
 				content: '';
 				width: 240rpx;
@@ -571,7 +556,7 @@ button::after{border: initial;}
 				transform: scaleY(0.5);
 				margin-left: 30rpx;
 			}
- 
+
 			&::before {
 				content: '';
 				width: 240rpx;
@@ -582,13 +567,13 @@ button::after{border: initial;}
 				margin-right: 30rpx;
 			}
 		}
- 
+
 		.content {
 			width: 100%;
 			height: auto;
 			display: flex;
 			flex-wrap: wrap;
- 
+
 			.block {
 				width: 50%;
 				display: flex;
@@ -596,12 +581,12 @@ button::after{border: initial;}
 				justify-content: center;
 				align-items: center;
 				height: 180rpx;
- 
+
 				image {
 					width: 80rpx;
 					height: 80rpx;
 				}
- 
+
 				text {
 					margin-top: 16rpx;
 					font-size: 28rpx;
@@ -609,7 +594,7 @@ button::after{border: initial;}
 				}
 			}
 		}
- 
+
 		.cancel {
 			width: 100%;
 			height: 3rem;
@@ -619,5 +604,4 @@ button::after{border: initial;}
 			border-top: 1rpx solid #E4E7ED;
 		}
 	}
-
-</style>
+</style>

+ 1 - 1
xiaochengxu/pages/mySet/mySet.vue

@@ -16,7 +16,7 @@
 			<view class="row" v-for="item in menuList" @click="menuClick(item.type)">
 				<button class="left" v-if='item.type=="contactCustomer"' open-type='contact'>{{item.name}}</button>
 					<span class="left" v-else>{{item.name}}</span>
-				<!-- <span class="right">></span> -->
+				<span class="right">></span>
 			</view>
 		</view>
 	</view>