This commit is contained in:
zmj 2024-05-20 16:03:31 +08:00
parent a0ed531272
commit 9077a7a064
16 changed files with 609 additions and 217 deletions

View File

@ -89,7 +89,7 @@
index: 4,
visible: false
})
// #ifdef H5
// #ifdef H5s
uni.setTabBarItem({
index: 2,
visible: false

View File

@ -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)"
}
}
}]
]
}
}
},

View File

@ -49,7 +49,7 @@
<view class="step1" v-if='step==1'>
<view class="card">
<view class="card-tit">
名称
供应商名称
</view>
<u--input placeholder="店铺名称" :maxlength='20' style="height: 100rpx;" border="surround"
v-model="formData.mer_name">
@ -57,7 +57,7 @@
</view>
<view class="card">
<view class="card-tit">
电话
供应商电话
</view>
<u--input placeholder="电话号码" :maxlength='20' style="height: 100rpx;" border="surround"
v-model="formData.phone">
@ -65,7 +65,7 @@
</view>
<view class="card">
<view class="card-tit">
分类
供应商分类
</view>
<view class="card-cont">
<view class="card-cont-li" @click="showStoreType=true">
@ -76,7 +76,7 @@
</view>
<view class="card">
<view class="card-tit">
位置
供应商位置
</view>
<!-- #ifdef APP-PLUS -->
<view @click="getLocation"
@ -97,8 +97,11 @@
<u-transition :show="step==2" :mode="step==1?'slide-right':'slide-right'">
<view class="step2" v-if='step==2'>
<view class="card">
<view class="card-tit">
请上传营业执照
<view class="card-tit" style='margin-bottom: 0;'>
上传和拍摄自动识别
</view>
<view class="tips">
请上传真实的营业执照
</view>
<view class="upload">
<view class='uploadimg' @click="handleChooseImage(1)">
@ -113,13 +116,13 @@
</view>
<view class="card">
<view class="card-tit">
店铺资质
营业执照详情
</view>
<view class="card-cont">
<view class="card-cont-li">
<view class="ellipsis" style="display: flex;align-items: center;">
详细地址 <u--input style="margin-left: 40rpx;width: 500rpx;" border="none"
v-model="formData.address">
v-model="formData.address" placeholder='自动识别'>
</u--input>
</view>
</view>
@ -127,7 +130,7 @@
<view class="card-cont-li">
<view class="ellipsis" style="display: flex;align-items: center;">
公司名称 <u--input style="margin-left: 40rpx;width: 500rpx;" border="none"
v-model="formData.company_name">
v-model="formData.company_name" placeholder='自动识别'>
</u--input>
</view>
</view>
@ -135,9 +138,7 @@
<view class="card-cont-li">
<view class="ellipsis" style="display: flex;align-items: center;">
法人名称 <u--input style="margin-left: 40rpx;width: 500rpx;" border="none"
v-model="formData.company_nickname">
v-model="formData.company_nickname" placeholder='自动识别'>
</u--input>
</view>
</view>
@ -145,7 +146,7 @@
<view class="card-cont-li">
<view class="ellipsis" style="display: flex;align-items: center;">
社会信用代码 <u--input @blur='creditCodeInput' style="margin-left: 40rpx;width: 500rpx;"
border="none" v-model="formData.social_credit_code">
border="none" v-model="formData.social_credit_code" placeholder='自动识别'>
</u--input>
</view>
</view>
@ -194,7 +195,7 @@
<view class="submit-btn" v-if='step!=3'>
<u-button text="下一步" @click="step=2" v-if="step==1" shape='circle'
color=" linear-gradient( 132deg, #38BE41 0%, #20B128 100%)"></u-button>
<u-button text="添加店铺" @click="submit" v-else shape='circle'
<u-button text="提交资质认证" @click="submit" v-else shape='circle'
color=" linear-gradient( 132deg, #38BE41 0%, #20B128 100%)"></u-button>
<view v-if="step==2" @click="step=1"
style="text-align: center;color: #777777;font-size: 24rpx;margin-top: 20rpx;">
@ -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;
}
</style>

View File

