zhengjinyi hace 4 años
padre
commit
9d135d0d7b

+ 1 - 1
components/cm-module/cm-seller/home.vue

@@ -198,7 +198,7 @@
 			this.getSellerHomeInfo()
 		},
 		computed: {
-			...mapState(['hasLogin'])
+			...mapState(['hasLogin','userInfo','isActivity'])
 		},
 		methods: {
 			getSellerHomeInfo(){

+ 9 - 9
seller/pages/search/search-order.vue

@@ -154,7 +154,7 @@
 			}
 		},
 		onLoad() {
-		  // this.initGetSerachRecord()
+		  this.initGetSerachRecord()
 		},
 		methods:{
 			subMitSearch() {
@@ -166,7 +166,7 @@
 				}
 			},
 			initGetSerachRecord(){
-				this.$api.getStorage().then((resolve) =>{
+				this.$api.getComStorage('userInfo').then((resolve) =>{
 					this.userID = resolve.userID
 					searchOrderHistory({userId:this.userID}).then(response =>{
 						this.serachRecordList = response.data
@@ -185,14 +185,14 @@
 			},
 			onFocus () { //输入框获取焦点时触发
 				this.inputEmpty(this.searchInputVal)
-				// this.initGetSerachRecord()
+				this.initGetSerachRecord()
 			},
 			delInputText () { //清除输入框内容
 				this.searchInputVal = ''
 				this.isShowClose = false
 				this.isShowWrapper = false
 				this.inputEmpty(this.searchInputVal)
-				// this.initGetSerachRecord()
+				this.initGetSerachRecord()
 			},
 			keywordsClick (item) {	//关键词搜索与历史搜索
 				this.searchInputVal = item;
@@ -220,14 +220,14 @@
 			getOrderDatainit(index,source){
 				/**
 				 * @订单初始化加载  仅加载第一页码
-				 * @param:orderNo(订单号)
+				 * @param:searchWord(关键词)
 				 * @param:serviceProviderId(用户ID)
 				 * @param:pageNum(页码数)
 				 * @param:pageSize(每页条数)
 				 * @param:organizeID(全局变量组织ID)
 				 */ 
-				let params = {orderNo:this.searchInputVal,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize};
-				getSellerOrderList(params).then(response =>{
+				let params = {searchWord:this.searchInputVal,userId:this.userID,pageNum:1,pageSize:this.pageSize};
+				this.SellerService.getSellerOrderList(params).then(response =>{
 					this.isShowWrapper = true
 					this.showSkeleton = true
 					const _responseData = response.data.results;
@@ -263,8 +263,8 @@
 			}, 
 			getOnReachBottomData(index){//上拉加载
 				this.pageNum+=1
-				let params = {orderNo:this.searchInputVal,serviceProviderId:this.serviceProviderId,pageNum:this.pageNum,pageSize:this.pageSize}
-				getSellerOrderList(params).then(response =>{
+				let params = {searchWord:this.searchInputVal,userId:this.userID,pageNum:this.pageNum,pageSize:this.pageSize}
+				this.SellerService.getSellerOrderList(params).then(response =>{
 					let resData = response.data.results
 					this.hasNextPage = response.data.hasNextPage;
 					this.orderList = this.orderList.concat(resData)

+ 11 - 0
services/sellse.service.js

@@ -31,4 +31,15 @@ export default class SellerService {
 	ProductRecommend (data={}){//相关推荐
 		return this.AjaxService.get({ url:'/product/getSecondHandProductRecommend', data, isLoading: true })
 	}
+	/**
+	 *@协销-关键词搜索订单
+	 *@param  userId:商品ID(数字类型,必传)
+	 *@param pageNum:机构会所ID(同之前)
+	 *@param pageSize:协销ID(同之前)
+	 */
+	getSellerOrderList (data={}){
+		return this.AjaxService.get({ url:'/seller/searchOrder', data, isLoading: true })
+	}
+	
+	
 }