From 25347a0061960dc547dfc13cf976d8c38e5b2f22 Mon Sep 17 00:00:00 2001
From: mullins <476823686@qq.com>
Date: Sat, 6 Jun 2020 19:41:01 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages.json | 8 +-
src/pages/details/details.vue | 145 +++++++++++++++++++++++
src/pages/frameDetail/components/BottomSheet.vue | 2 +-
src/pages/frameDetail/frameDetail.vue | 58 +--------
src/store/modules/read.js | 46 +++----
5 files changed, 177 insertions(+), 82 deletions(-)
create mode 100644 src/pages/details/details.vue
diff --git a/src/pages.json b/src/pages.json
index 5b6074c..bde8e4b 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -37,6 +37,12 @@
}
},
{
+ "path": "pages/details/details",
+ "style": {
+ "navigationBarTitleText": "产品详情"
+ }
+ },
+ {
"path": "pages/myOrderPaying/myOrderPaying",
"style": {
"navigationBarTitleText": "我的订单"
@@ -169,7 +175,7 @@
},
{
"name": "产品详情",
- "path": "pages/frameDetail/frameDetail",
+ "path": "pages/details/details",
"query": ""
},
{
diff --git a/src/pages/details/details.vue b/src/pages/details/details.vue
new file mode 100644
index 0000000..fbc9c9c
--- /dev/null
+++ b/src/pages/details/details.vue
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+ ¥{{goodInfo.priceArea.Min_Price || '暂无'}}
+ {{goodInfo.trade_num || '暂无'}}人购买过
+
+
+
+ {{goodInfo.p_name || '暂无'}}
+
+
+
+ 支持7天无理由退货
+ 顺丰发货
+ 30天质量保证
+
+
+
+
+
+
+
+
diff --git a/src/pages/frameDetail/components/BottomSheet.vue b/src/pages/frameDetail/components/BottomSheet.vue
index b214ec9..2a281dd 100644
--- a/src/pages/frameDetail/components/BottomSheet.vue
+++ b/src/pages/frameDetail/components/BottomSheet.vue
@@ -20,7 +20,7 @@
mode="aspectFill"
style="width: 188rpx;height: 168rpx;"
>
-
+ ∂
{{goodInfo.p_name}}
diff --git a/src/pages/frameDetail/frameDetail.vue b/src/pages/frameDetail/frameDetail.vue
index f57749d..a8eae62 100644
--- a/src/pages/frameDetail/frameDetail.vue
+++ b/src/pages/frameDetail/frameDetail.vue
@@ -23,29 +23,13 @@
{{goodInfo.p_name || '暂无'}}
支持7天无理由退货顺丰发货30天质量保证
-
框架材质:{{introduction.material}}
风格:{{introduction.func}}
适用性别:{{introduction.rate}}
-
-
@@ -490,47 +474,7 @@ export default {
fail: (error) => { console.log('跳转参数选择失败======>', error) },
complete: () => { console.log('goPerchase') },
})
- // break
- // case '2':
- // uni.navigateTo({
- // url: '../detailStandard/detailStandard_k',
- // success: res => {},
- // fail: () => {},
- // complete: () => {}
- // })
- // break
- // case '3':
- // uni.navigateTo({
- // url: '../purchaseLenses/purchaseLenses',
- // success: res => {},
- // fail: () => {},
- // complete: () => {}
- // })
- // break
- // case '4':
- // uni.navigateTo({
- // url: '../detailStandard/detailStandard_sun',
- // success: res => {},
- // fail: () => {},
- // complete: () => {}
- // })
- // break
- // default :
- // break
- // }
},
- // 加入购物车
- // addCart () {
- // store.dispatch('cart/addCart', {
- // uid: this.$store.state.user.userInfo.uid,
- // openid: this.$store.state.user.userInfo.openid,
- // pid: this.pid,
- // checkedSKU: {},
- // })
- // store.dispatch('cart/getCartList', {
- // uid: this.$store.state.user.userInfo.uid, // 用户id
- // })
- // },
tabChange (e) {
if (this.current !== e) {
this.current = e
diff --git a/src/store/modules/read.js b/src/store/modules/read.js
index 72d1382..a2a7e85 100644
--- a/src/store/modules/read.js
+++ b/src/store/modules/read.js
@@ -2,57 +2,57 @@ import urlAlias from '../url'
import request from '../request'
const {
- read
+ read,
} = urlAlias
const state = {
- goodInfo: {}
+ goodInfo: {},
}
const mutations = {
INIT: (state, goodInfo) => {
state.goodInfo = goodInfo
- }
+ },
}
const actions = {
fetch({ commit }, param) {
- // 由于购物车和用户推荐的价格要根据sk_id来获取
- const arg=Object.assign({},param)
- delete param.sk_id
+ // 由于购物车和用户推荐的价格要根据sk_id来获取
+ const arg = Object.assign({}, param)
+ delete param.sk_id
return new Promise((resolve, reject) => request({
url: read,
data: param,
success: (res) => {
- console.log('readParm====>',arg)
- console.log('read====>',res.data.data)
- // 用一个新的对象来接收sk_id找的值
- const Res=Object.assign({},res.data.data)
- if(arg.sk_id!=undefined){
- for (let i = 0; i < res.data.data.skuList.length; i++) {
- if(res.data.data.skuList[i].sk_id==arg.sk_id){
- Res.p_sale_price= res.data.data.skuList[i].real_price
- console.log('陈工了')
- }
- }
- }
- console.log(Res)
+ console.log('readParm====>', arg)
+ console.log('read====>', res.data.data)
+ // 用一个新的对象来接收sk_id找的值
+ const Res = Object.assign({}, res.data.data)
+ if (arg.sk_id !== undefined) {
+ for (let i = 0; i < res.data.data.skuList.length; i++) {
+ if (res.data.data.skuList[i].sk_id === arg.sk_id) {
+ Res.p_sale_price = res.data.data.skuList[i].real_price
+ console.log('陈工了')
+ }
+ }
+ }
+ console.log(Res)
commit('INIT', Res)
- resolve()
+ resolve(res)
},
fail: (res) => {
console.log('fail status === > ', res)
},
complete: (res) => {
console.log('complete status === > ', res)
- }
+ },
}))
- }
+ },
}
export default {
namespaced: true,
state,
mutations,
- actions
+ actions,
}
--
2.0.0