diff --git a/App.vue b/App.vue
index 9b0e1a3..6b499f3 100644
--- a/App.vue
+++ b/App.vue
@@ -6,12 +6,14 @@
login_status:true,
phone:null,
bannerList: [],
- pricePreviewList: []
+ pricePreviewList: [],
+ configData: [],
},
onLaunch: function() {
routerInterception()
this.getBannerList()
this.getPricePreviewList()
+ this.getConfigData()
// console.log(this.$utils)
console.log('App Launch')
},
@@ -40,7 +42,17 @@
uni.$emit('pricePreviewListUpdated')
}
})
- }
+ },
+ getConfigData() {
+ this.$api('getConfig', {}, res => {
+ // console.log('Config data response:', JSON.parse(JSON.stringify(res)) )
+ if (res && res.success && Array.isArray(res.result)) {
+ getApp().globalData.configData = res.result
+ // console.log('Config data set:', JSON.parse(JSON.stringify(this.configData)) )
+ }
+ })
+ },
+
}
}
diff --git a/api/model/index.js b/api/model/index.js
index b6934e3..8e200da 100644
--- a/api/model/index.js
+++ b/api/model/index.js
@@ -8,151 +8,150 @@ const api = {
auth : false,
},
- getRiceIconList: {
- url: '/index_common/getRiceIconList',
+ getHanHaiMemberUser: {
+ url: '/recycle-admin/applet/promotion/getHanHaiMemberUser',
method: 'GET',
+ auth: true,
},
- // 获取首页新闻详情
- getRiceNewsDetail: {
- url: '/index_common/getCommonNewsDetail',
- method: 'GET',
+ // 升级用户为推广官
+ upgrade: {
+ url: '/recycle-admin/applet/info_team/upgrade',
+ method: 'POST',
+ auth: true,
},
- // 获取首页新闻列表
- getRiceNewsList: {
- url: '/index_common/getRiceNewsList',
- method: 'GET',
+ // 拉黑用户
+ blackUser: {
+ url: '/recycle-admin/applet/info_team/blackUser',
+ method: 'POST',
+ auth: true,
},
- // 获取首页公告列表
- getRiceNoticeList: {
- url: '/index_common/getRiceNoticeList',
- method: 'GET',
+ // 订单驳回
+ rejectOrder: {
+ url: '/recycle-admin/applet/info_team_order/rejectOrder',
+ method: 'POST',
+ auth: true,
},
- // 获取首页商品详情
- getRiceProductDetail: {
- url: '/index_common/getRiceProductDetail',
- method: 'GET',
+ // 订单通过
+ passOrder: {
+ url: '/recycle-admin/applet/info_team_order/passOrder',
+ method: 'POST',
+ auth: true,
},
- // 获取首页体验产品
- getRiceProductList: {
- url: '/index_common/getRiceProductList',
- method: 'GET',
+ // 解除员工
+ removeMember: {
+ url: '/recycle-admin/applet/member/removeMember',
+ method: 'POST',
+ auth: true,
},
- // 查询分类接口
- getCategoryList: {
- url: '/index_common/getCategoryList',
+ // 查询员工列表
+ getMyTeamList: {
+ url: '/recycle-admin/applet/member/getMyTeamList',
method: 'GET',
+ auth: true,
},
- // 新查询分类以及商品数据接口
- getCategoryPidList: {
- url: '/index_common/getCategoryPidList',
+ // 查询员工详情
+ getMemberInfo: {
+ url: '/recycle-admin/applet/member/getMemberInfo',
method: 'GET',
- debounce : 250,
+ auth: true,
},
- // 查询一级分类接口
- getPidList: {
- url: '/index_common/getCategoryPidList',
- method: 'GET',
+ // 拒绝推广官申请
+ rejectPromotionApply: {
+ url: '/recycle-admin/applet/promotion/rejectPromotionApply',
+ method: 'POST',
+ auth: true,
},
- // 获取分类分页商品列表接口
- getClassShopPageList: {
- url: '/index_common/getClassShopPageList',
- method: 'GET',
+ // 同意推广官申请
+ passPromotionApply: {
+ url: '/recycle-admin/applet/promotion/passPromotionApply',
+ method: 'POST',
+ auth: true,
},
- // 加入购物车
- addCart: {
- url: '/index_common/addCart',
+ // 获取推广表单申请列表带分页
+ getPromotionApplyListPage: {
+ url: '/recycle-admin/applet/promotion/getPromotionApplyListPage',
method: 'GET',
auth: true,
- showLoading: true,
- limit : 500,
},
- // 删除购物车信息
- deleteCart: {
- url: '/index_common/deleteCart',
- method: 'DELETE',
+ // 获取推广员列表
+ getPromotionList: {
+ url: '/recycle-admin/applet/promotion/getPromotionList',
+ method: 'GET',
auth: true,
- showLoading: true,
},
// 修改购物车信息数量
- updateCartNum: {
- url: '/index_common/updateCartNum',
- method: 'POST',
+ getUserOrderNum: {
+ url: '/recycle-admin/applet/info_team_order/getUserOrderNum',
+ method: 'GET',
auth: true,
- debounce: 300,
},
- // 创建订单
- createOrder: {
- url: '/index_common/createOrder',
+ // 获取管理员订单详情
+ getOrderDetail: {
+ url: '/recycle-admin/applet/info_team_order/getOrderDetail',
method: 'GET',
auth: true,
- limit: 1000,
- showLoading: true,
},
- // 创建订单-再次支付
- createOrderTwo: {
- url: '/index_common/createOrderTwo',
+ // 获取管理员订单列表
+ getOrderList: {
+ url: '/recycle-admin/applet/info_team_order/getOrderList',
method: 'GET',
- auth: true,
- limit: 1000,
- showLoading: true,
+ auth: true
},
- // 多商品创建订单
- createSumOrder: {
- url: '/index_common/createSumOrder',
+ // 创建预约订单
+ createOrder: {
+ url: '/recycle-admin/applet/order/createOrder',
method: 'POST',
auth: true,
- limit: 1000,
- showLoading: true,
},
- // 多商品订单再次支付
- createSumOrderAgain: {
- url: '/index_common/createSumOrderAgain',
- method: 'POST',
+ // 流水列表带分页
+ getMyMoneyLogPage: {
+ url: '/recycle-admin/applet/money/getMyMoneyLogPage',
+ method: 'GET',
auth: true,
- limit: 1000,
- showLoading: true,
},
// 确认收货
- confirmOrder: {
- url: '/index_common/confirmOrder',
- method: 'GET',
+ apply: {
+ url: '/recycle-admin/applet/promotion/apply',
+ method: 'POST',
auth: true,
- limit: 1000,
- showLoading: true,
},
- // 取消订单
- cancelOrder: {
- url: '/index_common/cancelOrder',
+ // 获取推广官信息
+ getMyPromotionInfo: {
+ url: '/recycle-admin/applet/promotion/getMyPromotionInfo',
method: 'GET',
auth: true,
- limit: 1000,
- showLoading: true,
},
// 获取首页广告列表
- getRiceProductList: {
- url: '/index_common/getRiceAdList',
+ getRankList: {
+ url: '/recycle-admin/applet/promotion/getRankList',
method: 'GET',
+ auth : true
},
- // 获取首页广告列表
- getRiceAdDetail: {
- url: '/index_common/getRiceAdDetail',
+ // 获取品牌列表
+ getGoodsBrandList: {
+ url: '/recycle-admin/applet/class/getGoodsBrandList',
method: 'GET',
+ auth : false
},
- //获取优惠券信息
- getRiceCouponList: {
- url: '/info_common/getRiceCouponList',
+ //联系客服页面
+ getQuestionList: {
+ url: '/recycle-admin/applet/order/getQuestionList',
method: 'GET',
+ auth : false
},
- //增加或者修改合伙人申请信息
- addOrUpdateCommonUser: {
- url: '/index_common/addOrUpdateCommonUser',
- method: 'POST',
+ //获取用户信息
+ getInfoTeamListPage: {
+ url: '/recycle-admin/applet/info_team/getInfoTeamListPage',
+ method: 'GET',
+ auth : true
},
- //根据用户查询渠合伙人申请信息表单
- getCommonUser: {
- url: '/index_common/getCommonUser',
- method: 'GET'
+ //查看订单详情
+ getOrderDetail: {
+ url: '/recycle-admin/applet/order/getOrderDetail',
+ method: 'GET',
+ auth : true
},
+
//查看最近回收质检报告
getQualityReport: {
url: '/recycle-admin/applet/index/getQualityReport',
diff --git a/pages.json b/pages.json
index 44b9b8b..f3fffc4 100644
--- a/pages.json
+++ b/pages.json
@@ -215,6 +215,27 @@
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
+ },
+ {
+ "path": "promotion-withdraw-record",
+ "style": {
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "promotion-profit-detail",
+ "style": {
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "promotion-team",
+ "style": {
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": true
+ }
}
]
},
@@ -279,7 +300,7 @@
"path": "staff",
"style": {
"navigationStyle": "custom",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
},
{
@@ -293,7 +314,7 @@
"path": "tui",
"style": {
"navigationStyle": "custom",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
},
{
diff --git a/pages/component/home.vue b/pages/component/home.vue
index 11265fe..ce969d1 100644
--- a/pages/component/home.vue
+++ b/pages/component/home.vue
@@ -44,7 +44,7 @@
已开通包邮服务城市有哪些?
- 武汉市、北京市、上海市、武汉市、北京市、上海市...
+ {{ cityListStr }}
@@ -178,22 +178,8 @@ export default {
return {
value:0,
processes: [
- // { icon: '/static/home/① 在线预约.png', text: '在线预约' },
- // { icon: '/static/home/② 快递上门.png', text: '快递上门' },
- // { icon: '/static/home/③ 透明质检.png', text: '透明质检' },
- // { icon: '/static/home/④ 现金打款.png', text: '现金打款' }
],
priceList: [],
- priceListStatic: [
- { icon: '/static/home/羽绒服.png', name: '羽绒服', price: '3-10', unit: '件' },
- { icon: '/static/home/鞋子.png', name: '鞋子', price: '3-10', unit: '件' },
- { icon: '/static/home/包包.png', name: '包包', price: '3-10', unit: '件' },
- { icon: '/static/home/床被.png', name: '床被', price: '3-10', unit: '件' },
- { icon: '/static/home/品牌服饰.png', name: '品牌服饰', price: '3-10', unit: '件' },
- { icon: '/static/home/T 恤衬衣.png', name: 'T恤衬衫', price: '3-10', unit: '件' },
- { icon: '/static/home/羽绒裤.png', name: '羽绒裤', price: '3-10', unit: '件' },
- { icon: '/static/home/儿童羽绒服.png', name: '儿童羽绒服', price: '3-10', unit: '件' }
- ],
records: [],
destinations: [
{
@@ -218,9 +204,21 @@ export default {
}
],
bannerList: [],
- pricePreviewList: []
+ pricePreviewList: [],
+ cityList: []
}
},
+ computed: {
+ cityListStr() {
+ // 只取前8个城市,超出用...结尾
+ const names = this.cityList.map(c => c.name)
+ const max = 8
+ if (names.length > max) {
+ return names.slice(0, max).join('、') + '...'
+ }
+ return names.join('、')
+ },
+ },
methods: {
changeTo(e){
this.value = e
@@ -282,20 +280,22 @@ export default {
getPricePreview() {
const resList = this.pricePreviewList || []
if (Array.isArray(resList)) {
- // 只取一级分类,按sort升序
+ // 只取一级分类,按sort升序
const firstLevel = resList.filter(item => item.pid === '0').sort((a, b) => a.sort - b.sort)
- this.priceList = firstLevel.map(item => {
- // 从静态表中找图片和价格
- const staticItem = this.priceListStatic.find(s => s.name.replace(/\s/g, '') === item.title.replace(/\s/g, ''))
- return {
- id: item.id, // 保证有id
- icon: staticItem ? staticItem.icon : '',
- name: item.title,
- price: staticItem ? staticItem.price : '',
- unit: '件'
- }
- })
- }
+ // console.log(firstLevel,'firstLevel');
+ this.priceList = firstLevel.map(item => {
+ // 从静态表中找图片和价格
+ // const staticItem = this.priceListStatic.find(s => s.name.replace(/\s/g, '') === item.title.replace(/\s/g, ''))
+ // console.log(item,'item');
+ return {
+ id: item.id, // 保证有id
+ icon: item.icon ? item.icon : '',
+ name: item.title,
+ price: item.priceNo ? item.priceNo : '',
+ unit: item.unit ? item.unit : ''
+ }
+ })
+ }
},
getRecentGoods() {
this.$api('getRecentGoodsList', {}, res => {
@@ -316,6 +316,16 @@ export default {
uni.navigateTo({
url: `/pages/subcomponent/inspection-report?id=${item.id}`
})
+ },
+ getFreeCityList() {
+ this.$api('getFreeCityList', {}, res => {
+ if (res && res.code === 200 && Array.isArray(res.result)) {
+ // 只取一级城市(有children的name)
+ this.cityList = res.result.map(item => ({ name: item.name })).filter(item => item.name)
+ } else {
+ this.cityList = []
+ }
+ })
}
},
onLoad() {
@@ -324,6 +334,7 @@ export default {
this.getRecentGoods();
this.pricePreviewList = getApp().globalData.pricePreviewList || []
this.bannerList = getApp().globalData.bannerList || []
+ this.getFreeCityList();
uni.$on('pricePreviewListUpdated', () => {
this.pricePreviewList = getApp().globalData.pricePreviewList || []
this.getPricePreview()
@@ -339,6 +350,7 @@ export default {
onShow() {
// 移除自动下拉刷新
// uni.startPullDownRefresh()
+ this.getPricePreview();
}
}
@@ -495,7 +507,7 @@ export default {
color: #999;
}
}
-
+
.submit-btn {
background: linear-gradient(to right, #ffd01e, #ff8917);
border-radius: 70rpx;
@@ -647,10 +659,10 @@ export default {
border-radius: 16rpx;
padding: 10rpx;
background-color: #fff8ea;
- image{
- width: 60rpx;
- height: 60rpx;
- }
+ image{
+ width: 60rpx;
+ height: 60rpx;
+ }
.location {
font-size: 28rpx;
color: #333;
@@ -665,23 +677,23 @@ export default {
}
.user-id {
- font-family: PingFang SC;
+ font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
- line-height: 140%;
- letter-spacing: 0%;
- text-align: center;
- color: #183c5c;
+ line-height: 140%;
+ letter-spacing: 0%;
+ text-align: center;
+ color: #183c5c;
}
- .user-id-f{
- font-family: PingFang SC;
- font-weight: 400;
+ .user-id-f{
+ font-family: PingFang SC;
+ font-weight: 400;
font-size: 22rpx;
- line-height: 140%;
- letter-spacing: 0%;
- text-align: center;
- color: #9b9b9b;
- }
+ line-height: 140%;
+ letter-spacing: 0%;
+ text-align: center;
+ color: #9b9b9b;
+ }
}
}
diff --git a/pages/component/my.vue b/pages/component/my.vue
index 1d15e14..047ee73 100644
--- a/pages/component/my.vue
+++ b/pages/component/my.vue
@@ -43,7 +43,7 @@
{{userInfo.nickName}}
- {{userInfo.id}}
+ ID: {{userInfo.intentioCode}}
@@ -61,7 +61,7 @@
累计回收
- 341
+ {{totalOrders}}
单
@@ -74,24 +74,24 @@
-
+