index.vue 9.3 KB

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