first commit

This commit is contained in:
PC-202306242200\Administrator
2026-03-28 23:09:02 +08:00
commit dac42e3b0c
3512 changed files with 181637 additions and 0 deletions

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../common/vendor.js"),u=require("../../api/api.js");if(!Array){(e.resolveComponent("up-number-box")+e.resolveComponent("up-text"))()}Math||((()=>"../../uni_modules/uview-plus/components/u-number-box/u-number-box.js")+(()=>"../../uni_modules/uview-plus/components/u-text/u-text.js"))();const t={__name:"affirm",setup(t){let r=e.ref({num:1}),n=e.ref({}),s=e.ref({is_trusteeship:0,is_buy:0});e.onLoad((async t=>{let r=await u.shopInfo({id:t.id});n.value=r,e.index.$on("buy",(e=>{s.value.is_buy=e})),e.index.$on("trusteeship",(e=>{s.value.is_trusteeship=e}))}));let i=e=>{console.log(e)},o=async()=>{if(!s.value.is_buy)return e.index.showToast({title:"请阅读并同意《充电桩购销合同》",icon:"none"});if(!s.value.is_trusteeship)return e.index.showToast({title:"请阅读并同意《充电桩托管协议》",icon:"none"});let t=await u.addGoodsOrders({num:r.value.num,gid:n.value.id});e.index.redirectTo({url:`/pages/order/pay?id=${t.id}&amount=${t.amount}&type=1`})};return(u,t)=>e.e({a:JSON.parse(e.unref(n).picture)[0],b:e.t(e.unref(n).goodsName),c:e.t(e.unref(n).salePrice),d:e.t(e.unref(n).salePrice*e.unref(r).num),e:e.o(e.unref(i)),f:e.o((u=>e.unref(r).num=u)),g:e.p({inputWidth:"100rpx",modelValue:e.unref(r).num}),h:1==e.unref(s).is_buy},1==e.unref(s).is_buy?{i:e.p({text:"已同意",type:"primary"})}:{j:e.p({text:"未同意",type:"error"})},{k:1==e.unref(s).is_trusteeship},1==e.unref(s).is_trusteeship?{l:e.p({text:"已同意",type:"primary"})}:{m:e.p({text:"未同意",type:"error"})},{n:e.o(((...u)=>e.unref(o)&&e.unref(o)(...u)))})}},r=e._export_sfc(t,[["__scopeId","data-v-1963f699"]]);wx.createPage(r);

View File

@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "确定订单",
"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"
}
}

View File

@@ -0,0 +1 @@
<view class="p30 data-v-1963f699"><view class="data-v-1963f699" style="height:20rpx"></view><view class="data-v-1963f699" style="background-color:#ffffff;padding:20rpx;border-radius:10rpx;font-size:30rpx;display:flex"><image class="data-v-1963f699" style="width:220rpx;height:220rpx;border-radius:16rpx" src="{{a}}" mode="aspectFit"></image><view class="data-v-1963f699" style="padding:20rpx"><view class="data-v-1963f699" style="color:#232323">{{b}}</view><view class="data-v-1963f699" style="height:20rpx"></view><view class="data-v-1963f699"><text class="data-v-1963f699">单价:</text><text class="data-v-1963f699" style="color:crimson">{{c}}元</text></view><view class="data-v-1963f699" style="height:20rpx"></view><view class="data-v-1963f699"><text class="data-v-1963f699">总价:</text><text class="data-v-1963f699" style="color:crimson">{{d}}元</text></view></view></view><view class="data-v-1963f699" style="height:20rpx"></view><view class="data-v-1963f699" 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-1963f699"><view class="data-v-1963f699">购买数量</view><view class="data-v-1963f699" style="width:10rpx"></view></view><view class="data-v-1963f699"><up-number-box wx:if="{{g}}" class="data-v-1963f699" bindchange="{{e}}" u-i="1963f699-0" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"></up-number-box></view></view><view class="data-v-1963f699" style="background-color:#ffffff;padding:20rpx;border-radius:10rpx;font-size:30rpx;margin-top:30rpx"><view class="data-v-1963f699" style="font-weight:700">购买须知:</view><view class="data-v-1963f699" style="height:20rpx"></view><view class="data-v-1963f699" style="color:#dd6161">付款成功后立即生效,并投入生产安装,不支持退款、退货。</view><view class="data-v-1963f699" style="height:20rpx"></view><view class="data-v-1963f699" style="display:flex;align-items:center;justify-content:space-between"><view class="data-v-1963f699" style="display:flex"><view class="data-v-1963f699">阅读并同意:</view><navigator class="data-v-1963f699" url="/pages/protocol/buy?id=14" style="color:dodgerblue" open-type="navigate"><text class="data-v-1963f699">《充电桩购销合同》</text></navigator></view><view class="data-v-1963f699"><up-text wx:if="{{h}}" class="data-v-1963f699" u-i="1963f699-1" bind:__l="__l" u-p="{{i}}"></up-text><up-text wx:else class="data-v-1963f699" u-i="1963f699-2" bind:__l="__l" u-p="{{j||''}}"></up-text></view></view><view class="data-v-1963f699" style="height:20rpx"></view><view class="data-v-1963f699" style="display:flex;align-items:center;justify-content:space-between"><view class="data-v-1963f699" style="display:flex"><view class="data-v-1963f699">阅读并同意:</view><navigator class="data-v-1963f699" url="/pages/protocol/trusteeship?id=13" style="color:dodgerblue" open-type="navigate"><text class="data-v-1963f699">《充电桩托管协议》</text></navigator></view><view class="data-v-1963f699"><up-text wx:if="{{k}}" class="data-v-1963f699" u-i="1963f699-3" bind:__l="__l" u-p="{{l}}"></up-text><up-text wx:else class="data-v-1963f699" u-i="1963f699-4" bind:__l="__l" u-p="{{m||''}}"></up-text></view></view></view><view class="data-v-1963f699" style="display:flex;justify-content:center;margin-top:80rpx"><view class="affirm_btn data-v-1963f699" bindtap="{{n}}">确认订单</view></view></view>

View File

@@ -0,0 +1 @@
.affirm_btn.data-v-1963f699{width:650rpx;height:78rpx;background:#4874e5;border-radius:12rpx;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:24rpx;color:#fff}

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../common/vendor.js"),a=require("../../hooks/useNav.js"),r=require("../../api/api.js");if(!Array){e.resolveComponent("up-swiper")()}Math;const s={__name:"shop",setup(s){let t=e.ref({});const{nav:o,navTo:n}=a.useNav(),i=e.ref(!1);return e.index.getSystemInfoSync().statusBarHeight,e.ref(["/static/图层 979.png"]),e.onLoad((async e=>{let a=await r.shopInfo({id:e.id});t.value=a})),e.onPageScroll((a=>{a.scrollTop>e.index.getSystemInfoSync().statusBarHeight+44?i.value=!0:i.value=!1})),(a,r)=>({a:e.p({list:JSON.parse(e.unref(t).picture),height:"759rpx"}),b:e.t(e.unref(t).salePrice),c:e.t(e.unref(t).goodsName),d:e.f(JSON.parse(e.unref(t).details),((e,a,r)=>({a:e,b:a}))),e:e.o((a=>e.unref(n)(`/pages/shop/affirm?id=${e.unref(t).id}`,!0)))})}},t=e._export_sfc(s,[["__scopeId","data-v-8a9d9142"]]);s.__runtimeHooks=1,wx.createPage(t);

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "商品详情",
"usingComponents": {
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper"
}
}

View File

@@ -0,0 +1 @@
<view class="shop data-v-8a9d9142"><up-swiper wx:if="{{a}}" class="data-v-8a9d9142" u-i="8a9d9142-0" bind:__l="__l" u-p="{{a}}"></up-swiper><view class="p30 data-v-8a9d9142"><view class="shop_info data-v-8a9d9142"><view class="shop_info_mon data-v-8a9d9142">¥ {{b}}</view><view class="shop_info_tit data-v-8a9d9142">{{c}}</view></view></view><view class="data-v-8a9d9142" style="margin:30rpx 0;font-size:30rpx;color:#333;text-align:center">详情介绍</view><image wx:for="{{d}}" wx:for-item="item" wx:key="b" class="data-v-8a9d9142" style="width:100%" mode="widthFix" src="{{item.a}}"></image><view class="data-v-8a9d9142" style="height:150rpx"></view><view class="shop_btn data-v-8a9d9142"><view class="shop_btn_btn data-v-8a9d9142" bindtap="{{e}}">立即下单</view></view></view>

View File

@@ -0,0 +1 @@
page{background:#f7f7f7}.orderdetail_header.data-v-8a9d9142{width:750rpx;transition:all .5s}.shop_btn.data-v-8a9d9142{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-8a9d9142{width:40rpx;height:40rpx;margin-right:30rpx}.shop_btn_btn.data-v-8a9d9142{width:496rpx;padding:15rpx;border-radius:8rpx;border:2rpx solid #002ea4;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:28rpx;color:#002ea4}.shop_info.data-v-8a9d9142{padding:30rpx;background-color:#fff;border-radius:8rpx;margin-top:30rpx}.shop_info_mon.data-v-8a9d9142{font-weight:700;font-size:44rpx;color:#ff1a1a}.shop_info_tit.data-v-8a9d9142{font-weight:700;font-size:34rpx;color:#232323;margin-bottom:15rpx}.shop_info_note.data-v-8a9d9142{display:flex;align-items:center;font-weight:400;font-size:30rpx;color:#666}