fix: 修复本地开发环境配置和UI文本问题
- 将RankListMini中的分享链接改为本地开发环境 - 添加userType值的alert调试 - 修改minihome页面的"海外资讯"为"海外精选" - 移除requestClass中的调试日志和优化GET请求处理
This commit is contained in:
parent
5f0242d697
commit
fbea363bb8
|
|
@ -161,14 +161,16 @@ function goDetail(item) {
|
|||
|
||||
// if (judgeRuntimeEnv().isWxMiniWebview) {
|
||||
let shareUrl =
|
||||
"https://cankao.cs.com.cn/jnh/#/pages/detail/indexNewsInfo?id=" +
|
||||
// "http://localhost:8881/jnh/#/pages/detail/indexNewsInfo?id=" +
|
||||
// "https://cankao.cs.com.cn/jnh/#/pages/detail/indexNewsInfo?id=" +
|
||||
"http://localhost:8881/jnh/#/pages/detail/indexNewsInfo?id=" +
|
||||
item.news_id +
|
||||
"&phone=" +
|
||||
uni.getStorageSync("token") +
|
||||
"&userType=" +
|
||||
userType.value;
|
||||
|
||||
alert(userType.value);
|
||||
|
||||
wx.miniProgram.navigateTo({
|
||||
url: "/pages/webView/index?url=" + encodeURIComponent(shareUrl),
|
||||
success: (res) => {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
<view class="r_tab">
|
||||
<view style="display: flex; align-items: center; gap: 20rpx">
|
||||
<view style="display: flex; flex-direction: column; align-items: center">
|
||||
<view class="tab_item" @click="tabChange(0)">海外资讯</view>
|
||||
<view class="tab_item" @click="tabChange(0)">海外精选</view>
|
||||
<view class="tab_line" :style="{ opacity: tabIndex == 0 ? 1 : 0 }"></view>
|
||||
</view>
|
||||
<view style="display: flex; flex-direction: column; align-items: center">
|
||||
|
|
@ -181,7 +181,6 @@ onShow(() => {
|
|||
const userParams = ref({});
|
||||
|
||||
onLoad((option) => {
|
||||
console.log("🚀 ~ option:", option);
|
||||
userParams.value = option;
|
||||
if (userParams.value.phone) {
|
||||
uni.setStorageSync("token", userParams.value.phone);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class requestClass {
|
|||
// 拦截器
|
||||
interceptors = {
|
||||
request: (func: Fn) => {
|
||||
console.log("🚀 ~ requestClass ~ func:", func)
|
||||
if (func) {
|
||||
requestClass[requestBefore] = func;
|
||||
} else {
|
||||
|
|
@ -53,12 +52,10 @@ class requestClass {
|
|||
request(options: UniApp.RequestOptions & { baseURL?: string }) {
|
||||
options.baseURL = options.baseURL || this[config].baseURL;
|
||||
options.dataType = options.dataType || this[config].dataType;
|
||||
options.url = requestClass[isCompleteURL](options.url)
|
||||
? options.url
|
||||
: options.baseURL + options.url;
|
||||
options.url = requestClass[isCompleteURL](options.url) ? options.url : options.baseURL + options.url;
|
||||
|
||||
// 新增:如果是GET请求且data为空对象,则删除data
|
||||
if (options.method === 'GET' && options.data && Object.keys(options.data).length === 0) {
|
||||
if (options.method === "GET" && options.data && Object.keys(options.data).length === 0) {
|
||||
delete options.data;
|
||||
} else {
|
||||
options.data = options.data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue