diff --git a/pages/cloud_warehouse/big_classification/index.vue b/pages/cloud_warehouse/big_classification/index.vue index 7dae72f..078f18b 100644 --- a/pages/cloud_warehouse/big_classification/index.vue +++ b/pages/cloud_warehouse/big_classification/index.vue @@ -46,17 +46,10 @@ data() { return { list: [], - mer_id: '', - type_id: '', - street_id: '', - town_name: '' } }, onLoad(opt) { - this.type_id = opt.type_id; - this.street_id = opt.street_id; - this.town_name = opt.town_name; this.getCloundShop(); }, diff --git a/pages/cloud_warehouse/small_classification/index.vue b/pages/cloud_warehouse/small_classification/index.vue index 59758ef..e48863a 100644 --- a/pages/cloud_warehouse/small_classification/index.vue +++ b/pages/cloud_warehouse/small_classification/index.vue @@ -12,7 +12,8 @@ @click='backjJump'> + v-model="storeParam.keyword" @search="searchSubmit" + @clear="searchSubmit"> @@ -38,13 +39,18 @@ - - - {{item.label_name}} + + + + + + {{item.label_name}} + + - + - - - - @@ -128,24 +129,11 @@ getStoreList, getGeocoder, } from '@/api/store.js'; - import { - wgsToGcj - } from "@/utils/wgs.js"; - import { - supMenuApi - } from '@/api/requesta.js'; import recommend from '../../nongKe/supply_chain/component/recommend'; import rightSlider from '../../nongKe/supply_chain/component/rightSlider'; - import { - merClassifly, - getStoreTypeApi - } from '@/api/store.js'; import { mapGetters } from "vuex"; - import { - goShopDetail - } from '@/libs/order.js' import { configMap } from '@/utils'; @@ -154,25 +142,14 @@ getArea, getStreet } from '@/api/article.js'; - import { - getIndexData, - getDiy - } from '@/api/api.js' - import { HTTP_REQUEST_URL, ENV } from '@/config/app'; - import { - townCloud, - getCityCloundShop, - getCategoryListLevel - } from '@/api/requesta.js' import { getCartCounts, getCartList, } from '@/api/requesta.js'; - import Cache from '@/utils/cache'; import shortPopup from "@/components/shortPopup.vue" import { @@ -192,52 +169,15 @@ }, data() { return { - domain: HTTP_REQUEST_URL, - defaInd: [0, 0], - columnData: [], - showSerch: false, - headTop: 0, - street_id: "", - showSelect: false, price: 0, - stock: 0, nows: false, loading: false, loadingIcon: true, loadTitle: '加载更多', title: '', - hotPage: 1, - hotLimit: 10, - hotScroll: false, - // 筛选框 - rightBox: false, - //品牌列表 - brandList: [], - downKey: 0, - downStatus: false, - cloudList: [], street: "", - showPicker: false, status: "loadmore", price_order: 'price_asc', //价格排序方式(升降), price_asc, price_desc - // 下拉菜单 - downMenu: [{ - title: '默认', - key: 0, - order: "" - }, { - title: '销量', - key: 1, - order: 'sales' - }, { - title: '好评', - key: 2, - order: 'rate' - }, { - title: '距离', - key: 3, - order: 'location' - }], // 商铺列表 storeList: [], storeParam: { @@ -252,27 +192,11 @@ deduction_rate: '', mer_cate_id: '' }, - storeKey: 0, - storeScroll: true, merchant: '', // 当前选中一级分类 merchantTow: '', //当前选中二级分类 - mer_id: '', - sortId: '', - price_on: '', - price_off: '', - detaile_address: "", - recommend_address: "", - location_address: "", - latitude: "", - longitude: "", count: 0, - storeTypeArr: [], //店铺类型 - merList: [], //商户分类 - product_type: 0, show: false, image: '', //图片, - credit_buy: '', //支持先货后款 - trnList: [], goodsNum: 0, totalMoney: 0, goodsList: [], //商品列表 @@ -285,22 +209,21 @@ }; }, async onLoad(options) { - this.product_type = options.product_type ?? 0 - if (this.$store.state.storage?.location?.lat) { - this.latitude = this.$store.state.storage.location.lat; - this.longitude = this.$store.state.storage.location.long; - } - - this.credit_buy = options.credit_buy - this.storeParam.category_id = options.cate_id && options.cate_id.split(',').toString() || '' this.storeList = []; this.showLoading = true; - // 左侧 // 初始化查询第一个 + // 左侧,初始化查询第一个 const sideMenuType = uni.getStorageSync("market_type_parent"); this.sideMenuType = sideMenuType; - if (sideMenuType && sideMenuType.children && sideMenuType.children.length > 0) + if (sideMenuType && sideMenuType.children && sideMenuType.children.length > 0) { this.storeParam.mer_cate_id = this.sideMenuType.children[0].store_category_id; + this.sideMenuType.children.unshift({ + store_category_id: '', + cate_name: '全部', + pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/de2be202312151001024597.png' + }); + } + // 初始化 this.getStoreList(); @@ -314,15 +237,6 @@ this.getProportionData(); }, computed: { - downMenus: function() { - return this.downMenu.filter((item) => { - if (this.mer_location) { - return item - } else { - return item.key < 3 - } - }) - }, ...configMap({ margin_ico_switch: 0, margin_ico: '', @@ -332,50 +246,6 @@ }, mapGetters(['viewColor', 'keyColor'])), }, methods: { - confirm(e) { - this.showPicker = false - this.$emit('selectPlce', e) - this.$emit('change', e) - this.street = e.value[1].name - this.$nextTick(() => { - this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code); - - }) - this.storeParam.street_id = e.value[1].code - this.street_id = e.value[1].code - this.getStoreList() - }, - - changeHandler(e) { - const { - columnIndex, - value, - values, - index, - picker = this.$refs.uPicker - } = e; - if (columnIndex === 0) { - getStreet({ - area_code: value[0]['code'] - }).then(res => { - picker.setColumnValues(1, res.data); - }); - } - }, - - // 对象转数组 - objToArr(data) { - let obj = Object.keys(data).sort(); - let m = obj.map(key => data[key]); - return m; - }, - - navGoto(url) { - uni.redirectTo({ - url - }) - }, - navgo(url) { uni.navigateTo({ url @@ -401,7 +271,6 @@ searchSubmit: function() { this.$set(this.storeParam, 'keyword', this.storeParam.keyword); this.set_where('') - this.showSerch = false }, //点击事件处理 @@ -449,12 +318,6 @@ getStorageList(query).then(res => { this.goodsList = [...this.goodsList, ...res.data.list] this.showLoading = false - this.goodsList.forEach(item => { - this.trnList.push({ - left: 0, - bottom: 0 - }) - }) }).catch(e => { Toast(e.msg || e.message || e) this.showLoading = false; @@ -567,7 +430,6 @@ uni.stopPullDownRefresh() }, onShow() { - this.showSelect = false; this.cartFn(); }, // 页面返回 @@ -817,16 +679,32 @@ .con-right-proportion { display: flex; align-items: center; - height: 38rpx; + height: 50rpx; margin-bottom: 25rpx; + width: 100%; + + .scrollView { + width: calc(100vw - 180rpx - 154rpx); + } image { width: 154rpx; height: 28rpx; - margin-right: 50rpx; + margin-right: 20rpx; + } + + .scroll-view-wrap { + display: flex; + align-items: center; + } + + .uni-scroll-view-content { + display: flex; + align-items: center; } .con-right-proportion-item { + white-space: nowrap; margin-right: 22rpx; font-size: 26rpx; font-family: PingFang SC; diff --git a/pages/payment/get_payment.vue b/pages/payment/get_payment.vue index e393cb4..abb8a13 100644 --- a/pages/payment/get_payment.vue +++ b/pages/payment/get_payment.vue @@ -20,9 +20,8 @@ 付款金额 - + @@ -122,9 +121,9 @@ methods: { validateDecimal(event) { let val = (this.cartForm.total_amount.match(/^\d*(\.?\d{0,2})/g)[0]) || '' - this.$nextTick(() => { - this.cartForm.total_amount = val; - }) + this.$nextTick(() => { + this.cartForm.total_amount = val; + }) }, leftClick(e) { @@ -162,9 +161,9 @@ url: "/pages/payment/settlement?cartId=" + this.checkForm .cart_id + "&money=" + this.cartForm.total_amount + "&merName=" + this.merchantInfo.merchant.mer_name, - success: (res) => { - res.eventChannel.emit('datas', res1.data.platformConsumption); - } + success: (res) => { + res.eventChannel.emit('datas', res1.data.platformConsumption); + } }) }); }).catch((err) => {