From 44645dd0b7cc3cdc49e17732fa9e65f73d5d2d40 Mon Sep 17 00:00:00 2001
From: anhaogxs <704041637@qq.com>
Date: Sat, 20 Feb 2021 16:01:51 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=91=E5=AE=9A=E6=89=8B?=
=?UTF-8?q?=E6=9C=BA=E5=8F=B7=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/user.js | 233 ++++++++--------
components/Adv.vue | 397 +++++++++++++--------------
components/sh-adv.vue | 439 ++++++++++++++----------------
pages/home/components/Banner.vue | 222 +++++++--------
pages/home/index.vue | 44 +--
pages/user/BindingPhone/index.vue | 155 +++++------
6 files changed, 732 insertions(+), 758 deletions(-)
diff --git a/api/user.js b/api/user.js
index ee3862d..a520d81 100644
--- a/api/user.js
+++ b/api/user.js
@@ -1,20 +1,20 @@
-import request from "@/utils/request";
+import request from '@/utils/request'
/**
* 省市区
*/
export function getCity(data) {
- return request.get("/city_list", data, {
- // return request.get("/citys", data, {
- login: false
- });
+ return request.get('/city_list', data, {
+ // return request.get("/citys", data, {
+ login: false,
+ })
}
export function district(data) {
- // return request.get("/city_list", data, {
- return request.get("/citys", data, {
- login: false
- });
+ // return request.get("/city_list", data, {
+ return request.get('/citys', data, {
+ login: false,
+ })
}
/**
@@ -22,9 +22,9 @@ export function district(data) {
* @param data object 用户账号密码
*/
export function login(data) {
- return request.post("/login", data, {
- login: false
- });
+ return request.post('/login', data, {
+ login: false,
+ })
}
/**
@@ -32,9 +32,9 @@ export function login(data) {
* @param data object 用户手机号 也只能
*/
export function loginMobile(data) {
- return request.post("/login/mobile", data, {
- login: false
- });
+ return request.post('/login/mobile', data, {
+ login: false,
+ })
}
/**
@@ -42,9 +42,9 @@ export function loginMobile(data) {
* @param data object 用户手机号
*/
export function registerVerify(data) {
- return request.post("/register/verify", data, {
- login: false
- });
+ return request.post('/register/verify', data, {
+ login: false,
+ })
}
/**
@@ -52,9 +52,9 @@ export function registerVerify(data) {
* @param data object 用户手机号 验证码 密码
*/
export function register(data) {
- return request.post("/register", data, {
- login: false
- });
+ return request.post('/register', data, {
+ login: false,
+ })
}
/**
@@ -62,364 +62,375 @@ export function register(data) {
* @param data object 用户手机号 验证码 密码
*/
export function registerReset(data) {
- return request.post("/register/reset", data, {
- login: false
- });
+ return request.post('/register/reset', data, {
+ login: false,
+ })
}
/*
* 领取优惠券列表
* */
export function getCoupon(q) {
- return request.get("/coupons", q, {
- login: true
- });
+ return request.get('/coupons', q, {
+ login: true,
+ })
}
/*
* 点击领取优惠券
* */
export function getCouponReceive(id) {
- return request.post("/coupon/receive", {
- couponId: id
- }, {
- login: true
- });
+ return request.post(
+ '/coupon/receive',
+ {
+ couponId: id,
+ },
+ {
+ login: true,
+ }
+ )
}
/*
* 批量领取优惠券
* */
export function couponReceiveBatch(couponId) {
- return request.post("/coupon/receive/batch", {
- couponId
- });
+ return request.post('/coupon/receive/batch', {
+ couponId,
+ })
}
/*
* 我的优惠券
* */
export function getCouponsUser(type) {
- return request.get("/coupons/user/" + type);
+ return request.get('/coupons/user/' + type)
}
/*
* 个人中心
* */
export function getUser() {
- return request.get("/user");
+ return request.get('/user')
}
/*
* 用户信息
* */
export function getUserInfo() {
-
- return request.get("/userinfo", {
- login: true
- });
+ return request.get('/userinfo', {
+ login: true,
+ })
}
/*
* 小程序登陆
* */
export function wxappAuth(data) {
-
- return request.post("/wxapp/auth", data, {
- login: false
- });
+ return request.post('/wxapp/auth', data, {
+ login: false,
+ })
}
/*
* 个人中心(功能列表)
* */
export function getMenuUser() {
- return request.get("/menu/user");
+ return request.get('/menu/user')
}
/*
* 地址列表
* */
export function getAddressList(data) {
- return request.get("/address/list", data || {});
+ return request.get('/address/list', data || {})
}
/*
* 删除地址
* */
export function getAddressRemove(id) {
- return request.post("/address/del", {
- id: id
- });
+ return request.post('/address/del', {
+ id: id,
+ })
}
/*
* 设置默认地址
* */
export function getAddressDefaultSet(id) {
- return request.post("/address/default/set", {
- id: id
- });
+ return request.post('/address/default/set', {
+ id: id,
+ })
}
/*
* 获取默认地址
* */
export function getAddressDefault() {
- return request.get("/address/default");
+ return request.get('/address/default')
}
/*
* 获取单个地址
* */
export function getAddress(id) {
- return request.get("/address/detail/" + id);
+ return request.get('/address/detail/' + id)
}
/*
* 修改 添加地址
* */
export function postAddress(data) {
- return request.post("/address/edit", data);
+ return request.post('/address/edit', data)
}
/*
* 获取收藏产品
* */
export function getCollectUser(page, limit, type) {
- return request.get("/collect/user", {
- page: page,
- limit: limit,
- type
- });
+ return request.get('/collect/user', {
+ page: page,
+ limit: limit,
+ type,
+ })
}
/*
* 删除收藏产品
* */
export function getCollectDel(id, category) {
- return request.post("/collect/del", {
- id: id,
- category: category
- });
+ return request.post('/collect/del', {
+ id: id,
+ category: category,
+ })
}
/*
* 批量收藏产品
* */
export function postCollectAll(data) {
- return request.post("/collect/all", data);
+ return request.post('/collect/all', data)
}
/*
* 添加收藏产品
* */
export function getCollectAdd(id, category) {
- return request.post("collect/add", {
- id: id,
- category: category
- });
+ return request.post('collect/add', {
+ id: id,
+ category: category,
+ })
}
/*
* 签到配置
* */
export function getSignConfig() {
- return request.get("/sign/config");
+ return request.get('/sign/config')
}
/*
* 签到里的签到列表
* */
export function getSignList(page, limit) {
- return request.get("/sign/list", {
- page: page,
- limit: limit
- });
+ return request.get('/sign/list', {
+ page: page,
+ limit: limit,
+ })
}
/*
* 签到列表
* */
export function getSignMonth(page, limit) {
- return request.get("/sign/month", {
- page: page,
- limit: limit
- });
+ return request.get('/sign/month', {
+ page: page,
+ limit: limit,
+ })
}
/*
* 签到用户信息
* */
export function postSignUser(sign) {
- return request.post("/sign/user", sign);
+ return request.post('/sign/user', sign)
}
/*
* 签到
* */
export function postSignIntegral(sign) {
- return request.post("/sign/integral", sign);
+ return request.post('/sign/integral', sign)
}
/*
* 推广数据
* */
export function getSpreadInfo() {
- return request.get("/commission");
+ return request.get('/commission')
}
/*
* 推广人列表
* */
export function getSpreadUser(screen) {
- return request.post("/spread/people", screen);
+ return request.post('/spread/people', screen)
}
/*
* 推广人订单
* */
export function getSpreadOrder(where) {
- return request.post("/spread/order", where);
+ return request.post('/spread/order', where)
}
/*
* 资金明细(types|0=全部,1=消费,2=充值,3=返佣,4=提现)
* */
export function getCommissionInfo(q, types) {
- return request.get("/spread/commission/" + types, q);
+ return request.get('/spread/commission/' + types, q)
}
/*
* 积分记录
* */
export function getIntegralList(q) {
- return request.get("/integral/list", q);
+ return request.get('/integral/list', q)
}
/*
* 提现银行
* */
export function getBank() {
- return request.get("/extract/bank");
+ return request.get('/extract/bank')
}
/*
* 提现申请
* */
export function postCashInfo(cash) {
- return request.post("/extract/cash", cash);
+ return request.post('/extract/cash', cash)
}
/*
* 会员中心
* */
export function getVipInfo() {
- return request.get("/user/level/grade");
+ return request.get('/user/level/grade')
}
/*
* 会员等级任务
* */
export function getVipTask(id) {
- return request.get("/user/level/task/" + id);
+ return request.get('/user/level/task/' + id)
}
/*
* 资金统计
* */
export function getBalance() {
- return request.get("/user/balance");
+ return request.get('/user/balance')
}
/*
* 活动状态
* */
export function getActivityStatus() {
- return request.get("/user/activity", {}, {
- login: false
- });
+ return request.get(
+ '/user/activity',
+ {},
+ {
+ login: false,
+ }
+ )
}
/*
* 活动状态
* */
export function getSpreadImg(data) {
-
- return request.get("/spread/banner", data);
+ return request.get('/spread/banner', data)
}
/*
* 用户修改信息
* */
export function postUserEdit(data) {
- return request.post("/user/edit", data);
+ return request.post('/user/edit', data)
}
/*
* 用户修改信息
* */
export function getChatRecord(to_uid, data) {
- return request.get("user/service/record/" + to_uid, data);
+ return request.get('user/service/record/' + to_uid, data)
}
/*
* 用户修改信息
* */
export function serviceList() {
- return request.get("user/service/list");
+ return request.get('user/service/list')
}
/*
* 公众号充值
* */
export function rechargeWechat(data) {
- return request.post("/recharge/wechat", data);
+ return request.post('/recharge/wechat', data)
}
/*
* 退出登录
* */
export function getLogout() {
- return request.post("/auth/logout");
+ return request.post('/auth/logout')
}
/*
- * 绑定手机号
+ * 小程序绑定手机号
* */
export function bindingPhone(data) {
- return request.post("wxapp/binding", data);
+ return request.post('/binding', data)
+}
+
+/*
+ * 绑定手机号
+ * */
+export function wxappBindingPhone(data) {
+ return request.post('wxapp/binding', data)
}
/*
* h5切换公众号登陆
* */
export function switchH5Login() {
- return request.post("switch_h5", {
- from: "wechat"
- });
+ return request.post('switch_h5', {
+ from: 'wechat',
+ })
}
/*
* 获取推广人排行
* */
export function getRankList(q) {
- return request.get("rank", q);
+ return request.get('rank', q)
}
/*
* 获取佣金排名
* */
export function getBrokerageRank(q) {
- return request.get("brokerage_rank", q);
+ return request.get('brokerage_rank', q)
}
/**
* 检测会员等级
*/
export function setDetection() {
- return request.get("user/level/detection");
+ return request.get('user/level/detection')
}
-
export function getRechargeApi() {
- return request.get("recharge/index");
+ return request.get('recharge/index')
}
diff --git a/components/Adv.vue b/components/Adv.vue
index 37d777f..af6dbad 100644
--- a/components/Adv.vue
+++ b/components/Adv.vue
@@ -1,209 +1,210 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/sh-adv.vue b/components/sh-adv.vue
index 887c771..6c04cde 100644
--- a/components/sh-adv.vue
+++ b/components/sh-adv.vue
@@ -1,240 +1,217 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/home/components/Banner.vue b/pages/home/components/Banner.vue
index a45a769..7e66cc3 100644
--- a/pages/home/components/Banner.vue
+++ b/pages/home/components/Banner.vue
@@ -1,131 +1,131 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 7d369d1..a6051d6 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -18,14 +18,14 @@
-
+
-
+
-
+
@@ -213,26 +213,26 @@
// uni.showLoading({
// title: "加载中",
// });
- getCanvas().then(res => {
- }).catch(error => {
- this.homeData = JSON.parse(error.data.json)
- console.log(this.homeData[4])
+ getCanvas().then(res => {}).catch(error => {
+ this.homeData = JSON.parse(error.data.json)
+ console.log(this.homeData)
+ console.log(222)
})
getHomeData().then((res) => {
- that.logoUrl = res.data.logoUrl;
- res.data.banner.map((item) => (item.bgcolor = item.color || ""));
- that.$set(that, "info", res.data.info);
- that.$set(that, "firstList", res.data.firstList);
- that.$set(that, "bastList", res.data.bastList);
- that.$set(that, "likeInfo", res.data.likeInfo);
- that.$set(that, "live", res.data.liveList);
- that.$set(that, "lovely", res.data.lovely);
- that.$set(that, "benefit", res.data.benefit);
- that.$set(that, "couponList", res.data.couponList);
- that.$set(that, "combinationList", res.data.combinationList);
- uni.hideLoading();
- that.setOpenShare();
- // that.doColorThief()
+ that.logoUrl = res.data.logoUrl;
+ res.data.banner.map((item) => (item.bgcolor = item.color || ""));
+ that.$set(that, "info", res.data.info);
+ that.$set(that, "firstList", res.data.firstList);
+ that.$set(that, "bastList", res.data.bastList);
+ that.$set(that, "likeInfo", res.data.likeInfo);
+ that.$set(that, "live", res.data.liveList);
+ that.$set(that, "lovely", res.data.lovely);
+ that.$set(that, "benefit", res.data.benefit);
+ that.$set(that, "couponList", res.data.couponList);
+ that.$set(that, "combinationList", res.data.combinationList);
+ uni.hideLoading();
+ that.setOpenShare();
+ // that.doColorThief()
});
},
methods: {
diff --git a/pages/user/BindingPhone/index.vue b/pages/user/BindingPhone/index.vue
index 29a53d5..e477f63 100644
--- a/pages/user/BindingPhone/index.vue
+++ b/pages/user/BindingPhone/index.vue
@@ -6,158 +6,143 @@
-
+
确认绑定
-
+