feat: 更新开发环境配置并优化UI组件
更新.env.development和config/index.ts中的API地址配置 优化LoginPopup、RankListMini和minihome页面的UI组件布局和样式 在minihome页面添加banner标题和优化tab切换效果
This commit is contained in:
parent
695149674f
commit
c89b80e4eb
|
|
@ -5,7 +5,7 @@ ENV = development
|
||||||
# VITE_API_URL = http://123.60.153.169:8040/apih5
|
# VITE_API_URL = http://123.60.153.169:8040/apih5
|
||||||
# VITE_API_URL = https://4155gf93ll13.vicp.fun/apih5
|
# VITE_API_URL = https://4155gf93ll13.vicp.fun/apih5
|
||||||
# VITE_API_URL = http://123.60.79.143:8041/apih5
|
# VITE_API_URL = http://123.60.79.143:8041/apih5
|
||||||
# VITE_API_URL =http://ukfba3.natappfree.cc/apih5
|
VITE_API_URL = http://192.168.3.38:8040/apih5
|
||||||
VITE_API_URL = https://cankao.cs.com.cn/apih5
|
# VITE_API_URL = https://cankao.cs.com.cn/apih5
|
||||||
|
|
||||||
VITE_API_DATAV_URL = https://cankao.cs.com.cn/zzck_datav
|
VITE_API_DATAV_URL = https://cankao.cs.com.cn/zzck_datav
|
||||||
|
|
@ -32,19 +32,32 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="r_option">
|
<view class="r_option">
|
||||||
<image class="option_icon" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/eye_icon%402x.png"></image>
|
<image
|
||||||
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/eye_icon%402x.png"
|
||||||
|
></image>
|
||||||
<text class="option_text">{{ item.viewCount }}</text>
|
<text class="option_text">{{ item.viewCount }}</text>
|
||||||
|
|
||||||
<image class="option_icon" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/like_icon%402x.png"></image>
|
<image
|
||||||
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/like_icon%402x.png"
|
||||||
|
></image>
|
||||||
<text class="option_text">{{ item.likeCount }}</text>
|
<text class="option_text">{{ item.likeCount }}</text>
|
||||||
|
|
||||||
<image class="option_icon" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_icon%402x.png"></image>
|
<image
|
||||||
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_icon%402x.png"
|
||||||
|
></image>
|
||||||
<text class="option_text">{{ item.shareCount }}</text>
|
<text class="option_text">{{ item.shareCount }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="lock_view" v-if="!isLogin">
|
<view class="lock_view" v-if="!isLogin">
|
||||||
<image class="lock_icon" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/lock_icon%402x.png"> </image>
|
<image
|
||||||
|
class="lock_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/lock_icon%402x.png"
|
||||||
|
>
|
||||||
|
</image>
|
||||||
<text class="lock_text">海外独家资讯内容,<text style="color: #d13e3c">登录</text>后可查阅全文</text>
|
<text class="lock_text">海外独家资讯内容,<text style="color: #d13e3c">登录</text>后可查阅全文</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -84,6 +97,7 @@ watch(
|
||||||
watch(
|
watch(
|
||||||
() => props.newsList,
|
() => props.newsList,
|
||||||
(newValue, oldValue) => {
|
(newValue, oldValue) => {
|
||||||
|
isLogin.value = uni.getStorageSync("token");
|
||||||
rankListLocal.value = [];
|
rankListLocal.value = [];
|
||||||
props.newsList.forEach((item, index) => {
|
props.newsList.forEach((item, index) => {
|
||||||
if (!isExp.value && index > 9) {
|
if (!isExp.value && index > 9) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- <view class="loginPopup"> -->
|
<!-- <view class="loginPopup"> -->
|
||||||
<u-popup class="loginPopup" :show="props.show" closeable :mode="props.mode" round="12" :closeOnClickOverlay="false" @close="handlePopupClose">
|
<u-popup
|
||||||
|
class="loginPopup"
|
||||||
|
:show="props.show"
|
||||||
|
closeable
|
||||||
|
:mode="props.mode"
|
||||||
|
round="12"
|
||||||
|
:closeOnClickOverlay="false"
|
||||||
|
@close="handlePopupClose"
|
||||||
|
>
|
||||||
<view class="loginPopupContent">
|
<view class="loginPopupContent">
|
||||||
<view class="loginTitle">登录后掌握更多优质财经内容</view>
|
<view class="loginTitle">登录后掌握更多优质财经内容</view>
|
||||||
|
|
||||||
|
|
@ -8,10 +16,20 @@
|
||||||
<view class="loginForm">
|
<view class="loginForm">
|
||||||
<u--form :model="state.loginForm" ref="uForm">
|
<u--form :model="state.loginForm" ref="uForm">
|
||||||
<u-form-item style="padding: 0" class="loginFormItem" prop="userInfo.name" borderBottom ref="item1">
|
<u-form-item style="padding: 0" class="loginFormItem" prop="userInfo.name" borderBottom ref="item1">
|
||||||
<u--input class="loginFormInput" placeholder="请输入您的手机号" v-model="state.loginForm.phone" border="none"></u--input>
|
<u--input
|
||||||
|
class="loginFormInput"
|
||||||
|
placeholder="请输入您的手机号"
|
||||||
|
v-model="state.loginForm.phone"
|
||||||
|
border="none"
|
||||||
|
></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item class="loginFormItem" prop="userInfo.name" borderBottom ref="item1">
|
<u-form-item class="loginFormItem" prop="userInfo.name" borderBottom ref="item1">
|
||||||
<u--input class="loginFormInput" placeholder="请输入短信验证码" v-model="state.loginForm.code" border="none"></u--input>
|
<u--input
|
||||||
|
class="loginFormInput"
|
||||||
|
placeholder="请输入短信验证码"
|
||||||
|
v-model="state.loginForm.code"
|
||||||
|
border="none"
|
||||||
|
></u--input>
|
||||||
<view class="getCode" @click="captcha">{{ codeText }}</view>
|
<view class="getCode" @click="captcha">{{ codeText }}</view>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u--form>
|
</u--form>
|
||||||
|
|
@ -120,6 +138,8 @@ const Login = async () => {
|
||||||
console.log(code, "<=== code");
|
console.log(code, "<=== code");
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
console.log("🚀 ~ Login ~ data:", data);
|
||||||
|
|
||||||
Session.set("token", data.token);
|
Session.set("token", data.token);
|
||||||
Session.set("userPhone", data.phone);
|
Session.set("userPhone", data.phone);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
// const baseUrl = "http://192.168.31.25:8060/api";
|
// const baseUrl = "http://192.168.31.25:8060/api";
|
||||||
// export const baseUrl = "http://127.0.0.1:8040/apih5";
|
// export const baseUrl = "http://127.0.0.1:8040/apih5";
|
||||||
// export const baseUrl = "http://192.168.3.38:8040/apih5";
|
export const baseUrl = "http://192.168.3.38:8040/apih5";
|
||||||
export const baseUrl = "https://cankao.cs.com.cn/mini";
|
// export const baseUrl = "https://cankao.cs.com.cn/mini";
|
||||||
|
|
||||||
export const baseUrlDataV = "https://cankao.cs.com.cn/zzck_datav";
|
export const baseUrlDataV = "https://cankao.cs.com.cn/zzck_datav";
|
||||||
// export const baseUrlDataV = "http://123.60.153.169:9995/zzck_datav";
|
// export const baseUrlDataV = "http://123.60.153.169:9995/zzck_datav";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,12 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<button v-if="checked && checked?.length > 0" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="bottom_btn">
|
<button
|
||||||
|
v-if="checked && checked?.length > 0"
|
||||||
|
open-type="getPhoneNumber"
|
||||||
|
@getphonenumber="getPhoneNumber"
|
||||||
|
class="bottom_btn"
|
||||||
|
>
|
||||||
<view>
|
<view>
|
||||||
<text>立即进入</text>
|
<text>立即进入</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -40,7 +45,11 @@
|
||||||
</button>
|
</button>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
<LoginPopup :show="LoginShow" @handlePopupClose="handlePopupClose" @handlePopupSuccessCallback="handlePopupSuccessCallback" />
|
<LoginPopup
|
||||||
|
:show="LoginShow"
|
||||||
|
@handlePopupClose="handlePopupClose"
|
||||||
|
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -177,6 +186,7 @@ const handlePopupClose = () => {
|
||||||
// 登录成功回调
|
// 登录成功回调
|
||||||
const handlePopupSuccessCallback = () => {
|
const handlePopupSuccessCallback = () => {
|
||||||
LoginShow.value = false;
|
LoginShow.value = false;
|
||||||
|
|
||||||
// emit("onChange");
|
// emit("onChange");
|
||||||
uni.navigateBack({});
|
uni.navigateBack({});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,12 @@
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view style="padding: 0 24rpx; margin-top: 30rpx" v-if="tabIndex == 0">
|
<view style="padding: 0 24rpx; margin-top: 30rpx; position: relative">
|
||||||
<u-swiper :list="list1" @change="change" @click="click"></u-swiper>
|
<u-swiper :list="list1" @change="change" @click="click"></u-swiper>
|
||||||
|
<view class="r_banner_title">
|
||||||
|
<text class="banner_title">中证智能参考</text>
|
||||||
|
<text class="banner_sub_title">每一篇与财富相关的资讯</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view v-if="tabIndex == 0" style="padding-top: 30rpx; background-color: white; padding-bottom: 30rpx">
|
<!-- <view v-if="tabIndex == 0" style="padding-top: 30rpx; background-color: white; padding-bottom: 30rpx">
|
||||||
|
|
@ -58,12 +62,18 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="r_tab">
|
<view class="r_tab">
|
||||||
<view style="display: flex; align-items: center; gap: 15rpx">
|
<view style="display: flex; align-items: center; gap: 20rpx">
|
||||||
<view class="tab_item" @click="tabIndex = 0">海外资讯</view>
|
<view style="display: flex; flex-direction: column; align-items: center">
|
||||||
<view class="tab_item" @click="tabIndex = 1">国内资讯</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">
|
||||||
|
<view class="tab_item" @click="tabChange(2)">国内资讯</view>
|
||||||
|
<view class="tab_line" :style="{ opacity: tabIndex == 2 ? 1 : 0 }"></view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="r_sreach">
|
<view class="r_sreach">
|
||||||
<view class="sreach" @click="goSreach" v-if="tabIndex == 0">
|
<view class="sreach" @click="goSreach">
|
||||||
<view class="sreach_icon">
|
<view class="sreach_icon">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_search_line.png"></image>
|
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_search_line.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -250,6 +260,46 @@ onMounted(async () => {
|
||||||
line-height: 33rpx;
|
line-height: 33rpx;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab_line {
|
||||||
|
width: 50rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
background-color: #e23653;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
margin-top: 5rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.r_banner_title {
|
||||||
|
position: absolute;
|
||||||
|
top: 30rpx;
|
||||||
|
left: 50rpx;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner_title {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 42rpx;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 63rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner_sub_title {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 33rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue