diff --git a/jiuyi2/api/shop.js b/jiuyi2/api/shop.js
index 80c4d1a7..15e3744d 100644
--- a/jiuyi2/api/shop.js
+++ b/jiuyi2/api/shop.js
@@ -110,6 +110,18 @@ const shop = {
})
},
+ /**
+ * 商品详情下面的商品推荐
+ * @param {Object} param
+ */
+ getInfoProductRecommendations(param) {
+ return util.request({
+ url: `/shopify/appProductionApi/infoProductRecommendations`,
+ method: 'GET',
+ query: param.query
+ })
+ },
+
/**
* 商品分类列表
* @param {Object} param
@@ -134,6 +146,18 @@ const shop = {
})
},
+ /**
+ * 个人中心下面的商品推荐
+ * @param {Object} param
+ */
+ getMineUserProList(param) {
+ return util.request({
+ url: `/shopify/appProductionApi/personalCenterProductRecommendations`,
+ method: 'GET',
+ query: param.query,
+ })
+ },
+
/**
* 添加商品浏览记录
* @param {Object} param
diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js
index 7bba64c9..36cfa819 100644
--- a/jiuyi2/common/js/config.js
+++ b/jiuyi2/common/js/config.js
@@ -9,7 +9,7 @@ const config = {
host: 'http://91f.xyz:8080',
// #endif
// 是否vivo显示
- showVivo: false,
+ showVivo: true,
// 支付方式配置
payType: {
score: {
diff --git a/jiuyi2/components/index/proDetailAlt.vue b/jiuyi2/components/index/proDetailAlt.vue
index 805c3530..a6ab7c5e 100644
--- a/jiuyi2/components/index/proDetailAlt.vue
+++ b/jiuyi2/components/index/proDetailAlt.vue
@@ -126,6 +126,9 @@
+
+
+
diff --git a/jiuyi2/components/shop/detail/detail.vue b/jiuyi2/components/shop/detail/detail.vue
index f4d34dc3..569fe3ee 100644
--- a/jiuyi2/components/shop/detail/detail.vue
+++ b/jiuyi2/components/shop/detail/detail.vue
@@ -49,23 +49,6 @@
})
// 最近购买订单列表
const recentOrderList = ref([])
- //
- const menuFn = {
- // 店铺
- store() {
- link('/pages/shop/store/index')
- },
- // 客服
- customerService() {
- link('/pages/news/question-answer/index')
- },
- // 收藏
- heibianStar() {
- //
- }
- }
- // 编辑器上下文对象
- const editorCtx = ref(null)
// 已选择的规格下标
const spaceIndex = ref(0)
// 数量
@@ -94,7 +77,6 @@
let result = ''
const richText = props.detail.infoRichText || ''
if (richText) result = decodeURIComponent(escape(atob(richText)))
- console.log('richText', result, decodeURIComponent(escape(atob(richText))))
return result
})
@@ -378,12 +360,9 @@
-
+
-
-
-
\ No newline at end of file
diff --git a/jiuyi2/components/shop/productList/productList.vue b/jiuyi2/components/shop/productList/productList.vue
index c786f718..5d112806 100644
--- a/jiuyi2/components/shop/productList/productList.vue
+++ b/jiuyi2/components/shop/productList/productList.vue
@@ -16,24 +16,23 @@
choicenessTitle: {
type: Boolean,
default: false,
- }
+ },
+ requestFn: {
+ type: Function,
+ default: (ev) => {
+ return api.shop.getProduct(ev)
+ }
+ },
})
- // 参数
+ // 商品列表参数
const listPrototype = reactive({
pageSize: 10,
pageNum: 1,
total: 0,
- // 搜索
- searchValue: '',
- // 商户主键
- merId: '',
- // 品牌主键
- brandId: '',
- // 分类code
- categoryCode: '',
- data: [],
})
+ // 商品列表
+ const list = reactive([])
/**
* 点击列表项
@@ -43,7 +42,8 @@
//
uni.navigateTo({
url: util.setUrl('/pages/shop/commodity/index', {
- productId: item.id
+ productId: item.id,
+ categoryId: item.categoryId,
})
})
}
@@ -64,24 +64,18 @@
// 获取商品
function getList() {
- api.shop.getProduct({
- //
+ console.log('listPrototype', listPrototype)
+ props.requestFn({
data: {
- pageSize: listPrototype.pageSize,
- pageNum: listPrototype.pageNum,
- // 搜索
- searchValue: listPrototype.searchValue,
- // 商户主键
- merId: listPrototype.merId,
- // 品牌主键
- brandId: listPrototype.brandId,
- // 分类code
- categoryCode: listPrototype.categoryCode,
+ ...listPrototype,
+ },
+ query: {
+ ...listPrototype,
},
}).then(rs => {
if (rs.code == 200) {
- if (listPrototype.pageNum == 1) listPrototype.data.length = []
- listPrototype.data.push(...rs.rows)
+ if (listPrototype.pageNum == 1) list.length = []
+ list.push(...rs.rows)
listPrototype.total = rs.total
return
}
@@ -111,8 +105,7 @@
-
+
diff --git a/jiuyi2/pages.json b/jiuyi2/pages.json
index 781ae621..0b6dd18a 100644
--- a/jiuyi2/pages.json
+++ b/jiuyi2/pages.json
@@ -96,7 +96,8 @@
"path": "pages/mine/mine",
"style": {
"navigationBarTitleText": "我的",
- "navigationStyle": "custom"
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": true
}
},
{
diff --git a/jiuyi2/pages/index/durian.vue b/jiuyi2/pages/index/durian.vue
index 4c591c8f..7dc97135 100644
--- a/jiuyi2/pages/index/durian.vue
+++ b/jiuyi2/pages/index/durian.vue
@@ -65,9 +65,7 @@
return result
})
// 我的钱包
- const purse = computed(() => {
- return store.state.purse || {}
- })
+ const purse = computed(() => store.state.purse || {})
// 榴莲果配置
const configData = reactive({
diff --git a/jiuyi2/pages/mine/mine.vue b/jiuyi2/pages/mine/mine.vue
index 0035d409..10d358e9 100644
--- a/jiuyi2/pages/mine/mine.vue
+++ b/jiuyi2/pages/mine/mine.vue
@@ -1,59 +1,79 @@
@@ -211,7 +231,8 @@ function toCustomer() {
-
+
+
@@ -220,55 +241,55 @@ function toCustomer() {
\ No newline at end of file
diff --git a/jiuyi2/pages/mine/setting/bankCard.vue b/jiuyi2/pages/mine/setting/bankCard.vue
index 95e48fa7..c9de9b32 100644
--- a/jiuyi2/pages/mine/setting/bankCard.vue
+++ b/jiuyi2/pages/mine/setting/bankCard.vue
@@ -60,7 +60,8 @@
function getList() {
api.mine.getBankCards({}).then(rs => {
if (rs.code == 200) {
- Object.assign(list, rs.data)
+ list.length = 0
+ list.push(...rs.data)
return
}
util.alert({
diff --git a/jiuyi2/pages/mine/userinfo.vue b/jiuyi2/pages/mine/userinfo.vue
index b442422f..3fcf31cb 100644
--- a/jiuyi2/pages/mine/userinfo.vue
+++ b/jiuyi2/pages/mine/userinfo.vue
@@ -1,144 +1,140 @@
@@ -233,26 +229,26 @@ function IsEmail(str) {
\ No newline at end of file
diff --git a/jiuyi2/pages/shop/commodity/index.vue b/jiuyi2/pages/shop/commodity/index.vue
index 5856a830..ec7c25ee 100644
--- a/jiuyi2/pages/shop/commodity/index.vue
+++ b/jiuyi2/pages/shop/commodity/index.vue
@@ -39,13 +39,16 @@
const id = ref('')
// 产品详情
const detail = reactive({})
+ // 分类id
+ const categoryId = ref('')
// 当前登录的用户信息
- const userinfo = computed(() => {
- return store.state.userinfo
- })
+ const userinfo = computed(() => store.state.userinfo)
onLoad(option => {
+ // 商品id
if (option.productId) id.value = option.productId
+ // 分类id
+ if (option.categoryId) categoryId.value = option.categoryId
// 获取产品详情
getDetail()
// 添加商品浏览记录
@@ -55,7 +58,13 @@
})
onReady(() => {
- //
+ // 分类id
+ if (categoryId.value) {
+ proxy.$refs.productListRef.listPrototype.categoryId = categoryId.value
+ proxy.$refs.productListRef.listPrototype.productId = id.value
+ // 获取推荐列表
+ proxy.$refs.productListRef.getList()
+ }
})
// 销毁监听
@@ -72,7 +81,6 @@
function addListener() {
// 监听商品详情
uni.$on('commodityDetail', (data) => {
- //
if (detail.id == data.id) getDetail()
})
}
@@ -186,9 +194,13 @@
-
+
+
+
+
diff --git a/jiuyi2/pages/shop/shop.vue b/jiuyi2/pages/shop/shop.vue
index a9398092..2385fc20 100644
--- a/jiuyi2/pages/shop/shop.vue
+++ b/jiuyi2/pages/shop/shop.vue
@@ -89,7 +89,7 @@
if (cateIndex.value === index) return
cateIndex.value = index
// 分类
- proxy.$refs.product.listPrototype.categoryCode = cateList[index].categoryCode
+ proxy.$refs.product.listPrototype.categoryId = cateList[index].id
// 重载列表
proxy.$refs.product.refreshList()
}
diff --git a/jiuyi2/pages/shop/store/index.vue b/jiuyi2/pages/shop/store/index.vue
index 93bd251d..12608317 100644
--- a/jiuyi2/pages/shop/store/index.vue
+++ b/jiuyi2/pages/shop/store/index.vue
@@ -1,198 +1,198 @@
@@ -283,19 +283,19 @@ defineExpose({
\ No newline at end of file