接口修改
This commit is contained in:
parent
9958c5db29
commit
e1fbe7893a
@ -27,3 +27,11 @@ export function getProportion(data) {
|
|||||||
export function goodsList(data) {
|
export function goodsList(data) {
|
||||||
return request.get("product/spu/merchant/" + data.mer_id, data);
|
return request.get("product/spu/merchant/" + data.mer_id, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 里海云仓商品列表
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
export function getStorageList(data) {
|
||||||
|
return request.get("product/spu/lst", data);
|
||||||
|
}
|
@ -38,7 +38,10 @@
|
|||||||
} from "@/api/cloud_warehouse.js";
|
} from "@/api/cloud_warehouse.js";
|
||||||
import {
|
import {
|
||||||
getCategoryListLevel
|
getCategoryListLevel
|
||||||
} from '@/api/requesta.js'
|
} from '@/api/requesta.js';
|
||||||
|
import {
|
||||||
|
ENV
|
||||||
|
} from "@/config/app.js";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -62,9 +65,7 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "加载中..."
|
title: "加载中..."
|
||||||
})
|
})
|
||||||
getCategoryListLevel({
|
getCategory(ENV == 'prod' ? 259 : 244).then(res => {
|
||||||
type: 2
|
|
||||||
}).then(res => {
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
this.list = res.data;
|
this.list = res.data;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -81,10 +82,16 @@
|
|||||||
|
|
||||||
// 小分类
|
// 小分类
|
||||||
goSmallType(e) {
|
goSmallType(e) {
|
||||||
|
if (e.children) {
|
||||||
uni.setStorageSync("market_type_parent", e);
|
uni.setStorageSync("market_type_parent", e);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/cloud_warehouse/small_classification/index?type_id=${this.type_id}&townName=${this.town_name}&street_id=${this.street_id}`
|
url: `/pages/cloud_warehouse/small_classification/index`
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$util.Tips({
|
||||||
|
title: "暂无商品!"
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,22 +5,16 @@
|
|||||||
<!-- 顶部 -->
|
<!-- 顶部 -->
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="head_tit">
|
<view class="head_tit">
|
||||||
<view style="display: flex;align-items: center;width: 100%;justify-content: space-between;">
|
<view style="display: flex;align-items: center;width: 100%;">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;width: 100%;">
|
||||||
<i class="iconfont icon-xiangzuo"
|
<i class="iconfont icon-xiangzuo"
|
||||||
style="font-size: 31.54rpx;text-align: left;color: #fff;margin-right: 12rpx;"
|
style="font-size: 31.54rpx;text-align: left;color: #fff;margin-right: 12rpx;"
|
||||||
@click='backjJump'></i>
|
@click='backjJump'></i>
|
||||||
<view style="position: relative;width: 494rpx;margin: 0 auto;">
|
<view style="position: relative;width: 494rpx;margin: 0 auto;flex: 1;">
|
||||||
<u-search bgColor="white" :showAction="false" placeholder="搜索商品" clearabled
|
<u-search bgColor="white" :showAction="false" placeholder="搜索商品" clearabled
|
||||||
v-model="storeParam.keyword" @search="searchSubmit"></u-search>
|
v-model="storeParam.keyword" @search="searchSubmit"></u-search>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;align-items: center;justify-content: right;margin-left: 20rpx;"
|
|
||||||
@click="changeMap">
|
|
||||||
<view class="town_name">{{street||'定位中'}}</view>
|
|
||||||
<u--image :showLoading="true" src="/static/images/dingwei.webp" width="36rpx" height="34rpx"
|
|
||||||
:lazyLoad="true"></u--image>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flags"></view>
|
<view class="flags"></view>
|
||||||
@ -35,13 +29,12 @@
|
|||||||
<u--image :src="item.pic" class="image" :showLoading="true" width="100rpx" height="100rpx"
|
<u--image :src="item.pic" class="image" :showLoading="true" width="100rpx" height="100rpx"
|
||||||
shape="circle" :lazyLoad="true" />
|
shape="circle" :lazyLoad="true" />
|
||||||
<text
|
<text
|
||||||
:class="{'left-panel_item_active':storeParam.category_id == item.store_category_id}">{{item.cate_name}}</text>
|
:class="{'left-panel_item_active':storeParam.mer_cate_id == item.store_category_id}">{{item.cate_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<view class="right-panel">
|
<view class="right-panel">
|
||||||
|
|
||||||
<!-- 补贴比例标签 -->
|
<!-- 补贴比例标签 -->
|
||||||
<view class="con-right-proportion">
|
<view class="con-right-proportion">
|
||||||
<image src="../../../static/cloud_warehouse/dkbl.png" />
|
<image src="../../../static/cloud_warehouse/dkbl.png" />
|
||||||
@ -73,7 +66,7 @@
|
|||||||
<u-loading-icon color="#999"></u-loading-icon>
|
<u-loading-icon color="#999"></u-loading-icon>
|
||||||
</template>
|
</template>
|
||||||
</u-image>
|
</u-image>
|
||||||
<view class="short_item_right">
|
<view class="short_item_right">1
|
||||||
<view class="r_name">{{item.product.store_name}}</view>
|
<view class="r_name">{{item.product.store_name}}</view>
|
||||||
<view class="r_type">
|
<view class="r_type">
|
||||||
<view v-if="item.product.store_info">{{item.product.store_info}}</view>
|
<view v-if="item.product.store_info">{{item.product.store_info}}</view>
|
||||||
@ -186,7 +179,8 @@
|
|||||||
Toast
|
Toast
|
||||||
} from '../../../libs/uniApi';
|
} from '../../../libs/uniApi';
|
||||||
import {
|
import {
|
||||||
getProportion
|
getProportion,
|
||||||
|
getStorageList
|
||||||
} from "@/api/cloud_warehouse.js";
|
} from "@/api/cloud_warehouse.js";
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
@ -255,7 +249,8 @@
|
|||||||
type_id: '',
|
type_id: '',
|
||||||
street_id: '',
|
street_id: '',
|
||||||
is_recommend: false, // 是否为推荐的参数
|
is_recommend: false, // 是否为推荐的参数
|
||||||
deduction_rate: ''
|
deduction_rate: '',
|
||||||
|
mer_cate_id: ''
|
||||||
},
|
},
|
||||||
storeKey: 0,
|
storeKey: 0,
|
||||||
storeScroll: true,
|
storeScroll: true,
|
||||||
@ -290,34 +285,24 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
this.street_id = options.street_id
|
|
||||||
this.street = options.townName
|
|
||||||
this.product_type = options.product_type ?? 0
|
this.product_type = options.product_type ?? 0
|
||||||
if (this.$store.state.storage?.location?.lat) {
|
if (this.$store.state.storage?.location?.lat) {
|
||||||
this.latitude = this.$store.state.storage.location.lat;
|
this.latitude = this.$store.state.storage.location.lat;
|
||||||
this.longitude = this.$store.state.storage.location.long;
|
this.longitude = this.$store.state.storage.location.long;
|
||||||
}
|
}
|
||||||
if (options.street_id != undefined) {
|
|
||||||
this.storeParam.street_id = options.street_id
|
|
||||||
}
|
|
||||||
this.credit_buy = options.credit_buy
|
this.credit_buy = options.credit_buy
|
||||||
this.storeParam.type_id = options.type_id
|
|
||||||
this.storeParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
|
|
||||||
this.storeParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
|
this.storeParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
|
||||||
this.storeList = [];
|
this.storeList = [];
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
await this.getCloundShop();
|
|
||||||
if (this.mer_location == 1) {
|
|
||||||
this.selfLocation()
|
|
||||||
}
|
|
||||||
this.getStoreType();
|
|
||||||
this.Area()
|
|
||||||
|
|
||||||
// 左侧 // 初始化查询第一个
|
// 左侧 // 初始化查询第一个
|
||||||
const sideMenuType = uni.getStorageSync("market_type_parent");
|
const sideMenuType = uni.getStorageSync("market_type_parent");
|
||||||
this.sideMenuType = sideMenuType;
|
this.sideMenuType = sideMenuType;
|
||||||
if (sideMenuType && sideMenuType.children && sideMenuType.children.length > 0)
|
if (sideMenuType && sideMenuType.children && sideMenuType.children.length > 0)
|
||||||
this.storeParam.category_id = this.sideMenuType.children[0].store_category_id;
|
this.storeParam.mer_cate_id = this.sideMenuType.children[0].store_category_id;
|
||||||
|
// 初始化
|
||||||
|
this.getStoreList();
|
||||||
|
|
||||||
//初始化左侧类型高度
|
//初始化左侧类型高度
|
||||||
this.initHeight();
|
this.initHeight();
|
||||||
@ -347,33 +332,6 @@
|
|||||||
}, mapGetters(['viewColor', 'keyColor'])),
|
}, mapGetters(['viewColor', 'keyColor'])),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getCloundShop() {
|
|
||||||
const {
|
|
||||||
data
|
|
||||||
} = await getCategoryListLevel({
|
|
||||||
type: 2
|
|
||||||
})
|
|
||||||
this.cloudList = data;
|
|
||||||
this.cloudList.unshift({
|
|
||||||
cate_name: '全部',
|
|
||||||
children: [],
|
|
||||||
pic: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/de2be202312151001024597.png",
|
|
||||||
store_category_id: -1
|
|
||||||
})
|
|
||||||
this.cloudList.forEach((item) => {
|
|
||||||
item.children.unshift({
|
|
||||||
cate_name: '全部',
|
|
||||||
store_category_id: item.store_category_id,
|
|
||||||
});
|
|
||||||
})
|
|
||||||
this.merchant = this.cloudList[0];
|
|
||||||
this.merchantTow = this.merchant?.children[0];
|
|
||||||
this.storeParam.category_id = this.merchantTow.store_category_id;
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
selectLocation() {
|
|
||||||
this.isSelectPlace ? this.showPicker = true : ''
|
|
||||||
},
|
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
this.showPicker = false
|
this.showPicker = false
|
||||||
this.$emit('selectPlce', e)
|
this.$emit('selectPlce', e)
|
||||||
@ -387,6 +345,7 @@
|
|||||||
this.street_id = e.value[1].code
|
this.street_id = e.value[1].code
|
||||||
this.getStoreList()
|
this.getStoreList()
|
||||||
},
|
},
|
||||||
|
|
||||||
changeHandler(e) {
|
changeHandler(e) {
|
||||||
const {
|
const {
|
||||||
columnIndex,
|
columnIndex,
|
||||||
@ -403,27 +362,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Area() {
|
|
||||||
getArea({
|
|
||||||
city_code: 510500
|
|
||||||
}).then(res => {
|
|
||||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
|
||||||
this.Street(res.data[0]['code']);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
Street(code) {
|
|
||||||
getStreet({
|
|
||||||
area_code: code
|
|
||||||
}).then(res => {
|
|
||||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onInputConfirm() {
|
|
||||||
this.showSerch = false
|
|
||||||
this.searchSubmit()
|
|
||||||
},
|
|
||||||
// 对象转数组
|
// 对象转数组
|
||||||
objToArr(data) {
|
objToArr(data) {
|
||||||
let obj = Object.keys(data).sort();
|
let obj = Object.keys(data).sort();
|
||||||
@ -443,186 +382,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取商户分类
|
|
||||||
getClassfication: function() {
|
|
||||||
let temp = []
|
|
||||||
merClassifly()
|
|
||||||
.then(res => {
|
|
||||||
temp = res.data.map(item => {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
check: false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (this.storeParam.category_id.length > 0) {
|
|
||||||
this.storeParam.category_id.forEach((ids, index) => {
|
|
||||||
temp.forEach(el => {
|
|
||||||
if (ids == el.category_id) {
|
|
||||||
el.check = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.merList = temp
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
this.$util.Tips({
|
|
||||||
title: res
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 获取店铺类型
|
|
||||||
getStoreType: function() {
|
|
||||||
let temp = []
|
|
||||||
getStoreTypeApi().then(res => {
|
|
||||||
res.data.forEach(item => {
|
|
||||||
if (item.mer_type_id == this.storeParam.type_id) {
|
|
||||||
temp.push({
|
|
||||||
...item,
|
|
||||||
check: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.storeTypeArr = temp
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
this.$util.Tips({
|
|
||||||
title: res
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 打开地图**/
|
|
||||||
showMaoLocation(lat, long) {
|
|
||||||
if (!lat || !long) return this.$util.Tips({
|
|
||||||
title: '请设置允许商城访问您的位置!'
|
|
||||||
});
|
|
||||||
//#ifdef H5
|
|
||||||
if (this.$wechat.isWeixin() === true) {
|
|
||||||
this.$wechat.seeLocation({
|
|
||||||
latitude: Number(lat),
|
|
||||||
longitude: Number(long),
|
|
||||||
name: '当前位置',
|
|
||||||
address: this.location_address
|
|
||||||
}).then(res => {
|
|
||||||
// console.log('success');
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
//#endif
|
|
||||||
uni.openLocation({
|
|
||||||
latitude: parseFloat(lat),
|
|
||||||
longitude: parseFloat(long),
|
|
||||||
name: '当前位置',
|
|
||||||
address: this.location_address,
|
|
||||||
scale: 8,
|
|
||||||
success: function(res) {
|
|
||||||
// console.log(res)
|
|
||||||
},
|
|
||||||
});
|
|
||||||
// #ifdef H5
|
|
||||||
}
|
|
||||||
//#endif
|
|
||||||
},
|
|
||||||
showStoreLocation(item) {
|
|
||||||
if (!item.lat || !item.long) return this.$util.Tips({
|
|
||||||
title: '请设置允许商城访问您的位置!'
|
|
||||||
});
|
|
||||||
//#ifdef H5
|
|
||||||
if (this.$wechat.isWeixin() === true) {
|
|
||||||
this.$wechat.seeLocation({
|
|
||||||
latitude: Number(item.lat),
|
|
||||||
longitude: Number(item.long),
|
|
||||||
name: item.mer_name,
|
|
||||||
address: item.mer_address ? item.mer_address : '',
|
|
||||||
}).then(res => {
|
|
||||||
// console.log('success');
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
//#endif
|
|
||||||
uni.openLocation({
|
|
||||||
latitude: parseFloat(item.lat),
|
|
||||||
longitude: parseFloat(item.long),
|
|
||||||
scale: 8,
|
|
||||||
name: item.mer_name,
|
|
||||||
address: item.mer_address ? item.mer_address : '',
|
|
||||||
success: function(res) {
|
|
||||||
// console.log(res)
|
|
||||||
},
|
|
||||||
});
|
|
||||||
// #ifdef H5
|
|
||||||
}
|
|
||||||
//#endif
|
|
||||||
},
|
|
||||||
selfLocation() {
|
|
||||||
let self = this
|
|
||||||
if (uni.getStorageSync('RejectTarget')) {
|
|
||||||
this.getStoreList();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.$store?.state?.storage?.location?.lat) {
|
|
||||||
this.latitude = this.$store?.state?.storage?.location?.lat;
|
|
||||||
this.longitude = this.$store?.state?.storage?.location?.long;
|
|
||||||
getGeocoder({
|
|
||||||
lat: this.latitude,
|
|
||||||
long: this.longitude
|
|
||||||
}).then(res => {
|
|
||||||
// console.log(res)
|
|
||||||
this.detaile_address = res.data.address;
|
|
||||||
this.location_address = res.data.address;
|
|
||||||
this.recommend_address = res.data.address.length > 4 ? res.data.address
|
|
||||||
.slice(0, 4) + '...' :
|
|
||||||
res.data.address;
|
|
||||||
this.getStoreList();
|
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
this.getStoreList();
|
|
||||||
})
|
|
||||||
} else uni.getLocation({
|
|
||||||
type: 'wgs84',
|
|
||||||
success: (res) => {
|
|
||||||
res = wgsToGcj(res);
|
|
||||||
console.log('定位');
|
|
||||||
let latitude, longitude;
|
|
||||||
latitude = res.latitude.toString();
|
|
||||||
longitude = res.longitude.toString();
|
|
||||||
this.latitude = res.latitude.toFixed(6);
|
|
||||||
this.longitude = res.longitude.toFixed(6);
|
|
||||||
this.$store.commit('setLocation', {
|
|
||||||
lat: res.latitude.toFixed(6),
|
|
||||||
long: res.longitude.toFixed(6),
|
|
||||||
});
|
|
||||||
getGeocoder({
|
|
||||||
lat: latitude,
|
|
||||||
long: longitude
|
|
||||||
}).then(res => {
|
|
||||||
// console.log(res)
|
|
||||||
this.detaile_address = res.data.address;
|
|
||||||
this.location_address = res.data.address;
|
|
||||||
this.recommend_address = res.data.address.length > 4 ? res.data.address
|
|
||||||
.slice(0, 4) + '...' :
|
|
||||||
res.data.address
|
|
||||||
this.getStoreList();
|
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
this.getStoreList();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
fail: (res) => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 1000
|
|
||||||
});
|
|
||||||
this.getStoreList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 进店
|
// 进店
|
||||||
goStore(id) {
|
goStore(id) {
|
||||||
if (this.storeParam.type_id == 12) {
|
if (this.storeParam.type_id == 12) {
|
||||||
@ -637,6 +396,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 搜索
|
// 搜索
|
||||||
searchSubmit: function() {
|
searchSubmit: function() {
|
||||||
this.$set(this.storeParam, 'keyword', this.storeParam.keyword);
|
this.$set(this.storeParam, 'keyword', this.storeParam.keyword);
|
||||||
@ -664,9 +424,9 @@
|
|||||||
// 点击商品二级分类
|
// 点击商品二级分类
|
||||||
changeMerchantTow(item) {
|
changeMerchantTow(item) {
|
||||||
this.merchantTow = item;
|
this.merchantTow = item;
|
||||||
this.storeParam.category_id = this.merchantTow.store_category_id;
|
this.storeParam.mer_cate_id = this.merchantTow.store_category_id;
|
||||||
this.storeParam.page = 1;
|
this.storeParam.page = 1;
|
||||||
this.getStoreList()
|
this.getStoreList('')
|
||||||
},
|
},
|
||||||
|
|
||||||
// 商品列表
|
// 商品列表
|
||||||
@ -678,17 +438,15 @@
|
|||||||
this.goodsList = [];
|
this.goodsList = [];
|
||||||
}
|
}
|
||||||
let query = {
|
let query = {
|
||||||
street_code: this.street_id,
|
mer_id: ENV == 'prod' ? 259 : 244,
|
||||||
order: this.storeParam.order,
|
order: this.storeParam.order,
|
||||||
keyword: this.storeParam.keyword,
|
keyword: this.storeParam.keyword,
|
||||||
page: this.storeParam.page,
|
page: this.storeParam.page,
|
||||||
location: this.latitude + ',' + this.longitude,
|
deduction_rate: this.storeParam.deduction_rate,
|
||||||
deduction_rate: this.storeParam.deduction_rate
|
mer_cate_id: this.storeParam.mer_cate_id
|
||||||
}
|
}
|
||||||
if (this.storeParam.category_id == -1) null;
|
|
||||||
else if (!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // 全部是查询一级分类pid
|
getStorageList(query).then(res => {
|
||||||
else query.category_id = this.storeParam.category_id; // 否则查询二级分类
|
|
||||||
townCloud(query).then(res => {
|
|
||||||
this.goodsList = [...this.goodsList, ...res.data.list]
|
this.goodsList = [...this.goodsList, ...res.data.list]
|
||||||
this.showLoading = false
|
this.showLoading = false
|
||||||
this.goodsList.forEach(item => {
|
this.goodsList.forEach(item => {
|
||||||
@ -729,15 +487,18 @@
|
|||||||
this.goodsNum = res.data[0].count
|
this.goodsNum = res.data[0].count
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击商品
|
// 点击商品
|
||||||
clickProduct(data) {
|
clickProduct(data) {
|
||||||
this.$refs.shortPopupRef.setDatas(data, this.goodsNum);
|
this.$refs.shortPopupRef.setDatas(data, this.goodsNum);
|
||||||
this.$refs.shortPopupRef.open();
|
this.$refs.shortPopupRef.open();
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击全部
|
// 点击全部
|
||||||
showAllRef() {
|
showAllRef() {
|
||||||
this.$refs.allRef.open();
|
this.$refs.allRef.open();
|
||||||
},
|
},
|
||||||
|
|
||||||
changeAllRef(e) {
|
changeAllRef(e) {
|
||||||
this.allShow = e.show;
|
this.allShow = e.show;
|
||||||
},
|
},
|
||||||
@ -749,32 +510,10 @@
|
|||||||
|
|
||||||
// 获取规格名称
|
// 获取规格名称
|
||||||
getSkuName(item) {
|
getSkuName(item) {
|
||||||
|
if (item.sku)
|
||||||
return Object.keys(item.sku).join('/') || null;
|
return Object.keys(item.sku).join('/') || null;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 选择位置
|
|
||||||
changeMap() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/select_address/select_address_n`,
|
|
||||||
success: () => {
|
|
||||||
uni.$once('changeAddress', (e) => {
|
|
||||||
this.street_id = e.street.code;
|
|
||||||
this.storeParam.street_id = this.street_id;
|
|
||||||
this.street = e.street.name;
|
|
||||||
if (e.longitude) {
|
|
||||||
this.longitude = e.longitude;
|
|
||||||
this.latitude = e.latitude;
|
|
||||||
this.$store.commit('setLocation', {
|
|
||||||
lat: e.latitude,
|
|
||||||
long: e.longitude,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.getStoreList();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 比例
|
// 比例
|
||||||
handleChooseProp(e) {
|
handleChooseProp(e) {
|
||||||
this.storeParam.deduction_rate = e;
|
this.storeParam.deduction_rate = e;
|
||||||
@ -788,7 +527,6 @@
|
|||||||
mer_id: ENV == 'prod' ? '259' : '244'
|
mer_id: ENV == 'prod' ? '259' : '244'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.propotionData = res.data;
|
this.propotionData = res.data;
|
||||||
console.log(this.propotionData);
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user