更新打包配置

This commit is contained in:
2025-12-16 09:13:50 +08:00
parent bd84809d02
commit 0bc7e24de6
542 changed files with 80435 additions and 80435 deletions
@@ -1,100 +1,100 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="系统公告" :isReturn="true" @return="onReturnClick" />
<view class="setting-view">
<view class="name-box-title">
<view class="value">{{ newsDetail.title }}</view>
<view class="name-box-time">{{ formatDate(newsDetail.ctdate) }}</view>
</view>
<view class="name-box">
<view class="value" v-html="newsDetail.content"></view>
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import Header from "@/components/common/header.vue";
import TopSafe from "@/components/common/top-safe.nvue";
import { getNewsDetail } from "@/api/news.js";
import { formatDate } from "@/utils/index.js";
export default {
components: { Header, TopSafe },
data() {
return {
newsDetail: {},
};
},
onShow() {},
onLoad(option) {
if (option && option.id) {
this.getNewsDetail(Number(option.id));
}
},
methods: {
formatDate,
async getNewsDetail(id) {
const params = {
id,
};
const resp = await getNewsDetail(params);
if (resp && resp.bizcode === 100) {
this.newsDetail = resp.data || {};
}
},
onReturnClick() {
uni.navigateTo({url:"/pages/login_package/announcement/announcement"});
},
},
};
</script>
<style lang="scss" scoped>
.bottom-btn {
width: 100%;
margin-bottom: 92rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
background-color: #fff;
.name-box-title {
border-bottom: 1rpx solid #eaeaea;
padding-bottom: 20rpx;
margin-bottom: 20rpx;
.value {
font-weight: 500;
font-size: 40rpx;
color: #333333;
}
.name-box-time {
font-size: 28rpx;
color: #666666;
}
}
.name-box {
width: 100%;
border-radius: 16rpx;
overflow-y: auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-content: flex-start;
box-sizing: border-box;
}
}
</style>
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="系统公告" :isReturn="true" @return="onReturnClick" />
<view class="setting-view">
<view class="name-box-title">
<view class="value">{{ newsDetail.title }}</view>
<view class="name-box-time">{{ formatDate(newsDetail.ctdate) }}</view>
</view>
<view class="name-box">
<view class="value" v-html="newsDetail.content"></view>
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import Header from "@/components/common/header.vue";
import TopSafe from "@/components/common/top-safe.nvue";
import { getNewsDetail } from "@/api/news.js";
import { formatDate } from "@/utils/index.js";
export default {
components: { Header, TopSafe },
data() {
return {
newsDetail: {},
};
},
onShow() {},
onLoad(option) {
if (option && option.id) {
this.getNewsDetail(Number(option.id));
}
},
methods: {
formatDate,
async getNewsDetail(id) {
const params = {
id,
};
const resp = await getNewsDetail(params);
if (resp && resp.bizcode === 100) {
this.newsDetail = resp.data || {};
}
},
onReturnClick() {
uni.navigateTo({url:"/pages/login_package/announcement/announcement"});
},
},
};
</script>
<style lang="scss" scoped>
.bottom-btn {
width: 100%;
margin-bottom: 92rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
background-color: #fff;
.name-box-title {
border-bottom: 1rpx solid #eaeaea;
padding-bottom: 20rpx;
margin-bottom: 20rpx;
.value {
font-weight: 500;
font-size: 40rpx;
color: #333333;
}
.name-box-time {
font-size: 28rpx;
color: #666666;
}
}
.name-box {
width: 100%;
border-radius: 16rpx;
overflow-y: auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-content: flex-start;
box-sizing: border-box;
}
}
</style>
+141 -141
View File
@@ -1,141 +1,141 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header :title="name" :isReturn="true" @return="onReturnClick">
<!-- <template v-slot:right>
<img
src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/newClear.png"
alt=""
class="clear_but"
/>
</template> -->
</Header>
<view class="setting-view">
<view
class="news_content_item"
v-for="(item, index) in dataList"
:key="index"
@click="onJumpShop(item.id)"
>
<image
class="news_content_item_img"
src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new-logo.png"
mode="aspectFill"
></image>
<view class="news_content_item_warp">
<view class="news_content_item_title">{{ item.title }}</view>
<view class="news_content_item_content">{{
formatDate(item.ctdate)
}}</view>
</view>
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import Header from "@/components/common/header.vue";
import TopSafe from "@/components/common/top-safe.nvue";
import { getNewsList } from "@/api/news.js";
import { formatDate } from "@/utils/index.js";
export default {
components: { Header, TopSafe },
data() {
return {
dataList: [],
name: "系统公告",
};
},
onShow() {},
onLoad() {
this.getSearchList();
},
methods: {
formatDate,
async getSearchList() {
getNewsList({
category: 2,
type: 0,
page: 1,
pageSize: 1000,
}).then((res) => {
console.log("获取公告", res);
if (res.bizcode === 100) {
this.dataList = res.data.entitys || [];
console.log(this.dataList);
}
});
},
onJumpShop(id) {
uni.setStorageSync("isReadNews", this.dataList[0].id);
uni.navigateTo({
url:
"/pages/login_package/announcement-detail/announcement-detail?id=" +
id,
});
},
// 返回
onReturnClick() {
uni.switchTab({
url:'/pages/home/home'
})
},
},
};
</script>
<style lang="scss" scoped>
.clear_but{
width: 44rpx;
height: 44rpx;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
display: flex;
background-color: #fff;
flex-direction: column;
align-items: center;
overflow-y: auto;
box-sizing: border-box;
position: relative;
.news_content_item {
display: flex;
align-items: center;
padding: 0 32rpx;
width:calc(100% - 64rpx);
height: 128rpx;
.news_content_item_img {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.news_content_item_warp {
.news_content_item_title {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/* 下面两行是为了兼容老版本 Firefox */
line-clamp: 1;
box-orient: vertical;
font-size: 28rpx;
color: #333333;
}
.news_content_item_content {
font-size: 12px;
color: #999999;
margin-top: 4rpx;
}
}
}
}
</style>
<template>
<view class="content">
<TopSafe></TopSafe>
<Header :title="name" :isReturn="true" @return="onReturnClick">
<!-- <template v-slot:right>
<img
src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/newClear.png"
alt=""
class="clear_but"
/>
</template> -->
</Header>
<view class="setting-view">
<view
class="news_content_item"
v-for="(item, index) in dataList"
:key="index"
@click="onJumpShop(item.id)"
>
<image
class="news_content_item_img"
src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new-logo.png"
mode="aspectFill"
></image>
<view class="news_content_item_warp">
<view class="news_content_item_title">{{ item.title }}</view>
<view class="news_content_item_content">{{
formatDate(item.ctdate)
}}</view>
</view>
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import Header from "@/components/common/header.vue";
import TopSafe from "@/components/common/top-safe.nvue";
import { getNewsList } from "@/api/news.js";
import { formatDate } from "@/utils/index.js";
export default {
components: { Header, TopSafe },
data() {
return {
dataList: [],
name: "系统公告",
};
},
onShow() {},
onLoad() {
this.getSearchList();
},
methods: {
formatDate,
async getSearchList() {
getNewsList({
category: 2,
type: 0,
page: 1,
pageSize: 1000,
}).then((res) => {
console.log("获取公告", res);
if (res.bizcode === 100) {
this.dataList = res.data.entitys || [];
console.log(this.dataList);
}
});
},
onJumpShop(id) {
uni.setStorageSync("isReadNews", this.dataList[0].id);
uni.navigateTo({
url:
"/pages/login_package/announcement-detail/announcement-detail?id=" +
id,
});
},
// 返回
onReturnClick() {
uni.switchTab({
url:'/pages/home/home'
})
},
},
};
</script>
<style lang="scss" scoped>
.clear_but{
width: 44rpx;
height: 44rpx;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
display: flex;
background-color: #fff;
flex-direction: column;
align-items: center;
overflow-y: auto;
box-sizing: border-box;
position: relative;
.news_content_item {
display: flex;
align-items: center;
padding: 0 32rpx;
width:calc(100% - 64rpx);
height: 128rpx;
.news_content_item_img {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.news_content_item_warp {
.news_content_item_title {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/* 下面两行是为了兼容老版本 Firefox */
line-clamp: 1;
box-orient: vertical;
font-size: 28rpx;
color: #333333;
}
.news_content_item_content {
font-size: 12px;
color: #999999;
margin-top: 4rpx;
}
}
}
}
</style>
+257 -257
View File
@@ -1,257 +1,257 @@
<template>
<view class="register_warp">
<view class="header_">
<view style="margin-top: 10rpx">
<up-image
src="/static/common/left.png"
width="18"
height="20"
bgColor="#f1f6ff00"
@click="jumpMine"
/>
</view>
<view class="title_">绑定手机号</view>
<view></view>
</view>
<view class="register_ifo_warp">
<view class="register_info_item">
<up-input
placeholder="请输入手机号"
border="surround"
v-model="form.mobile"
:customStyle="inputCss"
></up-input>
</view>
<view class="register_info_item">
<up-input
placeholder="请输入验证码"
border="surround"
v-model="form.smsCode"
:customStyle="inputCss"
>
<template #suffix style="margin-right: 10rpx">
<view v-if="countdown" class="code-warp">
<up-count-down
:time="60 * 1000"
format="ss"
@finish="countdown = false"
></up-count-down>
<text style="margin-left: 10rpx">s</text>
</view>
<view v-else @click="getMobileCode" class="code_msg">
获取验证码
</view>
</template>
</up-input>
</view>
</view>
<view
class="login_comm_but login_comm_but_yes"
@click="registerFun"
:loading="butLoading"
>
登录
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { SMS_TYPE } from "@/utils/enumUtils.js";
import { getUserList } from "@/api/common.js";
import { wechatLogin, alipayLogin } from "@/api/auth.js";
import {
setStorageFun,
TOKEN_NAME,
USER_KEY,
USER_DATA,
USER_LOGIN_TIME,
} from "@/utils/auth.js";
export default {
data() {
return {
form: {
mobile: null,
smsCode: null, // 验证码
token: null,
},
inputCss: {
height: "80rpx",
background: "#F3F3F3FF",
"border-radius": "30rpx",
border: "0rpx",
"padding-left": "16px",
},
countdown: false, // 清空倒计时
butLoading: false,
disabled: false,
type: 1, //1.微信 2.支付宝
};
},
onLoad(option) {
this.form.token = option.token;
this.type = option.type;
console.log("-----1", option, this.form.token, this.type);
},
methods: {
jumpMine() {
uni.reLaunch({
url: "/pages/login_package/login/login",
});
},
async registerFun() {
const form = this.form;
if (!form.mobile) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入手机号",
});
return;
}
if (!form.smsCode) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入验证码",
});
return;
}
this.butLoading = true;
const params = {
mobile: form.mobile,
smsCode: form.smsCode,
isValid: true,
token: form.token,
};
const response =
this.type == 1 ? await wechatLogin(params) : await alipayLogin(params);
console.log("微信登录接口返回:", params, response);
if (response && response.bizcode === 100) {
const data = response.data;
setStorageFun(TOKEN_NAME, data.token);
// 用于无感登录
setStorageFun(USER_KEY, "");
const userInfo = {
avatar: data.avatarUrl,
name: data.name,
userId: data.userId,
grade: data.grade,
inviteCode: data.inviteCode,
};
setStorageFun(USER_DATA, userInfo);
// 当前登录得时间戳
let currentTimeStamp = new Date().getTime();
setStorageFun(USER_LOGIN_TIME, currentTimeStamp);
const res = uni.getSystemInfoSync();
uni.setStorageSync("platform", res.platform);
// #ifdef APP-PLUS
// 获取应用版本信息
plus.runtime.getProperty(plus.runtime.appid, function (inf) {
console.log("版本信息", inf.versionCode);
uni.setStorageSync("version-1", inf.version); // 大版本号
uni.setStorageSync("versionCode", inf.versionCode); // 小版本号
});
let uuid = plus.device.uuid;
// #endif
this.$refs.uToastRef.show({
type: "success",
message: response.msg,
});
setTimeout(() => {
uni.switchTab({
url: "/pages/home/home",
});
}, 2000);
}
this.butLoading = false;
},
/**
* 获取手机验证码
*/
async getMobileCode() {
const form = this.form;
if (!form.mobile) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入手机号码",
});
return;
}
this.countdown = true;
const params = {
mobile: form.mobile,
type: this.type == 1 ? SMS_TYPE.WECHAT : SMS_TYPE.ALIPAY,
};
const response = await getUserList(params);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: "success",
message: response.msg,
});
} else {
this.countdown = false;
}
},
},
};
</script>
<style lang="scss" scoped>
.header_ {
display: flex;
align-items: center;
padding: calc(24rpx + env(safe-area-inset-bottom)) 30rpx 0 30rpx;
.title_ {
font-weight: bold;
font-size: 36rpx;
margin-left: 20rpx;
}
}
.register_warp {
height: calc(100vh - 280rpx);
padding: 40rpx;
}
.register_title_warp {
display: flex;
justify-content: space-between;
align-items: center;
color: #333333;
.register_title_warp_title {
font-weight: bold;
font-size: 62rpx;
}
.register_title_warp_download {
font-size: 30rpx;
padding: 0 25rpx;
height: 70rpx;
border-radius: 20rpx;
color: #fff;
background-color: #7934f6;
display: flex;
align-items: center;
justify-content: center;
}
}
.register_ifo_warp {
margin-top: 90rpx;
.register_info_item {
margin-bottom: 40rpx;
}
}
</style>
<template>
<view class="register_warp">
<view class="header_">
<view style="margin-top: 10rpx">
<up-image
src="/static/common/left.png"
width="18"
height="20"
bgColor="#f1f6ff00"
@click="jumpMine"
/>
</view>
<view class="title_">绑定手机号</view>
<view></view>
</view>
<view class="register_ifo_warp">
<view class="register_info_item">
<up-input
placeholder="请输入手机号"
border="surround"
v-model="form.mobile"
:customStyle="inputCss"
></up-input>
</view>
<view class="register_info_item">
<up-input
placeholder="请输入验证码"
border="surround"
v-model="form.smsCode"
:customStyle="inputCss"
>
<template #suffix style="margin-right: 10rpx">
<view v-if="countdown" class="code-warp">
<up-count-down
:time="60 * 1000"
format="ss"
@finish="countdown = false"
></up-count-down>
<text style="margin-left: 10rpx">s</text>
</view>
<view v-else @click="getMobileCode" class="code_msg">
获取验证码
</view>
</template>
</up-input>
</view>
</view>
<view
class="login_comm_but login_comm_but_yes"
@click="registerFun"
:loading="butLoading"
>
登录
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { SMS_TYPE } from "@/utils/enumUtils.js";
import { getUserList } from "@/api/common.js";
import { wechatLogin, alipayLogin } from "@/api/auth.js";
import {
setStorageFun,
TOKEN_NAME,
USER_KEY,
USER_DATA,
USER_LOGIN_TIME,
} from "@/utils/auth.js";
export default {
data() {
return {
form: {
mobile: null,
smsCode: null, // 验证码
token: null,
},
inputCss: {
height: "80rpx",
background: "#F3F3F3FF",
"border-radius": "30rpx",
border: "0rpx",
"padding-left": "16px",
},
countdown: false, // 清空倒计时
butLoading: false,
disabled: false,
type: 1, //1.微信 2.支付宝
};
},
onLoad(option) {
this.form.token = option.token;
this.type = option.type;
console.log("-----1", option, this.form.token, this.type);
},
methods: {
jumpMine() {
uni.reLaunch({
url: "/pages/login_package/login/login",
});
},
async registerFun() {
const form = this.form;
if (!form.mobile) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入手机号",
});
return;
}
if (!form.smsCode) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入验证码",
});
return;
}
this.butLoading = true;
const params = {
mobile: form.mobile,
smsCode: form.smsCode,
isValid: true,
token: form.token,
};
const response =
this.type == 1 ? await wechatLogin(params) : await alipayLogin(params);
console.log("微信登录接口返回:", params, response);
if (response && response.bizcode === 100) {
const data = response.data;
setStorageFun(TOKEN_NAME, data.token);
// 用于无感登录
setStorageFun(USER_KEY, "");
const userInfo = {
avatar: data.avatarUrl,
name: data.name,
userId: data.userId,
grade: data.grade,
inviteCode: data.inviteCode,
};
setStorageFun(USER_DATA, userInfo);
// 当前登录得时间戳
let currentTimeStamp = new Date().getTime();
setStorageFun(USER_LOGIN_TIME, currentTimeStamp);
const res = uni.getSystemInfoSync();
uni.setStorageSync("platform", res.platform);
// #ifdef APP-PLUS
// 获取应用版本信息
plus.runtime.getProperty(plus.runtime.appid, function (inf) {
console.log("版本信息", inf.versionCode);
uni.setStorageSync("version-1", inf.version); // 大版本号
uni.setStorageSync("versionCode", inf.versionCode); // 小版本号
});
let uuid = plus.device.uuid;
// #endif
this.$refs.uToastRef.show({
type: "success",
message: response.msg,
});
setTimeout(() => {
uni.switchTab({
url: "/pages/home/home",
});
}, 2000);
}
this.butLoading = false;
},
/**
* 获取手机验证码
*/
async getMobileCode() {
const form = this.form;
if (!form.mobile) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入手机号码",
});
return;
}
this.countdown = true;
const params = {
mobile: form.mobile,
type: this.type == 1 ? SMS_TYPE.WECHAT : SMS_TYPE.ALIPAY,
};
const response = await getUserList(params);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: "success",
message: response.msg,
});
} else {
this.countdown = false;
}
},
},
};
</script>
<style lang="scss" scoped>
.header_ {
display: flex;
align-items: center;
padding: calc(24rpx + env(safe-area-inset-bottom)) 30rpx 0 30rpx;
.title_ {
font-weight: bold;
font-size: 36rpx;
margin-left: 20rpx;
}
}
.register_warp {
height: calc(100vh - 280rpx);
padding: 40rpx;
}
.register_title_warp {
display: flex;
justify-content: space-between;
align-items: center;
color: #333333;
.register_title_warp_title {
font-weight: bold;
font-size: 62rpx;
}
.register_title_warp_download {
font-size: 30rpx;
padding: 0 25rpx;
height: 70rpx;
border-radius: 20rpx;
color: #fff;
background-color: #7934f6;
display: flex;
align-items: center;
justify-content: center;
}
}
.register_ifo_warp {
margin-top: 90rpx;
.register_info_item {
margin-bottom: 40rpx;
}
}
</style>