知识付费微信小程序
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.

217 lines
4.7 KiB

9 months ago
  1. <template>
  2. <view class="content">
  3. <!-- <img src="/static/logo.png" style="position: absolute;right: 10px;top: 10px;" height="25rpx" /> -->
  4. <img :src="item" width="100%" v-for="(item, index) in list" />
  5. <view class="bottom">
  6. <view class="shang" style="padding-bottom: 200rpx;">
  7. <!-- <view style="margin-bottom: 20rpx;margin-top: 10rpx;text-align: center;">
  8. <text style="color: #eee;font-size: 30rpx;
  9. margin-right: 10rpx;">单价{{ price }}</text>
  10. </view> -->
  11. <!-- <view class="info" style="color: #fff;margin: 20rpx 0;
  12. display: flex;align-items: center;">
  13. <view style="padding: 0 10rpx;">
  14. 购买数量
  15. </view>
  16. <u-number-box v-model="registerForm.num" @change="valChange"></u-number-box>
  17. </view> -->
  18. <!-- <div class="register-username">
  19. <u--input placeholder="请输入学生姓名" type="number" border="surround"
  20. v-model="registerForm.name"></u--input>
  21. </div> -->
  22. <!-- <view style="margin-bottom: 20rpx;margin-top: 10rpx;text-align: center;">
  23. <text style="color: #fff;font-size: 40rpx;
  24. margin-right: 10rpx;">总金额 {{ price * registerForm.num }}</text>
  25. </view> -->
  26. <!-- <u-button type="primary" @click="Register()" style="border-radius: 20rpx;color: #000;width: 200rpx;"
  27. color="#fff">立即支付</u-button> -->
  28. <view style="
  29. color: #fff;margin-top: 60rpx;
  30. border: 1px solid #fff;
  31. padding: 10rpx 20rpx;">
  32. 联系客服
  33. </view>
  34. </view>
  35. </view>
  36. <div class="abtn">
  37. <!-- <u-number-box
  38. v-model="registerForm.num"
  39. @change="valChange"></u-number-box> -->
  40. <view style="padding: 10px;">
  41. <text style="color: #000;font-size: 25rpx;">
  42. 单价{{ price }}</text>
  43. </view>
  44. <u-number-box
  45. style="margin: 0 auto;"
  46. v-model="registerForm.num"
  47. :min="1">
  48. <view slot="minus" class="minus">
  49. <u-icon name="minus" size="12"></u-icon>
  50. </view>
  51. <view slot="plus" class="plus">
  52. <u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
  53. </view>
  54. </u-number-box>
  55. <view class="zhif">
  56. 立即支付
  57. <text style="padding-left: 10rpx;">{{ price * registerForm.num }}</text>
  58. </view>
  59. </div>
  60. </view>
  61. </template>
  62. <script>
  63. import api from '@/plugins/api.js'
  64. export default {
  65. data() {
  66. return {
  67. code: '',
  68. price: 10,
  69. registerForm: {
  70. num: 1
  71. },
  72. type: 1, //0是money,1是price
  73. phone: '400-026-7262',
  74. list: [
  75. // '/static/0240718173256.jpg',
  76. // '/static/24.png',
  77. // '/static/123.png',
  78. "https://img.alicdn.com/imgextra/i2/2263306098/O1CN01bDUHBB1uuwAxlahWT_!!2263306098.jpg",
  79. "https://img.alicdn.com/imgextra/i3/2263306098/O1CN01SNLRO41uuwAuR6xLb_!!2263306098.jpg",
  80. ]
  81. }
  82. },
  83. onLoad() {
  84. // if(this.GetQueryString('code')){ //路径上面有code说明微信已授权
  85. // this.code = this.GetQueryString('code');
  86. // //直接去登录发起请求
  87. // this.toWxLogin(this.code)
  88. // }else{
  89. // this.getwx_authorize()
  90. // }
  91. },
  92. methods: {
  93. }
  94. }
  95. </script>
  96. <style scoped lang="scss">
  97. .content {
  98. display: flex;
  99. flex-direction: column;
  100. align-items: center;
  101. }
  102. .bottom {
  103. display: flex;
  104. flex-direction: column;
  105. align-items: center;
  106. position: relative;
  107. width: 100%;
  108. // --color : #890404;
  109. --color: #dc2808;
  110. .shang {
  111. width: 100%;
  112. box-sizing: border-box;
  113. // background: linear-gradient(to right, rgb(239, 118, 66), rgb(220, 38, 7));
  114. background: #000;
  115. overflow: hidden;
  116. padding: 30rpx 0;
  117. display: flex;
  118. flex-direction: column;
  119. justify-content: center;
  120. align-items: center;
  121. }
  122. }
  123. .register-username {
  124. display: flex;
  125. border: 1px solid #ED762F;
  126. height: 35px;
  127. align-items: center;
  128. margin-bottom: 20px;
  129. padding: 0 10px;
  130. border-radius: 5px;
  131. box-sizing: border-box;
  132. background-color: #fff;
  133. color: #000;
  134. image {
  135. width: 20px;
  136. height: 20px;
  137. }
  138. }
  139. .abtn {
  140. position: fixed;
  141. bottom: 0;
  142. left: 0;
  143. width: 100%;
  144. height: 60px;
  145. background-color: #fff;
  146. display: flex;
  147. align-items: center;
  148. .zhif {
  149. width: 45%;
  150. height: 100%;
  151. margin-left: auto;
  152. background-color: #f60;
  153. color: #fff;
  154. text-align: center;
  155. line-height: 60px;
  156. }
  157. }
  158. .minus {
  159. width: 22px;
  160. height: 22px;
  161. border-width: 1px;
  162. border-color: #E6E6E6;
  163. border-style: solid;
  164. border-top-left-radius: 100px;
  165. border-top-right-radius: 100px;
  166. border-bottom-left-radius: 100px;
  167. border-bottom-right-radius: 100px;
  168. @include flex;
  169. justify-content: center;
  170. align-items: center;
  171. }
  172. .input {
  173. padding: 0 10px;
  174. }
  175. .plus {
  176. width: 22px;
  177. height: 22px;
  178. background-color: #FF0000;
  179. border-radius: 50%;
  180. /* #ifndef APP-NVUE */
  181. display: flex;
  182. /* #endif */
  183. justify-content: center;
  184. align-items: center;
  185. }
  186. </style>