1111111111

This commit is contained in:
2024-03-06 10:40:48 +08:00
parent 73a486c2c6
commit 11fad13f23
12 changed files with 590 additions and 93 deletions

View File

@@ -34,15 +34,23 @@
<view class="center" style="">
<view
style="width: 24%;display: flex;flex-direction: column;overflow-y: auto;padding-top: 20px;">
style="width: 24%; display: flex;flex-direction: column;
position: relative;">
<view style="width: 100%;display: flex;flex-direction: column; ">
<view style="width: 100%;display: flex;flex-direction: column;
height: 70%; overflow: hidden; overflow-y: auto;">
<view v-for="(item,index) in data.typeVos" @click="labelClick(index,item)"
style="display: flex;flex-direction: column;justify-content: center;">
<text class="label" :class="{'label2':selectIndex==index}">{{item.name}}</text>
</view>
</view>
<view v-if="isPurchase == '1'" @click="newUserGift()" style="display: flex;flex-direction: column;justify-content: center;align-items: center;width: 100%;
position: absolute; bottom: 0; margin-bottom: 10px;">
<image src="../../static/newUserGift.png" style="width: 40px;height: 40px;"></image>
<text style="font-size: 12px;margin-top: 5px;color: #666;">新人专享</text>
</view>
</view>
@@ -142,6 +150,22 @@
</view>
</view>
<view v-if="notAuthentication"
style="display: flex;flex-direction: column;justify-content: center;align-items: center;margin-top: 5vw;">
<image src="../../static/authentication_icon.png" mode="scaleToFill"
style="width: 80px;height: 80px; "></image>
<view style="display: flex;flex-direction: column;align-items: center; justify-content: center;margin: 20px 30px;
">
<text style="text-indent: 2em; font-size: 16px; color: #999;">您好企业菜窖需要通过认证才能进行购买</text>
<text style="font-size: 14px;color: #fff;padding: 10px 40px; border-radius: 20px;
background: #FF9901;margin-top: 20px;" @click="authentication()">立即认证</text>
</view>
</view>
</view>
@@ -166,7 +190,7 @@
style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
{{data.brandVos[selectIndex2].qssl}}斤起订</view>
<!-- <view style="display: flex;flex-direction: row;align-items: center;"
<view style="display: flex;flex-direction: row;align-items: center;"
@click="showPop2()">
<text
style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;text-decoration:underline;font-style:oblique;">
@@ -174,7 +198,7 @@
<text
style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;margin-left: 2px;">
>></text>
</view> -->
</view>
</view>
</view>
@@ -363,6 +387,105 @@
</view>
<!-- 企业认证弹框 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal5'></view>
<view class="modalDlg2" catchtouchmove='preventTouchMove' v-if='showModal5'>
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;
width: 80%; border-radius: 20px; background: #fff;">
<image src="../../static/authentication_top.png"
style="width: 100%; height: 15vw;border-top-left-radius: 20px;border-top-right-radius: 20px; "
mode="scaleToFill"></image>
<image src="../../static/authentication_icon.png" style="width: 80px;height: 80px;margin-top: -40px;"
mode="scaleToFill"></image>
<text style="font-size: 18px;color: #FF9900;margin-top: 16px;">温馨提示</text>
<text
style="margin-top: 16px;font-size: 14px;color: #333;padding-left: 30px;padding-right: 30px;">您好企业菜窖需要通过认证才能进行购买</text>
<view
style="display: flex;flex-direction: row;align-items: center;margin-top: 37px;margin-bottom: 34px;">
<text style="color: #FF9900;font-size: 14px;border: 1px #FF9900 solid;height: 35px;line-height: 35px;border-radius: 22px;
width: 25vw;text-align: center; margin-right: 20px;" @click="colseDialog5()">取消</text>
<text style="color: #fff;font-size: 14px;background: #FF9900; height: 35px;line-height: 35px;border-radius: 22px;
width: 25vw;text-align: center;margin-left: 20px;" @click="authentication()">立即认证</text>
</view>
</view>
</view>
<!-- 企业认证审核弹框 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal6'></view>
<view class="modalDlg2" catchtouchmove='preventTouchMove' v-if='showModal6'>
<view style="display: flex;flex-direction: column;width: 80%; border-radius: 20px; background: #fff;">
<view v-if="authenticationType=='203'" style="display: flex;flex-direction: row;align-items: center;
padding: 12px 16px;">
<view style="flex: 1;"></view>
<image src="../../static/close2.png" style="width:25px; height: 25px;" mode="scaleToFill"
@click="colseDialog6()"></image>
</view>
<view v-if="authenticationType=='202'"
style="display: flex;flex-direction: column;width: 100%;justify-content: center;align-items: center;margin-top: 20px;">
<image src="../../static/inReview.png" style="width: 80px;height: 80px;" mode="scaleToFill"></image>
<text
style="font-size: 18px;color: #333333;margin-top: 12px;font-weight: 600;font-family: sans-serif;">审核中</text>
<text
style="text-indent: 2em; margin-top: 16px;font-size: 16px;color: #666;padding-left: 30px;padding-right: 30px;">提交成功您的认证信息正在审核中请耐心等待</text>
<text style="color: #fff;font-size: 14px;background: #FF9900; height: 40px;line-height: 40px;border-radius: 22px;
width: 40vw;text-align: center; margin-bottom: 32px;margin-top: 32px;" @click="colseDialog6()">返回</text>
</view>
<view v-if="authenticationType=='203'"
style="display: flex;flex-direction: column;width: 100%;margin-top: -10px;">
<view
style="display: flex;flex-direction: column;width: 100%;justify-content: center;align-items: center;">
<image v-if="authenticationType=='203'" src="../../static/reject.png"
style="width: 80px;height: 80px;" mode="scaleToFill"></image>
<text
style="font-size: 18px;color: #333333;margin-top: 12px;font-weight: 600;font-family: sans-serif;">审核未通过</text>
</view>
<text
style="text-indent: 2em; margin-top: 16px;font-size: 16px;color: #666;padding-left: 30px;padding-right: 30px;">很遗憾您的企业认证申请信息未通过</text>
<text v-if="authenticationRemarks!=''"
style="margin-top: 16px;font-size: 14px;color: #999;padding-left: 30px;padding-right: 30px;">理由{{authenticationRemarks}}</text>
<view
style="display: flex;flex-direction: column;width: 100%;justify-content: center;align-items: center;">
<text style="color: #fff;font-size: 14px;background: #FF9900; height: 40px;line-height: 40px;border-radius: 22px;
width: 40vw;text-align: center; margin-bottom: 32px;margin-top: 32px;" @click="authentication()">修改信息</text>
</view>
</view>
</view>
</view>
</view>
</view>
@@ -374,9 +497,14 @@
return {
imgList: [],
notData: false,
notAuthentication: false,
showModal: false,
showModal1: false,
showModal4: false,
showModal5: false,
showModal6: false,
authenticationType: '',
authenticationRemarks: '',
goodsItem: {
goodsNumber: "",
},
@@ -426,6 +554,7 @@
initWeight: "0",
shareSid: "",
baseDataSuccess: false,
isPurchase:"0",// 0 不显示 1显示
}
},
@@ -443,8 +572,11 @@
console.log("isPurchase", getApp().globalData.isPurchase);
if (getApp().globalData.isPurchase == '1')
if (getApp().globalData.isPurchase == '1'){
this.showModal = true
this.isPurchase = '1'
}
if (getApp().globalData.mobile == '')
this.showModal4 = true
@@ -468,6 +600,10 @@
},
methods: {
newUserGift(){
this.showModal = true
this.isPurchase = '1'
},
showGift() {
let _this = this
@@ -508,6 +644,7 @@
_this.$pay(resp)
_this.showModal2 = false
getApp().globalData.isPurchase = '0'
_this.isPurchase = '0'
console.log("isPurchase", getApp().globalData.isPurchase);
}).catch(e => {})
@@ -523,9 +660,21 @@
colseDialog2() {
this.showModal2 = false
},
colseDialog4(){
colseDialog4() {
this.showModal4 = false
},
colseDialog5() {
this.showModal5 = false
},
colseDialog6() {
this.showModal6 = false
},
authentication() {
// 跳转认证页面
uni.navigateTo({
url: "/pages/me/authentication"
})
},
getBannerList() {
let _this = this
_this.$api.bannerList().then((resp) => {
@@ -542,10 +691,6 @@
}
},
colseDialog() {
this.showModal = false
},
shareGift() {
if (this.shareSid && getApp().globalData.isNewUser) {
@@ -620,19 +765,57 @@
getgoods() {
let _this = this
_this.searchInfo.customerSid = getApp().globalData.sid
_this.searchInfo.brandId = this.data.brandVos[this.selectIndex2].id
_this.searchInfo.categoryId = this.data.typeVos[this.selectIndex].id
var params = {
customerSid: getApp().globalData.sid,
brandId: this.data.brandVos[this.selectIndex2].id
}
_this.$api.isEnterprise(params).then((resp) => {
console.log("isEnterprise>>", resp);
// 正常继续操作 不是企业菜窖类型或已经认证成功
_this.searchInfo.customerSid = getApp().globalData.sid
_this.searchInfo.brandId = _this.data.brandVos[_this.selectIndex2].id
_this.searchInfo.categoryId = _this.data.typeVos[_this.selectIndex].id
_this.$api.getGoodsByType(_this.searchInfo).then((resp) => {
_this.goods = resp
_this.notData = resp.length == 0
_this.getAllPriceOrWeight()
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
_this.$api.getGoodsByType(_this.searchInfo).then((resp) => {
_this.goods = resp
_this.notData = resp.length == 0
_this.notAuthentication = false
_this.getAllPriceOrWeight()
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
}).catch(e => {
console.log("isEnterprise>>", e);
_this.getAllPriceOrWeight()
_this.goods = []
// 错误需判断code 状态
this.authenticationType = e.code
if (e.code == '201') {
// 未认证
this.notAuthentication = true
} else if (e.code == '202' || e.code == '203') {
// 认证审核中 或 认证不通过
this.notAuthentication = false
this.showModal6 = true
this.authenticationRemarks = e.data.remarks
} else {
uni.showToast({
title: e.msg,
icon: 'none',
duration: 5000,
})
}
})
},
jian(item) {