102 lines
2.6 KiB
Vue
102 lines
2.6 KiB
Vue
<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> |