pull/4/head
张宇 2 years ago
parent 7eff39995c
commit d0b02cb3f0

@ -8,6 +8,7 @@ export default {
url: "/shop/shopGoods/goodsList",
method: "POST",
data,
type: "mall",
});
},
@ -16,6 +17,7 @@ export default {
url: "/shop/shopGoods/goodsEditAttribute",
method: "POST",
data,
type: "mall",
});
},
@ -25,6 +27,15 @@ export default {
url: "/shop/shopClassify/list",
method: "POST",
data,
type: "mall",
});
},
Slist(data) {
return request({
url: "/admin/classify/list",
method: "POST",
data,
type: "mall",
});
},
@ -33,6 +44,7 @@ export default {
url: "/shop/shopClassify/createItem",
method: "POST",
data,
type: "mall",
});
},
@ -43,6 +55,7 @@ export default {
url: "/shop/freightRules/list",
method: "POST",
data,
type: "mall",
});
},
@ -51,6 +64,7 @@ export default {
url: "/shop/shopGoods/goodsItem",
method: "POST",
data,
type: "mall",
});
},
@ -59,6 +73,7 @@ export default {
url: "/shop/shopGoods/goodsEdit",
method: "POST",
data,
type: "mall",
});
},

@ -9,6 +9,7 @@ export default {
url: "/shop/dataCount/oneLine",
method: "POST",
data,
type: "mall",
});
},
orderProfit(data) {
@ -16,6 +17,7 @@ export default {
url: "/shop/dataCount/orderProfit",
method: "POST",
data,
type: "mall",
});
},
orderGood(data) {
@ -23,24 +25,27 @@ export default {
url: "/shop/dataCount/orderGood",
method: "POST",
data,
type: "mall",
});
},
},
getStoreSetting(data) {
getShopSetting(data) {
return request({
url: "/shop/store/getStoreSetting",
url: "/shop/shop/item",
method: "POST",
data,
type: "mall",
})
},
setStoreSetting(data) {
return request({
url: "/shop/store/setStoreSetting",
url: "/shop/shop/edit",
method: "POST",
data,
type: "mall",
})
}

@ -8,6 +8,7 @@ export default {
url: "/shop/order/orderList",
method: "POST",
data,
type: "mall",
});
},
@ -16,6 +17,7 @@ export default {
url: "/shop/order/orderSend",
method: "POST",
data,
type: "mall",
});
},
@ -24,6 +26,7 @@ export default {
url: "/admin/order/GetExpressList",
method: "POST",
data,
type: "mall",
});
},
@ -32,6 +35,7 @@ export default {
url: "/shop/order/printOrder",
method: "POST",
data,
type: "mall",
});
},
@ -40,6 +44,7 @@ export default {
url: "/shop/order/updateNotes",
method: "POST",
data,
type: "mall",
});
},
@ -49,6 +54,7 @@ export default {
url: "/shop/shop/checkLog",
method: "POST",
data,
type: "mall",
});
},
@ -57,6 +63,7 @@ export default {
url: "/shop/order/confirmCancel",
method: "POST",
data,
type: "mall",
});
},
@ -66,6 +73,7 @@ export default {
url: "/shop/after_sale/index",
method: "POST",
data,
type: "mall",
});
},
@ -75,6 +83,7 @@ export default {
url: "/shop/after_sale/update",
method: "POST",
data,
type: "mall",
});
},
@ -83,6 +92,7 @@ export default {
url: "/shop/after_sale/show",
method: "POST",
data,
type: "mall",
});
},
@ -91,6 +101,7 @@ export default {
url: "/client/common/express",
method: "POST",
data,
type: "mall",
});
},
enums(data) {
@ -98,9 +109,28 @@ export default {
url: "/client/after_sale/enums",
method: "POST",
data,
type: "mall",
});
},
},
OrderInpersonPayment: {
orderList(data) {
return request({
url: "/shop/OrderInpersonPayment/orderList",
method: "POST",
data,
});
},
GetQrItem(data) {
return request({
url: "/shop/OrderInpersonPayment/GetQrItem",
method: "POST",
data,
});
},
}
};

@ -0,0 +1,70 @@
import {
request
} from "@/utils/request";
export default {
orderList(data) {
return request({
url: "/shop/orderPickUp/orderList",
method: "POST",
data,
type: "mall",
});
},
orderSend(data) {
return request({
url: "/shop/orderPickUp/orderSend",
method: "POST",
data,
type: "mall",
});
},
GetExpressList(data) {
return request({
url: "/admin/orderPickUp/GetExpressList",
method: "POST",
data,
type: "mall",
});
},
printOrder(data) {
return request({
url: "/shop/orderPickUp/printOrder",
method: "POST",
data,
type: "mall",
});
},
updateNotes(data) {
return request({
url: "/shop/orderPickUp/updateNotes",
method: "POST",
data,
type: "mall",
});
},
// 核销记录
checkLog(data) {
return request({
url: "/shop/shop/checkLog",
method: "POST",
data,
type: "mall",
});
},
confirmCancel(data) {
return request({
url: "/shop/orderPickUp/confirmCancel",
method: "POST",
data,
type: "mall",
});
},
};

@ -9,6 +9,7 @@ export default {
url: "/shop/shop/List",
method: "POST",
data,
type: "mall",
})
},
@ -17,6 +18,7 @@ export default {
url: "/shop/shop/edit",
method: "POST",
data,
type: "mall",
})
},
@ -25,6 +27,7 @@ export default {
url: "/shop/shop/editStatus",
method: "POST",
data,
type: "mall",
})
},
@ -33,6 +36,7 @@ export default {
url: "/shop/shop/synchronousGoods",
method: "POST",
data,
type: "mall",
})
},

@ -9,6 +9,7 @@ export default {
url: "/shop/user/userList",
method: "GET",
data,
type: "mall",
})
},
@ -17,6 +18,7 @@ export default {
url: "/shop/user/userItem",
method: "GET",
data,
type: "mall",
})
},
@ -26,6 +28,7 @@ export default {
url: "/shop/user/getLog",
method: "GET",
data,
type: "mall",
})
},
@ -34,6 +37,7 @@ export default {
url: "/shop/user/changeInformation",
method: "GET",
data,
type: "mall",
})
},
@ -42,6 +46,7 @@ export default {
url: "/shop/user/UpdateLevel",
method: "GET",
data,
type: "mall",
})
},

@ -9,6 +9,7 @@ export default {
url: "/shop/UserMembers/LevelShow",
method: "GET",
data,
type: "mall",
})
},
@ -17,6 +18,7 @@ export default {
url: "/shop/UserMembers/LevelSave",
method: "GET",
data,
type: "mall",
})
},
@ -25,6 +27,7 @@ export default {
url: "/shop/UserMembers/SetList",
method: "GET",
data,
type: "mall",
})
},
@ -33,6 +36,7 @@ export default {
url: "/shop/UserMembers/SetSave",
method: "GET",
data,
type: "mall",
})
},
@ -41,6 +45,7 @@ export default {
url: "/shop/UserMembers/DiscountList",
method: "GET",
data,
type: "mall",
})
},
@ -49,6 +54,7 @@ export default {
url: "/shop/UserMembers/CreateDiscount",
method: "POST",
data,
type: "mall",
})
},

