diff --git a/api/login.js b/api/login.js index f384d31..0c265f2 100644 --- a/api/login.js +++ b/api/login.js @@ -1,34 +1,28 @@ -import { - http -} from "@/utils/request.js"; - - -import api from '@/config/api.js' - +import { http } from "@/utils/request.js"; +import api from "@/config/api.js"; /** * 通过短信重置密码 * @param mobile */ export function resetByMobile(params) { - return http.request({ - url: `/members/resetByMobile`, - method: "POST", - params - }); + return http.request({ + url: `/members/resetByMobile`, + method: "POST", + params, + }); } - /** * 发送验证码 * @param mobile */ export function sendMobile(mobile) { - return http.request({ - url: `${api.common}/sms/LOGIN/${mobile}`, - method: "GET", - }); + return http.request({ + url: `${api.common}/sms/LOGIN/${mobile}`, + method: "GET", + }); } /** @@ -37,40 +31,37 @@ export function sendMobile(mobile) { * @param smsCode */ export function smsLogin(params, clientType) { - return http.request({ - url: `/members/smsLogin`, - method: "POST", - data: params, - header: { - "content-type": "application/x-www-form-urlencoded", - "clientType": clientType - } - }); + return http.request({ + url: `/members/smsLogin`, + method: "POST", + data: params, + header: { + "content-type": "application/x-www-form-urlencoded", + clientType: clientType, + }, + }); } - - /** * 修改密码 * @param newPassword * @param password */ - export function modifyPass(params) { - return http.request({ - url: `/members/modifyPass`, - method: "PUT", - params, - }); +export function modifyPass(params) { + return http.request({ + url: `/members/modifyPass`, + method: "PUT", + params, + }); } /** * 刷新token */ export function refreshTokenFn(refresh_token) { - - return http.request({ - url: `/members/refresh/${refresh_token}`, - method: "GET", - }); + return http.request({ + url: `/members/refresh/${refresh_token}`, + method: "GET", + }); } diff --git a/api/promotions.js b/api/promotions.js index e893943..c780ef5 100644 --- a/api/promotions.js +++ b/api/promotions.js @@ -13,7 +13,7 @@ export function getLiveList(params) { return http.request({ url: `broadcast/studio`, method: Method.GET, - params + params, }); } @@ -91,3 +91,72 @@ export function getAllCoupons(params) { params, }); } + +/** + * 分页获取砍价商品 + * @param params + */ +export function getBargainList(params) { + return http.request({ + url: "/promotion/kanjiaGoods", + method: Method.GET, + params, + }); +} + +/** + * 分页获取砍价商品 + * @param params + */ +export function getBargainDetail(id) { + return http.request({ + url: `/promotion/kanjiaGoods/${id}`, + method: Method.GET, + }); +} + +/** + * 获取砍价活动 + * @param params + */ +export function getBargainActivity(params) { + return http.request({ + url: `/promotion/kanjiaGoods/getKanjiaActivity`, + method: Method.POST, + params, + }); +} + +/** + * 发起砍价活动 + * @param params + */ +export function openBargain(params) { + return http.request({ + url: `/promotion/kanjiaGoods`, + method: Method.POST, + header: { "content-type": "application/x-www-form-urlencoded" }, + data: params, + }); +} + +/** + * 分页获取砍价活动-帮砍记录 + */ +export function getBargainLog(params) { + return http.request({ + url: `/promotion/kanjiaGoods/getKanjiaActivity/logs`, + method: Method.GET, + data: params, + }); +} + +/** + * 分页获取砍价活动-帮砍记录 + */ +export function helpBargain(kanJiaActivityId) { + return http.request({ + url: `promotion/kanjiaGoods/help/${kanJiaActivityId}`, + method: Method.POST, + }); +} diff --git a/components/m-share/index.vue b/components/m-share/index.vue index 8642b1c..a3d87d8 100644 --- a/components/m-share/index.vue +++ b/components/m-share/index.vue @@ -72,10 +72,14 @@ export default { // h5复制链接 // #ifdef H5 copyLink() { - let content = - this.configs.shareLink + - getCurrentPages()[getCurrentPages().length - 1].__page__.fullPath; - + let content; + if (this.link) { + content = this.configs.shareLink + this.link; + } else { + content = + this.configs.shareLink + + getCurrentPages()[getCurrentPages().length - 1].__page__.fullPath; + } if (content === null || content === undefined) { content = ""; } else content = content + ""; @@ -104,6 +108,8 @@ export default { shareTitle = `我发现了一个${this.goodsName}店铺快来跟我一起看看吧`; } else if (this.type == "pintuan") { shareTitle = `我拼了一个${this.goodsName}快来跟我一起抢购吧!`; + } else if (this.type == "kanjia") { + shareTitle = `请快来帮我砍一刀${this.goodsName}`; } let scene; // "WXSenceTimeline 朋友圈 WXSceneSession 微信好友" diff --git a/config/api.js b/config/api.js index f302147..995d1d5 100644 --- a/config/api.js +++ b/config/api.js @@ -4,10 +4,9 @@ */ // 开发环境 const dev = { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - common: "http://192.168.0.106:8890", - buyer: "http://192.168.0.106:8888", + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + }; // 生产环境 const prod = { diff --git a/pages.json b/pages.json index 381018d..b32731e 100644 --- a/pages.json +++ b/pages.json @@ -483,6 +483,20 @@ "navigationStyle": "custom", "navigationBarTextStyle": "black" + } + },{ + "path": "bargain/list", + "style": { + "navigationStyle": "custom", + "navigationBarTextStyle": "white" + + } + },{ + "path": "bargain/detail", + "style": { + "navigationStyle": "custom", + "navigationBarTextStyle": "white" + } } diff --git a/pages/cart/payment/popup/goods.vue b/pages/cart/payment/popup/goods.vue index eac6389..1dcbd52 100644 --- a/pages/cart/payment/popup/goods.vue +++ b/pages/cart/payment/popup/goods.vue @@ -94,18 +94,11 @@ export default { formatList: [], currentSelceted: [], skuList: "", - isMask:false, //是否显示遮罩层 - isClose:false, //是否可以点击遮罩关闭 + isMask: false, //是否显示遮罩层 + isClose: false, //是否可以点击遮罩关闭 }; }, - props: [ - - "goodsDetail", - "buyMask", - "selectedSku", - "goodsSpec", - "addr", - ], + props: ["goodsDetail", "buyMask", "selectedSku", "goodsSpec", "addr"], watch: { buyType: { handler(val) { @@ -162,7 +155,25 @@ export default { }; this.selectName = specValue.value; - this.$emit("handleClickSku", selectedSkuId.skuId,this.goodsDetail.id); + this.$emit("handleClickSku", selectedSkuId.skuId, this.goodsDetail.id); + }, + + /** + * 直接购买 + */ + buy(data) { + + API_trade.addToCart(data).then((res) => { + if (res.data.code == 200) { + uni.navigateTo({ + url: `/pages/order/fillorder?way=${data.cartType}&addr=${ + this.addr.id || "" + }&parentOrder=${encodeURIComponent( + JSON.stringify(this.parentOrder) + )}`, + }); + } + }); }, /** @@ -208,19 +219,7 @@ export default { data.cartType = "BUY_NOW"; } - - - API_trade.addToCart(data).then((res) => { - if (res.data.code == 200) { - uni.navigateTo({ - url: `/pages/order/fillorder?way=${data.cartType}&addr=${ - this.addr.id || '' - }&parentOrder=${encodeURIComponent( - JSON.stringify(this.parentOrder) - )}`, - }); - } - }); + this.buy(data); } }, formatSku(list) { diff --git a/pages/order/afterSales/afterSalesDetail.vue b/pages/order/afterSales/afterSalesDetail.vue index 9fe0d97..19b87c1 100644 --- a/pages/order/afterSales/afterSalesDetail.vue +++ b/pages/order/afterSales/afterSalesDetail.vue @@ -57,7 +57,9 @@ applyInfo.refundWay == 'ORIGINAL' ? '原路退回' : '账号退款' " type="text" input-align="right" :disabled="true" /> - + @@ -97,7 +99,7 @@ import { import city from "@/components/m-city/m-city"; import { upload } from "@/api/common.js"; -import {checkBankno} from '@/utils/Foundation' +import { checkBankno } from "@/utils/Foundation"; import storage from "@/utils/storage.js"; export default { component: { @@ -146,7 +148,7 @@ export default { customStyle: { backgroundColor: this.$lightColor, }, - applyInfo: {}, + applyInfo: {}, form: { orderItemSn: "", // 订单sn skuId: "", @@ -188,8 +190,8 @@ export default { this.sn = options.sn; let dsku = decodeURIComponent(options.sku); let newSku = JSON.parse(dsku); - this.sku = newSku - + this.sku = newSku; + this.form.orderItemSn = options.sn; this.form.skuId = this.sku.skuId; this.form.num = this.sku.num; @@ -251,9 +253,7 @@ export default { this.form.accountType_label = e[0].label; }, //返回方式 - returnSelectConfirm(e) { - - }, + returnSelectConfirm(e) {}, //修改申请数量 valChange(e) { @@ -261,7 +261,6 @@ export default { }, //图片上传 onUploaded(lists) { - let images = []; lists.forEach((item) => { @@ -297,7 +296,6 @@ export default { }, //检测提交参数 handleCheckParams() { - if (this.$u.test.isEmpty(this.form.reason)) { this.$refs.uToast.show({ title: "请选择 退款原因", type: "error" }); return false; diff --git a/pages/order/evaluate/evaluateDetail.vue b/pages/order/evaluate/evaluateDetail.vue index a2e018b..0dba840 100644 --- a/pages/order/evaluate/evaluateDetail.vue +++ b/pages/order/evaluate/evaluateDetail.vue @@ -25,7 +25,16 @@ {{ comment.goodsName }} - + + 商家回复: + {{ comment.reply }} + + + + + + @@ -49,6 +58,18 @@ export default { this.comment = JSON.parse(decodeURIComponent(options.comment)); }, methods: { + /** + * 切割图像 + */ + splitImg(val) { + if (val && val.split(",")) { + return val.split(","); + } else if (val) { + return val; + } else { + return false; + } + }, /** * 点击图片放大或保存 */ @@ -68,6 +89,38 @@ export default { + \ No newline at end of file diff --git a/pages/promotion/bargain/list.vue b/pages/promotion/bargain/list.vue new file mode 100644 index 0000000..4fec557 --- /dev/null +++ b/pages/promotion/bargain/list.vue @@ -0,0 +1,133 @@ + + + + + \ No newline at end of file diff --git a/pages/promotion/static/Bargaining.png b/pages/promotion/static/Bargaining.png new file mode 100644 index 0000000..4cd1a92 Binary files /dev/null and b/pages/promotion/static/Bargaining.png differ diff --git a/pages/promotion/static/bargain.jpeg b/pages/promotion/static/bargain.jpeg new file mode 100644 index 0000000..b876d40 Binary files /dev/null and b/pages/promotion/static/bargain.jpeg differ diff --git a/pages/promotion/static/help-bargain.png b/pages/promotion/static/help-bargain.png new file mode 100644 index 0000000..9ff0450 Binary files /dev/null and b/pages/promotion/static/help-bargain.png differ diff --git a/pages/promotion/static/live.png b/pages/promotion/static/live.png index c9daaae..d07cdae 100644 Binary files a/pages/promotion/static/live.png and b/pages/promotion/static/live.png differ diff --git a/pages/tabbar/home/template/tpl.js b/pages/tabbar/home/template/tpl.js index a436765..557c2b5 100644 --- a/pages/tabbar/home/template/tpl.js +++ b/pages/tabbar/home/template/tpl.js @@ -86,6 +86,11 @@ export function modelNavigateTo(item) { url: `/pages/promotion/lives`, }); break; + case "砍价": + uni.navigateTo({ + url: `/pages/promotion/bargain/list`, + }); + break; case "积分商城": uni.switchTab({ url: `/pages/navigation/point/point-mall`, diff --git a/pages/tabbar/home/views.vue b/pages/tabbar/home/views.vue index 8fec026..f3b20c6 100644 --- a/pages/tabbar/home/views.vue +++ b/pages/tabbar/home/views.vue @@ -94,6 +94,8 @@ export default { }, mounted() { + + this.init(); // #ifdef MP-WEIXIN // 小程序默认分享 diff --git a/uni.scss b/uni.scss index 49fb66a..86e85bc 100644 --- a/uni.scss +++ b/uni.scss @@ -174,3 +174,11 @@ $font-weight: 400; white-space: nowrap; text-overflow: ellipsis; } + +.wes-2 { + /* 适用于webkit内核和移动端 */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + } \ No newline at end of file diff --git a/utils/request.js b/utils/request.js index cf9bcd2..a2ddaa9 100644 --- a/utils/request.js +++ b/utils/request.js @@ -147,7 +147,6 @@ http.interceptors.request.use( ...config.header, uuid: storage.getUuid() || uuid.v1(), }; - console.log(config.header); return config; }, (config) => {