From 0fe1631877ddbbf12b2c1d346e426e296bc9c4b4 Mon Sep 17 00:00:00 2001
From: Wik-T <812952667@qq.com>
Date: Tue, 23 Aug 2022 10:42:12 +0800
Subject: [PATCH] =?UTF-8?q?1.=E5=9C=A8=E7=BA=BF=E5=8A=A0=E6=B2=B9=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E9=97=AE=E9=A2=98=202.=E6=96=B0=E5=A2=9E=E6=88=91?=
=?UTF-8?q?=E7=9A=84=E6=8E=A8=E5=B9=BF=EF=BC=8C=E5=88=86=E9=94=80=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Utils/Api.js | 29 +-
Utils/Request.js | 2 +-
pages.json | 69 +++--
pages/goods/refuel-confirm/refuel-confirm.vue | 2 +-
pages/goods/refuel-details/refuel-details.vue | 49 +--
pages/goods/refuel/refuel.vue | 6 +
pages/login/register.vue | 26 +-
pages/order/confirmation.vue | 31 +-
pages/qianZhuPay/union-pay/union-pay.vue | 2 +-
pages/tabBar/category/category.vue | 4 +-
pages/tabBar/home/home.vue | 33 +-
pages/tabBar/user/user.vue | 38 ++-
pages/user/generatePoster/generatePoster.vue | 34 ++
pages/user/myPromotion/myPromotion.vue | 291 ++++++++++++++++++
pages/user/order_list/order_list.vue | 22 +-
pages/welcome/welcome.vue | 51 ++-
qianzhu-KFC/order-details/order-details.vue | 1 +
static/img/user/1.png | Bin 0 -> 2694 bytes
static/img/user/2.png | Bin 0 -> 2606 bytes
subPages/rechargeDetails/rechargeDetails.vue | 3 +
subPages/selectEntry/selectEntry.vue | 63 ++++
uni.scss | 7 +
22 files changed, 667 insertions(+), 96 deletions(-)
create mode 100644 pages/user/generatePoster/generatePoster.vue
create mode 100644 pages/user/myPromotion/myPromotion.vue
create mode 100644 static/img/user/1.png
create mode 100644 static/img/user/2.png
create mode 100644 subPages/selectEntry/selectEntry.vue
diff --git a/Utils/Api.js b/Utils/Api.js
index 3973b66..5906773 100644
--- a/Utils/Api.js
+++ b/Utils/Api.js
@@ -400,7 +400,26 @@ export const getMemberProducts = params => {
return POST('GET', `${base}/highThirdParty/getMemberProducts`, params).then(res => res.data);
}
-
+//分销统计数据
+export const userDistributionStatistics = params => {
+ return POST('GET', `${base}/highUser/userDistributionStatistics`, params).then(res => res.data);
+}
+//邀请列表
+export const distributionInviteList = params => {
+ return POST('GET', `${base}/highUser/distributionInviteList`, params).then(res => res.data);
+}
+//分销用户积分列表
+export const distributionOrderList = params => {
+ return POST('GET', `${base}/highUser/distributionOrderList`, params).then(res => res.data);
+}
+//分销用户积分列表
+export const promoteOrderList = params => {
+ return POST('GET', `${base}/highUser/promoteOrderList`, params).then(res => res.data);
+}
+//生成海报
+export const promotionalPosters = params => {
+ return POST('GET', `${base}/highUser/promotionalPosters`, params).then(res => res.data);
+}
export const qzOrderToPay = params => {
return POST('POST', `${base}/order/qzOrderToPay`, params).then(res => res.data);
@@ -416,7 +435,13 @@ export const cancelOrderByOrderNo = params => {
/**
* H5 获取用户信息
- */
+ */
+
+//h5静默登陆
+export const loginBySilence = params => {
+ return POST('GET', `${base}/wechat/loginBySilence`, params).then(res => res.data);
+}
+
export const getH5UserInfo = params => {
return POST('GET', `${base}/wechat/getH5UserInfo`, params).then(res => res.data);
}
diff --git a/Utils/Request.js b/Utils/Request.js
index fa09372..f61d2d1 100644
--- a/Utils/Request.js
+++ b/Utils/Request.js
@@ -13,7 +13,7 @@ function request(method, url, data) {
'mchId': app.globalData.mchId,
'regionId': app.globalData.cityId,
}, //有的时候这里不一定是 token 还可能是 Authorization
- success(res) {
+ success(res) {
resolve(res)
if (res.statusCode === 401 || res.data.return_code == 102014 || res.data.return_code ==
104001) {
diff --git a/pages.json b/pages.json
index 8d878b1..0eb5fc6 100644
--- a/pages.json
+++ b/pages.json
@@ -1,14 +1,13 @@
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
- {
- "path" : "pages/welcome/welcome",
- "style" :
- {
- "navigationBarTitleText": "",
- "enablePullDownRefresh": false
- }
-
- },{
+ {
+ "path": "pages/welcome/welcome",
+ "style": {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }, {
"path": "pages/tabBar/home/home",
"style": {
"navigationBarTextStyle": "white",
@@ -306,7 +305,7 @@
}, {
"path": "pages/goods/recording/recording",
"style": {
- "navigationBarTitleText": "积分记录",
+ "navigationBarTitleText": "积分记录",
"enablePullDownRefresh": false
}
@@ -469,18 +468,36 @@
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white"
}
+ }, {
+ "path": "pages/userLogin/agreement/agreement",
+ "style": {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
}
- ,{
- "path" : "pages/userLogin/agreement/agreement",
- "style" :
- {
- "navigationBarTitleText": "",
- "enablePullDownRefresh": false
- }
-
- }
-
- ],
+
+ , {
+ "path": "pages/user/myPromotion/myPromotion",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "我的推广",
+ "backgroundTextStyle": "light"
+ // "navigationBarBackgroundColor": "#44AE3F",
+ // "backgroundColorTop": "#44AE3F",
+ // "navigationBarTextStyle": "white"
+ }
+
+ }, {
+ "path": "pages/user/generatePoster/generatePoster",
+ "style": {
+ "navigationBarTitleText": "查看海报",
+ "enablePullDownRefresh": false
+ }
+
+ }
+
+ ],
"subpackages": [{
"root": "subPages",
"pages": [{
@@ -775,6 +792,16 @@
"onReachBottomDistance": 50
}
+ }, {
+ "path": "selectEntry/selectEntry",
+ "style": {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false,
+ "app-plus": {
+ "titleNView": false //禁用原生导航栏
+ }
+ }
+
}
]
}, {
diff --git a/pages/goods/refuel-confirm/refuel-confirm.vue b/pages/goods/refuel-confirm/refuel-confirm.vue
index 4f0969d..ad7d419 100644
--- a/pages/goods/refuel-confirm/refuel-confirm.vue
+++ b/pages/goods/refuel-confirm/refuel-confirm.vue
@@ -265,7 +265,7 @@
},
onShow() {
let that = this;
- that.paytype = '';
+ // that.paytype = '';
that.findUser();
},
methods: {
diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue
index 39b1529..c16bace 100644
--- a/pages/goods/refuel-details/refuel-details.vue
+++ b/pages/goods/refuel-details/refuel-details.vue
@@ -72,6 +72,14 @@
约{{oilLiters}}L
+
+
+
+
-
+
+
+
+ 邀请码
+
+
+
+
@@ -131,6 +138,8 @@
+
+
-
+
diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue
index a95e030..d2728ab 100644
--- a/pages/tabBar/home/home.vue
+++ b/pages/tabBar/home/home.vue
@@ -223,7 +223,7 @@
success(e) {
if (e.data) {
if (app.globalData.accountId == '000001&key' || app.globalData.accountId ==
- '000000&gasKey') {
+ '000000&gasKey' || app.globalData.accountId == '000009&key' || app.globalData.accountId == '0000010&key') {
app.globalData.staffCode = e.data;
} else {
app.globalData.mchId = e.data;
@@ -234,7 +234,7 @@
// #endif
},
onLoad(options) {
- let that = this;
+ let that = this;
// #ifdef MP
// 1.wx获取登录用户code
uni.login({
@@ -256,9 +256,9 @@
that.postionIng();
// #endif
// #ifdef H5
- if (app.globalData.h5code) {
- that.getH5AccessToken();
- }
+ // if (app.globalData.h5code) {
+ // that.getH5AccessToken();
+ // }
uni.showLoading({
title: '加载中'
})
@@ -460,7 +460,7 @@
lng: item,
lat: item1
}
- findByLatAndLng(datas).then(res => {
+ findByLatAndLng(datas).then(res => {
if (res.return_code == '000000') {
that.city = res.return_data.result.addressComponent.province;
app.globalData.cityName = res.return_data.result.addressComponent
@@ -476,7 +476,7 @@
that.getCmsAactibity();
that.getCmsContentcmshome();
that.getCmsContentcmsContent();
- }
+ }
uni.getStorage({
key: 'accountType',
success(e) {
@@ -491,6 +491,10 @@
// 004 肯德基
// 005 会员充值
// 006 话费充值
+ // 007 在线加油
+ // 008 工会卡卡券
+ // 009 分销推广优选商品
+ // 0010 只跳首页
if (e.data == '000000#/' && app.globalData.h5code) {
uni.navigateTo({
url: '../../goods/refuel-details/refuel-details'
@@ -532,6 +536,21 @@
url: '../../../subPages/recharge/recharge'
})
}
+ if (e.data == '000007&key' && app.globalData.h5code) {
+ uni.navigateTo({
+ url: '../../goods/refuel/refuel'
+ })
+ }
+ if (e.data == '000008&key' && app.globalData.h5code) {
+ uni.navigateTo({
+ url: '../../goods/goods-list/goods-list?id=5'
+ })
+ }
+ if (e.data == '000009&key' && app.globalData.h5code) {
+ uni.navigateTo({
+ url: '/subPages/selectEntry/selectEntry'
+ })
+ }
}
}
})
diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue
index 1157486..a470d2c 100644
--- a/pages/tabBar/user/user.vue
+++ b/pages/tabBar/user/user.vue
@@ -52,11 +52,13 @@
-
+
+
-
+
+
@@ -166,9 +168,9 @@
textnum: '',
textSend: '',
therrNum: '',
- rechargeOrderNum: '', //话费待支付
- whetherCheckNum: '', //未查看数量
- orderPayNum:'', //支付订单数量
+ rechargeOrderNum: '', //话费待支付
+ whetherCheckNum: '', //未查看数量
+ orderPayNum: '', //支付订单数量
headerTop: null,
statusTop: null,
showHeader: true,
@@ -250,12 +252,17 @@
url: '../../login/login?id=2',
text: '代理商登录',
img: 'user/renw.png'
+ },
+ {
+ url: '/pages/user/myPromotion/myPromotion',
+ text: '我的推广',
+ img: 'user/extension.png'
}
// ,
// {
- // url: '/pages/user/Charge/Charge',
- // text: '充话费',
- // img: 'user/bank.png'
+ // url: '/pages/user/generatePoster/generatePoster',
+ // text: '生成海报',
+ // img: 'user/poster.png'
// }
],
//操作列表
@@ -371,8 +378,8 @@
this.user = res.return_data;
this.textnum = res.return_data.unusedCouponNum;
this.textSend = res.return_data.unusedDiscount;
- this.therrNum = res.return_data.unpaid;
- this.whetherCheckNum = res.return_data.whetherCheckNum;
+ this.therrNum = res.return_data.unpaid;
+ this.whetherCheckNum = res.return_data.whetherCheckNum;
this.orderPayNum = res.return_data.orderPayNum;
this.rechargeOrderNum = res.return_data.rechargeOrderNum;
uni.setStorage({
@@ -521,7 +528,10 @@
key: "token",
data: ''
})
- location.reload();
+ // location.reload();
+ uni.navigateTo({
+ url: '/pages/login/register'
+ })
}
});
}
@@ -884,7 +894,7 @@
.box {
width: 25%;
- margin-bottom: 30upx;
+ margin-bottom: 40upx;
.img {
width: 23vw;
diff --git a/pages/user/generatePoster/generatePoster.vue b/pages/user/generatePoster/generatePoster.vue
new file mode 100644
index 0000000..8e889ba
--- /dev/null
+++ b/pages/user/generatePoster/generatePoster.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
diff --git a/pages/user/myPromotion/myPromotion.vue b/pages/user/myPromotion/myPromotion.vue
new file mode 100644
index 0000000..a9b30b6
--- /dev/null
+++ b/pages/user/myPromotion/myPromotion.vue
@@ -0,0 +1,291 @@
+
+
+
+ 今日积分收入
+
+ {{ !distribution.toDayIntegralNum ? 0 : distribution.toDayIntegralNum}}
+
+
+
+ 邀请人数
+
+ {{ !distribution.inviteeNum ? 0 : distribution.inviteeNum}}
+
+
+
+
+ 积分收入
+
+ {{ !distribution.integralIncome ? 0 : distribution.integralIncome}}
+
+
+
+
+ 积分笔数
+ {{ !distribution.orderCount ? 0 : distribution.orderCount}}
+
+
+
+ 我的邀请码
+
+
+
+ {{item.title}}
+
+
+
+
+
+ 名称
+
+
+ 电话
+
+
+ 邀请时间
+
+
+
+
+
+
+
+
+ {{item.userName}}
+
+
+ {{item.phone}}
+
+
+ {{item.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+ +{{item.integralNum}}
+
+
+ {{item.ext3}} | {{item.userName}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.goodsTypeName}}
+ ¥{{item.totalPrice}}
+
+
+ {{item.time}} | {{item.memName}}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/user/order_list/order_list.vue b/pages/user/order_list/order_list.vue
index 2fea62d..ef94372 100644
--- a/pages/user/order_list/order_list.vue
+++ b/pages/user/order_list/order_list.vue
@@ -14,61 +14,61 @@
-
卡券订单
-
积分充值
-
优惠券包
-
- 团油订单
+ 加油订单
-
电影票
-
KFC
-
星巴克
-
会员充值
-
工会卡充值
-
+
{{row.createTime | formatDate('-')}}
diff --git a/pages/welcome/welcome.vue b/pages/welcome/welcome.vue
index 8791e9b..c79ca7c 100644
--- a/pages/welcome/welcome.vue
+++ b/pages/welcome/welcome.vue
@@ -5,6 +5,10 @@
+
+
diff --git a/uni.scss b/uni.scss
index 9325945..aa78efa 100644
--- a/uni.scss
+++ b/uni.scss
@@ -556,6 +556,9 @@ $uni-font-size-paragraph:30upx;
.margle10{
margin-left: 10px;
+}
+.mart230 {
+ margin-top: 230px;
}
.mart90 {
margin-top: 90px;
@@ -827,4 +830,8 @@ $uni-font-size-paragraph:30upx;
.icon12 {
width: 12px;
+}
+
+.icon40 {
+ width: 40px;
}
\ No newline at end of file