Compare commits

..

No commits in common. "da0eb2b6c6c8c4723dda3325efb00827731bea1b" and "3f2a000aae8ac225d6524a41c6ac61f6774e7d1b" have entirely different histories.

24 changed files with 93 additions and 522 deletions

View File

@ -171,13 +171,6 @@
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/login/login",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
"globalStyle": {

View File

@ -136,8 +136,6 @@
<script setup>
import {ref} from 'vue'
import { baseUrl, testUrl , suiUrl} from '@/api/request';
import { onShow } from "@dcloudio/uni-app";
import dec from '@/pages/home/img/dec.png'
import product from '@/pages/home/img/product.png'
import right from '@/pages/home/img/right.png'
@ -146,64 +144,10 @@ import rili from '@/pages/home/img/rili.png'
import xuanchuan from '@/pages/home/img/xuanchuan.png'
import shizi from '@/pages/home/img/shizi.png'
import you from '@/pages/home/img/you.png'
//
const items = ref( [null, null, null])
const items_1 = ref( [null, null, null])
onShow(() => {
uni.removeStorageSync('businessId')
getMyUser()
})
const getMyUser = async () =>{
const res = await uni.request({
url: baseUrl + '/user/get/login',
method: 'GET',
header: {
// JSESSIONID
'cookie': wx.getStorageSync("cookie")
}
})
// console.log('==>',res.data)
if( res.data.code === 40100 ) {
uni.navigateTo({
url: '/pages/login/login'
})
uni.showToast({
icon: 'loading',
title: "请登录"
})
}
}
// const getMyUser1 = () => {
// // const res = uni.request({
// // url: baseUrl + '/user/get/login',
// // method: 'GET',
// // header: {
// // // JSESSIONID
// // 'cookie': wx.getStorageSync("cookie")
// // }
// // })
// // console.log(res);
// uni.request({
// url: apiImageUrl + 'user/get/login',
// method: 'GET',
// header: {
// // JSESSIONID
// 'cookie': wx.getStorageSync("cookie")
// },
// success: (res : any) => {
// console.log(res, 1256786)
// if (res.data.code === 40100) {
// uni.navigateTo({
// url: "/pages/login/login"
// })
// uni.showToast({
// icon: 'loading',
// title: ""
// })
// }
// }
// })
// }
const jump_product =()=>{
uni.navigateTo({
url:'../../pages/store-home/ProductDetails/ProductDetails'

View File

@ -1,115 +0,0 @@
<template>
<view class="all">
<view>
<view>
<img src="http://110.42.248.235:866/images/system/666/HmCyrnRc-login.png" class="img">
</view>
<view class="text_all">
<view class="text_tishi">
请完成授权以继续使用
</view>
<button @click="login" class="text_btn">微信账号一键登录</button>
<!-- <view class="text_no">
请选择手机号登录?
</view> -->
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { baseUrl, testUrl , suiUrl} from '@/api/request';
const login = () => {
uni.login({
provider: 'weixin', //使
success: function (loginRes) {
if (loginRes.code !== null) {
console.log("获取code:" + loginRes.code)
loginUser(loginRes.code);
} else {
console.log("code为空");
}
}
})
}
//
const loginUser = async ( code ) =>{
const res = await uni.request({
url: baseUrl + '/user/login/wx_open',
method: 'GET',
data: {
code: code
}
})
console.log('loginUser后台返回的==>',res);
uni.removeStorageSync('cookie');
uni.setStorageSync("cookie",res.header['Set-Cookie']); //setStorageSync
if(res.data.code == 1) {
uni.showToast({
title: '登录成功',
duration: 2000 //
})
uni.setStorageSync('userInfo',res.data.data);
uni.switchTab({
url: '/pages/home/home'
})
} else {
uni.showToast({
icon: 'error',
title: "登录失败,请重试"
})
return;
}
}
</script>
<style lang="scss" scoped>
.all {
display: flex;
align-items: center;
justify-content: center;
width: 750rpx;
height: 1206rpx;
.img {
display: flex;
width: 480rpx;
height: 380rpx;
margin:30rpx auto;
}
.text_all {
width: 520rpx;
height: 400rpx;
margin: 40rpx auto 0;
.text_tishi {
font-size: 28rpx;
text-align: center;
margin-bottom: 40rpx;
}
.text_btn {
width: 520rpx;
height: 90rpx;
background-color: yellow;
border-radius: 120rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 90rpx;
margin-bottom: 20rpx;
}
.text_no {
font-size: 28rpx;
text-align: center;
color: #2493F1;
}
}
}
</style>

View File

@ -89,12 +89,6 @@ const radioChange = ( event ) => {
}
.group {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 60rpx;
background-color: #fbc27b;
padding: 11.47rpx 24.38rpx 6.26rpx;
}
@ -119,7 +113,6 @@ const radioChange = ( event ) => {
.list {
margin-top: 30rpx;
margin-bottom: 30rpx;
}
.list-item_1 {
@ -168,10 +161,6 @@ const radioChange = ( event ) => {
}
.section {
position: fixed;
left: 0;
bottom: 0;
right: 0;
margin-top: 202.5rpx;
padding: 18.75rpx 0;
background-color: #fffef8;

View File

@ -145,8 +145,7 @@
<text class="text_25">{{ sumprice }}.</text>
<text class="font_6 text_27">00</text>
</view>
<!-- <view class="flex-col justify-start items-center text-wrapper_6" @click="jump_pay"><text class="font_4 text_26">微信支付</text></view> -->
<view class="flex-col justify-start items-center text-wrapper_6" @click="createOrder"><text class="font_4 text_26">微信支付</text></view>
<view class="flex-col justify-start items-center text-wrapper_6" @click="jump_pay"><text class="font_4 text_26">微信支付</text></view>
</view>
</view>
<uni-popup ref="popup" background-color="#fff" @change="change">
@ -160,7 +159,6 @@
import {onMounted, ref} from 'vue'
import emitter from '../../utils/emitter';
import { onLoad } from "@dcloudio/uni-app";
import { userStore } from '../../../store/userStore'; //使
//
import addressComponentVue from '../component/addressComponent.vue'; //
import add from '@/pages/order/product-waitpay/img/add.png';
@ -174,31 +172,12 @@ import short from '@/pages/order/product-waitpay/img/short.png';
import yiwen from '@/pages/order/product-waitpay/img/yiwen.png';
import you_cheng from '@/pages/order/product-waitpay/img/you_cheng.png';
import you_hei from '@/pages/order/product-waitpay/img/you_hei.png';
import { baseUrl } from '../../../api/request';
//
const num = ref(1)
const price = ref(138)
const youhuijuan_num = ref(1)
const manjian = ref(120)
const manjian1 = ref(50)
const sumprice = ref(88)
//11.4
const popup = ref(null) //
const addressRealInfo = ref({}) //
const productObject = ref({}) //
// const store = userStore() //
const productObject = ref({})
const labelList = ref([]) //
const userInfo = ref({}) //
const totalAmount = ref(0) //
const orderItemList = ref([ //
{
// orderId : 0,
goodSnapshot : { },
priceSnapshot: 0, //
quantity: 0,
itemTotalAmount: 0
}
])
onMounted(() => {
emitter.on('close', () => {
close()
@ -207,7 +186,6 @@ onMounted(() => {
addressRealInfo.value = val
// console.log('addressInfo',val);
})
userInfo.value = wx.getStorageSync('userInfo')
})
onLoad((options)=>{
productObject.value = JSON.parse(options.product)
@ -215,84 +193,51 @@ onLoad((options)=>{
labelList.value = labelList.value.filter((s)=>{ //使filter
return s
})
totalAmount.value = productObject.value.price //11.4
orderItemList.value[0].goodSnapshot = { // 11.4
name : productObject.value.name,
type : productObject.value.type,
price : productObject.value.price,
goodImg : productObject.value.goodImg,
festivalOrder : productObject.value.festivalOrder,
reserveDate: productObject.value.reserveDate
}
orderItemList.value[0].priceSnapshot = productObject.value.price
orderItemList.value[0].quantity = 1 //
//for
orderItemList.value[0].itemTotalAmount = orderItemList.value[0].quantity * orderItemList.value[0].priceSnapshot
// console.log(productObject.value.label);
})
//
const close = () => {
popup.value.close()
}
//
const loadPop =() =>{
popup.value.open('bottom')
}
const jump_pay =()=> {
console.log(123)
uni.navigateTo({
url: '../../../pages/order/paysuccess/paysuccess'
})
}
const createOrder = async () => {
console.log('商品对象==>',productObject.value)
console.log('地址对象==>',addressRealInfo.value);
console.log('用户信息==>',userInfo.value);
console.log('订单明细-->',orderItemList.value);
//
const resOrder = await uni.request({
url: baseUrl + '/order/add',
method: 'POST',
data: {
userId: userInfo.value.id,
userName: userInfo.value.userName,
orderNumber: "null", //null
addressSnapshot: {...addressRealInfo.value}, //
contactsSnapshot: {name:"null",phone:"null"},
couponSnapshot: {name:"null",conditionAmount:"null"}, //
totalAmount: totalAmount.value, //
orderStatus: "待支付" ,//
orderItemList: orderItemList.value
// orderItemList: orderItemList.value.map(item =>({
// goodSnapshot : item.goodSnapshot,
// priceSnapshot : item.priceSnapshot,
// quantity : item.quantity,
// itemTotalAmount: item.itemTotalAmount
// }))
}
})
console.log('后台返回订单响应==>',resOrder);
if(resOrder.data.code === 1) {
uni.navigateTo({
url: '/pages/order/paysuccess/paysuccess'
})
} else {
uni.showToast({
icon: 'error',
title: "购买失败,请求错误"
})
return;
const product_object = ref([
{
product_name : "非遗绒花",
product_type : "材料包",
selected_style : "紫色",
product_num : 1,
product_price : 138,
product_img : product,
rmb_img : rmb_32,
min_img : short,
add_img : add,
tag : ["绒花","体验包","送亲友"]
}
}
])
const num = ref(1)
const price = ref(138)
const youhuijuan_num = ref(1)
const manjian = ref(120)
const manjian1 = ref(50)
const sumprice = ref(88)
</script>
<style lang="scss" scoped>
.popup-content {
height: 392px;
align-items: center;
justify-content: center;
background-color: #fff;
}
.popup-content {
height: 392px;
align-items: center;
justify-content: center;
background-color: #fff;
}
.ml-17 {
margin-left: 31.88rpx;
}

View File

@ -14,7 +14,6 @@
</view>
<!-- 类别列表 -->
<view class="flex-col justify-start section_3 pos_9">
<scroll-view scroll-y class="scrollable-contentType">
<view class="flex-col group">
<view class="flex-col items-center list-item mt-5"
v-for="(item, index) in sort"
@ -27,7 +26,6 @@
<text class="font_4 mt-3">{{ item.name }}</text>
</view>
</view>
</scroll-view>
</view>
<view class="flex-col justify-start section_4 pos_4">
<view class="flex-col items-start section_5">
@ -79,7 +77,7 @@ onMounted( async () => {
//
const Getsort = async ()=>{
const res = await uni.request({
url: baseUrl + '/category/list',
url: testUrl + '/category/list',
method:'POST'
})
if(res.data.code === 1){
@ -101,13 +99,12 @@ const Getsort = async ()=>{
duration: 2000
})
}
console.log('获取商品分类==>',res.data);
}
//
const changeTypes = async (item , index) =>{
currentColor.value = index
const res = await uni.request({
url: baseUrl + '/category/list/type',
url: testUrl + '/category/list/type',
method: 'POST',
data: {
id : item.id
@ -141,9 +138,6 @@ const goToProduct = (item) => {
</script>
<style lang="scss" scoped>
.scrollable-contentType {
height: 65vh;
}
.scrollable-content {
height: 56vh;
/* 100px 是头部和底部的高度之和 */

View File

@ -1,5 +1,3 @@
"use strict";
const baseUrl = "http://localhost:9092/api";
const testUrl = "http://123.249.108.160:8888/api";
exports.baseUrl = baseUrl;
exports.testUrl = testUrl;

View File

@ -27,7 +27,6 @@ if (!Math) {
"./pages/booking/Simple/Simple.js";
"./pages/booking/bookingpay/bookingpay.js";
"./pages/order/productOrderDetail/productOrderDetail.js";
"./pages/login/login.js";
}
const _sfc_main = {};
function _sfc_render(_ctx, _cache) {

View File

@ -23,8 +23,7 @@
"pages/order/paysuccess/paysuccess",
"pages/booking/Simple/Simple",
"pages/booking/bookingpay/bookingpay",
"pages/order/productOrderDetail/productOrderDetail",
"pages/login/login"
"pages/order/productOrderDetail/productOrderDetail"
],
"window": {
"navigationBarTextStyle": "black",

View File

@ -1,5 +1,5 @@
"use strict";
const product$1 = "/assets/product.7900e336.png";
const product$2 = "/assets/product.7900e336.png";
const rili = "/assets/rili.7746043b.png";
const xuanchuan = "/assets/xuanchuan.f0fc207c.png";
const shizi = "/assets/shizi.dd0347ec.png";
@ -34,6 +34,7 @@ const detele = "/assets/delete.377ec392.png";
const update = "/assets/update.5da500fc.png";
const add = "/assets/add.dace8cf5.png";
const dingwei = "/assets/dingwei.a57a6fb6.png";
const product$1 = "/assets/product.72fb10c1.png";
const rmb_32 = "/assets/rmb_32.6ba70d59.png";
const rmb_36px = "/assets/rmb_36px.929d25f5.png";
const rmb_cheng = "/assets/rmb_cheng.03ace464.png";
@ -62,8 +63,9 @@ exports.dingwei = dingwei$1;
exports.dingwei$1 = dingwei;
exports.kefu = kefu;
exports.lianxiren_s = lianxiren_s;
exports.product = product$1;
exports.product$1 = product;
exports.product = product$2;
exports.product$1 = product$1;
exports.product$2 = product;
exports.product_img = product_img;
exports.pull = pull;
exports.qianbao = qianbao;

View File

@ -8332,7 +8332,6 @@ This will fail in production.`);
const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
!isInSSRComponentSetup && injectHook(lifecycle, hook, target);
};
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
function mitt(n2) {
return { all: n2 = n2 || /* @__PURE__ */ new Map(), on: function(t2, e2) {
@ -8363,7 +8362,6 @@ exports.n = n;
exports.o = o;
exports.onLoad = onLoad;
exports.onMounted = onMounted;
exports.onShow = onShow;
exports.p = p;
exports.ref = ref;
exports.resolveComponent = resolveComponent;
@ -8371,4 +8369,3 @@ exports.s = s;
exports.sr = sr;
exports.t = t;
exports.unref = unref;
exports.wx$1 = wx$1;

View File

@ -1,35 +1,11 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_request = require("../../api/request.js");
const common_assets = require("../../common/assets.js");
const _sfc_main = {
__name: "home",
setup(__props) {
const items = common_vendor.ref([null, null, null]);
const items_1 = common_vendor.ref([null, null, null]);
common_vendor.onShow(() => {
common_vendor.index.removeStorageSync("businessId");
getMyUser();
});
const getMyUser = async () => {
const res = await common_vendor.index.request({
url: api_request.baseUrl + "/user/get/login",
method: "GET",
header: {
// 读取JSESSIONID
"cookie": common_vendor.wx$1.getStorageSync("cookie")
}
});
if (res.data.code === 40100) {
common_vendor.index.navigateTo({
url: "/pages/login/login"
});
common_vendor.index.showToast({
icon: "loading",
title: "请登录"
});
}
};
const jump_product = () => {
common_vendor.index.navigateTo({
url: "../../pages/store-home/ProductDetails/ProductDetails"

View File

@ -1,58 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_request = require("../../api/request.js");
const _sfc_main = {
__name: "login",
setup(__props) {
const login = () => {
common_vendor.index.login({
provider: "weixin",
//使用微信登录
success: function(loginRes) {
if (loginRes.code !== null) {
console.log("获取code:" + loginRes.code);
loginUser(loginRes.code);
} else {
console.log("code为空");
}
}
});
};
const loginUser = async (code) => {
const res = await common_vendor.index.request({
url: api_request.baseUrl + "/user/login/wx_open",
method: "GET",
data: {
code
}
});
console.log("loginUser后台返回的==>", res);
common_vendor.index.removeStorageSync("cookie");
common_vendor.index.setStorageSync("cookie", res.header["Set-Cookie"]);
if (res.data.code == 1) {
common_vendor.index.showToast({
title: "登录成功",
duration: 2e3
//提示两秒
});
common_vendor.index.setStorageSync("userInfo", res.data.data);
common_vendor.index.switchTab({
url: "/pages/home/home"
});
} else {
common_vendor.index.showToast({
icon: "error",
title: "登录失败,请重试"
});
return;
}
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(login)
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e4e4508d"]]);
wx.createPage(MiniProgramPage);

View File

@ -1 +0,0 @@
<view class="all data-v-e4e4508d"><view class="data-v-e4e4508d"><view class="data-v-e4e4508d"><image src="http://110.42.248.235:866/images/system/666/HmCyrnRc-login.png" class="img data-v-e4e4508d"></image></view><view class="text_all data-v-e4e4508d"><view class="text_tishi data-v-e4e4508d"> 请完成授权以继续使用 </view><button bindtap="{{a}}" class="text_btn data-v-e4e4508d">微信账号一键登录</button></view></view></view>

View File

@ -1,41 +0,0 @@
/* 水平间距 */
/* 水平间距 */
.all.data-v-e4e4508d {
display: flex;
align-items: center;
justify-content: center;
width: 750rpx;
height: 1206rpx;
}
.all .img.data-v-e4e4508d {
display: flex;
width: 480rpx;
height: 380rpx;
margin: 30rpx auto;
}
.all .text_all.data-v-e4e4508d {
width: 520rpx;
height: 400rpx;
margin: 40rpx auto 0;
}
.all .text_all .text_tishi.data-v-e4e4508d {
font-size: 28rpx;
text-align: center;
margin-bottom: 40rpx;
}
.all .text_all .text_btn.data-v-e4e4508d {
width: 520rpx;
height: 90rpx;
background-color: yellow;
border-radius: 120rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 90rpx;
margin-bottom: 20rpx;
}
.all .text_all .text_no.data-v-e4e4508d {
font-size: 28rpx;
text-align: center;
color: #2493F1;
}

View File

@ -1 +1 @@
<view class="flex-col page data-v-8172b2ba"><view class="flex-row section data-v-8172b2ba"><image class="self-center image data-v-8172b2ba" src="{{a}}"/><view class="flex-col self-start group data-v-8172b2ba"><text class="self-start text data-v-8172b2ba">默认用户</text><view class="flex-col justify-start items-center self-stretch text-wrapper mt-6 data-v-8172b2ba"><text class="font text_2 data-v-8172b2ba">剩余积分0</text></view></view><view class="flex-col justify-start items-center self-start text-wrapper_2 data-v-8172b2ba"><text class="font text_3 data-v-8172b2ba">优惠卷0 张</text></view></view><view class="flex-col relative group_2 data-v-8172b2ba"><view class="flex-row equal-division data-v-8172b2ba"><view class="flex-col items-center group_3 group_1 data-v-8172b2ba"><image class="image_2 data-v-8172b2ba" src="{{b}}"/><text class="font text_4 data-v-8172b2ba">总订单</text></view><view class="flex-col items-center group_3 group_4 data-v-8172b2ba"><image class="image_2 data-v-8172b2ba" src="{{c}}"/><text class="font text_1 data-v-8172b2ba">待付款</text></view><view class="flex-col items-center group_3 group_5 data-v-8172b2ba"><image class="image_2 data-v-8172b2ba" src="{{d}}"/><text class="font data-v-8172b2ba">待发货</text></view><view class="flex-col items-start group_3 group_6 data-v-8172b2ba"><image class="image_2 data-v-8172b2ba" src="{{e}}"/><text class="font data-v-8172b2ba">待收货</text></view><view class="flex-col items-center group_3 group_7 data-v-8172b2ba"><image class="image_2 data-v-8172b2ba" src="{{f}}"/><text class="font text_9 data-v-8172b2ba">退款/售后</text></view></view><view class="flex-col mt-37 data-v-8172b2ba"><view class="flex-row justify-between items-center section_2 data-v-8172b2ba"><view class="flex-row items-center data-v-8172b2ba"><image class="shrink-0 image_3 data-v-8172b2ba" src="{{g}}"/><text class="font_2 ml-5 data-v-8172b2ba">地址列表</text></view><image class="image_4 image_5 data-v-8172b2ba" src="{{h}}"/></view><view class="list-divider mt-5 data-v-8172b2ba"></view><view class="flex-row justify-between items-center section_4 mt-5 data-v-8172b2ba"><view class="flex-row items-center data-v-8172b2ba"><image class="shrink-0 image_3 data-v-8172b2ba" src="{{i}}"/><text class="font_2 text_5 ml-5 data-v-8172b2ba">联系人列表</text></view><image class="image_6 data-v-8172b2ba" src="{{j}}"/></view><view class="list-divider mt-5 data-v-8172b2ba"></view><view class="flex-row justify-between items-center list-item_2 mt-5 data-v-8172b2ba"><view class="flex-row items-center data-v-8172b2ba"><image class="shrink-0 image_8 data-v-8172b2ba" src="{{k}}"/><text class="font_2 text_6 ml-7 data-v-8172b2ba">设置</text></view><image class="image_4 image_7 data-v-8172b2ba" src="{{l}}"/></view></view></view></view>
<view class="flex-col page data-v-8172b2ba"><view class="flex-row section data-v-8172b2ba"><image class="self-center image data-v-8172b2ba" src="{{a}}"/><view class="flex-col self-start group data-v-8172b2ba"><text class="self-start text data-v-8172b2ba">默认用户</text><view class="flex-col justify-start items-center self-stretch text-wrapper mt-6 data-v-8172b2ba"><text class="font text_2 data-v-8172b2ba">剩余积分0</text></view></view><view class="flex-col justify-start items-center self-start text-wrapper_2 data-v-8172b2ba"><text class="font text_3 data-v-8172b2ba">优惠卷0 张</text></view></view><view class="flex-col relative group_2 data-v-8172b2ba"><view class="flex-row equal-division data-v-8172b2ba"><view class="flex-col items-center group_3 group_1 data-v-8172b2ba" bindtap="{{c}}"><image class="image_2 data-v-8172b2ba" src="{{b}}"/><text class="font text_4 data-v-8172b2ba">总订单</text></view><view class="flex-col items-center group_3 group_4 data-v-8172b2ba"><image class="image_2 data-v-8172b2ba" src="{{d}}"/><text class="font text_1 data-v-8172b2ba">待付款</text></view><view class="flex-col items-center group_3 group_5 data-v-8172b2ba"><image class="image_2 data-v-8172b2ba" src="{{e}}"/><text class="font data-v-8172b2ba">待发货</text></view><view class="flex-col items-start group_3 group_6 data-v-8172b2ba"><image class="image_2 data-v-8172b2ba" src="{{f}}"/><text class="font data-v-8172b2ba">待收货</text></view><view class="flex-col items-center group_3 group_7 data-v-8172b2ba"><image class="image_2 data-v-8172b2ba" src="{{g}}"/><text class="font text_9 data-v-8172b2ba">退款/售后</text></view></view><view class="flex-col mt-37 data-v-8172b2ba"><view class="flex-row justify-between items-center section_2 data-v-8172b2ba"><view class="flex-row items-center data-v-8172b2ba"><image class="shrink-0 image_3 data-v-8172b2ba" src="{{h}}"/><text class="font_2 ml-5 data-v-8172b2ba">地址列表</text></view><image class="image_4 image_5 data-v-8172b2ba" src="{{i}}"/></view><view class="list-divider mt-5 data-v-8172b2ba"></view><view class="flex-row justify-between items-center section_4 mt-5 data-v-8172b2ba"><view class="flex-row items-center data-v-8172b2ba"><image class="shrink-0 image_3 data-v-8172b2ba" src="{{j}}"/><text class="font_2 text_5 ml-5 data-v-8172b2ba">联系人列表</text></view><image class="image_6 data-v-8172b2ba" src="{{k}}"/></view><view class="list-divider mt-5 data-v-8172b2ba"></view><view class="flex-row justify-between items-center list-item_2 mt-5 data-v-8172b2ba"><view class="flex-row items-center data-v-8172b2ba"><image class="shrink-0 image_8 data-v-8172b2ba" src="{{l}}"/><text class="font_2 text_6 ml-7 data-v-8172b2ba">设置</text></view><image class="image_4 image_7 data-v-8172b2ba" src="{{m}}"/></view></view></view></view>

View File

@ -414,12 +414,6 @@ text.data-v-c20b9e4d {
height: 100%;
}
.group.data-v-c20b9e4d {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 60rpx;
background-color: #fbc27b;
padding: 11.47rpx 24.38rpx 6.26rpx;
}
.text.data-v-c20b9e4d {
@ -440,7 +434,6 @@ text.data-v-c20b9e4d {
}
.list.data-v-c20b9e4d {
margin-top: 30rpx;
margin-bottom: 30rpx;
}
.list-item_1.data-v-c20b9e4d {
padding: 26.27rpx 16.8rpx 24.98rpx;
@ -480,10 +473,6 @@ text.data-v-c20b9e4d {
width: 601.88rpx;
}
.section.data-v-c20b9e4d {
position: fixed;
left: 0;
bottom: 0;
right: 0;
margin-top: 202.5rpx;
padding: 18.75rpx 0;
background-color: #fffef8;

View File

@ -6,25 +6,25 @@ const _sfc_main = {
setup(__props) {
const products = common_vendor.ref([
{
product_img: common_assets.product$1,
product_img: common_assets.product$2,
product_type: "非遗手工艺体验",
product_name: "玉雕-古法制玉体验",
product_value: 99
},
{
product_img: common_assets.product$1,
product_img: common_assets.product$2,
product_type: "非遗手工艺体验",
product_name: "玉雕-古法制玉体验",
product_value: 99
},
{
product_img: common_assets.product$1,
product_img: common_assets.product$2,
product_type: "非遗手工艺体验",
product_name: "玉雕-古法制玉体验",
product_value: 99
},
{
product_img: common_assets.product$1,
product_img: common_assets.product$2,
product_type: "非遗手工艺体验",
product_name: "玉雕-古法制玉体验",
product_value: 99

View File

@ -1,9 +1,7 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const pages_utils_emitter = require("../../utils/emitter.js");
require("../../../store/userStore.js");
const common_assets = require("../../../common/assets.js");
const api_request = require("../../../api/request.js");
if (!Array) {
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
_easycom_uni_popup2();
@ -16,29 +14,10 @@ const addressComponentVue = () => "../component/addressComponent.js";
const _sfc_main = {
__name: "product-waitpay",
setup(__props) {
const num = common_vendor.ref(1);
common_vendor.ref(138);
const youhuijuan_num = common_vendor.ref(1);
const manjian = common_vendor.ref(120);
const manjian1 = common_vendor.ref(50);
const sumprice = common_vendor.ref(88);
const popup = common_vendor.ref(null);
const addressRealInfo = common_vendor.ref({});
const productObject = common_vendor.ref({});
const labelList = common_vendor.ref([]);
const userInfo = common_vendor.ref({});
const totalAmount = common_vendor.ref(0);
const orderItemList = common_vendor.ref([
//订单中各种商品的详细信息
{
// orderId : 0,
goodSnapshot: {},
priceSnapshot: 0,
//实付金额
quantity: 0,
itemTotalAmount: 0
}
]);
common_vendor.onMounted(() => {
pages_utils_emitter.emitter.on("close", () => {
close();
@ -46,7 +25,6 @@ const _sfc_main = {
pages_utils_emitter.emitter.on("addressInfo", (val) => {
addressRealInfo.value = val;
});
userInfo.value = common_vendor.wx$1.getStorageSync("userInfo");
});
common_vendor.onLoad((options) => {
productObject.value = JSON.parse(options.product);
@ -54,19 +32,6 @@ const _sfc_main = {
labelList.value = labelList.value.filter((s) => {
return s;
});
totalAmount.value = productObject.value.price;
orderItemList.value[0].goodSnapshot = {
//待优化 11.4
name: productObject.value.name,
type: productObject.value.type,
price: productObject.value.price,
goodImg: productObject.value.goodImg,
festivalOrder: productObject.value.festivalOrder,
reserveDate: productObject.value.reserveDate
};
orderItemList.value[0].priceSnapshot = productObject.value.price;
orderItemList.value[0].quantity = 1;
orderItemList.value[0].itemTotalAmount = orderItemList.value[0].quantity * orderItemList.value[0].priceSnapshot;
});
const close = () => {
popup.value.close();
@ -74,50 +39,32 @@ const _sfc_main = {
const loadPop = () => {
popup.value.open("bottom");
};
const createOrder = async () => {
console.log("商品对象==>", productObject.value);
console.log("地址对象==>", addressRealInfo.value);
console.log("用户信息==>", userInfo.value);
console.log("订单明细-->", orderItemList.value);
const resOrder = await common_vendor.index.request({
url: api_request.baseUrl + "/order/add",
method: "POST",
data: {
userId: userInfo.value.id,
userName: userInfo.value.userName,
orderNumber: "null",
//订单编号暂存为null
addressSnapshot: { ...addressRealInfo.value },
//地址信息快照
contactsSnapshot: { name: "null", phone: "null" },
couponSnapshot: { name: "null", conditionAmount: "null" },
//优惠卷信息快照
totalAmount: totalAmount.value,
//总价
orderStatus: "待支付",
//订单状态
orderItemList: orderItemList.value
// orderItemList: orderItemList.value.map(item =>({
// goodSnapshot : item.goodSnapshot,
// priceSnapshot : item.priceSnapshot,
// quantity : item.quantity,
// itemTotalAmount: item.itemTotalAmount
// }))
}
const jump_pay = () => {
console.log(123);
common_vendor.index.navigateTo({
url: "../../../pages/order/paysuccess/paysuccess"
});
console.log("后台返回订单响应==>", resOrder);
if (resOrder.data.code === 1) {
common_vendor.index.navigateTo({
url: "/pages/order/paysuccess/paysuccess"
});
} else {
common_vendor.index.showToast({
icon: "error",
title: "购买失败,请求错误"
});
return;
}
};
common_vendor.ref([
{
product_name: "非遗绒花",
product_type: "材料包",
selected_style: "紫色",
product_num: 1,
product_price: 138,
product_img: common_assets.product$1,
rmb_img: common_assets.rmb_32,
min_img: common_assets.short$1,
add_img: common_assets.add$1,
tag: ["绒花", "体验包", "送亲友"]
}
]);
const num = common_vendor.ref(1);
common_vendor.ref(138);
const youhuijuan_num = common_vendor.ref(1);
const manjian = common_vendor.ref(120);
const manjian1 = common_vendor.ref(50);
const sumprice = common_vendor.ref(88);
return (_ctx, _cache) => {
return {
a: common_vendor.t(addressRealInfo.value.region),
@ -154,7 +101,7 @@ const _sfc_main = {
B: common_vendor.t(productObject.value.price - 50),
C: common_vendor.unref(common_assets.rmb_huang),
D: common_vendor.t(sumprice.value),
E: common_vendor.o(createOrder),
E: common_vendor.o(jump_pay),
F: common_vendor.sr(popup, "eda1e8f0-0", {
"k": "popup"
}),

View File

@ -0,0 +1,18 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
__name: "productOrderDetail",
setup(__props) {
return (_ctx, _cache) => {
return {
a: common_vendor.f(_ctx.items, (item, index, i0) => {
return {
a: index
};
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a18a39cb"]]);
wx.createPage(MiniProgramPage);

View File

@ -15,7 +15,7 @@ const _sfc_main = {
});
const Getsort = async () => {
const res = await common_vendor.index.request({
url: api_request.baseUrl + "/category/list",
url: api_request.testUrl + "/category/list",
method: "POST"
});
if (res.data.code === 1) {
@ -39,12 +39,11 @@ const _sfc_main = {
duration: 2e3
});
}
console.log("获取商品分类==>", res.data);
};
const changeTypes = async (item, index) => {
currentColor.value = index;
const res = await common_vendor.index.request({
url: api_request.baseUrl + "/category/list/type",
url: api_request.testUrl + "/category/list/type",
method: "POST",
data: {
id: item.id

View File

@ -1 +1 @@
<view class="flex-row relative page data-v-7e3c386d"><view class="flex-row items-center section pos_8 data-v-7e3c386d"><text class="text data-v-7e3c386d">商品</text><view class="flex-row items-center section_2 ml-15 data-v-7e3c386d"><image class="image data-v-7e3c386d" src="{{a}}"/><input class="text-wrapper ml-3 data-v-7e3c386d" placeholder="请输入内容"/></view></view><view class="flex-col justify-start items-center image-wrapper pos_1 data-v-7e3c386d"><image class="shrink-0 image_2 data-v-7e3c386d" src="{{''}}"/></view><view class="flex-col justify-start section_3 pos_9 data-v-7e3c386d"><scroll-view scroll-y class="scrollable-contentType data-v-7e3c386d"><view class="flex-col group data-v-7e3c386d"><view wx:for="{{b}}" wx:for-item="item" wx:key="c" class="flex-col items-center list-item mt-5 data-v-7e3c386d" style="{{item.d}}" bindtap="{{item.e}}"><image class="image_3 data-v-7e3c386d" src="{{item.a}}"/><text class="font_4 mt-3 data-v-7e3c386d">{{item.b}}</text></view></view></scroll-view></view><view class="flex-col justify-start section_4 pos_4 data-v-7e3c386d"><view class="flex-col items-start section_5 data-v-7e3c386d"><text class="font_2 data-v-7e3c386d">材料包</text><text class="font_3 text_3 mt-6 data-v-7e3c386d">提供材料自行DIY</text></view></view><view class="flex-col pos_5 data-v-7e3c386d"><scroll-view scroll-y class="scrollable-content data-v-7e3c386d"><view wx:for="{{c}}" wx:for-item="item" wx:key="e" class="flex-row section_9 list-item_2 mt-5 data-v-7e3c386d" bindtap="{{item.f}}"><image class="self-center image_4 data-v-7e3c386d" src="{{item.a}}"/><view style="width:220rpx" class="flex-col items-start self-center group_3 data-v-7e3c386d"><text class="font_2 text_5 data-v-7e3c386d">{{item.b}}</text><text class="font_3 mt-13 data-v-7e3c386d">{{item.c}}</text><text class="font mt-13 data-v-7e3c386d">¥{{item.d}}</text></view><image class="self-start image_5 data-v-7e3c386d" src="{{d}}"/></view></scroll-view></view></view>
<view class="flex-row relative page data-v-7e3c386d"><view class="flex-row items-center section pos_8 data-v-7e3c386d"><text class="text data-v-7e3c386d">商品</text><view class="flex-row items-center section_2 ml-15 data-v-7e3c386d"><image class="image data-v-7e3c386d" src="{{a}}"/><input class="text-wrapper ml-3 data-v-7e3c386d" placeholder="请输入内容"/></view></view><view class="flex-col justify-start items-center image-wrapper pos_1 data-v-7e3c386d"><image class="shrink-0 image_2 data-v-7e3c386d" src="{{''}}"/></view><view class="flex-col justify-start section_3 pos_9 data-v-7e3c386d"><view class="flex-col group data-v-7e3c386d"><view wx:for="{{b}}" wx:for-item="item" wx:key="c" class="flex-col items-center list-item mt-5 data-v-7e3c386d" style="{{item.d}}" bindtap="{{item.e}}"><image class="image_3 data-v-7e3c386d" src="{{item.a}}"/><text class="font_4 mt-3 data-v-7e3c386d">{{item.b}}</text></view></view></view><view class="flex-col justify-start section_4 pos_4 data-v-7e3c386d"><view class="flex-col items-start section_5 data-v-7e3c386d"><text class="font_2 data-v-7e3c386d">材料包</text><text class="font_3 text_3 mt-6 data-v-7e3c386d">提供材料自行DIY</text></view></view><view class="flex-col pos_5 data-v-7e3c386d"><scroll-view scroll-y class="scrollable-content data-v-7e3c386d"><view wx:for="{{c}}" wx:for-item="item" wx:key="e" class="flex-row section_9 list-item_2 mt-5 data-v-7e3c386d" bindtap="{{item.f}}"><image class="self-center image_4 data-v-7e3c386d" src="{{item.a}}"/><view style="width:220rpx" class="flex-col items-start self-center group_3 data-v-7e3c386d"><text class="font_2 text_5 data-v-7e3c386d">{{item.b}}</text><text class="font_3 mt-13 data-v-7e3c386d">{{item.c}}</text><text class="font mt-13 data-v-7e3c386d">¥{{item.d}}</text></view><image class="self-start image_5 data-v-7e3c386d" src="{{d}}"/></view></scroll-view></view></view>

View File

@ -401,9 +401,6 @@ text.data-v-7e3c386d {
.mt-100.data-v-7e3c386d {
margin-top: 187.5rpx;
}
.scrollable-contentType.data-v-7e3c386d {
height: 65vh;
}
.scrollable-content.data-v-7e3c386d {
height: 56vh;
/* 100px 是头部和底部的高度之和 */