xhj 2 سال پیش
والد
کامیت
29ec1b033a
4فایلهای تغییر یافته به همراه59 افزوده شده و 17 حذف شده
  1. 16 3
      mine/clientDetail/clientDetail.vue
  2. 29 11
      mine/clientDynamic/clientDynamic.vue
  3. 3 2
      utils/request.js
  4. 11 1
      utils/util.js

+ 16 - 3
mine/clientDetail/clientDetail.vue

@@ -46,6 +46,7 @@
 				<view class="form-data fflex">
 					<block v-if="info.customTypeName&&info.customTypeName.length>0">{{info.customTypeName.join(',')}}
 					</block>
+					<block>-</block>
 				</view>
 			</view>
 			<view class="ddflex form-item">
@@ -78,7 +79,7 @@
 		</view>
 		<view class="dt-box ddflex">
 			<view class="dt-title">客户动态</view>
-			<view class="more ddflex" @click="jumpUrl('/mine/clientDynamic/clientDynamic')">
+			<view class="more ddflex" @click="jumpUrl('/mine/clientDynamic/clientDynamic?id='+id)">
 				查看更多
 				<image style="width: 9rpx;height: 18rpx;margin-left: 10rpx;" src="/static/images/rico.png"></image>
 			</view>
@@ -99,7 +100,7 @@
 						<image src="/mine/static/images/jcico.png" class="jcico"></image>
 						<view class="time">{{ it.time }}</view>
 						<!-- <view class="des" v-if="it.brief">{{ it.brief }}</view> -->
-						<rich-text class="des" :nodes="it.brief"></rich-text>
+						<rich-text class="des" :nodes="it.content"></rich-text>
 					</view>
 				</view>
 			</view>
@@ -195,7 +196,7 @@
 			this.todayDay = new Date().getDate()
 		},
 		onShow() {
-
+			this.getDynamic()
 		},
 		methods: {
 			jumpUrl(url){
@@ -247,6 +248,18 @@
 					minute:minute,
 					second:second,
 				}
+			},
+			getDynamic(){
+				req.getRequest('/api/user/getUserTrends',{uid:this.id,page:1,limit:5},res=>{
+					this.logsList = res&&res.list?res.list:[],
+					this.logsList.map(item=>{
+						let t = this.getDate(item.createDate)
+						item.year = t.year
+						item.month = t.month
+						item.day = t.day
+						item.time = t.hour+':'+t.minute
+					})
+				})
 			}
 		},
 		mounted() {},

+ 29 - 11
mine/clientDynamic/clientDynamic.vue

@@ -22,7 +22,7 @@
 						<image src="/mine/static/images/jcico.png" class="jcico"></image>
 						<view class="time">{{ it.time }}</view>
 						<!-- <view class="des" v-if="it.brief">{{ it.brief }}</view> -->
-						<rich-text class="des" :nodes="it.brief"></rich-text>
+						<rich-text class="des" :nodes="it.content"></rich-text>
 					</view>
 				</view>
 			</view>
@@ -44,8 +44,8 @@
 		props: {},
 		data() {
 			return {
+				id:'',
 				tabIndex:1,
-				pageList: [],
 				isLoad: true,
 				form: {
 					page: 1,
@@ -125,6 +125,7 @@
 			}
 		},
 		onLoad(options) {
+			this.id = options.id
 			this.todayYear = new Date().getFullYear()
 			this.todayMonth = new Date().getMonth() + 1
 			this.todayDay = new Date().getDate()
@@ -149,26 +150,34 @@
 				if (!this.isLoad) return false;
 				this.isLoad = false;
 				let form = this.form;
-				if(this.searchVal){
-					form.search = this.searchVal
-				}else{
-					form.search = ''
-				}
+				form.uid = this.id
+				if(this.tabIndex==1) form.today = 1
+				else form.today = ''
 				uni.showLoading();
 				req.getRequest(
-					'/api/match/page',
+					'/api/user/getUserTrends',
 					form,
 					res => {
-						this.total = res.total
 						res  = res?res.list:[]
+						if(res&&res.length>0){
+							res.map(item=>{
+								let t = this.getDate(item.createDate)
+								item.year = t.year
+								item.month = t.month
+								item.day = t.day
+								item.time = t.hour+':'+t.minute
+							})
+						}
 						this.isShow = true;
 						if (res && res.length == 10) {
 							this.isLoad = true;
 						}
 						if (this.form.page > 1) {
-							res = this.pageList.concat(res);
+							res = this.logsList.concat(res);
+						}else{
+							this.goTop()
 						}
-						this.pageList = res;
+						this.logsList = res;
 						uni.hideLoading();
 					},
 					isShow
@@ -191,6 +200,15 @@
 					minute:minute,
 					second:second,
 				}
+			},
+			goTop(e) {
+				// 一键回到顶部
+				if (uni.pageScrollTo) {
+					uni.pageScrollTo({
+						scrollTop: 0,
+						duration:100
+					});
+				}
 			}
 		},
 		mounted() {

+ 3 - 2
utils/request.js

@@ -3,7 +3,7 @@ const app = getApp();
 const env = {
 	NODE_ENV: 'pota',
 	dev: {
-		apiUrl: 'https://unwx.e-chinalife.com'
+		apiUrl: 'https://unwx.e-chinalife.com/hktonline'
 	},
 	prd: {
 		apiUrl: 'https://apimall.zhiqiyun.com',
@@ -13,6 +13,7 @@ const env = {
 		// apiUrl: 'http://10.17.56.92:8098' ,//人寿内网
 		// apiUrl: 'http://10.17.56.104:8005' ,//人寿内网
 		// apiUrl: 'http://10.20.147.226:8080' ,//人寿内网
+		// apiUrl:''
 	}
 }
 
@@ -248,7 +249,7 @@ const removeStorage = (key) => {
 const silenceLogin = (saleNo) => {
 	return new Promise((resolve, reject) => {
 		let params = {
-			saleNo: '14308016000'
+			saleNo: '14300364'
 		}
 		// if(getStorage('userInfo')){
 		// 	resolve();

+ 11 - 1
utils/util.js

@@ -474,6 +474,15 @@ function getAge(birthYearMonthDay) {
 	}
 	return age;
 }
+// 隐藏手机号中间四位
+  function styTelText(tel){
+      if (tel) {
+      	var reg = /^(\d{3})\d{4}(\d{4})$/;  
+      	tel = tel.replace(reg, "$1****$2");
+      	console.log('replace',tel)
+      }
+      return tel;
+  }
 
 module.exports = {
 	formatTime: formatTime,
@@ -493,5 +502,6 @@ module.exports = {
 	toDecimal: toDecimal,
 	captureTime: captureTime,
 	saveImage: saveImage,
-	getAge:getAge
+	getAge:getAge,
+	styTelText:styTelText
 };