Browse Source

commit -m 画像

zhengjinyi 3 years ago
parent
commit
f30a864c3e

+ 11 - 0
common/config/caimeiApi.js

@@ -138,6 +138,16 @@ const caimeiApi = {
             })
         })
     },
+    removeStorage:function(key){// 获取本地userInfo
+        return new Promise(function(resolve,reject) {
+            uni.removeStorage({
+                key: key,
+                success: function (res) {
+                    console.log('success')
+                }
+            })
+        })
+    },
     getStorageAddressKey:function(){// 获取本地地址信息
         return new Promise(function(resolve,reject) {
             uni.getStorage({
@@ -403,6 +413,7 @@ module.exports = {
     loginStatus: caimeiApi.loginStatus,
     setStorage: caimeiApi.setStorage,
     getStorage: caimeiApi.getStorage,
+    removeStorage: caimeiApi.removeStorage,
     getComStorage: caimeiApi.getComStorage,
     navToListPage: caimeiApi.navToListPage,
     navigateToGoods: caimeiApi.navigateToGoods,

+ 6 - 11
pages/goods/product.vue

@@ -250,18 +250,13 @@
 					<view class="product-details product-details0">
 						<view class="title"> <view class="title-tab">商品详情</view> </view>
 						<view class="content tui-banner product-rich-text tui-skeleton-rect">
-							<template v-if="hasLogin && userIdentity !=4">
-								<template v-if="!goodsData.isNoneDisabled && product.productDetail.detailInfo">
-									<parser
-										:html="html"
-										:img-mode="widthFix"
-									></parser>
-								</template>
-								<view class="product-rich-text-none" v-else>暂无商品信息</view>
-							</template>
-							<template v-else>
-								<view class="product-rich-text-none">若要查看更多产品信息,请注册机构会员,如有疑问请联系客服。</view>
+							<template v-if="!goodsData.isNoneDisabled && product.productDetail.detailInfo">
+								<parser
+									:html="html"
+									:img-mode="widthFix"
+								></parser>
 							</template>
+							<view class="product-rich-text-none" v-else>暂无商品信息</view>
 						</view>
 					</view>
 					<!-- 服务项目 -->

+ 12 - 6
pages/seller/remarks/add-record.vue

@@ -13,8 +13,8 @@
 					class="textarea"
 					v-model="remarksParams.remarks"
 					value=""
-					placeholder="请总结你和客户的聊天内容,以关键词形式填入框内,关键词之间用逗号隔开"
-					maxlength="300"
+					placeholder="请总结你和客户的聊天内容,以关键词形式填入框内,关键词之间用中文逗号隔开"
+					maxlength="500"
 					@input="conInput"
 				/>
 				<text class="limit-text">{{ min }}/{{ max }}</text>
@@ -84,7 +84,7 @@ export default {
 				serviceProviderId: 0
 			},
 			min: 0,
-			max: 300,
+			max: 500,
 			handleType:'',
 			questionMan:'',
 			clubUserId:0,
@@ -118,7 +118,8 @@ export default {
 			})
 			.then(response => {
 				let data = response.data
-				this.remarksParams.remarks = data.remarks
+				this.remarksParams.questionManId = data.questionManId
+				this.remarksParams.remarks = data.remarks.join(',')
 				this.remarksParams.remarksId = data.remarksId
 				this.remarksParams.fileList = data.fileList
 				this.remarksParams.imageList = data.imageList
@@ -131,7 +132,7 @@ export default {
 		editButtonConfim() {
 			//保存资料备注
 			if (this.remarksParams.remarks == '') {
-				this.$util.msg('请输入文字备注', 2000)
+				this.$util.msg('请输入关键词记录', 2000)
 				return
 			}
 			this.UserService.getUserClubVisitorSaveAdd({
@@ -139,8 +140,13 @@ export default {
 			})
 			.then(response => {
 				this.$util.msg('添加成功', 2000, true, 'success')
+				let VisitorInfo = {
+						questionManId: this.remarksParams.questionManId,
+						questionMan: this.questionMan
+					}
+				this.$api.setStorage('VisitorInfo', VisitorInfo)
 				setTimeout(() => {
-					this.$api.navigateTo(`/pages/seller/remarks/record-list?questionManId=${this.remarksParams.questionManId}&questionMan=${this.questionMan}`)
+					this.$api.redirectTo('/pages/seller/remarks/record-list')
 				}, 2000)
 			})
 			.catch(error => {

+ 21 - 16
pages/seller/remarks/add.vue

@@ -11,7 +11,7 @@
 				</view>
 				<view class="club-le-text">
 					<text class="label">地址:</text>
-					<text class="text">{{ clubInfo.provincialAddress }}{{ clubInfo.address }}</text>
+					<text class="text" v-if="clubInfo.provincialAddress">{{ clubInfo.provincialAddress }}{{ clubInfo.address }}</text>
 				</view>
 			</view>
 			<view class="content-club-ri"> <text class="iconfont icon-xiayibu"></text> </view>
@@ -27,7 +27,7 @@
 					v-model="remarksParams.questionMan"
 					value=""
 					placeholder="请输入和你聊天的客户姓名"
-					maxlength="10"
+					maxlength="15"
 				/>
 			</view>
 			<view class="list-view-title">
@@ -38,8 +38,8 @@
 					class="textarea"
 					v-model="remarksParams.remarks"
 					value=""
-					placeholder="请总结你和客户的聊天内容,以关键词形式填入框内,关键词之间用逗号隔开"
-					maxlength="300"
+					placeholder="请总结你和客户的聊天内容,以关键词形式填入框内,关键词之间用中文逗号隔开"
+					maxlength="500"
 					@input="conInput"
 				/>
 				<text class="limit-text">{{ min }}/{{ max }}</text>
@@ -110,7 +110,7 @@ export default {
 				serviceProviderId: 0
 			},
 			min: 0,
-			max: 300,
+			max: 500,
 			handleType: '',
 			clubUserId: 0,
 			clubInfo: {},
@@ -125,17 +125,11 @@ export default {
 			uni.setNavigationBarTitle({ title: '修改画像' })
 		} else {
 			this.clubUserId = option.userId
-			this.initGetStotage()
+			this.getCulbInfo()
 		}
 	},
 	methods: {
 		...mapMutations(['login']),
-		async initGetStotage() {
-			debugger
-			const userInfo = await this.$api.getStorage()
-			this.remarksParams.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
-			this.getCulbInfo()
-		},
 		getCulbInfo() {
 			// 查询机构信息
 			this.UserService.OrganizationUpdateModifyInfo({ userId: this.clubUserId })
@@ -143,6 +137,9 @@ export default {
 					this.clubInfo = response.data.club
 					this.userInfo = response.data.user
 					this.remarksParams.clubId = this.clubInfo.clubId
+					if(this.handleType != 'edit'){
+						this.remarksParams.questionMan = this.clubInfo.linkMan
+					}
 				})
 				.catch(error => {
 					console.log('=============>', error.msg)
@@ -157,22 +154,30 @@ export default {
 					let data = response.data
 					this.clubUserId = data.userId
 					this.remarksParams.remarks = data.remarks.join(',')
-					this.remarksParams.questionMan = data.questionMan
 					this.remarksParams.remarksId = data.remarksId
 					this.remarksParams.fileList = data.fileList
 					this.remarksParams.imageList = data.imageList
-					this.initGetStotage()
+					if(this.handleType == 'edit'){
+						this.remarksParams.questionMan = data.questionMan
+					}
+					this.getCulbInfo()
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
-		editButtonConfim() {
+		async editButtonConfim() {
 			//保存资料备注
+			const userInfo = await this.$api.getStorage()
+			if (this.remarksParams.questionMan == '') {
+				this.$util.msg('请输入咨询人姓名', 2000)
+				return
+			}
 			if (this.remarksParams.remarks == '') {
-				this.$util.msg('请输入文字备注', 2000)
+				this.$util.msg('请输入关键词记录', 2000)
 				return
 			}
+			this.remarksParams.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
 			this.UserService.getUserClubRemarksSave({
 				params: JSON.stringify(this.remarksParams)
 			})

+ 47 - 37
pages/seller/remarks/customer-list.vue

@@ -7,10 +7,10 @@
 					class="input"
 					type="text"
 					confirm-type="search"
-					v-model="listQuery.searchName"
+					v-model="listQuery.keyWord"
 					@input="onShowClose"
-					@confirm="initclubList()"
-					placeholder="搜索关键词"
+					@confirm="GetProductListInfo"
+					placeholder="搜索咨询人"
 					maxlength="16"
 				/>
 				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
@@ -30,9 +30,7 @@
 							<view class="tui-remarks-name-le">咨询人:{{ list.questionMan }}</view>
 							<view class="tui-remarks-name-ri"><text class="iconfont icon-xiayibu"></text></view>
 						</view>
-						<view class="tui-remarks-button" @click.stop="handleShowClubpopup(1,list)">
-							修改姓名
-						</view>
+						<view class="tui-remarks-button" @click.stop="handleShowClubpopup(1, list)"> 修改姓名 </view>
 					</view>
 					<!--加载loadding-->
 					<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
@@ -107,7 +105,7 @@ export default {
 			hasNextPage: false,
 			navbarHeight: '',
 			nomoreText: '上拉显示更多',
-			handleUpdataVisitorId:0,
+			handleUpdataVisitorId: 0,
 			modalType: 0,
 			isClubModalShow: false
 		}
@@ -194,74 +192,86 @@ export default {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
-		handleShowClubpopup(type,el) {// 点击操作
+		handleShowClubpopup(type, el) {
+			// 点击操作
 			this.modalType = type
-			if(this.modalType == 1){
+			if (this.modalType == 1) {
 				this.handleUpdataVisitorId = el.questionManId
 				this.isClubModalShow = true
-			}else{
+			} else {
 				this.isClubModalShow = true
 			}
 		},
-		handleChoiceaTextData(data) {// 监听获取
+		handleChoiceaTextData(data) {
+			// 监听获取
 			console.log(data)
-			if(this.modalType == 1){
+			if (this.modalType == 1) {
 				this.handleUpdateVisitor(data)
-			}else{
+			} else {
 				this.handleSaveVisitor(data)
 			}
 		},
 		handleUpdateVisitor(data) {
 			// 修改咨询人姓名
 			this.UserService.getUserClubVisitorUpdate({
-				questionMan:data,
+				questionMan: data,
 				questionManId: this.handleUpdataVisitorId,
 				serviceProviderId: this.listQuery.serviceProviderId
 			})
-			.then(response => {
-				this.$util.msg('修改成功', 2000, true, 'success')
-				setTimeout(() => {
-					this.GetProductListInfo()
-				},2000)
-			})
-			.catch(error => {
-				console.log('=======>修改咨询姓名失败~')
-			})
+				.then(response => {
+					this.$util.msg('修改成功', 2000, true, 'success')
+					setTimeout(() => {
+						this.GetProductListInfo()
+					}, 2000)
+				})
+				.catch(error => {
+					console.log('=======>修改咨询姓名失败~')
+				})
 		},
-		handleSaveVisitor(data) { 
+		handleSaveVisitor(data) {
 			// 添加咨询人
 			this.UserService.getUserClubVisitorSave({
 				name: data,
 				serviceProviderId: this.listQuery.serviceProviderId
 			})
-			.then(response => {
-				setTimeout(() => {
-					this.$api.navigateTo(`/pages/seller/remarks/record-list?questionManId=${response.data.questionManId}&questionMan=${response.data.questionMan}`)
-				}, 1000)
-			})
-			.catch(error => {
-				console.log('=======>添加咨询人失败~')
-			})
+				.then(response => {
+					let VisitorInfo = {
+						questionManId: response.data.questionManId,
+						questionMan: response.data.questionMan
+					}
+					this.$api.setStorage('VisitorInfo', VisitorInfo)
+					setTimeout(() => {
+						this.$api.navigateTo('/pages/seller/remarks/record-list')
+					}, 1000)
+				})
+				.catch(error => {
+					console.log('=======>添加咨询人失败~')
+				})
 		},
 		onShowClose() {
 			//输入框失去焦点时触发
-			if (this.listQuery.searchName != '') {
+			if (this.listQuery.keyWord != '') {
 				this.isShowClose = true
 			} else {
 				this.isShowClose = false
 				this.listQuery.pageNum = 1
-				this.initclubList()
+				this.GetProductListInfo()
 			}
 		},
 		delInputText() {
 			//清除输入框内容
-			this.listQuery.searchName = ''
+			this.listQuery.keyWord = ''
 			this.isShowClose = false
 			this.listQuery.pageNum = 1
-			this.initclubList()
+			this.GetProductListInfo()
 		},
 		details(list) {
-			this.$api.navigateTo(`/pages/seller/remarks/record-list?questionManId=${list.questionManId}&questionMan=${list.questionMan}`)
+			let VisitorInfo = {
+				questionManId: list.questionManId,
+				questionMan: list.questionMan
+			}
+			this.$api.setStorage('VisitorInfo', VisitorInfo)
+			this.$api.navigateTo('/pages/seller/remarks/record-list')
 		}
 	},
 	onPageScroll(e) {

+ 2 - 0
pages/seller/remarks/details.vue

@@ -17,6 +17,8 @@
 			<view class="content-club-ri"> <text class="iconfont icon-xiayibu"></text> </view>
 		</view>
 		<view class="remarks-content clearfix">
+			<view class="list-view-title"> <view class="list-view-h1">咨询人:{{ remarksParams.questionMan }}</view> </view>
+			
 			<view class="list-view-title"> <view class="list-view-h1">关键词记录:</view> </view>
 			<view class="tui-remarks-content">
 				<text class="tui-remarks-span" v-for="(label, labelIndex) in remarksParams.remarks" :key="labelIndex">

+ 6 - 6
pages/seller/remarks/list.vue

@@ -6,9 +6,9 @@
 				<input class="input" 
 					   type="text" 
 					   confirm-type="search" 
-					   v-model="listQuery.searchName" 
+					   v-model="listQuery.keyWord" 
 					   @input="onShowClose" 
-					   @confirm="initclubList()" 
+					   @confirm="GetProductListInfo" 
 					   placeholder="搜索关键词"
 					   maxlength="16"/>
 				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
@@ -257,19 +257,19 @@ export default {
 				})
 		},
 		onShowClose () {//输入框失去焦点时触发
-			if(this.listQuery.searchName != ''){
+			if(this.listQuery.keyWord != ''){
 				this.isShowClose = true
 			}else{					
 				this.isShowClose = false
 				this.listQuery.pageNum=1
-				this.initclubList()
+				this.GetProductListInfo()
 			}
 		},
 		delInputText(){//清除输入框内容
-			this.listQuery.searchName = ''
+			this.listQuery.keyWord = ''
 			this.isShowClose = false
 			this.listQuery.pageNum=1
-			this.initclubList()
+			this.GetProductListInfo()
 		},
 		hideMobel() {
 			this.modal = false

+ 2 - 2
pages/seller/remarks/record-details.vue

@@ -4,8 +4,8 @@
 			<view class="list-view-title">
 				<view class="list-view-h1">咨询人</view>
 			</view>
-			<view class="remarks-input">啊啊啊</view>
-			<view class="list-view-title"> <view class="list-view-h1">文字备注</view> </view>
+			<view class="remarks-input">{{ remarksParams.questionMan }}</view>
+			<view class="list-view-title"> <view class="list-view-h1">关键词记录:</view> </view>
 			<view class="tui-remarks-content">
 				<text class="tui-remarks-span" v-for="(label, labelIndex) in remarksParams.remarks" :key="labelIndex">
 					{{ label }}

+ 21 - 18
pages/seller/remarks/record-list.vue

@@ -8,9 +8,9 @@
 						class="input"
 						type="text"
 						confirm-type="search"
-						v-model="listQuery.searchName"
+						v-model="listQuery.keyWord"
 						@input="onShowClose"
-						@confirm="initclubList()"
+						@confirm="GetProductListInfo"
 						placeholder="搜索关键词"
 						maxlength="16"
 					/>
@@ -149,9 +149,7 @@ export default {
 		}
 	},
 	onLoad(option) {
-		this.questionMan = option.questionMan
-		this.listQuery.questionManId = option.questionManId
-		this.initGetStotage(this.listQuery.questionManId)
+		
 	},
 	filters: {
 		NumFormat: function(value) {
@@ -166,10 +164,12 @@ export default {
 	},
 	methods: {
 		...mapMutations(['login', 'logout']),
-		async initGetStotage() {
-			const clubInfo = await this.$api.getComStorage('orderUserInfo')
-			this.listQuery.clubId = clubInfo.clubId ? clubInfo.clubId : 0
+		async init() {
+			const VisitorInfo = await this.$api.getComStorage('VisitorInfo')
+			this.questionMan = VisitorInfo.questionMan
+			this.listQuery.questionManId = VisitorInfo.questionManId
 			this.GetProductListInfo()
+			this.$api.removeStorage('VisitorInfo')
 		},
 		GetProductListInfo() {
 			this.remarksList = []
@@ -240,8 +240,8 @@ export default {
 			this.contentModalText = '确定删除这条记录吗?'
 		},
 		handEditRemark(remarksId) {
-			//跳转修改资料备注
-			this.$api.navigateTo(`/pages/seller/remarks/add-record?type=edit&remarksId=${remarksId}&questionMan=${
+			//跳转修改画像
+			this.$api.redirectTo(`/pages/seller/remarks/add-record?type=edit&remarksId=${remarksId}&questionMan=${
 					this.questionMan
 				}`)
 		},
@@ -255,7 +255,7 @@ export default {
 			}
 			this.isClubpopupShow = true
 		},
-		handleChoiceaClubData(data) {
+		handleChoiceaClubData(data) {// 同步至机构
 			console.log(data)
 			this.UserService.getUserRemarksConcactVisit(
 				{
@@ -266,7 +266,7 @@ export default {
 			.then(response => {
 				this.$util.msg('同步成功', 2000, true, 'success')
 				setTimeout(() => {
-					this.$api.navigateTo('/pages/seller/remarks/customer-list')
+					this.$api.redirectTo('/pages/seller/remarks/list')
 				}, 2000)
 			})
 			.catch(error => {
@@ -274,7 +274,7 @@ export default {
 			})
 		},
 		handleAddRecord() {
-			this.$api.navigateTo(
+			this.$api.redirectTo(
 				`/pages/seller/remarks/add-record?questionManId=${this.listQuery.questionManId}&questionMan=${
 					this.questionMan
 				}`
@@ -304,20 +304,20 @@ export default {
 		},
 		onShowClose() {
 			//输入框失去焦点时触发
-			if (this.listQuery.searchName != '') {
+			if (this.listQuery.keyWord != '') {
 				this.isShowClose = true
 			} else {
 				this.isShowClose = false
 				this.listQuery.pageNum = 1
-				this.initclubList()
+				this.GetProductListInfo()
 			}
 		},
 		delInputText() {
 			//清除输入框内容
-			this.listQuery.searchName = ''
+			this.listQuery.keyWord = ''
 			this.isShowClose = false
 			this.listQuery.pageNum = 1
-			this.initclubList()
+			this.GetProductListInfo()
 		},
 		hideMobel() {
 			this.modal = false
@@ -342,7 +342,10 @@ export default {
 			uni.stopPullDownRefresh()
 		}, 200)
 	},
-	onShow() {}
+	
+	onShow() {
+		this.init()
+	}
 }
 </script>
 

+ 2 - 2
services/config.env.js

@@ -1,10 +1,10 @@
 let URL_CONFIG = ''
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-    URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
+    // URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
     // URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
-    // URL_CONFIG = 'https://core-b.caimei365.com'
+    URL_CONFIG = 'https://core-b.caimei365.com'
     // URL_CONFIG = 'https://core.caimei365.com'
 }else{
     // 生产环境