上传代码
This commit is contained in:
13
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/Shopdetails.js
vendored
Normal file
13
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/Shopdetails.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
__name: "Shopdetails",
|
||||
setup(__props) {
|
||||
const businessMessage = common_vendor.ref(common_vendor.index.getStorageSync("Mybusiness"));
|
||||
console.log(businessMessage.value);
|
||||
return (_ctx, _cache) => {
|
||||
return {};
|
||||
};
|
||||
}
|
||||
};
|
||||
wx.createPage(_sfc_main);
|
5
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/Shopdetails.json
vendored
Normal file
5
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/Shopdetails.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
1
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/Shopdetails.wxml
vendored
Normal file
1
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/Shopdetails.wxml
vendored
Normal file
@ -0,0 +1 @@
|
||||
<view class="aboutMessage1"><view class="title1">店铺信息</view><view class="message1"><view class="messageItem1">地址:呼兰区哈尔滨华德学院</view><view class="messageItem1">营业时间:早7:00-晚20:30</view><view class="messageItem1">联系电话:1234312334</view></view></view><view class="title1">图片详情</view><view class="aboutImg1"><view class="imgLeft1"><image src="https://ts1.cn.mm.bing.net/th/id/R-C.b3a7697d2793ba094a861d546c31190d?rik=NevOIW4XmkUuMA&riu=http%3a%2f%2fseopic.699pic.com%2fphoto%2f50069%2f5445.jpg_wh1200.jpg&ehk=wuLPicg%2b9wXz8QAwp%2fAVFBtJQ6loBUiVfQZu2bbZODA%3d&risl=&pid=ImgRaw&r=0" class="img1" mode="scaleToFill"></image><image src="https://ts1.cn.mm.bing.net/th/id/R-C.68978afc71576a94a1d50ef5016dbd9e?rik=cDDsy5SLmDvDHQ&riu=http%3a%2f%2fseopic.699pic.com%2fphoto%2f50075%2f0779.jpg_wh1200.jpg&ehk=FG4Hd5S711LYcuLBIcDagQyk4KhcH1oIfqyk1MWUOyg%3d&risl=&pid=ImgRaw&r=0" class="img1"></image><image src="https://img.zcool.cn/community/0105ec5b5ac3cba801206a35cf08a8.jpg@1280w_1l_2o_100sh.jpg" class="img1"></image></view><view class="imgRight1"><image src="https://img.zcool.cn/community/0105ec5b5ac3cba801206a35cf08a8.jpg@1280w_1l_2o_100sh.jpg" class="img1"></image><image src="https://img.zcool.cn/community/0189d85c3c421aa80121fbb0284f6c.jpg@1280w_1l_2o_100sh.jpg" class="img1"></image><image src="https://bpic.588ku.com/back_origin_min_pic/21/03/30/251617b5c1ad3b0c7ae62fb8b51dfbbd.jpg" class="img1"></image></view></view>
|
39
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/Shopdetails.wxss
vendored
Normal file
39
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/Shopdetails.wxss
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
.title1 {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
font-size: 20px;
|
||||
color: #000;
|
||||
padding-left: 5px;
|
||||
line-height: 60px;
|
||||
}
|
||||
.message1 {
|
||||
width: 80%;
|
||||
height: 200rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.messageItem1 {
|
||||
font-size: 18px;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
.aboutImg1 {
|
||||
width: 90%;
|
||||
height: 100vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.imgLeft1 {
|
||||
float: left;
|
||||
width: 48%;
|
||||
height: 100vh;
|
||||
}
|
||||
.imgRight1 {
|
||||
float: right;
|
||||
width: 48%;
|
||||
height: 100vh;
|
||||
}
|
||||
.img1 {
|
||||
width: 100%;
|
||||
border-radius: 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
317
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/merchant.js
vendored
Normal file
317
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/merchant.js
vendored
Normal file
@ -0,0 +1,317 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const API_api = require("../../API/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_notice_bar2 = common_vendor.resolveComponent("uni-notice-bar");
|
||||
const _easycom_uni_rate2 = common_vendor.resolveComponent("uni-rate");
|
||||
const _easycom_uni_drawer2 = common_vendor.resolveComponent("uni-drawer");
|
||||
(_easycom_uni_notice_bar2 + _easycom_uni_rate2 + _easycom_uni_drawer2)();
|
||||
}
|
||||
const _easycom_uni_notice_bar = () => "../../uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.js";
|
||||
const _easycom_uni_rate = () => "../../uni_modules/uni-rate/components/uni-rate/uni-rate.js";
|
||||
const _easycom_uni_drawer = () => "../../uni_modules/uni-drawer/components/uni-drawer/uni-drawer.js";
|
||||
if (!Math) {
|
||||
(_easycom_uni_notice_bar + sort + _easycom_uni_rate + _easycom_uni_drawer)();
|
||||
}
|
||||
const sort = () => "./sort.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "merchant",
|
||||
setup(__props) {
|
||||
const currentIndex = common_vendor.ref(0);
|
||||
const tabs = common_vendor.ref([
|
||||
{ name: "点餐" },
|
||||
{ name: "评价" },
|
||||
{ name: "商家信息" }
|
||||
]);
|
||||
const switchTab = (index) => {
|
||||
currentIndex.value = index;
|
||||
};
|
||||
const historyList = common_vendor.ref([]);
|
||||
const talk = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/talk/talk"
|
||||
});
|
||||
};
|
||||
common_vendor.ref(1);
|
||||
const showRight = common_vendor.ref(null);
|
||||
const showDrawer = () => {
|
||||
if (showRight.value) {
|
||||
showRight.value.open();
|
||||
}
|
||||
};
|
||||
const isLiked = common_vendor.ref(false);
|
||||
const collectState = () => {
|
||||
const businessItem = common_vendor.index.getStorageSync("businessItem");
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/business/my/getById",
|
||||
method: "GET",
|
||||
data: {
|
||||
businessId: businessItem
|
||||
},
|
||||
success(res) {
|
||||
isLiked.value = Boolean(res.data.data.isCollected);
|
||||
},
|
||||
fail(error) {
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
collectState();
|
||||
});
|
||||
const toggleLike = () => {
|
||||
const originalState = isLiked.value;
|
||||
isLiked.value = !originalState;
|
||||
const action = originalState ? "delete" : "add";
|
||||
common_vendor.index.request({
|
||||
url: `${API_api.apiImageUrl}/api/collect/${action}`,
|
||||
method: "POST",
|
||||
data: {
|
||||
businessId: common_vendor.index.getStorageSync("businessItem") || "0"
|
||||
},
|
||||
header: {
|
||||
"cookie": common_vendor.index.getStorageSync("cookie") || ""
|
||||
},
|
||||
success(res) {
|
||||
if (res.data.code !== 200) {
|
||||
isLiked.value = originalState;
|
||||
common_vendor.index.showToast({
|
||||
title: res.data.msg || "操作失败",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showToast({
|
||||
title: originalState ? "已取消收藏" : "收藏成功",
|
||||
duration: 2e3
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
isLiked.value = originalState;
|
||||
common_vendor.index.showToast({
|
||||
title: "网络错误,请重试",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const cartItems = common_vendor.ref([]);
|
||||
const updateCart = (newCartItems) => {
|
||||
cartItems.value = newCartItems;
|
||||
console.log("更新后的购物车:", cartItems.value);
|
||||
common_vendor.index.setStorageSync("cartItems", newCartItems);
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
cartItems.value = common_vendor.index.getStorageSync("cartItems") || [];
|
||||
});
|
||||
const deleteItem = (index) => {
|
||||
cartItems.value.splice(index, 1);
|
||||
common_vendor.index.setStorageSync("cartItems", cartItems.value);
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
cartItems.value = common_vendor.index.getStorageSync("cartItems") || [];
|
||||
});
|
||||
const incrementQuantity = (index) => {
|
||||
if (cartItems.value[index].quantity < 9) {
|
||||
cartItems.value[index].quantity++;
|
||||
}
|
||||
};
|
||||
const decrementQuantity = (index) => {
|
||||
if (cartItems.value[index].quantity > 1) {
|
||||
cartItems.value[index].quantity--;
|
||||
}
|
||||
};
|
||||
const totalAmount = common_vendor.computed(() => {
|
||||
return cartItems.value.reduce((total, item) => {
|
||||
return total + item.dishesPrice * item.quantity;
|
||||
}, 0);
|
||||
});
|
||||
const account = () => {
|
||||
let businessid = common_vendor.index.getStorageSync("businessItem") || "1830063677349658625";
|
||||
const orderDetails = cartItems.value.map((item) => ({
|
||||
attributeNames: "小份",
|
||||
dishesId: item.id,
|
||||
quantity: item.quantity
|
||||
}));
|
||||
const data = {
|
||||
businessId: String(businessid),
|
||||
notes: "",
|
||||
orderDetailAddRequest: orderDetails,
|
||||
payMethod: 0,
|
||||
phone: "15946398466",
|
||||
pickupMethod: 0,
|
||||
pickupTime: "",
|
||||
totalPrice: totalAmount.value,
|
||||
userName: "沙箱账号"
|
||||
};
|
||||
data.businessId = String(data.businessId);
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/orders/add",
|
||||
method: "POST",
|
||||
data,
|
||||
header: {
|
||||
"cookie": common_vendor.index.getStorageSync("cookie") || ""
|
||||
},
|
||||
success(res) {
|
||||
console.log(data);
|
||||
console.log("Success:", res.data.data);
|
||||
const orderId = res.data.data;
|
||||
common_vendor.index.setStorageSync("notPay", orderId);
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/goToPay/goToPay"
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
console.error("Error:", "请求失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
const merchantId = common_vendor.ref();
|
||||
const getMerchantIdFromUrl = () => {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
console.log("Current page options:", currentPage.options);
|
||||
if (currentPage && currentPage.options && currentPage.options.merchantId) {
|
||||
merchantId.value = currentPage.options.merchantId;
|
||||
console.log(`Merchant ID received: ${merchantId.value}`);
|
||||
} else {
|
||||
console.error("Could not retrieve merchantId from URL.");
|
||||
}
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
getMerchantIdFromUrl();
|
||||
});
|
||||
common_vendor.watch(merchantId, (newValue) => {
|
||||
common_vendor.index.$emit("merchantIdChanged", newValue);
|
||||
});
|
||||
const businessMessage = common_vendor.ref(common_vendor.index.getStorageSync("Mybusiness"));
|
||||
console.log(businessMessage.value);
|
||||
const review = () => {
|
||||
const businessId = common_vendor.index.getStorageSync("businessItem");
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/level/list/business",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: businessId
|
||||
},
|
||||
success(res) {
|
||||
console.log(res.data.data);
|
||||
historyList.value = res.data.data;
|
||||
},
|
||||
fail() {
|
||||
console.log("失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
review();
|
||||
});
|
||||
const contentDetail = common_vendor.ref("");
|
||||
const fetchContentItem = async () => {
|
||||
const businessId = common_vendor.index.getStorageSync("businessItem");
|
||||
try {
|
||||
const res = await common_vendor.index.request({
|
||||
url: "http://39.101.78.35:6448/api/businessInfo/list",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: businessId
|
||||
}
|
||||
});
|
||||
console.log(res.data.data.content);
|
||||
contentDetail.value = res.data.data.content;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
fetchContentItem();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
["show-icon"]: true,
|
||||
scrollable: true,
|
||||
text: contentDetail.value
|
||||
}),
|
||||
b: common_vendor.f(tabs.value, (tab, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(tab.name),
|
||||
b: index,
|
||||
c: currentIndex.value === index ? 1 : "",
|
||||
d: common_vendor.o(($event) => switchTab(index), index)
|
||||
};
|
||||
}),
|
||||
c: currentIndex.value === 0
|
||||
}, currentIndex.value === 0 ? {
|
||||
d: common_vendor.o(updateCart),
|
||||
e: common_vendor.p({
|
||||
["merchant-id"]: merchantId.value
|
||||
})
|
||||
} : {}, {
|
||||
f: currentIndex.value === 1
|
||||
}, currentIndex.value === 1 ? {
|
||||
g: common_vendor.f(historyList.value, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.createTime.substr(0, 19).replace("T", " ")),
|
||||
b: common_vendor.t(item.rating),
|
||||
c: "a7b7a9e4-2-" + i0,
|
||||
d: common_vendor.p({
|
||||
readonly: true,
|
||||
value: item.rating,
|
||||
["active-color"]: "#13c2c2",
|
||||
["is-fill"]: false,
|
||||
color: "#13c2c2"
|
||||
}),
|
||||
e: common_vendor.t(item.review),
|
||||
f: common_vendor.o(($event) => _ctx.reviewUser(item), index),
|
||||
g: item.businessReview && item.businessReview.trim() !== ""
|
||||
}, item.businessReview && item.businessReview.trim() !== "" ? {
|
||||
h: common_vendor.t(item.businessReview)
|
||||
} : {}, {
|
||||
i: index
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
h: currentIndex.value === 2
|
||||
}, currentIndex.value === 2 ? {
|
||||
i: common_vendor.t(businessMessage.value.address),
|
||||
j: common_vendor.t(businessMessage.value.businessPhone),
|
||||
k: businessMessage.value.businessAvatar
|
||||
} : {}, {
|
||||
l: isLiked.value ? "../../static/small/starSelected.png" : "../../static/small/star.png",
|
||||
m: common_vendor.t(isLiked.value ? "已收藏" : "收藏店铺"),
|
||||
n: common_vendor.o(toggleLike),
|
||||
o: common_assets._imports_0$3,
|
||||
p: common_vendor.o(talk),
|
||||
q: common_vendor.o(($event) => showDrawer()),
|
||||
r: common_vendor.f(cartItems.value, (item, index, i0) => {
|
||||
return {
|
||||
a: item.dishesImage,
|
||||
b: common_vendor.o(($event) => deleteItem(index), index),
|
||||
c: common_vendor.t(item.dishesName),
|
||||
d: common_vendor.t(item.dishesPrice),
|
||||
e: common_vendor.o(($event) => decrementQuantity(index), index),
|
||||
f: common_vendor.t(item.quantity),
|
||||
g: common_vendor.o(($event) => incrementQuantity(index), index),
|
||||
h: index
|
||||
};
|
||||
}),
|
||||
s: common_assets._imports_1,
|
||||
t: common_vendor.t(totalAmount.value),
|
||||
v: common_vendor.o(account),
|
||||
w: common_vendor.sr(showRight, "a7b7a9e4-3", {
|
||||
"k": "showRight"
|
||||
}),
|
||||
x: common_vendor.o(($event) => _ctx.change($event, "showRight")),
|
||||
y: common_vendor.p({
|
||||
mode: "left",
|
||||
["mask-click"]: true
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
wx.createPage(_sfc_main);
|
10
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/merchant.json
vendored
Normal file
10
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/merchant.json
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "商家",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uni-notice-bar": "../../uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar",
|
||||
"uni-rate": "../../uni_modules/uni-rate/components/uni-rate/uni-rate",
|
||||
"uni-drawer": "../../uni_modules/uni-drawer/components/uni-drawer/uni-drawer",
|
||||
"sort": "./sort"
|
||||
}
|
||||
}
|
1
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/merchant.wxml
vendored
Normal file
1
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/merchant.wxml
vendored
Normal file
@ -0,0 +1 @@
|
||||
<scroll-view scroll-y class="preview"><view class="preview"><swiper circular="{{true}}" autoplay="{{true}}" interval="{{3000}}" indicator-dots><swiper-item><image mode="aspectFill" class="image" src="https://ts1.cn.mm.bing.net/th/id/R-C.8f2db93b542db8adf6c850762c1cce4d?rik=erpuvqVy64IJzQ&riu=http%3a%2f%2fimg95.699pic.com%2fphoto%2f50044%2f9286.jpg_wh860.jpg&ehk=dnizwrPBuCaHnaxfih%2fryK7p%2fXZMbmolNORKknXvL%2bI%3d&risl=&pid=ImgRaw&r=0"></image></swiper-item><swiper-item><image mode="aspectFill" class="image" src="https://img95.699pic.com/photo/50127/2949.jpg_wh860.jpg"></image></swiper-item><swiper-item><image mode="aspectFill" class="image" src="https://img95.699pic.com/photo/50070/9636.jpg_wh860.jpg"></image></swiper-item></swiper></view><view class="priceTitle"><view class="meta"><text class="symbol">店铺详情</text></view></view><view class="notice"><uni-notice-bar wx:if="{{a}}" u-i="a7b7a9e4-0" bind:__l="__l" u-p="{{a}}"/></view><view class="tab-menu"><view wx:for="{{b}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="content"><block wx:if="{{c}}"><sort wx:if="{{e}}" bindupdateCart="{{d}}" u-i="a7b7a9e4-1" bind:__l="__l" u-p="{{e}}"></sort></block><block wx:if="{{f}}"><view class="container"><view class="history-list"><view wx:for="{{g}}" wx:for-item="item" wx:key="i" class="history-item"><view class="history-info"><image class="history-img" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.jHUH4s7TQ48X_B-1iozuJgHaHa?rs=1&pid=ImgDetMain"></image><view class="nameTime"><text class="history-title">匿名用户</text><text class="time">{{item.a}}</text></view><view class="star"><text class="history-sale">{{item.b}}</text><uni-rate wx:if="{{item.d}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"/></view></view><view class="extend"><text bindtap="{{item.f}}">{{item.e}}</text><block wx:if="{{item.g}}"><view class="businessReviewTitle"> 商家回复 </view><text class="businessReview">{{item.h}}</text></block></view></view></view></view></block><block wx:if="{{h}}"><view class="aboutMessage1"><view class="title1">店铺信息</view><view class="message1"><view class="messageItem1">地址:{{i}}</view><view class="messageItem1">营业时间:早7:00-晚20:30</view><view class="messageItem1">联系电话:{{j}}</view></view></view><view class="title1">图片详情</view><view class="aboutImg1"><view class="imgLeft1"><image src="{{k}}"></image><image src="https://ts1.cn.mm.bing.net/th/id/R-C.68978afc71576a94a1d50ef5016dbd9e?rik=cDDsy5SLmDvDHQ&riu=http%3a%2f%2fseopic.699pic.com%2fphoto%2f50075%2f0779.jpg_wh1200.jpg&ehk=FG4Hd5S711LYcuLBIcDagQyk4KhcH1oIfqyk1MWUOyg%3d&risl=&pid=ImgRaw&r=0" class="img1"></image></view><view class="imgRight1"><image src="https://bpic.588ku.com/back_origin_min_pic/21/03/30/251617b5c1ad3b0c7ae62fb8b51dfbbd.jpg" class="img1"></image></view></view></block></view></scroll-view><view class="toolbar"><view class="icons"><button class="icons-button" bindtap="{{n}}"><text class="icon-heart"><image src="{{l}}" style="width:20px;height:20px"/></text> {{m}}</button><button class="icons-button" open-type="contact" bindtap="{{p}}"><text class="icon-handset"><image src="{{o}}" style="width:20px;height:20px"/></text> 联系商家 </button></view><view class="buttons"><view class="addcart" bindtap="{{q}}"><view>购物车</view></view></view></view><view class="example-body"><uni-drawer wx:if="{{y}}" class="r" u-s="{{['d']}}" u-r="showRight" bindchange="{{x}}" u-i="a7b7a9e4-3" bind:__l="__l" u-p="{{y}}"><view class="scroll-view"><scroll-view class="scroll-view-box" scroll-y="true"><view wx:for="{{r}}" wx:for-item="item" wx:key="h" class="info-content"><view class="card"><view class="containerShow"><view class="img"><image src="{{item.a}}" class="imageItem"></image></view><view class="delete-button"><image src="{{s}}" bindtap="{{item.b}}" alt="Delete" style="width:15px;height:15px"/></view><view class="message"><view class="titleCard">{{item.c}}</view><view class="moneCard">¥{{item.d}}</view><view class="quantity-selector"><view class="jia" bindtap="{{item.e}}">-</view><text class="quantity-value">{{item.f}}</text><view class="jian" bindtap="{{item.g}}">+</view></view></view></view></view></view><button type="primary" class="sum" bindtap="{{v}}"><text>立即结算¥{{t}}</text></button></scroll-view></view></uni-drawer></view>
|
480
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/merchant.wxss
vendored
Normal file
480
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/merchant.wxss
vendored
Normal file
@ -0,0 +1,480 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.priceTitle {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
background-color: #4095e5;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
padding-left: 5px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.tabs {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
line-height: 60rpx;
|
||||
margin: 0 10rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 4rpx 6rpx rgba(240, 240, 240, 0.6);
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
}
|
||||
.tabs .item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #262626;
|
||||
}
|
||||
.tabs .cursor {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 18%;
|
||||
height: 6rpx;
|
||||
padding: 0 50rpx;
|
||||
background-color: #4095e5;
|
||||
transition: all 0.4s;
|
||||
}
|
||||
.preview image {
|
||||
width: 100%;
|
||||
}
|
||||
page {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.viewport {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.search {
|
||||
padding: 0 30rpx 20rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.search .input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 64rpx;
|
||||
padding-left: 26rpx;
|
||||
color: #8b8b8b;
|
||||
font-size: 28rpx;
|
||||
border-radius: 32rpx;
|
||||
background-color: #f3f4f4;
|
||||
}
|
||||
.icon-search::before {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.categories {
|
||||
flex: 1;
|
||||
min-height: 400rpx;
|
||||
display: flex;
|
||||
}
|
||||
.primary {
|
||||
overflow: hidden;
|
||||
width: 180rpx;
|
||||
flex: none;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.primary .item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 96rpx;
|
||||
font-size: 26rpx;
|
||||
color: #595c63;
|
||||
position: relative;
|
||||
}
|
||||
.primary .item::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 42rpx;
|
||||
bottom: 0;
|
||||
width: 96rpx;
|
||||
border-top: 1rpx solid #e3e4e7;
|
||||
}
|
||||
.primary .active {
|
||||
background-color: #fff;
|
||||
}
|
||||
.primary .active::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 8rpx;
|
||||
height: 100%;
|
||||
background-color: #ed0a3f;
|
||||
}
|
||||
.content {
|
||||
height: 100vh;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.primary .item:last-child::after,
|
||||
.primary .active::after {
|
||||
display: none;
|
||||
}
|
||||
.secondary {
|
||||
background-color: #fff;
|
||||
}
|
||||
.secondary .carousel {
|
||||
height: 200rpx;
|
||||
margin: 0 30rpx 20rpx;
|
||||
border-radius: 4rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.secondary .panel {
|
||||
margin: 0 30rpx 0rpx;
|
||||
}
|
||||
.secondary .title {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
border-bottom: 1rpx solid #f7f7f8;
|
||||
}
|
||||
.secondary .title .more {
|
||||
float: right;
|
||||
padding-left: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
.secondary .more::after {
|
||||
font-family: "erabbit" !important;
|
||||
content: "\e70c";
|
||||
}
|
||||
.secondary .section {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.secondary .section .goods {
|
||||
width: 150rpx;
|
||||
margin: 0rpx 30rpx 20rpx 0;
|
||||
}
|
||||
.secondary .section .goods:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
.secondary .section .goods image {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
.secondary .section .goods .name {
|
||||
padding: 5rpx;
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
}
|
||||
.secondary .section .goods .price {
|
||||
padding: 5rpx;
|
||||
font-size: 18rpx;
|
||||
color: #cf4444;
|
||||
}
|
||||
.secondary .section .goods .number {
|
||||
font-size: 24rpx;
|
||||
margin-left: 2rpx;
|
||||
}
|
||||
.toolbar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
background-color: #fff;
|
||||
height: 100rpx;
|
||||
padding: 0 20rpx var(--window-bottom);
|
||||
border-top: 1rpx solid #eaeaea;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.toolbar .buttons {
|
||||
display: flex;
|
||||
}
|
||||
.toolbar .buttons > view {
|
||||
width: 220rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
border-radius: 72rpx;
|
||||
}
|
||||
.toolbar .buttons .addcart {
|
||||
background-color: #4095e5;
|
||||
}
|
||||
.toolbar .buttons .buynow,
|
||||
.toolbar .buttons .payment {
|
||||
background-color: #4095e5;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.toolbar .icons {
|
||||
padding-right: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
.toolbar .icons .icons-button {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 1.4;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
font-size: 20rpx;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
}
|
||||
.toolbar .icons .icons-button::after {
|
||||
border: none;
|
||||
}
|
||||
.toolbar .icons text {
|
||||
display: block;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.tab-menu {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 10px 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.tab-item {
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tab-item.active {
|
||||
color: #4095e5;
|
||||
font-weight: bold;
|
||||
}
|
||||
.container {
|
||||
align-items: center;
|
||||
width: 90%;
|
||||
height: 100vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.history-list {
|
||||
width: 95%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 15px;
|
||||
padding: 10px;
|
||||
}
|
||||
.history-item {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.history-img {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
/* 设置为正圆形 */
|
||||
margin-right: 10px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
.history-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.nameTime {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.history-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
width: 170px;
|
||||
}
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.star {
|
||||
display: inline-block;
|
||||
line-height: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.history-sale {
|
||||
font-size: 30rpx;
|
||||
color: #000;
|
||||
float: right;
|
||||
display: inline-block;
|
||||
line-height: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.extend {
|
||||
font-size: 30rpx;
|
||||
color: #000;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.example-body {
|
||||
padding: 10px;
|
||||
}
|
||||
.scroll-view {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
.scroll-view-box {
|
||||
flex: 1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.info {
|
||||
padding: 15px;
|
||||
color: #666;
|
||||
}
|
||||
.info-text {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
.info-content {
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
border-radius: 15px;
|
||||
background-image: -webkit-linear-gradient(top, #fff, #B0D3F4);
|
||||
}
|
||||
.containerShow {
|
||||
padding: 7px;
|
||||
position: relative;
|
||||
}
|
||||
.img {
|
||||
width: 60px;
|
||||
height: 40px;
|
||||
display: inline-block;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.imageItem {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 15px;
|
||||
margin: auto 0;
|
||||
}
|
||||
.message {
|
||||
width: 110px;
|
||||
height: 88px;
|
||||
float: right;
|
||||
display: inline-block;
|
||||
}
|
||||
.quantity-selector {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.quantity-value {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
.titleCard {
|
||||
font-size: 16px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
.moneyCard {
|
||||
font-size: 15px;
|
||||
color: #666;
|
||||
padding: 0;
|
||||
}
|
||||
.jia,
|
||||
.jian {
|
||||
background-color: #fff;
|
||||
padding: 3px 5px 3px 5px;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
.sum {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.containerShow:last-child {
|
||||
padding-bottom: 150px;
|
||||
}
|
||||
.delete-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* shopdetail */
|
||||
.title1 {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
font-size: 20px;
|
||||
color: #000;
|
||||
padding-left: 5px;
|
||||
line-height: 60px;
|
||||
}
|
||||
.message1 {
|
||||
width: 80%;
|
||||
height: 200rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.messageItem1 {
|
||||
font-size: 18px;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
.aboutImg1 {
|
||||
width: 90%;
|
||||
height: 100vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.imgLeft1 {
|
||||
float: left;
|
||||
width: 48%;
|
||||
height: 100vh;
|
||||
}
|
||||
.imgRight1 {
|
||||
float: right;
|
||||
width: 48%;
|
||||
height: 100vh;
|
||||
}
|
||||
.img1 {
|
||||
width: 100%;
|
||||
border-radius: 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.businessReview {
|
||||
background-color: rgba(31, 212, 248, 0.2);
|
||||
border-radius: 15px;
|
||||
padding: 10px;
|
||||
margin: 5px;
|
||||
display: block;
|
||||
}
|
||||
.businessReviewTitle {
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
margin: 8px;
|
||||
}
|
165
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/sort.js
vendored
Normal file
165
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/sort.js
vendored
Normal file
@ -0,0 +1,165 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const API_api = require("../../API/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "sort",
|
||||
props: {
|
||||
merchantId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
emits: ["update-cart"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const resultArray = common_vendor.ref([]);
|
||||
common_vendor.ref([{
|
||||
orderState: 0,
|
||||
url: "/pages/sort/sort",
|
||||
title: "点餐"
|
||||
}, {
|
||||
orderState: 1,
|
||||
url: "/pages/evaluate/evaluate",
|
||||
title: "评价"
|
||||
}, {
|
||||
orderState: 2,
|
||||
url: "/pages/details/details",
|
||||
title: "商家"
|
||||
}]);
|
||||
const currentIndex = common_vendor.ref(0);
|
||||
common_vendor.ref([]);
|
||||
const businessId = common_vendor.ref("");
|
||||
common_vendor.ref(props.merchantId || "");
|
||||
common_vendor.watch(() => props.merchantId, async (newVal) => {
|
||||
console.log("传过来的商家id", newVal);
|
||||
businessId.value = newVal;
|
||||
await leftGroup();
|
||||
await rightList();
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
});
|
||||
const leftGroup = async () => {
|
||||
try {
|
||||
console.log(businessId.value);
|
||||
const res = await common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/dishesGroup/list/dishesGroup",
|
||||
method: "POST",
|
||||
data: {
|
||||
businessId: businessId.value
|
||||
}
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
console.log(res.data.data);
|
||||
const length = res.data.data.length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
const index = i + 1;
|
||||
const groupName = res.data.data[i].groupName;
|
||||
resultArray.value.push(groupName);
|
||||
}
|
||||
console.log(resultArray.value);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("error", error);
|
||||
}
|
||||
};
|
||||
const rightList = async () => {
|
||||
try {
|
||||
const res = await common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/dishes/list/dishes",
|
||||
method: "POST",
|
||||
data: {
|
||||
businessId: businessId.value
|
||||
}
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
const filteredData = res.data.data.filter((item) => item.status !== "1");
|
||||
historyList.value = filteredData;
|
||||
console.log("更新后的菜品列表:", historyList.value);
|
||||
} else {
|
||||
console.error("请求失败:", res.data.message);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error fetching data:", error);
|
||||
}
|
||||
};
|
||||
common_vendor.ref(null);
|
||||
const switchTab = async (index) => {
|
||||
currentIndex.value = index;
|
||||
const updatedDishesQueryRequest = {
|
||||
businessId: businessId.value,
|
||||
dishesGroupId: index + 1
|
||||
};
|
||||
try {
|
||||
const res = await common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/dishes/list/dishesVO",
|
||||
method: "POST",
|
||||
data: JSON.stringify(updatedDishesQueryRequest)
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
const filteredData = res.data.data.filter((item) => item.status !== "1");
|
||||
historyList.value = filteredData;
|
||||
} else {
|
||||
console.error("请求失败:", res.data.message);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error fetching data:", error);
|
||||
}
|
||||
common_vendor.index.scrollIntoView({
|
||||
id: "contentArea",
|
||||
duration: 300
|
||||
});
|
||||
};
|
||||
const historyList = common_vendor.ref([]);
|
||||
const emit = __emit;
|
||||
const cartItems = common_vendor.ref([]);
|
||||
const addToCart = (item) => {
|
||||
cartItems.value.push({
|
||||
...item,
|
||||
quantity: 1
|
||||
});
|
||||
common_vendor.index.setStorageSync("cartItems", cartItems.value);
|
||||
cartItems.value.forEach((item2) => {
|
||||
console.log(item2.dishesName);
|
||||
});
|
||||
emit("update-cart", cartItems.value);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f(resultArray.value, (tab, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(tab),
|
||||
b: index,
|
||||
c: currentIndex.value === index ? 1 : "",
|
||||
d: common_vendor.o(($event) => switchTab(index), index)
|
||||
};
|
||||
}),
|
||||
b: currentIndex.value === 0
|
||||
}, currentIndex.value === 0 ? {} : {}, {
|
||||
c: common_vendor.f(historyList.value, (item, index, i0) => {
|
||||
return {
|
||||
a: item.dishesImage,
|
||||
b: common_vendor.t(item.dishesName),
|
||||
c: common_vendor.t(item.dishesPrice),
|
||||
d: "257302e4-0-" + i0,
|
||||
e: common_vendor.o(() => addToCart(item), index),
|
||||
f: index
|
||||
};
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
type: "plus-filled",
|
||||
size: "30",
|
||||
color: "#4095e5"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
wx.createComponent(_sfc_main);
|
6
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/sort.json
vendored
Normal file
6
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/sort.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
1
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/sort.wxml
vendored
Normal file
1
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/sort.wxml
vendored
Normal file
@ -0,0 +1 @@
|
||||
<view class="viewport"><view class="categories"><scroll-view class="primary" scroll-y><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['item', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></scroll-view><scroll-view class="secondary" scroll-y><block wx:if="{{b}}"></block><view class="panel"><view class="container"><view class="history-list"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" class="history-item"><image class="history-img" src="{{item.a}}"></image><view class="history-info"><text class="history-title">{{item.b}}</text><text class="history-description">玉米、蘑菇</text><text class="history-time">月售234</text><text class="history-money">¥{{item.c}}</text></view><view class="icon plus-animated" bindtap="{{item.e}}"><uni-icons wx:if="{{d}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{d}}"></uni-icons></view></view></view></view></view></scroll-view></view></view>
|
167
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/sort.wxss
vendored
Normal file
167
uniapp04/unpackage/dist/dev/mp-weixin/pages/merchant/sort.wxss
vendored
Normal file
@ -0,0 +1,167 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
page {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.viewport {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.search {
|
||||
padding: 0 30rpx 20rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.search .input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 64rpx;
|
||||
padding-left: 26rpx;
|
||||
color: #8b8b8b;
|
||||
font-size: 28rpx;
|
||||
border-radius: 32rpx;
|
||||
background-color: #f3f4f4;
|
||||
}
|
||||
.icon-search::before {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.primary {
|
||||
overflow: hidden;
|
||||
width: 180rpx;
|
||||
flex: none;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.primary .item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 96rpx;
|
||||
font-size: 26rpx;
|
||||
color: #595c63;
|
||||
position: relative;
|
||||
}
|
||||
.primary .item::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 42rpx;
|
||||
bottom: 0;
|
||||
width: 96rpx;
|
||||
border-top: 1rpx solid #e3e4e7;
|
||||
}
|
||||
.primary .active {
|
||||
background-color: #fff;
|
||||
}
|
||||
.primary .active::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 8rpx;
|
||||
height: 100%;
|
||||
background-color: #4095e5;
|
||||
}
|
||||
.primary .item:last-child::after,
|
||||
.primary .active::after {
|
||||
display: none;
|
||||
}
|
||||
.secondary {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
.secondary .carousel {
|
||||
height: 400rpx;
|
||||
margin: 0 30rpx 20rpx;
|
||||
border-radius: 4rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.secondary .panel {
|
||||
margin: 0 30rpx 0rpx;
|
||||
}
|
||||
.secondary .container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.secondary .history-list {
|
||||
width: 100%;
|
||||
}
|
||||
.secondary .history-item {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
flex-direction: row;
|
||||
}
|
||||
.secondary .history-img {
|
||||
width: 200rpx;
|
||||
height: 150rpx;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.secondary .history-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 100px;
|
||||
}
|
||||
.secondary .history-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.secondary .history-description {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.secondary .history-time {
|
||||
font-size: 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
.secondary .history-money {
|
||||
font-size: 30rpx;
|
||||
color: black;
|
||||
font-weight: 700;
|
||||
}
|
||||
.icon {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
@keyframes plus-slide-down {
|
||||
0% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(10px);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
.plus-animated {
|
||||
animation-name: plus-slide-down;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: ease-in-out;
|
||||
animation-iteration-count: 1;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
Reference in New Issue
Block a user