diff --git a/App.vue b/App.vue index 8c62bd0..e92d6a5 100644 --- a/App.vue +++ b/App.vue @@ -89,7 +89,7 @@ index: 4, visible: false }) - // #ifdef H5 + // #ifdef H5s uni.setTabBarItem({ index: 2, visible: false diff --git a/pages.json b/pages.json index 017482a..e8d7d7a 100644 --- a/pages.json +++ b/pages.json @@ -43,6 +43,18 @@ "height": "1000px", "background": "rgba(0,0,0,0.2)" } + }, + { + "id": "supplier", // 唯一标识 + "path": "pages/index/subnvue/supplier", // 页面路径 + "type": "popup", + "style": { + "position": "absolute", + "dock": "right", + "width": "750rpx", + "height": "1000px", + "background": "rgba(0,0,0,0.2)" + } } ] @@ -60,8 +72,8 @@ { "path": "pages/quote/list", "style": { - "enablePullDownRefresh": false, - "navigationBarTitleText": "报价" + "enablePullDownRefresh": true, + "navigationBarTitleText": "报价订单" } }, { @@ -150,17 +162,30 @@ "app-plus": { "scrollIndicator": false, //禁用原生导航栏 "subNVues": [{ - "id": "userSubnvu", // 唯一标识 - "path": "pages/user/subnvue/index", // 页面路径 - "type": "popup", - "style": { - "position": "absolute", - "dock": "right", - "width": "750rpx", - "height": "1500rpx", - "background": "rgba(0,0,0,0.2)" + "id": "userSubnvu", // 唯一标识 + "path": "pages/user/subnvue/index", // 页面路径 + "type": "popup", + "style": { + "position": "absolute", + "dock": "right", + "width": "750rpx", + "height": "1500rpx", + "background": "rgba(0,0,0,0.2)" + } + }, + { + "id": "userNewSupplier", // 唯一标识 + "path": "pages/user/subnvue/userNewSupplier", // 页面路径 + "type": "popup", + "style": { + "position": "absolute", + "dock": "right", + "width": "750rpx", + "height": "1500rpx", + "background": "rgba(0,0,0,0.2)" + } } - }] + ] } } }, diff --git a/pages/bindSupplier/index.vue b/pages/bindSupplier/index.vue index 56a46b0..784b33c 100644 --- a/pages/bindSupplier/index.vue +++ b/pages/bindSupplier/index.vue @@ -49,7 +49,7 @@ - 商户名称 + 供应商名称 @@ -57,7 +57,7 @@ - 商户电话 + 供应商电话 @@ -65,7 +65,7 @@ - 商户分类 + 供应商分类 @@ -76,7 +76,7 @@ - 商户位置 + 供应商位置 - - 请上传营业执照 + + 上传和拍摄自动识别 + + + 请上传真实的营业执照 @@ -113,13 +116,13 @@ - 店铺资质 + 营业执照详情 详细地址 + v-model="formData.address" placeholder='自动识别'> @@ -127,7 +130,7 @@ 公司名称 + v-model="formData.company_name" placeholder='自动识别'> @@ -135,9 +138,7 @@ 法人名称 - - + v-model="formData.company_nickname" placeholder='自动识别'> @@ -145,7 +146,7 @@ 社会信用代码 + border="none" v-model="formData.social_credit_code" placeholder='自动识别'> @@ -194,7 +195,7 @@ - @@ -253,7 +254,9 @@ bankListApi, reSubmitApi } from "@/api/supplier.js" - + import { + Modal + } from "@/libs/uniApi.js"; export default { // components: { // Verify @@ -421,14 +424,11 @@ this.formData.company_name = obj.company_name this.formData.address = obj.company_address this.formData.social_credit_code = obj.social_credit_code - }) this.step = 1 }, - async code(data) { - - }, + async code(data) {}, shoplist(val) { agreeiness({ type: val @@ -452,9 +452,7 @@ uni.hideLoading() }, fail: (res) => { - console.log('err', res) uni.hideLoading() - }, }); @@ -479,17 +477,20 @@ }, submit() { - if (this.formData.data_json) { - delete this.formData.data_json - } - this.formData.is_merchant_type = 2 - applysApi({ - ...this.formData - }).then(ress => { - this.getSuccessData() - }).catch(err => { - console.log(err) - }) + Modal('温馨提示', '确认资料无误后点击确定提交审核').then(() => { + if (this.formData.data_json) { + delete this.formData.data_json + } + this.formData.is_merchant_type = 2 + applysApi({ + ...this.formData + }).then(ress => { + this.getSuccessData() + }).catch(err => { + console.log(err) + }) + }).catch(() => {}) + }, agree() {}, getSuccessData() { @@ -1266,4 +1267,9 @@ } } + + .tips { + color: #E18C34; + font-size: 24rpx; + } \ No newline at end of file diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index 2691c56..6006d5e 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -227,6 +227,9 @@ + + \ No newline at end of file diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue index 71d0740..aa55ffa 100644 --- a/pages/order_addcart/order_addcart.vue +++ b/pages/order_addcart/order_addcart.vue @@ -196,6 +196,9 @@ // +---------------------------------------------------------------------- // | Author: CRMEB Team // +---------------------------------------------------------------------- + import { + getSTokenApi + } from "@/api/supplier.js" import couponListWindow from '@/components/couponListWindow'; import addcartWindow from '@/components/addcartWindow'; import { @@ -321,6 +324,7 @@ mounted: function() {}, onLoad: function(options) {}, onShow: function() { + this.isSupplierFn() let that = this let routes = getCurrentPages(); let curRoute = routes[routes.length - 1].route; @@ -358,6 +362,20 @@ } }, methods: { + /*供应商tabbar,token,引导页相关*/ + isSupplierFn() { + if (!this.isLogin || uni.getStorageSync('LOGIN_STATUS_STOKEN')) return; + getSTokenApi({ + jg_register_id: uni.getStorageSync('jg_id') || '' + }).then(res => { + if (res.data?.token) { + uni.setStorageSync('LOGIN_STATUS_STOKEN', (res.data?.token || '')) + console.log("获取了token") + } + }).catch(err => { + console.log("获取报错", err) + }) + }, tabsChange(e) { this.tabsCurr = e; uni.setStorageSync('tabbar_sale_type', this.tabsCurr + ''); diff --git a/pages/quote/bindAccout.vue b/pages/quote/bindAccout.vue index 6840791..3b4251d 100644 --- a/pages/quote/bindAccout.vue +++ b/pages/quote/bindAccout.vue @@ -11,7 +11,6 @@ 账户绑定 - {{form}} @@ -39,7 +38,6 @@ 审核失败,请重新提交审核 - diff --git a/pages/quote/index.vue b/pages/quote/index.vue index d676dbe..7a00ec2 100644 --- a/pages/quote/index.vue +++ b/pages/quote/index.vue @@ -45,8 +45,6 @@ - @@ -64,9 +62,7 @@ - - 提现 - + @@ -269,19 +265,6 @@ } } - .detail { - width: 88rpx; - height: 88rpx; - border-radius: 88rpx; - text-align: center; - line-height: 88rpx; - background-color: #50C758; - color: white; - position: absolute; - bottom: 100px; - right: 20rpx; - } - .ellipsis { white-space: nowrap; overflow: hidden; diff --git a/pages/quote/list.vue b/pages/quote/list.vue index bb1e633..1051e9c 100644 --- a/pages/quote/list.vue +++ b/pages/quote/list.vue @@ -12,35 +12,34 @@ + --> - - {{item.name}} - - - - {{item.labels}} | 共{{item.nums}}种 - - - 待报价 - - - - 已报价 - + + + + {{item.name}} + 待报价 + 已报价 + + 商品分类: {{item.labels}} + + + 商品数量: 共{{item.nums}}种 + + - - + + 提现 @@ -77,13 +76,17 @@ }, onLoad() { uni.showTabBar() + }, + onPullDownRefresh() { + this.getLists() + uni.stopPullDownRefresh() } } \ No newline at end of file diff --git a/pages/user/index.vue b/pages/user/index.vue index 63de690..d40537b 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -180,7 +180,8 @@ - + + {{item.name}} @@ -308,6 +309,12 @@ import { showTab } from "@/utils/showTab.js"; + import { + getSTokenApi + } from "@/api/supplier.js" + import { + nextTick + } from "vue"; const app = getApp(); export default { components: { @@ -475,46 +482,26 @@ onReady() { // #ifdef APP this.isNodes++; - let that = this - // setTimeout(() => { - // const query = uni.createSelectorQuery().in(this); - // query - // .select(".targets") - // .boundingClientRect((data) => { - // that.elInfo = data - // // #ifdef APP-PLUS - // if (Boolean(uni.getStorageSync('newStore'))) { - // that.subNvue = uni.getSubNVueById('userSubnvu') - // that.subNvue.show('slide-in-left', 300) - // uni.$emit('openUserSubnvue', JSON.stringify(data)) - // } - // // #endif - // }) - // .exec(); - // }, 500) - // #endif - - }, mounted: function() { this.getVersion() }, onShow: function() { + this.isSupplierFn() // #ifdef APP-PLUS + this.openDiver() setTimeout(() => { const query = uni.createSelectorQuery().in(this); query .select(".targets") .boundingClientRect((data) => { that.elInfo = data - // #ifdef APP-PLUS if (Boolean(uni.getStorageSync('newStore'))) { that.subNvue = uni.getSubNVueById('userSubnvu') that.subNvue.show('slide-in-left', 300) uni.$emit('openUserSubnvue', JSON.stringify(data)) } - // #endif }) .exec(); }, 800) @@ -541,6 +528,42 @@ }, 500) }, methods: { + /*供应商tabbar,token,引导页相关*/ + isSupplierFn() { + if (!this.isLogin || uni.getStorageSync('LOGIN_STATUS_STOKEN')) return; + getSTokenApi({ + jg_register_id: uni.getStorageSync('jg_id') || '' + }).then(res => { + if (res.data?.token) { + uni.setStorageSync('LOGIN_STATUS_STOKEN', (res.data?.token || '')) + console.log("获取了token") + } + }).catch(err => { + console.log("获取报错", err) + }) + }, + + /*新供应商入驻引导页*/ + openDiver() { + let isNewSupplier = Boolean(uni.getStorageSync('newSupplier')); + if (!isNewSupplier) return; + let that = this + this.subNvue = uni.getSubNVueById('userNewSupplier') + uni.$on('offnewSupplierSubnvue', () => { + this.subNvue.hide('slide-out-right'); + }) + setTimeout(() => { + that.subNvue.show('slide-in-left', 300) + const query = uni.createSelectorQuery().in(this); + query + .select('.targets1335') + .boundingClientRect((data) => { + uni.$emit('openSupplierSubnvue', (data)) + }) + .exec(); + }, 800) + }, + authTo(url) { if (this.isLogin) { uni.navigateTo({ diff --git a/pages/user/subnvue/userNewSupplier.nvue b/pages/user/subnvue/userNewSupplier.nvue new file mode 100644 index 0000000..5dc6edd --- /dev/null +++ b/pages/user/subnvue/userNewSupplier.nvue @@ -0,0 +1,167 @@ + + + + + \ No newline at end of file diff --git a/pages/users/login/login_copy.vue b/pages/users/login/login_copy.vue index fd2bbfa..2ef7c4d 100644 --- a/pages/users/login/login_copy.vue +++ b/pages/users/login/login_copy.vue @@ -302,9 +302,6 @@ // +---------------------------------------------------------------------- import dayjs from "@/plugin/dayjs/dayjs.min.js"; import sendVerifyCode from "@/mixins/SendVerifyCode"; - import { - getSTokenApi - } from "@/api/supplier.js" import { loginH5, loginMobile, @@ -484,13 +481,6 @@ }); that.$store.commit("SETUID", data.user.uid); that.$store.commit('UPDATE_USERINFO', data.user); - getSTokenApi({ - jg_register_id: uni.getStorageSync('jg_id') || '' - }).then(res => { - if (res.data.token) { - uni.setStorageSync('LOGIN_STATUS_STOKEN', res.data.token) - } - }) let method let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart', '/pages/goods_cate/goods_cate', @@ -610,13 +600,6 @@ }); that.$store.commit("SETUID", data.result.user.uid); that.$store.commit('UPDATE_USERINFO', data.result.user); - getSTokenApi({ - jg_register_id: uni.getStorageSync('jg_id') || '' - }).then(res => { - if (res.data.token) { - uni.setStorageSync('LOGIN_STATUS_STOKEN', res.data.token) - } - }) let method let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart', '/pages/goods_cate/goods_cate', @@ -708,13 +691,6 @@ 'token': data.result.token, 'time': data.result.exp }); - getSTokenApi({ - jg_register_id: uni.getStorageSync('jg_id') || '' - }).then(res => { - if (res.data.token) { - uni.setStorageSync('LOGIN_STATUS_STOKEN', res.data.token) - } - }) that.$store.commit("SETUID", data.result.user.uid); that.$store.commit('UPDATE_USERINFO', data.result.user); let method @@ -773,13 +749,6 @@ 'token': data.result.token, 'time': data.result.exp }); - getSTokenApi({ - jg_register_id: uni.getStorageSync('jg_id') || '' - }).then(res => { - if (res.data.token) { - uni.setStorageSync('LOGIN_STATUS_STOKEN', res.data.token) - } - }) that.$store.commit("SETUID", data.result.user.uid); that.$store.commit('UPDATE_USERINFO', data.result.user); let method @@ -877,13 +846,6 @@ 'token': data.token, 'time': data.exp }); - getSTokenApi({ - jg_register_id: uni.getStorageSync('jg_id') || '' - }).then(res => { - if (res.data.token) { - uni.setStorageSync('LOGIN_STATUS_STOKEN', res.data.token) - } - }) that.$store.commit("SETUID", data.user.uid); that.$store.commit('UPDATE_USERINFO', data.user); @@ -961,13 +923,6 @@ 'token': res.data.token, 'time': res.data.exp }); - getSTokenApi({ - jg_register_id: uni.getStorageSync('jg_id') || '' - }).then(res => { - if (res.data.token) { - uni.setStorageSync('LOGIN_STATUS_STOKEN', res.data.token) - } - }) that.$store.commit("SETUID", res.data.user.uid); that.$store.commit('UPDATE_USERINFO', res.data.user); const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || @@ -1051,13 +1006,6 @@ 'token': res.data.token, 'time': res.data.exp }); - getSTokenApi({ - jg_register_id: uni.getStorageSync('jg_id') || '' - }).then(res => { - if (res.data.token) { - uni.setStorageSync('LOGIN_STATUS_STOKEN', res.data.token) - } - }) that.$store.commit("SETUID", res.data.user.uid); that.$store.commit('UPDATE_USERINFO', res.data.user); const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || @@ -1143,13 +1091,6 @@ 'token': res.data.token, 'time': res.data.exp }); - getSTokenApi({ - jg_register_id: uni.getStorageSync('jg_id') || '' - }).then(res => { - if (res.data.token) { - uni.setStorageSync('LOGIN_STATUS_STOKEN', res.data.token) - } - }) that.$store.commit("SETUID", res.data.user.uid); that.$store.commit('UPDATE_USERINFO', res.data.user); const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || @@ -1304,13 +1245,6 @@ 'token': data.token, 'time': data.exp }); - getSTokenApi({ - jg_register_id: uni.getStorageSync('jg_id') || '' - }).then(res => { - if (res.data.token) { - uni.setStorageSync('LOGIN_STATUS_STOKEN', res.data.token) - } - }) that.$store.commit("SETUID", data.user.uid); that.$store.commit('UPDATE_USERINFO', data.user); @@ -1424,7 +1358,6 @@ uni.preLogin({ provider: 'univerify', success() { - console.log("当前环境支持一键登录") uni.login({ provider: 'univerify', univerifyStyle: oneClickStyle, @@ -1444,18 +1377,6 @@ title: '登录失败,请稍后再试' }); }) - // uniCloud.callFunction({ - // name: 'oneClickLoginFn', - // data: { - // 'access_token': res.authResult - // .access_token, - // 'openid': res.authResult.openid - // } - // }).then(res => { - // console.log(res, '登录成功后的res') - // }).catch(err => { - // console.log(err, 'ererre') - // }) }, fail(res) { // 登录失败 console.log(res.errCode) @@ -1465,7 +1386,7 @@ }, fail(res) { that.$util.Tips({ - title: '当前环境不支持一键登录' + title: '登录失败,开起数据流量后重新登录' }); } }) diff --git a/pages/whole_sale/index.vue b/pages/whole_sale/index.vue index dfae325..a1a50c1 100644 --- a/pages/whole_sale/index.vue +++ b/pages/whole_sale/index.vue @@ -351,6 +351,7 @@ onShow() { this.isIndexClick = false; + this.isSupplierFn() }, onPageScroll(e) { @@ -385,6 +386,19 @@ }, methods: { + /*供应商tabbar,token,引导页相关*/ + isSupplierFn() { + if (!this.isLogin || uni.getStorageSync('LOGIN_STATUS_STOKEN')) return; + getSTokenApi({ + jg_register_id: uni.getStorageSync('jg_id') || '' + }).then(res => { + if (res.data?.token) { + uni.setStorageSync('LOGIN_STATUS_STOKEN', (res.data?.token || '')) + } + }).catch(err => { + console.log("获取报错", err) + }) + }, // 下拉加载 onPulling() { diff --git a/utils/showTab.js b/utils/showTab.js index 58ba9b1..3fe7d45 100644 --- a/utils/showTab.js +++ b/utils/showTab.js @@ -13,6 +13,7 @@ const setTab = (index, visible) => { export const showTab = (data) => { setTab(4, Boolean(uni.getStorageSync('LOGIN_STATUS_STOKEN'))) + setTab(3, !Boolean(uni.getStorageSync('LOGIN_STATUS_STOKEN'))) let user = data || store.state.app.userInfo; if (user.mer_info && user.mer_info.mer_settlement_agree_status) { setTab(1, true)