修改小程序与app的兼容文件
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
|
@import "animate.css";
|
||||||
@import "./assets/iconfont/iconfont.css";
|
@import "./assets/iconfont/iconfont.css";
|
||||||
@import "./assets/css/base.less";
|
@import "./assets/css/base.less";
|
||||||
@import "./assets/css/reset.less";
|
@import "./assets/css/reset.less";
|
||||||
|
|||||||
+21
-6
@@ -9,7 +9,9 @@ import request from "@/utils/request";
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function postOrderConfirm(cartId) {
|
export function postOrderConfirm(cartId) {
|
||||||
return request.post("/order/confirm", { cartId });
|
return request.post("/order/confirm", {
|
||||||
|
cartId
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,7 +64,9 @@ export function getOrderList(data) {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function cancelOrder(id) {
|
export function cancelOrder(id) {
|
||||||
return request.post("/order/cancel", { id });
|
return request.post("/order/cancel", {
|
||||||
|
id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -94,7 +98,9 @@ export function postOrderRefund(data) {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function takeOrder(uni) {
|
export function takeOrder(uni) {
|
||||||
return request.post("/order/take", { uni });
|
return request.post("/order/take", {
|
||||||
|
uni
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -102,7 +108,9 @@ export function takeOrder(uni) {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function delOrder(uni) {
|
export function delOrder(uni) {
|
||||||
return request.post("/order/del", { uni });
|
return request.post("/order/del", {
|
||||||
|
uni
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -118,12 +126,19 @@ export function express(params) {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function payOrder(uni, paytype, from) {
|
export function payOrder(uni, paytype, from) {
|
||||||
return request.post("order/pay", { uni, paytype, from });
|
return request.post("order/pay", {
|
||||||
|
uni,
|
||||||
|
paytype,
|
||||||
|
from
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 订单核销
|
* 订单核销
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function orderVerific(verify_code, is_confirm) {
|
export function orderVerific(verify_code, is_confirm) {
|
||||||
return request.post("order/order_verific", { verify_code, is_confirm });
|
return request.post("order/order_verific", {
|
||||||
|
verify_code,
|
||||||
|
is_confirm
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+46
-16
@@ -4,28 +4,36 @@ import request from "@/utils/request";
|
|||||||
* 商品分类
|
* 商品分类
|
||||||
* */
|
* */
|
||||||
export function getCategory() {
|
export function getCategory() {
|
||||||
return request.get("/category", {}, { login: false });
|
return request.get("/category", {}, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 商品详情
|
* 商品详情
|
||||||
* */
|
* */
|
||||||
export function getProductDetail(id) {
|
export function getProductDetail(id, data) {
|
||||||
return request.get("/product/detail/" + id, {}, { login: true });
|
return request.get("/product/detail/" + id, data, {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 商品分销二维码
|
* 商品分销二维码
|
||||||
* */
|
* */
|
||||||
export function getProductCode(id) {
|
export function getProductCode(id) {
|
||||||
return request.get("/product/code/" + id, {}, { login: true });
|
return request.get("/product/code/" + id, {}, {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 商品列表
|
* 商品列表
|
||||||
* */
|
* */
|
||||||
export function getProducts(q) {
|
export function getProducts(q) {
|
||||||
return request.get("/products", q, { login: false });
|
return request.get("/products", q, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -47,9 +55,12 @@ export function toCollect(id, category) {
|
|||||||
* */
|
* */
|
||||||
export function getHostProducts(page, limit) {
|
export function getHostProducts(page, limit) {
|
||||||
return request.get(
|
return request.get(
|
||||||
"/product/hot",
|
"/product/hot", {
|
||||||
{ page: page, limit: limit },
|
page: page,
|
||||||
{ login: false }
|
limit: limit
|
||||||
|
}, {
|
||||||
|
login: false
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +68,9 @@ export function getHostProducts(page, limit) {
|
|||||||
* 精品、热门、首发列表
|
* 精品、热门、首发列表
|
||||||
* */
|
* */
|
||||||
export function getGroomList(type) {
|
export function getGroomList(type) {
|
||||||
return request.get("/groom/list/" + type, {}, { login: false });
|
return request.get("/groom/list/" + type, {}, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -78,7 +91,9 @@ export function getCartList() {
|
|||||||
* 购物车 删除
|
* 购物车 删除
|
||||||
* */
|
* */
|
||||||
export function postCartDel(ids) {
|
export function postCartDel(ids) {
|
||||||
return request.post("/cart/del", { ids });
|
return request.post("/cart/del", {
|
||||||
|
ids
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -92,40 +107,55 @@ export function getCartCount(data) {
|
|||||||
* 购物车 修改商品数量
|
* 购物车 修改商品数量
|
||||||
* */
|
* */
|
||||||
export function changeCartNum(id, number) {
|
export function changeCartNum(id, number) {
|
||||||
return request.post("/cart/num", { id, number });
|
return request.post("/cart/num", {
|
||||||
|
id,
|
||||||
|
number
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索推荐关键字
|
* 搜索推荐关键字
|
||||||
*/
|
*/
|
||||||
export function getSearchKeyword() {
|
export function getSearchKeyword() {
|
||||||
return request.get("/search/keyword", {}, { login: false });
|
return request.get("/search/keyword", {}, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品评论列表
|
* 产品评论列表
|
||||||
*/
|
*/
|
||||||
export function getReplyList(id, q) {
|
export function getReplyList(id, q) {
|
||||||
return request.get("/reply/list/" + id, q, { login: true });
|
return request.get("/reply/list/" + id, q, {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品评价数量和好评度
|
* 产品评价数量和好评度
|
||||||
*/
|
*/
|
||||||
export function getReplyConfig(id) {
|
export function getReplyConfig(id) {
|
||||||
return request.get("/reply/config/" + id, {}, { login: true });
|
return request.get("/reply/config/" + id, {}, {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评价页面获取单个产品详情
|
* 评价页面获取单个产品详情
|
||||||
*/
|
*/
|
||||||
export function postOrderProduct(unique) {
|
export function postOrderProduct(unique) {
|
||||||
return request.post("/order/product", { unique }, { login: true });
|
return request.post("/order/product", {
|
||||||
|
unique
|
||||||
|
}, {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交评价页面;
|
* 提交评价页面;
|
||||||
*/
|
*/
|
||||||
export function postOrderComment(data) {
|
export function postOrderComment(data) {
|
||||||
return request.post("/order/comment", data, { login: true });
|
return request.post("/order/comment", data, {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+70
-22
@@ -4,7 +4,9 @@ import request from "@/utils/request";
|
|||||||
* 省市区
|
* 省市区
|
||||||
*/
|
*/
|
||||||
export function district(data) {
|
export function district(data) {
|
||||||
return request.get("/citys", data, { login: false });
|
return request.get("/citys", data, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,7 +14,9 @@ export function district(data) {
|
|||||||
* @param data object 用户账号密码
|
* @param data object 用户账号密码
|
||||||
*/
|
*/
|
||||||
export function login(data) {
|
export function login(data) {
|
||||||
return request.post("/login", data, { login: false });
|
return request.post("/login", data, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,7 +24,9 @@ export function login(data) {
|
|||||||
* @param data object 用户手机号 也只能
|
* @param data object 用户手机号 也只能
|
||||||
*/
|
*/
|
||||||
export function loginMobile(data) {
|
export function loginMobile(data) {
|
||||||
return request.post("/login/mobile", data, { login: false });
|
return request.post("/login/mobile", data, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,7 +34,9 @@ export function loginMobile(data) {
|
|||||||
* @param data object 用户手机号
|
* @param data object 用户手机号
|
||||||
*/
|
*/
|
||||||
export function registerVerify(data) {
|
export function registerVerify(data) {
|
||||||
return request.post("/register/verify", data, { login: false });
|
return request.post("/register/verify", data, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,7 +44,9 @@ export function registerVerify(data) {
|
|||||||
* @param data object 用户手机号 验证码 密码
|
* @param data object 用户手机号 验证码 密码
|
||||||
*/
|
*/
|
||||||
export function register(data) {
|
export function register(data) {
|
||||||
return request.post("/register", data, { login: false });
|
return request.post("/register", data, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,28 +54,38 @@ export function register(data) {
|
|||||||
* @param data object 用户手机号 验证码 密码
|
* @param data object 用户手机号 验证码 密码
|
||||||
*/
|
*/
|
||||||
export function registerReset(data) {
|
export function registerReset(data) {
|
||||||
return request.post("/register/reset", data, { login: false });
|
return request.post("/register/reset", data, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 领取优惠券列表
|
* 领取优惠券列表
|
||||||
* */
|
* */
|
||||||
export function getCoupon(q) {
|
export function getCoupon(q) {
|
||||||
return request.get("/coupons", q, { login: true });
|
return request.get("/coupons", q, {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 点击领取优惠券
|
* 点击领取优惠券
|
||||||
* */
|
* */
|
||||||
export function getCouponReceive(id) {
|
export function getCouponReceive(id) {
|
||||||
return request.post("/coupon/receive", { couponId: id }, { login: true });
|
return request.post("/coupon/receive", {
|
||||||
|
couponId: id
|
||||||
|
}, {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 批量领取优惠券
|
* 批量领取优惠券
|
||||||
* */
|
* */
|
||||||
export function couponReceiveBatch(couponId) {
|
export function couponReceiveBatch(couponId) {
|
||||||
return request.post("/coupon/receive/batch", { couponId });
|
return request.post("/coupon/receive/batch", {
|
||||||
|
couponId
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -87,7 +107,9 @@ export function getUser() {
|
|||||||
* */
|
* */
|
||||||
export function getUserInfo() {
|
export function getUserInfo() {
|
||||||
|
|
||||||
return request.get("/userinfo", { login: true });
|
return request.get("/userinfo", {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -95,7 +117,9 @@ export function getUserInfo() {
|
|||||||
* */
|
* */
|
||||||
export function wxappAuth(data) {
|
export function wxappAuth(data) {
|
||||||
|
|
||||||
return request.post("/wxapp/auth", data, { login: false });
|
return request.post("/wxapp/auth", data, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -116,14 +140,18 @@ export function getAddressList(data) {
|
|||||||
* 删除地址
|
* 删除地址
|
||||||
* */
|
* */
|
||||||
export function getAddressRemove(id) {
|
export function getAddressRemove(id) {
|
||||||
return request.post("/address/del", { id: id });
|
return request.post("/address/del", {
|
||||||
|
id: id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 设置默认地址
|
* 设置默认地址
|
||||||
* */
|
* */
|
||||||
export function getAddressDefaultSet(id) {
|
export function getAddressDefaultSet(id) {
|
||||||
return request.post("/address/default/set", { id: id });
|
return request.post("/address/default/set", {
|
||||||
|
id: id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -151,14 +179,20 @@ export function postAddress(data) {
|
|||||||
* 获取收藏产品
|
* 获取收藏产品
|
||||||
* */
|
* */
|
||||||
export function getCollectUser(page, limit) {
|
export function getCollectUser(page, limit) {
|
||||||
return request.get("/collect/user", { page: page, limit: limit });
|
return request.get("/collect/user", {
|
||||||
|
page: page,
|
||||||
|
limit: limit
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 删除收藏产品
|
* 删除收藏产品
|
||||||
* */
|
* */
|
||||||
export function getCollectDel(id, category) {
|
export function getCollectDel(id, category) {
|
||||||
return request.post("/collect/del", { id: id, category: category });
|
return request.post("/collect/del", {
|
||||||
|
id: id,
|
||||||
|
category: category
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -172,7 +206,10 @@ export function postCollectAll(data) {
|
|||||||
* 添加收藏产品
|
* 添加收藏产品
|
||||||
* */
|
* */
|
||||||
export function getCollectAdd(id, category) {
|
export function getCollectAdd(id, category) {
|
||||||
return request.post("collect/add", { id: id, category: category });
|
return request.post("collect/add", {
|
||||||
|
id: id,
|
||||||
|
category: category
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -186,14 +223,20 @@ export function getSignConfig() {
|
|||||||
* 签到里的签到列表
|
* 签到里的签到列表
|
||||||
* */
|
* */
|
||||||
export function getSignList(page, limit) {
|
export function getSignList(page, limit) {
|
||||||
return request.get("/sign/list", { page: page, limit: limit });
|
return request.get("/sign/list", {
|
||||||
|
page: page,
|
||||||
|
limit: limit
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 签到列表
|
* 签到列表
|
||||||
* */
|
* */
|
||||||
export function getSignMonth(page, limit) {
|
export function getSignMonth(page, limit) {
|
||||||
return request.get("/sign/month", { page: page, limit: limit });
|
return request.get("/sign/month", {
|
||||||
|
page: page,
|
||||||
|
limit: limit
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -284,14 +327,17 @@ export function getBalance() {
|
|||||||
* 活动状态
|
* 活动状态
|
||||||
* */
|
* */
|
||||||
export function getActivityStatus() {
|
export function getActivityStatus() {
|
||||||
return request.get("/user/activity", {}, { login: false });
|
return request.get("/user/activity", {}, {
|
||||||
|
login: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 活动状态
|
* 活动状态
|
||||||
* */
|
* */
|
||||||
export function getSpreadImg() {
|
export function getSpreadImg(data) {
|
||||||
return request.get("/spread/banner");
|
|
||||||
|
return request.get("/spread/banner", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -340,7 +386,9 @@ export function bindingPhone(data) {
|
|||||||
* h5切换公众号登陆
|
* h5切换公众号登陆
|
||||||
* */
|
* */
|
||||||
export function switchH5Login() {
|
export function switchH5Login() {
|
||||||
return request.post("switch_h5", { from: "wechat" });
|
return request.post("switch_h5", {
|
||||||
|
from: "wechat"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* 获取推广人排行
|
* 获取推广人排行
|
||||||
|
|||||||
@@ -1666,8 +1666,9 @@
|
|||||||
|
|
||||||
.index .wrapper.hot .newProducts .newProductsItem {
|
.index .wrapper.hot .newProducts .newProductsItem {
|
||||||
width: 2.4*100rpx;
|
width: 2.4*100rpx;
|
||||||
|
min-width: 2.4*100rpx;
|
||||||
margin-right: 0.2*100rpx;
|
margin-right: 0.2*100rpx;
|
||||||
|
flex: 0 2.4*100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.index .wrapper .newProducts .newProductsScroll {
|
.index .wrapper .newProducts .newProductsScroll {
|
||||||
@@ -1683,9 +1684,11 @@
|
|||||||
.index .wrapper .newProducts .newProductsItem {
|
.index .wrapper .newProducts .newProductsItem {
|
||||||
border: 1rpx solid #eee;
|
border: 1rpx solid #eee;
|
||||||
width: 2.4*100rpx;
|
width: 2.4*100rpx;
|
||||||
|
min-width: 2.4*100rpx;
|
||||||
border-radius: 0.12*100rpx;
|
border-radius: 0.12*100rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-right: .2*100rpx;
|
margin-right: .2*100rpx;
|
||||||
|
flex: 0 2.4*100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.index .wrapper .newProducts:nth-last-child(1) {}
|
.index .wrapper .newProducts:nth-last-child(1) {}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<view class="condition line1">{{ coupon.couponTitle }}</view>
|
<view class="condition line1">{{ coupon.couponTitle }}</view>
|
||||||
<view class="data acea-row row-between-wrapper">
|
<view class="data acea-row row-between-wrapper">
|
||||||
<view v-if="coupon.endTime === 0">不限时</view>
|
<view v-if="coupon.endTime === 0">不限时</view>
|
||||||
<view v-else><data-format-t :data="coupon.addTime"></data-format-t> - <data-format-t :data="coupon.endTime"></data-format-t></view>
|
<view v-else><data-format-t :date="coupon.addTime"></data-format-t> - <data-format-t :date="coupon.endTime"></data-format-t></view>
|
||||||
<view
|
<view
|
||||||
class="iconfont icon-xuanzhong1 font-color-red"
|
class="iconfont icon-xuanzhong1 font-color-red"
|
||||||
v-if="checked === coupon.id"
|
v-if="checked === coupon.id"
|
||||||
|
|||||||
@@ -6,18 +6,18 @@ import { dataFormat } from "@/utils";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DataFormat",
|
name: "DataFormat",
|
||||||
props: ["data"],
|
props: ["date"],
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
time: ""
|
time: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.time = dataFormat(this.data);
|
this.time = dataFormat(this.date);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"$props.data"(props) {
|
"$props.date"(props) {
|
||||||
this.time = dataFormat(this.data);
|
this.time = dataFormat(this.date);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,22 +2,22 @@
|
|||||||
<text>{{time}}</text>
|
<text>{{time}}</text>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { dataFormatT } from "@/utils";
|
import { dateFormatT } from "@/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DataFormatT",
|
name: "DataFormatT",
|
||||||
props: ["data"],
|
props: ["date"],
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
time: ""
|
time: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.time = dataFormatT(this.data);
|
this.time = dateFormatT(this.date);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"$props.data"(props) {
|
"$props.date"(props) {
|
||||||
this.time = dataFormatT(this.data);
|
this.time = dateFormatT(this.date);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
export const weappPay = (option) => {
|
export const weappPay = (option) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// 吊起微信支付
|
// 吊起微信支付
|
||||||
|
console.log(option,9999)
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
...option,
|
...option,
|
||||||
timeStamp: option.timeStamp + '',
|
timeStamp: option.timeStamp + '',
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import App from './App'
|
|||||||
|
|
||||||
// import router from "./router";
|
// import router from "./router";
|
||||||
import store from "./store";
|
import store from "./store";
|
||||||
import animate from "animate.css";
|
|
||||||
import schema from "async-validator";
|
import schema from "async-validator";
|
||||||
import dialog from "./utils/dialog";
|
import dialog from "./utils/dialog";
|
||||||
import cookie from "@/utils/store/cookie";
|
import cookie from "@/utils/store/cookie";
|
||||||
@@ -25,7 +24,6 @@ import {
|
|||||||
VUE_APP_API_URL
|
VUE_APP_API_URL
|
||||||
} from "@/config";
|
} from "@/config";
|
||||||
|
|
||||||
Vue.use(animate);
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
Vue.config.devtools = process.env.NODE_ENV !== "production";
|
Vue.config.devtools = process.env.NODE_ENV !== "production";
|
||||||
|
|
||||||
@@ -82,24 +80,24 @@ Vue.prototype.$VUE_APP_API_URL = VUE_APP_API_URL
|
|||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// H5编译的代码
|
// H5编译的代码
|
||||||
Vue.prototype.$deviceType = 'H5'
|
Vue.prototype.$deviceType = 'h5'
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// App平台编译的代码
|
// App平台编译的代码
|
||||||
Vue.prototype.$deviceType = 'App'
|
Vue.prototype.$deviceType = 'app'
|
||||||
Vue.prototype.$platform = uni.getSystemInfoSync().platform
|
Vue.prototype.$platform = uni.getSystemInfoSync().platform
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// 微信小程序编译的代码
|
// 微信小程序编译的代码
|
||||||
Vue.prototype.$deviceType = 'Weixin'
|
Vue.prototype.$deviceType = 'weixin'
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
console.log(wx,121212)
|
console.log(wx,121212)
|
||||||
console.log(Vue.prototype.$deviceType)
|
console.log(Vue.prototype.$deviceType)
|
||||||
// if(wx){
|
// if(wx){
|
||||||
// Vue.prototype.$deviceType = 'Weixin'
|
// Vue.prototype.$deviceType = 'weixin'
|
||||||
// }
|
// }
|
||||||
|
|
||||||
app.$mount()
|
app.$mount()
|
||||||
|
|||||||
+21
-1
@@ -54,7 +54,27 @@
|
|||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {},
|
"ios" : {},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {}
|
"sdkConfigs" : {
|
||||||
|
"oauth" : {
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "",
|
||||||
|
"appsecret" : "",
|
||||||
|
"UniversalLinks" : ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"payment" : {
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "",
|
||||||
|
"UniversalLinks" : ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"share" : {
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "",
|
||||||
|
"UniversalLinks" : ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default {
|
|||||||
console.log(this.$store.getters.userInfo, '获取store里面的 userInfo');
|
console.log(this.$store.getters.userInfo, '获取store里面的 userInfo');
|
||||||
cookie.get("spread");
|
cookie.get("spread");
|
||||||
// this.toLaunch();
|
// this.toLaunch();
|
||||||
if (this.$deviceType == 'App') {
|
if (this.$deviceType == 'app') {
|
||||||
// this.toLaunch();
|
// this.toLaunch();
|
||||||
this.$yrouter.switchTab({
|
this.$yrouter.switchTab({
|
||||||
path: '/pages/home/index',
|
path: '/pages/home/index',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view v-if="!$store.getters.token&&$deviceType=='Weixin'">
|
<view v-if="!$store.getters.token&&$deviceType=='weixin'">
|
||||||
<view class="getUserInfo">
|
<view class="getUserInfo">
|
||||||
<text>您还未允许微信登录授权,请点击下方按钮允许微信授权登录。</text>
|
<text>您还未允许微信登录授权,请点击下方按钮允许微信授权登录。</text>
|
||||||
<button type="primary" open-type="getUserInfo" @getuserinfo="getUserInfo">允许微信登录授权</button>
|
<button type="primary" open-type="getUserInfo" @getuserinfo="getUserInfo">允许微信登录授权</button>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<button @click="back">取消微信登录授权</button>
|
<button @click="back">取消微信登录授权</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!$store.getters.token&&$deviceType!='Weixin'">
|
<view v-if="!$store.getters.token&&$deviceType!='weixin'&&$deviceType=='app'">
|
||||||
<view class="getUserInfo">
|
<view class="getUserInfo">
|
||||||
<text>请先登录</text>
|
<text>请先登录</text>
|
||||||
<button type="primary" @click="this.toLogin">去登录</button>
|
<button type="primary" @click="this.toLogin">去登录</button>
|
||||||
@@ -43,6 +43,7 @@
|
|||||||
...mapState(["isAuthorization"])
|
...mapState(["isAuthorization"])
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
this.UPDATE_AUTHORIZATIONPAGE(true);
|
this.UPDATE_AUTHORIZATIONPAGE(true);
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
|
|||||||
@@ -290,6 +290,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
goGoodsCon(item) {
|
goGoodsCon(item) {
|
||||||
|
console.log(item)
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: "/pages/shop/GoodsCon/index",
|
path: "/pages/shop/GoodsCon/index",
|
||||||
query: { id: item.id }
|
query: { id: item.id }
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
>拼团</text>
|
>拼团</text>
|
||||||
<text class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</text>
|
<text class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</text>
|
||||||
<text class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</text>
|
<text class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</text>
|
||||||
<data-format :data="order.addTime"></data-format>
|
<data-format :date="order.addTime"></data-format>
|
||||||
</view>
|
</view>
|
||||||
<view class="font-color-red">{{ getStatus(order) }}</view>
|
<view class="font-color-red">{{ getStatus(order) }}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -209,7 +209,7 @@ export default {
|
|||||||
orderList: [],
|
orderList: [],
|
||||||
pay: false,
|
pay: false,
|
||||||
payType: ["yue", "weixin"],
|
payType: ["yue", "weixin"],
|
||||||
from: isWeixin() ? "weixin" : "weixinh5"
|
from: this.$deviceType
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<view class="data" :class="refundOrder ? 'on' : ''">
|
<view class="data" :class="refundOrder ? 'on' : ''">
|
||||||
<view class="state">{{ orderInfo._status._msg }}</view>
|
<view class="state">{{ orderInfo._status._msg }}</view>
|
||||||
<view>
|
<view>
|
||||||
<data-format :data="orderInfo.addTime"></data-format>
|
<data-format :date="orderInfo.addTime"></data-format>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between">
|
||||||
<view>下单时间:</view>
|
<view>下单时间:</view>
|
||||||
<view class="conter">
|
<view class="conter">
|
||||||
<data-format :data="orderInfo.addTime"></data-format>
|
<data-format :date="orderInfo.addTime"></data-format>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between">
|
||||||
|
|||||||
@@ -481,6 +481,26 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "生成订单中"
|
title: "生成订单中"
|
||||||
});
|
});
|
||||||
|
let form = {}
|
||||||
|
if (this.$deviceType == 'app') {
|
||||||
|
form.form = 'app'
|
||||||
|
}
|
||||||
|
console.log(this.orderGroupInfo.orderKey, {
|
||||||
|
realName: this.contacts,
|
||||||
|
phone: this.contactsTel,
|
||||||
|
addressId: this.addressInfo.id,
|
||||||
|
useIntegral: this.useIntegral ? 1 : 0,
|
||||||
|
couponId: this.usableCoupon.id || 0,
|
||||||
|
payType: this.active,
|
||||||
|
pinkId: this.pinkId,
|
||||||
|
seckillId: this.orderGroupInfo.seckill_id,
|
||||||
|
combinationId: this.orderGroupInfo.combination_id,
|
||||||
|
bargainId: this.orderGroupInfo.bargain_id,
|
||||||
|
from: this.from,
|
||||||
|
mark: this.mark || "",
|
||||||
|
shippingType: parseInt(shipping_type) + 1,
|
||||||
|
...form
|
||||||
|
})
|
||||||
createOrder(this.orderGroupInfo.orderKey, {
|
createOrder(this.orderGroupInfo.orderKey, {
|
||||||
realName: this.contacts,
|
realName: this.contacts,
|
||||||
phone: this.contactsTel,
|
phone: this.contactsTel,
|
||||||
@@ -494,9 +514,11 @@
|
|||||||
bargainId: this.orderGroupInfo.bargain_id,
|
bargainId: this.orderGroupInfo.bargain_id,
|
||||||
from: this.from,
|
from: this.from,
|
||||||
mark: this.mark || "",
|
mark: this.mark || "",
|
||||||
shippingType: parseInt(shipping_type) + 1
|
shippingType: parseInt(shipping_type) + 1,
|
||||||
|
...form
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
console.log(res)
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
switch (data.status) {
|
switch (data.status) {
|
||||||
@@ -542,6 +564,7 @@
|
|||||||
break;
|
break;
|
||||||
case "WECHAT_PAY":
|
case "WECHAT_PAY":
|
||||||
weappPay(data.result.jsConfig).then(res => {
|
weappPay(data.result.jsConfig).then(res => {
|
||||||
|
console.log(res)
|
||||||
this.$yrouter.replace({
|
this.$yrouter.replace({
|
||||||
path: "/pages/order/OrderDetails/index",
|
path: "/pages/order/OrderDetails/index",
|
||||||
query: {
|
query: {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<view class="order-num">订单:{{ orderInfo.orderId }}</view>
|
<view class="order-num">订单:{{ orderInfo.orderId }}</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="time">
|
<text class="time">
|
||||||
<data-format :data="orderInfo.addTime"></data-format>
|
<data-format :date="orderInfo.addTime"></data-format>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between">
|
||||||
<view>下单时间:</view>
|
<view>下单时间:</view>
|
||||||
<view class="conter">
|
<view class="conter">
|
||||||
<data-format :data="orderInfo.addTime"></data-format>
|
<data-format :date="orderInfo.addTime"></data-format>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between">
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<text>订单号:{{ item.orderId }}</text>
|
<text>订单号:{{ item.orderId }}</text>
|
||||||
<text class="time">
|
<text class="time">
|
||||||
<text>下单时间:</text>
|
<text>下单时间:</text>
|
||||||
<data-format :data="item.addTime"></data-format>
|
<data-format :date="item.addTime"></data-format>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pos-order-goods" v-for="(val, key) in item.cartInfo" :key="key">
|
<view class="pos-order-goods" v-for="(val, key) in item.cartInfo" :key="key">
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import debounce from "lodash.debounce";
|
|
||||||
import { getCategory } from "@/api/store";
|
import { getCategory } from "@/api/store";
|
||||||
import { trim } from "@/utils";
|
import { trim } from "@/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,8 @@
|
|||||||
<view class="money font-color-red">
|
<view class="money font-color-red">
|
||||||
<text>¥</text>
|
<text>¥</text>
|
||||||
<text class="num">{{ storeInfo.price }}</text>
|
<text class="num">{{ storeInfo.price }}</text>
|
||||||
<text
|
<text class="vip-money" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">¥{{ storeInfo.vipPrice }}</text>
|
||||||
class="vip-money"
|
<image :src="$VUE_APP_RESOURCES_URL+'/images/vip.png'" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" />
|
||||||
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0"
|
|
||||||
>¥{{ storeInfo.vipPrice }}</text>
|
|
||||||
<image
|
|
||||||
:src="$VUE_APP_RESOURCES_URL+'/images/vip.png'"
|
|
||||||
class="image"
|
|
||||||
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view>
|
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -27,11 +20,7 @@
|
|||||||
<view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length">
|
<view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length">
|
||||||
<text class="hide line1 acea-row">
|
<text class="hide line1 acea-row">
|
||||||
<text>优惠券:</text>
|
<text>优惠券:</text>
|
||||||
<text
|
<text class="activity" v-for="(item, couponListEq) in couponList" :key="couponListEq">满{{ item.use_min_price }}减{{ item.coupon_price }}</text>
|
||||||
class="activity"
|
|
||||||
v-for="(item, couponListEq) in couponList"
|
|
||||||
:key="couponListEq"
|
|
||||||
>满{{ item.use_min_price }}减{{ item.coupon_price }}</text>
|
|
||||||
</text>
|
</text>
|
||||||
<view class="iconfont icon-jiantou"></view>
|
<view class="iconfont icon-jiantou"></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -110,11 +99,7 @@
|
|||||||
<view class="iconfont" :class="storeInfo.userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view>
|
<view class="iconfont" :class="storeInfo.userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view>
|
||||||
<text>收藏</text>
|
<text>收藏</text>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view @click="goShoppingCart()" class="item animated" :class="animated === true ? 'bounceIn' : ''">
|
||||||
@click="goShoppingCart()"
|
|
||||||
class="item animated"
|
|
||||||
:class="animated === true ? 'bounceIn' : ''"
|
|
||||||
>
|
|
||||||
<view class="iconfont icon-gouwuche1">
|
<view class="iconfont icon-gouwuche1">
|
||||||
<text class="num bg-color-red" v-if="CartCount > 0">{{CartCount}}</text>
|
<text class="num bg-color-red" v-if="CartCount > 0">{{CartCount}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -131,11 +116,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop>
|
<CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop>
|
||||||
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow>
|
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow>
|
||||||
<StorePoster
|
<StorePoster v-on:setPosterImageStatus="setPosterImageStatus" :posterImageStatus="posterImageStatus" :posterData="posterData"></StorePoster>
|
||||||
v-on:setPosterImageStatus="setPosterImageStatus"
|
|
||||||
:posterImageStatus="posterImageStatus"
|
|
||||||
:posterData="posterData"
|
|
||||||
></StorePoster>
|
|
||||||
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo>
|
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo>
|
||||||
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
|
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
|
||||||
<view class="item" v-if="weixinStatus === true" @click="setShareInfoStatus">
|
<view class="item" v-if="weixinStatus === true" @click="setShareInfoStatus">
|
||||||
@@ -149,13 +130,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="mask" @touchmove.prevent @click="listenerActionClose" v-show="posters"></view>
|
<view class="mask" @touchmove.prevent @click="listenerActionClose" v-show="posters"></view>
|
||||||
<view class="geoPage" v-if="mapShow">
|
<view class="geoPage" v-if="mapShow">
|
||||||
<iframe
|
<iframe width="100%" height="100%" frameborder="0" scrolling="no" :src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' +system_store.latitude +',' +system_store.longitude +'&referer=' +mapKey"></iframe>
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
frameborder="0"
|
|
||||||
scrolling="no"
|
|
||||||
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' +system_store.latitude +',' +system_store.longitude +'&referer=' +mapKey"
|
|
||||||
></iframe>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -181,10 +156,18 @@ import {
|
|||||||
getCollectDel,
|
getCollectDel,
|
||||||
getUserInfo
|
getUserInfo
|
||||||
} from "@/api/user";
|
} from "@/api/user";
|
||||||
import { isWeixin, PosterCanvas, handleQrCode } from "@/utils";
|
import {
|
||||||
|
isWeixin,
|
||||||
|
PosterCanvas,
|
||||||
|
handleQrCode
|
||||||
|
} from "@/utils";
|
||||||
// import { wechatEvevt } from "@/libs/wechat";
|
// import { wechatEvevt } from "@/libs/wechat";
|
||||||
import { imageBase64 } from "@/api/public";
|
import {
|
||||||
import { mapGetters } from "vuex";
|
imageBase64
|
||||||
|
} from "@/api/public";
|
||||||
|
import {
|
||||||
|
mapGetters
|
||||||
|
} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "GoodsCon",
|
name: "GoodsCon",
|
||||||
@@ -254,12 +237,13 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: mapGetters(["isLogin"]),
|
computed: mapGetters(["isLogin"]),
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
|
console.log(this)
|
||||||
let url = handleQrCode();
|
let url = handleQrCode();
|
||||||
console.log(url);
|
console.log(url);
|
||||||
if (url && url.productId) {
|
if (url && url.productId) {
|
||||||
this.id = url.productId;
|
this.id = url.productId;
|
||||||
} else {
|
} else {
|
||||||
this.id = this.$yroute.query.id;
|
this.id = this._route.query.id;
|
||||||
}
|
}
|
||||||
this.productCon();
|
this.productCon();
|
||||||
},
|
},
|
||||||
@@ -321,7 +305,12 @@ export default {
|
|||||||
//产品详情接口;
|
//产品详情接口;
|
||||||
productCon: function() {
|
productCon: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
getProductDetail(that.id)
|
let form = {}
|
||||||
|
if (this.$deviceType == 'app') {
|
||||||
|
form.form = 'app'
|
||||||
|
}
|
||||||
|
console.log(form, 2222)
|
||||||
|
getProductDetail(that.id, form)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
that.$set(that, "storeInfo", res.data.storeInfo);
|
that.$set(that, "storeInfo", res.data.storeInfo);
|
||||||
that.$set(that.attr, "productAttr", res.data.productAttr);
|
that.$set(that.attr, "productAttr", res.data.productAttr);
|
||||||
@@ -580,10 +569,8 @@ export default {
|
|||||||
productId: that.id,
|
productId: that.id,
|
||||||
cartNum: that.attr.productSelect.cart_num,
|
cartNum: that.attr.productSelect.cart_num,
|
||||||
new: news,
|
new: news,
|
||||||
uniqueId:
|
uniqueId: that.attr.productSelect !== undefined ?
|
||||||
that.attr.productSelect !== undefined
|
that.attr.productSelect.unique : ""
|
||||||
? that.attr.productSelect.unique
|
|
||||||
: ""
|
|
||||||
};
|
};
|
||||||
postCartAdd(q)
|
postCartAdd(q)
|
||||||
.then(function(res) {
|
.then(function(res) {
|
||||||
|
|||||||
@@ -79,7 +79,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import Recommend from "@/components/Recommend";
|
import Recommend from "@/components/Recommend";
|
||||||
import { getProducts } from "@/api/store";
|
import { getProducts } from "@/api/store";
|
||||||
import debounce from "lodash.debounce";
|
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ import {
|
|||||||
import { postCollectAll } from "@/api/user";
|
import { postCollectAll } from "@/api/user";
|
||||||
import { mul, add } from "@/utils/bc";
|
import { mul, add } from "@/utils/bc";
|
||||||
import cookie from "@/utils/store/cookie";
|
import cookie from "@/utils/store/cookie";
|
||||||
import debounce from "lodash.debounce";
|
|
||||||
|
|
||||||
const CHECKED_IDS = "cart_checked";
|
const CHECKED_IDS = "cart_checked";
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,14 @@
|
|||||||
<input type="password" placeholder="填写您的登录密码" v-model="password" />
|
<input type="password" placeholder="填写您的登录密码" v-model="password" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view>
|
||||||
|
<!-- <svg class="icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-phone_" />
|
||||||
|
</svg> -->
|
||||||
|
<input type="text" placeholder="输入邀请码" v-model="inviteCode" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="logon" @click="register">注册</view>
|
<view class="logon" @click="register">注册</view>
|
||||||
<view class="tip">
|
<view class="tip">
|
||||||
@@ -113,7 +121,9 @@
|
|||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import cookie from "@/utils/store/cookie";
|
import cookie from "@/utils/store/cookie";
|
||||||
|
|
||||||
import {handleGetUserInfo} from '@/utils'
|
import {
|
||||||
|
handleGetUserInfo
|
||||||
|
} from '@/utils'
|
||||||
|
|
||||||
const BACK_URL = "login_back_url";
|
const BACK_URL = "login_back_url";
|
||||||
|
|
||||||
@@ -127,6 +137,7 @@ import {handleGetUserInfo} from '@/utils'
|
|||||||
account: "",
|
account: "",
|
||||||
password: "",
|
password: "",
|
||||||
captcha: "",
|
captcha: "",
|
||||||
|
inviteCode:"",
|
||||||
formItem: 1,
|
formItem: 1,
|
||||||
type: "login"
|
type: "login"
|
||||||
};
|
};
|
||||||
@@ -211,6 +222,7 @@ import {handleGetUserInfo} from '@/utils'
|
|||||||
account: that.account,
|
account: that.account,
|
||||||
captcha: that.captcha,
|
captcha: that.captcha,
|
||||||
password: that.password,
|
password: that.password,
|
||||||
|
inviteCode: that.inviteCode,
|
||||||
spread: cookie.get("spread")
|
spread: cookie.get("spread")
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
|||||||
@@ -119,6 +119,14 @@
|
|||||||
<view class="by">
|
<view class="by">
|
||||||
<text class="by-text">By@意象</text>
|
<text class="by-text">By@意象</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="by">
|
||||||
|
<view>
|
||||||
|
<text class="by-text">Copyright © 2020</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<text class="by-text">漯河市大有前途网络科技有限公司</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="footer-line-height"></view>
|
<view class="footer-line-height"></view>
|
||||||
<!-- <SwitchWindow
|
<!-- <SwitchWindow
|
||||||
v-on:changeswitch="changeswitch"
|
v-on:changeswitch="changeswitch"
|
||||||
@@ -296,6 +304,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
console.log(this.$store.getters.token)
|
||||||
console.log(this.userInfo);
|
console.log(this.userInfo);
|
||||||
if (this.$store.getters.token) {
|
if (this.$store.getters.token) {
|
||||||
this.User();
|
this.User();
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
<view class="condition line1">购物满{{ item.useMinPrice }}元可用</view>
|
<view class="condition line1">购物满{{ item.useMinPrice }}元可用</view>
|
||||||
<view class="data acea-row row-between-wrapper">
|
<view class="data acea-row row-between-wrapper">
|
||||||
<view v-if="item.endTime !== 0">
|
<view v-if="item.endTime !== 0">
|
||||||
<data-format-t :data="item.startTime"></data-format-t>-
|
<data-format-t :date="item.startTime"></data-format-t>-
|
||||||
<data-format-t :data="item.endTime"></data-format-t>
|
<data-format-t :date="item.endTime"></data-format-t>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>不限时</view>
|
<view v-else>不限时</view>
|
||||||
<view class="bnt gray" v-if="item.isUse === true">已领取</view>
|
<view class="bnt gray" v-if="item.isUse === true">已领取</view>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<view class="condition line1">{{ item.couponTitle }}</view>
|
<view class="condition line1">{{ item.couponTitle }}</view>
|
||||||
<view class="data acea-row row-between-wrapper">
|
<view class="data acea-row row-between-wrapper">
|
||||||
<view v-if="item.endTime === 0">不限时</view>
|
<view v-if="item.endTime === 0">不限时</view>
|
||||||
<view v-else><data-format-t :data="item.addTime"></data-format-t> - <data-format-t :data="item.endTime"></data-format-t></view>
|
<view v-else><data-format-t :date="item.addTime"></data-format-t> - <data-format-t :date="item.endTime"></data-format-t></view>
|
||||||
<view class="bnt gray" v-if="item._type === 0">{{ item._msg }}</view>
|
<view class="bnt gray" v-if="item._type === 0">{{ item._msg }}</view>
|
||||||
<view class="bnt bg-color-red" v-else>{{ item._msg }}</view>
|
<view class="bnt bg-color-red" v-else>{{ item._msg }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -14,7 +14,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||||
import { getSpreadImg } from "@/api/user";
|
import {
|
||||||
|
getSpreadImg
|
||||||
|
} from "@/api/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Poster",
|
name: "Poster",
|
||||||
@@ -59,7 +61,11 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getIndex: function() {
|
getIndex: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
getSpreadImg().then(
|
let form = {}
|
||||||
|
if (this.$deviceType == 'app') {
|
||||||
|
form.form = 'app'
|
||||||
|
}
|
||||||
|
getSpreadImg(form).then(
|
||||||
res => {
|
res => {
|
||||||
that.info = res.data;
|
that.info = res.data;
|
||||||
},
|
},
|
||||||
@@ -80,8 +86,7 @@ export default {
|
|||||||
if (!wx.saveImageToPhotosAlbum) {
|
if (!wx.saveImageToPhotosAlbum) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content:
|
content: "当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"
|
||||||
"当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"
|
|
||||||
});
|
});
|
||||||
that.openDialogVisible = true;
|
that.openDialogVisible = true;
|
||||||
|
|
||||||
@@ -132,12 +137,15 @@ export default {
|
|||||||
.distribution-posters {
|
.distribution-posters {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banenr {
|
.banenr {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner swiper {
|
.banner swiper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner .slide-image {
|
.banner .slide-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="state">{{ item.title }}</view>
|
<view class="state">{{ item.title }}</view>
|
||||||
<view>
|
<view>
|
||||||
<data-format :data="item.addTime"></data-format>
|
<data-format :date="item.addTime"></data-format>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="num" v-if="item.pm == 1">+{{ item.number }}</view>
|
<view class="num" v-if="item.pm == 1">+{{ item.number }}</view>
|
||||||
|
|||||||
+3
-3
@@ -35,7 +35,7 @@ export function dataFormat(time, option) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function dataFormatT(time) {
|
export function dateFormatT(time) {
|
||||||
time = +time * 1000;
|
time = +time * 1000;
|
||||||
const d = new Date(time);
|
const d = new Date(time);
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ export const replaceLogin = (msg) => {
|
|||||||
// 这里代表已经失去登录状态以及401强制推出登录了
|
// 这里代表已经失去登录状态以及401强制推出登录了
|
||||||
store.commit('LOGOUT')
|
store.commit('LOGOUT')
|
||||||
console.log(uni, 989)
|
console.log(uni, 989)
|
||||||
if (Vue.prototype.$deviceType == 'Weixin') {
|
if (Vue.prototype.$deviceType == 'weixin') {
|
||||||
// 如果是微信小程序,跳转到授权页
|
// 如果是微信小程序,跳转到授权页
|
||||||
replace({
|
replace({
|
||||||
path: '/pages/authorization/index',
|
path: '/pages/authorization/index',
|
||||||
@@ -199,7 +199,7 @@ export const login = (option) => {
|
|||||||
console.log(user)
|
console.log(user)
|
||||||
console.log(`用户昵称为 | ${user.userInfo.nickName}`);
|
console.log(`用户昵称为 | ${user.userInfo.nickName}`);
|
||||||
console.log(`当前的环境 | ${Vue.prototype.$deviceType}`)
|
console.log(`当前的环境 | ${Vue.prototype.$deviceType}`)
|
||||||
if (Vue.prototype.$deviceType == 'Weixin') {
|
if (Vue.prototype.$deviceType == 'weixin') {
|
||||||
wxappAuth({
|
wxappAuth({
|
||||||
encryptedData: user.encryptedData,
|
encryptedData: user.encryptedData,
|
||||||
iv: user.iv,
|
iv: user.iv,
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ function baseRequest(options) {
|
|||||||
return fly.request(url, params || data, {
|
return fly.request(url, params || data, {
|
||||||
...option
|
...option
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
console.log(url,params,data, ...option)
|
||||||
const data = res.data || {};
|
const data = res.data || {};
|
||||||
if (res.status !== 200)
|
if (res.status !== 200)
|
||||||
return Promise.reject({ msg: "请求失败", res, data });
|
return Promise.reject({ msg: "请求失败", res, data });
|
||||||
|
|||||||
Reference in New Issue
Block a user