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

116 lines
1.9 KiB

4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
  1. <template>
  2. <view class="page">
  3. <navbar
  4. title="兑换码"
  5. leftClick
  6. @leftClick="$utils.navigateBack"
  7. />
  8. <view class="input">
  9. <input type="text" v-model="form.code"
  10. placeholder="请输入兑换码"/>
  11. <view class="btn" @click="useExchange()">
  12. 兑换
  13. </view>
  14. </view>
  15. <view class="list">
  16. <view class="item"
  17. v-for="(item, index) in list"
  18. :key="index">
  19. <view class="title">
  20. {{item.question}}
  21. </view>
  22. <view class="info">
  23. {{item.answer}}
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import mixinList from '@/mixins/list.js'
  31. export default {
  32. mixins : [mixinList],
  33. data() {
  34. return {
  35. mixinsListApi : 'queryExchangeList',
  36. form : {
  37. code:'',
  38. },
  39. // listInfo:[]
  40. }
  41. },
  42. onShow() {
  43. // this.queryExchangeList();
  44. },
  45. methods: {
  46. // queryExchangeList(){
  47. // this.$api('queryExchangeList',{}, res =>{
  48. // if(res.code == 200){
  49. // this.listInfo = res.result.records;
  50. // }
  51. // })
  52. // },
  53. useExchange(){
  54. if(this.$utils.verificationAll(this.form,{
  55. code:'请输入兑换码'
  56. })) {
  57. return
  58. }
  59. this.$api('useExchange',this.form, res =>{
  60. if(res.code == 200){
  61. uni.showToast({
  62. title:'兑换成功',
  63. icon: 'none'
  64. })
  65. }
  66. })
  67. },
  68. },
  69. }
  70. </script>
  71. <style scoped lang="scss">
  72. .page{
  73. .input{
  74. display: flex;
  75. width: 690rpx;
  76. margin: 30rpx;
  77. margin-top: 80rpx;
  78. input{
  79. height: 50rpx;
  80. padding: 10rpx 20rpx;
  81. flex: 1;
  82. border: 1px solid $uni-color;
  83. border-radius: 15rpx;
  84. margin-right: 20rpx;
  85. background-color: #fff;
  86. }
  87. .btn{
  88. width: 100rpx;
  89. height: 70rpx;
  90. text-align: center;
  91. line-height: 70rpx;
  92. background-color: $uni-color;
  93. color: #fff;
  94. border-radius: 15rpx;
  95. }
  96. }
  97. .list{
  98. margin: 30rpx;
  99. .item{
  100. margin: 30rpx 0;
  101. .title{
  102. margin-bottom: 10rpx;
  103. }
  104. .info{
  105. color: #f40;
  106. }
  107. }
  108. }
  109. }
  110. </style>