更新企微投放,人群包链接

This commit is contained in:
王博冉
2022-11-02 14:54:31 +08:00
parent d30f91bc1b
commit 54edfb3b64
9 changed files with 81 additions and 17 deletions

View File

@@ -10,4 +10,6 @@ VUE_APP_MESSAGE_CENTER ='http://gtech-gateway.dcin-test.digitalyili.com/apigtech
#VUE_APP_SOCKETURL = 'wss://planetg-java.test.automark.cc/survey_sync'
VUE_APP_SOCKETURL = 'wss://ylst-api-uat.dctest.digitalyili.com/survey_sync'
VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPToken'
VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPToken'
VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com'

View File

@@ -10,3 +10,6 @@ VUE_APP_MESSAGE_CENTER ='http://gtech-gateway.cxpin.digitalyili.com/apigtech/mes
VUE_APP_LOGIN = 'https://yip.digitalyili.com//login'
VUE_APP_SOCKETURL = 'wss://ylst-api.xapi.digitalyili.com/survey_sync'
VUE_APP_JSONPURL = 'https://iam.digitalyili.com/idp/restful/getIDPToken'
VUE_APP_YQRURL = 'https://ocp.digitalyili.com'

View File

@@ -13,3 +13,6 @@ VUE_APP_LOGIN = 'https://yip-uat.dctest.digitalyili.com/login'
VUE_APP_SOCKETURL = 'wss://ylst-api-uat.dctest.digitalyili.com/survey_sync'
VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPToken'
VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com'

View File

@@ -13,3 +13,5 @@ VUE_APP_LOGIN = 'https://yip-uat.dctest.digitalyili.com/login'
VUE_APP_SOCKETURL = 'wss://ylst-api-uat.dctest.digitalyili.com/survey_sync'
VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPToken'
VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com'

View File

@@ -6,4 +6,5 @@ module.exports = {
loginUrl: process.env.VUE_APP_LOGIN,
socketUrl: process.env.VUE_APP_SOCKETURL,
jsonpUrl: process.env.VUE_APP_JSONPURL,
jqrUrl: process.env.VUE_APP_YQRURL,
};

View File

@@ -283,14 +283,14 @@ export default {
console.log(dataSource.value);
const data = await edit({
deliveryPlanList: JSON.stringify(
deliveryPlanList: JSON.parse(JSON.stringify(
dataSource.value.map((s) => {
return {
sampleQuota: s.sampleQuota || 0,
outerPlanId: s.id,
};
})
),
)),
sn: route.query.sn,
deliveryPlanId: id.value,
});

View File

@@ -385,6 +385,7 @@ export default {
display: flex;
}
.copy-btn {
margin-left: 20px;
display: flex;
align-items: center;
justify-content: center;

View File

@@ -8,26 +8,32 @@
:wrapper-col="wrapperCol"
>
<a-form-item label="消息接收者" name="">
<a-input
placeholder="请输入本次投放名称"
v-model:value="formState.deliveryName"
:show-count="true"
:maxlength="50"
class="input"
<a-select
v-model:value="value"
mode="multiple"
label-in-value
placeholder="Select users"
style="width: 328px"
:filter-option="false"
:not-found-content="fetching ? undefined : null"
:options="data"
@search="fetchUser"
>
<template #suffix
><span class="show-count"> {{ formState.deliveryName.length }}/50</span>
<template v-if="fetching" #notFoundContent>
<a-spin size="small" />
</template>
</a-input>
<a-button type="text" class="custom-button" @click="addLogicHandle">
</a-select>
<a-button type="text" class="custom-button" @click="onOperate(1)">
<div class="flex-align">
<i class="iconfont">&#xe689;</i>
<span style="margin-left: 6px">新增人群包</span>
</div>
</a-button>
<a-button type="text" class="custom-button" @click="addLogicHandle">
<span style="border-right: 1px solid #D8D8D8;"></span>
<a-button type="text" class="custom-button" @click="onOperate(2)">
<div class="flex-align">
<i class="iconfont">&#xe689;</i>
<!-- <i class="iconfont">&#xe689;</i> -->
<i class="iconfont">&#xe6df;</i>
<span style="margin-left: 6px">查看人群包</span>
</div>
</a-button>
@@ -59,8 +65,9 @@
</template>
<script setup>
import { ref } from 'vue'
import { ref, watch, reactive } from 'vue'
import { debounce } from 'lodash-es';
import { jqrUrl } from "../../../../config";
defineProps({
})
@@ -81,6 +88,50 @@ defineProps({
},
})
const wrapperCol = ref({ span: 18 })
let lastFetchId = 0;
const state = reactive({
data: [],
value: [],
fetching: false,
});
const fetchUser = debounce(value => {
console.log('fetching user', value);
lastFetchId += 1;
const fetchId = lastFetchId;
state.data = [];
state.fetching = true;
fetch('https://randomuser.me/api/?results=5')
.then(response => response.json())
.then(body => {
if (fetchId !== lastFetchId) {
// for fetch callback order
return;
}
const data = body.results.map(user => ({
label: `${user.name.first} ${user.name.last}`,
value: user.login.username,
}));
state.data = data;
state.fetching = false;
});
}, 300);
watch(state.value, () => {
state.data = [];
state.fetching = false;
});
let builtUrl = jqrUrl + 'profile_platform/1/segment/list'
let viewUrl = jqrUrl + '/profile_platform/1/segment/rule?segId=256'
const onOperate = (type) => {
if (type===1) {
window.open(builtUrl)
}else{
window.open(viewUrl)
}
}
</script>

View File

@@ -36,6 +36,7 @@ import SubTitle from "@/views/DataAnalyse/components/SubTitle.vue";
import { onMounted } from "@vue/runtime-core";
import { useRoute } from "vue-router";
import { useStore } from "vuex";
import { message } from "ant-design-vue";
export default {
name: "share-links",
components: {