mrr.sj.front/pages/promotion/selectServe.vue

102 lines
2.6 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="select-serve">
<custom-navbar title="选择服务" backgroundColor="#FFFFFF"></custom-navbar>
<view class="select-tip">
<text style="color: #FF4767;">温馨提示</text>您可自主勾选需推广的服务灵活设置比例形式的推广佣金
配置完成后服务将自动进入推广平台曝光触达更多潜在客户后续通过推广渠道如达人链接分享码成功成交的订单
系统会从该笔订单中自动扣除您预设的佣金全程无需手动操作
</view>
<serveList ref="serveList"></serveList>
<view class="select-serve-footer">
<view class="select-serve-footer__btn" @click="submit">确认选择</view>
</view>
</view>
</template>
<script>
import request from "@/utils/request";
import serveList from "./components/serveList.vue";
export default {
name: "SelectServe",
data() {
return {
info: [],
valueList: [],
};
},
components: {
serveList,
},
onLoad() {
},
methods: {
submit() {
// 1. 获取选中的数组
let selectedItems = this.$refs.serveList.getSelectedItems();
// 2. 校验是否有选中项(可选,根据业务需求)
if (selectedItems.length === 0) {
uni.showToast({
title: '请选择至少一项服务',
icon: 'none'
});
return;
}
// 3. 序列化数组数组不能直接作为URL参数需转为字符串
const params = encodeURIComponent(JSON.stringify(selectedItems));
// 4. 跳转页面使用uni.navigateTo路径替换为你的下一页路径
uni.navigateTo({
url: `/pages/promotion/setUpServe?selectedItems=${params}&type=3` // 路径根据实际情况修改
});
},
},
};
</script>
<style lang="scss" scoped>
.select-serve {
background-color: #f5f5f5;
min-height: 100vh;
padding-bottom: 160rpx;
.select-tip {
margin-top: 20rpx;
background: rgba(232, 16, 30, 0.1);
padding: 20rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #333333;
line-height: 33rpx;
text-align: left;
font-style: normal;
}
.select-serve-footer {
background-color: #fff;
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 40rpx 30rpx;
&__btn {
width: 690rpx;
height: 78rpx;
background: #FF4767;
border-radius: 798rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 30rpx;
color: #ffffff;
line-height: 39rpx;
text-align: center;
font-style: normal;
}
}
}
</style>