@ -28,5 +28,13 @@ export default {
},
loginShop(data) {
return request({
url: "/admin/system/loginShop",
method: "GET",
data,
})
},
};

@ -1,10 +1,12 @@
<template>
<view class="myTabbar">
<wd-tabbar custom-class="mb-3" fixed safeAreaInsetBottom placeholder v-model="tab" shape="round">
<wd-tabbar-item @click="utils.toUrl('/store/index/index')" name="home" title="首页" icon="home"></wd-tabbar-item>
<wd-tabbar-item @click="utils.toUrl('/mall/index/index')" name="home" title="首页" icon="home"></wd-tabbar-item>
<wd-tabbar-item v-if="is_store" @click="utils.toUrl('/store/index/index')" name="商城" title="返回商城"
icon="rollback"></wd-tabbar-item>
<!-- <wd-tabbar-item name="cart" title="分类" icon="cart"></wd-tabbar-item> -->
<wd-tabbar-item name="user" @click="utils.toUrl('/store/user/list')" title="用户管理" icon="user"></wd-tabbar-item>
<wd-tabbar-item @click="utils.toUrl('/store/shop/list')" name="shop" title="门店管理" icon="detection"></wd-tabbar-item>
<!-- <wd-tabbar-item name="user" @click="utils.toUrl('/store/user/list')" title="用户管理" icon="user"></wd-tabbar-item> -->
<!-- <wd-tabbar-item @click="utils.toUrl('/store/shop/list')" name="shop" title="门店管理" icon="detection"></wd-tabbar-item> -->
<!-- <wd-tabbar-item name="user" title="我的" icon="user"></wd-tabbar-item> -->
</wd-tabbar>
</view>
@ -20,6 +22,8 @@ const props = defineProps({
}
})
const is_store = uni.getStorageSync("store_info");
const tab = props.tab
</script>

