index.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. <template>
  2. <div class="CalligraphyAndPaintingCompetition">
  3. <div class="total">
  4. 已有
  5. <span class="num">
  6. <countTo :startVal="0" :endVal="total" :duration="3000"></countTo>
  7. </span>
  8. 人报名
  9. </div>
  10. <div class="bottom">
  11. <div class="bottom_item">
  12. <div class="btn" @click="toDetail = true">活动详情</div>
  13. </div>
  14. <div class="bottom_item" style="flex: 3">
  15. <div class="btn" @click="tougao">我要投稿</div>
  16. </div>
  17. <div class="bottom_item">
  18. <div class="btn" @click="toupiao">我的作品</div>
  19. </div>
  20. </div>
  21. <van-overlay
  22. :custom-style="{ 'background-color': 'rgba(0, 0, 0, .4)' }"
  23. :show="toShanshipin"
  24. >
  25. <div class="dialogBody">
  26. <van-image width="100" height="100" :src="logoImage" round />
  27. <div class="title">请打开闪视频投稿或查看我的作品</div>
  28. <br />
  29. <van-button
  30. round
  31. type="default"
  32. color="linear-gradient(90deg, #0038ad, #004fd9)"
  33. block
  34. @click="toShanshipinFunc"
  35. >打开闪视频</van-button
  36. >
  37. <div class="closeBtn" @click="toShanshipin = false">
  38. <img
  39. style="width: 20px; height: 20px"
  40. src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAWhJREFUOBG1lL1OwzAUheuEIUJMDAwwMLEhRQkTG7xKaYFXgkIfhyk/ikQmBl6ADcYo4Zxgu0lrOxYCD7Xje87Xe28cz2YYWZbtl2V5xvVvRlVV53VdH9IrCBNCvHddd4T5MU3Te8ydDxgeURTFA+YlPF9RFJ0GYRieEEYA5lsIniicAlIjtUvpPWia5jhIkuSNmSkAhPMp6AA2Vz4wVnEcvwbckGWuVdAFtcDWYNzRr0tzCBeqpz4aDSTdZWBctmJYJjPTf0jNCMgNG1TGnDBqdoDSqN6gBnBfDbRgJzMdU4vt2ZQpNS4Y4/1b5uKvxv+XbCqVZbICxHRPbaXvDUu1wXg0qMOx0VDC5bP52LhgyKa/LHw0fQ99hKqSKW1fcp7nKxgm+0Mos8VYmMpH+IYH+LJt2xeKOWzN/olufk2Z4iq8DgD4UD2C/Hn729wgxit6pFbfUkjss1fx+memY4v/E/xXaNsFHd9CLmBlRyZwLQAAAABJRU5ErkJggg=="
  41. />
  42. </div>
  43. </div>
  44. </van-overlay>
  45. <!-- confirm-button-color="linear-gradient(90deg, #0038ad, #004fd9)" -->
  46. <van-dialog
  47. theme="round-button"
  48. confirm-button-text="关 闭"
  49. v-model:show="toDetail"
  50. title="详情"
  51. confirm-button-color="#cc0003"
  52. >
  53. <div class="DetailMain">
  54. <p class="DetailLine">活动说明</p>
  55. <p class="DetailLine">1.活动名称:2023“我心中的黄帝陵”青少年书画活动</p>
  56. <p class="DetailLine">
  57. 2.主办单位:陕西省委网信办、共青团陕西省委、陕西省祭陵办
  58. </p>
  59. <p class="DetailLine">
  60. 3.参与对象:全省各单位青年、高校学生、中小学学生
  61. </p>
  62. <p class="DetailLine">
  63. 4.征集主题:以书法、绘画作品的形式表现自己对“黄帝”文化的理解、对“黄帝”形象的领悟。
  64. </p>
  65. <p class="DetailLine">5.征稿时间:2023年4月</p>
  66. <p class="DetailLine">
  67. 6.评选方式:评选阶段分为初评和终评。通过初评的作品在“闪视频”、“西部网教育”微信公众号展示。通过初评的选手将参加现场创作活动,由专家评审团现场评审选出优秀作品,评审结果将在“西部网教育”微信公众号发布。
  68. </p>
  69. <p class="DetailLine">活动规则</p>
  70. <p class="DetailLine">
  71. 1.全省各单位青年、高校学生、中小学学生均可投稿;投稿作品需符合主题要求,内容应健康、积极向上,具有艺术感、想象力和创造性,拒绝模版化作品。
  72. </p>
  73. <p class="DetailLine">
  74. 2.投稿者应保证其为所投作品的作者,并对该作品的整体及局部均拥有独立、完整、明确、无争议的著作权;作者还应保证其所投送的作品不侵犯第三人的包括著作权、肖像权、名誉权、隐私权等在内的合法权益。
  75. </p>
  76. <p class="DetailLine">
  77. 3.主办方有权免费使用本次书画活动的作品,包括出版画册、举办展览和相关宣传推广等。
  78. </p>
  79. </div>
  80. </van-dialog>
  81. <img v-if="showWixin" src="../../assets/img/weixin.jpg" class="Down" />
  82. </div>
  83. </template>
  84. <script setup>
  85. import { ref } from 'vue';
  86. // import { onMounted, reactive } from "vue";
  87. import {
  88. isIpad,
  89. isIpod,
  90. isIphone,
  91. isAndroid,
  92. isWechat,
  93. } from '../../utils/isTerminal';
  94. import countTo from '@/components/counto/vue-countTo.vue';
  95. import { getTotalNum, getToupiaoUrl } from '@/api/SilkRoadSpringGala.js';
  96. /**
  97. * window.$originData.orginParames.title 页面标题
  98. * window.$originData.orginParames.parameters 固定参数值
  99. * window.$originData.urlParames url参数
  100. */
  101. import logoImage from '@/assets/img/logp.png';
  102. const toShanshipin = ref(false);
  103. const toDetail = ref(false);
  104. const showWixin = ref(false);
  105. const total = ref(0);
  106. const toJianjie = ref(false);
  107. tot();
  108. window.setInterval(() => {
  109. tot();
  110. }, 5000);
  111. function getDownloadUrl() {
  112. let url = 'https://ssp.sxtvs.com.cn';
  113. if (isIpad || isIpod || isIphone)
  114. url =
  115. 'https://apps.apple.com/cn/app/%E9%97%AA%E8%A7%86%E9%A2%91/id1498056575';
  116. if (isAndroid) url = 'tideapp://scheme';
  117. return url;
  118. }
  119. function toShanshipinFunc() {
  120. if (isIpad || isIpod || isIphone) return (location.href = getDownloadUrl());
  121. if (isWechat) showWixin.value = true;
  122. else location.href = getDownloadUrl();
  123. if (!isWechat && isAndroid)
  124. window.setTimeout(function () {
  125. window.location.href =
  126. 'https://ssp.sxtvs.com.cn'; /***打开app的协议,有安卓同事提供***/
  127. }, 2000);
  128. }
  129. function tougao() {
  130. const newDate = Date.now();
  131. const inTime = newDate >= 1682870400000 && newDate < 1683734400000;
  132. if (inTime) {
  133. // 2023-5-1 00:00:00 到 2023-5-10 24:00:00 跳转到投票界面
  134. getToupiaoUrl().then(r => {
  135. const res = r || { toupiaourl: '' };
  136. openShanshipinDetail(res.toupiaourl);
  137. });
  138. return;
  139. } else {
  140. // 否则打开简介
  141. toJianjie.value = true;
  142. }
  143. }
  144. function toupiao() {
  145. if (!window.$shanshipin || !window.$shanshipin.invitedIp)
  146. return (toShanshipin.value = true);
  147. openShanshipinDetail(
  148. 'https://ssp-api.sxtvs.com.cn/tapi/form/index.html?ChannelID=20441'
  149. );
  150. }
  151. function openShanshipinDetail(url = '') {
  152. const contentId = '',
  153. shareTitle = '',
  154. shareSummary = '',
  155. shareIcon = '',
  156. shareUrl = '';
  157. if (isIphone || isIpad || isIpod) {
  158. try {
  159. window.webkit.messageHandlers.TideAppStartNewsDetail.postMessage([
  160. url,
  161. contentId,
  162. shareTitle,
  163. shareSummary,
  164. shareIcon,
  165. shareUrl,
  166. ]);
  167. } catch (e) {
  168. console.log(e);
  169. }
  170. } else {
  171. try {
  172. window.TideApp.startNewsDetail(
  173. url,
  174. contentId,
  175. shareTitle,
  176. shareSummary,
  177. shareIcon,
  178. shareUrl
  179. );
  180. } catch (e) {
  181. console.log(e);
  182. }
  183. }
  184. }
  185. function tot() {
  186. getTotalNum().then(r => {
  187. const res = r || {real: 0, unreal: 0}
  188. total.value = Number(res.real || 0) + Number(res.unreal || 0);
  189. });
  190. }
  191. </script>
  192. <style lang="scss">
  193. .CalligraphyAndPaintingCompetition {
  194. width: 100vw;
  195. height: 100vh;
  196. background-image: url('../../assets/img/hdl.jpg');
  197. background-size: 100% 100%;
  198. position: relative;
  199. .bottom {
  200. position: absolute;
  201. bottom: 0;
  202. width: 100vw;
  203. display: flex;
  204. padding: 1em 0;
  205. .bottom_item {
  206. flex: 2;
  207. text-align: center;
  208. padding: 0 0.5em;
  209. }
  210. }
  211. .btn {
  212. display: inline-block;
  213. font-weight: 500;
  214. font-size: 16px;
  215. background: -webkit-gradient(
  216. linear,
  217. left top,
  218. right top,
  219. from(#0038ad),
  220. to(#004fd9)
  221. );
  222. background: #cc0003;
  223. // background: linear-gradient(90deg, #0038ad, #004fd9);
  224. width: 100%;
  225. height: 2.5em;
  226. line-height: 2.5em;
  227. border-radius: 2.5em;
  228. text-align: center;
  229. color: #fff;
  230. vertical-align: middle;
  231. }
  232. .dialogBody {
  233. position: absolute;
  234. top: 50%;
  235. left: 50%;
  236. transform: translate(-50%, -50%);
  237. padding: 1em 1em 1em 1em;
  238. width: 90%;
  239. margin: 0 auto;
  240. border-radius: 15px;
  241. background-color: #ffffff;
  242. .closeBtn {
  243. width: 40px;
  244. height: 40px;
  245. padding-top: 10px;
  246. border-radius: 50%;
  247. left: 50%;
  248. bottom: -4em;
  249. transform: translateX(-50%);
  250. position: absolute;
  251. background-color: rgba(0, 0, 0, 0.4);
  252. text-align: center;
  253. }
  254. .van-image {
  255. margin: 0 auto;
  256. display: block;
  257. }
  258. .title {
  259. transition: opacity 0.5s;
  260. color: #666;
  261. border-radius: 0.5rem;
  262. padding: 0.45rem 0.6rem 0 0.6rem;
  263. text-align: center;
  264. }
  265. }
  266. .DetailMain {
  267. padding: 0 26px;
  268. max-height: 250px;
  269. overflow: auto;
  270. .DetailLine {
  271. padding-bottom: 1em;
  272. color: #666;
  273. line-height: 1.5em;
  274. }
  275. }
  276. .Down {
  277. position: fixed;
  278. z-index: 100000;
  279. width: 100vw;
  280. height: 100vh;
  281. }
  282. .total {
  283. color: #fff;
  284. position: absolute;
  285. top: 50%;
  286. left: 50%;
  287. transform: translate(-50%, -50%);
  288. .num {
  289. background-color: rgba(0, 0, 0, 0.4);
  290. border-radius: 3px;
  291. padding: 0.5em;
  292. }
  293. }
  294. }
  295. </style>