This commit is contained in:
2026-03-06 16:54:32 +08:00
parent be96b28828
commit 47594ed095
46 changed files with 3745 additions and 462 deletions

View File

@ -7,9 +7,10 @@ import { LOGIN, GET_PHONE, USER_SHARE,USER_WALLET,RECHARGE_WALLET,USER_WXPAY,USE
// 微信登陆
export const getCodeByWxLogin = () => {
return new Promise((resolve, reject) => {
uni.login({
provider: "weixin",
tt.login({
provider: "toutiao",
success: function (loginRes) {
// console.log(loginRes,'?1?')
resolve(loginRes.code);
},
fail: function (err) {
@ -22,7 +23,7 @@ export const getCodeByWxLogin = () => {
import Store from "../store";
// 登录鉴权
export const login = (phone) => {
export const login = (nickName, avatarUrl) => {
return getCodeByWxLogin().then((code) => {
// 从 vuex 中获取 referrerID如果通过二维码扫描进入
const referrerID = Store.state.user?.referrerID || 0;
@ -31,12 +32,17 @@ export const login = (phone) => {
url: LOGIN,
method: "POST",
data: {
nickName:nickName,
avatarUrl:avatarUrl,
code: code,
// yaoqing_code: inviteCode || null,
phone: phone || null,
source: "wechat",
referrerID: Number(referrerID) || 0,
referrerType: "wechat"
source:'douyin',
referrerID:0,
referrerType:'douyin'
// // yaoqing_code: inviteCode || null,
// phone: phone || null,
// source: "wechat",
// referrerID: Number(referrerID) || 0,
// referrerType: "wechat"
},
}).then((res) => {
// 登录接口使用完 referrerID 后,清除一次,避免重复使用

View File

@ -26,7 +26,7 @@ export const RECHARGE_WALLET = '/wallet/details'
export const USER_WALLET = '/wallet/info'
//钱包充值接口
export const USER_WXPAY = '/wxpay/jsapi'
export const USER_WXPAY = '/ttpay/jsapi'
//钱包充值金额
export const USER_RECHARGE = '/recharge/bonus-list'
//积分充值列表
@ -186,7 +186,7 @@ export const HOME_ORDERS_CANCEL = "/home/orders/cancel";
// 校验节假日费用
export const CHECK_HOLIDAY_FEE = "/check_holiday_fee";
//支付订单
export const PAY_ORDER = "/wxpay/jsapi";
export const PAY_ORDER = "/ttpay/jsapi";
//取消订单
export const CANCEL_ORDER = "/app/chongwu_order/order_quxiao";
@ -235,7 +235,7 @@ export const CREATE_ORDER_NEW = "/product/order/create";
// 创建购物车订单
export const CREATE_CART_ORDER = "/product/order/create";
// 订单支付
export const PAY_ORDER_NEW = "/wxpay/jsapi";
export const PAY_ORDER_NEW = "/ttpay/jsapi";
// 订单列表
export const SHOP_ORDER_LIST = "/product/order/list";
// 订单详情
@ -304,3 +304,5 @@ export const HOMETRAINING_ORDERS_CANCEL = '/hometraining/orders/cancel'
// 撤销申请(领养申请)
export const ADOPTIONS_PET_APPLY_CANCEL = '/adoptions/pet/apply/cancel'