diff --git a/api/login.js b/api/login.js index f413ba8..af9a1a0 100644 --- a/api/login.js +++ b/api/login.js @@ -14,6 +14,16 @@ export function resetByMobile(params) { }); } + +//获取自动发券 +export function getAutoCoup(){ + return http.request({ + url:`/promotion/coupon/activity`, + method:"GET", + needToken: true, + }); +} + /** * 账号密码登陆 * @params password diff --git a/config/config.js b/config/config.js index 7fd54e7..31f7045 100644 --- a/config/config.js +++ b/config/config.js @@ -22,4 +22,5 @@ export default { mainColor: "#ff3c2a", // 主题色 lightColor: "#ff6b35", // 高亮主题色 aiderLightColor: "#ff9f28", // 辅助高亮颜色 + defaultUserPhoto:"/static/missing-face.png" // 默认用户头像 }; diff --git a/main.js b/main.js index 03cf4ef..d801508 100644 --- a/main.js +++ b/main.js @@ -5,13 +5,14 @@ import uView from "uview-ui"; import store from "./store"; import config from '@/config/config'; import airBtn from "@/components/m-airbtn/index.vue"; +import socketIO from './pages/mine/im/socket'; /** * 仅在h5中显示唤醒app功能 * 在h5页面手动挂载 * */ // #ifdef H5 -if(config.enableMiniBarStartUpApp){ +if (config.enableMiniBarStartUpApp) { let btn = Vue.component("airBtn", airBtn); //全局注册 document.body.appendChild(new btn().$mount().$el); } @@ -31,6 +32,7 @@ Object.keys(filters).forEach((key) => { // 引入Vuex Vue.prototype.$store = store; +// Vue.prototype.socketIo = new socketIO(); Vue.use(uView); Vue.config.productionTip = false; diff --git a/manifest.json b/manifest.json index c75443d..ec82d1b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { "name" : "lili商城", - "appid" : "__UNI__EC9FD60", + "appid" : "__UNI__ED807EA", "description" : "", - "versionName" : "4.2.7", - "versionCode" : 4000270, + "versionName" : "4.2.8", + "versionCode" : 4000280, "transformPx" : false, "app-plus" : { "compatible" : { diff --git a/pages/cart/coupon/myCoupon.vue b/pages/cart/coupon/myCoupon.vue index ac59a4a..fe029a7 100644 --- a/pages/cart/coupon/myCoupon.vue +++ b/pages/cart/coupon/myCoupon.vue @@ -2,28 +2,63 @@ - {{ + {{ item.text - }} + }} - - - + + + - + - + - + - {{ coupon.discount }}折 + {{ coupon.discount }}折 {{ coupon.price }}元 - 满{{ coupon.consumeThreshold | unitPrice }}可用 + 满{{ coupon.consumeThreshold | unitPrice }}可用 @@ -31,27 +66,47 @@ {{ coupon.title }} - 使用平台:{{ - coupon.scopeType == 'ALL' && coupon.storeId == '0' + 使用平台:{{ + coupon.scopeType == "ALL" && coupon.storeId == "0" ? "全平台" : coupon.scopeType == "PORTION_CATEGORY" ? "仅限品类" - : coupon.storeName == 'platform' ? '全平台' :coupon.storeName+'' - }}使用 - {{ - coupon.endTime - }} - 详细说明 - + : coupon.storeName == "platform" + ? "全平台" + : coupon.storeName + "" + }}使用 + {{ coupon.endTime }} + 详细说明 + 新到 - 将过期 + 将过期 - - - + + + 立即
使用
@@ -116,7 +171,7 @@ export default { }, onShow() { - this.navList[this.tabCurrentIndex].params.pageNumber = 1 + this.navList[this.tabCurrentIndex].params.pageNumber = 1; this.navList[this.tabCurrentIndex].dataList = []; this.getData(); }, @@ -188,15 +243,9 @@ export default { * 立即使用优惠券 */ useItNow(item) { - if (item.storeId && item.storeId!='0') { - uni.navigateTo({ - url: `/pages/product/shopPage?id=${item.storeId}`, - }); - } else { - uni.switchTab({ - url: "/pages/navigation/search/searchPage", - }); - } + uni.navigateTo({ + url: `/pages/navigation/search/searchPage?promotionsId=${item.couponId}&promotionType=COUPON`, + }); }, /** diff --git a/pages/mine/im/index.vue b/pages/mine/im/index.vue index 994367e..58560d4 100644 --- a/pages/mine/im/index.vue +++ b/pages/mine/im/index.vue @@ -1,6 +1,6 @@