add
This commit is contained in:
parent
43612fe683
commit
00c3dc1135
|
@ -33,4 +33,8 @@ export const setPayPassword = (data) => {
|
||||||
|
|
||||||
export const getFundList = (data) => {
|
export const getFundList = (data) => {
|
||||||
return request.get('/user/user/fundList', data);
|
return request.get('/user/user/fundList', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getUserSingList = (data) => {
|
||||||
|
return request.get('/user/user/userSing', data);
|
||||||
}
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
|
||||||
|
export const getUserProductStorageLists = (data) => {
|
||||||
|
return request.get('/user_product_storage/UserProductStorage/lists', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const reservationUserProductStorage = (data) => {
|
||||||
|
return request.post('/user_product_storage/UserProductStorage/reservation', data);
|
||||||
|
}
|
|
@ -153,4 +153,8 @@ export const uploadImg = (data) => {
|
||||||
|
|
||||||
export const getVipInfoByPhone = (data) => {
|
export const getVipInfoByPhone = (data) => {
|
||||||
return request.get('/user/user/other_user_info', data);
|
return request.get('/user/user/other_user_info', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const checkInventoryApi = (data) => {
|
||||||
|
return request.post('/order/order/checkInventory', data);
|
||||||
}
|
}
|
|
@ -2,8 +2,8 @@ let BASE_URL
|
||||||
let WSS_URL
|
let WSS_URL
|
||||||
import store from "@/store/user.js"
|
import store from "@/store/user.js"
|
||||||
// 环境
|
// 环境
|
||||||
// let env = "dev"
|
let env = "dev"
|
||||||
let env = "prod"
|
// let env = "prod"
|
||||||
// let env = "release";
|
// let env = "release";
|
||||||
// let env = "local";
|
// let env = "local";
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
onLoad,
|
onLoad,
|
||||||
onShow
|
onShow
|
||||||
} from "@dcloudio/uni-app";
|
} from "@dcloudio/uni-app";
|
||||||
|
let event = ''
|
||||||
const currShop = ref(''); // 选择门店
|
const currShop = ref(''); // 选择门店
|
||||||
const shopList = ref([]); // 门店列表
|
const shopList = ref([]); // 门店列表
|
||||||
const status = ref(''); // 滚动状态
|
const status = ref(''); // 滚动状态
|
||||||
|
@ -82,26 +82,40 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
onLoad(() => {
|
onLoad((opt) => {
|
||||||
|
event = opt.event
|
||||||
|
console.log(event)
|
||||||
// 获取定位
|
// 获取定位
|
||||||
getLocation();
|
getLocation();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 门店选择
|
// 门店选择
|
||||||
const onChooseShop = (item) => {
|
const onChooseShop = (item) => {
|
||||||
|
let {
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
phone,
|
||||||
|
detailed_address
|
||||||
|
} = item
|
||||||
|
uni.$emit(event, JSON.stringify({
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
phone,
|
||||||
|
detailed_address
|
||||||
|
}))
|
||||||
|
uni.navigateBack()
|
||||||
return
|
return
|
||||||
currShop.value = item.id;
|
// currShop.value = item.id;
|
||||||
uni.setStorageSync('STORE_INFO', JSON.stringify(item));
|
// uni.setStorageSync('STORE_INFO', JSON.stringify(item));
|
||||||
// 如果选择了新店铺,删除之前的分享信息
|
// uni.removeStorageSync('SHARE_INFO');
|
||||||
uni.removeStorageSync('SHARE_INFO');
|
// setTimeout(() => {
|
||||||
setTimeout(() => {
|
// uni.reLaunch({
|
||||||
uni.reLaunch({
|
// url: '/pages/index/index?id=' + item.id,
|
||||||
url: '/pages/index/index?id=' + item.id,
|
// fail(err) {
|
||||||
fail(err) {
|
// console.log(err);
|
||||||
console.log(err);
|
// }
|
||||||
}
|
// })
|
||||||
})
|
// }, 300)
|
||||||
}, 300)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 触底刷新
|
// 触底刷新
|
||||||
|
@ -162,6 +176,7 @@
|
||||||
const getLocation = () => {
|
const getLocation = () => {
|
||||||
let location = uni.getStorageSync('location');
|
let location = uni.getStorageSync('location');
|
||||||
if (location) {
|
if (location) {
|
||||||
|
location = JSON.parse(location);
|
||||||
queryParams.longitude = location.lat
|
queryParams.longitude = location.lat
|
||||||
queryParams.latitude = location.long
|
queryParams.latitude = location.long
|
||||||
// 加载店铺列表
|
// 加载店铺列表
|
||||||
|
@ -172,15 +187,13 @@
|
||||||
success(res) {
|
success(res) {
|
||||||
queryParams.latitude = res.latitude;
|
queryParams.latitude = res.latitude;
|
||||||
queryParams.longitude = res.longitude;
|
queryParams.longitude = res.longitude;
|
||||||
|
|
||||||
// 加载店铺列表
|
// 加载店铺列表
|
||||||
getShopList();
|
getShopList();
|
||||||
|
|
||||||
// 避免下次再获取
|
// 避免下次再获取
|
||||||
uni.setStorageSync('location', {
|
uni.setStorageSync('location', JSON.stringify({
|
||||||
lat: queryParams.latitude,
|
lat: queryParams.latitude,
|
||||||
long: queryParams.longitude
|
long: queryParams.longitude
|
||||||
})
|
}, ))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,281 @@
|
||||||
|
<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" @click="checkAll">
|
||||||
|
<image v-if="getCheckNum()!=lists.length" src="@/static/icon/n-check.png"></image>
|
||||||
|
<image v-else src="@/static/icon/check.png"></image>
|
||||||
|
</view>
|
||||||
|
<view style="margin-left: 8rpx;" v-if='getCheckNum()==lists.length'>
|
||||||
|
全选({{getCheckNum()}})
|
||||||
|
</view>
|
||||||
|
<view style="margin-left: 8rpx;" 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 {
|
||||||
|
getUserProductStorageLists,
|
||||||
|
reservationUserProductStorage
|
||||||
|
} from "@/api/asset.js"
|
||||||
|
|
||||||
|
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
|
||||||
|
console.log(JSON.parse(data));
|
||||||
|
})
|
||||||
|
|
||||||
|
const isAll = ref(false)
|
||||||
|
|
||||||
|
const getLists = async () => {
|
||||||
|
let res = await getUserProductStorageLists({
|
||||||
|
uid: 130
|
||||||
|
})
|
||||||
|
lists.value = res.data.lists
|
||||||
|
lists.value.forEach(item => {
|
||||||
|
item.num = 1
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const checkAll = () => {
|
||||||
|
lists.value.forEach(item => item.check = true)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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>
|
|
@ -17,7 +17,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content" v-if='type==3'>
|
<view class="content" v-if='type==3||type==5'>
|
||||||
<view class="li" v-for="(item,index) in lists" :key="index">
|
<view class="li" v-for="(item,index) in lists" :key="index">
|
||||||
<view class="li-top">
|
<view class="li-top">
|
||||||
<text>{{item.title}}</text>
|
<text>{{item.title}}</text>
|
||||||
|
@ -60,10 +60,11 @@
|
||||||
onPullDownRefresh
|
onPullDownRefresh
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import {
|
import {
|
||||||
getFundList
|
getFundList,
|
||||||
|
getUserSingList
|
||||||
} from "@/api/address.js"
|
} from "@/api/address.js"
|
||||||
|
|
||||||
const navLists = ['', '采购款明细', '余额明细', '礼品券明细', '返还金明细']
|
const navLists = ['', '采购款明细', '余额明细', '礼品券明细', '返还金明细', '冻结券明细']
|
||||||
const tabsLst = reactive([{
|
const tabsLst = reactive([{
|
||||||
name: '全部'
|
name: '全部'
|
||||||
},
|
},
|
||||||
|
@ -84,11 +85,25 @@
|
||||||
const lists = ref([])
|
const lists = ref([])
|
||||||
let type = ref('')
|
let type = ref('')
|
||||||
const getLists = async (isPullDown = false) => {
|
const getLists = async (isPullDown = false) => {
|
||||||
let res = await getFundList({
|
if (type.value == 3 || type.value == 5) {
|
||||||
type: type.value,
|
let res = await getUserSingList({
|
||||||
mark: mark.value || ''
|
type: type.value == 3 ? 1 : 0,
|
||||||
})
|
page_no: 1,
|
||||||
lists.value = res.data.lists
|
page_size: 999,
|
||||||
|
mark: mark.value || ''
|
||||||
|
})
|
||||||
|
lists.value = res.data.lists
|
||||||
|
console.log(lists.value)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
let res = await getFundList({
|
||||||
|
type: type.value,
|
||||||
|
mark: mark.value || ''
|
||||||
|
})
|
||||||
|
lists.value = res.data.lists
|
||||||
|
}
|
||||||
|
|
||||||
if (isPullDown) uni.stopPullDownRefresh()
|
if (isPullDown) uni.stopPullDownRefresh()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,15 @@
|
||||||
<up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input>
|
<up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</up-form>
|
</up-form>
|
||||||
|
<up-form labelPosition="left" label-width="100rpx">
|
||||||
|
<up-form-item label="身份" borderBottom>
|
||||||
|
<up-radio-group v-model="Role" placement="row">
|
||||||
|
<up-radio activeColor="#20b128" label="行业会员" :name="1"
|
||||||
|
style="margin-right: 10rpx;"></up-radio>
|
||||||
|
<up-radio activeColor="#20b128" label="商户" :name="4"></up-radio>
|
||||||
|
</up-radio-group>
|
||||||
|
</up-form-item>
|
||||||
|
</up-form>
|
||||||
</view>
|
</view>
|
||||||
</up-modal>
|
</up-modal>
|
||||||
</view>
|
</view>
|
||||||
|
@ -19,8 +28,10 @@
|
||||||
<view class="lines" :class="{ actLine: currentTab == 2 }" />
|
<view class="lines" :class="{ actLine: currentTab == 2 }" />
|
||||||
</view> -->
|
</view> -->
|
||||||
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
||||||
<up-tabs :list="tabsLst" :itemStyle="{width:'33vw',paddingBottom:'20rpx'}" lineColor='#50C758'
|
<up-tabs v-if="Role==1" :list="tabsLst" :itemStyle="{width:'33vw',paddingBottom:'20rpx'}"
|
||||||
: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'
|
||||||
|
:current='currentTab' @change="tabsChange1"></up-tabs>
|
||||||
</up-sticky>
|
</up-sticky>
|
||||||
|
|
||||||
<!-- tabs0 -->
|
<!-- tabs0 -->
|
||||||
|
@ -53,7 +64,7 @@
|
||||||
suffixIcon='arrow-down'></up-input>
|
suffixIcon='arrow-down'></up-input>
|
||||||
</view>
|
</view>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
<up-form-item label="">
|
<up-form-item label="" v-if="Role==1">
|
||||||
<view @click="showPop1 = true" style="width: 100%;">
|
<view @click="showPop1 = true" style="width: 100%;">
|
||||||
<up-input style="pointer-events: none" v-model="formData.label_name" border="none"
|
<up-input style="pointer-events: none" v-model="formData.label_name" border="none"
|
||||||
prefixIcon="man-add" readonly placeholder="点击选择用户身份" :customStyle="{
|
prefixIcon="man-add" readonly placeholder="点击选择用户身份" :customStyle="{
|
||||||
|
@ -81,7 +92,7 @@
|
||||||
报备人:{{ STORE_INFO.name }}
|
报备人:{{ STORE_INFO.name }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="store-info">
|
<view class="store-info" v-if="Role==1">
|
||||||
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
|
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
|
||||||
<up-input inputAlign='center' type='digit' placeholder="请输入金额" @focus="formData.price=''"
|
<up-input inputAlign='center' type='digit' placeholder="请输入金额" @focus="formData.price=''"
|
||||||
color='#FF6B00' :placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none"
|
color='#FF6B00' :placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none"
|
||||||
|
@ -98,13 +109,13 @@
|
||||||
<view class="submit-btn" @click="submit">
|
<view class="submit-btn" @click="submit">
|
||||||
<view
|
<view
|
||||||
style='width: 710rpx;height: 100rpx;text-align: center;line-height: 100rpx;text-align: center;color: white;background-color: #33B83A;border-radius: 50rpx;font-size:40rpx ;'>
|
style='width: 710rpx;height: 100rpx;text-align: center;line-height: 100rpx;text-align: center;color: white;background-color: #33B83A;border-radius: 50rpx;font-size:40rpx ;'>
|
||||||
完成并收款
|
{{Role==1?'完成并收款':"完成" }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block v-if="currentTab==1">
|
<block v-if="currentTab==1 && Role==1">
|
||||||
<view class="card card1">
|
<view class="card card1">
|
||||||
<view class="card1-tit">
|
<view class="card1-tit">
|
||||||
行业会员追加经营资金
|
行业会员追加经营资金
|
||||||
|
@ -176,7 +187,7 @@
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
<!-- tabs2 -->
|
<!-- tabs2 -->
|
||||||
<block v-if="currentTab == 2">
|
<block v-if="currentTab == 2 &&Role==1">
|
||||||
<view class="vip-card">
|
<view class="vip-card">
|
||||||
<text>当前已开通:</text>
|
<text>当前已开通:</text>
|
||||||
<up-count-to :startVal="0" :endVal="count"></up-count-to>
|
<up-count-to :startVal="0" :endVal="count"></up-count-to>
|
||||||
|
@ -216,6 +227,56 @@
|
||||||
</uni-table>
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<block v-if="currentTab == 1 &&Role==4">
|
||||||
|
<view class="vip-card">
|
||||||
|
<text>当前已开通:</text>
|
||||||
|
<up-count-to :startVal="0" :endVal="count"></up-count-to>
|
||||||
|
<text>位{{ Role == 1 ? '行业会员' : '商户' }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="table">
|
||||||
|
<uni-table stripe emptyText="暂无更多数据" width="100%">
|
||||||
|
<!-- 表头行 -->
|
||||||
|
<uni-tr>
|
||||||
|
<!-- <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-tr>
|
||||||
|
<!-- 表格数据行 -->
|
||||||
|
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
|
||||||
|
<!-- <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.create_time }}</uni-td>
|
||||||
|
<uni-td style="font-size: 20rpx;" align="center">
|
||||||
|
<view>已开通</view>
|
||||||
|
|
||||||
|
</uni-td>
|
||||||
|
</uni-tr>
|
||||||
|
</uni-table>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 50rpx;" />
|
<view style="height: 50rpx;" />
|
||||||
|
|
||||||
|
@ -320,6 +381,15 @@
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const tabsLst2 = reactive([{
|
||||||
|
name: '开通商户'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '已开通列表'
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const tabsChange = (e) => {
|
const tabsChange = (e) => {
|
||||||
currentTab.value = e.index
|
currentTab.value = e.index
|
||||||
|
@ -329,7 +399,10 @@
|
||||||
}
|
}
|
||||||
// getLists()
|
// getLists()
|
||||||
}
|
}
|
||||||
|
const tabsChange1 = (e) => {
|
||||||
|
currentTab.value = (e.index)
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
|
||||||
const confirmStore = () => {
|
const confirmStore = () => {
|
||||||
getStoreByPhone({
|
getStoreByPhone({
|
||||||
|
@ -638,6 +711,30 @@
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const submit = async (type = 1) => {
|
const submit = async (type = 1) => {
|
||||||
|
if (Role.value == 4) {
|
||||||
|
if (!formData.real_name) return uni.$u.toast('请填写真实姓名');
|
||||||
|
if (!formData.mobile) return uni.$u.toast('请填写电话号码');
|
||||||
|
if (!formData.code) return uni.$u.toast('请输入短信验证码');
|
||||||
|
if (!formData.address) return uni.$u.toast('请选择地址');
|
||||||
|
delete formData.recharge_type
|
||||||
|
delete formData.auth_code
|
||||||
|
formData.user_ship = 4
|
||||||
|
vipRechargeApi(formData).then(res => {
|
||||||
|
resetFormData()
|
||||||
|
getLists()
|
||||||
|
currentTab.value = 1
|
||||||
|
|
||||||
|
})
|
||||||
|
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(
|
||||||
|
@ -769,13 +866,21 @@
|
||||||
where.loadingOver = false
|
where.loadingOver = false
|
||||||
where.page_no = 1
|
where.page_no = 1
|
||||||
where.page_size = 25
|
where.page_size = 25
|
||||||
let res = await rechargeListsApi({
|
if (Role.value == 1) {
|
||||||
store_id: STORE_INFO.id,
|
let res = await rechargeListsApi({
|
||||||
recharge_type: "INDUSTRYMEMBERS",
|
store_id: STORE_INFO.id,
|
||||||
page_no: 1,
|
recharge_type: "INDUSTRYMEMBERS",
|
||||||
page_size: 25
|
page_no: 1,
|
||||||
})
|
page_size: 25
|
||||||
lists.value = res.data.lists
|
})
|
||||||
|
lists.value = res.data.lists
|
||||||
|
} else {
|
||||||
|
let res = await getCreateLists({
|
||||||
|
store_id: STORE_INFO.id,
|
||||||
|
})
|
||||||
|
lists.value = res.data.lists
|
||||||
|
count.value = res.data.count
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -235,6 +235,15 @@
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"path": "asset/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "会员资产",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "balanceDetail/index",
|
"path": "balanceDetail/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -401,6 +401,7 @@
|
||||||
|
|
||||||
const addCart = (product_id, cart_num) => { //加入购物车
|
const addCart = (product_id, cart_num) => { //加入购物车
|
||||||
cartCreateApi({
|
cartCreateApi({
|
||||||
|
type: 1,
|
||||||
cart_num: cart_num,
|
cart_num: cart_num,
|
||||||
is_new: 0, // 是否直接购买0否1是
|
is_new: 0, // 是否直接购买0否1是
|
||||||
// goods_id: id,
|
// goods_id: id,
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon color="#fff"
|
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon color="#fff"
|
||||||
size="28"></up-icon>手机号快捷登录</up-button>
|
size="28"></up-icon>手机号快捷登录</up-button>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="btn">
|
<view class="btn">
|
||||||
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
|
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
|
||||||
name="account-fill" color="#fff" size="28"></up-icon>手机号快捷登录</up-button>
|
name="account-fill" color="#fff" size="28"></up-icon>真-手机号快捷登录</up-button>
|
||||||
</view> -->
|
</view>
|
||||||
<!-- <view class="btn">
|
<!-- <view class="btn">
|
||||||
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
|
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
|
||||||
size="28"></up-icon>公众号授权</up-button>
|
size="28"></up-icon>公众号授权</up-button>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view style="flex-grow: 1;overflow-y: auto;">
|
<view style="flex-grow: 1;overflow-y: auto;">
|
||||||
<view class="user-info"
|
<view class="user-info"
|
||||||
:style="{backgroundImage: userInfo.user_ship!=1?'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp)':'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/a8055202406281609236596.png)' }">
|
:style="{backgroundImage: userInfo.user_ship!=1?'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp)':'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/dbf18202406291057413355.png)' }">
|
||||||
<view class="u-card">
|
<view class="u-card">
|
||||||
<view style="display: flex;" @click="updataInfp">
|
<view style="display: flex;" @click="updataInfp">
|
||||||
<up-image :src="userInfo.avatar" mode="aspectFill" width="112rpx" height="112rpx"
|
<up-image :src="userInfo.avatar" mode="aspectFill" width="112rpx" height="112rpx"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
<view style="margin:0 20rpx;">
|
<view style="margin:0 20rpx;">
|
||||||
{{userInfo.id}}
|
{{userInfo.id}}
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view v-if="userInfo.user_ship==1"
|
||||||
style="display: flex;align-items: center;background-color: #F6EECD;padding: 4rpx 10rpx;border-radius: 20rpx;">
|
style="display: flex;align-items: center;background-color: #F6EECD;padding: 4rpx 10rpx;border-radius: 20rpx;">
|
||||||
<view style="margin-right: 10rpx;">
|
<view style="margin-right: 10rpx;">
|
||||||
<up-icon
|
<up-icon
|
||||||
|
@ -45,13 +45,21 @@
|
||||||
{{userInfo.label_name}}会员
|
{{userInfo.label_name}}会员
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="to-vip-btn" @click="navgo('/pageQuota/vipUser/index')">
|
<view class="to-vip-btn" @click="navgo('/pageQuota/vipUser/index')">
|
||||||
会员报备
|
会员报备
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="logo" v-if="userInfo.user_ship==1">
|
||||||
|
<up-image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/f361a202406291058319809.png"
|
||||||
|
width="200rpx" height="200rpx"></up-image>
|
||||||
|
|
||||||
|
</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);">
|
||||||
|
@ -79,7 +87,7 @@
|
||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')">
|
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=5')">
|
||||||
<view class="rest-item-num">{{userInfo.number ||"0.00"}}</view>
|
<view class="rest-item-num">{{userInfo.number ||"0.00"}}</view>
|
||||||
<view class="rest-item-txt">冻结券</view>
|
<view class="rest-item-txt">冻结券</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -121,6 +129,7 @@
|
||||||
|
|
||||||
<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 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>
|
||||||
|
@ -174,7 +183,7 @@
|
||||||
orderCountApi
|
orderCountApi
|
||||||
} from "@/api/order.js";
|
} from "@/api/order.js";
|
||||||
import {
|
import {
|
||||||
onShow,
|
onLoad,
|
||||||
onPullDownRefresh
|
onPullDownRefresh
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import {
|
import {
|
||||||
|
@ -289,7 +298,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onLoad(() => {
|
||||||
userInfoApi().then(res => {
|
userInfoApi().then(res => {
|
||||||
userInfo.value = res.data;
|
userInfo.value = res.data;
|
||||||
formData.avatar = res.data.avatar
|
formData.avatar = res.data.avatar
|
||||||
|
@ -320,6 +329,7 @@
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 70rpx 50rpx 0 50rpx;
|
padding: 70rpx 50rpx 0 50rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.u-card {
|
.u-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -346,10 +356,18 @@
|
||||||
height: 34rpx;
|
height: 34rpx;
|
||||||
background-color: #39BE40;
|
background-color: #39BE40;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
position: absolute;
|
||||||
|
width: 236rpx;
|
||||||
|
height: 236rpx;
|
||||||
|
right: 20rpx;
|
||||||
|
z-index: 1;
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
|
||||||
.balance {
|
.balance {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
@click="callPhone(shopInfo.phone)">
|
@click="callPhone(shopInfo.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 v-if="shopInfo.id">
|
<view v-if="shopInfo.id">
|
||||||
<view style="color: #333;">
|
<view style="color: #333;">
|
||||||
|
@ -55,10 +55,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click.stop="navgo('/multipleShop/index/index')"
|
<!-- <view @click.stop="navgo('/multipleShop/index/index')"
|
||||||
style="padding: 20rpx;background-color:#20B128;color: white;border-radius: 40rpx;flex-shrink: 0;">
|
style="padding: 20rpx;background-color:#20B128;color: white;border-radius: 40rpx;flex-shrink: 0;">
|
||||||
所有提货点
|
所有提货点
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@
|
||||||
const getDetails = () => {
|
const getDetails = () => {
|
||||||
orderDetailApi({
|
orderDetailApi({
|
||||||
order_id: datas.value.id,
|
order_id: datas.value.id,
|
||||||
...location
|
// ...location
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
datas.value = res.data;
|
datas.value = res.data;
|
||||||
options.code = datas.value.verify_code; // 生成条形码的值
|
options.code = datas.value.verify_code; // 生成条形码的值
|
||||||
|
@ -493,19 +493,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const getLocation = () => {
|
const getLocation = () => {
|
||||||
if (uni.getStorageSync('location')) {
|
// if (uni.getStorageSync('location')) {
|
||||||
location = uni.getStorageSync('location')
|
// location = uni.getStorageSync('location')
|
||||||
} else {
|
// } else {
|
||||||
uni.getLocation({
|
// uni.getLocation({
|
||||||
type: "gcj02",
|
// type: "gcj02",
|
||||||
success(res) {
|
// success(res) {
|
||||||
location.lat = res.latitude;
|
// location.lat = res.latitude;
|
||||||
location.long = res.longitude;
|
// location.long = res.longitude;
|
||||||
uni.setStorageSync('location', location)
|
// uni.setStorageSync('location', location)
|
||||||
return getDetails()
|
// return getDetails()
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
getDetails()
|
getDetails()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -522,7 +522,6 @@
|
||||||
|
|
||||||
onBackPress(() => {
|
onBackPress(() => {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
console.log("清除");
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const navgo = (url) => {
|
const navgo = (url) => {
|
||||||
|
|
|
@ -107,7 +107,16 @@
|
||||||
<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="404rpx" height="60rpx"></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>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="">
|
||||||
<!-- <view class="m-card m-address">
|
<!-- <view class="m-card m-address"> -->
|
||||||
<view class="address-info" @click="showAddress = true" v-if='orderInfo.shipping_type == 1'>
|
<!-- <view class="address-info" @click="showAddress = true">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<up-icon name="account"></up-icon>
|
<up-icon name="account"></up-icon>
|
||||||
<view class="t-name">{{ addressInfo.real_name }}</view>
|
<view class="t-name">{{ addressInfo.real_name }}</view>
|
||||||
|
@ -10,16 +10,16 @@
|
||||||
<view class="bottom u-line-2">
|
<view class="bottom u-line-2">
|
||||||
{{ addressInfo.detail }}
|
{{ addressInfo.detail }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="address-info" v-else>
|
<!-- <view class="address-info">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
{{ STORE_INFO.name }}
|
{{ STORE_INFO.name }}是的
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom u-line-2">
|
<view class="bottom u-line-2">
|
||||||
{{ STORE_INFO.detailed_address }}
|
{{ STORE_INFO.detailed_address }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="address-btn item-center">
|
<!-- <view class="address-btn item-center">
|
||||||
<view class='ship-type' style="">
|
<view class='ship-type' style="">
|
||||||
<view class="ship-type-item" :class='{ actShipItem: orderInfo.shipping_type == 2 }'
|
<view class="ship-type-item" :class='{ actShipItem: orderInfo.shipping_type == 2 }'
|
||||||
@click='orderInfo.shipping_type = 2'>
|
@click='orderInfo.shipping_type = 2'>
|
||||||
|
@ -30,8 +30,35 @@
|
||||||
配送
|
配送
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="m-card m-address" style="margin-top: 20rpx;">
|
||||||
|
<view class="address-info"
|
||||||
|
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 style="color: #333;display: flex;align-items: center;flex-shrink: 0;">
|
||||||
|
<text style="margin: 0 10rpx;color:#20B128">推荐自提点</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view style="color: #333;">
|
||||||
|
{{shop_Info.name}}
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 24rpx;color: #333;margin: 10rpx 0;">
|
||||||
|
{{shop_Info.detailed_address}}
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<text>{{shop_Info.phone}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="padding: 20rpx;background-color:#20B128;color: white;border-radius: 40rpx;flex-shrink: 0;">
|
||||||
|
当日可提
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
|
<!-- </view> -->
|
||||||
<view class="m-card m-good" v-for="(item, index) in cartList" :key="index">
|
<view class="m-card m-good" v-for="(item, index) in cartList" :key="index">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<up-image width="160rpx" height="160rpx" :src="item.imgs"></up-image>
|
<up-image width="160rpx" height="160rpx" :src="item.imgs"></up-image>
|
||||||
|
@ -79,13 +106,13 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="m-card order-remark">
|
<view class="m-card order-remark">
|
||||||
<!-- <view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<text style="margin-right: 20rpx;">是否存货</text>
|
<text style="margin-right: 20rpx;">是否存货</text>
|
||||||
<up-radio-group v-model="isCh" placement="row">
|
<up-radio-group v-model="is_storage" placement="row">
|
||||||
<up-radio activeColor="#20b128" label="是" name="1" style="margin-right: 10rpx;"></up-radio>
|
<up-radio activeColor="#20b128" label="立即提货" :name="0" style="margin-right: 10rpx;"></up-radio>
|
||||||
<up-radio activeColor="#20b128" label="否" name="0"></up-radio>
|
<up-radio activeColor="#20b128" label="全部存货" :name="1"></up-radio>
|
||||||
</up-radio-group>
|
</up-radio-group>
|
||||||
</view> -->
|
</view>
|
||||||
<view class="head-title" style="margin-top: 20rpx;">
|
<view class="head-title" style="margin-top: 20rpx;">
|
||||||
<text>订单备注</text>
|
<text>订单备注</text>
|
||||||
<text>{{formData.remark.length}}/140</text>
|
<text>{{formData.remark.length}}/140</text>
|
||||||
|
@ -201,7 +228,8 @@
|
||||||
import {
|
import {
|
||||||
userInfoApi,
|
userInfoApi,
|
||||||
addressListsApi,
|
addressListsApi,
|
||||||
merchantListApi
|
merchantListApi,
|
||||||
|
checkInventoryApi
|
||||||
} from "@/api/user.js";
|
} from "@/api/user.js";
|
||||||
import {
|
import {
|
||||||
createOrderApi
|
createOrderApi
|
||||||
|
@ -216,7 +244,7 @@
|
||||||
|
|
||||||
const cartStore = useCartStore();
|
const cartStore = useCartStore();
|
||||||
const reservation_time = ref('')
|
const reservation_time = ref('')
|
||||||
const isCh = ref(0)
|
const is_storage = ref(0)
|
||||||
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
remark: ""
|
remark: ""
|
||||||
|
@ -282,8 +310,8 @@
|
||||||
|
|
||||||
const getMerchantList = (mer_name = null) => {
|
const getMerchantList = (mer_name = null) => {
|
||||||
merchantListApi({
|
merchantListApi({
|
||||||
...myAddressInfo.value,
|
// ...myAddressInfo.value,
|
||||||
mer_name: mer_name ? mer_name : ''
|
// mer_name: mer_name ? mer_name : ''
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
merchantList.value = res.data.lists;
|
merchantList.value = res.data.lists;
|
||||||
if (mer_name === null && myAddressInfo.value.long && merchantList.value.length > 0 && !shopInfo
|
if (mer_name === null && myAddressInfo.value.long && merchantList.value.length > 0 && !shopInfo
|
||||||
|
@ -299,19 +327,19 @@
|
||||||
|
|
||||||
// getMerchantList();
|
// getMerchantList();
|
||||||
// 定位
|
// 定位
|
||||||
const LoadAddress = () => {
|
// const LoadAddress = () => {
|
||||||
uni.getLocation({
|
// uni.getLocation({
|
||||||
success: (res) => {},
|
// success: (res) => {},
|
||||||
fail: (err) => {
|
// fail: (err) => {
|
||||||
uni.$u.toast('定位失败, 请手动选择提货点!')
|
// uni.$u.toast('定位失败, 请手动选择提货点!')
|
||||||
},
|
// },
|
||||||
complete: (res) => {
|
// complete: (res) => {
|
||||||
myAddressInfo.value.long = res.longitude || "";
|
// myAddressInfo.value.long = res.longitude || "";
|
||||||
myAddressInfo.value.lat = res.latitude || "";
|
// myAddressInfo.value.lat = res.latitude || "";
|
||||||
getMerchantList();
|
// getMerchantList();
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
// LoadAddress();
|
// LoadAddress();
|
||||||
|
|
||||||
const changeShop = (e) => {
|
const changeShop = (e) => {
|
||||||
|
@ -356,21 +384,28 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 订单相关
|
// 订单相关
|
||||||
|
let location;
|
||||||
|
const shop_Info = ref({})
|
||||||
const cartList = ref([]);
|
const cartList = ref([]);
|
||||||
const orderInfo = ref({});
|
const orderInfo = ref({});
|
||||||
const checkOrder = () => {
|
const checkOrder = () => {
|
||||||
checkOrderApi({
|
checkOrderApi({
|
||||||
cart_id: cartStore.cartList,
|
cart_id: cartStore.cartList,
|
||||||
store_id: STORE_INFO.id || 0
|
store_id: STORE_INFO.id || 0,
|
||||||
|
...location
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
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 || {}
|
||||||
|
console.log(shop_Info.value)
|
||||||
if (orderInfo.value.default_delivery == 0) {
|
if (orderInfo.value.default_delivery == 0) {
|
||||||
orderInfo.value.shipping_type = 2
|
orderInfo.value.shipping_type = 2
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// const checkOrderA
|
||||||
const pay_type = ref('7');
|
const pay_type = ref('7');
|
||||||
|
|
||||||
|
|
||||||
|
@ -402,7 +437,8 @@
|
||||||
store_id: STORE_INFO.id || 0,
|
store_id: STORE_INFO.id || 0,
|
||||||
reservation_time: reservation_time.value,
|
reservation_time: reservation_time.value,
|
||||||
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
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (pay_type.value == 3 || pay_type.value == 18) {
|
if (pay_type.value == 3 || pay_type.value == 18) {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
@ -481,7 +517,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(options => {
|
onLoad(options => {
|
||||||
|
if (uni.getStorageSync('location')) {
|
||||||
|
location = JSON.parse(uni.getStorageSync('location'))
|
||||||
|
} else {
|
||||||
|
uni.getLocation({
|
||||||
|
type: "gcj02",
|
||||||
|
success(res) {
|
||||||
|
location.lat = res.latitude;
|
||||||
|
location.long = res.longitude;
|
||||||
|
uni.setStorageSync('location', JSON.stringify(location))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
checkOrder();
|
checkOrder();
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getAddressList();
|
getAddressList();
|
||||||
|
|
Loading…
Reference in New Issue