会员可选择从九亿平台入驻申请成为商家
1. 押金,在成为商家前需要先缴纳押金才可以申请成为商家,如果不想成为商家,可以选择退回押金取消商家分身,如果作为商家并且有进行中的订单,则需要等待订单完成才可以进行退回押金。
2. 申请,填写商家身份信息,商家头像,名称,联系方式,发货地点,商品分类,负责人身份信息作为材料申请,需经过九亿平台审核,才可以选择成为商家。
3. 审核,为保护平台公平性竞争,创造美好合作共赢的平台,九亿有权对您提交的店铺信息,发布的商品信息做审核,驳回,下架等行为,并且会及时通知到会员。
会员通过审核成为商家后,仍可以对自己的店铺信息做修改,并且平台会重新审核您的店铺信息,不得允许虚假等不良行为出现。
4. 商品,成为商家后,会员可以选在在平台发布自己的商品,可以发布视频对自己的商品做链接并进行投流推广,别人浏览到您的视频,可以选择点赞,评论等行为,增加您的视频热度,也可以通过收藏您的视频,对您的视频进行投流推广,让您的商品和视频可以受到更多人的关注,请会员尽情发挥想法,让自己的视频内容更受欢迎
5. 钱包,商家的商品产生订单后,其他会员付款会产生待入账的资金和榴莲果到您的钱包,当订单取消或平台申诉退款等行为,您的待入账的资产会原路退回到该订单用户中,当您的订单结束,已完成且无售后问题,您订单对应的待入账的信息将会进入到进的钱包中
6. 客服,您可以选择联系九亿平台咨询您想了解的任何问题,也可以通过消息联系用户通过店铺发起的订单咨询,以便于您更好的了解平台以及和其他会员的联系。
7. 运营,为保证平台公平、公正、公开,平台会不定期的复查,审核您的商户信息,请会员完善正确的信息,不得出现虚假,欺骗,等不良行为对平台或其他会员造成损失,否则平台有权对您的行为做出对应的行为。
平台会不定期更新商户的规则,请会员及时阅读。
平台祝每一位会员生活美满~
` - ) + // 当前模式 code 0待缴纳1待申请2待审核3已通过4已拒绝 form表单 + const mode = reactive({ + code: 0, + }) + // 文本内容 + const content = ref({}) + // 字典列表 + const dictList = reactive([]) + // 选择下标分类 + const dictIndex = ref('') + // 用户信息 + const userinfo = computed(() => { + return store.state.userinfo + }) + + onLoad(() => { + // 获取商家入驻状态 + getShopStatus() + }) + + onReady(() => { + // proxy.$refs.regionSelectionRef.open() + }) + + // 获取表单信息 + function getForm() { + Promise.all([getDetail(), getDict()]).then(rs => { + // 获取详情 + const detail = rs[0] + // 获取字典分类 + const dict = rs[1] + if (!detail) return + form.id = detail.id + form.rectangleLogo = detail.rectangleLogo + form.qualificationPicture = detail.qualificationPicture.split(',') + form.idCardFront = detail.idCardFront + form.idCardBack = detail.idCardBack + form.name = detail.name + form.phone = detail.phone + form.addressDetail = detail.addressDetail + form.categoryId = detail.categoryId + form.province = detail.province + form.city = detail.city + form.district = detail.district + // 赋值 + dictIndex.value = dict.findIndex(item => item.id == detail.categoryId) + }) + } + + // 获取申请信息 + function getDetail() { + return new Promise((resolve, reject) => { + api.shop.getStoreDetail().then(rs => { + if (rs.code == 200) { + resolve(rs.data) + return + } + util.alert({ + showCancel: false, + content: rs.msg, + }) + }) + }) + } + + // 切换模式code + function handleModeCode(code) { + // 模式 + mode.code = code + switch (code) { + case 0: + // 获取文章 + getarticle() + break; + case 1: + // 获取文章 + getarticle() + break; + case 'form': + // 获取表单信息 + getForm() + break; + } + } + + // 获取字典分类 + function getDict() { + return new Promise((resolve, reject) => { + api.shop.categoryAll({}).then(rs => { + if (rs.code == 200) { + resolve(rs.data) + dictList.length = 0 + dictList.push(...rs.data) + resolve() + return + } + util.alert({ + showCancel: false, + content: rs.msg, + }) + }) + }) + } + + // 获取商家入驻状态 + function getShopStatus() { + api.shop.getShopStatus().then(rs => { + if (rs.code == 200) { + Object.assign(mode, rs.data) + handleModeCode(mode.code) + return + } + util.alert({ + showCancel: false, + content: rs.msg, + }) + }) + } + + // 商家缴纳押金 + function depositsPay() { + api.shop.depositsPay().then(rs => { + if (rs.code == 200) { + // 修改状态 变为已缴纳 + mode.code = 1 + return + } + util.alert({ + showCancel: false, + content: rs.msg, + }) + }) + } + + // 商家取消押金 + function depositsCancel() { + api.shop.depositsCancel().then(rs => { + if (rs.code == 200) { + // 修改状态 变为待缴纳 + mode.code = 0 + return + } + util.alert({ + showCancel: false, + content: rs.msg, + }) + }) + } + + // 获取文章 + function getarticle() { + + api.getArticle({ + query: { + agreementId: 4, + }, + }).then(rs => { + if (rs.code == 200) { + content.value = rs.data + return + } + util.alert({ + showCancel: false, + content: rs.msg, + }) + }) + } /** * 上传图片 @@ -42,11 +215,18 @@ function uploadImg(key, type) { util.upload_image({ value: form[key], - type: type || 1, success: rs => { - // 根据条件追加 - if (type != 2) form[key] = rs.value - } + switch (type) { + case 1: + form[key] = rs.value + break + case 2: + console.log('form[key]', form[key]) + form[key].push(rs.value) + console.log('form[key]', form[key]) + break + } + }, }) } @@ -63,71 +243,81 @@ }) } - // 提交 + /** + * 选择省市区 + * @param {Object} ev + */ + function handleRegion(ev) { + console.log('handleRegion', ev) + form.province = ev.province.id + form.city = ev.city.id + form.district = ev.area.id + } + + /** + * 切换产品分类 + * @param {Object} ev 默认事件 + */ + function handleDict(ev) { + if (!ev || typeof ev.detail.value === 'undefined') { + console.error('Invalid event object or missing value'); + return + } + const index = ev.detail.value; + if (index === dictIndex.value) return; + if (index >= 0 && index < dictList.length) { + dictIndex.value = index; + form.categoryId = dictList[index].id; + } else { + console.error('Invalid index:', index); + } + } + + // 商家入驻 function handleSubmit() { const data = { ...form } + console.log('data', data) // 验证必填项 - if (!data.shopHeader) { + if (!data.rectangleLogo) { util.alert('商家头像不能为空') return } - if (!data.shopName) { + if (!data.name) { util.alert('商家名称不能为空') return } - if (!data.contact) { + if (!data.phone) { util.alert('联系方式不能为空') return } - if (!data.productLocation) { + if (!data.province) { util.alert('产品所在地不能为空') return } - if (!data.productCategory) { + if (!data.categoryId) { util.alert('产品类别不能为空') return } - if (!data.customer) { - util.alert('客服电话不能为空') - return - } - if (!data.businessLicense[0]) { + if (!data.qualificationPicture[0]) { util.alert('营业执照不能为空') return } - if (!data.idcard) { + if (!data.idCardFront) { util.alert('身份证正面不能为空') return } - if (!data.idcard2) { + if (!data.idCardBack) { util.alert('身份证反面不能为空') return } + // 营业执照 + data.qualificationPicture = data.qualificationPicture.join(',') - // 格式化 - data.shopHeader = util.replace_url(data.shopHeader) - data.businessLicense = data.businessLicense.map(node => { - return util.replace_url(node) - }).join(',') - data.idcard = util.replace_url(data.idcard) - data.idcard2 = util.replace_url(data.idcard2) - - durianapi.shopApply({ - data: { - shopHeader: data.shopHeader, - shopName: data.shopName, - contact: data.contact, - productLocation: data.productLocation, - productCategory: data.productCategory, - customer: data.customer, - idcard: data.idcard, - idcard2: data.idcard2, - businessLicense: data.businessLicense, - status: 3 - } + api.shop.application({ + data: data, }).then(rs => { if (rs.code === 200) { util.alert({ @@ -144,40 +334,60 @@ } }) } + + // 退出缴纳押金 + function outDepositsPay() { + util.alert({ + content: '确认缴纳押金并放弃商家身份?', + }).then(rs => { + if (rs.confirm) return + api.shop.outDepositsPay().then(rs => { + if (rs.code == 200) { + // 修改状态 变为待缴纳 + handleModeCode(0) + return + } + util.alert({ + showCancel: false, + content: rs.msg, + }) + }) + }) + } - +