This commit is contained in:
zpc 2025-06-16 18:01:32 +08:00
parent 63f06d5891
commit 985a938757
7 changed files with 29 additions and 677 deletions

View File

@ -7,16 +7,18 @@
<view class="_rule_pop_title">{{ ruleData.title }}</view>
<scroll-view scroll-y class="_rule_pop_bd" :class="{ 'has-check': noticeCheck }">
<view v-if="is_image_optimizer&&images.length>0" class="image-optimizer">
<image show-menu-by-longpress v-for="(image, index) in images" :key="index" :src="image" mode="widthFix" style="width: 100%;"></image>
<view v-if="is_image_optimizer && images.length > 0" class="image-optimizer">
<image show-menu-by-longpress v-for="(image, index) in images" :key="index" :src="image"
mode="widthFix" style="width: 100%;"></image>
</view>
<view v-else>
<rich-text :nodes="ruleData.content"></rich-text>
</view>
<view v-else v-html="ruleData.content"></view>
</scroll-view>
<view v-if="noticeCheck" class="check-btn" @click="todayHide = !todayHide">
<view class="icon">
<image v-if="todayHide" :src="$img1('common/check_act.png')" lazy-load></image>
<image v-else :src="$img1('common/check.png')" lazy-load></image>
</view>
@ -31,6 +33,7 @@
</template>
<script>
import { getDanYe } from '../../common/server/config'
export default {
props: {
noticeCheck: {
@ -58,7 +61,7 @@ export default {
}) {
if (!show) {
if (this.todayHide) {
uni.setStorageSync('_last_notice_date', this.$common.getDateTime())
uni.setStorageSync('_last_notice_date', this.$c.getDateTime())
}
}
},
@ -76,28 +79,29 @@ export default {
async getRule(id, title = '') {
this.is_image_optimizer = false;
this.images = [];
let { status, data, msg, is_image_optimizer } = await this.$common.getRule(id, true)
if (status) {
if (is_image_optimizer != null && is_image_optimizer == 1) {
console.log('开启图片优化');
this.is_image_optimizer = true;
//
const imgRegex = /<img[^>]+src="([^"]+)"[^>]*>/g;
let match;
while ((match = imgRegex.exec(data)) !== null) {
// images.push(match[1]);
this.images.push(match[1]);
}
console.log('提取的图片地址:', this.images);
//
let data = await getDanYe(id)
let { is_image_optimizer, content } = data;
if (is_image_optimizer != null && is_image_optimizer == 1) {
console.log('开启图片优化');
this.is_image_optimizer = true;
content = content.replace(
/\<img/gi,
'<img style="width: 100%;vertical-align: middle;"'
);
//
const imgRegex = /<img[^>]+src="([^"]+)"[^>]*>/g;
let match;
while ((match = imgRegex.exec(content)) !== null) {
// images.push(match[1]);
this.images.push(match[1]);
}
this.open({
title: title,
content: data
})
} else {
this.$common.toast(msg)
console.log('提取的图片地址:', this.images);
//
}
this.open({
title: title,
content: content
})
}
}
}

View File

@ -1,96 +0,0 @@
<template>
<view class="time" :style="justifyLeft">
<text class="styleAll">{{ intDiff }}</text>
</view>
</template>
<script>
export default {
name: "countDown",
props: {
justifyLeft: {
type: String,
default: ""
},
//
tipText: {
type: String,
default: "倒计时"
},
dayText: {
type: String,
default: "天"
},
hourText: {
type: String,
default: "时"
},
minuteText: {
type: String,
default: "分"
},
secondText: {
type: String,
default: "秒"
},
datatime: {
type: Number,
default: 0
},
isDay: {
type: Boolean,
default: true
},
ishour: {
type: Boolean,
default: true
}
},
data: function() {
return {
day: "00",
hour: "00",
minute: "00",
second: "00",
intDiff: 0
};
},
created: function() {
this.$nextTick(() => {
this.show_time();
})
},
mounted: function() {},
methods: {
show_time: function() {
let that = this;
function runTime() {
//
that.intDiff = that.datatime - Date.parse(new Date()) / 1000; //
if (that.intDiff <= 0) {
that.$emit('change', {
's': that.intDiff
})
}
}
runTime();
setInterval(runTime, 1000);
}
}
};
</script>
<style>
.time {
display: flex;
justify-content: center;
color: #fff;
}
.red {
/* color: #fc4141; */
margin: 0 4rpx;
}
</style>

View File

