App.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <script>
  2. import homeApi from '@/api/home/index.js'
  3. export default {
  4. onLaunch: function() {
  5. // console.log('進來了');
  6. // #ifdef H5
  7. let siteinfo=require('./siteinfo.js');
  8. var script = document.createElement('script');
  9. script.src = siteinfo.h5_siteroot+"/h5/static/js/EasyPlayer-element.min.js?v=202204071988";
  10. document.body.appendChild(script);
  11. // #endif
  12. },
  13. onShow: function() {
  14. // console.log('App Show');
  15. // #ifdef MP-WEIXIN
  16. const updateManager = uni.getUpdateManager();
  17. updateManager.onCheckForUpdate(function(res) {
  18. // 请求完新版本信息的回调
  19. console.log(res.hasUpdate);
  20. });
  21. updateManager.onUpdateReady(function(res) {
  22. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  23. updateManager.applyUpdate();
  24. });
  25. updateManager.onUpdateFailed(function(res) {
  26. // 新的版本下载失败
  27. });
  28. // #endif
  29. },
  30. onHide: function() {
  31. },
  32. util: require('./js/util.js'),
  33. globalData: {
  34. siteinfo: require('./siteinfo.js')
  35. },
  36. methods: {
  37. }
  38. };
  39. </script>
  40. <style lang="scss">
  41. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  42. @import "@/uni_modules/uview-ui/index.scss";
  43. @import 'static/css/reset.css';
  44. @import "static/style/base.scss";
  45. </style>
  46. <style lang="scss">
  47. body {
  48. /* #ifdef APP-PLUS || H5 */
  49. font-family: newfont;
  50. /* #endif */
  51. }
  52. uni-view {
  53. /* #ifdef APP-PLUS || H5 */
  54. font-family: newfont;
  55. /* #endif */
  56. }
  57. .all_box {
  58. min-height: calc(100vh);
  59. max-width: 750rpx;
  60. background-color: #f7f7f8;
  61. /* #ifdef APP-PLUS || H5 */
  62. font-family: newfont;
  63. /* #endif */
  64. }
  65. /* #ifdef APP-PLUS || H5*/
  66. @font-face {
  67. font-family: newfont;
  68. src: url("~@/static/font/myfont5.otf") format("truetype")
  69. }
  70. /* #endif */
  71. /* 取消默认标题加粗 */
  72. uni-page-head .uni-page-head__title {
  73. font-weight: normal;
  74. }
  75. </style>
  76. <style lang="less">
  77. @import '@/uni_modules/tob-less/index.less';
  78. /* A品牌的配色 */
  79. .theme-A {
  80. /* 提供配色依赖 */
  81. .ProvideColors( {
  82. /* 品牌色 */
  83. primary: #ff8903;
  84. /* 按钮 */
  85. secondary: #ff8903;
  86. /* 文字主色 */
  87. accent: #333333;
  88. /* 文字辅助 */
  89. auxiliary: #666666;
  90. /* 文字说明 */
  91. explain:#999999;
  92. /* 价格 */
  93. neutral: #ff0000;
  94. /* 背景 */
  95. base: #f7f7f8;
  96. /* 渐变 */
  97. gradient1:#fea858;
  98. gradient2:#ff8903
  99. }
  100. );
  101. }
  102. /* B品牌的配色 */
  103. .theme-B {
  104. /* 提供配色依赖 */
  105. .ProvideColors( {
  106. /* 品牌色 */
  107. primary: #e52340;
  108. /* 按钮 */
  109. secondary: #e52340;
  110. /* 文字主色 */
  111. accent: #333333;
  112. /* 文字辅助 */
  113. auxiliary: #666666;
  114. /* 文字说明 */
  115. explain:#999999;
  116. /* 价格 */
  117. neutral: #ff0000;
  118. /* 背景 */
  119. base: #f7f7f8;
  120. /* 渐变 */
  121. gradient1:#fd876f;
  122. gradient2:#e52340
  123. }
  124. );
  125. }
  126. /* C的配色 */
  127. .theme-C {
  128. .ProvideColors( {
  129. /* 品牌色 */
  130. primary: #ffd100;
  131. /* 按钮 */
  132. secondary: #ffd100;
  133. /* 文字主色 */
  134. accent: #333333;
  135. /* 文字辅助 */
  136. auxiliary: #666666;
  137. /* 文字说明 */
  138. explain:#999999;
  139. /* 价格 */
  140. neutral: #ff0000;
  141. /* 背景 */
  142. base: #f7f7f8;
  143. /* 渐变 */
  144. gradient1:#f4bb00;
  145. gradient2:#ffd100
  146. }
  147. );
  148. }
  149. /* D的配色 */
  150. .theme-D {
  151. .ProvideColors( {
  152. /* 品牌色 */
  153. primary: #4B086D;
  154. /* 按钮 */
  155. secondary: #4B086D;
  156. /* 文字主色 */
  157. accent: #333333;
  158. /* 文字辅助 */
  159. auxiliary: #666666;
  160. /* 文字说明 */
  161. explain:#999999;
  162. /* 价格 */
  163. neutral: #ff0000;
  164. /* 背景 */
  165. base: #f7f7f8;
  166. /* 渐变 */
  167. gradient1:#acc0fe;
  168. gradient2:#4B086D
  169. }
  170. );
  171. }
  172. /* E的配色 */
  173. .theme-E {
  174. .ProvideColors( {
  175. /* 品牌色 */
  176. primary: #014872;
  177. /* 按钮 */
  178. secondary: #014872;
  179. /* 文字主色 */
  180. accent: #333333;
  181. /* 文字辅助 */
  182. auxiliary: #666666;
  183. /* 文字说明 */
  184. explain:#999999;
  185. /* 价格 */
  186. neutral: #ff0000;
  187. /* 背景 */
  188. base: #f7f7f8;
  189. /* 渐变 */
  190. gradient1:#a0eacf;
  191. gradient2:#014872
  192. }
  193. );
  194. }
  195. /* F的配色 */
  196. .theme-F {
  197. .ProvideColors( {
  198. /* 品牌色 */
  199. primary: #067d68;
  200. /* 按钮 */
  201. secondary: #067d68;
  202. /* 文字主色 */
  203. accent: #333333;
  204. /* 文字辅助 */
  205. auxiliary: #666666;
  206. /* 文字说明 */
  207. explain:#999999;
  208. /* 价格 */
  209. neutral: #ff0000;
  210. /* 背景 */
  211. base: #f7f7f8;
  212. /* 渐变 */
  213. gradient1:#50d5b7;
  214. gradient2:#067d68
  215. }
  216. );
  217. }
  218. /* F的配色 */
  219. .theme-G {
  220. .ProvideColors( {
  221. /* 品牌色 */
  222. primary: #56AB2F;
  223. /* 按钮 */
  224. secondary: #56AB2F;
  225. /* 文字主色 */
  226. accent: #333333;
  227. /* 文字辅助 */
  228. auxiliary: #666666;
  229. /* 文字说明 */
  230. explain:#999999;
  231. /* 价格 */
  232. neutral: #ff0000;
  233. /* 背景 */
  234. base: #f7f7f8;
  235. /* 渐变 */
  236. gradient1:#56AB2F;
  237. gradient2:#56AB2F
  238. }
  239. );
  240. }
  241. </style>