From 0556e2bfdf6e9424ef6ef12abe08fc9d7b44cf1b Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Sat, 16 Jan 2021 08:54:05 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/jyyforjava/hive-xcx
---
pages/yuyue/choseService.js | 47 ++++++++++++++++-------------------------------
1 files changed, 16 insertions(+), 31 deletions(-)
diff --git a/pages/yuyue/choseService.js b/pages/yuyue/choseService.js
index f8827c5..0021fdf 100644
--- a/pages/yuyue/choseService.js
+++ b/pages/yuyue/choseService.js
@@ -9,7 +9,8 @@
*/
data: {
cates: [{ attrName: "全部", attrCode:""}],
- serviceList:[],
+ composeProj:[],
+ proj:[],
cateIndex:0,
offset: 0,
limit:10,
@@ -34,34 +35,24 @@
onLoad: function (options) {
var _this=this;
//加载分类
- util.request({
- api: api.productAttribute.getByCode + app.shopInfo.id+"/service",
- callback:function(data){
- var cates = _this.data.cates.concat(data.rows);
- _this.setData({
- cates: cates
- });
- _this.loadService();
- }
- });
+ _this.loadService();
},
loadService:function(){
var _this = this;
- var categoryId = _this.data.cates[_this.data.cateIndex].attrId;
- var serviceList = _this.data.serviceList;
-
+ var userInfo= getApp().userInfo;
+ var phoneNumber=userInfo.phoneNumber;
util.request({
- api: api.goods.searchGoods,
- data: { categoryId: categoryId, isService: 1, offset: _this.data.offset,limit:_this.data.limit},
- callback:function(data){
- for (var i = 0; i < data.rows.length; i++) {
- serviceList.push(data.rows[i])
- }
+ api:'/wxapi/yuyue/getUserPro/'+phoneNumber,
+
+ callback:function(data){
+ var composeProj=data.mapInfo.proj.composeProj;
+ var proj=data.mapInfo.proj.proj;
_this.setData({
- serviceList: serviceList,
+ composeProj: composeProj,
+ proj:proj
});
}
});
@@ -69,20 +60,14 @@
// 上拉加载
onReachBottom: function () {
- var _this = this;
- var offset = _this.data.offset;
- var limit = _this.data.limit;
- _this.setData({
- offset: offset + limit
- });
- this.loadService();
+
},
chooseService:function(e){
- var index=e.currentTarget.dataset.index;
- var service =this.data.serviceList[index];
- wx.setStorageSync('chooseService', service);
+ var item=e.currentTarget.dataset.pro;
+
+ wx.setStorageSync('chooseService', item);
wx.navigateBack({
delta: 1,
});
--
Gitblit v1.9.1