@ -36,6 +36,26 @@
<view class="h-2 bg-gray-100"></view>
<view class="p-3 rounded mb-2">
<div class="name mb-2 text-xs">商城分类</div>
<view class="bg-white px-3 py-1 rounded">
<wd-checkbox-group v-model="model.classify_list">
<view class="flex overflow-auto flex-wrap">
<div class="grid grid-cols-3">
<wd-checkbox style="width: 100%;" shape="button" v-for="cat of classifySList"
:modelValue="JSON.stringify(cat.parentIds)">
{{ cat.name }}
</wd-checkbox>
</div>
</view>
</wd-checkbox-group>
</view>
</view>
<view class="h-2 bg-gray-100"></view>
<view class=" p-3 rounded mb-2">
<div class="name mb-2 text-xs">商品分类</div>
<view class="bg-white px-3 py-1 rounded">
@ -200,6 +220,7 @@ const beforeRemove = ({ file, resolve, index }) => {
/** @type {Ref<Model>} */
const model = ref({
classify_list: [], //
shop_classify_list: [], //
name: "", //
keywords: "", //
@ -276,6 +297,9 @@ onLoad(async (e) => {
model.value.freight_id = 99999999;
}
model.value.shop_classify_list = model.value.shop_classify_list?.map(item => JSON.stringify(item));
model.value.classify_list = model.value.classify_list?.map(item => JSON.stringify(item));
model.value.classify_list = model.value.classify_list || []
if (res.data.use_sku == 0) {
skuDefault.value = res.data.goods_sku;
@ -371,8 +395,9 @@ const saveGoods = async () => {
}));
const shop_classify_list = model.value.shop_classify_list.map(item => JSON.parse(item));
const classify_list = model.value.classify_list.map(item => JSON.parse(item));
const res = await goods.goodsEdit({ ...model.value, pic_list, freight_id, shop_classify_list });
const res = await goods.goodsEdit({ ...model.value, pic_list, freight_id, shop_classify_list, classify_list });
if (res.code == 0) {
uni.showToast({
@ -424,6 +449,46 @@ const getClassify = () => {
getClassify();
/** @type {Ref<Array<Object>>} */
const classifySList = ref([]);
/**
* 获取商品分类
* @returns {void}
*/
const getSClassify = () => {
/**
* 递归展平商品分类
* @param {Array<GoodsItem>} categories - 商品分类数组
* @param {Array<number>} [parentIds=[]] - 父级分类ID数组
* @returns {Array<Object>} - 展平后的商品分类数组
*/
function flattenCategories(categories, parentIds = []) {
let flatCategories = [];
for (const category of categories) {
const categoryWithParents = {
...category,
parentIds: [...parentIds, category.id],
};
flatCategories.push(categoryWithParents);
if (category.children && category.children.length > 0) {
flatCategories = flatCategories.concat(flattenCategories(category.children, [...parentIds, category.id]));
}
}
return flatCategories;
}
goods.classify.Slist().then(res => {
classifySList.value = flattenCategories(res.data);
});
};
getSClassify();
</script>
<style lang="scss"></style>

@ -3,7 +3,7 @@
<kevyloading v-if="loading" type="bsm-loader" color="#618af8" transparent></kevyloading>
<view class="w-full">
<wd-navbar fixed safeAreaInsetTop :leftText="user_info?.info?.name || '商城首页'">
<wd-navbar fixed safeAreaInsetTop :leftText="mall_info?.info?.name + ' [ 门店 ]' || '门店首页'">
<template #right>
<wd-icon @click="utils.toUrl('/mall/setup/index')" name="setting" size="22px"></wd-icon>
</template>
@ -49,6 +49,31 @@
</view>
</view>
<view @click="utils.toUrl('/mall/pickUp/index')" class="text-white rounded-3xl p-4 pb-0 shadow-lg overflow-hidden"
style="background-image: linear-gradient(to top, #7ea0ff 0%, #a9bdf5 100%);">
<view class="font-bold">自提订单</view>
<view class="h-0.5 w-5 mt-0.5 bg-white"></view>
<view class="flex justify-end">
<div class="rotate-[-28deg] translate-y-3 translate-x-5">
<wd-icon name="gift opacity-80" class="opacity-80" size="42px"></wd-icon>
</div>
</view>
</view>
<view @click="utils.toUrl('/mall/inpersonPay/index')"
class="text-white rounded-3xl p-4 pb-0 shadow-lg overflow-hidden"
style="background-image: linear-gradient(to top, #7ea0ff 0%, #a9bdf5 100%);">
<view class="font-bold">当面付订单</view>
<view class="h-0.5 w-5 mt-0.5 bg-white"></view>
<view class="flex justify-end">
<div class="rotate-[-28deg] translate-y-3 translate-x-5">
<wd-icon name="gift opacity-80" class="opacity-80" size="42px"></wd-icon>
</div>
</view>
</view>
<!-- <view @click="utils.toUrl('/mall/check/list')" class="text-white rounded-3xl p-4 pb-0 shadow-lg overflow-hidden"
style="background-image: linear-gradient(to top, #7ea0ff 0%, #a9bdf5 100%);">
<view class="font-bold">核销记录</view>
@ -76,8 +101,6 @@
</view>
</view> -->
</view>
<view style="transition: 1s;" class="w-full h-full bg-white pt-4 rounded-tr-3xl rounded-tl-3xl shadow-lg oh">
@ -112,14 +135,6 @@
<text>{{ orderProfit.series[0].data[index] }}</text>
</div>
<div @click="utils.toUrl('/mall/afterSale/index')"
class="item rounded-1xl bg-slate-50 p-2 flex justify-between" style="font-size: 24rpx;">
售后订单
<text></text>
</div>
</div>
<bar :barData="orderProfit"></bar>
@ -176,7 +191,7 @@ const loading = ref(false);
/**
* 从本地存储中获取用户信息
*/
const user_info = uni.getStorageSync("user_info");
const mall_info = uni.getStorageSync("mall_info");
/**
* @type {Ref<Object>}

@ -0,0 +1,289 @@
<template>
<view class="content">
<view class=" bg-white sticky top-0 z-50">
<div class="flex items-center">
<view class="flex-1">
<wd-search @search="search" @clear="search({ value: '' })" v-model="params.keywords" hide-cancel>
<template #prefix>
<wd-popover v-model="popover" mode="menu" :content="menu" @menuclick="changeSearchType">
<view class="search-type">
<text>{{ searchType }}</text>
<wd-icon custom-class="icon-arrow" name="fill-arrow-down"></wd-icon>
</view>
</wd-popover>
</template>
</wd-search>
</view>
<div v-if="getQrItem.img_url" class="mr-2">
<wd-button @click="showImg = true" size="small">付款码</wd-button>
</div>
</div>
<wd-tabs @change="(e) => {
params.status = (e.index == 3 ? 5 : e.index);
search({ value: params.keywords })
}" v-model="params.status">
<wd-tab v-for="item in status" :key="item" :title="`${item.content}`"></wd-tab>
</wd-tabs>
</view>
<view class="goodsBox p-2">
<yList ref="yListRef" :apiObj="order.OrderInpersonPayment.orderList"
:params="{ ...params, status: params.status - 1 }">
<template #default="{ list }">
<view>
<view v-for="item of list" class="goods">
<wd-card type="rectangle">
<template #title>
<view class="title">
<view>
<span class="mr-2">用户{{ item?.user?.nickname }}</span>
</view>
<view @click="utils.copy(item.order_no, '已复制单号')" class="title-tip">
<span style="font-size: 24rpx;margin-left: 8px;">单号{{ item.order_no }}</span>
</view>
</view>
</template>
<view class="bg-gray-50 p-2 mb-2 flex justify-between" style="font-size: 22rpx;">
<view>原价<text class="text-red-600"> {{ item.total_price || 0 }}</text></view>
<view>支付金额<text class="text-red-600"> {{ item.pay_price || 0 }}</text></view>
<view>
支付方式
<text class="text-black">
{{ [
"", "支付宝", "微信", "余额", "货到付款", "先就餐后支付"
][item.pay_type] }}
</text>
</view>
</view>
<template #footer>
<!-- <view class="bg-gray-50 p-2 mb-2.5 flex justify-between" style="font-size: 22rpx;">
<view>
售后状态:
</view>
</view> -->
<view class="flex justify-between items-center">
<!-- <view class="font-bold">实付: {{ item.pay_price }} </view> -->
<view>
支付状态<wd-button :round="false" size="small"
:type="['warning', 'success', 'warning', 'success', 'info'][item.status]">
<div>{{ ["未支付", "已支付", "已取消"][item.status] || "已取消" }}</div>
</wd-button>
</view>
<view class="flex-1 flex justify-end">
<!-- <view v-if="item.apply_cancel === 1" class="mr-2">
<wd-button type="error" @click="orderApproval(item)" size="small">退款</wd-button>
</view>
<view class="mr-2">
<wd-button @click="printing(item)" size="small">小票打印</wd-button>
</view>
<view class="mr-2">
<wd-button @click="orderNotes(item)" size="small">备注</wd-button>
</view>
<view v-if="item.status == 1" class="">
<wd-button @click="shipments(item)" size="small">发货</wd-button>
</view> -->
</view>
</view>
</template>
</wd-card>
</view>
</view>
</template>
</yList>
</view>
<wd-toast />
<wd-curtain v-if="getQrItem.img_url" :value="showImg" :src="getQrItem.img_url" :to="'/store/inpersonPay/index'"
@close="showImg = false" close-position="top" width="280"></wd-curtain>
</view>
</template>
<script setup>
import utils from '@/utils/utils.js';
import order from '@/api/mall/order.js';
import yList from "/components/yList/index.vue";
import { useMessage } from '@/uni_modules/wot-design-uni';
import { useToast } from '@/uni_modules/wot-design-uni';
import { ref } from 'vue';
const message = useMessage('wd-message-box-slot');
const message1 = useMessage();
const toast = useToast();
const showImg = ref(false)
let afterType = 1
/**
* 处理订单备注操作
* @param {Object} row - 行数据
*/
const orderNotes = (row, text) => {
message1
.prompt({
title: text,
inputValue: row.refund_amount
})
.then((resp) => {
order.after_sale.update({
id: row.id,
status: 5,
refund_amount: resp.value,
refund_type: afterType,
shop_description: 1,
}).then(res => {
if (res.code == 0) {
toast.success('操作成功');
row.status = 5;
} else {
toast.error('操作失败');
}
});
})
.catch((error) => {
console.log(error);
});
};
const classify_id = ref(0);
const params = ref({
keywords: "",
status: "",
type: 'order_no'
});
const yListRef = ref(null);
const search = ({ value }) => {
yListRef.value.upData({
keywords: value,
classify_id: classify_id.value,
status: params.value.status - 1
});
};
const searchType = ref('订单编号');
const popover = ref(false);
const status = ref([
{ content: '全部' },
{ content: '未支付' },
{ content: '已支付' },
{ content: '已取消' },
]);
const menu = ref([
{ content: '订单编号' },
{ content: '商品名称' },
{ content: '手机号' },
{ content: '会员昵称' },
{ content: '收货人' },
]);
/**
* 切换搜索类型
* @param {Object} item - 切换的项
*/
function changeSearchType({ item, index }) {
searchType.value = item.content;
if (item.content == '订单编号') {
params.value.type = "order_no";
}
if (item.content == '商品名称') {
params.value.type = "goods_name";
}
if (item.content == '手机号') {
params.value.type = "receiver_phone";
}
if (item.content == '会员昵称') {
params.value.type = "nickname";
}
if (item.content == '收货人') {
params.value.type = "receiver_name";
}
}
const getQrItem = ref({});
/**
* 获取物流公司列表
*/
const getGetQrItem = () => {
order.OrderInpersonPayment.GetQrItem().then(res => {
getQrItem.value = res.data
});
};
//
getGetQrItem();
</script>
<style lang="scss" scoped>
.search-type {
position: relative;
height: 30px;
line-height: 30px;
padding: 0 8px 0 10px;
font-size: 22rpx;
color: rgba(0, 0, 0, .45);
}
.search-type::after {
position: absolute;
content: '';
width: 1px;
right: 0;
top: 5px;
bottom: 5px;
background: rgba(0, 0, 0, 0.25);
}
.search-type {
:deep(.icon-arrow) {
display: inline-block;
font-size: 20px;
vertical-align: middle;
}
}
.goodsBox {
.content,
.title {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.content {
justify-content: flex-start;
}
.title {
justify-content: space-between;
}
.title-tip {
color: rgba(0, 0, 0, 0.25);
font-size: 12px;
}
}
</style>

@ -82,7 +82,7 @@
</view>
</template>
<view v-for="subItem of item.details" style="height: 60px;" class="content mb-4">
<view v-for="subItem of item.details" class="content mb-4">
<image :src="subItem.goods_pic" width="40" height="40" alt="joy"
style="border-radius: 4px; margin-right: 12px;width: 60px;height: 60px;min-width: 60px;" />
<view>

@ -0,0 +1,511 @@
<template>
<view class="content">
<wd-message-box></wd-message-box>
<wd-message-box selector="wd-message-box-slot" use-slot>
<view>
<wd-form :model="shipmentsModel">
<wd-cell-group border>
<view class="mb-4">
<wd-radio-group v-model="shipmentsModel.send_type" shape="button" @change="change">
<!-- <wd-radio :value="1">快递发货</wd-radio> -->
<wd-radio :value="2">无需物流</wd-radio>
</wd-radio-group>
</view>
<view class="mb-4 overflow-hidden bg-white border-gray-100 border-solid border-[8px] p-3 rounded"
v-if="shipmentsModel.send_type == 1">
<view class="mb-2">
<wd-radio-group shape="button" v-model="shipmentsModel.delivery_company">
<view class="flex overflow-auto">
<wd-radio v-for="item of expressList" :value="item.value">{{ item.label }}</wd-radio>
</view>
</wd-radio-group>
</view>
<wd-input label-width="100px" clearable v-model="shipmentsModel.delivery_no" placeholder="快递单号">
</wd-input>
</view>
</wd-cell-group>
</wd-form>
</view>
</wd-message-box>
<view class=" bg-white sticky top-0 z-50">
<div class="flex items-center">
<view class="flex-1">
<wd-search @search="search" @clear="search({ value: '' })" v-model="params.keywords" hide-cancel>
<template #prefix>
<wd-popover v-model="popover" mode="menu" :content="menu" @menuclick="changeSearchType">
<view class="search-type">
<text>{{ searchType }}</text>
<wd-icon custom-class="icon-arrow" name="fill-arrow-down"></wd-icon>
</view>
</wd-popover>
</template>
</wd-search>
</view>
<!-- <div class="mr-2">
<wd-button @click="utils.toUrl('/store/afterSale/index')" size="small">售后订单</wd-button>
</div> -->
</div>
<wd-tabs @change="(e) => {
params.status = e.index;
search({ value: params.keywords })
}" v-model="params.status">
<wd-tab v-for="item in status" :key="item" :title="`${item.content}`"></wd-tab>
</wd-tabs>
</view>
<view class="goodsBox p-2">
<yList ref="yListRef" :apiObj="order.orderList" :params="{ ...params, status: params.status - 1 }">
<template #default="{ list }">
<view>
<view v-for="item of list" class="goods">
<wd-card type="rectangle">
<template #title>
<view class="title">
<view>
<span class="mr-2" v-if="item.shop">{{ item.shop.name }}</span>
<span class="mr-2" v-else></span>
<span class="font-bold">({{ status[item.status + 1].content }})</span>
</view>
<view @click="utils.copy(item.order_no, '已复制单号')" class="title-tip">
<span style="font-size: 24rpx;margin-left: 8px;">单号{{ item.order_no }}</span>
</view>
</view>
</template>
<view v-for="subItem of item.details" class="content mb-4">
<image :src="subItem.goods_pic" width="40" height="40" alt="joy"
style="border-radius: 4px; margin-right: 12px;width: 60px;height: 60px;min-width: 60px;" />
<view>
<view class="line2" style="color: rgba(0,0,0,0.85); font-size: 16px;">{{ subItem.goods_name }}</view>
<!-- <view class="font-bold" style="color: rgb(255, 0, 0); font-size: 16px;">{{ subItem.price }}
</view> -->
<view class="font-bold" style="font-size: 22rpx;">小计: {{ subItem.price }} <text
style="color: rgb(255, 0, 0); font-size: 24rpx;">({{
subItem.num }}) </text></view>
<div class="goods_sky" style="font-size: 22rpx;">
<span v-for="(sku, _index) of subItem.goods_sku_json" :key="_index">
{{ sku.group_name }}{{ sku.name }}</span>
</div>
</view>
</view>
<view class="bg-gray-50 p-2">
<view class="text-[12px]" v-if="item.user">
<view class="mb-1">
下单用户{{ item.user.nickname }}
<text class="font-bold">
( 会员ID{{ item.user.id }} )
</text>
<view class="bg-gray-100 my-2 p-2 relative">
<view>收货人{{ item.receiver_name }} &nbsp; 电话{{ item.receiver_phone }}</view>
<view v-if="item.delivery_address">{{ item.delivery_address }} {{
item.delivery_address_detail }}</view>
<view
@click="utils.copy(`收货人:${item.receiver_name} 电话:${item.receiver_phone} 收货地址:${item.delivery_address}`, '已复制快递信息')"
class="absolute right-2 top-2">
<wd-icon name="file-copy" size="14px"></wd-icon>
</view>
</view>
</view>
<view class="flex items-center" v-if='[0, 1, 2][item.delivery_type]'>配送方式:
<wd-tag class="ml-2" :type="['', 'success', 'primary'][item.delivery_type]">
{{ ["", "快递配送", "到店自提"][item.delivery_type] }}
</wd-tag>
<view class="ml-2" v-if="item.delivery_type == 1">
<wd-tag type="warning">
运费: {{ item.delivery_money }}
</wd-tag>
</view>
</view>
</view>
</view>
<template #footer>
<view class="bg-gray-50 p-2 flex justify-between" style="font-size: 22rpx;">
<view>应付: {{ (Number(item.total_price) + Number(item.delivery_money)).toFixed(2) }} </view>
<view>余额支付: {{ item.pay_balance }} </view>
<view v-if="((Number(item.total_price) + Number(item.delivery_money)) -
item.pay_price) > 0">优惠: {{ ((Number(item.total_price) + Number(item.delivery_money)) -
item.pay_price).toFixed(2) }} </view>
</view>
<view class="h-2 opacity-0 text-white">占位</view>
<view class="flex justify-between items-center">
<view class="font-bold">实付: {{ item.pay_price }} </view>
<view class="flex-1 flex justify-end">
<view v-if="item.apply_cancel === 1" class="mr-2">
<wd-button type="error" @click="orderApproval(item)" size="small">退款</wd-button>
</view>
<!-- <view class="mr-2">
<wd-button @click="printing(item)" size="small">小票打印</wd-button>
</view> -->
<view class="mr-2">
<wd-button @click="orderNotes(item)" size="small">备注</wd-button>
</view>
<view v-if="item.status == 1" class="">
<wd-button @click="shipments(item)" size="small">发货</wd-button>
</view>
</view>
</view>
</template>
</wd-card>
</view>
</view>
</template>
</yList>
</view>
<wd-toast />
</view>
</template>
<script setup>
import utils from '@/utils/utils.js';
import order from '@/api/mall/orderPickUp.js';
import yList from "/components/yList/index.vue";
import { useMessage } from '@/uni_modules/wot-design-uni';
import { useToast } from '@/uni_modules/wot-design-uni';
import { ref, nextTick } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
const message = useMessage('wd-message-box-slot');
const message1 = useMessage();
const toast = useToast();
const classify_id = ref(0);
const params = ref({
keywords: "",
status: 0,
type: 'order_no'
});
const yListRef = ref(null);
const search = ({ value }) => {
yListRef.value.upData({
keywords: value,
classify_id: classify_id.value,
status: params.value.status - 1
});
};
onLoad(({ s } = {}) => {
if (s) {
params.value.status = Number(s)
}
})
const searchType = ref('订单编号');
const popover = ref(false);
const status = ref([
{ content: '全部' },
{ content: '未付款' },
{ content: '待发货' },
{ content: '已发货' },
{ content: '已完成' },
{ content: '已取消' },
{ content: '待处理' },
{ content: '回收站' }
]);
const menu = ref([
{ content: '订单编号' },
{ content: '商品名称' },
{ content: '手机号' },
{ content: '会员昵称' },
{ content: '收货人' },
]);
/**
* 切换搜索类型
* @param {Object} item - 切换的项
*/
function changeSearchType({ item, index }) {
searchType.value = item.content;
if (item.content == '订单编号') {
params.value.type = "order_no";
}
if (item.content == '商品名称') {
params.value.type = "goods_name";
}
if (item.content == '手机号') {
params.value.type = "receiver_phone";
}
if (item.content == '会员昵称') {
params.value.type = "nickname";
}
if (item.content == '收货人') {
params.value.type = "receiver_name";
}
}
/**
* 更改状态
* @param {Object} row - 行数据
*/
const changeS = (row) => {
//
// goods.goodsEditAttribute({
// id: item.id,
// value: [1, 0][item.status],
// type: "status"
// }).then(res => {
// if (res.code == 0) {
// toast.success('')
// item.status = [1, 0][item.status]
// } else {
// showNotify({ type: 'error', message: '' })
// }
// })
};
const expressList = ref([]);
// /**
// *
// */
// const getExpressList = () => {
// order.GetExpressList().then(res => {
// expressList.value = Object.entries(res.data).reduce((express, item) => {
// express.push({ label: item[1], value: item[0] });
// return express;
// }, []);
// });
// };
// //
// getExpressList();
const shipmentsModel = ref({
send_type: 2,
delivery_company: ""
});
/**
* 处理发货操作
* @param {Object} row - 行数据
*/
const shipments = (row) => {
message
.confirm({
title: '订单发货',
})
.then((resp) => {
if (shipmentsModel.value.send_type == 2) {
order.orderSend({
id: row.id,
send_type: "2"
});
row.status = 2;
toast.success('操作成功');
setTimeout(() => {
shipmentsModel.value = {
send_type: 2,
delivery_company: ""
};
}, 300);
}
if (shipmentsModel.value.send_type == 1) {
if (shipmentsModel.value.delivery_company && shipmentsModel.value.delivery_no) {
order.orderSend({
id: row.id,
send_type: "1",
delivery_company: shipmentsModel.value.delivery_company,
delivery_no: shipmentsModel.value.delivery_no,
});
row.status = 2;
row.success('操作成功');
setTimeout(() => {
shipmentsModel.value = {
send_type: 2,
delivery_company: ""
};
}, 300);
} else {
toast.error('发货失败,请完善选择填写');
shipments(row);
}
}
})
.catch((error) => {
console.log(error);
setTimeout(() => {
shipmentsModel.value = {
send_type: 2,
delivery_company: ""
};
}, 300);
});
};
/**
* 处理打印小票操作
* @param {Object} row - 行数据
*/
const printing = (row) => {
message1
.confirm({
title: '打印小票',
})
.then((resp) => {
order.printOrder({
id: row.id,
send_type: "2"
}).then(res => {
if (res.code == 0) {
toast.success('调用成功');
} else {
toast.error('调用失败');
}
});
})
.catch((error) => {
console.log(error);
});
};
/**
* 处理订单备注操作
* @param {Object} row - 行数据
*/
const orderNotes = (row) => {
message1
.prompt({
title: '订单备注',
})
.then((resp) => {
order.updateNotes({
id: row.id,
notes: resp.value
}).then(res => {
if (res.code == 0) {
toast.success('操作成功');
} else {
toast.error('操作失败');
}
});
})
.catch((error) => {
console.log(error);
});
};
/**
* 处理退款审批操作
* @param {Object} row - 行数据
*/
const orderApproval = (row) => {
message1
.confirm({
title: '退款审批',
confirmButtonText: "同意",
cancelButtonText: "拒绝",
})
.then((resp) => {
order.confirmCancel({
id: row.id,
apply_cancel_notes: "同意",
handle_status: 1
}).then(res => {
if (res.code == 0) {
toast.success('操作成功');
row.apply_cancel = 0;
} else {
toast.error('操作失败');
}
});
})
.catch((error) => {
if (error.action == 'cancel') {
order.confirmCancel({
id: row.id,
apply_cancel_notes: "拒绝",
handle_status: 0
}).then(res => {
if (res.code == 0) {
toast.success('操作成功');
row.apply_cancel = 0;
} else {
toast.error('操作失败');
}
});
}
});
};
</script>
<style lang="scss" scoped>
.search-type {
position: relative;
height: 30px;
line-height: 30px;
padding: 0 8px 0 16px;
font-size: 24rpx;
color: rgba(0, 0, 0, .45);
}
.search-type::after {
position: absolute;
content: '';
width: 1px;
right: 0;
top: 5px;
bottom: 5px;
background: rgba(0, 0, 0, 0.25);
}
.search-type {
:deep(.icon-arrow) {
display: inline-block;
font-size: 20px;
vertical-align: middle;
}
}
.goodsBox {
.content,
.title {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.content {
justify-content: flex-start;
}
.title {
justify-content: space-between;
}
.title-tip {
color: rgba(0, 0, 0, 0.25);
font-size: 12px;
}
}
</style>

@ -0,0 +1,229 @@
<template>
<view>
<kevyloading v-if="loading" type="bsm-loader" color="#618af8" transparent></kevyloading>
<wd-form ref="form" :model="shopData" :rules="formRules">
<!-- 基础信息 -->
<wd-cell-group title="基础信息" border>
<wd-input label="商城名称" label-width="100px" v-model="shopData.name" />
<!-- 商城LOGO -->
<wd-cell-group class="flex py-2 w-full" title="商城LOGO">
<view class="ml-3">
<yUpload v-model="shopData.logo_url" :size="1"></yUpload>
</view>
</wd-cell-group>
<!-- 门头照图片 -->
<wd-cell-group class="flex py-2 w-full" title="门头照图片">
<view class="ml-3">
<yUpload v-model="shopData.shop_url" :size="1"></yUpload>
</view>
</wd-cell-group>
<!-- <wd-input label="联系人" label-width="100px" v-model="shopData.contact" /> -->
<wd-input label="联系方式" label-width="100px" v-model="shopData.mobile" />
<!-- 其他基础信息字段可以根据需要添加 -->
</wd-cell-group>
<!-- 地址信息 -->
<wd-cell-group class="flex py-2 w-full" title="所在地区">
<view class="ml-3">
<!-- 省市区选择器 -->
<uni-data-picker placeholder="请选择省市区" popup-title="" :localdata="addrList" :map="{
text: 'name',
value: 'id',
}" v-model="shopData.district" @change="select">
</uni-data-picker>
</view>
</wd-cell-group>
<wd-input label="详细地址" label-width="100px" v-model="shopData.detail" use-suffix-slot>
</wd-input>
<!-- 其他信息 -->
<wd-cell-group title="其他信息" border>
<!-- 云喇叭通知表单项 -->
<wd-form-item label="云喇叭通知:" prop="zhangyou_device_name">
<wd-input v-model="shopData.zhangyou_device_name" placeholder="请输入设备编号" clearable />
<div style="color: #666;font-size: 12px;">
掌优4G云喇叭编号
</div>
</wd-form-item>
<wd-form-item label="抖音门店ID" prop="zhangyou_device_name">
<wd-input v-model="shopData.douyin_shop_id" placeholder="请输入抖音门店ID" clearable />
</wd-form-item>
<wd-form-item label="支付宝门店ID" prop="zhangyou_device_name">
<wd-input v-model="shopData.ali_shop_id" placeholder="请输入支付宝门店ID" clearable />
</wd-form-item>
</wd-cell-group>
<view class="p-3 bg-white rounded mb-2">
<div class="name mb-2 text-xs">非营业时间下单</div>
<view class="bg-white px-3 py-2 rounded flex items-center">
<wd-switch v-model="shopData.is_opening" :active-value="1" :inactive-value="0" />
</view>
</view>
<view class="p-3 bg-white rounded mb-2">
<div class="name mb-2 text-xs">状态</div>
<view class="bg-white px-3 py-2 rounded flex items-center">
<wd-switch v-model="shopData.status" :active-value="1" :inactive-value="0" />
</view>
</view>
<!-- 提交按钮 -->
<view class="mt-2 px-12 py-3 bg-slate-50">
<wd-button type="primary" size="large" @click="handleSubmit" block>
保存
</wd-button>
</view>
</wd-form>
</view>
</template>
<script>
import { ref } from 'vue';
import yUpload from "@/components/yUpload/index.vue";
import uniDataPicker from "@/components/uni-data-picker/components/uni-data-picker/uni-data-picker.vue";
import system from '@/api/modules/system.js';
import index from '@/api/mall/index.js';
import kevyloading from "@/components/kevy-loading/kevy-loading";
import utils from '@/utils/utils.js'
import shop from '@/api/store/shop.js';
/**
* 从本地存储中获取用户信息
*/
const user_info = uni.getStorageSync("user_info");
export default {
components: {
yUpload, uniDataPicker, kevyloading
},
data() {
return {
utils,
user_info,
//
shopData: {
name: '',
logo_url: '',
mobile: '',
district: null,
latlngCurrent: '',
pay_time: '',
confirm_time: '',
sale_time: '',
pay_type: [],
delivery_type: [],
after_sale_name: '',
after_sale_phone: '',
after_sale_address: '',
ali_express_app_code: '',
zhangyou_device_name: '',
},
shippingOptions: [
{ label: "邮寄", value: 1 },
{ label: "自提", value: 2 },
],
//
formRules: {
name: [{ required: true, message: "请输入门店名称", trigger: "blur" }],
//
},
//
addrList: [
//
],
loading: false
};
},
onLoad(e) {
this.getDistrict();
this.getShopSetting();
},
methods: {
/**
* 获取省市区数据
*/
async getDistrict() {
const res = await system.getDistrict();
this.addrList = res.data;
},
/**
* 获取门店设置
*/
async getShopSetting() {
this.loading = true;
const res = await index.getShopSetting();
if (res.data.id) {
this.shopData = res.data;
}
this.loading = false;
},
/**
* 处理省市区选择变化
* @param {Object} value - 选择的值
*/
areaChange(value) {
//
},
/**
* 处理省市区选择
* @param {Object} detail - 选择器详细信息
*/
select({ detail }) {
if (detail.value.length) {
const [province_id, city_id, district_id] = detail.value.map(
(el) => el.value
);
this.shopData.province_id = province_id;
this.shopData.city_id = city_id;
this.shopData.district_id = district_id;
this.shopData.district = [province_id, city_id, district_id];
}
},
/**
* 处理表单提交
*/
async handleSubmit() {
//
const res = await shop.edit({
...this.shopData
});
if (res.code == 0) {
setTimeout(() => {
uni.showToast({
title: '保存成功!',
icon: 'success'
});
}, 100);
uni.navigateBack()
}
},
},
};
</script>
<style>
/* 在这里添加样式,根据需要自定义表单样式 */
</style>

@ -161,6 +161,18 @@
}
}
},
{
"path": "shop/to",
"style": {
"navigationBarTitleText": "门店登录",
"enablePullDownRefresh": false,
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"gestureBack": "YES"
}
}
},
{
"path": "user/list",
"style": {
@ -333,6 +345,42 @@
"gestureBack": "YES"
}
}
},
{
"path": "setup/index",
"style": {
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false,
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"gestureBack": "YES"
}
}
},
{
"path": "pickUp/index",
"style": {
"navigationBarTitleText": "自提订单",
"enablePullDownRefresh": false,
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"gestureBack": "YES"
}
}
},
{
"path": "inpersonPay/index",
"style": {
"navigationBarTitleText": "当面付订单",
"enablePullDownRefresh": false,
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"gestureBack": "YES"
}
}
}
]
}

