1. 程式人生 > >部落格園x絲芙蘭-聖誕特別活動:聖誕選禮,美力送遞

部落格園x絲芙蘭-聖誕特別活動:聖誕選禮,美力送遞

C# 程式碼實現 ```cs namespace cnblogs_x_sephora { class Program { static void Main(string[] args) { var 優惠福利 = new[] { "2020.12.18-2021.1.3", "SEPHORA絲芙蘭小程式新註冊會員首單享滿398減50或滿698減100的優惠活動", "註冊後在購物車結算頁面輸入口令“BKY12”(不區分大小寫)即可享受優惠" }; 優惠福利.ToList().ForEach(Console.WriteLine); Console.WriteLine(); Console.WriteLine("聖誕「WOW」靈感禮單"); Console.WriteLine("為TA達成年終心願"); Console.WriteLine(); Console.WriteLine("聖誕節的來臨,正式奏響了年末贈禮的序曲"); Console.WriteLine("期待值滿分的精選禮單,讓TA在開箱時刻驚喜“WOW” !"); Console.WriteLine(); var offers = new[] { 聖誕禮單Part1, 聖誕禮單Part2, 聖誕禮單Part3, 聖誕禮單Part4 }; var offer = offers[new Random().Next(offers.Length - 1)]; Console.WriteLine(offer.Title); Console.WriteLine(offer.Subtitle); foreach (var product in offer.Products) { Console.WriteLine(product); } } private static dynamic 聖誕禮單Part1 =>
new { Title = "靈感精選 閃耀摯禮", Subtitle = "熱推力薦的摯愛之禮,為你開啟禮贈靈感。應景又應季、色彩感滿分的閃耀美禮,為節日增添氣氛,更為TA獻上溫馨祝福!", Products = new[] { (Brand: "GUERLAIN", ProductName: "嬌蘭帝皇蜂姿抗皺賦源眼霜套裝"), (Brand: "GIVENCHY", ProductName: "紀梵希高定香榭脣膏(星鑽限量版)"), (Brand: "SEB", ProductName: "絲芙蘭狂野願望彩妝盤"), (Brand: "Dior", ProductName: "克麗絲汀迪奧真我香氛節日套裝"), (Brand: "Wei", ProductName: "蔚藍之美沁透滋養面膜套裝") } }; private static dynamic 聖誕禮單Part2 =>
new { Title = "為她選禮:經典更驚喜", Subtitle = "無論是閨蜜還是愛人,都值得以經典致彼此間的長久默契——典藏大牌美禮,為她帶去不期而遇的驚喜!", Products = new[] { (Brand: "shiseido", ProductName: "資生堂新紅妍肌活精華露30ml優惠套組"), (Brand: "SK-II", ProductName: "SK-II 晶透賦能禮盒"), (Brand: "Dior", ProductName: "克麗絲汀迪奧烈焰藍金脣膏999( 全新上市)"), (Brand: "ADF", ProductName: "蔻依仙境花園系列香氛-木蘭詩語惠選套裝") } }; private static dynamic 聖誕禮單Part3 =>
new { Title = "為自己選禮:小眾更特別", Subtitle = "瞭解你的喜好、懂得你心思的,總是自己——送給自己的年末節日禮,是特別的、真正適合的。拋開大眾所向,將“真愛”小眾系列收入囊中!", Products = new[] { (Brand: "ELEMIS", ProductName: "海洋膠原經典「小黃罐」卸妝膏禮盒"), (Brand: "SEB", ProductName: "絲芙蘭狂野願望 身體禮盒"), (Brand: "Marie Dalgar Color studio", ProductName: "瑪麗黛佳色彩工作室醉戀復古多功能眼彩盤 微醺甜茶"), (Brand: "AC", ProductName: "歐瓏逐愛柑香聖誕夜禮盒") } }; private static dynamic 聖誕禮單Part4 => new { Title = "為他選禮:實用更貼心", Subtitle = "無需花哨,他常用的或是易忽略的好物,作為貼心問候,帶給他呵護與陪伴。實用的護膚香氛禮,為他駐守魅力陣地!", Products = new[] { (Brand: "LOEWE", ProductName: "羅意威第7樂章男款淡香水"), (Brand: "MOSCHINO", ProductName: "默斯奇諾熊男友香水"), (Brand: "BIOTHERM", ProductName: "碧歐泉藍鑽滋養奢寵惠選套組"), (Brand: "LAB SERIES", ProductName: "朗仕熬夜精華乳惠選套組") } }; } } ``` 也可以直接掃碼領取優惠券 新客首單專享福利