| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <template>
- <view>
- <view class="margin-30">
- <text class="build_title">构建您的私域流量</text>
- </view>
- <view class="card">
- <text class="title">会员门槛</text>
- <text class="desc">完成一笔任意金额交易即成会员</text>
- </view>
- <view class="card margin-top-30">
- <text class="title">积分使用范围</text>
- <text class="desc">通用(可在任意场景使用)</text>
- </view>
-
- <view class="card margin-top-30">
- <view class="margin-bottom-20">
- <text class="title">积分价值</text>
- <text class="sub_title">(例:1 元= 10 积分)</text>
- </view>
- <view class="flex">
- <view class="center" style="width: 25%;">
- <text class="text-bold text-base" style="font-size: 40rpx;">1</text>
- <text style="margin: 0 20rpx;">元</text>
- <text style="margin: 0 20rpx;">=</text>
- </view>
- <view class="center" style="width: 45%;margin-left: 20rpx;">
- <u-input disabled type="digit" height="50" :border="true" :clearable="false" v-model="form.point" placeholder="请输入积分数"/>
- <view class="cu-tag bg-color radius">
- 积分
- </view>
- </view>
- </view>
- </view>
-
- <view class="card margin-top-30">
- <view class="margin-bottom-20">
- <text class="title">积分规则</text>
- </view>
- <view class="flex">
- <view class="center" style="width: 25%;">
- <text>消费1元赠送</text>
- </view>
- <view class="center" style="width: 45%;margin-left: 20rpx;">
- <u-input disabled type="digit" height="50" :border="true" :clearable="false" v-model="form.consumeOnePoint" placeholder="请输入积分数"/>
- <view class="cu-tag bg-color radius">
- 积分
- </view>
- </view>
- </view>
- </view>
-
- <view class="center flex-direction" style="position: fixed;bottom: 10%;width: 100%;">
- <view class="margin-bottom-30 text-sm">
- <text>提交代表已同意</text>
- <text style="color: #3099F1;">会员中心规则说明</text>
- </view>
- <view @click="submit" class="cu-btn bg-color round" style="width: 70%;height: 90rpx;font-size: 36rpx;">
- 提交
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- form:{
- point:'1',
- consumeOnePoint:'0.01'
- }
- }
- },
- methods: {
- submit(){
- if (this.$isEmpty(this.form.point)) {
- this.$u.toast('请输入积分数')
- return
- }
- if (this.$isEmpty(this.form.consumeOnePoint)) {
- this.$u.toast('请输入积分规则')
- return
- }
- let id=this.vuex_shopId
- let params={
- id,
- sendPointUnit: this.form.consumeOnePoint,
- pointRate: this.$digital.keepTwoDecimalFull(1/this.form.point),
- isOpenMember: 1
- }
- console.log(params);
- this.$api.shop.submit(params).then(res=>{
- if (res.success) {
- this.$dialog.showModal('创建成功',false).then(res=>{
- uni.redirectTo({
- url:"/pages/member/member"
- })
- })
- }else{
- this.$u.toast(res.msg)
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- page{
- background-color: #F4F5F7;
- }
-
- .bg-color{
- background-color: #EE9230;
- color: #FFFFFF;
- }
-
- .build_title{
- color: #EE9230;
- font-size: 32rpx;
- }
-
- .card{
- border-radius: 24rpx;
- background-color: #FFFFFF;
- padding:25rpx 40rpx;
- display: flex;
- flex-direction: column;
-
- .title{
- font-weight: 800;
- font-size: 32rpx;
- margin-bottom: 20rpx;
- }
-
- .sub_title{
- font-size: 24rpx;
- color: #999;
- margin-left: 10rpx;
- }
-
-
- .desc{
- font-size: 26rpx;
- color: #666666;
- }
- }
- </style>
|