From 0843e457b04c907e504ec44c216851f749e49db2 Mon Sep 17 00:00:00 2001 From: yeliang-king <2244255345@qq.com> Date: Fri, 13 Jan 2023 07:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=88=B8=E5=89=8D=E7=AB=AF=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/login.js | 10 ++++ pages/passport/login.vue | 1 + pages/tabbar/home/index.vue | 8 +++ pages/tabbar/home/views.vue | 115 +++++++++++++++++++++++++++++++++++- static/cpauto1.png | Bin 0 -> 132520 bytes utils/storage.js | 8 +++ 6 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 static/cpauto1.png diff --git a/api/login.js b/api/login.js index f413ba8..af9a1a0 100644 --- a/api/login.js +++ b/api/login.js @@ -14,6 +14,16 @@ export function resetByMobile(params) { }); } + +//获取自动发券 +export function getAutoCoup(){ + return http.request({ + url:`/promotion/coupon/activity`, + method:"GET", + needToken: true, + }); +} + /** * 账号密码登陆 * @params password diff --git a/pages/passport/login.vue b/pages/passport/login.vue index 27328b7..7029dff 100644 --- a/pages/passport/login.vue +++ b/pages/passport/login.vue @@ -564,6 +564,7 @@ */ storage.setUserInfo(user.data.result); storage.setHasLogin(true); + storage.setAutoCp(0) // 登录成功 uni.showToast({ title: "登录成功!", diff --git a/pages/tabbar/home/index.vue b/pages/tabbar/home/index.vue index ea9406e..6d693ca 100644 --- a/pages/tabbar/home/index.vue +++ b/pages/tabbar/home/index.vue @@ -14,6 +14,14 @@ export default { backgroundColor: "#fff", }, }; + }, + onShow(){ + setTimeout(()=>{ + this.$refs.tpl.firstGetAuto(); + },1000) + }, + methods: { + }, onReachBottom(){ // 给子级监听触底加载 diff --git a/pages/tabbar/home/views.vue b/pages/tabbar/home/views.vue index e5b93b4..115be6f 100644 --- a/pages/tabbar/home/views.vue +++ b/pages/tabbar/home/views.vue @@ -1,5 +1,37 @@