From 3a33d65d6b31e63ef61a7c21b5eee17c03c6be04 Mon Sep 17 00:00:00 2001 From: Boom <654612@qq.com> Date: Fri, 24 Nov 2023 18:58:56 +0800 Subject: [PATCH] =?UTF-8?q?:+1:=20=E5=A2=9E=E5=8A=A0=E5=9C=B0=E5=9B=BE=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8B=BC=E5=A4=9A=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/fish.js | 13 + api/store.js | 28 +- components/Footer.vue | 6 + components/PromotionGood.vue | 422 +++++++++--------- components/Recommend.vue | 21 +- manifest.json | 2 +- pages.json | 11 + pages/Loading/index.vue | 9 +- pages/goods/goodDetail.vue | 389 ++++++++++++++++ pages/goods/goodList.vue | 173 +++++++ pages/goods/good_com/good.vue | 159 +++++++ pages/goods/good_com/search_bar.vue | 207 +++++++++ pages/goods/good_com/tabs.vue | 79 ++++ pages/goods/index.vue | 368 +++++++++++++++ pages/goods/utils/share.js | 67 +++ pages/goods/utils/uni-share/changelog.md | 18 + .../utils/uni-share/js_sdk/uni-image-menu.js | 204 +++++++++ .../goods/utils/uni-share/js_sdk/uni-share.js | 98 ++++ pages/goods/utils/uni-share/package.json | 80 ++++ pages/goods/utils/uni-share/readme.md | 95 ++++ pages/goods/utils/util.js | 20 + pages/home/components/HotCommodity.vue | 26 +- pages/map/index.vue | 131 +++--- static/business_fish.png | Bin 0 -> 1539 bytes static/point.png | Bin 0 -> 1580 bytes static/public_fish.png | Bin 0 -> 1604 bytes 26 files changed, 2350 insertions(+), 276 deletions(-) create mode 100644 api/fish.js create mode 100644 pages/goods/goodDetail.vue create mode 100644 pages/goods/goodList.vue create mode 100644 pages/goods/good_com/good.vue create mode 100644 pages/goods/good_com/search_bar.vue create mode 100644 pages/goods/good_com/tabs.vue create mode 100644 pages/goods/index.vue create mode 100644 pages/goods/utils/share.js create mode 100644 pages/goods/utils/uni-share/changelog.md create mode 100644 pages/goods/utils/uni-share/js_sdk/uni-image-menu.js create mode 100644 pages/goods/utils/uni-share/js_sdk/uni-share.js create mode 100644 pages/goods/utils/uni-share/package.json create mode 100644 pages/goods/utils/uni-share/readme.md create mode 100644 pages/goods/utils/util.js create mode 100644 static/business_fish.png create mode 100644 static/point.png create mode 100644 static/public_fish.png diff --git a/api/fish.js b/api/fish.js new file mode 100644 index 0000000..e644a5d --- /dev/null +++ b/api/fish.js @@ -0,0 +1,13 @@ +import request from "@/utils/request"; + +export function getFishIndex(param) { + return request.post("/fish/index", param, { + login: false + }); +} + +export function getFishPlaceInfo(id) { + return request.get("/fish/info?id="+id,null,{ + login: false + }) +} \ No newline at end of file diff --git a/api/store.js b/api/store.js index d175644..02f1228 100644 --- a/api/store.js +++ b/api/store.js @@ -18,6 +18,22 @@ export function getProductDetail(id, data) { }); } +export function pddLink(goodSign) { + return request.get("/product/pddLink", { + "goodSign": goodSign + }, { + login: true + }); +} + +export function pddDetail(goodSign) { + return request.get("product/pddDetail", { + "goodSign": goodSign + }, { + login: true + }); +} + /* * 商品分销二维码 * */ @@ -64,11 +80,11 @@ export function toCollect(id, category) { export function getHostProducts(page, limit) { return request.get( "/product/hot", { - page: page, - limit: limit - }, { - login: false - } + page: page, + limit: limit + }, { + login: false + } ); } @@ -180,4 +196,4 @@ export function storeListApi(data) { return request.get("store_list", data, { login: false }); -} +} \ No newline at end of file diff --git a/components/Footer.vue b/components/Footer.vue index dc0d9c3..14a3a1b 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -25,6 +25,12 @@ export default { data: function() { return { footerList: [ + { + name: "地图", + icon1: "icon-shouye-xianxing", + icon2: "icon-shouye", + url: "/pages/map/index" + }, { name: "首页", icon1: "icon-shouye-xianxing", diff --git a/components/PromotionGood.vue b/components/PromotionGood.vue index c909b3a..8866950 100644 --- a/components/PromotionGood.vue +++ b/components/PromotionGood.vue @@ -1,212 +1,224 @@ + .sh-title-card { + width: 750rpx; + } + + .title-box { + width: 710rpx; + height: 88rpx; + margin: 0 auto; + position: relative; + border-radius: 30rpx; + + .title-bg { + width: 100%; + height: 100%; + } + + .title-text { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-weight: bold; + } + } + + .goods-box { + width: 345rpx; + background: #fff; + padding-bottom: 20rpx; + border-radius: 20rpx; + overflow: hidden; + + .img-box { + width: 345rpx; + height: 345rpx; + overflow: hidden; + position: relative; + + .tag-img { + position: absolute; + left: 0; + top: 0; + z-index: 2; + width: 80rpx; + height: 40rpx; + } + + .img { + width: 345rpx; + height: 345rpx; + background-color: #ccc; + } + } + + .tip { + width: 346rpx; + line-height: 56rpx; + background: rgba(246, 242, 234, 1); + font-size: 22rpx; + font-family: PingFang SC; + font-weight: 400; + color: rgba(168, 112, 13, 1); + padding: 0 20rpx; + } + + .title { + font-size: 24rpx; + font-family: PingFang SC; + font-weight: 500; + line-height: 36rpx; + height: 72rpx; + margin: 20rpx 20rpx 10rpx; + } + + .price-box { + padding: 10rpx 20rpx 0; + width: 344rpx; + box-sizing: border-box; + + .sales { + font-size: 20rpx; + font-family: PingFang SC; + font-weight: 400; + color: rgba(153, 153, 153, 1); + line-height: 20rpx; + margin-bottom: 20rpx; + } + + .current { + font-size: 30rpx; + font-weight: 500; + color: rgba(225, 33, 43, 1); + line-height: 30rpx; + margin-bottom: 20rpx; + + &:before { + content: '¥'; + font-size: 26rpx; + } + } + + .original { + font-size: 22rpx; + font-weight: 400; + text-decoration: line-through; + color: rgba(153, 153, 153, 1); + margin-left: 14rpx; + line-height: 22rpx; + margin-bottom: 10rpx; + + &:before { + content: '¥'; + font-size: 20rpx; + } + } + + .tag-box { + .discount { + line-height: 28rpx; + border: 1rpx solid rgba(225, 33, 43, 1); + border-radius: 8rpx; + font-size: 18rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(225, 33, 43, 1); + padding: 0 8rpx; + margin-right: 10rpx; + } + } + } + } + + // 为你推荐 + .hot-goods { + // background: linear-gradient(#fff 200rpx, #f6f6f6 500rpx, #f6f6f6); + // border-radius: 20rpx; + + .goods-list { + flex-wrap: wrap; + width: 710rpx; + + .goods-item { + margin-right: 20rpx; + margin-bottom: 20rpx; + width: 345rpx; + box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22); + border-radius: 20rpx; + + &:nth-child(2n) { + margin-right: 0; + } + } + } + } + \ No newline at end of file diff --git a/components/Recommend.vue b/components/Recommend.vue index cbcf2e7..6c52c0c 100644 --- a/components/Recommend.vue +++ b/components/Recommend.vue @@ -56,12 +56,21 @@ }, methods: { routerGo(item) { - this.$yrouter.push({ - path: '/pages/shop/GoodsCon/index', - query: { - id: item.id - } - }); + if (item.goodSign) { + this.$yrouter.push({ + path: '/pages/goods/goodDetail', + query: { + goodSign: item.goodSign + }, + }) + } else { + this.$yrouter.push({ + path: '/pages/shop/GoodsCon/index', + query: { + id: item.id + }, + }) + } }, hostProducts: function () { let that = this; diff --git a/manifest.json b/manifest.json index 8d67681..e848873 100644 --- a/manifest.json +++ b/manifest.json @@ -253,7 +253,7 @@ "desc" : "定位最近的门店" } }, - // "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ], + "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ], "plugins" : {} }, // #ifdef MP-WEIXIN diff --git a/pages.json b/pages.json index c6fa7ce..81daf44 100644 --- a/pages.json +++ b/pages.json @@ -141,6 +141,11 @@ "navigationBarTitleText": "商品详情" } }, + + { + "path": "pages/goods/goodDetail" + }, + { "path": "pages/shop/IntegralGoodsCon/index", "style": { @@ -467,6 +472,12 @@ "iconWidth": "24px", "spacing": "3px", "list": [{ + "pagePath": "pages/map/index", + "iconPath": "static/icon-home.png", + "selectedIconPath": "static/icon-home-hot.png", + "text": "地图" + }, + { "pagePath": "pages/home/index", "iconPath": "static/icon-home.png", "selectedIconPath": "static/icon-home-hot.png", diff --git a/pages/Loading/index.vue b/pages/Loading/index.vue index 21cf232..2ac4936 100644 --- a/pages/Loading/index.vue +++ b/pages/Loading/index.vue @@ -43,7 +43,8 @@ export default { } if (this.$deviceType == 'app' || this.$deviceType == 'weixinh5') { this.$yrouter.switchTab({ - path: '/pages/home/index', + // path: '/pages/home/index', + path: '/pages/map/index', }) return } @@ -57,7 +58,8 @@ export default { login().finally(() => { this.changeAuthorization(false) this.$yrouter.switchTab({ - path: '/pages/home/index', + // path: '/pages/home/index', + path: '/pages/map/index', }) }) }, @@ -79,7 +81,8 @@ export default { }) } else { this.$yrouter.switchTab({ - path: '/pages/home/index', + // path: '/pages/home/index', + path: '/pages/map/index', }) } }, diff --git a/pages/goods/goodDetail.vue b/pages/goods/goodDetail.vue new file mode 100644 index 0000000..f8dc900 --- /dev/null +++ b/pages/goods/goodDetail.vue @@ -0,0 +1,389 @@ + + + + + \ No newline at end of file diff --git a/pages/goods/goodList.vue b/pages/goods/goodList.vue new file mode 100644 index 0000000..eeaee2f --- /dev/null +++ b/pages/goods/goodList.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages/goods/good_com/good.vue b/pages/goods/good_com/good.vue new file mode 100644 index 0000000..a2d411a --- /dev/null +++ b/pages/goods/good_com/good.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/pages/goods/good_com/search_bar.vue b/pages/goods/good_com/search_bar.vue new file mode 100644 index 0000000..e1bf3dd --- /dev/null +++ b/pages/goods/good_com/search_bar.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/pages/goods/good_com/tabs.vue b/pages/goods/good_com/tabs.vue new file mode 100644 index 0000000..978606e --- /dev/null +++ b/pages/goods/good_com/tabs.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/pages/goods/index.vue b/pages/goods/index.vue new file mode 100644 index 0000000..1ac1771 --- /dev/null +++ b/pages/goods/index.vue @@ -0,0 +1,368 @@ + + + + diff --git a/pages/goods/utils/share.js b/pages/goods/utils/share.js new file mode 100644 index 0000000..e2e59b2 --- /dev/null +++ b/pages/goods/utils/share.js @@ -0,0 +1,67 @@ +import UniShare from './uni-share/js_sdk/uni-share.js' + +const uniShare = new UniShare() + +const fenxiang = async (title, url, descript, imgUrl, type = 0) => { + //#ifdef APP + + uniShare.show({ + content: { //公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图) + type: type, + href: url, + title: title, + summary: descript, + imageUrl: imgUrl + + '?x-oss-process=image/resize,m_fill,h_100,w_100' //压缩图片解决,在ios端分享图过大导致的图片失效问题 + }, + menus: [{ + "img": "static/ddk/app-plus/sharemenu/wechatfriend.png", + "text": "微信朋友", + "share": { + "provider": "weixin", + "scene": "WXSceneSession" + } + }, + { + "img": "static/ddk/app-plus/sharemenu/wechatmoments.png", + "text": "微信朋友圈", + "share": { + "provider": "weixin", + "scene": "WXSceneTimeline" + } + }, + { + "img": "static/ddk/app-plus/sharemenu/weibo.png", + "text": "微博", + "share": { + "provider": "sinaweibo" + } + }, + { + "img": "static/ddk/app-plus/sharemenu/qq.png", + "text": "QQ", + "share": { + "provider": "qq" + } + }, + { + "img": "static/ddk/app-plus/sharemenu/copyurl.png", + "text": "复制", + "share": "copyurl" + }, { + "img": "static/ddk/app-plus/sharemenu/more.png", + "text": "系统分享", + "share": "shareSystem" + } + + ], + cancelText: "取消", + }, e => { //callback + console.log(e); + }) + //#endif +} + +export { + fenxiang +} diff --git a/pages/goods/utils/uni-share/changelog.md b/pages/goods/utils/uni-share/changelog.md new file mode 100644 index 0000000..c858c67 --- /dev/null +++ b/pages/goods/utils/uni-share/changelog.md @@ -0,0 +1,18 @@ +## 2.0.2(2021-12-16) +修复在某些情况下报:`Cannot read property 'hide' of undefined`的问题 +## 2.0.1(2021-11-29) +修改错误的scene值WXSenceTimeline(分享到朋友圈)更正为WXSceneTimeline +## 2.0.0(2021-10-14) +支持监听返回操作(如:物理返回,全面屏手机侧滑)关闭分享弹窗 +## 1.0.6(2021-08-25) +兼容vue3 +## 1.0.5(2021-08-05) +优化代码实现,修改原来用`eval()`函数实现的逻辑 +## 1.0.4(2021-06-07) +为符合苹果应用市场的审核,只显示存在对应的分享客户端的选项。如:配置包含微信分享,但是用户手机上并没有安装微信,就不显示微信分享。 +## 1.0.2(2021-05-06) +修复错误的提示:“打包时未添加oauth模块” +## 1.0.1(2021-04-30) +新增完整示例 +## 1.0.0(2021-04-28) +第1版发布 diff --git a/pages/goods/utils/uni-share/js_sdk/uni-image-menu.js b/pages/goods/utils/uni-share/js_sdk/uni-image-menu.js new file mode 100644 index 0000000..c03e51b --- /dev/null +++ b/pages/goods/utils/uni-share/js_sdk/uni-image-menu.js @@ -0,0 +1,204 @@ +var nvMask, nvImageMenu; +class NvImageMenu { + constructor(arg) { + this.isShow = false + } + show({ + list, + cancelText + }, callback) { + if (!list) { + list = [{ + "img": "/static/sharemenu/wechatfriend.png", + "text": "图标文字" + }] + } + //以下为计算菜单的nview绘制布局,为固定算法,使用者无关关心 + var screenWidth = plus.screen.resolutionWidth + //以360px宽度屏幕为例,上下左右边距及2排按钮边距留25像素,图标宽度55像素,同行图标间的间距在360宽的屏幕是30px,但需要动态计算,以此原则计算4列图标分别的left位置 + //图标下的按钮文字距离图标5像素,文字大小12像素 + //底部取消按钮高度固定为44px + //TODO 未处理横屏和pad,这些情况6个图标应该一排即可 + var margin = 20, + iconWidth = 60, + icontextSpace = 5, + textHeight = 12 + var left1 = margin / 360 * screenWidth + var iconSpace = (screenWidth - (left1 * 2) - (iconWidth * 4)) / 3 //屏幕宽度减去左右留白间距,再减去4个图标的宽度,就是3个同行图标的间距 + if (iconSpace <= 5) { //屏幕过窄时,缩小边距和图标大小,再算一次 + margin = 15 + iconWidth = 40 + left1 = margin / 360 * screenWidth + iconSpace = (screenWidth - (left1 * 2) - (iconWidth * 4)) / 3 //屏幕宽度减去左右留白间距,再减去4个图标的宽度,就是3个同行图标的间距 + } + var left2 = left1 + iconWidth + iconSpace + var left3 = left1 + (iconWidth + iconSpace) * 2 + var left4 = left1 + (iconWidth + iconSpace) * 3 + var top1 = left1 + var top2 = top1 + iconWidth + icontextSpace + textHeight + left1 + + const TOP = { + top1, + top2 + }, + LEFT = { + left1, + left2, + left3, + left4 + }; + + nvMask = new plus.nativeObj.View("nvMask", { //先创建遮罩层 + top: '0px', + left: '0px', + height: '100%', + width: '100%', + backgroundColor: 'rgba(0,0,0,0.2)' + }); + nvImageMenu = new plus.nativeObj.View("nvImageMenu", { //创建底部图标菜单 + bottom: '0px', + left: '0px', + height: (iconWidth + textHeight + 2 * margin) * Math.ceil(list.length / 4) + 44 + + 'px', //'264px', + width: '100%', + backgroundColor: 'rgb(255,255,255)' + }); + nvMask.addEventListener("click", () => { //处理遮罩层点击 + // console.log('处理遮罩层点击'); + this.hide() + callback({ + event: "clickMask" + }) + }) + let myList = [] + list.forEach((item, i) => { + myList.push({ + tag: 'img', + src: item.img, + position: { + top: TOP['top' + (parseInt(i / 4) + 1)], + left: LEFT['left' + (1 + i % 4)], + width: iconWidth, + height: iconWidth + } + }) + myList.push({ + tag: 'font', + text: item.text, + textStyles: { + size: textHeight + }, + position: { + top: TOP['top' + (parseInt(i / 4) + 1)] + iconWidth + icontextSpace, + left: LEFT['left' + (1 + i % 4)], + width: iconWidth, + height: textHeight + } + }) + }) + + //绘制底部图标菜单的内容 + nvImageMenu.draw([{ + tag: 'rect', //菜单顶部的分割灰线 + color: '#e7e7e7', + position: { + top: '0px', + height: '1px' + } + }, + { + tag: 'font', + text: cancelText, //底部取消按钮的文字 + textStyles: { + size: '14px' + }, + position: { + bottom: '0px', + height: '44px' + } + }, + { + tag: 'rect', //底部取消按钮的顶部边线 + color: '#e7e7e7', + position: { + bottom: '45px', + height: '1px' + } + }, + ...myList + ]) + nvMask.show() + nvImageMenu.show() + // 开始动画 + /* + plus.nativeObj.View.startAnimation({ + type: 'slide-in-bottom', + duration: 300 + }, nvImageMenu, {}, function() { + console.log('plus.nativeObj.View.startAnimation动画结束'); + // 关闭原生动画 + plus.nativeObj.View.clearAnimation(); + nvImageMenu.show() + }); + */ + + + this.isShow = true + nvImageMenu.addEventListener("click", e => { //处理底部图标菜单的点击事件,根据点击位置触发不同的逻辑 + // console.log("click menu"+JSON.stringify(e)); + if (e.screenY > plus.screen.resolutionHeight - 44) { //点击了底部取消按钮 + // callback({event:"clickCancelButton"}) + this.hide() + } else if (e.clientX < 5 || e.clientX > screenWidth - 5 || e.clientY < 5) { + //屏幕左右边缘5像素及菜单顶部5像素不处理点击 + } else { //点击了图标按钮 + var iClickIndex = -1 //点击的图标按钮序号,第一个图标按钮的index为0 + var iRow = e.clientY < (top2 - (left1 / 2)) ? 0 : 1 + var iCol = -1 + if (e.clientX < (left2 - (iconSpace / 2))) { + iCol = 0 + } else if (e.clientX < (left3 - (iconSpace / 2))) { + iCol = 1 + } else if (e.clientX < (left4 - (iconSpace / 2))) { + iCol = 2 + } else { + iCol = 3 + } + if (iRow == 0) { + iClickIndex = iCol + } else { + iClickIndex = iCol + 4 + } + // console.log("点击按钮的序号: " + iClickIndex); + // if (iClickIndex >= 0 && iClickIndex <= 5) { //处理具体的点击逻辑,此处也可以自行定义逻辑。如果增减了按钮,此处也需要跟着修改 + // } + callback({ + event: "clickMenu", + index: iClickIndex + }) + } + }) + /* nvImageMenu.addEventListener("touchstart", function(e) { + if (e.screenY > (plus.screen.resolutionHeight - 44)) { + //TODO 这里可以处理按下背景变灰的效果 + } + }) + nvImageMenu.addEventListener("touchmove", function(e) { + //TODO 这里可以处理按下背景变灰的效果 + if (e.screenY > plus.screen.resolutionHeight - 44) {} + }) + nvImageMenu.addEventListener("touchend", function(e) { + //TODO 这里可以处理释放背景恢复的效果 + }) + */ + } + + hide() { + if (this.isShow) { + nvMask.hide() + nvImageMenu.hide() + this.isShow = false + } + } +} +export default NvImageMenu \ No newline at end of file diff --git a/pages/goods/utils/uni-share/js_sdk/uni-share.js b/pages/goods/utils/uni-share/js_sdk/uni-share.js new file mode 100644 index 0000000..9a6de75 --- /dev/null +++ b/pages/goods/utils/uni-share/js_sdk/uni-share.js @@ -0,0 +1,98 @@ +import UniImageMenu from './uni-image-menu.js'; +class UniShare extends UniImageMenu{ + constructor(arg) { + super() + this.isShow = super.isShow + } + async show(param, callback){ + var menus = [] + plus.share.getServices(services => { //只显示有服务的项目 + services = services.filter(item => item.nativeClient) + let servicesList = services.map(e => e.id) + param.menus.forEach(item => { + if (servicesList.includes(item.share.provider) || typeof(item.share) == 'string') { + menus.push(item) + } + }) + super.show({ + list: menus, + cancelText: param.cancelText + }, e => { + callback(e) + if(e.event == 'clickMenu'){ + if (typeof(menus[e.index]['share']) == 'string') { + this[menus[e.index]['share']](param) + } else { + uni.share({ + ...param.content, + ...menus[e.index].share, + success: res=> { + console.log("success:" + JSON.stringify(res)); + super.hide() + }, + fail: function(err) { + console.log("fail:" + JSON.stringify(err)); + // uni.showModal({ + // content: JSON.stringify(err), + // showCancel: false, + // confirmText: "知道了" + // }); + } + }) + } + } + }) + }, err => { + uni.showModal({ + title: '获取服务供应商失败:' + JSON.stringify(err), + showCancel: false, + confirmText: '知道了' + }); + console.error('获取服务供应商失败:' + JSON.stringify(err)); + }) + } + hide(){ + super.hide() + } + copyurl(param) { + console.log('copyurl',param); + uni.setClipboardData({ + data: param.content.href, + success: ()=>{ + console.log('success'); + uni.hideToast() //关闭自带的toast + uni.showToast({ + title: '复制成功', + icon: 'none' + }); + super.hide(); + }, + fail: (err) => { + uni.showModal({ + content: JSON.stringify(err), + showCancel: false + }); + } + }); + } + // 使用系统分享发送分享消息 + shareSystem(param) { + console.log('shareSystem',param); + plus.share.sendWithSystem({ + type: 'text', + content: param.content.title + param.content.summary || '', + href: param.content.href, + }, (e)=> { + console.log('分享成功'); + super.hide() + }, (err)=> { + console.log('分享失败:' + JSON.stringify(err)); + uni.showModal({ + title: '获取服务供应商失败:' + JSON.stringify(err), + showCancel: false, + confirmText: '知道了' + }); + }); + } +} +export default UniShare \ No newline at end of file diff --git a/pages/goods/utils/uni-share/package.json b/pages/goods/utils/uni-share/package.json new file mode 100644 index 0000000..fa43a0e --- /dev/null +++ b/pages/goods/utils/uni-share/package.json @@ -0,0 +1,80 @@ +{ + "id": "uni-share", + "displayName": "uni-share", + "version": "2.0.2", + "description": "底部弹出宫格图标式的分享菜单,可覆盖原生组件。", + "keywords": [ + "分享菜单" +], + "repository": "", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "JS SDK", + "通用 SDK" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "n", + "Android Browser": "n", + "微信浏览器(Android)": "n", + "QQ浏览器(Android)": "n" + }, + "H5-pc": { + "Chrome": "n", + "IE": "n", + "Edge": "n", + "Firefox": "n", + "Safari": "n" + }, + "小程序": { + "微信": "n", + "阿里": "n", + "百度": "n", + "字节跳动": "n", + "QQ": "n" + }, + "快应用": { + "华为": "n", + "联盟": "n" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/pages/goods/utils/uni-share/readme.md b/pages/goods/utils/uni-share/readme.md new file mode 100644 index 0000000..dced6d6 --- /dev/null +++ b/pages/goods/utils/uni-share/readme.md @@ -0,0 +1,95 @@ +#### 本功能基于[底部图标菜单](https://ext.dcloud.net.cn/plugin?id=4858)封装而成。 +### 示例代码 +``` + + + +``` \ No newline at end of file diff --git a/pages/goods/utils/util.js b/pages/goods/utils/util.js new file mode 100644 index 0000000..13fa4f7 --- /dev/null +++ b/pages/goods/utils/util.js @@ -0,0 +1,20 @@ +// const pddApi = uniCloud.importObject('pdd-serve') +// // 查询是否备案 +// export const checkAuthority = function(pid = '') { +// return new Promise((resolve, reject) => { +// pddApi.authority_query(pid).then(res => { +// console.log('备案数:', res.data.authority_query_response.bind) +// if (res.data.authority_query_response && res.data.authority_query_response.bind === +// 0) { +// pddApi.authority_generate(pid).then(res => { +// let data = res.data.rp_promotion_url_generate_response +// .url_list[0] +// console.log('备案链接:', data); +// resolve(data) +// }) +// } else { +// resolve(true) +// } +// }) +// }) +// } diff --git a/pages/home/components/HotCommodity.vue b/pages/home/components/HotCommodity.vue index 3a4b25b..890a4ec 100644 --- a/pages/home/components/HotCommodity.vue +++ b/pages/home/components/HotCommodity.vue @@ -12,7 +12,7 @@ - + hot @@ -20,7 +20,12 @@ ¥{{ mgoods.price }} - 销量{{ mgoods.sales }}{{mgoods.unitName}} + + 销量 {{mgoods.salesTip}} + + + 销量{{ mgoods.sales }}{{mgoods.unitName}} + @@ -89,6 +94,23 @@ query, }); }, + routerGo(item) { + if (item.goodSign) { + this.$yrouter.push({ + path: '/pages/goods/goodDetail', + query: { + goodSign: item.goodSign + }, + }) + } else { + this.$yrouter.push({ + path: '/pages/shop/GoodsCon/index', + query: { + id: item.id + }, + }) + } + }, } } diff --git a/pages/map/index.vue b/pages/map/index.vue index 7da2054..e928ebf 100644 --- a/pages/map/index.vue +++ b/pages/map/index.vue @@ -1,57 +1,82 @@ - + \ No newline at end of file diff --git a/static/business_fish.png b/static/business_fish.png new file mode 100644 index 0000000000000000000000000000000000000000..7443e003c4c7a9ecc6f81bfd5ae1f52054248dc1 GIT binary patch literal 1539 zcmV+e2K@PnP)C0002kP)t-s00030 znGye+5&xMH|C$m1n-Tw-5dWDF|CbQ|ni2n*5dWDG|C6aSeL z|CtZ}|NsA;7XO+N|Nr^_|Mma>-T(E-|LnH^v_}7@EC2e`|Ho_p%XI&&H~*g-|NrCv z=BoeWr2nBG|Nrm*y;%RFB>(^F|M9^8-<&qVZVz{%@oLF$4C%1gpq* zPt6R|bpM>8QD;uf0=lw=ZaG2FlGhg5fTwAoJAKkoM%bA1w+=r zW`0GY%XxLS(E7XH81UxF3s;IjWk(R041|3c8TGS;kb2;v+Zb!wr%&53;n|$I5sD!5 ziuG(KKZ6}qQ_mY95wqaVLf$k8{TZ|K1WD%)5g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