From 8e5986a8ef808875220e90d329a030e830739d21 Mon Sep 17 00:00:00 2001
From: quantulr <35954003+quantulr@users.noreply.github.com>
Date: Sat, 11 May 2024 17:21:15 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=84=E4=BB=B7,=20WIP?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.js | 12 +-
app.json | 3 +-
icon/star-gray.svg | 1 +
icon/star-solid.svg | 1 +
pages/index/index.wxml | 225 +++++++++++++------------
pages/order_details/order_details.js | 6 +
pages/order_details/order_details.wxml | 1 +
pages/rate/rate.js | 97 +++++++++++
pages/rate/rate.json | 3 +
pages/rate/rate.wxml | 13 ++
pages/rate/rate.wxss | 31 ++++
11 files changed, 274 insertions(+), 119 deletions(-)
create mode 100644 icon/star-gray.svg
create mode 100644 icon/star-solid.svg
create mode 100644 pages/rate/rate.js
create mode 100644 pages/rate/rate.json
create mode 100644 pages/rate/rate.wxml
create mode 100644 pages/rate/rate.wxss
diff --git a/app.js b/app.js
index 6abbb5d..2f31552 100644
--- a/app.js
+++ b/app.js
@@ -67,7 +67,7 @@ App({
})
},
-
+
//登录
login(options) {
console.log(options)
@@ -123,15 +123,15 @@ App({
})
},
//分享的积分
- share(){
+ share() {
wx.request({
url: this.globalData.ip + '/wisdommining/api/user/putIntetralEarnings',
- method: 'PUT',
+ method: 'PUT',
header: {
"content-type": "application/x-www-form-urlencoded",
},
data: {
- userId:this.globalData.userId
+ userId: this.globalData.userId
},
success: res => {
console.log(res)
@@ -146,8 +146,8 @@ App({
bgImg: 'https://sanpinhuicai.com/wisdommining/static/icon/bg/',//背景图片地址
// ip: 'http://106.54.198.47/', //接口地址
- ip: 'https://sanpinhuicai.com/', //接口地址
- // ip: 'http://192.168.0.112:9000/', //接口地址/
+ // ip: 'https://sanpinhuicai.com/', //接口地址
+ ip: 'http://192.168.0.112:9000/', //接口地址/
// ip: 'http://127.0.0.1:9000/', //接口地址/
//appId wx65c9560afc9cbaa7
diff --git a/app.json b/app.json
index 7b01cbc..32e9a14 100644
--- a/app.json
+++ b/app.json
@@ -44,7 +44,8 @@
"pages/my/my_feedback_list/list_details/list_details",
"pages/my/after_sales_next/after_sales_next",
"pages/my/after_jilu/after_jilu",
- "pages/logistics_details/logistics_details"
+ "pages/logistics_details/logistics_details",
+ "pages/rate/rate"
],
"entryPagePath": "pages/index/index",
"window": {
diff --git a/icon/star-gray.svg b/icon/star-gray.svg
new file mode 100644
index 0000000..3623d24
--- /dev/null
+++ b/icon/star-gray.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icon/star-solid.svg b/icon/star-solid.svg
new file mode 100644
index 0000000..196ded6
--- /dev/null
+++ b/icon/star-solid.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 6b20b8e..bb12fc0 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,136 +1,137 @@
-
- 三品慧采
-
-
-
- {{addressName}}
-
-
-
-
-
-
-
- 搜索
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.typeName}}
-
-
-
- 更多
-
-
-
+
+ 三品慧采
+
+
+
+ {{addressName}}
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.typeName}}
+
+
+
+ 更多
+
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
- 促销
- 专区
- 好物优选
-
-
- 更多
-
-
+
+
+
+ 促销
+ 专区
+ 好物优选
+
+
+ 更多
+
+
-
-
+
+
-
-
- ¥{{item.wisdGoodsSpecList[0].specPromotionPrice}}
- ¥{{item.wisdGoodsSpecList[0].originalPrice}}
-
-
+
+
+
+
+ ¥{{item.wisdGoodsSpecList[0].specPromotionPrice}}
+ ¥{{item.wisdGoodsSpecList[0].originalPrice}}
+
+
-
+
-
- 积分专区
- 尊享美好生活
-
- GO
-
-
-
-
-
-
- 节令甄选
- 为您精心挑选
- GO
-
-
-
-
-
-
- 热卖专区
- 所有人都在买
- GO
-
-
-
-
-
+
+ 积分专区
+ 尊享美好生活
+
+ GO
+
+
+
+
+
+
+ 节令甄选
+ 为您精心挑选
+ GO
+
+
+
+
+
+
+ 热卖专区
+ 所有人都在买
+ GO
+
+
+
+
+
-
-
- {{item.typeName}}
- {{item.typeLabel}}
-
-
+
+
+ {{item.typeName}}
+ {{item.typeLabel}}
+
+
-
-
- {{item.goodsName}}
-
-
- ¥{{item.price}}
- ¥{{item.wisdGoodsSpecList[0].originalPrice}}
-
-
- 已出售{{item.goodsSales}}件
-
- 暂无此类商品~
-
-
+
+
+ {{item.goodsName}}
+
+
+ ¥{{item.price}}
+ ¥{{item.wisdGoodsSpecList[0].originalPrice}}
+
+
+ 已出售{{item.goodsSales}}件
+
+ 暂无此类商品~
+
\ No newline at end of file
diff --git a/pages/order_details/order_details.js b/pages/order_details/order_details.js
index 9620a66..b7031cd 100644
--- a/pages/order_details/order_details.js
+++ b/pages/order_details/order_details.js
@@ -277,6 +277,12 @@ Page({
},
+ // 评价订单
+ rate(e){
+ wx.navigateTo({
+ url: '/pages/rate/rate',
+ })
+ },
// 删除订单
del(e) {
let orderId = this.data.goods.id
diff --git a/pages/order_details/order_details.wxml b/pages/order_details/order_details.wxml
index c403821..3c3f67a 100644
--- a/pages/order_details/order_details.wxml
+++ b/pages/order_details/order_details.wxml
@@ -148,6 +148,7 @@
删除订单
物流查询
确认收货
+ 评价
diff --git a/pages/rate/rate.js b/pages/rate/rate.js
new file mode 100644
index 0000000..34e08d6
--- /dev/null
+++ b/pages/rate/rate.js
@@ -0,0 +1,97 @@
+// pages/rate/rate.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ stars: 0,
+ description: ""
+ },
+ setStarNum(e) {
+ const { stars } = e.currentTarget.dataset
+ this.setData({
+ stars
+ })
+ },
+ handleTextInput(e) {
+ this.setData({
+ description: e.detail.value
+ })
+ },
+ submitRate() {
+ const { stars, description } = this.data
+ if (stars === 0) {
+ wx.showToast({
+ title: '请选择评分',
+ icon: "error"
+ })
+ return
+ }
+ if (!description) {
+ wx.showToast({
+ title: '请输入评价内容',
+ icon: "error"
+ })
+ return
+ }
+ wx.showToast({
+ title: 'TODO: WIP',
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/rate/rate.json b/pages/rate/rate.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/rate/rate.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/rate/rate.wxml b/pages/rate/rate.wxml
new file mode 100644
index 0000000..a66575e
--- /dev/null
+++ b/pages/rate/rate.wxml
@@ -0,0 +1,13 @@
+
+
+
+ 商品评价
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/rate/rate.wxss b/pages/rate/rate.wxss
new file mode 100644
index 0000000..81fe837
--- /dev/null
+++ b/pages/rate/rate.wxss
@@ -0,0 +1,31 @@
+/* pages/rate/rate.wxss */
+
+.star-rate {
+ display: flex;
+ align-items: center;
+}
+
+.star-rate .stars {
+ display: flex;
+ margin-left: 16rpx;
+}
+
+.star-rate .title {
+ font-size: 36rpx;
+}
+
+.star-rate .stars .star {
+ width: 48rpx;
+ height: 48rpx;
+}
+
+.star-rate .stars .star:not(:first-of-type) {
+ margin-left: 12rpx;
+}
+
+.rate-description {
+ margin-top: 48rpx;
+ border: 1px solid rgb(209 213 219);
+ border-radius: 12rpx;
+ padding: 16rpx
+}
\ No newline at end of file