Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
|
76daf934b1 | |
|
3bf955d804 | |
|
ecf2da62cf | |
|
ec33cc6119 | |
|
c899d8f472 | |
|
10664005c9 | |
|
b115621925 | |
|
4dfa00fa82 |
|
@ -21,12 +21,7 @@ export const cartListApi = (data) => {
|
||||||
noAuth: true
|
noAuth: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//购物车-批发列表
|
|
||||||
export const cartWholesaleListApi = (data) => {
|
|
||||||
return request.get('/order/cart/wholesale_lists', data, {
|
|
||||||
noAuth: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//购物车-常买记录
|
//购物车-常买记录
|
||||||
export const frequentlyPurchaseApi = (data) => {
|
export const frequentlyPurchaseApi = (data) => {
|
||||||
return request.get('/order/order/frequently_purchase', data);
|
return request.get('/order/order/frequently_purchase', data);
|
||||||
|
|
15
api/good.js
15
api/good.js
|
@ -7,18 +7,3 @@ export const goodListApi = (data) => {
|
||||||
export const goodClassListApi = (data) => {
|
export const goodClassListApi = (data) => {
|
||||||
return request.get('/cate/cate/lists', data);
|
return request.get('/cate/cate/lists', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const storeProductListApi = (data) => {
|
|
||||||
return request.get('/product/product/store_lists', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批发商品列表
|
|
||||||
*/
|
|
||||||
export const storeProductWholesaleListApi = (data) => {
|
|
||||||
return request.get('/product/product/wholesale_lists', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const BranchProductListsApi = (data) => {
|
|
||||||
return request.get('/branch_product/BranchProduct/lists', data);
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,10 +9,6 @@ export const createOrderApi = (data) => {
|
||||||
export const orderListApi = (data) => {
|
export const orderListApi = (data) => {
|
||||||
return request.get('/order/order/order_list', data);
|
return request.get('/order/order/order_list', data);
|
||||||
}
|
}
|
||||||
//门店订单列表
|
|
||||||
export const storeOrderListApi = (data) => {
|
|
||||||
return request.get('/order/order/store_order_list', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
//订单详情
|
//订单详情
|
||||||
export const orderDetailApi = (data) => {
|
export const orderDetailApi = (data) => {
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
import request from '@/utils/request';
|
|
||||||
|
|
||||||
export const purchaseProductOfferLists = (data) => {
|
|
||||||
return request.get('/purchase_product_offer/purchaseproductoffer/lists', data);
|
|
||||||
}
|
|
||||||
//报价单提交
|
|
||||||
export const purchaseProductOfferUpdate = (data) => {
|
|
||||||
return request.post('/purchase_product_offer/purchaseproductoffer/offer_update', data);
|
|
||||||
}
|
|
||||||
export const purchaseProductOfferOutboundFloatingLv = (data) => {
|
|
||||||
return request.get('/purchase_product_offer/purchaseproductoffer/outbound_floating_lv', data);
|
|
||||||
}
|
|
||||||
export const supplierListApi = (data) => {
|
|
||||||
return request.get('/purchase_product_offer/purchaseproductoffer/supplier', data);
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import request from '@/utils/request';
|
|
||||||
|
|
||||||
export const menuList = (data) => {
|
|
||||||
return request.get('/store/store/menu_list', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const store_statistics = (data) => {
|
|
||||||
return request.get('/store/store/store_statistics', data);
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import request from '@/utils/request';
|
|
||||||
|
|
||||||
export const StoreOrderCartInfoLists = (data) => {
|
|
||||||
return request.get('/store_order_cart_info/StoreOrderCartInfo/lists', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const StoreOrderCartInfoGroupLists = (data) => {
|
|
||||||
return request.get('/store_order_cart_info/StoreOrderCartInfo/group_lists', data);
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
import request from '@/utils/request';
|
|
||||||
|
|
||||||
export const SystemStoreStorageLists = (data) => {
|
|
||||||
return request.get('/system_store_storage/SystemStoreStorage/lists', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const SystemStoreStorageGroupLists = (data) => {
|
|
||||||
return request.get('/system_store_storage/SystemStoreStorage/group_lists', data);
|
|
||||||
}
|
|
||||||
// 确认入库
|
|
||||||
export const SystemStoreStorageWarehousingAdd = (data) => {
|
|
||||||
return request.post('/system_store_storage/SystemStoreStorage/warehousing_add', data);
|
|
||||||
}
|
|
25
api/user.js
25
api/user.js
|
@ -166,28 +166,3 @@ export const isUserShipApi = (data) => {
|
||||||
export const getRechargeListApi = (data) => {
|
export const getRechargeListApi = (data) => {
|
||||||
return request.get('/user/UserRecharge/recharge_list', data);
|
return request.get('/user/UserRecharge/recharge_list', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 提现信息
|
|
||||||
*/
|
|
||||||
export const getCashInfoApi = (data) => {
|
|
||||||
return request.get('/user/User/cash_info', data);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 提交提现申请
|
|
||||||
*/
|
|
||||||
export const CashApplicationApi = (data) => {
|
|
||||||
return request.post('/user/User/cash_application', data);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 提现申请记录
|
|
||||||
*/
|
|
||||||
export const getCashRecordApi = (data) => {
|
|
||||||
return request.get('/user/User/cash_record', data);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 提交身份证
|
|
||||||
*/
|
|
||||||
export const UpdateIdCardApi = (data) => {
|
|
||||||
return request.post('/user/User/update_id_card', data);
|
|
||||||
}
|
|
|
@ -14,8 +14,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view>商品单位</view>
|
<view>商品单位</view>
|
||||||
<view >{{ datas.unit_name }}
|
<view>{{ datas.unit_name }}</view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view>商品价格</view>
|
<view>商品价格</view>
|
||||||
|
@ -38,19 +37,7 @@
|
||||||
<view v-if="datas.is_bulk" class="row" style="height: 100rpx;">
|
<view v-if="datas.is_bulk" class="row" style="height: 100rpx;">
|
||||||
<view>购买重量<text style="color: #F55726;">*</text></view>
|
<view>购买重量<text style="color: #F55726;">*</text></view>
|
||||||
<view style="justify-content: end;">
|
<view style="justify-content: end;">
|
||||||
<up-input
|
<up-number-box :min="0" v-model="datas.cart_num" @change="valChange"></up-number-box>
|
||||||
type="digit"
|
|
||||||
placeholder="请输入重量"
|
|
||||||
border="surround"
|
|
||||||
v-model="datas.cart_num"
|
|
||||||
@change="valChange"
|
|
||||||
style="width: 100rpx;"
|
|
||||||
>
|
|
||||||
<template #suffix>
|
|
||||||
<span>{{ datas.unit_name }}</span>
|
|
||||||
</template>
|
|
||||||
</up-input>
|
|
||||||
<!-- <up-number-box :min="0.1" :step="0.1" v-model="datas.cart_num" @change="valChange"></up-number-box> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="row" style="height: 100rpx;">
|
<view v-else class="row" style="height: 100rpx;">
|
||||||
|
@ -91,7 +78,7 @@
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const valChange = (e) => {
|
const valChange = () => {
|
||||||
uni.vibrateShort();
|
uni.vibrateShort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,11 +87,8 @@
|
||||||
});
|
});
|
||||||
const setData = (e) => {
|
const setData = (e) => {
|
||||||
datas.value = e;
|
datas.value = e;
|
||||||
if (Number(e.batch) > 0) {
|
if (Number(e.batch) > 0) datas.value.cart_num = e.batch;
|
||||||
datas.value.cart_num = e.batch;
|
else datas.value.cart_num = 1;
|
||||||
} else {
|
|
||||||
datas.value.cart_num = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,11 +114,6 @@
|
||||||
let sell = +datas.value[props.priceKey.off_activity == 1 ? props.priceKey.price : props
|
let sell = +datas.value[props.priceKey.off_activity == 1 ? props.priceKey.price : props
|
||||||
.priceKey
|
.priceKey
|
||||||
.op_price];
|
.op_price];
|
||||||
if (!sell) {
|
|
||||||
sell = datas.value.price
|
|
||||||
num = datas.value.cart_num
|
|
||||||
}
|
|
||||||
|
|
||||||
return Number(num * sell * 100 / 100).toFixed(2)
|
return Number(num * sell * 100 / 100).toFixed(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -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.7: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:
|
||||||
|
@ -33,7 +33,6 @@ let config = {
|
||||||
WSS_URL: WSS_URL,
|
WSS_URL: WSS_URL,
|
||||||
HEADER: {
|
HEADER: {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
'accept':'json',
|
|
||||||
//#ifdef MP
|
//#ifdef MP
|
||||||
'Form-type': 'routine',
|
'Form-type': 'routine',
|
||||||
//#endif
|
//#endif
|
||||||
|
|
|
@ -1,372 +0,0 @@
|
||||||
<template>
|
|
||||||
<view>
|
|
||||||
<up-subsection :list="menu_list" :current="0" @change="sectionChange"></up-subsection>
|
|
||||||
<view class="content">
|
|
||||||
<up-transition :show="true" mode="slide-left">
|
|
||||||
<view v-if="goodsList1.length>0">
|
|
||||||
<view class="card" v-for="(item,index) in goodsList1" :key='index'>
|
|
||||||
<view class="head">
|
|
||||||
<!-- <text> {{orer_sn}}</text> -->
|
|
||||||
<!-- <text style="color: #989898;">{{time}}</text> -->
|
|
||||||
</view>
|
|
||||||
<view class="card-content">
|
|
||||||
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
|
||||||
<image style="width: 152rpx;height: 152rpx;" :src="item.image" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="card-content-r">
|
|
||||||
<view class="title ellipsis">
|
|
||||||
编号:{{item.order_id}}|{{item.store_name}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
单位:{{item.unit_name}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
规格:{{item.store_info}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
备注:{{item.mark}}
|
|
||||||
</view>
|
|
||||||
<view style="color: red;">
|
|
||||||
需求量: {{item.need_num}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="card-footer">
|
|
||||||
<up-button size="small" type="primary" shape="circle" @click="cancleOrder(item)"
|
|
||||||
v-if="item.buyer_confirm==0">确认已采购</up-button>
|
|
||||||
<up-button size="small" type="success" shape="circle" v-else @click="cancleOrder(item)"
|
|
||||||
>修改采购信息</up-button>
|
|
||||||
</view>
|
|
||||||
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
|
||||||
</up-empty>
|
|
||||||
</up-transition>
|
|
||||||
<up-modal :show="show" title="采购确认" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
|
|
||||||
<up-form labelPosition="left">
|
|
||||||
<up-form-item label="供应商" labelWidth='auto'>
|
|
||||||
<up-input @click="showSupplier = true">
|
|
||||||
<template #suffix>
|
|
||||||
<span>{{supplierText}}</span>
|
|
||||||
</template>
|
|
||||||
</up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="名称">
|
|
||||||
<up-input v-model="formData.store_name" border="none" disabled=""></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="数量">
|
|
||||||
<up-input v-model="formData.buyer_nums" @change='changeInputPrice'> <template #suffix>
|
|
||||||
<span>{{formData.unit_name}}</span>
|
|
||||||
</template></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="单价">
|
|
||||||
<up-input v-model="formData.purchase" @change='changeInputPrice'></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="总价">
|
|
||||||
<up-input v-model="formData.total_price"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="付款方式" labelWidth='auto'>
|
|
||||||
<up-radio-group v-model="radio_value">
|
|
||||||
<up-radio v-for="(item, index) in radiolist1" :key="index" :label="item.name"
|
|
||||||
:name="item.name" @change="radioChange"></up-radio>
|
|
||||||
</up-radio-group>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="包装">
|
|
||||||
<up-input v-model="formData.package"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="规格">
|
|
||||||
<up-input v-model="formData.store_info"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="型号">
|
|
||||||
<up-input v-model="formData.marques"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="售后">
|
|
||||||
<up-input v-model="formData.after_sales"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
</up-form>
|
|
||||||
</up-modal>
|
|
||||||
<up-picker :show="showSupplier" :columns="supplierList" keyName="mer_name" @confirm="supplierConfirm"
|
|
||||||
@cancel="showSupplier = false"></up-picker>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
reactive,
|
|
||||||
} from "vue"
|
|
||||||
import {
|
|
||||||
supplierListApi,
|
|
||||||
purchaseProductOfferLists,
|
|
||||||
purchaseProductOfferUpdate,
|
|
||||||
purchaseProductOfferOutboundFloatingLv
|
|
||||||
} from "@/api/purchase_product_offer.js"
|
|
||||||
const menu_list = ref(['未采购', '已采购']);
|
|
||||||
|
|
||||||
const test2 = () => {
|
|
||||||
console.log("点解")
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const show = ref(false)
|
|
||||||
const showSupplier = ref(false)
|
|
||||||
const supplierText = ref('')
|
|
||||||
const pickerText = ref('')
|
|
||||||
const picker_price = ref(0)
|
|
||||||
const pickerShow = ref(false)
|
|
||||||
const formData = ref({
|
|
||||||
id: '',
|
|
||||||
bhoid: '',
|
|
||||||
supplier_id: '',
|
|
||||||
purchase: '',
|
|
||||||
total_price: '',
|
|
||||||
buyer_nums: 0,
|
|
||||||
package: '',
|
|
||||||
store_info: '',
|
|
||||||
marques: '',
|
|
||||||
after_sales: '',
|
|
||||||
pay_type: 1
|
|
||||||
})
|
|
||||||
// tabsindex
|
|
||||||
const radiolist1=ref([{name:'赊账', value: 1},{name:'现金', value: 2}])
|
|
||||||
const radio_value=ref('赊账')
|
|
||||||
const tabIndex = ref(1)
|
|
||||||
const {
|
|
||||||
windowWidth
|
|
||||||
} = uni.getSystemInfoSync();
|
|
||||||
const tabsLeft = ref(((windowWidth / 2) - 26) / 2)
|
|
||||||
const tabsRight = ref(tabsLeft.value + (windowWidth / 2))
|
|
||||||
// tabsindex结束
|
|
||||||
|
|
||||||
const priceBlur = (index, goodsList) => {
|
|
||||||
goodsList[index].price = Number(goodsList[index].price).toFixed(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 列表
|
|
||||||
const showGoods = ref(false)
|
|
||||||
const showGoods1 = ref(false)
|
|
||||||
const goodsList = ref([])
|
|
||||||
const goodsList1 = ref([])
|
|
||||||
const where = ref({
|
|
||||||
buyer_confirm: 0
|
|
||||||
})
|
|
||||||
const getGoodsList = async () => {
|
|
||||||
let res = await purchaseProductOfferLists(where.value)
|
|
||||||
goodsList1.value = res.data.lists
|
|
||||||
}
|
|
||||||
const supplierList = ref([])
|
|
||||||
const getSupplierList = () => {
|
|
||||||
supplierListApi().then(res => {
|
|
||||||
supplierList.value = [res.data.lists]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const supplierConfirm = (e) => {
|
|
||||||
showSupplier.value = false
|
|
||||||
supplierText.value = e.value[0].mer_name
|
|
||||||
formData.value.supplier_id = e.value[0].id
|
|
||||||
}
|
|
||||||
const cancleOrder = (item) => {
|
|
||||||
columns.value[0].forEach(e => {
|
|
||||||
if (e['name_b'] == item['category_name']) {
|
|
||||||
pickerText.value = e['name']
|
|
||||||
picker_price.value = e['value']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
show.value = true
|
|
||||||
formData.value.store_name = item['store_name']
|
|
||||||
formData.value.id = item['id']
|
|
||||||
formData.value.bhoid = item.order_id
|
|
||||||
formData.value.buyer_nums = item['need_num']
|
|
||||||
formData.value.product_id = item['product_id']
|
|
||||||
formData.value.unit_name = item['unit_name']
|
|
||||||
formData.value.package = item.package
|
|
||||||
formData.value.store_info = item.store_info
|
|
||||||
formData.value.marques = item.marques
|
|
||||||
formData.value.after_sales = item.after_sales
|
|
||||||
if (item.buyer_confirm == 1) {
|
|
||||||
formData.value.purchase = item.price
|
|
||||||
formData.value.buyer_nums = item.buyer_nums
|
|
||||||
formData.value.total_price = item.total_price
|
|
||||||
formData.value.supplier_id = item.supplier_id
|
|
||||||
formData.value.pay_type = item.pay_type
|
|
||||||
supplierText.value = item.supplier_name
|
|
||||||
if (item.pay_type == 1) {
|
|
||||||
radio_value.value = '赊账'
|
|
||||||
} else {
|
|
||||||
radio_value.value = '现金'
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
formData.value.purchase = ''
|
|
||||||
formData.value.total_price =
|
|
||||||
formData.value.supplier_id = ''
|
|
||||||
formData.value.pay_type = 1
|
|
||||||
supplierText.value = ''
|
|
||||||
radio_value.value = '赊账'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const offerUpdate = () => {
|
|
||||||
purchaseProductOfferUpdate(formData.value).then(res => {
|
|
||||||
uni.$u.toast(res.msg);
|
|
||||||
show.value = false
|
|
||||||
getGoodsList()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const changeInputPrice = (e) => {
|
|
||||||
if (formData.value.buyer_nums > 0 && formData.value.purchase > 0) {
|
|
||||||
formData.value.total_price = (formData.value.buyer_nums * formData.value.purchase).toFixed(2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const sectionChange = (index) => {
|
|
||||||
where.value.buyer_confirm = index
|
|
||||||
goodsList1.value = []
|
|
||||||
getGoodsList()
|
|
||||||
}
|
|
||||||
const columns = ref([]);
|
|
||||||
const pickerConfirm = (e) => {
|
|
||||||
pickerShow.value = false
|
|
||||||
let outbound_price = (formData.value.price * e.value[0].value)
|
|
||||||
pickerText.value = e.value[0].name
|
|
||||||
formData.value.outbound_price = (parseInt(formData.value.price) + outbound_price).toFixed(2)
|
|
||||||
}
|
|
||||||
const OutboundFloatingLv = () => {
|
|
||||||
purchaseProductOfferOutboundFloatingLv().then(res => {
|
|
||||||
columns.value = res.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const radioChange=(e)=>{
|
|
||||||
if(e=='赊账'){
|
|
||||||
formData.value.pay_type = 1
|
|
||||||
}else{
|
|
||||||
formData.value.pay_type = 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
getGoodsList()
|
|
||||||
OutboundFloatingLv()
|
|
||||||
getSupplierList()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.head {
|
|
||||||
padding: 20rpx;
|
|
||||||
background-color: white;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.act {
|
|
||||||
color: #20B128;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line {
|
|
||||||
width: 26px;
|
|
||||||
height: 5rpx;
|
|
||||||
background-color: #20B128;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
position: absolute;
|
|
||||||
transition: 300ms;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 20rpx;
|
|
||||||
padding-bottom: 150rpx;
|
|
||||||
|
|
||||||
.card {
|
|
||||||
width: 710rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: white;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-content {
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.card-content-l {
|
|
||||||
margin-right: 20rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.status {
|
|
||||||
width: 152rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
background-color: rgba(0, 0, 0, .3);
|
|
||||||
text-align: center;
|
|
||||||
color: white;
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 40rpx;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-content-r {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
width: 500rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.need {
|
|
||||||
color: #777777;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ipt {
|
|
||||||
display: flex;
|
|
||||||
height: 56rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-png {
|
|
||||||
position: absolute;
|
|
||||||
right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-footer {
|
|
||||||
margin-top: 30rpx;
|
|
||||||
text-align: right;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #060606;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.submit-btn {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 50rpx;
|
|
||||||
width: 710rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail {
|
|
||||||
width: 88rpx;
|
|
||||||
height: 88rpx;
|
|
||||||
border-radius: 88rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 88rpx;
|
|
||||||
background-color: #50C758;
|
|
||||||
color: white;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 300rpx;
|
|
||||||
right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ellipsis {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,813 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="" v-if="!STORE_INFO.id">
|
|
||||||
<up-modal :show="showModa" title="登录门店" @confirm="confirmStore" confirmColor='#20B128'>
|
|
||||||
<view class="slot-content">
|
|
||||||
<up-form labelPosition="left" label-width="100rpx">
|
|
||||||
<up-form-item label="手机号" borderBottom>
|
|
||||||
<up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<!-- <up-form-item label="角色" borderBottom>
|
|
||||||
<uni-data-select v-model="Role" :localdata="range" :clear='false'></uni-data-select>
|
|
||||||
</up-form-item> -->
|
|
||||||
</up-form>
|
|
||||||
</view>
|
|
||||||
</up-modal>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
<!-- tabs1 -->
|
|
||||||
<block v-if='currentTab == 1'>
|
|
||||||
<view class="card card1">
|
|
||||||
<view class="card1-tit">
|
|
||||||
{{ Role == 1 ? '行业会员' : '商户' }}开通报备
|
|
||||||
<up-input v-model='formData.auth_code'> </up-input>
|
|
||||||
</view>
|
|
||||||
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
|
|
||||||
<up-form-item label="">
|
|
||||||
<up-input v-model="formData.real_name" border="none" prefixIcon="account" placeholder="请输入真实姓名"
|
|
||||||
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
|
||||||
:placeholderStyle="{ color: '#444444' }"
|
|
||||||
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="">
|
|
||||||
<up-input v-model="formData.mobile" border="none" prefixIcon="phone" placeholder="请输入电话号码"
|
|
||||||
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
|
||||||
:placeholderStyle="{ color: '#444444' }"
|
|
||||||
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
|
||||||
</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="{
|
|
||||||
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'>
|
|
||||||
<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="{
|
|
||||||
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'>
|
|
||||||
<view style="width: 100%;">
|
|
||||||
<up-input v-model="formData.price" border="none" prefixIcon="rmb-circle" placeholder="请输入金额"
|
|
||||||
:customStyle="{
|
|
||||||
background: '#F3F3F3', padding: '20rpx',
|
|
||||||
'border-radius': '30rpx'
|
|
||||||
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
|
||||||
</view>
|
|
||||||
</up-form-item> -->
|
|
||||||
<up-form-item label="">
|
|
||||||
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
|
|
||||||
<view class="">
|
|
||||||
<up-input v-model="formData.code" border="none" prefixIcon="tags" placeholder="请输入验证码"
|
|
||||||
:customStyle="{
|
|
||||||
background: '#F3F3F3', padding: '20rpx',
|
|
||||||
'border-radius': '30rpx'
|
|
||||||
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
|
||||||
</view>
|
|
||||||
<text class='btn-text' style="color: grey;" v-if='cutDown'>重新获取({{ cutDown }})</text>
|
|
||||||
<text @click="getCode" class='btn-text' v-else> {{ flag ? '获取验证码' : '重新获取' }} </text>
|
|
||||||
</view>
|
|
||||||
</up-form-item>
|
|
||||||
</up-form>
|
|
||||||
<view class="store-info">
|
|
||||||
报备人:{{ STORE_INFO.name }}
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="store-info" v-if="Role==1">
|
|
||||||
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
|
|
||||||
<up-input inputAlign='center' placeholder="请输入金额" @focus="formData.price=''" color='#FF6B00'
|
|
||||||
:placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none"
|
|
||||||
v-model="formData.price" @blur='tofixedPrice'></up-input>
|
|
||||||
</view>
|
|
||||||
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
|
|
||||||
v-if="formData.label_limit&&formData.price<formData.label_limit">
|
|
||||||
{{formData.label_name}}角色最低金额不能低于{{formData.label_limit}}元
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<button @click="test">anniu</button>
|
|
||||||
</view>
|
|
||||||
<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 ? '完成并收款' : '完成' }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
|
|
||||||
<!-- tabs2 -->
|
|
||||||
<block v-else>
|
|
||||||
<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" v-if='Role == 1'>行业会员</uni-th>
|
|
||||||
<uni-th width="50" align="center" v-if='Role == 1'>经营资金</uni-th>
|
|
||||||
<uni-th width="50" align="center" v-if='Role == 4'>开通时间</uni-th>
|
|
||||||
<uni-th width="50" align="center" v-if='Role == 4'>商户</uni-th>
|
|
||||||
<uni-th width="50" align="center" v-if='Role == 1'>角色</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" v-if='Role == 1'>{{ item.real_name }}</uni-td>
|
|
||||||
<uni-td style="font-size: 20rpx;" align="center" v-if='Role == 1'>{{ item.price }}</uni-td>
|
|
||||||
<uni-td style="font-size: 20rpx;" align="center"
|
|
||||||
v-if='Role == 4'>{{ item.create_time }}</uni-td>
|
|
||||||
<uni-td style="font-size: 20rpx;" align="center" v-if='Role == 4'>{{ item.nickname }}</uni-td>
|
|
||||||
<uni-td style="font-size: 20rpx;" align="center" v-if='Role == 1'>{{ item.label_name }}</uni-td>
|
|
||||||
<uni-td style="font-size: 20rpx;" align="center">
|
|
||||||
<view v-if="item.paid == 1 || Role == 4">已开通</view>
|
|
||||||
<view v-else style="color:#33B83A ;">
|
|
||||||
<view @click="upadtaStatus(item)">
|
|
||||||
未开通,查询
|
|
||||||
</view>
|
|
||||||
<view @click="rePay(item)">
|
|
||||||
重新支付
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-td>
|
|
||||||
</uni-tr>
|
|
||||||
</uni-table>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
<view style="height: 50rpx;" />
|
|
||||||
|
|
||||||
<!-- 地址选择器 -->
|
|
||||||
<up-popup :show="showPop" @close="showPop = false" @open="showPop = true" :round="10">
|
|
||||||
<view style="padding: 20rpx;">
|
|
||||||
<up-tabs :list="tabsList" @change='addressTbasChange' :current='currentAddressIndex' lineColor='#20B128'
|
|
||||||
: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)">
|
|
||||||
<text>{{ item.city_name }}</text>
|
|
||||||
<up-icon name="arrow-right" :color="item.city_code == formData.city ? '#20B128' : '#777777'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="address-content" v-else-if='currentAddressIndex == 1'>
|
|
||||||
<view class="address-li" v-for="item in addressList.area" @click="addressLiClick(1, item)"
|
|
||||||
:key="item.area_code" :class='{ act: item.area_code == formData.area }'>
|
|
||||||
<text>{{ item.area_name }}</text>
|
|
||||||
<up-icon name="arrow-right" :color="item.area_code == formData.area ? '#20B128' : '#777777'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="address-content" v-else-if='currentAddressIndex == 2'>
|
|
||||||
<view class="address-li" v-for="item in addressList.street" @click="addressLiClick(2, item)"
|
|
||||||
:key="item.street_code" :class='{ act: item.street_code == formData.street }'>
|
|
||||||
<text>{{ item.street_name }}</text>
|
|
||||||
<up-icon name="arrow-right" :color="item.street_code == formData.street ? '#20B128' : '#777777'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="address-content" v-else-if='currentAddressIndex == 3'>
|
|
||||||
<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'" />
|
|
||||||
</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)">
|
|
||||||
<text>{{ item.brigade_name }}</text>
|
|
||||||
<up-icon name="arrow-right" :color="item.id == formData.brigade ? '#20B128' : '#777777'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</up-popup>
|
|
||||||
<up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false'
|
|
||||||
@close="showPop1 = false" @open="showPop1 = true" keyName='label_name' confirmColor='#33B83A'></up-picker>
|
|
||||||
</template>
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
reactive,
|
|
||||||
ref
|
|
||||||
} from 'vue';
|
|
||||||
import useUserStore from "@/store/user";
|
|
||||||
import {
|
|
||||||
provinceListApi,
|
|
||||||
cityListApi,
|
|
||||||
areaListApi,
|
|
||||||
streetListApi,
|
|
||||||
villageListApi,
|
|
||||||
brigadeListApi
|
|
||||||
} from "@/api/address.js"
|
|
||||||
import {
|
|
||||||
vipRechargeApi,
|
|
||||||
rechargeCountApi,
|
|
||||||
reVipRechargeApi,
|
|
||||||
rechargeListsApi,
|
|
||||||
updataOrderApi,
|
|
||||||
getStoreByPhone,
|
|
||||||
getUserLabel,
|
|
||||||
getUserShip,
|
|
||||||
getCreateLists,
|
|
||||||
getReportingSms
|
|
||||||
} from "@/api/user.js"
|
|
||||||
import Push from "@/utils/push.js"
|
|
||||||
import {
|
|
||||||
onPullDownRefresh,
|
|
||||||
onLoad,
|
|
||||||
onReachBottom
|
|
||||||
} from "@dcloudio/uni-app"
|
|
||||||
import {
|
|
||||||
config
|
|
||||||
} from "@/config/app.js"
|
|
||||||
|
|
||||||
const showPop1 = ref(false)
|
|
||||||
const Role = ref(1)
|
|
||||||
const range = ref({})
|
|
||||||
const columns = ref([])
|
|
||||||
const showModa = ref(true)
|
|
||||||
const storePhone = ref('')
|
|
||||||
const confirmStore = () => {
|
|
||||||
getStoreByPhone({
|
|
||||||
phone: storePhone.value
|
|
||||||
}).then(res => {
|
|
||||||
for (let key in res.data) {
|
|
||||||
STORE_INFO[key] = res.data[key]
|
|
||||||
}
|
|
||||||
setPhoneOneDay()
|
|
||||||
}).catch(err => {
|
|
||||||
uni.$u.toast('未查到店铺信息,请检查手机号码')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 用户选择的门店信息
|
|
||||||
let STORE_INFO = reactive({
|
|
||||||
id: ""
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
// 门店手机号保留一天
|
|
||||||
const setPhoneOneDay = () => {
|
|
||||||
if (uni.getStorageSync('VIP_PHONE')) return;
|
|
||||||
const currentDate = new Date();
|
|
||||||
const nextDay = new Date(currentDate);
|
|
||||||
nextDay.setDate(currentDate.getDate() + 1);
|
|
||||||
uni.setStorageSync('VIP_PHONE', JSON.stringify({
|
|
||||||
time: nextDay,
|
|
||||||
phone: storePhone.value
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
const getPhoneOneDay = () => {
|
|
||||||
if (uni.getStorageSync('VIP_PHONE')) {
|
|
||||||
let data = JSON.parse(uni.getStorageSync('VIP_PHONE'))
|
|
||||||
if (new Date() > data.time) {
|
|
||||||
uni.removeStorageSync('VIP_PHONE');
|
|
||||||
} else {
|
|
||||||
storePhone.value = data.phone
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 手机保留一天结束
|
|
||||||
|
|
||||||
// 验证码
|
|
||||||
const cutDown = ref(0)
|
|
||||||
const flag = ref(true)
|
|
||||||
const code = ref('')
|
|
||||||
const checkPhone = (phone) => {
|
|
||||||
const regex = /^1[3-9]\d{9}$/;
|
|
||||||
return regex.test(formData.mobile) ? true : false
|
|
||||||
}
|
|
||||||
|
|
||||||
const getCode = async () => {
|
|
||||||
if (!checkPhone(formData.mobile)) return uni.$u.toast('请输入正确的手机号')
|
|
||||||
await getReportingSms({
|
|
||||||
account: formData.mobile
|
|
||||||
})
|
|
||||||
flag.value = false
|
|
||||||
cutDown.value = 60
|
|
||||||
let timer = setInterval(() => {
|
|
||||||
cutDown.value--
|
|
||||||
if (cutDown.value <= 0) {
|
|
||||||
cutDown.value = 0;
|
|
||||||
clearInterval(timer);
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
// 验证码结束
|
|
||||||
|
|
||||||
|
|
||||||
const currentTab = ref(1)
|
|
||||||
const formData = reactive({
|
|
||||||
// store_id: STORE_INFO.id,
|
|
||||||
// mobile: "",
|
|
||||||
// province: 510000,
|
|
||||||
// city: '',
|
|
||||||
// area: "",
|
|
||||||
// street: "",
|
|
||||||
// village: "",
|
|
||||||
// real_name: "",
|
|
||||||
// auth_code: "",
|
|
||||||
// address: "",
|
|
||||||
// label_name: "",
|
|
||||||
// label_id: "",
|
|
||||||
// label_limit: "",
|
|
||||||
// user_ship: '',
|
|
||||||
// code: '',
|
|
||||||
// brigade: "",
|
|
||||||
// price: "",
|
|
||||||
store_id: STORE_INFO.id,
|
|
||||||
mobile: "19130550023",
|
|
||||||
province: 510000,
|
|
||||||
city: '510500',
|
|
||||||
area: "510503",
|
|
||||||
street: "510503102",
|
|
||||||
village: "510503102201",
|
|
||||||
real_name: "赵明军",
|
|
||||||
auth_code: "131197337173621549",
|
|
||||||
address: "",
|
|
||||||
label_name: "",
|
|
||||||
label_id: "4",
|
|
||||||
user_ship: '1',
|
|
||||||
code: ''
|
|
||||||
})
|
|
||||||
|
|
||||||
const tofixedPrice = () => {
|
|
||||||
formData.price = (+formData.price).toFixed(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
const resetFormData = () => {
|
|
||||||
for (let key in formData) {
|
|
||||||
formData[key] = ''
|
|
||||||
}
|
|
||||||
tabsList.forEach(item => {
|
|
||||||
item.name = '请选择'
|
|
||||||
})
|
|
||||||
formData.province = 510000
|
|
||||||
cutDown.value = 0
|
|
||||||
currentAddressIndex.value = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
const conformRole = (e) => {
|
|
||||||
formData.label_name = e.value[0].label_name
|
|
||||||
formData.label_id = e.value[0].label_id
|
|
||||||
formData.price = (+e.value[0].limit).toFixed(2)
|
|
||||||
formData.label_limit = e.value[0].limit
|
|
||||||
showPop1.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 地址选择
|
|
||||||
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) => {
|
|
||||||
currentAddressIndex.value = e.index
|
|
||||||
}
|
|
||||||
const addressList = reactive({
|
|
||||||
city: [],
|
|
||||||
area: [],
|
|
||||||
street: [],
|
|
||||||
village: [],
|
|
||||||
brigade: []
|
|
||||||
})
|
|
||||||
const addressLiClick = async (i, item) => {
|
|
||||||
if (i == 0) {
|
|
||||||
formData.city = item.city_code
|
|
||||||
tabsList[0].name = item.city_name
|
|
||||||
let res = await areaListApi({
|
|
||||||
city_code: formData.city
|
|
||||||
})
|
|
||||||
addressList.area = res.data
|
|
||||||
}
|
|
||||||
if (i == 1) {
|
|
||||||
formData.area = item.area_code
|
|
||||||
tabsList[1].name = item.area_name
|
|
||||||
let res = await streetListApi({
|
|
||||||
area_code: formData.area
|
|
||||||
})
|
|
||||||
addressList.street = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == 2) {
|
|
||||||
formData.street = item.street_code
|
|
||||||
tabsList[2].name = item.street_name
|
|
||||||
let res = await villageListApi({
|
|
||||||
street_code: formData.street
|
|
||||||
})
|
|
||||||
addressList.village = res.data
|
|
||||||
}
|
|
||||||
if (i == 3) {
|
|
||||||
formData.village = item.village_code
|
|
||||||
tabsList[3].name = item.village_name
|
|
||||||
let res = await brigadeListApi({
|
|
||||||
village_code: formData.village
|
|
||||||
})
|
|
||||||
addressList.brigade = res.data
|
|
||||||
}
|
|
||||||
if (i == 4) {
|
|
||||||
formData.brigade = item.id
|
|
||||||
tabsList[4].name = item.brigade_name
|
|
||||||
|
|
||||||
formData.address = tabsList[0].name + tabsList[1].name + tabsList[2].name + tabsList[3].name +
|
|
||||||
tabsList[4].name
|
|
||||||
return showPop.value = false
|
|
||||||
}
|
|
||||||
formData.address = tabsList[0].name + tabsList[1].name + tabsList[2].name + tabsList[3].name + tabsList[4]
|
|
||||||
.name
|
|
||||||
return currentAddressIndex.value++
|
|
||||||
}
|
|
||||||
const getCityList = async () => {
|
|
||||||
let res = await cityListApi({
|
|
||||||
province_code: formData.province
|
|
||||||
})
|
|
||||||
addressList.city = res.data
|
|
||||||
}
|
|
||||||
const tabsList = reactive(
|
|
||||||
[{
|
|
||||||
name: "请选择"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '请选择',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '请选择',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '请选择',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '请选择',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let timerInvol = null
|
|
||||||
// 开起一个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) {
|
|
||||||
console.log(111111, timerInvol)
|
|
||||||
clearTimeout(timerInvol);
|
|
||||||
test()
|
|
||||||
console.log(222222, timerInvol)
|
|
||||||
// setImmediate()
|
|
||||||
paySuccessToTabs2()
|
|
||||||
});
|
|
||||||
// 结束
|
|
||||||
const test = () => {
|
|
||||||
console.log(33333, timerInvol)
|
|
||||||
clearTimeout(timerInvol)
|
|
||||||
console.log(44444, timerInvol)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 提交
|
|
||||||
const submit = async () => {
|
|
||||||
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('请选择地址');
|
|
||||||
// if (!formData.label_id) return uni.$u.toast('请选择用户身份');
|
|
||||||
if (formData.price < formData.label_limit) return uni.$u.toast(
|
|
||||||
`${formData.label_name}角色最低金额不能低于${formData.label_limit}元`);
|
|
||||||
formData.store_id = STORE_INFO.id
|
|
||||||
if (Role.value == 1) {
|
|
||||||
formData.recharge_type = 'INDUSTRYMEMBERS'
|
|
||||||
formData.user_ship = 1
|
|
||||||
vipRechargeApi(formData).then(res => {
|
|
||||||
timerInvol = setTimeout(() => {
|
|
||||||
uni.hideLoading();
|
|
||||||
uni.$u.toast('支付超时');
|
|
||||||
console.log("支付超时")
|
|
||||||
}, 20000)
|
|
||||||
|
|
||||||
})
|
|
||||||
return
|
|
||||||
uni.scanCode({
|
|
||||||
success: function(res) {
|
|
||||||
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
|
|
||||||
uni.showLoading({
|
|
||||||
title: '支付中...'
|
|
||||||
});
|
|
||||||
formData.auth_code = res.result
|
|
||||||
formData.recharge_type = 'INDUSTRYMEMBERS'
|
|
||||||
formData.user_ship = 1
|
|
||||||
vipRechargeApi(formData).then(res => {
|
|
||||||
timerInvol = setTimeout(() => {
|
|
||||||
uni.hideLoading();
|
|
||||||
uni.$u.toast('支付超时');
|
|
||||||
console.log("支付超时")
|
|
||||||
}, 10000)
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const rePay = (item) => {
|
|
||||||
uni.scanCode({
|
|
||||||
success: function(res) {
|
|
||||||
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
|
|
||||||
uni.showLoading({
|
|
||||||
title: '等待用户支付'
|
|
||||||
});
|
|
||||||
reVipRechargeApi({
|
|
||||||
id: item.id,
|
|
||||||
auth_code: res.result
|
|
||||||
}).then(res => {
|
|
||||||
timerInvol = setTimeout(() => {
|
|
||||||
uni.hideLoading();
|
|
||||||
uni.$u.toast('支付超时');
|
|
||||||
console.log("支付超时")
|
|
||||||
}, 30000)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 支付成功后清除formData并且切换tabs2
|
|
||||||
const paySuccessToTabs2 = () => {
|
|
||||||
uni.hideLoading()
|
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功',
|
|
||||||
duration: 2000,
|
|
||||||
success() {
|
|
||||||
currentTab.value = 2
|
|
||||||
resetFormData()
|
|
||||||
setTimeout(() => {
|
|
||||||
getLists()
|
|
||||||
getCount()
|
|
||||||
}, 500); // 延迟1秒执行
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 邀请用户数
|
|
||||||
let where = {
|
|
||||||
page_no: 1,
|
|
||||||
page_size: 25,
|
|
||||||
loadingOver: false
|
|
||||||
|
|
||||||
}
|
|
||||||
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 () => {
|
|
||||||
where.loadingOver = false
|
|
||||||
where.page_no = 1
|
|
||||||
where.page_size = 25
|
|
||||||
let res = await rechargeListsApi({
|
|
||||||
store_id: STORE_INFO.id,
|
|
||||||
recharge_type: "INDUSTRYMEMBERS",
|
|
||||||
page_no: 1,
|
|
||||||
page_size: 25
|
|
||||||
})
|
|
||||||
lists.value = res.data.lists
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
getCount()
|
|
||||||
getLists()
|
|
||||||
|
|
||||||
const upadtaStatus = (item) => {
|
|
||||||
updataOrderApi({
|
|
||||||
order_no: item.order_id,
|
|
||||||
recharge: 1
|
|
||||||
}).then(res => {
|
|
||||||
getCount()
|
|
||||||
getLists()
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
onLoad(() => {
|
|
||||||
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]
|
|
||||||
})
|
|
||||||
getPhoneOneDay()
|
|
||||||
getCityList()
|
|
||||||
})
|
|
||||||
|
|
||||||
onPullDownRefresh(() => {
|
|
||||||
getCount()
|
|
||||||
getLists()
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.stopPullDownRefresh()
|
|
||||||
}, 1000)
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
onReachBottom(async () => {
|
|
||||||
if (where.loadingOver) return;
|
|
||||||
where.page_no++;
|
|
||||||
if (Role.value == 1) {
|
|
||||||
let res = await rechargeListsApi({
|
|
||||||
store_id: STORE_INFO.id,
|
|
||||||
recharge_type: "INDUSTRYMEMBERS",
|
|
||||||
...where
|
|
||||||
})
|
|
||||||
if (res.data.lists.length <= 0) {
|
|
||||||
return where.loadingOver = true
|
|
||||||
}
|
|
||||||
lists.value.push(...res.data.lists)
|
|
||||||
} else {
|
|
||||||
let res = await getCreateLists({
|
|
||||||
store_id: STORE_INFO.id,
|
|
||||||
...where
|
|
||||||
})
|
|
||||||
if (res.data.lists.length <= 0) {
|
|
||||||
return where.loadingOver = true
|
|
||||||
}
|
|
||||||
lists.value.push(...res.data.lists)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang='scss'>
|
|
||||||
.tabs {
|
|
||||||
background-color: #fff;
|
|
||||||
width: 100vw;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 30rpx 0;
|
|
||||||
justify-content: space-around;
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #444444;
|
|
||||||
|
|
||||||
.actText {
|
|
||||||
color: #20B128;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.lines {
|
|
||||||
position: absolute;
|
|
||||||
width: 70rpx;
|
|
||||||
height: 7rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
background-color: #33B83A;
|
|
||||||
bottom: 15rpx;
|
|
||||||
transition: 300ms;
|
|
||||||
left: calc(25vw - 35rpx);
|
|
||||||
}
|
|
||||||
|
|
||||||
.actLine {
|
|
||||||
left: calc(75vw - 35rpx);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
width: 710rpx;
|
|
||||||
margin: 20rpx auto;
|
|
||||||
background-color: #fff;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card1 {
|
|
||||||
padding: 52rpx 30rpx;
|
|
||||||
|
|
||||||
.card1-tit {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #444444;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 90rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.store-info {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #20B128;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.submit-btn {
|
|
||||||
/* height: 200rpx; */
|
|
||||||
position: fixed;
|
|
||||||
bottom: 50rpx;
|
|
||||||
width: 710rpx;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.vip-card {
|
|
||||||
width: 690rpx;
|
|
||||||
height: 270rpx;
|
|
||||||
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/4a92b202406162207212332.png');
|
|
||||||
background-size: 100% 100%;
|
|
||||||
margin: 20rpx auto;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 30rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0 30rpx;
|
|
||||||
color: #444444;
|
|
||||||
justify-content: space-around;
|
|
||||||
|
|
||||||
.num {
|
|
||||||
font-size: 72rpx;
|
|
||||||
color: #7B5232;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.table {
|
|
||||||
width: 710rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-size: 30rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.address-content {
|
|
||||||
padding: 20rpx;
|
|
||||||
height: 50vh;
|
|
||||||
overflow-y: auto;
|
|
||||||
|
|
||||||
.address-li {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #777777;
|
|
||||||
margin: 30rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.act {
|
|
||||||
color: #20B128;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-table-th {
|
|
||||||
padding: 10rpx 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-table-td {
|
|
||||||
padding: 10rpx 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slot-content {
|
|
||||||
/* padding-bottom: 50rpx; */
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-btn {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-text {
|
|
||||||
color: #20B128;
|
|
||||||
}
|
|
||||||
</style>
|
|
File diff suppressed because it is too large
Load Diff
99
pages.json
99
pages.json
|
@ -92,42 +92,6 @@
|
||||||
"navigationBarTitleText": "购买礼包",
|
"navigationBarTitleText": "购买礼包",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "pages/product/product",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "商品列表",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "pages/user_cash/index",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "提现"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "pages/user_cash/status",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "pages/user_cash/list",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "提现申请记录"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "pages/wholesale/index",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "批发"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [{
|
"subPackages": [{
|
||||||
|
@ -204,62 +168,6 @@
|
||||||
"navigationBarTitleText": "设置密码",
|
"navigationBarTitleText": "设置密码",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "delivery/index",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "门店订单"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "store/index",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "门店管理"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "deliveryOrder/index",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "每日配送统计"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "deliveryOrder/count",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "累计配送统计"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "productSales/index",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "每日销量统计"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "productSales/count",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "累计销售统计"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "store_product/index",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "商品库存"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "statistics/index",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "门店收支"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -362,13 +270,6 @@
|
||||||
"navigationBarTitleText": "余额明细",
|
"navigationBarTitleText": "余额明细",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "purchase_product_offer/index",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "采购商品列表"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="afterSales-goods-right-info">
|
<view class="afterSales-goods-right-info">
|
||||||
<text class="goods_desc">{{item.unit}}</text>
|
<text class="goods_desc">{{item.unit}}</text>
|
||||||
<text class="goods_num">x{{item.cart_num}}</text>
|
<text class="goods_num">x5</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -142,6 +142,7 @@
|
||||||
// 上一个页面传递的售后参数
|
// 上一个页面传递的售后参数
|
||||||
const eventChannel = instance.getOpenerEventChannel();
|
const eventChannel = instance.getOpenerEventChannel();
|
||||||
eventChannel.on('orderDetail', function(data) {
|
eventChannel.on('orderDetail', function(data) {
|
||||||
|
console.log(data);
|
||||||
refundForm.id = data.id;
|
refundForm.id = data.id;
|
||||||
refundForm.old_cart_id = data.old_cart_id;
|
refundForm.old_cart_id = data.old_cart_id;
|
||||||
refundForm.refund_type = data.refund_type;
|
refundForm.refund_type = data.refund_type;
|
||||||
|
@ -214,6 +215,7 @@
|
||||||
//图片 refund_reason_wap_img
|
//图片 refund_reason_wap_img
|
||||||
if (fileList1.value.length > 0) {
|
if (fileList1.value.length > 0) {
|
||||||
fileList1.value.map(i => {
|
fileList1.value.map(i => {
|
||||||
|
console.log(i.url.uri);
|
||||||
urls.push(i.url.uri);
|
urls.push(i.url.uri);
|
||||||
});
|
});
|
||||||
refundForm.refund_reason_wap_img = urls.join(',');
|
refundForm.refund_reason_wap_img = urls.join(',');
|
||||||
|
@ -223,10 +225,7 @@
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
uni.$u.sleep(1500).then(res => {
|
uni.$u.sleep(1500).then(res => {
|
||||||
// uni.navigateBack();
|
uni.navigateBack();
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pagesOrder/order/order'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
|
|
|
@ -244,7 +244,7 @@
|
||||||
const cartList = ref([]);
|
const cartList = ref([]);
|
||||||
const cartInfo = ref({});
|
const cartInfo = ref({});
|
||||||
const getcartList = (check = true) => {
|
const getcartList = (check = true) => {
|
||||||
cartListApi({store_id:STORE_INFO.id}).then(res => {
|
cartListApi().then(res => {
|
||||||
if (check) {
|
if (check) {
|
||||||
res.data.lists = res.data.lists.map(item => {
|
res.data.lists = res.data.lists.map(item => {
|
||||||
item.check = true;
|
item.check = true;
|
||||||
|
|
|
@ -23,16 +23,17 @@
|
||||||
<template #left>
|
<template #left>
|
||||||
<view class="store-info">
|
<view class="store-info">
|
||||||
<view style="display: flex;font-size: 30rpx;font-weight: bold;">
|
<view style="display: flex;font-size: 30rpx;font-weight: bold;">
|
||||||
<text v-if="shareInfo.uid"
|
<text v-if=" vipList.includes(userStore.userInfo.user_ship) || shareInfo.store_id"
|
||||||
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" @click="navgo('/multipleShop/index/index?event=store_info')">
|
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||||
{{shareInfo.real_name}}
|
<text v-if="vipList.includes(userStore.userInfo.user_ship)">
|
||||||
|
{{ (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店' }}</text>
|
||||||
|
<text v-else>
|
||||||
|
{{(shareInfo.real_name || (userStore.userInfo.real_name || userStore.userInfo.nickname)) + '的供销个人门店' }}</text>
|
||||||
</text>
|
</text>
|
||||||
<text v-else
|
<text v-else
|
||||||
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"
|
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{
|
||||||
@click="navgo('/multipleShop/index/index?event=store_info')">{{
|
|
||||||
STORE_INFO.store_name }}</text>
|
STORE_INFO.store_name }}</text>
|
||||||
<up-icon name="arrow-right" label="切换" labelSize="10px"
|
<up-icon name="arrow-right"></up-icon>
|
||||||
@click="navgo('/multipleShop/index/index?event=store_info')"></up-icon>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -182,10 +183,6 @@
|
||||||
<view class="shop-content-li-r" style="color:#FC452F ;">¥<text
|
<view class="shop-content-li-r" style="color:#FC452F ;">¥<text
|
||||||
style="font-size: 28rpx;">{{item[priceKey.op_price]}}</text>
|
style="font-size: 28rpx;">{{item[priceKey.op_price]}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="tag" v-if="item.tag">
|
|
||||||
<view class="icon" />
|
|
||||||
{{item.tag}}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="shop-content-li" style="justify-content: space-between;"
|
<view class="shop-content-li" style="justify-content: space-between;"
|
||||||
|
@ -206,8 +203,7 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="shopconetent-btn">
|
<view class="shopconetent-btn">
|
||||||
<u--icon name="plus-circle-fill" size="20" color="#20b128" v-if="item.is_lack==0"></u--icon>
|
<u--icon name="plus-circle-fill" size="20" color="#20b128"></u--icon>
|
||||||
<u--icon name="plus-circle-fill" size="20" color="#c1ffc0" v-else></u--icon>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -258,20 +254,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-overlay>
|
</u-overlay>
|
||||||
<up-popup :show="LocationShow" mode="bottom" @open="LocationShowOpen()">
|
|
||||||
<view style="margin: 40rpx 10rpx;">
|
|
||||||
<up-row customStyle="margin-bottom: 10px" gutter="10">
|
|
||||||
<up-col span="6">
|
|
||||||
<up-button text="取消" @click="userLocationfalse()"></up-button>
|
|
||||||
</up-col>
|
|
||||||
<up-col span="6">
|
|
||||||
<up-button type="primary" text="设置授权" color="#20B128" @click="opensettings()"></up-button>
|
|
||||||
</up-col>
|
|
||||||
</up-row>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</up-popup>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -312,17 +294,11 @@
|
||||||
} from "@/api/multipleShop.js";
|
} from "@/api/multipleShop.js";
|
||||||
|
|
||||||
import useUserStore from "@/store/user";
|
import useUserStore from "@/store/user";
|
||||||
//定位坐标
|
|
||||||
let location = {
|
|
||||||
lat: '',
|
|
||||||
long: "",
|
|
||||||
};
|
|
||||||
const vipList = reactive([1, 2, 3, 4, 5, 6, 7, 8])
|
const vipList = reactive([1, 2, 3, 4, 5, 6, 7, 8])
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const STORE_INFO = reactive({
|
const STORE_INFO = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
store_name: "",
|
store_name: ""
|
||||||
abbreviation: ''
|
|
||||||
})
|
})
|
||||||
const priceKey = reactive({
|
const priceKey = reactive({
|
||||||
off_activity: "",
|
off_activity: "",
|
||||||
|
@ -330,45 +306,23 @@
|
||||||
price: ""
|
price: ""
|
||||||
})
|
})
|
||||||
|
|
||||||
const showModal = ref(false)
|
|
||||||
const navgo = (url) => {
|
|
||||||
showModal.value &&= false
|
|
||||||
uni.navigateTo({
|
|
||||||
url
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const LocationShow = ref(false)
|
|
||||||
|
|
||||||
uni.$on('store_info', function(data) {
|
|
||||||
let datas = JSON.parse(data)
|
|
||||||
if (datas) {
|
|
||||||
datas.store_name = datas.name
|
|
||||||
uni.setStorageSync("STORE_INFO", JSON.stringify(datas));
|
|
||||||
STORE_INFO.id = datas.id
|
|
||||||
STORE_INFO.store_name = datas.name
|
|
||||||
STORE_INFO.abbreviation = datas.abbreviation
|
|
||||||
shareInfo.value.real_name = datas.name
|
|
||||||
shareInfo.value.store_id = datas.id
|
|
||||||
}
|
|
||||||
getgoodClassList(0)
|
|
||||||
getGoodList()
|
|
||||||
})
|
|
||||||
const getStoreInfoFn = () => {
|
const getStoreInfoFn = () => {
|
||||||
if (uni.getStorageSync('STORE_INFO').length) {
|
if (uni.getStorageSync('STORE_INFO').length) {
|
||||||
let data = JSON.parse(uni.getStorageSync('STORE_INFO'))
|
let data = JSON.parse(uni.getStorageSync('STORE_INFO'))
|
||||||
for (let key in data) {
|
for (let key in data) {
|
||||||
STORE_INFO[key] = data[key]
|
STORE_INFO[key] = data[key]
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
getStoreInfo().then(res => {
|
|
||||||
uni.setStorageSync("STORE_INFO", JSON.stringify(res.data));
|
|
||||||
let data = res.data;
|
|
||||||
for (let key in data) {
|
|
||||||
STORE_INFO[key] = data[key]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
getAll()
|
getStoreInfo().then(res => {
|
||||||
|
uni.setStorageSync("STORE_INFO", JSON.stringify(res.data));
|
||||||
|
let data = res.data;
|
||||||
|
for (let key in data) {
|
||||||
|
STORE_INFO[key] = data[key]
|
||||||
|
}
|
||||||
|
getgoodClassList(0);
|
||||||
|
getGoodList();
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -377,13 +331,10 @@
|
||||||
let shareStr = '?id=' + STORE_INFO.id;
|
let shareStr = '?id=' + STORE_INFO.id;
|
||||||
if (vipList.includes(userStore.userInfo.user_ship)) {
|
if (vipList.includes(userStore.userInfo.user_ship)) {
|
||||||
shareStr = shareStr + '&spread_uid=' + userStore.userInfo.id + '&real_name=' + (userStore.userInfo
|
shareStr = shareStr + '&spread_uid=' + userStore.userInfo.id + '&real_name=' + (userStore.userInfo
|
||||||
.share_name)
|
.real_name || userStore.userInfo.nickname)
|
||||||
} else {
|
|
||||||
shareStr = shareStr + '&real_name=' + STORE_INFO.abbreviation
|
|
||||||
}
|
}
|
||||||
let shareInfo = {
|
let shareInfo = {
|
||||||
// title: (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店',
|
title: (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店',
|
||||||
title: STORE_INFO.store_name,
|
|
||||||
path: '/pages/index/index' + shareStr,
|
path: '/pages/index/index' + shareStr,
|
||||||
imageUrl: STORE_INFO.image || '',
|
imageUrl: STORE_INFO.image || '',
|
||||||
success() {
|
success() {
|
||||||
|
@ -653,9 +604,6 @@
|
||||||
const goodRef = ref(null);
|
const goodRef = ref(null);
|
||||||
const goodData = ref({});
|
const goodData = ref({});
|
||||||
const openGoodPopup = (item) => { // 打开数量/重量弹窗
|
const openGoodPopup = (item) => { // 打开数量/重量弹窗
|
||||||
if(item.is_lack==1){
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
navTo(false)
|
navTo(false)
|
||||||
if (!userStore.token || !userStore.userInfo.mobile) return;
|
if (!userStore.token || !userStore.userInfo.mobile) return;
|
||||||
goodData.value = item;
|
goodData.value = item;
|
||||||
|
@ -703,7 +651,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const settleAccounts = () => {
|
const settleAccounts = () => {
|
||||||
if (+cartInfo.value.pay_price < 500 && userStore.userInfo.user_ship == 0) return showOverlay.value = true;
|
|
||||||
|
if (+cartInfo.value.pay_price < 500) return showOverlay.value = true;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesOrder/settle/settle'
|
url: '/pagesOrder/settle/settle'
|
||||||
})
|
})
|
||||||
|
@ -720,7 +669,6 @@
|
||||||
cartListApi({
|
cartListApi({
|
||||||
page_no: 1,
|
page_no: 1,
|
||||||
page_size: 100,
|
page_size: 100,
|
||||||
store_id: STORE_INFO.id,
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
cartInfo.value = {
|
cartInfo.value = {
|
||||||
total_price: res.data?.extend?.total_price || '0.00',
|
total_price: res.data?.extend?.total_price || '0.00',
|
||||||
|
@ -748,25 +696,26 @@
|
||||||
store_id: ''
|
store_id: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
// const getShareInfo = () => {
|
const getShareInfo = () => {
|
||||||
// if (uni.getStorageSync('SHARE_INFO')) {
|
if (uni.getStorageSync('SHARE_INFO')) {
|
||||||
// shareInfo.value = (uni.getStorageSync('SHARE_INFO'))
|
shareInfo.value = (uni.getStorageSync('SHARE_INFO'))
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
getShareInfo()
|
||||||
|
|
||||||
onLoad(async (opt) => {
|
onLoad(async (opt) => {
|
||||||
console.log('opt', opt)
|
console.log('opt', opt)
|
||||||
|
if (opt.id) {
|
||||||
|
where.value.store_id = (opt.id == 'undefined' ? STORE_INFO.id : opt.id);
|
||||||
|
} else {
|
||||||
|
where.value.store_id = STORE_INFO.id
|
||||||
|
}
|
||||||
// 店铺id
|
// 店铺id
|
||||||
if (opt.id && opt.id != 'undefined') {
|
if (opt.id && opt.id != 'undefined') {
|
||||||
STORE_INFO.id = opt.id
|
where.value.store_id = opt.id;
|
||||||
STORE_INFO.store_name = opt.real_name
|
const info = await shopDetailApi({
|
||||||
if (opt.real_name == '' || opt.real_name == undefined) {
|
store_id: where.value.store_id
|
||||||
shopDetailApi({
|
});
|
||||||
store_id: opt.id
|
|
||||||
}).then(res => {
|
|
||||||
STORE_INFO.store_name=res.data.name
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 分享参数至当前用户参数
|
// 分享参数至当前用户参数
|
||||||
if (opt.spread_uid) {
|
if (opt.spread_uid) {
|
||||||
shareInfo.value.uid = opt.spread_uid;
|
shareInfo.value.uid = opt.spread_uid;
|
||||||
|
@ -774,12 +723,10 @@
|
||||||
shareInfo.value.store_id = opt.id;
|
shareInfo.value.store_id = opt.id;
|
||||||
uni.setStorageSync('SHARE_INFO', shareInfo.value);
|
uni.setStorageSync('SHARE_INFO', shareInfo.value);
|
||||||
}
|
}
|
||||||
getAll()
|
|
||||||
} else {
|
|
||||||
uni.removeStorageSync('SHARE_INFO')
|
|
||||||
getLocation()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getStoreInfoFn()
|
||||||
|
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
// 胶囊布局信息
|
// 胶囊布局信息
|
||||||
btns.value = uni.getMenuButtonBoundingClientRect();
|
btns.value = uni.getMenuButtonBoundingClientRect();
|
||||||
|
@ -787,12 +734,9 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
if (STORE_INFO.id) {
|
|
||||||
getCartList();
|
|
||||||
}
|
|
||||||
// 如果后台变更核销人员权限 可以及时切换
|
// 如果后台变更核销人员权限 可以及时切换
|
||||||
if (userStore.token && userStore.userInfo.mobile) {
|
if (userStore.token && userStore.userInfo.mobile) {
|
||||||
userInfoApi({store_id:STORE_INFO.id}).then(res => {
|
userInfoApi().then(res => {
|
||||||
const user = res.data;
|
const user = res.data;
|
||||||
userStore.setUserInfo(user);
|
userStore.setUserInfo(user);
|
||||||
if (!user.openid) loginUpdateUserApi({
|
if (!user.openid) loginUpdateUserApi({
|
||||||
|
@ -803,116 +747,14 @@
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/multipleShop/verificationOrder/index"
|
url: "/multipleShop/verificationOrder/index"
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
getCartList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//获取定位
|
|
||||||
const getLocation = () => {
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
uni.getSetting({
|
|
||||||
success(res) {
|
|
||||||
if (res.authSetting["scope.userLocation"] == false) {
|
|
||||||
LocationShowOpen()
|
|
||||||
} else {
|
|
||||||
opensettings(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5
|
|
||||||
userLocationfalse()
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
}
|
|
||||||
const LocationShowOpen = () => {
|
|
||||||
LocationShow.value = true;
|
|
||||||
}
|
|
||||||
const getAll = () => {
|
|
||||||
getgoodClassList(0)
|
|
||||||
getGoodList()
|
|
||||||
getCartList();
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取小程序定位
|
|
||||||
const opensettings = (a = false) => {
|
|
||||||
if (a == false) {
|
|
||||||
uni.openSetting({
|
|
||||||
success(res) {
|
|
||||||
LocationShow.value = false;
|
|
||||||
if (res.authSetting["scope.userLocation"] == true) {
|
|
||||||
uni.authorize({
|
|
||||||
scope: 'scope.userLocation',
|
|
||||||
success() {
|
|
||||||
uni.getLocation({
|
|
||||||
type: "gcj02",
|
|
||||||
success(res) {
|
|
||||||
location.lat = res.latitude;
|
|
||||||
location.long = res.longitude;
|
|
||||||
uni.setStorageSync('location', JSON.stringify(
|
|
||||||
location))
|
|
||||||
getStoreInfo(location).then(res => {
|
|
||||||
STORE_INFO.id = res.data.id
|
|
||||||
STORE_INFO.store_name = res.data.store_name
|
|
||||||
STORE_INFO.abbreviation = res.data
|
|
||||||
.abbreviation
|
|
||||||
getAll()
|
|
||||||
uni.setStorageSync('STORE_INFO', JSON
|
|
||||||
.stringify(STORE_INFO))
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
})
|
|
||||||
},
|
|
||||||
fail(e) {
|
|
||||||
userLocationfalse()
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail(e) {
|
|
||||||
userLocationfalse()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
uni.authorize({
|
|
||||||
scope: 'scope.userLocation',
|
|
||||||
success() {
|
|
||||||
uni.getLocation({
|
|
||||||
type: "gcj02",
|
|
||||||
success(res) {
|
|
||||||
location.lat = res.latitude;
|
|
||||||
location.long = res.longitude;
|
|
||||||
uni.setStorageSync('location', JSON.stringify(location))
|
|
||||||
getStoreInfo(location).then(res => {
|
|
||||||
STORE_INFO.id = res.data.id
|
|
||||||
STORE_INFO.store_name = res.data.store_name
|
|
||||||
STORE_INFO.abbreviation = res.data.abbreviation
|
|
||||||
|
|
||||||
getAll()
|
|
||||||
uni.setStorageSync('STORE_INFO', JSON.stringify(STORE_INFO))
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
})
|
|
||||||
},
|
|
||||||
fail(e) {
|
|
||||||
userLocationfalse()
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
//取消定位获取默认门店
|
|
||||||
const userLocationfalse = () => {
|
|
||||||
LocationShow.value = false;
|
|
||||||
uni.$u.toast('获取位置失败,为你展示默认门店')
|
|
||||||
getStoreInfoFn()
|
|
||||||
}
|
|
||||||
let instance; // 获取组件实例
|
let instance; // 获取组件实例
|
||||||
const getWXDom = () => {
|
const getWXDom = () => {
|
||||||
let query = uni.createSelectorQuery().in(instance).select("#drag_area");
|
let query = uni.createSelectorQuery().in(instance).select("#drag_area");
|
||||||
|
|
|
@ -7,18 +7,18 @@
|
||||||
</template>
|
</template>
|
||||||
</up-navbar>
|
</up-navbar>
|
||||||
<view class="login-box">
|
<view class="login-box">
|
||||||
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png" @click="test()">
|
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png">
|
||||||
</image>
|
</image>
|
||||||
<view class="tips">欢迎登录蜀优采</view>
|
<view class="tips">欢迎登录泸优采</view>
|
||||||
<block v-if="showWeixin">
|
<block v-if="showWeixin">
|
||||||
<up-transition :show="showWeixin">
|
<up-transition :show="showWeixin">
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<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" style="width: 7rem; margin: 1rem auto;" v-if="test_click>=8">
|
<view class="btn" v-if="config.ENV !='prod'">
|
||||||
<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"
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
<up-transition :show="!showWeixin">
|
<up-transition :show="!showWeixin">
|
||||||
<view class="form">
|
<view class="form">
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<up-input :customStyle="{height: '100%'}" v-model="loginForm.phone" placeholderClass="place"
|
<up-input :customStyle="{ height: '100%' }" v-model="loginForm.phone"
|
||||||
border="none" placeholder="请输入手机号" type="number">
|
placeholderClass="place" border="none" placeholder="请输入手机号" type="number">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
|
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
|
||||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/48491202404281006484208.png">
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/48491202404281006484208.png">
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
</up-input>
|
</up-input>
|
||||||
</view>
|
</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<up-input :customStyle="{height: '100%'}" v-model="loginForm.code" :maxlength="4"
|
<up-input :customStyle="{ height: '100%' }" v-model="loginForm.code" :maxlength="4"
|
||||||
placeholderClass="place" border="none" placeholder="请输入验证码" type="number">
|
placeholderClass="place" border="none" placeholder="请输入验证码" type="number">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
|
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<up-code :seconds="seconds" ref="uCodeRef" @change="codeChange"></up-code>
|
<up-code :seconds="seconds" ref="uCodeRef" @change="codeChange"></up-code>
|
||||||
<view style="color: #20B128;" @click="getCode">{{tips}}</view>
|
<view style="color: #20B128;" @click="getCode">{{ tips }}</view>
|
||||||
</template>
|
</template>
|
||||||
</up-input>
|
</up-input>
|
||||||
</view>
|
</view>
|
||||||
|
@ -67,8 +67,8 @@
|
||||||
微信登录
|
微信登录
|
||||||
</view>
|
</view>
|
||||||
<view class="agreement">
|
<view class="agreement">
|
||||||
<image v-if="!isAgree" @click="isAgree=true" src="@/static/icon/n-check.png"></image>
|
<image v-if="!isAgree" @click="isAgree = true" src="@/static/icon/n-check.png"></image>
|
||||||
<image v-else @click="isAgree=false" src="@/static/icon/check.png"></image>
|
<image v-else @click="isAgree = false" src="@/static/icon/check.png"></image>
|
||||||
<view>
|
<view>
|
||||||
我已同意<text>《用户协议》</text>与<text>《隐私政策》</text>
|
我已同意<text>《用户协议》</text>与<text>《隐私政策》</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -100,11 +100,8 @@
|
||||||
config
|
config
|
||||||
} from "@/config/app.js"
|
} from "@/config/app.js"
|
||||||
|
|
||||||
const test_click=ref(0);
|
|
||||||
const showOfficial = ref(false);
|
const showOfficial = ref(false);
|
||||||
const test=()=>{
|
|
||||||
test_click.value++
|
|
||||||
}
|
|
||||||
const navToIndex = () => {
|
const navToIndex = () => {
|
||||||
if (userStore.userInfo && userStore.token) uni.reLaunch({
|
if (userStore.userInfo && userStore.token) uni.reLaunch({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
|
@ -121,7 +118,6 @@
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 微信公众号绑定
|
// 微信公众号绑定
|
||||||
const officialCode = () => {
|
const officialCode = () => {
|
||||||
console.log("jinfas")
|
console.log("jinfas")
|
||||||
|
|
|
@ -3,19 +3,26 @@
|
||||||
<view style="text-align: center;">
|
<view style="text-align: center;">
|
||||||
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png">
|
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png">
|
||||||
</image>
|
</image>
|
||||||
<view class="tips">欢迎登录蜀优采</view>
|
<view class="tips">欢迎登录泸优采</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class='card'>
|
<view class='card'>
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<text>账号:</text>
|
<text>手机号:</text>
|
||||||
<up-input v-model="formData.account" placeholder="请输入账号或手机号"></up-input>
|
<up-input v-model="formData.account" placeholder="请输入手机号"></up-input>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin: 30rpx 0;">
|
<view style="margin: 30rpx 0;">
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;justify-content: space-between;align-items: center;">
|
<view style="display: flex;justify-content: space-between;align-items: center;">
|
||||||
<text style="margin-right: 20rpx;">密码:</text>
|
<text style="margin-right: 20rpx;">验证码:</text>
|
||||||
<up-input v-model="formData.password" placeholder="请输入密码" password="true"></up-input>
|
<up-input v-model="formData.code" placeholder="请输入验证码" type='number'></up-input>
|
||||||
|
<view class="code-btn">
|
||||||
|
<view style="margin: 0 20rpx;">
|
||||||
|
<up-line color="grey" direction="col" length="30rpx"></up-line>
|
||||||
|
</view>
|
||||||
|
<text class='btn-text' style="color: grey;" v-if='cutDown'>重新获取({{cutDown}})</text>
|
||||||
|
<text @click="getCode" class='btn-text' v-else> {{flag?'获取验证码':'重新获取' }} </text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-btn">
|
<view class="submit-btn">
|
||||||
|
@ -48,9 +55,8 @@
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
account: "",
|
account: "",
|
||||||
code: "",
|
code: "",
|
||||||
password:'',
|
|
||||||
terminal: 1,
|
terminal: 1,
|
||||||
scene: 1
|
scene: 2
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,7 @@
|
||||||
会员报备
|
会员报备
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">L -->
|
<view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
|
||||||
<view class="balance" @click="navgo('/pages/user_cash/index')">
|
|
||||||
<view class="" style="font-size: 28rpx;transform: translateY(10rpx);">
|
<view class="" style="font-size: 28rpx;transform: translateY(10rpx);">
|
||||||
余额:
|
余额:
|
||||||
</view>
|
</view>
|
||||||
|
@ -122,10 +121,6 @@
|
||||||
<up-cell title="预约记录" :isLink="true" url="/pageQuota/asset/lists"></up-cell> -->
|
<up-cell title="预约记录" :isLink="true" url="/pageQuota/asset/lists"></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 title="商品列表" :isLink="true" url="pages/product/product" v-if="userInfo.system_store_id>0"></up-cell>
|
|
||||||
<up-cell title="门店管理" :isLink="true" url="pagesOrder/store/index" v-if="userInfo.system_store_id>0"></up-cell>
|
|
||||||
<up-cell title="采购列表" :isLink="true" url="pageQuota/purchase_product_offer/index" v-if="userInfo.delivery_service_id>0"></up-cell>
|
|
||||||
<up-cell title="我要批发" :isLink="true" url="pages/wholesale/index" v-if="userInfo.label_id==99"></up-cell>
|
|
||||||
</up-cell-group>
|
</up-cell-group>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -1,254 +0,0 @@
|
||||||
<template>
|
|
||||||
|
|
||||||
<view class="page-box1">
|
|
||||||
<up-sticky offset-top="5">
|
|
||||||
<up-subsection :list="list1" :current="where.type" @change="sectionChange"></up-subsection>
|
|
||||||
<view style="margin: 0 20rpx; background-color: white;">
|
|
||||||
|
|
||||||
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
|
|
||||||
:showAction="false"></up-search>
|
|
||||||
</view>
|
|
||||||
</up-sticky>
|
|
||||||
<u-list @scrolltolower="loadMoreGood" :enableFlex="enable_flex">
|
|
||||||
<view v-if="frequentlyList.length>0" class="list">
|
|
||||||
<view class="shop-item" v-for="(item, index) in frequentlyList" :key="index" >
|
|
||||||
<image class="shop-img" :src="item.image"></image>
|
|
||||||
<view class="shop-content" style="width: 490rpx;">
|
|
||||||
<view class="title">
|
|
||||||
<view class="name u-line-2">{{item.store_name}}</view>
|
|
||||||
<view class="name u-line-2" style="color: red;">价格:¥{{item.price}}</view>
|
|
||||||
|
|
||||||
<!-- <view class="tip u-line-1">{{item.spec}}</view> -->
|
|
||||||
<view class="tip u-line-1">单位:{{item.unit_name}}</view>
|
|
||||||
<view class="tip u-line-1">规格:{{item.store_info}}</view>
|
|
||||||
<view class="tip u-line-1" style="justify-content: space-between;" v-if="item.batch">
|
|
||||||
<view style="display: flex;">
|
|
||||||
<view class="shop-content-li-l">起批量</view>
|
|
||||||
<view class="shop-content-li-r">{{ item.batch }}{{ item.unit_name }}起卖</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<u-loadmore :status="status" />
|
|
||||||
</view>
|
|
||||||
<view v-else style="margin-top: 100rpx;">
|
|
||||||
<up-empty :text="text"
|
|
||||||
icon="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/29955202404260944367594.png">
|
|
||||||
</up-empty>
|
|
||||||
</view>
|
|
||||||
</u-list>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
computed,
|
|
||||||
ref,
|
|
||||||
watch
|
|
||||||
} from 'vue';
|
|
||||||
import {
|
|
||||||
storeProductListApi
|
|
||||||
} from "@/api/good.js"
|
|
||||||
|
|
||||||
const frequentlyList = ref([]);
|
|
||||||
let text = '没有商品'
|
|
||||||
let status = ref('loadmore')
|
|
||||||
let list1 = ['零售', '商户', '供货价']
|
|
||||||
let keyword = ref('');
|
|
||||||
let enable_flex=ref(true)
|
|
||||||
const where = ref({
|
|
||||||
page_no: 1,
|
|
||||||
page_size: 15,
|
|
||||||
type: 0,
|
|
||||||
name: '',
|
|
||||||
store_name: '',
|
|
||||||
})
|
|
||||||
const getProductList = (loadmore = false) => {
|
|
||||||
if (loadmore) where.value.page_no++;
|
|
||||||
else where.value.page_no = 1;
|
|
||||||
storeProductListApi(where.value).then(res => {
|
|
||||||
if (res.data.lists.length == 0) {
|
|
||||||
status.value = 'nomore'
|
|
||||||
} else {
|
|
||||||
status.value = 'loadmore'
|
|
||||||
}
|
|
||||||
if (loadmore) {
|
|
||||||
frequentlyList.value.push(...res.data.lists);
|
|
||||||
} else {
|
|
||||||
frequentlyList.value = res.data.lists;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const sectionChange = (item) => {
|
|
||||||
where.value.type = item
|
|
||||||
getProductList()
|
|
||||||
}
|
|
||||||
const searchKeyword = () => {
|
|
||||||
where.value.name = keyword.value;
|
|
||||||
where.value.store_name = keyword.value;
|
|
||||||
getProductList();
|
|
||||||
}
|
|
||||||
// 商品列表触底
|
|
||||||
const loadMoreGood = () => {
|
|
||||||
status.value = 'loading'
|
|
||||||
getProductList(true)
|
|
||||||
}
|
|
||||||
getProductList()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.tabs {
|
|
||||||
color: #444444;
|
|
||||||
font-size: 32rpx;
|
|
||||||
margin-right: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabs-active {
|
|
||||||
color: #20B128;
|
|
||||||
// font-size: 34rpx;
|
|
||||||
transition: 300ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrap {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: calc(100vh - var(--window-top));
|
|
||||||
width: 100%;
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-box {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-item {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-box1 {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.total {
|
|
||||||
// margin-top: 10rpx;
|
|
||||||
padding: 0 40rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
// position: sticky;
|
|
||||||
// top: var(--window-top);
|
|
||||||
// left: 0;
|
|
||||||
// right: 0;
|
|
||||||
z-index: 100000 !important;
|
|
||||||
height: 60rpx;
|
|
||||||
line-height: 60rpx;
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
|
||||||
margin: 20rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.shop-item {
|
|
||||||
padding: 20rpx;
|
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
|
||||||
background-color: #fff;
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.shop-check {
|
|
||||||
width: 60rpx;
|
|
||||||
height: 120rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 40rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.shop-img {
|
|
||||||
height: 164rpx;
|
|
||||||
width: 164rpx;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
border-radius: 14rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shop-content {
|
|
||||||
width: 430rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
.name {
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tip {
|
|
||||||
color: #999;
|
|
||||||
font-size: 24rpx;
|
|
||||||
margin: 12rpx 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.price {
|
|
||||||
font-size: 30rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #F55726;
|
|
||||||
}
|
|
||||||
|
|
||||||
.price-btn {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.num {
|
|
||||||
margin: 0 20rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart-btn {
|
|
||||||
|
|
||||||
.cart-check {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 40rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
margin: 0 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-boxs {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.all-price {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
|
|
||||||
.price {
|
|
||||||
color: #20B128;
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: bottom;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,544 +0,0 @@
|
||||||
<template>
|
|
||||||
<view
|
|
||||||
style="--view-theme: rgb(32, 177, 40);--view-priceColor:#FF7600;--view-minorColor:rgba(108, 198, 94, 0.5);--view-minorColorT:rgba(66, 202, 77, 0.1);--view-bntColor:#FE960F;--view-gradient:#4DEA4D">
|
|
||||||
<view class='cash-withdrawal'>
|
|
||||||
<!-- #ifdef MP -->
|
|
||||||
<view class="accountTitle">
|
|
||||||
<view :style="{height:getHeight.barTop+'px'}"></view>
|
|
||||||
<view class="sysTitle acea-row row-center-wrapper" :style="{height:getHeight.barHeight+'px'}">
|
|
||||||
<text class="iconfont icon-ic_leftarrow" @click="goarrow"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view :style="{height:(getHeight.barTop+getHeight.barHeight)+'px'}"></view>
|
|
||||||
<!-- #endif -->
|
|
||||||
<view class="header">
|
|
||||||
<view class="headerCon">
|
|
||||||
<navigator url="/pageQuota/balanceDetail/index?type=2" hover-class="navigator-hover">
|
|
||||||
<view class="money">{{userInfo.now_money}}</view>
|
|
||||||
<view>可提现金额</view>
|
|
||||||
</navigator>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class='wrapper'>
|
|
||||||
<view>
|
|
||||||
<form @submit="subCash">
|
|
||||||
<view class="list">
|
|
||||||
<view class="itemCon">
|
|
||||||
<view class='item acea-row row-between-wrapper'>
|
|
||||||
<view class='name'>提现</view>
|
|
||||||
<view class='input acea-row row-between-wrapper'>
|
|
||||||
<input :value='cashVal' :maxlength="moneyMaxLeng"
|
|
||||||
:placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder'
|
|
||||||
name="money" type='digit'></input>
|
|
||||||
<view class="all" @click="allCash">全部提现</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class='tip'>
|
|
||||||
<navigator url="/pages/user_cash/list" hover-class="navigator-hover">
|
|
||||||
|
|
||||||
当前可提现金额: <text class="price">¥{{userInfo.now_money}}</text>
|
|
||||||
|
|
||||||
<text>查看提现记录</text>
|
|
||||||
</navigator>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class='tip'>
|
|
||||||
本月已提现金额:<text class="num">¥{{userInfo.extract_price}}</text>
|
|
||||||
</view>
|
|
||||||
<view class='tip'>
|
|
||||||
说明: <text class="num">{{userInfo.notes}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<button formType="submit"
|
|
||||||
style="margin-top: 15rpx;color: white; background-color: rgb(32, 177, 40); border-color: rgb(32, 177, 40); border-width: 1px; border-style: solid;">立即提现</button>
|
|
||||||
</form>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- #ifdef MP -->
|
|
||||||
<authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
|
|
||||||
<!-- #endif -->
|
|
||||||
|
|
||||||
<up-modal :show="IDCardShow" title="提现信息补充" showCancelButton @cancel="IDCardShow=false" @confirm="UpdateCard()">
|
|
||||||
<up-form labelPosition="left">
|
|
||||||
<up-form-item label="姓名:" label-width="80px">
|
|
||||||
<up-input v-model="real_name" border="none" placeholder="请输入对应的真实姓名"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="电话:" label-width="80px">
|
|
||||||
<up-input v-model="mobile" border="none" disabled></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="身份证号:" label-width="80px">
|
|
||||||
<up-input v-model="id_card" border="none" placeholder="请输入身份证号"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
</up-form>
|
|
||||||
</up-modal>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
getCashInfoApi,
|
|
||||||
CashApplicationApi,
|
|
||||||
getCashRecordApi,
|
|
||||||
UpdateIdCardApi
|
|
||||||
} from "@/api/user.js"
|
|
||||||
// import {
|
|
||||||
// extractCash,
|
|
||||||
// } from '@/api/user.js';
|
|
||||||
import {
|
|
||||||
mapGetters
|
|
||||||
} from "vuex";
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// #ifdef MP
|
|
||||||
getHeight: this.getWXStatusHeight(),
|
|
||||||
// #endif
|
|
||||||
index: 0,
|
|
||||||
minPrice: 1.00, //最低提现金额
|
|
||||||
userInfo: [],
|
|
||||||
prevent: true, //避免重复提交成功多次
|
|
||||||
moneyMaxLeng: 8,
|
|
||||||
withdraw_fee: '0',
|
|
||||||
true_money: 0,
|
|
||||||
cashVal: '',
|
|
||||||
IDCardShow: false,
|
|
||||||
id_card:'',
|
|
||||||
real_name:'',
|
|
||||||
mobile:''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters(['isLogin']),
|
|
||||||
disabled() {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad() {},
|
|
||||||
onShow() {
|
|
||||||
getCashInfoApi().then(res => {
|
|
||||||
this.userInfo = res.data;
|
|
||||||
this.mobile=res.data.mobile;
|
|
||||||
this.real_name=res.data.real_name;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goarrow() {
|
|
||||||
uni.navigateBack()
|
|
||||||
},
|
|
||||||
allCash() {
|
|
||||||
this.cashVal = '';
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.cashVal = this.userInfo.now_money;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 计算头部自定义导航高度;
|
|
||||||
getWXStatusHeight() {
|
|
||||||
// 获取距上
|
|
||||||
const barTop = uni.getSystemInfoSync().statusBarHeight;
|
|
||||||
// #ifdef MP
|
|
||||||
// 获取胶囊按钮位置信息
|
|
||||||
const menuButtonInfo = wx.getMenuButtonBoundingClientRect() || 0
|
|
||||||
// 获取导航栏高度
|
|
||||||
const barHeight = menuButtonInfo.height + (menuButtonInfo.top - barTop) * 2
|
|
||||||
let barWidth = menuButtonInfo.width
|
|
||||||
// #endif
|
|
||||||
// #ifndef MP
|
|
||||||
// 获取导航栏高度
|
|
||||||
const barHeight = parseInt(barTop) + 10;
|
|
||||||
let barWidth = '100%'
|
|
||||||
// #endif
|
|
||||||
return {
|
|
||||||
barHeight,
|
|
||||||
barTop,
|
|
||||||
barWidth
|
|
||||||
}
|
|
||||||
},
|
|
||||||
subCash: function(e) {
|
|
||||||
let that = this,
|
|
||||||
value = e.detail.value;
|
|
||||||
value.extract_type = 'balance';
|
|
||||||
|
|
||||||
if (value.money.length == 0) return uni.$u.toast('请填写提现金额');
|
|
||||||
|
|
||||||
if (Number(value.money) < Number(that.minPrice)) return uni.$u.toast('提现金额不能低于:¥' + that.minPrice);
|
|
||||||
if (this.prevent) {
|
|
||||||
this.prevent = false
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.userInfo.id_card==''||this.userInfo.id_card==null) {
|
|
||||||
this.IDCardShow = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
CashApplicationApi(value).then(res => {
|
|
||||||
uni.$u.toast(res.msg);
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/my/my`
|
|
||||||
})
|
|
||||||
}, 1500)
|
|
||||||
}).catch(err => {
|
|
||||||
return uni.$u.toast(err.msg);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
UpdateCard:function(){
|
|
||||||
UpdateIdCardApi({'id_card':this.id_card,'real_name':this.real_name}).then(res => {
|
|
||||||
uni.$u.toast(res.msg);
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/user_cash/index`
|
|
||||||
})
|
|
||||||
}, 1500)
|
|
||||||
}).catch(err => {
|
|
||||||
return uni.$u.toast(err.msg);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.cash-withdrawal {
|
|
||||||
.accountTitle {
|
|
||||||
background: linear-gradient(90deg, var(--view-theme) 0%, var(--view-gradient) 100%);
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 99;
|
|
||||||
|
|
||||||
.sysTitle {
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 30rpx;
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
position: absolute;
|
|
||||||
font-size: 36rpx;
|
|
||||||
left: 11rpx;
|
|
||||||
width: 60rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
width: 100%;
|
|
||||||
height: 380rpx;
|
|
||||||
background: linear-gradient(90deg, var(--view-theme) 0%, var(--view-gradient) 100%);
|
|
||||||
font-size: 30rpx;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #F5F5F5;
|
|
||||||
text-align: center;
|
|
||||||
padding-top: 88rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
content: ' ';
|
|
||||||
width: 50%;
|
|
||||||
height: 160rpx;
|
|
||||||
background: linear-gradient(180deg, var(--view-theme) 0%, #F5F5F5 100%);
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
position: absolute;
|
|
||||||
content: ' ';
|
|
||||||
width: 50%;
|
|
||||||
height: 160rpx;
|
|
||||||
background: linear-gradient(180deg, var(--view-gradient) 0%, #F5F5F5 100%);
|
|
||||||
right: 0;
|
|
||||||
bottom: -146rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.headerCon {
|
|
||||||
background-image: url('../static/cashBg.png');
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
width: 100%;
|
|
||||||
height: 278rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.money {
|
|
||||||
font-size: 76rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-family: 'Regular';
|
|
||||||
margin-bottom: 16rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper {
|
|
||||||
width: 710rpx;
|
|
||||||
margin: -100rpx auto 0 auto;
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
|
|
||||||
.nav {
|
|
||||||
width: 100%;
|
|
||||||
height: 110rpx;
|
|
||||||
background-color: rgba(255, 255, 255, 0.9);
|
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
|
|
||||||
&.on {
|
|
||||||
height: unset;
|
|
||||||
padding: 18rpx 0 8rpx 0;
|
|
||||||
background-color: #fff;
|
|
||||||
|
|
||||||
.item {
|
|
||||||
padding-top: 0;
|
|
||||||
padding-left: 30rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
|
||||||
width: 33.33%;
|
|
||||||
height: 84rpx;
|
|
||||||
line-height: 84rpx;
|
|
||||||
color: #666666;
|
|
||||||
font-size: 26rpx;
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
|
|
||||||
&.items {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: var(--view-theme);
|
|
||||||
font-weight: 500 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on {
|
|
||||||
width: 50%;
|
|
||||||
padding-left: 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.ons {
|
|
||||||
color: var(--view-theme);
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on1,
|
|
||||||
&.on2,
|
|
||||||
&.on3 {
|
|
||||||
font-weight: 400;
|
|
||||||
padding-left: 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on6,
|
|
||||||
&.on7,
|
|
||||||
&.on8,
|
|
||||||
&.on9 {
|
|
||||||
width: 25%;
|
|
||||||
font-weight: 400;
|
|
||||||
padding-left: 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navBg {
|
|
||||||
position: absolute;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
width: 710rpx;
|
|
||||||
height: 122rpx;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
&.on1 {
|
|
||||||
background-image: url('../static/tixian01.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on2 {
|
|
||||||
background-image: url('../static/tixian02.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on3 {
|
|
||||||
background-image: url('../static/tixian03.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on4 {
|
|
||||||
background-image: url('../static/tixian04.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on5 {
|
|
||||||
background-image: url('../static/tixian05.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on6 {
|
|
||||||
background-image: url('../static/tixian06.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on7 {
|
|
||||||
background-image: url('../static/tixian07.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on8 {
|
|
||||||
background-image: url('../static/tixian08.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
&.on9 {
|
|
||||||
background-image: url('../static/tixian09.png');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bnt {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
|
||||||
width: 710rpx;
|
|
||||||
height: 88rpx;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
line-height: 88rpx;
|
|
||||||
margin: 48rpx auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list {
|
|
||||||
padding: 0 30rpx 48rpx 30rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 0 0 24rpx 24rpx;
|
|
||||||
|
|
||||||
.itemCon {
|
|
||||||
border-bottom: 1px solid #EEEEEE;
|
|
||||||
padding-bottom: 15rpx;
|
|
||||||
margin-bottom: 42rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .item {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333;
|
|
||||||
padding: 28rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .item .name {
|
|
||||||
width: 130rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .item .input {
|
|
||||||
width: 505rpx;
|
|
||||||
|
|
||||||
input {
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-ic_camera {
|
|
||||||
font-size: 38rpx;
|
|
||||||
margin-bottom: 6rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.all {
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: var(--view-theme);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .item .input .placeholder {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .item .picEwm,
|
|
||||||
.cash-withdrawal .wrapper .list .item .pictrue {
|
|
||||||
width: 128rpx;
|
|
||||||
height: 128rpx;
|
|
||||||
border-radius: 14rpx;
|
|
||||||
position: relative;
|
|
||||||
margin-right: 23rpx;
|
|
||||||
background: #F5F5F5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .item .picEwm image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 3rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .item .picEwm .icon-ic_close {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
font-size: 24rpx;
|
|
||||||
width: 32rpx;
|
|
||||||
height: 32rpx;
|
|
||||||
background: #999999;
|
|
||||||
border-radius: 0 16rpx 0 16rpx;
|
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 32rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .item .pictrue {
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #BBBBBB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .item .pictrue .icon-icon25201 {
|
|
||||||
font-size: 47rpx;
|
|
||||||
color: #DDDDDD;
|
|
||||||
margin-bottom: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .tip {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999;
|
|
||||||
margin-top: 16rpx;
|
|
||||||
|
|
||||||
.price {
|
|
||||||
color: var(--view-theme);
|
|
||||||
margin: 0 16rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.num {
|
|
||||||
margin-left: 16rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .tip2 {
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #999;
|
|
||||||
text-align: center;
|
|
||||||
margin: 44rpx 0 20rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .value {
|
|
||||||
height: 135rpx;
|
|
||||||
line-height: 135rpx;
|
|
||||||
border-bottom: 1rpx solid #eee;
|
|
||||||
width: 690rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .value input {
|
|
||||||
font-size: 80rpx;
|
|
||||||
color: #282828;
|
|
||||||
height: 135rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cash-withdrawal .wrapper .list .value .placeholder2 {
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-gray {
|
|
||||||
background-color: var(--view-theme);
|
|
||||||
opacity: 0.4;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,93 +0,0 @@
|
||||||
<template>
|
|
||||||
<block v-if="lists.length>0">
|
|
||||||
<view class="content">
|
|
||||||
<view class="li" v-for="(item,index) in lists" :key="index">
|
|
||||||
<view class="li-top">
|
|
||||||
<text>{{item.title}}</text>
|
|
||||||
<text style="font-weight: bold;" :style="{color:item.pay_status=='1'?'#50C758':'red'
|
|
||||||
}">{{item.price}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="li-top" style="margin-bottom: 0;">
|
|
||||||
<text style="font-size: 24rpx;color: grey;">{{item.create_time}}</text>
|
|
||||||
<text style="font-size: 24rpx;color: grey;" >{{item.status_name}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
<up-empty v-else mode="history" style="margin-top: 20vh;" text='没有更多内容了'>
|
|
||||||
</up-empty>
|
|
||||||
|
|
||||||
<view style="height: 50rpx;">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
reactive
|
|
||||||
} from "vue"
|
|
||||||
import {
|
|
||||||
onLoad,
|
|
||||||
onPullDownRefresh
|
|
||||||
} from "@dcloudio/uni-app"
|
|
||||||
import {
|
|
||||||
getCashRecordApi
|
|
||||||
} from "@/api/user.js"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const mark = ref(0)
|
|
||||||
|
|
||||||
const lists = ref([])
|
|
||||||
let type = ref('')
|
|
||||||
const getLists = async (isPullDown = false) => {
|
|
||||||
|
|
||||||
let res = await getCashRecordApi({
|
|
||||||
|
|
||||||
})
|
|
||||||
lists.value = res.data
|
|
||||||
|
|
||||||
|
|
||||||
if (isPullDown) uni.stopPullDownRefresh()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
onLoad((opt) => {
|
|
||||||
type.value = opt.type
|
|
||||||
|
|
||||||
getLists()
|
|
||||||
})
|
|
||||||
|
|
||||||
onPullDownRefresh(() => {
|
|
||||||
getLists(true)
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.content {
|
|
||||||
background-color: white;
|
|
||||||
width: 690rpx;
|
|
||||||
padding: 20rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin: 0 auto;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
margin-bottom: 100rpx;
|
|
||||||
|
|
||||||
.li {
|
|
||||||
margin-top: 20rpx;
|
|
||||||
border-bottom: 1px solid #EDF2FA;
|
|
||||||
padding-bottom: 20rpx;
|
|
||||||
|
|
||||||
.li-top {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,34 +0,0 @@
|
||||||
<template>
|
|
||||||
<view style="--view-theme: #42CA4D;--view-priceColor:#FF7600;--view-minorColor:rgba(108, 198, 94, 0.5);--view-minorColorT:rgba(66, 202, 77, 0.1);--view-bntColor:#FE960F;--view-gradient:#4DEA4D">
|
|
||||||
<view class="px-20 mt-40">
|
|
||||||
<view class="bg--w111-fff rd-24rpx flex-col flex-center box">
|
|
||||||
<text class="iconfont icon-a-ic_CompleteSelect"></text>
|
|
||||||
<view class="fs-32 lh-44rpx mt-64">提现申请已提交,等待人工审核</view>
|
|
||||||
<view class="w-498 h-88 rd-44rpx flex-center fs-28 text--w111-fff bg-color mt-30" @tap="goPage">好的</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'status',
|
|
||||||
methods:{
|
|
||||||
goPage(){
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/my'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.box{
|
|
||||||
padding: 88rpx 0 64rpx;
|
|
||||||
}
|
|
||||||
.icon-a-ic_CompleteSelect{
|
|
||||||
font-size: 112rpx;
|
|
||||||
color: #00B42A;
|
|
||||||
}
|
|
||||||
</style>
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,82 +2,42 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<up-form labelPosition="left" :model="formData" :rules="rules" ref="uForm" labelWidth="100">
|
<up-form labelPosition="left" :model="formData" :rules="rules" ref="uForm" labelWidth="100">
|
||||||
<up-form-item label="联系人" prop="real_name" borderBottom>
|
<up-form-item label="收货人" prop="real_name" borderBottom>
|
||||||
<up-input v-model="formData.real_name" disabledColor="#ffffff" border="none"
|
<up-input v-model="formData.real_name" disabledColor="#ffffff" border="none"
|
||||||
placeholder="请填写联系人姓名"></up-input>
|
placeholder="请填写收货人姓名"></up-input>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
<up-form-item label="联系电话" prop="phone" borderBottom>
|
<up-form-item label="联系电话" prop="phone" borderBottom>
|
||||||
<up-input v-model="formData.phone" disabledColor="#ffffff" type="number" placeholder="请填写联系电话"
|
<up-input v-model="formData.phone" disabledColor="#ffffff" type="number" placeholder="请填写联系电话"
|
||||||
border="none"></up-input>
|
border="none"></up-input>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
<up-form-item label="所在位置" prop="address" borderBottom>
|
<!-- <up-form-item label="所在位置" prop="address" borderBottom>
|
||||||
<view @click="showPop = true" style="width: 100%;">
|
<up-input v-model="formData.address" disabledColor="#ffffff" type="number"
|
||||||
<up-input style="pointer-events: none" v-model="formData.address" border="none" prefixIcon="map"
|
@click='showAddressPop=true' placeholder="点击选择位置" border="none"></up-input>
|
||||||
readonly placeholder="点击选择地址" :customStyle="{
|
<template #right>
|
||||||
background: '#F3F3F3', padding: '20rpx',
|
<up-icon name="arrow-right"></up-icon>
|
||||||
'border-radius': '30rpx'
|
</template>
|
||||||
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"
|
</up-form-item> -->
|
||||||
suffixIcon='arrow-down'></up-input>
|
<up-form-item label="详细地址" prop="detail" borderBottom>
|
||||||
</view>
|
|
||||||
</up-form-item>
|
|
||||||
<!-- <up-form-item label="详细地址" prop="detail" borderBottom>
|
|
||||||
<up-input v-model="formData.detail" disabledColor="#ffffff" placeholder="请填写详细地址"
|
<up-input v-model="formData.detail" disabledColor="#ffffff" placeholder="请填写详细地址"
|
||||||
border="none"></up-input>
|
border="none"></up-input>
|
||||||
</up-form-item> -->
|
</up-form-item>
|
||||||
</up-form>
|
</up-form>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="card">
|
<view class="card">
|
||||||
<view class="is-default">
|
<view class="is-default">
|
||||||
<view>设置为默认地址</view>
|
<view>设置为默认地址</view>
|
||||||
<up-switch v-model="formData.is_default" :activeValue="1" :inactiveValue="0"
|
<up-switch v-model="formData.is_default" :activeValue="1" :inactiveValue="0"
|
||||||
activeColor="#20B128"></up-switch>
|
activeColor="#20B128"></up-switch>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
<view class="bottom-fixed">
|
<view class="bottom-fixed">
|
||||||
<up-button color="#20B128" shape="circle" @click="submit">保存</up-button>
|
<up-button color="#20B128" shape="circle" @click="submit">保存</up-button>
|
||||||
</view>
|
</view>
|
||||||
<!-- 地址选择器 -->
|
<!-- 地址选择器 -->
|
||||||
<up-popup :show="showPop" @close="showPop = false" @open="showPop = true" :round="10">
|
<up-popup :show="showAddressPop" @close="showAddressPop=false" @open="showAddressPop=true" :round="10">
|
||||||
<view style="padding: 20rpx;">
|
<view class='address-pop'>
|
||||||
<up-tabs :list="tabsList" @change='addressTbasChange' :current='currentAddressIndex' lineColor='#20B128'
|
<view class="title">
|
||||||
: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)">
|
|
||||||
<text>{{ item.city_name }}</text>
|
|
||||||
<up-icon name="arrow-right" :color="item.city_code == formData.city ? '#20B128' : '#777777'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="address-content" v-else-if='currentAddressIndex == 1'>
|
|
||||||
<view class="address-li" v-for="item in addressList.area" @click="addressLiClick(1, item)"
|
|
||||||
:key="item.area_code" :class='{ act: item.area_code == formData.area }'>
|
|
||||||
<text>{{ item.area_name }}</text>
|
|
||||||
<up-icon name="arrow-right" :color="item.area_code == formData.area ? '#20B128' : '#777777'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="address-content" v-else-if='currentAddressIndex == 2'>
|
|
||||||
<view class="address-li" v-for="item in addressList.street" @click="addressLiClick(2, item)"
|
|
||||||
:key="item.street_code" :class='{ act: item.street_code == formData.street }'>
|
|
||||||
<text>{{ item.street_name }}</text>
|
|
||||||
<up-icon name="arrow-right"
|
|
||||||
:color="item.street_code == formData.street ? '#20B128' : '#777777'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="address-content" v-else-if='currentAddressIndex == 3'>
|
|
||||||
<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'" />
|
|
||||||
</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)">
|
|
||||||
<text>{{ item.brigade_name }}</text>
|
|
||||||
<up-icon name="arrow-right" :color="item.id == formData.brigade ? '#20B128' : '#777777'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
|
@ -91,7 +51,6 @@
|
||||||
onLoad
|
onLoad
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import {
|
import {
|
||||||
reactive,
|
|
||||||
ref
|
ref
|
||||||
} from "vue"
|
} from "vue"
|
||||||
import {
|
import {
|
||||||
|
@ -99,38 +58,17 @@
|
||||||
addressEditApi,
|
addressEditApi,
|
||||||
addressDetailApi
|
addressDetailApi
|
||||||
} from "@/api/user.js"
|
} from "@/api/user.js"
|
||||||
import {
|
|
||||||
provinceListApi,
|
|
||||||
cityListApi,
|
|
||||||
areaListApi,
|
|
||||||
streetListApi,
|
|
||||||
villageListApi,
|
|
||||||
brigadeListApi
|
|
||||||
} from "@/api/address.js"
|
|
||||||
import useUserStore from "@/store/user";
|
|
||||||
|
|
||||||
const mode = ref('add');
|
const mode = ref('add');
|
||||||
const type = ref('');
|
|
||||||
const showAddressPop = ref(false)
|
const showAddressPop = ref(false)
|
||||||
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
real_name: '',
|
real_name: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
detail: '',
|
detail: '',
|
||||||
is_default: 1,
|
is_default: 0,
|
||||||
province: 510000,
|
|
||||||
city: '',
|
|
||||||
area: "",
|
|
||||||
street: "",
|
|
||||||
village: "",
|
|
||||||
brigade: "",
|
|
||||||
address: ""
|
address: ""
|
||||||
})
|
})
|
||||||
const userInfo = useUserStore().userInfo;
|
|
||||||
if (userInfo) {
|
|
||||||
formData.value.phone = userInfo.mobile
|
|
||||||
formData.value.real_name = userInfo.real_name
|
|
||||||
}
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
real_name: [{
|
real_name: [{
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -157,30 +95,19 @@
|
||||||
const uForm = ref(null);
|
const uForm = ref(null);
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
uForm.value.validate().then(() => {
|
uForm.value.validate().then(() => {
|
||||||
|
console.log('验证通过');
|
||||||
if (mode.value == 'add') {
|
if (mode.value == 'add') {
|
||||||
addressCreateApi(formData.value).then(res => {
|
addressCreateApi(formData.value).then(res => {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
uni.$u.sleep(800).then(res => {
|
uni.$u.sleep(800).then(res => {
|
||||||
if (type.value == 'settle') {
|
uni.navigateBack();
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pagesOrder/settle/settle'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
addressEditApi(formData.value).then(res => {
|
addressEditApi(formData.value).then(res => {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
uni.$u.sleep(800).then(res => {
|
uni.$u.sleep(800).then(res => {
|
||||||
if (type.value == 'settle') {
|
uni.navigateBack();
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pagesOrder/settle/settle'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -196,106 +123,8 @@
|
||||||
formData.value = res.data;
|
formData.value = res.data;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 地址选择
|
|
||||||
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) => {
|
|
||||||
currentAddressIndex.value = e.index
|
|
||||||
}
|
|
||||||
|
|
||||||
const addressList = reactive({
|
|
||||||
city: [],
|
|
||||||
area: [],
|
|
||||||
street: [],
|
|
||||||
village: [],
|
|
||||||
brigade: []
|
|
||||||
})
|
|
||||||
const addressLiClick = async (i, item) => {
|
|
||||||
if (i == 0) {
|
|
||||||
formData.value.city = item.city_code
|
|
||||||
tabsList[0].name = item.city_name
|
|
||||||
let res = await areaListApi({
|
|
||||||
city_code: formData.value.city
|
|
||||||
})
|
|
||||||
addressList.area = res.data
|
|
||||||
}
|
|
||||||
if (i == 1) {
|
|
||||||
formData.value.area = item.area_code
|
|
||||||
tabsList[1].name = item.area_name
|
|
||||||
let res = await streetListApi({
|
|
||||||
area_code: formData.value.area
|
|
||||||
})
|
|
||||||
addressList.street = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == 2) {
|
|
||||||
formData.value.street = item.street_code
|
|
||||||
tabsList[2].name = item.street_name
|
|
||||||
let res = await villageListApi({
|
|
||||||
street_code: formData.value.street
|
|
||||||
})
|
|
||||||
addressList.village = res.data
|
|
||||||
}
|
|
||||||
if (i == 3) {
|
|
||||||
formData.value.village = item.village_code
|
|
||||||
tabsList[3].name = item.village_name
|
|
||||||
let res = await brigadeListApi({
|
|
||||||
village_code: formData.value.village
|
|
||||||
})
|
|
||||||
addressList.brigade = res.data
|
|
||||||
}
|
|
||||||
if (i == 4) {
|
|
||||||
formData.value.brigade = item.id
|
|
||||||
tabsList[4].name = item.brigade_name
|
|
||||||
|
|
||||||
formData.value.address = tabsList[0].name + tabsList[1].name + tabsList[2].name + tabsList[3].name +
|
|
||||||
tabsList[4].name
|
|
||||||
return showPop.value = false
|
|
||||||
}
|
|
||||||
formData.value.address = tabsList[0].name + tabsList[1].name + tabsList[2].name + tabsList[3].name +
|
|
||||||
tabsList[4]
|
|
||||||
.name
|
|
||||||
return currentAddressIndex.value++
|
|
||||||
}
|
|
||||||
const getCityList = async () => {
|
|
||||||
let res = await cityListApi({
|
|
||||||
province_code: formData.value.province
|
|
||||||
})
|
|
||||||
addressList.city = res.data
|
|
||||||
}
|
|
||||||
const tabsList = reactive(
|
|
||||||
[{
|
|
||||||
name: "请选择"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '请选择',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '请选择',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '请选择',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '请选择',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
if (options.type) {
|
|
||||||
type.value = options.type
|
|
||||||
}
|
|
||||||
if (options.mode == 'edit' && options.address_id) {
|
if (options.mode == 'edit' && options.address_id) {
|
||||||
mode.value = 'edit';
|
mode.value = 'edit';
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
@ -305,8 +134,6 @@
|
||||||
} else uni.setNavigationBarTitle({
|
} else uni.setNavigationBarTitle({
|
||||||
title: '新增地址'
|
title: '新增地址'
|
||||||
})
|
})
|
||||||
getCityList()
|
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -344,22 +171,15 @@
|
||||||
/* 适用于Android设备 */
|
/* 适用于Android设备 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-content {
|
.address-pop {
|
||||||
padding: 20rpx;
|
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
|
padding: 20rpx;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
.address-li {
|
.title {
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #777777;
|
color: black;
|
||||||
margin: 30rpx 0;
|
text-align: center;
|
||||||
}
|
|
||||||
|
|
||||||
.act {
|
|
||||||
color: #20B128;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,211 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="shop-item">
|
|
||||||
<view class="item-title" @click="navTo">
|
|
||||||
<view>{{order_id}}</view>
|
|
||||||
<view v-if="datas.paid==0">
|
|
||||||
<text>待付款</text>
|
|
||||||
</view>
|
|
||||||
<view v-else>
|
|
||||||
<text v-if="datas.status==0">待核销</text>
|
|
||||||
<text v-if="datas.status==1">待核销</text>
|
|
||||||
<text v-if="datas.status==2||datas.status==3">已完成</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="item-body" @click="navTo">
|
|
||||||
<view class="body-content">
|
|
||||||
<view>
|
|
||||||
<view v-for="(item,index) in datas.goods_list" :key="index"
|
|
||||||
style="display: flex;margin-bottom: 20rpx;">
|
|
||||||
<image class="image" :src="item.image"></image>
|
|
||||||
<view style="width: 520rpx;">
|
|
||||||
<view class="" style="display: flex;justify-content: space-between;">
|
|
||||||
<view>
|
|
||||||
{{item.store_name}}
|
|
||||||
</view>
|
|
||||||
<view style="font-size: 32rpx;">
|
|
||||||
¥{{item.price}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="" style="display: flex;justify-content: space-between;">
|
|
||||||
<view>
|
|
||||||
{{item.unit_name}}
|
|
||||||
</view>
|
|
||||||
<view style="font-size: 32rpx;">
|
|
||||||
x{{item.cart_num}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <view
|
|
||||||
style="display: flex;flex-direction: column;align-items: center;justify-content: center;width: 100rpx;">
|
|
||||||
<up-icon name="arrow-right-double" color="#20B128"></up-icon>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
|
||||||
<view class="all">共 {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.pay_price}}</text> </view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="item-btn">
|
|
||||||
|
|
||||||
<view @click="navTo" style="width: 80px;">
|
|
||||||
<up-button size="small" plain color="#20B128" shape="circle">查看详情</up-button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
reactive,
|
|
||||||
nextTick
|
|
||||||
} from "vue"
|
|
||||||
// 订单状态(0:待发货;1:待收货;2:已完成;3:已完成)
|
|
||||||
const props = defineProps({
|
|
||||||
type: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
},
|
|
||||||
datas: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {}
|
|
||||||
},
|
|
||||||
status: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
order_id: {
|
|
||||||
type: String,
|
|
||||||
default: '0'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const navTo = () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pagesOrder/detail/detail?is_mer=1&id=${props.datas.id}`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const emit = defineEmits(['cancleOrder', 'rePay', 'takeOrder', 'purchaseAgain']);
|
|
||||||
const cancleOrder = () => {
|
|
||||||
emit('cancleOrder', props.datas)
|
|
||||||
}
|
|
||||||
|
|
||||||
const takeOrder = () => {
|
|
||||||
emit('takeOrder', props.datas)
|
|
||||||
}
|
|
||||||
|
|
||||||
const purchaseAgain = () => {
|
|
||||||
emit('purchaseAgain', props.datas)
|
|
||||||
}
|
|
||||||
|
|
||||||
const rePay = () => {
|
|
||||||
emit('rePay', props.datas)
|
|
||||||
}
|
|
||||||
|
|
||||||
const applySh = () => {
|
|
||||||
emit('applyAfterSales', props.datas)
|
|
||||||
}
|
|
||||||
|
|
||||||
const showVerifyFn = () => {
|
|
||||||
emit('showVerifyFn', props.datas)
|
|
||||||
}
|
|
||||||
|
|
||||||
const showVerifyPop = ref(false)
|
|
||||||
const options = reactive({
|
|
||||||
width: 500, // 宽度 单位rpx
|
|
||||||
height: 100, // 高度 单位rpx
|
|
||||||
code: props.datas.verify_code, // 生成条形码的值
|
|
||||||
}, )
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.shop-item {
|
|
||||||
width: 710rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 14rpx;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.item-title {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-body {
|
|
||||||
margin: 20rpx 0;
|
|
||||||
|
|
||||||
.body-content {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
color: #989898;
|
|
||||||
|
|
||||||
.image {
|
|
||||||
width: 120rpx;
|
|
||||||
height: 120rpx;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
border-radius: 14rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.all {
|
|
||||||
text-align: right;
|
|
||||||
font-size: 26rpx;
|
|
||||||
|
|
||||||
text {
|
|
||||||
color: #F55726;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-btn {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
|
|
||||||
view {
|
|
||||||
width: 80rpx;
|
|
||||||
margin-left: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-close {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #F6F6F6;
|
|
||||||
padding: 15rpx;
|
|
||||||
border-radius: 14rpx;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.type {
|
|
||||||
font-weight: 600;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,501 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="wrap">
|
|
||||||
|
|
||||||
<up-sticky bgColor="#fff">
|
|
||||||
<view style="padding: 10rpx 20rpx 0 20rpx;">
|
|
||||||
<up-search shape="round" v-model="keyword" @custom="searchOn" @search="searchOn" @clear="searchOn"
|
|
||||||
:actionStyle="{color: '#20b128'}"></up-search>
|
|
||||||
</view>
|
|
||||||
<up-tabs :current="tabsActive" :list="tablist" lineColor="#20b128" :scrollable="false"
|
|
||||||
:activeStyle=" { color: '#20b128', fontWeight: 'bold' }" @change="changeTab"></up-tabs>
|
|
||||||
</up-sticky>
|
|
||||||
|
|
||||||
<swiper class="swiper-box" :current="swiperCurrent" @animationfinish="animationfinish">
|
|
||||||
<swiper-item class="swiper-item" v-for="(list, k) in orderList" :key="k">
|
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="loadMoreGood"
|
|
||||||
@refresherrefresh="refresherrefresh(1)" :refresher-triggered="triggered" refresher-enabled
|
|
||||||
refresher-background="#F6F6F6">
|
|
||||||
<view class="page-box">
|
|
||||||
<view v-if="list.length>0" class="list">
|
|
||||||
<good v-for="(item, index) in list" :datas="item" :key="index" :type="k" :status="status"
|
|
||||||
:order_id='item.order_id' @cancleOrder="cancleOrder" @takeOrder="takeOrder"
|
|
||||||
@rePay="rePay" @purchaseAgain="purchaseAgain" @applyAfterSales="applyAfterSales"
|
|
||||||
@showVerifyFn='showVerifyFn'></good>
|
|
||||||
</view>
|
|
||||||
<view v-if="!where[k].loading&&list.length==0" style="padding-top: 100rpx;">
|
|
||||||
<up-empty text="订单空空如也"
|
|
||||||
icon="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/29955202404260944367594.png">
|
|
||||||
</up-empty>
|
|
||||||
</view>
|
|
||||||
<view v-else-if="where[k].loadend" style="padding-top: 100rpx;">
|
|
||||||
<view style="text-align: center;color: #999;">没有更多了</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="where[k].loading"
|
|
||||||
style="padding-top: 100rpx;display: flex;flex-direction: column;align-items: center;">
|
|
||||||
<up-loading-icon mode="circle"></up-loading-icon>
|
|
||||||
<view style="margin-top: 20rpx;color: #999;">加载中</view>
|
|
||||||
</view>
|
|
||||||
<view style="width: 100%;height: 300rpx;"></view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
onLoad,
|
|
||||||
onUnload,
|
|
||||||
onPullDownRefresh
|
|
||||||
} from "@dcloudio/uni-app"
|
|
||||||
import {
|
|
||||||
ref
|
|
||||||
} from 'vue';
|
|
||||||
import good from "./component/goods.vue";
|
|
||||||
import orderCanclePopup from "@/components/orderCanclePopup.vue"
|
|
||||||
import modal from "@/components/modal.vue"
|
|
||||||
import ZyPasswordboard from '@/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue';
|
|
||||||
import {
|
|
||||||
cancelOrderApi,
|
|
||||||
rePaymentApi,
|
|
||||||
confirmReceiptApi,
|
|
||||||
storeOrderListApi,
|
|
||||||
purchaseAgainApi
|
|
||||||
} from "@/api/order.js"
|
|
||||||
import {
|
|
||||||
userInfoApi
|
|
||||||
} from "@/api/user.js"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const tabsActive = ref(0)
|
|
||||||
const changeTab = ({
|
|
||||||
index
|
|
||||||
}) => {
|
|
||||||
tabsActive.value = index;
|
|
||||||
swiperCurrent.value = index;
|
|
||||||
}
|
|
||||||
const tablist = ref([{
|
|
||||||
name: '全部'
|
|
||||||
},{
|
|
||||||
name: '待核销'
|
|
||||||
}, {
|
|
||||||
name: '已核销'
|
|
||||||
}, {
|
|
||||||
name: '退款/售后'
|
|
||||||
}]);
|
|
||||||
|
|
||||||
const swiperCurrent = ref(0);
|
|
||||||
const animationfinish = ({
|
|
||||||
detail: {
|
|
||||||
current
|
|
||||||
}
|
|
||||||
}) => {
|
|
||||||
swiperCurrent.value = current;
|
|
||||||
tabsActive.value = current;
|
|
||||||
|
|
||||||
if (swiperCurrent.value == 0 && orderList.value[0].length == 0) getOrderList(0, '', ''); //全部
|
|
||||||
if (swiperCurrent.value == 2 && orderList.value[2].length == 0) getOrderList(2, 1, 1); //待核销
|
|
||||||
if (swiperCurrent.value == 3 && orderList.value[3].length == 0) getOrderList(3, 2, 1); //已核销
|
|
||||||
if (swiperCurrent.value == 4 && orderList.value[4].length == 0) getOrderList(4, -1, 1); //退款
|
|
||||||
}
|
|
||||||
|
|
||||||
const showVerifyPop = ref(false)
|
|
||||||
const orderData = ref({})
|
|
||||||
const showVerifyFn = (e) => {
|
|
||||||
showVerifyPop.value = true
|
|
||||||
orderData.value = e
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 确认收货
|
|
||||||
const showTake = ref(false);
|
|
||||||
let takeId = "";
|
|
||||||
const takeOrder = (e) => {
|
|
||||||
takeId = e.id;
|
|
||||||
showTake.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 确认收货
|
|
||||||
const confirmReceipt = () => {
|
|
||||||
confirmReceiptApi({
|
|
||||||
order_id: takeId
|
|
||||||
}).then(res => {
|
|
||||||
showTake.value = false;
|
|
||||||
uni.$u.toast('确认收货成功');
|
|
||||||
reloadAll();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 申请售后<!--sb项目-->
|
|
||||||
const refundShow = ref(false);
|
|
||||||
const goodsList = ref([]); // 申请售后商品
|
|
||||||
const afterSalesType = ref(''); //申请售后类型 0 1 2
|
|
||||||
const orderId = ref('');
|
|
||||||
|
|
||||||
// 申请售后
|
|
||||||
const applyAfterSales = (item) => {
|
|
||||||
refundShow.value = true;
|
|
||||||
goodsList.value = item.goods_list;
|
|
||||||
orderId.value = item.id;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 跳转到申请售后
|
|
||||||
const onPageToAfterSales = () => {
|
|
||||||
if (afterSalesType.value === '') return uni.$u.toast('请选择售后类型');
|
|
||||||
if (!goodsList.value || goodsList.value.length == 0) return uni.$u.toast('暂无可申请售后的商品');
|
|
||||||
let goods = goodsList.value.find(i => i.isSelected);
|
|
||||||
if (goods == undefined) return uni.$u.toast('请选择需要申请售后的商品');
|
|
||||||
|
|
||||||
let ids = [];
|
|
||||||
let goodsListSel = [];
|
|
||||||
goodsList.value.map(i => {
|
|
||||||
if (i.isSelected) {
|
|
||||||
ids.push(i.old_cart_id);
|
|
||||||
goodsListSel.push(i);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/afterSales/afterSales",
|
|
||||||
success(res) {
|
|
||||||
refundShow.value = false; // close modal
|
|
||||||
res.eventChannel.emit('orderDetail', {
|
|
||||||
id: orderId.value, //订单id
|
|
||||||
old_cart_id: ids,
|
|
||||||
refund_type: afterSalesType.value,
|
|
||||||
goodsList: goodsListSel
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 选择物品
|
|
||||||
const onChooseGoods = (item) => {
|
|
||||||
if (item.hasOwnProperty('isSelected')) {
|
|
||||||
item.isSelected = !item.isSelected;
|
|
||||||
} else {
|
|
||||||
item.isSelected = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const closeKeyBord = () => {
|
|
||||||
password.value = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 订单
|
|
||||||
const where = ref([{
|
|
||||||
page_no: 1,
|
|
||||||
page_size: 25,
|
|
||||||
loading: false,
|
|
||||||
loadend: false
|
|
||||||
}, {
|
|
||||||
page_no: 1,
|
|
||||||
page_size: 25,
|
|
||||||
loading: false,
|
|
||||||
loadend: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
page_no: 1,
|
|
||||||
page_size: 25,
|
|
||||||
loading: false,
|
|
||||||
loadend: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
page_no: 1,
|
|
||||||
page_size: 25,
|
|
||||||
loading: false,
|
|
||||||
loadend: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
page_no: 1,
|
|
||||||
page_size: 25,
|
|
||||||
loading: false,
|
|
||||||
loadend: false
|
|
||||||
}
|
|
||||||
])
|
|
||||||
const keyword = ref('')
|
|
||||||
const orderList = ref([
|
|
||||||
[],
|
|
||||||
[],
|
|
||||||
[],
|
|
||||||
[],
|
|
||||||
[]
|
|
||||||
])
|
|
||||||
const getOrderList = (type = 0, status = '', paid = 1, ifPullReFresh = false) => {
|
|
||||||
if (where.value[type].loadend) return;
|
|
||||||
where.value[type].loading = true;
|
|
||||||
storeOrderListApi({
|
|
||||||
page_no: where.value[type].page_no,
|
|
||||||
page_size: where.value[type].page_size,
|
|
||||||
order_id: keyword.value,
|
|
||||||
status: status,
|
|
||||||
paid: paid
|
|
||||||
}).then(res => {
|
|
||||||
if (where.value[type].page_no == 1) orderList.value[type] = [];
|
|
||||||
orderList.value[type] = [...orderList.value[type], ...res.data.lists];
|
|
||||||
if (res.data.lists.length < where.value[type].page_size) where.value[type].loadend = true;
|
|
||||||
where.value[type].page_no++;
|
|
||||||
where.value[type].loading = false;
|
|
||||||
if (ifPullReFresh) uni.stopPullDownRefresh();
|
|
||||||
|
|
||||||
}).catch(err => {
|
|
||||||
where.value[type].loading = false;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const loadMoreGood = () => {
|
|
||||||
if (swiperCurrent.value == 0) getOrderList(0, '', ''); //全部
|
|
||||||
if (swiperCurrent.value == 1) getOrderList(1, '', 0); //代付款
|
|
||||||
if (swiperCurrent.value == 2) getOrderList(2, 1, 1); //待核销
|
|
||||||
if (swiperCurrent.value == 3) getOrderList(3, 2, 1); //已核销
|
|
||||||
if (swiperCurrent.value == 4) getOrderList(4, -1, 1); //退款
|
|
||||||
}
|
|
||||||
|
|
||||||
// 搜索
|
|
||||||
const searchOn = (ifPullReFresh = false) => {
|
|
||||||
orderList.value[+swiperCurrent.value] = [];
|
|
||||||
console.log(swiperCurrent.value)
|
|
||||||
where.value[+swiperCurrent.value].page_no = 1;
|
|
||||||
where.value[+swiperCurrent.value].loadend = false;
|
|
||||||
if (swiperCurrent.value == 0) getOrderList(0, '', '', ifPullReFresh); //全部
|
|
||||||
if (swiperCurrent.value == 1) getOrderList(1, '', 0, ifPullReFresh); //代付款
|
|
||||||
if (swiperCurrent.value == 2) getOrderList(2, 1, 1, ifPullReFresh); //待核销
|
|
||||||
if (swiperCurrent.value == 3) getOrderList(3, 2, 1, ifPullReFresh); //已核销
|
|
||||||
if (swiperCurrent.value == 4) getOrderList(4, -1, 1, ifPullReFresh); //退款
|
|
||||||
}
|
|
||||||
|
|
||||||
let back = 0;
|
|
||||||
const navBack = () => {
|
|
||||||
uni.navigateBack({
|
|
||||||
delta: back ? +back : 0
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const reloadAll = () => { //对订单进行操作时刷新页面
|
|
||||||
where.value.forEach(item => {
|
|
||||||
item.page_no = 1;
|
|
||||||
item.loadend = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
getOrderList(0, '', ''); //全部
|
|
||||||
getOrderList(1, '', 0); //代付款
|
|
||||||
getOrderList(2, 1, 1); //待核销
|
|
||||||
getOrderList(3, 2, 1); //已核销
|
|
||||||
getOrderList(4, -1, 1); //退款
|
|
||||||
}
|
|
||||||
|
|
||||||
onLoad((options) => {
|
|
||||||
if (options.type) {
|
|
||||||
tabsActive.value = +options.type;
|
|
||||||
swiperCurrent.value = +options.type;
|
|
||||||
searchOn();
|
|
||||||
}
|
|
||||||
if (options.back) back = options.back;
|
|
||||||
|
|
||||||
uni.$on('reLoadOrderList', reloadAll);
|
|
||||||
getOrderList(0, '', ''); //全部
|
|
||||||
})
|
|
||||||
|
|
||||||
onUnload(() => {
|
|
||||||
uni.$off('reLoadOrderList', reloadAll)
|
|
||||||
})
|
|
||||||
|
|
||||||
const triggered = ref(false);
|
|
||||||
let flag = false
|
|
||||||
const refresherrefresh = (type = 1) => {
|
|
||||||
if (flag) return
|
|
||||||
flag = true
|
|
||||||
triggered.value = true;
|
|
||||||
searchOn()
|
|
||||||
console.log("别恶心我了")
|
|
||||||
setTimeout(() => {
|
|
||||||
triggered.value = false;
|
|
||||||
flag = false
|
|
||||||
}, 500)
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.wrap {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: calc(100vh - var(--window-top));
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-box {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-item {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-box {
|
|
||||||
margin: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.address-popup {
|
|
||||||
// padding: 30rpx;
|
|
||||||
background-color: #F6F6F6;
|
|
||||||
|
|
||||||
.head-title {
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
padding: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.afterSales-type {
|
|
||||||
margin: 0 20rpx 20rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.afterSales-type-title {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #444444;
|
|
||||||
margin-bottom: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.afterSales-type-con {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
|
|
||||||
.afterSales-type-item {
|
|
||||||
width: 200rpx;
|
|
||||||
height: 70rpx;
|
|
||||||
line-height: 70rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
color: #777777;
|
|
||||||
border: 2rpx solid #D3D3D3;
|
|
||||||
font-size: 28rpx;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
&:not(:nth-last-child(1)) {
|
|
||||||
margin-right: 24rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.fuck-active {
|
|
||||||
color: #FC452F;
|
|
||||||
border: 2rpx solid #FC452F;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.afterSales-type-tip {
|
|
||||||
font-size: 20rpx;
|
|
||||||
color: #FC452F;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-wrap {
|
|
||||||
margin: 0 20rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
padding: 20rpx 20rpx 1rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.goods {
|
|
||||||
.goods-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: 30rpx;
|
|
||||||
|
|
||||||
.goods-item-left {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.goods-item-left-img {
|
|
||||||
margin-right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-item-left-info {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
height: 164rpx;
|
|
||||||
|
|
||||||
.goods_name {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #060606;
|
|
||||||
max-width: 400rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods_detail {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.goods-detail_num {
|
|
||||||
margin-right: 30rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods_detail_price {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.symbol {
|
|
||||||
align-self: flex-end;
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.numbers {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-item-right {
|
|
||||||
image {
|
|
||||||
width: 48rpx;
|
|
||||||
height: 48rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes disappear {
|
|
||||||
to {
|
|
||||||
opacity: 0;
|
|
||||||
/* 渐隐 */
|
|
||||||
transform: scale(0);
|
|
||||||
/* 缩小 */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.mask {
|
|
||||||
position: fixed;
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
background-color: rgba(0, 0, 0, .5);
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
z-index: 99999 !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,197 +0,0 @@
|
||||||
<template>
|
|
||||||
<view style="background-color: #ffffff;">
|
|
||||||
<up-sticky offset-top="0" style="background-color: #ffffff;">
|
|
||||||
<view class="navbar">
|
|
||||||
<view style="width:35%;">
|
|
||||||
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
|
|
||||||
:showAction="false"></up-search>
|
|
||||||
</view>
|
|
||||||
<view style="width:65%;padding-left: 10rpx;">
|
|
||||||
<uni-datetime-picker v-model="range" type="daterange" @change="calendarConfirm" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</up-sticky>
|
|
||||||
|
|
||||||
<view class="content">
|
|
||||||
<up-transition :show="true" mode="slide-left">
|
|
||||||
<up-list @scrolltolower="scrolltolower" v-if="goodsList1.length>0">
|
|
||||||
<up-list-item class="card" v-for="(item,index) in goodsList1" :key='index'>
|
|
||||||
|
|
||||||
<view class="card-content">
|
|
||||||
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
|
||||||
<image style="width: 152rpx;height: 152rpx;" :src="item.image" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="card-content-r">
|
|
||||||
<view class="title ellipsis">
|
|
||||||
{{item.store_name}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
单位:{{item.unit_name}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
规格:{{item.store_info}}
|
|
||||||
</view>
|
|
||||||
<view style="color: red;">
|
|
||||||
数量: {{item.nums}}
|
|
||||||
</view>
|
|
||||||
<view style="color: red;" v-if="item.staff_id>0">
|
|
||||||
确认人: {{item.nums}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
|
||||||
</up-list-item>
|
|
||||||
</up-list>
|
|
||||||
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
|
||||||
</up-empty>
|
|
||||||
</up-transition>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
timeFrom
|
|
||||||
} from '@/uni_modules/uview-plus';
|
|
||||||
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
reactive,
|
|
||||||
} from "vue"
|
|
||||||
import {
|
|
||||||
SystemStoreStorageGroupLists,
|
|
||||||
} from "@/api/system_store_storage.js"
|
|
||||||
|
|
||||||
const show = ref(false)
|
|
||||||
const where = ref({
|
|
||||||
store_name: '',
|
|
||||||
page_no: 1,
|
|
||||||
start_time: timeFrom(new Date()),
|
|
||||||
end_time: timeFrom(new Date())
|
|
||||||
})
|
|
||||||
const calendarShow = ref(false)
|
|
||||||
|
|
||||||
const calendarConfirm = (e) => {
|
|
||||||
where.value.start_time = e[0];
|
|
||||||
where.value.end_time = e[1];
|
|
||||||
goodsList1.value=[]
|
|
||||||
getGoodsList()
|
|
||||||
calendarShow.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 列表
|
|
||||||
const goodsList = ref([])
|
|
||||||
const goodsList1 = ref([])
|
|
||||||
|
|
||||||
const getGoodsList = async () => {
|
|
||||||
let res = await SystemStoreStorageGroupLists(where.value)
|
|
||||||
goodsList1.value.push(...res.data.lists)
|
|
||||||
}
|
|
||||||
|
|
||||||
const keyword = ref('');
|
|
||||||
|
|
||||||
const searchKeyword = () => {
|
|
||||||
where.value.store_name = keyword.value;
|
|
||||||
goodsList1.value=[]
|
|
||||||
getGoodsList();
|
|
||||||
}
|
|
||||||
const scrolltolower = () => {
|
|
||||||
where.value.page_no += 1
|
|
||||||
getGoodsList()
|
|
||||||
}
|
|
||||||
getGoodsList()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.navbar {
|
|
||||||
padding: 0 20rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #777;
|
|
||||||
|
|
||||||
.nav-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
image {
|
|
||||||
height: 40rpx;
|
|
||||||
width: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
position: absolute;
|
|
||||||
top: -10rpx;
|
|
||||||
right: 10rpx;
|
|
||||||
background-color: #FF0000;
|
|
||||||
color: #FFFFFF;
|
|
||||||
text-align: center;
|
|
||||||
width: 30rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
font-size: 18rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 20rpx;
|
|
||||||
padding-bottom: 150rpx;
|
|
||||||
|
|
||||||
.card {
|
|
||||||
width: 710rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: white;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-content {
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.card-content-l {
|
|
||||||
margin-right: 20rpx;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-content-r {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
width: 500rpx;
|
|
||||||
}
|
|
||||||
.ipt {
|
|
||||||
display: flex;
|
|
||||||
height: 56rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.ellipsis {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,242 +0,0 @@
|
||||||
<template>
|
|
||||||
<view style="background-color: #ffffff;">
|
|
||||||
<up-sticky offset-top="0" style="background-color: #ffffff;">
|
|
||||||
<view class="navbar">
|
|
||||||
<view style="width:55%;">
|
|
||||||
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
|
|
||||||
:showAction="false"></up-search>
|
|
||||||
</view>
|
|
||||||
<view style="width:45%;padding-left: 10rpx;">
|
|
||||||
<uni-datetime-picker v-model="range" type="date" @change="calendarConfirm" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</up-sticky>
|
|
||||||
|
|
||||||
<view class="content">
|
|
||||||
<up-transition :show="true" mode="slide-left">
|
|
||||||
<up-list @scrolltolower="scrolltolower" v-if="goodsList1.length>0">
|
|
||||||
<up-list-item class="card" v-for="(item,index) in goodsList1" :key='index'>
|
|
||||||
|
|
||||||
<view class="card-content">
|
|
||||||
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
|
||||||
<image style="width: 152rpx;height: 152rpx;" :src="item.image" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="card-content-r">
|
|
||||||
<view class="title ellipsis">
|
|
||||||
{{item.store_name}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
单位:{{item.unit_name}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
规格:{{item.store_info}}
|
|
||||||
</view>
|
|
||||||
<view style="color: red;">
|
|
||||||
数量: {{item.nums}}
|
|
||||||
</view>
|
|
||||||
<view style="color: red;" v-if="item.staff_id>0">
|
|
||||||
确认人: {{item.nums}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="card-footer">
|
|
||||||
<up-button size="small" type="primary" shape="circle" @click="cancleOrder(item)"
|
|
||||||
v-if="item.status==0">确认已入库</up-button>
|
|
||||||
</view>
|
|
||||||
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
|
||||||
</up-list-item>
|
|
||||||
</up-list>
|
|
||||||
<up-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
|
||||||
</up-empty>
|
|
||||||
</up-transition>
|
|
||||||
<up-modal :show="show" title="入库确认" content="是否确认该商品入库" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
|
|
||||||
|
|
||||||
</up-modal>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
timeFrom
|
|
||||||
} from '@/uni_modules/uview-plus';
|
|
||||||
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
reactive,
|
|
||||||
} from "vue"
|
|
||||||
import {
|
|
||||||
SystemStoreStorageLists,
|
|
||||||
SystemStoreStorageWarehousingAdd
|
|
||||||
} from "@/api/system_store_storage.js"
|
|
||||||
|
|
||||||
const show = ref(false)
|
|
||||||
const dates=ref(timeFrom(new Date()))
|
|
||||||
const where = ref({
|
|
||||||
store_name: '',
|
|
||||||
page_no: 1,
|
|
||||||
start_time: dates.value,
|
|
||||||
end_time: dates.value
|
|
||||||
})
|
|
||||||
const calendarShow = ref(false)
|
|
||||||
const formData = ref({
|
|
||||||
"id": '',
|
|
||||||
'product_id': '',
|
|
||||||
})
|
|
||||||
const calendarConfirm = (e) => {
|
|
||||||
where.value.start_time = e;
|
|
||||||
where.value.end_time = e;
|
|
||||||
where.value.page_no = 1;
|
|
||||||
goodsList1.value = []
|
|
||||||
getGoodsList()
|
|
||||||
calendarShow.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 列表
|
|
||||||
const showGoods1 = ref(false)
|
|
||||||
const goodsList1 = ref([])
|
|
||||||
|
|
||||||
const getGoodsList = async () => {
|
|
||||||
let res = await SystemStoreStorageLists(where.value)
|
|
||||||
goodsList1.value.push(...res.data.lists)
|
|
||||||
}
|
|
||||||
const cancleOrder = (item) => {
|
|
||||||
show.value = true
|
|
||||||
formData.value.id = item['id']
|
|
||||||
formData.value.product_id = item['product_id']
|
|
||||||
}
|
|
||||||
const offerUpdate = () => {
|
|
||||||
SystemStoreStorageWarehousingAdd(formData.value).then(res => {
|
|
||||||
uni.$u.toast(res.msg);
|
|
||||||
show.value = false
|
|
||||||
goodsList1.value = []
|
|
||||||
getGoodsList()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const keyword = ref('');
|
|
||||||
|
|
||||||
const searchKeyword = () => {
|
|
||||||
where.value.store_name = keyword.value;
|
|
||||||
goodsList1.value = []
|
|
||||||
getGoodsList();
|
|
||||||
}
|
|
||||||
const scrolltolower = () => {
|
|
||||||
where.value.page_no += 1
|
|
||||||
getGoodsList()
|
|
||||||
}
|
|
||||||
getGoodsList()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.navbar {
|
|
||||||
padding: 0 20rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #777;
|
|
||||||
|
|
||||||
.nav-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
image {
|
|
||||||
height: 40rpx;
|
|
||||||
width: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
position: absolute;
|
|
||||||
top: -10rpx;
|
|
||||||
right: 10rpx;
|
|
||||||
background-color: #FF0000;
|
|
||||||
color: #FFFFFF;
|
|
||||||
text-align: center;
|
|
||||||
width: 30rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
font-size: 18rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.content {
|
|
||||||
padding: 20rpx;
|
|
||||||
padding-bottom: 150rpx;
|
|
||||||
|
|
||||||
.card {
|
|
||||||
width: 710rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: white;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-content {
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.card-content-l {
|
|
||||||
margin-right: 20rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.status {
|
|
||||||
width: 152rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
background-color: rgba(0, 0, 0, .3);
|
|
||||||
text-align: center;
|
|
||||||
color: white;
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 40rpx;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-content-r {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
width: 500rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.need {
|
|
||||||
color: #777777;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ipt {
|
|
||||||
display: flex;
|
|
||||||
height: 56rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-footer {
|
|
||||||
margin-top: 30rpx;
|
|
||||||
text-align: right;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #060606;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.ellipsis {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -9,7 +9,7 @@
|
||||||
@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;">
|
||||||
|
@ -104,8 +104,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="qr_code" v-if="datas.paid == 1 && datas.status == 1 &&is_mer!=1">
|
<view class="qr_code" v-if="datas.paid == 1 && datas.status == 1">
|
||||||
<up-image :src="datas.verify_base64" width="404rpx" height="60rpx"></up-image>
|
<up-image :src="datas.verify_img" width="404rpx" height="60rpx"></up-image>
|
||||||
<view style="font-weight: bold;color: #333;font-size: 26;margin-top: 20rpx;">
|
<view style="font-weight: bold;color: #333;font-size: 26;margin-top: 20rpx;">
|
||||||
核销码 {{datas.verify_code}}
|
核销码 {{datas.verify_code}}
|
||||||
</view>
|
</view>
|
||||||
|
@ -167,10 +167,6 @@
|
||||||
<view>下单时间</view>
|
<view>下单时间</view>
|
||||||
<view>{{datas.create_time}}</view>
|
<view>{{datas.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row">
|
|
||||||
<view>备注</view>
|
|
||||||
<view>{{datas.mark}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="row" style="margin-bottom: 0;">
|
<view class="row" style="margin-bottom: 0;">
|
||||||
<view>支付状态</view>
|
<view>支付状态</view>
|
||||||
<view v-if="datas.paid == 1">已支付</view>
|
<view v-if="datas.paid == 1">已支付</view>
|
||||||
|
@ -190,7 +186,7 @@
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view></view>
|
<view></view>
|
||||||
<view style="width: 450rpx;" v-if="is_mer!=1">
|
<view style="width: 450rpx;">
|
||||||
<!-- <up-button v-if="datas.status==0||datas.status==1" color="#20B128" shape="circle"
|
<!-- <up-button v-if="datas.status==0||datas.status==1" color="#20B128" shape="circle"
|
||||||
@click="showTake=true">确认收货</up-button> -->
|
@click="showTake=true">确认收货</up-button> -->
|
||||||
<up-button color="#20B128" plain shape="circle" @click="purchaseAgain">再次购买</up-button>
|
<up-button color="#20B128" plain shape="circle" @click="purchaseAgain">再次购买</up-button>
|
||||||
|
@ -263,11 +259,9 @@
|
||||||
|
|
||||||
const store_info = ref({})
|
const store_info = ref({})
|
||||||
const datas = ref({})
|
const datas = ref({})
|
||||||
const is_mer = ref(0)
|
|
||||||
const getDetails = () => {
|
const getDetails = () => {
|
||||||
orderDetailApi({
|
orderDetailApi({
|
||||||
order_id: datas.value.id,
|
order_id: datas.value.id,
|
||||||
is_mer:is_mer.value
|
|
||||||
// ...location
|
// ...location
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
datas.value = res.data;
|
datas.value = res.data;
|
||||||
|
@ -392,9 +386,9 @@
|
||||||
const rePay = () => {
|
const rePay = () => {
|
||||||
rePaymentApi({
|
rePaymentApi({
|
||||||
order_id: datas.value.id,
|
order_id: datas.value.id,
|
||||||
// mer_id: shopInfo.value.mer_id,
|
mer_id: shopInfo.value.mer_id,
|
||||||
address_id: addressInfo.value.address_id,
|
address_id: addressInfo.value.address_id,
|
||||||
pay_type: datas.value.pay_type
|
pay_type: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (!res.data?.nonceStr) return uni.$u.toast('支付失败!');
|
if (!res.data?.nonceStr) return uni.$u.toast('支付失败!');
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
|
@ -518,7 +512,6 @@
|
||||||
});
|
});
|
||||||
if (option.id) {
|
if (option.id) {
|
||||||
datas.value.id = option.id;
|
datas.value.id = option.id;
|
||||||
is_mer.value = option.is_mer;
|
|
||||||
getLocation()
|
getLocation()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
<view class="scroll-wrap">
|
<view class="scroll-wrap">
|
||||||
<scroll-view style="max-height: 50vh;padding-bottom: 20rpx;" scroll-y>
|
<scroll-view style="max-height: 50vh;padding-bottom: 20rpx;" scroll-y>
|
||||||
<block v-for="(item,index) in goodsList" :key="index">
|
<block v-for="(item,index) in goodsList" :key="index">
|
||||||
<view v-if="item.status == 0" class="goods">
|
<view class="goods">
|
||||||
<view class="goods-item">
|
<view class="goods-item">
|
||||||
<view class="goods-item-left">
|
<view class="goods-item-left">
|
||||||
<view class="goods-item-left-img">
|
<view class="goods-item-left-img">
|
||||||
|
@ -107,7 +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_base64" mode="aspectFit" 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>
|
||||||
|
@ -264,7 +264,7 @@
|
||||||
let goodsListSel = [];
|
let goodsListSel = [];
|
||||||
goodsList.value.map(i => {
|
goodsList.value.map(i => {
|
||||||
if (i.isSelected) {
|
if (i.isSelected) {
|
||||||
ids.push(i.id);
|
ids.push(i.old_cart_id);
|
||||||
goodsListSel.push(i);
|
goodsListSel.push(i);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,213 +0,0 @@
|
||||||
<template>
|
|
||||||
<view style="background-color: #ffffff;">
|
|
||||||
<up-sticky offset-top="0" style="background-color: #ffffff;">
|
|
||||||
<view class="navbar">
|
|
||||||
<view style="width:35%;">
|
|
||||||
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
|
|
||||||
:showAction="false"></up-search>
|
|
||||||
</view>
|
|
||||||
<view style="width:65%;padding-left: 10rpx;">
|
|
||||||
<uni-datetime-picker v-model="range" type="daterange" @change="calendarConfirm" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</up-sticky>
|
|
||||||
|
|
||||||
<view class="content">
|
|
||||||
<up-transition :show="true" mode="slide-left">
|
|
||||||
<up-list @scrolltolower="scrolltolower" v-if="goodsList1.length>0">
|
|
||||||
<up-list-item class="card" v-for="(item,index) in goodsList1" :key='index'>
|
|
||||||
|
|
||||||
<view class="card-content">
|
|
||||||
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
|
||||||
<image style="width: 152rpx;height: 152rpx;" :src="item.image" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="card-content-r">
|
|
||||||
<view class="title ellipsis">
|
|
||||||
{{item.store_name}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
时间:{{item.create_time}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
规格:{{item.store_info}}
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view>
|
|
||||||
单价:<span style="margin-right: 20rpx;color: red;">{{item.price}}</span>
|
|
||||||
数量:<span style="margin-right: 20rpx;color: red;">{{item.cart_num}}/{{item.unit_name}}</span>
|
|
||||||
总价:<span style="margin-right: 20rpx;color: red;">{{item.total_price}}</span>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
|
||||||
</up-list-item>
|
|
||||||
</up-list>
|
|
||||||
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
|
||||||
</up-empty>
|
|
||||||
</up-transition>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
timeFrom
|
|
||||||
} from '@/uni_modules/uview-plus';
|
|
||||||
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
reactive,
|
|
||||||
} from "vue"
|
|
||||||
import {
|
|
||||||
StoreOrderCartInfoGroupLists,
|
|
||||||
} from "@/api/store_order_cart_info.js"
|
|
||||||
|
|
||||||
const test2 = () => {
|
|
||||||
console.log("点解")
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const show = ref(false)
|
|
||||||
const min_date = ref('')
|
|
||||||
const where = ref({
|
|
||||||
store_name: '',
|
|
||||||
page_no: 1,
|
|
||||||
start_time: timeFrom(new Date()),
|
|
||||||
end_time: timeFrom(new Date())
|
|
||||||
})
|
|
||||||
const calendarShow = ref(false)
|
|
||||||
|
|
||||||
const calendarConfirm = (e) => {
|
|
||||||
where.value.start_time = e[0];
|
|
||||||
where.value.end_time = e[1];
|
|
||||||
goodsList1.value = []
|
|
||||||
getGoodsList()
|
|
||||||
calendarShow.value = false
|
|
||||||
}
|
|
||||||
let currentDate = new Date();
|
|
||||||
min_date.value=currentDate.setFullYear(currentDate.getFullYear() - 1);
|
|
||||||
// 列表
|
|
||||||
|
|
||||||
const goodsList1 = ref([])
|
|
||||||
|
|
||||||
const getGoodsList = async () => {
|
|
||||||
let res = await StoreOrderCartInfoGroupLists(where.value)
|
|
||||||
goodsList1.value.push(...res.data.lists)
|
|
||||||
}
|
|
||||||
|
|
||||||
const keyword = ref('');
|
|
||||||
|
|
||||||
const searchKeyword = () => {
|
|
||||||
where.value.store_name = keyword.value;
|
|
||||||
goodsList1.value = []
|
|
||||||
getGoodsList();
|
|
||||||
}
|
|
||||||
const scrolltolower = () => {
|
|
||||||
where.value.page_no += 1
|
|
||||||
getGoodsList()
|
|
||||||
}
|
|
||||||
getGoodsList()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.navbar {
|
|
||||||
padding: 0 20rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #777;
|
|
||||||
|
|
||||||
.nav-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
image {
|
|
||||||
height: 40rpx;
|
|
||||||
width: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
position: absolute;
|
|
||||||
top: -10rpx;
|
|
||||||
right: 10rpx;
|
|
||||||
background-color: #FF0000;
|
|
||||||
color: #FFFFFF;
|
|
||||||
text-align: center;
|
|
||||||
width: 30rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
font-size: 18rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 20rpx;
|
|
||||||
padding-bottom: 150rpx;
|
|
||||||
|
|
||||||
.card {
|
|
||||||
width: 710rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: white;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-content {
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.card-content-l {
|
|
||||||
margin-right: 20rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-content-r {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
width: 500rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.need {
|
|
||||||
color: #777777;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ipt {
|
|
||||||
display: flex;
|
|
||||||
height: 56rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.ellipsis {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,212 +0,0 @@
|
||||||
<template>
|
|
||||||
<view style="background-color: #ffffff;">
|
|
||||||
<up-sticky offset-top="0" style="background-color: #ffffff;">
|
|
||||||
<view class="navbar">
|
|
||||||
<view style="width:55%;">
|
|
||||||
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
|
|
||||||
:showAction="false"></up-search>
|
|
||||||
</view>
|
|
||||||
<view style="width:45%;padding-left: 10rpx;">
|
|
||||||
<uni-datetime-picker v-model="range" type="date" @change="calendarConfirm" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</up-sticky>
|
|
||||||
|
|
||||||
<view class="content">
|
|
||||||
<up-transition :show="true" mode="slide-left">
|
|
||||||
<up-list @scrolltolower="scrolltolower" v-if="goodsList1.length>0">
|
|
||||||
<up-list-item class="card" v-for="(item,index) in goodsList1" :key='index'>
|
|
||||||
|
|
||||||
<view class="card-content">
|
|
||||||
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
|
||||||
<image style="width: 152rpx;height: 152rpx;" :src="item.image" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="card-content-r">
|
|
||||||
<view class="title ellipsis">
|
|
||||||
{{item.store_name}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
时间:{{item.create_time}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
规格:{{item.store_info}}
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view>
|
|
||||||
单价:<span style="margin-right: 20rpx;color: red;">{{item.price}}</span>
|
|
||||||
数量:<span style="margin-right: 20rpx;color: red;">{{item.cart_num}}/{{item.unit_name}}</span>
|
|
||||||
总价:<span style="margin-right: 20rpx;color: red;">{{item.total_price}}</span>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
|
||||||
</up-list-item>
|
|
||||||
</up-list>
|
|
||||||
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
|
||||||
</up-empty>
|
|
||||||
</up-transition>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
timeFrom
|
|
||||||
} from '@/uni_modules/uview-plus';
|
|
||||||
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
reactive,
|
|
||||||
} from "vue"
|
|
||||||
import {
|
|
||||||
StoreOrderCartInfoLists,
|
|
||||||
} from "@/api/store_order_cart_info.js"
|
|
||||||
|
|
||||||
const test2 = () => {
|
|
||||||
console.log("点解")
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const show = ref(false)
|
|
||||||
const min_date = ref('')
|
|
||||||
const where = ref({
|
|
||||||
store_name: '',
|
|
||||||
page_no: 1,
|
|
||||||
start_time: timeFrom(new Date()),
|
|
||||||
end_time: timeFrom(new Date())
|
|
||||||
})
|
|
||||||
const calendarShow = ref(false)
|
|
||||||
|
|
||||||
const calendarConfirm = (e) => {
|
|
||||||
where.value.start_time = e;
|
|
||||||
where.value.end_time = e;
|
|
||||||
goodsList1.value = []
|
|
||||||
getGoodsList()
|
|
||||||
calendarShow.value = false
|
|
||||||
}
|
|
||||||
let currentDate = new Date();
|
|
||||||
min_date.value=currentDate.setFullYear(currentDate.getFullYear() - 1);
|
|
||||||
// 列表
|
|
||||||
|
|
||||||
const goodsList1 = ref([])
|
|
||||||
|
|
||||||
const getGoodsList = async () => {
|
|
||||||
let res = await StoreOrderCartInfoLists(where.value)
|
|
||||||
goodsList1.value.push(...res.data.lists)
|
|
||||||
}
|
|
||||||
|
|
||||||
const keyword = ref('');
|
|
||||||
|
|
||||||
const searchKeyword = () => {
|
|
||||||
where.value.store_name = keyword.value;
|
|
||||||
goodsList1.value = []
|
|
||||||
getGoodsList();
|
|
||||||
}
|
|
||||||
const scrolltolower = () => {
|
|
||||||
where.value.page_no += 1
|
|
||||||
getGoodsList()
|
|
||||||
}
|
|
||||||
getGoodsList()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.navbar {
|
|
||||||
padding: 0 20rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #777;
|
|
||||||
|
|
||||||
.nav-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
image {
|
|
||||||
height: 40rpx;
|
|
||||||
width: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
position: absolute;
|
|
||||||
top: -10rpx;
|
|
||||||
right: 10rpx;
|
|
||||||
background-color: #FF0000;
|
|
||||||
color: #FFFFFF;
|
|
||||||
text-align: center;
|
|
||||||
width: 30rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
font-size: 18rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 20rpx;
|
|
||||||
padding-bottom: 150rpx;
|
|
||||||
|
|
||||||
.card {
|
|
||||||
width: 710rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: white;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-content {
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.card-content-l {
|
|
||||||
margin-right: 20rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-content-r {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
width: 500rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.need {
|
|
||||||
color: #777777;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ipt {
|
|
||||||
display: flex;
|
|
||||||
height: 56rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.ellipsis {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,14 +1,46 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="">
|
||||||
|
<!-- <view class="m-card m-address"> -->
|
||||||
|
<!-- <view class="address-info" @click="showAddress = true">
|
||||||
|
<view class="top">
|
||||||
|
<up-icon name="account"></up-icon>
|
||||||
|
<view class="t-name">{{ addressInfo.real_name }}</view>
|
||||||
|
<view>{{ addressInfo.phone }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom u-line-2">
|
||||||
|
{{ addressInfo.detail }}
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<!-- <view class="address-info">
|
||||||
|
<view class="top">
|
||||||
|
{{ STORE_INFO.name }}是的
|
||||||
|
</view>
|
||||||
|
<view class="bottom u-line-2">
|
||||||
|
{{ STORE_INFO.detailed_address }}
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<!-- <view class="address-btn item-center">
|
||||||
|
<view class='ship-type' style="">
|
||||||
|
<view class="ship-type-item" :class='{ actShipItem: orderInfo.shipping_type == 2 }'
|
||||||
|
@click='orderInfo.shipping_type = 2'>
|
||||||
|
自提
|
||||||
|
</view>
|
||||||
|
<view class="ship-type-item" @click='orderInfo.shipping_type = 1'
|
||||||
|
:class='{ actShipItem: orderInfo.shipping_type == 1 }' v-if='orderInfo.default_delivery == 1'>
|
||||||
|
配送
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
<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;">
|
<view class="top" style="align-items: flex-start;">
|
||||||
<!-- <view style="color: #333;width: 200rpx;">
|
<view style="color: #333;width: 200rpx;">
|
||||||
<view style="margin: 0 10rpx;color:#20B128;width: 150rpx;">配送点</view>
|
<view style="margin: 0 10rpx;color:#20B128;width: 150rpx;">推荐自提点</view>
|
||||||
<view class="isreser"> {{reservation?"次日可提":"当日可提" }}
|
<view class="isreser"> {{reservation?"次日可提":"当日可提" }}
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view style="color: #333;">
|
<view style="color: #333;">
|
||||||
{{shop_Info.name}}
|
{{shop_Info.name}}
|
||||||
|
@ -25,46 +57,39 @@
|
||||||
</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(',')}`)">
|
@click="navgo(`/multipleShop/index/index?event=settle&cart_id=${cartStore.cartList.join(',')}`)">
|
||||||
切换配送点
|
切换门店
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="m-card good-info">
|
|
||||||
<view class="head-title">商品明细</view>
|
|
||||||
|
|
||||||
<view class="m-good" v-for="(item, index) in cartList" :key="index">
|
<!-- </view> -->
|
||||||
<view class="image">
|
<view class="m-card m-good" v-for="(item, index) in cartList" :key="index">
|
||||||
<up-image width="160rpx" height="160rpx" :src="item.imgs"></up-image>
|
<view class="image">
|
||||||
|
<up-image width="160rpx" height="160rpx" :src="item.imgs"></up-image>
|
||||||
|
</view>
|
||||||
|
<view class="body-content">
|
||||||
|
<view>
|
||||||
|
<view class="title">
|
||||||
|
<view>{{ item.name }}</view>
|
||||||
|
<view>¥{{ item.price }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="tips">
|
||||||
|
<view>{{ item.unit_name }}</view>
|
||||||
|
<view>x{{ item.cart_num }}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body-content">
|
<view class="time">
|
||||||
<view>
|
{{ orderInfo.delivery_msg }}
|
||||||
<view class="title">
|
|
||||||
<view>{{ item.name }}</view>
|
|
||||||
<view>¥{{ item.price }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="tips">
|
|
||||||
<view>{{ item.unit_name }}</view>
|
|
||||||
<view>x{{ item.cart_num }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="time">
|
|
||||||
{{ orderInfo.delivery_msg }}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="m-card good-info">
|
<view class="m-card good-info">
|
||||||
<view class="head-title">价格明细</view>
|
<view class="head-title">价格明细</view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view>商品总价 <text>共计{{ cartList.length }}款商品</text></view>
|
<view>商品总价 <text>共计{{ cartList.length }}款商品</text></view>
|
||||||
<view v-if="orderInfo.pay_price">
|
<view>
|
||||||
<text>¥</text>{{ c_price(orderInfo.pay_price, 0) }}<text>.{{ c_price(orderInfo.pay_price, 1) }}</text>
|
<text>¥</text>{{ c_price(orderInfo.pay_price, 0) }}<text>.{{ c_price(orderInfo.pay_price, 1) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
|
||||||
<up-skeleton :loading="true" :animate="true"></up-skeleton>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view>运费</view>
|
<view>运费</view>
|
||||||
|
@ -72,25 +97,16 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="row" v-if="[4,5,6].includes(userInfo.user_ship)" style="color: red;">
|
<view class="row" v-if="[4,5,6].includes(userInfo.user_ship)" style="color: red;">
|
||||||
<view>优惠减免</view>
|
<view>优惠减免</view>
|
||||||
<view v-if="orderInfo.frozen_money">
|
<view>
|
||||||
<text>¥</text>{{ c_price(orderInfo.frozen_money, 0) }}<text>.{{ c_price(orderInfo.frozen_money, 1) }}</text>
|
<text>-¥</text>{{ c_price(orderInfo.frozen_money, 0) }}<text>.{{ c_price(orderInfo.frozen_money, 1) }}</text>
|
||||||
</view>
|
|
||||||
<view v-else>
|
|
||||||
<up-skeleton :loading="true" :animate="true"></up-skeleton>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row" v-if="userInfo.user_ship==1 ">
|
<view class="row" v-if="userInfo.user_ship==1 ">
|
||||||
<view>优惠返还</view>
|
<view>优惠返还</view>
|
||||||
<view v-if="orderInfo.activity_price">
|
<view>
|
||||||
<text>¥</text>{{ c_price(orderInfo.activity_price, 0) }}<text>.{{ c_price(orderInfo.activity_price, 1) }}</text>
|
<text>¥</text>{{ c_price(orderInfo.activity_price, 0) }}<text>.{{ c_price(orderInfo.activity_price, 1) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
|
||||||
<up-skeleton :loading="true" :animate="true"></up-skeleton>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<up-alert v-if="timeContent!=''" type="error" :description="timeContent"></up-alert>
|
|
||||||
<!-- <up-notice-bar text="门店切换已移动到首页,若切换店铺,购物车商品将跟随门店一起切换"></up-notice-bar> -->
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="m-card order-remark">
|
<view class="m-card order-remark">
|
||||||
|
@ -181,14 +197,13 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<up-modal :show="timeShow" :content='timeContent' @confirm="timeShow=false"></up-modal>
|
|
||||||
|
|
||||||
<addressPopup ref="addressRef" :show="showAddress" :list="addressList" @close="showAddress = false"
|
<addressPopup ref="addressRef" :show="showAddress" :list="addressList" @close="showAddress = false"
|
||||||
@change="changeAddress" />
|
@change="changeAddress" />
|
||||||
<shopListPopupVue ref="shopRef" :show="shopListShow" :list="merchantList" @close="shopListShow = false"
|
<shopListPopupVue ref="shopRef" :show="shopListShow" :list="merchantList" @close="shopListShow = false"
|
||||||
@change="changeShop" @search="searchShop" />
|
@change="changeShop" @search="searchShop" />
|
||||||
<modal title="尚未设置收货地址" content="您还没有添加收货地址,请点击添加" cancleText="取消" confirmText="添加地址" :show="toastAddressShow"
|
<modal title="尚未设置收货地址" content="您还没有添加收货地址,请点击添加" cancleText="添加地址" confirmText="继续支付" :show="toastAddressShow"
|
||||||
@close="toastAddressoff" @change="addAddress" />
|
@close="addAddress" @change="goPay" />
|
||||||
<ZyPasswordboard v-if='passwordBoardVisible' v-model:visible="passwordBoardVisible" v-bind="passwordBoardProps"
|
<ZyPasswordboard v-if='passwordBoardVisible' v-model:visible="passwordBoardVisible" v-bind="passwordBoardProps"
|
||||||
@close='closeKeyBord' />
|
@close='closeKeyBord' />
|
||||||
<up-modal :show="showModal" title="您还没设置密码" :closeOnClickOverlay="true" zoom confirmText='去设置' showCancelButton
|
<up-modal :show="showModal" title="您还没设置密码" :closeOnClickOverlay="true" zoom confirmText='去设置' showCancelButton
|
||||||
|
@ -226,23 +241,15 @@
|
||||||
import ZyPasswordboard from '@/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue';
|
import ZyPasswordboard from '@/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue';
|
||||||
|
|
||||||
const userInfo = useUserStore().userInfo;
|
const userInfo = useUserStore().userInfo;
|
||||||
const shop_Info = ref({})
|
|
||||||
|
|
||||||
// 用户选择的门店信息
|
// 用户选择的门店信息
|
||||||
let STORE_INFO = uni.getStorageSync('STORE_INFO');
|
let STORE_INFO = uni.getStorageSync('STORE_INFO');
|
||||||
console.log(STORE_INFO)
|
if (STORE_INFO)
|
||||||
if (STORE_INFO) {
|
STORE_INFO = JSON.parse(STORE_INFO)
|
||||||
shop_Info.value = JSON.parse(STORE_INFO)
|
|
||||||
} else {
|
|
||||||
uni.$u.toast('获取门店信息失败,请在首页选择门店')
|
|
||||||
}
|
|
||||||
|
|
||||||
const cartStore = useCartStore();
|
const cartStore = useCartStore();
|
||||||
const reservation_time = ref('')
|
const reservation_time = ref('')
|
||||||
const is_storage = ref(0)
|
const is_storage = ref(0)
|
||||||
const LocationShow = ref(false)
|
|
||||||
const timeShow = ref(false)
|
|
||||||
const timeContent = ref('')
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
remark: ""
|
remark: ""
|
||||||
})
|
})
|
||||||
|
@ -266,7 +273,7 @@
|
||||||
const openAddress = () => {
|
const openAddress = () => {
|
||||||
if (addressList.length > 0) showAddress.value = true;
|
if (addressList.length > 0) showAddress.value = true;
|
||||||
else uni.navigateTo({
|
else uni.navigateTo({
|
||||||
url: '/pagesOrder/addressEdit/addressEdit?type=settle'
|
url: '/pagesOrder/addressEdit/addressEdit'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,6 +329,23 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// getMerchantList();
|
||||||
|
// 定位
|
||||||
|
// const LoadAddress = () => {
|
||||||
|
// uni.getLocation({
|
||||||
|
// success: (res) => {},
|
||||||
|
// fail: (err) => {
|
||||||
|
// uni.$u.toast('定位失败, 请手动选择提货点!')
|
||||||
|
// },
|
||||||
|
// complete: (res) => {
|
||||||
|
// myAddressInfo.value.long = res.longitude || "";
|
||||||
|
// myAddressInfo.value.lat = res.latitude || "";
|
||||||
|
// getMerchantList();
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// LoadAddress();
|
||||||
|
|
||||||
const changeShop = (e) => {
|
const changeShop = (e) => {
|
||||||
shopInfo.value = e;
|
shopInfo.value = e;
|
||||||
shopListShow.value = false;
|
shopListShow.value = false;
|
||||||
|
@ -340,12 +364,9 @@
|
||||||
|
|
||||||
// 选择地址
|
// 选择地址
|
||||||
const addAddress = () => {
|
const addAddress = () => {
|
||||||
// toastAddressShow.value = false;
|
toastAddressShow.value = false;
|
||||||
// nextTick(() => {
|
nextTick(() => {
|
||||||
// showAddress.value = true;
|
showAddress.value = true;
|
||||||
// })
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pagesOrder/addressEdit/addressEdit?type=settle'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 继续支付
|
// 继续支付
|
||||||
|
@ -362,8 +383,7 @@
|
||||||
return uni.$u.toast('当前支付金额为0,暂不能使用微信支付')
|
return uni.$u.toast('当前支付金额为0,暂不能使用微信支付')
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!isAddress.value && orderInfo.value.shipping_type == 1) return toastAddressShow.value = true;
|
if (!isAddress.value && orderInfo.value.shipping_type == 1) return toastAddressShow.value = true;
|
||||||
if (orderInfo.value.address_id == 0) return toastAddressShow.value = true;
|
|
||||||
createOrder();
|
createOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,21 +393,18 @@
|
||||||
long: "",
|
long: "",
|
||||||
};
|
};
|
||||||
let reservation = ref(0);
|
let reservation = ref(0);
|
||||||
|
const shop_Info = ref({})
|
||||||
const cartList = ref([]);
|
const cartList = ref([]);
|
||||||
const orderInfo = ref({});
|
const orderInfo = ref({});
|
||||||
const checkOrder = (store_id) => {
|
const checkOrder = (store_id) => {
|
||||||
checkOrderApi({
|
checkOrderApi({
|
||||||
cart_id: cartStore.cartList,
|
cart_id: cartStore.cartList,
|
||||||
store_id: shop_Info.value.id || 0,
|
store_id: STORE_INFO.id || 0,
|
||||||
...location
|
...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 || {}
|
shop_Info.value = res.data.shopInfo || {}
|
||||||
if (res.data.alert != '') {
|
|
||||||
timeShow.value = true
|
|
||||||
timeContent.value = res.data.alert
|
|
||||||
}
|
|
||||||
checkInventoryApi({
|
checkInventoryApi({
|
||||||
cart_id: cartStore.cartList,
|
cart_id: cartStore.cartList,
|
||||||
store_id: store_id || res.data.shopInfo.id
|
store_id: store_id || res.data.shopInfo.id
|
||||||
|
@ -400,6 +417,24 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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');
|
||||||
|
|
||||||
|
@ -429,6 +464,7 @@
|
||||||
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: shop_Info.value.id,
|
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,
|
||||||
|
@ -509,26 +545,31 @@
|
||||||
price = price + '';
|
price = price + '';
|
||||||
return price.split('.')[index] || (index ? '00' : '0');
|
return price.split('.')[index] || (index ? '00' : '0');
|
||||||
}
|
}
|
||||||
const toastAddressoff = () => {
|
|
||||||
toastAddressShow.value = false;
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pagesOrder/settle/settle'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onLoad(options => {
|
onLoad(options => {
|
||||||
checkOrder(shop_Info.value.id);
|
if (uni.getStorageSync('location')) {
|
||||||
|
location = JSON.parse(uni.getStorageSync('location'))
|
||||||
|
checkOrder();
|
||||||
|
} else {
|
||||||
|
uni.getLocation({
|
||||||
|
type: "gcj02",
|
||||||
|
success(res) {
|
||||||
|
location.lat = res.latitude;
|
||||||
|
location.long = res.longitude;
|
||||||
|
uni.setStorageSync('location', JSON.stringify(location))
|
||||||
|
checkOrder();
|
||||||
|
},
|
||||||
|
fail() {
|
||||||
|
uni.$u.toast('获取位置当前失败,为你推荐当前门店')
|
||||||
|
checkOrder(STORE_INFO.id);
|
||||||
|
},
|
||||||
|
complete() {}
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getAddressList();
|
getAddressList();
|
||||||
})
|
})
|
||||||
|
|
||||||
uni.$on('settle', function(data) {
|
|
||||||
let datas = JSON.parse(data)
|
|
||||||
shop_Info.value = datas
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -1,120 +0,0 @@
|
||||||
<template>
|
|
||||||
<view style="background-color: #fff;">
|
|
||||||
<up-row customStyle="margin-bottom: 10px;">
|
|
||||||
<up-col span="6">
|
|
||||||
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
|
||||||
<up-count-to :startVal="30" :endVal="data.total_price" fontSize="40" decimals="2"></up-count-to>
|
|
||||||
<view style="padding: 20rpx;">累计铺货金额</view>
|
|
||||||
</view>
|
|
||||||
</up-col>
|
|
||||||
<up-col span="6">
|
|
||||||
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
|
||||||
<up-count-to :startVal="30" :endVal="data.pay_price" fontSize="40" decimals="2"></up-count-to>
|
|
||||||
<view style="padding: 20rpx;">累计销售金额</view>
|
|
||||||
</view>
|
|
||||||
</up-col>
|
|
||||||
</up-row>
|
|
||||||
<up-row customStyle="margin-bottom: 10px;">
|
|
||||||
<up-col span="6">
|
|
||||||
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
|
||||||
<up-count-to :startVal="30" :endVal="data.expenditure" fontSize="40" decimals="2"></up-count-to>
|
|
||||||
<view style="padding: 20rpx;">总支出</view>
|
|
||||||
</view>
|
|
||||||
</up-col>
|
|
||||||
<up-col span="6">
|
|
||||||
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
|
||||||
<up-count-to :startVal="30" :endVal="data.store_money" fontSize="40" decimals="2"></up-count-to>
|
|
||||||
<view style="padding: 20rpx;">利润</view>
|
|
||||||
</view>
|
|
||||||
</up-col>
|
|
||||||
</up-row>
|
|
||||||
<view>
|
|
||||||
<span style="font-size: 20px;padding: 10rpx;">支出明细</span>
|
|
||||||
<up-divider></up-divider>
|
|
||||||
</view>
|
|
||||||
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" />
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup="ts">
|
|
||||||
import {
|
|
||||||
ref
|
|
||||||
} from 'vue';
|
|
||||||
import {
|
|
||||||
store_statistics,
|
|
||||||
} from "@/api/store.js"
|
|
||||||
const data = ref({
|
|
||||||
total_price: 0,
|
|
||||||
pay_price: 0,
|
|
||||||
store_money:0,
|
|
||||||
commission: 0,
|
|
||||||
bond: 0,
|
|
||||||
village: 0,
|
|
||||||
vip: 0,
|
|
||||||
brigade: 0,
|
|
||||||
attrition: 0
|
|
||||||
})
|
|
||||||
const getLists = () => {
|
|
||||||
store_statistics().then(res => {
|
|
||||||
data.value = res.data
|
|
||||||
chartData.value.series=res.data.list
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
getLists()
|
|
||||||
const opts = ref({
|
|
||||||
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
|
|
||||||
padding: [15, 15, 0, 5],
|
|
||||||
enableScroll: false,
|
|
||||||
legend: {},
|
|
||||||
xAxis: {
|
|
||||||
disableGrid: true
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
data: [{
|
|
||||||
min: 0
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
extra: {
|
|
||||||
column: {
|
|
||||||
type: "group",
|
|
||||||
seriesGap:30,
|
|
||||||
width: 30,
|
|
||||||
activeBgColor: "#000000",
|
|
||||||
activeBgOpacity: 0.08
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const chartData = ref({
|
|
||||||
categories: [""],
|
|
||||||
series: [{
|
|
||||||
name: "手续费",
|
|
||||||
data: [0]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "保证金",
|
|
||||||
data: [0]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "损耗金",
|
|
||||||
data: [0]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "村长",
|
|
||||||
data: [0]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "队长",
|
|
||||||
data: [0]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "厨师",
|
|
||||||
data: [0]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
|
@ -1,176 +0,0 @@
|
||||||
<template>
|
|
||||||
<view
|
|
||||||
style="--view-theme: rgb(32, 177, 40);--view-priceColor:#FF7600;--view-minorColor:rgba(108, 198, 94, 0.5);--view-minorColorT:rgba(66, 202, 77, 0.1);--view-bntColor:#FE960F;--view-gradient:#4DEA4D">
|
|
||||||
<!-- <view class='cash-withdrawal'>
|
|
||||||
<view class="accountTitle">
|
|
||||||
<view :style="{height:getHeight.barTop+'px'}"></view>
|
|
||||||
<view class="sysTitle acea-row row-center-wrapper" :style="{height:getHeight.barHeight+'px'}">
|
|
||||||
<text class="iconfont icon-ic_leftarrow" @click="goarrow"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view :style="{height:(getHeight.barTop+getHeight.barHeight)+'px'}"></view>
|
|
||||||
<view class="header">
|
|
||||||
<view class="headerCon">
|
|
||||||
<view class="money">000</view>
|
|
||||||
<view>可提现金额</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<view class="content">
|
|
||||||
|
|
||||||
<up-transition :show="true" mode="slide-left">
|
|
||||||
<view v-if="goodsList1.length>0">
|
|
||||||
<navigator :url="item.url" hover-class="navigator-hover" class="card" v-for="(item,index) in goodsList1" :key='index'>
|
|
||||||
<view class="card-content">
|
|
||||||
<view class="card-content-r">
|
|
||||||
<view class="title ellipsis">
|
|
||||||
{{item.name}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</navigator>
|
|
||||||
</view>
|
|
||||||
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
|
||||||
</up-empty>
|
|
||||||
</up-transition>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
reactive
|
|
||||||
} from 'vue';
|
|
||||||
import {
|
|
||||||
onLoad,
|
|
||||||
onShow
|
|
||||||
} from '@dcloudio/uni-app';
|
|
||||||
import {
|
|
||||||
menuList
|
|
||||||
} from "@/api/store"
|
|
||||||
const goodsList1 = ref([])
|
|
||||||
const getGoodsList = async () => {
|
|
||||||
let res = await menuList({})
|
|
||||||
goodsList1.value = res.data.menu
|
|
||||||
}
|
|
||||||
getGoodsList()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.cash-withdrawal {
|
|
||||||
.accountTitle {
|
|
||||||
background: linear-gradient(90deg, var(--view-theme) 0%, var(--view-gradient) 100%);
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 99;
|
|
||||||
|
|
||||||
.sysTitle {
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 30rpx;
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
position: absolute;
|
|
||||||
font-size: 36rpx;
|
|
||||||
left: 11rpx;
|
|
||||||
width: 60rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
width: 100%;
|
|
||||||
height: 310rpx;
|
|
||||||
background: linear-gradient(90deg, var(--view-theme) 0%, var(--view-gradient) 100%);
|
|
||||||
font-size: 30rpx;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #F5F5F5;
|
|
||||||
text-align: center;
|
|
||||||
padding-top: 88rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.headerCon {
|
|
||||||
background-image: url('../static/cashBg.png');
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
width: 100%;
|
|
||||||
height: 278rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.money {
|
|
||||||
font-size: 76rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-family: 'Regular';
|
|
||||||
margin-bottom: 16rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 20rpx;
|
|
||||||
padding-bottom: 150rpx;
|
|
||||||
|
|
||||||
.card {
|
|
||||||
width: 350rpx;
|
|
||||||
margin: 2rpx;
|
|
||||||
padding: 92rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: white;
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-content {
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.card-content-l {
|
|
||||||
margin-right: 20rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.status {
|
|
||||||
width: 152rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
background-color: rgba(0, 0, 0, .3);
|
|
||||||
text-align: center;
|
|
||||||
color: white;
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 40rpx;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-content-r {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
width: 500rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.need {
|
|
||||||
color: #777777;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ipt {
|
|
||||||
display: flex;
|
|
||||||
height: 56rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,959 +0,0 @@
|
||||||
<style lang="scss" scoped>
|
|
||||||
.share-btn {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
|
||||||
width: 60rpx;
|
|
||||||
z-index: 20;
|
|
||||||
|
|
||||||
::v-deep.u-button {
|
|
||||||
border: 0;
|
|
||||||
border-color: transparent;
|
|
||||||
|
|
||||||
.u-icon__icon {
|
|
||||||
font-size: 60rpx !important;
|
|
||||||
color: #030303;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<template>
|
|
||||||
<view class="content">
|
|
||||||
<view class="navbar">
|
|
||||||
<view style="width: 100%;">
|
|
||||||
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
|
|
||||||
:showAction="false"></up-search>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class='headScoll' ref='headscroll' :style="{ height: isScroll ? '0' : '170rpx' }">
|
|
||||||
<scroll-view class="head-view" scroll-x @scrolltolower="getgoodClassList(0)">
|
|
||||||
<view class="list">
|
|
||||||
<view class="item" :class="{ 'item-active': topActive === item.id }"
|
|
||||||
v-for="(item, index) in goodClassList" :key="index" @click="changeOne(item, index)">
|
|
||||||
<view class="c-img"><up-image height="100rpx" width="100rpx" :src="item.pic"></up-image></view>
|
|
||||||
<view class="c-text u-line-1">{{ item.name }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" style="width: 80rpx;height: 20rpx;">
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
<view class="r-btn" @click="show = 1">
|
|
||||||
<view>全</view>
|
|
||||||
<view>部</view>
|
|
||||||
<up-icon name="list"></up-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<viewPopup nav v-if="show === 1" @close="show = 0">
|
|
||||||
<view class="cateOne">
|
|
||||||
<view class="head-title">全部分类</view>
|
|
||||||
<scroll-view scroll-y style="height: 600rpx;">
|
|
||||||
<view class="list">
|
|
||||||
<view class="item" :class="{ 'item-active': topActive === item.id }"
|
|
||||||
v-for="(item, index) in goodClassList" :key="index" @click="changeOne(item, index)">
|
|
||||||
<view class="c-img"><up-image height="100rpx" width="100rpx" :src="item.pic"></up-image>
|
|
||||||
</view>
|
|
||||||
<view class="c-text u-line-1">{{ item.name }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</viewPopup>
|
|
||||||
<view class="scroll-box">
|
|
||||||
<scroll-view class="left" scroll-y @scrolltolower="getgoodClassList(topActive)">
|
|
||||||
<view class="item u-line-1" :class="{ 'item-active': leftActive === item.id }"
|
|
||||||
v-for="(item, index) in goodClassTow" :key="index" @click="changeTwo(item, index)">{{ item.name }}
|
|
||||||
</view>
|
|
||||||
<view style="width: 100%;height: 450rpx;"></view>
|
|
||||||
</scroll-view>
|
|
||||||
<view class="right">
|
|
||||||
<view class="classify">
|
|
||||||
<scroll-view style="height: 90rpx;" scroll-x @scrolltolower="getgoodClassList(leftActive)">
|
|
||||||
<view class="classify-list">
|
|
||||||
<view class="classify-list-item u-line-1"
|
|
||||||
:class="{ 'item-active': rightActive === item.id }"
|
|
||||||
v-for="(item, index) in goodClassThree" :key="index" @click="changeThree(item, index)">
|
|
||||||
{{ item.name }}
|
|
||||||
</view>
|
|
||||||
<view style="width: 70rpx;flex-shrink: 0;"></view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
<view class="done" @click="show = 2">
|
|
||||||
<up-icon name="arrow-down"></up-icon>
|
|
||||||
</view>
|
|
||||||
<!-- <view class="order-by">
|
|
||||||
<view class="item" :class="{ 'order-active': where.order == '' }" @click="changeOrder('')">综合
|
|
||||||
</view>
|
|
||||||
<view class="item" style="display: flex;align-items: center;"
|
|
||||||
:class="{ 'order-active': where.order == 'desc' || where.order == 'asc' }"
|
|
||||||
@click="changeOrder(where.order == 'asc' ? 'desc' : 'asc')">
|
|
||||||
价格
|
|
||||||
<view style="color: black;">
|
|
||||||
<up-icon name="arrow-up-fill" :color="where.order=='asc'?'#20b128':'' "
|
|
||||||
size="8"></up-icon>
|
|
||||||
<up-icon name="arrow-down-fill" :color="where.order=='desc'?'#20b128':'' "
|
|
||||||
size="8"></up-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" :class="{ 'order-active': where.order == 'sales' }"
|
|
||||||
@click="changeOrder('sales')">销量
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
|
||||||
<viewPopup v-if="show === 2" @close="show = 0">
|
|
||||||
<view class="cateOne">
|
|
||||||
<scroll-view scroll-y style="height: 230rpx;" @scrolltolower="getgoodClassList(leftActive)">
|
|
||||||
<view class="classify-list">
|
|
||||||
<view class="classify-list-item u-line-1"
|
|
||||||
:class="{ 'item-active': rightActive === item.id }"
|
|
||||||
v-for="(item, index) in goodClassThree" :key="index"
|
|
||||||
@click="changeThree(item, index)">
|
|
||||||
{{ item.name }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</viewPopup>
|
|
||||||
<scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView"
|
|
||||||
scroll-y @scrolltolower="loadMoreGood">
|
|
||||||
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id">
|
|
||||||
<view class="shop-img"
|
|
||||||
:style="{ backgroundImage: `url(${item.image}?x-oss-process=image/format,webp)` }">
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="shop-content">
|
|
||||||
<view class="goods-name" style="font-size: 28rpx;color: #060606;">
|
|
||||||
{{ item.store_name }}
|
|
||||||
</view>
|
|
||||||
<view class="shop-content-li" style="justify-content: space-between;"
|
|
||||||
v-if="item.store_info">
|
|
||||||
<view style="display: flex;">
|
|
||||||
<view class="shop-content-li-l">规格</view>
|
|
||||||
<view class="shop-content-li-r">{{ item.store_info }}</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="shop-content-li">
|
|
||||||
<view style="margin-right: 60rpx;">
|
|
||||||
<span class="shop-content-li-l">
|
|
||||||
铺货量
|
|
||||||
</span>
|
|
||||||
<span class="shop-content-li-r" style="color:#FC452F ;"><text
|
|
||||||
style="font-size: 30rpx;">{{item.distribution_nums}}</text>
|
|
||||||
</span>
|
|
||||||
</view>
|
|
||||||
<view >
|
|
||||||
|
|
||||||
<span class="shop-content-li-l">
|
|
||||||
销售量
|
|
||||||
</span>
|
|
||||||
<span class="shop-content-li-r" style="color:#FC452F ;"><text
|
|
||||||
style="font-size: 30rpx;">{{item.sales}}</text>
|
|
||||||
</span>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="shop-content-li">
|
|
||||||
<view class="shop-content-li-l">
|
|
||||||
库存
|
|
||||||
</view>
|
|
||||||
<view class="shop-content-li-r" style="color:#FC452F ;"><text
|
|
||||||
style="font-size: 30rpx;">{{item.stock}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="shop-content-li">
|
|
||||||
<view class="shop-content-li-l">
|
|
||||||
价值
|
|
||||||
</view>
|
|
||||||
<view class="shop-content-li-r" style="color:#FC452F ;">¥<text
|
|
||||||
style="font-size: 30rpx;">{{item.total_price}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="width: 100%;height: 470rpx;"></view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
onLoad,
|
|
||||||
onShow,
|
|
||||||
onShareAppMessage,
|
|
||||||
} from "@dcloudio/uni-app"
|
|
||||||
import {
|
|
||||||
reactive,
|
|
||||||
ref,
|
|
||||||
onMounted,
|
|
||||||
} from "vue"
|
|
||||||
import {
|
|
||||||
goodListApi,
|
|
||||||
BranchProductListsApi,
|
|
||||||
goodClassListApi
|
|
||||||
} from "@/api/good.js"
|
|
||||||
|
|
||||||
import viewPopup from "@/components/viewPopup.vue"
|
|
||||||
import {
|
|
||||||
getCurrentInstance
|
|
||||||
} from 'vue';
|
|
||||||
import {
|
|
||||||
shopDetailApi
|
|
||||||
} from "@/api/multipleShop.js";
|
|
||||||
|
|
||||||
const priceKey = reactive({
|
|
||||||
off_activity: "",
|
|
||||||
op_price: "",
|
|
||||||
price: ""
|
|
||||||
})
|
|
||||||
|
|
||||||
const showModal = ref(false)
|
|
||||||
const navgo = (url) => {
|
|
||||||
showModal.value &&= false
|
|
||||||
uni.navigateTo({
|
|
||||||
url
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/*商品列表滚动隐藏头部导航 */
|
|
||||||
const targetHeight = ref(0)
|
|
||||||
let scoHeight = 0
|
|
||||||
const isScroll = ref(false)
|
|
||||||
let lastScollTop = 0
|
|
||||||
const hideHeadView = (e) => {
|
|
||||||
if (e.detail.scrollTop < 100) return
|
|
||||||
if (e.detail.scrollTop <= 0 || e.detail.scrollTop > targetHeight.value)
|
|
||||||
return
|
|
||||||
isScroll.value = e.detail.scrollTop > lastScollTop
|
|
||||||
lastScollTop = e.detail.scrollTop
|
|
||||||
}
|
|
||||||
|
|
||||||
/*商品列表滚动隐藏头部导航结束 */
|
|
||||||
const show = ref(0);
|
|
||||||
const topActive = ref(0);
|
|
||||||
const changeOne = async (item, index) => {
|
|
||||||
where.value.top_cate_id = item.id
|
|
||||||
delete where.value.two_cate_id // 删除二级分类的id, 因为切换一级分类时, 二级分类的id应该为空, 否则会获取到错误的商品列表数据
|
|
||||||
topActive.value = item.id;
|
|
||||||
show.value = 0;
|
|
||||||
goodClassTow.value = item?.children || [];
|
|
||||||
goodClassThree.value = goodClassTow.value[0]?.children || [];
|
|
||||||
leftActive.value = goodClassTow.value[0]?.id || '';
|
|
||||||
rightActive.value = goodClassThree.value[0]?.id || '';
|
|
||||||
getGoodList();
|
|
||||||
if (!item.isLoading && item.id) getgoodClassList(topActive.value, 2); // 判断是否加载过数据, 加载过则不进行加载,节约资源
|
|
||||||
}
|
|
||||||
|
|
||||||
const leftActive = ref(0);
|
|
||||||
const changeTwo = (item, index) => {
|
|
||||||
console.log(item)
|
|
||||||
where.value.two_cate_id = item.id
|
|
||||||
isScroll.value = false;
|
|
||||||
getWXDom(instance)
|
|
||||||
leftActive.value = item.id;
|
|
||||||
show.value = 0;
|
|
||||||
goodClassThree.value = item?.children || [];
|
|
||||||
rightActive.value = goodClassThree.value[0]?.id || '';
|
|
||||||
getGoodList();
|
|
||||||
if (!item.isLoading && item.id) getgoodClassList(leftActive.value, 3); // 判断是否加载过数据, 加载过则不进行加载,节约资源
|
|
||||||
}
|
|
||||||
|
|
||||||
const rightActive = ref(0);
|
|
||||||
const changeThree = (item, index) => {
|
|
||||||
rightActive.value = item.id;
|
|
||||||
show.value = 0;
|
|
||||||
getGoodList();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const keyword = ref('');
|
|
||||||
|
|
||||||
const searchKeyword = () => {
|
|
||||||
where.value.name = keyword.value;
|
|
||||||
where.value.store_name = keyword.value;
|
|
||||||
getGoodList();
|
|
||||||
}
|
|
||||||
|
|
||||||
const changeOrder = (order) => {
|
|
||||||
switch (order) {
|
|
||||||
case 'asc':
|
|
||||||
where.value.field = 'price'
|
|
||||||
break;
|
|
||||||
case 'desc':
|
|
||||||
where.value.field = 'price'
|
|
||||||
break;
|
|
||||||
case 'sales':
|
|
||||||
where.value.field = 'sales'
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
where.value.field = ''
|
|
||||||
}
|
|
||||||
where.value.order = order;
|
|
||||||
getGoodList();
|
|
||||||
}
|
|
||||||
|
|
||||||
const where = ref({
|
|
||||||
page_no: 1,
|
|
||||||
page_size: 15,
|
|
||||||
name: '',
|
|
||||||
order: '',
|
|
||||||
store_name: '',
|
|
||||||
store_id: '',
|
|
||||||
field: "",
|
|
||||||
})
|
|
||||||
|
|
||||||
const loading = ref(true);
|
|
||||||
const goodList = ref([]);
|
|
||||||
const getGoodList = (loadmore = false) => {
|
|
||||||
loading.value = true;
|
|
||||||
let class_id = rightActive.value || leftActive.value || topActive.value || '';
|
|
||||||
let class_all = '';
|
|
||||||
// 若分类没有选中时,则直接查询上一级分类
|
|
||||||
if (rightActive.value == '') class_all = leftActive.value;
|
|
||||||
if (leftActive.value == '') class_all = topActive.value;
|
|
||||||
if (topActive.value == '') class_all = '';
|
|
||||||
if (class_all) class_id = ""; //只能带其中一个
|
|
||||||
if (loadmore) where.value.page_no++;
|
|
||||||
else where.value.page_no = 1;
|
|
||||||
let data = {
|
|
||||||
...where.value,
|
|
||||||
class_all: class_all,
|
|
||||||
class: class_id,
|
|
||||||
cate_id: class_id,
|
|
||||||
source: 4,
|
|
||||||
// top_cate_id: "",
|
|
||||||
// two_cate_id: ""
|
|
||||||
}
|
|
||||||
BranchProductListsApi(data).then(res => {
|
|
||||||
for (let key in res.data.extend) {
|
|
||||||
priceKey[key] = res.data.extend[key]
|
|
||||||
}
|
|
||||||
uni.setStorageSync("PRICE_KEY", JSON.stringify(priceKey))
|
|
||||||
if (loadmore) goodList.value.push(...res.data.lists);
|
|
||||||
else goodList.value = res.data.lists;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 商品列表触底
|
|
||||||
const loadMoreGood = () => {
|
|
||||||
|
|
||||||
getWXDom(instance)
|
|
||||||
getGoodList(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
const goodClassList = ref([]); // 一级分类
|
|
||||||
const goodClassTow = ref([]); // 二级分类
|
|
||||||
const goodClassThree = ref([]); // 三级分类
|
|
||||||
const classMap = new Map();
|
|
||||||
const getgoodClassList = (pid = 0, three = 1) => {
|
|
||||||
let page_no = classMap.get(pid) || 1;
|
|
||||||
goodClassListApi({
|
|
||||||
pid: pid,
|
|
||||||
page_no: page_no,
|
|
||||||
page_size: 30,
|
|
||||||
level: three,
|
|
||||||
source: 4 //来源
|
|
||||||
}).then(res => {
|
|
||||||
if (pid == 0) { // 加载一级分类时设置全部分类
|
|
||||||
if (!res.data?.lists?.length) return;
|
|
||||||
res.data?.lists?.unshift({
|
|
||||||
id: "",
|
|
||||||
name: "全部",
|
|
||||||
pic: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png",
|
|
||||||
children: []
|
|
||||||
})
|
|
||||||
res.data.lists = res.data.lists.map(item => {
|
|
||||||
if (!item.children) item.children = [];
|
|
||||||
item.children?.unshift({
|
|
||||||
id: "",
|
|
||||||
pid: item.id, //子分类的全部选项其实就是它本身
|
|
||||||
name: "全部",
|
|
||||||
})
|
|
||||||
item.children = item.children.map(t => {
|
|
||||||
if (!t.children) t.children = [];
|
|
||||||
t.children?.unshift({
|
|
||||||
id: "",
|
|
||||||
pid: t.id,
|
|
||||||
name: "全部",
|
|
||||||
})
|
|
||||||
return t;
|
|
||||||
})
|
|
||||||
return item;
|
|
||||||
})
|
|
||||||
// 给所有子级分配
|
|
||||||
goodClassList.value = [...goodClassList.value, ...res.data?.lists];
|
|
||||||
goodClassTow.value = goodClassList.value[0]?.children || [];
|
|
||||||
goodClassThree.value = goodClassTow.value[0]?.children || [];
|
|
||||||
topActive.value = goodClassList.value[0]?.id;
|
|
||||||
leftActive.value = goodClassTow.value[0]?.id;
|
|
||||||
rightActive.value = goodClassThree.value[0]?.id;
|
|
||||||
} else {
|
|
||||||
let flag = 1;
|
|
||||||
goodClassList.value.forEach(item => { // 给相应的一级分类添加子菜单
|
|
||||||
if (item.id == pid) {
|
|
||||||
if (!item.children) {
|
|
||||||
item.children = [];
|
|
||||||
item.children.unshift({
|
|
||||||
id: "",
|
|
||||||
pid: item.id,
|
|
||||||
name: "全部",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
item.children = [...item.children, ...res.data.lists];
|
|
||||||
item.isLoading = true;
|
|
||||||
goodClassTow.value = item.children;
|
|
||||||
flag = 0;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (flag) goodClassTow.value.forEach(item => { //给响应的二级子分类添加菜单
|
|
||||||
if (item.id == pid) {
|
|
||||||
if (!item.children) {
|
|
||||||
item.children = [];
|
|
||||||
item.children.unshift({
|
|
||||||
id: "",
|
|
||||||
pid: item.id,
|
|
||||||
name: "全部",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
item.children = [...item.children, ...res.data.lists];
|
|
||||||
item.isLoading = true;
|
|
||||||
goodClassThree.value = item.children;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
page_no++;
|
|
||||||
classMap.set(pid, page_no);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 胶囊布局
|
|
||||||
const btns = ref({
|
|
||||||
height: 0,
|
|
||||||
top: 0,
|
|
||||||
bottom: 0,
|
|
||||||
left: 0
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
onLoad(async (opt) => {
|
|
||||||
getAll()
|
|
||||||
|
|
||||||
// #ifndef H5
|
|
||||||
// 胶囊布局信息
|
|
||||||
btns.value = uni.getMenuButtonBoundingClientRect();
|
|
||||||
// #endif
|
|
||||||
})
|
|
||||||
|
|
||||||
const getAll = () => {
|
|
||||||
getgoodClassList(0)
|
|
||||||
getGoodList()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let instance; // 获取组件实例
|
|
||||||
const getWXDom = () => {
|
|
||||||
let query = uni.createSelectorQuery().in(instance).select("#drag_area");
|
|
||||||
query.fields({
|
|
||||||
size: true,
|
|
||||||
scrollOffset: true,
|
|
||||||
},
|
|
||||||
(data) => {
|
|
||||||
scoHeight = data.scrollHeight
|
|
||||||
targetHeight.value = data.scrollHeight - data.height
|
|
||||||
}
|
|
||||||
).exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
instance = getCurrentInstance(); // 获取组件实例
|
|
||||||
setTimeout(() => {
|
|
||||||
getWXDom(instance)
|
|
||||||
}, 500)
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.content {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
|
||||||
padding: 20rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #777;
|
|
||||||
// margin-top: 40rpx;
|
|
||||||
|
|
||||||
.nav-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
image {
|
|
||||||
height: 40rpx;
|
|
||||||
width: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
position: absolute;
|
|
||||||
top: -10rpx;
|
|
||||||
right: 10rpx;
|
|
||||||
background-color: #FF0000;
|
|
||||||
color: #FFFFFF;
|
|
||||||
text-align: center;
|
|
||||||
width: 30rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
font-size: 18rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.head-view {
|
|
||||||
background-color: #fff;
|
|
||||||
height: 180rpx;
|
|
||||||
width: 750rpx;
|
|
||||||
|
|
||||||
.list {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 20rpx;
|
|
||||||
font-size: 22rpx;
|
|
||||||
|
|
||||||
.item {
|
|
||||||
width: 120rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.c-img {
|
|
||||||
height: 100rpx;
|
|
||||||
width: 100rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 2px solid transparent;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.c-text {
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 2rpx 4rpx 3rpx 4rpx;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
margin-top: 5rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-active {
|
|
||||||
.c-img {
|
|
||||||
border: 2px solid #20b128;
|
|
||||||
}
|
|
||||||
|
|
||||||
.c-text {
|
|
||||||
background-color: #20b128;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.r-btn {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
height: 100%;
|
|
||||||
width: 60rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
box-shadow: -10rpx 0 60rpx 1rpx rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.cateOne {
|
|
||||||
background-color: #fff;
|
|
||||||
|
|
||||||
.head-title {
|
|
||||||
color: #666666;
|
|
||||||
font-size: 30rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
padding-left: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
|
||||||
padding: 20rpx 20rpx;
|
|
||||||
font-size: 22rpx;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(5, 1fr);
|
|
||||||
justify-content: center;
|
|
||||||
grid-gap: 20rpx;
|
|
||||||
|
|
||||||
|
|
||||||
.item {
|
|
||||||
width: 120rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.c-img {
|
|
||||||
height: 100rpx;
|
|
||||||
width: 100rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 2px solid transparent;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.c-text {
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 2rpx 4rpx 3rpx 4rpx;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
margin-top: 5rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-active {
|
|
||||||
.c-img {
|
|
||||||
border: 2px solid #20b128;
|
|
||||||
}
|
|
||||||
|
|
||||||
.c-text {
|
|
||||||
background-color: #20b128;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.classify-list {
|
|
||||||
padding: 20rpx 30rpx;
|
|
||||||
font-size: 22rpx;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
justify-content: center;
|
|
||||||
grid-gap: 20rpx;
|
|
||||||
|
|
||||||
.classify-list-item {
|
|
||||||
flex-shrink: 0;
|
|
||||||
text-align: center;
|
|
||||||
width: 150rpx;
|
|
||||||
height: 42rpx;
|
|
||||||
line-height: 42rpx;
|
|
||||||
background: #F6F6F6;
|
|
||||||
border-radius: 22rpx 22rpx 22rpx 22rpx;
|
|
||||||
border: 1rpx solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-active {
|
|
||||||
border: 1rpx solid #20b128;
|
|
||||||
color: #20b128;
|
|
||||||
background-color: rgba(#20b128, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-box {
|
|
||||||
// background-color: red;
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.left {
|
|
||||||
height: calc(100vh - var(--window-top) - var(--window-bottom) - 300rpx);
|
|
||||||
/* #ifdef H5 */
|
|
||||||
height: calc(100vh - 44px - 100rpx);
|
|
||||||
/* #endif */
|
|
||||||
width: 170rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
font-size: 24rpx;
|
|
||||||
|
|
||||||
.item {
|
|
||||||
height: 96rpx;
|
|
||||||
line-height: 96rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-active {
|
|
||||||
background-color: #fff;
|
|
||||||
position: relative;
|
|
||||||
color: #20b128;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
background-color: #20b128;
|
|
||||||
width: 6rpx;
|
|
||||||
height: 48rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(0, -50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
height: calc(100vh - var(--window-top) - 300rpx);
|
|
||||||
/* #ifdef H5 */
|
|
||||||
height: calc(100vh - 96px + 20rpx);
|
|
||||||
/* #endif */
|
|
||||||
width: 580rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.classify {
|
|
||||||
height: 150rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
|
||||||
position: relative;
|
|
||||||
font-size: 24rpx;
|
|
||||||
|
|
||||||
.classify-list {
|
|
||||||
display: flex;
|
|
||||||
padding: 20rpx;
|
|
||||||
|
|
||||||
.classify-list-item {
|
|
||||||
flex-shrink: 0;
|
|
||||||
text-align: center;
|
|
||||||
width: 108rpx;
|
|
||||||
height: 42rpx;
|
|
||||||
line-height: 42rpx;
|
|
||||||
background: #F6F6F6;
|
|
||||||
border-radius: 22rpx 22rpx 22rpx 22rpx;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
border: 1rpx solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-active {
|
|
||||||
border: 1rpx solid #20b128;
|
|
||||||
color: #20b128;
|
|
||||||
background-color: rgba(#20b128, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.done {
|
|
||||||
height: 90rpx;
|
|
||||||
width: 60rpx;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-by {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.item {
|
|
||||||
padding-right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-active {
|
|
||||||
color: #20b128;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
|
||||||
height: calc(100vh - var(--window-top) - 400rpx);
|
|
||||||
/* #ifdef H5 */
|
|
||||||
height: calc(100vh - 44px - 200rpx);
|
|
||||||
|
|
||||||
/* #endif */
|
|
||||||
.shop-item {
|
|
||||||
padding: 20rpx;
|
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
|
||||||
background-color: #fff;
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.shop-img {
|
|
||||||
height: 164rpx;
|
|
||||||
width: 164rpx;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
border-radius: 14rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
// background-image: url();
|
|
||||||
}
|
|
||||||
|
|
||||||
.shop-content {
|
|
||||||
width: 380rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.shop-content-li {
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #333333;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
|
|
||||||
.line-through {
|
|
||||||
text-decoration: line-through;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shop-content-li-l {
|
|
||||||
font-size: 22rpx;
|
|
||||||
width: 70rpx;
|
|
||||||
text-align-last: justify;
|
|
||||||
margin-right: 6rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
font-size: 16rpx;
|
|
||||||
color: #A17C3A;
|
|
||||||
background-color: #F3E7C0;
|
|
||||||
padding: 8rpx 4rpx;
|
|
||||||
margin-left: 4rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.shopconetent-btn {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// .icon {
|
|
||||||
// background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/3b653202406260957228679.png');
|
|
||||||
// width: 17rpx;
|
|
||||||
// height: 14rpx;
|
|
||||||
// background-size: 100% 100%;
|
|
||||||
// margin: 5rpx;
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.fiexd-btn-box {
|
|
||||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
height: 140rpx;
|
|
||||||
height: calc(constant(safe-area-inset-bottom) + 140rpx);
|
|
||||||
/* 适用于iOS设备 */
|
|
||||||
height: calc(env(safe-area-inset-bottom) + 140rpx);
|
|
||||||
/* 适用于Android设备 */
|
|
||||||
padding-top: 40rpx;
|
|
||||||
|
|
||||||
.price-info {
|
|
||||||
.row {
|
|
||||||
display: flex;
|
|
||||||
font-size: 26rpx;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&>view {
|
|
||||||
margin-right: 15rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.price {
|
|
||||||
color: #F55726;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
width: 200rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart {
|
|
||||||
position: absolute;
|
|
||||||
top: -40rpx;
|
|
||||||
left: 40rpx;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 80rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
background-color: #F55726;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 50%;
|
|
||||||
width: 26rpx;
|
|
||||||
height: 26rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 26rpx;
|
|
||||||
font-size: 18rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.headScoll {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
transition: 400ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
.store-info {
|
|
||||||
margin: 0 0 20rpx 20rpx;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.warp {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rect {
|
|
||||||
width: 630rpx;
|
|
||||||
height: 440rpx;
|
|
||||||
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/9c70c202406261048431851.png');
|
|
||||||
background-size: 100% 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
text-align: center;
|
|
||||||
// padding: 30rpx;
|
|
||||||
padding: 50rpx 32rpx;
|
|
||||||
|
|
||||||
.rect-tit {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
margin-bottom: 60rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.rect-contetn {
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rect-btn {
|
|
||||||
display: flex;
|
|
||||||
margin-top: 50rpx;
|
|
||||||
justify-content: space-around;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,320 +0,0 @@
|
||||||
## 2.5.0-20230101(2023-01-01)
|
|
||||||
- 秋云图表组件 修改条件编译顺序,确保uniapp的cli方式的项目依赖不完整时可以正常显示
|
|
||||||
- 秋云图表组件 恢复props属性directory的使用,以修复vue3项目中,开启echarts后,echarts目录识别错误的bug
|
|
||||||
- uCharts.js 修复区域图、混合图只有一个数据时图表显示不正确的bug
|
|
||||||
- uCharts.js 修复折线图、区域图中时间轴类别图表tooltip指示点显示不正确的bug
|
|
||||||
- uCharts.js 修复x轴使用labelCount时,并且boundaryGap = 'justify' 并且关闭Y轴显示的时候,最后一个坐标值不显示的bug
|
|
||||||
- uCharts.js 修复折线图只有一组数据时 ios16 渲染颜色不正确的bug
|
|
||||||
- uCharts.js 修复玫瑰图半径显示不正确的bug
|
|
||||||
- uCharts.js 柱状图、山峰图增加正负图功能,y轴网格如果需要显示0轴则由 min max 及 splitNumber 确定,后续版本优化自动显示0轴
|
|
||||||
- uCharts.js 柱状图column增加 opts.extra.column.labelPosition,数据标签位置,有效值为 outside外部, insideTop内顶部, center内中间, bottom内底部
|
|
||||||
- uCharts.js 雷达图radar增加 opts.extra.radar.labelShow,否显示各项标识文案是,默认true
|
|
||||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.boxPadding,提示窗边框填充距离,默认3px
|
|
||||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.fontSize,提示窗字体大小配置,默认13px
|
|
||||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.lineHeight,提示窗文字行高,默认20px
|
|
||||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.legendShow,是否显示左侧图例,默认true
|
|
||||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.legendShape,图例形状,图例标识样式,有效值为 auto自动跟随图例, diamond◆, circle●, triangle▲, square■, rect▬, line-
|
|
||||||
- uCharts.js 标记线markLine增加 opts.extra.markLine.labelFontSize,字体大小配置,默认13px
|
|
||||||
- uCharts.js 标记线markLine增加 opts.extra.markLine.labelPadding,标签边框内填充距离,默认6px
|
|
||||||
- uCharts.js 折线图line增加 opts.extra.line.linearType,渐变色类型,可选值 none关闭渐变色,custom 自定义渐变色。使用自定义渐变色时请赋值serie.linearColor作为颜色值
|
|
||||||
- uCharts.js 折线图line增加 serie.linearColor,渐变色数组,格式为2维数组[起始位置,颜色值],例如[[0,'#0EE2F8'],[0.3,'#2BDCA8'],[0.6,'#1890FF'],[1,'#9A60B4']]
|
|
||||||
- uCharts.js 折线图line增加 opts.extra.line.onShadow,是否开启折线阴影,开启后请赋值serie.setShadow阴影设置
|
|
||||||
- uCharts.js 折线图line增加 serie.setShadow,阴影配置,格式为4位数组:[offsetX,offsetY,blur,color]
|
|
||||||
- uCharts.js 折线图line增加 opts.extra.line.animation,动画效果方向,可选值为vertical 垂直动画效果,horizontal 水平动画效果
|
|
||||||
- uCharts.js X轴xAxis增加 opts.xAxis.lineHeight,X轴字体行高,默认20px
|
|
||||||
- uCharts.js X轴xAxis增加 opts.xAxis.marginTop,X轴文字距离轴线的距离,默认0px
|
|
||||||
- uCharts.js X轴xAxis增加 opts.xAxis.title,当前X轴标题
|
|
||||||
- uCharts.js X轴xAxis增加 opts.xAxis.titleFontSize,标题字体大小,默认13px
|
|
||||||
- uCharts.js X轴xAxis增加 opts.xAxis.titleOffsetY,标题纵向偏移距离,负数为向上偏移,正数向下偏移
|
|
||||||
- uCharts.js X轴xAxis增加 opts.xAxis.titleOffsetX,标题横向偏移距离,负数为向左偏移,正数向右偏移
|
|
||||||
- uCharts.js X轴xAxis增加 opts.xAxis.titleFontColor,标题字体颜色,默认#666666
|
|
||||||
|
|
||||||
## 报错TypeError: Cannot read properties of undefined (reading 'length')
|
|
||||||
- 如果是uni-modules版本组件,请先登录HBuilderX账号;
|
|
||||||
- 在HBuilderX中的manifest.json,点击重新获取uniapp的appid,或者删除appid重新粘贴,重新运行;
|
|
||||||
- 如果是cli项目请使用码云上的非uniCloud版本组件;
|
|
||||||
- 或者添加uniCloud的依赖;
|
|
||||||
- 或者使用原生uCharts;
|
|
||||||
## 2.4.5-20221130(2022-11-30)
|
|
||||||
- uCharts.js 优化tooltip当文字很多变为左侧显示时,如果画布仍显显示不下,提示框错位置变为以左侧0位置起画
|
|
||||||
- uCharts.js 折线图修复特殊情况下只有单点数据,并改变线宽后点变为圆形的bug
|
|
||||||
- uCharts.js 修复Y轴disabled启用后无效并报错的bug
|
|
||||||
- uCharts.js 修复仪表盘起始结束角度特殊情况下显示不正确的bug
|
|
||||||
- uCharts.js 雷达图新增参数 opts.extra.radar.radius , 自定义雷达图半径
|
|
||||||
- uCharts.js 折线图、区域图增加tooltip指示点,opts.extra.line.activeType/opts.extra.area.activeType,可选值"none"不启用激活指示点,"hollow"空心点模式,"solid"实心点模式
|
|
||||||
## 2.4.4-20221102(2022-11-02)
|
|
||||||
- 秋云图表组件 修复使用echarts时reload、reshow无法调用重新渲染的bug,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/40)
|
|
||||||
- 秋云图表组件 修复使用echarts时,初始化时宽高不正确的bug,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/42)
|
|
||||||
- 秋云图表组件 修复uniapp的h5使用history模式时,无法加载echarts的bug
|
|
||||||
- 秋云图表组件 小程序端@complete、@scrollLeft、@scrollRight、@getTouchStart、@getTouchMove、@getTouchEnd事件增加opts参数传出,方便一些特殊需求的交互获取数据。
|
|
||||||
|
|
||||||
- uCharts.js 修复calTooltipYAxisData方法内formatter格式化方法未与y轴方法同步的问题,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/43)
|
|
||||||
- uCharts.js 地图新增参数opts.series[i].fillOpacity,以透明度方式来设置颜色过度效果,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/38)
|
|
||||||
- uCharts.js 地图新增参数opts.extra.map.active,是否启用点击激活变色
|
|
||||||
- uCharts.js 地图新增参数opts.extra.map.activeTextColor,是否启用点击激活变色
|
|
||||||
- uCharts.js 地图新增渲染完成事件renderComplete
|
|
||||||
- uCharts.js 漏斗图修复当部分数据相同时tooltip提示窗点击错误的bug
|
|
||||||
- uCharts.js 漏斗图新增参数series.data[i].centerText 居中标签文案
|
|
||||||
- uCharts.js 漏斗图新增参数series.data[i].centerTextSize 居中标签文案字体大小,默认opts.fontSize
|
|
||||||
- uCharts.js 漏斗图新增参数series.data[i].centerTextColor 居中标签文案字体颜色,默认#FFFFFF
|
|
||||||
- uCharts.js 漏斗图新增参数opts.extra.funnel.minSize 最小值的最小宽度,默认0
|
|
||||||
- uCharts.js 进度条新增参数opts.extra.arcbar.direction,动画方向,可选值为cw顺时针、ccw逆时针
|
|
||||||
- uCharts.js 混合图新增参数opts.extra.mix.line.width,折线的宽度,默认2
|
|
||||||
- uCharts.js 修复tooltip开启horizentalLine水平横线标注时,图表显示错位的bug
|
|
||||||
- uCharts.js 优化tooltip当文字很多变为左侧显示时,如果画布仍显显示不下,提示框错位置变为以左侧0位置起画
|
|
||||||
- uCharts.js 修复开启滚动条后X轴文字超出绘图区域后的隐藏逻辑
|
|
||||||
- uCharts.js 柱状图、条状图修复堆叠模式不能通过{value,color}赋值单个柱子颜色的问题
|
|
||||||
- uCharts.js 气泡图修复不识别series.textSize和series.textColor的bug
|
|
||||||
|
|
||||||
## 报错TypeError: Cannot read properties of undefined (reading 'length')
|
|
||||||
1. 如果是uni-modules版本组件,请先登录HBuilderX账号;
|
|
||||||
2. 在HBuilderX中的manifest.json,点击重新获取uniapp的appid,或者删除appid重新粘贴,重新运行;
|
|
||||||
3. 如果是cli项目请使用码云上的非uniCloud版本组件;
|
|
||||||
4. 或者添加uniCloud的依赖;
|
|
||||||
5. 或者使用原生uCharts;
|
|
||||||
## 2.4.3-20220505(2022-05-05)
|
|
||||||
- 秋云图表组件 修复开启canvas2d后将series赋值为空数组显示加载图标时,再次赋值后画布闪动的bug
|
|
||||||
- 秋云图表组件 修复升级hbx最新版后ECharts的highlight方法报错的bug
|
|
||||||
- uCharts.js 雷达图新增参数opts.extra.radar.gridEval,数据点位网格抽希,默认1
|
|
||||||
- uCharts.js 雷达图新增参数opts.extra.radar.axisLabel, 是否显示刻度点值,默认false
|
|
||||||
- uCharts.js 雷达图新增参数opts.extra.radar.axisLabelTofix,刻度点值小数位数,默认0
|
|
||||||
- uCharts.js 雷达图新增参数opts.extra.radar.labelPointShow,是否显示末端刻度圆点,默认false
|
|
||||||
- uCharts.js 雷达图新增参数opts.extra.radar.labelPointRadius,刻度圆点的半径,默认3
|
|
||||||
- uCharts.js 雷达图新增参数opts.extra.radar.labelPointColor,刻度圆点的颜色,默认#cccccc
|
|
||||||
- uCharts.js 雷达图新增参数opts.extra.radar.linearType,渐变色类型,可选值"none"关闭渐变,"custom"开启渐变
|
|
||||||
- uCharts.js 雷达图新增参数opts.extra.radar.customColor,自定义渐变颜色,数组类型对应series的数组长度以匹配不同series颜色的不同配色方案,例如["#FA7D8D", "#EB88E2"]
|
|
||||||
- uCharts.js 雷达图优化支持series.textColor、series.textSize属性
|
|
||||||
- uCharts.js 柱状图中温度计式图标,优化支持全圆角类型,修复边框有缝隙的bug,详见官网【演示】中的温度计图表
|
|
||||||
- uCharts.js 柱状图新增参数opts.extra.column.activeWidth,当前点击柱状图的背景宽度,默认一个单元格单位
|
|
||||||
- uCharts.js 混合图增加opts.extra.mix.area.gradient 区域图是否开启渐变色
|
|
||||||
- uCharts.js 混合图增加opts.extra.mix.area.opacity 区域图透明度,默认0.2
|
|
||||||
- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelText,自定义标签文字,避免formatter格式化的繁琐,详见官网【演示】中的饼图
|
|
||||||
- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelShow,自定义是否显示某一个指示标签,避免因饼图类别太多导致标签重复或者居多导致图形变形的问题,详见官网【演示】中的饼图
|
|
||||||
- uCharts.js 增加opts.series[i].legendText/opts.series[0].data[i].legendText(与series.name同级)自定义图例显示文字的方法
|
|
||||||
- uCharts.js 优化X轴、Y轴formatter格式化方法增加形参,统一为fromatter:function(value,index,opts){}
|
|
||||||
- uCharts.js 修复横屏模式下无法使用双指缩放方法的bug
|
|
||||||
- uCharts.js 修复当只有一条数据或者多条数据值相等的时候Y轴自动计算的最大值错误的bug
|
|
||||||
- 【官网模板】增加外部自定义图例与图表交互的例子,[点击跳转](https://www.ucharts.cn/v2/#/layout/info?id=2)
|
|
||||||
|
|
||||||
## 注意:非unimodules 版本如因更新 hbx 至 3.4.7 导致报错如下,请到码云更新非 unimodules 版本组件,[点击跳转](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6)
|
|
||||||
> Error in callback for immediate watcher "uchartsOpts": "SyntaxError: Unexpected token u in JSON at position 0"
|
|
||||||
## 2.4.2-20220421(2022-04-21)
|
|
||||||
- 秋云图表组件 修复HBX升级3.4.6.20220420版本后echarts报错的问题
|
|
||||||
## 2.4.2-20220420(2022-04-20)
|
|
||||||
## 重要!此版本uCharts新增了很多功能,修复了诸多已知问题
|
|
||||||
- 秋云图表组件 新增onzoom开启双指缩放功能(仅uCharts),前提需要直角坐标系类图表类型,并且ontouch为true、opts.enableScroll为true,详见实例项目K线图
|
|
||||||
- 秋云图表组件 新增optsWatch是否监听opts变化,关闭optsWatch后,动态修改opts不会触发图表重绘
|
|
||||||
- 秋云图表组件 修复开启canvas2d功能后,动态更新数据后画布闪动的bug
|
|
||||||
- 秋云图表组件 去除directory属性,改为自动获取echarts.min.js路径(升级不受影响)
|
|
||||||
- 秋云图表组件 增加getImage()方法及@getImage事件,通过ref调用getImage()方法获,触发@getImage事件获取当前画布的base64图片文件流。
|
|
||||||
- 秋云图表组件 支付宝、字节跳动、飞书、快手小程序支持开启canvas2d同层渲染设置。
|
|
||||||
- 秋云图表组件 新增加【非uniCloud】版本组件,避免有些不需要uniCloud的使用组件发布至小程序需要提交隐私声明问题,请到码云[【非uniCloud版本】](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6),或npm[【非uniCloud版本】](https://www.npmjs.com/package/@qiun/uni-ucharts)下载使用。
|
|
||||||
- uCharts.js 新增dobuleZoom双指缩放功能
|
|
||||||
- uCharts.js 新增山峰图type="mount",数据格式为饼图类格式,不需要传入categories,具体详见新版官网在线演示
|
|
||||||
- uCharts.js 修复折线图当数据中存在null时tooltip报错的bug
|
|
||||||
- uCharts.js 修复饼图类当画布比较小时自动计算的半径是负数报错的bug
|
|
||||||
- uCharts.js 统一各图表类型的series.formatter格式化方法的形参为(val, index, series, opts),方便格式化时有更多参数可用
|
|
||||||
- uCharts.js 标记线功能增加labelText自定义显示文字,增加labelAlign标签显示位置(左侧或右侧),增加标签显示位置微调labelOffsetX、labelOffsetY
|
|
||||||
- uCharts.js 修复条状图当数值很小时开启圆角后样式错误的bug
|
|
||||||
- uCharts.js 修复X轴开启disabled后,X轴仍占用空间的bug
|
|
||||||
- uCharts.js 修复X轴开启滚动条并且开启rotateLabel后,X轴文字与滚动条重叠的bug
|
|
||||||
- uCharts.js 增加X轴rotateAngle文字旋转自定义角度,取值范围(-90至90)
|
|
||||||
- uCharts.js 修复地图文字标签层级显示不正确的bug
|
|
||||||
- uCharts.js 修复饼图、圆环图、玫瑰图当数据全部为0的时候不显示数据标签的bug
|
|
||||||
- uCharts.js 修复当opts.padding上边距为0时,Y轴顶部刻度标签位置不正确的bug
|
|
||||||
|
|
||||||
## 另外我们还开发了各大原生小程序组件,已发布至码云和npm
|
|
||||||
[https://gitee.com/uCharts/uCharts](https://gitee.com/uCharts/uCharts)
|
|
||||||
[https://www.npmjs.com/~qiun](https://www.npmjs.com/~qiun)
|
|
||||||
|
|
||||||
## 对于原生uCharts文档我们已上线新版官方网站,详情点击下面链接进入官网
|
|
||||||
[https://www.uCharts.cn/v2/](https://www.ucharts.cn/v2/)
|
|
||||||
## 2.3.7-20220122(2022-01-22)
|
|
||||||
## 重要!使用vue3编译,请使用cli模式并升级至最新依赖,HbuilderX编译需要使用3.3.8以上版本
|
|
||||||
- uCharts.js 修复uni-app平台组件模式使用vue3编译到小程序报错的bug。
|
|
||||||
## 2.3.7-20220118(2022-01-18)
|
|
||||||
## 注意,使用vue3的前提是需要3.3.8.20220114-alpha版本的HBuilder!
|
|
||||||
## 2.3.67-20220118(2022-01-18)
|
|
||||||
- 秋云图表组件 组件初步支持vue3,全端编译会有些问题,具体详见下面修改:
|
|
||||||
1. 小程序端运行时,在uni_modules文件夹的qiun-data-charts.js中搜索 new uni_modules_qiunDataCharts_js_sdk_uCharts_uCharts.uCharts,将.uCharts去掉。
|
|
||||||
2. 小程序端发行时,在uni_modules文件夹的qiun-data-charts.js中搜索 new e.uCharts,将.uCharts去掉,变为 new e。
|
|
||||||
3. 如果觉得上述步骤比较麻烦,如果您的项目只编译到小程序端,可以修改u-charts.js最后一行导出方式,将 export default uCharts;变更为 export default { uCharts: uCharts }; 这样变更后,H5和App端的renderjs会有问题,请开发者自行选择。(此问题非组件问题,请等待DC官方修复Vue3的小程序端)
|
|
||||||
## 2.3.6-20220111(2022-01-11)
|
|
||||||
- 秋云图表组件 修改组件 props 属性中的 background 默认值为 rgba(0,0,0,0)
|
|
||||||
## 2.3.6-20211201(2021-12-01)
|
|
||||||
- uCharts.js 修复bar条状图开启圆角模式时,值很小时圆角渲染错误的bug
|
|
||||||
## 2.3.5-20211014(2021-10-15)
|
|
||||||
- uCharts.js 增加vue3的编译支持(仅原生uCharts,qiun-data-charts组件后续会支持,请关注更新)
|
|
||||||
## 2.3.4-20211012(2021-10-12)
|
|
||||||
- 秋云图表组件 修复 mac os x 系统 mouseover 事件丢失的 bug
|
|
||||||
## 2.3.3-20210706(2021-07-06)
|
|
||||||
- uCharts.js 增加雷达图开启数据点值(opts.dataLabel)的显示
|
|
||||||
## 2.3.2-20210627(2021-06-27)
|
|
||||||
- 秋云图表组件 修复tooltipCustom个别情况下传值不正确报错TypeError: Cannot read property 'name' of undefined的bug
|
|
||||||
## 2.3.1-20210616(2021-06-16)
|
|
||||||
- uCharts.js 修复圆角柱状图使用4角圆角时,当数值过大时不正确的bug
|
|
||||||
## 2.3.0-20210612(2021-06-12)
|
|
||||||
- uCharts.js 【重要】uCharts增加nvue兼容,可在nvue项目中使用gcanvas组件渲染uCharts,[详见码云uCharts-demo-nvue](https://gitee.com/uCharts/uCharts)
|
|
||||||
- 秋云图表组件 增加tapLegend属性,是否开启图例点击交互事件
|
|
||||||
- 秋云图表组件 getIndex事件中增加返回uCharts实例中的opts参数,以便在页面中调用参数
|
|
||||||
- 示例项目 pages/other/other.vue增加app端自定义tooltip的方法,详见showOptsTooltip方法
|
|
||||||
## 2.2.1-20210603(2021-06-03)
|
|
||||||
- uCharts.js 修复饼图、圆环图、玫瑰图,当起始角度不为0时,tooltip位置不准确的bug
|
|
||||||
- uCharts.js 增加温度计式柱状图开启顶部半圆形的配置
|
|
||||||
## 2.2.0-20210529(2021-05-29)
|
|
||||||
- uCharts.js 增加条状图type="bar"
|
|
||||||
- 示例项目 pages/ucharts/ucharts.vue增加条状图的demo
|
|
||||||
## 2.1.7-20210524(2021-05-24)
|
|
||||||
- uCharts.js 修复大数据量模式下曲线图不平滑的bug
|
|
||||||
## 2.1.6-20210523(2021-05-23)
|
|
||||||
- 秋云图表组件 修复小程序端开启滚动条更新数据后滚动条位置不符合预期的bug
|
|
||||||
## 2.1.5-2021051702(2021-05-17)
|
|
||||||
- uCharts.js 修复自定义Y轴min和max值为0时不能正确显示的bug
|
|
||||||
## 2.1.5-20210517(2021-05-17)
|
|
||||||
- uCharts.js 修复Y轴自定义min和max时,未按指定的最大值最小值显示坐标轴刻度的bug
|
|
||||||
## 2.1.4-20210516(2021-05-16)
|
|
||||||
- 秋云图表组件 优化onWindowResize防抖方法
|
|
||||||
- 秋云图表组件 修复APP端uCharts更新数据时,清空series显示loading图标后再显示图表,图表抖动的bug
|
|
||||||
- uCharts.js 修复开启canvas2d后,x轴、y轴、series自定义字体大小未按比例缩放的bug
|
|
||||||
- 示例项目 修复format-e.vue拼写错误导致app端使用uCharts渲染图表
|
|
||||||
## 2.1.3-20210513(2021-05-13)
|
|
||||||
- 秋云图表组件 修改uCharts变更chartData数据为updateData方法,支持带滚动条的数据动态打点
|
|
||||||
- 秋云图表组件 增加onWindowResize防抖方法 fix by ど誓言,如尘般染指流年づ
|
|
||||||
- 秋云图表组件 H5或者APP变更chartData数据显示loading图表时,原数据闪现的bug
|
|
||||||
- 秋云图表组件 props增加errorReload禁用错误点击重新加载的方法
|
|
||||||
- uCharts.js 增加tooltip显示category(x轴对应点位)标题的功能,opts.extra.tooltip.showCategory,默认为false
|
|
||||||
- uCharts.js 修复mix混合图只有柱状图时,tooltip的分割线显示位置不正确的bug
|
|
||||||
- uCharts.js 修复开启滚动条,图表在拖动中动态打点,滚动条位置不正确的bug
|
|
||||||
- uCharts.js 修复饼图类数据格式为echarts数据格式,series为空数组报错的bug
|
|
||||||
- 示例项目 修改uCharts.js更新到v2.1.2版本后,@getIndex方法获取索引值变更为e.currentIndex.index
|
|
||||||
- 示例项目 pages/updata/updata.vue增加滚动条拖动更新(数据动态打点)的demo
|
|
||||||
- 示例项目 pages/other/other.vue增加errorReload禁用错误点击重新加载的demo
|
|
||||||
## 2.1.2-20210509(2021-05-09)
|
|
||||||
秋云图表组件 修复APP端初始化时就传入chartData或lacaldata不显示图表的bug
|
|
||||||
## 2.1.1-20210509(2021-05-09)
|
|
||||||
- 秋云图表组件 变更ECharts的eopts配置在renderjs内执行,支持在config-echarts.js配置文件内写function配置。
|
|
||||||
- 秋云图表组件 修复APP端报错Prop being mutated: "onmouse"错误的bug。
|
|
||||||
- 秋云图表组件 修复APP端报错Error: Not Found:Page[6][-1,27] at view.umd.min.js:1的bug。
|
|
||||||
## 2.1.0-20210507(2021-05-07)
|
|
||||||
- 秋云图表组件 修复初始化时就有数据或者数据更新的时候loading加载动画闪动的bug
|
|
||||||
- uCharts.js 修复x轴format方法categories为字符串类型时返回NaN的bug
|
|
||||||
- uCharts.js 修复series.textColor、legend.fontColor未执行全局默认颜色的bug
|
|
||||||
## 2.1.0-20210506(2021-05-06)
|
|
||||||
- 秋云图表组件 修复极个别情况下报错item.properties undefined的bug
|
|
||||||
- 秋云图表组件 修复极个别情况下关闭加载动画reshow不起作用,无法显示图表的bug
|
|
||||||
- 示例项目 pages/ucharts/ucharts.vue 增加时间轴折线图(type="tline")、时间轴区域图(type="tarea")、散点图(type="scatter")、气泡图demo(type="bubble")、倒三角形漏斗图(opts.extra.funnel.type="triangle")、金字塔形漏斗图(opts.extra.funnel.type="pyramid")
|
|
||||||
- 示例项目 pages/format-u/format-u.vue 增加X轴format格式化示例
|
|
||||||
- uCharts.js 升级至v2.1.0版本
|
|
||||||
- uCharts.js 修复 玫瑰图面积模式点击tooltip位置不正确的bug
|
|
||||||
- uCharts.js 修复 玫瑰图点击图例,只剩一个类别显示空白的bug
|
|
||||||
- uCharts.js 修复 饼图类图点击图例,其他图表tooltip位置某些情况下不准的bug
|
|
||||||
- uCharts.js 修复 x轴为矢量轴(时间轴)情况下,点击tooltip位置不正确的bug
|
|
||||||
- uCharts.js 修复 词云图获取点击索引偶尔不准的bug
|
|
||||||
- uCharts.js 增加 直角坐标系图表X轴format格式化方法(原生uCharts.js用法请使用formatter)
|
|
||||||
- uCharts.js 增加 漏斗图扩展配置,倒三角形(opts.extra.funnel.type="triangle"),金字塔形(opts.extra.funnel.type="pyramid")
|
|
||||||
- uCharts.js 增加 散点图(opts.type="scatter")、气泡图(opts.type="bubble")
|
|
||||||
- 后期计划 完善散点图、气泡图,增加markPoints标记点,增加横向条状图。
|
|
||||||
## 2.0.0-20210502(2021-05-02)
|
|
||||||
- uCharts.js 修复词云图获取点击索引不正确的bug
|
|
||||||
## 2.0.0-20210501(2021-05-01)
|
|
||||||
- 秋云图表组件 修复QQ小程序、百度小程序在关闭动画效果情况下,v-for循环使用图表,显示不正确的bug
|
|
||||||
## 2.0.0-20210426(2021-04-26)
|
|
||||||
- 秋云图表组件 修复QQ小程序不支持canvas2d的bug
|
|
||||||
- 秋云图表组件 修复钉钉小程序某些情况点击坐标计算错误的bug
|
|
||||||
- uCharts.js 增加 extra.column.categoryGap 参数,柱状图类每个category点位(X轴点)柱子组之间的间距
|
|
||||||
- uCharts.js 增加 yAxis.data[i].titleOffsetY 参数,标题纵向偏移距离,负数为向上偏移,正数向下偏移
|
|
||||||
- uCharts.js 增加 yAxis.data[i].titleOffsetX 参数,标题横向偏移距离,负数为向左偏移,正数向右偏移
|
|
||||||
- uCharts.js 增加 extra.gauge.labelOffset 参数,仪表盘标签文字径向便宜距离,默认13px
|
|
||||||
## 2.0.0-20210422-2(2021-04-22)
|
|
||||||
秋云图表组件 修复 formatterAssign 未判断 args[key] == null 的情况导致栈溢出的 bug
|
|
||||||
## 2.0.0-20210422(2021-04-22)
|
|
||||||
- 秋云图表组件 修复H5、APP、支付宝小程序、微信小程序canvas2d模式下横屏模式的bug
|
|
||||||
## 2.0.0-20210421(2021-04-21)
|
|
||||||
- uCharts.js 修复多行图例的情况下,图例在上方或者下方时,图例float为左侧或者右侧时,第二行及以后的图例对齐方式不正确的bug
|
|
||||||
## 2.0.0-20210420(2021-04-20)
|
|
||||||
- 秋云图表组件 修复微信小程序开启canvas2d模式后,windows版微信小程序不支持canvas2d模式的bug
|
|
||||||
- 秋云图表组件 修改非uni_modules版本为v2.0版本qiun-data-charts组件
|
|
||||||
## 2.0.0-20210419(2021-04-19)
|
|
||||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
|
||||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
|
|
||||||
## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
|
|
||||||
## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
|
||||||
## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
|
|
||||||
## <font color=#FF0000> 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍! </font>
|
|
||||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
|
||||||
## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
|
||||||
- uCharts.js 修复混合图中柱状图单独设置颜色不生效的bug
|
|
||||||
- uCharts.js 修复多Y轴单独设置fontSize时,开启canvas2d后,未对应放大字体的bug
|
|
||||||
## 2.0.0-20210418(2021-04-18)
|
|
||||||
- 秋云图表组件 增加directory配置,修复H5端history模式下如果发布到二级目录无法正确加载echarts.min.js的bug
|
|
||||||
## 2.0.0-20210416(2021-04-16)
|
|
||||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
|
||||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
|
|
||||||
## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
|
|
||||||
## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
|
||||||
## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
|
|
||||||
## <font color=#FF0000> 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍! </font>
|
|
||||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
|
||||||
## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
|
||||||
- 秋云图表组件 修复APP端某些情况下报错`Not Found Page`的bug,fix by 高级bug开发技术员
|
|
||||||
- 示例项目 修复APP端v-for循环某些情况下报错`Not Found Page`的bug,fix by 高级bug开发技术员
|
|
||||||
- uCharts.js 修复非直角坐标系tooltip提示窗右侧超出未变换方向显示的bug
|
|
||||||
## 2.0.0-20210415(2021-04-15)
|
|
||||||
- 秋云图表组件 修复H5端发布到二级目录下echarts无法加载的bug
|
|
||||||
- 秋云图表组件 修复某些情况下echarts.off('finished')移除监听事件报错的bug
|
|
||||||
## 2.0.0-20210414(2021-04-14)
|
|
||||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
|
||||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
|
|
||||||
## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
|
|
||||||
## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
|
||||||
## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
|
|
||||||
## <font color=#FF0000> 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍! </font>
|
|
||||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
|
||||||
## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
|
||||||
- 秋云图表组件 修复H5端在cli项目下ECharts引用地址错误的bug
|
|
||||||
- 示例项目 增加ECharts的formatter用法的示例(详见示例项目format-e.vue)
|
|
||||||
- uCharts.js 增加圆环图中心背景色的配置extra.ring.centerColor
|
|
||||||
- uCharts.js 修复微信小程序安卓端柱状图开启透明色后显示不正确的bug
|
|
||||||
## 2.0.0-20210413(2021-04-13)
|
|
||||||
- 秋云图表组件 修复百度小程序多个图表真机未能正确获取根元素dom尺寸的bug
|
|
||||||
- 秋云图表组件 修复百度小程序横屏模式方向不正确的bug
|
|
||||||
- 秋云图表组件 修改ontouch时,@getTouchStart@getTouchMove@getTouchEnd的触发条件
|
|
||||||
- uCharts.js 修复饼图类数据格式series属性不生效的bug
|
|
||||||
- uCharts.js 增加时序区域图 详见示例项目中ucharts.vue
|
|
||||||
## 2.0.0-20210412-2(2021-04-12)
|
|
||||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
|
||||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX。如仍不好用,请重启电脑,此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
|
||||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
|
||||||
## [图表组件在uniCloudAdmin中的应用 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
|
||||||
- 秋云图表组件 修复uCharts在APP端横屏模式下不能正确渲染的bug
|
|
||||||
- 示例项目 增加ECharts柱状图渐变色、圆角柱状图、横向柱状图(条状图)的示例
|
|
||||||
## 2.0.0-20210412(2021-04-12)
|
|
||||||
- 秋云图表组件 修复created中判断echarts导致APP端无法识别,改回mounted中判断echarts初始化
|
|
||||||
- uCharts.js 修复2d模式下series.textOffset未乘像素比的bug
|
|
||||||
## 2.0.0-20210411(2021-04-11)
|
|
||||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
|
||||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,并清空小程序开发者工具缓存。
|
|
||||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
|
||||||
## [图表组件在uniCloudAdmin中的应用 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
|
||||||
- uCharts.js 折线图区域图增加connectNulls断点续连的功能,详见示例项目中ucharts.vue
|
|
||||||
- 秋云图表组件 变更初始化方法为created,变更type2d默认值为true,优化2d模式下组件初始化后dom获取不到的bug
|
|
||||||
- 秋云图表组件 修复左右布局时,右侧图表点击坐标错误的bug,修复tooltip柱状图自定义颜色显示object的bug
|
|
||||||
## 2.0.0-20210410(2021-04-10)
|
|
||||||
- 修复左右布局时,右侧图表点击坐标错误的bug,修复柱状图自定义颜色tooltip显示object的bug
|
|
||||||
- 增加标记线及柱状图自定义颜色的demo
|
|
||||||
## 2.0.0-20210409(2021-04-08)
|
|
||||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧【使用HBuilderX导入插件】即可体验,DEMO演示及在线生成工具(v2.0文档)[https://demo.ucharts.cn](https://demo.ucharts.cn)
|
|
||||||
## 图表组件在uniCloudAdmin中的应用 [UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
|
||||||
- uCharts.js 修复钉钉小程序百度小程序measureText不准确的bug,修复2d模式下饼图类activeRadius为按比例放大的bug
|
|
||||||
- 修复组件在支付宝小程序端点击位置不准确的bug
|
|
||||||
## 2.0.0-20210408(2021-04-07)
|
|
||||||
- 修复组件在支付宝小程序端不能显示的bug(目前支付宝小程不能点击交互,后续修复)
|
|
||||||
- uCharts.js 修复高分屏下柱状图类,圆弧进度条 自定义宽度不能按比例放大的bug
|
|
||||||
## 2.0.0-20210407(2021-04-06)
|
|
||||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧【使用HBuilderX导入插件】即可体验,DEMO演示及在线生成工具(v2.0文档)[https://demo.ucharts.cn](https://demo.ucharts.cn)
|
|
||||||
## 增加 通过tofix和unit快速格式化y轴的demo add by `howcode`
|
|
||||||
## 增加 图表组件在uniCloudAdmin中的应用 [UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
|
||||||
## 2.0.0-20210406(2021-04-05)
|
|
||||||
# 秋云图表组件+uCharts v2.0版本同步上线,使用方法详见https://demo.ucharts.cn帮助页
|
|
||||||
## 2.0.0(2021-04-05)
|
|
||||||
# 秋云图表组件+uCharts v2.0版本同步上线,使用方法详见https://demo.ucharts.cn帮助页
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,162 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="container loading1">
|
|
||||||
<view class="shape shape1"></view>
|
|
||||||
<view class="shape shape2"></view>
|
|
||||||
<view class="shape shape3"></view>
|
|
||||||
<view class="shape shape4"></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'loading1',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped="true">
|
|
||||||
.container {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.container.loading1 {
|
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.container .shape {
|
|
||||||
position: absolute;
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
border-radius: 1px;
|
|
||||||
}
|
|
||||||
.container .shape.shape1 {
|
|
||||||
left: 0;
|
|
||||||
background-color: #1890FF;
|
|
||||||
}
|
|
||||||
.container .shape.shape2 {
|
|
||||||
right: 0;
|
|
||||||
background-color: #91CB74;
|
|
||||||
}
|
|
||||||
.container .shape.shape3 {
|
|
||||||
bottom: 0;
|
|
||||||
background-color: #FAC858;
|
|
||||||
}
|
|
||||||
.container .shape.shape4 {
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
background-color: #EE6666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading1 .shape1 {
|
|
||||||
-webkit-animation: animation1shape1 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation1shape1 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation1shape1 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(16px, 16px);
|
|
||||||
transform: translate(16px, 16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation1shape1 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(16px, 16px);
|
|
||||||
transform: translate(16px, 16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading1 .shape2 {
|
|
||||||
-webkit-animation: animation1shape2 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation1shape2 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation1shape2 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-16px, 16px);
|
|
||||||
transform: translate(-16px, 16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation1shape2 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-16px, 16px);
|
|
||||||
transform: translate(-16px, 16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading1 .shape3 {
|
|
||||||
-webkit-animation: animation1shape3 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation1shape3 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation1shape3 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(16px, -16px);
|
|
||||||
transform: translate(16px, -16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation1shape3 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(16px, -16px);
|
|
||||||
transform: translate(16px, -16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading1 .shape4 {
|
|
||||||
-webkit-animation: animation1shape4 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation1shape4 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation1shape4 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-16px, -16px);
|
|
||||||
transform: translate(-16px, -16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation1shape4 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-16px, -16px);
|
|
||||||
transform: translate(-16px, -16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
|
@ -1,170 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="container loading2">
|
|
||||||
<view class="shape shape1"></view>
|
|
||||||
<view class="shape shape2"></view>
|
|
||||||
<view class="shape shape3"></view>
|
|
||||||
<view class="shape shape4"></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'loading2',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped="true">
|
|
||||||
.container {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container.loading2 {
|
|
||||||
-webkit-transform: rotate(10deg);
|
|
||||||
transform: rotate(10deg);
|
|
||||||
}
|
|
||||||
.container.loading2 .shape {
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.container.loading2{
|
|
||||||
-webkit-animation: rotation 1s infinite;
|
|
||||||
animation: rotation 1s infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container .shape {
|
|
||||||
position: absolute;
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
border-radius: 1px;
|
|
||||||
}
|
|
||||||
.container .shape.shape1 {
|
|
||||||
left: 0;
|
|
||||||
background-color: #1890FF;
|
|
||||||
}
|
|
||||||
.container .shape.shape2 {
|
|
||||||
right: 0;
|
|
||||||
background-color: #91CB74;
|
|
||||||
}
|
|
||||||
.container .shape.shape3 {
|
|
||||||
bottom: 0;
|
|
||||||
background-color: #FAC858;
|
|
||||||
}
|
|
||||||
.container .shape.shape4 {
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
background-color: #EE6666;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.loading2 .shape1 {
|
|
||||||
-webkit-animation: animation2shape1 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation2shape1 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation2shape1 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(20px, 20px);
|
|
||||||
transform: translate(20px, 20px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation2shape1 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(20px, 20px);
|
|
||||||
transform: translate(20px, 20px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading2 .shape2 {
|
|
||||||
-webkit-animation: animation2shape2 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation2shape2 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation2shape2 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-20px, 20px);
|
|
||||||
transform: translate(-20px, 20px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation2shape2 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-20px, 20px);
|
|
||||||
transform: translate(-20px, 20px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading2 .shape3 {
|
|
||||||
-webkit-animation: animation2shape3 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation2shape3 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation2shape3 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(20px, -20px);
|
|
||||||
transform: translate(20px, -20px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation2shape3 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(20px, -20px);
|
|
||||||
transform: translate(20px, -20px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading2 .shape4 {
|
|
||||||
-webkit-animation: animation2shape4 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation2shape4 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation2shape4 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-20px, -20px);
|
|
||||||
transform: translate(-20px, -20px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation2shape4 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-20px, -20px);
|
|
||||||
transform: translate(-20px, -20px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
|
@ -1,173 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="container loading3">
|
|
||||||
<view class="shape shape1"></view>
|
|
||||||
<view class="shape shape2"></view>
|
|
||||||
<view class="shape shape3"></view>
|
|
||||||
<view class="shape shape4"></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'loading3',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped="true">
|
|
||||||
.container {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container.loading3 {
|
|
||||||
-webkit-animation: rotation 1s infinite;
|
|
||||||
animation: rotation 1s infinite;
|
|
||||||
}
|
|
||||||
.container.loading3 .shape1 {
|
|
||||||
border-top-left-radius: 10px;
|
|
||||||
}
|
|
||||||
.container.loading3 .shape2 {
|
|
||||||
border-top-right-radius: 10px;
|
|
||||||
}
|
|
||||||
.container.loading3 .shape3 {
|
|
||||||
border-bottom-left-radius: 10px;
|
|
||||||
}
|
|
||||||
.container.loading3 .shape4 {
|
|
||||||
border-bottom-right-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container .shape {
|
|
||||||
position: absolute;
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
border-radius: 1px;
|
|
||||||
}
|
|
||||||
.container .shape.shape1 {
|
|
||||||
left: 0;
|
|
||||||
background-color: #1890FF;
|
|
||||||
}
|
|
||||||
.container .shape.shape2 {
|
|
||||||
right: 0;
|
|
||||||
background-color: #91CB74;
|
|
||||||
}
|
|
||||||
.container .shape.shape3 {
|
|
||||||
bottom: 0;
|
|
||||||
background-color: #FAC858;
|
|
||||||
}
|
|
||||||
.container .shape.shape4 {
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
background-color: #EE6666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading3 .shape1 {
|
|
||||||
-webkit-animation: animation3shape1 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation3shape1 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation3shape1 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(5px, 5px);
|
|
||||||
transform: translate(5px, 5px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation3shape1 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(5px, 5px);
|
|
||||||
transform: translate(5px, 5px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading3 .shape2 {
|
|
||||||
-webkit-animation: animation3shape2 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation3shape2 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation3shape2 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-5px, 5px);
|
|
||||||
transform: translate(-5px, 5px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation3shape2 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-5px, 5px);
|
|
||||||
transform: translate(-5px, 5px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading3 .shape3 {
|
|
||||||
-webkit-animation: animation3shape3 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation3shape3 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation3shape3 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(5px, -5px);
|
|
||||||
transform: translate(5px, -5px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation3shape3 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(5px, -5px);
|
|
||||||
transform: translate(5px, -5px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading3 .shape4 {
|
|
||||||
-webkit-animation: animation3shape4 0.5s ease 0s infinite alternate;
|
|
||||||
animation: animation3shape4 0.5s ease 0s infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation3shape4 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-5px, -5px);
|
|
||||||
transform: translate(-5px, -5px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation3shape4 {
|
|
||||||
from {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: translate(-5px, -5px);
|
|
||||||
transform: translate(-5px, -5px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,222 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="container loading5">
|
|
||||||
<view class="shape shape1"></view>
|
|
||||||
<view class="shape shape2"></view>
|
|
||||||
<view class="shape shape3"></view>
|
|
||||||
<view class="shape shape4"></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'loading5',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped="true">
|
|
||||||
.container {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container.loading5 .shape {
|
|
||||||
width: 15px;
|
|
||||||
height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container .shape {
|
|
||||||
position: absolute;
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
border-radius: 1px;
|
|
||||||
}
|
|
||||||
.container .shape.shape1 {
|
|
||||||
left: 0;
|
|
||||||
background-color: #1890FF;
|
|
||||||
}
|
|
||||||
.container .shape.shape2 {
|
|
||||||
right: 0;
|
|
||||||
background-color: #91CB74;
|
|
||||||
}
|
|
||||||
.container .shape.shape3 {
|
|
||||||
bottom: 0;
|
|
||||||
background-color: #FAC858;
|
|
||||||
}
|
|
||||||
.container .shape.shape4 {
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
background-color: #EE6666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading5 .shape1 {
|
|
||||||
animation: animation5shape1 2s ease 0s infinite reverse;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation5shape1 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(0, 15px);
|
|
||||||
transform: translate(0, 15px);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(15px, 15px);
|
|
||||||
transform: translate(15px, 15px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(15px, 0);
|
|
||||||
transform: translate(15px, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation5shape1 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(0, 15px);
|
|
||||||
transform: translate(0, 15px);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(15px, 15px);
|
|
||||||
transform: translate(15px, 15px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(15px, 0);
|
|
||||||
transform: translate(15px, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading5 .shape2 {
|
|
||||||
animation: animation5shape2 2s ease 0s infinite reverse;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation5shape2 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(-15px, 0);
|
|
||||||
transform: translate(-15px, 0);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(-15px, 15px);
|
|
||||||
transform: translate(-15px, 15px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(0, 15px);
|
|
||||||
transform: translate(0, 15px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation5shape2 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(-15px, 0);
|
|
||||||
transform: translate(-15px, 0);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(-15px, 15px);
|
|
||||||
transform: translate(-15px, 15px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(0, 15px);
|
|
||||||
transform: translate(0, 15px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading5 .shape3 {
|
|
||||||
animation: animation5shape3 2s ease 0s infinite reverse;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation5shape3 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(15px, 0);
|
|
||||||
transform: translate(15px, 0);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(15px, -15px);
|
|
||||||
transform: translate(15px, -15px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(0, -15px);
|
|
||||||
transform: translate(0, -15px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation5shape3 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(15px, 0);
|
|
||||||
transform: translate(15px, 0);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(15px, -15px);
|
|
||||||
transform: translate(15px, -15px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(0, -15px);
|
|
||||||
transform: translate(0, -15px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading5 .shape4 {
|
|
||||||
animation: animation5shape4 2s ease 0s infinite reverse;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation5shape4 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(0, -15px);
|
|
||||||
transform: translate(0, -15px);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(-15px, -15px);
|
|
||||||
transform: translate(-15px, -15px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(-15px, 0);
|
|
||||||
transform: translate(-15px, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation5shape4 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(0, -15px);
|
|
||||||
transform: translate(0, -15px);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(-15px, -15px);
|
|
||||||
transform: translate(-15px, -15px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(-15px, 0);
|
|
||||||
transform: translate(-15px, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
|
@ -1,229 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="container loading6">
|
|
||||||
<view class="shape shape1"></view>
|
|
||||||
<view class="shape shape2"></view>
|
|
||||||
<view class="shape shape3"></view>
|
|
||||||
<view class="shape shape4"></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'loading6',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped="true">
|
|
||||||
.container {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container.loading6 {
|
|
||||||
-webkit-animation: rotation 1s infinite;
|
|
||||||
animation: rotation 1s infinite;
|
|
||||||
}
|
|
||||||
.container.loading6 .shape {
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
.container .shape {
|
|
||||||
position: absolute;
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
border-radius: 1px;
|
|
||||||
}
|
|
||||||
.container .shape.shape1 {
|
|
||||||
left: 0;
|
|
||||||
background-color: #1890FF;
|
|
||||||
}
|
|
||||||
.container .shape.shape2 {
|
|
||||||
right: 0;
|
|
||||||
background-color: #91CB74;
|
|
||||||
}
|
|
||||||
.container .shape.shape3 {
|
|
||||||
bottom: 0;
|
|
||||||
background-color: #FAC858;
|
|
||||||
}
|
|
||||||
.container .shape.shape4 {
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
background-color: #EE6666;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.loading6 .shape1 {
|
|
||||||
-webkit-animation: animation6shape1 2s linear 0s infinite normal;
|
|
||||||
animation: animation6shape1 2s linear 0s infinite normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation6shape1 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(0, 18px);
|
|
||||||
transform: translate(0, 18px);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(18px, 18px);
|
|
||||||
transform: translate(18px, 18px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(18px, 0);
|
|
||||||
transform: translate(18px, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation6shape1 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(0, 18px);
|
|
||||||
transform: translate(0, 18px);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(18px, 18px);
|
|
||||||
transform: translate(18px, 18px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(18px, 0);
|
|
||||||
transform: translate(18px, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading6 .shape2 {
|
|
||||||
-webkit-animation: animation6shape2 2s linear 0s infinite normal;
|
|
||||||
animation: animation6shape2 2s linear 0s infinite normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation6shape2 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(-18px, 0);
|
|
||||||
transform: translate(-18px, 0);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(-18px, 18px);
|
|
||||||
transform: translate(-18px, 18px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(0, 18px);
|
|
||||||
transform: translate(0, 18px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation6shape2 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(-18px, 0);
|
|
||||||
transform: translate(-18px, 0);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(-18px, 18px);
|
|
||||||
transform: translate(-18px, 18px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(0, 18px);
|
|
||||||
transform: translate(0, 18px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading6 .shape3 {
|
|
||||||
-webkit-animation: animation6shape3 2s linear 0s infinite normal;
|
|
||||||
animation: animation6shape3 2s linear 0s infinite normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation6shape3 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(18px, 0);
|
|
||||||
transform: translate(18px, 0);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(18px, -18px);
|
|
||||||
transform: translate(18px, -18px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(0, -18px);
|
|
||||||
transform: translate(0, -18px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation6shape3 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(18px, 0);
|
|
||||||
transform: translate(18px, 0);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(18px, -18px);
|
|
||||||
transform: translate(18px, -18px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(0, -18px);
|
|
||||||
transform: translate(0, -18px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.loading6 .shape4 {
|
|
||||||
-webkit-animation: animation6shape4 2s linear 0s infinite normal;
|
|
||||||
animation: animation6shape4 2s linear 0s infinite normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes animation6shape4 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(0, -18px);
|
|
||||||
transform: translate(0, -18px);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(-18px, -18px);
|
|
||||||
transform: translate(-18px, -18px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(-18px, 0);
|
|
||||||
transform: translate(-18px, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes animation6shape4 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: translate(0, 0);
|
|
||||||
transform: translate(0, 0);
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
-webkit-transform: translate(0, -18px);
|
|
||||||
transform: translate(0, -18px);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: translate(-18px, -18px);
|
|
||||||
transform: translate(-18px, -18px);
|
|
||||||
}
|
|
||||||
75% {
|
|
||||||
-webkit-transform: translate(-18px, 0);
|
|
||||||
transform: translate(-18px, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,36 +0,0 @@
|
||||||
<template>
|
|
||||||
<view>
|
|
||||||
<Loading1 v-if="loadingType==1"/>
|
|
||||||
<Loading2 v-if="loadingType==2"/>
|
|
||||||
<Loading3 v-if="loadingType==3"/>
|
|
||||||
<Loading4 v-if="loadingType==4"/>
|
|
||||||
<Loading5 v-if="loadingType==5"/>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Loading1 from "./loading1.vue";
|
|
||||||
import Loading2 from "./loading2.vue";
|
|
||||||
import Loading3 from "./loading3.vue";
|
|
||||||
import Loading4 from "./loading4.vue";
|
|
||||||
import Loading5 from "./loading5.vue";
|
|
||||||
export default {
|
|
||||||
components:{Loading1,Loading2,Loading3,Loading4,Loading5},
|
|
||||||
name: 'qiun-loading',
|
|
||||||
props: {
|
|
||||||
loadingType: {
|
|
||||||
type: Number,
|
|
||||||
default: 2
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
};
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
|
@ -1,422 +0,0 @@
|
||||||
/*
|
|
||||||
* uCharts®
|
|
||||||
* 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
|
|
||||||
* Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
|
|
||||||
* Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
||||||
* 复制使用请保留本段注释,感谢支持开源!
|
|
||||||
*
|
|
||||||
* uCharts®官方网站
|
|
||||||
* https://www.uCharts.cn
|
|
||||||
*
|
|
||||||
* 开源地址:
|
|
||||||
* https://gitee.com/uCharts/uCharts
|
|
||||||
*
|
|
||||||
* uni-app插件市场地址:
|
|
||||||
* http://ext.dcloud.net.cn/plugin?id=271
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// 通用配置项
|
|
||||||
|
|
||||||
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
|
||||||
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
|
||||||
|
|
||||||
const cfe = {
|
|
||||||
//demotype为自定义图表类型
|
|
||||||
"type": ["pie", "ring", "rose", "funnel", "line", "column", "area", "radar", "gauge","candle","demotype"],
|
|
||||||
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型例如最后的"demotype"
|
|
||||||
"categories": ["line", "column", "area", "radar", "gauge", "candle","demotype"],
|
|
||||||
//instance为实例变量承载属性,option为eopts承载属性,不要删除
|
|
||||||
"instance": {},
|
|
||||||
"option": {},
|
|
||||||
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
|
|
||||||
"formatter":{
|
|
||||||
"tooltipDemo1":function(res){
|
|
||||||
let result = ''
|
|
||||||
for (let i in res) {
|
|
||||||
if (i == 0) {
|
|
||||||
result += res[i].axisValueLabel + '年销售额'
|
|
||||||
}
|
|
||||||
let value = '--'
|
|
||||||
if (res[i].data !== null) {
|
|
||||||
value = res[i].data
|
|
||||||
}
|
|
||||||
// #ifdef H5
|
|
||||||
result += '\n' + res[i].seriesName + ':' + value + ' 万元'
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
result += '<br/>' + res[i].marker + res[i].seriesName + ':' + value + ' 万元'
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
legendFormat:function(name){
|
|
||||||
return "自定义图例+"+name;
|
|
||||||
},
|
|
||||||
yAxisFormatDemo:function (value, index) {
|
|
||||||
return value + '元';
|
|
||||||
},
|
|
||||||
seriesFormatDemo:function(res){
|
|
||||||
return res.name + '年' + res.value + '元';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在eopts参数,会将demotype与eopts中option合并后渲染图表。
|
|
||||||
"demotype":{
|
|
||||||
"color": color,
|
|
||||||
//在这里填写echarts的option即可
|
|
||||||
|
|
||||||
},
|
|
||||||
//下面是自定义配置,请添加项目所需的通用配置
|
|
||||||
"column": {
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"text": ''
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"trigger": 'axis'
|
|
||||||
},
|
|
||||||
"grid": {
|
|
||||||
"top": 30,
|
|
||||||
"bottom": 50,
|
|
||||||
"right": 15,
|
|
||||||
"left": 40
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
"bottom": 'left',
|
|
||||||
},
|
|
||||||
"toolbox": {
|
|
||||||
"show": false,
|
|
||||||
},
|
|
||||||
"xAxis": {
|
|
||||||
"type": 'category',
|
|
||||||
"axisLabel": {
|
|
||||||
"color": '#666666'
|
|
||||||
},
|
|
||||||
"axisLine": {
|
|
||||||
"lineStyle": {
|
|
||||||
"color": '#CCCCCC'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"boundaryGap": true,
|
|
||||||
"data": []
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"type": 'value',
|
|
||||||
"axisTick": {
|
|
||||||
"show": false,
|
|
||||||
},
|
|
||||||
"axisLabel": {
|
|
||||||
"color": '#666666'
|
|
||||||
},
|
|
||||||
"axisLine": {
|
|
||||||
"lineStyle": {
|
|
||||||
"color": '#CCCCCC'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"seriesTemplate": {
|
|
||||||
"name": '',
|
|
||||||
"type": 'bar',
|
|
||||||
"data": [],
|
|
||||||
"barwidth": 20,
|
|
||||||
"label": {
|
|
||||||
"show": true,
|
|
||||||
"color": "#666666",
|
|
||||||
"position": 'top',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"line": {
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"text": ''
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"trigger": 'axis'
|
|
||||||
},
|
|
||||||
"grid": {
|
|
||||||
"top": 30,
|
|
||||||
"bottom": 50,
|
|
||||||
"right": 15,
|
|
||||||
"left": 40
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
"bottom": 'left',
|
|
||||||
},
|
|
||||||
"toolbox": {
|
|
||||||
"show": false,
|
|
||||||
},
|
|
||||||
"xAxis": {
|
|
||||||
"type": 'category',
|
|
||||||
"axisLabel": {
|
|
||||||
"color": '#666666'
|
|
||||||
},
|
|
||||||
"axisLine": {
|
|
||||||
"lineStyle": {
|
|
||||||
"color": '#CCCCCC'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"boundaryGap": true,
|
|
||||||
"data": []
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"type": 'value',
|
|
||||||
"axisTick": {
|
|
||||||
"show": false,
|
|
||||||
},
|
|
||||||
"axisLabel": {
|
|
||||||
"color": '#666666'
|
|
||||||
},
|
|
||||||
"axisLine": {
|
|
||||||
"lineStyle": {
|
|
||||||
"color": '#CCCCCC'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"seriesTemplate": {
|
|
||||||
"name": '',
|
|
||||||
"type": 'line',
|
|
||||||
"data": [],
|
|
||||||
"barwidth": 20,
|
|
||||||
"label": {
|
|
||||||
"show": true,
|
|
||||||
"color": "#666666",
|
|
||||||
"position": 'top',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"area": {
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"text": ''
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"trigger": 'axis'
|
|
||||||
},
|
|
||||||
"grid": {
|
|
||||||
"top": 30,
|
|
||||||
"bottom": 50,
|
|
||||||
"right": 15,
|
|
||||||
"left": 40
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
"bottom": 'left',
|
|
||||||
},
|
|
||||||
"toolbox": {
|
|
||||||
"show": false,
|
|
||||||
},
|
|
||||||
"xAxis": {
|
|
||||||
"type": 'category',
|
|
||||||
"axisLabel": {
|
|
||||||
"color": '#666666'
|
|
||||||
},
|
|
||||||
"axisLine": {
|
|
||||||
"lineStyle": {
|
|
||||||
"color": '#CCCCCC'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"boundaryGap": true,
|
|
||||||
"data": []
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"type": 'value',
|
|
||||||
"axisTick": {
|
|
||||||
"show": false,
|
|
||||||
},
|
|
||||||
"axisLabel": {
|
|
||||||
"color": '#666666'
|
|
||||||
},
|
|
||||||
"axisLine": {
|
|
||||||
"lineStyle": {
|
|
||||||
"color": '#CCCCCC'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"seriesTemplate": {
|
|
||||||
"name": '',
|
|
||||||
"type": 'line',
|
|
||||||
"data": [],
|
|
||||||
"areaStyle": {},
|
|
||||||
"label": {
|
|
||||||
"show": true,
|
|
||||||
"color": "#666666",
|
|
||||||
"position": 'top',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"pie": {
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"text": ''
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"trigger": 'item'
|
|
||||||
},
|
|
||||||
"grid": {
|
|
||||||
"top": 40,
|
|
||||||
"bottom": 30,
|
|
||||||
"right": 15,
|
|
||||||
"left": 15
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
"bottom": 'left',
|
|
||||||
},
|
|
||||||
"seriesTemplate": {
|
|
||||||
"name": '',
|
|
||||||
"type": 'pie',
|
|
||||||
"data": [],
|
|
||||||
"radius": '50%',
|
|
||||||
"label": {
|
|
||||||
"show": true,
|
|
||||||
"color": "#666666",
|
|
||||||
"position": 'top',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"ring": {
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"text": ''
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"trigger": 'item'
|
|
||||||
},
|
|
||||||
"grid": {
|
|
||||||
"top": 40,
|
|
||||||
"bottom": 30,
|
|
||||||
"right": 15,
|
|
||||||
"left": 15
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
"bottom": 'left',
|
|
||||||
},
|
|
||||||
"seriesTemplate": {
|
|
||||||
"name": '',
|
|
||||||
"type": 'pie',
|
|
||||||
"data": [],
|
|
||||||
"radius": ['40%', '70%'],
|
|
||||||
"avoidLabelOverlap": false,
|
|
||||||
"label": {
|
|
||||||
"show": true,
|
|
||||||
"color": "#666666",
|
|
||||||
"position": 'top',
|
|
||||||
},
|
|
||||||
"labelLine": {
|
|
||||||
"show": true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"rose": {
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"text": ''
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"trigger": 'item'
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
"top": 'bottom'
|
|
||||||
},
|
|
||||||
"seriesTemplate": {
|
|
||||||
"name": '',
|
|
||||||
"type": 'pie',
|
|
||||||
"data": [],
|
|
||||||
"radius": "55%",
|
|
||||||
"center": ['50%', '50%'],
|
|
||||||
"roseType": 'area',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"funnel": {
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"text": ''
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"trigger": 'item',
|
|
||||||
"formatter": "{b} : {c}%"
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
"top": 'bottom'
|
|
||||||
},
|
|
||||||
"seriesTemplate": {
|
|
||||||
"name": '',
|
|
||||||
"type": 'funnel',
|
|
||||||
"left": '10%',
|
|
||||||
"top": 60,
|
|
||||||
"bottom": 60,
|
|
||||||
"width": '80%',
|
|
||||||
"min": 0,
|
|
||||||
"max": 100,
|
|
||||||
"minSize": '0%',
|
|
||||||
"maxSize": '100%',
|
|
||||||
"sort": 'descending',
|
|
||||||
"gap": 2,
|
|
||||||
"label": {
|
|
||||||
"show": true,
|
|
||||||
"position": 'inside'
|
|
||||||
},
|
|
||||||
"labelLine": {
|
|
||||||
"length": 10,
|
|
||||||
"lineStyle": {
|
|
||||||
"width": 1,
|
|
||||||
"type": 'solid'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"itemStyle": {
|
|
||||||
"bordercolor": '#fff',
|
|
||||||
"borderwidth": 1
|
|
||||||
},
|
|
||||||
"emphasis": {
|
|
||||||
"label": {
|
|
||||||
"fontSize": 20
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"data": [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"gauge": {
|
|
||||||
"color": color,
|
|
||||||
"tooltip": {
|
|
||||||
"formatter": '{a} <br/>{b} : {c}%'
|
|
||||||
},
|
|
||||||
"seriesTemplate": {
|
|
||||||
"name": '业务指标',
|
|
||||||
"type": 'gauge',
|
|
||||||
"detail": {"formatter": '{value}%'},
|
|
||||||
"data": [{"value": 50, "name": '完成率'}]
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"candle": {
|
|
||||||
"xAxis": {
|
|
||||||
"data": []
|
|
||||||
},
|
|
||||||
"yAxis": {},
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"text": ''
|
|
||||||
},
|
|
||||||
"dataZoom": [{
|
|
||||||
"type": 'inside',
|
|
||||||
"xAxisIndex": [0, 1],
|
|
||||||
"start": 10,
|
|
||||||
"end": 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"show": true,
|
|
||||||
"xAxisIndex": [0, 1],
|
|
||||||
"type": 'slider',
|
|
||||||
"bottom": 10,
|
|
||||||
"start": 10,
|
|
||||||
"end": 100
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"seriesTemplate": {
|
|
||||||
"name": '',
|
|
||||||
"type": 'k',
|
|
||||||
"data": [],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default cfe;
|
|
|
@ -1,606 +0,0 @@
|
||||||
/*
|
|
||||||
* uCharts®
|
|
||||||
* 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
|
|
||||||
* Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
|
|
||||||
* Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
||||||
* 复制使用请保留本段注释,感谢支持开源!
|
|
||||||
*
|
|
||||||
* uCharts®官方网站
|
|
||||||
* https://www.uCharts.cn
|
|
||||||
*
|
|
||||||
* 开源地址:
|
|
||||||
* https://gitee.com/uCharts/uCharts
|
|
||||||
*
|
|
||||||
* uni-app插件市场地址:
|
|
||||||
* http://ext.dcloud.net.cn/plugin?id=271
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
|
||||||
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
|
||||||
|
|
||||||
//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
|
|
||||||
const formatDateTime = (timeStamp, returnType)=>{
|
|
||||||
var date = new Date();
|
|
||||||
date.setTime(timeStamp * 1000);
|
|
||||||
var y = date.getFullYear();
|
|
||||||
var m = date.getMonth() + 1;
|
|
||||||
m = m < 10 ? ('0' + m) : m;
|
|
||||||
var d = date.getDate();
|
|
||||||
d = d < 10 ? ('0' + d) : d;
|
|
||||||
var h = date.getHours();
|
|
||||||
h = h < 10 ? ('0' + h) : h;
|
|
||||||
var minute = date.getMinutes();
|
|
||||||
var second = date.getSeconds();
|
|
||||||
minute = minute < 10 ? ('0' + minute) : minute;
|
|
||||||
second = second < 10 ? ('0' + second) : second;
|
|
||||||
if(returnType == 'full'){return y + '-' + m + '-' + d + ' '+ h +':' + minute + ':' + second;}
|
|
||||||
if(returnType == 'y-m-d'){return y + '-' + m + '-' + d;}
|
|
||||||
if(returnType == 'h:m'){return h +':' + minute;}
|
|
||||||
if(returnType == 'h:m:s'){return h +':' + minute +':' + second;}
|
|
||||||
return [y, m, d, h, minute, second];
|
|
||||||
}
|
|
||||||
|
|
||||||
const cfu = {
|
|
||||||
//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
|
|
||||||
"type":["pie","ring","rose","word","funnel","map","arcbar","line","column","mount","bar","area","radar","gauge","candle","mix","tline","tarea","scatter","bubble","demotype"],
|
|
||||||
"range":["饼状图","圆环图","玫瑰图","词云图","漏斗图","地图","圆弧进度条","折线图","柱状图","山峰图","条状图","区域图","雷达图","仪表盘","K线图","混合图","时间轴折线","时间轴区域","散点图","气泡图","自定义类型"],
|
|
||||||
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
|
|
||||||
//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
|
|
||||||
"categories":["line","column","mount","bar","area","radar","gauge","candle","mix","demotype"],
|
|
||||||
//instance为实例变量承载属性,不要删除
|
|
||||||
"instance":{},
|
|
||||||
//option为opts及eopts承载属性,不要删除
|
|
||||||
"option":{},
|
|
||||||
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
|
|
||||||
"formatter":{
|
|
||||||
"yAxisDemo1":function(val, index, opts){return val+'元'},
|
|
||||||
"yAxisDemo2":function(val, index, opts){return val.toFixed(2)},
|
|
||||||
"xAxisDemo1":function(val, index, opts){return val+'年';},
|
|
||||||
"xAxisDemo2":function(val, index, opts){return formatDateTime(val,'h:m')},
|
|
||||||
"seriesDemo1":function(val, index, series, opts){return val+'元'},
|
|
||||||
"tooltipDemo1":function(item, category, index, opts){
|
|
||||||
if(index==0){
|
|
||||||
return '随便用'+item.data+'年'
|
|
||||||
}else{
|
|
||||||
return '其他我没改'+item.data+'天'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pieDemo":function(val, index, series, opts){
|
|
||||||
if(index !== undefined){
|
|
||||||
return series[index].name+':'+series[index].data+'元'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
|
|
||||||
"demotype":{
|
|
||||||
//我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
|
|
||||||
"type": "line",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,10,0,15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"line": {
|
|
||||||
"type": "curve",
|
|
||||||
"width": 2
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//下面是自定义配置,请添加项目所需的通用配置
|
|
||||||
"pie":{
|
|
||||||
"type": "pie",
|
|
||||||
"color": color,
|
|
||||||
"padding": [5,5,5,5],
|
|
||||||
"extra": {
|
|
||||||
"pie": {
|
|
||||||
"activeOpacity": 0.5,
|
|
||||||
"activeRadius": 10,
|
|
||||||
"offsetAngle": 0,
|
|
||||||
"labelWidth": 15,
|
|
||||||
"border": true,
|
|
||||||
"borderWidth": 3,
|
|
||||||
"borderColor": "#FFFFFF"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ring":{
|
|
||||||
"type": "ring",
|
|
||||||
"color": color,
|
|
||||||
"padding": [5,5,5,5],
|
|
||||||
"rotate": false,
|
|
||||||
"dataLabel": true,
|
|
||||||
"legend": {
|
|
||||||
"show": true,
|
|
||||||
"position": "right",
|
|
||||||
"lineHeight": 25,
|
|
||||||
},
|
|
||||||
"title": {
|
|
||||||
"name": "收益率",
|
|
||||||
"fontSize": 15,
|
|
||||||
"color": "#666666"
|
|
||||||
},
|
|
||||||
"subtitle": {
|
|
||||||
"name": "70%",
|
|
||||||
"fontSize": 25,
|
|
||||||
"color": "#7cb5ec"
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"ring": {
|
|
||||||
"ringWidth":30,
|
|
||||||
"activeOpacity": 0.5,
|
|
||||||
"activeRadius": 10,
|
|
||||||
"offsetAngle": 0,
|
|
||||||
"labelWidth": 15,
|
|
||||||
"border": true,
|
|
||||||
"borderWidth": 3,
|
|
||||||
"borderColor": "#FFFFFF"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"rose":{
|
|
||||||
"type": "rose",
|
|
||||||
"color": color,
|
|
||||||
"padding": [5,5,5,5],
|
|
||||||
"legend": {
|
|
||||||
"show": true,
|
|
||||||
"position": "left",
|
|
||||||
"lineHeight": 25,
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"rose": {
|
|
||||||
"type": "area",
|
|
||||||
"minRadius": 50,
|
|
||||||
"activeOpacity": 0.5,
|
|
||||||
"activeRadius": 10,
|
|
||||||
"offsetAngle": 0,
|
|
||||||
"labelWidth": 15,
|
|
||||||
"border": false,
|
|
||||||
"borderWidth": 2,
|
|
||||||
"borderColor": "#FFFFFF"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"word":{
|
|
||||||
"type": "word",
|
|
||||||
"color": color,
|
|
||||||
"extra": {
|
|
||||||
"word": {
|
|
||||||
"type": "normal",
|
|
||||||
"autoColors": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"funnel":{
|
|
||||||
"type": "funnel",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,15,0,15],
|
|
||||||
"extra": {
|
|
||||||
"funnel": {
|
|
||||||
"activeOpacity": 0.3,
|
|
||||||
"activeWidth": 10,
|
|
||||||
"border": true,
|
|
||||||
"borderWidth": 2,
|
|
||||||
"borderColor": "#FFFFFF",
|
|
||||||
"fillOpacity": 1,
|
|
||||||
"labelAlign": "right"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"map":{
|
|
||||||
"type": "map",
|
|
||||||
"color": color,
|
|
||||||
"padding": [0,0,0,0],
|
|
||||||
"dataLabel": true,
|
|
||||||
"extra": {
|
|
||||||
"map": {
|
|
||||||
"border": true,
|
|
||||||
"borderWidth": 1,
|
|
||||||
"borderColor": "#666666",
|
|
||||||
"fillOpacity": 0.6,
|
|
||||||
"activeBorderColor": "#F04864",
|
|
||||||
"activeFillColor": "#FACC14",
|
|
||||||
"activeFillOpacity": 1
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"arcbar":{
|
|
||||||
"type": "arcbar",
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"name": "百分比",
|
|
||||||
"fontSize": 25,
|
|
||||||
"color": "#00FF00"
|
|
||||||
},
|
|
||||||
"subtitle": {
|
|
||||||
"name": "默认标题",
|
|
||||||
"fontSize": 15,
|
|
||||||
"color": "#666666"
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"arcbar": {
|
|
||||||
"type": "default",
|
|
||||||
"width": 12,
|
|
||||||
"backgroundColor": "#E9E9E9",
|
|
||||||
"startAngle": 0.75,
|
|
||||||
"endAngle": 0.25,
|
|
||||||
"gap": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"line":{
|
|
||||||
"type": "line",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,10,0,15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"line": {
|
|
||||||
"type": "straight",
|
|
||||||
"width": 2,
|
|
||||||
"activeType": "hollow"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tline":{
|
|
||||||
"type": "line",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,10,0,15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"boundaryGap":"justify",
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
"data":[
|
|
||||||
{
|
|
||||||
"min":0,
|
|
||||||
"max":80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"line": {
|
|
||||||
"type": "curve",
|
|
||||||
"width": 2,
|
|
||||||
"activeType": "hollow"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tarea":{
|
|
||||||
"type": "area",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,10,0,15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
"boundaryGap":"justify",
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
"data":[
|
|
||||||
{
|
|
||||||
"min":0,
|
|
||||||
"max":80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"area": {
|
|
||||||
"type": "curve",
|
|
||||||
"opacity": 0.2,
|
|
||||||
"addLine": true,
|
|
||||||
"width": 2,
|
|
||||||
"gradient": true,
|
|
||||||
"activeType": "hollow"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"column":{
|
|
||||||
"type": "column",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,15,0,5],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"data":[{"min":0}]
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"column": {
|
|
||||||
"type": "group",
|
|
||||||
"width": 30,
|
|
||||||
"activeBgColor": "#000000",
|
|
||||||
"activeBgOpacity": 0.08
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mount":{
|
|
||||||
"type": "mount",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,15,0,5],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"data":[{"min":0}]
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"mount": {
|
|
||||||
"type": "mount",
|
|
||||||
"widthRatio": 1.5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bar":{
|
|
||||||
"type": "bar",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,30,0,5],
|
|
||||||
"xAxis": {
|
|
||||||
"boundaryGap":"justify",
|
|
||||||
"disableGrid":false,
|
|
||||||
"min":0,
|
|
||||||
"axisLine":false
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"bar": {
|
|
||||||
"type": "group",
|
|
||||||
"width": 30,
|
|
||||||
"meterBorde": 1,
|
|
||||||
"meterFillColor": "#FFFFFF",
|
|
||||||
"activeBgColor": "#000000",
|
|
||||||
"activeBgOpacity": 0.08
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"area":{
|
|
||||||
"type": "area",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,15,0,15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"area": {
|
|
||||||
"type": "straight",
|
|
||||||
"opacity": 0.2,
|
|
||||||
"addLine": true,
|
|
||||||
"width": 2,
|
|
||||||
"gradient": false,
|
|
||||||
"activeType": "hollow"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"radar":{
|
|
||||||
"type": "radar",
|
|
||||||
"color": color,
|
|
||||||
"padding": [5,5,5,5],
|
|
||||||
"dataLabel": false,
|
|
||||||
"legend": {
|
|
||||||
"show": true,
|
|
||||||
"position": "right",
|
|
||||||
"lineHeight": 25,
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"radar": {
|
|
||||||
"gridType": "radar",
|
|
||||||
"gridColor": "#CCCCCC",
|
|
||||||
"gridCount": 3,
|
|
||||||
"opacity": 0.2,
|
|
||||||
"max": 200,
|
|
||||||
"labelShow": true
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gauge":{
|
|
||||||
"type": "gauge",
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"name": "66Km/H",
|
|
||||||
"fontSize": 25,
|
|
||||||
"color": "#2fc25b",
|
|
||||||
"offsetY": 50
|
|
||||||
},
|
|
||||||
"subtitle": {
|
|
||||||
"name": "实时速度",
|
|
||||||
"fontSize": 15,
|
|
||||||
"color": "#1890ff",
|
|
||||||
"offsetY": -50
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"gauge": {
|
|
||||||
"type": "default",
|
|
||||||
"width": 30,
|
|
||||||
"labelColor": "#666666",
|
|
||||||
"startAngle": 0.75,
|
|
||||||
"endAngle": 0.25,
|
|
||||||
"startNumber": 0,
|
|
||||||
"endNumber": 100,
|
|
||||||
"labelFormat": "",
|
|
||||||
"splitLine": {
|
|
||||||
"fixRadius": 0,
|
|
||||||
"splitNumber": 10,
|
|
||||||
"width": 30,
|
|
||||||
"color": "#FFFFFF",
|
|
||||||
"childNumber": 5,
|
|
||||||
"childWidth": 12
|
|
||||||
},
|
|
||||||
"pointer": {
|
|
||||||
"width": 24,
|
|
||||||
"color": "auto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"candle":{
|
|
||||||
"type": "candle",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,15,0,15],
|
|
||||||
"enableScroll": true,
|
|
||||||
"enableMarkLine": true,
|
|
||||||
"dataLabel": false,
|
|
||||||
"xAxis": {
|
|
||||||
"labelCount": 4,
|
|
||||||
"itemCount": 40,
|
|
||||||
"disableGrid": true,
|
|
||||||
"gridColor": "#CCCCCC",
|
|
||||||
"gridType": "solid",
|
|
||||||
"dashLength": 4,
|
|
||||||
"scrollShow": true,
|
|
||||||
"scrollAlign": "left",
|
|
||||||
"scrollColor": "#A6A6A6",
|
|
||||||
"scrollBackgroundColor": "#EFEBEF"
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"candle": {
|
|
||||||
"color": {
|
|
||||||
"upLine": "#f04864",
|
|
||||||
"upFill": "#f04864",
|
|
||||||
"downLine": "#2fc25b",
|
|
||||||
"downFill": "#2fc25b"
|
|
||||||
},
|
|
||||||
"average": {
|
|
||||||
"show": true,
|
|
||||||
"name": ["MA5","MA10","MA30"],
|
|
||||||
"day": [5,10,20],
|
|
||||||
"color": ["#1890ff","#2fc25b","#facc14"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"markLine": {
|
|
||||||
"type": "dash",
|
|
||||||
"dashLength": 5,
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"value": 2150,
|
|
||||||
"lineColor": "#f04864",
|
|
||||||
"showLabel": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": 2350,
|
|
||||||
"lineColor": "#f04864",
|
|
||||||
"showLabel": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mix":{
|
|
||||||
"type": "mix",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15,15,0,15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"disabled": false,
|
|
||||||
"disableGrid": false,
|
|
||||||
"splitNumber": 5,
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 4,
|
|
||||||
"gridColor": "#CCCCCC",
|
|
||||||
"padding": 10,
|
|
||||||
"showTitle": true,
|
|
||||||
"data": []
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"mix": {
|
|
||||||
"column": {
|
|
||||||
"width": 20
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"scatter":{
|
|
||||||
"type": "scatter",
|
|
||||||
"color":color,
|
|
||||||
"padding":[15,15,0,15],
|
|
||||||
"dataLabel":false,
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"gridType":"dash",
|
|
||||||
"splitNumber":5,
|
|
||||||
"boundaryGap":"justify",
|
|
||||||
"min":0
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"gridType":"dash",
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"scatter": {
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bubble":{
|
|
||||||
"type": "bubble",
|
|
||||||
"color":color,
|
|
||||||
"padding":[15,15,0,15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"gridType":"dash",
|
|
||||||
"splitNumber":5,
|
|
||||||
"boundaryGap":"justify",
|
|
||||||
"min":0,
|
|
||||||
"max":250
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"gridType":"dash",
|
|
||||||
"data":[{
|
|
||||||
"min":0,
|
|
||||||
"max":150
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"bubble": {
|
|
||||||
"border":2,
|
|
||||||
"opacity": 0.5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default cfu;
|
|
|
@ -1,5 +0,0 @@
|
||||||
# uCharts JSSDK说明
|
|
||||||
1、如不使用uCharts组件,可直接引用u-charts.js,打包编译后会`自动压缩`,压缩后体积约为`120kb`。
|
|
||||||
2、如果120kb的体积仍需压缩,请手到uCharts官网通过在线定制选择您需要的图表。
|
|
||||||
3、config-ucharts.js为uCharts组件的用户配置文件,升级前请`自行备份config-ucharts.js`文件,以免被强制覆盖。
|
|
||||||
4、config-echarts.js为ECharts组件的用户配置文件,升级前请`自行备份config-echarts.js`文件,以免被强制覆盖。
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,201 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
|
@ -1,80 +0,0 @@
|
||||||
{
|
|
||||||
"id": "qiun-data-charts",
|
|
||||||
"displayName": "秋云 ucharts echarts 高性能跨全端图表组件",
|
|
||||||
"version": "2.5.0-20230101",
|
|
||||||
"description": "uCharts 新增正负柱状图!支持H5及APP用 ucharts echarts 渲染图表,uniapp可视化首选组件",
|
|
||||||
"keywords": [
|
|
||||||
"ucharts",
|
|
||||||
"echarts",
|
|
||||||
"f2",
|
|
||||||
"图表",
|
|
||||||
"可视化"
|
|
||||||
],
|
|
||||||
"repository": "https://gitee.com/uCharts/uCharts",
|
|
||||||
"engines": {
|
|
||||||
},
|
|
||||||
"dcloudext": {
|
|
||||||
"sale": {
|
|
||||||
"regular": {
|
|
||||||
"price": "0.00"
|
|
||||||
},
|
|
||||||
"sourcecode": {
|
|
||||||
"price": "0.00"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"contact": {
|
|
||||||
"qq": "474119"
|
|
||||||
},
|
|
||||||
"declaration": {
|
|
||||||
"ads": "无",
|
|
||||||
"data": "插件不采集任何数据",
|
|
||||||
"permissions": "无"
|
|
||||||
},
|
|
||||||
"npmurl": "https://www.npmjs.com/~qiun",
|
|
||||||
"type": "component-vue"
|
|
||||||
},
|
|
||||||
"uni_modules": {
|
|
||||||
"dependencies": [],
|
|
||||||
"encrypt": [],
|
|
||||||
"platforms": {
|
|
||||||
"cloud": {
|
|
||||||
"tcb": "y",
|
|
||||||
"aliyun": "y"
|
|
||||||
},
|
|
||||||
"client": {
|
|
||||||
"App": {
|
|
||||||
"app-vue": "y",
|
|
||||||
"app-nvue": "y"
|
|
||||||
},
|
|
||||||
"H5-mobile": {
|
|
||||||
"Safari": "y",
|
|
||||||
"Android Browser": "y",
|
|
||||||
"微信浏览器(Android)": "y",
|
|
||||||
"QQ浏览器(Android)": "y"
|
|
||||||
},
|
|
||||||
"H5-pc": {
|
|
||||||
"Chrome": "y",
|
|
||||||
"IE": "y",
|
|
||||||
"Edge": "y",
|
|
||||||
"Firefox": "y",
|
|
||||||
"Safari": "y"
|
|
||||||
},
|
|
||||||
"小程序": {
|
|
||||||
"微信": "y",
|
|
||||||
"阿里": "y",
|
|
||||||
"百度": "y",
|
|
||||||
"字节跳动": "y",
|
|
||||||
"QQ": "y"
|
|
||||||
},
|
|
||||||
"快应用": {
|
|
||||||
"华为": "y",
|
|
||||||
"联盟": "y"
|
|
||||||
},
|
|
||||||
"Vue": {
|
|
||||||
"vue2": "y",
|
|
||||||
"vue3": "y"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,84 +0,0 @@
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
[](https://gitee.com/uCharts/uCharts/stargazers)
|
|
||||||
[](https://gitee.com/uCharts/uCharts/members)
|
|
||||||
[](https://www.apache.org/licenses/LICENSE-2.0.html)
|
|
||||||
[](https://www.npmjs.com/~qiun)
|
|
||||||
|
|
||||||
|
|
||||||
## uCharts简介
|
|
||||||
|
|
||||||
`uCharts`是一款基于`canvas API`开发的适用于所有前端应用的图表库,开发者编写一套代码,可运行到 Web、iOS、Android(基于 uni-app / taro )、以及各种小程序(微信/支付宝/百度/头条/飞书/QQ/快手/钉钉/淘宝)、快应用等更多支持 canvas API 的平台。
|
|
||||||
|
|
||||||
## 官方网站
|
|
||||||
|
|
||||||
## [https://www.ucharts.cn](https://www.ucharts.cn)
|
|
||||||
|
|
||||||
## 快速体验
|
|
||||||
|
|
||||||
一套代码编到多个平台,依次扫描二维码,亲自体验uCharts图表跨平台效果!其他平台请自行编译。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 致开发者
|
|
||||||
|
|
||||||
感谢各位开发者`五年`来对秋云及uCharts的支持,uCharts的进步离不开各位开发者的鼓励与贡献。为更好的帮助各位开发者使用图表工具,我们推出了新版官网,增加了在线定制、问答社区、在线配置等一些增值服务,为确保您能更好的应用图表组件,建议您先`仔细阅读官网指南`以及`常见问题`,而不是下载下来`直接使用`。如仍然不能解决,请到`官网社区`或开通会员后加入`专属VIP会员群`提问将会很快得到回答。
|
|
||||||
|
|
||||||
## 视频教程
|
|
||||||
|
|
||||||
## [uCharts新手入门教程](https://www.bilibili.com/video/BV1qA411Q7se/?share_source=copy_web&vd_source=42a1242f9aaade6427736af69eb2e1d9)
|
|
||||||
|
|
||||||
|
|
||||||
## 社群支持
|
|
||||||
|
|
||||||
uCharts官方拥有5个2000人的QQ群及专属VIP会员群支持,庞大的用户量证明我们一直在努力,请各位放心使用!uCharts的开源图表组件的开发,团队付出了大量的时间与精力,经过四来的考验,不会有比较明显的bug,请各位放心使用。如果您有更好的想法,可以在`码云提交Pull Requests`以帮助更多开发者完成需求,再次感谢各位对uCharts的鼓励与支持!
|
|
||||||
|
|
||||||
#### 官方交流群
|
|
||||||
- 交流群1:371774600(已满)
|
|
||||||
- 交流群2:619841586(已满)
|
|
||||||
- 交流群3:955340127(已满)
|
|
||||||
- 交流群4:641669795(已满)
|
|
||||||
- 交流群5:236294809(只能扫码加入)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- 口令`uniapp`
|
|
||||||
|
|
||||||
#### 专属VIP会员群
|
|
||||||
- 开通会员后详见【账号详情】页面中顶部的滚动通知
|
|
||||||
- 口令`您的用户ID`
|
|
||||||
|
|
||||||
## 版权信息
|
|
||||||
|
|
||||||
uCharts始终坚持开源,遵循 [Apache Licence 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) 开源协议,意味着您无需支付任何费用,即可将uCharts应用到您的产品中。
|
|
||||||
|
|
||||||
注意:这并不意味着您可以将uCharts应用到非法的领域,比如涉及赌博,暴力等方面。如因此产生纠纷或法律问题,uCharts相关方及秋云科技不承担任何责任。
|
|
||||||
|
|
||||||
## 合作伙伴
|
|
||||||
|
|
||||||
[](https://www.diygw.com/)
|
|
||||||
[](https://gitee.com/howcode/has-chat)
|
|
||||||
[](https://www.uviewui.com/)
|
|
||||||
[](https://ext.dcloud.net.cn/plugin?id=7088)
|
|
||||||
[](https://ext.dcloud.net.cn/publisher?id=202)
|
|
||||||
[](https://www.firstui.cn/)
|
|
||||||
[](https://ext.dcloud.net.cn/plugin?id=5169)
|
|
||||||
[](https://www.graceui.com/)
|
|
||||||
|
|
||||||
|
|
||||||
## 更新记录
|
|
||||||
|
|
||||||
详见官网指南中说明,[点击此处查看](https://www.ucharts.cn/v2/#/guide/index?id=100)
|
|
||||||
|
|
||||||
|
|
||||||
## 相关链接
|
|
||||||
- [uCharts官网](https://www.ucharts.cn)
|
|
||||||
- [DCloud插件市场地址](https://ext.dcloud.net.cn/plugin?id=271)
|
|
||||||
- [uCharts码云开源托管地址](https://gitee.com/uCharts/uCharts) [](https://gitee.com/uCharts/uCharts/stargazers)
|
|
||||||
- [uCharts npm开源地址](https://www.ucharts.cn)
|
|
||||||
- [ECharts官网](https://echarts.apache.org/zh/index.html)
|
|
||||||
- [ECharts配置手册](https://echarts.apache.org/zh/option.html)
|
|
||||||
- [图表组件在项目中的应用 ReportPlus数据报表](https://www.ucharts.cn/v2/#/layout/info?id=1)
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,3 @@
|
||||||
## 2.2.35(2024-09-21)
|
|
||||||
- 修复 没有选中日期时点击确定直接报错的Bug [详情](https://ask.dcloud.net.cn/question/198168)
|
|
||||||
## 2.2.34(2024-04-24)
|
## 2.2.34(2024-04-24)
|
||||||
- 新增 日期点击事件,在点击日期时会触发该事件。
|
- 新增 日期点击事件,在点击日期时会触发该事件。
|
||||||
## 2.2.33(2024-04-15)
|
## 2.2.33(2024-04-15)
|
||||||
|
|
|
@ -698,11 +698,11 @@
|
||||||
startString = getDateTime(this.start, this.hideSecond)
|
startString = getDateTime(this.start, this.hideSecond)
|
||||||
}
|
}
|
||||||
[startDate, startTime] = startString.split(' ')
|
[startDate, startTime] = startString.split(' ')
|
||||||
if (this.start && !dateCompare(this.start, `${this.tempRange.startDate} ${this.tempRange.startTime}`)) {
|
if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
|
||||||
startDateLaterRangeStartDate = true
|
startDateLaterRangeStartDate = true
|
||||||
this.tempRange.startDate = startDate
|
this.tempRange.startDate = startDate
|
||||||
}
|
}
|
||||||
if (this.start && !dateCompare(this.start, `${this.tempRange.endDate} ${this.tempRange.endTime}`)) {
|
if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
|
||||||
startDateLaterRangeEndDate = true
|
startDateLaterRangeEndDate = true
|
||||||
this.tempRange.endDate = startDate
|
this.tempRange.endDate = startDate
|
||||||
}
|
}
|
||||||
|
@ -717,11 +717,11 @@
|
||||||
}
|
}
|
||||||
[endDate, endTime] = endString.split(' ')
|
[endDate, endTime] = endString.split(' ')
|
||||||
|
|
||||||
if (this.end && !dateCompare(`${this.tempRange.startDate} ${this.tempRange.startTime}`, this.end)) {
|
if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
|
||||||
endDateEarlierRangeStartDate = true
|
endDateEarlierRangeStartDate = true
|
||||||
this.tempRange.startDate = endDate
|
this.tempRange.startDate = endDate
|
||||||
}
|
}
|
||||||
if (this.end && !dateCompare(`${this.tempRange.endDate} ${this.tempRange.endTime}`, this.end)) {
|
if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
|
||||||
endDateEarlierRangeEndDate = true
|
endDateEarlierRangeEndDate = true
|
||||||
this.tempRange.endDate = endDate
|
this.tempRange.endDate = endDate
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,8 +182,8 @@ class Calendar {
|
||||||
if (!date) {
|
if (!date) {
|
||||||
date = new Date()
|
date = new Date()
|
||||||
}
|
}
|
||||||
const res = this.calendar.find(item => item.fullDate === this.getDateObj(date).fullDate)
|
|
||||||
return res ? res : this.getDateObj(date)
|
return this.calendar.find(item => item.fullDate === this.getDateObj(date).fullDate)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "uni-datetime-picker",
|
"id": "uni-datetime-picker",
|
||||||
"displayName": "uni-datetime-picker 日期选择器",
|
"displayName": "uni-datetime-picker 日期选择器",
|
||||||
"version": "2.2.35",
|
"version": "2.2.34",
|
||||||
"description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
|
"description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"uni-datetime-picker",
|
"uni-datetime-picker",
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
{
|
|
||||||
"name": "uview-plus",
|
|
||||||
"version": "3.2.14",
|
|
||||||
"lockfileVersion": 3,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"": {
|
|
||||||
"name": "uview-plus",
|
|
||||||
"version": "3.2.14",
|
|
||||||
"dependencies": {
|
|
||||||
"clipboard": "^2.0.11",
|
|
||||||
"dayjs": "^1.11.3",
|
|
||||||
"uview-plus": "file:"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"HBuilderX": "^3.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/clipboard": {
|
|
||||||
"version": "2.0.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz",
|
|
||||||
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
|
|
||||||
"dependencies": {
|
|
||||||
"good-listener": "^1.2.2",
|
|
||||||
"select": "^1.1.2",
|
|
||||||
"tiny-emitter": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/dayjs": {
|
|
||||||
"version": "1.11.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
|
|
||||||
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
|
|
||||||
},
|
|
||||||
"node_modules/delegate": {
|
|
||||||
"version": "3.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
|
|
||||||
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
|
|
||||||
},
|
|
||||||
"node_modules/good-listener": {
|
|
||||||
"version": "1.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
|
|
||||||
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
|
|
||||||
"dependencies": {
|
|
||||||
"delegate": "^3.1.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/select": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
|
|
||||||
},
|
|
||||||
"node_modules/tiny-emitter": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
|
|
||||||
},
|
|
||||||
"node_modules/uview-plus": {
|
|
||||||
"resolved": "",
|
|
||||||
"link": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,21 +5,21 @@
|
||||||
"version": "3.2.14",
|
"version": "3.2.14",
|
||||||
"description": "uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
|
"description": "uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"uview",
|
"uview",
|
||||||
"uview-plus",
|
"uview-plus",
|
||||||
"ui",
|
"ui",
|
||||||
"ui",
|
"ui",
|
||||||
"uni-app",
|
"uni-app",
|
||||||
"uni-app",
|
"uni-app",
|
||||||
"ui"
|
"ui"
|
||||||
],
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "https://github.com/ijry/uview-plus",
|
"repository": "https://github.com/ijry/uview-plus",
|
||||||
"engines": {
|
"engines": {
|
||||||
"HBuilderX": "^3.1.0"
|
"HBuilderX": "^3.1.0"
|
||||||
},
|
},
|
||||||
"dcloudext": {
|
"dcloudext": {
|
||||||
"sale": {
|
"sale": {
|
||||||
"regular": {
|
"regular": {
|
||||||
"price": "0.00"
|
"price": "0.00"
|
||||||
},
|
},
|
||||||
|
@ -35,8 +35,8 @@
|
||||||
"data": "无",
|
"data": "无",
|
||||||
"permissions": "无"
|
"permissions": "无"
|
||||||
},
|
},
|
||||||
"npmurl": "https://www.npmjs.com/package/uview-plus",
|
"npmurl": "https://www.npmjs.com/package/uview-plus",
|
||||||
"type": "component-vue"
|
"type": "component-vue"
|
||||||
},
|
},
|
||||||
"uni_modules": {
|
"uni_modules": {
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
|
@ -44,8 +44,8 @@
|
||||||
"platforms": {
|
"platforms": {
|
||||||
"cloud": {
|
"cloud": {
|
||||||
"tcb": "y",
|
"tcb": "y",
|
||||||
"aliyun": "y",
|
"aliyun": "y",
|
||||||
"alipay": "n"
|
"alipay": "n"
|
||||||
},
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"Vue": {
|
"Vue": {
|
||||||
|
@ -85,10 +85,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
"dayjs": "^1.11.3",
|
"dayjs": "^1.11.3"
|
||||||
"uview-plus": "file:"
|
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://registry.npmjs.org/"
|
"registry": "https://registry.npmjs.org/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@uview-plus/types",
|
|
||||||
"version": "3.2.5",
|
|
||||||
"lockfileVersion": 3,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"": {
|
|
||||||
"name": "@uview-plus/types",
|
|
||||||
"version": "3.2.5",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@uview-plus/types": "file:"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@uview-plus/types": {
|
|
||||||
"resolved": "",
|
|
||||||
"link": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -22,8 +22,5 @@
|
||||||
"homepage": "https://github.com/ijry/uview-plus#readme",
|
"homepage": "https://github.com/ijry/uview-plus#readme",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://registry.npmjs.org/"
|
"registry": "https://registry.npmjs.org/"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@uview-plus/types": "file:"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@ function baseRequest(url, method, data, {
|
||||||
url: Url + '/api' + url,
|
url: Url + '/api' + url,
|
||||||
method: method || 'GET',
|
method: method || 'GET',
|
||||||
header: {
|
header: {
|
||||||
accept:'json',
|
|
||||||
...header
|
...header
|
||||||
},
|
},
|
||||||
data: method != 'GET' ? data || {} : {},
|
data: method != 'GET' ? data || {} : {},
|
||||||
|
|
Loading…
Reference in New Issue