first commit
This commit is contained in:
12
unpackage/dist/dev/mp-alipay/pages/setMeal/affirm.acss
vendored
Normal file
12
unpackage/dist/dev/mp-alipay/pages/setMeal/affirm.acss
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
.affirm_btn.data-v-b11f557d {
|
||||
width: 650rpx;
|
||||
height: 78rpx;
|
||||
background: #4874e5;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/pages/setMeal/affirm.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/pages/setMeal/affirm.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="p30 data-v-b11f557d"><view class="data-v-b11f557d" style="height:20rpx"></view><view class="data-v-b11f557d" style="background-color:#ffffff;padding:20rpx;border-radius:10rpx;font-size:30rpx;display:flex"><image class="data-v-b11f557d" style="width:220rpx;height:220rpx;border-radius:16rpx" mode="aspectFit" src="{{a}}"></image><view class="data-v-b11f557d" style="padding:20rpx"><view class="data-v-b11f557d" style="color:#232323">{{b}}</view><view class="data-v-b11f557d" style="height:20rpx"></view><view class="data-v-b11f557d"><text class="data-v-b11f557d">单价:</text><text class="data-v-b11f557d" style="color:crimson">{{c}}元</text></view><view class="data-v-b11f557d" style="height:20rpx"></view><view class="data-v-b11f557d"><text class="data-v-b11f557d">总价:</text><text class="data-v-b11f557d" style="color:crimson">{{d}}元</text></view></view></view><view class="data-v-b11f557d" style="height:20rpx"></view><view class="data-v-b11f557d" style="background-color:#ffffff;padding:20rpx;border-radius:10rpx;font-size:30rpx;display:flex;align-items:center;justify-content:space-between"><view class="u-flex data-v-b11f557d"><view class="data-v-b11f557d">购买数量</view><view class="data-v-b11f557d" style="width:10rpx"></view></view><view class="data-v-b11f557d"><up-number-box class="data-v-b11f557d" onChange="{{e}}" u-i="b11f557d-0" onVI="__l" onUpdateModelValue="{{f}}" u-p="{{g}}"></up-number-box></view></view><view class="data-v-b11f557d" style="background-color:#ffffff;padding:20rpx;border-radius:10rpx;font-size:30rpx;margin-top:30rpx"><view class="data-v-b11f557d" style="font-weight:700">购买须知:</view><view class="data-v-b11f557d" style="height:20rpx"></view><view class="data-v-b11f557d" style="color:#dd6161">付款成功后立即生效,并投入生产安装,不支持退款、退货。</view><view class="data-v-b11f557d" style="height:20rpx"></view><view class="data-v-b11f557d" style="display:flex;align-items:center;justify-content:space-between"><view class="data-v-b11f557d" style="display:flex"><view class="data-v-b11f557d">阅读并同意:</view><navigator class="data-v-b11f557d" url="/pages/protocol/buy?id=14" style="color:dodgerblue" open-type="navigate"><text class="data-v-b11f557d">《充电桩购销合同》</text></navigator></view><view class="data-v-b11f557d"><up-text a:if="{{h}}" class="data-v-b11f557d" u-i="b11f557d-1" onVI="__l" u-p="{{i}}"></up-text><up-text a:else class="data-v-b11f557d" u-i="b11f557d-2" onVI="__l" u-p="{{j||''}}"></up-text></view></view><view class="data-v-b11f557d" style="height:20rpx"></view><view class="data-v-b11f557d" style="display:flex;align-items:center;justify-content:space-between"><view class="data-v-b11f557d" style="display:flex"><view class="data-v-b11f557d">阅读并同意:</view><navigator class="data-v-b11f557d" url="/pages/protocol/trusteeship?id=13" style="color:dodgerblue" open-type="navigate"><text class="data-v-b11f557d">《充电桩托管协议》</text></navigator></view><view class="data-v-b11f557d"><up-text a:if="{{k}}" class="data-v-b11f557d" u-i="b11f557d-3" onVI="__l" u-p="{{l}}"></up-text><up-text a:else class="data-v-b11f557d" u-i="b11f557d-4" onVI="__l" u-p="{{m||''}}"></up-text></view></view></view><view class="data-v-b11f557d" style="display:flex;justify-content:center;margin-top:80rpx"><view class="affirm_btn data-v-b11f557d" onTap="{{n}}">确认订单</view></view></view>
|
||||
97
unpackage/dist/dev/mp-alipay/pages/setMeal/affirm.js
vendored
Normal file
97
unpackage/dist/dev/mp-alipay/pages/setMeal/affirm.js
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_number_box2 = common_vendor.resolveComponent("up-number-box");
|
||||
const _easycom_up_text2 = common_vendor.resolveComponent("up-text");
|
||||
(_easycom_up_number_box2 + _easycom_up_text2)();
|
||||
}
|
||||
const _easycom_up_number_box = () => "../../uni_modules/uview-plus/components/u-number-box/u-number-box.js";
|
||||
const _easycom_up_text = () => "../../uni_modules/uview-plus/components/u-text/u-text.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_number_box + _easycom_up_text)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "affirm",
|
||||
setup(__props) {
|
||||
let dataFrom = common_vendor.ref({
|
||||
num: 1
|
||||
});
|
||||
let shop = common_vendor.ref({});
|
||||
let policy = common_vendor.ref({
|
||||
is_trusteeship: 0,
|
||||
is_buy: 0
|
||||
});
|
||||
common_vendor.onLoad(async (options) => {
|
||||
let _res = await api_api.selectGoodsInfo({
|
||||
id: options.id
|
||||
});
|
||||
shop.value = _res;
|
||||
common_vendor.index.$on("buy", (e) => {
|
||||
policy.value.is_buy = e;
|
||||
});
|
||||
common_vendor.index.$on("trusteeship", (e) => {
|
||||
policy.value.is_trusteeship = e;
|
||||
});
|
||||
});
|
||||
let changenum = (e) => {
|
||||
console.log(e);
|
||||
};
|
||||
let add = async () => {
|
||||
if (!policy.value.is_buy)
|
||||
return common_vendor.index.showToast({ title: "请阅读并同意《充电桩购销合同》", icon: "none" });
|
||||
if (!policy.value.is_trusteeship)
|
||||
return common_vendor.index.showToast({ title: "请阅读并同意《充电桩托管协议》", icon: "none" });
|
||||
let { id } = common_vendor.index.getStorageSync("user");
|
||||
let _res = await api_api.addGoodsPackageOrders({
|
||||
userId: id,
|
||||
num: dataFrom.value.num,
|
||||
gid: shop.value.id
|
||||
});
|
||||
common_vendor.index.redirectTo({
|
||||
url: `/pages/order/pay?id=${_res.id}&amount=${_res.amount}&type=2`
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: JSON.parse(common_vendor.unref(shop).picture)[0],
|
||||
b: common_vendor.t(common_vendor.unref(shop).packagesName),
|
||||
c: common_vendor.t(common_vendor.unref(shop).salePrice),
|
||||
d: common_vendor.t(common_vendor.unref(shop).salePrice * common_vendor.unref(dataFrom).num),
|
||||
e: common_vendor.o(common_vendor.unref(changenum)),
|
||||
f: common_vendor.o(($event) => common_vendor.unref(dataFrom).num = $event),
|
||||
g: common_vendor.p({
|
||||
inputWidth: "100rpx",
|
||||
modelValue: common_vendor.unref(dataFrom).num
|
||||
}),
|
||||
h: common_vendor.unref(policy).is_buy == 1
|
||||
}, common_vendor.unref(policy).is_buy == 1 ? {
|
||||
i: common_vendor.p({
|
||||
text: "已同意",
|
||||
type: "primary"
|
||||
})
|
||||
} : {
|
||||
j: common_vendor.p({
|
||||
text: "未同意",
|
||||
type: "error"
|
||||
})
|
||||
}, {
|
||||
k: common_vendor.unref(policy).is_trusteeship == 1
|
||||
}, common_vendor.unref(policy).is_trusteeship == 1 ? {
|
||||
l: common_vendor.p({
|
||||
text: "已同意",
|
||||
type: "primary"
|
||||
})
|
||||
} : {
|
||||
m: common_vendor.p({
|
||||
text: "未同意",
|
||||
type: "error"
|
||||
})
|
||||
}, {
|
||||
n: common_vendor.o((...args) => common_vendor.unref(add) && common_vendor.unref(add)(...args))
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b11f557d"]]);
|
||||
my.createPage(MiniProgramPage);
|
||||
7
unpackage/dist/dev/mp-alipay/pages/setMeal/affirm.json
vendored
Normal file
7
unpackage/dist/dev/mp-alipay/pages/setMeal/affirm.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"defaultTitle": "确定订单",
|
||||
"usingComponents": {
|
||||
"up-number-box": "../../uni_modules/uview-plus/components/u-number-box/u-number-box",
|
||||
"up-text": "../../uni_modules/uview-plus/components/u-text/u-text"
|
||||
}
|
||||
}
|
||||
66
unpackage/dist/dev/mp-alipay/pages/setMeal/setMeal.acss
vendored
Normal file
66
unpackage/dist/dev/mp-alipay/pages/setMeal/setMeal.acss
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
page {
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.orderdetail_header.data-v-da04f288 {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
.shop_btn.data-v-da04f288 {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 20rpx 60rpx 30rpx;
|
||||
width: 750rpx;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #fff;
|
||||
}
|
||||
.shop_btn image.data-v-da04f288 {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.shop_btn_btn.data-v-da04f288 {
|
||||
width: 496rpx;
|
||||
padding: 15rpx;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #002ea4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 24rpx;
|
||||
color: #002ea4;
|
||||
}
|
||||
.shop_info.data-v-da04f288 {
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.shop_info_mon.data-v-da04f288 {
|
||||
font-weight: bold;
|
||||
font-size: 44rpx;
|
||||
color: #ff1a1a;
|
||||
}
|
||||
.shop_info_tit.data-v-da04f288 {
|
||||
margin-top: 10rpx;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.shop_info_note.data-v-da04f288 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/pages/setMeal/setMeal.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/pages/setMeal/setMeal.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="shop data-v-da04f288"><up-swiper class="data-v-da04f288" u-i="da04f288-0" onVI="__l" u-p="{{a}}"></up-swiper><view class="p30 data-v-da04f288"><view class="shop_info data-v-da04f288"><view class="shop_info_mon data-v-da04f288">¥ {{b}}</view><view class="shop_info_tit data-v-da04f288">{{c}}</view></view></view><view class="data-v-da04f288" style="margin:30rpx 0;padding:0 150rpx"><up-divider class="data-v-da04f288" u-i="da04f288-1" onVI="__l" u-p="{{d}}"></up-divider></view><view class="p30 data-v-da04f288"><view a:for="{{e}}" a:for-item="i" a:key="d" class="data-v-da04f288" style="background-color:#ffffff;padding:20rpx;border-radius:10rpx;font-size:30rpx;display:flex"><image class="data-v-da04f288" style="width:220rpx;height:220rpx;border-radius:16rpx" mode="aspectFit" src="{{i.a}}"></image><view class="data-v-da04f288" style="padding:20rpx"><view class="data-v-da04f288" style="color:#232323">{{i.b}}</view><view class="data-v-da04f288" style="height:20rpx"></view><view class="data-v-da04f288"><text class="data-v-da04f288">单价:</text><text class="data-v-da04f288" style="color:crimson">{{i.c}}元</text></view><view class="data-v-da04f288" style="height:20rpx"></view></view></view></view><view class="data-v-da04f288" style="margin:30rpx 0;font-size:30rpx;color:#333;text-align:center">详情介绍</view><image a:for="{{f}}" a:for-item="item" a:key="b" class="data-v-da04f288" style="width:100%" mode="widthFix" src="{{item.a}}"></image><view class="data-v-da04f288" style="height:150rpx"></view><view class="shop_btn data-v-da04f288"><view class="shop_btn_btn data-v-da04f288" onTap="{{g}}">立即下单</view></view></view>
|
||||
68
unpackage/dist/dev/mp-alipay/pages/setMeal/setMeal.js
vendored
Normal file
68
unpackage/dist/dev/mp-alipay/pages/setMeal/setMeal.js
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
|
||||
const _easycom_up_divider2 = common_vendor.resolveComponent("up-divider");
|
||||
(_easycom_up_swiper2 + _easycom_up_divider2)();
|
||||
}
|
||||
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
|
||||
const _easycom_up_divider = () => "../../uni_modules/uview-plus/components/u-divider/u-divider.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_swiper + _easycom_up_divider)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "setMeal",
|
||||
setup(__props) {
|
||||
let shop = common_vendor.ref({});
|
||||
const { nav, navTo } = hooks_useNav.useNav();
|
||||
const headerBg = common_vendor.ref(false);
|
||||
common_vendor.index.getSystemInfoSync().statusBarHeight + "px";
|
||||
common_vendor.ref(["/static/图层 979.png"]);
|
||||
common_vendor.onLoad(async (options) => {
|
||||
let _res = await api_api.selectGoodsInfo({
|
||||
id: options.id
|
||||
});
|
||||
shop.value = _res;
|
||||
});
|
||||
common_vendor.onPageScroll((e) => {
|
||||
if (e.scrollTop > common_vendor.index.getSystemInfoSync().statusBarHeight + 44) {
|
||||
headerBg.value = true;
|
||||
} else {
|
||||
headerBg.value = false;
|
||||
}
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
list: JSON.parse(common_vendor.unref(shop).picture),
|
||||
height: "759rpx"
|
||||
}),
|
||||
b: common_vendor.t(common_vendor.unref(shop).salePrice),
|
||||
c: common_vendor.t(common_vendor.unref(shop).packagesName),
|
||||
d: common_vendor.p({
|
||||
text: "套餐包含"
|
||||
}),
|
||||
e: common_vendor.f(common_vendor.unref(shop).goodsVOList, (i, n, i0) => {
|
||||
return {
|
||||
a: JSON.parse(i.picture)[0],
|
||||
b: common_vendor.t(i.goodsName),
|
||||
c: common_vendor.t(i.salePrice),
|
||||
d: n
|
||||
};
|
||||
}),
|
||||
f: common_vendor.f(JSON.parse(common_vendor.unref(shop).details), (item, index, i0) => {
|
||||
return {
|
||||
a: item,
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
g: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/setMeal/affirm?id=${common_vendor.unref(shop).id}`, true))
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-da04f288"]]);
|
||||
_sfc_main.__runtimeHooks = 1;
|
||||
my.createPage(MiniProgramPage);
|
||||
7
unpackage/dist/dev/mp-alipay/pages/setMeal/setMeal.json
vendored
Normal file
7
unpackage/dist/dev/mp-alipay/pages/setMeal/setMeal.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"defaultTitle": "套餐详情",
|
||||
"usingComponents": {
|
||||
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
|
||||
"up-divider": "../../uni_modules/uview-plus/components/u-divider/u-divider"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user