diff --git a/public/static/js/config.js b/public/static/js/config.js
index d839557..a762d41 100644
--- a/public/static/js/config.js
+++ b/public/static/js/config.js
@@ -4,6 +4,21 @@ window.config = {
VConsole: true,
userIdList: [],
shareEnv: "production",
- testReactionId: "21023",
- testReactionUserId: "csht003",
+ getCarProductLink: ({
+ token,
+ refreshToken,
+ departmentId = 36,
+ eId = 0,
+ activityId,
+ }) => {
+ return `https://web.ceniu.sztg.com/setTokenAndRedirect.html?token=${encodeURIComponent(
+ token
+ )}&refreshToken=${encodeURIComponent(
+ refreshToken
+ )}&redirect=${encodeURIComponent(
+ `https://web.ceniu.sztg.com/#/index/shopping?departmentId=${departmentId}&eId=${eId}&activityId=${activityId}`
+ )}`;
+ }, // 购物车产品地址
+ mobileRegister:
+ "https://web.ceniu.sztg.com/#/login?pageType=mobileRegister&redirect=", // 用户注册地址
};
diff --git a/src/router/index.js b/src/router/index.js
index 386982a..718537f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -144,12 +144,6 @@ const routes = [
/* webpackChunkName: "about" */ "../views/ShotVideoPlay/index.vue"
),
},
- {
- path: "/test",
- name: "test",
- component: () =>
- import(/* webpackChunkName: "about" */ "../views/test.vue"),
- },
{
path: "/VideoList",
name: "VideoList",
@@ -193,7 +187,6 @@ router.beforeEach(async (to, from, next) => {
if (to.meta.noLogin || (to.path === "/page" && to.query.preview)) {
return next();
}
- debugger;
console.log("store.state.token", store.state.token);
if (!store.state.token && !to.meta.noLogin) {
next({
diff --git a/src/utils/request.js b/src/utils/request.js
index 03d5b13..ef0b406 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -37,9 +37,8 @@ service.interceptors.request.use(
// response 拦截器
service.interceptors.response.use(
(response) => {
- if (
- [2007, 2000, 6007, 6014, 200, 2008, 2009].includes(response.data.code)
- ) {
+ if ([2000].includes(response.data.code)) {
+ // 需要重新登录的code
// router.push(`/login?redirect=${router.currentRoute.value.fullPath}`);
if (["App", "PcClient"].includes(terminalType)) {
showDialog({
@@ -53,12 +52,7 @@ service.interceptors.response.use(
userLogin();
return response.data;
}
- } else if (
- response.data.code !== 0 &&
- response.data.code !== 6013 &&
- response.data.code !== 2010
- ) {
- // code 2010 为禁止登陆
+ } else {
showToast(response.data.message);
}
return response.data;
diff --git a/src/views/Login/index.vue b/src/views/Login/index.vue
index a6c365e..24c9ec5 100644
--- a/src/views/Login/index.vue
+++ b/src/views/Login/index.vue
@@ -18,6 +18,9 @@
{{ time }}S后重试
-->
+
+ 去注册
+
@@ -30,6 +33,7 @@ import Nav from "@/components/NavBar.vue";
import { useStore } from "vuex";
import { showToast } from "vant";
import { getUserInfo } from "@/api/index";
+import location from "sockjs-client/lib/location";
const store = useStore();
const route = useRoute();
@@ -69,6 +73,12 @@ const login = async () => {
}
};
+const toMobileRegister = () => {
+ location.href = `${window.config.mobileRegister}${encodeURIComponent(
+ location.href
+ )}`;
+};
+
// const time = ref(59);
// const getCode = async () => {
// showTime.value = true;
@@ -141,7 +151,7 @@ h2 {
}
button {
display: block;
- width: 686px;
+ width: 100%;
padding: 24px 48px;
justify-content: center;
align-items: center;
@@ -149,10 +159,19 @@ h2 {
background: #e83030;
font-size: 32px;
color: #fff;
- margin: 112px auto;
+ margin: 112px auto 40px;
&:disabled {
opacity: 0.5;
}
}
+ .opt {
+ display: flex;
+ justify-content: flex-end;
+ span {
+ font-size: 32px;
+ color: cornflowerblue;
+ cursor: pointer;
+ }
+ }
}
diff --git a/src/views/VideoPlay/components/ProductItem.vue b/src/views/VideoPlay/components/ProductItem.vue
index 659f443..d6e8bd1 100644
--- a/src/views/VideoPlay/components/ProductItem.vue
+++ b/src/views/VideoPlay/components/ProductItem.vue
@@ -14,6 +14,7 @@
import { defineProps } from "vue";
import { useRoute } from "vue-router";
import { queryCartRead } from "@/api/video";
+import { useStore } from "vuex";
const props = defineProps({
item: {
required: true,
@@ -42,6 +43,7 @@ const props = defineProps({
},
});
const route = useRoute();
+const store = useStore();
const toDetail = async () => {
if (props.isShopCar) {
await queryCartRead({
@@ -51,14 +53,19 @@ const toDetail = async () => {
saleUserId: route.query.saleUserId,
});
}
- if (props.item.productType === 111) {
- let bvideo = `${
- props.item.url.indexOf("?") === -1 ? "?" : "&"
- }bvideo=videoId_${route.query.id},type_${props.type}`;
- if (route.query.saleUserId) {
- bvideo = `${bvideo},saleUserId_${route.query.saleUserId}`;
- }
- location.href = `${props.item.url}${bvideo}`;
+ if (props.item.productType === 21) {
+ // let bvideo = `${
+ // props.item.url.indexOf("?") === -1 ? "?" : "&"
+ // }bvideo=videoId_${route.query.id},type_${props.type}`;
+ // if (route.query.saleUserId) {
+ // bvideo = `${bvideo},saleUserId_${route.query.saleUserId}`;
+ // }
+ // location.href = `${props.item.url}${bvideo}`;
+ location.href = window.config.getCarProductLink({
+ token: store.state.userInfo.token,
+ refreshToken: store.state.userInfo.refreshToken,
+ activityId: props.item.productId,
+ });
} else {
if (props.liveProductId) {
location.href = `${location.origin}/tgh5/viewpackageDetail/${
diff --git a/src/views/VideoPlay/hComponents/ShopCar.vue b/src/views/VideoPlay/hComponents/ShopCar.vue
index 81672aa..1e60505 100644
--- a/src/views/VideoPlay/hComponents/ShopCar.vue
+++ b/src/views/VideoPlay/hComponents/ShopCar.vue
@@ -4,7 +4,7 @@
-
-
-
-