You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dandelionPlatformToB-uni-v3/root/merchantManagement/setting.vue

184 lines
6.3 KiB
Vue

3 months ago
<template>
<view class="p-root-merchantManagement-dynamicNotice g_bg_f_5 g_p_10 g_pb_120" style="min-height: 100vh;padding-top: 0;">
2 weeks ago
<!-- <view class="m-card">
3 months ago
<view class="g_h_24"></view>
<view class="" hover-class="none" hover-stop-propagation="false">
<view class="g_p_10 g_flex_row_between flex_center g_bg_f g_radius_8 g_fs_16" hover-class="none"
hover-stop-propagation="false" style="padding: 16px 10px;">
<view class="g_flex_column_center g_fw_500 g_c_0 g_fs_17" hover-class="none" hover-stop-propagation="false"> 同步平台职位 </view>
<view class="g_flex_column_center" hover-class="none" hover-stop-propagation="false">
<u-switch @change="handleSwitch($event, 'platform')"
cusSize='24'
cusTop='2'
:cusLeft='jobSwitch ? 3.5 : 2.2'
v-model="jobSwitch"
activeColor="#027aff"
inactiveColor="#e5e5e5"
></u-switch>
</view>
</view>
<view class="g_mt_4 g_c_8 g_fs_14 g_pl_10" style="line-height: 1.5;" hover-class="none" hover-stop-propagation="false"> 打开开关后, 系统会实时同步一次然后系统会每天在23:00自动同步平台上最近上新的职位 </view>
</view>
2 weeks ago
</view> -->
<view class="m-card">
<view class="g_h_10"></view>
<view class="" hover-class="none" hover-stop-propagation="false">
<view class="g_p_10 g_flex_row_between flex_center g_bg_f g_radius_8 g_fs_16" hover-class="none"
hover-stop-propagation="false" style="padding: 16px 10px;">
<view class="g_flex_column_center g_fw_500 g_c_0 g_fs_17" hover-class="none" hover-stop-propagation="false"> 默认城市 </view>
<view class="g_flex_column_center" hover-class="none" hover-stop-propagation="false">
<u-switch @change="handleSwitch($event, 'defaultCity')"
cusSize='24'
cusTop='2'
2 weeks ago
:cusLeft='fdb_Homecity ? 3.5 : 2.2'
v-model="fdb_Homecity"
2 weeks ago
activeColor="#027aff"
inactiveColor="#e5e5e5"
></u-switch>
</view>
</view>
</view>
</view>
<view class="m-card">
<view class="g_h_10"></view>
<view class="" hover-class="none" hover-stop-propagation="false">
<view class="g_p_10 g_flex_row_between flex_center g_bg_f g_radius_8 g_fs_16" hover-class="none"
hover-stop-propagation="false" style="padding: 16px 10px;">
<view class="g_flex_column_center g_fw_500 g_c_0 g_fs_17" hover-class="none" hover-stop-propagation="false"> 默认显示推荐 </view>
<view class="g_flex_column_center" hover-class="none" hover-stop-propagation="false">
<u-switch @change="handleSwitch($event, 'recommend')"
cusSize='24'
cusTop='2'
2 weeks ago
:cusLeft='fdb_HomeTab ? 3.5 : 2.2'
v-model="fdb_HomeTab"
2 weeks ago
activeColor="#027aff"
inactiveColor="#e5e5e5"
></u-switch>
</view>
</view>
</view>
3 months ago
</view>
<!-- <view class="m-card">
<view class="g_h_32"></view>
<view class="" hover-class="none" hover-stop-propagation="false">
<view class="g_p_10 g_flex_row_between flex_center g_bg_f g_radius_8 g_fs_16" hover-class="none"
hover-stop-propagation="false" style="padding: 16px 10px;">
<view class="g_flex_column_center g_fw_500 g_c_0 g_fs_17" hover-class="none" hover-stop-propagation="false"> 职位列表显示报名数 </view>
<view class="g_flex_column_center" hover-class="none" hover-stop-propagation="false">
<u-switch @change="handleSwitch($event, 'applyNumDisplay')"
cusSize='24'
cusTop='2'
:cusLeft='applySwitch ? 3.5 : 2.2'
v-model="applySwitch"
activeColor="#027aff"
inactiveColor="#e5e5e5"
></u-switch>
</view>
</view>
<view class="g_mt_4 g_c_8 g_fs_14 g_pl_10" style="line-height: 1.5;" hover-class="none" hover-stop-propagation="false"> 打开开关后, 职位列表会显示报名100+等字样目前这个数据可能不太准确仅供参考 </view>
</view>
</view> -->
</view>
</template>
<script>
export default {
onShareAppMessage() {
return this.G.shareFun();
},
onLoad(options) {
2 weeks ago
let that = this;
3 months ago
this.applySwitch = this.appInfo.applyNumDisplay == 1 ? true : false;
2 weeks ago
// this.getShareInfo();
},
onShow() {
let that = this;
that.G.Get(that.api.login_agencyInfo, {}, (aRes) => {
uni.setStorageSync("agencyInfo", aRes.agency);
let _data = aRes.agency;
that.fdb_Homecity = _data.fdbHomeCity == 1 ? true : false;
that.fdb_HomeTab = _data.fdbHomeTab == 1 ? true : false;
console.log("获取团队信息:", aRes, that.fdb_Homecity, that.fdb_HomeTab);
});
3 months ago
},
data() {
2 weeks ago
return {
applySwitch: false,
jobSwitch: false,
2 weeks ago
fdb_Homecity: false,
fdb_HomeTab: false,
2 weeks ago
appInfo: uni.getStorageSync("miniApp-info"),
};
},
3 months ago
methods: {
getShareInfo() {
this.G.Get(this.api.merchantManagement_getShareJobsBtn, {}, (res) => {
console.log(res);
this.jobSwitch = res;
});
},
handleSwitch(e, type) {
console.log(e, type);
new Promise((resolve, reject) => {
if (type == "platform") {
if (e) {
this.G.Get(this.api.merchantManagement_addAllShareJobs, {}, (res) => {
console.log(res);
resolve();
});
} else {
this.G.Get(this.api.merchantManagement_removeAllShareJobs, {}, (res) => {
console.log(res);
resolve();
});
}
2 weeks ago
} if (type == "defaultCity") {
2 weeks ago
this.G.Put(this.api.merchantManagement_updateField, { fieldName: "fdbHomeCity", fieldValue: e ? 1 : 0 }, (res) => {
console.log(res);
resolve();
});
2 weeks ago
}if (type == "recommend") {
2 weeks ago
this.G.Put(this.api.merchantManagement_updateField, { fieldName: "fdbHomeTab", fieldValue: e ? 1 : 0 }, (res) => {
console.log(res);
resolve();
});
3 months ago
} else {
this.G.Put(this.api.merchantManagement_updateField, { fieldName: "applyNumDisplay", fieldValue: e ? 1 : 0 }, (res) => {
console.log(res);
resolve();
});
}
}).then(() => {
this.G.getAgencyInfo();
});
},
},
};
</script>
<style lang="less">
.p-root-person-idform {
.m-submit {
.bocai_btn_type_infro {
background: #ccc !important;
color: #fff !important;
font-weight: 600 !important;
font-size: 18px !important;
}
}
.cardText {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
}
2 weeks ago
</style>