From 4a3790dd3bee7a1337ce194c84078fc833007b93 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 18 Jan 2024 10:55:59 +0800 Subject: [PATCH] fix --- apis/modules/user.js | 3 + components/sideSelect/sideSelect.vue | 1 + config/request.js | 2 +- other/addGoods/addGoods.vue | 89 ++++++---- other/clue/clue.vue | 17 +- other/goods/goods.vue | 102 ++++++------ other/goodsDetail/goodsDetail.vue | 155 ++++++++++++++++++ other/procureDetail/procureDetail.vue | 23 ++- .../registeredActivity/registeredActivity.vue | 1 + other/supplierDetail/supplierDetail.vue | 52 ++++++ other/vouchers/vouchers.vue | 20 ++- pages.json | 9 + pages/index/index.vue | 20 ++- pages/login/login.vue | 21 ++- pages/person/person.vue | 20 ++- pages/supplier/supplier.vue | 57 ++----- styles/common.scss | 3 + team/info/info.vue | 30 ++-- team/infoEdit/infoEdit.vue | 21 +-- team/qrcode/qrcode.vue | 6 +- 20 files changed, 463 insertions(+), 189 deletions(-) create mode 100644 other/goodsDetail/goodsDetail.vue diff --git a/apis/modules/user.js b/apis/modules/user.js index e3027fa..f59a58b 100644 --- a/apis/modules/user.js +++ b/apis/modules/user.js @@ -7,6 +7,9 @@ export const login = (data) => { export const kindergartenWeChatApplication = (data) => { return post('nakadai/kindergarten/platformTeamAccount/kindergartenWeChatApplication', data) } +export const loginWithPhoneNumber = (data) => { + return post('nakadai/kindergarten/platformTeamAccount/loginWithPhoneNumber', data) +} export const realNameAuthentication = (data) => { return post(`nakadai/users/autonym/realNameAuthentication`, data) } diff --git a/components/sideSelect/sideSelect.vue b/components/sideSelect/sideSelect.vue index 9c50a66..6be5a70 100644 --- a/components/sideSelect/sideSelect.vue +++ b/components/sideSelect/sideSelect.vue @@ -32,6 +32,7 @@ min-width: 200rpx; font-size: 28rpx; text-align: center; + background-color: #fff; .item { padding: 20rpx 0; } diff --git a/config/request.js b/config/request.js index aea2d7a..d57d2ba 100644 --- a/config/request.js +++ b/config/request.js @@ -5,7 +5,7 @@ */ export default { - // baseURL: 'http://192.168.31.217:10010/', + // baseURL: 'http://192.168.31.51:10010/', baseURL: 'http://124.71.79.122/', headers: { 'Content-Type': 'application/json;charset=UTF-8' diff --git a/other/addGoods/addGoods.vue b/other/addGoods/addGoods.vue index 361298e..7f51474 100644 --- a/other/addGoods/addGoods.vue +++ b/other/addGoods/addGoods.vue @@ -31,7 +31,7 @@ 产品规格 - + 规格名称 @@ -39,13 +39,18 @@ 价格 - {{ item.price || '请选择' }} + + 售价:{{ item.price }}元 + 市场价:{{ item.oriPrice }}元 + + 库存 + @@ -56,12 +61,12 @@ 发布 - + 售价: - + 市场价: @@ -96,8 +101,8 @@ status: 1, oriPrice: '', price: '', - skuName: '', - stocks: 0, + skuName: '默认', + stocks: 9999, } ], }, @@ -108,6 +113,7 @@ submiting: false, uploading: false, classifications: [], + showPopup: false, } }, onShow() { @@ -179,6 +185,13 @@ this.curSku = item this.$refs.popup.open() }, + popupChange(e) { + this.showPopup = e.show + }, + // 删除sku + delSku(i) { + this.form.skuList.splice(i, 1) + }, // 新增sku addSku() { this.form.skuList.push(this.originSku) @@ -188,30 +201,32 @@ if (this.submiting) return false const form = JSON.parse(JSON.stringify((this.form))) if (!form.prodName) return this.$util.errMsg(`请输入商品名称!`) - if (!this.pic.length) return this.$util.errMsg(`请上传封面图片!`) - if (!form.brief) return this.$util.errMsg(`请输入商品描述!`) - form.skuList = form.skuList.filter(e => e.skuName) - if (!form.skuList.length) return this.$util.errMsg(`请输入产品规格!`) - let invalid = 0 - for (const e of form.skuList) { - if (!e.skuName) { - this.$util.errMsg(`请输入规格名称!`) - invalid = 1 - } - if (!e.price) { - this.$util.errMsg(`请输入售价!`) - invalid = 1 - } - if (!e.oriPrice) { - this.$util.errMsg(`请输入市场价!`) - invalid = 1 - } - if (!e.stocks) { - this.$util.errMsg(`请输入库存!`) - invalid = 1 + if (status === 1) { + if (!this.pic.length) return this.$util.errMsg(`请上传封面图片!`) + // if (!form.brief) return this.$util.errMsg(`请输入商品描述!`) + form.skuList = form.skuList.filter(e => e.skuName) + if (!form.skuList.length) return this.$util.errMsg(`请输入产品规格!`) + let invalid = 0 + for (const e of form.skuList) { + if (!e.skuName) { + this.$util.errMsg(`请输入规格名称!`) + invalid = 1 + } + // if (!e.price) { + // this.$util.errMsg(`请输入售价!`) + // invalid = 1 + // } + // if (!e.oriPrice) { + // this.$util.errMsg(`请输入市场价!`) + // invalid = 1 + // } + if (!e.stocks) { + this.$util.errMsg(`请输入库存!`) + invalid = 1 + } } + if (invalid) return false } - if (invalid) return false this.submiting = true form.pic = this.pic.map(e => e.url).join() form.imgs = this.imgs.map(e => e.url).join() @@ -257,9 +272,14 @@ padding: 0; } } -.price-select { - font-size: 24rpx; +.prices { + display: inline-flex; + align-items: center; + font-size: 28rpx; color: #333; + .oriPrice { + margin-left: 20rpx; + } } .title { margin: 40rpx 24rpx 24rpx; @@ -267,6 +287,15 @@ font-weight: 600; color: #333; } +.sku-item { + position: relative; + .del { + z-index: 10; + position: absolute; + top: 15rpx; + right: 15rpx; + } +} .plus-sku { text-align: center; } diff --git a/other/clue/clue.vue b/other/clue/clue.vue index a1d7fb9..50b7b8b 100644 --- a/other/clue/clue.vue +++ b/other/clue/clue.vue @@ -2,7 +2,7 @@ - + @@ -19,13 +19,14 @@ 提交时间:{{ item.createTime }} --> - + + {{ item.purchasingPerson }} 采购内容:{{ item.content || '' }} - 数量:{{ item.num || 0 }}个 + 数量:{{ item.num ? item.num + '个' : '待沟通' }} 编号:{{ item.orderNumber }} 提交时间:{{ item.createTime }} @@ -181,11 +182,13 @@ color: #333; border-bottom: 1px solid #E6E8ED; .icon { - width: 66rpx; - min-width: 66rpx; - height: 66rpx; + width: 80rpx; + min-width: 80rpx; + height: 80rpx; margin-right: 20rpx; - border-radius: 4px; + } + .logo { + border-radius: 50%; } } .meta { diff --git a/other/goods/goods.vue b/other/goods/goods.vue index 3de9873..3ef4939 100644 --- a/other/goods/goods.vue +++ b/other/goods/goods.vue @@ -1,51 +1,52 @@ @@ -111,6 +112,7 @@ page({ status: this.curTab, current: this.page, + prodName: this.keyword, }).then(({ page, productCount }) => { // 各种状态的商品数量 const status1 = productCount.find(e => e.status === 1) @@ -146,6 +148,11 @@ this.reachBottom = 0 this.getList() }, + // keyword清除回调 + clearKeyword() { + this.keyword = '' + this.initList() + }, // tab切换 tabChange(id) { this.curTab = id @@ -182,7 +189,7 @@ }, // 跳转详情 toDetail(item) { - this.$util.to(`../addGoods/addGoods?prodId=${item.prodId}&show=1`) + this.$util.to(`../goodsDetail/goodsDetail?prodId=${item.prodId}`) }, // 跳转编辑 toEdit(item) { @@ -193,9 +200,6 @@ diff --git a/other/procureDetail/procureDetail.vue b/other/procureDetail/procureDetail.vue index 84ae387..9fa3788 100644 --- a/other/procureDetail/procureDetail.vue +++ b/other/procureDetail/procureDetail.vue @@ -3,7 +3,9 @@ 编号{{ id }} - + + + {{ info.shopName }} {{ info.authentication }} @@ -23,7 +25,7 @@ - 备注 + 客户留言 {{ info.remarks }} @@ -51,7 +53,7 @@ {{ info.createTime }} - 幼儿园是否已认证/是否已实名 + {{ info.orderType === 1 ? '个人是否已实名' : '是否已认证' }} {{ info.authentication }} @@ -113,6 +115,7 @@ .title { margin-bottom: 20rpx; font-size: 30rpx; + font-weight: 600; color: #333; } .shop { @@ -121,13 +124,16 @@ align-items: center; font-size: 28rpx; color: #333; - .logo { - width: 66rpx; - min-width: 66rpx; - height: 66rpx; + .icon { + width: 80rpx; + min-width: 80rpx; + height: 80rpx; margin-right: 20rpx; border-radius: 4px; } + .logo { + border-radius: 50%; + } .status { position: absolute; bottom: 0; @@ -148,6 +154,9 @@ align-items: center; padding-bottom: 10rpx; margin-bottom: 20rpx; + &:last-child { + margin-bottom: 0; + } } .prod { max-width: 70%; diff --git a/other/registeredActivity/registeredActivity.vue b/other/registeredActivity/registeredActivity.vue index 90b3645..1b21fdf 100644 --- a/other/registeredActivity/registeredActivity.vue +++ b/other/registeredActivity/registeredActivity.vue @@ -62,6 +62,7 @@ export default { data() { return { + openId: uni.getStorageSync('openId'), tabs: [], popup: false, curTab: '', diff --git a/other/supplierDetail/supplierDetail.vue b/other/supplierDetail/supplierDetail.vue index d13e785..9e60952 100644 --- a/other/supplierDetail/supplierDetail.vue +++ b/other/supplierDetail/supplierDetail.vue @@ -4,6 +4,11 @@ {{ form.classificationName }} {{ form.slogan }} + + + + {{ collectInfo.whetherAttention ? '取消关注' : '关注' }} +
    @@ -60,6 +65,7 @@ @@ -196,6 +237,17 @@ font-size: 28rpx; color: #333; } + .star { + display: flex; + justify-content: flex-end; + align-items: center; + margin-top: 20rpx; + font-size: 28rpx; + color: #333; + .star-icon { + margin-right: 10rpx; + } + } } .detail { padding: 40rpx; diff --git a/other/vouchers/vouchers.vue b/other/vouchers/vouchers.vue index 1bebfa4..3e40551 100644 --- a/other/vouchers/vouchers.vue +++ b/other/vouchers/vouchers.vue @@ -10,9 +10,9 @@ {{ item.competitionName }} - 有效期 {{ item.playEndTime.substr(0, 16) }} + {{ item.status === 1 ? '未生效 |' : '' }} 有效期 {{ item.playEndTime.substr(0, 16) }} - 使用 + {{ item.status === 1 ? '电子入场券' : '使用' }} @@ -124,15 +124,17 @@ }, // 定时处理时间及状态 handleStatus (item) { - let playing = 0 + let status = 0 const playStartTime = new Date(item.playStartTime) // 报名开始时间 const playEndTime = new Date(item.playEndTime) // 报名结束时间 const { now } = this - // 报名中(whetherToSignUp 是否已报名 0为已报名 1为未报名) - if (now > playStartTime && now < playEndTime) { - playing = 1 + + if (now < playStartTime) { // 未生效 + status = 1 + } else if (now < playEndTime) { // 生效期中 + status = 2 } - this.$set(item, 'playing', playing) + this.$set(item, 'status', status) }, initList() { this.page = 1 @@ -155,7 +157,7 @@ }, // 展示电子券 use(row) { - if (row.playing) { + if (row.status) { this.curRow = row this.$refs.popup.open() } @@ -220,7 +222,7 @@ .sign-popup { position: relative; width: 80vw; - padding: 40rpx 0 20rpx; + padding: 40rpx 0; text-align: center; box-sizing: border-box; background-color: #fff; diff --git a/pages.json b/pages.json index 749b0ac..640669e 100644 --- a/pages.json +++ b/pages.json @@ -12,6 +12,7 @@ "path" : "pages/index/index", "style" : { + "navigationStyle": "custom", "enablePullDownRefresh": true } }, @@ -140,6 +141,14 @@ "navigationBarTitleText" : "我的关注", "enablePullDownRefresh" : true } + }, + { + "path" : "goodsDetail/goodsDetail", + "style" : + { + "navigationBarTitleText" : "商品详情", + "enablePullDownRefresh" : false + } } ] }, diff --git a/pages/index/index.vue b/pages/index/index.vue index 917d247..a57dc7c 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,11 +1,9 @@