add.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view>
  3. <view class="text-base padding-30 text-lg">
  4. 构建您的私域流量 牢牢锁住您的客户
  5. </view>
  6. <view class="bg-white padding-30 flex justify-between">
  7. <text class="bold">会员门槛</text>
  8. <text class="desc center">完成一笔任意金额交易即成会员</text>
  9. </view>
  10. <view class="card">
  11. <view class="title">
  12. <text class="bold">积分设置</text>
  13. <text class="desc center">积分为本平台通用,可在任意场景使用</text>
  14. </view>
  15. <view class="padding-30 u-border-bottom">
  16. <u-form :model="form" ref="uForm" label-width="180" label-align="right">
  17. <u-form-item label="积分兑率" :border-bottom="false">
  18. <view class="margin-left-20">
  19. <u-slider :min="1" height="10" v-model="value" active-color="#EF9944" :use-slot="true" >
  20. <view class="">
  21. <view class="" >
  22. <view class="badge-button">
  23. {{value}}
  24. </view>
  25. </view>
  26. </view>
  27. </u-slider>
  28. <!-- <u-slider v-model="value" ></u-slider> -->
  29. <!-- <u-input height="60" @click="show=!show" disabled :border="true" :clearable="false"
  30. v-model="form.consumeOnePoint" placeholder="请选择返利比例" /> -->
  31. </view>
  32. </u-form-item>
  33. <u-form-item label="消费1元赠送" :border-bottom="false">
  34. <view class="center" style="justify-content: flex-start;margin-left: 20rpx;">
  35. <u-input type="digit" style="width: 90%;" height="60" :border="true" :clearable="false"
  36. v-model="form.consumeOnePoint" placeholder="请输入积分数" />
  37. <view class="cu-tag bg-color radius" style="height: 60rpx;">
  38. 积分
  39. </view>
  40. </view>
  41. </u-form-item>
  42. </u-form>
  43. </view>
  44. <view class="title" style="margin-top: 20rpx;">
  45. <text class="bold">积分价值</text>
  46. <text class="desc">1积分={{value / 100}}元</text>
  47. </view>
  48. <view class="desc" style="margin-top: 60rpx;" v-if="false">
  49. 提示:消费返利赠送积分比例建议不超过30%,如超过30%需要另外
  50. 进行申请,审批通过后即可。
  51. <text class="text-base">申请更高返利</text>
  52. <text class="cuIcon-right text-base"></text>
  53. </view>
  54. </view>
  55. <view class="tips">
  56. 从公域聚合投放到私域流量的沉淀,智能化数字化的数据管理,联兑通帮助企业在裂变获客、私域留存、营销转化、客户管理各个环节提供帮助和辅助,形成一个完整的私域闭环,能有效的提高企业的私域运营效率,减少了客户的流失以及提升产品的转化和复购。
  57. </view>
  58. <view class="center flex-direction" style="margin: 70rpx 0;">
  59. <view class="margin-bottom-30 text-sm">
  60. <text>提交代表已同意</text>
  61. <text style="color: #3099F1;">会员中心规则说明</text>
  62. </view>
  63. <view @click="submit" class="cu-btn bg-color round" style="width: 70%;height: 90rpx;font-size: 36rpx;">
  64. 提交
  65. </view>
  66. </view>
  67. <u-select confirm-color="#EF9944" v-model="show" :list="list"></u-select>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {
  74. value:1,
  75. show:false,
  76. list: [{
  77. value: '0.01',
  78. label: '10%'
  79. },
  80. {
  81. value: '0.02',
  82. label: '20%'
  83. },
  84. {
  85. value: '0.03',
  86. label: '30%'
  87. }
  88. ],
  89. form:{
  90. consumeOnePoint:'0.01'
  91. }
  92. }
  93. },
  94. methods: {
  95. submit(){
  96. if (this.$isEmpty(this.form.consumeOnePoint)) {
  97. this.$u.toast('请输入积分规则')
  98. return
  99. }
  100. let id=this.vuex_shopId
  101. let params={
  102. id,
  103. sendPointUnit: this.form.consumeOnePoint,
  104. pointRate: this.value / 100,
  105. isOpenMember: 1
  106. }
  107. this.$api.shop.submit(params).then(res=>{
  108. if (res.success) {
  109. this.$dialog.showModal('创建成功',false).then(res=>{
  110. uni.redirectTo({
  111. url:"/pages/member/member"
  112. })
  113. })
  114. }else{
  115. this.$u.toast(res.msg)
  116. }
  117. })
  118. }
  119. }
  120. }
  121. </script>
  122. <style>
  123. page {
  124. background-color: #f4f5f7;
  125. }
  126. </style>
  127. <style lang="scss">
  128. .bold {
  129. font-size: 34rpx;
  130. color: #1C1C1C;
  131. font-weight: 800;
  132. }
  133. .desc {
  134. color: #8f8f8f;
  135. font-size: 26rpx;
  136. font-weight: 400;
  137. line-height: 40rpx;
  138. }
  139. .bg-color {
  140. background-color: #EE9230;
  141. color: #FFFFFF;
  142. }
  143. .card {
  144. padding: 40rpx 30rpx;
  145. margin-top: 20rpx;
  146. background-color: #FFFFFF;
  147. .title {
  148. display: flex;
  149. justify-content: space-between;
  150. }
  151. }
  152. .tips {
  153. font-size: 24rpx;
  154. padding: 30rpx;
  155. line-height: 46rpx;
  156. color: #b3b3b3;
  157. }
  158. .badge-button {
  159. padding: 14rpx 16rpx;
  160. background-color: $base-color;
  161. color: #fff;
  162. border-radius: 10rpx;
  163. font-size: 22rpx;
  164. line-height: 1;
  165. }
  166. </style>