Browse Source

1111111111

master
guoxing 1 year ago
parent
commit
11fad13f23
  1. 9
      common/request.api.js
  2. 8
      pages.json
  3. 7
      pages/bind/bind_cloudCard.vue
  4. 299
      pages/good/goodsDetail.vue
  5. 223
      pages/home/cloudCard2.vue
  6. 95
      pages/me/authentication.vue
  7. BIN
      static/authentication_icon.png
  8. BIN
      static/authentication_top.png
  9. BIN
      static/inReview.png
  10. BIN
      static/newUserGift.png
  11. BIN
      static/reject.png
  12. 20
      utils/requester.js

9
common/request.api.js

@ -50,7 +50,7 @@ export default {
// 预约记录详情 // 预约记录详情
orderDetails: (params = {}) => request.get("/lpksreservoorder/orderDetails/" + params, params, {}, {}, true), orderDetails: (params = {}) => request.get("/lpksreservoorder/orderDetails/" + params, params, {}, {}, true),
// 商品详情 // 商品详情
goodsDetail: (params = {}) => request.get("/lpkgoods/goodsDetails/" + params, params, {}, {}, true), goodsDetail: (params = {}) => request.get("/lpkgoods/goodsDetails/" + params.sid + "/" + params.customerSid,{}, {}, {}, true),
// 提货点 // 提货点
address: (params = {}) => request.post("/lpkstore/getAllStoreByQuery", params, {}, {}, true), address: (params = {}) => request.post("/lpkstore/getAllStoreByQuery", params, {}, {}, true),
@ -119,6 +119,11 @@ export default {
bannerList: (params = {}) => request.get("/wxapi/banner/list", params), bannerList: (params = {}) => request.get("/wxapi/banner/list", params),
// 获取分类和品牌 // 获取分类和品牌
getGoodsTypeAndBrand: (params = {}) => request.get("/lpkgoods/getGoodsTypeAndBrand", {}, {}, {}, true), getGoodsTypeAndBrand: (params = {}) => request.get("/lpkgoods/getGoodsTypeAndBrand", {}, {}, {}, true),
// 判断企业菜窖是否认证
isEnterprise: (params = {}) => request.get("/lpkgoods/isEnterprise/" + params.customerSid + "/" + params.brandId, +
params, {}, {}, {}, true, true),
// 保存企业认证
saveAuthentication: (params = {}) => request.post("/enterprisecertification/save", params),
// 获取补充菜窖 商品分类列表 // 获取补充菜窖 商品分类列表
getAllGoodsType: (params = {}) => request.get("/lpkgiftcard/getAllGoodsType/" + params, params), getAllGoodsType: (params = {}) => request.get("/lpkgiftcard/getAllGoodsType/" + params, params),
// 获取补充菜窖 商品分类列表 // 获取补充菜窖 商品分类列表
@ -135,7 +140,7 @@ export default {
createVegeOrder: (params = {}) => request.post("/empsreservoorder/createVegeOrder", params), createVegeOrder: (params = {}) => request.post("/empsreservoorder/createVegeOrder", params),
// 我的菜窖 通知公告 // 我的菜窖 通知公告
getNotices: (params = {}) => request.get("/appletnotice/getNotice", params), getNotices: (params = {}) => request.get("/appletnotice/getNotice", params),
// 我的菜窖 新人礼包列表 // 我的菜窖 新人礼包列表
newUserQuota: (params = {}) => request.post("/appletgiftbag/newUserQuota", params), newUserQuota: (params = {}) => request.post("/appletgiftbag/newUserQuota", params),

8
pages.json

@ -146,6 +146,7 @@
"style": { "style": {
"navigationBarTitleText": "产品详情", "navigationBarTitleText": "产品详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
@ -379,6 +380,13 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
},
{
"path" : "pages/me/authentication",
"style": {
"navigationStyle": "custom",
"disableScroll": true
}
} }

7
pages/bind/bind_cloudCard.vue

@ -27,7 +27,7 @@
<!-- <text style="font-size: 12px;color: #666;">{{item.goodsName}}</text> <!-- <text style="font-size: 12px;color: #666;">{{item.goodsName}}</text>
<text style="font-size: 12px;color: #666;">{{item.remarks}}</text> --> <text style="font-size: 12px;color: #666;">{{item.remarks}}</text> -->
<view style="display: flex;flex-direction: row;align-items: center;box-sizing: border-box;"> <view style="display: flex;flex-direction: row;align-items: center;box-sizing: border-box;" @click="itemClick(item.goodsSid)">
<image :src="item.goodsPicUrl" mode="aspectFill" <image :src="item.goodsPicUrl" mode="aspectFill"
style="width: 90px;height: 90px;border-radius: 10px;flex-shrink: 0;"></image> style="width: 90px;height: 90px;border-radius: 10px;flex-shrink: 0;"></image>
@ -146,6 +146,11 @@
colseDialog() { colseDialog() {
this.showModal = false this.showModal = false
}, },
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
getData() { getData() {
let _this = this let _this = this
_this.$api.getTransferByCode(this.page.code).then((resp) => { _this.$api.getTransferByCode(this.page.code).then((resp) => {

299
pages/good/goodsDetail.vue

@ -1,67 +1,111 @@
<template> <template>
<view style="height: 100vh;background: #fff;">
<loading-state ref="pageView" @request="request">
<view style="height: 87vh;overflow: hidden;overflow-y: auto;">
<image :src="data.picUrl" style="width: 100vw;height: 80vw;" mode="aspectFill"></image>
<loading-state ref="pageView" @request="request"> <view style="display: flex;flex-direction: column;background: #fff;padding: 20px 20px 0px 20px;margin-top: 10px;
<view> border-top-left-radius: 20px;border-top-right-radius: 20px;height: 100%;">
<image :src="data.picUrl" style="width: 100vw;height: 80vw;" mode="aspectFill"></image>
<!-- <view <text
style="margin-top: 9px;margin-left: 9px;margin-right: 9px;border-top-left-radius: 13px;border-top-right-radius: 13px;display: flex;flex-direction: column;align-items: center;background-color: #FFFFFF;padding-top: 11px;"> style="font-size: 18px;font-weight: 600;font-family: sans-serif;color: #333;">{{data.name}}</text>
<image src="../../static/goods_price_bg.png"
style="width: 90vw;height: 16vw;border-radius: 10px;position: absolute;"></image> <view style="display: flex;flex-direction: row;justify-content: space-between;margin-top: 10px;">
<view <text style="font-size: 13px;color: #666;">&ensp;&ensp;&ensp;&ensp;</text>
style="display: flex;flex-direction: row;justify-content: space-between;width: 80vw;position: relative;height: 16vw;align-items: center;color: white;"> <text style="font-size: 13px;color: #999;">{{data.price}}/{{data.specificationUnit}}</text>
<view> </view>
<text style="font-size: 14px;font-weight: 600;"></text> <view style="display: flex;flex-direction: row;justify-content: space-between;margin-top: 10px;">
<text style="font-size: 24px;margin-left: 7px;font-weight: 500;">{{data.price}}</text> <text style="font-size: 13px;color: #666;">&ensp;&ensp;&ensp;&ensp;</text>
<text
style="font-size: 13px;color: #999;">{{data.weight}}{{data.specificationUnit}}/{{data.unitName}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20px;">
<view style="width: 2px;height: 15px;background: #FF7A11;margin-right: 10px;"></view>
<text style="font-size: 14px;font-weight: 600;font-family: sans-serif;color: #333;">商品详情</text>
</view>
<view style="margin-top: 10px;" v-show="!data.appContent==''">
<rich-text :nodes="data.appContent | formatRichText"></rich-text>
</view> </view>
<view>价值</view>
</view>
<view
style="left: 25px;font-size: 18px;width: 90vw;margin: 10px 0px;font-weight: 600;margin-left: 18px;">
{{data.name}}
</view> </view>
</view> </view>
</loading-state>
<view style="display: flex;flex-direction: column;align-items: center;margin-left: 9px;margin-right: 9px;"> <view style="position: absolute; bottom: 0px; display: flex;flex-direction: column;width: 100%;
<view box-sizing: border-box; padding-left: 16px;padding-right: 16px;background: #fff; height: 13vh;">
style="border-bottom-left-radius: 13px;border-bottom-right-radius: 13px;background-color: #f9f9f9;width: 100%;display: flex;flex-direction: row;">
<image src="../../static/guige.png" <view
style="width: 21px;height: 21px;margin-left: 12px;margin-top: 9px;margin-bottom: 12px;"></image> style="display: flex;flex-direction: row;align-items: center; justify-content: center; margin-top:10px;">
<view
style="height: 21px;line-height: 21px;margin-top: 9px;font-size: 13px;color: #666666;margin-left: 5px;"> <view id="bomView" style="display: flex;flex-direction: row;align-items: center;">
规格 <view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
{{data.remarks}} 温馨提示已订</view>
<view style="color: #FF5006;font-size: 15px;height: 15px;line-height: 15px;font-weight: bold;">
{{page.weight}}
</view> </view>
</view>
</view> -->
<view style="display: flex;flex-direction: column;background: #fff;padding: 20px;margin-top: 10px; <view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
border-top-left-radius: 20px;border-top-right-radius: 20px;height: 100%;"> {{data.qssl}}斤起订</view>
<text style="font-size: 18px;font-weight: 600;font-family: sans-serif;color: #333;">{{data.name}}</text> <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;">
起订说明</text>
<text
style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;margin-left: 2px;">
>></text>
</view>
<view style="display: flex;flex-direction: row;justify-content: space-between;margin-top: 10px;">
<text style="font-size: 13px;color: #666;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="font-size: 13px;color: #999;">{{data.remarks}}</text>
</view> </view>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20px;"> <view
style="display: flex;flex-direction: row; justify-content: center;align-items: center;margin-top: 10px;padding: 0px 10px;margin-bottom: 20px;">
<view style="width: 2px;height: 15px;background: #FF7A11;margin-right: 10px;"></view> <text style="background: #FF9900; color: #fff;font-size: 13px; padding: 0px 15px;height: 40px;line-height: 40px;
<text style="font-size: 14px;font-weight: 600;font-family: sans-serif;color: #333;">商品详情</text> border: 1px #FF5006 solid; border-top-left-radius: 25px; border-bottom-left-radius: 25px;flex-shrink: 0;"
@click="inCart()">加入购物车</text>
<view style="border: 1px #FF5006 solid;margin-left: 5px;margin-right: 5px;padding: 0px 5px;height: 42px;flex: 1;
display: flex;flex-direction: row;align-items: center;box-sizing: border-box;" @click="gotoCart()">
<image src="../../static/shoppCart_icon.png" mode="aspectFill"
style="height: 20px;width: 20px;flex-shrink: 0;">
</image>
<view style="display: flex;flex-direction: column;flex: 1;">
<text
style="font-size: 15px;color: #FF5006;margin-left: 5px;height: 20px;line-height: 20px;margin-top: 5px;font-weight: bold;">{{page.price}}</text>
<text v-if="page.remarks!=''"
style="font-size: 10px;color: #666;margin-left: 5px; height: 10px;line-height: 10px;margin-bottom: 5px;">{{page.remarks}}</text>
</view>
</view> </view>
<view style="margin-top: 10px;" v-show="!data.appContent==''"> <text style="background: #FF9900; color: #fff;font-size: 13px; padding: 0px 15px;height: 40px;line-height: 40px;
<rich-text :nodes="data.appContent | formatRichText" ></rich-text> border: 1px #FF5006 solid; border-top-right-radius: 25px; border-bottom-right-radius: 25px;flex-shrink: 0;"
</view> @click="settlement()">结算</text>
</view>
</view>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="more" title="订购协议" :showConfirm="true"
:beforeClose="dialogBeforeClose" @confirm="dialogInputConfirm" :content="data.dgxy"
:confirm-text="confirmText"></uni-popup-dialog>
</uni-popup>
</view> <uni-popup ref="inputDialog2" type="dialog">
<uni-popup-dialog ref="inputClose" mode="more" title="起订说明" :showConfirm="true"
:beforeClose="dialogBeforeClose2" @confirm="dialogInputConfirm2"
:content="data.qdxy"></uni-popup-dialog>
</uni-popup>
</view>
</view>
</loading-state>
</template> </template>
<script> <script>
@ -69,7 +113,10 @@
data() { data() {
return { return {
page: { page: {
sid: '' sid: '',
weight: "",
remarks: "",
price: ""
}, },
data: { data: {
picUrl: '', picUrl: '',
@ -77,14 +124,21 @@
price: '', price: '',
remarks: '', remarks: '',
appContent: "" appContent: ""
} },
dialogContent: "这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容这里是协议内容,这里是协议内容",
confirmText: "我知道了(5s)",
dialogBeforeClose: false,
dialogBeforeClose2: false,
countdown: 5,
} }
}, },
onLoad(options) { onLoad(options) {
this.page.sid = options.sid this.page.sid = options.sid
this.request() this.request()
}, },
filters: { filters: {
/** /**
* 处理富文本里的图片宽度自适应 * 处理富文本里的图片宽度自适应
* 1.去掉img标签里的stylewidthheight属性 * 1.去掉img标签里的stylewidthheight属性
@ -119,21 +173,168 @@
}, },
methods: { methods: {
request() { request() {
var params = {
customerSid: getApp().globalData.sid,
sid: this.page.sid,
}
console.log("request", params);
let _this = this let _this = this
_this.$api.goodsDetail(this.page.sid).then((resp) => {
console.log(resp); _this.$api.goodsDetail(params).then((resp) => {
// console.log(resp);
_this.data = resp _this.data = resp
_this.getAllPriceOrWeight()
// _this.$nextTick(() => {
// _this.$refs.pageView.setLoadState(2)
// })
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
getAllPriceOrWeight() {
let _this = this
var params = {
customerSid: getApp().globalData.sid,
brandId: _this.data.brandId,
}
console.log("getGoodsWeight", params);
_this.$api.getGoodsWeight(params).then((resp) => {
console.log("getGoodsWeight", resp);
_this.page.price = resp.totalPrice
_this.page.weight = resp.totalWeight
_this.page.remarks = resp.remarks
_this.$nextTick(() => { _this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2) _this.$refs.pageView.setLoadState(2)
}) })
}).catch(e => { }).catch(e => {
_this.$nextTick(() => { _this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1) _this.$refs.pageView.setLoadState(1)
}) })
}) })
} },
inCart() {
this.data.goodsNumber = Number(this.data.goodsNumber) + 1
this.upDateShoppCart()
},
upDateShoppCart() {
var good = {
goodsSid: this.data.sid,
goodsName: this.data.name,
goodsNumber: this.data.goodsNumber,
affiliation: this.data.brandId,
price: this.data.mefenPrice,
weight: this.data.weight,
customerSid: getApp().globalData.sid
}
let _this = this
_this.$api.addShoppingCart(good).then((resp) => {
_this.shortToast('已加入购物车。')
_this.getAllPriceOrWeight()
}).catch(e => {
})
},
settlement() {
//
if (this.page.weight < parseInt(this.data.qssl)) {
this.shortToast('满' + this.data.qssl + '斤才可定制云菜窖哦,请继续选菜吧。')
return
}
this.showPop()
},
showPop() {
this.$refs.inputDialog.open()
let timeOut = setInterval(() => {
if (this.countdown == 1) {
this.confirmText = "确定"
this.countdown = 5
this.dialogBeforeClose = false
clearInterval(timeOut)
} else {
this.dialogBeforeClose = true
this.countdown = this.countdown - 1;
this.confirmText = "我知道了" + "(" + this.countdown + "s)"
}
}, 1000)
},
saveGoods() {
var params = {
customerSid: getApp().globalData.sid,
// cardNumber: 1,
brandId: this.data.brandId,
totalTee: this.page.price,
// ordOrderDetailsVoList: list
}
console.log("params", params);
let _this = this
_this.$api.createVegeOrder(params).then((resp) => {
// console.log("resp", resp);
this.$pay(resp)
}).catch(e => {})
},
gotoCart() {
uni.navigateTo({
url: 'shoppCart?affiliation=' + this.data.brandId + "&weight=" + this.data.qssl + "&qdxy=" +
this.data.qdxy
})
},
showPop2() {
this.$refs.inputDialog2.open()
},
dialogInputConfirm(val) {
if (this.confirmText == "确定") {
this.confirmText = "我知道了(5s)",
this.dialogBeforeClose = true,
this.countdown = 5
this.saveGoods()
}
},
dialogInputConfirm2(val) {
console.log(">>>>>>>>>>>", this.dialogBeforeClose2);
this.dialogBeforeClose2 = false
},
} }
} }
</script> </script>

223
pages/home/cloudCard2.vue

@ -34,15 +34,23 @@
<view class="center" style=""> <view class="center" style="">
<view <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)" <view v-for="(item,index) in data.typeVos" @click="labelClick(index,item)"
style="display: flex;flex-direction: column;justify-content: center;"> style="display: flex;flex-direction: column;justify-content: center;">
<text class="label" :class="{'label2':selectIndex==index}">{{item.name}}</text> <text class="label" :class="{'label2':selectIndex==index}">{{item.name}}</text>
</view> </view>
</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> </view>
@ -142,6 +150,22 @@
</view> </view>
</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> </view>
@ -166,7 +190,7 @@
style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;"> style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
{{data.brandVos[selectIndex2].qssl}}斤起订</view> {{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()"> @click="showPop2()">
<text <text
style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;text-decoration:underline;font-style:oblique;"> 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 <text
style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;margin-left: 2px;"> style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;margin-left: 2px;">
>></text> >></text>
</view> --> </view>
</view> </view>
</view> </view>
@ -363,6 +387,105 @@
</view> </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> </view>
@ -374,9 +497,14 @@
return { return {
imgList: [], imgList: [],
notData: false, notData: false,
notAuthentication: false,
showModal: false, showModal: false,
showModal1: false, showModal1: false,
showModal4: false, showModal4: false,
showModal5: false,
showModal6: false,
authenticationType: '',
authenticationRemarks: '',
goodsItem: { goodsItem: {
goodsNumber: "", goodsNumber: "",
}, },
@ -426,6 +554,7 @@
initWeight: "0", initWeight: "0",
shareSid: "", shareSid: "",
baseDataSuccess: false, baseDataSuccess: false,
isPurchase:"0",// 0 1
} }
}, },
@ -443,8 +572,11 @@
console.log("isPurchase", getApp().globalData.isPurchase); console.log("isPurchase", getApp().globalData.isPurchase);
if (getApp().globalData.isPurchase == '1') if (getApp().globalData.isPurchase == '1'){
this.showModal = true this.showModal = true
this.isPurchase = '1'
}
if (getApp().globalData.mobile == '') if (getApp().globalData.mobile == '')
this.showModal4 = true this.showModal4 = true
@ -468,6 +600,10 @@
}, },
methods: { methods: {
newUserGift(){
this.showModal = true
this.isPurchase = '1'
},
showGift() { showGift() {
let _this = this let _this = this
@ -508,6 +644,7 @@
_this.$pay(resp) _this.$pay(resp)
_this.showModal2 = false _this.showModal2 = false
getApp().globalData.isPurchase = '0' getApp().globalData.isPurchase = '0'
_this.isPurchase = '0'
console.log("isPurchase", getApp().globalData.isPurchase); console.log("isPurchase", getApp().globalData.isPurchase);
}).catch(e => {}) }).catch(e => {})
@ -523,9 +660,21 @@
colseDialog2() { colseDialog2() {
this.showModal2 = false this.showModal2 = false
}, },
colseDialog4(){ colseDialog4() {
this.showModal4 = false this.showModal4 = false
}, },
colseDialog5() {
this.showModal5 = false
},
colseDialog6() {
this.showModal6 = false
},
authentication() {
//
uni.navigateTo({
url: "/pages/me/authentication"
})
},
getBannerList() { getBannerList() {
let _this = this let _this = this
_this.$api.bannerList().then((resp) => { _this.$api.bannerList().then((resp) => {
@ -542,10 +691,6 @@
} }
}, },
colseDialog() {
this.showModal = false
},
shareGift() { shareGift() {
if (this.shareSid && getApp().globalData.isNewUser) { if (this.shareSid && getApp().globalData.isNewUser) {
@ -620,19 +765,57 @@
getgoods() { getgoods() {
let _this = this let _this = this
_this.searchInfo.customerSid = getApp().globalData.sid var params = {
_this.searchInfo.brandId = this.data.brandVos[this.selectIndex2].id customerSid: getApp().globalData.sid,
_this.searchInfo.categoryId = this.data.typeVos[this.selectIndex].id 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.notAuthentication = false
_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.getAllPriceOrWeight()
}).catch(e => { }).catch(e => {
_this.$nextTick(() => { console.log("isEnterprise>>", e);
_this.$refs.pageView.setLoadState(1) _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) { jian(item) {

95
pages/me/authentication.vue

@ -0,0 +1,95 @@
<template>
<view style="display: flex;flex-direction: column;width: 100%;height: 100vh;background: #FEA75E;">
<NavBar ref="nav" navTitle="企业认证" :showIcon="true" :supportChange="false">
</NavBar>
<!-- <loading-state ref="pageView" @request="request"> -->
<view style="width: 100%;height: 100vh;background: #F7F7F7; border-radius: 20px;display: flex;flex-direction: column;
padding-left: 16px;padding-right: 16px;padding-top: 8px;box-sizing: border-box;">
<text class="text">企业名称</text>
<input placeholder="请输入" class="input" v-model="authenticationInfo.enterpriseName" />
<text class="text">配送地址</text>
<input placeholder="请输入" class="input" v-model="authenticationInfo.shippingAddress" />
<text class="text">联系人</text>
<input placeholder="请输入" class="input" v-model="authenticationInfo.contacts" />
<text class="text">联系电话</text>
<input placeholder="请输入" class="input" v-model="authenticationInfo.telephone" />
<!-- <text style="position: absolute; bottom: 24px; display: flex;flex-direction: column;width: 100%;text-align: center;
box-sizing: border-box;color: #fff;background: #FF9900; border-radius: 25px; line-height: 40px;height: 40px;">确认</text> -->
</view>
<view style="position: absolute; bottom: 24px; display: flex;flex-direction: column;width: 100%;
box-sizing: border-box; padding-left: 16px;padding-right: 16px;">
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B);
width: 100%;border-radius: 25px;height: 50px;text-align: center;
line-height: 50px;color: #FFFFFF;font-size: 16px;" @click="save">
确认</view>
</view>
<!-- </loading-state> -->
</view>
</template>
<script>
export default {
data() {
return {
authenticationInfo:{
customerSid:getApp().globalData.sid,
enterpriseName:"",
shippingAddress:"",
contacts:"",
telephone:"",
},
}
},
methods: {
//
save() {
this.$api.saveAuthentication(this.authenticationInfo).then((resp) => {
uni.navigateBack()
}).catch(e => {
})
},
}
}
</script>
<style scoped>
.text{
font-size: 16px;
color: #101010;
margin-top: 17px;
font-weight: 600;
font-family: sans-serif;
}
.input{
margin-top: 12px;
border: 1px #999999 solid;
border-radius: 6px;
font-size: 14px;
height: 40px;
line-height: 40px;
padding-left: 10px;
}
</style>

BIN
static/authentication_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
static/authentication_top.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/inReview.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
static/newUserGift.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
static/reject.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

20
utils/requester.js

@ -20,7 +20,7 @@ import token from '@/utils/auth.token.js'
* showFailMessage: true, // 返回失败信息是否显示 * showFailMessage: true, // 返回失败信息是否显示
* catchError: true, // 是否集中管理返回的success为false的情况,如果为false,在请求处判断code值做业务处理 * catchError: true, // 是否集中管理返回的success为false的情况,如果为false,在请求处判断code值做业务处理
*/ */
const request = (options, noLoading) => { const request = (options, noLoading,noFailMessage) => {
let _opts = { let _opts = {
url: '', // url String 是 开发者服务器接口地址 url: '', // url String 是 开发者服务器接口地址
data: {}, // data Object/String/ArrayBuffer 否 请求的参数 App 3.3.7 以下不支持 ArrayBuffer 类型 data: {}, // data Object/String/ArrayBuffer 否 请求的参数 App 3.3.7 以下不支持 ArrayBuffer 类型
@ -37,7 +37,7 @@ const request = (options, noLoading) => {
// complete Function 否 接口调用结束的回调函数(调用成功、失败都会执行) // complete Function 否 接口调用结束的回调函数(调用成功、失败都会执行)
showLoading: !noLoading, // 是否显示加载等待框 showLoading: !noLoading, // 是否显示加载等待框
loadingTitle: '加载中', // 加载等待框的提示文字 loadingTitle: '加载中', // 加载等待框的提示文字
showFailMessage: true, // 返回失败信息是否显示 showFailMessage: !noFailMessage, // 返回失败信息是否显示
catchError: true, // 是否集中管理Catch, catchError: true, // 是否集中管理Catch,
} }
Object.assign(_opts, options) Object.assign(_opts, options)
@ -170,7 +170,7 @@ const request = (options, noLoading) => {
} }
const req = function(url, method = "GET", data = {}, header = {}, options = {}, noLoading) { const req = function(url, method = "GET", data = {}, header = {}, options = {}, noLoading,noFailMessage) {
let _opts = { let _opts = {
url: url, url: url,
method: method, method: method,
@ -178,21 +178,21 @@ const req = function(url, method = "GET", data = {}, header = {}, options = {},
header: header header: header
} }
Object.assign(options, _opts) Object.assign(options, _opts)
return request(options, noLoading) return request(options, noLoading,noFailMessage)
} }
const get = function(url, data = {}, header = {}, options = {}, noLoading) { const get = function(url, data = {}, header = {}, options = {}, noLoading,noFailMessage) {
return req(url, "GET", data, header, options, noLoading) return req(url, "GET", data, header, options, noLoading,noFailMessage)
} }
const post = function(url, data = {}, header = {}, options = {}, noLoading) { const post = function(url, data = {}, header = {}, options = {}, noLoading,noFailMessage) {
return req(url, "POST", data, header, options, noLoading) return req(url, "POST", data, header, options, noLoading,noFailMessage)
} }
const formpost = function(url, data = {}, header = {}, options = {}, noLoading) { const formpost = function(url, data = {}, header = {}, options = {}, noLoading,noFailMessage) {
let _head = { let _head = {
"content-type": "application/x-www-form-urlencoded" "content-type": "application/x-www-form-urlencoded"
} }
Object.assign(header, _head) Object.assign(header, _head)
return req(url, "POST", data, header, options, noLoading) return req(url, "POST", data, header, options, noLoading,noFailMessage)
} }
request.get = get request.get = get
request.post = post request.post = post

Loading…
Cancel
Save