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

313 lines
5.9 KiB

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