@ -1,107 +0,0 @@
<template>
<view class="time" :style="justifyLeft">
<!-- <text class="red" v-if="tipText">{{ tipText }}</text>
<text class="styleAll" v-if="isDay === true">{{ day }}</text>
<text class="timeTxt red" v-if="dayText">{{ dayText }}</text>
<text class="styleAll" v-if="ishour === true">{{ hour }}</text>
<text class="timeTxt red" v-if="hourText">{{ hourText }}</text>
<text class="styleAll">{{ minute }}</text>
<text class="timeTxt red" v-if="minuteText">{{ minuteText }}</text> -->
<text class="styleAll">{{ second }}</text>
<!-- <text class="timeTxt red" v-if="secondText">{{ secondText }}</text> -->
</view>
</template>
<script>
export default {
name: "countDown",
props: {
justifyLeft: {
type: String,
default: ""
},
//
tipText: {
type: String,
default: "倒计时"
},
dayText: {
type: String,
default: "天"
},
hourText: {
type: String,
default: "时"
},
minuteText: {
type: String,
default: "分"
},
secondText: {
type: String,
default: "秒"
},
datatime: {
type: Number,
default: 0
},
isDay: {
type: Boolean,
default: true
},
ishour: {
type: Boolean,
default: true
}
},
data: function() {
return {
day: "00",
hour: "00",
minute: "00",
second: "00"
};
},
created: function() {
this.show_time();
},
mounted: function() {},
methods: {
show_time: function() {
let that = this;
function runTime() {
//
// console.log(that.datatime)
that.second = that.datatime - Date.parse(new Date()) / 1000; //
if (that.second <= 0) {
//
that.$emit('change', {
's': that.second
})
clearInterval()
return
}
}
runTime();
setInterval(runTime, 1000);
}
}
};
</script>
<style>
.time {
display: flex;
justify-content: center;
/* font-size: 24rpx; */
color: #fff;
}
.red {
/* color: #fc4141; */
margin: 0 4rpx;
}
</style>

View File

@ -1,29 +0,0 @@
@import '@/style/mixin.scss';
view,
page,
text,
button,
image,
textarea,
scroll-view,input {
box-sizing: border-box;
}
image {
display: block;
}
button {
margin: 0;
padding: 0;
background-color: #FFFF;
}
button::after {
border: none;
}
// 主题背景色
.themeBgColor {
background-color: $themeColor;
}
// 主题字体色
.themeFontColor {
color: $themeColor !important;
}

View File

@ -1,317 +0,0 @@
.input_form_box {
.input_title {
font-size: 32upx;
color: #333333;
padding: 30upx;
&.required::before {
content: '*';
font-size: 30upx;
color: #f73333;
}
}
.input_box {
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 0 30upx;
background-color: #fff;
&.line {
border-top: 1upx solid #f7f7f7;
}
&.btm_line {
border-bottom: 1upx solid #f7f7f7;
}
.name {
font-size: 30upx;
color: #666666;
min-width: 120upx;
flex-shrink: 0;
padding: 30upx 0;
&.required::before {
content: '*';
font-size: 30upx;
color: #f73333;
}
}
.prompt {
width: 100%;
padding-bottom: 20upx;
font-size: 28upx;
color: #999999;
transform: translateY(-10upx);
}
picker {
flex: 1;
}
}
.input_info {
padding: 30upx 0;
display: flex;
flex: 1;
align-items: center;
> text {
font-size: 24upx;
color: #555555;
margin-left: 10upx;
flex-shrink: 0;
}
input {
width: 100%;
text-align: right;
font-size: 30upx;
}
button {
flex-shrink: 0;
min-width: 146upx;
padding: 0 30upx;
height: 60upx;
line-height: 60upx;
background-color: $themeColor;
border-radius: 8upx;
font-size: 24upx;
color: #ffffff;
margin-left: 20upx;
}
}
.switch {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
&::after {
content: "";
@include bis('https://qn.kemean.cn/upload/201908/05/5f85ccc4de404cafb30b15dedef41e8b', 100% 100%);
width: 108upx;
height: 58upx;
}
&.active::after {
background-image: url('https://qn.kemean.cn/upload/201908/05/eef318fa5c9f4692a1bd6ef6edd9be10');
}
}
.radio_box {
padding: 30upx 0;
flex: 1;
display: flex;
justify-content: flex-end;
view {
display: flex;
align-items: center;
font-size: 28upx;
color: #333333;
margin-left: 90upx;
&:first-child {
margin-left: 0;
}
&::before {
content: '';
width: 38upx;
height: 38upx;
margin-right: 15upx;
border: 2upx solid #eee;
border-radius: 50%;
box-sizing: border-box;
}
&.active::before {
border: 12upx solid $themeColor;
}
}
}
.select_info {
padding: 30upx 0;
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
.value {
font-size: 30upx;
color: #333;
text-align: right;
}
.select {
font-size: 30upx;
color: #999999;
}
.head_img {
width: 100upx;
height: 100upx;
border-radius: 10upx;
}
&::after {
content: '';
@include bis('http://qn.kemean.cn/upload/201907/23/me_lise_more.png', 100% 100%);
width: 15upx;
height: 26upx;
margin-left: 20upx;
flex-shrink: 0;
}
}
.upload_info {
width: 100%;
display: flex;
flex-wrap: wrap;
padding-bottom: 10upx;
.upload_img {
width: 200upx;
height: 200upx;
background-color: #ffffff;
border-radius: 4upx;
margin-right: 16upx;
margin-bottom: 16upx;
overflow: hidden;
position: relative;
&:nth-child(3n) {
margin-right: 0;
}
image {
width: 100%;
height: 100%;
}
.delete {
position: absolute;
top: 0upx;
right: 0upx;
width: 44upx;
height: 44upx;
background-image: url('https://qn.kemean.cn/upload/201908/05/df40b98b77fc4c42a5e0327c62975e29');
background-position: center center;
background-repeat: no-repeat;
background-size: 100% 100%;
}
&.upload {
border: 1upx dashed #b2b2b2;
background-image: url('https://qn.kemean.cn/upload/201908/05/d68df2873cd04f18a70104e340a14884');
background-position: center center;
background-repeat: no-repeat;
background-size: 60% 60%;
}
}
}
.textarea_info {
width: 100%;
padding-bottom: 30upx;
font-size: 28upx;
color: #333;
textarea {
width: 100%;
height: 154upx;
font-size: 30upx;
line-height: 150%;
}
}
}
.protocol {
margin-top: 20upx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28upx;
color: #666;
text {
color: $themeColor;
}
view {
@include theme('unselected_img', './');
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
width: 34upx;
height: 34upx;
margin-right: 10upx;
&.active {
@include theme('radio_img', './');
}
}
}
.form_but {
margin-top: 80upx;
padding: 30upx;
display: flex;
justify-content: center;
button {
flex: 1;
height: 88upx;
background-color: #f0f0f0;
border-radius: 8upx;
line-height: 88upx;
font-size: 34upx;
color: #cccccc;
&.active {
@include theme("btn_bg");
color: #ffffff;
}
&::after {
border: none;
}
}
}
// -----------------------导航条-------------------------------
.cell_list {
background-color: #fff;
padding: 30upx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1upx solid #f5f5f5;
&:active {
background-color: #f5f5f5;
}
&.interval {
margin-bottom: 20upx;
border-bottom: 0;
}
.cell_left {
font-size: 28upx;
color: #333333;
display: flex;
align-items: center;
image {
width: 30upx;
height: 30upx;
margin-right: 20upx;
}
}
.cell_right {
font-size: 28upx;
color: #333333;
display: flex;
align-items: center;
&.arrow::after {
content: '';
@include bis('./static/icon/me_lise_more.png', 100% 100%);
width: 12upx;
height: 22upx;
margin-left: 20upx;
}
image {
width: 36upx;
height: 36upx;
margin-left: 20upx;
}
}
}

