订单相关修改提测
This commit is contained in:
@@ -1,24 +1,34 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view v-if="showindex">
|
||||
<view v-if="showindex == 'index'">
|
||||
<!-- 导航栏 -->
|
||||
<view class="navbar" :class="{active:opacity}">
|
||||
<!-- #ifndef APP-PLUS || MP-WEIXIN -->
|
||||
<!-- #ifndef APP-PLUS || MP-WEIXIN || MP-ALIPAY -->
|
||||
<view class="status-bar"></view>
|
||||
<view class="navbar_tow flex-between"
|
||||
:style="{'height':HeighT.customBar+'px','padding-right':HeighT.custwidth + 'px'}">
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view class="navbar_tow flex-between" :style="{'marginTop':HeighT.heightBar /2+'px'}">
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="navbar_tow flex-between"
|
||||
:style="{'height':HeighT.customBar+'px','marginTop':HeighT.heightBar+'px','padding-right':HeighT.custwidth + 'px'}">
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef MP-ALIPAY -->
|
||||
<view class="navbar_tow flex-between"
|
||||
:style="{'height':menuButtonInfo.height+10+'px','marginTop':menuButtonInfo.top+'px','padding-bottom':10 + 'px','padding-right':menuButtonInfo.width+50 + 'px'}">
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 标题搜索框 -->
|
||||
<view class="flex-between">
|
||||
<view class="navbar_tow_one flex-start" @click="uindexlist">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<text class="textnth-childone">{{NAME}}</text>
|
||||
<!-- #endif -->
|
||||
<text class="textnth-childtow">{{form.address}}</text>
|
||||
<u-icon style="margin-left: 8rpx;" name="arrow-down-fill" color="#333333"
|
||||
size="16"></u-icon>
|
||||
@@ -226,7 +236,7 @@
|
||||
|
||||
|
||||
</view>
|
||||
<indexs v-if="!showindex" :shopExtend="shopExtend" :usershopUserinfo='usershopUserinfo' :userInfo='userInfo'></indexs>
|
||||
<indexs v-if="showindex == 'shopIndex'" :shopExtend="shopExtend" :usershopUserinfo='usershopUserinfo' :userInfo='userInfo'></indexs>
|
||||
<popupad id="popupad" :forceUpdate='forceUpdate' :showPosition="'home'"></popupad>
|
||||
</view>
|
||||
</view>
|
||||
@@ -239,7 +249,6 @@
|
||||
import todaylist from './components/todaylist.vue'
|
||||
import productlist from './components/productlist.vue'
|
||||
import advertisement from './components/advertisement.vue'
|
||||
import customSwiper from '@/components/blackmonth-swiper/index'
|
||||
import category from '@/components/qiyue-category/qiyue-category.vue';
|
||||
import indexs from './indexs.vue';
|
||||
export default {
|
||||
@@ -250,14 +259,13 @@
|
||||
productlist,
|
||||
advertisement,
|
||||
category,
|
||||
customSwiper,
|
||||
indexs,
|
||||
popupad
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showindex: false,
|
||||
userInfo:'',//个人信息
|
||||
showindex: "",
|
||||
userInfo: {},//个人信息
|
||||
NAME: uni.cache.get('NAME'),
|
||||
timersetInterval: '0', //定时器
|
||||
isFixedTop: false, //吸顶是否显示
|
||||
@@ -270,7 +278,8 @@
|
||||
hometoplist: { //上面数据
|
||||
carousel: [],
|
||||
district: [],
|
||||
|
||||
salesList: {},
|
||||
todayList: {},
|
||||
},
|
||||
itemStyle: [ //样式
|
||||
],
|
||||
@@ -323,6 +332,9 @@
|
||||
HeighT() { //手机类型的尺寸
|
||||
return this.$store.getters.is_BarHeight
|
||||
},
|
||||
menuButtonInfo() { //手机类型的尺寸
|
||||
return uni.getMenuButtonBoundingClientRect()
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
@@ -338,11 +350,21 @@
|
||||
},
|
||||
async onShow() {
|
||||
// 判断显示那个页面
|
||||
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
|
||||
this.showindex = false
|
||||
// #ifdef MP-ALIPAY
|
||||
my.hideAllFavoriteMenu({
|
||||
success: (res) => {
|
||||
console.log('收藏按钮已隐藏', res);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('隐藏收藏按钮失败', err);
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
if (uni.cache.get('shopId') && uni.cache.get('token')) {
|
||||
this.showindex = 'shopIndex'
|
||||
uni.cache.set('types', 'index');
|
||||
let res = await this.api.shopUserInfo({
|
||||
"shopId": uni.cache.get('shopUser'),
|
||||
"shopId": uni.cache.get('shopId'),
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
})
|
||||
if (res.code == 0) {
|
||||
@@ -359,10 +381,12 @@
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: async (res) => {
|
||||
// console.log(res)
|
||||
let successres = await this.api.geocodelocation({
|
||||
lng: res.longitude,
|
||||
lat: res.latitude,
|
||||
})
|
||||
// console.log("successres==",successres)
|
||||
if (successres.code == 0) {
|
||||
let datastorage = {
|
||||
country: successres.data.addressComponent.country, // "中国"
|
||||
@@ -385,7 +409,6 @@
|
||||
lat: '',
|
||||
})
|
||||
if (successres.code == 0) {
|
||||
console.log(successres.data.addressComponent.streetNumber.location.split(','))
|
||||
let res = successres.data.addressComponent.streetNumber.location.split(',')
|
||||
let datastorage = {
|
||||
country: successres.data.addressComponent.country, // "中国"
|
||||
@@ -402,7 +425,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
this.showindex = true
|
||||
this.showindex = 'index'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -412,7 +435,7 @@
|
||||
*/
|
||||
async getShopExtend () {
|
||||
let res = await this.api.getShopExtend({
|
||||
shopId: uni.cache.get('shopUser'),
|
||||
shopId: uni.cache.get('shopId'),
|
||||
autokey: "index_bg" //index_bg my_bg member_bg shopInfo_bg
|
||||
})
|
||||
if ( res.code == 0) {
|
||||
@@ -455,7 +478,6 @@
|
||||
success: (data) => {
|
||||
this.seighT = data.windowHeight;
|
||||
this.$u.getRect('.fourcontent').then(res => {
|
||||
console.log(res.top)
|
||||
this.Topdistance = res.top - res.height //滚动距离
|
||||
})
|
||||
}
|
||||
@@ -594,7 +616,6 @@
|
||||
},
|
||||
// 选择元素的指定选项
|
||||
clickdetail(item, index) {
|
||||
console.log(category);
|
||||
this.clickdetailindex = index
|
||||
this.showproductlist = false
|
||||
this.hometoplist.menu[this.viewHistoryindex].name = item.name
|
||||
@@ -616,7 +637,6 @@
|
||||
},
|
||||
//城市二级菜单
|
||||
categoryMainClick(category) {
|
||||
console.log(category.category.name);
|
||||
if (category.category.name == '全城') {
|
||||
this.showproductlist = false
|
||||
this.form.lng = uni.cache.get('getLocationstorage').lng,
|
||||
@@ -635,11 +655,9 @@
|
||||
},
|
||||
//确定街道菜单赋值
|
||||
categorySubClick(category) {
|
||||
console.log(category);
|
||||
this.hometoplist.menu[this.viewHistoryindex].name = category.name
|
||||
this.form.address = category.name //地址
|
||||
this.showproductlist = false
|
||||
console.log(category.center.split(','))
|
||||
let res = category.center.split(',')
|
||||
this.form.lng = res[0]
|
||||
this.form.lat = res[1]
|
||||
@@ -702,6 +720,9 @@
|
||||
// #ifdef MP-WEIXIN
|
||||
margin-left: 28rpx;
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
margin-left: 50rpx;
|
||||
// #endif
|
||||
width: 100%;
|
||||
flex-wrap: nowrap;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user