add
This commit is contained in:
parent
77d4938aee
commit
801d2cb413
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<block v-if="lists.length">
|
||||
<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>
|
||||
|
@ -22,6 +23,11 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<up-empty v-else mode="history" style="margin-top: 20vh;" text='没有更多内容了'>
|
||||
</up-empty>
|
||||
<view style="height: 200rpx;" />
|
||||
|
||||
<view class="bottom">
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
<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="1" style="margin-right: 10rpx;"></up-radio>
|
||||
<up-radio activeColor="#20b128" label="商户" :name="4"></up-radio>
|
||||
</up-radio-group>
|
||||
</up-form-item>
|
||||
|
@ -22,9 +21,9 @@
|
|||
|
||||
<view v-else>
|
||||
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
||||
<up-tabs v-if="Role==1" :list="tabsLst" :itemStyle="{width:'33vw',paddingBottom:'20rpx'}"
|
||||
lineColor='#50C758' :current='currentTab' @change="tabsChange"></up-tabs>
|
||||
<up-tabs v-else :list="tabsLst2" :itemStyle="{width:'50vw',paddingBottom:'20rpx'}" lineColor='#50C758'
|
||||
<up-tabs v-if="Role == 1" :list="tabsLst" :itemStyle="{ width: '33vw', paddingBottom: '20rpx' }" 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>
|
||||
<!-- tabs0 -->
|
||||
|
@ -52,15 +51,15 @@
|
|||
</up-form-item>
|
||||
<up-form-item label="">
|
||||
<view @click="showPop = true" style="width: 100%;">
|
||||
<up-input style="pointer-events: none" v-model="formData.address" border="none"
|
||||
prefixIcon="map" readonly placeholder="点击选择地址" :customStyle="{
|
||||
<up-input style="pointer-events: none" v-model="formData.address" border="none" prefixIcon="map"
|
||||
readonly placeholder="点击选择地址" :customStyle="{
|
||||
background: '#F3F3F3', padding: '20rpx',
|
||||
'border-radius': '30rpx'
|
||||
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"
|
||||
suffixIcon='arrow-down'></up-input>
|
||||
</view>
|
||||
</up-form-item>
|
||||
<up-form-item label="" v-if="Role==1">
|
||||
<up-form-item label="" v-if="Role == 1">
|
||||
<view @click="showPop1 = true" style="width: 100%;">
|
||||
<up-input style="pointer-events: none" v-model="formData.label_name" border="none"
|
||||
prefixIcon="man-add" readonly placeholder="点击选择用户身份" :customStyle="{
|
||||
|
@ -88,13 +87,13 @@
|
|||
点击查看礼品包内容
|
||||
</view>
|
||||
<view class="gift-pack">
|
||||
<view class="gift-pack-li" :class="index==giftIndex&&'act-gift'"
|
||||
v-for="(item,index) in rechargeList" :key="index" @click="choseGift(index)">
|
||||
<view class="gift-pack-li-top" :class="index==giftIndex &&'act-gift-top'">
|
||||
<text style="font-size: 40rpx;">{{item.money}}</text><text>元采购包</text>
|
||||
<view class="gift-pack-li" :class="index == giftIndex && 'act-gift'" v-for="(item, index) in rechargeList"
|
||||
:key="index" @click="choseGift(index)">
|
||||
<view class="gift-pack-li-top" :class="index == giftIndex && 'act-gift-top'">
|
||||
<text style="font-size: 40rpx;">{{ item.money }}</text><text>元采购包</text>
|
||||
</view>
|
||||
<view class="">
|
||||
送{{item.send}}{{item.send_string}}
|
||||
送{{ item.send }}{{ item.send_string }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -102,13 +101,13 @@
|
|||
<view class="submit-btn" @click="submit">
|
||||
<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 ;'>
|
||||
{{Role==1?'完成并收款':"完成" }}
|
||||
{{ Role == 1 ? '完成并收款' : "完成" }}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block v-if="currentTab==1 && Role==1">
|
||||
<block v-if="currentTab == 1 && Role == 1">
|
||||
<view class="card card1">
|
||||
<view class="card1-tit">
|
||||
行业会员追加经营资金
|
||||
|
@ -126,12 +125,11 @@
|
|||
<up-input v-model="formData2.real_name" disabled border="none" prefixIcon="account"
|
||||
placeholder="系统自动获取" color='grey'
|
||||
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
||||
:placeholderStyle="{ color: 'grey' }"
|
||||
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
||||
:placeholderStyle="{ color: 'grey' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="">
|
||||
<up-input style="pointer-events: none" v-model="formData2.address" border="none"
|
||||
prefixIcon="map" readonly color='grey' placeholder="系统自动获取" :customStyle="{
|
||||
<up-input style="pointer-events: none" v-model="formData2.address" border="none" prefixIcon="map"
|
||||
readonly color='grey' placeholder="系统自动获取" :customStyle="{
|
||||
background: '#F3F3F3', padding: '20rpx',
|
||||
'border-radius': '30rpx'
|
||||
}" :placeholderStyle="{ color: 'grey' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
||||
|
@ -150,14 +148,14 @@
|
|||
|
||||
<view class="store-info">
|
||||
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
|
||||
<up-input inputAlign='center' placeholder="请输入金额" @focus="formData2.price=''" color='#FF6B00'
|
||||
:placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none"
|
||||
v-model="formData2.price" type='digit' @blur='tofixedPrice(2)'></up-input>
|
||||
<up-input inputAlign='center' placeholder="请输入金额" @focus="formData2.price = ''" color='#FF6B00'
|
||||
:placeholderStyle="{ fontSize: '28rpx' }" fontSize='20px' border="none" v-model="formData2.price"
|
||||
type='digit' @blur='tofixedPrice(2)'></up-input>
|
||||
</view>
|
||||
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
|
||||
v-if="formData2.label_limit&&formData2.price<formData2.label_limit">
|
||||
v-if="formData2.label_limit && formData2.price < formData2.label_limit">
|
||||
<view class="">
|
||||
{{formData2.label_name}}会员最低金额不能低于{{formData2.label_limit}}元
|
||||
{{ formData2.label_name }}会员最低金额不能低于{{ formData2.label_limit }}元
|
||||
</view>
|
||||
<!-- <view class="">
|
||||
最高金额不能超过10000.00元
|
||||
|
@ -182,7 +180,7 @@
|
|||
|
||||
|
||||
<!-- tabs2 -->
|
||||
<block v-if="currentTab == 2 &&Role==1">
|
||||
<block v-if="currentTab == 2 && Role == 1">
|
||||
<view class="vip-card">
|
||||
<text>当前已开通:</text>
|
||||
<up-count-to :startVal="0" :endVal="count"></up-count-to>
|
||||
|
@ -207,7 +205,7 @@
|
|||
<view>
|
||||
{{ item.real_name }}
|
||||
</view>
|
||||
<view style="color: #33B83A;" @click="popPhone=item.mobile,showModal=true">
|
||||
<view style="color: #33B83A;" @click="popPhone = item.mobile, showModal = true">
|
||||
查看号码
|
||||
</view>
|
||||
</uni-td>
|
||||
|
@ -215,7 +213,7 @@
|
|||
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
|
||||
<uni-td style="font-size: 20rpx;" align="center">{{ item.ship_name }}</uni-td>
|
||||
<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 @click="upadtaStatus(item)">
|
||||
未开通,查询
|
||||
|
@ -232,7 +230,7 @@
|
|||
|
||||
|
||||
|
||||
<block v-if="currentTab == 1 &&Role==4">
|
||||
<block v-if="currentTab == 1 && Role == 4">
|
||||
<view class="vip-card">
|
||||
<text>当前已开通:</text>
|
||||
<up-count-to :startVal="0" :endVal="count"></up-count-to>
|
||||
|
@ -273,8 +271,8 @@
|
|||
:activeStyle="{ color: '#20B128' }"></up-tabs>
|
||||
<up-line style="margin-top:20rpx "></up-line>
|
||||
<view class="address-content" v-if='currentAddressIndex == 0'>
|
||||
<view class="address-li" :class='{ act: item.city_code == formData.city }'
|
||||
v-for="item in addressList.city" :key="item.city_code" @click="addressLiClick(0, item)">
|
||||
<view class="address-li" :class='{ act: item.city_code == formData.city }' v-for="item in addressList.city"
|
||||
:key="item.city_code" @click="addressLiClick(0, item)">
|
||||
<text>{{ item.city_name }}</text>
|
||||
<up-icon name="arrow-right" :color="item.city_code == formData.city ? '#20B128' : '#777777'" />
|
||||
</view>
|
||||
|
@ -297,13 +295,12 @@
|
|||
<view class="address-li" v-for="item in addressList.village" @click="addressLiClick(3, item)"
|
||||
:key="item.village_code" :class='{ act: item.village_code == formData.village }'>
|
||||
<text>{{ item.village_name }}</text>
|
||||
<up-icon name="arrow-right"
|
||||
:color="item.village_code == formData.village ? '#20B128' : '#777777'" />
|
||||
<up-icon name="arrow-right" :color="item.village_code == formData.village ? '#20B128' : '#777777'" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="address-content" v-else-if='currentAddressIndex == 4'>
|
||||
<view class="address-li" :class='{ act: item.id == formData.brigade }'
|
||||
v-for="item in addressList.brigade" :key="item.id" @click="addressLiClick(4, item)">
|
||||
<view class="address-li" :class='{ act: item.id == formData.brigade }' v-for="item in addressList.brigade"
|
||||
:key="item.id" @click="addressLiClick(4, item)">
|
||||
<text>{{ item.brigade_name }}</text>
|
||||
<up-icon name="arrow-right" :color="item.id == formData.brigade ? '#20B128' : '#777777'" />
|
||||
</view>
|
||||
|
@ -313,28 +310,27 @@
|
|||
<up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false'
|
||||
@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">
|
||||
confirmColor='#33B83A' @confirm='showModal = false' @close="showModal = false">
|
||||
<view class="slot-content">
|
||||
{{popPhone}}
|
||||
{{ popPhone }}
|
||||
</view>
|
||||
</up-modal>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from 'vue';
|
||||
import useUserStore from "@/store/user";
|
||||
import {
|
||||
} from 'vue';
|
||||
import useUserStore from "@/store/user";
|
||||
import {
|
||||
provinceListApi,
|
||||
cityListApi,
|
||||
areaListApi,
|
||||
streetListApi,
|
||||
villageListApi,
|
||||
brigadeListApi
|
||||
} from "@/api/address.js"
|
||||
import {
|
||||
} from "@/api/address.js"
|
||||
import {
|
||||
vipRechargeApi,
|
||||
getRechargeListApi,
|
||||
isUserShipApi,
|
||||
|
@ -348,60 +344,60 @@
|
|||
getCreateLists,
|
||||
getReportingSms,
|
||||
getVipInfoByPhone
|
||||
} from "@/api/user.js"
|
||||
import Push from "@/utils/push.js"
|
||||
import {
|
||||
} from "@/api/user.js"
|
||||
import Push from "@/utils/push.js"
|
||||
import {
|
||||
onPullDownRefresh,
|
||||
onLoad,
|
||||
onReachBottom
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
config
|
||||
} from "@/config/app.js"
|
||||
} from "@/config/app.js"
|
||||
|
||||
const showModal = ref(false)
|
||||
const showPop1 = ref(false)
|
||||
const Role = ref(1)
|
||||
const popPhone = ref('')
|
||||
// const range = ref({})
|
||||
const columns = ref([])
|
||||
const showModa = ref(true)
|
||||
const storePhone = ref('')
|
||||
const tabsLst = reactive([{
|
||||
const showModal = ref(false)
|
||||
const showPop1 = ref(false)
|
||||
const Role = ref(1)
|
||||
const popPhone = ref('')
|
||||
// const range = ref({})
|
||||
const columns = ref([])
|
||||
const showModa = ref(true)
|
||||
const storePhone = ref('')
|
||||
const tabsLst = reactive([{
|
||||
name: '开通行业会员'
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
name: '追加经营资金'
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
name: '已开通列表'
|
||||
},
|
||||
]);
|
||||
},
|
||||
]);
|
||||
|
||||
const tabsLst2 = reactive([{
|
||||
const tabsLst2 = reactive([{
|
||||
name: '开通商户'
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
name: '已开通列表'
|
||||
},
|
||||
]);
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
|
||||
const tabsChange = (e) => {
|
||||
const tabsChange = (e) => {
|
||||
currentTab.value = e.index
|
||||
if (e.index == 2) {
|
||||
getCount()
|
||||
getLists()
|
||||
}
|
||||
// getLists()
|
||||
}
|
||||
const tabsChange1 = (e) => {
|
||||
}
|
||||
const tabsChange1 = (e) => {
|
||||
currentTab.value = (e.index)
|
||||
getLists()
|
||||
}
|
||||
}
|
||||
|
||||
const confirmStore = () => {
|
||||
const confirmStore = () => {
|
||||
getStoreByPhone({
|
||||
phone: storePhone.value
|
||||
}).then(res => {
|
||||
|
@ -412,15 +408,15 @@
|
|||
}).catch(err => {
|
||||
uni.$u.toast('未查到店铺信息,请检查手机号码')
|
||||
})
|
||||
}
|
||||
// 用户选择的门店信息
|
||||
let STORE_INFO = reactive({
|
||||
}
|
||||
// 用户选择的门店信息
|
||||
let STORE_INFO = reactive({
|
||||
id: ""
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
// 门店手机号保留一天
|
||||
const setPhoneOneDay = () => {
|
||||
// 门店手机号保留一天
|
||||
const setPhoneOneDay = () => {
|
||||
if (uni.getStorageSync('VIP_PHONE')) return;
|
||||
const currentDate = new Date();
|
||||
const nextDay = new Date(currentDate);
|
||||
|
@ -429,8 +425,8 @@
|
|||
time: nextDay,
|
||||
phone: storePhone.value
|
||||
}));
|
||||
}
|
||||
const getPhoneOneDay = () => {
|
||||
}
|
||||
const getPhoneOneDay = () => {
|
||||
if (uni.getStorageSync('VIP_PHONE')) {
|
||||
let data = JSON.parse(uni.getStorageSync('VIP_PHONE'))
|
||||
if (new Date() > data.time) {
|
||||
|
@ -439,20 +435,20 @@
|
|||
storePhone.value = data.phone
|
||||
}
|
||||
}
|
||||
}
|
||||
// 手机保留一天结束
|
||||
}
|
||||
// 手机保留一天结束
|
||||
|
||||
// 验证码
|
||||
const vipList = reactive([1, 2, 3, 5, 6, 7, 8])
|
||||
const cutDown = ref(0)
|
||||
const flag = ref(true)
|
||||
const code = ref('')
|
||||
const checkPhone = (phone) => {
|
||||
// 验证码
|
||||
const vipList = reactive([1, 2, 3, 5, 6, 7, 8])
|
||||
const cutDown = ref(0)
|
||||
const flag = ref(true)
|
||||
const code = ref('')
|
||||
const checkPhone = (phone) => {
|
||||
const regex = /^1[3-9]\d{9}$/;
|
||||
return regex.test(phone) ? true : false
|
||||
}
|
||||
}
|
||||
|
||||
const getCode = async () => {
|
||||
const getCode = async () => {
|
||||
if (!checkPhone(formData.mobile)) return uni.$u.toast('请输入正确的手机号')
|
||||
await getReportingSms({
|
||||
account: formData.mobile
|
||||
|
@ -466,12 +462,12 @@
|
|||
clearInterval(timer);
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
// 验证码结束
|
||||
}
|
||||
// 验证码结束
|
||||
|
||||
|
||||
const currentTab = ref(0)
|
||||
const formData = reactive({
|
||||
const currentTab = ref(0)
|
||||
const formData = reactive({
|
||||
store_id: STORE_INFO.id,
|
||||
mobile: "",
|
||||
province: 510000,
|
||||
|
@ -504,10 +500,10 @@
|
|||
// user_ship: '1',
|
||||
// price: 0.02,
|
||||
// code: '12'
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
const formData2 = reactive({
|
||||
const formData2 = reactive({
|
||||
store_id: STORE_INFO.id,
|
||||
mobile: "",
|
||||
province: 510000,
|
||||
|
@ -524,10 +520,10 @@
|
|||
user_ship: '',
|
||||
brigade: "",
|
||||
price: "",
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
const getFormData2 = (data) => {
|
||||
const getFormData2 = (data) => {
|
||||
formData2.city = data.address_info?.city
|
||||
formData2.area = data.address_info?.area
|
||||
formData2.province = data.address_info?.province
|
||||
|
@ -544,10 +540,10 @@
|
|||
formData2.label_limit = item.limit
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const phoneChnge = async (type) => {
|
||||
const phoneChnge = async (type) => {
|
||||
// typewhite 1 行业会员 2 经营资金
|
||||
if (type == 1) {
|
||||
if (!checkPhone(formData.mobile)) return
|
||||
|
@ -567,7 +563,7 @@
|
|||
return uni.$u.toast('该用户已是会员,无法进行商户报备')
|
||||
}
|
||||
|
||||
} catch (error) {}
|
||||
} catch (error) { }
|
||||
} else {
|
||||
if (formData2.mobile.length == 0) resetFormData();
|
||||
if (!checkPhone(formData2.mobile)) return
|
||||
|
@ -595,10 +591,10 @@
|
|||
uni.$u.toast('查询失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const resetFormData = () => {
|
||||
const resetFormData = () => {
|
||||
for (let key in formData) {
|
||||
(key != 'price') && (formData[key] = '')
|
||||
}
|
||||
|
@ -612,38 +608,38 @@
|
|||
formData2.province = 510000
|
||||
cutDown.value = 0
|
||||
currentAddressIndex.value = 0
|
||||
}
|
||||
}
|
||||
|
||||
const conformRole = (e) => {
|
||||
const conformRole = (e) => {
|
||||
formData.label_name = e.value[0].title
|
||||
formData.label_id = e.value[0].id
|
||||
showPop1.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 地址选择
|
||||
const showPop = ref(false)
|
||||
const currentAddressIndex = ref(0)
|
||||
const currentAddressList = () => {
|
||||
// 地址选择
|
||||
const showPop = ref(false)
|
||||
const currentAddressIndex = ref(0)
|
||||
const currentAddressList = () => {
|
||||
if (!formData.city) return [0, 'city'];
|
||||
else if (formData.area) return [1, 'area'];
|
||||
else if (formData.street) return [2, 'street'];
|
||||
else if (formData.village) return [3, 'village'];
|
||||
else if (formData.brigade) return [4, 'brigade'];
|
||||
}
|
||||
}
|
||||
|
||||
const addressTbasChange = (e) => {
|
||||
const addressTbasChange = (e) => {
|
||||
currentAddressIndex.value = e.index
|
||||
}
|
||||
}
|
||||
|
||||
const addressList = reactive({
|
||||
const addressList = reactive({
|
||||
city: [],
|
||||
area: [],
|
||||
street: [],
|
||||
village: [],
|
||||
brigade: []
|
||||
})
|
||||
const addressLiClick = async (i, item) => {
|
||||
})
|
||||
const addressLiClick = async (i, item) => {
|
||||
if (i == 0) {
|
||||
formData.city = item.city_code
|
||||
tabsList[0].name = item.city_name
|
||||
|
@ -688,14 +684,14 @@
|
|||
formData.address = tabsList[0].name + tabsList[1].name + tabsList[2].name + tabsList[3].name + tabsList[4]
|
||||
.name
|
||||
return currentAddressIndex.value++
|
||||
}
|
||||
const getCityList = async () => {
|
||||
}
|
||||
const getCityList = async () => {
|
||||
let res = await cityListApi({
|
||||
province_code: formData.province
|
||||
})
|
||||
addressList.city = res.data
|
||||
}
|
||||
const tabsList = reactive(
|
||||
}
|
||||
const tabsList = reactive(
|
||||
[{
|
||||
name: "请选择"
|
||||
},
|
||||
|
@ -717,48 +713,48 @@
|
|||
},
|
||||
]);
|
||||
|
||||
let timerInvol = null
|
||||
let paySuccess;
|
||||
// 开起一个scoket监听用户知否支付成功
|
||||
const userInfo = useUserStore().userInfo;
|
||||
const connection = new Push({
|
||||
let timerInvol = null
|
||||
let paySuccess;
|
||||
// 开起一个scoket监听用户知否支付成功
|
||||
const userInfo = useUserStore().userInfo;
|
||||
const connection = new Push({
|
||||
url: config.WSS_URL, // websocket地址
|
||||
app_key: '2ce3ce22329517213caa7dad261f5695',
|
||||
});
|
||||
const user_channel = connection.subscribe(`wechat_mmp_${userInfo.id}`);
|
||||
user_channel.on('message', function(data) {
|
||||
});
|
||||
const user_channel = connection.subscribe(`wechat_mmp_${userInfo.id}`);
|
||||
user_channel.on('message', function (data) {
|
||||
try {
|
||||
paySuccess = true
|
||||
uni.hideLoading();
|
||||
clearTimeout(timerInvol);
|
||||
paySuccessToTabs2()
|
||||
} catch (error) {}
|
||||
});
|
||||
// 结束
|
||||
} catch (error) { }
|
||||
});
|
||||
// 结束
|
||||
|
||||
const navgo = (url) => {
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 选择采购包
|
||||
const giftIndex = ref(0)
|
||||
const rechargeList = ref([])
|
||||
const getRechargeList = async () => {
|
||||
// 选择采购包
|
||||
const giftIndex = ref(0)
|
||||
const rechargeList = ref([])
|
||||
const getRechargeList = async () => {
|
||||
let res = await getRechargeListApi()
|
||||
rechargeList.value = res.data
|
||||
formData.price = rechargeList.value[0].money
|
||||
}
|
||||
}
|
||||
|
||||
const choseGift = (index) => {
|
||||
const choseGift = (index) => {
|
||||
giftIndex.value = index
|
||||
formData.price = rechargeList.value[index].money
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 提交
|
||||
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('请填写电话号码');
|
||||
|
@ -794,7 +790,7 @@
|
|||
// })
|
||||
// return
|
||||
uni.scanCode({
|
||||
success: function(res) {
|
||||
success: function (res) {
|
||||
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
|
||||
uni.showLoading({
|
||||
title: '支付中...'
|
||||
|
@ -843,7 +839,7 @@
|
|||
// brigade: formData.brigade
|
||||
// })
|
||||
uni.scanCode({
|
||||
success: function(res) {
|
||||
success: function (res) {
|
||||
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
|
||||
uni.showLoading({
|
||||
title: '支付中...'
|
||||
|
@ -862,11 +858,11 @@
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const rePay = (item) => {
|
||||
const rePay = (item) => {
|
||||
uni.scanCode({
|
||||
success: function(res) {
|
||||
success: function (res) {
|
||||
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
|
||||
uni.showLoading({
|
||||
title: '等待用户支付'
|
||||
|
@ -884,14 +880,14 @@
|
|||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const tofixedPrice = (type = 1) => {
|
||||
const tofixedPrice = (type = 1) => {
|
||||
if (type == 2) return formData2.price = (+formData2.price).toFixed(2)
|
||||
}
|
||||
}
|
||||
|
||||
// 支付成功后清除formData并且切换tabs2
|
||||
const paySuccessToTabs2 = () => {
|
||||
// 支付成功后清除formData并且切换tabs2
|
||||
const paySuccessToTabs2 = () => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
|
@ -905,27 +901,27 @@
|
|||
}, 500); // 延迟1秒执行
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 邀请用户数
|
||||
let where = {
|
||||
// 邀请用户数
|
||||
let where = {
|
||||
page_no: 1,
|
||||
page_size: 25,
|
||||
loadingOver: false
|
||||
}
|
||||
}
|
||||
|
||||
const count = ref(0)
|
||||
const getCount = async () => {
|
||||
const count = ref(0)
|
||||
const getCount = async () => {
|
||||
if (Role.value == 4) return;
|
||||
let res = await rechargeCountApi({
|
||||
store_id: STORE_INFO.id
|
||||
})
|
||||
count.value = res.data.count
|
||||
}
|
||||
}
|
||||
|
||||
// 邀请列表
|
||||
const lists = ref([])
|
||||
const getLists = async () => {
|
||||
// 邀请列表
|
||||
const lists = ref([])
|
||||
const getLists = async () => {
|
||||
where.loadingOver = false
|
||||
where.page_no = 1
|
||||
where.page_size = 25
|
||||
|
@ -945,10 +941,10 @@
|
|||
count.value = res.data.count
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const upadtaStatus = (item) => {
|
||||
const upadtaStatus = (item) => {
|
||||
updataOrderApi({
|
||||
order_no: item.order_id,
|
||||
recharge: 1
|
||||
|
@ -957,27 +953,27 @@
|
|||
getLists()
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
onLoad(() => {
|
||||
getUserShip().then(res => {
|
||||
columns.value = [res.data.lists]
|
||||
})
|
||||
getPhoneOneDay()
|
||||
getCityList()
|
||||
getRechargeList()
|
||||
})
|
||||
})
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
onPullDownRefresh(() => {
|
||||
getCount()
|
||||
getLists()
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh()
|
||||
}, 1000)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
onReachBottom(async () => {
|
||||
onReachBottom(async () => {
|
||||
if (where.loadingOver) return;
|
||||
where.page_no++;
|
||||
if (Role.value == 1) {
|
||||
|
@ -1000,11 +996,11 @@
|
|||
}
|
||||
lists.value.push(...res.data.lists)
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.tabs {
|
||||
.tabs {
|
||||
background-color: #fff;
|
||||
width: 100vw;
|
||||
box-sizing: border-box;
|
||||
|
@ -1034,17 +1030,17 @@
|
|||
.actLine {
|
||||
left: calc(75vw - 35rpx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
.card {
|
||||
width: 710rpx;
|
||||
margin: 20rpx auto;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card1 {
|
||||
.card1 {
|
||||
padding: 30rpx;
|
||||
|
||||
.card1-tit {
|
||||
|
@ -1060,9 +1056,9 @@
|
|||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
.submit-btn {
|
||||
/* height: 200rpx; */
|
||||
position: fixed;
|
||||
bottom: 50rpx;
|
||||
|
@ -1070,10 +1066,10 @@
|
|||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.vip-card {
|
||||
.vip-card {
|
||||
width: 690rpx;
|
||||
height: 270rpx;
|
||||
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/4a92b202406162207212332.png');
|
||||
|
@ -1092,17 +1088,17 @@
|
|||
color: #7B5232;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
.table {
|
||||
width: 710rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.address-content {
|
||||
.address-content {
|
||||
padding: 20rpx;
|
||||
height: 60vh;
|
||||
overflow-y: auto;
|
||||
|
@ -1119,30 +1115,30 @@
|
|||
.act {
|
||||
color: #20B128;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.uni-table-th {
|
||||
.uni-table-th {
|
||||
padding: 10rpx 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-table-td {
|
||||
.uni-table-td {
|
||||
padding: 10rpx 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.slot-content {
|
||||
.slot-content {
|
||||
/* padding-bottom: 50rpx; */
|
||||
}
|
||||
}
|
||||
|
||||
.code-btn {
|
||||
.code-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
.btn-text {
|
||||
color: #20B128;
|
||||
}
|
||||
}
|
||||
|
||||
.link {
|
||||
.link {
|
||||
padding-left: 20rpx;
|
||||
color: #2F6BF2;
|
||||
font-size: 28rpx;
|
||||
|
@ -1151,9 +1147,9 @@
|
|||
text-decoration: underline;
|
||||
text-underline-offset: 10rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.link::after {
|
||||
.link::after {
|
||||
content: '';
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
|
@ -1163,9 +1159,9 @@
|
|||
transform: translateY(-50%);
|
||||
border-radius: 12rpx;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.gift-pack {
|
||||
.gift-pack {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
@ -1200,5 +1196,5 @@
|
|||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -116,8 +116,8 @@
|
|||
|
||||
<view class="card">
|
||||
<up-cell-group>
|
||||
<!-- <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 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/setPayPassword/index"></up-cell>
|
||||
</up-cell-group>
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<view class="row" v-if="[4,5,6].includes(userInfo.user_ship)" style="color: red;">
|
||||
<view>优惠减免</view>
|
||||
<view>
|
||||
<text>-¥</text>{{ c_price(orderInfo.activity_price, 0) }}<text>.{{ c_price(orderInfo.activity_price, 1) }}</text>
|
||||
<text>-¥</text>{{ c_price(orderInfo.frozen_money, 0) }}<text>.{{ c_price(orderInfo.frozen_money, 1) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row" v-if="userInfo.user_ship==1 ">
|
||||
|
@ -110,13 +110,13 @@
|
|||
</view>
|
||||
|
||||
<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>
|
||||
<up-radio-group v-model="is_storage" placement="row">
|
||||
<up-radio activeColor="#20b128" label="立即提货" :name="0" style="margin-right: 10rpx;"></up-radio>
|
||||
<up-radio activeColor="#20b128" label="全部存货" :name="1"></up-radio>
|
||||
</up-radio-group>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="head-title" style="margin-top: 20rpx;">
|
||||
<text>订单备注</text>
|
||||
<text>{{formData.remark.length}}/140</text>
|
||||
|
|
Loading…
Reference in New Issue