feat: 接入三tab导航(首页/中奖记录/我的)、活动规则静态页、奖品详情弹窗;接口切换hnlylaw并透传authorization;缓存键统一Sft后缀;问卷ID切1005;注册增加收货地址;答题计时精确到0.01s及交互优化

This commit is contained in:
lcj
2026-10-30 09:47:31 +08:00
parent 305e22ddc5
commit ead48745c2
21 changed files with 1583 additions and 273 deletions
+30 -12
View File
@@ -1,7 +1,10 @@
import { Encrypt, Decrypt } from '@/js_sdk/cainiao-crypto/cainiao-crypto.js' import { Encrypt, Decrypt } from '@/js_sdk/cainiao-crypto/cainiao-crypto.js'
const install = (Vue, vm) => { const install = (Vue, vm) => {
const lylawPost = (url, params = {}) => Vue.prototype.$u.post(url, { request: Encrypt(JSON.stringify(params)) }).then(res => { const LYLAW_BASE = '/lylaw/api/hnlylaw'
const lylawPost = (url, params = {}) => {
console.log('[原始参数]', url, JSON.stringify(params));
return Vue.prototype.$u.post(url, { request: Encrypt(JSON.stringify(params)) }).then(res => {
if (res && res.Data) { if (res && res.Data) {
if (res.Data === 'VFXeGhPbmE9mfQeg2iiwdA==') { if (res.Data === 'VFXeGhPbmE9mfQeg2iiwdA==') {
res.Data = null res.Data = null
@@ -9,20 +12,35 @@ const install = (Vue, vm) => {
try { res.Data = JSON.parse(Decrypt(res.Data)) } catch (e) {} try { res.Data = JSON.parse(Decrypt(res.Data)) } catch (e) {}
} }
} }
if (url.indexOf('wxOpenidLogin') > -1 && res) {
const pickAuth = obj => {
if (!obj || typeof obj !== 'object') return ''
const k = Object.keys(obj).find(x => x.toLowerCase() === 'authorization')
return k ? obj[k] : ''
}
const auth = pickAuth(res.Data) || pickAuth(res)
if (auth) {
uni.setStorageSync('authorizationSft', auth)
console.log('[authorization已缓存]', auth)
}
}
console.log('[解密返回]', url, JSON.stringify(res));
return res return res
}) })
}
Vue.prototype.$u.api = { Vue.prototype.$u.api = {
getWxOpenId: (code) => lylawPost('/lylaw/api/lylaw/getWxOpenId', { code }), getWxOpenId: (code) => lylawPost(`${LYLAW_BASE}/getWxOpenId`, { code }),
wxOpenidLogin: (data) => lylawPost('/lylaw/api/lylaw/wxOpenidLogin', data), wxOpenidLogin: (data) => lylawPost(`${LYLAW_BASE}/wxOpenidLogin`, data),
sendSms: (phone) => lylawPost('/lylaw/api/lylaw/sendAliSms', { phone }), sendSms: (phone) => lylawPost(`${LYLAW_BASE}/sendAliSms`, { phone }),
userRegist: (data) => lylawPost('/lylaw/api/lylaw/userRegist', data), userRegist: (data) => lylawPost(`${LYLAW_BASE}/userRegist`, data),
queryWenjuanQA: (data) => lylawPost('/lylaw/api/lylaw/queryWenjuanQA', data), queryWenjuanQA: (data) => lylawPost(`${LYLAW_BASE}/queryWenjuanQA`, data),
submitQA: (data) => lylawPost('/lylaw/api/lylaw/submitQA', data), submitQA: (data) => lylawPost(`${LYLAW_BASE}/submitQA`, data),
getWenjuanPhb: (data) => lylawPost('/lylaw/api/lylaw/getWenjuanPhb', data), getWenjuanPhb: (data) => lylawPost(`${LYLAW_BASE}/getWenjuanPhb`, data),
getChouJiangResult: (data) => lylawPost('/lylaw/api/lylaw/getChouJiangResult', data), getChouJiangResult: (data) => lylawPost(`${LYLAW_BASE}/getChouJiangResult`, data),
addScore: (data) => lylawPost('/lylaw/api/lylaw/addScore', data), addScore: (data) => lylawPost(`${LYLAW_BASE}/addScore`, data),
getUserHisResultList: (data) => lylawPost('/lylaw/api/lylaw/getUserHisResultList', data), getUserHisResultList: (data) => lylawPost(`${LYLAW_BASE}/getUserHisResultList`, data),
getUserHisResultDetail: (data) => lylawPost('/lylaw/api/lylaw/getUserHisResultDetail', data) getUserHisResultDetail: (data) => lylawPost(`${LYLAW_BASE}/getUserHisResultDetail`, data),
getWenjuanWinDetailList: (data) => lylawPost(`${LYLAW_BASE}/getWenjuanWinDetailList`, data)
}; };
} }
+4 -2
View File
@@ -27,8 +27,10 @@ const install = (Vue, vm) => {
// config.header.token = getApp().globalData.username; // config.header.token = getApp().globalData.username;
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值 // 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
const token = uni.getStorageSync('token'); const authorization = uni.getStorageSync('authorizationSft');
config.header.Authorization = 'Bearer '+token; if (authorization) {
config.header.authorization = authorization;
}
return config; return config;
} }
+2 -2
View File
@@ -1,5 +1,5 @@
{ {
"name" : "学法送演唱会门票", "name" : "“法润三湘”全民学法答题活动",
"appid" : "__UNI__5E36099", "appid" : "__UNI__5E36099",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
@@ -71,7 +71,7 @@
"vueVersion" : "2", "vueVersion" : "2",
"h5" : { "h5" : {
"router" : { "router" : {
"base" : "/llpreheat/" "base" : "/xfhm/"
} }
} }
} }
+49 -7
View File
@@ -3,6 +3,12 @@
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
}, },
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/home/home",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@@ -39,12 +45,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/record-detail/record-detail",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "pages/rules/rules", "path": "pages/rules/rules",
"style": { "style": {
@@ -56,11 +56,53 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/study/preview",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/win-records/win-records",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/profile/profile",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"tabBar": {
"backgroundColor": "#FFEBBC",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "static/shouye.png",
"selectedIconPath": "static/shouye_select.png",
"text": "首页"
},
{
"pagePath": "pages/win-records/win-records",
"iconPath": "static/zhongjiangjilu.png",
"selectedIconPath": "static/zhongjiangjilu_select.png",
"text": "中奖记录"
},
{
"pagePath": "pages/profile/profile",
"iconPath": "static/wode.png",
"selectedIconPath": "static/wode_select.png",
"text": "我的"
}
]
},
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "学法送演唱会门票", "navigationBarTitleText": "“法润三湘”全民学法答题活动",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
+27 -19
View File
@@ -10,7 +10,7 @@
<button class="retry-btn" @tap="fetchQuestions">重新加载</button> <button class="retry-btn" @tap="fetchQuestions">重新加载</button>
</view> </view>
<template v-if="questions.length > 0"> <template v-if="questions.length > 0">
<image src="https://aliyunoss.hn12301.net/learnlaw/learn_dtbj.jpg" mode="widthFix" style="width:750rpx;"></image> <image src="https://aliyunoss.hn12301.net/learnlaw/xfhm_dtbj.jpg" mode="scaleToFill" style="width:750rpx;height:1820rpx;"></image>
<view style="position:absolute;top:200rpx;left:0;z-index:0;padding: 30rpx;" > <view style="position:absolute;top:200rpx;left:0;z-index:0;padding: 30rpx;" >
<view class="quiz-header"> <view class="quiz-header">
<view class="timer-wrap"> <view class="timer-wrap">
@@ -24,7 +24,7 @@
<view class="question-item" v-for="(q, qi) in questions" :key="q.question_id"> <view class="question-item" v-for="(q, qi) in questions" :key="q.question_id">
<view class="q-header"> <view class="q-header">
<text class="q-index">{{ qi + 1 }}</text> <text class="q-index">{{ qi + 1 }}</text>
<text class="q-content">{{ q.question_content }}</text> <text class="q-content">{{ formatContent(q.question_content) }}</text>
</view> </view>
<view class="options"> <view class="options">
<view <view
@@ -80,10 +80,10 @@
methods: { methods: {
fetchQuestions() { fetchQuestions() {
this.loadError = '' this.loadError = ''
const userId = uni.getStorageSync('userId') const userId = uni.getStorageSync('userIdSft')
const userPhone = uni.getStorageSync('userPhone') const userPhone = uni.getStorageSync('userPhoneSft')
this.$u.api.queryWenjuanQA({ this.$u.api.queryWenjuanQA({
wenjuan_id: 1001, wenjuan_id: 1005,
user_id: userId, user_id: userId,
user_phone: userPhone user_phone: userPhone
}).then(res => { }).then(res => {
@@ -101,8 +101,8 @@
startTimer() { startTimer() {
this.startTime = Date.now() this.startTime = Date.now()
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.usedSeconds = Math.floor((Date.now() - this.startTime) / 1000) this.usedSeconds = Math.round((Date.now() - this.startTime) / 10) / 100
}, 1000) }, 50)
}, },
stopTimer() { stopTimer() {
if (this.timer) { if (this.timer) {
@@ -111,21 +111,29 @@
} }
}, },
formatTime(sec) { formatTime(sec) {
const m = Math.floor(sec / 60) const total = Number(sec) || 0
const s = sec % 60 const m = Math.floor(total / 60)
return (m < 10 ? '0' : '') + m + ':' + (s < 10 ? '0' : '') + s const s = total % 60
return (m < 10 ? '0' : '') + m + ':' + (s < 10 ? '0' : '') + s.toFixed(2)
},
formatContent(content) {
return (content || '').replace(/()/g, '(  )').replace(/\(\)/g, '(  )')
}, },
select(qId, oi) { select(qId, oi) {
this.$set(this.answers, qId, oi) this.$set(this.answers, qId, oi)
}, },
submit() { submit() {
if (Date.now() - this.startTime < 9000) {
uni.showToast({ title: '操作繁忙,请重试', icon: 'none' })
return
}
if (this.answeredCount < this.questions.length) { if (this.answeredCount < this.questions.length) {
uni.showToast({ title: '还有题目未作答', icon: 'none' }) uni.showToast({ title: '还有题目未作答', icon: 'none' })
return return
} }
this.stopTimer() this.usedSeconds = Math.round((Date.now() - this.startTime) / 10) / 100
const userId = uni.getStorageSync('userId') const userId = uni.getStorageSync('userIdSft')
const userPhone = uni.getStorageSync('userPhone') const userPhone = uni.getStorageSync('userPhoneSft')
const details = this.questions.map(q => ({ const details = this.questions.map(q => ({
question_id: q.question_id, question_id: q.question_id,
user_answer: q.answerList[this.answers[q.question_id]]?.answer_content || '' user_answer: q.answerList[this.answers[q.question_id]]?.answer_content || ''
@@ -133,19 +141,20 @@
this.$u.api.submitQA({ this.$u.api.submitQA({
user_id: userId, user_id: userId,
user_phone: userPhone, user_phone: userPhone,
wenjuan_id: 1001, wenjuan_id: 1005,
use_time: this.usedSeconds, use_time: this.usedSeconds,
total_question_num: this.questions.length, total_question_num: this.questions.length,
channel: 1, channel: 1,
user_answer_details: details user_answer_details: details
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
uni.setStorageSync('resultData', { this.stopTimer()
uni.setStorageSync('resultDataSft', {
...res.Data, ...res.Data,
use_time: this.usedSeconds, use_time: this.usedSeconds,
total_question_num: this.questions.length total_question_num: this.questions.length
}) })
uni.navigateTo({ url: '/pages/result/result' }) uni.redirectTo({ url: '/pages/result/result' })
} else { } else {
uni.showToast({ title: res.msg || '提交失败', icon: 'none' }) uni.showToast({ title: res.msg || '提交失败', icon: 'none' })
} }
@@ -159,15 +168,14 @@
<style lang="scss"> <style lang="scss">
page { page {
background-color: #B3E9F3; background-color: #7CC6EB;
} }
.content { .content {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh;
height: 100dvh;
} }
.page-body { .page-body {
+56
View File
@@ -0,0 +1,56 @@
<template>
<view class="home-page" >
<image src="https://aliyunoss.hn12301.net/learnlaw/xfdemo_bj1.jpg" style="width: 750rpx;" mode="widthFix"></image>
<view style="width: 750rpx;top: 1220rpx;position: absolute;">
<view class="item" @click="goIndex">
<image src="https://aliyunoss.hn12301.net/learnlaw/xfhnsft.png" style="width: 702rpx;" mode="widthFix"></image>
<image src="https://aliyunoss.hn12301.net/learnlaw/xfjxz.png" style="width: 100rpx;position: absolute;top: 20rpx;right: 20rpx;" mode="widthFix"></image>
</view>
<!-- <view class="item">
<image src="https://aliyunoss.hn12301.net/learnlaw/xfhnssthjt.png" style="width: 702rpx;" mode="widthFix"></image>
<image src="https://aliyunoss.hn12301.net/learnlaw/xfjqqd.png" style="width: 100rpx;position: absolute;top: 20rpx;right: 20rpx;" mode="widthFix"></image>
</view>
<view class="item">
<image src="https://aliyunoss.hn12301.net/learnlaw/xfhnsswj.png" style="width: 702rpx;" mode="widthFix"></image>
<image src="https://aliyunoss.hn12301.net/learnlaw/xfjqqd.png" style="width: 100rpx;position: absolute;top: 20rpx;right: 20rpx;" mode="widthFix"></image>
</view>
<view class="item">
<image src="https://aliyunoss.hn12301.net/learnlaw/xfhnslyj.png" style="width: 702rpx;" mode="widthFix"></image>
<image src="https://aliyunoss.hn12301.net/learnlaw/xfjqqd.png" style="width: 100rpx;position: absolute;top: 20rpx;right: 20rpx;" mode="widthFix"></image>
</view> -->
<view class="item">
<image src="https://aliyunoss.hn12301.net/learnlaw/xfhnszrzyt1.png" style="width: 702rpx;" mode="widthFix"></image>
<image src="https://aliyunoss.hn12301.net/learnlaw/xfykz.png" style="width: 100rpx;position: absolute;top: 20rpx;right: 20rpx;" mode="widthFix"></image>
</view>
</view>
</view>
</template>
<script>
export default {
methods: {
goIndex() {
uni.switchTab({
url: '/pages/index/index'
})
}
}
}
</script>
<style>
page {
background-color: #92E0F7;
}
.item{
width: 702rpx;
height: 198rpx;
margin-top: 20rpx;
margin-left: 24rpx;
position: relative;
}
.home-page {
min-height: 100vh;
}
</style>
+150 -41
View File
@@ -1,14 +1,35 @@
<template> <template>
<view> <view>
<image src="https://aliyunoss.hn12301.net/learnlaw/xfsp_p_bj.jpg" style="width: 750rpx;" mode="widthFix"></image> <image src="https://aliyunoss.hn12301.net/learnlaw/xfhm_bj.jpg" style="width: 750rpx;" mode="widthFix"></image>
<view style="position: absolute;top: 1210rpx;width: 300rpx;left: 225rpx;height: 80rpx;" @click="goRegister"></view> <image src="https://aliyunoss.hn12301.net/learnlaw/xfhm_ckjpxq.png"
style="width: 250rpx;position: absolute;top: 1210rpx;left: 250rpx;" mode="widthFix"
@click="showPrize = true"></image>
<image src="https://aliyunoss.hn12301.net/learnlaw/xfhm_dtcj.png"
style="width: 180rpx;position: absolute;top: 1420rpx;left: 160rpx;" mode="widthFix" @click="goRegister">
</image>
<image src="https://aliyunoss.hn12301.net/learnlaw/xfhm_fzxx.png"
style="width: 180rpx;position: absolute;top: 1420rpx;right: 50rpx;" mode="widthFix" @click="goStudy">
</image>
<view class="side-tab" style="top: 480rpx;" hover-class="side-tab-hover" @click="goRules">活动规则</view>
<!-- <view style="position: absolute;top: 1210rpx;width: 300rpx;left: 225rpx;height: 80rpx;" @click="goRegister"></view> -->
<view class="side-tab" style="top: 350rpx;" hover-class="side-tab-hover" @click="goRecords">答题记录</view> <!-- <view class="side-tab" style="top: 350rpx;" hover-class="side-tab-hover" @click="goRecords">答题记录</view>
<view class="side-tab" style="top: 430rpx;" hover-class="side-tab-hover" @click="goRules">活动规则</view> <view class="side-tab" style="top: 430rpx;" hover-class="side-tab-hover" @click="goRules">活动规则</view> -->
<view class="blocked-mask" v-if="blocked"> <view class="blocked-mask" v-if="blocked">
<text class="blocked-tip">{{ blockTip }}</text> <text class="blocked-tip">{{ blockTip }}</text>
<text class="blocked-sub">本活动仅支持手机微信访问</text> <text class="blocked-sub">本活动仅支持手机微信访问</text>
</view> </view>
<u-tabbar :list="tabbarList" :hideTabBar="true" activeColor="#FD5401" inactiveColor="#5D533D" :borderTop="false"
height="120rpx" iconSize="48"></u-tabbar>
<view class="prize-mask" v-if="showPrize" @click="showPrize = false"></view>
<view class="prize-popup" v-if="showPrize">
<scroll-view scroll-y class="prize-scroll">
<image src="https://aliyunoss.hn12301.net/learnlaw/xfhm_main_jp.jpg" mode="widthFix" style="width: 100%;"></image>
</scroll-view>
<view class="prize-close" @click="showPrize = false">
<text class="prize-close-text">✕</text>
</view>
</view>
</view> </view>
</template> </template>
@@ -20,7 +41,13 @@
data() { data() {
return { return {
blocked: false, blocked: false,
blockTip: '' blockTip: '',
showPrize: false,
tabbarList: [
{ pagePath: "/pages/index/index", iconPath: "/static/shouye.png", selectedIconPath: "/static/shouye_select.png", text: "首页" },
{ pagePath: "/pages/win-records/win-records", iconPath: "/static/zhongjiangjilu.png", selectedIconPath: "/static/zhongjiangjilu_select.png", text: "中奖记录" },
{ pagePath: "/pages/profile/profile", iconPath: "/static/wode.png", selectedIconPath: "/static/wode_select.png", text: "我的" }
]
} }
}, },
onLoad() { onLoad() {
@@ -33,34 +60,39 @@
}, },
onShow() { onShow() {
if (this.blocked) return if (this.blocked) return
const openId = uni.getStorageSync('openId') const openId = uni.getStorageSync('openIdSft')
const isRegistered = uni.getStorageSync('isRegistered') const isRegistered = uni.getStorageSync('isRegisteredSft')
const userId = uni.getStorageSync('userId') const userId = uni.getStorageSync('userIdSft')
if (openId && (!isRegistered || !userId)) { if (openId && (!isRegistered || !userId)) {
this.loginWithOpenId(openId) this.loginWithOpenId(openId)
} }
}, },
methods: { methods: {
goStudy() {
uni.navigateTo({
url: '/pages/study/preview'
})
},
initLogin() { initLogin() {
if (!this.isWechatBrowser()) { // if (!this.isWechatBrowser()) {
this.block('请在微信中打开') // this.block('请在微信中打开')
return // return
} // }
if (this.isPcWechat()) { // if (this.isPcWechat()) {
this.block('请使用手机微信打开') // this.block('请使用手机微信打开')
return // return
} // }
let openId = uni.getStorageSync('openId') let openId = uni.getStorageSync('openIdSft')
if (openId) { if (openId) {
this.loginWithOpenId(openId) this.loginWithOpenId(openId)
return return
} }
const code = this.getCodeFromUrl() const code = this.getCodeFromUrl()
if (code) { // if (code) {
this.exchangeOpenId(code) // this.exchangeOpenId(code)
} else { // } else {
this.wechatAuth() // this.wechatAuth()
} // }
}, },
block(tip) { block(tip) {
this.blocked = true this.blocked = true
@@ -82,29 +114,33 @@
window.history.replaceState({}, '', cleanUrl) window.history.replaceState({}, '', cleanUrl)
}, },
wechatAuth() { wechatAuth() {
const redirectUri = encodeURIComponent(window.location.href.split('?')[0].split('#')[0]) const base = window.location.href.split('#')[0].split('?')[0]
const redirectUri = encodeURIComponent(base + '#/pages/index/index')
const url = const url =
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${APP_ID}&redirect_uri=${redirectUri}&response_type=code&scope=${SCOPE}&state=STATE#wechat_redirect` `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${APP_ID}&redirect_uri=${redirectUri}&response_type=code&scope=${SCOPE}&state=STATE#wechat_redirect`
window.location.href = url window.location.href = url
}, },
loginWithOpenId(openId) { loginWithOpenId(openId) {
this.$u.api.wxOpenidLogin({ wenjuan_id: 1001, open_id: openId }).then(loginRes => { this.$u.api.wxOpenidLogin({
wenjuan_id: 1005,
open_id: openId
}).then(loginRes => {
if (!loginRes.Data) { if (!loginRes.Data) {
uni.setStorageSync('isRegistered', false) uni.setStorageSync('isRegisteredSft', false)
return return
} }
if (loginRes.code === 0 && loginRes.Data?.user_name && loginRes.Data?.user_phone) { if (loginRes.code === 0 && loginRes.Data?.user_name && loginRes.Data?.user_phone) {
uni.setStorageSync('isRegistered', true) uni.setStorageSync('isRegisteredSft', true)
uni.setStorageSync('userId', loginRes.Data.user_id) uni.setStorageSync('userIdSft', loginRes.Data.user_id)
uni.setStorageSync('userName', loginRes.Data.user_name) uni.setStorageSync('userNameSft', loginRes.Data.user_name)
uni.setStorageSync('userPhone', loginRes.Data.user_phone) uni.setStorageSync('userPhoneSft', loginRes.Data.user_phone)
} }
}).catch(err => { }).catch(err => {
console.error('登录请求失败', err) console.error('登录请求失败', err)
}) })
}, },
goRegister() { goRegister() {
const isRegistered = uni.getStorageSync('isRegistered') const isRegistered = uni.getStorageSync('isRegisteredSft')
if (isRegistered) { if (isRegistered) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/answer/answer' url: '/pages/answer/answer'
@@ -115,7 +151,7 @@
url: '/pages/register/register' url: '/pages/register/register'
}) })
}, },
goRecords() { goRecords() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/records/records' url: '/pages/records/records'
}) })
@@ -129,17 +165,21 @@ goRecords() {
this.$u.api.getWxOpenId(code).then(res => { this.$u.api.getWxOpenId(code).then(res => {
if (res.code !== 0 || !res.Data || !res.Data.openid) return if (res.code !== 0 || !res.Data || !res.Data.openid) return
const openId = res.Data.openid const openId = res.Data.openid
uni.setStorageSync('openId', openId) uni.setStorageSync('openIdSft', openId)
this.cleanUrlCode() this.cleanUrlCode()
return this.$u.api.wxOpenidLogin({ wenjuan_id: 1001, open_id: openId }) return this.$u.api.wxOpenidLogin({
wenjuan_id: 1005,
open_id: openId
})
}).then(loginRes => { }).then(loginRes => {
if (loginRes && loginRes.code === 0 && loginRes.Data && loginRes.Data.user_name && loginRes.Data.user_phone) { if (loginRes && loginRes.code === 0 && loginRes.Data && loginRes.Data.user_name && loginRes
uni.setStorageSync('isRegistered', true) .Data.user_phone) {
uni.setStorageSync('userId', loginRes.Data.user_id || loginRes.Data.uesr_id) uni.setStorageSync('isRegisteredSft', true)
uni.setStorageSync('userName', loginRes.Data.user_name) uni.setStorageSync('userIdSft', loginRes.Data.user_id || loginRes.Data.uesr_id)
uni.setStorageSync('userPhone', loginRes.Data.user_phone) uni.setStorageSync('userNameSft', loginRes.Data.user_name)
uni.setStorageSync('userPhoneSft', loginRes.Data.user_phone)
} else if (loginRes && !loginRes.Data) { } else if (loginRes && !loginRes.Data) {
uni.setStorageSync('isRegistered', false) uni.setStorageSync('isRegisteredSft', false)
} }
}).catch(err => { }).catch(err => {
console.error('请求失败', err) console.error('请求失败', err)
@@ -149,11 +189,33 @@ goRecords() {
} }
</script> </script>
<style> <style lang="scss">
page{ page {
background-color: #7CC6EB; background-color: #7CC6EB;
} }
::v-deep .u-tabbar__content {
background: linear-gradient(to bottom, #FFEBBC, #FFD67E) !important;
}
::v-deep .u-tabbar__content__item {
background: linear-gradient(to bottom, #FFEBBC, #FFD67E) !important;
}
::v-deep .u-tabbar {
.u-border-top {
border-top: none !important;
}
}
::v-deep .u-icon__img {
object-fit: contain !important;
}
::v-deep .u-tabbar__content__item {
padding: 16rpx 0 !important;
}
.blocked-mask { .blocked-mask {
position: fixed; position: fixed;
top: 0; top: 0;
@@ -201,4 +263,51 @@ goRecords() {
.side-tab-hover { .side-tab-hover {
opacity: 0.85; opacity: 0.85;
} }
.prize-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 1000;
}
.prize-popup {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 620rpx;
z-index: 1001;
display: flex;
flex-direction: column;
align-items: center;
}
.prize-scroll {
width: 620rpx;
max-height: 75vh;
background: #fff;
border-radius: 24rpx;
overflow: hidden;
}
.prize-close {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
border: 2rpx solid rgba(255, 255, 255, 0.9);
display: flex;
align-items: center;
justify-content: center;
margin-top: 30rpx;
}
.prize-close-text {
font-size: 32rpx;
color: #fff;
line-height: 1;
}
</style> </style>
+6 -8
View File
@@ -12,21 +12,19 @@
<view class="sec"> <view class="sec">
<text class="sec-title">一、适用范围</text> <text class="sec-title">一、适用范围</text>
<text class="sec-text">本协议适用于"学法送演唱会门票"普法答题抽奖活动(以下简称"本活动")过程中我们对您个人信息的收集、使用与保护。您勾选同意本协议即表示您已阅读、理解并同意本协议全部内容。</text> <text class="sec-text">本协议适用于“法润三湘”全民学法答题活动(以下简称“本活动”)过程中我们对您个人信息的收集、使用与保护。您勾选同意本协议即表示您已阅读、理解并同意本协议全部内容。</text>
</view> </view>
<view class="sec"> <view class="sec">
<text class="sec-title">二、我们收集的信息</text> <text class="sec-title">二、我们收集的信息</text>
<text class="sec-text">1. 注册信息:姓名、手机号码,用于活动参与资格确认与实名核验,短信验证码(通过阿里云短信服务发送)用于验证手机归属;</text> <text class="sec-text">1. 注册信息:姓名、手机号码、收货地址,用于活动参与资格确认、实名核验及奖品邮寄,短信验证码(通过阿里云短信服务发送)用于验证手机归属;</text>
<text class="sec-text">2. 微信授权信息:本活动通过微信网页授权(snsapi_base静默授权)获取您的openid,用于关联您的身份与本活动答题、中奖记录,授权范围不包含您的微信昵称、头像等信息;</text> <text class="sec-text">2. 微信授权信息:本活动通过微信网页授权(snsapi_base静默授权)获取您的openid,用于关联您的身份与本活动答题、中奖记录,授权范围不包含您的微信昵称、头像等信息;</text>
<text class="sec-text">3. 答题与积分数据:答题记录、对错结果、用时及积分,用于成绩结算、排名与抽奖;</text> <text class="sec-text">3. 答题数据:答题记录、对错结果及用时,用于成绩结算与抽奖资格核验;</text>
<text class="sec-text">4. 中奖及兑奖信息:中奖记录;演唱会门票实行实名制管理,兑奖时需填写身份证号码,仅用于核验兑奖资格及门票发放。</text>
</view> </view>
<view class="sec"> <view class="sec">
<text class="sec-title">三、信息的使用</text> <text class="sec-title">三、信息的使用</text>
<text class="sec-text">1. 提供答题、积分计算、排名及开奖抽奖服务;</text> <text class="sec-text">1. 提供答题、抽奖资格核验及开奖抽奖服务;</text>
<text class="sec-text">2. 验证用户身份及实名信息真实性,保障活动公平,防范刷量、冒领;</text> <text class="sec-text">2. 验证用户身份及实名信息真实性,保障活动公平,防范刷量、冒领;</text>
<text class="sec-text">3. 完成兑奖核验,并在中奖时与您联系;</text> <text class="sec-text">3. 满足法律法规及主管部门的监管要求。</text>
<text class="sec-text">4. 满足法律法规及主管部门的监管要求。</text>
</view> </view>
<view class="sec"> <view class="sec">
<text class="sec-title">四、信息的存储与保护</text> <text class="sec-title">四、信息的存储与保护</text>
@@ -36,7 +34,7 @@
</view> </view>
<view class="sec"> <view class="sec">
<text class="sec-title">五、信息的公示</text> <text class="sec-title">五、信息的公示</text>
<text class="sec-text">为保障抽奖活动公开透明,中奖名单、积分排行等信息将依活动监管要求进行公示,公示内容将对姓名、手机号码等个人信息作脱敏处理。</text> <text class="sec-text">为保障抽奖活动公开透明,中奖名单等信息将依活动监管要求进行公示,公示内容将对姓名、手机号码等个人信息作脱敏处理。</text>
</view> </view>
<view class="sec"> <view class="sec">
<text class="sec-title">六、您的权利</text> <text class="sec-title">六、您的权利</text>
+246
View File
@@ -0,0 +1,246 @@
<template>
<view class="content">
<view class="page-bg" :style="{ position: 'absolute', top: 0, left: 0, width: '750rpx', height: bgHeight + 'px', backgroundImage: 'url(https://aliyunoss.hn12301.net/learnlaw/xfhm_dtbj.jpg)', backgroundSize: 'cover', backgroundPosition: 'top center', backgroundRepeat: 'no-repeat', zIndex: 0 }"></view>
<view class="page-body">
<view class="login-box" v-if="!isLoggedIn">
<text class="login-tip">注册后享受更多功能</text>
<button class="login-btn" @tap="goRegister">立即注册</button>
</view>
<template v-if="isLoggedIn">
<view class="user-card">
<view class="user-avatar">
<text class="avatar-text">{{ userName.charAt(0) }}</text>
</view>
<view class="user-info">
<text class="user-name">{{ userName }}</text>
<text class="user-phone">{{ maskedPhone }}</text>
</view>
</view>
<view class="menu-list">
<view class="menu-item" @tap="goAnswerRecords">
<view class="menu-icon menu-icon-record">
<text>📝</text>
</view>
<text class="menu-text">答题记录</text>
<text class="menu-arrow">›</text>
</view>
</view>
</template>
</view>
<u-tabbar :list="tabbarList" :hideTabBar="true" activeColor="#FD5401" inactiveColor="#5D533D" :borderTop="false"
height="120rpx" iconSize="48"></u-tabbar>
</view>
</template>
<script>
export default {
data() {
return {
tabbarList: [
{ pagePath: "/pages/index/index", iconPath: "/static/shouye.png", selectedIconPath: "/static/shouye_select.png", text: "首页" },
{ pagePath: "/pages/win-records/win-records", iconPath: "/static/zhongjiangjilu.png", selectedIconPath: "/static/zhongjiangjilu_select.png", text: "中奖记录" },
{ pagePath: "/pages/profile/profile", iconPath: "/static/wode.png", selectedIconPath: "/static/wode_select.png", text: "我的" }
],
isLoggedIn: false,
userName: '',
userPhone: '',
bgHeight: 0
}
},
computed: {
maskedPhone() {
const p = this.userPhone
if (!p || p.length < 7) return p
return p.slice(0, 3) + '****' + p.slice(-4)
}
},
onLoad() {
const sys = uni.getSystemInfoSync();
this.bgHeight = sys.windowHeight
},
onShow() {
this.checkLogin()
},
methods: {
checkLogin() {
const userId = uni.getStorageSync('userIdSft')
if (userId) {
this.isLoggedIn = true
this.userName = uni.getStorageSync('userNameSft') || ''
this.userPhone = uni.getStorageSync('userPhoneSft') || ''
} else {
this.isLoggedIn = false
}
},
goRegister() {
uni.navigateTo({ url: '/pages/register/register' })
},
goAnswerRecords() {
uni.navigateTo({ url: '/pages/records/records' })
}
}
}
</script>
<style lang="scss">
page {
background-color: #B3E9F3;
}
.content {
position: relative;
display: flex;
flex-direction: column;
}
.page-body {
position: relative;
z-index: 1;
flex: 1;
padding: 260rpx 30rpx 20rpx;
box-sizing: border-box;
}
.login-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
.login-tip {
font-size: 28rpx;
color: rgba(255,255,255,0.85);
margin-bottom: 30rpx;
}
.login-btn {
width: 400rpx;
height: 80rpx;
line-height: 80rpx;
background: linear-gradient(135deg, #FD5401, #FF7A3D);
color: #fff;
font-size: 30rpx;
font-weight: 600;
border: none;
border-radius: 40rpx;
box-shadow: 0 4rpx 16rpx rgba(253,84,1,0.3);
}
.user-card {
background: rgba(255,255,255,0.95);
border-radius: 20rpx;
padding: 36rpx 30rpx;
display: flex;
align-items: center;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
}
.user-avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: linear-gradient(135deg, #FD5401, #FF7A3D);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: 24rpx;
}
.avatar-text {
font-size: 32rpx;
font-weight: 700;
color: #fff;
}
.user-info {
flex: 1;
min-width: 0;
}
.user-name {
font-size: 30rpx;
font-weight: 600;
color: #333;
display: block;
}
.user-phone {
font-size: 24rpx;
color: #999;
margin-top: 6rpx;
display: block;
}
.menu-list {
background: rgba(255,255,255,0.95);
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
}
.menu-item {
display: flex;
align-items: center;
padding: 30rpx 28rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.menu-item:last-child {
border-bottom: none;
}
.menu-icon {
width: 52rpx;
height: 52rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: 20rpx;
font-size: 28rpx;
}
.menu-icon-record {
background: #f6ffed;
}
.menu-text {
flex: 1;
font-size: 28rpx;
color: #333;
font-weight: 500;
}
.menu-arrow {
font-size: 36rpx;
color: #ccc;
flex-shrink: 0;
}
::v-deep .u-tabbar__content {
background: linear-gradient(to bottom, #FFEBBC, #FFD67E) !important;
}
::v-deep .u-tabbar__content__item {
background: linear-gradient(to bottom, #FFEBBC, #FFD67E) !important;
}
::v-deep .u-tabbar {
.u-border-top {
border-top: none !important;
}
}
::v-deep .u-icon__img {
object-fit: contain !important;
}
::v-deep .u-tabbar__content__item {
padding: 16rpx 0 !important;
}
</style>
+2 -2
View File
@@ -48,13 +48,13 @@
methods: { methods: {
fetchRecords() { fetchRecords() {
this.loadError = '' this.loadError = ''
const userId = uni.getStorageSync('userId') const userId = uni.getStorageSync('userIdSft')
if (!userId) { if (!userId) {
this.loadError = '暂未登录' this.loadError = '暂未登录'
return return
} }
this.$u.api.getUserHisResultList({ this.$u.api.getUserHisResultList({
wenjuanId: 1001, wenjuanId: 1005,
userId: userId userId: userId
}).then(res => { }).then(res => {
if (res.code === 0 && res.Data?.result_list) { if (res.code === 0 && res.Data?.result_list) {
+92 -12
View File
@@ -11,7 +11,7 @@
<text class="input-icon">👤</text> <text class="input-icon">👤</text>
<input class="input" v-model="userName" placeholder="请输入您的姓名" /> <input class="input" v-model="userName" placeholder="请输入您的姓名" />
</view> </view>
<text class="name-tip">本次演唱会门票实行实名制管理,参与抽奖活动须如实填报本人姓名与手机号码;中奖后须在24小时内完成兑奖操作,兑奖时需补充填报本人身份证号码。</text> <text class="name-tip">本次活动实行实名制管理,参与抽奖活动须如实填报本人姓名与手机号码,中奖后根据预留信息发货。</text>
</view> </view>
<view class="field"> <view class="field">
<text class="label">手机号</text> <text class="label">手机号</text>
@@ -32,6 +32,22 @@
</button> </button>
</view> </view>
</view> </view>
<view class="field">
<text class="label">所在地区</text>
<picker mode="multiSelector" :range="areaColumns" :value="areaIndex" @columnchange="onAreaColumnChange" @change="onAreaConfirm">
<view class="input-wrap">
<text class="input-icon">📍</text>
<text class="area-text" :class="{ placeholder: !areaText }">{{ areaText || '请选择省市区' }}</text>
</view>
</picker>
</view>
<view class="field">
<text class="label">详细地址</text>
<view class="input-wrap">
<text class="input-icon">🏠</text>
<input class="input" v-model="detailAddress" placeholder="请输入街道、门牌号等详细地址" maxlength="100" />
</view>
</view>
<view class="agree-row" @tap="agreed = !agreed"> <view class="agree-row" @tap="agreed = !agreed">
<view class="agree-checkbox" :class="{ checked: agreed }"> <view class="agree-checkbox" :class="{ checked: agreed }">
<text v-if="agreed" class="agree-check-mark">✓</text> <text v-if="agreed" class="agree-check-mark">✓</text>
@@ -49,6 +65,13 @@
</template> </template>
<script> <script>
import provinceData from '@/uview-ui/libs/util/province.js'
import cityData from '@/uview-ui/libs/util/city.js'
import areaData from '@/uview-ui/libs/util/area.js'
const HUNAN_INDEX = provinceData.findIndex(x => x.label.indexOf('湖南') > -1)
const PROVINCE_ORDER = HUNAN_INDEX > -1 ? [HUNAN_INDEX].concat(provinceData.map((_, i) => i).filter(i => i !== HUNAN_INDEX)) : provinceData.map((_, i) => i)
export default { export default {
data() { data() {
return { return {
@@ -59,10 +82,47 @@
countdown: 60, countdown: 60,
timer: null, timer: null,
submitting: false, submitting: false,
agreed: false agreed: false,
areaIndex: [0, 0, 0],
areaText: '',
detailAddress: ''
}
},
computed: {
areaColumns() {
const pIdx = PROVINCE_ORDER[this.areaIndex[0]] !== undefined ? PROVINCE_ORDER[this.areaIndex[0]] : 0
const cities = cityData[pIdx] || []
const cIdx = Math.min(this.areaIndex[1], Math.max(cities.length - 1, 0))
const areas = (areaData[pIdx] && areaData[pIdx][cIdx]) || []
return [
PROVINCE_ORDER.map(i => provinceData[i].label),
cities.length ? cities.map(c => c.label) : ['—'],
areas.length ? areas.map(a => a.label) : ['—']
]
} }
}, },
methods: { methods: {
onAreaColumnChange(e) {
const { column, value } = e.detail
const idx = this.areaIndex.slice()
idx[column] = value
if (column === 0) {
idx[1] = 0
idx[2] = 0
} else if (column === 1) {
idx[2] = 0
}
this.areaIndex = idx
},
onAreaConfirm(e) {
const [p, c, a] = e.detail.value
this.areaIndex = [p, c, a]
const pIdx = PROVINCE_ORDER[p] !== undefined ? PROVINCE_ORDER[p] : 0
const pname = (provinceData[pIdx] || {}).label || ''
const cname = ((cityData[pIdx] || [])[c] || {}).label || ''
const aname = (((areaData[pIdx] || [])[c] || [])[a] || {}).label || ''
this.areaText = pname + cname + aname
},
goPrivacy() { goPrivacy() {
uni.navigateTo({ url: '/pages/privacy/privacy' }) uni.navigateTo({ url: '/pages/privacy/privacy' })
}, },
@@ -101,27 +161,36 @@
uni.showToast({ title: '请填写完整信息', icon: 'none' }) uni.showToast({ title: '请填写完整信息', icon: 'none' })
return return
} }
if (!this.areaText) {
uni.showToast({ title: '请选择所在地区', icon: 'none' })
return
}
if (!this.detailAddress.trim()) {
uni.showToast({ title: '请填写详细地址', icon: 'none' })
return
}
if (!this.agreed) { if (!this.agreed) {
uni.showToast({ title: '请阅读并同意《用户隐私协议》', icon: 'none' }) uni.showToast({ title: '请阅读并同意《用户隐私协议》', icon: 'none' })
return return
} }
this.submitting = true this.submitting = true
const openId = uni.getStorageSync('openId') const openId = uni.getStorageSync('openIdSft')
this.$u.api.userRegist({ this.$u.api.userRegist({
wenjuan_id: 1001, wenjuan_id: 1005,
open_id: openId, open_id: openId,
user_name: this.userName, user_name: this.userName,
user_phone: this.phone, user_phone: this.phone,
sms_code: this.smsCode, sms_code: this.smsCode,
address: this.areaText + this.detailAddress.trim(),
channel: 1 channel: 1
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
uni.setStorageSync('isRegistered', true) uni.setStorageSync('isRegisteredSft', true)
const data = res.Data || {} const data = res.Data || {}
const userId = data.user_id || data.uesr_id const userId = data.user_id || data.uesr_id
if (userId) uni.setStorageSync('userId', userId) if (userId) uni.setStorageSync('userIdSft', userId)
if (data.user_name) uni.setStorageSync('userName', data.user_name) if (data.user_name) uni.setStorageSync('userNameSft', data.user_name)
if (data.user_phone) uni.setStorageSync('userPhone', data.user_phone) if (data.user_phone) uni.setStorageSync('userPhoneSft', data.user_phone)
this.syncUserInfo(openId) this.syncUserInfo(openId)
uni.showToast({ title: '注册成功' }) uni.showToast({ title: '注册成功' })
setTimeout(() => uni.navigateBack(), 1500) setTimeout(() => uni.navigateBack(), 1500)
@@ -135,12 +204,12 @@
}) })
}, },
syncUserInfo(openId) { syncUserInfo(openId) {
this.$u.api.wxOpenidLogin({ wenjuan_id: 1001, open_id: openId }).then(loginRes => { this.$u.api.wxOpenidLogin({ wenjuan_id: 1005, open_id: openId }).then(loginRes => {
if (loginRes.code === 0 && loginRes.Data) { if (loginRes.code === 0 && loginRes.Data) {
const data = loginRes.Data const data = loginRes.Data
if (data.user_id || data.uesr_id) uni.setStorageSync('userId', data.user_id || data.uesr_id) if (data.user_id || data.uesr_id) uni.setStorageSync('userIdSft', data.user_id || data.uesr_id)
if (data.user_name) uni.setStorageSync('userName', data.user_name) if (data.user_name) uni.setStorageSync('userNameSft', data.user_name)
if (data.user_phone) uni.setStorageSync('userPhone', data.user_phone) if (data.user_phone) uni.setStorageSync('userPhoneSft', data.user_phone)
} }
}).catch(err => { }).catch(err => {
console.error('注册后同步用户信息失败', err) console.error('注册后同步用户信息失败', err)
@@ -239,6 +308,17 @@
box-sizing: border-box; box-sizing: border-box;
} }
.area-text {
font-size: 28rpx;
color: #333;
flex: 1;
line-height: 84rpx;
}
.area-text.placeholder {
color: #999;
}
.name-tip { .name-tip {
display: block; display: block;
font-size: 22rpx; font-size: 22rpx;
+4 -5
View File
@@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<image src="https://aliyunoss.hn12301.net/learnlaw/learn_dtbj.jpg" mode="widthFix" style="width:750rpx;position:absolute;top:0;left:0;z-index:0;"></image> <image src="https://aliyunoss.hn12301.net/learnlaw/xfhm_dtbj.jpg" mode="scaleToFill" style="width:750rpx;height:1820rpx;position:absolute;top:0;left:0;z-index:0;"></image>
<view class="page-body"> <view class="page-body">
<view class="correct-card"> <view class="correct-card">
<text class="correct-label">答对题数</text> <text class="correct-label">答对题数</text>
@@ -46,7 +46,7 @@
}, },
onLoad() { onLoad() {
try { try {
const data = uni.getStorageSync('resultData') || {} const data = uni.getStorageSync('resultDataSft') || {}
if (data.resultDetailList && data.resultDetailList.length) { if (data.resultDetailList && data.resultDetailList.length) {
this.detailList = data.resultDetailList this.detailList = data.resultDetailList
this.correctCount = data.resultDetailList.filter(r => r.is_correct === true || r.is_correct === 1 || r.status === 1).length this.correctCount = data.resultDetailList.filter(r => r.is_correct === true || r.is_correct === 1 || r.status === 1).length
@@ -66,7 +66,7 @@
<style lang="scss"> <style lang="scss">
page { page {
background-color: #B3E9F3; background-color: #7CC6EB;
} }
.content { .content {
@@ -79,9 +79,8 @@
position: relative; position: relative;
z-index: 1; z-index: 1;
height: 100%; height: 100%;
padding: 40rpx 30rpx; padding: 120rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto;
} }
.correct-card { .correct-card {
+148 -151
View File
@@ -4,118 +4,82 @@
<text class="header-back" @tap="goBack">‹</text> <text class="header-back" @tap="goBack">‹</text>
<text class="header-title">活动规则</text> <text class="header-title">活动规则</text>
</view> </view>
<view class="preview-wrap"> <scroll-view scroll-y class="doc-scroll">
<view class="loading-box" v-if="loading"> <view class="doc-card">
<u-loading mode="circle" size="40"></u-loading> <view class="doc-title">“法润三湘”益企惠民全民学法答题活动规则</view>
<text class="loading-text">内容加载中...</text>
<view class="sec">
<text class="sec-title">一、活动主题</text>
<text class="sec-text">“法润三湘”益企惠民全民学法答题活动</text>
</view>
<view class="sec">
<text class="sec-title">二、活动时间</text>
<text class="sec-text">1. 线上答题时间:2026年10月21日—11月16日;</text>
<text class="sec-text">2. 公证抽奖时间:共4轮,分别为10月26日、11月2日、11月9日、11月16日,每周一16:00,由长沙市长沙公证处全程监督公证开奖。</text>
</view>
<view class="sec">
<text class="sec-title">三、参与方式</text>
<text class="sec-text">1. 关注【湖南普法】微信公众号,进入“法润三湘”益企惠民答题专区;</text>
<text class="sec-text">2. 答题环节由系统从100道标准化题库中随机抽取5道题目供参与者作答,涵盖判断题、单项选择题两类题型。参与者完成全部5道题目作答且答案全部正确的,即可获得当周抽奖参与资格。答题活动每日面向参与者开放,支持不限答题次数重复参与,每轮答题全部答对即可获取对应当期的抽奖参与机会。</text>
</view>
<view class="sec">
<text class="sec-title">四、奖项设置</text>
<view class="prize-table">
<view class="prize-tr prize-th">
<text class="prize-td">奖项</text>
<text class="prize-td">奖品</text>
<text class="prize-td">每轮数量</text>
<text class="prize-td">总数量</text>
</view>
<view class="prize-tr">
<text class="prize-td">一等奖</text>
<text class="prize-td">华为FreeBuds 7i真无线蓝牙耳机</text>
<text class="prize-td">20名</text>
<text class="prize-td">80份</text>
</view>
<view class="prize-tr">
<text class="prize-td">二等奖</text>
<text class="prize-td">富光双层定制玻璃杯</text>
<text class="prize-td">60名</text>
<text class="prize-td">240份</text>
</view>
<view class="prize-tr">
<text class="prize-td">三等奖</text>
<text class="prize-td">天堂定制长柄雨伞</text>
<text class="prize-td">200名</text>
<text class="prize-td">800份</text>
</view>
</view>
</view>
<view class="sec">
<text class="sec-title">五、开奖与中奖公示</text>
<text class="sec-text">1. 每轮开奖由长沙市长沙公证处现场公证,保证抽奖公平公正;</text>
<text class="sec-text">2. 每轮中奖名单将同步在【湖南普法】公众号答题活动页面进行公示,请广大参与者及时查看;</text>
<text class="sec-text">3. 中奖用户请在活动专区提交准确地址信息(姓名、联系电话、收货地址),信息填写有误将影响奖品邮寄。</text>
</view>
<view class="sec">
<text class="sec-title">六、奖品发放说明</text>
<text class="sec-text">1. 所有奖品含税、包邮,活动结束后统一安排邮寄;</text>
<text class="sec-text">2. 请中奖用户务必准确填写收货信息;</text>
<text class="sec-text">3. 奖品以实物为准,不支持折现、不支持调换其他礼品。</text>
</view>
<view class="sec">
<text class="sec-title">七、注意事项</text>
<text class="sec-text">1. 本活动面向全社会公众免费参与,严禁使用外挂、脚本等作弊手段参与答题,一经核实取消全部抽奖及中奖资格;</text>
<text class="sec-text">2. 活动咨询电话:0731-88912301(工作时间接受咨询)。</text>
<text class="sec-text footer-note">本活动最终解释权归本次“法润三湘”益企惠民活动主办方所有。</text>
</view>
<view style="height: 40rpx;"></view>
</view> </view>
<scroll-view class="doc-scroll" scroll-y v-if="!loading && !error">
<rich-text class="doc-content" :nodes="htmlContent"></rich-text>
<view style="height:30rpx;"></view>
</scroll-view> </scroll-view>
<view class="error-box" v-if="error">
<text class="error-text">{{ error }}</text>
<button class="preview-btn" @tap="loadDoc">重新加载</button>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() {
return {
docUrl: 'https://goldnar.hntgov.net/img/llpreheat_rules.docx',
loading: false,
error: '',
htmlContent: ''
}
},
onReady() {
this.loadDoc()
},
methods: { methods: {
goBack() { goBack() {
uni.navigateBack() uni.navigateBack()
},
loadDoc() {
this.loading = true
this.error = ''
this.htmlContent = ''
this.ensureMammoth().then(() => {
return this.fetchDocx(this.docUrl)
}).then(arrayBuffer => {
return window.mammoth.convertToHtml({
arrayBuffer
})
}).then(result => {
this.htmlContent = result.value || ''
this.loading = false
}).catch(err => {
console.error('加载文档失败', err)
this.loading = false
this.error = '文档加载失败,请重试'
})
},
ensureMammoth() {
if (window.mammoth) return Promise.resolve()
return new Promise((resolve, reject) => {
const urls = [
'/static/mammoth.browser.min.js',
'https://unpkg.com/mammoth@1.6.0/mammoth.browser.min.js'
]
let i = 0
const loadNext = () => {
if (i >= urls.length) {
reject(new Error('解析组件加载失败'))
return
}
const s = document.createElement('script')
s.src = urls[i++]
s.onload = () => window.mammoth ? resolve() : loadNext()
s.onerror = loadNext
document.head.appendChild(s)
}
loadNext()
})
},
fetchDocx(url) {
return new Promise((resolve, reject) => {
if (typeof fetch !== 'undefined') {
fetch(url).then(res => {
if (!res.ok) throw new Error('HTTP ' + res.status)
return res.arrayBuffer()
}).then(resolve).catch(() => this.downloadDocx(url).then(resolve).catch(reject))
return
}
this.downloadDocx(url).then(resolve).catch(reject)
})
},
downloadDocx(url) {
return new Promise((resolve, reject) => {
uni.downloadFile({
url: url,
success: (res) => {
if (res.statusCode !== 200) {
reject(new Error('下载失败'))
return
}
uni.getFileSystemManager().readFile({
filePath: res.tempFilePath,
success: (r) => resolve(r.data),
fail: () => {
if (res.tempFilePath && typeof fetch !== 'undefined') {
fetch(res.tempFilePath).then(r => r.arrayBuffer())
.then(resolve).catch(reject)
} else {
reject(new Error('读取文件失败'))
}
}
})
},
fail: reject
})
})
} }
} }
} }
@@ -160,61 +124,94 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.preview-wrap { .doc-scroll {
flex: 1; flex: 1;
background: #fff;
overflow: hidden; overflow: hidden;
} }
.loading-box { .doc-card {
display: flex; background: #fff;
flex-direction: column; margin: 24rpx;
align-items: center; border-radius: 20rpx;
justify-content: center; padding: 36rpx 30rpx;
height: 100%; box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
} }
.loading-text { .doc-title {
font-size: 26rpx; font-size: 34rpx;
color: #999; font-weight: 700;
margin-top: 20rpx;
}
.error-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
.error-text {
font-size: 26rpx;
color: #999;
margin-bottom: 30rpx;
}
.preview-btn {
width: 300rpx;
height: 76rpx;
line-height: 76rpx;
background: linear-gradient(135deg, #FD5401, #FF7A3D);
color: #fff;
font-size: 28rpx;
font-weight: 600;
border: none;
border-radius: 38rpx;
}
.doc-scroll {
height: 100%;
padding: 20rpx 30rpx;
box-sizing: border-box;
}
.doc-content {
font-size: 28rpx;
color: #333; color: #333;
line-height: 1.8; text-align: center;
line-height: 1.5;
margin-bottom: 20rpx;
}
.sec {
margin-top: 30rpx;
}
.sec-title {
display: block;
font-size: 28rpx;
font-weight: 700;
color: #FD5401;
margin-bottom: 10rpx;
}
.sec-text {
display: block;
font-size: 26rpx;
color: #555;
line-height: 1.7;
margin-bottom: 6rpx;
}
.footer-note {
margin-top: 16rpx;
color: #999;
font-size: 24rpx;
}
.prize-table {
border: 2rpx solid #F0E4D0;
border-radius: 12rpx;
overflow: hidden;
margin-top: 6rpx;
}
.prize-tr {
display: flex;
border-bottom: 2rpx solid #F0E4D0;
}
.prize-tr:last-child {
border-bottom: none;
}
.prize-th {
background: #FFF7ED;
}
.prize-th .prize-td {
font-weight: 700;
color: #5D533D;
}
.prize-td {
flex: 1;
font-size: 24rpx;
color: #555;
padding: 16rpx 10rpx;
text-align: center;
border-right: 2rpx solid #F0E4D0;
line-height: 1.4;
}
.prize-td:last-child {
border-right: none;
}
.prize-td:nth-child(2) {
flex: 2;
} }
</style> </style>
+309
View File
@@ -0,0 +1,309 @@
<template>
<view class="content">
<view class="page-header">
<text class="header-back" @tap="goBack">‹</text>
<text class="header-title">{{ current.title }}</text>
<text class="header-index">{{ currentIndex + 1 }} / {{ articles.length }}</text>
</view>
<view class="preview-wrap">
<view class="loading-box" v-if="loading">
<u-loading mode="circle" size="40"></u-loading>
<text class="loading-text">内容加载中...</text>
</view>
<scroll-view class="doc-scroll" scroll-y v-if="!loading && !error">
<rich-text class="doc-content" :nodes="htmlContent"></rich-text>
<view style="height:30rpx;"></view>
</scroll-view>
<view class="error-box" v-if="error">
<text class="error-text">{{ error }}</text>
<button class="preview-btn" @tap="loadArticle">重新加载</button>
</view>
</view>
<view class="page-footer">
<button class="nav-btn prev" :disabled="currentIndex <= 0" @tap="prev">上一篇</button>
<button class="nav-btn next" :disabled="currentIndex >= articles.length - 1" @tap="next">下一篇</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
articles: [
{
title: '中华人民共和国宪法',
url: 'https://goldnar.hntgov.net/img/word8.docx'
},
{
title: '中华人民共和国民法典',
url: 'https://goldnar.hntgov.net/img/word4.docx'
},
{
title: '中华人民共和国行政复议法实施条例',
url: 'https://goldnar.hntgov.net/img/word20.docx'
},
{
title: '优化营商环境条例',
url: 'https://goldnar.hntgov.net/img/word22.docx'
}
],
currentIndex: 0,
loading: false,
error: '',
htmlContent: ''
}
},
computed: {
current() {
return this.articles[this.currentIndex] || {}
}
},
onLoad(options) {
const idx = parseInt(options.index)
if (!isNaN(idx) && idx >= 0 && idx < this.articles.length) {
this.currentIndex = idx
} else {
this.currentIndex = 0
}
},
onReady() {
this.loadArticle()
},
methods: {
goBack() {
uni.navigateBack()
},
prev() {
if (this.currentIndex > 0) {
this.currentIndex--
this.loadArticle()
}
},
next() {
if (this.currentIndex < this.articles.length - 1) {
this.currentIndex++
this.loadArticle()
}
},
loadArticle() {
this.loading = true
this.error = ''
this.htmlContent = ''
this.ensureMammoth().then(() => {
return this.fetchDocx(this.current.url)
}).then(arrayBuffer => {
return window.mammoth.convertToHtml({ arrayBuffer })
}).then(result => {
this.htmlContent = result.value || ''
this.loading = false
}).catch(err => {
console.error('加载文档失败', err)
this.loading = false
this.error = '文档加载失败,请重试'
})
},
ensureMammoth() {
if (window.mammoth) return Promise.resolve()
return new Promise((resolve, reject) => {
const urls = [
'/static/mammoth.browser.min.js',
'https://unpkg.com/mammoth@1.6.0/mammoth.browser.min.js'
]
let i = 0
const loadNext = () => {
if (i >= urls.length) {
reject(new Error('解析组件加载失败'))
return
}
const s = document.createElement('script')
s.src = urls[i++]
s.onload = () => window.mammoth ? resolve() : loadNext()
s.onerror = loadNext
document.head.appendChild(s)
}
loadNext()
})
},
fetchDocx(url) {
return new Promise((resolve, reject) => {
if (typeof fetch !== 'undefined') {
fetch(url).then(res => {
if (!res.ok) throw new Error('HTTP ' + res.status)
return res.arrayBuffer()
}).then(resolve).catch(() => this.downloadDocx(url).then(resolve).catch(reject))
return
}
this.downloadDocx(url).then(resolve).catch(reject)
})
},
downloadDocx(url) {
return new Promise((resolve, reject) => {
uni.downloadFile({
url: url,
success: (res) => {
if (res.statusCode !== 200) {
reject(new Error('下载失败'))
return
}
uni.getFileSystemManager().readFile({
filePath: res.tempFilePath,
success: (r) => resolve(r.data),
fail: () => {
if (res.tempFilePath && typeof fetch !== 'undefined') {
fetch(res.tempFilePath).then(r => r.arrayBuffer()).then(resolve).catch(reject)
} else {
reject(new Error('读取文件失败'))
}
}
})
},
fail: reject
})
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #F8F8F8;
}
.content {
position: relative;
display: flex;
flex-direction: column;
}
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 30rpx;
background: linear-gradient(135deg, #FD5401, #FF7A3D);
flex-shrink: 0;
}
.header-back {
font-size: 48rpx;
color: #fff;
line-height: 1;
margin-right: 16rpx;
padding: 0 10rpx;
}
.header-title {
font-size: 30rpx;
font-weight: 600;
color: #fff;
flex: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.header-index {
font-size: 24rpx;
color: rgba(255,255,255,0.8);
margin-left: 20rpx;
}
.preview-wrap {
flex: 1;
background: #fff;
overflow: hidden;
padding-bottom: 100rpx;
}
.loading-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
.loading-text {
font-size: 26rpx;
color: #999;
margin-top: 20rpx;
}
.error-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
.error-text {
font-size: 26rpx;
color: #999;
margin-bottom: 30rpx;
}
.preview-btn {
width: 300rpx;
height: 76rpx;
line-height: 76rpx;
background: linear-gradient(135deg, #FD5401, #FF7A3D);
color: #fff;
font-size: 28rpx;
font-weight: 600;
border: none;
border-radius: 38rpx;
}
.doc-scroll {
height: 100%;
padding: 20rpx 30rpx;
box-sizing: border-box;
}
.doc-content {
font-size: 28rpx;
color: #333;
line-height: 1.8;
}
.page-footer {
display: flex;
gap: 24rpx;
padding: 20rpx 30rpx;
position: fixed;
bottom: 0rpx;
width: 750rpx;
background: #fff;
flex-shrink: 0;
border-top: 1rpx solid #f0f0f0;
}
.nav-btn {
flex: 1;
height: 76rpx;
line-height: 76rpx;
font-size: 28rpx;
font-weight: 600;
border: none;
border-radius: 38rpx;
margin: 0;
}
.nav-btn.prev {
background: #f5f5f5;
color: #333;
}
.nav-btn.next {
background: linear-gradient(135deg, #FD5401, #FF7A3D);
color: #fff;
}
.nav-btn[disabled] {
opacity: 0.4;
color: #999;
}
</style>
+446
View File
@@ -0,0 +1,446 @@
<template>
<view class="content">
<view class="page-bg" :style="{ position: 'absolute', top: 0, left: 0, width: '750rpx', height: bgHeight + 'px', backgroundImage: 'url(https://aliyunoss.hn12301.net/learnlaw/xfhm_dtbj.jpg)', backgroundSize: 'cover', backgroundPosition: 'top center', backgroundRepeat: 'no-repeat', zIndex: 0 }"></view>
<view class="page-body">
<view class="login-box" v-if="!isLoggedIn">
<text class="login-tip">注册后可查看中奖记录</text>
<button class="login-btn" @tap="goRegister">立即注册</button>
</view>
<template v-if="isLoggedIn">
<view class="record-list" v-if="list.length > 0">
<view class="record-item" v-for="(item, i) in list" :key="i">
<view class="record-icon">
<text class="iconfont">🎁</text>
</view>
<view class="record-info">
<text class="record-prize">{{ item.title }}</text>
<text class="record-desc">{{ item.is_win_pc_desc }}</text>
<text class="record-status">{{ item.status_desc }}</text>
</view>
<view class="record-right">
<text class="record-time">{{ item.time }}</text>
<view class="btn-row">
<button class="winlist-btn" v-if="isEnded(item)" @tap="showWinList(item)">中奖名单</button>
</view>
</view>
</view>
</view>
<view class="empty-box" v-if="list.length === 0">
<text class="empty-icon">🏆</text>
<text class="empty-text">暂无中奖记录</text>
</view>
</template>
</view>
<view class="modal-mask" v-if="showWinModal" @tap="closeWinModal"></view>
<view class="modal win-modal" v-if="showWinModal">
<view class="modal-header">
<text class="modal-title">中奖名单</text>
<text class="modal-close" @tap="closeWinModal">✕</text>
</view>
<view class="win-list">
<view class="win-item" v-for="(w, wi) in winList" :key="wi">
<view class="win-level" :class="'win-level-' + w.win_level">
<text>{{ w.win_level_name }}</text>
</view>
<text class="win-name">{{ w.user_name }}</text>
<text class="win-phone">{{ w.user_phone }}</text>
</view>
<view class="win-empty" v-if="winList.length === 0">
<text>暂无中奖名单</text>
</view>
</view>
</view>
<u-tabbar :list="tabbarList" :hideTabBar="true" activeColor="#FD5401" inactiveColor="#5D533D" :borderTop="false"
height="120rpx" iconSize="48"></u-tabbar>
</view>
</template>
<script>
export default {
data() {
return {
tabbarList: [
{ pagePath: "/pages/index/index", iconPath: "/static/shouye.png", selectedIconPath: "/static/shouye_select.png", text: "首页" },
{ pagePath: "/pages/win-records/win-records", iconPath: "/static/zhongjiangjilu.png", selectedIconPath: "/static/zhongjiangjilu_select.png", text: "中奖记录" },
{ pagePath: "/pages/profile/profile", iconPath: "/static/wode.png", selectedIconPath: "/static/wode_select.png", text: "我的" }
],
isLoggedIn: false,
list: [],
showWinModal: false,
winList: [],
bgHeight: 0
}
},
onLoad() {
const sys = uni.getSystemInfoSync();
this.bgHeight = sys.windowHeight
},
onShow() {
this.checkLogin()
},
methods: {
checkLogin() {
const userId = uni.getStorageSync('userIdSft')
if (userId) {
this.isLoggedIn = true
this.fetchList(userId)
} else {
this.isLoggedIn = false
}
},
goRegister() {
uni.navigateTo({ url: '/pages/register/register' })
},
fetchList(userId) {
this.$u.api.getChouJiangResult({
user_id: userId,
wenjuan_id: 1005
}).then(res => {
if (res.code === 0) {
const data = res.Data || {}
this.list = data.list || data.records || data || []
if (!Array.isArray(this.list)) this.list = []
} else {
uni.showToast({ title: res.msg || '加载失败', icon: 'none' })
}
}).catch(() => {
uni.showToast({ title: '网络异常', icon: 'none' })
})
},
isEnded(item) {
return String(item.status_desc || '').indexOf('已结束') > -1
},
showWinList(item) {
this.winList = []
this.showWinModal = true
this.$u.api.getWenjuanWinDetailList({
wenjuan_id: 1005,
period: item.index
}).then(res => {
if (res.code === 0) {
this.winList = Array.isArray(res.Data) ? res.Data : []
} else {
uni.showToast({ title: res.msg || '加载失败', icon: 'none' })
}
}).catch(() => {
uni.showToast({ title: '网络异常', icon: 'none' })
})
},
closeWinModal() {
this.showWinModal = false
}
}
}
</script>
<style lang="scss">
page {
background-color: #B3E9F3;
}
.content {
position: relative;
display: flex;
flex-direction: column;
height: 100vh;
height: 100dvh;
overflow: hidden;
}
.page-body {
position: relative;
z-index: 1;
flex: 1;
display: flex;
flex-direction: column;
padding: 260rpx 30rpx 140rpx;
box-sizing: border-box;
overflow: hidden;
}
.login-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
.login-tip {
font-size: 28rpx;
color: rgba(255,255,255,0.85);
margin-bottom: 30rpx;
}
.login-btn {
width: 400rpx;
height: 80rpx;
line-height: 80rpx;
background: linear-gradient(135deg, #FD5401, #FF7A3D);
color: #fff;
font-size: 30rpx;
font-weight: 600;
border: none;
border-radius: 40rpx;
box-shadow: 0 4rpx 16rpx rgba(253,84,1,0.3);
}
.record-list {
flex: 1;
min-height: 0;
overflow-y: auto;
background: rgba(255,255,255,0.95);
border-radius: 20rpx;
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
}
.record-item {
display: flex;
align-items: center;
padding: 28rpx 24rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.record-item:last-child {
border-bottom: none;
}
.record-icon {
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: 16rpx;
background: #fff7e6;
border-radius: 50%;
}
.record-icon .iconfont {
font-size: 32rpx;
}
.record-info {
flex: 1;
min-width: 0;
}
.record-prize {
font-size: 28rpx;
color: #333;
font-weight: 500;
display: block;
}
.record-desc {
font-size: 22rpx;
color: #999;
margin-top: 4rpx;
display: block;
}
.record-status {
font-size: 22rpx;
color: #FD5401;
margin-top: 4rpx;
display: block;
}
.record-right {
display: flex;
flex-direction: column;
align-items: stretch;
flex-shrink: 0;
margin-left: 16rpx;
min-width: 260rpx;
}
.record-time {
font-size: 22rpx;
color: #bbb;
margin-bottom: 8rpx;
text-align: right;
width: 100%;
}
.btn-row {
display: flex;
align-items: center;
gap: 12rpx;
width: 100%;
}
.winlist-btn {
flex: 1;
height: 60rpx;
line-height: 60rpx;
background: linear-gradient(135deg, #E0B866, #F0D08A);
color: #fff;
font-size: 24rpx;
font-weight: 600;
border: none;
border-radius: 30rpx;
padding: 0 12rpx;
margin: 0;
letter-spacing: 0;
text-align: center;
}
.empty-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80rpx 0;
}
.empty-icon {
font-size: 80rpx;
margin-bottom: 16rpx;
}
.empty-text {
font-size: 26rpx;
color: rgba(255,255,255,0.7);
}
.modal-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.5);
z-index: 100;
}
.modal {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 600rpx;
background: #fff;
border-radius: 24rpx;
z-index: 101;
overflow: hidden;
}
.modal-header {
display: flex;
align-items: center;
justify-content: center;
padding: 30rpx 30rpx 20rpx;
position: relative;
}
.modal-title {
font-size: 32rpx;
font-weight: 700;
color: #333;
}
.modal-close {
position: absolute;
right: 30rpx;
top: 30rpx;
font-size: 28rpx;
color: #999;
padding: 8rpx;
}
.win-modal {
max-height: 80vh;
display: flex;
flex-direction: column;
}
.win-list {
flex: 1;
max-height: 60vh;
overflow-y: auto;
padding: 0 30rpx 30rpx;
}
.win-item {
display: flex;
align-items: center;
padding: 22rpx 0;
border-bottom: 1rpx solid #f0f0f0;
}
.win-item:last-child {
border-bottom: none;
}
.win-level {
width: 120rpx;
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 22rpx;
font-size: 22rpx;
color: #fff;
flex-shrink: 0;
margin-right: 16rpx;
}
.win-level-1 {
background: linear-gradient(135deg, #F8D65E, #D9A400);
}
.win-level-2 {
background: linear-gradient(135deg, #F0C85A, #C9962E);
}
.win-level-3 {
background: linear-gradient(135deg, #D98E4A, #B87333);
}
.win-name {
flex: 1;
font-size: 28rpx;
color: #333;
font-weight: 500;
min-width: 0;
}
.win-phone {
font-size: 24rpx;
color: #999;
flex-shrink: 0;
margin-left: 16rpx;
}
.win-empty {
text-align: center;
font-size: 26rpx;
color: #999;
padding: 60rpx 0;
}
::v-deep .u-tabbar__content {
background: linear-gradient(to bottom, #FFEBBC, #FFD67E) !important;
}
::v-deep .u-tabbar__content__item {
background: linear-gradient(to bottom, #FFEBBC, #FFD67E) !important;
}
::v-deep .u-tabbar {
.u-border-top {
border-top: none !important;
}
}
::v-deep .u-icon__img {
object-fit: contain !important;
}
::v-deep .u-tabbar__content__item {
padding: 16rpx 0 !important;
}
</style>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB