Ver Fonte

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

achao há 2 anos atrás
pai
commit
e9464a98b7

+ 2 - 4
xiaochengxu/components/zhangyuhao-poster/Poster.vue

@@ -180,7 +180,6 @@ imageType:用于区分图片是本地图片还是网络图片本地图片需
 									/* 图片绘制 */
 									if (current.type === 'image') {
 										console.log('绘制图片:' + current.path);
-										console.log(current.area)
 										if (current.area) {
 											// 绘制绘图区域
 											this.ctx.save()
@@ -219,7 +218,6 @@ imageType:用于区分图片是本地图片还是网络图片本地图片需
 											this.ctx.closePath();
 											this.ctx.restore(); // 恢复之前保存的上下文
 										} else {
-											console.log(3333,current)
 											this.ctx.drawImage(current.path, current.x, current.y, current.width, current
 												.height)
 										}
@@ -285,11 +283,11 @@ imageType:用于区分图片是本地图片还是网络图片本地图片需
 					console.log(this.list[i])
 					current.index = i
 					/* 如果是文本直接放入队列 */
-					if (current.type === 'text' || current.type === 'textarea' || current.type === 'image' && current.use !== 'bg' ) {
+					if (current.type === 'text' || current.type === 'textarea' || current.type === 'image' && current.use !== 'bg'&&current.use !== 'head' ) {
 						this.drawPathQueue.push(current)
 						continue
 					}
-					if( current.use === 'head'&&current.imageType === 'wl'){
+					if( current.use === 'head'&&current.imageType === 'bd'){
 						this.drawPathQueue.push(current)
 						continue
 					}

+ 38 - 25
xiaochengxu/pages/cardHolder/scanCodeAddCard.vue

@@ -334,9 +334,9 @@
 		onLoad(options) {
 			that = this
 			console.log(options)
+			this.id = options.id.indexOf(",") ? options.id.split(",")[0] : options.id
 			if (uni.getStorageSync("userInfo").phone) {
 				this.userInfo = uni.getStorageSync("userInfo")
-				this.id = options.id.indexOf(",") ? options.id.split(",")[0] : options.id
 				// this.commonId = options.id.indexOf(",") ? options.id.split(",")[1] : ''
 				
 				this.getList()
@@ -392,38 +392,51 @@
 					});
 					return
 				}
-				uni.showLoading({
-					title: '数据加载中',
-					mask: true
-				})
-				this.$request.baseRequest('admin.unimall.cardHolderInfo', 'add', {
-					cardHolderInfo: JSON.stringify({
-						cardId: this.cardInfo.id,
-						remark: this.cardInfo.remark,
-						cardCommonId: this.commonId,
-						myCardId: this.cardInfo.myCardId,
-						commonId: uni.getStorageSync("userInfo").id,
-						classify: this.cardInfo.classify
-					})
+				this.$request.baseRequest('admin.unimall.cardHolderInfo', 'getAdded', {
+					commonId: uni.getStorageSync("userInfo").id,
+					cardId: this.cardInfo.id,
 				}, failres => {
+					console.log('res+++++', failres.errmsg)
 					uni.showToast({
 						icon: "none",
 						title: failres.errmsg,
 						duration: 3000
 					});
-					uni.hideLoading()
-				}).then(res => {
-					uni.showToast({
-						icon: "success",
-						title: '保存成功!',
-						duration: 2000
-					});
-					 uni.setStorageSync("scanAddCardToIndex",1)
-					uni.switchTab({
-						url: "/pages/cardHolder/cardHolder"
-
+				}).then(res1 => {
+					uni.showLoading({
+						title: '数据加载中',
+						mask: true
+					})
+					this.$request.baseRequest('admin.unimall.cardHolderInfo', 'add', {
+						cardHolderInfo: JSON.stringify({
+							cardId: this.cardInfo.id,
+							remark: this.cardInfo.remark,
+							cardCommonId: this.commonId,
+							myCardId: this.cardInfo.myCardId,
+							commonId: uni.getStorageSync("userInfo").id,
+							classify: this.cardInfo.classify
+						})
+					}, failres => {
+						uni.showToast({
+							icon: "none",
+							title: failres.errmsg,
+							duration: 3000
+						});
+						uni.hideLoading()
+					}).then(res => {
+						uni.showToast({
+							icon: "success",
+							title: '保存成功!',
+							duration: 2000
+						});
+						 uni.setStorageSync("scanAddCardToIndex",1)
+						uni.switchTab({
+							url: "/pages/cardHolder/cardHolder"
+					
+						})
 					})
 				})
+				
 			},
 			cancel() {
 				uni.switchTab({

+ 13 - 8
xiaochengxu/pages/cardHolder/search.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<d-search-log :placeholder="'搜索名片'" :color_border="color_border" :color_text="color_border"
-			:search_list_old_man_num='15' :search_list_hot="search_list_hot" :store_key="store_key"
+			:search_list_old_man_num='15' :search_list_hot="search_list_hot" :store_key="store_key" :input_text="input_text"
 			@onClickDelAllApi="onClickDelAll" @onSearchNameApi="onSearchName" @onSearchvoiceApi='onSearchvoice'></d-search-log>
 		<u-popup :show="isRecorderManager" mode="bottom">
 			<view class="shqx" v-if="longPress == '2'">
@@ -51,7 +51,8 @@
 				store_key: 'search_list',
 				isRecorderManager: false,
 				is_clock: true,
-				startPoint: ""
+				startPoint: "",
+				input_text:""
 			};
 		},
 		onLoad(options) {
@@ -100,16 +101,21 @@
 				console.log("录音结束")
 				let that = this
 				this.longPress = '1'; 
+				that.isRecorderManager = false
 				recorderManager.onStop((res) => {
 					this.tempFilePath = res.tempFilePath
 					let _file = ''
 					if (that.is_clock) {
 						_file = uni.getFileSystemManager().readFileSync(res.tempFilePath, "base64")
 						console.log(_file)
+						uni.showLoading({
+							title:"正在识别"
+						})
 						that.$request.baseRequest('admin.unimall.certificateManagementInfo', 'speechRecognition', {
 							voiceMessage: _file,
 						}, failres => {
 							console.log('res+++++', failres.errmsg)
+							uni.hideLoading()
 							uni.showToast({
 								icon:"none",
 								title: failres.errmsg,
@@ -123,12 +129,12 @@
 							}else{
 								var text = res.data.text
 							}
-							
-							uni.setStorageSync('search_val', text);
-							uni.switchTab({
-								url: "/pages/cardHolder/cardHolder"
+							that.input_text = text
+							// uni.setStorageSync('search_val', text);
+							// uni.switchTab({
+							// 	url: "/pages/cardHolder/search"
 
-							})
+							// })
 
 						})
 					}
@@ -146,7 +152,6 @@
 				uni.setStorageSync('search_val', text);
 				uni.switchTab({
 					url: "/pages/cardHolder/cardHolder"
-
 				})
 			}
 		}

+ 1 - 1
xiaochengxu/uni_modules/d-search-log/components/d-search-log/d-search-log.vue

@@ -125,7 +125,7 @@
 					this.search_input = newVal
 					// this.search_input = search_input.toLowerCase()
 					
-					this.saveKeyword()
+					// this.saveKeyword()
 				}
 			},