@ -227,6 +227,9 @@
</template>
<script>
import {
getSTokenApi
} from "@/api/supplier.js"
import {
mapState,
mapGetters
@ -252,6 +255,9 @@
isNewMer
} from '@/api/user.js';
// #endif
import {
showTab
} from "@/utils/showTab.js"
export default {
components: {
@ -298,12 +304,13 @@
},
created() {},
onLoad() {
// #ifdef APP
this.subNVue = uni.getSubNVueById('concat')
let that = this
uni.$on('diverGatherSubEmit', function(data) {
that.clickMenu(that.nowMenuList[0])
})
// #endif
},
onShow() {
let that = this
@ -328,7 +335,7 @@
menu = [];
}
this.nowMenuList = menu;
this.isSupplierFn()
// #ifdef APP-PLUS
if (Boolean(this.userInfo.service?.mer_id)) {
isNewMer(this.userInfo.uid, this.userInfo.service?.mer_id).then(
@ -386,6 +393,21 @@
}
},
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() {
this.subNVue.show('zoom-out', 300)
uni.$emit('diverGatherEmit', this.elInfo);

View File

@ -18,13 +18,20 @@
我是农民用户
</view>
</view>
<view class="li" style="margin-top: 50rpx;" @click="navSw('/pages/index/index',true)">
<view class="li" style="margin-top: 50rpx;" @click="navSw('/pages/index/index',1)">
<u-image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/48aed202402260946123969.webp" width="690rpx"
height="200rpx" style="position: absolute;"></u-image>
<view class="btn">
我是商户
</view>
</view>
<view class="li" style="margin-top: 50rpx;" @click="navSw('/pages/index/index',2)">
<u-image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/48aed202402260946123969.webp" width="690rpx"
height="200rpx" style="position: absolute;"></u-image>
<view class="btn">
我是供应商
</view>
</view>
</view>
</template>
@ -44,9 +51,9 @@
url
})
},
navSw(url, isNewStore) {
uni.setStorageSync('newStore', Boolean(isNewStore))
// return
navSw(url, isNewStoreType) {
if (isNewStoreType == 1) uni.setStorageSync('newStore', true);
if (isNewStoreType == 2) uni.setStorageSync('newSupplier', true);
uni.switchTab({
url: url
})

View File

@ -648,19 +648,12 @@
},
onShow() {
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)
})
if (uni.getStorageSync('newStore')) this.openDiver();
let that = this;
that.isIntegral = uni.getStorageSync('isIntegral')
// #ifdef APP-PLUS
this.isSupplierFn() /*获取供应商toke*/
this.openNewMerDiver() /*新商户入驻商户引导页*/
this.openNewSuppierDiver() /*新供应商入驻商户引导页*/
if (that.appUpdate.openUpgrade == '1') {
that.alertAppUpdate();
}
@ -675,7 +668,6 @@
})
})
this.isIndexClick = false;
if (this.isLogin) {
this.getUserInfo();
}
@ -692,9 +684,6 @@
},
},
onPullDownRefresh() {
// this.overflow = true;
// this.reconnect();
// that.overflow = true;
// #ifdef APP-PLUS
setTimeout(() => {
this.hotPage = 1;
@ -708,9 +697,25 @@
},
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() {
openNewMerDiver() {
// #ifdef APP
if (!uni.getStorageSync('newStore')) return;
this.subNvue = uni.getSubNVueById('newUser')
this.subNvue.show('slide-in-left', 300)
uni.$on('offSubnvue', () => {
@ -721,12 +726,6 @@
})
}
});
// uni.$on('diverIndexSubEmit', () => {
// this.subNvue.hide('slide-out-left')
// uni.switchTab({
// url: '/pages/gather/gather'
// })
// })
// #endif
},
@ -748,6 +747,22 @@
})
}
},
/* 新供应商入驻引导页*/
openNewSuppierDiver() {
let isNewSupplire = Boolean(uni.getStorageSync('newSupplier'));
if (!isNewSupplire) return;
this.subNvue = uni.getSubNVueById('supplier')
this.subNvue.show('slide-in-left', 300)
uni.$on('offSubnvue', () => {
this.subNvue.hide('slide-out-left')
if (uni.getStorageSync("newSupplier")) {
uni.switchTab({
url: '/pages/user/index'
})
}
});
},
loadCoupon() {
if (!this.showCoupon && !uni.getStorageSync('show_coupon') && uni.getStorageSync('is_new_user')) {
getNewPeopleCouponLst().then(res => {

View File

@ -0,0 +1,161 @@
<template>
<view class="">
<view class="jump" @click="jump">
<text class="font">跳过</text>
</view>
<view class="next-btn center" :style="{ left:screenWidth/2,top:(screenHeight-96)}">
<text class="next-btn-text font" style="line-height: 76rpx;" @click="next">下一步(1/2)</text>
</view>
<view class="tips-box" style="position: absolute;right: 20px;" :style="{top:screenHeight-215}">
<view class="tips" style="position: absolute;padding-left: 20px;">
<view class="tras">
<text style="font-size: 28rpx;line-height: 100rpx;color: white;"> 点击我的页面,进行供应商户入驻
</text>
</view>
</view>
<image src="/static/images/starpng.png" class="start" mode="">
</image>
</view>
<view class="target" :style="{left:screenWidth/4*3,top:screenHeight-68}" @click="next">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/96aba202405171618278261.png"
class="target-icon"></image>
<text class="target-text">我的</text>
</view>
<view :style="{left:screenWidth/4*3,top:screenHeight-130}">
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;"></image>
</view>
<image src="/static/images/greenLine.png" class="greenLine"
:style="{left:screenWidth/4*3+15,top:screenHeight-120}" mode=""></image>
</view>
</template>
<script>
export default {
data() {
return {
screenHeight: 0,
screenWidth: 0,
isAct: false
}
},
methods: {
jump() {
uni.setStorageSync("newSupplier", false)
uni.$emit('offSubnvue');
},
next() {
uni.$emit('offSubnvue');
}
},
onShow() {
let that = this
let data = (uni.getWindowInfo())
this.screenHeight = data.screenHeight
this.screenWidth = data.screenWidth
},
onLoad() {
}
}
</script>
<style>
.jump {
position: absolute;
right: 30rpx;
top: 80rpx;
border: 1px solid white;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
.font {
font-size: 28rpx;
color: white;
lines: 1;
text-align: center;
}
.center {
transform: translateX(-50%);
}
.next-btn {
position: absolute;
width: 240rpx;
height: 76rpx;
border: 1px solid white;
border-radius: 38rpx;
background: rgba(255, 255, 255, 0.4);
}
.target {
width: 136rpx;
height: 136rpx;
background-color: white;
border-radius: 136rpx;
}
.target-icon {
width: 50rpx;
height: 50rpx;
position: absolute;
left: 68rpx;
transform: translate(-50%, -50%);
top: 68rpx;
}
.target-text {
font-size: 20rpx;
position: absolute;
left: 68rpx;
transform: translate(-50%, 0);
top: 100rpx;
}
.pointer {
position: absolute;
}
.tips-box {
width: 462rpx;
height: 178rpx;
position: absolute;
padding-top: 72rpx;
position: absolute;
}
.start {
width: 72rpx;
height: 72rpx;
position: absolute;
right: 0;
top: 20px;
}
.tips {
width: 462rpx;
height: 106rpx;
background-color: #5BE157;
border-radius: 20rpx;
}
.tras {
width: 462rpx;
transition-property: width;
transition-duration: 3s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.act {
width: 462rpx;
}
.greenLine {
width: 35px;
height: 60px;
position: absolute;
}
</style>

View File

@ -196,6 +196,9 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
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 + '');

View File

@ -11,7 +11,6 @@
<text>账户绑定</text> <u-icon color="#20B128" name="arrow-right"></u-icon>
</view>
</view>
{{form}}
<view class="form">
<u-form labelPosition="left" borderBottom :label-style="{fontSize:'30rpx'}" labelWidth='70'>
<u-form-item label="开户银行" prop="userInfo.name" borderBottom ref="item1" @click="showPop=true">
@ -39,7 +38,6 @@
<view class="" style="margin-top: 20rpx;color: red;" v-if="false">
审核失败,请重新提交审核
</view>
<view class="submit-btn">
<u-button text="提交绑定" @click="submit" shape="circle" color="#50C758"></u-button>
</view>

View File

@ -45,8 +45,6 @@
</view>
</view>
<view class="status-png" v-if="tabIndex==2">
<!-- <image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
</image> -->
<image v-if="item.is_adopt==1" :src="waitPng" style="width: 108rpx; height: 84rpx;">
</image>
<image v-else-if="item.is_adopt==2" :src="successPng" style="width: 108rpx; height: 84rpx;">
@ -64,9 +62,7 @@
<u-empty v-if="lists.length==0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view>
<view class="detail" @click="navgo('/pages/quote/supplierFinancialy')">
提现
</view>
<view class="submit-btn" v-if="tabIndex==1">
<u-button shape='circle' color='#20B128' @click="submit" text="提交"></u-button>
</view>
@ -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;

View File

@ -12,35 +12,34 @@
<u-search :showAction="true" v-model="keyword" :actionStyle="{color:'#20B128'}" actionText="搜索"
placeholder="输入商品分类" :animation="true" @search="getLists" @custom='getLists'></u-search>
</view>
</view> -->
<u-empty v-if="lists.length==0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
<view class="content">
<view class="li" v-for="(item,index) in lists" :key="index"
@click="navgo(`/pages/quote/index?date=${item.name.substring(0, 10)}`)">
<view>
{{item.name}}
</view>
<view style="display: flex;justify-content: space-between;margin: 20rpx 0;">
<text>
{{item.labels}} | {{item.nums}}
</text>
<view style="display: flex;align-items: center;" v-if="item.status==0">
<text style="margin-right: 10rpx;color: #20B128;">待报价</text>
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/fcc66202405171031441742.png"
width="32rpx" height="32rpx"></u--image>
</view>
<view style="display: flex;align-items: center;" v-else>
<text style="margin-right: 10rpx;color:#FC452F ;">已报价</text>
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/16ff3202405171032208362.png"
width="32rpx" height="32rpx"></u--image>
<view class="li-head" :class="item.status !=0?'act':'' ">
<view style="display: flex;align-items: center;font-size: 28rpx;">
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/90b74202405201510453389.png"
width="28rpx" height="28rpx" style="margin-right: 10rpx;"></u--image>
<text> {{item.name}}</text>
</view>
<text v-if="item.status ==0"
style="margin-right: 10rpx;color: #20B128;padding:4rpx 10rpx;background-color: #E4F6E5;border-radius: 5rpx;">待报价</text>
<text v-else
style="margin-right: 10rpx;color: #FC452F;padding:4rpx 10rpx;background-color: #FFEBE3;border-radius: 5rpx;">已报价</text>
</view>
<view style="padding: 20rpx;">
商品分类: {{item.labels}}
</view>
<view style="padding: 0 20rpx;padding-bottom: 20rpx;">
商品数量: {{item.nums}}
</view>
</view>
<!-- <view style="color: #777777;font-size: 24rpx;">
2024-05-16 18:00
</view> -->
<view class="detail" @click="navgo('/pages/quote/supplierFinancialy')">
提现
</view>
</view>
</view>
@ -77,13 +76,17 @@
},
onLoad() {
uni.showTabBar()
},
onPullDownRefresh() {
this.getLists()
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.box {
// padding-top: 250rpx;
min-height: 95vh;
.top {
position: fixed;
@ -106,9 +109,37 @@
.li {
background-color: white;
padding: 20rpx;
margin-bottom: 20rpx;
border-radius: 16rpx;
overflow: hidden;
.li-head {
display: flex;
align-items: center;
color: #707070;
justify-content: space-between;
font-size: 22rpx;
background: linear-gradient(92deg, rgba(226, 255, 228, 0.3) 0%, #FFFFFF 100%);
padding: 20rpx;
}
.act {
background: linear-gradient(86deg, rgba(255, 222, 212, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
}
}
.detail {
width: 88rpx;
height: 88rpx;
border-radius: 88rpx;
text-align: center;
line-height: 88rpx;
background-color: #50C758;
color: white;
position: absolute;
bottom: 150px;
right: 40rpx;
}
}
</style>

View File

@ -180,7 +180,8 @@
<view v-if="item.isShow" class="item ">
<view @click="authTo(item.url)" class="item-count">
<image v-if="showSkeleton" class="skeleton_image skeleton-radius"></image>
<image v-else :src="item.pic" class="targets"></image>
<image v-else :src="item.pic" class="targets" :class="'targets'+item.group_data_id">
</image>
<text>{{item.name}}</text>
</view>
</view>
@ -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({

View File

@ -0,0 +1,167 @@
<template>
<view class="">
<view class="jump" @click="next">
<text class="font">跳过</text>
</view>
<view class="next-btn center" :style="{ left:screenWidth/2,top:(screenHeight-96)}">
<text class="next-btn-text font" style="line-height: 76rpx;" @click="next">我知道了</text>
</view>
<view class="target" :style="{left:left-20,top:top-13.5}" @click="next">
<image src="http://lihai001.oss-cn-chengdu.aliyuncs.com/def/6202d269b6163b9ec7a4383559fc67a8.png"
class="target-icon"></image>
<text class="target-text">供应入驻</text>
</view>
<view :style="{left:left-20+'px',top:top-70+'px'}" class="trans1">
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;"></image>
</view>
<view class="tips-box" :style="{left:left-100,top:top-170}">
<view class="tips" style="position: absolute;padding-left: 20px;">
<view class="tras" :class="{act:isAct}">
<text style="font-size: 28rpx;line-height: 100rpx;color: white;">点击我的页面,进行供应商入驻</text>
</view>
</view>
<image src="/static/images/starpng.png" class="start" mode="">
</image>
</view>
<image src="/static/images/greenLine.png" class="greenLine" :style="{left:left-3.5,top:top-70}" mode="">
</image>
</view>
</template>
<script>
export default {
data() {
return {
screenHeight: 0,
screenWidth: 0,
isAct: false,
left: 0,
top: 0,
}
},
methods: {
next() {
uni.$emit('offnewSupplierSubnvue');
uni.setStorageSync("newSupplier", false)
}
},
onLoad() {
let that = this
uni.$on('openSupplierSubnvue', (data) => {
console.log('接收消息', data.top, data.left)
this.left = data.left
this.top = data.top
})
const res = uni.getSystemInfo({
success: (res => {
this.screenHeight = res.screenHeight
this.screenWidth = res.screenWidth
})
});
}
}
</script>
<style>
.jump {
position: absolute;
right: 30rpx;
top: 80rpx;
border: 1px solid white;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
.font {
font-size: 28rpx;
color: white;
lines: 1;
text-align: center;
}
.center {
transform: translateX(-50%);
}
.next-btn {
position: absolute;
width: 240rpx;
height: 76rpx;
border: 1px solid white;
border-radius: 38rpx;
background: rgba(255, 255, 255, 0.4);
}
.target {
width: 136rpx;
height: 136rpx;
background-color: white;
border-radius: 136rpx;
}
.target-icon {
width: 50rpx;
height: 50rpx;
position: absolute;
left: 68rpx;
transform: translate(-50%, -50%);
top: 68rpx;
}
.target-text {
font-size: 20rpx;
position: absolute;
left: 68rpx;
transform: translate(-50%, 0);
top: 100rpx;
}
.pointer {
position: absolute;
}
.tips-box {
width: 462rpx;
height: 178rpx;
position: absolute;
padding-top: 72rpx;
position: absolute;
}
.start {
width: 72rpx;
height: 72rpx;
position: absolute;
right: 0;
top: 20px;
}
.tips {
width: 462rpx;
height: 106rpx;
background-color: #5BE157;
border-radius: 20rpx;
}
.tras {
width: 462rpx;
transition-property: width;
transition-duration: 3s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.act {
width: 462rpx;
}
.greenLine {
width: 35px;
height: 60px;
position: absolute;
}
</style>

View File

@ -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: '登录失败,开起数据流量后重新登录'
});
}
})

View File

@ -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() {

View File

@ -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)