add
This commit is contained in:
parent
00c3dc1135
commit
836d546b13
|
@ -17,7 +17,7 @@ switch (env) {
|
||||||
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
||||||
break;
|
break;
|
||||||
case 'local':
|
case 'local':
|
||||||
BASE_URL = 'http://192.168.1.201:8545';
|
BASE_URL = 'http://192.168.1.22:8545';
|
||||||
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
@click="onChooseShop(item)">
|
@click="onChooseShop(item)">
|
||||||
<view class="multiple-card-item-left">
|
<view class="multiple-card-item-left">
|
||||||
<view class="multiple-card-item-left-title">{{item.name}}</view>
|
<view class="multiple-card-item-left-title">{{item.name}}</view>
|
||||||
<view class="multiple-card-item-left-tag">
|
<view class="multiple-card-item-left-tag" v-if="item.reservation">
|
||||||
<text class="yellow" v-if="item.is_store == 1">可自提</text>
|
<text class="yellow" v-if="item.reservation">次日可提</text>
|
||||||
<text class="green" v-if="item.is_send == 1">可配送</text>
|
<text class="green" v-else>当日可提</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="multiple-card-item-left-info">
|
<view class="multiple-card-item-left-info">
|
||||||
<u-image src="../../multipleShop/images/location_small.jpg" width="24rpx"
|
<u-image src="../../multipleShop/images/location_small.jpg" width="24rpx"
|
||||||
|
@ -77,6 +77,7 @@
|
||||||
latitude: '',
|
latitude: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
name: '',
|
name: '',
|
||||||
|
cart_id: "",
|
||||||
page_no: 1,
|
page_no: 1,
|
||||||
page_size: 6
|
page_size: 6
|
||||||
})
|
})
|
||||||
|
@ -84,6 +85,7 @@
|
||||||
// 初始化
|
// 初始化
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
event = opt.event
|
event = opt.event
|
||||||
|
if (opt.cart_id) queryParams.cart_id = opt.cart_id;
|
||||||
console.log(event)
|
console.log(event)
|
||||||
// 获取定位
|
// 获取定位
|
||||||
getLocation();
|
getLocation();
|
||||||
|
@ -272,7 +274,7 @@
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
width: 90rpx;
|
width: 120rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
line-height: 42rpx;
|
line-height: 42rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -0,0 +1,288 @@
|
||||||
|
<template>
|
||||||
|
<view class="m-card m-good" v-for="(item, index) in lists" :key="index">
|
||||||
|
<view class="shop-check" @click="item.check=!item.check">
|
||||||
|
<image v-if="!item.check" src="@/static/icon/n-check.png"></image>
|
||||||
|
<image v-else src="@/static/icon/check.png"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="image">
|
||||||
|
<up-image width="160rpx" height="160rpx" :src="item.image"></up-image>
|
||||||
|
</view>
|
||||||
|
<view class="body-content">
|
||||||
|
<view>
|
||||||
|
<view class="title">
|
||||||
|
<view> <text>{{item.store_name }}</text> x<text>{{item.nums }}</text> </view>
|
||||||
|
<view>¥{{item.price}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="time">
|
||||||
|
<view style="float: right;">
|
||||||
|
<up-number-box :min="1" :max="item.nums" v-model="item.num"></up-number-box>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="height: 200rpx;" />
|
||||||
|
|
||||||
|
<view class="bottom">
|
||||||
|
<view style="display: flex;align-items: center;">
|
||||||
|
<view class="all-checl">
|
||||||
|
<image v-if="getCheckNum()!=lists.length" @click="checkAll" src="@/static/icon/n-check.png"></image>
|
||||||
|
<image @click="checkAllNot" v-else src="@/static/icon/check.png"></image>
|
||||||
|
</view>
|
||||||
|
<view style="margin-left: 8rpx;" @click="checkAll" v-if='getCheckNum() !=lists.length'>
|
||||||
|
全选({{getCheckNum()}})
|
||||||
|
</view>
|
||||||
|
<view style="margin-left: 8rpx;" @click="checkAllNot" v-else>
|
||||||
|
全不选({{getCheckNum()}})
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="display: flex;align-items: center;">
|
||||||
|
<up-button color="#20b128" shape="circle" @click="showPop=true">
|
||||||
|
<view class="">
|
||||||
|
预约提货({{getCheckNum()}})
|
||||||
|
</view>
|
||||||
|
</up-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<up-popup :show="showPop" @close="showPop=false" @open="showPop=true" mode="center">
|
||||||
|
<view class="popContent">
|
||||||
|
<view class="tit">
|
||||||
|
预约提货
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
预约时间:<view class="left" @click="showCalendar=true">
|
||||||
|
{{formData.times}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
选择门店:<view class="left" @click="navgo('/multipleShop/index/index?event=asset')">
|
||||||
|
{{formData.store_name}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="rect-btn">
|
||||||
|
<view style="width: 236rpx;">
|
||||||
|
<up-button @click="showPop=false">取消</up-button>
|
||||||
|
</view>
|
||||||
|
<view style="width: 236rpx;">
|
||||||
|
<up-button color="#20b128" @click="submit">确定</up-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</up-popup>
|
||||||
|
<up-calendar :show="showCalendar" color="#20B128" @confirm="confirmDate" @close='showCalendar=false'></up-calendar>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
reactive
|
||||||
|
} from "vue"
|
||||||
|
import {
|
||||||
|
onPullDownRefresh
|
||||||
|
} from "@dcloudio/uni-app"
|
||||||
|
|
||||||
|
import {
|
||||||
|
getUserProductStorageLists,
|
||||||
|
reservationUserProductStorage
|
||||||
|
} from "@/api/asset.js"
|
||||||
|
import useUserStore from "@/store/user";
|
||||||
|
let userInfo = useUserStore().userInfo
|
||||||
|
const value = ref(1)
|
||||||
|
const showPop = ref(false)
|
||||||
|
const showCalendar = ref(false)
|
||||||
|
const lists = ref([])
|
||||||
|
|
||||||
|
const navgo = (url) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getCheckNum = () => {
|
||||||
|
return lists.value.filter(item => item.check).length
|
||||||
|
}
|
||||||
|
|
||||||
|
const formData = reactive({
|
||||||
|
info: [],
|
||||||
|
times: "",
|
||||||
|
store_id: "",
|
||||||
|
store_name: "",
|
||||||
|
})
|
||||||
|
|
||||||
|
uni.$on('asset', function(data) {
|
||||||
|
let datas = JSON.parse(data)
|
||||||
|
formData.store_id = datas.id
|
||||||
|
formData.store_name = datas.name
|
||||||
|
})
|
||||||
|
|
||||||
|
const getLists = async (isPull) => {
|
||||||
|
let res = await getUserProductStorageLists({
|
||||||
|
uid: userInfo.id
|
||||||
|
})
|
||||||
|
lists.value = res.data.lists
|
||||||
|
lists.value.forEach(item => {
|
||||||
|
item.num = 1
|
||||||
|
})
|
||||||
|
if (isPull) uni.stopPullDownRefresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 全选&&全不选
|
||||||
|
const isAll = ref(false)
|
||||||
|
const checkAll = () => {
|
||||||
|
lists.value.forEach(item => item.check = true)
|
||||||
|
}
|
||||||
|
const checkAllNot = () => {
|
||||||
|
lists.value.forEach(item => item.check = false)
|
||||||
|
}
|
||||||
|
// 全选&&全不选结束
|
||||||
|
|
||||||
|
const submit = async () => {
|
||||||
|
formData.info = (lists.value.filter(item => item.check)).map(item => {
|
||||||
|
return {
|
||||||
|
product_id: item.product_id,
|
||||||
|
nums: item.num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
await reservationUserProductStorage({
|
||||||
|
...formData
|
||||||
|
})
|
||||||
|
showPop.value = false
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
const confirmDate = (e) => {
|
||||||
|
formData.times = e[0]
|
||||||
|
showCalendar.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
getLists(true)
|
||||||
|
})
|
||||||
|
getLists()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.m-card {
|
||||||
|
margin: 20rpx;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-good {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.image {
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body-content {
|
||||||
|
width: 490rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
color: #989898;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
padding: 5rpx 10rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #444;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
// display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-check {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 150rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.all-checl {
|
||||||
|
image {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
width: 100vw;
|
||||||
|
padding: 50rpx 20rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: white;
|
||||||
|
display: flex;
|
||||||
|
box-sizing: border-box;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popContent {
|
||||||
|
width: 600rpx;
|
||||||
|
height: 400rpx;
|
||||||
|
padding: 20rpx 50rpx;
|
||||||
|
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 34rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rect-btn {
|
||||||
|
display: flex;
|
||||||
|
// margin-top: 50rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
width: 300rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
border: 1px solid #EDF2FA;
|
||||||
|
line-height: 70rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
// vertical-align: bottom;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -26,14 +26,14 @@
|
||||||
|
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<view class="all-checl" @click="checkAll">
|
<view class="all-checl">
|
||||||
<image v-if="getCheckNum()!=lists.length" src="@/static/icon/n-check.png"></image>
|
<image v-if="getCheckNum()!=lists.length" @click="checkAll" src="@/static/icon/n-check.png"></image>
|
||||||
<image v-else src="@/static/icon/check.png"></image>
|
<image @click="checkAllNot" v-else src="@/static/icon/check.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-left: 8rpx;" v-if='getCheckNum()==lists.length'>
|
<view style="margin-left: 8rpx;" @click="checkAll" v-if='getCheckNum() !=lists.length'>
|
||||||
全选({{getCheckNum()}})
|
全选({{getCheckNum()}})
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-left: 8rpx;" v-else>
|
<view style="margin-left: 8rpx;" @click="checkAllNot" v-else>
|
||||||
全不选({{getCheckNum()}})
|
全不选({{getCheckNum()}})
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
<up-popup :show="showPop" @close="showPop=false" @open="showPop=true" mode="center">
|
<up-popup :show="showPop" @close="showPop=false" @open="showPop=true" mode="center">
|
||||||
<view class="popContent">
|
<view class="popContent">
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
标题
|
预约提货
|
||||||
</view>
|
</view>
|
||||||
<view class="label">
|
<view class="label">
|
||||||
预约时间:<view class="left" @click="showCalendar=true">
|
预约时间:<view class="left" @click="showCalendar=true">
|
||||||
|
@ -80,11 +80,16 @@
|
||||||
ref,
|
ref,
|
||||||
reactive
|
reactive
|
||||||
} from "vue"
|
} from "vue"
|
||||||
|
import {
|
||||||
|
onPullDownRefresh
|
||||||
|
} from "@dcloudio/uni-app"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getUserProductStorageLists,
|
getUserProductStorageLists,
|
||||||
reservationUserProductStorage
|
reservationUserProductStorage
|
||||||
} from "@/api/asset.js"
|
} from "@/api/asset.js"
|
||||||
|
import useUserStore from "@/store/user";
|
||||||
|
let userInfo = useUserStore().userInfo
|
||||||
const value = ref(1)
|
const value = ref(1)
|
||||||
const showPop = ref(false)
|
const showPop = ref(false)
|
||||||
const showCalendar = ref(false)
|
const showCalendar = ref(false)
|
||||||
|
@ -100,8 +105,6 @@
|
||||||
return lists.value.filter(item => item.check).length
|
return lists.value.filter(item => item.check).length
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
info: [],
|
info: [],
|
||||||
times: "",
|
times: "",
|
||||||
|
@ -113,26 +116,28 @@
|
||||||
let datas = JSON.parse(data)
|
let datas = JSON.parse(data)
|
||||||
formData.store_id = datas.id
|
formData.store_id = datas.id
|
||||||
formData.store_name = datas.name
|
formData.store_name = datas.name
|
||||||
console.log(JSON.parse(data));
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const isAll = ref(false)
|
const getLists = async (isPull) => {
|
||||||
|
|
||||||
const getLists = async () => {
|
|
||||||
let res = await getUserProductStorageLists({
|
let res = await getUserProductStorageLists({
|
||||||
uid: 130
|
uid: userInfo.id
|
||||||
})
|
})
|
||||||
lists.value = res.data.lists
|
lists.value = res.data.lists
|
||||||
lists.value.forEach(item => {
|
lists.value.forEach(item => {
|
||||||
item.num = 1
|
item.num = 1
|
||||||
})
|
})
|
||||||
|
if (isPull) uni.stopPullDownRefresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 全选&&全不选
|
||||||
|
const isAll = ref(false)
|
||||||
const checkAll = () => {
|
const checkAll = () => {
|
||||||
lists.value.forEach(item => item.check = true)
|
lists.value.forEach(item => item.check = true)
|
||||||
}
|
}
|
||||||
|
const checkAllNot = () => {
|
||||||
|
lists.value.forEach(item => item.check = false)
|
||||||
|
}
|
||||||
|
// 全选&&全不选结束
|
||||||
|
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
formData.info = (lists.value.filter(item => item.check)).map(item => {
|
formData.info = (lists.value.filter(item => item.check)).map(item => {
|
||||||
|
@ -152,7 +157,9 @@
|
||||||
showCalendar.value = false
|
showCalendar.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
getLists(true)
|
||||||
|
})
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -21,19 +21,12 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<!-- <view class="tabs">
|
|
||||||
<text @click="currentTab = 1" :class="{ actText: currentTab == 1 }">开通{{ Role == 1 ? '行业会员' : '商户' }}
|
|
||||||
</text>
|
|
||||||
<text @click="currentTab = 2, getCount(), getLists()" :class="{ actText: currentTab == 2 }"> 已开通列表</text>
|
|
||||||
<view class="lines" :class="{ actLine: currentTab == 2 }" />
|
|
||||||
</view> -->
|
|
||||||
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
||||||
<up-tabs v-if="Role==1" :list="tabsLst" :itemStyle="{width:'33vw',paddingBottom:'20rpx'}"
|
<up-tabs v-if="Role==1" :list="tabsLst" :itemStyle="{width:'33vw',paddingBottom:'20rpx'}"
|
||||||
lineColor='#50C758' :current='currentTab' @change="tabsChange"></up-tabs>
|
lineColor='#50C758' :current='currentTab' @change="tabsChange"></up-tabs>
|
||||||
<up-tabs v-else :list="tabsLst2" :itemStyle="{width:'50vw',paddingBottom:'20rpx'}" lineColor='#50C758'
|
<up-tabs v-else :list="tabsLst2" :itemStyle="{width:'50vw',paddingBottom:'20rpx'}" lineColor='#50C758'
|
||||||
:current='currentTab' @change="tabsChange1"></up-tabs>
|
:current='currentTab' @change="tabsChange1"></up-tabs>
|
||||||
</up-sticky>
|
</up-sticky>
|
||||||
|
|
||||||
<!-- tabs0 -->
|
<!-- tabs0 -->
|
||||||
<block v-if='currentTab == 0'>
|
<block v-if='currentTab == 0'>
|
||||||
<view class="card card1">
|
<view class="card card1">
|
||||||
|
@ -43,13 +36,14 @@
|
||||||
</view>
|
</view>
|
||||||
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
|
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
|
||||||
<up-form-item label="">
|
<up-form-item label="">
|
||||||
<up-input v-model="formData.real_name" border="none" prefixIcon="account" placeholder="请输入真实姓名"
|
<up-input @change="phoneChnge(1)" v-model="formData.mobile" border="none" prefixIcon="phone"
|
||||||
|
placeholder="请输入电话号码"
|
||||||
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
||||||
:placeholderStyle="{ color: '#444444' }"
|
:placeholderStyle="{ color: '#444444' }"
|
||||||
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
<up-form-item label="">
|
<up-form-item label="">
|
||||||
<up-input v-model="formData.mobile" border="none" prefixIcon="phone" placeholder="请输入电话号码"
|
<up-input v-model="formData.real_name" border="none" prefixIcon="account" placeholder="请输入真实姓名"
|
||||||
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
||||||
:placeholderStyle="{ color: '#444444' }"
|
:placeholderStyle="{ color: '#444444' }"
|
||||||
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
||||||
|
@ -123,7 +117,7 @@
|
||||||
</view>
|
</view>
|
||||||
<up-form labelPosition="left" :model="formData2" :borderBottom='false'>
|
<up-form labelPosition="left" :model="formData2" :borderBottom='false'>
|
||||||
<up-form-item label="">
|
<up-form-item label="">
|
||||||
<up-input @change="phoneChnge" v-model="formData2.mobile" border="none" prefixIcon="phone"
|
<up-input @change="phoneChnge(2)" v-model="formData2.mobile" border="none" prefixIcon="phone"
|
||||||
placeholder="输入电话号码自动查询"
|
placeholder="输入电话号码自动查询"
|
||||||
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
||||||
:placeholderStyle="{ color: '#444444' }"
|
:placeholderStyle="{ color: '#444444' }"
|
||||||
|
@ -208,10 +202,17 @@
|
||||||
<!-- 表格数据行 -->
|
<!-- 表格数据行 -->
|
||||||
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
|
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
|
||||||
<!-- <uni-td align="center">{{index+1}}</uni-td> -->
|
<!-- <uni-td align="center">{{index+1}}</uni-td> -->
|
||||||
<uni-td style="font-size: 20rpx;" align="center">{{ item.real_name }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">
|
||||||
|
<view>
|
||||||
|
{{ item.real_name }}
|
||||||
|
</view>
|
||||||
|
<view style="color: #33B83A;" @click="popPhone=item.mobile,showModal=true">
|
||||||
|
手机号
|
||||||
|
</view>
|
||||||
|
</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center">{{ item.price }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.price }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center">{{ item.label_name }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.ship_name }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center">
|
<uni-td style="font-size: 20rpx;" align="center">
|
||||||
<view v-if="item.paid == 1 ">已开通</view>
|
<view v-if="item.paid == 1 ">已开通</view>
|
||||||
<view v-else style="color:#33B83A ;">
|
<view v-else style="color:#33B83A ;">
|
||||||
|
@ -243,6 +244,7 @@
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<!-- <uni-th width="20" align="center">序号</uni-th> -->
|
<!-- <uni-th width="20" align="center">序号</uni-th> -->
|
||||||
<uni-th width="50" align="center">商户</uni-th>
|
<uni-th width="50" align="center">商户</uni-th>
|
||||||
|
<uni-th width="50" align="center">查看号码</uni-th>
|
||||||
<uni-th width="50" align="center">开通时间</uni-th>
|
<uni-th width="50" align="center">开通时间</uni-th>
|
||||||
<uni-th width="50" align="center">状态</uni-th>
|
<uni-th width="50" align="center">状态</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
|
@ -250,6 +252,7 @@
|
||||||
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
|
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
|
||||||
<!-- <uni-td align="center">{{index+1}}</uni-td> -->
|
<!-- <uni-td align="center">{{index+1}}</uni-td> -->
|
||||||
<uni-td style="font-size: 20rpx;" align="center">{{ item.nickname }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.nickname }}</uni-td>
|
||||||
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.mobile }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center">
|
<uni-td style="font-size: 20rpx;" align="center">
|
||||||
<view>已开通</view>
|
<view>已开通</view>
|
||||||
|
@ -259,24 +262,6 @@
|
||||||
</uni-table>
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 50rpx;" />
|
<view style="height: 50rpx;" />
|
||||||
|
|
||||||
|
@ -325,7 +310,16 @@
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
<up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false'
|
<up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false'
|
||||||
@close="showPop1 = false" @open="showPop1 = true" keyName='label_name' confirmColor='#33B83A'></up-picker>
|
@close="showPop1 = false" @open="showPop1 = true" keyName='title' confirmColor='#33B83A'></up-picker>
|
||||||
|
|
||||||
|
|
||||||
|
<up-modal :show="showModal" title="电话号码" content='15884967539' :closeOnClickOverlay="true" :zoom="true"
|
||||||
|
confirmColor='#33B83A' @confirm='showModal=false' @close="showModal=false">
|
||||||
|
<view class="slot-content">
|
||||||
|
{{popPhone}}
|
||||||
|
</view>
|
||||||
|
</up-modal>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
|
@ -364,9 +358,11 @@
|
||||||
config
|
config
|
||||||
} from "@/config/app.js"
|
} from "@/config/app.js"
|
||||||
|
|
||||||
|
const showModal = ref(false)
|
||||||
const showPop1 = ref(false)
|
const showPop1 = ref(false)
|
||||||
const Role = ref(1)
|
const Role = ref(1)
|
||||||
const range = ref({})
|
const popPhone = ref('')
|
||||||
|
// const range = ref({})
|
||||||
const columns = ref([])
|
const columns = ref([])
|
||||||
const showModa = ref(true)
|
const showModa = ref(true)
|
||||||
const storePhone = ref('')
|
const storePhone = ref('')
|
||||||
|
@ -528,18 +524,8 @@
|
||||||
price: "",
|
price: "",
|
||||||
})
|
})
|
||||||
|
|
||||||
const phoneChnge = async () => {
|
|
||||||
if (formData2.mobile.length == 0) resetFormData();
|
const getFormData2 = (data) => {
|
||||||
if (!checkPhone(formData2.mobile)) return
|
|
||||||
uni.showLoading({
|
|
||||||
title: '查询用户中'
|
|
||||||
})
|
|
||||||
let {
|
|
||||||
data
|
|
||||||
} = await getVipInfoByPhone({
|
|
||||||
mobile: formData2.mobile
|
|
||||||
})
|
|
||||||
uni.hideLoading()
|
|
||||||
formData2.city = data.address_info?.city
|
formData2.city = data.address_info?.city
|
||||||
formData2.area = data.address_info?.area
|
formData2.area = data.address_info?.area
|
||||||
formData2.province = data.address_info?.province
|
formData2.province = data.address_info?.province
|
||||||
|
@ -547,17 +533,66 @@
|
||||||
formData2.village = data.address_info?.village
|
formData2.village = data.address_info?.village
|
||||||
formData2.real_name = data.real_name
|
formData2.real_name = data.real_name
|
||||||
formData2.address = data.address_info?.address_like
|
formData2.address = data.address_info?.address_like
|
||||||
formData2.label_id = data.label_id
|
formData2.label_id = data.user_ship
|
||||||
// formData2.label_limit = data.label_id
|
|
||||||
formData2.user_ship = data.user_ship
|
formData2.user_ship = data.user_ship
|
||||||
formData2.brigade = data.address_info?.brigade
|
formData2.brigade = data.address_info?.brigade
|
||||||
columns.value[0].forEach(item => {
|
columns.value[0].forEach(item => {
|
||||||
if (item.label_id == data.label_id) {
|
if (item.id == formData2.label_id) {
|
||||||
formData2.label_name = item.label_name
|
formData2.label_name = item.title
|
||||||
formData2.label_limit = item.limit
|
formData2.label_limit = item.limit
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const phoneChnge = async (type) => {
|
||||||
|
// typewhite 1 行业会员 2 经营资金
|
||||||
|
if (type == 1) {
|
||||||
|
if (!checkPhone(formData.mobile)) return
|
||||||
|
try {
|
||||||
|
let {
|
||||||
|
data
|
||||||
|
} = await getVipInfoByPhone({
|
||||||
|
mobile: formData.mobile
|
||||||
|
})
|
||||||
|
formData2.mobile = formData.mobile
|
||||||
|
if (data.user_ship == 4) return;
|
||||||
|
if (Role.value == 1) {
|
||||||
|
uni.$u.toast('该用户已是会员请使用追加经营资金进行收款')
|
||||||
|
currentTab.value = 1
|
||||||
|
return getFormData2(data)
|
||||||
|
} else {
|
||||||
|
return uni.$u.toast('该用户已是会员,无法进行商户报备')
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {}
|
||||||
|
} else {
|
||||||
|
if (formData2.mobile.length == 0) resetFormData();
|
||||||
|
if (!checkPhone(formData2.mobile)) return
|
||||||
|
uni.showLoading({
|
||||||
|
title: '查询用户中'
|
||||||
|
})
|
||||||
|
try {
|
||||||
|
let {
|
||||||
|
data
|
||||||
|
} = await getVipInfoByPhone({
|
||||||
|
mobile: formData2.mobile
|
||||||
|
})
|
||||||
|
// if (data.user_ship != 4) {
|
||||||
|
// uni.hideLoading()
|
||||||
|
// return uni.$u.toast('查询失败');
|
||||||
|
// }
|
||||||
|
if (formData.mobile) {
|
||||||
|
formData2.mobile = formData.mobile
|
||||||
|
}
|
||||||
|
uni.hideLoading()
|
||||||
|
return getFormData2(data)
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.$u.toast('查询失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -585,8 +620,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const conformRole = (e) => {
|
const conformRole = (e) => {
|
||||||
formData.label_name = e.value[0].label_name
|
formData.label_name = e.value[0].title
|
||||||
formData.label_id = e.value[0].label_id
|
formData.label_id = e.value[0].id
|
||||||
formData.price = (+e.value[0].limit).toFixed(2)
|
formData.price = (+e.value[0].limit).toFixed(2)
|
||||||
formData.label_limit = e.value[0].limit
|
formData.label_limit = e.value[0].limit
|
||||||
showPop1.value = false
|
showPop1.value = false
|
||||||
|
@ -700,9 +735,7 @@
|
||||||
user_channel.on('message', function(data) {
|
user_channel.on('message', function(data) {
|
||||||
try {
|
try {
|
||||||
uni.hideLoading({});
|
uni.hideLoading({});
|
||||||
console.log(timerInvol)
|
|
||||||
clearTimeout(timerInvol);
|
clearTimeout(timerInvol);
|
||||||
console.log("清除" + timerInvol)
|
|
||||||
paySuccessToTabs2()
|
paySuccessToTabs2()
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
});
|
});
|
||||||
|
@ -719,6 +752,7 @@
|
||||||
delete formData.recharge_type
|
delete formData.recharge_type
|
||||||
delete formData.auth_code
|
delete formData.auth_code
|
||||||
formData.user_ship = 4
|
formData.user_ship = 4
|
||||||
|
formData.store_id = STORE_INFO.id
|
||||||
vipRechargeApi(formData).then(res => {
|
vipRechargeApi(formData).then(res => {
|
||||||
resetFormData()
|
resetFormData()
|
||||||
getLists()
|
getLists()
|
||||||
|
@ -727,14 +761,6 @@
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
if (!formData2.mobile) return uni.$u.toast('请填写电话号码');
|
if (!formData2.mobile) return uni.$u.toast('请填写电话号码');
|
||||||
if (formData2.price < formData2.label_limit) return uni.$u.toast(
|
if (formData2.price < formData2.label_limit) return uni.$u.toast(
|
||||||
|
@ -748,7 +774,7 @@
|
||||||
});
|
});
|
||||||
formData2.auth_code = res.result
|
formData2.auth_code = res.result
|
||||||
formData2.recharge_type = 'INDUSTRYMEMBERS'
|
formData2.recharge_type = 'INDUSTRYMEMBERS'
|
||||||
formData2.user_ship = 1
|
formData2.user_ship = formData.label_id
|
||||||
vipRechargeApi(formData2).then(res => {
|
vipRechargeApi(formData2).then(res => {
|
||||||
timerInvol = setTimeout(() => {
|
timerInvol = setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
@ -770,7 +796,7 @@
|
||||||
formData.store_id = STORE_INFO.id
|
formData.store_id = STORE_INFO.id
|
||||||
if (Role.value == 1) {
|
if (Role.value == 1) {
|
||||||
// formData.recharge_type = 'INDUSTRYMEMBERS'
|
// formData.recharge_type = 'INDUSTRYMEMBERS'
|
||||||
// formData.user_ship = 1
|
// formData.user_ship = formData.label_id
|
||||||
// vipRechargeApi(formData).then(res => {
|
// vipRechargeApi(formData).then(res => {
|
||||||
// uni.showLoading({
|
// uni.showLoading({
|
||||||
// title: '支付中...'
|
// title: '支付中...'
|
||||||
|
@ -790,7 +816,7 @@
|
||||||
});
|
});
|
||||||
formData.auth_code = res.result
|
formData.auth_code = res.result
|
||||||
formData.recharge_type = 'INDUSTRYMEMBERS'
|
formData.recharge_type = 'INDUSTRYMEMBERS'
|
||||||
formData.user_ship = 1
|
formData.user_ship = formData.label_id
|
||||||
vipRechargeApi(formData).then(res => {
|
vipRechargeApi(formData).then(res => {
|
||||||
timerInvol = setTimeout(() => {
|
timerInvol = setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
@ -897,15 +923,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
// getUserShip().then(res => {
|
||||||
|
// range.value = res.data.lists.map(item => {
|
||||||
|
// return {
|
||||||
|
// value: item.id,
|
||||||
|
// text: item.title
|
||||||
|
// }
|
||||||
|
// })f
|
||||||
|
// })
|
||||||
getUserShip().then(res => {
|
getUserShip().then(res => {
|
||||||
range.value = res.data.lists.map(item => {
|
|
||||||
return {
|
|
||||||
value: item.id,
|
|
||||||
text: item.title
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
getUserLabel().then(res => {
|
|
||||||
columns.value = [res.data.lists]
|
columns.value = [res.data.lists]
|
||||||
})
|
})
|
||||||
getPhoneOneDay()
|
getPhoneOneDay()
|
||||||
|
|
|
@ -235,7 +235,6 @@
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "asset/index",
|
"path": "asset/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -243,6 +242,13 @@
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "Gifts/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "赠品区",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "balanceDetail/index",
|
"path": "balanceDetail/index",
|
||||||
|
|
|
@ -225,7 +225,7 @@
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<up-button color="#20b128" :disabled="cartInfo.pay_price<=0" @click="settleAccounts"> 支付</up-button>
|
<up-button color="#20b128" :disabled="cartInfo.pay_price<=0" @click="settleAccounts"> 支付</up-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="cart" @click="navTo(`/pages/cart/cart`)">
|
<view class="cart" @tap.stop="navTo('/pages/cart/cart')" s>
|
||||||
<image src="@/static/icon/cart.png"></image>
|
<image src="@/static/icon/cart.png"></image>
|
||||||
<view class="badge">{{ cartInfo.count }}</view>
|
<view class="badge">{{ cartInfo.count }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -57,9 +57,6 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
|
<view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
|
||||||
<view class="" style="font-size: 28rpx;transform: translateY(10rpx);">
|
<view class="" style="font-size: 28rpx;transform: translateY(10rpx);">
|
||||||
|
@ -80,9 +77,6 @@
|
||||||
<view class="rest-item-num">{{userInfo.return_money||'0.00'}}</view>
|
<view class="rest-item-num">{{userInfo.return_money||'0.00'}}</view>
|
||||||
<view class="rest-item-txt">返还金</view>
|
<view class="rest-item-txt">返还金</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
|
|
||||||
|
|
||||||
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
|
|
||||||
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')">
|
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')">
|
||||||
<view class="rest-item-num">{{userInfo.GetNumber ||"0.00"}}</view>
|
<view class="rest-item-num">{{userInfo.GetNumber ||"0.00"}}</view>
|
||||||
<view class="rest-item-txt">礼品券</view>
|
<view class="rest-item-txt">礼品券</view>
|
||||||
|
@ -129,7 +123,8 @@
|
||||||
|
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<up-cell-group>
|
<up-cell-group>
|
||||||
<up-cell title="我的资产" :isLink="true" url="/pageQuota/asset/index"></up-cell>
|
<!-- <up-cell v-if="userInfo.user_ship==1" title="赠品区" :isLink="true" url="/pageQuota/Gifts/index"></up-cell>
|
||||||
|
<up-cell title="我的资产" :isLink="true" url="/pageQuota/asset/index"></up-cell> -->
|
||||||
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
|
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
|
||||||
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
|
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
|
||||||
</up-cell-group>
|
</up-cell-group>
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<view class="count_down" v-if="datas.paid==0&&countDown">
|
<view class="count_down" v-if="datas.paid==0&&countDown">
|
||||||
还剩<text>{{countDown}}</text>订单自动取消
|
还剩<text>{{countDown}}</text>订单自动取消
|
||||||
</view>
|
</view>
|
||||||
<view class="m-card m-address" style="margin-top: 20rpx;" v-if="datas.is_writeoff==1">
|
<view class="m-card m-address" style="margin-top: 20rpx;">
|
||||||
<view class="address-info"
|
<view class="address-info"
|
||||||
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'
|
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'
|
||||||
@click="callPhone(store_info.phone)">
|
@click="callPhone(store_info.phone)">
|
||||||
<view class="top" style="align-items: flex-start;">
|
<view class="top" style="align-items: flex-start;">
|
||||||
<view style="color: #333;display: flex;align-items: center;flex-shrink: 0;">
|
<view style="color: #333;display: flex;align-items: center;flex-shrink: 0;">
|
||||||
<text style="margin: 0 10rpx;color:#20B128">核销门店</text>
|
<text style="margin: 0 10rpx;color:#20B128">自提点</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view style="color: #333;">
|
<view style="color: #333;">
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="m-card m-address" style="margin-top: 20rpx;" v-else>
|
<!-- <view class="m-card m-address" style="margin-top: 20rpx;" v-else>
|
||||||
<view class="address-info"
|
<view class="address-info"
|
||||||
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'
|
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'
|
||||||
@click="callPhone(shopInfo.phone)">
|
@click="callPhone(shopInfo.phone)">
|
||||||
|
@ -55,12 +55,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view @click.stop="navgo('/multipleShop/index/index')"
|
|
||||||
style="padding: 20rpx;background-color:#20B128;color: white;border-radius: 40rpx;flex-shrink: 0;">
|
|
||||||
所有提货点
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- <view class="m-card m-address" style="margin-top: 20rpx;" v-if="addressInfo && addressInfo.address_id">
|
<!-- <view class="m-card m-address" style="margin-top: 20rpx;" v-if="addressInfo && addressInfo.address_id">
|
||||||
<view class="address-info">
|
<view class="address-info">
|
||||||
|
|
|
@ -107,16 +107,7 @@
|
||||||
<view class="mask" v-if='showVerifyPop' @click="showVerifyPop=false">
|
<view class="mask" v-if='showVerifyPop' @click="showVerifyPop=false">
|
||||||
<view
|
<view
|
||||||
style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);background-color: white;padding: 20rpx;">
|
style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);background-color: white;padding: 20rpx;">
|
||||||
<!-- <up-image :src="orderData.verify_img" width="710rpx" height="105rpx"></up-image> -->
|
<up-image :src="orderData.verify_img" width="710rpx" height="105rpx"></up-image>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view style="font-weight: bold;color: #333;font-size: 26;text-align: center;margin-top: 20rpx;">
|
<view style="font-weight: bold;color: #333;font-size: 26;text-align: center;margin-top: 20rpx;">
|
||||||
核销码 {{orderData.verify_code}}
|
核销码 {{orderData.verify_code}}
|
||||||
</view>
|
</view>
|
||||||
|
@ -336,27 +327,35 @@
|
||||||
mer_id: e.merchant,
|
mer_id: e.merchant,
|
||||||
pay_type: e.pay_type
|
pay_type: e.pay_type
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (!res.data?.nonceStr) return uni.$u.toast('支付失败!');
|
if (res.data?.nonceStr) {
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: 'wxpay',
|
provider: 'wxpay',
|
||||||
timeStamp: res.data.timeStamp,
|
timeStamp: res.data.timeStamp,
|
||||||
nonceStr: res.data.nonceStr,
|
nonceStr: res.data.nonceStr,
|
||||||
package: res.data.package,
|
package: res.data.package,
|
||||||
signType: res.data.signType,
|
signType: res.data.signType,
|
||||||
paySign: res.data.paySign,
|
paySign: res.data.paySign,
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
if (e.errMsg == 'requestPayment:ok') {
|
if (e.errMsg == 'requestPayment:ok') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '订单支付成功',
|
title: '订单支付成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
reloadAll();
|
reloadAll();
|
||||||
} else uni.$u.toast('支付失败')
|
} else uni.$u.toast('支付失败')
|
||||||
},
|
},
|
||||||
fail: (e) => {
|
fail: (e) => {
|
||||||
uni.$u.toast('用户取消支付')
|
uni.$u.toast('用户取消支付')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单支付成功',
|
||||||
|
icon: 'success'
|
||||||
|
})
|
||||||
|
reloadAll();
|
||||||
|
}
|
||||||
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.$u.toast(err.msg || '网络错误')
|
uni.$u.toast(err.msg || '网络错误')
|
||||||
})
|
})
|
||||||
|
|
|
@ -34,9 +34,11 @@
|
||||||
<view class="m-card m-address" style="margin-top: 20rpx;">
|
<view class="m-card m-address" style="margin-top: 20rpx;">
|
||||||
<view class="address-info"
|
<view class="address-info"
|
||||||
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'>
|
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'>
|
||||||
<view class="top" style="align-items: flex-start;" @click="navgo('/multipleShop/index/index')">
|
<view class="top" style="align-items: flex-start;">
|
||||||
<view style="color: #333;display: flex;align-items: center;flex-shrink: 0;">
|
<view style="color: #333;">
|
||||||
<text style="margin: 0 10rpx;color:#20B128">推荐自提点</text>
|
<view style="margin: 0 10rpx;color:#20B128">推荐自提点</view>
|
||||||
|
<!-- <view style=" margin: 0 10rpx;margin-top:5rpx;color:#20B128"> {{reservation?"次日可提":"当日可提" }}
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view style="color: #333;">
|
<view style="color: #333;">
|
||||||
|
@ -52,9 +54,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding: 20rpx;background-color:#20B128;color: white;border-radius: 40rpx;flex-shrink: 0;">
|
<!-- <view style="padding: 20rpx;background-color:#20B128;color: white;border-radius: 40rpx;flex-shrink: 0;"
|
||||||
当日可提
|
@click="navgo(`/multipleShop/index/index?event=settle&cart_id=${cartStore.cartList.join(',')}`)">
|
||||||
</view>
|
切换门店
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -384,7 +387,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 订单相关
|
// 订单相关
|
||||||
let location;
|
let location = {
|
||||||
|
lat: '28.91318',
|
||||||
|
long: "105.43779",
|
||||||
|
};
|
||||||
|
let reservation = ref(0);
|
||||||
const shop_Info = ref({})
|
const shop_Info = ref({})
|
||||||
const cartList = ref([]);
|
const cartList = ref([]);
|
||||||
const orderInfo = ref({});
|
const orderInfo = ref({});
|
||||||
|
@ -397,18 +404,39 @@
|
||||||
cartList.value = res.data.cart_list;
|
cartList.value = res.data.cart_list;
|
||||||
orderInfo.value = res.data.order;
|
orderInfo.value = res.data.order;
|
||||||
shop_Info.value = res.data.shopInfo || {}
|
shop_Info.value = res.data.shopInfo || {}
|
||||||
console.log(shop_Info.value)
|
checkInventoryApi({
|
||||||
if (orderInfo.value.default_delivery == 0) {
|
cart_id: cartStore.cartList,
|
||||||
orderInfo.value.shipping_type = 2
|
store_id: res.data.shopInfo.id
|
||||||
}
|
}).then(res => {
|
||||||
|
reservation.value = res.data.reservation
|
||||||
|
})
|
||||||
|
// if (orderInfo.value.default_delivery == 0) {
|
||||||
|
// orderInfo.value.shipping_type = 2
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uni.$on('settle', function(data) {
|
||||||
|
let datas = JSON.parse(data)
|
||||||
|
shop_Info.value = datas
|
||||||
|
console.log(datas)
|
||||||
|
checkInventoryApi({
|
||||||
|
cart_id: cartStore.cartList,
|
||||||
|
store_id: datas.id
|
||||||
|
}).then(res => {
|
||||||
|
reservation.value = res.data.reservation
|
||||||
|
})
|
||||||
|
|
||||||
|
// formData.store_id = datas.id
|
||||||
|
// formData.store_name = datas.name
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const checkOrderA
|
// const checkOrderA
|
||||||
const pay_type = ref('7');
|
const pay_type = ref('7');
|
||||||
|
|
||||||
|
|
||||||
// 支付密码
|
// 支付密码
|
||||||
const passwordBoardVisible = ref(false);
|
const passwordBoardVisible = ref(false);
|
||||||
|
|
||||||
|
@ -429,13 +457,14 @@
|
||||||
const payFn = () => {
|
const payFn = () => {
|
||||||
let shareInfo = uni.getStorageSync('SHARE_INFO');
|
let shareInfo = uni.getStorageSync('SHARE_INFO');
|
||||||
createOrderApi({
|
createOrderApi({
|
||||||
|
reservation: reservation.value,
|
||||||
password: password.value,
|
password: password.value,
|
||||||
spread_uid: (shareInfo && shareInfo.uid) ? shareInfo.uid : '',
|
spread_uid: (shareInfo && shareInfo.uid) ? shareInfo.uid : '',
|
||||||
cart_id: cartStore.cartList,
|
cart_id: cartStore.cartList,
|
||||||
address_id: addressInfo.value.address_id,
|
address_id: addressInfo.value.address_id,
|
||||||
pay_type: pay_type.value,
|
pay_type: pay_type.value,
|
||||||
store_id: STORE_INFO.id || 0,
|
store_id: STORE_INFO.id || 0,
|
||||||
reservation_time: reservation_time.value,
|
// store_id: shop_Info.value.id,
|
||||||
shipping_type: orderInfo.value.shipping_type,
|
shipping_type: orderInfo.value.shipping_type,
|
||||||
mark: formData.value.remark,
|
mark: formData.value.remark,
|
||||||
is_storage: is_storage.value
|
is_storage: is_storage.value
|
||||||
|
@ -517,8 +546,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(options => {
|
onLoad(options => {
|
||||||
|
checkOrder();
|
||||||
|
return
|
||||||
if (uni.getStorageSync('location')) {
|
if (uni.getStorageSync('location')) {
|
||||||
location = JSON.parse(uni.getStorageSync('location'))
|
location = JSON.parse(uni.getStorageSync('location'))
|
||||||
|
checkOrder();
|
||||||
} else {
|
} else {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: "gcj02",
|
type: "gcj02",
|
||||||
|
@ -526,13 +558,10 @@
|
||||||
location.lat = res.latitude;
|
location.lat = res.latitude;
|
||||||
location.long = res.longitude;
|
location.long = res.longitude;
|
||||||
uni.setStorageSync('location', JSON.stringify(location))
|
uni.setStorageSync('location', JSON.stringify(location))
|
||||||
|
checkOrder();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
checkOrder();
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getAddressList();
|
getAddressList();
|
||||||
|
|
Loading…
Reference in New Issue