View File

@ -1,49 +0,0 @@
@charset "utf-8";
//主题色
$themeColor: #ea552d;
@mixin theme($type,$path:''){
@if $type == "btn_bg" {
background-image: linear-gradient(90deg, #ea552d 0%, #f19837 100%);
} @else if $type == "unselected_img" {
background-image: url($path + "static/icon/ic_gender_unselected.png");
} @else if $type == "check_img" {
background-image: url($path + "static/icon/ic_agreed.png");
} @else if $type == "radio_img" {
background-image: url($path + "static/icon/ic_gender_selected.png");
}
}
// 背景图片地址和大小
@mixin bis($url, $size: cover) {
background-image: url($url);
background-repeat: no-repeat;
background-position: center center;
background-size: $size;
}
// 头像
@mixin ic($width, $height) {
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
flex-shrink: 0;
width: $width;
height: $height;
}
// 单行省略号
@mixin toe() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap
}
// 多行省略号
@mixin bov($num:2) {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: $num;
-webkit-box-orient: vertical;
}

View File

@ -1,54 +0,0 @@
.table_box {
background-color: #FFFFFF;
.table_title {
padding: 0rpx 20rpx;
font-size: 30rpx;
height: 60rpx;
line-height: 60rpx;
color: #FFF;
text-align: center;
font-weight: bold;
background-color: rgba($color: $themeColor, $alpha: 1);
}
.table_head {
display: flex;
align-content: center;
background-color: rgba($color: $themeColor, $alpha: 0.35);
text {
padding: 15rpx 20rpx;
display: flex;
align-items: center;
justify-content: center;
flex: 1;
flex-shrink: 0;
font-size: 28rpx;
color: #333;
font-weight: bold;
border-right: 2rpx solid rgba($color: $themeColor, $alpha: 0.2);
&:last-child {
border-right: 0;
flex: 2;
}
}
}
.table_content {
display: flex;
align-content: center;
border-top: 2rpx solid rgba($color: $themeColor, $alpha: 0.2);
background-color: rgba($color: $themeColor, $alpha: 0.2);
text {
padding: 15rpx 20rpx;
display: flex;
align-items: center;
justify-content: center;
flex: 1;
font-size: 28rpx;
color: #999;
border-right: 2rpx solid rgba($color: $themeColor, $alpha: 0.3);
&:last-child {
border-right: 0;
flex: 2;
}
}
}
}