订单相关修改提测
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
},
|
||||
methods: {
|
||||
clickdistrict(item) {
|
||||
console.log(item,'调试')
|
||||
// console.log(item,'调试')
|
||||
switch (item.jumpType) {
|
||||
case 'absolute':
|
||||
uni.pro.navigateTo('webview/webview', {
|
||||
@@ -52,7 +52,7 @@
|
||||
if (!uni.utils.pluschooseImage()) {
|
||||
return false
|
||||
}
|
||||
// #ifdef APP || MP-WEIXIN
|
||||
// #ifdef APP || MP-WEIXIN || MP-ALIPAY
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
let tableCode = this.getQueryString(decodeURIComponent(res.result), 'code')
|
||||
@@ -60,9 +60,13 @@
|
||||
if (tableCode) {
|
||||
uni.pro.navigateTo('order_food/order_food')
|
||||
}
|
||||
},
|
||||
fail:( res) =>{
|
||||
console.log(res)
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<navseat class="navbar" :opacity='opacitys' :title='toplist.name' :titleshow='false'></navseat>
|
||||
|
||||
<view class="onecontent">
|
||||
<image class="onecontentimage" :src="toplist.coverImg" mode=""></image>
|
||||
<image class="onecontentimage" :src="toplist.coverImg" mode="aspectFill"></image>
|
||||
<!-- 小内切圆 -->
|
||||
<view class="after"></view>
|
||||
<view class="onecontentabsolute">
|
||||
|
||||
@@ -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%;
|
||||
|
||||
@@ -1,283 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <u-swiper :list="banners" height="460" radius="0" :indicator="banners.length > 1" imgMode="widthFix"></u-swiper> -->
|
||||
|
||||
<view class="container">
|
||||
<view class="after"></view>
|
||||
<view class="onecontent flex-between">
|
||||
<view class="onecontentone flex-start">
|
||||
<image :src="userInfo.headImg" mode="aspectFill">
|
||||
<text>{{userInfo.nickName || '无'}}</text>
|
||||
</view>
|
||||
<view class="onecontenttow flex-start">
|
||||
<view class="onecontenttowring flex-colum" @click="memberindex(0)">
|
||||
<text class="onecontenttowringone">{{usershopUserinfo.amount || '0.00'}}</text>
|
||||
<text class="onecontenttowringtow">余额</text>
|
||||
</view>
|
||||
<!-- <view class="onecontenttowring flex-colum">
|
||||
<text class="onecontenttowringone">282</text>
|
||||
<text class="onecontenttowringtow">积分</text>
|
||||
</view> -->
|
||||
<view class="onecontenttowring flex-colum" @click="memberindex(1)">
|
||||
<image class="onecontenttowringone image"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/rwm.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="onecontenttowringtow">会员码</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent flex-between">
|
||||
<view class="towcontentitem flex-colum" @click="scanCodehandle(0)">
|
||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/Instore.png" mode="widthFix"
|
||||
style="width: 86.88rpx; height: 140.94rpx;"></image>
|
||||
<text class="towcontentitemtext">店内就餐</text>
|
||||
</view>
|
||||
<view class="towcontentitem flex-colum" @click="scanCodehandle(1)">
|
||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/takeaway.png" mode="widthFix"
|
||||
style="width: 164rpx; height: 164rpx"></image>
|
||||
<text class="towcontentitemtext">会员充值</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer-banner">
|
||||
<!-- <u-swiper :list="footerBanners" radius="20" height="274" :indicator="banners.length > 1"
|
||||
imgMode="widthFix"></u-swiper> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
banners: ['https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/banner1.png'],
|
||||
footerBanners: ['https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/footer_banner1.png'],
|
||||
};
|
||||
},
|
||||
props: {
|
||||
usershopUserinfo: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
amount: '',
|
||||
shopName: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
userInfo: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
scanCodehandle(i) {
|
||||
if (i == 0) {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
let tableCode = this.getQueryString(decodeURIComponent(res.result), 'code')
|
||||
uni.cache.set('tableCode', tableCode)
|
||||
if (tableCode) {
|
||||
uni.pro.navigateTo('order_food/order_food')
|
||||
}
|
||||
// let tableCode = this.getQueryString(decodeURIComponent(res.result), 'code')
|
||||
// if (tableCode) {
|
||||
// uni.pro.navigateTo('order_food/order_food', {
|
||||
// tableCode: tableCode,
|
||||
// })
|
||||
// }
|
||||
}
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url:'/pages/order_food/order_food'
|
||||
// })
|
||||
} else {
|
||||
// uni.pro.navigateTo('pay_code/pay_code?shopInfo=', {
|
||||
// shopName: this.usershopUserinfo.shopName,
|
||||
// amount: this.usershopUserinfo.amount,
|
||||
// shopId: uni.cache.get('shopUser')
|
||||
// })
|
||||
uni.pro.navigateTo('member/memberdetails', {
|
||||
shopId_id: uni.cache.get('shopUser'),
|
||||
})
|
||||
}
|
||||
},
|
||||
memberindex(i) {
|
||||
if (i == 0) {
|
||||
uni.pro.navigateTo('member/memberdetails', {
|
||||
shopId_id: uni.cache.get('shopUser'),
|
||||
})
|
||||
} else {
|
||||
// uni.pro.navigateTo('pay_code/pay_code?shopInfo=', {
|
||||
// shopName: this.usershopUserinfo.shopName,
|
||||
// amount: this.usershopUserinfo.amount,
|
||||
// shopId: uni.cache.get('shopUser')
|
||||
// })
|
||||
let data = {
|
||||
shopName: this.usershopUserinfo.shopName,
|
||||
amount: this.usershopUserinfo.amount,
|
||||
shopId: uni.cache.get('shopUser')
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
getQueryString(url, name) { //解码
|
||||
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
|
||||
var r = url.substr(1).match(reg)
|
||||
if (r != null) {
|
||||
return r[2]
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
// / 更换头像
|
||||
onChooseAvatar(e) {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
})
|
||||
console.log(e.detail.avatarUrl)
|
||||
let file = e.detail.avatarUrl;
|
||||
uploadImage(file, 'avatar',
|
||||
result => {
|
||||
//将上传后的图片以对象(官方要求的格式)的形式存入uni-file-picker的value值imageValue(imageValue值的结构为数组包对象)用于图片回显
|
||||
// let objAge = {
|
||||
// 'url': result,
|
||||
// 'extname': 'png',
|
||||
// 'name': 'imgss.png'
|
||||
// };
|
||||
// this.userlist.avatar.push(objAge)
|
||||
this.userInfo.avatar = result
|
||||
console.log(this.userInfo.avatar)
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
page {
|
||||
background: #F6F8FA;
|
||||
}
|
||||
|
||||
.container {
|
||||
border-radius: 0 0 0 40rpx;
|
||||
position: relative;
|
||||
padding: 0 28rpx;
|
||||
|
||||
.after {
|
||||
position: absolute;
|
||||
top: 46rpx;
|
||||
right: 0;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
background-image: radial-gradient(160rpx at 0px 0px, rgba(0, 0, 0, 0) 40rpx, #f9f9f9 40rpx);
|
||||
}
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
margin-top: -86rpx;
|
||||
position: relative;
|
||||
height: 172rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
border-radius: 14rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
.onecontentone {
|
||||
image {
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
background: #FFFFFF;
|
||||
border: 2rpx solid #707070;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-left: 12rpx;
|
||||
width: 146rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
.onecontenttowring {
|
||||
margin-left: 32rpx;
|
||||
height: 110rpx;
|
||||
justify-content: flex-end;
|
||||
|
||||
.onecontenttowringone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
}
|
||||
|
||||
.onecontenttowringtow {
|
||||
margin-top: 20rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
margin-top: 48rpx;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
height: 314rpx;
|
||||
padding: 0 90rpx 0 120rpx;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 188rpx;
|
||||
width: 2rpx;
|
||||
left: 50%;
|
||||
margin-left: -1rpx;
|
||||
background: #D8D8D8;
|
||||
}
|
||||
|
||||
.towcontentitem {
|
||||
.towcontentitemtext {
|
||||
margin-top: 26rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer-banner {
|
||||
margin-top: 48upx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -61,7 +61,6 @@
|
||||
},
|
||||
methods: {
|
||||
scanCodehandle(i) {
|
||||
console.log(1)
|
||||
setTimeout(()=>{
|
||||
uni.cache.set('forceUpdate',2)
|
||||
},200)
|
||||
@@ -72,7 +71,7 @@
|
||||
uni.cache.set('tableCode', tableCode)
|
||||
if (tableCode) {
|
||||
uni.pro.navigateTo('order_food/order_food', {
|
||||
// shopId_id: uni.cache.get('shopUser'),
|
||||
// shopId_id: uni.cache.get('shopId'),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -82,7 +81,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('member/memberdetails', {
|
||||
shopId_id: uni.cache.get('shopUser'),
|
||||
shopId_id: uni.cache.get('shopId'),
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -90,14 +89,14 @@
|
||||
console.log(2)
|
||||
if (i == 0) {
|
||||
uni.pro.navigateTo('member/index', {
|
||||
shopId: uni.cache.get('shopUser'),
|
||||
shopId: uni.cache.get('shopId'),
|
||||
type: 'index',
|
||||
})
|
||||
} else {
|
||||
let data = {
|
||||
shopName: this.usershopUserinfo.shopName,
|
||||
amount: this.usershopUserinfo.amount,
|
||||
shopId: uni.cache.get('shopUser')
|
||||
shopId: uni.cache.get('shopId')
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(data)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- 占位符导航栏 -->
|
||||
<navseat :opacity='opacity' :title='toplist.name' :titleshow='false'></navseat>
|
||||
<view class="onecontent">
|
||||
<image class="onecontentimage" :src="toplist.coverImg" mode=""></image>
|
||||
<image class="onecontentimage" :src="toplist.coverImg" mode="aspectFill"></image>
|
||||
<view class="onecontentabsolute">
|
||||
</view>
|
||||
</view>
|
||||
@@ -74,7 +74,6 @@
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.onLoadhome()
|
||||
},
|
||||
onShow() {
|
||||
this.init_fn()
|
||||
|
||||
Reference in New Issue
Block a user