Sfoglia il codice sorgente

Merge branch 'master' of http://git.zthymaoyi.com/wangchao/businessCard

# Conflicts:
#	xiaochengxu/pages/mySet/newCard.vue
achao 2 anni fa
parent
commit
2f64472f03

+ 2 - 1
xiaochengxu/pages.json

@@ -108,7 +108,8 @@
 			"path": "pages/mySet/myHome",
 			"style": {
 				"navigationBarTitleText": "主页信息",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": false,
+				"navigationStyle": "custom"
 			}
 
 		}, {

+ 37 - 19
xiaochengxu/pages/cardHolder/cardHolder.vue

@@ -427,6 +427,24 @@
 
 		},
 		onShow:function(){
+			this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
+				receiveId: uni.getStorageSync("userInfo").id,
+			}, failres => {
+				console.log('res+++++', failres.errmsg)
+				this.$refs.uToast.show({
+					type: 'error',
+					message: failres.errmsg,
+				})
+			}).then(res => {
+				this.noticeList = res.data.items
+				if (this.noticeList.length > 0) {
+					var data = this.noticeList.filter((item) => {
+						return item.newsFlag == 0
+					})
+					this.unread = data ? data.length : 0
+				}
+				console.log(this.unread)
+			})
 			this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
 			if(this.searchVal) this.mescroll.resetUpScroll();
 		},
@@ -1126,25 +1144,25 @@
 							console.log(this.typeColumns)
 						})
 						
-						await this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
-							receiveId: uni.getStorageSync("userInfo").id,
-						}, failres => {
-							console.log('res+++++', failres.errmsg)
-							uni.showToast({
-							  icon:"none",
-							  title: failres.errmsg,
-							  duration: 3000
-							});
-						}).then(res => {
-							this.noticeList = res.data.items
-							if (this.noticeList.length > 0) {
-								var data = this.noticeList.filter((item) => {
-									return item.newsFlag == 0
-								})
-								this.unread = data ? data.length : 0
-							}
-							console.log(this.unread)
-						})
+						// await this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
+						// 	receiveId: uni.getStorageSync("userInfo").id,
+						// }, failres => {
+						// 	console.log('res+++++', failres.errmsg)
+						// 	uni.showToast({
+						// 	  icon:"none",
+						// 	  title: failres.errmsg,
+						// 	  duration: 3000
+						// 	});
+						// }).then(res => {
+						// 	this.noticeList = res.data.items
+						// 	if (this.noticeList.length > 0) {
+						// 		var data = this.noticeList.filter((item) => {
+						// 			return item.newsFlag == 0
+						// 		})
+						// 		this.unread = data ? data.length : 0
+						// 	}
+						// 	console.log(this.unread)
+						// })
 					}
 					
 				}

+ 15 - 12
xiaochengxu/pages/cardHolder/notice.vue

@@ -57,18 +57,21 @@
 						this.unreadList=data
 						if(this.unreadList.length>0){
 							for(var i=0;i<this.unreadList.length;i++){
-								this.unreadList[i].newsFlag=1
-								this.$request.baseRequest('admin.unimall.cardNewsInfo', 'update',{
-									cardNewsInfo:JSON.stringify(this.unreadList[i]),
-								}, failres => {
-									console.log('res+++++', failres.errmsg)
-									uni.showToast({
-										icon:"none",
-										title: failres.errmsg,
-										duration: 3000
-									});
-									uni.hideLoading()
-								}).then(res => {})
+								if(this.unreadList[i].newsFlag==0){
+									this.unreadList[i].newsFlag=1
+									this.$request.baseRequest('admin.unimall.cardNewsInfo', 'update',{
+										cardNewsInfo:JSON.stringify(this.unreadList[i]),
+									}, failres => {
+										console.log('res+++++', failres.errmsg)
+										uni.showToast({
+											icon:"none",
+											title: failres.errmsg,
+											duration: 3000
+										});
+										uni.hideLoading()
+									}).then(res => {})
+								}
+								
 							}
 							
 						}

+ 4 - 4
xiaochengxu/pages/circle/circle.vue

@@ -83,6 +83,9 @@
 				this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
 			});
 			
