特易招,招聘小程序
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.

299 lines
5.6 KiB

4 months ago
2 months ago
2 months ago
2 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 months ago
4 months ago
4 months ago
2 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <!-- 会员充值 -->
  3. <view class="page">
  4. <navbar title="会员充值" bgColor="#3796F8" leftClick color="#fff" @leftClick="$utils.navigateBack" />
  5. <view class="head">
  6. <view class="headImage">
  7. <image :src="userInfo.headImage" mode="aspectFill"></image>
  8. </view>
  9. <view class="info">
  10. <view class="name">
  11. {{userInfo.nickName}}
  12. <view>
  13. <uv-icon name="edit-pen" size="40rpx" color="#fff"></uv-icon>
  14. 修改资料
  15. </view>
  16. </view>
  17. <view class="tips">
  18. 手机号{{userInfo.phone}}
  19. </view>
  20. </view>
  21. </view>
  22. <view class="openvip">开通VIP</view>
  23. <view class="options">
  24. <view
  25. @click="vipId = item.id"
  26. :class="{option : true, act : vipId == item.id}"
  27. v-for="(item,index) in list" :key="index">
  28. <view style="font-weight: 600;">{{ item.name }}</view>
  29. <view style="color: #FF2E2E;">
  30. <text style="font-size: 20rpx;"></text>
  31. <text style="font-size: 36rpx;">{{ item.price }}</text>
  32. </view>
  33. <view>{{ item.remark }}</view>
  34. </view>
  35. </view>
  36. <view class="block" v-if="vip.id">
  37. <view class="privilege">{{ vip.name }}</view>
  38. <view class="cells">
  39. <view class="cell"
  40. v-for="(item, index) in vip.keys">
  41. <image src="../static/mine/characteristic.png" mode="aspectFill" />
  42. <view class="text">
  43. <view>{{ item[0] }}</view>
  44. <view style="font-size: 24rpx;">{{ item[1] }}</view>
  45. </view>
  46. </view>
  47. <!-- <view class="cell">
  48. <image src="../static/mine/integral.png" mode="aspectFill" />
  49. <view class="text">
  50. <view>特权二</view>
  51. <view style="font-size: 24rpx;">快速发布优先审核</view>
  52. </view>
  53. </view> -->
  54. </view>
  55. <view class="tail">
  56. <view>
  57. <uv-radio-group v-model="radiovalue">
  58. <uv-radio size="30rpx">
  59. </uv-radio>
  60. </uv-radio-group>
  61. </view>
  62. <view>开通前请阅读会员服务协议</view>
  63. </view>
  64. </view>
  65. <view class="confirm">
  66. <view class="box">
  67. <view>
  68. 总计金额{{ vip.price }}
  69. </view>
  70. <view @click="submit(vip.id)">
  71. 确认协议并支付
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. import mixinList from '@/mixins/list.js'
  79. import { mapState } from 'vuex'
  80. export default {
  81. mixins : [mixinList],
  82. data() {
  83. return {
  84. radiovalue: false,
  85. mixinsListApi : 'commonQueryVipType',
  86. vipId : ''
  87. }
  88. },
  89. onShow() {
  90. this.$store.commit('getUserInfo')
  91. },
  92. computed: {
  93. headImage() {
  94. return '/static/image/center/headImage.png'
  95. },
  96. vip(){
  97. let vip = {}
  98. this.list.forEach(n => {
  99. if(n.id == this.vipId){
  100. let keys = n.perquisite.split('##')
  101. keys.forEach((s, i) => {
  102. keys[i] = s.split('$$')
  103. })
  104. n.keys = keys
  105. vip = n
  106. }
  107. })
  108. return vip
  109. },
  110. },
  111. methods: {
  112. submit(id){
  113. console.log("当前标识:"+id)
  114. this.$api('addVIP',{id:id}, res =>{
  115. console.log(res)
  116. })
  117. },
  118. getDataThen(list){
  119. this.vipId = list[0] && list[0].id
  120. },
  121. },
  122. }
  123. </script>
  124. <style scoped lang="scss">
  125. .page {
  126. background-color: #fff;
  127. height: 100vh;
  128. .head {
  129. display: flex;
  130. background-color: $uni-color;
  131. padding: 40rpx 20rpx;
  132. align-items: center;
  133. position: relative;
  134. color: #fff;
  135. padding-bottom: 70rpx;
  136. .headImage {
  137. width: 120rpx;
  138. height: 120rpx;
  139. background-size: 100% 100%;
  140. overflow: hidden;
  141. border-radius: 50%;
  142. margin-right: 40rpx;
  143. image {
  144. height: 100%;
  145. width: 100%;
  146. }
  147. }
  148. .info {
  149. font-size: 28rpx;
  150. .name {
  151. font-size: 32rpx;
  152. display: flex;
  153. padding-bottom: 10rpx;
  154. view {
  155. display: flex;
  156. font-size: 20rpx;
  157. align-items: center;
  158. padding-left: 20rpx;
  159. }
  160. }
  161. .tips {
  162. font-size: 26rpx;
  163. color: #fff;
  164. }
  165. }
  166. }
  167. .openvip {
  168. width: 100%;
  169. text-align: center;
  170. padding: 40rpx 0;
  171. font-size: 36rpx;
  172. font-weight: 500;
  173. }
  174. .options {
  175. display: flex;
  176. flex-wrap: wrap;
  177. .option {
  178. display: flex;
  179. justify-content: center;
  180. align-items: center;
  181. flex-direction: column;
  182. border: 2rpx solid #3796F8;
  183. width: 220rpx;
  184. height: 240rpx;
  185. border-radius: 16rpx;
  186. box-sizing: border-box;
  187. margin: 12rpx;
  188. view {
  189. margin-top: 15rpx;
  190. font-size: 28rpx;
  191. }
  192. }
  193. .act{
  194. border: 4rpx solid $uni-color;
  195. box-shadow: 0 0 10rpx 10rpx rgba($uni-color, 0.2);
  196. }
  197. }
  198. .block {
  199. width: 90%;
  200. margin-left: 5%;
  201. .privilege {
  202. font-size: 34rpx;
  203. padding: 60rpx 0rpx 40rpx;
  204. }
  205. .cells {
  206. display: flex;
  207. flex-direction: column;
  208. .cell {
  209. display: flex;
  210. align-items: center;
  211. margin: 20rpx 0;
  212. .text {
  213. margin-left: 20rpx;
  214. color: #707070;
  215. font-size: 28rpx;
  216. }
  217. image {
  218. height: 70rpx;
  219. width: 70rpx;
  220. }
  221. }
  222. }
  223. .tail {
  224. display: flex;
  225. align-items: center;
  226. margin-top: 30rpx;
  227. view:nth-child(2) {
  228. margin-left: 10rpx;
  229. color: #707070;
  230. font-size: 24rpx;
  231. }
  232. }
  233. }
  234. .confirm {
  235. display: flex;
  236. position: fixed;
  237. bottom: 0px;
  238. width: 100%;
  239. justify-content: center;
  240. align-items: center;
  241. padding: 8rpx 0;
  242. box-shadow: 0 -2rpx 6rpx 0 #d9d9d9 ;
  243. .box {
  244. display: flex;
  245. align-items: center;
  246. justify-content: space-between;
  247. width: 92%;
  248. font-size: 28rpx;
  249. view:nth-child(1) {
  250. color: #999999;
  251. }
  252. view:nth-child(2) {
  253. padding: 25rpx 60rpx;
  254. color: #FFFFFF;
  255. background-color: #3796F8;
  256. border-radius: 12rpx;
  257. }
  258. view:nth-child(1) {
  259. color: #999999;
  260. }
  261. }
  262. }
  263. }
  264. </style>