Commit 9b243cbf authored by 劳琪峰's avatar 劳琪峰

chore: 活动页>内置url改用请求的url的origin

parent 4d5d6375
......@@ -15,12 +15,12 @@ const {
// request.js
// 通常可以吧 baseUrl 单独放在一个 js 文件了
// const baseUrl = "http://172.16.230.108:7777/pmall";
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
// const baseUrl = "https://momclub-test.feihe.com/pmall";//测试环境2
const baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
// const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
// export const baseUrl = "http://172.16.230.108:7777/pmall";
// export const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
export const baseUrl = "https://momclub-test.feihe.com/pmall";//测试环境2
// export const baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// export const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
// export const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
const request = (options = {}) => {
// 在这里可以对请求头进行一些设置
......
......@@ -3,11 +3,12 @@
</template>
<script setup lang="ts">
import {ref, watch, nextTick} from "vue";
import {ref, watch, nextTick, computed} from "vue";
import {onLoad, onShow, onShareAppMessage, onShareTimeline} from "@dcloudio/uni-app";
import {useGlobalStore} from "../../stores/global";
import {useUserStore} from "../../stores/user";
import {jump, JumpType} from "../../utils";
import {useGlobalStore} from "@/stores/global";
import {useUserStore} from "@/stores/user";
import {jump, JumpType} from "@/utils";
import {baseUrl as requestBaseUrl} from "@/api/request";
const userStore = useUserStore();
const globalStore = useGlobalStore()
......@@ -21,14 +22,15 @@ const src = ref("")
const registered = ref(undefined)
const urlMap = {
//'main': 'http://192.168.0.5:8001/#/page',
'main': 'https://momclub.feihe.com/h5/#/page',
//'main': 'https://momclub-test.feihe.com/h5/#/page',
//'main': 'https://momclub-uat.feihe.com/h5/#/page',
'main': '/h5/#/page',
};
const shareData = ref(null)
const baseUrl = computed(() => {
return requestBaseUrl.substring(0, requestBaseUrl.indexOf('/', 'http'.length + 4))
})
const handleBack = () => {
try {
uni.navigateBack({
......@@ -108,7 +110,7 @@ function initOk() {
if (options.type) {
const type = options.type;
url = urlMap[type];
url = baseUrl.value + urlMap[type];
} else if (options.url) {
url = decodeURIComponent(options.url)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment