Compare commits

..

14 Commits

  1. 36
      App.vue
  2. 7
      Utils/Api.js
  3. 18
      components/cart-choose/cart-choose.vue
  4. 34
      components/goods-list/goods-list.vue
  5. 2
      index.html
  6. 797
      pages/tabBar/category/category.vue
  7. 27
      pages/tabBar/classify/classify.vue
  8. 2
      pages/user/coupon/coupon.vue
  9. 3
      pages/user/order_list/order_list.vue
  10. 9
      physical-merchants/address/addNewAddress/addNewAddress.vue
  11. 28
      physical-merchants/address/address.vue
  12. 17
      physical-merchants/classify/cart/cart.vue
  13. 13
      physical-merchants/classify/goods-search/goods-search.vue
  14. 14
      physical-merchants/classify/goodsDetail/goodsDetail.vue
  15. 58
      physical-merchants/settleAccounts/settleAccounts.vue
  16. BIN
      static/img/changed.png

@ -99,25 +99,25 @@
// #endif // #endif
// #ifdef H5 // #ifdef H5
let that = this; let that = this;
that.globalData.url = 'https://hsgcs.dctpay.com/crest'; // that.globalData.url = 'https://hsgcs.dctpay.com/crest';
that.globalData.v1url = 'https://hsgcs.dctpay.com/v1'; // that.globalData.v1url = 'https://hsgcs.dctpay.com/v1';
that.globalData.payurl = 'https://gratia-pay.dctpay.com/crest'; // that.globalData.payurl = 'https://gratia-pay.dctpay.com/crest';
that.globalData.orderurl = 'https://hsgcs.dctpay.com/order'; // that.globalData.orderurl = 'https://hsgcs.dctpay.com/order';
that.globalData.userurl = 'https://hsgcs.dctpay.com/user'; // that.globalData.userurl = 'https://hsgcs.dctpay.com/user';
that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest'; // that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest';
that.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/'; // that.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/';
that.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/'; // that.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/';
that.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/'; // that.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/';
// that.globalData.url = 'https://hsg.dctpay.com/crest'; that.globalData.url = 'https://hsg.dctpay.com/crest';
// that.globalData.v1url = 'https://hsg.dctpay.com/v1'; that.globalData.v1url = 'https://hsg.dctpay.com/v1';
// that.globalData.payurl = 'https://pay.dctpay.com/crest'; that.globalData.payurl = 'https://pay.dctpay.com/crest';
// that.globalData.orderurl = 'https://hsg.dctpay.com/order'; that.globalData.orderurl = 'https://hsg.dctpay.com/order';
// that.globalData.userurl = 'https://hsg.dctpay.com/user'; that.globalData.userurl = 'https://hsg.dctpay.com/user';
// that.globalData.brestUrl = 'https://hsg.dctpay.com/brest'; that.globalData.brestUrl = 'https://hsg.dctpay.com/brest';
// that.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/'; that.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/';
// that.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/'; that.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/';
// that.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/'; that.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/';
uni.getStorage({ uni.getStorage({
key: 'openId', key: 'openId',
success(e) { success(e) {

@ -140,6 +140,13 @@ export const getOrderById = params => {
export const getMerchantList = params => { export const getMerchantList = params => {
return POST('GET', `${base}/highMerchantStore/getMerchantList`, params).then(res => res.data); return POST('GET', `${base}/highMerchantStore/getMerchantList`, params).then(res => res.data);
} }
//查询新的地图商户
export const getIndustry = params => {
return POST('GET', `${base}/common/getIndustry`, params).then(res => res.data);
}
export const getMapStore = params => {
return POST('GET', `${base}/common/getMapStore`, params).then(res => res.data);
}
//首页获取门店 //首页获取门店
export const getStoreListByMerchant = params => { export const getStoreListByMerchant = params => {
return POST('GET', `${base}/highMerchantStore/getStoreListByMerchant`, params).then(res => res.data); return POST('GET', `${base}/highMerchantStore/getStoreListByMerchant`, params).then(res => res.data);

@ -3,9 +3,9 @@
<!-- v-if="specificationList.length>0" --> <!-- v-if="specificationList.length>0" -->
<view class="choose-detail" > <view class="choose-detail" >
<view class="choose-top"> <view class="choose-top" >
<view class="marRight10"> <view class="marRight10">
<image v-if="specificationList[chooseIndex].showImg" :src="imageUrl+specificationList[chooseIndex].showImg" @click="perImage(chooseIndex,imgList)" class="img choose-img " mode="aspectFill"></image> <image v-if="specificationList[chooseIndex].showImg" :src="imageUrl+specificationList[chooseIndex].showImg" @click="perImage(chooseIndex,[imageUrl+specificationList[chooseIndex].showImg])" class="img choose-img " mode="aspectFill"></image>
</view> </view>
<view class="choose-price marRight10"> <view class="choose-price marRight10">
<text class="" style="text-decoration: line-through;">原价¥{{specificationList[chooseIndex].originalPrice}}</text> <text class="" style="text-decoration: line-through;">原价¥{{specificationList[chooseIndex].originalPrice}}</text>
@ -44,7 +44,7 @@
</view> </view>
<view class="choose-select"> <view class="choose-select">
<view v-for="(item,index) in specificationList" :key="index" :data-index="index" :class="'choose-item padleft10 mart10 '+ (chooseIndex == index ? 'choose-active':'')" @click="select(index)"> <view v-for="(item,index) in specificationList" :key="index" :data-index="index" :class="'choose-item padleft10 mart10 '+ (chooseIndex == index ? 'choose-active':'')" @click="select(index)">
<image v-if="item.showImg" :src="imageUrl+item.showImg" class="img "></image> <image v-if="item.showImg" :src="imageUrl+item.showImg" @click="perImage(0,[imageUrl+item.showImg])" class="img "></image>
<view class="padleft15 paddtright15 font13"> {{item.name}}</view> <view class="padleft15 paddtright15 font13"> {{item.name}}</view>
<view class="padleft15 paddtright5 fontwig6 font13 fcor999">{{item.price}}</view> <view class="padleft15 paddtright5 fontwig6 font13 fcor999">{{item.price}}</view>
<view class="padleft15 paddtright5 font13 ">库存{{item.stock}}</view> <view class="padleft15 paddtright5 font13 ">库存{{item.stock}}</view>
@ -365,9 +365,9 @@
width: calc(100% - 40rpx); width: calc(100% - 40rpx);
padding-bottom: 20rpx; padding-bottom: 20rpx;
.choose-way{ .choose-way{
height: 70rpx; height: 80rpx;
width: 100%; width: 100%;
border-radius: 35rpx; border-radius: 40rpx;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
align-items: center; align-items: center;
@ -375,15 +375,15 @@
.way{ .way{
width: 50%; width: 50%;
height:70rpx; height:80rpx;
line-height:70rpx; line-height:80rpx;
text-align: center; text-align: center;
} }
.way1{ .way1{
width: 100% ; width: 100% ;
height: 70rpx; height: 80rpx;
line-height: 70rpx; line-height: 80rpx;
text-align: center; text-align: center;
} }

@ -1,6 +1,7 @@
<template> <template>
<view style="height: 100%;"> <view style="height: 100%;">
<scroll-view v-if="typeList=='classify'" style="perspective: 1000;" class="scroll-view goods-list" :scroll-top="scrollTop" :scroll-y="true" <!-- perspective: 1000; -->
<scroll-view v-if="typeList=='classify'" class="scroll-view goods-list" :scroll-top="scrollTop" :scroll-y="true"
:lower-threshold="lowerThreshold" @scrolltolower="handleScrolltolower" @touchstart="handleTouchStart" :lower-threshold="lowerThreshold" @scrolltolower="handleScrolltolower" @touchstart="handleTouchStart"
@touchmove.stop.prevent="handleTouchMove" @touchend="handleTouchEnd" @touch.stop> @touchmove.stop.prevent="handleTouchMove" @touchend="handleTouchEnd" @touch.stop>
<!-- @touchmove.stop.prevent --> <!-- @touchmove.stop.prevent -->
@ -76,8 +77,8 @@
<scroll-view v-if="typeList=='goodsSearch'" :scroll-y="true" class="ht-auto goods-list" <scroll-view v-if="typeList=='goodsSearch'" :scroll-y="true" class="ht-auto goods-list"
@scrolltolower="scroll_lower" lower-threshold="30"> @scrolltolower="scroll_lower" lower-threshold="30">
<view class="right-content-actual pr bs" :style="'padding-bottom:'+paddBottom+'px;height:100%'"> <!-- <view class="right-content-actual pr bs" :style="'padding-bottom:'+paddBottom+'px;'"> -->
<view v-if="(propData || null) != null && propData.length > 0" class="oh"> <view v-if="(propData || null) != null && propData.length > 0" >
<view v-for="(item, index) in propData" :key="index"> <view v-for="(item, index) in propData" :key="index">
<view @click="goGoodsDetail(item.id)" class="goods-item bs"> <view @click="goGoodsDetail(item.id)" class="goods-item bs">
@ -102,6 +103,7 @@
</view> </view>
</view> </view>
</view> </view>
<noMore :bgColor="'#ffffff'"></noMore> <noMore :bgColor="'#ffffff'"></noMore>
</view> </view>
<!-- --> <!-- -->
@ -110,7 +112,7 @@
<!-- <text class="empty-text">{{ emptyText }}</text> --> <!-- <text class="empty-text">{{ emptyText }}</text> -->
</view> </view>
</view> <!-- </view> -->
@ -122,7 +124,7 @@
<!-- cartNum --> <!-- cartNum -->
<uniBadge class="uni-badge-left-margin badgeClass" max-num="99" :text="cartNum+''" type="warning" <uniBadge class="uni-badge-left-margin badgeClass" max-num="99" :text="cartNum+''" type="warning"
size="small" /> size="small" />
<view class="icon cart font30px"> <view class="icon cart font40">
</view> </view>
</view> </view>
@ -197,9 +199,6 @@
}, },
mounted() { mounted() {
this.handleInit(); this.handleInit();
}, },
props: { props: {
propData: { propData: {
@ -228,10 +227,10 @@
typeList: { typeList: {
type: String, type: String,
default: "classify" default: "classify"
} },
}, },
watch: { watch: {
selectObject: { selectObject: {
handler(n, o) { handler(n, o) {
if (n.selectIndex == n.length - 1) { if (n.selectIndex == n.length - 1) {
@ -486,9 +485,13 @@
position: absolute; position: absolute;
bottom: 10px; bottom: 10px;
right: 25px; right: 25px;
width: 30px; width: 35px;
height: 30px; height: 35px;
color: #3DA7E7 !important; color: #3DA7E7 !important;
.font40{
font-size: 35px !important;
color: #F0AD4E;
}
} }
@ -498,10 +501,6 @@
right: -10px; right: -10px;
} }
.font30px {
font-size: 30px !important;
color: #F0AD4E;
}
// //
.br { .br {
@ -602,7 +601,7 @@
line-height: 80rpx; line-height: 80rpx;
color: #3DA7E7; color: #3DA7E7;
text-align: center; text-align: center;
font-size: 40rpx; font-size: 50rpx;
} }
@ -633,6 +632,7 @@
.scroll-content1 { .scroll-content1 {
width: 100%; width: 100%;
padding-bottom: 40px;
// position: relative; // position: relative;
// height: inherit; // height: inherit;
.empty-view { .empty-view {

@ -18,7 +18,7 @@
<script src="https://unpkg.com/video.js/dist/video.min.js"></script> <script src="https://unpkg.com/video.js/dist/video.min.js"></script>
<script src="https://cdn.bootcss.com/socket.io/2.1.1/socket.io.js"></script> <script src="https://cdn.bootcss.com/socket.io/2.1.1/socket.io.js"></script>
<script src="https://open.95516.com/s/open/js/upsdk.js"></script> <script src="https://open.95516.com/s/open/js/upsdk.js"></script>
<script src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script> <!-- <script src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script> -->
</head> </head>
<body> <body>
<noscript> <noscript>

@ -1,142 +1,236 @@
<template> <template>
<view> <view class="map-container">
<!-- 状态栏 --> <map style="width: 100%; height: 10vh;" :style="{height:mapheight}" :latitude="latitude" :longitude="longitude"
<view class="status" :style="{position:headerPosition}"></view> :markers="marker" :scale="scale" @markertap="markertap" @callouttap='callouttap'>
<view class="header" :style="{position:headerPosition}"> <!-- <cover-view class="cover-view-loca" :style='{bottom:coverbottom}' @click="onControltap">
<view class="addr" @click="goPostion"> <cover-image class="cover-image" @click="play" src="../../../static/img/adresw.png"></cover-image>
<!-- <view class="icon location"></view> --> <cover-view>
{{city}} 定位
<image mode="widthFix" style="width: 15px;" :src="imagewxUrl+imgadres"></image> </cover-view>
</cover-view> -->
<!-- 一级分类 -->
<view class="width100 cover-views mart15">
<scroll-view class="width90 cover-view-cont" scroll-x="true">
<view class="cover-view-head font14" :class="[typeid == item.id ? 'onclick' : '']"
v-for="(item,index) in goodsFirstClassList" :key="index" @click="changeType(item)">{{item.name}}
</view>
</scroll-view>
<!-- 二级分类 -->
<view class="width100 mart15 backcorfff cover-viewchage alijus fotct" style="border-radius: 22px;">
<!-- :class="[selectFirst == 1? 'onchange' : '']" -->
<view class="font14 width30w onchange text1" @click="changeChilerType()">{{selectFirstName}}
<image mode="widthFix" class="margle" style="width: 8px;" :src="imagewxUrl+imgadres2"></image>
</view>
<view class="font14 width30w onchange" @click="changeChilerdistance()">{{distanceName}}
<image mode="widthFix" class="margle" style="width: 8px;" :src="imagewxUrl+imgadres2"></image>
</view>
<view class="font14 width30w">
<!-- 全部
<image mode="widthFix" class="margle" style="width: 8px;" :src="imagewxUrl+imgadres2"></image> -->
</view>
</view>
</view> </view>
<view class="input-box"> <!-- // -->
<input placeholder="搜索门店" placeholder-style="color:#c0c0c0;" @tap="toSearch()" /> <view class="change-cont" v-if="selectChiler == 1">
<view class="icon search"></view> <view class="width100 backcorfff"></view>
</view> </view>
</view> <!-- // -->
<!-- 占位 --> <view class="change-optiac paddbotm20" v-if="selectChiler == 1">
<view class="place"></view> <scroll-view scroll-y="true" class="width100 height260">
<!-- <view class="category-list"> --> <view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart"
<view class="width100 height45l backcorfff" v-if="MerchantList != ''"> v-for="(item,index) in goodsSendotClassList" :key="item.id" @click="changeFirstcont(item)">
<view class="width90"> <view class="width90w" :class="[selectFirst == item.id? 'onchange' : '']">{{item.name}}</view>
<!-- <view class="stuMenu flleft fotct" @click="showPopup() ">{{showCategoryIndex}} <image class="icon20" src="../../../static/img/changed.png" mode="widthFix"
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image> v-if="selectFirst == item.id"></image>
</view> -->
<picker mode="selector" :range="MerchantList" range-key="merchantName" @change="showCategory">
<view class="font14">{{showCategoryIndex}}
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image>
</view> </view>
</picker> </scroll-view>
</view>
<!-- 二级距离 -->
<view class="change-optiac paddbotm20" v-if="selectChilerdistance == 1">
<scroll-view scroll-y="true" class="width100 height260">
<view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart"
v-for="(item,index) in distanceList" :key="index" @click="changeDistance(item)">
<view class="width90w" :class="[ distance== item.id? 'onchange' : '']">{{item.title}}</view>
<image class="icon20" src="../../../static/img/changed.png" mode="widthFix"
v-if="distance == item"></image>
</view>
</scroll-view>
</view> </view>
</view>
<view v-if="categoryList == '' " class="mart60 fotct font14 fcor666 fotct width100"> <!-- 未打开筛选前 -->
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image> <view class="cover-view-foot" v-if="isSelected == 1">
</view> <view class="line-view" @click="updateSelected(2)"></view>
<view class="mart10 fcor666 font13 width100" @click="updateSelected(2)">发现更多商户</view>
<view class="input-box">
<input placeholder="搜索商品" v-model="searchName" placeholder-style="color:#c0c0c0;"
@click="updateSelected(2)" />
</view>
</view>
<view class="width96 height100p backcorfff border-r mart10" v-for="(box,i) in categoryList" :key="i"> <!-- 打开筛选后 -->
<image mode="widthFix" :src="imageUrl+box.ext1" class="recontleft flleft mart10 border-r" <view class="cover-view-foot-behind" v-if="isSelected == 2">
style="max-height: 80px;" @click="toCategory(box)"> <view class="line-view" @click="updateSelected(1)"></view>
</image> <view class="mart10 fcor666 font13 width100" @click="updateSelected(1)">发现更多商户</view>
<view class="recontright"> <view class="input-box">
<view class="text2 width100 font18 fontwig6 paddtop15" @click="toCategory(box)"> <input placeholder="搜索商品" v-model="searchName" placeholder-style="color:#c0c0c0;"
{{box.storeName}} @input="getMapStore()" />
</view> </view>
<view class="width100 mart10 height22"> <scroll-view class="scoroll-cont width94 mart10" scroll-y="true">
<view class="width70 flleft text1 font13 fcor999" @click="toCategory(box)"> <view v-if="marker == '' " class="mart30 fotct font14 fcor666 fotct width100">
{{box.address}} <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image>
</view> </view>
<view class="width30 flright font13 fcor666 fotct" @click="seeloaction(item)"> <view class="width96 height80 bor-botm1 alijusstart" v-for="(box,i) in marker" :key="i"
<image mode="widthFix" :src="imagewxUrl+imgadres4" style="width: 10px;"></image> @click="seeloaction(box)">
{{box.distance}}km <image mode="widthFix" :src="box.logo" class="recontleft flleft border-r"
style="max-height: 60px;">
</image>
<view class="fotlt paddleft5">
<view class="text2 width100 font18 fontwig6">
{{box.callout.content}}
</view>
<view class="height22">
<view class="width70 flleft text1 font13 fcor999">
{{box.callout.address}}
</view>
<view class="width30 flright font13 fcor666 fotct">
<image mode="widthFix" :src="imagewxUrl+imgadres4" style="width: 10px;"></image>
{{box.distance}}km
</view>
</view>
</view>
</view> </view>
</view> </scroll-view>
</view> </view>
</view>
<!-- <wybPopup ref="popup" type="top" height="800" width="500" radius="6" :showCloseIcon="false"> </map>
<view class="fotct font18 fontwig6 fcor333 mart10 height30">筛选门店</view>
<view class="mart15">
<view :class="item.merchantName == showCategoryIndex?'activeRefuel':'refuel'"
v-for="(item,index) in MerchantList" :key="index" @click="showCategory(item.merchantName,item.id)">
{{item.merchantName}}
</view>
</view>
</wybPopup> -->
<!-- #ifdef MP-->
<button open-type="contact">
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="xfimg"></image>
</button>
<!-- #endif -->
<!-- #ifdef H5-->
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="h5xfimg" @click="playPhone"></image>
<!-- #endif -->
</view> </view>
</template> </template>
<script> <script>
import { import {
getCouponList, getIndustry,
getStoreListByMerchant, getMapStore
getMerchantList, } from '../../../Utils/Api.js';
findByLatAndLng
} from "../../../Utils/Api.js";
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
let app = getApp(); let app = getApp();
export default { export default {
components: {
wybPopup
},
data() { data() {
return { return {
showCategoryIndex: '', latitude: '', //
showCategoryIndexId: '', longitude: '', //
headerPosition: "fixed", scale: 13, //
bottomData: false,
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'jt.png',
imgadres2: 'xiala.png', imgadres2: 'xiala.png',
imgadres1: 'noorder.png',
imgadres4: 'dh.png',
imgadres3: 'noorder.png', imgadres3: 'noorder.png',
imgadres5: 'cusservice.png', imgadres4: 'dh.png',
city: "", marker: '', //
imageUrl: app.globalData.imgUrl, typeid: 0, //
// isSelected: 1, //
categoryList: [], selectFirst: '', //
MerchantList: [], selectFirstName: '', //
pageNum: 1, selectChiler: 2, //
pageSize: 10, selectChilerdistance: 2, //
isNoMoreData: false goodsFirstClassList: '', //
// loadingText: '' goodsSendotClassList: '', //
distanceList: [{
id: 1,
title: '1km'
},
{
id: 3,
title: '3km'
},
{
id: 5,
title: '5km'
},
], //
distance: '1',
distanceName: '1km',
searchName: '' //
} }
}, },
onPageScroll(e) { onLoad() {
//iOS this.getIndustry();
if (e.scrollTop >= 0) { this.latitude = app.globalData.latitude;
this.headerPosition = "fixed"; this.longitude = app.globalData.longitude;
} else {
this.headerPosition = "absolute";
}
}, },
onLoad() {}, computed: {
onShow() { mapheight() {
this.pageNum = 1; let data = ''
this.categoryList = []; if (this.bottomData) {
this.MerchantList = []; if (this.upTop) {
if (app.globalData.cityName != '') { data = '50px'
this.city = app.globalData.qianzhuCityName; } else {
this.getMerchantList(); data = '200px'
} else { }
this.postionIng(); } else {
data = '100vh'
}
return data
},
coverbottom() {
let data = ''
if (this.bottomData) {
data = '20rpx'
} else {
data = '200rpx'
}
return data
} }
},
//page.json"onReachBottomDistance"
onReachBottom() {
this.getStoreListByMerchant();
}, },
methods: { methods: {
// //
showPopup() { getIndustry() {
this.$refs.popup.show(); getIndustry().then(res => {
if (res.return_code == '000000') {
this.goodsFirstClassList = res.return_data;
this.typeid = res.return_data[0].id;
this.goodsSendotClassList = res.return_data[0].childIndustry;
this.selectFirst = res.return_data[0].childIndustry[0].id;
this.selectFirstName = res.return_data[0].childIndustry[0].name;
this.getMapStore();
}
})
},
//
getMapStore() {
let datas = {
distance: this.distance,
name: this.searchName,
childId: this.selectFirst,
longitude: app.globalData.longitude,
latitude: app.globalData.latitude
}
getMapStore(datas).then(res => {
if (res.return_code == '000000') {
this.marker = res.return_data
} else {
this.marker = [];
}
})
},
//
changeFirstcont(item) {
this.selectFirst = item.id;
this.selectFirstName = item.name;
this.selectChiler = 2;
this.getMapStore();
},
//
changeDistance(item) {
this.distance = item.id;
this.distanceName = item.title;
this.selectChilerdistance = 2;
this.getMapStore();
}, },
//
markertap(e) {},
//
callouttap(e) {
console.log('地图点击事件', e)
},
postionIng() { postionIng() {
let that = this; let that = this;
uni.getLocation({ uni.getLocation({
@ -244,361 +338,206 @@
this.categoryList = []; this.categoryList = [];
} }
}) })
}, },
// //
showCategory(e) { onControltap() {
this.showCategoryIndex = this.MerchantList[e.target.value].merchantName;
this.showCategoryIndexId = this.MerchantList[e.target.value].id;
this.pageNum = 1;
this.pageSize = 10;
this.isNoMoreData = false;
this.categoryList = [];
this.getStoreListByMerchant();
}, },
toCategory(e) { //
uni.navigateTo({ changeType(item) {
url: '../../goods/store-list/store-details?id=' + e.id + '&juli=' + e.distance this.typeid = item.id;
}) this.goodsSendotClassList = item.childIndustry;
// uni.navigateTo({ this.selectFirst = item.childIndustry[0].id;
// url: '../../goods/goods?id=' + e this.selectFirstName = item.childIndustry[0].name;
// }); this.getMapStore();
uni.setStorage({
key: "store_id",
data: e.id
})
uni.setStorage({
key: "store_juli",
data: e.distance
})
}, },
// //
toSearch() { changeChilerType() {
uni.navigateTo({ if (this.selectChiler == 1) {
url: '../../goods/HM-search/HM-search' this.selectChiler = 2;
}) } else {
// uni.showToast({title: ""}); this.selectChiler = 1;
}
}, },
// //
playPhone() { changeChilerdistance() {
let cont = "本服务由惠兑礼品提供\n400-678-0738"; if (this.selectChilerdistance == 1) {
let content = cont.replace(/<br>/g,"\n"); this.selectChilerdistance = 2;
uni.showModal({ } else {
title: '客服', this.selectChilerdistance = 1;
content: content, }
success: function(res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: '4006780738', //
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
} },
}) //
} updateSelected(item) {
} this.isSelected = item;
},
seeloaction(item) {
// #ifdef H5
window.location.href =
`http://apis.map.qq.com/uri/v1/marker?marker=coord:(${item.latitude},${item.longitude})&addr:${item.address}`;
// #endif
// #ifdef MP
uni.openLocation({
latitude: Number(item.latitude), //
longitude: Number(item.longitude), //
name: item.store_name,
address: item.address
}) })
} // #endif
},
} }
} }
</script> </script>
<style lang="scss"> <style lang='less' scoped>
page { .map-container {
background-color: #f1f3f5; position: relative;
} overflow: hidden;
.h5xfimg {
width: 80rpx;
bottom: 140rpx;
position: fixed;
right: 40rpx;
}
.xfimg {
width: 80rpx;
bottom: 60rpx;
position: fixed;
right: 40rpx;
}
.status {
width: 100%;
height: 0;
position: fixed;
z-index: 10;
background-color: #fff;
top: 0;
/* #ifdef APP-PLUS */
height: var(--status-bar-height); //
/* #endif */
}
button::after {
border: none
}
.recontleft { .cover-views {
width: 80px; position: absolute;
margin-left: 10px; z-index: 99999;
} }
.recontright {
margin-left: 100px;
}
.refuel {
padding: 6px 5px;
border-radius: 5px;
background-color: #f6f6f6;
color: #666666;
margin-left: 10px;
margin-top: 15px;
display: inline-block;
font-size: 13px;
width: 18%;
text-align: center;
}
.activeRefuel { .cover-view-cont {
padding: 6px 5px; display: flex;
border-radius: 5px; flex-direction: row;
border: 1px solid #089bf5; flex-wrap: nowrap;
color: #089bf5; white-space: nowrap;
margin-left: 10px; }
margin-top: 15px;
display: inline-block;
font-size: 13px;
width: 18%;
text-align: center;
}
.stuMenu { .cover-view-head {
width: 33.3%; height: 35px;
height: 30px; line-height: 35px;
line-height: 30px; background-color: #fff;
font-size: 14px; display: inline-table;
margin-top: 10px; flex-direction: column;
color: #333333; text-align: center;
} position: relative;
margin-right: 15px;
border-radius: 22px;
padding: 0 10px;
}
.stuimg { .cover-viewchage {
width: 10px; height: 35px;
vertical-align: middle; }
}
.loading-text { .onchange {
width: 100%; color: #089bf5;
display: flex; }
justify-content: center;
align-items: center;
height: 60upx;
color: #979797;
font-size: 24upx;
}
.header { .onclick {
width: 92%; background-color: #089bf5;
padding: 0 4%; color: #fff;
height: 100upx; }
display: flex;
align-items: center;
position: fixed;
top: 0;
z-index: 10;
background-color: #0083f5;
/* #ifdef APP-PLUS */
top: var(--status-bar-height);
/* #endif */
.addr { .cover-view-loca {
width: 120upx;
height: 60upx;
flex-shrink: 0;
color: #FFFFFF;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
font-size: 28upx; justify-content: center;
width: 40px;
height: 40px;
color: #484848;
background-color: #fff;
background-size: 60px 60px;
background-position: center center;
position: absolute;
bottom: 100px;
right: 16px;
}
.icon { .cover-image {
height: 60upx; display: inline-block;
margin-right: 5upx; width: 15px;
display: flex; height: 15px;
align-items: center;
font-size: 42upx;
color: #ffc50a;
}
} }
.input-box { .cover-view-foot {
text-align: center;
height: 200rpx;
background-color: #fff;
position: absolute;
bottom: 0px;
width: 100%; width: 100%;
height: 70rpx; border-radius: 18px 18px 0 0;
background-color: #f5f5f5; }
border-radius: 10rpx;
position: relative;
display: flex;
align-items: center;
.icon {
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 0;
width: 60upx;
height: 60upx;
font-size: 34upx;
color: #c0c0c0;
}
input { .change-cont {
padding-left: 28upx; position: absolute;
height: 28upx; z-index: 99999999;
font-size: 28upx; top: 100px;
width: 100%; background-color: #333;
} width: 100%;
opacity: 0.8;
height: calc(100% - 100px);
} }
.icon-btn { .change-optiac {
width: 60upx; position: absolute;
height: 60upx; z-index: 99999999;
flex-shrink: 0; top: 100px;
display: flex; width: 100%;
background-color: #fff;
height: 260px;
}
.icon { .cover-view-foot-behind {
width: 60upx; text-align: center;
height: 60upx; height: calc(100% - 110px);
display: flex; background-color: #fff;
justify-content: center; position: absolute;
align-items: center; z-index: 999999;
font-size: 42upx; bottom: 0px;
background-color: transparent; width: 100%;
} border-radius: 18px 18px 0 0;
} }
} }
.place { .scoroll-cont {
height: calc(100% - 80px);
}
background-color: #ffffff; .line-view {
height: 100upx; width: 10%;
/* #ifdef APP-PLUS */ margin-left: 45%;
margin-top: var(--status-bar-height); height: 5px;
/* #endif */ border-radius: 12px;
margin-top: 10px;
background-color: #f0f0f0;
} }
.category-list { .input-box {
width: 100%; width: 90%;
margin-left: 5%;
margin-top: 5px;
text-align: left;
height: 70rpx;
background-color: #f0f0f0;
border-radius: 22px;
position: relative;
align-items: center;
display: flex; display: flex;
.left, input {
.right { padding-left: 12px;
position: absolute; padding-right: 12px;
height: 30px;
top: 100upx; color: #666;
/* #ifdef APP-PLUS */ font-size: 14px;
top: calc(100upx + var(--status-bar-height)); width: 100%;
/* #endif */
bottom: 0upx;
}
.left {
width: 24%;
left: 0upx;
background-color: #f2f2f2;
.row {
width: 100%;
height: 90upx;
display: flex;
align-items: center;
.text {
width: 100%;
position: relative;
font-size: 28upx;
display: flex;
justify-content: center;
color: #3c3c3c;
.block {
position: absolute;
width: 0upx;
left: 0;
}
}
&.on {
height: 100upx;
background-color: #fff;
.text {
font-size: 30upx;
font-weight: 600;
color: #2d2d2d;
.block {
width: 10upx;
height: 80%;
top: 10%;
background-color: #0083f5;
}
}
}
}
} }
}
.right { .onclick {
width: 76%; background-color: #089bf5;
left: 24%; color: #fff;
}
.category {
width: 94%;
padding: 20upx 3%;
.banner {
width: 100%;
height: 24.262vw;
border-radius: 10upx;
overflow: hidden;
box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.3);
image {
width: 100%;
height: 24.262vw;
}
}
.list {
margin-top: 40upx;
width: 100%;
display: flex;
flex-wrap: wrap;
.box {
width: calc(70vw / 2);
margin-bottom: 30upx;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
image {
width: 60%;
height: calc(70vw / 2 * 0.6);
}
.text { .recontleft {
margin-top: 5upx; width: 60px;
width: 80%; margin-left: 10px;
display: flex;
justify-content: center;
font-size: 26upx;
}
}
}
}
}
} }
</style> </style>

@ -45,7 +45,7 @@
<block v-if="(data_content || null) != null && (data_content.children || null) != null && data_content.children.length > 0"> <block v-if="(data_content || null) != null && (data_content.children || null) != null && data_content.children.length > 0">
<block v-for="(item, index) in data_content.children" :key="index"> <block v-for="(item, index) in data_content.children" :key="index">
<view :class="'dis-flex flex-center item ' + (nav_active_item_two_index == index ? 'active-class active-border nav-active' : '')" :data-index="nav_active_index" :data-itemtwoindex="index" @click="nav_event"> <view :class="'dis-flex flex-center item ' + (nav_active_item_two_index == index ? 'active-class active-border nav-active' : '')" :data-index="nav_active_index" :data-itemtwoindex="index" @click="nav_event">
<image v-if="item.img" style="height: 20px;width: 20px;" :src="imageUrl+item.img" mode="aspectFit"></image> <text class="">{{item.title || ''}}</text> <image v-if="item.img" class="item-img" :src="imageUrl+item.img" mode="aspectFit"></image> <text class="">{{item.title || ''}}</text>
</view> </view>
</block> </block>
</block> </block>
@ -78,7 +78,7 @@
:key="index" :key="index"
> >
</skeleton> </skeleton>
<goodsList v-if="hackReset&&!isLoading" :propData="goodsListData" :pageData="pageData" :selectObject="selectObject" @loadData="loadData" @switchCategory="switchCategory" :paddBottom="0" ></goodsList> <goodsList v-if="!isLoading" ref="goodsList" :hackReset="true" :propData="goodsListData" :pageData="pageData" :selectObject="selectObject" @loadData="loadData" @switchCategory="switchCategory" :paddBottom="0" ></goodsList>
<!-- <view class="spinner"> <!-- <view class="spinner">
<view class="dot"></view> <view class="dot"></view>
<view class="dot"></view> <view class="dot"></view>
@ -145,7 +145,7 @@
sortOrder:0,//12 sortOrder:0,//12
// cartNum:app.globalData.cartNum, // cartNum:app.globalData.cartNum,
hackReset:false,//
isLoading:false, isLoading:false,
skeletonNum:[1,2,3,4], skeletonNum:[1,2,3,4],
@ -160,10 +160,15 @@
}, },
onShow(){ onShow(){
this.hackReset = false; this.$nextTick(()=>{
this.$nextTick(() => { if(this.$refs.goodsList){
this.hackReset = true; this.$refs.goodsList.refreshCartNum()
}) }
})
}, },
methods:{ methods:{
// //
@ -275,7 +280,7 @@
_this.pageData.allData = res.return_data.total; _this.pageData.allData = res.return_data.total;
_this.pageData.navigateLastPage = res.return_data.navigateLastPage; _this.pageData.navigateLastPage = res.return_data.navigateLastPage;
console.log(_this.pageData) // console.log(_this.pageData)
} }
@ -381,7 +386,11 @@
/* /*
*/ */
.item-img{
height: 40rpx;
width:40rpx;
margin-right: 12rpx;
}
.spinner { .spinner {
width: 60px; width: 60px;

@ -220,7 +220,7 @@
font-size: 16px; font-size: 16px;
} }
</style> </style>
<button class="download" style="height:40px;line-height: 40PX;width:100%;border:none;">立即使用</button> <button class="download" style="height:40px;line-height: 40PX;width:100%;border:none;">使用</button>
</script> </script>
</wx-open-launch-weapp> </wx-open-launch-weapp>

@ -307,13 +307,12 @@
if(res.return_data.list.length>0){ if(res.return_data.list.length>0){
res.return_data.list.map(item=>{ res.return_data.list.map(item=>{
if(item.ext6){ if(item.ext6&&item.productType==12){
item.ext6 = item.ext6.split(',') item.ext6 = item.ext6.split(',')
} }
}) })
} }
this.orderList = this.orderList.concat(res.return_data.list); this.orderList = this.orderList.concat(res.return_data.list);
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else { } else {

@ -251,14 +251,7 @@
}) })
}, },
backPageRefresh() { backPageRefresh() {
let pages = getCurrentPages(); // uni.navigateBack({})
let beforePage = pages[pages.length - 2]; //
uni.navigateBack({
success:function(){
beforePage.$vm.initData();
// console.log("!");
}
})
}, },
addAddress(){ addAddress(){
let _this = this; let _this = this;

@ -60,9 +60,7 @@
}, },
data() { data() {
return { return {
addressId: [
111, 222, 333, 444
],
selectId: 0, selectId: 0,
addressList: [], addressList: [],
status: 0, // status: 0, //
@ -84,6 +82,7 @@
title: '加载中', title: '加载中',
mask:true, mask:true,
}); });
this.addressList=[];
getDeliveryAddressList().then(res => { getDeliveryAddressList().then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
@ -218,17 +217,20 @@
}, },
chooseAddress(addressItem) { chooseAddress(addressItem) {
console.log(addressItem, "addressItem")
if (this.status == 1) { if (this.status == 1) {
let pages = getCurrentPages(); // // let pages = getCurrentPages(); //
let beforePage = pages[pages.length - 2]; // // let beforePage = pages[pages.length - 2]; //
uni.navigateBack({ // uni.navigateBack({
success: function() { // success: function() {
beforePage.$vm.getRegiFreight(addressItem); // beforePage.$vm.getRegiFreight(addressItem);
console.log("返回成功!");
}
}) // }
// })
uni.$emit('address',addressItem);
uni.navigateBack({})
} }

@ -60,7 +60,7 @@
</scroll-view> </scroll-view>
<view v-if="cartList.length==0" class="empy-cart fcor666 fotct cart-list backcor9"> <view v-else class="empy-cart fcor666 fotct cart-list backcor9">
<view class="icon cart fcor666 font48"></view> <view class="icon cart fcor666 font48"></view>
<view class=" mart30"> <view class=" mart30">
购物车内暂无商品快去逛逛吧 购物车内暂无商品快去逛逛吧
@ -217,13 +217,14 @@
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
mask:true, mask:true,
duration:2000
}); });
getShoppingCartList().then(res => { getShoppingCartList().then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
console.log(res.return_data) this.allCheck.whetherCheck = false;
this.cartList = res.return_data; this.cartList = res.return_data;
this.allCheckInit(); // this.allCheckInit();
} else { } else {
uni.showToast({ uni.showToast({
@ -314,10 +315,8 @@
// //
const goods = this.cartList.every(item => { const goods = this.cartList.every(item => {
if (!this.isEdit) { // if (!this.isEdit&&item.loseEfficacy) { //
if (item.loseEfficacy) {
return true; return true;
}
} }
return item.whetherCheck === true return item.whetherCheck === true
}) })
@ -376,7 +375,7 @@
let selestArr = this.cartList.filter(item => item.whetherCheck == true) let selestArr = this.cartList.filter(item => item.whetherCheck == true)
selestArr = JSON.stringify(selestArr) selestArr = JSON.stringify(selestArr)
// console.log(selestArr) // console.log(selestArr,"")
uni.navigateTo({ uni.navigateTo({
url: '/physical-merchants/settleAccounts/settleAccounts?goodsList=' + selestArr url: '/physical-merchants/settleAccounts/settleAccounts?goodsList=' + selestArr
}) })
@ -391,7 +390,7 @@
}, },
// //
swipe_opt_event(e, id) { swipe_opt_event(e, id) {
console.log(e, "dianji") // console.log(e, "dianji")
if (e.index == 1) { // if (e.index == 1) { //
@ -415,7 +414,7 @@
}, },
// //
swipe_change(e, id) { swipe_change(e, id) {
console.log(e, id) // console.log(e, id)
// this.swipe_item_index= (e == 'none') ? null : v // this.swipe_item_index= (e == 'none') ? null : v
}, },

@ -10,7 +10,7 @@
</block> </block>
<!-- 搜索列表 --> <!-- 搜索列表 -->
<view class="search-list"> <view class="search-list">
<goodsList v-if="hackReset" typeList="goodsSearch" @loadData="loadData" :propData="data_list" :paddBottom="0"> <goodsList ref="goodsList" typeList="goodsSearch" @loadData="loadData" :propData="data_list" :paddBottom="0">
</goodsList> </goodsList>
</view> </view>
@ -38,7 +38,7 @@
navigateLastPage: 1, // navigateLastPage: 1, //
allData: 0 // allData: 0 //
}, },
hackReset:false,
} }
}, },
components: { components: {
@ -46,9 +46,10 @@
goodsList goodsList
}, },
onShow(){ onShow(){
this.hackReset = false; this.$nextTick(()=>{
this.$nextTick(() => { if(this.$refs.goodsList){
this.hackReset = true; this.$refs.goodsList.refreshCartNum()
}
}) })
}, },
methods: { methods: {
@ -125,7 +126,7 @@
.search-list { .search-list {
height: calc(100vh - 50px); height: calc(100vh - 80px);
// padding: 20rpx; // padding: 20rpx;
} }
} }

@ -4,7 +4,7 @@
<view class="swiper-box"> <view class="swiper-box">
<swiper circular="true" :autoplay="false" style="height: 288px;" @change="swiperChange"> <swiper circular="true" :autoplay="false" style="height: 288px;" @change="swiperChange">
<swiper-item class="fotct" v-for="(swiper,index) in goodsDetail.bannerImg" :key="index"> <swiper-item class="fotct" v-for="(swiper,index) in goodsDetail.bannerImg" :key="index">
<image mode="heightFix" :src="swiper" @click="perImage(index,goodsDetail.bannerImg)"></image> <image mode="heightFix" style="height: 100%;" :src="swiper" @click="perImage(index,goodsDetail.bannerImg)"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="indicator">{{currentSwiper+1}}/{{goodsDetail.bannerImg.length}}</view> <view class="indicator">{{currentSwiper+1}}/{{goodsDetail.bannerImg.length}}</view>
@ -591,13 +591,13 @@
//popUp //popUp
.choose-detail { .choose-detail {
position: relative; position: relative;
padding: 20rpx;
// //
&.baozhang-detail { &.baozhang-detail {
padding-top: 30px; padding:30px 10px 10px;
box-sizing: border-box; box-sizing: border-box;
height: 100%; height:calc(100% - 100rpx);
.baozhangTitle {} .baozhangTitle {}
@ -609,9 +609,9 @@
position: fixed; position: fixed;
bottom: 20rpx; bottom: 20rpx;
width: calc(100% - 40rpx); width: calc(100% - 40rpx);
height: 60rpx; height: 80rpx;
line-height: 60rpx; line-height: 80rpx;
border-radius: 30rpx; border-radius: 40rpx;
text-align: center; text-align: center;
background: linear-gradient(to right, #FF8E01, #FD5100); background: linear-gradient(to right, #FF8E01, #FD5100);

@ -209,7 +209,8 @@
getAddressPrice, getAddressPrice,
getUserExclusiveDiscount, getUserExclusiveDiscount,
createOrder, createOrder,
findUser findUser,
findDeliveryAddressById
} from '@/Utils/physicalObject.js' } from '@/Utils/physicalObject.js'
import { import {
getThirdPartyByDetail getThirdPartyByDetail
@ -225,6 +226,7 @@
isMoreThanOne: false, // isMoreThanOne: false, //
goodsList: [], // goodsList: [], //
haveAddress: false, // haveAddress: false, //
isFirstSearchAddress:true,
addressDetail: null, // addressDetail: null, //
postPrice: null, // postPrice: null, //
@ -390,18 +392,53 @@
if (this.goodsList.length > 1) { if (this.goodsList.length > 1) {
this.isMoreThanOne = true; this.isMoreThanOne = true;
} }
//
uni.$on('address',(addressDetail)=>{
this.addressDetail = addressDetail;
this.getRegiFreight(addressDetail);
console.log(addressDetail,"监听")
})
}, },
onShow() { onUnload() {
this.getAddrPrice() // //
uni.$off('address');
},
onShow() {
this.getUserDiscount() // this.getUserDiscount() //
this.findUser() // this.findUser() //
this.getAddrPrice() //
if(this.addressDetail&&!this.isFirstSearchAddress){
console.log(this.addressDetail,"123456")
let params = {
id:this.addressDetail.id
}
findDeliveryAddressById(params).then(res=>{
// console.log(res)
if (res.return_code == '000000') {
}else{ //
this.isFirstSearchAddress=true;
this.haveAddress = false;
this.addressDetail = null;
this.getAddrPrice();
}
})
}
}, },
methods: { methods: {
// //
getRegiFreight(addressDetail) { async getRegiFreight(addressDetail) {
this.haveAddress = true; // console.log(addressDetail,"addressDetail")
this.addressDetail = addressDetail; this.addressDetail = addressDetail;
this.haveAddress = true;
let params = { let params = {
regionId: addressDetail.regionId regionId: addressDetail.regionId
} }
@ -420,7 +457,8 @@
}, },
// //
getAddrPrice() { getAddrPrice() {
if(this.haveAddress){
if(!this.isFirstSearchAddress&&this.addressDetail){
return return
} }
@ -428,15 +466,15 @@
title: '加载中', title: '加载中',
mask: true, mask: true,
}); });
getAddressPrice().then(res => { getAddressPrice().then(res => {
uni.hideLoading(); uni.hideLoading();
this.isFirstSearchAddress = false;
if (res.return_code == '000000') { if (res.return_code == '000000') {
if (res.return_data) { if (res.return_data) {
this.getRegiFreight(res.return_data.deliveryAddress) this.getRegiFreight(res.return_data.deliveryAddress)
} }
} else { } else {
this.haveAddress = false;
// uni.showToast({ // uni.showToast({
// title: res.return_msg, // title: res.return_msg,
// icon: 'none', // icon: 'none',
@ -572,7 +610,7 @@
let yhqID = this.yhqId let yhqID = this.yhqId
this.$refs.detailPopup.show(str, this.goodsList,yhqID); this.$refs.detailPopup.show(str, this.goodsList,yhqID);
} else if (str == 'freight') { } else if (str == 'freight') {
if (!this.postPrice) { if (!this.addressDetail&&!this.haveAddress) {
uni.showToast({ uni.showToast({
title: '请先选择地址', title: '请先选择地址',
duration: 1000, duration: 1000,
@ -595,7 +633,7 @@
}, },
// , // ,
settleAccount() { settleAccount() {
if (!this.addressDetail) { if (!this.addressDetail&&!this.haveAddress) {
uni.showToast({ uni.showToast({
title: '请选择地址', title: '请选择地址',
duration: 1000, duration: 1000,

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Loading…
Cancel
Save