Compare commits
3 Commits
597b0922d7
...
fe47426b04
| Author | SHA1 | Date |
|---|---|---|
|
|
fe47426b04 | |
|
|
a667af8e7d | |
|
|
627c8ca487 |
4
.env
4
.env
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -7,3 +7,7 @@ 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'
|
||||
|
|
@ -7,3 +7,7 @@ VITE_USE_COMPRESS=true
|
|||
VITE_USE_REPORT=false
|
||||
|
||||
VITE_BASE_API_URL='/'
|
||||
|
||||
VITE_BASE_APP_ID='wx292995002b9476f3'
|
||||
|
||||
VITE_BASE_APP_SECRET='896202811f43b146123f8d3f9ad3c153'
|
||||
32
admin.conf
32
admin.conf
|
|
@ -1,7 +1,29 @@
|
|||
server {
|
||||
listen 4399;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
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;
|
||||
|
|
@ -21,13 +43,9 @@ server {
|
|||
gzip_static on;
|
||||
|
||||
root /usr/share/nginx/html/admin/dist;
|
||||
index index.html index.htm;
|
||||
location / {
|
||||
index index.html index.htm;
|
||||
# try_files $uri $uri/ @router;
|
||||
}
|
||||
|
||||
location @router {
|
||||
rewrite ^.*$ /index.html break;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /api{
|
||||
|
|
|
|||
53
h5.conf
53
h5.conf
|
|
@ -1,6 +1,37 @@
|
|||
# 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;
|
||||
server_name swfc.store;
|
||||
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会话票据
|
||||
|
||||
gzip on;
|
||||
# 定义要压缩的文件类型
|
||||
|
|
@ -21,13 +52,10 @@ server {
|
|||
gzip_static on;
|
||||
|
||||
root /usr/share/nginx/html/h5/dist;
|
||||
index index.html index.htm;
|
||||
location / {
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ @router;
|
||||
}
|
||||
|
||||
location @router {
|
||||
rewrite ^.*$ /index.html break;
|
||||
# try_files $uri $uri/ @router;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /api{
|
||||
|
|
@ -41,4 +69,13 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ const share = async (title: string, desc: string, link: string, imgUrl: string)
|
|||
const shareData = {
|
||||
title,
|
||||
desc,
|
||||
link: link.replace(/\?time=\d+(#)/gi, '$1'),
|
||||
// link: link.replace(/\?time=\d+(#)/gi, '$1'),
|
||||
link,
|
||||
imgUrl,
|
||||
success: function (res: any) {
|
||||
console.log('wx success', res);
|
||||
|
|
@ -82,7 +83,8 @@ const share = async (title: string, desc: string, link: string, imgUrl: string)
|
|||
const shareData = {
|
||||
title,
|
||||
desc,
|
||||
link: link.replace(/\?time=\d+(#)/gi, '$1'),
|
||||
// link: link.replace(/\?time=\d+(#)/gi, '$1'),
|
||||
link,
|
||||
imgUrl,
|
||||
success: function (res: any) {
|
||||
console.log('wx share success', res);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@
|
|||
jumpBtn: false,
|
||||
autoClose: true,
|
||||
canvas: false,
|
||||
isRotate: true,
|
||||
isRotate: false,
|
||||
onPlay() {},
|
||||
onPause() {},
|
||||
onEnd() {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,9 @@
|
|||
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
|
||||
|
|
@ -118,12 +120,13 @@
|
|||
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 === 'introJap' ? { fontFamily: 'Arial, Helvetica, sans-serif' } : ''"
|
||||
:style="selLang !== 'introEng' ? { fontFamily: 'Arial, Helvetica, sans-serif' } : '' "
|
||||
>
|
||||
{{ shopDetail[selLang] }}
|
||||
</div>
|
||||
|
|
@ -281,6 +284,7 @@
|
|||
showImgPreview.value = true;
|
||||
};
|
||||
const handleSelLang = (key: string) => {
|
||||
if(!shopDetail.value[key]) return
|
||||
selLang.value = key;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 && 'grayscale'"
|
||||
:class="(item.nums <= 0 || item.verifState) && '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"
|
||||
v-if="item.nums > 0 && !item.verifState"
|
||||
@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" src="@/assets/imgs/sale/lingwan.png" alt="" class="w-166px object-contain mr-[-18px]" />
|
||||
<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]" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -105,12 +105,13 @@
|
|||
>
|
||||
<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"> {{ isSuccess ? '' : selItem.activityRules }} </div> -->
|
||||
<div class="text-30px leading bg-text"> 礼品发放以线下库存为准 先到先得 </div>
|
||||
</div>
|
||||
<div
|
||||
v-if="iptShow"
|
||||
@click.stop
|
||||
class="absolute box-border right-[84px] top-[380px] h-76px w-415px rounded-10px bg-#FADDC0 overflow-hidden"
|
||||
class="absolute box-border right-[80px] top-[380px] h-76px w-415px rounded-10px bg-#FADDC0 overflow-hidden"
|
||||
>
|
||||
<nut-input
|
||||
ref="iptRef"
|
||||
|
|
@ -136,7 +137,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, watch, onMounted } from 'vue';
|
||||
import { ref, nextTick, watch } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { handleWxRedict, getQueryString } from '@/utils/util';
|
||||
import shareWechat from '@/utils/wxH5Share';
|
||||
|
|
@ -195,11 +196,13 @@
|
|||
|
||||
const handleClick = async (item: any) => {
|
||||
if (!token.value) return (location.href = handleWxRedict());
|
||||
// 001Mol1000Yj4R1raU100kCKRM0Mol1G
|
||||
if (selId.value) {
|
||||
// state 领取状态,true已领取,false未领取
|
||||
if (item.state) {
|
||||
selId.value = item.id;
|
||||
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 });
|
||||
|
|
@ -225,7 +228,7 @@
|
|||
duration: 1000,
|
||||
});
|
||||
try {
|
||||
const req = { id: selId.value, checkCode: checkCode.value, openId: userInfo.value.openid };
|
||||
const req = { id: selItem.value.id, checkCode: checkCode.value, openId: userInfo.value.openid };
|
||||
const { code } = await queryVerification(req);
|
||||
if (code === 200) {
|
||||
checkCode.value = '';
|
||||
|
|
@ -247,14 +250,15 @@
|
|||
});
|
||||
};
|
||||
|
||||
const handleShareWechat = async () => {
|
||||
const handleShareWechat = () => {
|
||||
// if (token.value) {
|
||||
shareWechat(
|
||||
'tit',
|
||||
'content',
|
||||
`${window.location.origin}}`,
|
||||
'https://img10.360buyimg.com/ling/jfs/t1/181258/24/10385/53029/60d04978Ef21f2d42/92baeb21f907cd24.jpg',
|
||||
return shareWechat(
|
||||
'SWFC寻味环球 共飨美馔',
|
||||
'',
|
||||
`${window.location.origin}`,
|
||||
'https://huanqiuzhongxin.oss-cn-shanghai.aliyuncs.com/shipin/logo.png',
|
||||
);
|
||||
// window.location.origin
|
||||
// } else location.href = handleWxRedict();
|
||||
};
|
||||
|
||||
|
|
@ -289,21 +293,21 @@
|
|||
userInfo.value = JSON.parse(user);
|
||||
}
|
||||
}
|
||||
getCoupon();
|
||||
};
|
||||
|
||||
getCoupon();
|
||||
init();
|
||||
|
||||
onMounted(async () => {
|
||||
handleShareWechat();
|
||||
});
|
||||
handleShareWechat();
|
||||
|
||||
watch(show, (val) => {
|
||||
if (val) {
|
||||
checkCode.value = '';
|
||||
} else {
|
||||
getCoupon();
|
||||
selId.value && (iptShow.value = true);
|
||||
getCoupon()
|
||||
setTimeout(() => {
|
||||
selId.value && (iptShow.value = true);
|
||||
},200)
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -346,6 +350,7 @@
|
|||
}
|
||||
.nut-input-box input {
|
||||
color: #000;
|
||||
padding-left: 14px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue