From bd284d477f1be8f37074a21faa21fb08347ab7a0 Mon Sep 17 00:00:00 2001 From: jia <1451658316@qq.com> Date: Wed, 30 Aug 2023 21:11:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5bug=20=E5=95=86=E5=AE=B6?= =?UTF-8?q?=E5=85=A5=E9=A9=BB=E7=AD=89=E7=95=8C=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 2 +- api/api.js | 4 + api/store.js | 2 +- components/orderGoods/index.vue | 8 +- components/zbpSwiper.vue | 592 +++++++------ config/app.js | 4 +- manifest.json | 4 +- pages/admin/orderDetail/index.vue | 2 +- pages/admin/orderList/index.vue | 2 +- pages/columnGoods/goods_search_con/index.vue | 4 +- pages/index/index.vue | 295 ++++++- pages/news_list/index.vue | 621 +++++++------- pages/nongKe/supply_chain/supplier.vue | 8 +- pages/order_details/index.vue | 38 +- pages/order_details/stay.vue | 2 +- pages/short_video/appSwiper/index.nvue | 4 +- pages/short_video/nvueSwiper/index.nvue | 8 +- pages/supply_chains/supply_chains.vue | 857 ++++++++++--------- pages/users/order_list/indexCopy.vue | 49 +- pages/users/payment/payment.vue | 1 + store/modules/app.js | 1 - 21 files changed, 1462 insertions(+), 1046 deletions(-) diff --git a/App.vue b/App.vue index 218deea..98f50c4 100644 --- a/App.vue +++ b/App.vue @@ -306,7 +306,7 @@ this.globalData.community_reply_auth = res.data.community_reply_auth this.globalData.margin_ico_switch = res.data.margin_ico_switch this.globalData.margin_ico = res.data.margin_ico - console.log(res.data.global_theme.theme + "我是") + // console.log(res.data.global_theme.theme + "我是") this.$store.commit("VIEW_COLOR", res.data.global_theme.theme) this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type) try { diff --git a/api/api.js b/api/api.js index b0c8f23..6877e42 100644 --- a/api/api.js +++ b/api/api.js @@ -103,6 +103,10 @@ export function getUserCoupons(data) { export function getArticleCategoryList() { return request.get('article/category/lst', {}, { noAuth: true }) } + +export function getArticleCategoryLists() { + return request.get('article/category/lst?is_home='+1, {}, { noAuth: true }) +} /** * 文章列表 * @param int cid diff --git a/api/store.js b/api/store.js index 0ffddca..59a5c06 100644 --- a/api/store.js +++ b/api/store.js @@ -467,7 +467,7 @@ export function getGeocoder(data) { * */ export function getStoreTypeApi() { - return request.get('intention/type', {sift_store:1}, { + return request.get('intention/type', {sift_store:0}, { noAuth: true }); } diff --git a/components/orderGoods/index.vue b/components/orderGoods/index.vue index 8698c95..d670711 100644 --- a/components/orderGoods/index.vue +++ b/components/orderGoods/index.vue @@ -7,6 +7,8 @@ + + @@ -75,7 +77,7 @@ - + 申请退款 去评价 已评价 diff --git a/components/zbpSwiper.vue b/components/zbpSwiper.vue index 3555c48..9063424 100644 --- a/components/zbpSwiper.vue +++ b/components/zbpSwiper.vue @@ -1,291 +1,349 @@ \ No newline at end of file diff --git a/config/app.js b/config/app.js index d98a31e..d731782 100644 --- a/config/app.js +++ b/config/app.js @@ -9,8 +9,8 @@ let httpApiThree // 网络接口修改此字符 小程序域名要求https // let httpApi = 'http://192.168.31.110:8324' // 测试 if (process.env.NODE_ENV === "development") { - // httpApi = 'https://shop.lihaink.cn' // 生产 - httpApi = "https://crmeb-test.shop.lihaink.cn" + httpApi = 'https://shop.lihaink.cn' // 生产 + // httpApi = "https://crmeb-test.shop.lihaink.cn" // httpApi = "http://192.168.0.222" // httpApi = "http://192.168.0.108:8325" // httpApi = 'http://192.168.0.108:8325' diff --git a/manifest.json b/manifest.json index 06cfd3a..4dc2773 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "惠农生活", "appid" : "__UNI__3A527D1", "description" : "", - "versionName" : "1.0.18", - "versionCode" : 142, + "versionName" : "1.0.0", + "versionCode" : 100, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/admin/orderDetail/index.vue b/pages/admin/orderDetail/index.vue index 6c792e1..0a85f08 100644 --- a/pages/admin/orderDetail/index.vue +++ b/pages/admin/orderDetail/index.vue @@ -165,7 +165,7 @@ 确认付款 - + 收件码 去发货 diff --git a/pages/admin/orderList/index.vue b/pages/admin/orderList/index.vue index 4ef7d9f..29a0edf 100644 --- a/pages/admin/orderList/index.vue +++ b/pages/admin/orderList/index.vue @@ -172,7 +172,7 @@ 去发货 - 收件码 - + diff --git a/pages/index/index.vue b/pages/index/index.vue index bc6580c..e51ed06 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -2,15 +2,66 @@ - + + + 热点资讯 + + 更多 + + + + + + + + {{item.title}} + {{item.create_time}} + + + + + + + + + + + + + - + + + + + + {{item.title}} + + + + {{item.author}} + + + + + + + + + + + - + @@ -47,7 +98,7 @@ - + + + + 位置权限使用说明 + + + 用于向你推荐最近门店 + + @@ -64,6 +123,7 @@ import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import zbpSwiper from '@/components/zbpSwiper' import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; + import { getSlideAPI } from '@/api/lihai.js' @@ -74,7 +134,9 @@ } from '@/api/community.js' import { getIndexData, - getDiy + getDiy, + getArticleList, + getArticleCategoryLists } from '@/api/api.js' import { getGeocoder, @@ -95,7 +157,9 @@ }, data() { return { - locationArr: ({}), + + isshow: false, + locationArr: ({}), status: 'loadmore', bgColor: '', showPicker: false, @@ -105,6 +169,10 @@ list: [], tabsActive: 0 }, + tabsData1: { + list: [], + tabsActive: 0 + }, where: { category_id: 0, page: 1, @@ -115,24 +183,29 @@ location: '', emptyShow: false, street: '', - cateGoods: [] + cateGoods: [], + recoList: [], + articleList: [], + streeta_id: '' } }, onPullDownRefresh() { this.getCateList() - this.cateGoods=[] + this.cateGoods = [] this.getGoods() this.selfLocation() this.Area() uni.stopPullDownRefresh() }, onLoad() { - + this.getCateList() - + this.getArticle() this.getGoods() - + this.selfLocation() + this.Area() this.setPermissions() + // this.openTongZhi() uni.$on('connectstatusChange', (connectstatus) => { var connectstr = '' @@ -151,21 +224,56 @@ if (this.status == 'nomore') return; this.status = 'loading'; this.where.page = ++this.where.page; - this. this.getGoods() }, methods: { + tabsChange1(item) { + this.getArticleList(item.article_category_id) + this.streeta_id = item.id + this.tabsData1.tabsActive = item.index + }, + async getArticle() { + let list = [] + + const { + data + } = await getArticleCategoryLists() + data.map((item, index) => { + if (item.title !== '首页推荐') { + list.push(item) + } else { + getArticleList(item.article_category_id).then(res => { + this.recoList = res.data.list + }) + } + }) + + this.tabsData1.list = list + this.getArticleList(list[0].article_category_id) + }, + async getArticleList(id) { + let obj = { + is_home: 1 + } + const { + data + } = await getArticleList(id) + this.articleList = data.list + }, + article(item) { + uni.navigateTo({ + url: '/pages/news_details/index?id=' + item.article_id + }) + }, selectPlce(e) { - this.selfLocation() - this.Area() - this.street_id = e.value[1].code - this.town = e.value[1].name - this.getCloudShopMerId(e.value[1].code) + this.street_id = e.value[1].code + this.town = e.value[1].name + this.getCloudShopMerId(e.value[1].code) }, getCloudShopMerId(id) { - get_cloud_shop(id).then(res => { - res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0 - }) + get_cloud_shop(id).then(res => { + res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0 + }) }, confirm(e) { this.where.street_id = e.value[1].code @@ -204,17 +312,20 @@ }, gogogo(item) { if (this.tabsData.tabsActive == 1) { + uni.navigateTo({ - //#ifdef APP - url: '/pages/short_video/appSwiper/index?id=' + item.community_id, - //#endif - //#ifndef MP || H5 - url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id - //#endif + // #ifdef MP || H5 + url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}` + // #endif + // #ifdef APP + url: `/pages/short_video/appSwiper/index?id=${item.community_id}` + // #endif }) + } else { uni.navigateTo({ - url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id + + url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}` }) } }, @@ -234,16 +345,16 @@ }) }, getGoods: function(item) { - + graphicLstApi(this.where).then(res => { this.cateGoods.push(...res.data.list) if (res.data.list.length < this.where.limit) this.status = 'nomore' - + if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true - - if(item){ - - if (item.index == 1 &&this.cateGoods[0] ) { + + if (item) { + + if (item.index == 1 && this.cateGoods[0]) { uni.navigateTo({ // #ifdef MP || H5 url: `/pages/short_video/nvueSwiper/index?id=${this.cateGoods[0].community_id}` @@ -254,7 +365,7 @@ }) } } - + }) }, /*获取分类列表*/ @@ -282,11 +393,18 @@ }, selfLocation() { - const that = this + if (uni.getStorageSync('loction') == true) { + this.isshow = false + } else { + this.isshow = true + uni.setStorageSync('loction', true); + } uni.getLocation({ type: 'wgs84', timeout: '10', success: (res) => { + // console.log(res) + this.isshow = false let latitude, longitude; latitude = res.latitude.toString(); longitude = res.longitude.toString(); @@ -294,8 +412,10 @@ lat: latitude, long: longitude }).then(res => { - that.$store.commit('setLocation', res.data) - that.street = res.data.address_component.street + uni.setStorageSync('adress_location',res.data.address) + // that.$store.dispatch('setLocation', res.data) + + // that.street = res.data.address_component.street }).catch(err => { uni.showToast({ title: err, @@ -304,6 +424,7 @@ }) }, fail: (err) => { + this.isshow = false uni.showToast({ title: "获取定位超时", icon: 'none', @@ -403,6 +524,33 @@ // background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%); } + .location { + background-color: #F6F6F6; + width: 680rpx; + height: 150rpx; + position: absolute; + top: 0; + z-index: 9999; + border-radius: 20rpx; + left: 50%; + margin-left: -340rpx; + margin-top: 80rpx; + padding-left: 20rpx; + + .locationa { + font-size: 28rpx; + color: #000; + font-weight: 500; + margin-top: 30rpx; + margin-bottom: 15rpx; + } + + .locationb { + font-size: 20rpx; + color: #5a5a5a; + } + } + .Circle_friends { position: relative; padding: 0 0 87.72rpx 0; @@ -432,6 +580,79 @@ justify-content: center; } + .article_box { + height: 100%; + width: 694.74rpx; + margin: 0 auto; + background-color: #fff; + border-radius: 16rpx; + padding: 0 24.56rpx; + box-sizing: border-box; + + .title-box { + height: 87.72rpx; + + text { + font-size: 28.07rpx; + } + } + + .article-item { + display: flex; + // height: 175.44rpx; + justify-content: space-between; + border-bottom: 1px solid #f0f0f0; + padding: 21.05rpx 0; + + .text { + flex: 1; + height: 122.81rpx; + margin-right: 17.54rpx; + font-size: 24rpx; + color: #999; + display: flex; + flex-direction: column; + justify-content: space-between; + + .name { + font-size: 26.32rpx; + color: #282828; + } + } + + .pictrue { + width: 175.44rpx; + height: 122.81rpx; + + image { + width: 100%; + height: 100%; + border-radius: 8px; + } + } + } + } + + .tabs_wrapper { + width: 694.74rpx; + margin: 38.6rpx auto; + margin-bottom: 21.05rpx; + + .title { + font-size: 31.58rpx; + font-weight: bold; + + &::before { + content: ''; + display: inline-block; + width: 3px; + height: 31.58rpx; + background-color: #F84221; + margin-right: 7.02rpx; + } + } + } + .goods { margin: 0 auto; width: 694.74rpx; diff --git a/pages/news_list/index.vue b/pages/news_list/index.vue index a03bd95..255639e 100644 --- a/pages/news_list/index.vue +++ b/pages/news_list/index.vue @@ -1,339 +1,352 @@ \ No newline at end of file diff --git a/pages/nongKe/supply_chain/supplier.vue b/pages/nongKe/supply_chain/supplier.vue index ca5800e..dff372f 100644 --- a/pages/nongKe/supply_chain/supplier.vue +++ b/pages/nongKe/supply_chain/supplier.vue @@ -12,7 +12,7 @@ - @@ -20,7 +20,7 @@ - + --> - + + + @@ -30,7 +32,8 @@ 待发货 等待其他人参加拼团 待核销 - {{orderInfo.is_virtual == 1 ? '服务商品已虚拟发货' : '待收货'}} + + {{orderInfo.is_virtual == 1 ? '服务商品已虚拟发货' : '待收货'}} 待评价 已完成 @@ -42,7 +45,9 @@ - 待付款 + + 待付款 待发货 @@ -55,8 +60,10 @@ 已完成 - - + + + @@ -291,6 +298,8 @@ {{ orderInfo.presellOrder.final_start_time | filterDay }} 付尾款 + + 立即付款 取消订单 @@ -303,6 +312,12 @@ 取消拼团 + + 取消订单 + + 立即付款 + + 查看拼团 @@ -787,7 +802,20 @@ * 打开支付组件 * */ + pay_opena() { + uni.showModal({ + title: '提示', + title: '该订单属于先货后款的订单,等商户确认后才能支付', + success: function(res) { + if (res.confirm) { + console.log('用户点击确定'); + } else if (res.cancel) { + console.log('用户点击取消'); + } + } + }); + }, pay_open: function(pay_price, order_id) { this.pay_close = true; diff --git a/pages/order_details/stay.vue b/pages/order_details/stay.vue index bc382fc..2e7bb70 100644 --- a/pages/order_details/stay.vue +++ b/pages/order_details/stay.vue @@ -365,7 +365,7 @@ onLoad: function(options) { console.log('11111111') this.credit_buy = options.credit_buy - console.log(options.product_type) + // console.log(options.product_type) if (options.product_type) { this.product_type = options.product_type } diff --git a/pages/short_video/appSwiper/index.nvue b/pages/short_video/appSwiper/index.nvue index a8c726b..36092dc 100644 --- a/pages/short_video/appSwiper/index.nvue +++ b/pages/short_video/appSwiper/index.nvue @@ -20,7 +20,7 @@ 】 --> - + 关注 @@ -1182,7 +1182,7 @@ margin: 0 30rpx; .tName { - color: #ffffff; + color: #000; font-size: 32rpx; &.on { diff --git a/pages/short_video/nvueSwiper/index.nvue b/pages/short_video/nvueSwiper/index.nvue index 3389670..1dd3c5a 100644 --- a/pages/short_video/nvueSwiper/index.nvue +++ b/pages/short_video/nvueSwiper/index.nvue @@ -15,7 +15,7 @@ - + @@ -1258,6 +1258,8 @@ z-index: 9; width: 750rpx; height: 120rpx; + + flex-direction: row; justify-content: center; align-items: center; @@ -1279,7 +1281,7 @@ margin-right: 40rpx; margin-left: 20rpx; font-size: 30rpx; - color: #fff; + color: #000; margin-top: 60rpx; } } @@ -1288,7 +1290,7 @@ margin: 0 30rpx; .tName { - color: #ffffff; + color: #000; font-size: 32rpx; &.on { diff --git a/pages/supply_chains/supply_chains.vue b/pages/supply_chains/supply_chains.vue index 4085b86..ea6fac2 100644 --- a/pages/supply_chains/supply_chains.vue +++ b/pages/supply_chains/supply_chains.vue @@ -1,456 +1,513 @@ \ No newline at end of file diff --git a/pages/users/order_list/indexCopy.vue b/pages/users/order_list/indexCopy.vue index 5eac2c6..88b8a85 100644 --- a/pages/users/order_list/indexCopy.vue +++ b/pages/users/order_list/indexCopy.vue @@ -148,7 +148,8 @@ ¥{{item.pay_price}} - + 立即付款 @@ -181,6 +182,7 @@ 已退款 待结算 + 待商家确认 - + 去付款 + + 去付款 - + + + 去付款 + + + 去付款 + + - + 去结算 @@ -320,8 +333,8 @@ - + @@ -407,7 +420,7 @@ limit: 20, receivingshow: false, domain: HTTP_REQUEST_URL, - order_type:0, + order_type: 0, payMode: [{ name: "微信支付", icon: "icon-weixinzhifu", @@ -593,12 +606,12 @@ * 打开支付组件 * */ - goPay: function(pay_price, order_id,order_type) { + goPay: function(pay_price, order_id, order_type) { this.$set(this, 'pay_close', true); this.order_id = order_id; this.pay_order_id = order_id.toString() this.$set(this, 'totalPrice', pay_price); - this.order_type=order_type + this.order_type = order_type }, /** * 支付成功回调 @@ -663,6 +676,24 @@ } // #endif }, + /** + * 点击去评价 + */ + dePay() { + + uni.showModal({ + title: '提示', + title: '该订单属于先货后款的订单,等商户确认后才能支付', + success: function (res) { + if (res.confirm) { + console.log('用户点击确定'); + } else if (res.cancel) { + console.log('用户点击取消'); + } + } + }); + + }, /** * 点击去评价 */ diff --git a/pages/users/payment/payment.vue b/pages/users/payment/payment.vue index ca3618d..c395e4d 100644 --- a/pages/users/payment/payment.vue +++ b/pages/users/payment/payment.vue @@ -204,6 +204,7 @@ }, 1000) } }).catch(err => { + uni.showToast({ title: err.message }) diff --git a/store/modules/app.js b/store/modules/app.js index bd21df9..9c5e7c0 100644 --- a/store/modules/app.js +++ b/store/modules/app.js @@ -27,7 +27,6 @@ const state = { const mutations = { setLocation(state, data) { - // console.log(data); state.location = data Cache.set('LOCATION_DATA', data); },