@ -19,6 +19,7 @@ import { ref } from 'vue'
import user from '@/api/modules/user.js'
import utils from '@/utils/utils.js'
import md5 from 'js-md5';
uni.clearStorage(); //
const model = ref({
username: "",
@ -52,6 +53,7 @@ function handleSubmit() {
if (res.code == 0) {
uni.setStorageSync("token", res.data.access_token);
uni.setStorageSync("user_info", res.data.user_info);
uni.showToast({
icon: "none",
title: "登录成功",
@ -59,7 +61,10 @@ function handleSubmit() {
if (res.data.user_info.type == 1) {
utils.toUrl("/store/index/index", "redirectTo")
uni.setStorageSync("store_info", res.data.user_info);
} else if (res.data.user_info.type == 3) {
uni.setStorageSync("mall_token", res.data.access_token);
uni.setStorageSync("mall_info", res.data.user_info);
utils.toUrl("/mall/index/index", "redirectTo")
} else {
uni.showToast({

@ -3,10 +3,20 @@
<kevyloading v-if="loading" type="bsm-loader" color="#618af8" transparent></kevyloading>
<view class="w-full">
<wd-navbar fixed safeAreaInsetTop :leftText="user_info?.info?.name || '商城首页'">
<wd-navbar fixed safeAreaInsetTop>
<template #right>
<wd-icon @click="utils.toUrl('/store/setup/index')" name="setting" size="22px"></wd-icon>
</template>
<template #left>
<view class="flex items-center">
{{ store_info?.info?.name + ' [ 商城 ]' || '商城首页' }}
</view>
</template>
</wd-navbar>
</view>
@ -98,10 +108,6 @@
</view>
</view>
<!-- <view @click="utils.toUrl('/store/order/index')" class="text-white rounded-3xl p-4 pb-0 shadow-lg overflow-hidden"
style="background-image: linear-gradient(to top, #7ea0ff 0%, #a9bdf5 100%);">
<view class="font-bold">订单管理</view>
@ -114,8 +120,6 @@
</view>
</view> -->
</view>
<view style="transition: 1s;" class="w-full h-full bg-white pt-4 rounded-tr-3xl rounded-tl-3xl shadow-lg oh">
@ -214,7 +218,7 @@ const loading = ref(false);
/**
* 从本地存储中获取用户信息
*/
const user_info = uni.getStorageSync("user_info");
const store_info = uni.getStorageSync("store_info");
/**
* @type {Ref<Object>}

@ -82,7 +82,7 @@
</view>
</template>
<view v-for="subItem of item.details" style="height: 60px;" class="content mb-4">
<view v-for="subItem of item.details" class="content mb-4">
<image :src="subItem.goods_pic" width="40" height="40" alt="joy"
style="border-radius: 4px; margin-right: 12px;width: 60px;height: 60px;min-width: 60px;" />
<view>

@ -3,7 +3,7 @@
<kevyloading v-if="loading" type="bsm-loader" color="#618af8" transparent></kevyloading>
<view class="w-full mb-12">
<wd-navbar fixed safeAreaInsetTop :leftText="user_info?.info?.name || '商城设置'">
<wd-navbar fixed safeAreaInsetTop :leftText="store_info?.info?.name || '商城设置'">
<template #right>
<view @click="utils.loginOut()">
退出登录
@ -150,7 +150,7 @@ import utils from '@/utils/utils.js'
/**
* 从本地存储中获取用户信息
*/
const user_info = uni.getStorageSync("user_info");
const store_info = uni.getStorageSync("store_info");
export default {
components: {
@ -159,7 +159,7 @@ export default {
data() {
return {
utils,
user_info,
store_info,
//
storeData: {
name: '',

@ -1,13 +1,6 @@
<template>
<view class="content">
<kevyloading v-if="loading" type="bsm-loader" color="#618af8" transparent></kevyloading>
<!-- <view class="w-full">
<wd-navbar fixed safeAreaInsetTop :leftText="user_info?.info?.name || '商城首页'">
<template #right>
<wd-icon @click="utils.toUrl('/store/setup/index')" name="setting" size="22px"></wd-icon>
</template>
</wd-navbar>
</view> -->
<div class="grid p-2">
<div v-for="shop of shopList" class="rounded-md overflow-hidden">
@ -38,7 +31,12 @@
<wd-button @click="changeS(shop)" v-if="shop.status !== 1" size="small" plain style="margin-right: 8px;">
开启</wd-button>
<wd-button @click="utils.toUrl('/store/shop/edit?edit=' + JSON.stringify(shop))" size="small"
style="margin-right: 0px;">编辑</wd-button>
style="margin-right: 8px;">编辑</wd-button>
<!-- /store/shop/to -->
<wd-button @click="utils.toUrl('/store/shop/to?shop=' + JSON.stringify(shop))" size="small"
style="margin-right: 0px;">管理</wd-button>
<!-- <wd-button @click="tableLogin(shop.id)" size="small" style="margin-right: 0px;">管理</wd-button> -->
</view>
</view>
@ -63,6 +61,7 @@
import { ref } from 'vue';
import utils from '@/utils/utils.js';
import shop from '@/api/store/shop.js';
import system from '@/api/modules/system.js';
import myTabbar from "../components/myTabbar/index.vue";
import kevyloading from "@/components/kevy-loading/kevy-loading";
import { useMessage } from '@/uni_modules/wot-design-uni';
@ -106,7 +105,6 @@ const changeS = async (row) => {
})
}
})
}
const syncGoods = (row) => {
@ -132,7 +130,6 @@ const syncGoods = (row) => {
});
};
/**
* 获取数据的函数
*/
@ -145,6 +142,34 @@ const getShopList = () => {
});
};
const tableLogin = async (id) => {
console.log(system);
try {
const res = await system.loginShop({
shop_id: id
});
if (res.code === 0) {
uni.setStorageSync("token", res.data.access_token);
uni.setStorageSync("mall_token", res.data.access_token);
uni.setStorageSync("mall_info", res.data.user_info);
// uni.showToast({
// icon: "none",
// title: "",
// });
utils.toUrl("/mall/index/index")
} {
uni.showToast({
title: menu.message,
icon: "none"
});
return false;
}
} catch (error) {
return false;
}
}
//
onShow(() => {
getShopList();

@ -0,0 +1,122 @@
<template>
<view class="content flex items-center justify-center">
<div class="logo flex flex-col animate-twinkle">
<view class="rounded-3xl overflow-hidden">
<wd-img :width="100" :height="100" :src="shop.logo_url" />
</view>
<text class="flex p-2 text-center justify-center">
{{ shop.name }}
</text>
</div>
<wd-toast />
<wd-message-box></wd-message-box>
</view>
</template>
<script setup>
import { ref } from 'vue';
import utils from '@/utils/utils.js';
import system from '@/api/modules/system.js';
import myTabbar from "../components/myTabbar/index.vue";
import kevyloading from "@/components/kevy-loading/kevy-loading";
import { useMessage } from '@/uni_modules/wot-design-uni';
import { useToast } from '@/uni_modules/wot-design-uni'
import { useApi } from "@/hooks/useApi.js"
const toast = useToast()
const message1 = useMessage();
import {
onShow, onLoad
} from "@dcloudio/uni-app";
const shop = ref({})
onLoad((opt) => {
const tableLogin = async (id) => {
try {
const res = await system.loginShop({
shop_id: id
});
if (res.code === 0) {
uni.setStorageSync("token", res.data.access_token);
uni.setStorageSync("mall_token", res.data.access_token);
uni.setStorageSync("mall_info", res.data.user_info);
// uni.showToast({
// icon: "none",
// title: "",
// });
utils.toUrl("/mall/index/index", 'redirectTo')
} {
uni.showToast({
title: menu.message,
icon: "none"
});
return false;
}
} catch (error) {
return false;
}
}
shop.value = JSON.parse(opt.shop)
setTimeout(() => {
tableLogin(shop.value.id)
}, 1000);
})
//
onShow(() => {
// getShopList();
})
</script>
<style lang="scss" scoped>
.shopBox,
.title {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.shopBox {
justify-content: flex-start;
}
.title {
justify-content: space-between;
}
.title-tip {
color: rgba(0, 0, 0, 0.25);
font-size: 12px;
}
@keyframes twinkling {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
.animate-twinkle {
animation: twinkling 1s infinite;
}
</style>

@ -25,7 +25,8 @@
v {{ userInfo.user_merge.member_level }}
</wd-tag>
<wd-button type="warning" @click="showLv = true" size="small" style="margin-left: 10px;">修改等级</wd-button>
<wd-button v-if="userInfo.user_merge" type="warning" @click="showLv = true" size="small"
style="margin-left: 10px;">修改等级</wd-button>
</view>
<view style="color: rgba(0,0,0,0.25); font-size: 12px;">

@ -31,7 +31,7 @@
<div class="grid p-2">
<yList height="86vh" ref="yListRef" :apiObj="user.userList" :params="{ ...params }">
<yList height="91vh" ref="yListRef" :apiObj="user.userList" :params="{ ...params }">
<template #default="{ list: userList }">
<div v-for="user of userList" class="rounded-md overflow-hidden">
<wd-card class="rounded-md overflow-hidden" type="rectangle">

@ -1,18 +1,33 @@
## 0.2.112024-01-09
### [0.2.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.10...v0.2.11) (2024-01-09)
## 0.2.132024-01-12
### [0.2.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.12...v0.2.13) (2024-01-12)
### Bug Fixes | Bug 修复
* 修复 Overlay 类型声明错误的问题 ([930e59a](https://github.com/Moonofweisheng/wot-design-uni/commit/930e59a9b09aee535ec4c316e44ed3c0e31be628))
* 修复演示文档刷新后指向localhost的问题 ([4cd8b16](https://github.com/Moonofweisheng/wot-design-uni/commit/4cd8b16bdf5ea8e93cff85396025844e9ebd031c))
# 更新日志
### Documentation | 文档
### [0.2.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.12...v0.2.13) (2024-01-12)
* 提供托管在Giteee上的文档网站 ([6d62e9e](https://github.com/Moonofweisheng/wot-design-uni/commit/6d62e9e7ddda0bd9f51f2ad9e2893f1ed3709c63))
# 更新日志
### 🐛 Bug Fixes | Bug 修复
* 🐛 修复演示文档刷新后指向localhost的问题 ([4cd8b16](https://github.com/Moonofweisheng/wot-design-uni/commit/4cd8b16bdf5ea8e93cff85396025844e9ebd031c))
### [0.2.12](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.11...v0.2.12) (2024-01-11)
### 🐛 Bug Fixes | Bug 修复
* 🐛 修复 Tabbar 错误地抛出提示信息的问题 ([1c89ed0](https://github.com/Moonofweisheng/wot-design-uni/commit/1c89ed0a7158e79556e83c6aeb89bd1e93e4ea0d))
### ✏️ Documentation | 文档
* ✏️ 增加 Circle 组件使用插槽的示例 ([6341594](https://github.com/Moonofweisheng/wot-design-uni/commit/6341594295732dac951c465d95537f36addbbf9c))
* ✏️ 增加展示gitee的star徽标 ([1abf962](https://github.com/Moonofweisheng/wot-design-uni/commit/1abf962e37e27c1c1688bed2026c66022e63ce9b))
### [0.2.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.10...v0.2.11) (2024-01-09)

@ -51,8 +51,6 @@ interface Props {
customClass?: string
// style
customStyle?: string
//
rate?: number | string
// px
size?: number
//
@ -80,16 +78,12 @@ const props = withDefaults(defineProps<Props>(), {
customClass: '',
// style
customStyle: '',
//
rate: 100,
// px
size: 100,
//
color: '#4d80f0',
//
layerColor: '#EBEEF5',
//
fill: '#ffffff',
// rate/s
speed: 50,
// px

@ -24,7 +24,7 @@ export default {
}
</script>
<script lang="ts" setup>
import { type CSSProperties, computed, onMounted } from 'vue'
import { type CSSProperties, computed } from 'vue'
import { isDef, objToStyle } from '../common/util'
import { useParent } from '../composables/useParent'
import { TABBAR_KEY } from '../wd-tabbar/types'
@ -99,32 +99,6 @@ const active = computed(() => {
}
})
onMounted(() => {
init()
})
/**
* 初始化将组件信息注入父组件
*/
function init() {
if (tabbar && tabbar.children && isDef(props.name)) {
const repeat = checkRepeat(tabbar.children, props.name, 'name')
if (repeat > -1) {
console.error('[wot-design] warning(wd-tabbar-item): name attribute cannot be defined repeatedly')
}
}
}
/**
* 检查是否存在重复name属性
* @param {Array} currentList
* @param {String} checkValue 比较的重复值
* @param {String} key 键名
*/
function checkRepeat(currentList: any[], checkValue: string | number, key: string): number {
return currentList.findIndex((item) => item[key] === checkValue)
}
/**
* 点击tabbar选项
*/

@ -2,7 +2,7 @@
"id": "wot-design-uni",
"name": "wot-design-uni",
"displayName": "wot-design-uni 基于vue3+Typescript的高颜值组件库",
"version": "0.2.11",
"version": "0.2.13",
"description": "一个基于Vue3+TS开发的uni-app组件库提供60+高质量组件,支持暗黑模式和自定义主题。",
"keywords": [
"wot-design-uni",
@ -34,7 +34,7 @@
"data": "插件不采集任何数据",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/wot-design-uni"
"npmurl": "https://gitee.com/wot-design-uni/wot-design-uni"
},
"uni_modules": {
"dependencies": [],

@ -3,7 +3,7 @@
</p>
<h1 align="center">Wot Design Uni</h1>
<p align="center">📱 一个参照<a href="https://ftf.jd.com/wot-design/">Wot-design</a>,基于 Vue3 打造的uni-app组件库</p>
<p align="center">📱 一个参照<a href="https://ftf.jd.com/wot-design/">wot-design</a>,基于 Vue3 打造的uni-app组件库</p>
<p align="center">
@ -11,6 +11,11 @@
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/Moonofweisheng/wot-design-uni?logo=github&color=%234d80f0&link=https%3A%2F%2Fgithub.com%2FMoonofweisheng%2Fwot-design-uni">
</a>
<a href='https://gitee.com/wot-design-uni/wot-design-uni/stargazers'>
<img src='https://gitee.com/wot-design-uni/wot-design-uni/badge/star.svg?theme=gray' alt='star'>
</a>
<a href="https://www.npmjs.com/package/wot-design-uni">
<img alt="npm" src="https://img.shields.io/npm/v/wot-design-uni?logo=npm&color=%234d80f0&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fwot-design-uni">
</a>

@ -14,8 +14,15 @@ const env = {
*/
export function request(options) {
options.header = {
Authorization: `Bearer ${uni.getStorageSync("token")}`,
if (options.type == 'mall') {
options.header = {
Authorization: `Bearer ${uni.getStorageSync("mall_token")}`,
}
} else {
options.header = {
Authorization: `Bearer ${uni.getStorageSync("token")}`,
}
}
options.noclient ? (options.url = env.host + options.url) : (options.url = env.host + "" + options.url);
@ -24,7 +31,6 @@ export function request(options) {
uni.request({
url: options.url,
timeout: env.NETWORK_TIME_OUT,
// data: { ...options.data, store_id: env.store_id, mini_id: env.mini_id, origin: getOrigin() },
data: { ...options.data, ...env, },
header: options.header,
method: options.method,

@ -125,8 +125,7 @@ export default {
const [curRoute, curRouteParam] = this.getRouterInfo()
uni.setStorageSync("backPage", "/" + curRoute + curRouteParam)
uni.removeStorageSync("token");
uni.removeStorageSync("user_info");
uni.clearStorage();
this.toUrl("/pages/login/index", "redirectTo");
},

Loading…
Cancel
Save