+			
+		},
+		onShow() {
 			this.$request.baseRequest('admin.unimall.cardExchangeInfo', 'list', {
 				receiveId:this.userInfo.id,
 				status:1
@@ -93,14 +96,11 @@
 				  title: failres.errmsg,
 				  duration: 3000
 				});
-				uni.hideLoading()
+				
 			}).then(res => {
-				uni.hideLoading()
 				this.cardList = res.data.items.filter((item)=>{return item.status==0})
 				console.log(this.cardList)
 			})
-		},
-		onShow() {
 		this.searchVal = uni.getStorageSync("cirlce_search_val") ? uni.getStorageSync("cirlce_search_val") : ''
 		if(this.searchVal) this.mescroll.resetUpScroll();
 		},

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

@@ -73,7 +73,10 @@
 					</view>
 					<view v-else style='padding-left:20rpx;' >
 						<u-upload  @afterRead="afterRead" :fileList="fileList2" @delete="deletePic" name="2" multiple
-						:maxCount="1" height='190' width='350'>
+						:maxCount="1" height='190' width='340'>
+							<!-- <view class="">
+								123
+							</view> -->
 							<!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png" 
 								mode="widthFix" style="width: 250px;height: 150px;"></image> -->
 							</u-upload>

+ 8 - 2
xiaochengxu/pages/mySet/myHome.vue

@@ -1,5 +1,7 @@
 <template>
 	<view class="content">
+		<u-navbar placeholder title="我的证件" @leftClick="leftClick">
+		</u-navbar>
 		<u-loading-page loading-mode='spinner' image="/static/imgs/logo.png" iconSize='60' :loading='loading'></u-loading-page>
 		<view v-if='!loading'>
 			<view v-if='!editstatus&&fileList.length>0' class="swiper-wrap">
@@ -29,11 +31,11 @@
 		</view>
 		<view class="company-title row flex flex-between line" >
 			<view class='title' v-if='!editstatus'>{{companyData.companyName}}</view>
-			<view v-if='!editstatus' class='button flex align-item-center' @click='edit'>
+			<view v-if='!editstatus' style='border-radius:10rpx;' class='button flex align-item-center' @click='$u.debounce(edit, 500)'>
 				<image src="../../static/imgs/mySet/edit.png" style='width:26rpx;height:26rpx;' mode=""></image>
 				<view style='margin-left:10rpx;'>编辑</view>
 			</view>
-			<view v-else @click='$u.debounce(buttonsubmit, 500)' class='button'>提交</view>
+			<!-- <view v-else @click='$u.debounce(buttonsubmit, 500)' class='button'>提交</view> -->
 		</view>
 		<view class="content1" :class="editstatus?'content1-edit':''">
 			<view v-if='editstatus' class="row flex flex-between align-item-center line" >
@@ -163,6 +165,10 @@
 			this.id=''
 		},
 		methods: {
+			leftClick() {
+				console.log(11111111)
+					uni.switchTab({url:'/pages/mySet/mySet'})
+			},
 			getList(){
 				var that=this
 				var data={}

+ 7 - 6
xiaochengxu/pages/mySet/mySet.vue

@@ -4,7 +4,7 @@
 			<view class="user flex">
 				<image :src="userInfo.head?userInfo.head:'../../static/imgs/mySet/head.png'" mode="widthFix" class="img"
 					@click="editHead"></image>
-				<view class="name">
+				<view @click="editNickName" class="name">
 					{{userInfo.nickname}}
 				</view>
 			</view>
@@ -95,11 +95,6 @@
 						type: "contactCustomer",
 						src: '../../static/imgs/mySet/kf.png'
 					},
-					{
-						name: "修改昵称",
-						type: 'editNickName',
-						src: '../../static/imgs/mySet/set.png'
-					},
 					{
 						name: "设置",
 						type: 'set',
@@ -183,6 +178,12 @@
 			}
 		},
 		methods: {
+			editNickName(){
+				let _url = '/pages/mySet/editNickName'
+				uni.navigateTo({
+					url: _url
+				})
+			},
 			editHead() {
 				uni.chooseImage({
 					count: 1,