From 1f13c5daf450c8b0e66a862d0d94171f3a7b6174 Mon Sep 17 00:00:00 2001 From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com> Date: Wed, 10 Apr 2024 17:05:24 +0800 Subject: [PATCH] 1 --- App.vue | 5 + config/app.js | 4 +- pages/activeCode/subsidy.vue | 4 - pages/product/basicSet.vue | 91 +-- pages/product/goodsOnSale/index.vue | 758 ++++++++++++---------- pages/product/list/index.vue | 954 +++++++++++++++------------- pages/withdrawal/add.vue | 71 ++- pages/withdrawal/progress.vue | 13 +- 8 files changed, 1022 insertions(+), 878 deletions(-) diff --git a/App.vue b/App.vue index a1c0a0f..3d5f87d 100644 --- a/App.vue +++ b/App.vue @@ -427,6 +427,11 @@ @import 'static/css/style.scss'; + // 全局取消滚动条 + * { + scrollbar-color: #e5e5e500 #f7f7f9 !important; + } + view { box-sizing: border-box; } diff --git a/config/app.js b/config/app.js index d94b1a2..479ac47 100644 --- a/config/app.js +++ b/config/app.js @@ -9,8 +9,8 @@ let httpApiThree let wsApi // 在打包之前请检查当前环境是否正确 -// const env = 'dev'; // 开发 -const env = 'prod'; // 生产 +const env = 'dev'; // 开发 +// const env = 'prod'; // 生产 // const env = 'prew'; // 预上线 switch (env) { diff --git a/pages/activeCode/subsidy.vue b/pages/activeCode/subsidy.vue index dd4c61f..5e515c0 100644 --- a/pages/activeCode/subsidy.vue +++ b/pages/activeCode/subsidy.vue @@ -211,7 +211,6 @@ - @@ -252,9 +251,6 @@ this.mer_id = user.service.mer_id; this.getSubsidy(); this.getSubsidyRecord(); - // this.$nextTick(res=>{ - // this.$refs.pupRef.open(); - // }) }, onShow() {}, methods: { diff --git a/pages/product/basicSet.vue b/pages/product/basicSet.vue index efd6d0f..468f590 100644 --- a/pages/product/basicSet.vue +++ b/pages/product/basicSet.vue @@ -117,9 +117,10 @@ 获取地址 --> + 提货点营业日期: - + {{ item.name }} @@ -284,7 +285,6 @@ id: 7, isCheck: true }], - selarr: [1, 2, 3, 4, 5, 6, 7], mer_take_time: ['08:00', '18:00'], beginTimeShow: false, overTimeShow: false, @@ -340,15 +340,19 @@ this.takeName = res.data.mer_take_name this.takePhone = res.data.mer_take_phone this.detailSite = res.data.mer_take_address - // this.servicePhone = res.data.service_phone this.servicePhone = res.data.mer_phone; res.data.mer_take_location ? this.longLati = res.data.mer_take_location?.join(',') : null; - res.data.mer_take_day && res.data.mer_take_day.forEach((item, i) => { - this.dateWeek[Number(item) - 1].isCheck = true - }) - this.selarr = res.data.mer_take_day; + // 是否有营业日期 + if (res.data.mer_take_day && res.data.mer_take_day.length > 0) { + this.dateWeek.forEach(item => { + let day = res.data.mer_take_day.find(i => i == item.id); + if (day) item.isCheck = true; + else item.isCheck = false; + }) + } + this.type_code = res.data.type_code this.mer_take_time = res.data.mer_take_time this.intro = res.data.mer_info @@ -385,20 +389,13 @@ //开启信用购 change(e) { this.credit_buy = e - console.log(e); }, + // 选择营业日期 - sel(item, i) { - if (item.isCheck == false) { - item.isCheck = true; - this.selarr.push(String(item.id)); - } else { - item.isCheck = false; - this.selarr = this.selarr.filter(id => { - return id != item.id - }) - } + sel(i) { + this.dateWeek[i].isCheck = !this.dateWeek[i].isCheck; }, + postMerchantUpdata() { uni.showModal({ title: '确定提交吗', @@ -432,7 +429,7 @@ lat: this.latitude, long: this.longitude, mer_take_location: [this.latitude, this.longitude], // 经纬度 - mer_take_day: this.selarr, // 提货点营业日期 + mer_take_day: [], // 提货点营业日期 mer_take_time: this.mer_take_time, // 提货时间 mer_info: this.intro, mer_keyword: this.cruxText, @@ -446,35 +443,27 @@ settle_cycle: this.settle_cycle, interest_rate: this.interest_rate } + // 营业时间 + this.dateWeek.map(i => { + if (i.isCheck) { + data.mer_take_day.push(i.id) + } + }) + merchantUpdateAPI(data).then(res => { Toast(res.message) setTimeout(() => { - // uni.switchTab({ - // url: '/pages/moreProject/moreProject', - // fail: (err) => { - // // console.log('err', err); - // } - // }); - // uni.navigateTo({ - // url:'/pages/moreProject/moreProject' - // }) - // uni.redirectTo({ - // url: '/pages/moreProject/moreProject' - // }) - uni.navigateBack({ - delta: 1 - }); + uni.navigateBack(); }, 1000) }).catch(err => { Toast(err) }) }, - selfLocation() { + selfLocation() { uni.getLocation({ type: 'wgs84', success: (res) => { - // console.log(res); this.latitude = res.latitude.toString(); this.longitude = res.longitude.toString(); this.longLati = `${res.latitude},${res.longitude}` @@ -488,34 +477,8 @@ seleckImage(i) { let that = this; that.$util.uploadImageOne('upload/image', function(res) { - // console.log(res) that.images[i].img = res.data.path }); - // let that = this - // uni.chooseImage({ - // count: 1, - // sizeType: ['original', 'compressed'], - // sourceType: ['album', 'camera'], - // success: function(res) { - - // uni.showLoading({ - // title: '上传中...' - // }) - // console.log(res.tempFilePaths[0],'22222222'); - // uploads(res.tempFilePaths[0], 'img').then(res => { - // console.log(res,'3333'); - // that.images[i].img = res - // uni.hideLoading() - // }).catch(err => { - // Toast('添加失败') - // uni.hideLoading() - // }) - // }, - // fail: function(err) { - // Toast('添加失败') - // } - // }); - }, seleckImageArr() { let that = this; @@ -556,7 +519,6 @@ navTo(url) { if (url == '/pages/select_address/select_address_n') { uni.$once('changeAddress', (res) => { - // console.log('收到', res); this.mer_address = res.formatted_addresses.recommend; this.latitude = res.latitude; this.longitude = res.longitude; @@ -570,8 +532,7 @@ }, onPullDownRefresh() { uni.stopPullDownRefresh() - }, - + } } diff --git a/pages/product/goodsOnSale/index.vue b/pages/product/goodsOnSale/index.vue index 4c92cc7..7b9471f 100644 --- a/pages/product/goodsOnSale/index.vue +++ b/pages/product/goodsOnSale/index.vue @@ -5,25 +5,21 @@
- -
+ +
- - + + {{ item.name }} - + @@ -46,26 +42,35 @@ - - ¥{{item.attrValue[0].wholesale_price}} - 零售价¥{{item.attrValue[0].price}} - - 商品规格错误 + + ¥{{item.attrValue[0].wholesale_price}} + 零售价¥{{item.attrValue[0].price}} + + 商品规格错误 ¥{{item.price}}
- 下架 - 上架 - 删除 + 下架 + 上架 + + 删除 恢复 - 编辑 - 编辑 - 编辑 - + 编辑 + 编辑 + 编辑 +
@@ -76,159 +81,182 @@ + \ No newline at end of file diff --git a/pages/product/list/index.vue b/pages/product/list/index.vue index bcc7684..457bab2 100644 --- a/pages/product/list/index.vue +++ b/pages/product/list/index.vue @@ -1,9 +1,11 @@ @@ -246,9 +209,12 @@ productDeleteApi, productOffApi, productRecommendApi, - productUpdateFree + productUpdateFree, + productTitle } from "@/api/product"; - import { labelLst } from "@/api/public.js"; + import { + labelLst + } from "@/api/public.js"; import Loading from '@/components/Loading/index.vue'; import { merstreet, @@ -264,12 +230,12 @@ Toast, Modal, } from '../../../libs/uniApi.js'; - import { - getPreviewProDetail - } from "@/api/store.js"; - import { - getCategoryListLevel - } from '@/api/requesta.js'; + import { + getPreviewProDetail + } from "@/api/store.js"; + import { + getCategoryListLevel + } from '@/api/requesta.js'; export default { name: 'productList', components: { @@ -282,15 +248,16 @@ where: { page: 1, limit: 20, - keyword: '' + keyword: '', + type: 1 }, menuList: [], // 分类菜单 - menuCList: [], //二级分类 - cate_id: '', // 已选id + menuCList: [], //二级分类 + cate_id: '', // 已选id loaded: false, loading: false, mer_id: '', - mer_info: {}, + mer_info: {}, productList: [], swiperCur: 0, circular: true, @@ -303,35 +270,44 @@ // 基本案列数据 checkboxList1: [], data: { - attr: [], + attr: [], product_id: '', unique: "", number: 1, - submit_info:{}, - spec_type: '' + submit_info: {}, + spec_type: '' }, on_line: '', isshow: false, num: -1, ll: 0, - lableList: [], //标签列表 - lableShow: false, - lableInfo: { - id: '', - mer_labels: '' - }, // 已选择标签 - keyword: '' + lableList: [], //标签列表 + lableShow: false, + lableInfo: { + id: '', + mer_labels: '' + }, // 已选择标签 + keyword: '', + + isLeft: 0, //导航栏下划线位置 + isWidth: 0, //每个导航栏占位 + childIndex: 0, + tabList: [], + tabClick: '', + tabLeft: 0, } }, onLoad(options) { - // this.mer_id = options.mer_id; this.getUserInfo() - getCategoryListLevel({ - type: 2 - }).then(res => { - this.menuList = res.data; - this.menuCList = res.data[0].children; - }) + this.getCategoryList(); + + var that = this; + // 获取设备宽度 + uni.getSystemInfo({ + success(e) { + that.isWidth = e.windowWidth / 5; + } + }); }, onPullDownRefresh() { this.where.page = 1 @@ -342,120 +318,170 @@ uni.stopPullDownRefresh() }, onReachBottom() { - // console.log(this.status, '222222222') - if (this.status == 'nomore') return; + if (this.status == 'nomore') return; this.status = 'loading'; this.where.page = ++this.where.page; this.getList(this.mer_id, false); }, methods: { + // 商品分类 + getCategoryList() { + getCategoryListLevel({ + type: 2 + }).then(res => { + this.menuList = res.data; + this.menuCList = res.data[0].children; + }); + }, + + // 获取列表头部 + getProductTitle() { + productTitle(this.mer_id).then(res => { + this.tabList = res.data; + let clickIndex = 0; + this.tabList.forEach((item, index) => { + if (item.type == this.type) { + clickIndex = index; + } + }); + this.setMenuLeft(clickIndex); + }); + }, + + // 点击列表头部 + selectMenu(item, index) { + this.where.type = item.type; + this.loading = this.loaded = false; + this.where.page = 1; + this.shopList = []; + this.setMenuLeft(index); + }, + + /*导航栏移动位置*/ + setMenuLeft(index) { + this.childIndex = 0; + if (this.menuList.length > 5) { + var tempIndex = index - 2; + tempIndex = tempIndex <= 0 ? 0 : tempIndex; + let tabLeft = (index - 2) * this.isWidth; //设置下划线位置 + this.$nextTick(function() { + this.$set(this, 'tabLeft', tabLeft); + }); + } + this.tabClick = index; //设置导航点击了哪一个 + this.isLeft = index * this.isWidth; //设置下划线位置 + this.getList(this.mer_id, true); + }, + /** * 获取个人用户信息 */ getUserInfo() { getUserInfo().then(res => { this.mer_id = res.data.service.mer_id; - this.mer_info = res.data.mer_info; - this.initLable(); - this.getList(res.data.service.mer_id, true); + this.mer_info = res.data.mer_info; + this.initLable(); + // this.getList(res.data.service.mer_id, true); + + // 条件 + this.getProductTitle(); }).catch(res => { console.log(res) }) }, - // 搜索 - keywordSearch(){ - this.loaded = false; - this.where.keyword = this.keyword; - this.getList(this.mer_id, true); - }, - // 扫码搜索 - scanQRcodes(){ - uni.scanCode({ - scanType: ['barCode'], - success:(res)=>{ - this.keyword = res.result; - this.keywordSearch(); - } - }) - }, - // 初始化商品标签 - initLable(){ - labelLst({ - type: 1 - }).then((res)=>{ - this.lableList = res.data.list; - }) - }, - // 点击标签 - changeLable(item){ - this.lableInfo.id = item.product_id; - this.lableInfo.mer_labels = []; - item.mer_labels?.forEach(t=>{ - this.lableInfo.mer_labels.push(+t.product_label_id); - }) - if(this.lableInfo.mer_labels.length==0)this.lableInfo.mer_labels = [4]; - this.lableShow = true; - }, - changeLableItem(item){ - if(item.product_label_id==4) return Toast('该项必须勾选'); //现款现货 - const index = this.lableInfo.mer_labels.indexOf(+item.product_label_id); - if (index >= 0) { - // 如果存在,则删除该元素 - this.lableInfo.mer_labels.splice(index, 1); - } else { - // 如果不存在,则添加该元素 - this.lableInfo.mer_labels.push(+item.product_label_id); - } - }, - // 编辑标签 - updateLable(){ - productUpdateFree(this.lableInfo.id, { - mer_labels: this.lableInfo.mer_labels - }).then((res)=>{ - Toast(res.message); - this.lableShow = false; - this.productList.forEach(item=>{ - if(item.product_id==this.lableInfo.id){ - let arr = [] - this.lableInfo.mer_labels.forEach(t=>{ - arr.push({ - product_label_id: t - }) - }) - item.mer_labels = arr; - } - }) - // this.getList(this.mer_id, true); - }).catch(e=>{ - Toast(e) - this.lableShow = false; - }) - }, + + // 搜索 + keywordSearch() { + this.loaded = false; + this.where.keyword = this.keyword; + this.getList(this.mer_id, true); + }, + + // 扫码搜索 + scanQRcodes() { + uni.scanCode({ + scanType: ['barCode'], + success: (res) => { + this.keyword = res.result; + this.keywordSearch(); + } + }) + }, + + // 初始化商品标签 + initLable() { + labelLst({ + type: 1 + }).then((res) => { + this.lableList = res.data.list; + }) + }, + + // 点击标签 + changeLable(item) { + this.lableInfo.id = item.product_id; + this.lableInfo.mer_labels = []; + item.mer_labels?.forEach(t => { + this.lableInfo.mer_labels.push(+t.product_label_id); + }) + if (this.lableInfo.mer_labels.length == 0) this.lableInfo.mer_labels = [4]; + this.lableShow = true; + }, + + changeLableItem(item) { + if (item.product_label_id == 4) return Toast('该项必须勾选'); //现款现货 + const index = this.lableInfo.mer_labels.indexOf(+item.product_label_id); + if (index >= 0) { + // 如果存在,则删除该元素 + this.lableInfo.mer_labels.splice(index, 1); + } else { + // 如果不存在,则添加该元素 + this.lableInfo.mer_labels.push(+item.product_label_id); + } + }, + + // 编辑标签 + updateLable() { + productUpdateFree(this.lableInfo.id, { + mer_labels: this.lableInfo.mer_labels + }).then((res) => { + Toast(res.message); + this.lableShow = false; + this.productList.forEach(item => { + if (item.product_id == this.lableInfo.id) { + let arr = [] + this.lableInfo.mer_labels.forEach(t => { + arr.push({ + product_label_id: t + }) + }) + item.mer_labels = arr; + } + }) + }).catch(e => { + Toast(e) + this.lableShow = false; + }) + }, + menuActiona(item, index) { if (item.is_good) { this.options = [{ - value: '1', - text: '取消推荐' - }, - - { - value: '2', - text: '预览' - }, - - ] + value: '1', + text: '取消推荐' + }, { + value: '2', + text: '预览' + }] } else { this.options = [{ - value: '5', - text: '店铺推荐' - }, - { - value: '2', - text: '预览' - }, - - ] + value: '5', + text: '店铺推荐' + }, { + value: '2', + text: '预览' + }] } if (item.is_show == 0) { this.options.push({ @@ -464,22 +490,18 @@ }) } this.ll++ - // console.log(this.ll) if (this.ll % 2 == 0) { this.$set(this, 'num', -1); this.ll = 0 } else { this.num = index } - - - }, yinc() { this.$set(this, 'num', -1); }, - menuAction(action, rowId, item, index) { + menuAction(action, rowId, item, index) { if (action.value == 2) { uni.navigateTo({ url: `/pages/admin/goods_details/index?product_id=${item.product_id}&product_type=0` @@ -490,12 +512,12 @@ } else { this.handleRecycle(item, index) } - }, fnChange(e) { this.optionVal = e }, + close() { this.show = false }, @@ -514,56 +536,53 @@ unique: this.data.unique, }); } - - }, + //线下 Fline(item) { navigateTo(1, '/pages/product/updateStock/updateStock', { - product_id: item.product_id + product_id: item.product_id }) - uni.$once('updateStock', (e)=>{ - this.productList.forEach(p=>{ - if(e.product_id==p.product_id){ - p.stock = e.stock; - } - }) + uni.$once('updateStock', (e) => { + this.productList.forEach(p => { + if (e.product_id == p.product_id) { + p.stock = e.stock; + } + }) }) }, + //导入 creat() { - if (this.on_line == 1) { - if(this.data.spec_type==1 && this.checkboxValue1 !== this.data.unique){ - this.show = false - this.$util.Tips({ + if (this.data.spec_type == 1 && this.checkboxValue1 !== this.data.unique) { + this.show = false + this.$util.Tips({ title: '请选择规格' }) - } - else if (this.data.number < 1) { + } else if (this.data.number < 1) { this.show = false this.$util.Tips({ title: '入库数量不得小于一件' }) } else { - let obj = { - "attr": this.data.attr, - "attrValue": [...this.checkboxList1], - "mer_cate_id": this.data.item.merCateId||[], - "spec_type": this.data.spec_type, - "is_stock": 1 - }; - if(this.data.spec_type==1) { - obj.attrValue.forEach((item)=>{ - if(item.unique==this.checkboxValue1){ - item.stock = this.data.number; - } - }) - // let attr = obj.attrValue.find((item)=>item.unique==this.checkboxValue1); - // attr.stock = this.data.number; - // obj.attrValue = [attr]; - } - else obj.attrValue[0].stock = this.data.number; + let obj = { + "attr": this.data.attr, + "attrValue": [...this.checkboxList1], + "mer_cate_id": this.data.item.merCateId || [], + "spec_type": this.data.spec_type, + "is_stock": 1 + }; + if (this.data.spec_type == 1) { + obj.attrValue.forEach((item) => { + if (item.unique == this.checkboxValue1) { + item.stock = this.data.number; + } + }) + // let attr = obj.attrValue.find((item)=>item.unique==this.checkboxValue1); + // attr.stock = this.data.number; + // obj.attrValue = [attr]; + } else obj.attrValue[0].stock = this.data.number; productUpdateFree(this.data.product_id, obj).then(res => { this.data.unique = '' this.data.product_id = '' @@ -590,7 +609,6 @@ } } if (this.on_line == 0) { - if (!this.data.product_id) { this.show = false this.$util.Tips({ @@ -602,31 +620,31 @@ product_id: this.data.product_id, unique: this.data.unique, }); - - } - } - }, + //规格 checkboxChange(n) { this.data.unique = n; - this.checkboxList1.forEach(item=>{ - if(item.unique==n){ - this.data.number = item.stock; - } - }) + this.checkboxList1.forEach(item => { + if (item.unique == n) { + this.data.number = item.stock; + } + }) }, + radioChange(n) { this.data.product_id = n.product_id }, + // 跳转添加商品界面 jumpAddGoods() { const data = getStorage('addGoodsFormData'); if (data && data.product_id) { let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData', - 'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils']; + 'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils' + ]; waitDeleteData.forEach(item => { if (getStorage(item)) { removeStorage(item); @@ -637,6 +655,7 @@ mer_id: this.mer_id }); }, + // swiper swiperChange(e) { let { @@ -648,6 +667,7 @@ this.swiperCur = e.detail.current; } }, + getList: function(mer_id, ispage) { var that = this; if (that.loading || that.loaded) return; @@ -656,10 +676,10 @@ this.where.page = 1 this.$set(this, 'productList', []); } - if(this.cate_id.store_category_id){ - that.where.cate_id = this.cate_id.store_category_id; - // mer_cate_id 为商户自己的分类参数 - } + if (this.cate_id.store_category_id) { + that.where.cate_id = this.cate_id.store_category_id; + // mer_cate_id 为商户自己的分类参数 + } productLstApi(mer_id, that.where).then( res => { that.loading = false; @@ -674,31 +694,17 @@ } ); }, + editGoods(item) { - // let waitDeleteData = [ - // 'addGoodsFormData', - // 'singleSpecification', - // 'attrValue', - // 'modifyPriceData', - // 'addGoodsSecoundData', - // 'goodsDis', - // 'editGoodsDetils', - // 'canChange', - // 'canChangeSecound' - // ]; - // waitDeleteData.forEach(item => { - // if (getStorage(item)) { - // removeStorage(item); - // } - // }); - let url = '/pages/product/addGood/addGood'; - if(this.mer_info.type_code=='PersonalStore') url = '/pages/product/addGood/addGood_one'; - if(this.mer_info.type_code=='TypeSupplyChain') url = '/pages/product/addGood/addGood_supply'; - navigateTo(1, url, { - mer_id: item.mer_id, - product_id: item.product_id - }); + let url = '/pages/product/addGood/addGood'; + if (this.mer_info.type_code == 'PersonalStore') url = '/pages/product/addGood/addGood_one'; + if (this.mer_info.type_code == 'TypeSupplyChain') url = '/pages/product/addGood/addGood_supply'; + navigateTo(1, url, { + mer_id: item.mer_id, + product_id: item.product_id + }); }, + handleRecycle(item, index) { let that = this; Modal('温馨提示', `商品"${item.store_name}"将被加入回收站,请问是否继续?`).then(res => { @@ -732,7 +738,7 @@ title: '下架成功', icon: 'none' }) - that.getList(this.mer_id,false) + that.getList(this.mer_id, false) } else if (res.cancel) { // console.log('用户点击取消'); } @@ -753,7 +759,7 @@ icon: 'success' }, () => { that.$set(item, 'is_show', item.is_show == 0 ? 1 : 0); - that.getList(this.mer_id,false) + that.getList(this.mer_id, false) }); }).catch(err => { return that.$util.Tips({ @@ -787,26 +793,27 @@ more(index) { this.current = index }, - // 选择地址 - columnchange(e){ - if(e.detail.column==0){ - this.menuCList = this.menuList[e.detail.value].children; - } - }, - changeMenu(e){ - let cate_id = this.menuList[e.detail.value[0]].children[e.detail.value[1]]||this.menuList[e.detail.value[0]]||''; - this.$set(this, 'cate_id', JSON.parse(JSON.stringify(cate_id))); - this.loading = false; - this.loaded = false; - this.getList(this.mer_id, true) - }, - cancelMenu(){ - this.loading = false; - this.loaded = false; - this.where.cate_id = null; - this.cate_id.store_category_id = null; - this.getList(this.mer_id, true) - } + // 选择地址 + columnchange(e) { + if (e.detail.column == 0) { + this.menuCList = this.menuList[e.detail.value].children; + } + }, + changeMenu(e) { + let cate_id = this.menuList[e.detail.value[0]].children[e.detail.value[1]] || this.menuList[e.detail.value[ + 0]] || ''; + this.$set(this, 'cate_id', JSON.parse(JSON.stringify(cate_id))); + this.loading = false; + this.loaded = false; + this.getList(this.mer_id, true) + }, + cancelMenu() { + this.loading = false; + this.loaded = false; + this.where.cate_id = null; + this.cate_id.store_category_id = null; + this.getList(this.mer_id, true) + } }, } @@ -817,18 +824,64 @@ background-color: #F5F5F5; } + .longTab { + display: flex; + width: 100%; + + .longItem { + height: 50upx; + display: inline-block; + line-height: 50upx; + text-align: center; + font-size: 30rpx; + color: #8f6262; + max-width: 160rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + overflow-x: scroll; + overflow-y: hidden; + /*解决ios上滑动不流畅*/ + -webkit-overflow-scrolling: touch; + + &.click { + font-weight: bold; + font-size: 30rpx; + color: #e93323; + + .underline { + opacity: 1; + } + } + } + + .underlineBox { + height: 3px; + width: 20%; + display: flex; + align-content: center; + justify-content: center; + transition: 0.5s; + + .underline { + width: 60rpx; + height: 4rpx; + background-color: #e93323; + } + } + } + .muau-header { margin-top: 20rpx; background-color: #ffffff; // height: 220rpx; - padding: 10rpx 0; + padding: 10rpx 0; border-radius: 12px; z-index: 10; box-shadow: 0 0 7px #a3a3a3; .muau { - height: 40rpx; width: 160rpx; text-align: center; @@ -838,9 +891,7 @@ view:hover { color: red } - } - } .order-index { @@ -913,7 +964,7 @@ .header { padding-top: 30rpx; - margin: 0 20rpx; + margin: 0 20rpx 20rpx; .header_count { width: 710rpx; @@ -1008,10 +1059,10 @@ flex: 1; min-width: 0; padding: 0 10rpx 0 20rpx; - display: flex; - flex-direction: column; - justify-content: space-around; - min-height: 150rpx; + display: flex; + flex-direction: column; + justify-content: space-around; + min-height: 150rpx; .name { color: #282828; @@ -1038,24 +1089,26 @@ line-height: 28rpx; margin-right: 8rpx; } - - .stock_type{ - display: flex; - margin-top: 10rpx; - font-size: 20rpx; + + .stock_type { + display: flex; + margin-top: 10rpx; + font-size: 20rpx; color: #868686; - flex-wrap: wrap; - .type_btn{ - border: 2rpx solid #868686; - margin-right: 15rpx; - padding: 2rpx 10rpx 3rpx 10rpx; - border-radius: 40rpx; - } - .btn_a{ - border: 2rpx solid #F84221; - color: #F84221; - } - } + flex-wrap: wrap; + + .type_btn { + border: 2rpx solid #868686; + margin-right: 15rpx; + padding: 2rpx 10rpx 3rpx 10rpx; + border-radius: 40rpx; + } + + .btn_a { + border: 2rpx solid #F84221; + color: #F84221; + } + } .money-wrap { margin-top: 5rpx; @@ -1166,11 +1219,12 @@ display: flex; align-items: center; padding: 5px; - width: 80%; - margin: 0 auto; - &>view{ - flex-shrink: 0; - } + width: 80%; + margin: 0 auto; + + &>view { + flex-shrink: 0; + } input { background: #F5F5F5; @@ -1178,7 +1232,7 @@ border: 1px solid #999999; padding-left: 3px; margin-left: 3px; - flex: 1; + flex: 1; } } @@ -1205,95 +1259,109 @@ } } } - .menu_cls { - background-color: white; - // height: 199.77rpx; - border-radius: 10rpx; - padding: 20rpx 20rpx 0 20rpx; - margin-top: 20rpx; - font-size: 26.29rpx; - height: 220rpx; - width: 100%; - - .menu_li { - // margin-right: 20rpx; - // background-color: red; - // width: 50vw; - display: flex; - flex-direction: column; - align-items: center; - min-width: 140rpx; - height: auto; - // width: 120rpx; - // display: inline-block; - .image{ - border: 5rpx solid #fff; - } - .li_text{ - flex: 1; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - text-align: center; - padding: 1rpx 10rpx 4rpx 10rpx; - } - } - .menu_li_on{ - .image{ - border: 5rpx solid #ff6d20; - border-radius: 50%; - } - .li_text{ - background-color: #ff6d20; - border-radius: 2em; - color: #fff; - padding: 1rpx 10rpx 4rpx 10rpx; - } - } - - } - .lable-popup{ - width: 600rpx; - border-radius: 14rpx; - background-color: #fff; - padding: 28rpx; - .stock_type{ - display: flex; - flex-wrap: wrap; - margin-top: 28rpx; - font-size: 28rpx; - .type_btn{ - padding: 8rpx 20rpx 10rpx 20rpx; - border: 2rpx solid #898989; - border-radius: 50rpx; - margin: 0 10rpx; - margin-bottom: 15rpx; - } - .btn_a{ - border: 2rpx solid #F84221; - color: #F84221; - } - } - .btn-box{ - display: flex; - justify-content: flex-end; - margin-top: 30rpx; - .pra, .cal{ - font-size: 28rpx; - background-color: #ff6d20; - color: #FFF; - padding: 10rpx 40rpx; - } - .cal{ - background-color: #999999; - margin-right: 40rpx; - } - } - } - .search{ - width: 710rpx; - margin: 0 auto; - padding-top: 30rpx; - } + + .menu_cls { + background-color: white; + // height: 199.77rpx; + border-radius: 10rpx; + padding: 20rpx 20rpx 0 20rpx; + margin-top: 20rpx; + font-size: 26.29rpx; + height: 220rpx; + width: 100%; + + .menu_li { + // margin-right: 20rpx; + // background-color: red; + // width: 50vw; + display: flex; + flex-direction: column; + align-items: center; + min-width: 140rpx; + height: auto; + + // width: 120rpx; + // display: inline-block; + .image { + border: 5rpx solid #fff; + } + + .li_text { + flex: 1; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; + padding: 1rpx 10rpx 4rpx 10rpx; + } + } + + .menu_li_on { + .image { + border: 5rpx solid #ff6d20; + border-radius: 50%; + } + + .li_text { + background-color: #ff6d20; + border-radius: 2em; + color: #fff; + padding: 1rpx 10rpx 4rpx 10rpx; + } + } + + } + + .lable-popup { + width: 600rpx; + border-radius: 14rpx; + background-color: #fff; + padding: 28rpx; + + .stock_type { + display: flex; + flex-wrap: wrap; + margin-top: 28rpx; + font-size: 28rpx; + + .type_btn { + padding: 8rpx 20rpx 10rpx 20rpx; + border: 2rpx solid #898989; + border-radius: 50rpx; + margin: 0 10rpx; + margin-bottom: 15rpx; + } + + .btn_a { + border: 2rpx solid #F84221; + color: #F84221; + } + } + + .btn-box { + display: flex; + justify-content: flex-end; + margin-top: 30rpx; + + .pra, + .cal { + font-size: 28rpx; + background-color: #ff6d20; + color: #FFF; + padding: 10rpx 40rpx; + } + + .cal { + background-color: #999999; + margin-right: 40rpx; + } + } + } + + .search { + width: 710rpx; + margin: 0 auto; + padding-top: 30rpx; + } \ No newline at end of file diff --git a/pages/withdrawal/add.vue b/pages/withdrawal/add.vue index 718e064..0981ad5 100644 --- a/pages/withdrawal/add.vue +++ b/pages/withdrawal/add.vue @@ -194,6 +194,18 @@ + + + + + + + 认证失败 + 请检查“姓名”,“身份证”,“银行卡”,“手机号码”是否正确 + 当日剩余认证次数({{errorCount}})次 + + + @@ -208,6 +220,7 @@ export default { data() { return { + modalShow: false, list: [], show: false, bankList: [], //银行列表 @@ -226,7 +239,8 @@ icon: '' }, mer_id: '', - isCompany: '' + isCompany: '', + errorCount: 0 } }, @@ -237,6 +251,7 @@ } if (opt.mer_id) { this.mer_id = opt.mer_id; + if (opt.hasOwnProperty('isOwn') && (opt.isOwn === 0 || opt.isOwn == '0')) { this.list = [{ name: '对公账户' @@ -262,7 +277,7 @@ }] } - //如果绑定银行卡用户为个体户 则不能添加对公账户,只能添加法人账户 is_company =0 个体户 + //如果绑定银行卡用户为个体户 则不能添加对公账户,只能添加法人账户 is_company = 0 个体户 const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company; this.isCompany = isCompany; if (isCompany != 1) { @@ -374,9 +389,12 @@ title: '请输入正确的手机号!' }); } - - + let that = this; + uni.showLoading({ + title: "绑定中..." + }) addBank(this.mer_id, this.bindForm).then(res => { + uni.hideLoading() this.$util.Tips({ title: '提交成功,请等待后台审核!' }, () => { @@ -385,11 +403,20 @@ }) }); }).catch(err => { - uni.showToast({ - title: err, - duration: 3000, - icon: "none" - }) + uni.hideLoading() + if (isNaN(err)) { + uni.showToast({ + title: err, + icon: "none", + duration: 3000 + }) + } else { + this.errorCount = err; + that.modalShow = true; + setTimeout(() => { + that.modalShow = false; + }, 3000) + } }) }, @@ -678,4 +705,30 @@ } } } + + .modal-wrap { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + pointer-events: none; + + .modal { + font-size: 28rpx; + color: #fff; + padding: 20rpx 30rpx; + background: rgba(0, 0, 0, .7); + max-width: 60%; + border-radius: 10rpx; + + view { + line-height: 32rpx; + margin-bottom: 10rpx; + } + } + } \ No newline at end of file diff --git a/pages/withdrawal/progress.vue b/pages/withdrawal/progress.vue index 6d91621..e1fe213 100644 --- a/pages/withdrawal/progress.vue +++ b/pages/withdrawal/progress.vue @@ -54,7 +54,7 @@ 审核不通过:{{item.fail_msg}} + @click="handleToUpdate(item)"> 去修改 @@ -97,9 +97,16 @@ methods: { // 修改 - handleToUpdate(id) { + handleToUpdate(item) { + //如果绑定银行卡用户为个体户 则不能添加对公账户,只能添加法人账户 is_company =0 个体户 + const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company; + if (isCompany != 1 && item.is_own === 0) return; + + let strUrl = "?mer_id=" + this.mer_id; + strUrl += "&id=" + item.id + uni.redirectTo({ - url: "/pages/withdrawal/add?id=" + id + url: "/pages/withdrawal/add" + strUrl }) },