Compare commits

..

No commits in common. "fe47426b04b7b238c54131f283b6989c3b0bedef" and "597b0922d7670dd48a2542fc2d4a2d3055c27584" have entirely different histories.

9 changed files with 46 additions and 120 deletions

4
.env
View File

@ -3,7 +3,7 @@ VITE_TOKEN_KEY=tokenKey
VITE_URL_PREFIX=/api
# VITE_BASE_APP_ID='wx0fd5e237dba24ff4'
# VITE_BASE_APP_ID='wxbad2e8a91c62a734'
VITE_BASE_APP_ID='wxbad2e8a91c62a734'
# VITE_BASE_APP_SECRET='14f1027251416b49734c36bf58d6a741'
# VITE_BASE_APP_SECRET='e1b7fc425ca9cca05dd83609a6dc9c00'
VITE_BASE_APP_SECRET='e1b7fc425ca9cca05dd83609a6dc9c00'

View File

@ -6,8 +6,4 @@ VITE_USE_COMPRESS=false
VITE_USE_REPORT=false
VITE_BASE_API_URL='http://139.224.10.234:8088'
VITE_BASE_APP_ID='wxbad2e8a91c62a734'
VITE_BASE_APP_SECRET='e1b7fc425ca9cca05dd83609a6dc9c00'
VITE_BASE_API_URL='http://139.224.10.234:8088'

View File

@ -6,8 +6,4 @@ VITE_USE_COMPRESS=true
VITE_USE_REPORT=false
VITE_BASE_API_URL='/'
VITE_BASE_APP_ID='wx292995002b9476f3'
VITE_BASE_APP_SECRET='896202811f43b146123f8d3f9ad3c153'
VITE_BASE_API_URL='/'

View File

