From e6e328dfd506a1db025c667f87f6f5cfad1b1adf Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Thu, 22 Feb 2024 10:27:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/activity.js | 24 ++- pages/helpPeople/formTable.vue | 10 +- pages/store/settled/unit.vue | 334 ++++++++++++++++++--------------- 3 files changed, 200 insertions(+), 168 deletions(-) diff --git a/api/activity.js b/api/activity.js index 48b1195..fcba565 100644 --- a/api/activity.js +++ b/api/activity.js @@ -202,7 +202,7 @@ export function getTopicList(id, data) { * 活动专题详情 */ export function getTopicDetail(id) { - return request.get(`activity/info/${id}`,{}, { + return request.get(`activity/info/${id}`, {}, { noAuth: true }); } @@ -210,7 +210,7 @@ export function getTopicDetail(id) { * 活动专题商品 */ export function getTopicProLst(data) { - return request.get(`product/spu/labels`,data, { + return request.get(`product/spu/labels`, data, { noAuth: true }); } @@ -218,7 +218,7 @@ export function getTopicProLst(data) { * 获取本地服务商户列表 */ export function getMerchantServiceLst(data) { - return request.get(`store/merchant/local`,data, { + return request.get(`store/merchant/local`, data, { noAuth: true }); } @@ -226,7 +226,7 @@ export function getMerchantServiceLst(data) { * 获取优惠券列表 */ export function getCouponLst(data) { - return request.get(`coupon/getlst`,data, { + return request.get(`coupon/getlst`, data, { noAuth: true }); } @@ -234,7 +234,7 @@ export function getCouponLst(data) { * 获取优惠券列表 */ export function getNewPeopleCouponLst(data) { - return request.get(`coupon/new_people`,data, { + return request.get(`coupon/new_people`, data, { noAuth: true }); } @@ -242,7 +242,7 @@ export function getNewPeopleCouponLst(data) { * 获取热卖排行列表 */ export function hotRankingApi(data) { - return request.get(`product/spu/get_hot_ranking`,data, { + return request.get(`product/spu/get_hot_ranking`, data, { noAuth: true }); } @@ -299,8 +299,8 @@ export function storeActivityTotal(data) { // 活动商品专区 export function storeActivityProduct(data) { return request.get(`storeActivity/product`, data, { - noAuth: true - }); + noAuth: true + }); } // 活动区域列表 @@ -310,7 +310,7 @@ export function storeActivityDistrict(data) { //邀请好友列表 export function qrcode(data) { - return request.get(`qrcode`, data); + return request.get(`qrcode`, data); } @@ -318,3 +318,9 @@ export function qrcode(data) { export function merchantRecord(data) { return request.get(`merchantRecord`, data); } + + +// 生成二维码 +export function mer_services_agree() { + return request.get(`agreement/mer_services_agree`); +} \ No newline at end of file diff --git a/pages/helpPeople/formTable.vue b/pages/helpPeople/formTable.vue index 5a4cd6d..bc1f985 100644 --- a/pages/helpPeople/formTable.vue +++ b/pages/helpPeople/formTable.vue @@ -70,7 +70,7 @@ - @@ -160,7 +160,7 @@ - @@ -275,7 +275,7 @@ - @@ -463,7 +463,7 @@ - @@ -553,7 +553,7 @@ - diff --git a/pages/store/settled/unit.vue b/pages/store/settled/unit.vue index 1c82d13..cfa913c 100644 --- a/pages/store/settled/unit.vue +++ b/pages/store/settled/unit.vue @@ -17,8 +17,8 @@
- + 申请记录 @@ -33,14 +33,13 @@ placeholder-class='placeholder' /> --> - - - 姓名 - - - + + + 姓名 + + + @@ -113,28 +112,36 @@ - - - 请上传营业执照 - (图片格式支持JPG、PNG、JPEG) - - - - - - - 上传图片 - - - - + + + 请上传营业执照 + (图片格式支持JPG、PNG、JPEG) + + + + + + + 上传图片 + + + + + + + 已阅读并同意 + + + + @@ -144,7 +151,8 @@ -
{{isType ? '店铺类型说明' : '商户入驻协议'}}
+
{{isType ? '店铺类型说明' : '商户入驻协议'}}
+
@@ -170,15 +178,16 @@ - + - + - + - @@ -220,12 +229,12 @@ personalStore, verify, merClassifly, - getCategoryList, + getCategoryList, getGoodsDetails, updateGoodsRecord, getStoreTypeApi, agreeiness, - merchantLicenseIdentify + merchantLicenseIdentify } from '@/api/store.js'; import { getCaptcha, @@ -252,7 +261,12 @@ import { HTTP_REQUEST_URL } from '@/config/app'; -import { Toast } from '../../../libs/uniApi'; + import { + Toast + } from '../../../libs/uniApi'; + import { + mer_services_agree + } from "@/api/activity.js" const app = getApp(); export default { components: { @@ -262,6 +276,7 @@ import { Toast } from '../../../libs/uniApi'; }, data() { return { + titFlag: true, company: '', organization_code: '', domain: HTTP_REQUEST_URL, @@ -286,9 +301,9 @@ import { Toast } from '../../../libs/uniApi'; social_credit_code: '', company_name: '', address: '', - invitation_code: '', + invitation_code: '', }, - business_license: '',//营业执照 + business_license: '', //营业执照 validate: false, successful: false, keyCode: "", @@ -299,13 +314,13 @@ import { Toast } from '../../../libs/uniApi'; index1: 0, index2: [0, 0, 0], mer_classification: "", - nature_business: 0, + nature_business: 0, array: [{ category_name: '', merchant_category_id: '' }], - companyTypeList: ['对公户', '个体户'], - bindPickerChangeidx: [], + companyTypeList: ['对公户', '个体户'], + bindPickerChangeidx: [], storeTypeArr: [{ type_name: '', mer_type_id: '' @@ -365,8 +380,7 @@ import { Toast } from '../../../libs/uniApi'; this.$nextTick(function() { this.getGoodsDetails(options.mer_i_id) }) - } - else this.getArea() + } else this.getArea() this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45; }, onShow() { @@ -429,7 +443,7 @@ import { Toast } from '../../../libs/uniApi'; //获取商户入驻申请协议 shoplist(val) { - + agreeiness({ type: val }).then(res => { @@ -449,13 +463,13 @@ import { Toast } from '../../../libs/uniApi'; street_code: e }).then(res => { self.$set(self.business, 2, res.data); - if(self.mer_i_id&&!this.business_name){ - let area = self.business[0].find(item=>item.code==self.area_id)?.name; - let street = self.business[1].find(item=>item.code==self.street_id)?.name; - let village = self.business[2].find(item=>item.id==self.village_id)?.name; - this.business_name = `${area} ${street} ${village}`; - this.getArea(); - } + if (self.mer_i_id && !this.business_name) { + let area = self.business[0].find(item => item.code == self.area_id)?.name; + let street = self.business[1].find(item => item.code == self.street_id)?.name; + let village = self.business[2].find(item => item.id == self.village_id)?.name; + this.business_name = `${area} ${street} ${village}`; + this.getArea(); + } }) }, //获取镇 @@ -465,11 +479,11 @@ import { Toast } from '../../../libs/uniApi'; area_code: e }).then(res => { self.$set(self.business, 1, res.data) - self.getVillage(street?street:self.business[1][0].code) + self.getVillage(street ? street : self.business[1][0].code) }) }, //获取区 - getArea(code=null, street=null) { + getArea(code = null, street = null) { getArea({ city_code: 510500 }).then(res => { @@ -493,16 +507,27 @@ import { Toast } from '../../../libs/uniApi'; this.index2[2] = e.detail.value } }, - getConfig() { + getConfig(type) { this.isType = false; this.showProtocol = true; + + if (type == 0) { + this.titFlag = true + this.protocol = this.sys_intention_agree + } else { + this.titFlag = false + mer_services_agree().then(res => { + this.protocol = res.data.mer_services_agree + }) + } // 获取配置 - this.protocol = this.sys_intention_agree + // this.protocol = this.sys_intention_agree }, /*获取发票说明*/ getAgreement() { let that = this that.showProtocol = true; + that.titFlag = true that.isType = true getAgreementApi('sys_merchant_type').then(res => { that.protocol = res.data.sys_merchant_type @@ -522,7 +547,7 @@ import { Toast } from '../../../libs/uniApi'; this.merchantData.social_credit_code = resData.social_credit_code this.merchantData.company_name = resData.company_name this.merchantData.address = resData.address - this.merchantData.invitation_code = resData.invitation_code + this.merchantData.invitation_code = resData.invitation_code this.merchantData.classification = resData.merchant_category_id this.merchantData.mer_type = resData.mer_type_id this.area_id = resData.area_id @@ -530,18 +555,18 @@ import { Toast } from '../../../libs/uniApi'; this.mer_storeType = resData.mer_storeType this.village_id = resData.village_id }) - this.business_license = resData.images[0]; - resData.images.shift(); + this.business_license = resData.images[0]; + resData.images.shift(); this.pics = resData.images; this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array) this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr) - this.business_name = ''; - this.getArea(this.area_id, this.street_id); - if(resData.mer_type_id!=12){ - this.shoplist('mer_services_agree') - }else{ - this.shoplist('mer_supply_agree') - } + this.business_name = ''; + this.getArea(this.area_id, this.street_id); + if (resData.mer_type_id != 12) { + this.shoplist('mer_services_agree') + } else { + this.shoplist('mer_supply_agree') + } uni.hideLoading(); }) }, @@ -561,37 +586,37 @@ import { Toast } from '../../../libs/uniApi'; } } }, - // 选择公司性质 - natureBusinessChange(e){ - this.nature_business = this.companyTypeList[e.detail.value]=='个体户'?2:1; - }, + // 选择公司性质 + natureBusinessChange(e) { + this.nature_business = this.companyTypeList[e.detail.value] == '个体户' ? 2 : 1; + }, bindPickerChange: function(e) { - // console.log(e.detail); + // console.log(e.detail); // this.index = e.target.value[1]; - let idx = e.target.value; + let idx = e.target.value; // let idx = e.target.value[1]; - this.merchantData.classification = this.array[idx]['merchant_category_id'] - this.mer_classification = this.array[idx]['category_name'] + this.merchantData.classification = this.array[idx]['merchant_category_id'] + this.mer_classification = this.array[idx]['category_name'] // this.merchantData.classification = this.bindPickerChangeidx[idx]['store_category_id'] // this.mer_classification = this.bindPickerChangeidx[idx]['cate_name'] this.validateBtn() }, - columnchange(e){ - // console.log(e.detail); - if(e.detail.column==0){ - this.bindPickerChangeidx = this.array[e.detail.value].children; - } - }, + columnchange(e) { + // console.log(e.detail); + if (e.detail.column == 0) { + this.bindPickerChangeidx = this.array[e.detail.value].children; + } + }, bindPickerChange1: function(e) { this.index1 = e.target.value let idx = e.target.value this.merchantData.mer_type = this.storeTypeArr[idx]['mer_type_id'] this.mer_storeType = this.storeTypeArr[idx]['type_name'] - // console.log(this.merchantData.mer_type) - if(this.storeTypeArr[idx]['type_code']== 'TypeStore'&&this.merchantData.mer_type){ + // console.log(this.merchantData.mer_type) + if (this.storeTypeArr[idx]['type_code'] == 'TypeStore' && this.merchantData.mer_type) { this.shoplist('mer_services_agree') - }else{ + } else { this.shoplist('mer_supply_agree') } this.validateBtn() @@ -604,9 +629,9 @@ import { Toast } from '../../../libs/uniApi'; `${this.business[0][this.index2[0]].name} ${this.business[1][this.index2[1]].name} ${this.business[2][this.index2[2]].name}` this.area_id = this.business[0][this.index2[0]].code this.street_id = this.business[1][this.index2[1]].code - this.village_id = this.business[2][this.index2[2]].id - return ; // 个人入驻也不需要 - if(this.merchantData.mer_type==12) return ; //市级供应链不需要查询镇农科公司 + this.village_id = this.business[2][this.index2[2]].id + return; // 个人入驻也不需要 + if (this.merchantData.mer_type == 12) return; //市级供应链不需要查询镇农科公司 merstreet({ street_code: this.street_id }).then((res) => { @@ -638,21 +663,21 @@ import { Toast } from '../../../libs/uniApi'; title: res }); }); - // getCategoryList() - // .then(res => { - // // console.log(res); - // res.data.list.forEach(item=>{ - // item.category_name = item.cate_name; - // item.merchant_category_id = item.store_category_id; - // }) - // this.array = res.data.list; - // this.bindPickerChangeidx = this.array[0].children; - // }) - // .catch(res => { - // this.$util.Tips({ - // title: res - // }); - // }); + // getCategoryList() + // .then(res => { + // // console.log(res); + // res.data.list.forEach(item=>{ + // item.category_name = item.cate_name; + // item.merchant_category_id = item.store_category_id; + // }) + // this.array = res.data.list; + // this.bindPickerChangeidx = this.array[0].children; + // }) + // .catch(res => { + // this.$util.Tips({ + // title: res + // }); + // }); }, // 获取店铺类型 getStoreType: function() { @@ -715,32 +740,32 @@ import { Toast } from '../../../libs/uniApi'; that.$set(that, 'pics', that.pics); }); }, - /** - * 上传图片识别文字 - * - */ - uploadpicText: function() { - let that = this; - that.$util.uploadImageOne('upload/image', function(res) { - that.business_license = res.data.path; - // uni.showLoading({ - // title: '识别中' - // }) - // merchantLicenseIdentify({ - // image: res.data.path - // }).then(res=>{ - // that.merchantData.address = res.data.address; - // that.merchantData.user_name = res.data.legal_person; - // that.merchantData.social_credit_code = res.data.register_number; - // that.merchantData.company_name = res.data.name; - // // that.$set('merchantData', that.merchantData); - // uni.hideLoading(); - // }).catch((e)=>{ - // uni.hideLoading(); - // Toast(e) - // }) - }); - }, + /** + * 上传图片识别文字 + * + */ + uploadpicText: function() { + let that = this; + that.$util.uploadImageOne('upload/image', function(res) { + that.business_license = res.data.path; + // uni.showLoading({ + // title: '识别中' + // }) + // merchantLicenseIdentify({ + // image: res.data.path + // }).then(res=>{ + // that.merchantData.address = res.data.address; + // that.merchantData.user_name = res.data.legal_person; + // that.merchantData.social_credit_code = res.data.register_number; + // that.merchantData.company_name = res.data.name; + // // that.$set('merchantData', that.merchantData); + // uni.hideLoading(); + // }).catch((e)=>{ + // uni.hideLoading(); + // Toast(e) + // }) + }); + }, /** * 删除图片 * @@ -840,16 +865,16 @@ import { Toast } from '../../../libs/uniApi'; let requestData = { phone: that.merchantData.phone, // mer_name: that.merchantData.enterprise_name, - mer_name: that.merchantData.user_name+'的个人店铺', + mer_name: that.merchantData.user_name + '的个人店铺', name: that.merchantData.user_name, code: that.merchantData.yanzhengma, // company_name: that.merchantData.company_name, address: that.merchantData.address, - // invitation_code: that.merchantData.invitation_code, + // invitation_code: that.merchantData.invitation_code, // social_credit_code: that.merchantData.social_credit_code, // merchant_category_id: that.merchantData.classification, - // merchant_category_name: that.mer_classification, - // is_company: that.nature_business==1?1:0, // 是否是公司, 1是公司, 0是个体 + // merchant_category_name: that.mer_classification, + // is_company: that.nature_business==1?1:0, // 是否是公司, 1是公司, 0是个体 // mer_type_id: that.merchantData.mer_type, // mer_storeType: this.mer_storeType, area_id: this.area_id, @@ -897,8 +922,8 @@ import { Toast } from '../../../libs/uniApi'; }, formSubmit() { if (this.validateForm() && this.validate) { - return this.agree(); - if (this.merchantData.mer_type == '12') return this.agree(); + return this.agree(); + if (this.merchantData.mer_type == '12') return this.agree(); if (this.codenote.length == 0) { this.isshow = true this.countDown() @@ -962,9 +987,9 @@ import { Toast } from '../../../libs/uniApi'; // if (!this.mer_classification) return that.$util.Tips({ // title: '请选择商户分类' // }); - // if (!this.nature_business) return that.$util.Tips({ - // title: '请选择公司性质' - // }) + // if (!this.nature_business) return that.$util.Tips({ + // title: '请选择公司性质' + // }) // if (!this.mer_storeType) return that.$util.Tips({ // title: '请选择店铺类型' // }) @@ -980,9 +1005,9 @@ import { Toast } from '../../../libs/uniApi'; // if (that.isShowCode && !that.codeVal) return that.$util.Tips({ // title: '请填写图片验证码' // }); - if (!that.business_license) return that.$util.Tips({ - title: '请上传营业执照' - }); + if (!that.business_license) return that.$util.Tips({ + title: '请上传营业执照' + }); // if (that.pics.length == 0) return that.$util.Tips({ // title: '请上传一张或者多张图片' // }); @@ -1024,7 +1049,7 @@ import { Toast } from '../../../libs/uniApi'; background-color: var(--view-theme) !important; color: #fff !important; } - + .conten-top { width: 100%; @@ -1065,7 +1090,7 @@ import { Toast } from '../../../libs/uniApi'; } .merchantsSettled { - background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); + background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); min-height: 100vh; position: relative; } @@ -1444,7 +1469,7 @@ import { Toast } from '../../../libs/uniApi'; .setAgCountbtn { display: flex; justify-content: space-around; - position: relative; + position: relative; .setAgCountbtna { margin-top: 40rpx; @@ -1495,22 +1520,23 @@ import { Toast } from '../../../libs/uniApi'; color: #fff; } - - .border{ - position: absolute; - top: 0; - left: -28rpx; - width: 100vw; - height: 100%; - border-radius: 40rpx 40rpx 0 0; - box-shadow: 0px -5px 5px -2px rgba(0, 0, 0, 0.2); /* 在上边框添加阴影 */ - } - - .btn{ - width: 694rpx; - font-weight: bold; - font-size: 34rpx; - } + + .border { + position: absolute; + top: 0; + left: -28rpx; + width: 100vw; + height: 100%; + border-radius: 40rpx 40rpx 0 0; + box-shadow: 0px -5px 5px -2px rgba(0, 0, 0, 0.2); + /* 在上边框添加阴影 */ + } + + .btn { + width: 694rpx; + font-weight: bold; + font-size: 34rpx; + } } .settledSuccessMain {