add.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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" :max="30" 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. </view>
  29. <text slot="right" style="margin-left: 30rpx;">%</text>
  30. </u-form-item>
  31. </u-form>
  32. </view>
  33. <view class="title" style="margin-top: 20rpx;">
  34. <text class="bold">消费返利</text>
  35. <text class="desc">消费1元赠送 {{pointsValue}} 元</text>
  36. </view>
  37. <view class="margin-top-20 text-sm text-red">
  38. <text>系统风险阈值为0.3元</text>
  39. </view>
  40. <view class="desc" style="margin-top: 30rpx;" >
  41. 提示:消费返利赠送积分比例建议不超过30%,如超过30%需要另外
  42. 进行申请,审批通过后即可。
  43. <text class="text-base" @click="$u.toast('暂未开放')">申请更高返利</text>
  44. <text class="cuIcon-right text-base"></text>
  45. </view>
  46. </view>
  47. <view class="tips">
  48. 从公域聚合投放到私域流量的沉淀,智能化数字化的数据管理,联兑通帮助企业在裂变获客、私域留存、营销转化、客户管理各个环节提供帮助和辅助,形成一个完整的私域闭环,能有效的提高企业的私域运营效率,减少了客户的流失以及提升产品的转化和复购。
  49. </view>
  50. <view class="center flex-direction" style="margin: 70rpx 0;">
  51. <view class="margin-bottom-30 text-sm">
  52. <text>提交代表已同意</text>
  53. <text style="color: #3099F1;">会员中心规则说明</text>
  54. </view>
  55. <view @click="submit" class="cu-btn bg-color round" style="width: 70%;height: 90rpx;font-size: 36rpx;">
  56. 提交
  57. </view>
  58. </view>
  59. <u-select confirm-color="#EF9944" v-model="show" :list="list"></u-select>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. type:'',
  67. isHigh:false,
  68. value:1,
  69. show:false,
  70. confirmShow:false,
  71. list: [{
  72. value: '0.01',
  73. label: '10%'
  74. },
  75. {
  76. value: '0.02',
  77. label: '20%'
  78. },
  79. {
  80. value: '0.03',
  81. label: '30%'
  82. }
  83. ],
  84. form:{
  85. consumeOnePoint:'1'
  86. }
  87. }
  88. },
  89. computed:{
  90. pointsValue(){
  91. let data=this.$digital.floatMul( this.form.consumeOnePoint,(this.value / 100))
  92. if (data>0.3) {
  93. this.isHigh=true
  94. }else{
  95. this.isHigh=false
  96. }
  97. return data
  98. }
  99. },
  100. onLoad(options) {
  101. this.type=options.type || ''
  102. if (this.$isNotEmpty(this.type)) {
  103. uni.setNavigationBarTitle({
  104. title:'更改规则'
  105. })
  106. }
  107. },
  108. methods: {
  109. submit(){
  110. if (this.$isEmpty(this.form.consumeOnePoint)) {
  111. this.$u.toast('请输入积分规则')
  112. return
  113. }
  114. let id=this.vuex_shopId
  115. let params={
  116. id,
  117. sendPointUnit: this.form.consumeOnePoint,
  118. pointRate: this.value / 100,
  119. isOpenMember: 1
  120. }
  121. this.$api.shop.submit(params).then(res=>{
  122. if (res.success) {
  123. this.$dialog.showModal('操作成功',false).then(res=>{
  124. uni.redirectTo({
  125. url:"/pages/member/member"
  126. })
  127. })
  128. }else{
  129. this.$u.toast(res.msg)
  130. }
  131. })
  132. }
  133. }
  134. }
  135. </script>
  136. <style>
  137. page {
  138. background-color: #f4f5f7;
  139. }
  140. </style>
  141. <style lang="scss">
  142. .slot-content{
  143. font-size: 28rpx;
  144. padding: 40rpx 0;
  145. display: flex;
  146. justify-content: center;
  147. align-items: center;
  148. flex-direction: column;
  149. line-height: 50rpx;
  150. }
  151. .bold {
  152. font-size: 34rpx;
  153. color: #1C1C1C;
  154. font-weight: 800;
  155. }
  156. .desc {
  157. color: #8f8f8f;
  158. font-size: 26rpx;
  159. font-weight: 400;
  160. line-height: 40rpx;
  161. }
  162. .bg-color {
  163. background-color: #EE9230;
  164. color: #FFFFFF;
  165. }
  166. .card {
  167. padding: 40rpx 30rpx;
  168. margin-top: 20rpx;
  169. background-color: #FFFFFF;
  170. .title {
  171. display: flex;
  172. justify-content: space-between;
  173. }
  174. }
  175. .tips {
  176. font-size: 24rpx;
  177. padding: 30rpx;
  178. line-height: 46rpx;
  179. color: #b3b3b3;
  180. }
  181. .badge-button {
  182. padding: 14rpx 16rpx;
  183. background-color: $base-color;
  184. color: #fff;
  185. border-radius: 10rpx;
  186. font-size: 22rpx;
  187. line-height: 1;
  188. }
  189. </style>