mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:13:26 +08:00
Merge branch 'dev' into 'master'
uniapp【修复】:修复安卓版本未登陆情况下,登录页无法二次跳转 See merge request jianweie/coreshoppro!122
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
// 不同的环境变量配置
|
// 不同的环境变量配置
|
||||||
const development = {
|
const development = {
|
||||||
requestBaseUrl: 'https://api.test.pro.coreshop.cn',
|
requestBaseUrl: 'https://api.pro.demo.coreshop.cn',
|
||||||
appid: '',
|
appid: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
const test = {
|
const test = {
|
||||||
requestBaseUrl: 'https://api.test.pro.coreshop.cn',
|
requestBaseUrl: 'https://api.pro.demo.coreshop.cn',
|
||||||
appid: '',
|
appid: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
const production = {
|
const production = {
|
||||||
requestBaseUrl: 'https://api.test.pro.coreshop.cn',
|
requestBaseUrl: 'https://api.pro.demo.coreshop.cn',
|
||||||
appid: '',
|
appid: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ export interface ShopConfigType {
|
|||||||
indexPopupWindowImageUrl ?: string;
|
indexPopupWindowImageUrl ?: string;
|
||||||
invoiceSwitch ?: number;
|
invoiceSwitch ?: number;
|
||||||
isAllowUserSecondBind ?: number;
|
isAllowUserSecondBind ?: number;
|
||||||
|
orderAutoSignTime ?: number;
|
||||||
|
orderAutoEvalTime ?: number;
|
||||||
/** 余额提现 */
|
/** 余额提现 */
|
||||||
isAllowWithdrawCash ?: number;
|
isAllowWithdrawCash ?: number;
|
||||||
isOpenAgent ?: number;
|
isOpenAgent ?: number;
|
||||||
|
|||||||
@@ -1,38 +1,45 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { UserToken } from '@/core/consts';
|
import { UserToken } from '@/core/consts';
|
||||||
import { handleShowToast } from '@/core/utils';
|
import { handleShowToast, handleRouteNavigateTo } from '@/core/utils';
|
||||||
import { queryUserInfo } from '@/core/api';
|
import { queryUserInfo } from '@/core/api';
|
||||||
import type { UserLoginStoreType, Response, UserInfoType } from '@/core/models';
|
import type { UserLoginStoreType, Response, UserInfoType } from '@/core/models';
|
||||||
import { useUserInfoStore } from './userInfo';
|
import { useUserInfoStore } from './userInfo';
|
||||||
|
|
||||||
export const useLoginStore = defineStore('useLoginStore', {
|
export const useLoginStore = defineStore('useLoginStore', {
|
||||||
state: () : UserLoginStoreType => {
|
state: () : UserLoginStoreType => {
|
||||||
return {
|
return {
|
||||||
showLoginModalTogglePop: false
|
showLoginModalTogglePop: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
/** 检查是否登录 */
|
/** 检查是否登录 */
|
||||||
checkLogin(callBack : () => void) {
|
checkLogin(callBack : () => void) {
|
||||||
if (!uni.getStorageSync(UserToken)) {
|
if (!uni.getStorageSync(UserToken)) {
|
||||||
this.setShowLoginModalTogglePop(true);
|
// #ifdef MP-ALIPAY || MP-WEIXIN
|
||||||
} else {
|
this.setShowLoginModalTogglePop(true);
|
||||||
callBack();
|
// #endif
|
||||||
}
|
|
||||||
},
|
// #ifndef MP-WEIXIN || MP-ALIPAY
|
||||||
/** 获取用户数据 */
|
handleRouteNavigateTo(`/pages/login/login?backUrl=${'/pages/member/member'}`)
|
||||||
async getUserInfo() {
|
// #endif
|
||||||
const userInfoStore = useUserInfoStore();
|
|
||||||
const userInfo : Response<UserInfoType> = await queryUserInfo();
|
} else {
|
||||||
if (userInfo.status) {
|
callBack();
|
||||||
userInfoStore.setUserInfo(userInfo?.data);
|
}
|
||||||
} else {
|
},
|
||||||
handleShowToast(userInfo.msg)
|
/** 获取用户数据 */
|
||||||
}
|
async getUserInfo() {
|
||||||
},
|
const userInfoStore = useUserInfoStore();
|
||||||
/** 设置登录弹框打开或者关闭 */
|
const userInfo : Response<UserInfoType> = await queryUserInfo();
|
||||||
setShowLoginModalTogglePop(showLoginModalTogglePop : boolean) {
|
if (userInfo.status) {
|
||||||
this.showLoginModalTogglePop = showLoginModalTogglePop;
|
userInfoStore.setUserInfo(userInfo?.data);
|
||||||
},
|
} else {
|
||||||
},
|
handleShowToast(userInfo.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 设置登录弹框打开或者关闭 */
|
||||||
|
setShowLoginModalTogglePop(showLoginModalTogglePop : boolean) {
|
||||||
|
this.showLoginModalTogglePop = showLoginModalTogglePop;
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
"quickapp" : {},
|
"quickapp" : {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid" : "wx3f290252193d7627",
|
"appid" : "wx6a73f5a508da7af2",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false,
|
"urlCheck" : false,
|
||||||
"checkSiteMap" : false,
|
"checkSiteMap" : false,
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
if (state.orderId && isGoodsOrder()) {
|
if (state.orderId && isGoodsOrder()) {
|
||||||
handleRouteRedirectTo(`/pages/subpackage/member/order/detail/detail?orderId=${state.orderId}`);
|
handleRouteRedirectTo(`/pages/subpackage/member/order/detail/detail?orderId=${state.orderId}`);
|
||||||
} else if (state.paymentInfo.type === PaymentTypeEnum.recharge) {
|
} else if (state.paymentInfo.type === PaymentTypeEnum.recharge) {
|
||||||
handleRouteRedirectTo(`/pages/subpackage/member/balance/detail/detail`);
|
handleRouteRedirectTo(`/pages/subpackage/member/balance/balance-detail/index`);
|
||||||
} else if (state.paymentInfo.type === PaymentTypeEnum.formPay || state.paymentInfo.type === PaymentTypeEnum.formOrder) {
|
} else if (state.paymentInfo.type === PaymentTypeEnum.formPay || state.paymentInfo.type === PaymentTypeEnum.formOrder) {
|
||||||
handleRouteSwitchTab()
|
handleRouteSwitchTab()
|
||||||
} else if (state.paymentInfo.type === PaymentTypeEnum.serviceOrder) {
|
} else if (state.paymentInfo.type === PaymentTypeEnum.serviceOrder) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="explain">
|
<view class="explain">
|
||||||
<view class="tit">务必在收到商品后再确认收货。</view>
|
<view class="tit">务必在收到商品后再确认收货。</view>
|
||||||
<view class="desc">发货20天后将自动确认收货</view>
|
<view class="desc">发货{{shopConfigStore?.config?.orderAutoSignTime}}天后将自动确认收货</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="steps-status" v-if="state.orderStatus == OrderAllStatusTypeEnum.aLL_PENDING_RECEIPT">
|
<view class="steps-status" v-if="state.orderStatus == OrderAllStatusTypeEnum.aLL_PENDING_RECEIPT">
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<view class="desc">请您对此次购物体检进行评价</view>
|
<view class="desc">请您对此次购物体检进行评价</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="explain">
|
<view class="explain">
|
||||||
<view class="tit">收货30天后将自动评价</view>
|
<view class="tit">收货{{shopConfigStore?.config?.orderAutoEvalTime}}天后将自动评价</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="steps-status" v-if="state.orderStatus == OrderAllStatusTypeEnum.aLL_PENDING_EVALUATE">
|
<view class="steps-status" v-if="state.orderStatus == OrderAllStatusTypeEnum.aLL_PENDING_EVALUATE">
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page title="我的订单" mode="left">
|
<coreshop-page title="我的订单1" mode="left">
|
||||||
<view class="layout-order-box">
|
<view class="layout-order-box">
|
||||||
<view class="tab-box">
|
<view class="tab-box">
|
||||||
<uv-tabs :list="state.tabList" :activeStyle="{ 'color': '#D33123' }" lineColor="#D33123" :lineWidth="40"
|
<uv-tabs :list="state.tabList" :activeStyle="{ 'color': '#D33123' }" lineColor="#D33123" :lineWidth="40"
|
||||||
:scrollable="false" :current="state.tabsCurrent" keyName="title" @click="handleChangeTab"></uv-tabs>
|
:scrollable="false" :current="state.tabsCurrent" keyName="title" @click="handleChangeTab"></uv-tabs>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="order-list-box">
|
<view class="order-list-box">
|
||||||
<view class="order-box">
|
<view class="order-box">
|
||||||
<view v-if="state.orderList.length > 0">
|
<view v-if="state.orderList.length > 0">
|
||||||
|
|||||||
Reference in New Issue
Block a user