diff --git a/common/request.api.js b/common/request.api.js
index 6245fc6..230c226 100644
--- a/common/request.api.js
+++ b/common/request.api.js
@@ -50,7 +50,7 @@ export default {
// 预约记录详情
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),
@@ -119,6 +119,11 @@ export default {
bannerList: (params = {}) => request.get("/wxapi/banner/list", params),
// 获取分类和品牌
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),
// 获取补充菜窖 商品分类列表
@@ -135,7 +140,7 @@ export default {
createVegeOrder: (params = {}) => request.post("/empsreservoorder/createVegeOrder", params),
- // 我的菜窖 通知公告
+ // 我的菜窖 通知公告
getNotices: (params = {}) => request.get("/appletnotice/getNotice", params),
// 我的菜窖 新人礼包列表
newUserQuota: (params = {}) => request.post("/appletgiftbag/newUserQuota", params),
diff --git a/pages.json b/pages.json
index 10d7c4a..ba4ae72 100644
--- a/pages.json
+++ b/pages.json
@@ -146,6 +146,7 @@
"style": {
"navigationBarTitleText": "产品详情",
"enablePullDownRefresh": false
+
}
},
{
@@ -379,6 +380,13 @@
"navigationStyle": "custom",
"disableScroll": true
}
+ },
+ {
+ "path" : "pages/me/authentication",
+ "style": {
+ "navigationStyle": "custom",
+ "disableScroll": true
+ }
}
diff --git a/pages/bind/bind_cloudCard.vue b/pages/bind/bind_cloudCard.vue
index 41b287b..f927580 100644
--- a/pages/bind/bind_cloudCard.vue
+++ b/pages/bind/bind_cloudCard.vue
@@ -27,7 +27,7 @@
-
+
@@ -146,6 +146,11 @@
colseDialog() {
this.showModal = false
},
+ itemClick(goodsSid) {
+ uni.navigateTo({
+ url: '/pages/good/goodsDetail?sid=' + goodsSid
+ })
+ },
getData() {
let _this = this
_this.$api.getTransferByCode(this.page.code).then((resp) => {
diff --git a/pages/good/goodsDetail.vue b/pages/good/goodsDetail.vue
index 66ced71..a05a1df 100644
--- a/pages/good/goodsDetail.vue
+++ b/pages/good/goodsDetail.vue
@@ -1,67 +1,111 @@
+
+
+
+
-
-
-
-
-
+
+ ,{{data.qssl}}斤起订。
- {{data.name}}
+
+
+ 起订说明
+
+ >>
+
-
- 规 格
- {{data.remarks}}
+
-
+
-
- 商品详情
+ 加入购物车
+
+
+
+
+ ¥{{page.price}}
+ {{page.remarks}}
+
-
-
-
+ 结算
+
+
+
+
+
-
+
+
+
+
+
-
-
diff --git a/pages/home/cloudCard2.vue b/pages/home/cloudCard2.vue
index 67927ba..abcb1fc 100644
--- a/pages/home/cloudCard2.vue
+++ b/pages/home/cloudCard2.vue
@@ -34,15 +34,23 @@
+ style="width: 24%; display: flex;flex-direction: column;
+ position: relative;">
-
+
{{item.name}}
+
+
+
+ 新人专享
+
@@ -142,6 +150,22 @@
+
+
+
+
+ 您好,【企业菜窖】需要通过认证才能进行购买
+
+ 立即认证
+
+
+
+
+
@@ -166,7 +190,7 @@
style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
,{{data.brandVos[selectIndex2].qssl}}斤起订。
-
+
@@ -363,6 +387,105 @@
+
+
+
+
+
+
+
+
+
+
+ 温馨提示
+ 您好,【企业菜窖】需要通过认证才能进行购买
+
+
+
+ 取消
+ 立即认证
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 审核中
+ 提交成功!您的认证信息正在审核中,请耐心等待
+
+ 返回
+
+
+
+
+
+
+
+
+ 审核未通过
+
+
+
+ 很遗憾!您的企业认证申请信息未通过
+
+ 理由:{{authenticationRemarks}}
+
+
+
+ 修改信息
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -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.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 => {
- _this.$nextTick(() => {
- _this.$refs.pageView.setLoadState(1)
- })
+ 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) {
diff --git a/pages/me/authentication.vue b/pages/me/authentication.vue
new file mode 100644
index 0000000..98d74d7
--- /dev/null
+++ b/pages/me/authentication.vue
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+ 企业名称
+
+
+ 配送地址
+
+
+ 联系人
+
+
+ 联系电话
+
+
+
+
+
+
+
+
+
+
+
+
+ 确认
+
+
+
+
+
+
+
+
+
+
diff --git a/static/authentication_icon.png b/static/authentication_icon.png
new file mode 100644
index 0000000..2e50951
Binary files /dev/null and b/static/authentication_icon.png differ
diff --git a/static/authentication_top.png b/static/authentication_top.png
new file mode 100644
index 0000000..596109f
Binary files /dev/null and b/static/authentication_top.png differ
diff --git a/static/inReview.png b/static/inReview.png
new file mode 100644
index 0000000..b319da2
Binary files /dev/null and b/static/inReview.png differ
diff --git a/static/newUserGift.png b/static/newUserGift.png
new file mode 100644
index 0000000..4019538
Binary files /dev/null and b/static/newUserGift.png differ
diff --git a/static/reject.png b/static/reject.png
new file mode 100644
index 0000000..186d367
Binary files /dev/null and b/static/reject.png differ
diff --git a/utils/requester.js b/utils/requester.js
index 5467051..f6640e0 100644
--- a/utils/requester.js
+++ b/utils/requester.js
@@ -20,7 +20,7 @@ import token from '@/utils/auth.token.js'
* showFailMessage: true, // 返回失败信息是否显示
* catchError: true, // 是否集中管理返回的success为false的情况,如果为false,在请求处判断code值做业务处理
*/
-const request = (options, noLoading) => {
+const request = (options, noLoading,noFailMessage) => {
let _opts = {
url: '', // url String 是 开发者服务器接口地址
data: {}, // data Object/String/ArrayBuffer 否 请求的参数 App 3.3.7 以下不支持 ArrayBuffer 类型
@@ -37,7 +37,7 @@ const request = (options, noLoading) => {
// complete Function 否 接口调用结束的回调函数(调用成功、失败都会执行)
showLoading: !noLoading, // 是否显示加载等待框
loadingTitle: '加载中', // 加载等待框的提示文字
- showFailMessage: true, // 返回失败信息是否显示
+ showFailMessage: !noFailMessage, // 返回失败信息是否显示
catchError: true, // 是否集中管理Catch,
}
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 = {
url: url,
method: method,
@@ -178,21 +178,21 @@ const req = function(url, method = "GET", data = {}, header = {}, options = {},
header: header
}
Object.assign(options, _opts)
- return request(options, noLoading)
+ return request(options, noLoading,noFailMessage)
}
-const get = function(url, data = {}, header = {}, options = {}, noLoading) {
- return req(url, "GET", data, header, options, noLoading)
+const get = function(url, data = {}, header = {}, options = {}, noLoading,noFailMessage) {
+ return req(url, "GET", data, header, options, noLoading,noFailMessage)
}
-const post = function(url, data = {}, header = {}, options = {}, noLoading) {
- return req(url, "POST", data, header, options, noLoading)
+const post = function(url, data = {}, header = {}, options = {}, noLoading,noFailMessage) {
+ 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 = {
"content-type": "application/x-www-form-urlencoded"
}
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.post = post