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 @@
-
-
-
-
- 为你推荐
-
-
-
-
-
-
-
-
-
-
-
- {{ item.storeName }}
- {{ item.storeName }}
-
-
- {{ item.price }}
- 仅剩:{{ item.stock }}{{ item.unitName }}
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{ item.storeName }}
+ {{ item.storeName }}
+
+
+ {{ item.price }}
+
+ 销量:{{item.salesTip}}
+ 仅剩:{{ item.stock }}{{ item.unitName }}
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ .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 @@
+
+
+
+
+
+ {{data.goodsDesc}}
+
+ ¥{{(data.minGroupPrice - data.couponDiscount) / 100 }}
+ 团购价¥{{data.minGroupPrice/100}}
+ 原价¥{{data.minNormalPrice/100}}
+
+
+
+ {{item}}
+
+
+
+
+
+ {{data.goodsName}}
+ 已拼{{data.salesTip}}件
+
+
+
+
+
+
+
+
+ ↑TOP
+
+ 券后
+ ¥{{(data.minGroupPrice - data.couponDiscount) / 100 }}
+ 原价¥{{data.minNormalPrice/100}} 团购价¥{{data.minGroupPrice/100}}
+ 券¥{{data.couponDiscount/100}}
+
+
+
+
+ 分享
+
+
+ 为您推荐
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+ {{sort_text}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+ {{data.goods_name}}
+
+
+ 领劵免拼
+ ¥{{priceFormat(data.min_group_price-data.coupon_discount)}}
+
+ 原价¥{{priceFormat(data.min_normal_price)}}
+ 团购¥{{priceFormat(data.min_group_price)}}
+ {{data.coupon_discount/100}}元卷
+ 已售{{data.sales_tip}}
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索历史
+ 编辑
+ 取消编辑
+
+
+ {{item}}
+
+
+
+
+ {{item}}
+
+
+ 关闭
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
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 0000000..7443e00
Binary files /dev/null and b/static/business_fish.png differ
diff --git a/static/point.png b/static/point.png
new file mode 100644
index 0000000..d5e5409
Binary files /dev/null and b/static/point.png differ
diff --git a/static/public_fish.png b/static/public_fish.png
new file mode 100644
index 0000000..3a43795
Binary files /dev/null and b/static/public_fish.png differ