From 29851d845f4ab768c78724ab870ecec4ce28c32b Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 24 十月 2025 11:42:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/user_action' into user_action
---
api/prize.js | 14 ++++
pages/prize/PrizeDetail/PrizeDetail.vue | 111 +++++++++++++++++++++++++-----------
2 files changed, 89 insertions(+), 36 deletions(-)
diff --git a/api/prize.js b/api/prize.js
index 32578c1..2daaf06 100644
--- a/api/prize.js
+++ b/api/prize.js
@@ -70,4 +70,16 @@
needToken: true,
data:data
});
-}
\ No newline at end of file
+}
+/**
+ * 鑾峰彇澧炲姞鎶藉瑙勫垯
+ *
+ */
+export function getPrizeRule() {
+ return http.request({
+ url: `/lmk/prize/getPrizeRule`,
+ method: Method.GET,
+ needToken: true
+ });
+}
+
diff --git a/pages/prize/PrizeDetail/PrizeDetail.vue b/pages/prize/PrizeDetail/PrizeDetail.vue
index 9b6102e..85a8326 100644
--- a/pages/prize/PrizeDetail/PrizeDetail.vue
+++ b/pages/prize/PrizeDetail/PrizeDetail.vue
@@ -54,14 +54,14 @@
<view class="prize-modal-content" @tap.stop>
<view class="modal-close" @tap="closePrizeModal">脳</view>
- <view class="congratulations-text" v-if="currentPrize.id !== 'thanks'">
+ <view class="congratulations-text" v-if="currentPrize.id !== 'notWIn'">
馃帀 鎭枩鎮� 馃帀
</view>
<view class="sorry-text" v-else>
馃様 寰堥仐鎲� 馃様
</view>
- <view class="prize-display">
+ <view class="prize-display" v-if="currentPrize.id !== 'notWIn'">
<image :src="currentPrize.img" class="modal-prize-img" />
<text class="modal-prize-name">{{ currentPrize.name }}</text>
</view>
@@ -116,6 +116,18 @@
</view>
</view>
+ <!-- 鎶藉瑙勫垯灞曠ず -->
+ <view class="prize-rules-section" v-if="prizeAddRule.length > 0">
+ <view class="section-title">鑾峰彇鏈轰細瑙勫垯</view>
+ <view class="rules-list">
+ <view class="rule-item" v-for="(rule, index) in prizeAddRule" :key="rule.id">
+ <text class="rule-name">{{ rule.ruleName }}</text>
+ <text class="rule-value" v-if="rule.ruleValue">({{ rule.ruleValue }})</text>
+ <text class="rule-add-num">+{{ rule.addNum }}娆℃満浼�</text>
+ </view>
+ </view>
+ </view>
+
<view class="modal-tip">
<text class="tip-text">馃挕 瀹屾垚浠诲姟鍗冲彲鑾峰緱棰濆鎶藉鏈轰細</text>
</view>
@@ -151,7 +163,8 @@
prizeNum,
prize,
grantRecord,
- addPrizeNum
+ addPrizeNum,
+ getPrizeRule
} from '@/api/prize.js'
export default {
data() {
@@ -165,38 +178,7 @@
showRulesModal: false,
currentPrize: {},
// 娲诲姩瑙勫垯鏁版嵁
- activityRules: [{
- id: 1,
- title: '涓�銆� 鍙備笌鏂瑰紡涓庤鍒欙細',
- text: `1. 鍏嶈垂鎶藉鏈轰細鑾峰彇锛�
- 姣忔棩鐧诲綍锛� 鐢ㄦ埛姣忔棩鐧诲綍灏忕▼搴忥紝 鍗冲彲鑷姩鑾峰緱2娆″厤璐规娊濂栨満浼氾紱
- 浠诲姟璧氬彇锛� 瀹屾垚鎸囧畾浠诲姟锛� 鍙幏鍙栭澶栨棤涓婇檺鐨勬娊濂栨満浼氾紱
- 娴忚浠诲姟锛� 鍗曟璁块棶娲诲姩瑙嗛椤靛苟鍋滅暀鈮� 10 鍒嗛挓锛� 鍙澶栬幏寰�1娆℃満浼氾紱 鍗曟璁块棶鍟嗗搧璇︽儏椤靛仠鐣欌墺 1 鍒嗛挓锛� 鍙澶栬幏寰�1娆℃満浼氾紱
- 鍒嗕韩浠诲姟锛� 棣栨鍒嗕韩娲诲姩鑷虫湅鍙嬪湀鍙澶栬幏寰�1娆℃満浼氾紱 姣忔垚鍔熼個璇�1浣嶆柊鐢ㄦ埛鐐瑰嚮鎮ㄧ殑鍒嗕韩閾炬帴锛� 鍙啀寰�1娆℃満浼氾紱 濂藉弸閫氳繃鎮ㄧ殑閾炬帴瀹屾垚棣栨鎶藉锛� 鎮ㄥ彲鍐嶈幏寰�2娆℃満浼氥�俙
- },
- {
- id: 2,
- title: '浜屻�� 鎶藉瑙勫垯',
- text: `1.鐢ㄦ埛娑堣��1娆℃娊濂栨満浼氬嵆鍙弬涓庝竴娆℃娊濂栵紱
- 2.鏈娲诲姩濂栧搧姣忔棩闄愰噺锛屽厛鍒板厛寰楋紝鎶藉畬鍗虫銆�
- 鐢ㄦ埛娑堣��1娆℃娊濂栨満浼氬嵆鍙弬涓庝竴娆℃娊濂栥�傛湰娆℃椿鍔ㄥ鍝佹瘡鏃ラ檺閲忥紝鍏堝埌鍏堝緱锛屾娊瀹屽嵆姝€��
- 3.娉ㄦ剰浜嬮」锛氭瘡鏃ュ熀纭�鍏嶈垂鏈轰細浠呴檺褰撴棩浣跨敤锛屼笉绱鑷虫鏃ャ�傞�氳繃浠诲姟鑾峰緱鐨勯澶栨満浼氭棤涓婇檺銆傝纭繚鍒嗕韩鏃剁敓鎴愮殑鏄偍鏈汉鐨勪笓灞炲甫鍙傞摼鎺�/浜岀淮鐮侊紝鍚﹀垯鏃犳硶缁熻鎮ㄧ殑閭�璇峰叧绯汇�俙
- },
- {
- id: 4,
- title: '涓夈�佸鍝佹槑缁�',
- text: '銆�銆�鏈鎶藉娲诲姩濂栧搧姹犲叿浣撴瘡鏃ュ簱瀛樹互灏忕▼搴忛〉闈㈠疄鏃舵樉绀轰负鍑嗐��'
- },
- {
- id: 5,
- title: '鍥涖�佸鍝佸彂鏀句笌棰嗗彇',
- text: '銆�銆�1.涓閫氱煡锛氫腑濂栧悗锛岀郴缁熷皢鑷姩寮瑰嚭涓鎻愮ず锛屽苟鐢熸垚涓娴锋姤銆傛偍涔熷彲浠ュ疄鏃堕鍙栦篃鍙啀娲诲姩涓煡鐪嬩腑濂栬褰曘�俓n銆�銆�2.濂栧搧棰嗗彇锛氳鍦ㄦ敹鍒颁腑濂栭�氱煡鍚庣殑24灏忔椂鍐咃紝鍙婃椂濉啓骞剁‘璁ゆ敹璐у湴鍧�锛岄�炬湡瑙嗕负鑷姩鏀惧純濂栧搧銆俓n銆�銆�3.濂栧搧閫�鎹細鎵�鏈夊鍝佸潎涓烘椿鍔ㄧ壒瀹氱ぜ鍝侊紝涓嶄簣鎶樼幇銆佷笉閫�涓嶆崲銆傚閬囦骇鍝佽川閲忛棶棰橈紝璇蜂簬鏀惰揣鍚�24灏忔椂鍐呰仈绯诲鏈嶅鐞嗐��'
- },
- {
- id: 6,
- title: '浜斻�佸叾浠栨儏鍐佃鏄�',
- text: '銆�銆�1.鐢ㄦ埛琛屼负瑙勮寖锛氫弗绂佺敤鎴烽�氳繃浠讳綍涓嶆褰撴墜娈碉紙濡備娇鐢ㄥ鎸傘�佹満鍣ㄤ汉銆佹伓鎰忔敞鍐屽涓处鍙枫�佽櫄鍋囧垎浜瓑锛夊弬涓庢椿鍔ㄣ�備竴缁忓彂鐜帮紝銆愭偍鐨勫搧鐗屽悕绉般�戞湁鏉冨彇娑堝叾鍙備笌鍙婅幏濂栬祫鏍硷紝骞朵繚鐣欒拷绌舵硶寰嬭矗浠荤殑鏉冨埄銆俓n銆�銆�2.鍙嶄綔寮婃潯娆撅細娲诲姩閲囩敤鎶�鏈墜娈佃繘琛岄鎺х洃娴嬶紝鍖呮嫭浣嗕笉闄愪簬锛氳澶嘔D鍘婚噸銆佸垎浜涓洪獙璇併�佸湴鐞嗕綅缃牳楠岀瓑锛屼互纭繚娲诲姩鐨勫叕骞虫�с�俓n銆�銆�3.娲诲姩鍙樻洿锛氬閬囦笉鍙姉鍔涘洜绱犳垨鎶�鏈棶棰樺鑷存椿鍔ㄦ棤娉曟甯歌繘琛岋紝銆愭偍鐨勫搧鐗屽悕绉般�戞湁鏉冩殏鍋溿�佸欢闀挎垨缁堟娲诲姩锛屽苟瑙嗘儏鍐靛娲诲姩瑙勫垯杩涜鍙樻洿鎴栬皟鏁达紝鐩稿叧鍙樺姩灏嗘彁鍓嶄簣浠ュ叕鍛娿�俓n銆�銆�4.涓汉淇℃伅淇濇姢锛氭偍鐨勪釜浜轰俊鎭粎鐢ㄤ簬鏈娲诲姩濂栧搧鍙戞斁鍙婂悗缁湇鍔★紝鎴戜滑灏嗕弗鏍间繚瀵嗭紝涓嶄細娉勯湶缁欎换浣曠涓夋柟銆俓n銆�銆�5.鍏嶈矗澹版槑锛氬浜庡洜缃戠粶銆侀�氫俊绛夊師鍥犲鑷寸敤鎴锋湭鑳藉弬涓庢椿鍔ㄦ垨棰嗗彇濂栧搧鐨勬儏鍐碉紝銆愭偍鐨勫搧鐗屽悕绉般�戜笉鎵挎媴浠讳綍璐d换銆俓n銆�銆�6.娲诲姩瑙i噴鏉冿細鏈椿鍔ㄦ渶缁堣В閲婃潈褰掋�愭偍鐨勫搧鐗屽悕绉般�戞墍鏈夈��'
- }
+ activityRules: [
],
// 鑷姩婊氬姩鎺у埗
scrollTimer: null,
@@ -228,6 +210,7 @@
pageType:"DETAIL"
},
shareId:'',
+ prizeAddRule:[]
};
},
computed: {
@@ -306,6 +289,7 @@
})
await this.getUnmber(this.activityId)
await this.getGrantRecord(this.activityId)
+ await this.prizeRule()
},
// onShareTimeline(e) {
// console.log('------------------>', e)
@@ -365,6 +349,12 @@
this.stopAutoScroll()
},
methods: {
+ async prizeRule(){
+ this.prizeAddRule = [];
+ const res = await getPrizeRule()
+ this.prizeAddRule = res.data.data||[]
+ console.log('鑾峰彇鍒版坊鍔犳鏁拌鍒�',JSON.stringify(res.data.data))
+ },
async getUnmber(id) {
const prizeNums = await prizeNum(id);
if(prizeNums.statusCode === 400){
@@ -1848,4 +1838,55 @@
white-space: pre-line;
word-break: break-word;
}
+
+ /* 鎶藉瑙勫垯鏍峰紡 */
+ .prize-rules-section {
+ margin-top: 30rpx;
+ padding: 20rpx;
+ background: #f8f9ff;
+ border-radius: 15rpx;
+ }
+
+ .prize-rules-section .section-title {
+ text-align: left;
+ font-size: 30rpx;
+ margin-bottom: 15rpx;
+ color: #ff6b6b;
+ }
+
+ .rules-list {
+ max-height: 300rpx;
+ overflow-y: auto;
+ }
+
+ .rules-list .rule-item {
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+ padding: 15rpx 0;
+ margin-bottom: 0;
+ border-bottom: 1px solid #eee;
+ }
+
+ .rules-list .rule-item:last-child {
+ border-bottom: none;
+ }
+
+ .rule-name {
+ font-size: 26rpx;
+ color: #333;
+ flex: 1;
+ }
+
+ .rule-value {
+ font-size: 24rpx;
+ color: #666;
+ margin: 0 10rpx;
+ }
+
+ .rule-add-num {
+ font-size: 26rpx;
+ color: #ff6b6b;
+ font-weight: bold;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.8.0