You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

377 lines
8.9 KiB

6 months ago
  1. <template>
  2. <view class="content">
  3. <img :src="item" width="100%" v-for="(item, index) in list"/>
  4. <!-- <view
  5. style="background: linear-gradient(#fff, rgb(220, 38, 7));
  6. width: 100%;height: 150rpx;">
  7. </view> -->
  8. <!-- <img src="/static/24.png" alt="" width="100%"/>
  9. <img src="/static/123.png" alt="" width="100%"/> -->
  10. <!-- <view class="top" v-if="false">
  11. <img src="/static/4.png" width="100%"
  12. style="position: absolute;z-index: -1;top: 0;left: 0;"/>
  13. <view class="title">
  14. <p>轻松<text>记单词</text></p>
  15. <p>专业<text>抗遗忘</text></p>
  16. </view>
  17. <view class="description">
  18. 一小时熟记<text>30-100</text>个单词
  19. </view>
  20. <view
  21. style="background: url(/static/3.png);
  22. background-size: 100% 100%;width: 90%;
  23. margin-top: 100rpx;text-align: center;">
  24. <view class="info-title">
  25. 记单词很轻松<text>不忘记</text>是关键
  26. </view>
  27. <view class="info-list">
  28. <view class="info-item">
  29. 一对一保姆式带训高效学习
  30. </view>
  31. <view class="info-item">
  32. 1套颠覆性的训练方法快速提升20-60
  33. </view>
  34. <view class="info-item">
  35. AI智能+21天抗遗忘+全程1对1真人陪练
  36. </view>
  37. <view class="info-item">
  38. 量身定制学习方案针对性强
  39. </view>
  40. <view class="info-item">
  41. 量身定制学习方案针对性强
  42. </view>
  43. <view class="info-item">
  44. 随时约随时学碎片化时间更好利用
  45. </view>
  46. <view class="info-item">
  47. 特色抗遗忘训练单词学的更快记得更牢
  48. </view>
  49. </view>
  50. </view>
  51. <view class="footer">
  52. <p>从底层逻辑上系统的解决英语学不好的问题</p>
  53. <p>将英语这门学科变成<text>强势学科!</text></p>
  54. <p>对英语做到<text>秒读</text><text>秒认</text><text>秒翻译</text></p>
  55. </view>
  56. </view> -->
  57. <view class="bottom">
  58. <view class="shang">
  59. <view class="info"
  60. style="color: #fff;margin-bottom: 40rpx;">
  61. 填写信息立即报名
  62. </view>
  63. <div class="register-username">
  64. <!-- <image src='../../static/register/userNameLogin@3x.png'></image> -->
  65. <u--input placeholder="请输入学生姓名" border="surround"
  66. v-model="registerForm.name"></u--input>
  67. </div>
  68. <div class="register-username">
  69. <!-- <image src='../../static/register/userNameLogin@3x.png'></image> -->
  70. <u--input placeholder="请输入手机号" border="surround"
  71. v-model="registerForm.phone"></u--input>
  72. </div>
  73. <view style="margin-bottom: 20rpx;">
  74. <text style="color: #fff;font-size: 40rpx;
  75. margin-right: 10rpx;">59.9</text>
  76. <del style="color: #eee;font-size: 28rpx;">原价300.0</del>
  77. </view>
  78. <u-button type="primary" @click="Register()"
  79. style="border-radius: 20rpx;color: #000;width: 200rpx;"
  80. color="#fff">立即支付</u-button>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. import api from '@/plugins/api.js'
  87. export default {
  88. data() {
  89. return {
  90. code : '',
  91. registerForm: {
  92. name: '',
  93. phone: '',
  94. },
  95. list : [
  96. '/static/0240718173256.jpg',
  97. '/static/24.png',
  98. '/static/123.png',
  99. ]
  100. }
  101. },
  102. onLoad() {
  103. if(this.GetQueryString('code')){ //路径上面有code说明微信已授权
  104. this.code = this.GetQueryString('code');
  105. //直接去登录发起请求
  106. this.toWxLogin(this.code)
  107. }else{
  108. this.getwx_authorize()
  109. }
  110. },
  111. methods: {
  112. getwx_authorize() {
  113. // let vid = uni.getStorageSync("ivcode");
  114. let redirect_uri = encodeURIComponent(this.VITE_REDIRECT_URI);
  115. let appid = this.VITE_APPID;
  116. window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appid+'&redirect_uri='+redirect_uri+'&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect'+'&t='+new Date().getTime();
  117. // window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + appid +
  118. // '&redirect_uri=' + redirect_uri + '&response_type=code&scope=snsapi_userinfo&state=' + 123 +
  119. // '&connect_redirect=1#wechat_redirect';
  120. },
  121. //获取url中参数的方法
  122. GetQueryString(name) {
  123. var url = window.location.href;
  124. try {
  125. var cs = url.split('?')[1]; //获取?之后的参数字符串
  126. var cs_arr = cs.split('&'); //参数字符串分割为数组
  127. for (var i = 0; i < cs_arr.length; i++) { //遍历数组,拿到json对象
  128. if (cs_arr[i].split('=')[0] == name) {
  129. return cs_arr[i].split('=')[1];
  130. }
  131. }
  132. return "";
  133. } catch {
  134. return "";
  135. }
  136. },
  137. //微信登录
  138. toWxLogin(code) {
  139. console.log(code);
  140. api('wxLogin', { code }, res=>{
  141. if(res.code == 200){
  142. localStorage.setItem("token", res.result.token)
  143. localStorage.setItem("userInfo", JSON.stringify(res.result.userInfo))
  144. }else{
  145. location.href = this.VITE_REDIRECT_URI
  146. }
  147. })
  148. },
  149. Register(){
  150. api('createOrder', {
  151. ...this.registerForm
  152. }, res=>{
  153. if(res.code == 200){
  154. }
  155. })
  156. }
  157. }
  158. }
  159. </script>
  160. <style scoped lang="scss">
  161. .content {
  162. display: flex;
  163. flex-direction: column;
  164. align-items: center;
  165. }
  166. .top{
  167. display: flex;
  168. flex-direction: column;
  169. align-items: center;
  170. position: relative;
  171. width: 100%;
  172. height: 1330rpx;
  173. .title{
  174. margin-top: 140rpx;
  175. color: #f8621f;
  176. font-size: 60rpx;
  177. font-weight: 900;
  178. line-height: 100rpx;
  179. transform: rotateZ(-4deg);
  180. letter-spacing: 10rpx;
  181. text{
  182. font-size: 90rpx;
  183. }
  184. }
  185. .description{
  186. margin-top: 30rpx;
  187. color: #fff;
  188. font-size: 28rpx;
  189. transform: rotateZ(-3deg);
  190. letter-spacing: 5rpx;
  191. padding-left: 120rpx;
  192. text{
  193. letter-spacing: 0rpx;
  194. padding-left: 10rpx;
  195. }
  196. }
  197. .info-title{
  198. color: #000;
  199. font-size: 35rpx;
  200. font-weight: 900;
  201. line-height: 100rpx;
  202. letter-spacing: 7rpx;
  203. text{
  204. font-size: 45rpx;
  205. }
  206. }
  207. .info-list{
  208. font-size: 25rpx;
  209. letter-spacing: 3rpx;
  210. padding: 20rpx;
  211. font-weight: 600;
  212. color: #000;
  213. line-height: 50rpx;
  214. .info-item{
  215. display: flex;
  216. align-items: center;
  217. }
  218. .info-item::before{
  219. content: '';
  220. display: block;
  221. width: 10rpx;
  222. height: 10rpx;
  223. background-color: #f8621f;
  224. border-radius: 50%;
  225. margin-right: 20rpx;
  226. }
  227. }
  228. .footer{
  229. margin-top: 90rpx;
  230. font-size: 28rpx;
  231. letter-spacing: 3rpx;
  232. font-weight: 600;
  233. color: #f8621f;
  234. line-height: 50rpx;
  235. text-align: center;
  236. background: url(/static/2.png);
  237. background-size: 100% 100%;
  238. width: 90%;
  239. padding: 20rpx 0;
  240. p:nth-child(2){
  241. text{
  242. font-size: 40rpx;
  243. letter-spacing: 20rpx;
  244. margin-left: 20rpx;
  245. }
  246. }
  247. p:nth-child(3){
  248. text{
  249. font-size: 40rpx;
  250. letter-spacing: 4rpx;
  251. margin-left: 25rpx;
  252. }
  253. }
  254. }
  255. }
  256. .bottom{
  257. display: flex;
  258. flex-direction: column;
  259. align-items: center;
  260. position: relative;
  261. width: 100%;
  262. // --color : #890404;
  263. --color : #dc2808;
  264. .shang{
  265. width: 100%;
  266. box-sizing: border-box;
  267. background: linear-gradient(to right, rgb(239,118,66), rgb(220, 38, 7));
  268. overflow: hidden;
  269. padding: 30rpx 0;
  270. display: flex;
  271. flex-direction: column;
  272. justify-content: center;
  273. align-items: center;
  274. }
  275. .xia{
  276. background-color: #fff;
  277. margin-bottom: 50rpx;
  278. h1{
  279. font-size: 50rpx;
  280. line-height: 150rpx;
  281. color: var(--color);
  282. font-weight: 500;
  283. letter-spacing: 5rpx;
  284. text-align: center;
  285. }
  286. .tx{
  287. border-left: 20rpx solid var(--color);
  288. border-right: 20rpx solid var(--color);
  289. border-top: 8rpx solid var(--color);
  290. border-bottom: 8rpx solid var(--color);
  291. width: fit-content;
  292. margin: 0 auto;
  293. background-color: #f9d3d4;
  294. color: #fff;
  295. font-size: 35rpx;
  296. }
  297. .asd{
  298. display: flex;
  299. margin-top: 20rpx;
  300. .left{
  301. width: 250rpx;
  302. display: flex;
  303. flex-direction: column;
  304. color: var(--color);
  305. font-weight: 900;
  306. line-height: 60rpx;
  307. justify-content: center;
  308. align-items: center;
  309. .img{
  310. // background-color: #f9d3d4;
  311. width: 180rpx;
  312. height: 180rpx;
  313. }
  314. }
  315. .right{
  316. position: relative;
  317. width: 500rpx;
  318. height: 260rpx;
  319. background: url(/static/5.png);
  320. background-size: 100% 100%;
  321. .price{
  322. color: var(--color);
  323. font-weight: 900;
  324. .qweq{
  325. padding: 20rpx;
  326. font-size: 28rpx;
  327. }
  328. .num{
  329. width: 400rpx;
  330. text-align: center;
  331. font-size: 40rpx;
  332. text{
  333. font-size: 55rpx;
  334. }
  335. }
  336. .mx{
  337. font-size: 16rpx;
  338. color: #fff;
  339. position: absolute;
  340. bottom: 75rpx;
  341. left: 25rpx;
  342. text-align: center;
  343. width: 350rpx;
  344. }
  345. }
  346. }
  347. }
  348. }
  349. }
  350. .register-username{
  351. display: flex;
  352. border: 1px solid #ED762F;
  353. height: 35px;
  354. align-items: center;
  355. margin-bottom: 20px;
  356. padding: 0 10px;
  357. border-radius: 5px;
  358. box-sizing: border-box;
  359. background-color: #fff;
  360. color: #000;
  361. image {
  362. width: 20px;
  363. height: 20px;
  364. }
  365. }
  366. </style>