diff --git a/app.wxss b/app.wxss
index 20b67fd..c110751 100644
--- a/app.wxss
+++ b/app.wxss
@@ -144,6 +144,10 @@
margin-right: 20rpx;
}
+.h68 {
+ height: 68rpx;
+}
+
.ib{
display: inline-block;
}
diff --git a/packageA/pages/distribution/goods/goods.js b/packageA/pages/distribution/goods/goods.js
index 853501e..776cee7 100644
--- a/packageA/pages/distribution/goods/goods.js
+++ b/packageA/pages/distribution/goods/goods.js
@@ -344,6 +344,10 @@ Page({
};
if(data.page) delete data.page;
if(data.key) delete data.key;
+ // if(data.nation_id) delete data.nation_id;
+ // if(data.brand_id) delete data.brand_id;
+ // if(data.startprice) delete data.startprice;
+ // if(data.endprice) delete data.endprice;
this.setData({
currentTabIndex: currentIndex,
@@ -427,12 +431,12 @@ Page({
/**
* promiseGet请求数据
*/
- getData: function(isInit, url, data) {
+ getData: function(isInit, url, data, isShowLoading) {
return new Promise(function(resolve, reject) {
app.request.promiseGet(url, {
data: data,
- isShowLoading: true,
+ isShowLoading: !isShowLoading ? isShowLoading : true,
})
.then(function(res) {
// console.log('1121', res.data.code);
@@ -581,11 +585,26 @@ Page({
userId: app.globalData.user_id,
goods: checkedList,
},
- }).then(function() {
- self.setData({
- isCheckAll: false,
- });
- self.getData(true, '/api/weshop/goods/page?is_mainshow=1&isonsale=1&dis_type=1', self.data.currentQuery);
+ }).then(function(res) {
+ if(res.data.code == 0) {
+ self.setData({
+ isCheckAll: false,
+ });
+ wx.showToast({
+ title: '上架成功',
+ icon: 'success',
+ duration: 1000,
+ });
+
+ self.getData(true, '/api/weshop/goods/page?is_mainshow=1&isonsale=1&dis_type=1', self.data.currentQuery, false);
+ } else {
+ wx.showToast({
+ title: '上架失败',
+ icon: 'success',
+ duration: 1000,
+ });
+ }
+
});
},
@@ -611,12 +630,25 @@ Page({
app.request.promisePost('/api/weshop/users/distribut/DownGoods', {
is_json: true,
data: data,
- }).then(function() {
- // console.log('data', self.data.currentQuery);
- self.setData({
- isCheckAll: false,
- });
- self.getData(true, '/api/weshop/goods/page?dis_type=1&searchtype=1', self.data.currentQuery);
+ }).then(function(res) {
+ if(res.data.code == 0) {
+ self.setData({
+ isCheckAll: false,
+ });
+ wx.showToast({
+ title: '下架成功',
+ icon: 'success',
+ duration: 1000,
+ });
+ self.getData(true, '/api/weshop/goods/page?dis_type=1&searchtype=1', self.data.currentQuery, false);
+ } else {
+ wx.showToast({
+ title: '下架失败',
+ icon: 'success',
+ duration: 1000,
+ });
+ }
+
});
},
@@ -694,7 +726,10 @@ Page({
if(!data.nation_id && !data.brand_id && !startprice && !endprice && !this.data.inputVal) {
this.setData({
isHiddenDropdown: true,
+ currentTabIndex: 0,
});
+ if(data.orderField) delete data.orderField;
+ this.getData(true, '/api/weshop/goods/page', data);
return;
};
diff --git a/packageA/pages/distribution/shop/shop.wxml b/packageA/pages/distribution/shop/shop.wxml
index e33c3f9..4d738d5 100644
--- a/packageA/pages/distribution/shop/shop.wxml
+++ b/packageA/pages/distribution/shop/shop.wxml
@@ -69,24 +69,24 @@
- {{item.goods_name}}
+ {{item.goods_name}}
-
+
{{item.prom_integral}}积分
+
- ¥
- {{item.prom_price}}
+
+ {{item.prom_price}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
@@ -97,38 +97,38 @@
-
+
- ¥
- {{filter.toFix(item[card_field],2)}}
-
+
+ {{filter.toFix(item[card_field],2)}}
+
- {{card_name}}
+ {{card_name}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
-
+
- ¥
- {{filter.toFix(item.shop_price,2)}}
+
+ {{filter.toFix(item.shop_price,2)}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
@@ -136,43 +136,43 @@
-
+
- ¥
- {{filter.toFix(item.shop_price,2)}}
+
+ {{filter.toFix(item.shop_price,2)}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
- ¥
- {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}
-
+
+ {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}
+
image>
- {{g_filter.get_card_price(item,card_list,1)}}
+ {{g_filter.get_card_price(item,card_list,1)}}
-
+
- ¥
- {{filter.toFix(item.shop_price,2)}}
+
+ {{filter.toFix(item.shop_price,2)}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
@@ -180,24 +180,24 @@
-
+
- ¥
- {{filter.toFix(item.shop_price,2)}}
+
+ {{filter.toFix(item.shop_price,2)}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
- 分成金额:{{item.fcommission}}
+ 分成金额:{{filter.toFix(item.commission,2)}}
@@ -211,23 +211,23 @@
- {{item.goods_name}}
+ {{item.goods_name}}
-
+
{{item.prom_integral}}积分
+
- ¥
- {{item.prom_price}}
+
+ {{item.prom_price}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
@@ -238,38 +238,38 @@
-
+
- ¥
- {{filter.toFix(item[card_field],2)}}
-
+
+ {{filter.toFix(item[card_field],2)}}
+
- {{card_name}}
+ {{card_name}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
-
+
- ¥
- {{filter.toFix(item.shop_price,2)}}
+
+ {{filter.toFix(item.shop_price,2)}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
@@ -277,43 +277,43 @@
-
+
- ¥
- {{filter.toFix(item.shop_price,2)}}
+
+ {{filter.toFix(item.shop_price,2)}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
- ¥
- {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}
-
+
+ {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}
+
image>
- {{g_filter.get_card_price(item,card_list,1)}}
+ {{g_filter.get_card_price(item,card_list,1)}}
-
+
- ¥
- {{filter.toFix(item.shop_price,2)}}
+
+ {{filter.toFix(item.shop_price,2)}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
@@ -321,24 +321,24 @@
-
+
- ¥
- {{filter.toFix(item.shop_price,2)}}
+
+ {{filter.toFix(item.shop_price,2)}}
- ¥
- {{item.market_price}}
+
+ {{item.market_price}}
- 分成金额:1.00
+ 分成金额:{{filter.toFix(item.commission,2)}}
diff --git a/packageA/pages/distribution/shop/shop.wxss b/packageA/pages/distribution/shop/shop.wxss
index e2c4529..945bd77 100644
--- a/packageA/pages/distribution/shop/shop.wxss
+++ b/packageA/pages/distribution/shop/shop.wxss
@@ -104,6 +104,10 @@ page {
/* word-break: break-all;
word-wrap: break-word; */
}
+.money::before {
+ content: '¥';
+ font-size: 22rpx;
+}
.md {
position: relative;
}
@@ -578,18 +582,18 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
.card_bg {
box-sizing: border-box;
padding: 2rpx 10rpx;
- height: 28rpx;
+ /* height: 28rpx; */
border-radius: 26rpx;
- font-size: 18rpx;
- line-height: 28rpx;
- max-width: 210rpx;
+ font-size: 20rpx;
+ /* line-height: 28rpx; */
+ max-width: 200rpx;
background: #333;
color: #fff;
margin-left: 8rpx;
display: flex;
align-items: center;
- position: relative;
- top: -4rpx;
+ /* position: relative;
+ top: -4rpx; */
}
.card_bg image {
diff --git a/pages/distribution/distribution.js b/pages/distribution/distribution.js
index d2c6aeb..e210a4d 100644
--- a/pages/distribution/distribution.js
+++ b/pages/distribution/distribution.js
@@ -55,32 +55,51 @@ Page({
self.setData({
data: res.data.data,
});
+
+ // 广告banner
+ app.request.promiseGet("/api/weshop/ad/page", {
+ data: {
+ pid: 401,
+ enabled: 1,
+ store_id: app.globalData.setting.stoid,
+ }
+ }).then(res => {
+ if(res.data.code == 0 && res.data.data) {
+ let item = res.data.data.pageData[0];
+ if(item && item.ad_code) {
+ self.setData({
+ ad_img: item.ad_code,
+ });
+ };
+ };
+ });
} else {
// if(!res.data.data.is_distribut) {//如果不是分销商:0不是,1是
- app.request.promiseGet('/api/weshop/users/distribut/getIsDistribut', {
- data: {
- storeId: self.data.userInfo.store_id,
- userId: self.data.userInfo.user_id,
- first_leader: self.data.userInfo.first_leader,
- },
- isShowLoading: true,
- }).then(function(res) {
- console.log('!!!===>', res);
- if(res.data.code == 0) {
- self.setData({
- fenxiao: res.data.data,
- });
- } else {
- self.setData({
- msg: res.data.msg,
- });
- }
-
- });
+ app.request.promiseGet('/api/weshop/users/distribut/getIsDistribut', {
+ data: {
+ storeId: self.data.userInfo.store_id,
+ userId: self.data.userInfo.user_id,
+ first_leader: self.data.userInfo.first_leader,
+ },
+ isShowLoading: true,
+ }).then(function(res) {
+ console.log('!!!===>', res);
+ if(res.data.code == 0) {
+ self.setData({
+ fenxiao: res.data.data,
+ });
+ } else {
+ self.setData({
+ msg: res.data.msg,
+ });
+ }
+
+ });
- // };
+
+
};
},
diff --git a/pages/distribution/distribution.wxml b/pages/distribution/distribution.wxml
index 4bd5be3..58ae2f8 100644
--- a/pages/distribution/distribution.wxml
+++ b/pages/distribution/distribution.wxml
@@ -2,10 +2,11 @@
-
+
+
- {{filter.show_default(userInfo.nickname)}}
+ {{filter.show_default(userInfo.nickname)}}
diff --git a/pages/distribution/distribution.wxss b/pages/distribution/distribution.wxss
index 0c713bd..f4c75c3 100644
--- a/pages/distribution/distribution.wxss
+++ b/pages/distribution/distribution.wxss
@@ -9,10 +9,19 @@ page {
.avatar-container {
padding-top: 60rpx;
padding-bottom: 60rpx;
- background: url(https://mshopimg.yolipai.net/miniapp/images/user_index_powder.jpg) no-repeat 100% 100%;
+ /* background: url(https://mshopimg.yolipai.net/miniapp/images/user_index_powder.jpg) no-repeat 100% 100%; */
+ position: relative;
/* background-size: 100%; */
}
+.bgImg {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+
.avatar {
width: 160rpx;
height: 160rpx;
diff --git a/pages/goods/categoryList/categoryList.wxml b/pages/goods/categoryList/categoryList.wxml
index 0c29be4..2a536ed 100644
--- a/pages/goods/categoryList/categoryList.wxml
+++ b/pages/goods/categoryList/categoryList.wxml
@@ -110,10 +110,10 @@
-
-
-
-
+
+
+
+
@@ -285,7 +285,7 @@
-
+
diff --git a/pages/goods/categoryList/categoryList.wxss b/pages/goods/categoryList/categoryList.wxss
index be94932..9cc07cc 100644
--- a/pages/goods/categoryList/categoryList.wxss
+++ b/pages/goods/categoryList/categoryList.wxss
@@ -61,14 +61,14 @@ swiper{
margin-right: 12rpx;
width: 30rpx;
height: 30rpx;
- margin-top: -20rpx;
+ margin-top: -8rpx;
margin-left: 20rpx;
}
.search-cont {
height: 58rpx;
width: 536rpx;
- padding-left: 12rpx;
+ /* padding-left: 12rpx; */
line-height: 58rpx;
font-size: 28rpx;
color: #666;
@@ -195,7 +195,7 @@ margin-top: 8rpx;
}
.search-img.left{
- margin-left: 35rpx;
+ /* margin-left: 35rpx; */
}
.xc-search-inner {