@ -1,29 +1,7 @@
server {
listen 80;
listen [::]:80;
listen 4399;
server_name admin.swfc.store;
# 配置HTTP到HTTPS的重定向可选
return 301 https://admin.swfc.store$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name admin.swfc.store;
ssl_certificate /etc/nginx/ssl/admin.swfc.store/admin.swfc.store.pem;
ssl_certificate_key /etc/nginx/ssl/admin.swfc.store/admin.swfc.store.key;
# 配置SSL参数
ssl_protocols TLSv1.2 TLSv1.3; # 指定支持的SSL/TLS协议版本
ssl_prefer_server_ciphers on; # 使用服务器端加密套件顺序
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; # 指定加密套件
# 配置其他SSL选项
ssl_session_timeout 1d; # SSL会话过期时间
ssl_session_cache shared:SSL:10m; # SSL会话缓存大小
ssl_session_tickets off; # 禁用SSL会话票据
gzip on;
# 定义要压缩的文件类型
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
@ -43,9 +21,13 @@ server {
gzip_static on;
root /usr/share/nginx/html/admin/dist;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
index index.html index.htm;
# try_files $uri $uri/ @router;
}
location @router {
rewrite ^.*$ /index.html break;
}
location /api{

53
h5.conf
View File

@ -1,37 +1,6 @@
# server{
# listen 80;
# listen [::]:80;
# server_name www.swfc.store swfc.store;
# # 重定向到 HTTPS
# # return 301 https://swfc.store$request_uri;
# # return 301 https://$host$request_uri;
# # 配置HTTP到HTTPS的重定向可选
# # if ($scheme != "https") {
# # return 301 https://swfc.store;
# # }
# }
server {
listen 80;
listen [::]:80;
server_name www.swfc.store swfc.store;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.swfc.store swfc.store;
ssl_certificate /etc/nginx/ssl/swfc.store/swfc.store.pem;
ssl_certificate_key /etc/nginx/ssl/swfc.store/swfc.store.key;
# 配置SSL参数
ssl_protocols TLSv1.2 TLSv1.3; # 指定支持的SSL/TLS协议版本
ssl_prefer_server_ciphers on; # 使用服务器端加密套件顺序
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; # 指定加密套件
# 配置其他SSL选项
ssl_session_timeout 1d; # SSL会话过期时间
ssl_session_cache shared:SSL:10m; # SSL会话缓存大小
ssl_session_tickets off; # 禁用SSL会话票据
listen 80;
server_name swfc.store;
gzip on;
# 定义要压缩的文件类型
@ -52,10 +21,13 @@ server {
gzip_static on;
root /usr/share/nginx/html/h5/dist;
index index.html index.htm;
location / {
# try_files $uri $uri/ @router;
try_files $uri $uri/ /index.html;
index index.html index.htm;
try_files $uri $uri/ @router;
}
location @router {
rewrite ^.*$ /index.html break;
}
location /api{
@ -69,13 +41,4 @@ server {
rewrite ^/api(.*)$ $1 break;
proxy_pass http://localhost:8088;
}
location /mp/ {
alias /usr/share/nginx/html/mp/;
try_files $uri $uri/ =404;
}
location ~* \.txt$ {
allow all;
}
}

View File

@ -41,8 +41,7 @@ const share = async (title: string, desc: string, link: string, imgUrl: string)
const shareData = {
title,
desc,
// link: link.replace(/\?time=\d+(#)/gi, '$1'),
link,
link: link.replace(/\?time=\d+(#)/gi, '$1'),
imgUrl,
success: function (res: any) {
console.log('wx success', res);
@ -83,8 +82,7 @@ const share = async (title: string, desc: string, link: string, imgUrl: string)
const shareData = {
title,
desc,
// link: link.replace(/\?time=\d+(#)/gi, '$1'),
link,
link: link.replace(/\?time=\d+(#)/gi, '$1'),
imgUrl,
success: function (res: any) {
console.log('wx share success', res);

View File

@ -171,7 +171,7 @@
jumpBtn: false,
autoClose: true,
canvas: false,
isRotate: false,
isRotate: true,
onPlay() {},
onPause() {},
onEnd() {

View File

@ -102,9 +102,7 @@
v-for="(l, i) in lang"
:key="l.key"
>
<template v-if="shopDetail[selLang]">
<span
v-if="shopDetail[l.key]"
:style="l.key === 'introJap' ? { fontFamily: 'Arial, Helvetica, sans-serif' } : ''"
:class="l.key === 'introJap' ? 'text-36px' : 'text-40px'"
>{{ l.lang }}</span
@ -120,13 +118,12 @@
src="@/assets/imgs/shop-detail/hyqq@2x.png"
alt=""
/>
</template>
</div>
</div>
<div
class="box-border mx-auto transition-all px-30px py-70px text-32px content w-690px min-h-300px rounded-3xl"
:class="[selLang === 'introChi' && 'rounded-tl-0px', selLang === 'introJap' && 'rounded-tr-0px']"
:style="selLang !== 'introEng' ? { fontFamily: 'Arial, Helvetica, sans-serif' } : '' "
:style="selLang === 'introJap' ? { fontFamily: 'Arial, Helvetica, sans-serif' } : ''"
>
{{ shopDetail[selLang] }}
</div>
@ -284,7 +281,6 @@
showImgPreview.value = true;
};
const handleSelLang = (key: string) => {
if(!shopDetail.value[key]) return
selLang.value = key;
};

View File

@ -31,7 +31,7 @@
</div>
<div
class="flex items-center justify-between overflow-hidden rounded-md bg-beijing pr-16px pl-8px h-184px"
:class="(item.nums <= 0 || item.verifState) && 'grayscale'"
:class="item.nums <= 0 && 'grayscale'"
>
<img :src="item.giftImage" alt="" class="h-184px mt-[-6px] object-contain" />
<div class="flex items-center justify-between flex-1 pl-2">
@ -41,16 +41,16 @@
<p class="text-20px leading-36px">剩余{{ item.nums }}</p>
</div>
<div
v-if="item.nums > 0 && !item.verifState"
v-if="item.nums > 0"
@click="handleClick(item)"
class="bg-white hover:bg-light-600 overflow-hidden cursor-pointer text-[#090909] text-26px rounded-26px h-52px w-140px leading-46px text-center"
>
{{ !item.state ? '我要报名' : '去核销' }}
我要报名
<!-- 去核销 -->
</div>
</div>
<div>
<img v-if="item.nums <= 0 && !item.verifState" src="@/assets/imgs/sale/lingwan.png" alt="" class="w-166px object-contain mr-[-18px]" />
<img v-if="item.verifState" src="@/assets/imgs/sale/hexiao.png" alt="" class="w-166px object-contain mr-[-18px]" />
<img v-if="item.nums <= 0" src="@/assets/imgs/sale/lingwan.png" alt="" class="w-166px object-contain mr-[-18px]" />
</div>
</div>
</div>
@ -105,13 +105,12 @@
>
<div class="text-36px leading bg-text"> {{ isSuccess ? '核销成功' : '报名成功' }} </div>
<div class="text-60px leading mt-[-4px] bg-text"> {{ selItem.giftName }} </div>
<!-- <div class="text-30px leading bg-text"> {{ isSuccess ? '' : selItem.activityRules }} </div> -->
<div class="text-30px leading bg-text"> 礼品发放以线下库存为准 先到先得 </div>
<div class="text-30px leading bg-text"> {{ isSuccess ? '' : selItem.activityRules }} </div>
</div>
<div
v-if="iptShow"
@click.stop
class="absolute box-border right-[80px] top-[380px] h-76px w-415px rounded-10px bg-#FADDC0 overflow-hidden"
class="absolute box-border right-[84px] top-[380px] h-76px w-415px rounded-10px bg-#FADDC0 overflow-hidden"
>
<nut-input
ref="iptRef"
@ -137,7 +136,7 @@
</template>
<script lang="ts" setup>
import { ref, nextTick, watch } from 'vue';
import { ref, nextTick, watch, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import { handleWxRedict, getQueryString } from '@/utils/util';
import shareWechat from '@/utils/wxH5Share';
@ -196,13 +195,11 @@
const handleClick = async (item: any) => {
if (!token.value) return (location.href = handleWxRedict());
// state truefalse
if (item.state) {
selId.value = item.id;
// 001Mol1000Yj4R1raU100kCKRM0Mol1G
if (selId.value) {
selItem.value = item;
show.value = true;
isSuccess.value = false;
iptShow.value = true;
return;
}
const { result, code } = await queryCouponLog({ id: item.id, openId: userInfo.value.openid });
@ -228,7 +225,7 @@
duration: 1000,
});
try {
const req = { id: selItem.value.id, checkCode: checkCode.value, openId: userInfo.value.openid };
const req = { id: selId.value, checkCode: checkCode.value, openId: userInfo.value.openid };
const { code } = await queryVerification(req);
if (code === 200) {
checkCode.value = '';
@ -250,15 +247,14 @@
});
};
const handleShareWechat = () => {
const handleShareWechat = async () => {
// if (token.value) {
return shareWechat(
'SWFC寻味环球 共飨美馔',
'',
`${window.location.origin}`,
'https://huanqiuzhongxin.oss-cn-shanghai.aliyuncs.com/shipin/logo.png',
shareWechat(
'tit',
'content',
`${window.location.origin}}`,
'https://img10.360buyimg.com/ling/jfs/t1/181258/24/10385/53029/60d04978Ef21f2d42/92baeb21f907cd24.jpg',
);
// window.location.origin
// } else location.href = handleWxRedict();
};
@ -293,21 +289,21 @@
userInfo.value = JSON.parse(user);
}
}
getCoupon();
};
getCoupon();
init();
handleShareWechat();
onMounted(async () => {
handleShareWechat();
});
watch(show, (val) => {
if (val) {
checkCode.value = '';
} else {
getCoupon()
setTimeout(() => {
selId.value && (iptShow.value = true);
},200)
getCoupon();
selId.value && (iptShow.value = true);
}
});
</script>
@ -350,7 +346,6 @@
}
.nut-input-box input {
color: #000;
padding-left: 14px;
}
}
</style>