diff --git a/App.vue b/App.vue index 4304ad7..f8f76ae 100644 --- a/App.vue +++ b/App.vue @@ -88,7 +88,9 @@ onShow() { // #ifndef H5 - this.getClipboard(); + if(this.config.enableGetClipboard){ + this.getClipboard(); + } // #endif // #ifdef APP-PLUS diff --git a/api/article.js b/api/article.js index 0d5bacc..6e2f6af 100644 --- a/api/article.js +++ b/api/article.js @@ -28,3 +28,16 @@ export function getArticleDetail(type) { }); } +/** + * 获取文章详情 + * @param type + */ + export function getArticleDetailByType(type) { + return http.request({ + url: `/other/article/type/${type}`, + method: Method.GET, + }); +} + + + diff --git a/api/home.js b/api/home.js index 84cb0f9..764049b 100644 --- a/api/home.js +++ b/api/home.js @@ -1,6 +1,21 @@ import { http, Method } from "@/utils/request.js"; - + export function toSpecial(data) { + return http.request({ + url: `/other/pageData/getSpecial`, + method: Method.GET, + data + }); +} +/** + * 专题内容 + */ + export function getSpecial(id) { + return http.request({ + url: `/other/pageData/get/${id}`, + method: Method.GET, + }); +} /** * 获取广告图 diff --git a/api/message.js b/api/message.js index c6e7dd8..9b8a4f2 100644 --- a/api/message.js +++ b/api/message.js @@ -48,6 +48,24 @@ export function messageMarkAsRead(ids) { }); } +//读取站内消息 +export function editMessages(message_id,params){ + return http.request({ + url:`/message/member/${message_id}`, + method:Method.PUT, + needToken:true, + params + }) +} +//获取站内消息 +export function messages(params) { + return http.request({ + url: "/message/member", + method: Method.GET, + needToken: true, + params, + }); +} /** * 获取物流消息列表 diff --git a/api/store.js b/api/store.js index 20e5ee2..00e8fe4 100644 --- a/api/store.js +++ b/api/store.js @@ -13,7 +13,7 @@ import {http, Method} from '@/utils/request.js'; */ export function getStoreList(params) { return http.request({ - url: '/store', + url: '/store/store', method: Method.GET, params, }); diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue index a6cef91..35d6211 100644 --- a/components/m-buy/goods.vue +++ b/components/m-buy/goods.vue @@ -16,9 +16,9 @@ {{ - formatPrice(goodsDetail.promotionPrice)[0] + $options.filters.goodsFormatPrice(goodsDetail.promotionPrice)[0] }} - .{{ formatPrice(goodsDetail.promotionPrice)[1] }} + .{{ $options.filters.goodsFormatPrice(goodsDetail.promotionPrice)[1] }} {{ @@ -29,23 +29,23 @@
{{ - formatPrice(goodsDetail.price)[0] + $options.filters.goodsFormatPrice(goodsDetail.price)[0] }} - .{{ formatPrice(goodsDetail.price)[1] }} + .{{ $options.filters.goodsFormatPrice(goodsDetail.price)[1] }}
-
+
{{ - formatPrice(item.price)[0] + $options.filters.goodsFormatPrice(item.price)[0] }} - .{{ formatPrice(item.price)[1] }} + .{{ $options.filters.goodsFormatPrice(item.price)[1] }} {{item.num}}{{goodsDetail.goodsUnit}} @@ -56,9 +56,9 @@ {{ - formatPrice(goodsDetail.price)[0] + $options.filters.goodsFormatPrice(goodsDetail.price)[0] }} - .{{ formatPrice(goodsDetail.price)[1] }} + .{{ $options.filters.goodsFormatPrice(goodsDetail.price)[1] }}
@@ -102,7 +102,7 @@ 数量 - + @@ -204,14 +204,6 @@ }, methods: { - // 格式化金钱 1999 --> [1999,00] - formatPrice(val) { - if (typeof val == "undefined") { - return val; - } - return val.toFixed(2).split("."); - }, - closeMask() { this.$emit("closeBuy", false); }, diff --git a/components/m-goods-list/base-list.vue b/components/m-goods-list/base-list.vue new file mode 100644 index 0000000..b7e548b --- /dev/null +++ b/components/m-goods-list/base-list.vue @@ -0,0 +1,277 @@ + + + + + diff --git a/components/m-goods-list/common.vue b/components/m-goods-list/common.vue index c4975f8..4896ace 100644 --- a/components/m-goods-list/common.vue +++ b/components/m-goods-list/common.vue @@ -36,16 +36,6 @@ } return str; }, - - - // 格式化金钱 1999 --> [1999,00] - formatPrice(val) { - if (typeof val == "undefined") { - return val; - } - return val.toFixed(2).split("."); - }, - // 数据去重一下 只显示一次 减免 劵 什么的 getPromotion(item) { if (item.promotionMap) { diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue index 33d3a33..4c1ac7f 100644 --- a/components/m-goods-list/list.vue +++ b/components/m-goods-list/list.vue @@ -4,7 +4,7 @@ - + @@ -15,8 +15,8 @@
- ¥{{ formatPrice(item.content.price )[0] }} .{{ - formatPrice(item.content.price )[1] + ¥{{ $options.filters.goodsFormatPrice(item.content.price )[0] }} .{{ + $options.filters.goodsFormatPrice(item.content.price )[1] }}
@@ -52,7 +52,7 @@
- +
@@ -60,8 +60,8 @@
{{ item.content.goodsName }}
- ¥{{ formatPrice(item.content.price )[0] }} .{{ - formatPrice(item.content.price )[1] + ¥{{ $options.filters.goodsFormatPrice(item.content.price )[0] }} .{{ + $options.filters.goodsFormatPrice(item.content.price )[1] }}
@@ -177,16 +177,6 @@ } return str; }, - - - // 格式化金钱 1999 --> [1999,00] - formatPrice(val) { - if (typeof val == "undefined") { - return val; - } - return val.toFixed(2).split("."); - }, - // 数据去重一下 只显示一次 减免 劵 什么的 getPromotion(item) { if (item.promotionMap) { @@ -284,7 +274,7 @@ font-size: $font-base; color: $font-color-dark; line-height: 1.5; - height: 84rpx; + height: 86rpx; padding: 10rpx 0 0; display: -webkit-box; -webkit-box-orient: vertical; diff --git a/components/m-goods-list/promotion.vue b/components/m-goods-list/promotion.vue index 1f24739..356874e 100644 --- a/components/m-goods-list/promotion.vue +++ b/components/m-goods-list/promotion.vue @@ -3,7 +3,7 @@
- +
@@ -13,15 +13,15 @@
- ¥{{ formatPrice(item.price )[0] }} .{{ - formatPrice(item.price )[1] + ¥{{ $options.filters.goodsFormatPrice(item.price )[0] }} .{{ + $options.filters.goodsFormatPrice(item.price )[1] }}
最低: - ¥{{ formatPrice(item.purchasePrice )[0] }} .{{ - formatPrice(item.purchasePrice )[1] + ¥{{ $options.filters.goodsFormatPrice(item.purchasePrice )[0] }} .{{ + $options.filters.goodsFormatPrice(item.purchasePrice )[1] }}
@@ -107,7 +107,7 @@ font-size: $font-base; color: $font-color-dark; line-height: 1.5; - height: 84rpx; + height: 86rpx; padding: 10rpx 0 0; display: -webkit-box; -webkit-box-orient: vertical; diff --git a/components/m-goods-list/seckill.vue b/components/m-goods-list/seckill.vue deleted file mode 100644 index 4e7b834..0000000 --- a/components/m-goods-list/seckill.vue +++ /dev/null @@ -1,190 +0,0 @@ - - - - - diff --git a/config/config.js b/config/config.js index 9624a59..cd4e92c 100644 --- a/config/config.js +++ b/config/config.js @@ -1,16 +1,24 @@ const name = "lilishop"; //全局商城name -const schemeName = 'lilishop' //唤醒app需要的schemeName +const schemeName = "lilishop"; //唤醒app需要的schemeName export default { name: name, schemeLink: `${schemeName}://`, //唤起app地址 downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址,下载app的地址 shareLink: "https://m-b2b2c.pickmall.cn", //分享地址,也就是在h5中默认的复制地址 appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态) - aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请Web服务key - scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转 - iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看 - logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址 - customerServiceMobile:"13161366885", //客服电话 - customerServiceEmail:"lili@lili.com", //客服邮箱 - imWebSrc:"https://im.pickmall.cn" //IM地址 -}; + aMapKey: "1f78544934b66c9fbc0104117f663973", //在高德中申请Web服务key + scanAuthNavigation: ["https://m-b2b2c.pickmall.cn/"], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转 + iosAppId: "id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看 + logo: "https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址 + customerServiceMobile: "13161366885", //客服电话 + customerServiceEmail: "lili@lili.com", //客服邮箱 + imWebSrc: "https://im.pickmall.cn", //IM地址 + enableGetClipboard: true, //是否启用粘贴板获取 scanAuthNavigation 中的链接,如果匹配则会跳转到对应页面 + enableMiniBarStartUpApp: true, //是否在h5中右侧浮空按钮点击启动app + /** + * 如需更换主题请修改此处以及uni.scss中的全局颜色 + */ + mainColor: "#ff3c2a", // 主题色 + lightColor: "#ff6b35", // 高亮主题色 + aiderLightColor: "#ff9f28", // 辅助高亮颜色 +}; diff --git a/main.js b/main.js index 9b47071..03cf4ef 100644 --- a/main.js +++ b/main.js @@ -3,17 +3,18 @@ import App from "./App"; import * as filters from "./utils/filters.js"; // global filter import uView from "uview-ui"; import store from "./store"; - - +import config from '@/config/config'; +import airBtn from "@/components/m-airbtn/index.vue"; /** * 仅在h5中显示唤醒app功能 * 在h5页面手动挂载 * */ // #ifdef H5 -import airBtn from "@/components/m-airbtn/index.vue"; -let btn = Vue.component("airBtn", airBtn); //全局注册 -document.body.appendChild(new btn().$mount().$el); +if(config.enableMiniBarStartUpApp){ + let btn = Vue.component("airBtn", airBtn); //全局注册 + document.body.appendChild(new btn().$mount().$el); +} // #endif // 引入uView对小程序分享的mixin封装 @@ -30,8 +31,6 @@ Object.keys(filters).forEach((key) => { // 引入Vuex Vue.prototype.$store = store; - - Vue.use(uView); Vue.config.productionTip = false; @@ -43,11 +42,11 @@ Vue.config.productionTip = false; * 如需更换主题请修改此处以及uni.scss中的全局颜色 */ // 主题色 -Vue.prototype.$mainColor = "#ff3c2a"; +Vue.prototype.$mainColor = config.mainColor; // 高亮主题色 -Vue.prototype.$lightColor = "#ff6b35"; +Vue.prototype.$lightColor = config.lightColor; // 辅助高亮颜色 -Vue.prototype.$aiderLightColor = "#ff9f28"; +Vue.prototype.$aiderLightColor = config.aiderLightColor; App.mpType = "app"; diff --git a/pages.json b/pages.json index 6838480..af9e598 100644 --- a/pages.json +++ b/pages.json @@ -26,6 +26,12 @@ } } }, + { + "path": "pages/tabbar/home/title", + "style": { + "navigationBarTitleText": "消息" + } + }, { "path": "pages/tabbar/cart/cartList", "style": { @@ -79,6 +85,12 @@ "style": { } + }, + { + "path": "pages/tabbar/special/special", + "style": { + "navigationBarTitleText": "专题" + } } ], diff --git a/pages/cart/payment/payOrder.vue b/pages/cart/payment/payOrder.vue index 71be635..a145a4b 100644 --- a/pages/cart/payment/payOrder.vue +++ b/pages/cart/payment/payOrder.vue @@ -98,18 +98,18 @@ }, onBackPress(e) { if (e.from == "backbutton") { - if(this.routerVal.recharge_sn){ - uni.switchTab({ - url: '/pages/tabbar/user/my' - }); - } - else{ - uni.redirectTo({ - url: "/pages/order/myOrder?status=0", - }); - } - return true; //阻止默认返回行为 - } + if(this.routerVal.recharge_sn){ + uni.switchTab({ + url: '/pages/tabbar/user/my' + }); + } + else{ + uni.navigateTo({ + url: "/pages/order/myOrder?status=0", + }); + } + return true; //阻止默认返回行为 + } }, mounted() { this.cashierData(); diff --git a/pages/mine/deposit/index.vue b/pages/mine/deposit/index.vue index 85287ee..2b9bda5 100644 --- a/pages/mine/deposit/index.vue +++ b/pages/mine/deposit/index.vue @@ -1,6 +1,6 @@