diff --git a/main.js b/main.js
index b2b3543..f028e15 100644
--- a/main.js
+++ b/main.js
@@ -1,15 +1,15 @@
// #ifndef VUE3
+import setFonts from './common/setFonts.js'
import Vue from 'vue'
import App from './App'
-Vue.config.productionTip = false
+Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
-
// #endif
// #ifdef VUE3
diff --git a/pages.json b/pages.json
index 48a7a8f..a27d8da 100644
--- a/pages.json
+++ b/pages.json
@@ -4,7 +4,9 @@
"path" : "pages/home/home",
"style" :
{
- "navigationBarTitleText" : ""
+ "navigationBarTitleText" : "首页",
+ "enablePullDownRefresh":true, //开启下拉刷新
+ "navigationBarBackgroundColor": "#ede8e7"
}
},
{
@@ -73,7 +75,7 @@
}
},
{
- "path" : "pages/order/product-unpay/product-unpay",
+ "path" : "pages/order/product-paysuccess/product-paysuccess",
"style" :
{
"navigationBarTitleText" : ""
@@ -197,9 +199,16 @@
"navigationBarTitleText" : ""
}
},
+ {
+ "path" : "pages/store-home/main/testMain",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
+ },
{
"path" : "pages/syy",
- "style" :
+ "style" :
{
"navigationBarTitleText" : ""
}
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 5ef96e8..8b43920 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -1,7 +1,7 @@
-
+
限定手制|非量售卖
匠
承
@@ -11,7 +11,7 @@
写真预约
@@ -21,7 +21,7 @@
手作材包
@@ -31,7 +31,7 @@
推荐商品
@@ -41,7 +41,7 @@
活动咨询
朴物良社,匠心手作
@@ -51,9 +51,9 @@
diff --git a/pages/mine/main/main.vue b/pages/mine/main/main.vue
index 46646c9..63cb483 100644
--- a/pages/mine/main/main.vue
+++ b/pages/mine/main/main.vue
@@ -1,357 +1,353 @@
-
-
-
- 默认用户
-
- 剩余积分:0
-
-
-
- 优惠卷:0 张
-
-
-
-
-
-
- 总订单
-
-
-
- 待付款
-
-
-
- 待发货
-
-
-
- 待收货
-
-
-
- 退款/售后
-
-
-
-
-
-
- 地址列表
-
-
-
-
-
-
-
- 联系人列表
-
-
-
-
-
-
-
- 设置
-
-
-
-
-
+
+
+
+
+ 微信用户
+ 剩余积分:40
+
+
+
+
+
+ 总订单
+
+
+
+ 待发货
+
+
+
+ 待付款
+
+
+
+ 待收货
+
+
+
+ 退款/售后
+
+
+
+
+
+
+
+
+ 地 址 列 表
+
+
+
+
+
+ 联系人列表
+
+
+
+
+
+
+ 我 的 预 约
+
+
+
+
+
+
+
+
+ 我的优惠券
+
+
+
+
+
+
+
+
+ 设
+
+ 置
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/order/product-unpay/product-unpay.vue b/pages/order/product-unpay/product-unpay.vue
deleted file mode 100644
index 9f0ddba..0000000
--- a/pages/order/product-unpay/product-unpay.vue
+++ /dev/null
@@ -1,452 +0,0 @@
-
-
-
-
-
-
-
-
- 等待买家付款
- 请于13分51秒内付款,超时订单将自动关闭
-
-
-
-
-
- 张三 15888610253
- 黑龙江省哈尔滨市呼兰区学院路街道288号哈尔滨华德学院
-
-
-
-
-
-
-
-
-
- 非遗绒花
- 【材料包】
-
- 已选种类:紫色
-
-
-
- 138.
-
-
- 00
-
-
-
- ×1
-
-
- 商品金额
-
-
- 138.00
-
-
-
- 优惠券
-
-
- 50.00
-
-
-
-
-
- 合计:
-
- 88.00
-
-
- 买家留言
-
-
- 希望所使用的材料是可持续来源的,并且制作工艺要精细,以确保每一朵花瓣都能生动地展现出绒花的质感和美感。
-
-
-
-
- 订单编号:
-
- E20241005095840091406189
-
- 复制
-
-
-
-
- 创建时间:
- 2024-10-05 09:58:41
-
-
-
-
-
-
-
- 88.
- 合计:
- 00
-
- 去支付
-
-
-
-
-
-
-
diff --git a/pages/order/product-waitpay/product-waitpay.vue b/pages/order/product-waitpay/product-waitpay.vue
index e923396..4a7879f 100644
--- a/pages/order/product-waitpay/product-waitpay.vue
+++ b/pages/order/product-waitpay/product-waitpay.vue
@@ -166,6 +166,7 @@ import {onMounted, ref, toRaw} from 'vue'
import emitter from '../../../utils/emitter'
import { onLoad , onShow } from "@dcloudio/uni-app";
import { baseUrl } from '../../../api/request';
+import addressComponentVue from '../component/addressComponent.vue'; //导入组件
//一些暂时变量
const num = ref(1)
const price = ref(138)
@@ -246,30 +247,19 @@ const createOrder = async () => {
cookie: wx.getStorageSync('cookie')
},
data: {
- userId: userInfo.id,
orderType: productArr.value[0].goodVO.isGoodType ? 'product' : 'service' ,
userName: userInfo.userName,
- orderNumber: "null",
addressId: addressRealInfo.value.id, //地址信息id
// contactsId: null, //联系人信息id
// couponId: null, //优惠卷id
totalAmount: sumprice.value, //实付价格
- orderStatus: '待支付',
note: note.value,
orderItemMainInfoAddRequestList: toRaw(totalInfo.value)
}
})
- console.log('后台返回订单响应==>',resOrder);
+ console.log('后台返回订单响应==>',resOrder.data.data);
if(resOrder.data.code === 1) {
- uni.navigateTo({
- url: '/pages/mine/OrderDetails/OrderDetails'
- })
- } else {
- uni.showToast({
- icon: 'error',
- title: "购买失败,请求错误"
- })
- return;
+ wxPay(resOrder.data.data)
}
}
//根据商品id和购买数量获取商品信息
@@ -306,7 +296,50 @@ const addNum =(index)=>{
sumprice.value += productArr.value[index].goodVO.price * 1
}
}
-
+const wxPay = async( oid )=> { //传入订单id
+ try {
+ const res = await uni.request({
+ url: baseUrl + '/wechat/payment/create',
+ method: 'POST',
+ header: {
+ 'cookie': wx.getStorageSync("cookie")
+ },
+ data: { id: oid }
+ })
+ const paymentData = res.data.data
+ wx.requestPayment({
+ appid: paymentData.appId,
+ nonceStr: paymentData.nonceStr,
+ package: paymentData.packageVal,
+ paySign: paymentData.paySign,
+ timeStamp: paymentData.timeStamp,
+ signType: paymentData.signType,
+ success(res) {
+ uni.showModal({
+ content: '支付成功',
+ showCancel: false
+ })
+ uni.navigateTo({
+ url: '/pages/order/product-paysuccess/product-paysuccess'
+ })
+ console.log(res);
+ },
+ fail(e) {
+ uni.showModal({
+ content: '支付失败,原因为:' + e.errMsg,
+ showCancel: false
+ })
+ console.log(e.errMsg);
+ }
+ })
+ }catch(error) {
+ console.error('支付请求失败',error);
+ uni.showModal({
+ content: '支付请求失败,请重试。',
+ showCancel: false
+ })
+ }
+}