Compare commits
39 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
89f6beb337 | ||
![]() |
c42cf88d26 | ||
![]() |
29153eeb59 | ||
![]() |
10e260bbcc | ||
![]() |
5885261a60 | ||
![]() |
4ad08f699d | ||
![]() |
6e2aafcb4f | ||
![]() |
c14a514b5e | ||
![]() |
0d8a2d87fc | ||
![]() |
29c0fa7add | ||
![]() |
483684f729 | ||
![]() |
9b9911660e | ||
![]() |
018dc3e3f8 | ||
![]() |
5810ccd5a8 | ||
![]() |
c9cbc6a43c | ||
![]() |
74377c7dd8 | ||
![]() |
da13b53bbd | ||
![]() |
7837a9cd83 | ||
![]() |
8e59fddcc5 | ||
![]() |
00f73db305 | ||
![]() |
5ce6dd0e9e | ||
![]() |
cc5ff53177 | ||
![]() |
fbbaf79080 | ||
![]() |
b4c6386686 | ||
![]() |
b8178bdf2b | ||
![]() |
893ca1ed81 | ||
![]() |
1231351d29 | ||
![]() |
24415dc4ad | ||
![]() |
42b860b90e | ||
![]() |
05ef84a30b | ||
![]() |
133493ecb8 | ||
67063a6190 | |||
222d240bd7 | |||
![]() |
acb22b28da | ||
![]() |
1054b127c4 | ||
![]() |
4261b729f1 | ||
ea83d7c29c | |||
![]() |
273fa133ed | ||
![]() |
0379a03adc |
131
App.vue
131
App.vue
@ -10,7 +10,6 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// #ifdef APP-PLUS
|
||||
let jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
import { initEvent } from "@/utils/uniMPevent.js";
|
||||
// #endif
|
||||
import {
|
||||
checkLogin
|
||||
@ -74,43 +73,8 @@
|
||||
...uni.getStorageSync('GLOBAL_DATA') || {}
|
||||
},
|
||||
onLaunch: function(option) {
|
||||
// #ifdef H5
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
visible: false
|
||||
})
|
||||
// #endif
|
||||
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
this.globalData.uid = this.$store.state.app.uid;
|
||||
// let appkey = uni.getStorage({
|
||||
// key: 'launchFlag'
|
||||
// })
|
||||
// if (appkey) {
|
||||
// setTimeout(() => {
|
||||
// this.$store.dispatch('INIT_CONFIG');
|
||||
// }, 6000)
|
||||
// }
|
||||
this.$store.dispatch('INIT_CONFIG');
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
//初始化uniMP小程序发送的事件以及其他操作
|
||||
initEvent();
|
||||
// #endif
|
||||
|
||||
// uni.getLocation({
|
||||
// type: 'gcj02',
|
||||
// geocode: true,
|
||||
// isHighAccuracy: true,
|
||||
// // altitude: true,
|
||||
// // accuracy: 'best',
|
||||
// success: (res)=> {
|
||||
// console.log(res);
|
||||
// },
|
||||
// fail(e) {
|
||||
// console.log(e);
|
||||
// }
|
||||
// });
|
||||
|
||||
this.globalData.uid = this.$store.state.app.uid
|
||||
let that = this;
|
||||
// #ifdef MP
|
||||
if (HTTP_REQUEST_URL == '') {
|
||||
@ -162,7 +126,7 @@
|
||||
that.getConfigData()
|
||||
|
||||
//#ifdef APP-PLUS
|
||||
this.checknetwork()
|
||||
|
||||
|
||||
jpushModule.setLoggerEnable(true);
|
||||
jpushModule.initJPushService()
|
||||
@ -171,7 +135,6 @@
|
||||
// console.log("jpush连接", connectEnable)
|
||||
})
|
||||
|
||||
|
||||
// 设置别名
|
||||
// jpushModule.setAlias({
|
||||
// 'alias': uni.getStorageSync('userId'),
|
||||
@ -228,8 +191,6 @@
|
||||
|
||||
},
|
||||
onShow() {
|
||||
|
||||
|
||||
let that = this
|
||||
// 记录H5和公众号
|
||||
if (this.$store.state.app.token) {
|
||||
@ -257,75 +218,7 @@
|
||||
}, 1500)
|
||||
// #endif
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
//网络检测
|
||||
checknetwork() {
|
||||
|
||||
uni.onNetworkStatusChange(function(res) {
|
||||
|
||||
if (res.isConnected) {
|
||||
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
} else {
|
||||
|
||||
uni.showModal({
|
||||
|
||||
title: '系统提示',
|
||||
|
||||
content: '当前设备无网络或网络较差',
|
||||
|
||||
cancelText: '取消',
|
||||
|
||||
confirmText: '确定',
|
||||
|
||||
success: (res) => {
|
||||
|
||||
if (res.confirm) {
|
||||
|
||||
uni.reLaunch({
|
||||
|
||||
url: '/pages/index/index'
|
||||
|
||||
})
|
||||
|
||||
} else {
|
||||
|
||||
// #ifdef H5
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/login_copy'
|
||||
})
|
||||
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
|
||||
plus.runtime.quit()
|
||||
|
||||
// #endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 语音播报
|
||||
*
|
||||
@ -356,9 +249,9 @@
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 微信分享;
|
||||
setOpenShare: function(data) {
|
||||
// #ifdef H5
|
||||
let that = this;
|
||||
let href = location.href;
|
||||
href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this
|
||||
@ -374,7 +267,6 @@
|
||||
that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
|
||||
configAppMessage);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
// 获取配置
|
||||
getConfigData() {
|
||||
@ -414,7 +306,6 @@
|
||||
this.globalData.community_reply_auth = res.data.community_reply_auth
|
||||
this.globalData.margin_ico_switch = res.data.margin_ico_switch
|
||||
this.globalData.margin_ico = res.data.margin_ico
|
||||
// console.log(res.data.global_theme.theme + "我是")
|
||||
this.$store.commit("VIEW_COLOR", res.data.global_theme.theme)
|
||||
this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type)
|
||||
try {
|
||||
@ -426,7 +317,7 @@
|
||||
this.setOpenShare(res.data);
|
||||
// #endif
|
||||
}).catch(err => {});
|
||||
},
|
||||
}
|
||||
},
|
||||
onHide: function() {
|
||||
//console.log('App Hide')
|
||||
@ -434,14 +325,12 @@
|
||||
watch: {
|
||||
// 记录H5和公众号
|
||||
$route(n) {
|
||||
// #ifdef H5
|
||||
if (this.$store.state.app.token) {
|
||||
// 浏览记录
|
||||
history({
|
||||
page: location.pathname + location.search,
|
||||
}).then(() => {});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -453,10 +342,8 @@
|
||||
@import 'static/iconfont/iconfont.css';
|
||||
@import 'static/iconfont/iconlihai.css';
|
||||
@import 'static/iconfont/icontan.css';
|
||||
@import 'static/iconfont/demo.css';
|
||||
@import 'static/css/style.scss';
|
||||
|
||||
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@ -480,17 +367,9 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: -50rpx;
|
||||
margin-top: -40rpx;
|
||||
// box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3);
|
||||
}
|
||||
|
||||
.custom_style-txt {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 5rpx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.bg-color-red {
|
||||
|
@ -261,53 +261,4 @@ export function spuTopList(data) {
|
||||
return request.get(`product/spu/get_hot_ranking`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
// 活动列表
|
||||
export function consumption(data) {
|
||||
return request.get(`storeActivity/consumption`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
// 参加活动
|
||||
export function chooseConsumption(data) {
|
||||
return request.post(`storeActivity/choose`, data);
|
||||
}
|
||||
|
||||
// 拉新红包活动完成状态
|
||||
export function storeActivityStatus(data) {
|
||||
return request.get(`storeActivity/status`, data);
|
||||
}
|
||||
|
||||
// 领取红包
|
||||
export function storeActivityReceive(data) {
|
||||
return request.post(`storeActivity/receive`, data);
|
||||
}
|
||||
|
||||
// 拉新红包活动完成状态
|
||||
export function storeActivityRecord(data) {
|
||||
return request.get(`storeActivity/record`, data);
|
||||
}
|
||||
|
||||
// 红包余额统计
|
||||
export function storeActivityTotal(data) {
|
||||
return request.get(`storeActivity/total`, data);
|
||||
}
|
||||
|
||||
// 生成二维码
|
||||
export function storeActivityQrcode(data) {
|
||||
return request.get(`qrcode`, data);
|
||||
}
|
||||
|
||||
// 活动商品专区
|
||||
export function storeActivityProduct(data) {
|
||||
return request.get(`storeActivity/product`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
// 活动区域列表
|
||||
export function storeActivityDistrict(data) {
|
||||
return request.get(`storeActivity/district`, data);
|
||||
}
|
||||
}
|
123
api/admin.js
123
api/admin.js
@ -13,107 +13,81 @@ import request from "@/utils/request.js";
|
||||
* 统计数据
|
||||
*/
|
||||
export function getStatisticsInfo() {
|
||||
return request.get("admin/order/statistics", {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get("admin/order/statistics", {}, { login: true });
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单月统计
|
||||
*/
|
||||
export function getStatisticsMonth(where) {
|
||||
return request.get("admin/order/data", where, {
|
||||
login: true
|
||||
});
|
||||
return request.get("admin/order/data", where, { login: true });
|
||||
}
|
||||
/**
|
||||
* 订单月统计
|
||||
*/
|
||||
export function getAdminOrderList(where) {
|
||||
return request.get("admin/order/list", where, {
|
||||
login: true
|
||||
});
|
||||
return request.get("admin/order/list", where, { login: true });
|
||||
}
|
||||
/**
|
||||
* 订单改价
|
||||
*/
|
||||
export function setAdminOrderPrice(merId, id, data) {
|
||||
return request.post("admin/" + merId + "/price/" + id, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post("admin/" + merId + "/price/" + id, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 同意先货后款
|
||||
*/
|
||||
export function postconfirm(merId, data) {
|
||||
return request.post("admin/" + merId + "/confirm", data, {
|
||||
login: true
|
||||
});
|
||||
return request.post("admin/" + merId + "/confirm" , data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 先货后款订单结算
|
||||
*/
|
||||
export function postsettle(merId, data) {
|
||||
return request.post("admin/" + merId + "/settle", data, {
|
||||
login: true
|
||||
});
|
||||
return request.post("admin/" + merId + "/settle" , data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
export function setAdminOrderRemark(merId, id, data) {
|
||||
return request.post("admin/" + merId + "/mark/" + id, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post("admin/" + merId + "/mark/" + id, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 订单详情
|
||||
*/
|
||||
export function getAdminOrderDetail(merId, orderId) {
|
||||
return request.get("admin/" + merId + "/order/" + orderId, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get("admin/" + merId + "/order/" + orderId, {}, { login: true });
|
||||
}
|
||||
/**
|
||||
* 订单发货信息获取
|
||||
*/
|
||||
export function getAdminOrderDelivery(orderId) {
|
||||
return request.get("admin/order/delivery/gain/" + orderId, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get("admin/order/delivery/gain/" + orderId, {}, { login: true });
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单发货保存
|
||||
*/
|
||||
export function setAdminOrderDelivery(merId, id, data) {
|
||||
return request.post("admin/" + merId + "/delivery/" + id, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post("admin/" + merId + "/delivery/" + id, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 订单统计图
|
||||
*/
|
||||
export function getStatisticsTime(data) {
|
||||
return request.get("admin/order/time", data, {
|
||||
login: true
|
||||
});
|
||||
return request.get("admin/order/time", data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 线下付款订单确认付款
|
||||
*/
|
||||
export function setOfflinePay(merId, data) {
|
||||
return request.post("admin/" + merId + "/order/offline", data, {
|
||||
login: true
|
||||
});
|
||||
return request.post("admin/" + merId + "/order/offline", data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 订单确认退款
|
||||
*/
|
||||
export function setOrderRefund(merId, data) {
|
||||
return request.post("admin/" + merId + "/order/refund", data, {
|
||||
login: true
|
||||
});
|
||||
return request.post("admin/" + merId + "/order/refund", data, { login: true });
|
||||
}
|
||||
|
||||
/**
|
||||
@ -121,9 +95,7 @@ export function setOrderRefund(merId, data) {
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getLogistics() {
|
||||
return request.get("logistics", {}, {
|
||||
login: false
|
||||
});
|
||||
return request.get("logistics", {}, { login: false });
|
||||
}
|
||||
|
||||
/**
|
||||
@ -131,7 +103,7 @@ export function getLogistics() {
|
||||
* @returns {*}
|
||||
*/
|
||||
export function orderVerific(merId, id, data) {
|
||||
return request.post(`verifier/${merId}/${id}`, data);
|
||||
return request.post(`verifier/${merId}/${id}`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -139,7 +111,7 @@ export function orderVerific(merId, id, data) {
|
||||
* @returns {*}
|
||||
*/
|
||||
export function verifierOrder(mer_id, code) {
|
||||
return request.get("verifier/" + mer_id + "/order/" + code);
|
||||
return request.get("verifier/" + mer_id + "/order/" + code);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -147,144 +119,117 @@ export function verifierOrder(mer_id, code) {
|
||||
* @returns {*}
|
||||
*/
|
||||
export function orderStatistics(mer_id, data) {
|
||||
return request.get("admin/" + mer_id + "/statistics", data);
|
||||
}
|
||||
/**
|
||||
* 订单
|
||||
* @returns {*}
|
||||
*/
|
||||
export function orderStat(data) {
|
||||
return request.get("admin/1/statistics", data);
|
||||
return request.get("admin/" + mer_id + "/statistics", data);
|
||||
}
|
||||
/**
|
||||
* 每日成交额
|
||||
* @returns {*}
|
||||
*/
|
||||
export function orderPrice(where, mer_id) {
|
||||
return request.get("admin/" + mer_id + "/order_price", where, {
|
||||
login: true
|
||||
});
|
||||
return request.get("admin/" + mer_id + "/order_price", where, { login: true });
|
||||
}
|
||||
/**
|
||||
* 订单列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getOrderList(where, merId) {
|
||||
return request.get(`admin/${merId}/order_list`, where, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`admin/${merId}/order_list`, where, { login: true });
|
||||
}
|
||||
/**
|
||||
* 退款订单列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getRefundOrderList(where, merId) {
|
||||
return request.get(`server/${merId}/refund/lst`, where, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/refund/lst`, where, { login: true });
|
||||
}
|
||||
/**
|
||||
* 营业额统计
|
||||
* @returns {*}
|
||||
*/
|
||||
export function turnoverStatistics(where, merId) {
|
||||
return request.get(`admin/${merId}/pay_price`, where, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`admin/${merId}/pay_price`, where, { login: true });
|
||||
}
|
||||
/**
|
||||
* 订单统计
|
||||
* @returns {*}
|
||||
*/
|
||||
export function orderNumberStatistics(where, merId) {
|
||||
return request.get(`admin/${merId}/pay_number`, where, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`admin/${merId}/pay_number`, where, { login: true });
|
||||
}
|
||||
/**
|
||||
* 获取订单打印默认配置
|
||||
* @returns {*}
|
||||
*/
|
||||
export function orderDeliveryInfo(merId) {
|
||||
return request.get(`admin/${merId}/mer_form`);
|
||||
return request.get(`admin/${merId}/mer_form`);
|
||||
}
|
||||
/**
|
||||
* 获取电子面单列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function orderExportTemp(data) {
|
||||
return request.get("store/expr/temps", data);
|
||||
return request.get("store/expr/temps", data);
|
||||
}
|
||||
/**
|
||||
* 是否开始电子面单和同城配送
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getTempAndDelivery(merId) {
|
||||
return request.get(`admin/${merId}/delivery_config`);
|
||||
return request.get(`admin/${merId}/delivery_config`);
|
||||
}
|
||||
/**
|
||||
* 获取同城配送门店列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getDeliveryStoreLst(merId) {
|
||||
return request.get(`admin/${merId}/delivery_options`);
|
||||
return request.get(`admin/${merId}/delivery_options`);
|
||||
}
|
||||
/**
|
||||
* 退款订单信息
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getRefundOrderInfo(merId, id) {
|
||||
return request.get(`server/${merId}/refund/get/${id}`);
|
||||
return request.get(`server/${merId}/refund/get/${id}`);
|
||||
}
|
||||
/**
|
||||
* 提交退款订单信息
|
||||
* @returns {*}
|
||||
*/
|
||||
export function refundOrderSubmit(merId, id, data) {
|
||||
return request.post(`server/${merId}/refund/status/${id}`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/refund/status/${id}`, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 退款单确认收货
|
||||
* @returns {*}
|
||||
*/
|
||||
export function refundOrderReceive(merId, id) {
|
||||
return request.post(`server/${merId}/refund/confirm/${id}`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/refund/confirm/${id}`, {}, { login: true });
|
||||
}
|
||||
/**
|
||||
* 退款单详情
|
||||
*/
|
||||
export function getRefundOrderDetail(merId, orderId) {
|
||||
return request.get(`server/${merId}/refund/detail/${orderId}`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/refund/detail/${orderId}`, {}, { login: true });
|
||||
}
|
||||
/**
|
||||
* 添加退款单备注信息
|
||||
*/
|
||||
export function setRefundMark(merId, orderId, data) {
|
||||
return request.post(`server/${merId}/refund/mark/${orderId}`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/refund/mark/${orderId}`, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 去核销
|
||||
* @param object data
|
||||
*/
|
||||
export function orderCancellation(merId, id) {
|
||||
return request.post(`admin/${merId}/verify/${id}`);
|
||||
return request.post(`admin/${merId}/verify/${id}`);
|
||||
}
|
||||
/**
|
||||
* 去核销
|
||||
* @param object data
|
||||
*/
|
||||
export function purchaseOrder(where, merId) {
|
||||
return request.get(`admin/${merId}/purchaseOrder`, where, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`admin/${merId}/purchaseOrder`, where, { login: true });
|
||||
}
|
||||
|
||||
/**
|
||||
@ -292,5 +237,5 @@ export function purchaseOrder(where, merId) {
|
||||
* @param object data
|
||||
*/
|
||||
export function logisticsCode(id) {
|
||||
return request.get(`order/logistics_code/${id}`);
|
||||
return request.get(`order/logistics_code/${id}`);
|
||||
}
|
36
api/api.js
36
api/api.js
@ -5,17 +5,8 @@ import request from "@/utils/request.js";
|
||||
*
|
||||
*/
|
||||
export function cloudWarehouse(data) {
|
||||
return request.get("store/product/cloudWarehouse", data, { noAuth: true });
|
||||
return request.get("store/product/cloudWarehouse", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 为你推荐
|
||||
*
|
||||
*/
|
||||
export function spuRecommend(data) {
|
||||
return request.get("product/spu/recommend", data, { noAuth: true });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取云仓分类
|
||||
*
|
||||
@ -112,10 +103,6 @@ export function getUserCoupons(data) {
|
||||
export function getArticleCategoryList() {
|
||||
return request.get('article/category/lst', {}, { noAuth: true })
|
||||
}
|
||||
|
||||
export function getArticleCategoryLists() {
|
||||
return request.get('article/category/lst?is_home='+1, {}, { noAuth: true })
|
||||
}
|
||||
/**
|
||||
* 文章列表
|
||||
* @param int cid
|
||||
@ -299,23 +286,4 @@ export function village(data) {
|
||||
*/
|
||||
export function brigade(data) {
|
||||
return request.get('v2/system/brigade', data, { noAuth: true });
|
||||
}
|
||||
|
||||
/*
|
||||
生产 -- 获取商户押金信息支付接口
|
||||
*/
|
||||
export function paymerchant() {
|
||||
return request.post(`user/margin`,{});
|
||||
}
|
||||
|
||||
/*
|
||||
生产 -- 获取商户押金信息接口
|
||||
*/
|
||||
export function merchant(data) {
|
||||
return request.get(`store/merchant/margin`, data);
|
||||
}
|
||||
|
||||
//获取押金缴纳列表
|
||||
export function marginlist(data) {
|
||||
return request.get(`user/margin/list`,data);
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/requesta.js";
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/** 获取话题分类*/
|
||||
export function getTopicList() {
|
||||
@ -82,18 +82,11 @@ export function videoList(data) {
|
||||
});
|
||||
}
|
||||
/**自己的视频列表*/
|
||||
export function deoList(id) {
|
||||
return request.get(`community/show/${id}`, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
export function myVideoList(id,data) {
|
||||
return request.get(`community/user/community_video/${id}`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**文章点赞*/
|
||||
export function graphicStartApi(id, status) {
|
||||
return request.post(`community/start/${id}`, status);
|
||||
|
151
api/live.js
151
api/live.js
@ -1,151 +0,0 @@
|
||||
import request from "@/utils/requestc.js";
|
||||
import requesta from "@/utils/request.js";
|
||||
/**
|
||||
* 直播列表
|
||||
*/
|
||||
export function live(data) {
|
||||
return request.get("zhibo/live" ,data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播详情
|
||||
*/
|
||||
export function liveDetail(data) {
|
||||
return request.get("zhibo/liveDetail" ,data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取直播详情接口
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 创建直播间
|
||||
*/
|
||||
export function createPushLive(data) {
|
||||
return request.post("zhibo/createPushLive", data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 关闭直播间
|
||||
*/
|
||||
export function stopPushLive(data) {
|
||||
return request.post("zhibo/stopPushLive", data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 绑定用户client客户
|
||||
*/
|
||||
export function bindUser(data) {
|
||||
return request.post("zhibo/bindUser", data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 加入直播间聊天室
|
||||
*/
|
||||
export function joinChatRoom(data) {
|
||||
return request.post("zhibo/joinChatRoom", data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 直播间聊天室发言
|
||||
*/
|
||||
export function sendGroupMessage(data) {
|
||||
return request.post("zhibo/sendGroupMessage", data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//商品列表
|
||||
export function good(data) {
|
||||
return requesta.get("product/spu/lst", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
*/
|
||||
export function getUserInfo() {
|
||||
return request.get('user');
|
||||
}
|
||||
|
||||
|
||||
//关注
|
||||
export function getfans(id,data) {
|
||||
return requesta.post('community/fans/'+id,data);
|
||||
}
|
||||
|
||||
//我关注的人
|
||||
export function getfocuslst(data) {
|
||||
return requesta.post('community/focus/lst',data);
|
||||
}
|
||||
|
||||
//关注我的人
|
||||
export function getfanslst(data) {
|
||||
return requesta.get('community/fans/lst',data);
|
||||
}
|
||||
|
||||
//用户送礼
|
||||
export function reward(data) {
|
||||
return request.post('zhibo/reward',data);
|
||||
}
|
||||
//获取礼物
|
||||
export function rewardList(data) {
|
||||
return requesta.get('zhibo/rewardList',data);
|
||||
}
|
||||
|
||||
//获取礼物
|
||||
export function giftList(data) {
|
||||
return request.get('zhibo/giftList',data);
|
||||
}
|
||||
|
||||
//获取房间人数
|
||||
export function liveAudience(data) {
|
||||
return request.get('zhibo/liveAudience',data);
|
||||
}
|
||||
|
||||
//获取用户余额
|
||||
export function getuser(data) {
|
||||
return requesta.get('user',data);
|
||||
}
|
||||
|
||||
|
||||
//送礼
|
||||
export function sendGift(data) {
|
||||
return request.post('zhibo/sendGift',data);
|
||||
}
|
||||
|
||||
|
||||
//获取主播关注人数
|
||||
export function fansNum(data) {
|
||||
return requesta.get('zhibo/fansNum',data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 充值金额选择
|
||||
*/
|
||||
export function getRechargeApi() {
|
||||
return requesta.get("common/recharge_quota");
|
||||
}
|
||||
|
||||
//历史直播记录
|
||||
|
||||
export function playbackList(data) {
|
||||
return request.get("zhibo/playbackList",data);
|
||||
}
|
||||
|
||||
//获取直播回放详情
|
||||
export function playbackDetail(data) {
|
||||
return request.get("zhibo/playbackDetail",data);
|
||||
}
|
||||
//获取观众关注主播状态
|
||||
export function getAjuser(id) {
|
||||
return requesta.get(`community/user/info/${id}`);
|
||||
}
|
@ -326,12 +326,4 @@ export function applyInvoiceApi(id, data) {
|
||||
*/
|
||||
export function refundCancelApi(id) {
|
||||
return request.post(`refund/cancel/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 售后
|
||||
* @param object data
|
||||
*/
|
||||
export function refundlist(data) {
|
||||
return request.get(`refund/list`,data);
|
||||
}
|
159
api/product.js
159
api/product.js
@ -13,18 +13,11 @@ import request from "@/utils/request.js";
|
||||
* 获取商品详情
|
||||
*/
|
||||
export const getProductDetailsAPI = (data) => request.get('micro/product_details', data)
|
||||
|
||||
/**
|
||||
*商品列表
|
||||
*/
|
||||
export const spuInfo = (id, data) => request.get('product/spu/street/' + id, data)
|
||||
|
||||
|
||||
/**
|
||||
* 线下导入
|
||||
*/
|
||||
export function postImport(merid, data) {
|
||||
return request.post(`server/${merid}/product/stockIn`, data);
|
||||
export function postImport(merid,data) {
|
||||
return request.post(`server/${merid}/product/stockIn`, data);
|
||||
}
|
||||
/**
|
||||
* 获取商户基本信息 http://127.0.0.1:8324/api/store/merchant/info?id=4
|
||||
@ -38,26 +31,20 @@ export const merchantUpdateAPI = (data) => request.post('store/merchant/update',
|
||||
* 商品列表
|
||||
*/
|
||||
export function productLstApi(merId, data) {
|
||||
return request.get(`server/${merId}/product/lst`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/product/lst`, data, { login: true });
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品列表 -- 删除
|
||||
*/
|
||||
export function productDeleteApi(merId, id) {
|
||||
return request.post(`server/${merId}/product/delete/${id}`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/product/delete/${id}`, {}, { login: true });
|
||||
}
|
||||
/**
|
||||
* 商品列表 -- 上下架
|
||||
*/
|
||||
export function productOffApi(merId, id, data) {
|
||||
return request.post(`server/${merId}/product/status/${id}`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/product/status/${id}`, data, { login: true });
|
||||
}
|
||||
|
||||
/*
|
||||
@ -65,9 +52,7 @@ export function productOffApi(merId, id, data) {
|
||||
*/
|
||||
|
||||
export function productTitle(merId, data) {
|
||||
return request.get(`server/${merId}/product/title`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/product/title`, data, { login: true });
|
||||
}
|
||||
|
||||
/*
|
||||
@ -75,9 +60,7 @@ export function productTitle(merId, data) {
|
||||
*/
|
||||
|
||||
export function productDestory(merId, id, data) {
|
||||
return request.post(`server/${merId}/product/destory/${id}`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/product/destory/${id}`, data, { login: true });
|
||||
}
|
||||
|
||||
/*
|
||||
@ -85,9 +68,7 @@ export function productDestory(merId, id, data) {
|
||||
*/
|
||||
|
||||
export function productRestore(merId, id) {
|
||||
return request.post(`server/${merId}/product/restore/${id}`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/product/restore/${id}`, {}, { login: true });
|
||||
}
|
||||
|
||||
/*
|
||||
@ -95,9 +76,7 @@ export function productRestore(merId, id) {
|
||||
*/
|
||||
|
||||
export function categoryBrandlist(merId) {
|
||||
return request.get(`server/${merId}/category/brandlist`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/category/brandlist`, {}, { login: true });
|
||||
}
|
||||
|
||||
/*
|
||||
@ -105,9 +84,7 @@ export function categoryBrandlist(merId) {
|
||||
*/
|
||||
|
||||
export function categorySelect(merId) {
|
||||
return request.get(`server/${merId}/category/select`, {}, {
|
||||
login: true
|
||||
})
|
||||
return request.get(`server/${merId}/category/select`, {}, { login: true })
|
||||
}
|
||||
|
||||
/*
|
||||
@ -115,9 +92,7 @@ export function categorySelect(merId) {
|
||||
*/
|
||||
|
||||
export function categoryList(merId) {
|
||||
return request.get(`server/${merId}/category/list`, {}, {
|
||||
login: true
|
||||
})
|
||||
return request.get(`server/${merId}/category/list`, {}, { login: true })
|
||||
}
|
||||
|
||||
/*
|
||||
@ -125,17 +100,13 @@ export function categoryList(merId) {
|
||||
*/
|
||||
|
||||
export function productCreate(merId, data) {
|
||||
return request.post(`server/${merId}/product/create`, data, {
|
||||
login: true
|
||||
})
|
||||
return request.post(`server/${merId}/product/create`, data, { login: true })
|
||||
}
|
||||
/**
|
||||
* 商品列表 -- 设置推荐
|
||||
*/
|
||||
export function productRecommendApi(merId, id, data) {
|
||||
return request.post(`server/${merId}/product/good/${id}`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/product/good/${id}`, data, { login: true });
|
||||
}
|
||||
|
||||
/*
|
||||
@ -143,181 +114,119 @@ export function productRecommendApi(merId, id, data) {
|
||||
*/
|
||||
|
||||
export function attrList(merId, data) {
|
||||
return request.get(`server/${merId}/attr/lst`, data, {
|
||||
login: true
|
||||
})
|
||||
return request.get(`server/${merId}/attr/lst`, data, { login: true })
|
||||
}
|
||||
/*
|
||||
请求运费模板
|
||||
*/
|
||||
export function templateList(merId, data) {
|
||||
return request.get(`server/${merId}/template/lst`, data, {
|
||||
login: true
|
||||
})
|
||||
return request.get(`server/${merId}/template/lst`, data, { login: true })
|
||||
}
|
||||
/*
|
||||
运费模板 -- 删除
|
||||
*/
|
||||
export function templateDelete(merId, data) {
|
||||
return request.post(`server/${merId}/template/delete`, data, {
|
||||
login: true
|
||||
})
|
||||
return request.post(`server/${merId}/template/delete`, data, { login: true })
|
||||
}
|
||||
/**
|
||||
* 运费模板 -- 详情
|
||||
*/
|
||||
export function templateDetail(merId, id) {
|
||||
return request.get(`server/${merId}/template/detail/${id}`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/template/detail/${id}`, {}, { login: true });
|
||||
}
|
||||
/*
|
||||
运费模板 -- 添加
|
||||
*/
|
||||
export function templateCreate(merId, data) {
|
||||
return request.post(`server/${merId}/template/create`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/template/create`, data, { login: true });
|
||||
}
|
||||
/*
|
||||
运费模板 -- 编辑
|
||||
*/
|
||||
export function templateUpdate(merId, id, data) {
|
||||
return request.post(`server/${merId}/template/update/${id}`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/template/update/${id}`, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 店铺分类 -- 列表
|
||||
*/
|
||||
export function storeClassifyLst(merId) {
|
||||
return request.get(`server/${merId}/category/lst`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/category/lst`, {}, { login: true });
|
||||
}
|
||||
/**
|
||||
* 店铺分类 -- 列表(删除)
|
||||
*/
|
||||
export function storeClassifyDel(merId, id) {
|
||||
return request.post(`server/${merId}/category/delete/${id}`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/category/delete/${id}`, {}, { login: true });
|
||||
}
|
||||
/**
|
||||
* 上级分类 -- 商户列表
|
||||
*/
|
||||
export function merClassifyLst(merId) {
|
||||
return request.get(`server/${merId}/category/select`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/category/select`, {}, { login: true });
|
||||
}
|
||||
/**
|
||||
* 店铺分类 -- 添加
|
||||
*/
|
||||
export function merClassifyAdd(merId, data) {
|
||||
return request.post(`server/${merId}/category/create`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/category/create`, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 店铺分类 -- 详情
|
||||
*/
|
||||
export function merClassifyDetail(merId, id) {
|
||||
return request.get(`server/${merId}/category/detail/${id}`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/category/detail/${id}`, {}, { login: true });
|
||||
}
|
||||
/**
|
||||
* 店铺分类 -- 编辑
|
||||
*/
|
||||
export function merClassifyUpdate(merId, id, data) {
|
||||
return request.post(`server/${merId}/category/update/${id}`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/category/update/${id}`, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 商品规格项目 -- 列表
|
||||
*/
|
||||
export function specificationLst(merId, data) {
|
||||
return request.get(`server/${merId}/attr/lst`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/attr/lst`, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 商品规格项目 -- 删除
|
||||
*/
|
||||
export function specificationDel(merId, data) {
|
||||
return request.post(`server/${merId}/attr/delete`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/attr/delete`, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 商品规格项目 -- 添加
|
||||
*/
|
||||
export function specificationAdd(merId, data) {
|
||||
return request.post(`server/${merId}/attr/create`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/attr/create`, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 商品规格项目 -- 编辑
|
||||
*/
|
||||
export function specificationUpdate(merId, id, data) {
|
||||
return request.post(`server/${merId}/attr/update/${id}`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/attr/update/${id}`, data, { login: true });
|
||||
}
|
||||
/**
|
||||
* 商品规格项目 -- 详情
|
||||
*/
|
||||
export function specificationDetail(merId, id) {
|
||||
return request.get(`server/${merId}/attr/detail/${id}`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/attr/detail/${id}`, {}, { login: true });
|
||||
}
|
||||
/*
|
||||
请求商品详情
|
||||
*/
|
||||
export function productDetail(merId, id) {
|
||||
return request.get(`server/${merId}/product/detail/${id}`, {}, {
|
||||
login: true
|
||||
});
|
||||
return request.get(`server/${merId}/product/detail/${id}`, {}, { login: true });
|
||||
}
|
||||
/*
|
||||
编辑商品
|
||||
*/
|
||||
export function productUpdate(merId, id, data) {
|
||||
return request.post(`server/${merId}/product/update/${id}`, data, {
|
||||
login: true
|
||||
});
|
||||
return request.post(`server/${merId}/product/update/${id}`, data, { login: true });
|
||||
}
|
||||
/*
|
||||
添加商品 -- 获取送货方式信息
|
||||
*/
|
||||
export function getDeliveryType(merId) {
|
||||
return request.get(`server/${merId}/product/config`, {}, {
|
||||
login: true
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
商品 -- 获取交易协议内容
|
||||
*/
|
||||
export function business(data) {
|
||||
return request.get(`business/agree`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/*
|
||||
商品 -- 获取交易申请记录
|
||||
*/
|
||||
export function intention(data) {
|
||||
return request.get(`intention/lst`, data);
|
||||
}
|
||||
|
||||
/*
|
||||
商品 -- 同意提交申请
|
||||
*/
|
||||
export function intentionbus(data) {
|
||||
return request.post(`intention/business`, data);
|
||||
}
|
||||
return request.get(`server/${merId}/product/config`, {}, { login: true });
|
||||
}
|
@ -24,7 +24,6 @@ export function getWechatConfig() {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取微信sdk配置
|
||||
* @returns {*}
|
||||
@ -141,12 +140,4 @@ export function getNavigation(data) {
|
||||
return request.get("navigation", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
小程序 -- 小程序列表
|
||||
*/
|
||||
export function applet(data) {
|
||||
return request.get(`applet`, data);
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
import request from "@/utils/requesta.js";
|
||||
|
||||
export function getCityCloundShop(data) {
|
||||
return request.get("city/get_cloud_shop", data);
|
||||
}
|
||||
|
||||
export function getCategoryListLevel(data) {
|
||||
return request.get("category/list_level", data);
|
||||
}
|
||||
export function cloudWarehouse(data) {
|
||||
return request.get("store/product/cloudWarehouse", data);
|
||||
}
|
||||
export function townCloud(data) {
|
||||
return request.get("store/product/town_cloud", data);
|
||||
}
|
||||
/**
|
||||
* 供销市场标签
|
||||
* @returns {*}
|
||||
*/
|
||||
export function supMenuApi(data) {
|
||||
return request.get('intention/v2/cate', data);
|
||||
}
|
||||
/**
|
||||
* 获取购物车列表
|
||||
*
|
||||
*/
|
||||
export function getCartList(data) {
|
||||
return request.get("user/cart/lst", data);
|
||||
}
|
||||
export function getCartCounts(data) {
|
||||
return request.get("user/cart/count", data);
|
||||
}
|
48
api/sale.js
48
api/sale.js
@ -7,50 +7,4 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
//发布委托商品选择 供应链商家接口
|
||||
export function supplychain(data) {
|
||||
return request.get("community/supplychain/list", data);
|
||||
}
|
||||
|
||||
//普通商家发布委托商品
|
||||
export function entrustchain(data) {
|
||||
return request.post("community/entrust", data);
|
||||
}
|
||||
|
||||
|
||||
//获取委托商品列表
|
||||
export function entrustlist(data) {
|
||||
return request.get("community/entrust/list", data);
|
||||
}
|
||||
|
||||
//供应链商家是否同意委托
|
||||
export function checkchain(id,data) {
|
||||
return request.post("community/entrust/check/"+id, data);
|
||||
}
|
||||
|
||||
|
||||
//供应链商家申请结束委托
|
||||
export function finishchain(id,data) {
|
||||
return request.post("community/entrust/apply/finish/"+id, data);
|
||||
}
|
||||
//商家申请结束委托
|
||||
export function finishentrust(id,data) {
|
||||
return request.post("community/entrust/finish/"+id, data);
|
||||
}
|
||||
//委托商品加入购物车
|
||||
export function addEntrustCart(data) {
|
||||
return request.post("community/entrust/addEntrustCart", data);
|
||||
}
|
||||
|
||||
|
||||
//获取委托商品详情
|
||||
export function entrustdetail(id) {
|
||||
return request.get("community/entrust/"+id);
|
||||
}
|
||||
|
||||
//编辑委托商品详情
|
||||
export function editentrust(id,data) {
|
||||
return request.post("community/entrust/edit/"+id, data);
|
||||
}
|
||||
import request from "@/utils/request.js";
|
393
api/store.js
393
api/store.js
@ -1,19 +1,18 @@
|
||||
import request from "@/utils/request.js";
|
||||
import requestb from "@/utils/requestb.js";
|
||||
|
||||
/**
|
||||
* 扫码查询商品
|
||||
*
|
||||
*/
|
||||
export function microSeachBarCode(data) {
|
||||
return request.get('micro/seach_bar_code', data);
|
||||
return request.get('micro/seach_bar_code', data);
|
||||
}
|
||||
/**
|
||||
* 获取收款二维码
|
||||
* @returns {*}
|
||||
*/
|
||||
export function createtApi(data) {
|
||||
return request.post('v2/micropay/create', data);
|
||||
return request.post('v2/micropay/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -21,7 +20,7 @@ export function createtApi(data) {
|
||||
* @returns {*}
|
||||
*/
|
||||
export function addCartApi(data) {
|
||||
return request.post('v2/micropay/addCart', data);
|
||||
return request.post('v2/micropay/addCart', data);
|
||||
}
|
||||
/**
|
||||
* 获取产品详情
|
||||
@ -29,9 +28,9 @@ export function addCartApi(data) {
|
||||
*
|
||||
*/
|
||||
export function getProductDetail(id, data) {
|
||||
return request.get('store/product/detail/' + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/detail/' + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取预览商品详情
|
||||
@ -39,16 +38,16 @@ export function getProductDetail(id, data) {
|
||||
*
|
||||
*/
|
||||
export function getPreviewProDetail(data) {
|
||||
return request.get('store/product/preview', data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/preview', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 产品分享二维码 推广员
|
||||
* @param int id
|
||||
*/
|
||||
export function getProductCode(id, data) {
|
||||
return request.get('store/product/qrcode/' + id, data);
|
||||
return request.get('store/product/qrcode/' + id, data);
|
||||
}
|
||||
/**
|
||||
* 添加收藏
|
||||
@ -56,7 +55,7 @@ export function getProductCode(id, data) {
|
||||
* @param string category product=普通产品,product_seckill=秒杀产品
|
||||
*/
|
||||
export function collectAdd(data) {
|
||||
return request.post('user/relation/create', data);
|
||||
return request.post('user/relation/create', data);
|
||||
}
|
||||
/**
|
||||
* 删除收藏产品
|
||||
@ -64,14 +63,14 @@ export function collectAdd(data) {
|
||||
* @param string category product=普通产品,product_seckill=秒杀产品
|
||||
*/
|
||||
export function collectDel(data) {
|
||||
return request.post('user/relation/delete', data);
|
||||
return request.post('user/relation/delete', data);
|
||||
}
|
||||
/**
|
||||
* 购车添加
|
||||
*
|
||||
*/
|
||||
export function postCartAdd(data) {
|
||||
return request.post('user/cart/create', data);
|
||||
return request.post('user/cart/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -79,73 +78,73 @@ export function postCartAdd(data) {
|
||||
*
|
||||
*/
|
||||
export function getCategoryList() {
|
||||
return request.get('store/product/category/lst', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/category/lst', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取产品列表
|
||||
* @param object data
|
||||
*/
|
||||
export function getProductslist(data) {
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get('product/spu/lst', data, {
|
||||
noAuth: true
|
||||
});
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get('product/spu/lst', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取优惠券商品列表
|
||||
* @param object data
|
||||
*/
|
||||
export function getCouponProductlist(data) {
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get('product/spu/coupon_product', data, {
|
||||
noAuth: true
|
||||
});
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get('product/spu/coupon_product', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取品牌列表
|
||||
* @param object data
|
||||
*/
|
||||
export function getBrandlist(data) {
|
||||
return request.get('store/product/brand/lst', data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/brand/lst', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取推荐产品
|
||||
*
|
||||
*/
|
||||
export function getProductHot(page, limit) {
|
||||
return request.get("product/spu/recommend", {
|
||||
page: page === undefined ? 1 : page,
|
||||
limit: limit === undefined ? 10 : limit
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("product/spu/recommend", {
|
||||
page: page === undefined ? 1 : page,
|
||||
limit: limit === undefined ? 10 : limit
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商户推荐产品
|
||||
*
|
||||
*/
|
||||
export function getMerProductHot(id, data) {
|
||||
return request.get(`product/spu/recommend`, {
|
||||
page: data.page === undefined ? 1 : data.page,
|
||||
limit: data.limit === undefined ? 10 : data.limit,
|
||||
mer_id: id || ''
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`product/spu/recommend`, {
|
||||
page: data.page === undefined ? 1 : data.page,
|
||||
limit: data.limit === undefined ? 10 : data.limit,
|
||||
mer_id: id || ''
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 批量收藏
|
||||
@ -154,7 +153,7 @@ export function getMerProductHot(id, data) {
|
||||
* @param string category
|
||||
*/
|
||||
export function collectAll(data) {
|
||||
return request.post('user/relation/batch/create', data);
|
||||
return request.post('user/relation/batch/create', data);
|
||||
}
|
||||
/**
|
||||
* 首页产品的轮播图和产品信息
|
||||
@ -162,23 +161,23 @@ export function collectAll(data) {
|
||||
*
|
||||
*/
|
||||
export function getGroomList(type, data) {
|
||||
return request.get('product/spu/hot/' + type, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('product/spu/hot/' + type, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商品收藏列表
|
||||
* @param object data
|
||||
*/
|
||||
export function getCollectUserList(data) {
|
||||
return request.get('user/relation/product/lst', data)
|
||||
export function getCollectUserList(data) {
|
||||
return request.get('user/relation/product/lst', data)
|
||||
}
|
||||
/**
|
||||
* 获取商品收藏列表 -- 删除
|
||||
* @param object data
|
||||
*/
|
||||
export function userCollectDel(data) {
|
||||
return request.post('user/relation/batch/delete', data)
|
||||
return request.post('user/relation/batch/delete', data)
|
||||
}
|
||||
/**
|
||||
* 获取产品评论
|
||||
@ -187,43 +186,43 @@ export function userCollectDel(data) {
|
||||
*
|
||||
*/
|
||||
export function getReplyList(id, data) {
|
||||
return request.get('store/product/reply/lst/' + id, data, {
|
||||
noAuth: true
|
||||
})
|
||||
return request.get('store/product/reply/lst/' + id, data, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 产品评价数量和好评度
|
||||
* @param int id
|
||||
*/
|
||||
export function getReplyConfig(id) {
|
||||
return request.get('reply/config/' + id);
|
||||
return request.get('reply/config/' + id);
|
||||
}
|
||||
/**
|
||||
* 获取搜索关键字获取
|
||||
*
|
||||
*/
|
||||
export function getSearchKeyword() {
|
||||
return request.get('common/hot_keyword', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('common/hot_keyword', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 门店列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function storeListApi(data) {
|
||||
return request.get("store_list", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store_list", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 商户列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function storeMerchantList(data) {
|
||||
return request.get("store/merchant/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/merchant/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺详情
|
||||
@ -231,9 +230,9 @@ export function storeMerchantList(data) {
|
||||
* @param {Object} data 商铺数据
|
||||
*/
|
||||
export function getStoreDetail(id, data) {
|
||||
return request.get("store/merchant/detail/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/merchant/detail/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺商品列表
|
||||
@ -241,9 +240,9 @@ export function getStoreDetail(id, data) {
|
||||
* @param {Object} data 商铺商品列表数据
|
||||
*/
|
||||
export function getStoreGoods(id, data) {
|
||||
return request.get("product/spu/merchant/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("product/spu/merchant/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺分类列表
|
||||
@ -251,77 +250,77 @@ export function getStoreGoods(id, data) {
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function getStoreCategory(id, data) {
|
||||
return request.get("store/merchant/category/lst/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/merchant/category/lst/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 关注商铺
|
||||
* @param {Object} type_id 商铺 id
|
||||
*/
|
||||
export function followStore(type_id) {
|
||||
return request.post("user/relation/create", {
|
||||
type: 10,
|
||||
type_id: type_id
|
||||
});
|
||||
return request.post("user/relation/create", {
|
||||
type: 10,
|
||||
type_id: type_id
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 取消商铺关注
|
||||
* @param {Object} type_id 商铺 id
|
||||
*/
|
||||
export function unfollowStore(type_id) {
|
||||
return request.post("user/relation/delete", {
|
||||
type: 10,
|
||||
type_id: type_id
|
||||
});
|
||||
return request.post("user/relation/delete", {
|
||||
type: 10,
|
||||
type_id: type_id
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺优惠券
|
||||
* @param {Object} id
|
||||
*/
|
||||
export function getStoreCoupon(id) {
|
||||
return request.get("coupon/store/" + id, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("coupon/store/" + id, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺优惠券
|
||||
*/
|
||||
export function getMerchantLst(data) {
|
||||
return request.get("user/relation/merchant/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("user/relation/merchant/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 物流信息
|
||||
*/
|
||||
export function express(id) {
|
||||
return request.post("ordero/express/" + id, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.post("ordero/express/" + id, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 子集分类
|
||||
* @returns {*}
|
||||
*/
|
||||
export function storeCategory(pid) {
|
||||
return request.get("store/product/category", pid, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/product/category", pid, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 分销说明
|
||||
* @returns {*}
|
||||
*/
|
||||
export function bagExplain() {
|
||||
return request.get("store/product/bag/explain");
|
||||
return request.get("store/product/bag/explain");
|
||||
}
|
||||
/**
|
||||
* 分销礼包推荐列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function bagRecommend() {
|
||||
return request.get("product/spu/bag/recommend");
|
||||
return request.get("product/spu/bag/recommend");
|
||||
}
|
||||
/**
|
||||
* 分销礼包列表
|
||||
@ -329,64 +328,56 @@ export function bagRecommend() {
|
||||
*/
|
||||
export function productBag(data) {
|
||||
|
||||
return request.get("product/spu/bag", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("product/spu/bag", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 商铺二维码
|
||||
* @returns {*}
|
||||
*/
|
||||
export function merchantQrcode(id, data) {
|
||||
return request.get("store/merchant/qrcode/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/merchant/qrcode/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 推荐商品
|
||||
* @returns {*}
|
||||
*/
|
||||
export function merchantProduct(id, data) {
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get("product/spu/merchant/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get("product/spu/merchant/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 推荐商品banner
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getHotBanner(type) {
|
||||
return request.get("common/hot_banner/" + type, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("common/hot_banner/" + type, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 商户入驻表单
|
||||
* @returns {*}
|
||||
*/
|
||||
export function create(data) {
|
||||
return request.post("intention/create", data);
|
||||
return request.post("intention/create", data);
|
||||
}
|
||||
/**
|
||||
* 个人入驻表单
|
||||
* @returns {*}
|
||||
*/
|
||||
export function personalStore(data) {
|
||||
return request.post("intention/personal_store", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商户入驻短信验证码
|
||||
* @returns {*}
|
||||
*/
|
||||
export function verify(data) {
|
||||
return request.post("auth/verify", data);
|
||||
return request.post("auth/verify", data);
|
||||
}
|
||||
/**
|
||||
* 获取秒杀商品详情
|
||||
@ -394,36 +385,36 @@ export function verify(data) {
|
||||
*
|
||||
*/
|
||||
export function getSeckillProductDetail(id) {
|
||||
return request.get('store/product/seckill/detail/' + id, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/seckill/detail/' + id, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 直播推荐列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getLiveList(data) {
|
||||
return request.get(`broadcast/hot`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`broadcast/hot`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 直播列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getBroadcastListApi(data) {
|
||||
return request.get("broadcast/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("broadcast/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 商户分类
|
||||
* @returns {*}
|
||||
*/
|
||||
export function merClassifly() {
|
||||
return request.get("intention/cate", {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("intention/cate", {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取预售商品详情
|
||||
@ -431,9 +422,9 @@ export function merClassifly() {
|
||||
*
|
||||
*/
|
||||
export function getPresellProductDetail(id) {
|
||||
return request.get('store/product/presell/detail/' + id, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/presell/detail/' + id, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商户申请记录
|
||||
@ -441,7 +432,7 @@ export function getPresellProductDetail(id) {
|
||||
*
|
||||
*/
|
||||
export function getApplicationRecordList(data) {
|
||||
return request.get('intention/lst', data);
|
||||
return request.get('intention/lst', data);
|
||||
}
|
||||
/**
|
||||
* 获取商户申请详情
|
||||
@ -449,7 +440,7 @@ export function getApplicationRecordList(data) {
|
||||
*
|
||||
*/
|
||||
export function getGoodsDetails(id) {
|
||||
return request.get('intention/detail/' + id, {});
|
||||
return request.get('intention/detail/' + id, {});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -458,7 +449,7 @@ export function getGoodsDetails(id) {
|
||||
*
|
||||
*/
|
||||
export function updateGoodsRecord(id, data) {
|
||||
return request.post('intention/update/' + id, data);
|
||||
return request.post('intention/update/' + id, data);
|
||||
}
|
||||
/**
|
||||
* 获取定位详细地址
|
||||
@ -466,9 +457,9 @@ export function updateGoodsRecord(id, data) {
|
||||
*
|
||||
*/
|
||||
export function getGeocoder(data) {
|
||||
return request.get(`lbs/geocoder?location=${data.lat},${data.long}`, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`lbs/geocoder?location=${data.lat},${data.long}`, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取店铺类型
|
||||
@ -476,136 +467,80 @@ export function getGeocoder(data) {
|
||||
*
|
||||
*/
|
||||
export function getStoreTypeApi() {
|
||||
return request.get('intention/type', {
|
||||
sift_store: 0
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('intention/type', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 到货通知
|
||||
*
|
||||
*/
|
||||
export function arrivalNoticeApi(data) {
|
||||
return request.post('store/product/increase_take', data);
|
||||
return request.post('store/product/increase_take', data);
|
||||
}
|
||||
|
||||
/*
|
||||
获取图片验证码
|
||||
*/
|
||||
export function getCaptcha() {
|
||||
return request.get('captcha');
|
||||
return request.get('captcha');
|
||||
}
|
||||
|
||||
/*
|
||||
获取店铺资质
|
||||
*/
|
||||
export function storeCertificate(data) {
|
||||
return request.post(`store/certificate/${data.merId}`, data)
|
||||
return request.post(`store/certificate/${data.merId}`, data)
|
||||
}
|
||||
/**
|
||||
* 本地服务列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function storeServiceList(id, data) {
|
||||
return request.get(`product/spu/local/${id}`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`product/spu/local/${id}`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 复制口令
|
||||
* @returns {*}
|
||||
*/
|
||||
export function copyPasswordApi(data) {
|
||||
return request.get(`product/spu/copy`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`product/spu/copy`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 口令搜索
|
||||
* @returns {*}
|
||||
*/
|
||||
export function copyPasswordSearch(data) {
|
||||
return request.get(`command/copy`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`command/copy`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 套餐列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getDiscountsLst(data) {
|
||||
return request.get(`discounts/lst`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`discounts/lst`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 套餐--立即购买
|
||||
* @returns {*}
|
||||
*/
|
||||
export function discountsCartAdd(data) {
|
||||
return request.post('user/cart/batchCreate', data);
|
||||
return request.post('user/cart/batchCreate', data);
|
||||
}
|
||||
/**
|
||||
* 商品--价格说明
|
||||
* @returns {*}
|
||||
*/
|
||||
export function priceRuleApi(id) {
|
||||
return request.get(`store/product/price_rule/${id}`, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 供销市场标签
|
||||
* @returns {*}
|
||||
*/
|
||||
export function supMenuApi(data) {
|
||||
return request.get('intention/v2/cate', data);
|
||||
}
|
||||
/**
|
||||
* 供销市场标签
|
||||
* @returns {*}
|
||||
*/
|
||||
export function supAgoodsApi(data) {
|
||||
return request.get('store/merchant/lst', data);
|
||||
}
|
||||
// /api/store / merchant / lst ? page = 1 & limit = 10 & order = & category_id = 22 & type_id = 10 & street_id = &
|
||||
// credit_buy =
|
||||
// /api/region/:street_id/merchant
|
||||
/**
|
||||
* 附近商家
|
||||
* @returns {*}
|
||||
*/
|
||||
// export function supAgoodsApi(data) {
|
||||
// return request.get('store/merchant/lst', data);
|
||||
// }
|
||||
export function vicinityStoreApi(data) {
|
||||
return request.get(`region/${data}/merchant`);
|
||||
}
|
||||
|
||||
/*
|
||||
商家入驻 -- 获取商户入驻申请协议内容
|
||||
*/
|
||||
export function agreeiness(data) {
|
||||
return request.get(`business/agree`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
上传图片识别文字
|
||||
*/
|
||||
export function merchantLicenseIdentify(data) {
|
||||
return request.post(`merchant_license_identify`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
从供销平台获取村店铺负责人,联系电话
|
||||
*/
|
||||
export function getVillageInfo(data) {
|
||||
return requestb.get(`shop_call/getVillageCompany`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`store/product/price_rule/${id}`, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
27
api/uniMP.js
27
api/uniMP.js
@ -1,27 +0,0 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 获取供销平台版本信息
|
||||
*/
|
||||
export function getGXconfig(data) {
|
||||
return request.get("global/config", data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取商城小程序信息
|
||||
*/
|
||||
|
||||
export function miniapp(data) {
|
||||
return request.get("miniapp/version?version=1", data);
|
||||
}
|
||||
|
23
api/user.js
23
api/user.js
@ -8,17 +8,7 @@
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
import request1 from "@/utils/requestb.js";
|
||||
import Cache from '@/utils/cache'
|
||||
/**
|
||||
* 获取版本信息
|
||||
*/
|
||||
export function Appversion(data) {
|
||||
return request.get(`app/version`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 提交提现
|
||||
*/
|
||||
@ -721,17 +711,4 @@ export function getBankInfo() {
|
||||
// 商户账单管理
|
||||
export function getBillDetil() {
|
||||
return request.get(`mer/financial_record`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//获取商户入驻所签署公司
|
||||
|
||||
export function merstreet(data) {
|
||||
return request1.get(`company/street_company`, data);
|
||||
}
|
||||
|
||||
//填写邀请码
|
||||
export function bindPromotionCode(data) {
|
||||
return request.post(`user/change/bind_promotion_code`, data)
|
||||
}
|
@ -1,365 +1,351 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class='mask' v-if='isShowAuth && code' @click='close'></view>
|
||||
<view class='Popup' v-if='isShowAuth && code' :style="'top:'+top+'px;'">
|
||||
<!-- <view class="logo-auth">
|
||||
<view>
|
||||
<view class='mask' v-if='isShowAuth && code' @click='close'></view>
|
||||
<view class='Popup' v-if='isShowAuth && code' :style="'top:'+top+'px;'">
|
||||
<!-- <view class="logo-auth">
|
||||
<image class="image" :src='routine_logo' mode="aspectFit"></image>
|
||||
</view> -->
|
||||
<!--#ifdef H5-->
|
||||
<text v-if="isWeixin" class='title'>授权提醒</text>
|
||||
<text v-else class='title'>{{title}}</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef APP-PLUS-->
|
||||
<text class='title'>用户登录</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef MP-->
|
||||
<text class='title'>{{title}}</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef H5-->
|
||||
<text v-if="isWeixin" class='tip'>请授权头像等信息,以便为您提供更好的服务!</text>
|
||||
<text v-else class='tip'>{{info}}</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef APP-PLUS-->
|
||||
<text class='tip'>请登录,将为您提供更好的服务!</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef MP-->
|
||||
<text class='tip'>{{info}}</text>
|
||||
<!--#endif-->
|
||||
<view class='bottom flex'>
|
||||
<text class='item' @click='close'>随便逛逛</text>
|
||||
<!-- #ifdef MP -->
|
||||
<button class="item grant" hover-class="none" @tap="getUserProfile"><text
|
||||
class="text">去授权</text></button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<button class="item grant" @tap="toWecahtAuth">
|
||||
<text class="text">去登录</text>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<button class="item grant" @tap="toWecahtAuth">
|
||||
<text v-if="isWeixin" class="text">去授权</text>
|
||||
<text v-else class="text">去登录</text>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<!--#ifdef H5-->
|
||||
<text v-if="isWeixin" class='title'>授权提醒</text>
|
||||
<text v-else class='title'>{{title}}</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef APP-PLUS-->
|
||||
<text class='title'>用户登录</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef MP-->
|
||||
<text class='title'>{{title}}</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef H5-->
|
||||
<text v-if="isWeixin" class='tip'>请授权头像等信息,以便为您提供更好的服务!</text>
|
||||
<text v-else class='tip'>{{info}}</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef APP-PLUS-->
|
||||
<text class='tip'>请登录,将为您提供更好的服务!</text>
|
||||
<!--#endif-->
|
||||
<!--#ifdef MP-->
|
||||
<text class='tip'>{{info}}</text>
|
||||
<!--#endif-->
|
||||
<view class='bottom flex'>
|
||||
<text class='item' @click='close'>随便逛逛</text>
|
||||
<!-- #ifdef MP -->
|
||||
<button class="item grant" hover-class="none" @tap="getUserProfile"><text class="text">去授权</text></button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<button class="item grant" @tap="toWecahtAuth">
|
||||
<text class="text">去登录</text>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<button class="item grant" @tap="toWecahtAuth">
|
||||
<text v-if="isWeixin" class="text">去授权</text>
|
||||
<text v-else class="text">去登录</text>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import Cache from '../utils/cache';
|
||||
import {
|
||||
getLogo,
|
||||
commonAuth
|
||||
} from '../api/public';
|
||||
import {
|
||||
LOGO_URL,
|
||||
USER_INFO,
|
||||
EXPIRES_TIME
|
||||
} from '../config/cache';
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex';
|
||||
import Routine from '../libs/routine';
|
||||
import {
|
||||
configMap
|
||||
} from '@/utils/index';
|
||||
import Auth from '../libs/wechat';
|
||||
import {
|
||||
toLogin
|
||||
} from '../libs/login';
|
||||
// #ifdef MP
|
||||
import editUserModal from '@/components/eidtUserModal/index.vue'
|
||||
// #endif
|
||||
export default {
|
||||
name: 'Authorize',
|
||||
props: {
|
||||
isAuto: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isGoIndex: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isShowAuth: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
// #ifdef MP
|
||||
editUserModal
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '用户登录',
|
||||
info: '请登录,将为您提供更好的服务!',
|
||||
//#ifdef H5
|
||||
isWeixin: this.$wechat.isWeixin(),
|
||||
//#endif
|
||||
//#ifdef MP
|
||||
title: '授权提醒',
|
||||
info: '请授权头像等信息,以便为您提供更好的服务!',
|
||||
//#endif
|
||||
canUseGetUserProfile: false,
|
||||
code: null,
|
||||
top: 0,
|
||||
mp_is_new: this.$Cache.get('MP_VERSION_ISNEW') || false,
|
||||
editModal: false, // 编辑头像信息
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'userInfo', 'viewColor']),
|
||||
...configMap(['routine_logo'])
|
||||
},
|
||||
watch: {
|
||||
isLogin(n) {
|
||||
n === true && this.$emit('onLoadFun', this.userInfo);
|
||||
},
|
||||
isShowAuth(n) {
|
||||
this.getCode(this.isShowAuth)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log('title' + this.title)
|
||||
this.top = uni.getSystemInfoSync().windowHeight / 2 - 70
|
||||
if (wx.getUserProfile) {
|
||||
this.canUseGetUserProfile = true
|
||||
}
|
||||
this.setAuthStatus();
|
||||
this.getCode(this.isShowAuth)
|
||||
},
|
||||
methods: {
|
||||
// #ifdef MP
|
||||
editSuccess() {
|
||||
this.editModal = false
|
||||
this.$emit('onLoadFun', this.userInfo);
|
||||
},
|
||||
closeEdit() {
|
||||
this.editModal = false
|
||||
},
|
||||
// #endif
|
||||
setAuthStatus() {
|
||||
//#ifdef MP
|
||||
Routine.authorize().then(res => {
|
||||
if (res.islogin === false)
|
||||
this.$emit('onLoadFun', this.userInfo);
|
||||
}).catch(res => {
|
||||
if (this.isAuto)
|
||||
this.$emit('authColse', true);
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
getCode(n) {
|
||||
// #ifdef MP
|
||||
if (n) {
|
||||
uni.showLoading({
|
||||
title: '正在登录中'
|
||||
});
|
||||
Routine.getCode().then(code => {
|
||||
uni.hideLoading();
|
||||
this.code = code;
|
||||
}).catch(e => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '登录失败',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
} else {
|
||||
this.code = null;
|
||||
}
|
||||
// #endif
|
||||
// #ifndef MP
|
||||
if (n) {
|
||||
this.code = 1;
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
toWecahtAuth() {
|
||||
toLogin(true);
|
||||
},
|
||||
getUserProfile() {
|
||||
// console.log(11);
|
||||
toLogin(true);
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/login_copy'
|
||||
})
|
||||
// console.log(22);
|
||||
return
|
||||
let self = this;
|
||||
Routine.getUserProfile()
|
||||
.then(res => {
|
||||
let userInfo = res.userInfo;
|
||||
userInfo.code = this.code;
|
||||
userInfo.spread = app.globalData.spid; //获取推广人ID
|
||||
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
|
||||
commonAuth({
|
||||
auth: {
|
||||
type: 'routine',
|
||||
auth: userInfo
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.data.status == 200) {
|
||||
let time = res.data.result.expires_time - Cache.time();
|
||||
self.$store.commit('UPDATE_USERINFO', res.data.result.user);
|
||||
self.$store.commit('LOGIN', {
|
||||
token: res.data.result.token,
|
||||
time: time
|
||||
});
|
||||
self.$store.commit('SETUID', res.data.result.user.uid);
|
||||
Cache.set(EXPIRES_TIME, res.data.result.expires_time, time);
|
||||
Cache.set(USER_INFO, res.data.result.user, time);
|
||||
this.$emit('onLoadFun', res.data.result.user);
|
||||
if (res.data.result.user.isNew && this.mp_is_new) {
|
||||
this.editModal = true;
|
||||
}
|
||||
} else {
|
||||
uni.setStorageSync('auth_token', res.data.result.key);
|
||||
return uni.navigateTo({
|
||||
url: '/pages/users/login/login_copy'
|
||||
})
|
||||
}
|
||||
}).catch(res => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
const app = getApp();
|
||||
import Cache from '../utils/cache';
|
||||
import {
|
||||
getLogo,
|
||||
commonAuth
|
||||
} from '../api/public';
|
||||
import { LOGO_URL, USER_INFO, EXPIRES_TIME } from '../config/cache';
|
||||
import { mapGetters } from 'vuex';
|
||||
import Routine from '../libs/routine';
|
||||
import { configMap } from '@/utils/index';
|
||||
import Auth from '../libs/wechat';
|
||||
import { toLogin } from '../libs/login';
|
||||
// #ifdef MP
|
||||
import editUserModal from '@/components/eidtUserModal/index.vue'
|
||||
// #endif
|
||||
export default {
|
||||
name: 'Authorize',
|
||||
props: {
|
||||
isAuto: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isGoIndex: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isShowAuth: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
// #ifdef MP
|
||||
editUserModal
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '用户登录',
|
||||
info: '请登录,将为您提供更好的服务!',
|
||||
//#ifdef H5
|
||||
isWeixin: this.$wechat.isWeixin(),
|
||||
//#endif
|
||||
//#ifdef MP
|
||||
title: '授权提醒',
|
||||
info: '请授权头像等信息,以便为您提供更好的服务!',
|
||||
//#endif
|
||||
canUseGetUserProfile: false,
|
||||
code: null,
|
||||
top: 0,
|
||||
mp_is_new: this.$Cache.get('MP_VERSION_ISNEW') || false,
|
||||
editModal: false, // 编辑头像信息
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'userInfo', 'viewColor']),
|
||||
...configMap(['routine_logo'])
|
||||
},
|
||||
watch: {
|
||||
isLogin(n) {
|
||||
n === true && this.$emit('onLoadFun', this.userInfo);
|
||||
},
|
||||
isShowAuth(n) {
|
||||
this.getCode(this.isShowAuth)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log('title' + this.title)
|
||||
this.top = uni.getSystemInfoSync().windowHeight / 2 - 70
|
||||
if (wx.getUserProfile) {
|
||||
this.canUseGetUserProfile = true
|
||||
}
|
||||
this.setAuthStatus();
|
||||
this.getCode(this.isShowAuth)
|
||||
},
|
||||
methods: {
|
||||
// #ifdef MP
|
||||
editSuccess() {
|
||||
this.editModal = false
|
||||
this.$emit('onLoadFun', this.userInfo);
|
||||
},
|
||||
closeEdit() {
|
||||
this.editModal = false
|
||||
},
|
||||
// #endif
|
||||
setAuthStatus() {
|
||||
//#ifdef MP
|
||||
Routine.authorize().then(res => {
|
||||
if (res.islogin === false)
|
||||
this.$emit('onLoadFun', this.userInfo);
|
||||
}).catch(res => {
|
||||
if (this.isAuto)
|
||||
this.$emit('authColse', true);
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
getCode(n) {
|
||||
// #ifdef MP
|
||||
if (n) {
|
||||
uni.showLoading({
|
||||
title: '正在登录中'
|
||||
});
|
||||
Routine.getCode().then(code => {
|
||||
uni.hideLoading();
|
||||
this.code = code;
|
||||
}).catch(e => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '登录失败',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
} else {
|
||||
this.code = null;
|
||||
}
|
||||
// #endif
|
||||
// #ifndef MP
|
||||
if (n) {
|
||||
this.code = 1;
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
toWecahtAuth() {
|
||||
toLogin(true);
|
||||
},
|
||||
getUserProfile() {
|
||||
// console.log(11);
|
||||
toLogin(true);
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/login_copy'
|
||||
})
|
||||
// console.log(22);
|
||||
return
|
||||
let self = this;
|
||||
Routine.getUserProfile()
|
||||
.then(res => {
|
||||
let userInfo = res.userInfo;
|
||||
userInfo.code = this.code;
|
||||
userInfo.spread = app.globalData.spid; //获取推广人ID
|
||||
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
|
||||
commonAuth({
|
||||
auth: {
|
||||
type: 'routine',
|
||||
auth: userInfo
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.data.status == 200) {
|
||||
let time = res.data.result.expires_time - Cache.time();
|
||||
self.$store.commit('UPDATE_USERINFO', res.data.result.user);
|
||||
self.$store.commit('LOGIN', { token: res.data.result.token, time: time });
|
||||
self.$store.commit('SETUID', res.data.result.user.uid);
|
||||
Cache.set(EXPIRES_TIME, res.data.result.expires_time, time);
|
||||
Cache.set(USER_INFO, res.data.result.user, time);
|
||||
this.$emit('onLoadFun', res.data.result.user);
|
||||
if (res.data.result.user.isNew && this.mp_is_new) {
|
||||
this.editModal = true;
|
||||
}
|
||||
} else {
|
||||
uni.setStorageSync('auth_token', res.data.result.key);
|
||||
return uni.navigateTo({
|
||||
url: '/pages/users/login/login_copy'
|
||||
})
|
||||
}
|
||||
}).catch(res => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
close() {
|
||||
let pages = getCurrentPages(),
|
||||
currPage = pages[pages.length - 1];
|
||||
this.$emit('authColse', false);
|
||||
if (this.isGoIndex) {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
} else {
|
||||
this.$emit('authColse', false);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
close() {
|
||||
let pages = getCurrentPages(),
|
||||
currPage = pages[pages.length - 1];
|
||||
this.$emit('authColse', false);
|
||||
if (this.isGoIndex) {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
} else {
|
||||
this.$emit('authColse', false);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang='scss'>
|
||||
.Popup {
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 500rpx;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 500rpx;
|
||||
left: 125rpx;
|
||||
z-index: 1000;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.Popup {
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 500rpx;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 500rpx;
|
||||
left: 125rpx;
|
||||
z-index: 1000;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.Popup {
|
||||
.logo-auth {
|
||||
z-index: -1;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 0%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 8rpx solid #fff;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
}
|
||||
.Popup {
|
||||
.logo-auth {
|
||||
z-index: -1;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 0%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 8rpx solid #fff;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.image {
|
||||
height: 42rpx;
|
||||
margin-top: -54rpx;
|
||||
}
|
||||
}
|
||||
.image {
|
||||
height: 42rpx;
|
||||
margin-top: -54rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.Popup .title {
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
margin-top: 30rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 500rpx;
|
||||
display: flex;
|
||||
}
|
||||
.Popup .title {
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
margin-top: 30rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 500rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.Popup .tip {
|
||||
font-size: 22rpx;
|
||||
color: #555;
|
||||
padding: 0 24rpx;
|
||||
margin-top: 25rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.Popup .tip {
|
||||
font-size: 22rpx;
|
||||
color: #555;
|
||||
padding: 0 24rpx;
|
||||
margin-top: 25rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.Popup .bottom .item {
|
||||
width: 250rpx;
|
||||
height: 80rpx;
|
||||
background-color: #eeeeee;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin-top: 54rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
.Popup .bottom .item {
|
||||
width: 250rpx;
|
||||
height: 80rpx;
|
||||
background-color: #eeeeee;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin-top: 54rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.Popup .bottom .item.on {
|
||||
width: 500rpx;
|
||||
}
|
||||
.Popup .bottom .item.on {
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.Popup .bottom .item.grant {
|
||||
font-weight: bold;
|
||||
background-color: #E93323;
|
||||
/* background-color: var(--view-theme); */
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
.Popup .bottom .item.grant {
|
||||
font-weight: bold;
|
||||
background-color: #E93323;
|
||||
/* background-color: var(--view-theme); */
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
|
||||
.text {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.65);
|
||||
z-index: 99;
|
||||
}
|
||||
.mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.65);
|
||||
z-index: 99;
|
||||
}
|
||||
</style>
|
@ -1,95 +0,0 @@
|
||||
<template>
|
||||
<div class="popup" v-if="isShow">
|
||||
<div class="box">
|
||||
<div class="loading"></div>
|
||||
<p>{{str}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Loading',
|
||||
data() {
|
||||
return {
|
||||
isShow: false,
|
||||
str: '初始化中',
|
||||
timer: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
uni.$on('showLoading', (type, str) => {
|
||||
if (type == true) {
|
||||
this.isShow = true;
|
||||
this.str = str;
|
||||
} else {
|
||||
this.isShow = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
clickTow(){
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.popup-enter-active,
|
||||
.popup-leave-active {
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.popup-enter,
|
||||
.popup-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.popup {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
z-index: 99999999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
.box{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
color: #eee;
|
||||
height: 300rpx;
|
||||
width: 300rpx;
|
||||
border-radius: 20rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.loading {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border: 6rpx solid #eee;
|
||||
border-top-color: transparent;
|
||||
border-radius: 100%;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
animation: circle infinite 0.75s linear;
|
||||
}
|
||||
|
||||
@keyframes circle {
|
||||
0% {
|
||||
transform: rotate(0);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -162,10 +162,10 @@ export default {
|
||||
itemTap(item) {
|
||||
this.$emit('itemTap', item)
|
||||
},
|
||||
// item点击
|
||||
goShop(item) {
|
||||
this.$emit('goShop', item)
|
||||
}
|
||||
// item点击
|
||||
goShop(item) {
|
||||
this.$emit('goShop', item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,208 +0,0 @@
|
||||
<template>
|
||||
<view :class="'wf-page wf-page'+type">
|
||||
<!-- left -->
|
||||
|
||||
|
||||
<view>
|
||||
|
||||
<view id="left" v-if="leftList.length">
|
||||
<view v-for="(item,index) in leftList" :key="index"
|
||||
class="wf-itema" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- right -->
|
||||
<view>
|
||||
<view id="right" v-if="rightList.length">
|
||||
<view v-for="(item,index) in rightList" :key="index"
|
||||
class="wf-itemb" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItemo.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
WaterfallsFlowItem
|
||||
},
|
||||
props: {
|
||||
// 瀑布流列表
|
||||
wfList: {
|
||||
type: Array,
|
||||
require: true
|
||||
},
|
||||
updateNum: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
isStore: {
|
||||
type: [String, Number],
|
||||
default: '1'
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allList: [], // 全部列表
|
||||
leftList: [], // 左边列表
|
||||
rightList: [], // 右边列表
|
||||
mark: 0, // 列表标记
|
||||
boxHeight: [], // 下标0和1分别为左列和右列高度
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听列表数据变化
|
||||
wfList: {
|
||||
|
||||
handler(nVal,oVal){
|
||||
|
||||
// 如果数据为空或新的列表数据少于旧的列表数据(通常为下拉刷新或切换排序或使用筛选器),初始化变量
|
||||
if (!this.wfList.length ||
|
||||
(this.wfList.length === this.updateNum && this.wfList.length <= this.allList.length)) {
|
||||
this.allList = [];
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.mark = 0;
|
||||
}
|
||||
|
||||
// 如果列表有值,调用waterfall方法
|
||||
if (this.wfList.length) {
|
||||
this.allList = this.wfList;
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.allList.forEach((v, i) => {
|
||||
if(this.allList.length < 3 || (this.allList.length <= 7 && this.allList.length - i > 1) || (this.allList.length > 7 && this.allList.length - i > 2)) {
|
||||
if(i % 2){
|
||||
this.rightList.push(v);
|
||||
}else{
|
||||
this.leftList.push(v);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(this.allList.length < 3){
|
||||
this.mark = this.allList.length+1;
|
||||
}else if(this.allList.length <= 7){
|
||||
this.mark = this.allList.length - 1;
|
||||
}else{
|
||||
this.mark = this.allList.length - 2;
|
||||
}
|
||||
if(this.mark < this.allList.length){
|
||||
this.waterFall()
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
},
|
||||
mounted(){
|
||||
|
||||
},
|
||||
|
||||
// 监听标记,当标记发生变化,则执行下一个item排序
|
||||
mark() {
|
||||
const len = this.allList.length;
|
||||
if (this.mark < len && this.mark !== 0 && this.boxHeight.length) {
|
||||
this.waterFall();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 瀑布流排序
|
||||
waterFall() {
|
||||
const i = this.mark;
|
||||
|
||||
if (i == 0) {
|
||||
// 初始化,从左边开始插入
|
||||
this.leftList.push(this.allList[i]);
|
||||
// 更新左边列表高度
|
||||
this.getViewHeight(0);
|
||||
} else if (i == 1) {
|
||||
// 第二个item插入,默认为右边插入
|
||||
this.rightList.push(this.allList[i]);
|
||||
// 更新右边列表高度
|
||||
this.getViewHeight(1);
|
||||
} else {
|
||||
// 根据左右列表高度判断下一个item应该插入哪边
|
||||
if(!this.boxHeight.length){
|
||||
this.rightList.length < this.leftList.length
|
||||
? this.rightList.push(this.allList[i])
|
||||
: this.leftList.push(this.allList[i]);
|
||||
} else {
|
||||
const leftOrRight = this.boxHeight[0] > this.boxHeight[1] ? 1 : 0;
|
||||
if (leftOrRight) {
|
||||
this.rightList.push(this.allList[i])
|
||||
} else {
|
||||
this.leftList.push(this.allList[i])
|
||||
}
|
||||
}
|
||||
// 更新插入列表高度
|
||||
this.getViewHeight();
|
||||
}
|
||||
},
|
||||
// 获取列表高度
|
||||
getViewHeight() {
|
||||
// 使用nextTick,确保页面更新结束后,再请求高度
|
||||
this.$nextTick(() => {
|
||||
setTimeout(()=>{
|
||||
uni.createSelectorQuery().in(this).select('#right').boundingClientRect(res => {
|
||||
res ? this.boxHeight[1] = res.height : '';
|
||||
uni.createSelectorQuery().in(this).select('#left').boundingClientRect(res => {
|
||||
res ? this.boxHeight[0] = res.height : '';
|
||||
this.mark = this.mark + 1;
|
||||
}).exec();
|
||||
}).exec();
|
||||
},100)
|
||||
})
|
||||
},
|
||||
// item点击
|
||||
itemTap(item) {
|
||||
// this.$emit('itemTap', item)
|
||||
},
|
||||
// item点击
|
||||
goShop(item) {
|
||||
this.$emit('goShop', item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$page-padding: 10px;
|
||||
$grid-gap: 5px;
|
||||
|
||||
.wf-page {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: $grid-gap;
|
||||
}
|
||||
.wf-itema {
|
||||
width: 356rpx;
|
||||
padding-bottom: $grid-gap;
|
||||
}
|
||||
.wf-itemb {
|
||||
width: 356rpx;
|
||||
padding-bottom: $grid-gap;
|
||||
}
|
||||
.wf-page1 .wf-item{
|
||||
margin-top: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.wf-item-page{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
@ -1,195 +0,0 @@
|
||||
<template>
|
||||
<view :class="'wf-page wf-page'+type">
|
||||
<!-- left -->
|
||||
<view>
|
||||
<view id="left" v-if="leftList.length">
|
||||
<view v-for="(item,index) in leftList" :key="index"
|
||||
class="wf-item" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItemp :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- right -->
|
||||
<view>
|
||||
<view id="right" v-if="rightList.length">
|
||||
<view v-for="(item,index) in rightList" :key="index"
|
||||
class="wf-item" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItemp :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WaterfallsFlowItemp from '../WaterfallsFlowItem/WaterfallsFlowItemp.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
WaterfallsFlowItemp
|
||||
},
|
||||
props: {
|
||||
// 瀑布流列表
|
||||
wfList: {
|
||||
type: Array,
|
||||
require: true
|
||||
},
|
||||
updateNum: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
isStore: {
|
||||
type: [String, Number],
|
||||
default: '1'
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allList: [], // 全部列表
|
||||
leftList: [], // 左边列表
|
||||
rightList: [], // 右边列表
|
||||
mark: 0, // 列表标记
|
||||
boxHeight: [], // 下标0和1分别为左列和右列高度
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听列表数据变化
|
||||
wfList: {
|
||||
handler(nVal,oVal){
|
||||
// 如果数据为空或新的列表数据少于旧的列表数据(通常为下拉刷新或切换排序或使用筛选器),初始化变量
|
||||
if (!this.wfList.length ||
|
||||
(this.wfList.length === this.updateNum && this.wfList.length <= this.allList.length)) {
|
||||
this.allList = [];
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.mark = 0;
|
||||
}
|
||||
|
||||
// 如果列表有值,调用waterfall方法
|
||||
if (this.wfList.length) {
|
||||
this.allList = this.wfList;
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.allList.forEach((v, i) => {
|
||||
if(this.allList.length < 3 || (this.allList.length <= 7 && this.allList.length - i > 1) || (this.allList.length > 7 && this.allList.length - i > 2)) {
|
||||
if(i % 2){
|
||||
this.rightList.push(v);
|
||||
}else{
|
||||
this.leftList.push(v);
|
||||
}
|
||||
}
|
||||
});
|
||||
if(this.allList.length < 3){
|
||||
this.mark = this.allList.length+1;
|
||||
}else if(this.allList.length <= 7){
|
||||
this.mark = this.allList.length - 1;
|
||||
}else{
|
||||
this.mark = this.allList.length - 2;
|
||||
}
|
||||
if(this.mark < this.allList.length){
|
||||
this.waterFall()
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
|
||||
// 监听标记,当标记发生变化,则执行下一个item排序
|
||||
mark() {
|
||||
const len = this.allList.length;
|
||||
if (this.mark < len && this.mark !== 0 && this.boxHeight.length) {
|
||||
this.waterFall();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 瀑布流排序
|
||||
waterFall() {
|
||||
const i = this.mark;
|
||||
if (i == 0) {
|
||||
// 初始化,从左边开始插入
|
||||
this.leftList.push(this.allList[i]);
|
||||
// 更新左边列表高度
|
||||
this.getViewHeight(0);
|
||||
} else if (i == 1) {
|
||||
// 第二个item插入,默认为右边插入
|
||||
this.rightList.push(this.allList[i]);
|
||||
// 更新右边列表高度
|
||||
this.getViewHeight(1);
|
||||
} else {
|
||||
// 根据左右列表高度判断下一个item应该插入哪边
|
||||
if(!this.boxHeight.length){
|
||||
this.rightList.length < this.leftList.length
|
||||
? this.rightList.push(this.allList[i])
|
||||
: this.leftList.push(this.allList[i]);
|
||||
} else {
|
||||
const leftOrRight = this.boxHeight[0] > this.boxHeight[1] ? 1 : 0;
|
||||
if (leftOrRight) {
|
||||
this.rightList.push(this.allList[i])
|
||||
} else {
|
||||
this.leftList.push(this.allList[i])
|
||||
}
|
||||
}
|
||||
// 更新插入列表高度
|
||||
this.getViewHeight();
|
||||
}
|
||||
},
|
||||
// 获取列表高度
|
||||
getViewHeight() {
|
||||
// 使用nextTick,确保页面更新结束后,再请求高度
|
||||
this.$nextTick(() => {
|
||||
setTimeout(()=>{
|
||||
uni.createSelectorQuery().in(this).select('#right').boundingClientRect(res => {
|
||||
res ? this.boxHeight[1] = res.height : '';
|
||||
uni.createSelectorQuery().in(this).select('#left').boundingClientRect(res => {
|
||||
res ? this.boxHeight[0] = res.height : '';
|
||||
this.mark = this.mark + 1;
|
||||
}).exec();
|
||||
}).exec();
|
||||
},100)
|
||||
})
|
||||
},
|
||||
// item点击
|
||||
itemTap(item) {
|
||||
this.$emit('itemTap', item)
|
||||
},
|
||||
// item点击
|
||||
goShop(item) {
|
||||
this.$emit('goShop', item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$page-padding: 10px;
|
||||
$grid-gap: 10px;
|
||||
|
||||
.wf-page {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: $grid-gap;
|
||||
}
|
||||
.wf-item {
|
||||
width: calc((100vw - 2 * #{$page-padding} - #{$grid-gap}) / 2);
|
||||
padding-bottom: $grid-gap;
|
||||
}
|
||||
.wf-page1 .wf-item{
|
||||
margin-top: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.wf-item-page{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
@ -1,207 +0,0 @@
|
||||
<template>
|
||||
<view :class="'wf-page wf-page'+type">
|
||||
<!-- left -->
|
||||
|
||||
<view>
|
||||
|
||||
<view id="left" v-if="leftList.length">
|
||||
<view v-for="(item,index) in leftList" :key="index"
|
||||
class="wf-itema" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItem :item="item" :isStore="isStore" :heightx="251" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- right -->
|
||||
<view>
|
||||
<view id="right" v-if="rightList.length">
|
||||
<view v-for="(item,index) in rightList" :key="index"
|
||||
class="wf-itemb" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItem :item="item" :isStore="isStore" :heightx="336" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItems.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
WaterfallsFlowItem
|
||||
},
|
||||
props: {
|
||||
// 瀑布流列表
|
||||
wfList: {
|
||||
type: Array,
|
||||
require: true
|
||||
},
|
||||
updateNum: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
isStore: {
|
||||
type: [String, Number],
|
||||
default: '1'
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allList: [], // 全部列表
|
||||
leftList: [], // 左边列表
|
||||
rightList: [], // 右边列表
|
||||
mark: 0, // 列表标记
|
||||
boxHeight: [], // 下标0和1分别为左列和右列高度
|
||||
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听列表数据变化
|
||||
wfList: {
|
||||
|
||||
handler(nVal,oVal){
|
||||
|
||||
// 如果数据为空或新的列表数据少于旧的列表数据(通常为下拉刷新或切换排序或使用筛选器),初始化变量
|
||||
if (!this.wfList.length ||
|
||||
(this.wfList.length === this.updateNum && this.wfList.length <= this.allList.length)) {
|
||||
this.allList = [];
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.mark = 0;
|
||||
}
|
||||
|
||||
// 如果列表有值,调用waterfall方法
|
||||
if (this.wfList.length) {
|
||||
this.allList = this.wfList;
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.allList.forEach((v, i) => {
|
||||
if(this.allList.length < 3 || (this.allList.length <= 7 && this.allList.length - i > 1) || (this.allList.length > 7 && this.allList.length - i > 2)) {
|
||||
if(i % 2){
|
||||
this.rightList.push(v);
|
||||
}else{
|
||||
this.leftList.push(v);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(this.allList.length < 3){
|
||||
this.mark = this.allList.length+1;
|
||||
}else if(this.allList.length <= 7){
|
||||
this.mark = this.allList.length - 1;
|
||||
}else{
|
||||
this.mark = this.allList.length - 2;
|
||||
}
|
||||
if(this.mark < this.allList.length){
|
||||
this.waterFall()
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
},
|
||||
|
||||
// 监听标记,当标记发生变化,则执行下一个item排序
|
||||
mark() {
|
||||
const len = this.allList.length;
|
||||
if (this.mark < len && this.mark !== 0 && this.boxHeight.length) {
|
||||
this.waterFall();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
// 瀑布流排序
|
||||
waterFall() {
|
||||
const i = this.mark;
|
||||
if (i == 0) {
|
||||
// 初始化,从左边开始插入
|
||||
this.leftList.push(this.allList[i]);
|
||||
// 更新左边列表高度
|
||||
this.getViewHeight(0);
|
||||
} else if (i == 1) {
|
||||
// 第二个item插入,默认为右边插入
|
||||
this.rightList.push(this.allList[i]);
|
||||
// 更新右边列表高度
|
||||
this.getViewHeight(1);
|
||||
} else {
|
||||
// 根据左右列表高度判断下一个item应该插入哪边
|
||||
if(!this.boxHeight.length){
|
||||
this.rightList.length < this.leftList.length
|
||||
? this.rightList.push(this.allList[i])
|
||||
: this.leftList.push(this.allList[i]);
|
||||
} else {
|
||||
const leftOrRight = this.boxHeight[0] > this.boxHeight[1] ? 1 : 0;
|
||||
if (leftOrRight) {
|
||||
this.rightList.push(this.allList[i])
|
||||
} else {
|
||||
this.leftList.push(this.allList[i])
|
||||
}
|
||||
}
|
||||
// 更新插入列表高度
|
||||
this.getViewHeight();
|
||||
}
|
||||
},
|
||||
// 获取列表高度
|
||||
getViewHeight() {
|
||||
// 使用nextTick,确保页面更新结束后,再请求高度
|
||||
this.$nextTick(() => {
|
||||
setTimeout(()=>{
|
||||
uni.createSelectorQuery().in(this).select('#right').boundingClientRect(res => {
|
||||
res ? this.boxHeight[1] = res.height : '';
|
||||
uni.createSelectorQuery().in(this).select('#left').boundingClientRect(res => {
|
||||
res ? this.boxHeight[0] = res.height : '';
|
||||
this.mark = this.mark + 1;
|
||||
}).exec();
|
||||
}).exec();
|
||||
},100)
|
||||
})
|
||||
},
|
||||
// item点击
|
||||
itemTap(item) {
|
||||
this.$emit('itemTap', item)
|
||||
},
|
||||
// item点击
|
||||
goShop(item) {
|
||||
this.$emit('goShop', item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$page-padding: 10px;
|
||||
$grid-gap: 5px;
|
||||
|
||||
.wf-page {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: $grid-gap;
|
||||
}
|
||||
.wf-itema {
|
||||
width: 356rpx;
|
||||
padding-bottom: $grid-gap;
|
||||
}
|
||||
.wf-itemb {
|
||||
width: 356rpx;
|
||||
padding-bottom: $grid-gap;
|
||||
}
|
||||
.wf-page1 .wf-item{
|
||||
margin-top: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.wf-item-page{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
@ -49,7 +49,7 @@
|
||||
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
|
||||
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
|
||||
</view>
|
||||
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论<text v-if="item.merchant" style="margin-left: 10rpx;">{{item.merchant.street_name}}</text></view>
|
||||
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论</view>
|
||||
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
|
||||
<text class="line1">{{item.merchant.mer_name}}</text>
|
||||
<view class="flex" v-if="isStore != '1'">
|
||||
@ -80,7 +80,7 @@ export default {
|
||||
require: true
|
||||
},
|
||||
type: {
|
||||
type: Number|String,
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
isStore: {
|
||||
|
@ -1,226 +0,0 @@
|
||||
<template>
|
||||
<view class="wf-item-page" @click="gogogo(item)">
|
||||
|
||||
<view class='pictrue'>
|
||||
<!-- <image :src="item.image[0]" mode="widthFix" class="item-img" /> -->
|
||||
<image :src="item.image" mode="aspectFill" class="item-img"></image>
|
||||
<!-- <easy-loadimage mode="widthFix" :image-src="item.image[0]"></easy-loadimage> -->
|
||||
</view>
|
||||
|
||||
<view class="title">{{item.store_name}}</view>
|
||||
<!-- <view class="tag">
|
||||
<view class="tag-one">
|
||||
自营商品
|
||||
</view>
|
||||
<view class="tag-two">
|
||||
|
||||
<text class="tag-twoa">折</text>
|
||||
<text class="tag-twob">满20包邮</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="relase">
|
||||
<view class="relase-one">
|
||||
{{item.rate}}
|
||||
</view>
|
||||
<view class="relase-two">
|
||||
{{item.reply_count}}评论
|
||||
</view>
|
||||
<view class="relase-two">
|
||||
{{item.merchant&&item.merchant.distance}}
|
||||
</view>
|
||||
<view class="relase-two">
|
||||
{{item.merchant&&item.merchant.street_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="price">
|
||||
<span>¥</span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
|
||||
</view>
|
||||
<!-- <view class="item-info">
|
||||
<view class="info-title" style="margin-right: 10rpx;">
|
||||
{{item.merchant.mer_name}}
|
||||
</view>
|
||||
<view class="info-img">
|
||||
<image src="@/static/images/you.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
require: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
gogogo(item) {
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods_details/index?id=' + item.product_id
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wf-item-page {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.pictrue {
|
||||
width: 100% !important;
|
||||
height: 345rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 345rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-info {}
|
||||
|
||||
.title {
|
||||
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin: 14rpx 0;
|
||||
margin-bottom: 0;
|
||||
padding-right: 12rpx;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
margin-left: 21rpx;
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: flex;
|
||||
margin-left: 21rpx;
|
||||
|
||||
.tag-one {
|
||||
|
||||
text-align: center;
|
||||
padding: 2rpx 9rpx;
|
||||
border-radius: 11rpx 11rpx 11rpx 11rpx;
|
||||
border: 1px solid #3274F9;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.tag-two {
|
||||
|
||||
.tag-twoa {
|
||||
width: 130rpx;
|
||||
text-align: center;
|
||||
padding-left: 15rpx;
|
||||
padding-right: 7rpx;
|
||||
border-radius: 11rpx 0px 0px 0rpx;
|
||||
border: 1px solid #F84221;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.tag-twob {
|
||||
width: 130rpx;
|
||||
text-align: center;
|
||||
padding: 2rpx 9rpx;
|
||||
border-radius: 0px 11rpx 11rpx 0px;
|
||||
border: 1px solid #F84221;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.relase {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: 21rpx;
|
||||
margin-top: 12rpx;
|
||||
min-height: 26rpx;
|
||||
line-height: 26rpx;
|
||||
|
||||
.relase-one {
|
||||
// font-style: italic;
|
||||
transform: skewX(-15deg);
|
||||
font-size: 26rpx;
|
||||
font-family: SF Pro Display-Regular Italic, SF Pro Display;
|
||||
font-weight: 600;
|
||||
color: #FF6D20;
|
||||
}
|
||||
|
||||
.relase-two {
|
||||
font-size: 23rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #B3B3B3;
|
||||
margin-left: 13rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.price {
|
||||
margin-left: 21rpx;
|
||||
// margin-bottom: 10rpx;
|
||||
color: #F84221;
|
||||
font-size: 44rpx;
|
||||
font-weight: 600;
|
||||
|
||||
span {
|
||||
color: #F84221;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
text {
|
||||
color: #F84221;
|
||||
font-size: 37rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.item-info {
|
||||
margin-left: 21rpx;
|
||||
margin-bottom: 25rpx;
|
||||
display: flex;
|
||||
|
||||
width: 280rpx;
|
||||
height: 39rpx;
|
||||
line-height: 39rpx;
|
||||
background: #F4F7FE;
|
||||
border-radius: 19rpx 19rpx;
|
||||
opacity: 1;
|
||||
font-size: 23rpx;
|
||||
padding-left: 11rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
|
||||
.info-img {
|
||||
width: 21rpx;
|
||||
height: 21rpx;
|
||||
margin-top: 5rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,347 +0,0 @@
|
||||
<template>
|
||||
<view v-if="type == 0" class="wf-item-page wf-page0" :style="viewColor">
|
||||
<view class='pictrue'>
|
||||
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
|
||||
<view v-if="item.stock == 0" class="sell_out">已售罄</view>
|
||||
<view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class='name line2'>{{item.store_name}}</view>
|
||||
<view class="acea-row row-middle">
|
||||
<view class='money'>¥<text class='num'>{{item.price}}</text></view>
|
||||
</view>
|
||||
<view v-if="item.show_svip_info && item.show_svip_info.show_svip_price && item.svip_price" class="acea-row row-middle svip">
|
||||
<text class='vip-money'>¥{{item.svip_price}}</text>
|
||||
<view class="vipImg">
|
||||
<image src="/static/images/svip.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item_tags">
|
||||
<!-- <text v-if="item.product_type == 0 && item.merchant.type_name" class="font-bg-red b-color">{{item.merchant.type_name}}</text>
|
||||
<text v-else-if="item.product_type == 0 && item.merchant.is_trader" class="font-bg-red b-color">自营</text> -->
|
||||
<text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
|
||||
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
|
||||
<!-- <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="type == 1" class="wf-page1" :style="viewColor">
|
||||
<view class='pictrue'>
|
||||
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
|
||||
<view v-if="item.stock == 0" class="sell_out">已售罄</view>
|
||||
<view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='name line2'>{{item.store_name}}</view>
|
||||
<view class='money'>
|
||||
¥<text class='num'>{{item.price}}</text>
|
||||
</view>
|
||||
<view v-if="item.show_svip_info.show_svip && item.show_svip_info.show_svip_price" class="acea-row row-middle svip">
|
||||
<text class='vip-money'>¥{{item.svip_price}}</text>
|
||||
<view class="vipImg">
|
||||
<image src="/static/images/svip.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item_tags acea-row">
|
||||
<!-- <text v-if="item.merchant.type_name && item.product_type == 0" class="font-bg-red b-color">{{item.merchant.type_name}}</text>
|
||||
<text v-else-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red b-color">自营</text> -->
|
||||
<text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
|
||||
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
|
||||
<!-- <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text> -->
|
||||
</view>
|
||||
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论<text v-if="item.merchant" style="margin-left: 10rpx;">{{item.merchant.street_name}}</text></view>
|
||||
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
|
||||
<text class="line1">{{item.merchant.village_name}}</text>
|
||||
<!-- <view class="flex" v-if="isStore != '1'">
|
||||
进店
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 返佣 -->
|
||||
<block v-if="item.max_extension>0 && (item.product_type == 0 || item.product_type == 2)">
|
||||
<view class="foot-bar">
|
||||
<text class="iconfont icon-fenxiang"></text>
|
||||
最高赚 ¥{{item.max_extension}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
|
||||
import {mapGetters} from "vuex";
|
||||
export default {
|
||||
components:{easyLoadimage},
|
||||
computed: mapGetters(['viewColor']),
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
require: true
|
||||
},
|
||||
type: {
|
||||
type: Number|String,
|
||||
default: 0
|
||||
},
|
||||
isStore: {
|
||||
type: [String, Number],
|
||||
default: '1'
|
||||
},
|
||||
isLogin: {
|
||||
type: Boolean,
|
||||
require: false
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goShop(id) {
|
||||
this.$emit('goShop', id);
|
||||
},
|
||||
authOpen(){
|
||||
this.$emit('authOpen');
|
||||
},
|
||||
followToggle(item){
|
||||
this.$emit('followToggle', item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.wf-item-page {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
border-radius: 16rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.wf-page0 .coupon{
|
||||
background:rgba(255,248,247,1);
|
||||
border:1px solid rgba(233,51,35,1);
|
||||
border-radius:4rpx;
|
||||
font-size:20rpx;
|
||||
margin-left: 18rpx;
|
||||
padding: 1rpx 4rpx;
|
||||
}
|
||||
.wf-page0 .pictrue{
|
||||
width: 100%!important;
|
||||
height: 345rpx;
|
||||
position: relative;
|
||||
/deep/image,/deep/.easy-loadimage,uni-image{
|
||||
height: 345rpx;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
}
|
||||
.border-picture {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
background: center/cover no-repeat;
|
||||
}
|
||||
}
|
||||
.loadfail-img{
|
||||
width: 100%;
|
||||
height: 360rpx;
|
||||
}
|
||||
.svip{
|
||||
margin: 5rpx 0 15rpx;
|
||||
}
|
||||
.vip-money {
|
||||
color: #282828;
|
||||
font-size: 22rpx;
|
||||
margin-left: 6rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.vipImg {
|
||||
width: 65rpx;
|
||||
height: 28rpx;
|
||||
margin-left: 4rpx;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.wf-page0 .name {
|
||||
color: #282828;
|
||||
margin: 20rpx 0 10rpx 0;
|
||||
font-size: 13px;
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-align: left;
|
||||
}
|
||||
.wf-page0 .text{
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.wf-page0 .money {
|
||||
font-size: 20rpx;
|
||||
font-weight: bold;
|
||||
color: var(--view-priceColor);
|
||||
}
|
||||
.b-color {
|
||||
background-color: var(--view-theme);
|
||||
border: 1px solid var(--view-theme);
|
||||
}
|
||||
.wf-page0 .money .num {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.wf-page1 .wf-item{
|
||||
.name{
|
||||
font-size: 13px;
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.wf-page1 .pictrue {
|
||||
position: relative;
|
||||
height: 345rpx;
|
||||
width: 100%!important;
|
||||
/deep/image,/deep/.easy-loadimage,uni-image{
|
||||
height: 345rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.border-picture {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
background: center/cover no-repeat;
|
||||
}
|
||||
|
||||
}
|
||||
.sell_out {
|
||||
display: flex;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 100%;
|
||||
background: rgba(0,0,0,.6);
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -75rpx 0 0 -75rpx;
|
||||
&::before{
|
||||
content: "";
|
||||
display: block;
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 100%;
|
||||
border: 1px dashed #fff;
|
||||
position: absolute;
|
||||
top: 5rpx;
|
||||
left: 5rpx;
|
||||
}
|
||||
}
|
||||
.loading-img{
|
||||
height: 345rpx;
|
||||
max-height: 360rpx;
|
||||
}
|
||||
.wf-page1 .text {
|
||||
padding: 20rpx 17rpx 26rpx 17rpx;
|
||||
font-size: 30rpx;
|
||||
color: #222;
|
||||
}
|
||||
.wf-page1 .text .money {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
margin-top: 8rpx;
|
||||
color: var(--view-priceColor);
|
||||
}
|
||||
.wf-page1 .text .money .num {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.item_tags{
|
||||
margin-top: 8rpx;
|
||||
display: flex;
|
||||
}
|
||||
.item_tags .tags_item {
|
||||
display: flex;
|
||||
font-size: 20rpx;
|
||||
text-align: center;
|
||||
border-radius: 5rpx;
|
||||
padding: 0 4rpx;
|
||||
height: 28rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.item_tags .tags_item.ticket{
|
||||
color: var(--view-theme);
|
||||
border: 1px solid var(--view-theme);
|
||||
}
|
||||
.item_tags .tags_item.delivery{
|
||||
color: #FF9000;
|
||||
border: 1px solid #FF9000;
|
||||
}
|
||||
.wf-page1 .text .money .ticket-big {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
max-width: 163rpx;
|
||||
padding: 0 6rpx;
|
||||
height: 28rpx;
|
||||
margin-left: 10rpx;
|
||||
background-image: url(~static/images/yh.png);
|
||||
background-size: 100% 100%;
|
||||
font-size: 20rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
.wf-page1 .text .score {
|
||||
margin-top: 10rpx;
|
||||
color: #737373;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.wf-page1 .text .company {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #737373;
|
||||
font-size: 20rpx;
|
||||
margin-top: 10rpx;
|
||||
.line1{
|
||||
// max-width: 200rpx;
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 10rpx;
|
||||
color: #282828;
|
||||
.iconfont {
|
||||
font-size: 16rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.foot-bar {
|
||||
width: 100%;
|
||||
height: 52rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
|
||||
border-radius: 0px 0px 16rpx 16rpx;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
.icon-fenxiang {
|
||||
font-size: 24rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,121 +0,0 @@
|
||||
<template>
|
||||
<view class="wf-item-page">
|
||||
<view class='pictrue'>
|
||||
<!-- <image :src="item.image[0]" mode="widthFix" class="item-img" /> -->
|
||||
<image :src="item.image[0]" mode="aspectFill" class="item-img"></image>
|
||||
<!-- <easy-loadimage mode="widthFix" :image-src="item.image[0]"></easy-loadimage> -->
|
||||
</view>
|
||||
<view class="goods_item_img" v-if="item.video_link.length>0">
|
||||
<image src="@/static/images/sp.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="item-info">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFit"
|
||||
class="info-avatar" />
|
||||
<view class="info-nickname">{{ item.author.nickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
string
|
||||
} from '../../plugin/clipboard/clipboard'
|
||||
export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
require: true
|
||||
},
|
||||
heightx: {
|
||||
type: string,
|
||||
require: true
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wf-item-page {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pictrue {
|
||||
width: 100% !important;
|
||||
height: 345rpx;
|
||||
|
||||
image{
|
||||
width: 100% ;
|
||||
height: 345rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.item-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.goods_item_img {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 18rpx;
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
z-index: 1 !important;
|
||||
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin: 12px 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.info-avatar {
|
||||
width: 49rpx;
|
||||
height: 49rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.info-nickname {
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
@ -1,102 +0,0 @@
|
||||
<template>
|
||||
<view class="a_c_home">
|
||||
<view class="c_card">
|
||||
<view class="c_content">
|
||||
<scroll-view style="height: 100%;" scroll-y>
|
||||
<view v-if="info.content" v-html="info.content.content"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="btn_box">
|
||||
<image class="btn_img" @click="open()" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_btn1.webp"></image>
|
||||
<image class="btn_img" @click="open()" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_btn2.webp"></image>
|
||||
</view>
|
||||
</view>
|
||||
<image class="head_img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_head.webp" info="活动标题"></image>
|
||||
<image class="close_img" @click="close" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png" info="关闭按钮"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getArticleList } from "@/api/api.js"
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
info: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getArticleList();
|
||||
},
|
||||
methods:{
|
||||
close(){
|
||||
this.$emit('close');
|
||||
},
|
||||
open(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/newActivity/activityDetail/activityDetail'
|
||||
})
|
||||
},
|
||||
getArticleList(){
|
||||
getArticleList(25).then(res=>{
|
||||
this.info = res.data.list[0]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.a_c_home{
|
||||
width: 600rpx;
|
||||
height: 90vh;
|
||||
// border: 1px solid red;
|
||||
position: relative;
|
||||
.head_img{
|
||||
width: 568rpx;
|
||||
height: 207rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
}
|
||||
.c_card{
|
||||
height: calc(100% - 300rpx);
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
position: absolute;
|
||||
border-radius: 50rpx;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 30rpx;
|
||||
padding-top: 70rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.c_content{
|
||||
height: calc(100% - 220rpx);
|
||||
width: 100%;
|
||||
// background-color: #eee;
|
||||
}
|
||||
.btn_box{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.btn_img{
|
||||
width: 461rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.close_img{
|
||||
position: absolute;
|
||||
bottom: 60rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,62 +0,0 @@
|
||||
<template>
|
||||
<view class="a_h_home">
|
||||
<view class="a_h_body" v-if="show">
|
||||
<image @click.stop="open()" class="a_h_bg" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/tow_price_card.webp"></image>
|
||||
<image v-if="showClose" @click.stop="close()" class="a_h_close" src="../static/images/wt_close.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
showClose: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
open(){
|
||||
this.$emit('click');
|
||||
},
|
||||
close(){
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.a_h_home{
|
||||
position: fixed;
|
||||
bottom: 25vh;
|
||||
right: 30rpx;
|
||||
z-index: 10;
|
||||
width: 180rpx;
|
||||
// height: 150rpx;
|
||||
.a_h_bg{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.a_h_body{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// background-color: #eee;
|
||||
position: relative;
|
||||
.a_h_close{
|
||||
position: absolute;
|
||||
right: 5rpx;
|
||||
top: 5rpx;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
background-color: rgba(#000, 0.4);
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view :style="viewColor" @touchmove.stop.prevent="()=>{}">
|
||||
<view :style="viewColor">
|
||||
<view class="add_invoicing" :class="invoice.invoice==true?'on':''">
|
||||
<view class='title'>选择发票<text class='iconfont icon-guanbi' @tap='close'></text></view>
|
||||
<form @submit="formSubmit" report-submit="true">
|
||||
@ -302,15 +302,11 @@
|
||||
this.popupTitle = false;
|
||||
},
|
||||
changeHeader(e) {
|
||||
console.log(e);
|
||||
this.receipt_title_type = e.detail.value;
|
||||
if(e.detail.value == 1){
|
||||
this.receipt_type = 1;
|
||||
this.typeName = '增值税电子普通发票'
|
||||
}else {
|
||||
this.receipt_type = 2;
|
||||
this.typeName = '增值税专用发票'
|
||||
}
|
||||
}
|
||||
this.receipt_type
|
||||
},
|
||||
changeDefault(e) {
|
||||
|
@ -18,7 +18,7 @@
|
||||
<image src='../../static/images/noAddress.png'></image>
|
||||
<view>暂无地址</view>
|
||||
</view>
|
||||
<view class='addressBnt' @tap='goAddressPages'>添加/编辑地址</view>
|
||||
<view class='addressBnt' @tap='goAddressPages'>添加新地址</view>
|
||||
</view>
|
||||
<view class='mask' catchtouchmove="true" :hidden='address.address==false' @tap='close'></view>
|
||||
</view>
|
||||
|
@ -9,10 +9,9 @@
|
||||
<view class="close" @click="closeShowBox"><text class="iconfont icon-guanbi"></text></view>
|
||||
</view>
|
||||
<view class="box">
|
||||
<view class="check-item" v-for="(item,index) in radioList" :key="index"
|
||||
:class="{on:index == radioIndex}">
|
||||
<view class="check-item" v-for="(item,index) in radioList" :key="index" :class="{on:index == radioIndex}">
|
||||
<view>{{item.title}}</view>
|
||||
<view class="radio" @click="bindCheck(item,index)">
|
||||
<view class="radio" @click="bindCheck(item,index)">
|
||||
<block v-if="index == newData.order.isTake">
|
||||
<view class="iconfont icon-xuanzhong1"></view>
|
||||
</block>
|
||||
@ -40,79 +39,77 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
name: 'checkDelivery',
|
||||
props: {
|
||||
isShowBox: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
import { mapGetters } from "vuex";
|
||||
export default{
|
||||
name:'checkDelivery',
|
||||
props:{
|
||||
isShowBox:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
activeObj: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
activeObj:{
|
||||
type:Object,
|
||||
default:function(){
|
||||
return {}
|
||||
}
|
||||
},
|
||||
deliveryName: {
|
||||
type: String,
|
||||
default: '快递配送'
|
||||
deliveryName:{
|
||||
type:String,
|
||||
default:'快递配送'
|
||||
},
|
||||
radioList: {
|
||||
type: Array,
|
||||
default: [{
|
||||
title: '快递配送',
|
||||
check: true
|
||||
radioList:{
|
||||
type:Array,
|
||||
default: [
|
||||
{
|
||||
title:'快递配送',
|
||||
check:true
|
||||
},
|
||||
{
|
||||
title: '到店核销',
|
||||
check: false
|
||||
title:'到店核销',
|
||||
check:false
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
computed: mapGetters(['viewColor']),
|
||||
data() {
|
||||
data(){
|
||||
return {
|
||||
radioIndex: 0,
|
||||
oldRadioIndex: '', //旧的索引
|
||||
newData: {}
|
||||
radioIndex:0,
|
||||
oldRadioIndex:'', //旧的索引
|
||||
newData:{}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.newData = JSON.parse(JSON.stringify(this.activeObj))
|
||||
},
|
||||
methods: {
|
||||
methods:{
|
||||
// 关闭配送方式弹窗
|
||||
closeShowBox() {
|
||||
closeShowBox(){
|
||||
this.$emit('close')
|
||||
},
|
||||
// 选择配送方式
|
||||
bindCheck(item, index) {
|
||||
bindCheck(item,index){
|
||||
this.newData.order.isTake = index
|
||||
},
|
||||
confirmBtn() {
|
||||
this.$emit('confirmBtn', this.newData)
|
||||
confirmBtn(){
|
||||
this.$emit('confirmBtn',this.newData)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mask-box {
|
||||
.bg {
|
||||
.mask-box{
|
||||
.bg{
|
||||
z-index: 30;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
background: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.mask-content {
|
||||
.mask-content{
|
||||
z-index: 40;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
@ -122,54 +119,45 @@
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
|
||||
.title-bar {
|
||||
.title-bar{
|
||||
position: relative;
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 32rpx;
|
||||
color: #282828;
|
||||
|
||||
.close {
|
||||
.close{
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
|
||||
.iconfont {
|
||||
.iconfont{
|
||||
color: #8A8A8A;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
.box{
|
||||
padding: 0 30rpx;
|
||||
|
||||
.check-item {
|
||||
.check-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 40rpx;
|
||||
margin-bottom: 50rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.iconfont {
|
||||
.iconfont{
|
||||
font-size: 38rpx;
|
||||
color: #CCCCCC;
|
||||
|
||||
&.icon-xuanzhong1 {
|
||||
&.icon-xuanzhong1{
|
||||
color: var(--view-theme);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.foot {
|
||||
.foot{
|
||||
padding: 15rpx 30rpx;
|
||||
border-top: 1px solid #F5F5F5;
|
||||
|
||||
.btn {
|
||||
.btn{
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
@ -180,10 +168,9 @@
|
||||
background: var(--view-theme);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.animated {
|
||||
animation-duration: .3s
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -39,6 +39,7 @@
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.isshow = this.show
|
||||
},
|
||||
methods: {
|
||||
@ -56,10 +57,8 @@
|
||||
// 获取当前点击的某一个tab的的DOM元素,即类名为my-tab-item的标签
|
||||
const title = this.$refs[ref][0].$el;
|
||||
// 计算位移偏差
|
||||
// #ifdef H5
|
||||
const to = title.offsetLeft - (nav.offsetWidth - title.offsetWidth) / 2;
|
||||
nav.scrollLeft = to;
|
||||
// #endif
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -1,169 +0,0 @@
|
||||
<template>
|
||||
<view class="men-ban box " v-if ='isShow' @touchmove.stop.prevent="">
|
||||
<view class="box_next">
|
||||
<view class="box_next_title">
|
||||
<text class="box_next_title_z">{{title}}</text>
|
||||
</view>
|
||||
<slot></slot>
|
||||
<view class="box_next_but_d" v-if="isBut">
|
||||
<view @click='show' class="box_next_but_d_but">
|
||||
<text class="box_next_but_d_but_text">{{nName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box_next_but_s" v-else>
|
||||
<view class="box_next_but_s_lbut" @click="lEvent">
|
||||
<text class="box_next_but_d_but_text">{{lName}}</text>
|
||||
</view>
|
||||
<view @click="rEvent" class="box_next_but_s_rbut" hover-class="zcolor-while1">
|
||||
<text class="box_next_but_d_but_text">{{rName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: "温馨提示"
|
||||
},
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
nName: String,
|
||||
lName: String,
|
||||
rName: String,
|
||||
isBut: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
show() {
|
||||
|
||||
this.$emit('show');
|
||||
},
|
||||
lEvent() {
|
||||
this.$emit('lEvent');
|
||||
},
|
||||
rEvent() {
|
||||
this.$emit('rEvent');
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.men-ban {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999999;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.box {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.box_next {
|
||||
background-color: #ffffff;
|
||||
width: 550rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.box_next_title {
|
||||
padding: 30rpx 30rpx 0 30rpx;
|
||||
}
|
||||
|
||||
.box_next_title_z {
|
||||
font-size: 31rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.box_next_but_d {
|
||||
width: 550rpx;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 130rpx;
|
||||
}
|
||||
|
||||
.box_next_but_d_but {
|
||||
width: 500rpx;
|
||||
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
border-radius: 50rpx;
|
||||
background-color: #fee610;
|
||||
}
|
||||
|
||||
.box_next_but_d_but_text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.box_next_but_s {
|
||||
width: 550rpx;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 130rpx;
|
||||
}
|
||||
|
||||
.box_next_but_s_lbut {
|
||||
width: 200rpx;
|
||||
background-color: #f1f1f1;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.box_next_but_s_rbut {
|
||||
width: 200rpx;
|
||||
background-color: #fee610;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
</style>
|
@ -1,213 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<block>
|
||||
<view class='lists'>
|
||||
<view v-for="(item,index) in productList" class="card" :key="index" @click="godDetail(item)">
|
||||
<view class='pictrue on'>
|
||||
<u-image :src='item.image' width="336.45rpx" height="336.45rpx"> </u-image>
|
||||
</view>
|
||||
<view class="goods_content">
|
||||
<view class='name line1'>
|
||||
<text class="text-ellipsis">{{item.store_name}}</text>
|
||||
</view>
|
||||
<view class="item_tags">
|
||||
<text v-if="item.merchant.type_name && item.product_type == 0"
|
||||
class="store_type">{{item.merchant.type_name}}</text>
|
||||
<text v-else-if="item.merchant.is_trader && item.product_type == 0"
|
||||
class="store_type">自营</text>
|
||||
<text v-if="item.product_type != 0"
|
||||
:class="'font_bg-red bt-color type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
|
||||
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
|
||||
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
|
||||
</view>
|
||||
<view class="score"><text
|
||||
style="font-style: italic;color: #FF6D20;margin-right: 20rpx;font-size: 30rpx;">{{item.rate}}</text>
|
||||
{{item.reply_count}}评论
|
||||
</view>
|
||||
<view class='money'>¥
|
||||
<text
|
||||
class='num'>{{item.price.substring(0, item.price.length - 2)}}</text><text>{{item.price.slice(-2)}}</text>
|
||||
</view>
|
||||
<view class="company" v-if="item.merchant" @click.stop="goShop(item.mer_id)">
|
||||
<text class="line1">{{item.merchant.mer_name}}</text>
|
||||
<view class="flex">
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 返佣 -->
|
||||
<!-- <block v-if="item.max_extension>0 && (item.product_type == 0 || item.product_type == 2)">
|
||||
<view class="foot-bar on">
|
||||
最高赚 ¥{{item.max_extension}}
|
||||
</view>
|
||||
</block> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class='noCommodity' v-if="productList.length==0">
|
||||
<view class='pictrue' style=" margin: 60rpx auto;">
|
||||
<image src='/static/images/noCart.png'></image>
|
||||
<view>暂无商品</view>
|
||||
</view>
|
||||
<recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
|
||||
</view> -->
|
||||
</block>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
cloudWarehouse
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
goShopDetail
|
||||
} from '@/libs/order.js'
|
||||
export default {
|
||||
name: "goodsCard",
|
||||
props: {
|
||||
where: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
is_switch: false,
|
||||
productList: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$watch('where', (newValue, oldValue) => {
|
||||
newValue.category_id ? this.get_product_list() : this.productList = []
|
||||
|
||||
}, {
|
||||
deep: true
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
||||
test() {
|
||||
// this.get_product_list()
|
||||
// console.log(this.where)
|
||||
},
|
||||
godDetail(item) {
|
||||
goShopDetail(item, this.uid).then(res => {
|
||||
if (this.isLogin) {
|
||||
initiateAssistApi(item.activity_id).then(res => {
|
||||
let id = res.data.product_assist_set_id;
|
||||
uni.hideLoading();
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/assist_detail/index?id=' + id
|
||||
});
|
||||
}).catch((err) => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 去店铺
|
||||
goShop(id) {
|
||||
if (this.hide_mer_status != 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/store/home/index?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
get_product_list: function() {
|
||||
let that = this;
|
||||
cloudWarehouse(that.where).then(res => {
|
||||
that.productList = res.data.list
|
||||
}).catch(err => {
|
||||
that.loading = false;
|
||||
that.loadTitle = '加载更多';
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lists {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
background-color: #F4F7FE;
|
||||
|
||||
.card {
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
overflow: hidden;
|
||||
margin-top: 20rpx;
|
||||
background-color: white;
|
||||
|
||||
// width: 336.45rpx;
|
||||
.store_type {
|
||||
background: linear-gradient(to bottom, #6DD5FA, #3274F9);
|
||||
color: white;
|
||||
border-radius: 10.51rpx 10.51rpx 10.51rpx 10.51rpx;
|
||||
padding: 2rpx 8rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.goods_content {
|
||||
background-color: white;
|
||||
padding: 25rpx 15rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
|
||||
.textellipsis {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
// font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.item_tags {
|
||||
margin: 5rpx 0;
|
||||
}
|
||||
|
||||
.score {
|
||||
color: #B3B3B3;
|
||||
font-size: 22.78rpx;
|
||||
|
||||
}
|
||||
|
||||
.money {
|
||||
color: red;
|
||||
margin: 5rpx 0;
|
||||
|
||||
.num {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.company {
|
||||
background-color: #F4F7FE;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 5rpx 14rpx;
|
||||
border-radius: 19.28rpx 19.28rpx 19.28rpx 19.28rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// width: 40vw;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
@ -18,33 +18,28 @@
|
||||
<view class="price">¥<text>{{item.spu && item.spu.price}}</text></view>
|
||||
<view class="buy-btn">立即购买</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class='mask' style="height: 100vh;" catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class='mask' catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup"></view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
goShopDetail
|
||||
} from '@/libs/order.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import { goShopDetail } from '@/libs/order.js'
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
computed: {
|
||||
computed:{
|
||||
...mapGetters(['viewColor']),
|
||||
},
|
||||
props: {
|
||||
props:{
|
||||
list: {
|
||||
type: Array,
|
||||
default: []
|
||||
@ -55,9 +50,9 @@
|
||||
isHome: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
data() {
|
||||
return {
|
||||
popup: {
|
||||
show: false
|
||||
@ -68,12 +63,11 @@
|
||||
// 点击关闭按钮
|
||||
closePopup() {
|
||||
this.$set(this.popup, 'show', false);
|
||||
this.$emit("closes")
|
||||
},
|
||||
showPopup() {
|
||||
this.$set(this.popup, 'show', true);
|
||||
},
|
||||
goDetail(item) {
|
||||
goDetail(item){
|
||||
if (item.product_type === 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}&spid=${this.uid}`
|
||||
@ -85,150 +79,130 @@
|
||||
} else if (item.product_type === 0) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${item.product_id}&spid=${this.uid}`
|
||||
})
|
||||
} else if (item.product_type === 4) {
|
||||
})
|
||||
}else if (item.product_type === 4) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/combination_details/index?id=${item.activity_id}&spid=${this.uid}`
|
||||
})
|
||||
} else if (item.product_type === 40) {
|
||||
}else if (item.product_type === 40) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/combination_status/index?id=${item.activity_id}&spid=${this.uid}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
background-color: #ffffff;
|
||||
z-index: 77;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
max-height: 1000rpx;
|
||||
|
||||
&.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
.container{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
background-color: #ffffff;
|
||||
z-index: 77;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
max-height: 1000rpx;
|
||||
&.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
.header{
|
||||
position: relative;
|
||||
padding: 40rpx 30rpx;
|
||||
.title{
|
||||
color: #282828;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.header {
|
||||
position: relative;
|
||||
padding: 40rpx 30rpx;
|
||||
|
||||
.title {
|
||||
color: #282828;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.icon-guanbi5 {
|
||||
right: 20rpx;
|
||||
color: #8a8a8a;
|
||||
font-size: 30rpx;
|
||||
line-height: 30rpx;
|
||||
top: 20rpx;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
.iconfont{
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.icon-guanbi5 {
|
||||
right: 20rpx;
|
||||
color: #8a8a8a;
|
||||
font-size: 30rpx;
|
||||
line-height: 30rpx;
|
||||
top: 20rpx;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
scroll-view{
|
||||
max-height: 800rpx;
|
||||
}
|
||||
.main_count{
|
||||
padding: 0 30rpx 30rpx;
|
||||
max-height: 800rpx;
|
||||
overflow-y: scroll;
|
||||
/* #ifndef MP */
|
||||
&.mb90{
|
||||
margin-bottom: 90rpx;
|
||||
}
|
||||
/* #endif */
|
||||
.list{
|
||||
margin-bottom: 40rpx;
|
||||
height: auto;
|
||||
flex-direction: row;
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
scroll-view {
|
||||
max-height: 800rpx;
|
||||
}
|
||||
|
||||
.main_count {
|
||||
padding: 0 30rpx 30rpx;
|
||||
max-height: 800rpx;
|
||||
overflow-y: scroll;
|
||||
|
||||
/* #ifndef MP */
|
||||
&.mb90 {
|
||||
margin-bottom: 90rpx;
|
||||
.pro_list{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.picture,.image,uni-image{
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
.list {
|
||||
margin-bottom: 40rpx;
|
||||
height: auto;
|
||||
flex-direction: row;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
.info{
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
.bottom{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 460rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 10rpx;
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
|
||||
.pro_list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.picture,
|
||||
.image,
|
||||
uni-image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 16rpx;
|
||||
.name{
|
||||
color: #282828;
|
||||
font-size: 30rpx;
|
||||
line-height: 45rpx;
|
||||
display: -webkit-box;
|
||||
width: 460rpx;
|
||||
}
|
||||
|
||||
.info {
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 460rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 10rpx;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #282828;
|
||||
font-size: 30rpx;
|
||||
line-height: 45rpx;
|
||||
display: -webkit-box;
|
||||
width: 460rpx;
|
||||
}
|
||||
|
||||
.price {
|
||||
color: var(--view-priceColor);
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
|
||||
text {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.buy-btn {
|
||||
color: #fff;
|
||||
background: var(--view-theme);
|
||||
border-radius: 28.04rpx 28.04rpx 28.04rpx 28.04rpx;
|
||||
width: 154.21rpx;
|
||||
height: 57.83rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22rpx;
|
||||
.price{
|
||||
color: var(--view-priceColor);
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
text{
|
||||
font-size: 34rpx;
|
||||
}
|
||||
}
|
||||
.buy-btn{
|
||||
color: #fff;
|
||||
background: var(--view-theme);
|
||||
border-radius: 26rpx;
|
||||
width: 140rpx;
|
||||
height: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
|
@ -1,183 +0,0 @@
|
||||
<template>
|
||||
<view class="msg-view">
|
||||
<scroll-view class="msg-view-p" scroll-y="true" :scroll-top="msgPanelScrollTop">
|
||||
<view id="chatArea">
|
||||
<view class="chat-area-line" v-for="(item,index) in msgList">
|
||||
|
||||
<view class="system-msg"
|
||||
:style="{'flex-direction':((item.userName.length + item.content.length)<15?'row':'')}"
|
||||
v-if="item.msg_type == 'system'">
|
||||
<view class="system-msg-detail ">
|
||||
<text class="system-msg-detail-username " v-for="i in item.userName">{{i}}</text>
|
||||
<text class="system-msg-detail-content " v-for="i in ':'">{{i}}</text>
|
||||
<text class="system-msg-detail-content " v-for="i in item.content">{{i}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="user-msg"
|
||||
:style="{'flex-direction':((item.userName.length + item.content.length)<15?'row':'')}" v-else>
|
||||
|
||||
<view class="user-msg-detail">
|
||||
<view class="user-msg-detail-tag">
|
||||
<!-- <text style="text-align: center;font-size: 20px;color: #DD524D;">★1</text> -->
|
||||
<!-- 这里可以根据用户等级显示图片 -->
|
||||
<image :src="item.avatar" class="user-msg-detail-tag"></image>
|
||||
</view>
|
||||
<text class="user-msg-detail-username" v-for="i in item.userName"
|
||||
@click="test(item.userName)">{{i}}</text>
|
||||
<text class="user-msg-detail-content" v-for="i in ':'">{{i}}</text>
|
||||
<text class="user-msg-detail-content" v-for="i in item.content">{{i}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'MhMsgList',
|
||||
props: {
|
||||
msgList: {
|
||||
type: [Object, Array],
|
||||
default: [{
|
||||
userName: "系统通知",
|
||||
content: "直播倡导绿色直播,严禁发布涉黄涉毒涉赌,严禁发布涉政、违法及低俗违规内容。健康直播,文明互动",
|
||||
cmd: "say",
|
||||
|
||||
msg_type: "system"
|
||||
}, ]
|
||||
},
|
||||
msgPanelScrollTop: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
test(e) {
|
||||
uni.showToast({
|
||||
title: e,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
|
||||
setMsgPanelScroll() {
|
||||
var that = this;
|
||||
setTimeout(function() {
|
||||
const query = uni.createSelectorQuery().in(that);
|
||||
query.select('#chatArea').boundingClientRect(data => {
|
||||
that.msgPanelScrollTop = data.height - 200;
|
||||
}).exec();
|
||||
}, 50)
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.msg-view-p {
|
||||
display: flex;
|
||||
width: 550rpx;
|
||||
height: 550rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.chat-area-line {
|
||||
width: 550upx;
|
||||
|
||||
flex-direction: row;
|
||||
margin-bottom: 5upx;
|
||||
}
|
||||
|
||||
.system-msg {
|
||||
width: 550upx;
|
||||
margin-bottom: 5upx;
|
||||
}
|
||||
|
||||
.system-msg-detail {
|
||||
// max-width: 550upx;
|
||||
|
||||
padding: 10upx;
|
||||
border-radius: 30upx;
|
||||
background-color: rgba($color: #000000, $alpha: 0.4);
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin-right: 14upx;
|
||||
|
||||
>.system-msg-detail-username {
|
||||
color: red;
|
||||
font-size: 32upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
|
||||
}
|
||||
|
||||
>.system-msg-detail-content {
|
||||
font-size: 32upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
color: #A0CFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.user-line {
|
||||
// max-width: 530upx;
|
||||
padding: 10upx;
|
||||
color: #FFFFFF;
|
||||
flex-direction: row;
|
||||
border-radius: 30upx;
|
||||
background-color: rgba($color: #000000, $alpha: 0.4);
|
||||
margin-right: 14upx;
|
||||
font-size: 28upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
}
|
||||
|
||||
.user-msg {
|
||||
width: 530upx;
|
||||
|
||||
|
||||
margin-bottom: 5upx;
|
||||
}
|
||||
|
||||
.user-msg-detail-tag {
|
||||
width: 40upx;
|
||||
height: 40upx;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
|
||||
.user-msg-detail {
|
||||
padding: 10upx;
|
||||
border-radius: 30upx;
|
||||
background-color: rgba($color: #000000, $alpha: 0.4);
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin-right: 14upx;
|
||||
|
||||
|
||||
|
||||
>.user-msg-detail-username {
|
||||
color: #A0CFFF;
|
||||
font-size: 32upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
}
|
||||
|
||||
>.user-msg-detail-content {
|
||||
font-size: 32upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -2,13 +2,11 @@
|
||||
<view class="orderGoods" :style="viewColor">
|
||||
<view class='goodWrapper' :class="'item'+orderData.order_type">
|
||||
<view v-if="orderData.order_type == 1" class="title acea-row row-between-wrapper">
|
||||
<view class="item-status" :class="'status'+evaluate">{{evaluate == 7 ? '待核销' : '已核销'}}</view>
|
||||
<view class="item-status" :class="'status'+evaluate">{{evaluate == 0 ? '待核销' : '已核销'}}</view>
|
||||
<view v-if="evaluate != 0 && orderData.verify_time" class="item-date">{{orderData.verify_time}}</view>
|
||||
</view>
|
||||
<view v-for="(item,index) in cartInfo" :key="index">
|
||||
<view v-if="activityType === 2">
|
||||
|
||||
|
||||
<view class='item presell_item'>
|
||||
<view class="acea-row row-between-wrapper">
|
||||
<view class='pictrue' @click="jumpCon(item)">
|
||||
@ -45,7 +43,6 @@
|
||||
{{item.product_num - item.refund_num}}</view>
|
||||
<view class='btn-item err' v-if="item.is_refund >1">已退款 x
|
||||
{{item.product_num - item.refund_num}}</view>
|
||||
|
||||
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0'
|
||||
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
|
||||
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
|
||||
@ -78,7 +75,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class='item'>
|
||||
|
||||
|
||||
<view class="acea-row row-between-wrapper">
|
||||
<view class='pictrue' @click="jumpCon(item)">
|
||||
<image
|
||||
@ -113,10 +110,10 @@
|
||||
</view>
|
||||
|
||||
<view class="btn-item"
|
||||
v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&& evaluate!=9 &&evaluate != 1&&evaluate !=4&& evaluate!=3 || evaluate==2"
|
||||
v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&& evaluate != 1&&evaluate !=4&& evaluate!=3 || evaluate==2 ||activityType==98"
|
||||
@click.stop="refund(item)">申请退款</view>
|
||||
<view class='btn-item'
|
||||
v-if='item.is_reply==0 && evaluate!=2&& evaluate!=3&& evaluate!=7&& evaluate!=8&& evaluate!=9&& item.refund_num > 0'
|
||||
v-if='item.is_reply==0 && evaluate!=2&& evaluate!=3 && item.refund_num > 0'
|
||||
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
|
||||
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
|
||||
</view>
|
||||
|
@ -4,8 +4,8 @@
|
||||
<view class="title acea-row row-center-wrapper">
|
||||
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
|
||||
v-for="(item,index) in payMode" :key="index" v-if="item.payStatus == 1">
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode"
|
||||
:key="index" v-if="item.payStatus == 1">
|
||||
<view class="left acea-row row-between-wrapper">
|
||||
<view class="iconfont" :class="item.icon"></view>
|
||||
<view class="text">
|
||||
@ -78,7 +78,7 @@
|
||||
});
|
||||
},
|
||||
goPay: function(number, paytype) {
|
||||
|
||||
console.log(this.payMode);
|
||||
if (this.isCall) {
|
||||
return this.$emit('onChangeFun', {
|
||||
action: 'payCheck',
|
||||
@ -100,15 +100,16 @@
|
||||
} else if (paytype == 'balance') {
|
||||
type = 'balance';
|
||||
console.log('123');
|
||||
} else if (paytype == 'alipay') {
|
||||
}else if(paytype == 'alipay'){
|
||||
// #ifndef MP
|
||||
type = 'alipay';
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
type = 'alipayQr';
|
||||
// #endif
|
||||
} else if (paytype == 'creditBuy') {
|
||||
type = 'creditBuy'
|
||||
}else if(paytype =='creditBuy'){
|
||||
console.log('123123');
|
||||
type='creditBuy'
|
||||
}
|
||||
if (!that.order_id) return that.$util.Tips({
|
||||
title: '请选择要支付的订单'
|
||||
@ -119,27 +120,20 @@
|
||||
uni.showLoading({
|
||||
title: '支付中'
|
||||
});
|
||||
let orderApi = that.order_type === 1 ? presellOrderPay : orderPay
|
||||
let orderApi = that.order_type === 1 ? presellOrderPay : orderPay
|
||||
orderApi(that.order_id, {
|
||||
type: type,
|
||||
// #ifdef H5
|
||||
|
||||
return_url: this.order_type == 98 ? 'http://' + window.location.host +
|
||||
'/pages/users/order_list/indexCopy' : 'http://' + window.location.host +
|
||||
'/pages/users/order_list/index',
|
||||
|
||||
|
||||
return_url: 'http://'+window.location.host+'/pages/users/order_list/index',
|
||||
// #endif
|
||||
|
||||
|
||||
}).then(res => {
|
||||
let status = res.data.status,
|
||||
orderId = res.data.result.order_id,
|
||||
jsConfig = res.data.result.config,
|
||||
callback_key = res.data.result.pay_key,
|
||||
|
||||
goPages = this.order_type == 98 ? '/pages/users/order_list/indexCopy' :
|
||||
'/pages/users/order_list/index'
|
||||
switch (status) {
|
||||
goPages = '/pages/users/order_list/index';
|
||||
switch (status) {
|
||||
case 'ORDER_EXIST':
|
||||
case 'EXTEND_ORDER':
|
||||
case 'PAY_ERROR':
|
||||
@ -150,19 +144,19 @@
|
||||
});
|
||||
return that.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'success':
|
||||
uni.hideLoading();
|
||||
this.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
});
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=2'
|
||||
url: goPages + '?status=1'
|
||||
});
|
||||
break;
|
||||
case 'alipay':
|
||||
@ -170,20 +164,19 @@
|
||||
uni.hideLoading();
|
||||
this.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
|
||||
jsConfig,
|
||||
})
|
||||
return
|
||||
break;
|
||||
// #ifndef MP
|
||||
url: '/pages/order_pay_back/index?keyCode='+callback_key+'&url='+jsConfig,
|
||||
})
|
||||
return
|
||||
break;
|
||||
// #ifndef MP
|
||||
case "wechat":
|
||||
case "weixin":
|
||||
case "weixinApp":
|
||||
jsConfig.timeStamp = jsConfig.timestamp;
|
||||
// #ifndef APP-PLUS
|
||||
that.$wechat.pay(jsConfig).then(res => {
|
||||
that.$wechat.pay(jsConfig).then(res => {
|
||||
// console.log('测试支付数据无效的success:'+res.data)
|
||||
this.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
@ -192,36 +185,35 @@
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + 'status=2'
|
||||
url: goPages + 'status=1'
|
||||
});
|
||||
}).catch(res => {
|
||||
// console.log('测试支付数据无效的catch:'+res.data)
|
||||
if (res.errMsg == 'chooseWXPay:cancel') {
|
||||
if (that.isCall) {
|
||||
if (res.errMsg == 'chooseWXPay:cancel'){
|
||||
if(that.isCall){
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
});
|
||||
} else {
|
||||
}else{
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=1'
|
||||
url: goPages + '?status=0'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
let mp_pay_name = ''
|
||||
if (uni.requestOrderPayment) {
|
||||
mp_pay_name = 'requestOrderPayment'
|
||||
} else {
|
||||
mp_pay_name = 'requestPayment'
|
||||
let mp_pay_name=''
|
||||
if(uni.requestOrderPayment){
|
||||
mp_pay_name='requestOrderPayment'
|
||||
}else{
|
||||
mp_pay_name='requestPayment'
|
||||
}
|
||||
console.log(mp_pay_name, jsConfig)
|
||||
uni[mp_pay_name]({
|
||||
provider: 'wxpay',
|
||||
orderInfo: jsConfig,
|
||||
@ -232,23 +224,22 @@
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + 'status=2'
|
||||
url: goPages + 'status=1'
|
||||
});
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e)
|
||||
if (that.isCall) {
|
||||
if(that.isCall){
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
});
|
||||
} else {
|
||||
}else{
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=1'
|
||||
url: goPages + '?status=0'
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -258,16 +249,16 @@
|
||||
});
|
||||
// #endif
|
||||
break;
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
case "routine":
|
||||
jsConfig.timeStamp = jsConfig.timestamp;
|
||||
that.toPay = true;
|
||||
let mp_pay_name = ''
|
||||
if (uni.requestOrderPayment) {
|
||||
mp_pay_name = 'requestOrderPayment'
|
||||
} else {
|
||||
mp_pay_name = 'requestPayment'
|
||||
let mp_pay_name=''
|
||||
if(uni.requestOrderPayment){
|
||||
mp_pay_name='requestOrderPayment'
|
||||
}else{
|
||||
mp_pay_name='requestPayment'
|
||||
}
|
||||
uni[mp_pay_name]({
|
||||
...jsConfig,
|
||||
@ -276,22 +267,21 @@
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
if (that.BargainId || that.combinationId || that.pinkId || that
|
||||
.seckillId)
|
||||
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=2'
|
||||
url: goPages + '?status=1'
|
||||
});
|
||||
|
||||
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=2'
|
||||
url: goPages + '?status=1'
|
||||
});
|
||||
},
|
||||
fail: function(e) {
|
||||
@ -304,19 +294,18 @@
|
||||
});
|
||||
},
|
||||
complete: function(e) {
|
||||
uni.hideLoading();
|
||||
uni.hideLoading();
|
||||
//关闭当前页面跳转至订单状态
|
||||
if (res.errMsg == 'requestPayment:cancel') return that.$util
|
||||
.Tips({
|
||||
title: '取消支付'
|
||||
});
|
||||
if (res.errMsg == 'requestPayment:cancel') return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
});
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
},
|
||||
})
|
||||
break;
|
||||
// #endif
|
||||
// #endif
|
||||
case "balance":
|
||||
uni.hideLoading();
|
||||
that.$emit('onChangeFun', {
|
||||
@ -327,9 +316,9 @@
|
||||
title: res.message
|
||||
});
|
||||
break;
|
||||
// #ifdef H5
|
||||
// #ifdef H5
|
||||
case 'h5':
|
||||
let host = window.location.protocol + "//" + window.location.host;
|
||||
let host = window.location.protocol+"//"+window.location.host;
|
||||
let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
|
||||
let eUrl = encodeURIComponent(url)
|
||||
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
|
||||
@ -338,9 +327,9 @@
|
||||
location.href = locations;
|
||||
}, 100);
|
||||
break;
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
case 'alipayApp':
|
||||
uni.requestPayment({
|
||||
provider: 'alipay',
|
||||
@ -352,11 +341,11 @@
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + 'status=2'
|
||||
url: goPages + 'status=1'
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
fail: (e) => {
|
||||
return that.$util.Tips({
|
||||
@ -367,13 +356,9 @@
|
||||
uni.hideLoading();
|
||||
},
|
||||
});
|
||||
break;
|
||||
// #endif
|
||||
break;
|
||||
// #endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
@ -476,4 +461,4 @@
|
||||
font-size: 0.3rpx;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :circular="circular"
|
||||
:interval="interval" :duration="duration">
|
||||
|
||||
:interval="interval" :duration="duration">
|
||||
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image" mode="aspectFit" />
|
||||
<image :src="item" class="slide-image" />
|
||||
<!-- <view class="stop" v-if="isType == 2">
|
||||
<image class="image" src="/static/images/stop.png"></image>
|
||||
</view> -->
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -56,7 +56,8 @@
|
||||
videoContext: ''
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
@ -82,7 +83,7 @@
|
||||
// #ifdef APP-PLUS
|
||||
this.isPlay = false
|
||||
this.videoContext = uni.createVideoContext('myVideo', this);
|
||||
this.$nextTick(() => {
|
||||
this.$nextTick(()=>{
|
||||
this.videoContext.play();
|
||||
})
|
||||
// #endif
|
||||
@ -101,15 +102,13 @@
|
||||
height: 710rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg .slide-image {
|
||||
width: 100vw;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
@ -167,4 +166,4 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -360,36 +360,27 @@
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.product-window .cart .carnum .item {
|
||||
|
||||
width: 63rpx;
|
||||
border: 1px solid #a4a4a4;
|
||||
width: 84rpx;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
line-height: 42rpx;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
|
||||
line-height: 54rpx;
|
||||
color: #a4a4a4;
|
||||
font-size: 45rpx;
|
||||
}
|
||||
.product-window .cart .carnum .reduce {
|
||||
border: 1px solid #a4a4a4;
|
||||
width: 44rpx;
|
||||
height: 42rpx;
|
||||
// border-right: 0;
|
||||
border-radius: 0 7rpx 7rpx 0;
|
||||
line-height: 30rpx;
|
||||
|
||||
border-right: 0;
|
||||
border-radius: 6rpx 0 0 6rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
.product-window .cart .carnum .reduce.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
.product-window .cart .carnum .plus {
|
||||
border: 1px solid #a4a4a4;
|
||||
width: 44rpx;
|
||||
height: 42rpx;
|
||||
// border-right: 0;
|
||||
border-radius: 0 7rpx 7rpx 0;
|
||||
line-height: 30rpx
|
||||
border-left: 0;
|
||||
border-radius: 0 6rpx 6rpx 0;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
.product-window .cart .carnum .plus.on {
|
||||
border-color: #e3e3e3;
|
||||
|
@ -9,7 +9,7 @@
|
||||
</view>
|
||||
|
||||
<view class="iconclose" @click="close">
|
||||
<image src="@/static/images/wt_close.png" mode="aspectFit"></image>
|
||||
X
|
||||
</view>
|
||||
</view>
|
||||
<view class="main">
|
||||
@ -61,12 +61,12 @@
|
||||
<view class="price_num">
|
||||
<span>委托数量</span>
|
||||
<subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;"
|
||||
class="step" :min="0" :max="item.attrValue[index].stock" :value="peicenumber"
|
||||
class="step" :min="1" :max="item.attrValue[index].stock" :value="peicenumber"
|
||||
:isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)">
|
||||
</subtractive>
|
||||
|
||||
<subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step"
|
||||
:min="0" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
|
||||
:min="1" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
|
||||
:isMin="true" index="11" @increment="incrementTotal($event,i,item)"
|
||||
@eventChange="numberChange($event,i)"></subtractive>
|
||||
</view>
|
||||
@ -288,7 +288,6 @@
|
||||
that.$set(item, 'check', true);
|
||||
that.$set(item, 'number', val.number);
|
||||
that.$set(item, 'price', val.price);
|
||||
that.peicenumber=val.number
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -396,18 +395,13 @@
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
|
||||
border: 2rpx solid #fff;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: -150rpx;
|
||||
right: 30rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@
|
||||
</view>
|
||||
|
||||
<view class="iconclose" @click="close">
|
||||
<image src="@/static/images/wt_close.png" mode="aspectFit"></image>
|
||||
X
|
||||
</view>
|
||||
</view>
|
||||
<view class="main">
|
||||
@ -61,12 +61,12 @@
|
||||
<view class="price_num">
|
||||
<span>出售数量</span>
|
||||
<subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;"
|
||||
class="step" :min="0" :max="item.attrValue[index].stock" :value="peicenumber"
|
||||
class="step" :min="1" :max="item.attrValue[index].stock" :value="peicenumber"
|
||||
:isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)">
|
||||
</subtractive>
|
||||
|
||||
<subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step"
|
||||
:min="0" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
|
||||
:min="1" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
|
||||
:isMin="true" index="11" @increment="incrementTotal($event,i,item)"
|
||||
@eventChange="numberChange($event,i)"></subtractive>
|
||||
</view>
|
||||
@ -177,7 +177,6 @@
|
||||
for (let i in this.checkedArr) {
|
||||
if (this.checkedArr[i].product_id == item.product_id) {
|
||||
this.checkedArr.splice(i, 1)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,7 +184,6 @@
|
||||
|
||||
},
|
||||
incrementTotal(e, i, item) {
|
||||
// console.log(e, i, item)
|
||||
this.$set(item, 'check', false);
|
||||
for (let i in this.checkedArr) {
|
||||
if (this.checkedArr[i].product_id == item.product_id) {
|
||||
@ -204,6 +202,7 @@
|
||||
this.bought[num].attrValue[this.index].stock = storage[e.detail.value].stock
|
||||
this.bought[num].product_attr_unique = storage[e.detail.value].unique
|
||||
this.pickerData = storage[this.index] // 这里就是选中的对象
|
||||
|
||||
if (this.bought[num].attrValue[this.index].stock == 0) {
|
||||
this.$util.Tips({
|
||||
title: '库存不足'
|
||||
@ -289,7 +288,6 @@
|
||||
that.$set(item, 'check', true);
|
||||
that.$set(item, 'number', val.number);
|
||||
that.$set(item, 'price', val.price);
|
||||
that.peicenumber=val.number
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -308,7 +306,6 @@
|
||||
goodsCheck(item) {
|
||||
this.$set(item, 'check', !item.check);
|
||||
if (item.check) {
|
||||
|
||||
if (this.peicenumber == 0) {
|
||||
item.number = 1
|
||||
}
|
||||
@ -316,12 +313,34 @@
|
||||
item.product_attr_unique = item.attrValue[0].unique
|
||||
}
|
||||
this.checkedArr.push(item)
|
||||
this.arrayUnique(this.checkedArr, 'product_id')
|
||||
} else {
|
||||
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.product_id == item.product_id))), 1)
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
//去重
|
||||
arrayUnique(arr, name) {
|
||||
let hash = {}
|
||||
const result = arr.reduce((acc, cru, index) => {
|
||||
if (!hash[cru[name]]) {
|
||||
hash[cru[name]] = {
|
||||
index: acc.length
|
||||
}
|
||||
acc.push(cru)
|
||||
} else {
|
||||
console.log(acc, hash[cru[name]])
|
||||
acc.splice(hash[cru[name]]['index'], 1, cru)
|
||||
}
|
||||
|
||||
|
||||
return acc;
|
||||
|
||||
}, [])
|
||||
this.checkedArr = result
|
||||
|
||||
|
||||
},
|
||||
/*确定提交*/
|
||||
submit() {
|
||||
|
||||
@ -376,18 +395,13 @@
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
|
||||
border: 2rpx solid #fff;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: -150rpx;
|
||||
right: 30rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
|
@ -1,518 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-popup ref="popupRef" type="bottom" @change="changeShow">
|
||||
<view class="pop">
|
||||
<scroll-view scroll-y class="scroll">
|
||||
<view class="image">
|
||||
<swiper class="swiper" :current="current" autoplay style="width: 100%;height: 100%;" @change="changeCurrent">
|
||||
<block v-if="product.slider_image && product.slider_image.length>0">
|
||||
<swiper-item v-for="(item,index) in product.slider_image" :key="index">
|
||||
<image class="img" :src="item"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
<swiper-item v-else>
|
||||
<image class="img" :src="datas.image||defualtImg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="current">{{current+1}}/{{product.slider_image && product.slider_image.length||1}}</view>
|
||||
<image class="close" src="@/static/images/icon/close.png" @click="close()"></image>
|
||||
<view class="border"></view>
|
||||
</view>
|
||||
<view class="white_card">
|
||||
<view class="flex flex_end">
|
||||
<view class="price">¥<text class="pro">{{leftPrice}}.</text>{{rightPrice}}
|
||||
</view>
|
||||
<!-- <view>订货价</view> -->
|
||||
</view>
|
||||
<view class="short_name">{{datas.store_name}}</view>
|
||||
<view class="flex">
|
||||
<view class="shop_name">
|
||||
<image class="icon" src="@/static/images/icon/short.png"></image>
|
||||
<view>{{datas.merchant.mer_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<block name="规格选中" v-for="(att, indexw) in attr" :key="indexw">
|
||||
<view class="m_title">{{att.attr_name}}</view>
|
||||
<view class="flex" style="flex-wrap: wrap;">
|
||||
<view class="attr" :class="{'attr_active': item.check}"
|
||||
v-for="(item, indexn) in att.attr_value" :key="indexn"
|
||||
@click="changeAttr(indexw, indexn)">
|
||||
{{item.attr}}
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="m_title num">
|
||||
<view>购买数量</view>
|
||||
<view class="input">
|
||||
<view class="input_item sub" @click="subCartNum">-</view>
|
||||
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" />
|
||||
<view class="input_item plus" @click="plusCartNum">+</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
商品库存 <text style="margin-left: 20rpx;">{{(sku[changeSkuKey] && sku[changeSkuKey].stock)||change.stock}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button">
|
||||
<view class="b_icon" @click="navgoCart()">
|
||||
<image src="@/static/images/icon/car.png"></image>
|
||||
<view>购物车</view>
|
||||
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
|
||||
</view>
|
||||
<view class="btn" @click.stop="$u.throttle(addcart, 1500)"> {{isBuy?'立即购买':'加入购物车'}} </view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
postCartAdd,
|
||||
getProductDetail
|
||||
} from '@/api/store.js';
|
||||
export default {
|
||||
name: "shortPopup",
|
||||
props: {
|
||||
source:{
|
||||
type: Number,
|
||||
default: null
|
||||
},
|
||||
isBuy: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShow: false, //当前是否打开弹窗
|
||||
defualtImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/00ebcfdf75684f5494c0193075055d1.png',
|
||||
datas: {
|
||||
image: '',
|
||||
store_name: '',
|
||||
merchant: {
|
||||
mer_name: ''
|
||||
},
|
||||
price: '',
|
||||
},
|
||||
product: {},
|
||||
attrValue: [],
|
||||
attr: [], //多级规格
|
||||
changeSkuKey: '', //多级规格选中的key
|
||||
sku: {}, //规格
|
||||
sku_key_list: [], //规格名称列表
|
||||
changeSkuKey: '', //选中的规格名称
|
||||
change: {
|
||||
stock: ''
|
||||
},
|
||||
cart_num: 1, //购买数量
|
||||
goodsNum: 0, //购物车数量
|
||||
current: 0, //轮播图当前滑块
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
computed:{
|
||||
leftPrice(){
|
||||
return this.sku[this.changeSkuKey]?.price?.split('.')[0]||'0';
|
||||
},
|
||||
rightPrice(){
|
||||
return this.sku[this.changeSkuKey]?.price?.split('.')[1]||'00';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 注入参数,
|
||||
setDatas(datas, goodsNum) {
|
||||
getProductDetail(datas.product_id).then((res)=>{
|
||||
this.attr = res.data.attr;
|
||||
if(this.attr.length>0) this.attr.forEach((item, index)=>{
|
||||
this.changeAttr(index, 0);
|
||||
})
|
||||
else this.changeSkuKey = '';
|
||||
})
|
||||
this.goodsNum = goodsNum;
|
||||
this.datas = datas;
|
||||
this.product = datas.product;
|
||||
this.attrValue = datas.product?.attrValue;
|
||||
this.change = this.attrValue[0];
|
||||
this.cart_num = 1;
|
||||
this.sku = datas.sku||{};
|
||||
this.sku_key_list = Object.keys(this.sku);
|
||||
},
|
||||
// 输入购买数量
|
||||
inputCartNum(e) {
|
||||
if(this.sku){
|
||||
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.cart_num = this.sku[this.changeSkuKey].stock;
|
||||
})
|
||||
}
|
||||
}else if (this.change.stock <= this.cart_num) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.cart_num = this.change.stock;
|
||||
})
|
||||
}
|
||||
},
|
||||
// 减少购买数量
|
||||
subCartNum() {
|
||||
if (this.cart_num <= 1) {
|
||||
return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '最少要买一件哦'
|
||||
})
|
||||
}
|
||||
this.cart_num--;
|
||||
},
|
||||
// 增加购买数量
|
||||
plusCartNum() {
|
||||
if(this.sku){
|
||||
if (this.sku[this.changeSkuKey].stock <= this.cart_num) {
|
||||
return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
}
|
||||
}else if (this.change.stock <= this.cart_num) {
|
||||
return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
}
|
||||
this.cart_num++;
|
||||
},
|
||||
changeAttr: function(indexw, indexn) {
|
||||
let that = this;
|
||||
this.$set(this.attr[indexw], 'index', this.attr[indexw].attr_values[indexn]);
|
||||
this.attr[indexw].attr_value.forEach((item, index)=>{
|
||||
if(index==indexn)item.check = true;
|
||||
else item.check = false;
|
||||
})
|
||||
let value = that.getCheckedValue().join(",");
|
||||
this.changeSkuKey = value;
|
||||
},
|
||||
//获取被选中属性;
|
||||
getCheckedValue: function() {
|
||||
let productAttr = this.attr;
|
||||
let value = [];
|
||||
for (let i = 0; i < productAttr.length; i++) {
|
||||
for (let j = 0; j < productAttr[i].attr_values.length; j++) {
|
||||
if (productAttr[i].index === productAttr[i].attr_values[j]) {
|
||||
value.push(productAttr[i].attr_values[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
},
|
||||
// 加入购物车
|
||||
addcart() {
|
||||
if (this.sku[this.changeSkuKey]) {
|
||||
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
let data = {
|
||||
cart_num: this.cart_num,
|
||||
is_new: 0,
|
||||
product_attr_unique: this.sku[this.changeSkuKey].unique,
|
||||
product_id: this.datas.product_id,
|
||||
product_type: this.datas.product_type,
|
||||
source: this.source,
|
||||
spread_id: "",
|
||||
}
|
||||
let that = this
|
||||
let res = postCartAdd({
|
||||
...data
|
||||
}).then((res, err) => {
|
||||
uni.showToast({
|
||||
title: "加入成功",
|
||||
duration: 1000,
|
||||
})
|
||||
this.$emit('addCart');
|
||||
this.close();
|
||||
if(this.isBuy){
|
||||
this.navgoCart();
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: "none",
|
||||
duration: 1000,
|
||||
})
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '商品规格不存在'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 滑动轮播图
|
||||
changeCurrent(e){
|
||||
this.current = e.detail.current;
|
||||
},
|
||||
navgoCart(url=null) {
|
||||
if(!url) {
|
||||
if(this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
|
||||
else url = '/pages/order_addcart/order_addcart';
|
||||
}
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
open() {
|
||||
this.$refs.popupRef.open();
|
||||
},
|
||||
close() {
|
||||
this.$refs.popupRef.close();
|
||||
},
|
||||
changeShow(e) {
|
||||
this.isShow = e.show;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pop {
|
||||
background-color: #fff;
|
||||
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.scroll{
|
||||
height: calc(90vh - 150rpx);
|
||||
}
|
||||
|
||||
.flex_end {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
|
||||
.image {
|
||||
height: 750rpx;
|
||||
width: 750rpx;
|
||||
position: relative;
|
||||
|
||||
.current{
|
||||
position: absolute;
|
||||
bottom: 70rpx;
|
||||
left: 30rpx;
|
||||
width: 67rpx;
|
||||
height: 37rpx;
|
||||
background: rgba(#333, 0.2);
|
||||
border-radius: 11rpx 11rpx 11rpx 11rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
right: 30rpx;
|
||||
width: 50.82rpx;
|
||||
height: 50.82rpx;
|
||||
}
|
||||
|
||||
.border {
|
||||
position: absolute;
|
||||
bottom: -1rpx;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
height: 40rpx;
|
||||
width: 100%;
|
||||
border-radius: 40rpx 40rpx 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.white_card {
|
||||
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
|
||||
background-color: #fff;
|
||||
margin: 0 28rpx;
|
||||
padding-bottom: 30rpx;
|
||||
color: #737373;
|
||||
font-size: 26.29rpx;
|
||||
|
||||
.price {
|
||||
font-size: 35rpx;
|
||||
font-family: SF Pro Display-Semibold, SF Pro Display;
|
||||
font-weight: 600;
|
||||
color: #F84221;
|
||||
padding-right: 30rpx;
|
||||
|
||||
.pro {
|
||||
font-size: 49.07rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.short_name {
|
||||
font-size: 33rpx;
|
||||
font-family: PingFang SC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.shop_name {
|
||||
display: flex;
|
||||
background: #FEF5F3;
|
||||
padding: 0 16rpx;
|
||||
border-radius: 26rpx 26rpx 26rpx 26rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 31.54rpx;
|
||||
height: 31.54rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.m_title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 31rpx;
|
||||
margin-bottom: 21rpx;
|
||||
}
|
||||
|
||||
.attr {
|
||||
opacity: 1;
|
||||
border: 1rpx solid #F84221;
|
||||
color: #333333;
|
||||
padding: 15rpx 30rpx;
|
||||
margin-right: 20rpx;
|
||||
height: 63rpx;
|
||||
line-height: 60rpx;
|
||||
border-radius: 63rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.attr_active{
|
||||
// background-color: #FEF5F3;
|
||||
// color: #F84221;
|
||||
background-color: #F84221;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.num {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 48rpx;
|
||||
|
||||
.input_item {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
border: 2rpx solid #fff;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input_view {
|
||||
width: 60rpx;
|
||||
}
|
||||
|
||||
.sub {
|
||||
border: 2rpx solid #FCB9AD;
|
||||
border-radius: 7rpx 0rpx 0rpx 7rpx;
|
||||
background: #FFFFFF;
|
||||
font-size: 26rpx;
|
||||
color: #B3B3B3;
|
||||
}
|
||||
|
||||
.plus {
|
||||
border: 2rpx solid #FCB9AD;
|
||||
border-radius: 0rpx 7rpx 7rpx 0rpx;
|
||||
background: #FFFFFF;
|
||||
font-size: 26rpx;
|
||||
color: #B3B3B3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 28rpx;
|
||||
margin-bottom: 28rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
|
||||
padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
|
||||
padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
|
||||
padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
|
||||
|
||||
.b_icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: 19rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 50.82rpx;
|
||||
height: 50.82rpx;
|
||||
}
|
||||
|
||||
.badge {
|
||||
position: absolute;
|
||||
top: -5rpx;
|
||||
right: -10rpx;
|
||||
color: #fff;
|
||||
min-width: 28rpx;
|
||||
height: 28rpx;
|
||||
text-align: center;
|
||||
line-height: 24rpx;
|
||||
background: #F84221;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 575rpx;
|
||||
height: 84rpx;
|
||||
background: linear-gradient(270deg, #FF6D20 0%, #F84221 100%);
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,534 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-popup ref="popupRef" type="bottom" @change="changeShow">
|
||||
<view class="pop">
|
||||
<scroll-view scroll-y class="scroll">
|
||||
<view class="image">
|
||||
<swiper class="swiper" :current="current" autoplay style="width: 100%;height: 100%;" @change="changeCurrent">
|
||||
<block v-if="product.slider_image && product.slider_image.length>0">
|
||||
<swiper-item v-for="(item,index) in product.slider_image" :key="index">
|
||||
<image class="img" :src="item"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
<swiper-item v-else>
|
||||
<image class="img" :src="datas.image||defualtImg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="current">{{current+1}}/{{product.slider_image && product.slider_image.length||1}}</view>
|
||||
<image class="close" src="@/static/images/icon/close.png" @click="close()"></image>
|
||||
<view class="border"></view>
|
||||
</view>
|
||||
<view class="white_card">
|
||||
<view class="flex flex_end">
|
||||
<block v-if="datas.limited_price">
|
||||
<view class="price">¥<text class="pro">{{leftPrice2}}.</text>{{rightPrice2}}
|
||||
</view>
|
||||
<view class="price" style="text-decoration: line-through;color: #999;font-weight: 400;font-size: 28rpx;">原价: ¥<text>{{leftPrice}}.</text>{{rightPrice}}</view>
|
||||
</block>
|
||||
<view v-else class="price">¥<text>{{leftPrice}}.</text>{{rightPrice}}</view>
|
||||
<!-- <view>订货价</view> -->
|
||||
</view>
|
||||
<view class="short_name">{{datas.store_name}}</view>
|
||||
<view class="flex">
|
||||
<view class="shop_name">
|
||||
<image class="icon" src="@/static/images/icon/short.png"></image>
|
||||
<view>{{datas.merchant.mer_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<block name="规格选中" v-for="(att, indexw) in attr" :key="indexw">
|
||||
<view class="m_title">{{att.attr_name}}</view>
|
||||
<view class="flex" style="flex-wrap: wrap;">
|
||||
<view class="attr" :class="{'attr_active': item.check}"
|
||||
v-for="(item, indexn) in att.attr_value" :key="indexn"
|
||||
@click="changeAttr(indexw, indexn)">
|
||||
{{item.attr}}
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="m_title num">
|
||||
<view>购买数量</view>
|
||||
<view class="input">
|
||||
<view class="input_item sub" @click="subCartNum">-</view>
|
||||
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" />
|
||||
<view class="input_item plus" @click="plusCartNum">+</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
商品库存 <text style="margin-left: 20rpx;">{{(sku[changeSkuKey] && sku[changeSkuKey].stock)||change.stock}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button">
|
||||
<!-- <view class="b_icon" @click="navgoCart()">
|
||||
<image src="@/static/images/icon/car.png"></image>
|
||||
<view>购物车</view>
|
||||
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
|
||||
</view> -->
|
||||
<view class="btn" @click.stop="$u.throttle(addcart, 1500)"> {{isBuy?'立即购买':'加入购物车'}} </view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
postCartAdd,
|
||||
getProductDetail
|
||||
} from '@/api/store.js';
|
||||
import { Toast } from '../libs/uniApi';
|
||||
import { data } from '../uni_modules/uview-ui/libs/mixin/mixin';
|
||||
export default {
|
||||
name: "shortPopup",
|
||||
props: {
|
||||
source:{
|
||||
type: Number,
|
||||
default: null
|
||||
},
|
||||
isBuy: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShow: false, //当前是否打开弹窗
|
||||
defualtImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/00ebcfdf75684f5494c0193075055d1.png',
|
||||
datas: {
|
||||
image: '',
|
||||
store_name: '',
|
||||
merchant: {
|
||||
mer_name: ''
|
||||
},
|
||||
price: '',
|
||||
},
|
||||
product: {},
|
||||
attrValue: [],
|
||||
attr: [], //多级规格
|
||||
changeSkuKey: '', //多级规格选中的key
|
||||
sku: {}, //规格
|
||||
sku_key_list: [], //规格名称列表
|
||||
changeSkuKey: '', //选中的规格名称
|
||||
change: {
|
||||
stock: ''
|
||||
},
|
||||
cart_num: 1, //购买数量
|
||||
goodsNum: 0, //购物车数量
|
||||
current: 0, //轮播图当前滑块
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
computed:{
|
||||
leftPrice(){
|
||||
return this.sku[this.changeSkuKey]?.price?.split('.')[0]||'0';
|
||||
},
|
||||
rightPrice(){
|
||||
return this.sku[this.changeSkuKey]?.price?.split('.')[1]||'00';
|
||||
},
|
||||
leftPrice2(){
|
||||
return this.datas.limited_price.split('.')[0]||'0';
|
||||
},
|
||||
rightPrice2(){
|
||||
return this.datas.limited_price.split('.')[1]||'00';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 注入参数,
|
||||
setDatas(datas, goodsNum) {
|
||||
getProductDetail(datas.product_id).then((res)=>{
|
||||
this.attr = res.data.attr;
|
||||
if(this.attr.length>0) this.attr.forEach((item, index)=>{
|
||||
this.changeAttr(index, 0);
|
||||
})
|
||||
else this.changeSkuKey = '';
|
||||
})
|
||||
this.goodsNum = goodsNum;
|
||||
this.datas = datas;
|
||||
this.product = datas.product;
|
||||
this.attrValue = datas.product?.attrValue;
|
||||
this.change = this.attrValue[0];
|
||||
this.cart_num = 1;
|
||||
this.sku = datas.sku||{};
|
||||
this.sku_key_list = Object.keys(this.sku);
|
||||
},
|
||||
// 输入购买数量
|
||||
inputCartNum(e) {
|
||||
if(this.sku){
|
||||
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.cart_num = this.sku[this.changeSkuKey].stock;
|
||||
})
|
||||
}
|
||||
}else if (this.change.stock <= this.cart_num) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.cart_num = this.change.stock;
|
||||
})
|
||||
}
|
||||
},
|
||||
// 减少购买数量
|
||||
subCartNum() {
|
||||
if (this.cart_num <= 1) {
|
||||
return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '最少要买一件哦'
|
||||
})
|
||||
}
|
||||
this.cart_num--;
|
||||
},
|
||||
// 增加购买数量
|
||||
plusCartNum() {
|
||||
return Toast('最多购买一件哦');
|
||||
if(this.sku){
|
||||
if (this.sku[this.changeSkuKey].stock <= this.cart_num) {
|
||||
return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
}
|
||||
}else if (this.change.stock <= this.cart_num) {
|
||||
return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
}
|
||||
this.cart_num++;
|
||||
},
|
||||
changeAttr: function(indexw, indexn) {
|
||||
let that = this;
|
||||
this.$set(this.attr[indexw], 'index', this.attr[indexw].attr_values[indexn]);
|
||||
this.attr[indexw].attr_value.forEach((item, index)=>{
|
||||
if(index==indexn)item.check = true;
|
||||
else item.check = false;
|
||||
})
|
||||
let value = that.getCheckedValue().join(",");
|
||||
this.changeSkuKey = value;
|
||||
},
|
||||
//获取被选中属性;
|
||||
getCheckedValue: function() {
|
||||
let productAttr = this.attr;
|
||||
let value = [];
|
||||
for (let i = 0; i < productAttr.length; i++) {
|
||||
for (let j = 0; j < productAttr[i].attr_values.length; j++) {
|
||||
if (productAttr[i].index === productAttr[i].attr_values[j]) {
|
||||
value.push(productAttr[i].attr_values[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
},
|
||||
// 加入购物车
|
||||
addcart() {
|
||||
if (this.sku[this.changeSkuKey]) {
|
||||
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '不能超出库存哦'
|
||||
})
|
||||
let data = {
|
||||
cart_num: this.cart_num,
|
||||
is_new: 0,
|
||||
product_attr_unique: this.sku[this.changeSkuKey].unique,
|
||||
product_id: this.datas.product_id,
|
||||
product_type: this.datas.product_type,
|
||||
source: this.source,
|
||||
spread_id: "",
|
||||
}
|
||||
let that = this
|
||||
let res = postCartAdd({
|
||||
...data
|
||||
}).then((res, err) => {
|
||||
if(this.isBuy) return uni.navigateTo({
|
||||
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}&type_id=${this.datas.merchant.type_id}&source=${this.source}`
|
||||
});
|
||||
uni.showToast({
|
||||
title: "加入成功",
|
||||
duration: 1000,
|
||||
})
|
||||
this.$emit('addCart');
|
||||
this.close();
|
||||
if(this.isBuy){
|
||||
this.navgoCart();
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: "none",
|
||||
duration: 1000,
|
||||
})
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '商品规格不存在'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 滑动轮播图
|
||||
changeCurrent(e){
|
||||
this.current = e.detail.current;
|
||||
},
|
||||
navgoCart(url=null) {
|
||||
if(!url) {
|
||||
if(this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
|
||||
else url = '/pages/order_addcart/order_addcart';
|
||||
}
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
open() {
|
||||
this.$refs.popupRef.open();
|
||||
},
|
||||
close() {
|
||||
this.$refs.popupRef.close();
|
||||
},
|
||||
changeShow(e) {
|
||||
this.isShow = e.show;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pop {
|
||||
background-color: #fff;
|
||||
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.scroll{
|
||||
height: calc(90vh - 150rpx);
|
||||
}
|
||||
|
||||
.flex_end {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
|
||||
.image {
|
||||
height: 750rpx;
|
||||
width: 750rpx;
|
||||
position: relative;
|
||||
|
||||
.current{
|
||||
position: absolute;
|
||||
bottom: 70rpx;
|
||||
left: 30rpx;
|
||||
width: 67rpx;
|
||||
height: 37rpx;
|
||||
background: rgba(#333, 0.2);
|
||||
border-radius: 11rpx 11rpx 11rpx 11rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
right: 30rpx;
|
||||
width: 50.82rpx;
|
||||
height: 50.82rpx;
|
||||
}
|
||||
|
||||
.border {
|
||||
position: absolute;
|
||||
bottom: -1rpx;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
height: 40rpx;
|
||||
width: 100%;
|
||||
border-radius: 40rpx 40rpx 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.white_card {
|
||||
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
|
||||
background-color: #fff;
|
||||
margin: 0 28rpx;
|
||||
padding-bottom: 30rpx;
|
||||
color: #737373;
|
||||
font-size: 26.29rpx;
|
||||
|
||||
.price {
|
||||
font-size: 35rpx;
|
||||
font-family: SF Pro Display-Semibold, SF Pro Display;
|
||||
font-weight: 600;
|
||||
color: #F84221;
|
||||
padding-right: 30rpx;
|
||||
|
||||
.pro {
|
||||
font-size: 49.07rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.short_name {
|
||||
font-size: 33rpx;
|
||||
font-family: PingFang SC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.shop_name {
|
||||
display: flex;
|
||||
background: #FEF5F3;
|
||||
padding: 0 16rpx;
|
||||
border-radius: 26rpx 26rpx 26rpx 26rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 31.54rpx;
|
||||
height: 31.54rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.m_title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-top: 31rpx;
|
||||
margin-bottom: 21rpx;
|
||||
}
|
||||
|
||||
.attr {
|
||||
opacity: 1;
|
||||
border: 1rpx solid #F84221;
|
||||
color: #333333;
|
||||
padding: 15rpx 30rpx;
|
||||
margin-right: 20rpx;
|
||||
height: 63rpx;
|
||||
line-height: 60rpx;
|
||||
border-radius: 63rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.attr_active{
|
||||
// background-color: #FEF5F3;
|
||||
// color: #F84221;
|
||||
background-color: #F84221;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.num {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 48rpx;
|
||||
|
||||
.input_item {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
border: 2rpx solid #fff;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input_view {
|
||||
width: 60rpx;
|
||||
}
|
||||
|
||||
.sub {
|
||||
border: 2rpx solid #FCB9AD;
|
||||
border-radius: 7rpx 0rpx 0rpx 7rpx;
|
||||
background: #FFFFFF;
|
||||
font-size: 26rpx;
|
||||
color: #B3B3B3;
|
||||
}
|
||||
|
||||
.plus {
|
||||
border: 2rpx solid #FCB9AD;
|
||||
border-radius: 0rpx 7rpx 7rpx 0rpx;
|
||||
background: #FFFFFF;
|
||||
font-size: 26rpx;
|
||||
color: #B3B3B3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 28rpx;
|
||||
margin-bottom: 28rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
|
||||
padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
|
||||
padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
|
||||
padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
|
||||
|
||||
.b_icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: 19rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 50.82rpx;
|
||||
height: 50.82rpx;
|
||||
}
|
||||
|
||||
.badge {
|
||||
position: absolute;
|
||||
top: -5rpx;
|
||||
right: -10rpx;
|
||||
color: #fff;
|
||||
min-width: 28rpx;
|
||||
height: 28rpx;
|
||||
text-align: center;
|
||||
line-height: 24rpx;
|
||||
background: #F84221;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 575rpx;
|
||||
height: 84rpx;
|
||||
background: linear-gradient(270deg, #FF6D20 0%, #F84221 100%);
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -94,10 +94,6 @@
|
||||
}
|
||||
if (newValue < this.min) {
|
||||
newValue = this.min
|
||||
this.$util.Tips({
|
||||
title: '达到最小值了',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
if (newValue < this.max && this.maxDisabled === true) {
|
||||
this.maxDisabled = false;
|
||||
@ -108,10 +104,6 @@
|
||||
this.maxDisabled = true;
|
||||
}
|
||||
if (newValue > this.max) {
|
||||
this.$util.Tips({
|
||||
title: '达到最大值了',
|
||||
icon: 'error'
|
||||
})
|
||||
newValue = this.max
|
||||
}
|
||||
if (newValue > this.min && this.minDisabled === true) {
|
||||
@ -122,7 +114,7 @@
|
||||
return;
|
||||
}
|
||||
this.inputValue = newValue / scale;
|
||||
this.$emit('increment', this.inputValue)
|
||||
this.$emit('increment',this.inputValue)
|
||||
},
|
||||
_getDecimalScale() {
|
||||
let scale = 1;
|
||||
|
@ -1,241 +0,0 @@
|
||||
<template>
|
||||
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
|
||||
<uni-transition :mode-class="['fade']" :styles="maskClass" :show="showTrans" @click="onTap" />
|
||||
<uni-transition :mode-class="ani" :styles="transClass" :show="showTrans" @click="onTap">
|
||||
<view class="uni-popup__wrapper-box" @click.stop="clear">
|
||||
<slot />
|
||||
</view>
|
||||
</uni-transition>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
|
||||
|
||||
props: {
|
||||
// 开启动画
|
||||
animation: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
|
||||
type: {
|
||||
type: String,
|
||||
default: 'center'
|
||||
},
|
||||
// maskClick
|
||||
maskClick: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ani: [],
|
||||
showPopup: false,
|
||||
showTrans: false,
|
||||
maskClass: {
|
||||
'position': 'fixed',
|
||||
'bottom': 0,
|
||||
'top': 0,
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'backgroundColor': 'rgba(0, 0, 0, 0)'
|
||||
},
|
||||
transClass: {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler: function(newVal) {
|
||||
switch (this.type) {
|
||||
case 'top':
|
||||
this.ani = ['slide-top']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
}
|
||||
break
|
||||
case 'bottom':
|
||||
this.ani = ['slide-bottom']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'bottom': 0
|
||||
}
|
||||
console.log('直播调用弹窗')
|
||||
break
|
||||
case 'center':
|
||||
this.ani = ['zoom-out', 'fade']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
/* #ifndef APP-NVUE */
|
||||
'display': 'flex',
|
||||
'flexDirection': 'column',
|
||||
/* #endif */
|
||||
'bottom': 0,
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'top': 0,
|
||||
'justifyContent': 'center',
|
||||
'alignItems': 'center'
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
clear(e) {
|
||||
// TODO nvue 取消冒泡
|
||||
e.stopPropagation()
|
||||
},
|
||||
open() {
|
||||
this.showPopup = true
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.showTrans = true
|
||||
}, 0);
|
||||
})
|
||||
this.$emit('change', {
|
||||
show: true
|
||||
})
|
||||
},
|
||||
close(type) {
|
||||
this.showTrans = false
|
||||
this.$nextTick(() => {
|
||||
clearTimeout(this.timer)
|
||||
this.timer = setTimeout(() => {
|
||||
this.$emit('change', {
|
||||
show: false
|
||||
})
|
||||
this.showPopup = false
|
||||
}, 0)
|
||||
})
|
||||
},
|
||||
onTap() {
|
||||
if (!this.maskClick) return
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.uni-popup {
|
||||
position: fixed;
|
||||
/* #ifdef H5 */
|
||||
top: var(--window-top);
|
||||
/* #endif */
|
||||
/* #ifndef H5 */
|
||||
top: 0;
|
||||
/* #endif */
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
z-index: 99;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-popup__mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.mask-ani {
|
||||
transition-property: opacity;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
.uni-top-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-bottom-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-center-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-popup__wrapper {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: translateY(-500px);
|
||||
}
|
||||
|
||||
.bottom {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: translateY(500px);
|
||||
}
|
||||
|
||||
.center {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* #endif */
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform: scale(1.2);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.uni-popup__wrapper-box {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content-ani {
|
||||
/* transition: transform 0.3s;
|
||||
*/
|
||||
transition-property: transform, opacity;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
|
||||
.uni-top-content {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.uni-bottom-content {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.uni-center-content {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
@ -1,241 +0,0 @@
|
||||
<template>
|
||||
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
|
||||
<uni-transition :mode-class="['fade']" :styles="maskClass" :show="showTrans" @click="onTap" />
|
||||
<uni-transition :mode-class="ani" :styles="transClass" :show="showTrans" @click="onTap">
|
||||
<view class="uni-popup__wrapper-box" @click.stop="clear">
|
||||
<slot />
|
||||
</view>
|
||||
</uni-transition>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
|
||||
props: {
|
||||
// 开启动画
|
||||
animation: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
|
||||
type: {
|
||||
type: String,
|
||||
default: 'center'
|
||||
},
|
||||
// maskClick
|
||||
maskClick: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ani: [],
|
||||
showPopup: false,
|
||||
showTrans: false,
|
||||
maskClass: {
|
||||
'position': 'fixed',
|
||||
'bottom': 0,
|
||||
'top': 0,
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'backgroundColor': 'rgba(0, 0, 0, 0.4)'
|
||||
},
|
||||
transClass: {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler: function(newVal) {
|
||||
switch (this.type) {
|
||||
case 'top':
|
||||
this.ani = ['slide-top']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
}
|
||||
break
|
||||
case 'bottom':
|
||||
this.ani = ['slide-bottom']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'bottom': 0
|
||||
}
|
||||
console.log('底部条用')
|
||||
console.log(this.type)
|
||||
break
|
||||
case 'center':
|
||||
this.ani = ['zoom-out', 'fade']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
/* #ifndef APP-NVUE */
|
||||
'display': 'flex',
|
||||
'flexDirection': 'column',
|
||||
/* #endif */
|
||||
'bottom': 0,
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'top': 0,
|
||||
'justifyContent': 'center',
|
||||
'alignItems': 'center'
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
clear(e) {
|
||||
// TODO nvue 取消冒泡
|
||||
e.stopPropagation()
|
||||
},
|
||||
open() {
|
||||
this.showPopup = true
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.showTrans = true
|
||||
}, 50);
|
||||
})
|
||||
this.$emit('change', {
|
||||
show: true
|
||||
})
|
||||
},
|
||||
close(type) {
|
||||
this.showTrans = false
|
||||
this.$nextTick(() => {
|
||||
clearTimeout(this.timer)
|
||||
this.timer = setTimeout(() => {
|
||||
this.$emit('change', {
|
||||
show: false
|
||||
})
|
||||
this.showPopup = false
|
||||
}, 300)
|
||||
})
|
||||
},
|
||||
onTap() {
|
||||
if (!this.maskClick) return
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.uni-popup {
|
||||
position: fixed;
|
||||
/* #ifdef H5 */
|
||||
top: var(--window-top);
|
||||
/* #endif */
|
||||
/* #ifndef H5 */
|
||||
top: 0;
|
||||
/* #endif */
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
z-index: 99;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-popup__mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.mask-ani {
|
||||
transition-property: opacity;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
.uni-top-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-bottom-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-center-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-popup__wrapper {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: translateY(-500px);
|
||||
}
|
||||
|
||||
.bottom {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: translateY(500px);
|
||||
}
|
||||
|
||||
.center {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* #endif */
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform: scale(1.2);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.uni-popup__wrapper-box {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content-ani {
|
||||
/* transition: transform 0.3s;
|
||||
*/
|
||||
transition-property: transform, opacity;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
|
||||
.uni-top-content {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.uni-bottom-content {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.uni-center-content {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
@ -1,337 +1,287 @@
|
||||
<template>
|
||||
<view class="zbp-head-wrapper">
|
||||
<view class="color-lump"></view>
|
||||
<view class="bg-img">
|
||||
<img :src="bgColor" alt="">
|
||||
</view>
|
||||
|
||||
<view class="site-box flex_a_c_j_sb">
|
||||
|
||||
<!-- <view class="place_wrapper flex_a_c" @click="selectLocation">
|
||||
<view class="iconfont icon-weizhi"></view>
|
||||
<view class="town_name">{{street}}</view>
|
||||
</view>
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
|
||||
</navigator> -->
|
||||
</view>
|
||||
<!-- 搜索栏 -->
|
||||
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;"
|
||||
disabled>
|
||||
</view>
|
||||
<button class="search_btn">搜索</button>
|
||||
</navigator>
|
||||
<!-- 轮播图 -->
|
||||
<view class="supply_chains-head">
|
||||
<swiper class="swiper l_center" @change="swiperChange" :indicator-dots="swiper.indicatorDots"
|
||||
:autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"
|
||||
indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in swiper['url']" :key="index">
|
||||
<swiper-item class="swi_item" @click="swiperClick(item)">
|
||||
<u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx" mode="aspectFit">
|
||||
</u--image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- <u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker> -->
|
||||
</view>
|
||||
<view class="zbp-head-wrapper">
|
||||
<view class="color-lump"></view>
|
||||
<view class="bg-img">
|
||||
<img :src="bgColor" alt="">
|
||||
</view>
|
||||
<view class="site-box flex_a_c_j_sb">
|
||||
<view class="place_wrapper flex_a_c" @click="selectLocation">
|
||||
<view class="iconfont icon-weizhi"></view>
|
||||
<view class="town_name">{{street}}</view>
|
||||
</view>
|
||||
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
|
||||
</navigator>
|
||||
|
||||
</view>
|
||||
<!-- 搜索栏 -->
|
||||
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
<view class="iconfont icon-sousuo"></view>
|
||||
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" disabled>
|
||||
</view>
|
||||
<button class="search_btn">搜索</button>
|
||||
</navigator>
|
||||
<!-- 轮播图 -->
|
||||
<view class="supply_chains-head">
|
||||
<swiper class="swiper l_center" @change="swiperChange" :indicator-dots="swiper.indicatorDots"
|
||||
:autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"
|
||||
indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in swiper['url']" :key="index">
|
||||
<swiper-item class="swi_item" @click="swiperClick(item)">
|
||||
<u--image :showLoading="true" :src="item.img" width="694.74rpx" height="242.11rpx" mode="aspectFill">
|
||||
</u--image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getArea,
|
||||
getStreet
|
||||
} from '@/api/article.js';
|
||||
import {
|
||||
getIndexData,
|
||||
getDiy
|
||||
} from '@/api/api.js'
|
||||
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
import {
|
||||
Toast
|
||||
} from '../libs/uniApi';
|
||||
import Cache from '@/utils/cache';
|
||||
export default {
|
||||
props: {
|
||||
isSelectPlace: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// location_Arr: {
|
||||
// type: Object,
|
||||
// default: () => ({})
|
||||
// },
|
||||
// town: {
|
||||
// type: String,
|
||||
// default: false
|
||||
// },
|
||||
import { getArea, getStreet } from '@/api/article.js';
|
||||
import { getIndexData, getDiy } from '@/api/api.js'
|
||||
import { getGeocoder } from '@/api/store.js';
|
||||
import { mapGetters } from 'vuex'
|
||||
import { Toast } from '../libs/uniApi';
|
||||
import Cache from '@/utils/cache';
|
||||
export default {
|
||||
props: {
|
||||
isSelectPlace: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
location_Arr: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaInd: [0, 0],
|
||||
street: '',
|
||||
showPicker: false,
|
||||
styleConfig: [],
|
||||
columnData: [],
|
||||
homeCombData: [],
|
||||
keyword: '',
|
||||
bgColor: '',
|
||||
swiper: {
|
||||
url: [{
|
||||
img: ''
|
||||
}],
|
||||
indicatorDots: true, // 显示面板指示点
|
||||
vertical: false, // 滑动方向是否为纵向
|
||||
autoplay: true, // 是否自动切换
|
||||
interval: 2000, // 自动切换时间间隔
|
||||
duration: 400 // 滑动动画时长
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: mapGetters(['location']),
|
||||
watch: {
|
||||
location: {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal.address_component?.street) this.street = newVal.address_component.street
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBanner()
|
||||
this.Area()
|
||||
if (this.location.address_component?.street) this.street = this.location.address_component.street
|
||||
},
|
||||
methods: {
|
||||
swiperClick(item) {
|
||||
const url = item.info[1].value
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
selectLocation() {
|
||||
this.isSelectPlace ? this.showPicker = true : ''
|
||||
},
|
||||
confirm(e) {
|
||||
this.street = e.value[1].name
|
||||
this.showPicker = false
|
||||
this.$emit('selectPlce', e)
|
||||
let adress = Cache.get('LOCATION_DATA',true)
|
||||
Cache.set('LOCATION_DATA',adress)
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e;
|
||||
if (columnIndex === 0) {
|
||||
getStreet({ area_code: value[0]['code'] }).then(res => {
|
||||
picker.setColumnValues(1, res.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
Area() {
|
||||
getArea({ city_code: 510500 }).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({ area_code: code }).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaInd: [0, 0],
|
||||
street: '',
|
||||
|
||||
showPicker: false,
|
||||
styleConfig: [],
|
||||
columnData: [],
|
||||
homeCombData: [],
|
||||
keyword: '',
|
||||
bgColor: '',
|
||||
swiper: {
|
||||
url: [{
|
||||
img: ''
|
||||
}],
|
||||
indicatorDots: true, // 显示面板指示点
|
||||
vertical: false, // 滑动方向是否为纵向
|
||||
autoplay: true, // 是否自动切换
|
||||
interval: 2000, // 自动切换时间间隔
|
||||
duration: 400 // 滑动动画时长
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
street(nval, val) {
|
||||
this.street = nval
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
|
||||
this.getBanner()
|
||||
// this.Area()
|
||||
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
this.$bus.$on('value-updated', (newValue) => {
|
||||
// 更新组件的值
|
||||
this.street = newValue.split(',')[0]
|
||||
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
swiperClick(item) {
|
||||
const url = item.info[1].value
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
selectLocation() {
|
||||
this.isSelectPlace ? this.showPicker = true : ''
|
||||
},
|
||||
|
||||
confirm(e) {
|
||||
this.showPicker = false
|
||||
this.$emit('selectPlce', e)
|
||||
this.$emit('change', e)
|
||||
this.street = e.value[1].name
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e;
|
||||
if (columnIndex === 0) {
|
||||
getStreet({
|
||||
area_code: value[0]['code']
|
||||
}).then(res => {
|
||||
picker.setColumnValues(1, res.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
Area() {
|
||||
getArea({
|
||||
city_code: 510500
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({
|
||||
area_code: code
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
|
||||
swiperChange(e) {
|
||||
let {
|
||||
current,
|
||||
source
|
||||
} = e.detail;
|
||||
if (source === 'autoplay' || source === 'touch') {
|
||||
this.bgColor = this.swiper.url[e.detail.current]['img']
|
||||
this.$emit('kkchange', this.bgColor)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 对象转数组
|
||||
objToArr(data) {
|
||||
let obj = Object.keys(data).sort();
|
||||
let m = obj.map(key => data[key]);
|
||||
return m;
|
||||
},
|
||||
async getBanner(id) {
|
||||
let that = this;
|
||||
const {
|
||||
data
|
||||
} = await getDiy({
|
||||
id: 0
|
||||
})
|
||||
that.styleConfig = that.objToArr(data.value);
|
||||
/* 循环数组得到数据*/
|
||||
that.styleConfig.forEach((item, index, arr) => {
|
||||
if (item.name == 'headerSerch' || item.name == 'homeComb') {
|
||||
if (item.name == 'homeComb') {
|
||||
that.swiper.url = item.swiperConfig.list
|
||||
}
|
||||
}
|
||||
})
|
||||
this.bgColor = this.swiper.url[0].img
|
||||
},
|
||||
}
|
||||
}
|
||||
swiperChange(e) {
|
||||
let { current, source } = e.detail;
|
||||
if (source === 'autoplay' || source === 'touch') {
|
||||
this.bgColor = this.swiper.url[e.detail.current]['img']
|
||||
}
|
||||
},
|
||||
// 对象转数组
|
||||
objToArr(data) {
|
||||
let obj = Object.keys(data).sort();
|
||||
let m = obj.map(key => data[key]);
|
||||
return m;
|
||||
},
|
||||
async getBanner(id) {
|
||||
let that = this;
|
||||
const { data } = await getDiy({ id: 0 })
|
||||
that.styleConfig = that.objToArr(data.value);
|
||||
/* 循环数组得到数据*/
|
||||
that.styleConfig.forEach((item, index, arr) => {
|
||||
if (item.name == 'headerSerch' || item.name == 'homeComb') {
|
||||
if (item.name == 'homeComb') {
|
||||
that.swiper.url = item.swiperConfig.list
|
||||
}
|
||||
}
|
||||
})
|
||||
this.bgColor = this.swiper.url[0].img
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.zbp-head-wrapper {
|
||||
position: relative;
|
||||
padding-top: 78.95rpx;
|
||||
overflow: hidden;
|
||||
<style lang="scss">
|
||||
.zbp-head-wrapper {
|
||||
position: relative;
|
||||
padding-top: 78.95rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.color-lump {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
bottom: -86px;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 102%;
|
||||
height: 133px;
|
||||
border-radius: 30px 30px 0 0;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.color-lump {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
bottom: -86px;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 102%;
|
||||
height: 133px;
|
||||
border-radius: 30px 30px 0 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.bg-img {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
z-index: -1;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
z-index: 0;
|
||||
/* #endif */
|
||||
z-index: 0;
|
||||
filter: blur(0);
|
||||
overflow: hidden;
|
||||
.bg-img {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
z-index: -1;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
z-index: 0;
|
||||
/* #endif */
|
||||
z-index: 0;
|
||||
filter: blur(0);
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: blur(30rpx);
|
||||
transform: scale(1.5);
|
||||
}
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: blur(30rpx);
|
||||
transform: scale(1.5);
|
||||
}
|
||||
}
|
||||
|
||||
.site-box {
|
||||
margin: 0 auto;
|
||||
width: 694.74rpx;
|
||||
height: 66.67rpx;
|
||||
margin-bottom: 26.32rpx;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
.site-box {
|
||||
margin: 0 auto;
|
||||
width: 694.74rpx;
|
||||
height: 66.67rpx;
|
||||
margin-bottom: 26.32rpx;
|
||||
position: relative;
|
||||
|
||||
// 位置
|
||||
.place_wrapper {
|
||||
color: #fff;
|
||||
margin-right: 24.56rpx;
|
||||
font-size: 31.58rpx;
|
||||
|
||||
// 位置
|
||||
.place_wrapper {
|
||||
color: #fff;
|
||||
margin-right: 24.56rpx;
|
||||
font-size: 30rpx;
|
||||
.town_name {
|
||||
margin-left: 10.53rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.town_name {
|
||||
margin-left: 21rpx;
|
||||
}
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
}
|
||||
.my-main {
|
||||
transition: background-color .5s ease;
|
||||
}
|
||||
|
||||
.my-main {
|
||||
transition: background-color .5s ease;
|
||||
}
|
||||
.search_content {
|
||||
margin: 0 auto;
|
||||
width: 694.74rpx;
|
||||
height: 61.4rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border-radius: 100px;
|
||||
background: #fff;
|
||||
margin-bottom: 17.54rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
|
||||
.search_content {
|
||||
margin: 0 auto;
|
||||
width: 724rpx;
|
||||
height: 64rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border-radius: 175rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 21rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
.icon-sousuo {
|
||||
font-size: 26.32rpx;
|
||||
font-weight: bold;
|
||||
color: #c8c7c6;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
|
||||
.icon-sousuo {
|
||||
font-size: 26.32rpx;
|
||||
font-weight: bold;
|
||||
color: #c8c7c6;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
.search_btn {
|
||||
color: #fff;
|
||||
width: 105.26rpx;
|
||||
height: 52.63rpx;
|
||||
line-height: 52.63rpx;
|
||||
background: #f84221;
|
||||
border-radius: 100px;
|
||||
font-size: 28.07rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search_btn {
|
||||
color: #fff;
|
||||
width: 105.26rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
background: #f84221;
|
||||
border-radius: 100px;
|
||||
font-size: 28.07rpx;
|
||||
}
|
||||
}
|
||||
.supply_chains-head {
|
||||
margin-bottom: 17.54rpx;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
.supply_chains-head {
|
||||
margin-bottom: 17.54rpx;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
.swiper {
|
||||
width: 694.74rpx;
|
||||
height: 242.11rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 15px;
|
||||
overflow: hidden;
|
||||
|
||||
.swiper {
|
||||
width: 724rpx;
|
||||
height: 259rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.swi_item {
|
||||
width: 100%;
|
||||
height: 259rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.swi_item {
|
||||
width: 100%;
|
||||
height: 242.11rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,353 +0,0 @@
|
||||
<template>
|
||||
<view class="zbp-head-wrapper">
|
||||
<view class="color-lump"></view>
|
||||
<view class="bg-img">
|
||||
<img :src="bgColor" alt="">
|
||||
</view>
|
||||
|
||||
<view class="site-box flex_a_c_j_sb" style="padding-top: var(--status-bar-height)">
|
||||
|
||||
<view class="place_wrapper flex_a_c" @click="selectLocation">
|
||||
<view class="iconfont icon-weizhi"></view>
|
||||
<view class="town_name">{{street}}</view>
|
||||
</view>
|
||||
<view class="" style="display: flex;">
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view class="iconfont icon-xiaoxi" style="color:#fff;margin-right: 20rpx;"></view>
|
||||
</navigator>
|
||||
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none">
|
||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;color: white;"></view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 搜索栏 -->
|
||||
<!-- <navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;"
|
||||
disabled>
|
||||
</view>
|
||||
<button class="search_btn">搜索</button>
|
||||
</navigator> -->
|
||||
<!-- 轮播图 -->
|
||||
<view class="supply_chains-head">
|
||||
<swiper class="swiper " @change="swiperChange" :indicator-dots="swiper.indicatorDots"
|
||||
:autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"
|
||||
indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in swiper['url']" :key="index">
|
||||
<swiper-item class="swi_item" @click="swiperClick(item)">
|
||||
<!-- <u--image :showLoading="true" :src="item.img" width="750rpx" height="259rpx" mode="aspectFit">
|
||||
</u--image> -->
|
||||
<u--image :showLoading="true" :src="item.img" width="750rpx" height="600rpx">
|
||||
</u--image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getArea,
|
||||
getStreet
|
||||
} from '@/api/article.js';
|
||||
import {
|
||||
getIndexData,
|
||||
getDiy
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
getGeocoder
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
import {
|
||||
Toast
|
||||
} from '../libs/uniApi';
|
||||
import Cache from '@/utils/cache';
|
||||
export default {
|
||||
props: {
|
||||
isSelectPlace: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
location_Arr: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
town: {
|
||||
type: String,
|
||||
default: false
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaInd: [0, 0],
|
||||
street: '',
|
||||
|
||||
showPicker: false,
|
||||
styleConfig: [],
|
||||
columnData: [],
|
||||
homeCombData: [],
|
||||
keyword: '',
|
||||
bgColor: '',
|
||||
swiper: {
|
||||
url: [{
|
||||
img: ''
|
||||
}],
|
||||
indicatorDots: true, // 显示面板指示点
|
||||
vertical: false, // 滑动方向是否为纵向
|
||||
autoplay: true, // 是否自动切换
|
||||
interval: 2000, // 自动切换时间间隔
|
||||
duration: 400 // 滑动动画时长
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
street(nval, val) {
|
||||
this.street = nval
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
|
||||
this.getBanner()
|
||||
this.Area()
|
||||
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$bus.$on('value-updated', (newValue) => {
|
||||
// 更新组件的值
|
||||
this.street = newValue.split(',')[0]
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
swiperClick(item) {
|
||||
const url = item.info[1].value
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
selectLocation() {
|
||||
this.isSelectPlace ? this.showPicker = true : ''
|
||||
|
||||
},
|
||||
|
||||
confirm(e) {
|
||||
|
||||
this.showPicker = false
|
||||
this.$emit('selectPlce', e)
|
||||
this.$emit('change', e)
|
||||
this.street = e.value[1].name
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e;
|
||||
if (columnIndex === 0) {
|
||||
getStreet({
|
||||
area_code: value[0]['code']
|
||||
}).then(res => {
|
||||
picker.setColumnValues(1, res.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
Area() {
|
||||
getArea({
|
||||
city_code: 510500
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({
|
||||
area_code: code
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
|
||||
swiperChange(e) {
|
||||
let {
|
||||
current,
|
||||
source
|
||||
} = e.detail;
|
||||
if (source === 'autoplay' || source === 'touch') {
|
||||
this.bgColor = this.swiper.url[e.detail.current]['img']
|
||||
this.$emit('kkchange', this.bgColor)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 对象转数组
|
||||
objToArr(data) {
|
||||
let obj = Object.keys(data).sort();
|
||||
let m = obj.map(key => data[key]);
|
||||
return m;
|
||||
},
|
||||
async getBanner(id) {
|
||||
let that = this;
|
||||
const {
|
||||
data
|
||||
} = await getDiy({
|
||||
id: 0
|
||||
})
|
||||
that.styleConfig = that.objToArr(data.value);
|
||||
/* 循环数组得到数据*/
|
||||
that.styleConfig.forEach((item, index, arr) => {
|
||||
if (item.name == 'headerSerch' || item.name == 'homeComb') {
|
||||
if (item.name == 'homeComb') {
|
||||
that.swiper.url = item.swiperConfig.list
|
||||
}
|
||||
}
|
||||
})
|
||||
this.bgColor = this.swiper.url[0].img
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.zbp-head-wrapper {
|
||||
position: relative;
|
||||
// padding-top: 78.95rpx;
|
||||
overflow: hidden;
|
||||
// background-color: green;
|
||||
height: 600rpx;
|
||||
|
||||
// .color-lump {
|
||||
// z-index: 1;
|
||||
// position: absolute;
|
||||
// bottom: -86px;
|
||||
// left: 50%;
|
||||
// transform: translate(-50%, 0);
|
||||
// width: 102%;
|
||||
// height: 133px;
|
||||
// border-radius: 30px 30px 0 0;
|
||||
// background-color: #fff;
|
||||
// }
|
||||
|
||||
.bg-img {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
z-index: -1;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
z-index: 0;
|
||||
/* #endif */
|
||||
z-index: 0;
|
||||
filter: blur(0);
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: blur(30rpx);
|
||||
transform: scale(1.5);
|
||||
}
|
||||
}
|
||||
|
||||
.site-box {
|
||||
margin: 0 auto;
|
||||
width: 750rpx;
|
||||
height: 66.67rpx;
|
||||
margin-top: 30rpx;
|
||||
// margin-bottom: 26.32rpx;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
padding-right: 20rpx;
|
||||
|
||||
|
||||
// 位置
|
||||
.place_wrapper {
|
||||
margin-left: 20rpx;
|
||||
color: #fff;
|
||||
margin-right: 24.56rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
.town_name {
|
||||
margin-left: 21rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.my-main {
|
||||
transition: background-color .5s ease;
|
||||
}
|
||||
|
||||
.search_content {
|
||||
margin: 0 auto;
|
||||
width: 724rpx;
|
||||
height: 74rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border-radius: 175rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 21rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
|
||||
.icon-sousuo {
|
||||
font-size: 26.32rpx;
|
||||
font-weight: bold;
|
||||
color: #c8c7c6;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
|
||||
.search_btn {
|
||||
color: #fff;
|
||||
width: 105.26rpx;
|
||||
height: 52.63rpx;
|
||||
line-height: 52.63rpx;
|
||||
background: #f84221;
|
||||
border-radius: 100px;
|
||||
font-size: 28.07rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.supply_chains-head {
|
||||
// margin-bottom: 17.54rpx;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
.swiper {
|
||||
width: 750rpx;
|
||||
height: 600rpx;
|
||||
margin: 0 auto;
|
||||
// border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.swi_item {
|
||||
width: 750rpx;
|
||||
height: 600rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -6,49 +6,35 @@ let openPlantGrass = '-openPlantGrass-'
|
||||
let httpApi
|
||||
let httpApiTwo
|
||||
let httpApiThree
|
||||
let httpApiFour
|
||||
let httpApiFive
|
||||
let httpApiSix
|
||||
let wsApi
|
||||
|
||||
// 在打包之前请检查当前环境是否正确
|
||||
const env = 'dev'; // 开发
|
||||
// const env = 'prod'; // 生产
|
||||
// const env = 'prew'; // 预上线
|
||||
|
||||
switch (env) {
|
||||
case 'prod':
|
||||
httpApi = 'https://shop.lihaink.cn' // 生产
|
||||
httpApiTwo = 'https://nk.lihaink.cn'
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||
httpApiFour = 'https://worker-task.lihaink.cn'
|
||||
httpApiSix = 'https://new-worker.lihaink.cn'
|
||||
wsApi = 'wss://shop.lihaink.cn'
|
||||
break;
|
||||
case 'prew':
|
||||
httpApi = 'https://test.shop.lihaink.cn' //预发布环境
|
||||
httpApiTwo = "https://nk.lihaink.cn"
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||
httpApiFour = 'https://preview-worker-task.lihaink.cn'
|
||||
httpApiSix = 'https://ceshi-new-wokr.lihaink.cn'
|
||||
wsApi = 'wss://test.shop.lihaink.cn'
|
||||
break;
|
||||
default:
|
||||
httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试
|
||||
httpApiTwo = "https://nk.lihaink.cn"
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||
httpApiFour = 'https://ceshi-worker-task.lihaink.cn'
|
||||
httpApiFive = 'https://ceshi-zhibo.lihaink.cn'
|
||||
httpApiSix = 'https://ceshi-new-wokr.lihaink.cn'
|
||||
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
|
||||
// 网络接口修改此字符 小程序域名要求https
|
||||
// let httpApi = 'http://192.168.31.110:8324' // 测试
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
// httpApi = 'https://shop.lihaink.cn' // 生产
|
||||
httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||
// httpApi = "http://192.168.0.222"
|
||||
// httpApi = "http://192.168.0.108:8325"
|
||||
// httpApi = 'http://192.168.0.108:8325'
|
||||
// #ifdef MP-WEIXIN
|
||||
httpApiTwo = "https://nk.lihaink.cn"
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
// httpApiTwo = "baseUrl" // h5跨域配置
|
||||
httpApiTwo = "https://nk.lihaink.cn" // h5跨域配置
|
||||
// httpApiThree = 'baseUrlTest' // h5跨域配置
|
||||
// #endif
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
httpApi = 'https://shop.lihaink.cn' // 生产
|
||||
httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||
httpApiTwo = 'https://nk.lihaink.cn' // 生产
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
|
||||
}
|
||||
|
||||
const ossUrl = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public'
|
||||
// httpApi=''
|
||||
// httpApi = 'https://shop.lihaink.cn' // 生产
|
||||
// httpApiTwo = 'https://nk.lihaink.cn' // 生产
|
||||
|
||||
// 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
|
||||
// wsApi = 'ws://192.168.1.17:8324'
|
||||
let wsApi_one = 'wss://ceshi-zhibo.lihaink.cn/chat_room'
|
||||
// let wsApi = 'ws://192.168.3.20:8324'
|
||||
let wsApi = 'wss://shop.lihaink.cn'
|
||||
|
||||
module.exports = {
|
||||
// 请求域名 格式: https://您的域名
|
||||
@ -57,28 +43,17 @@ module.exports = {
|
||||
HTTP_REQUEST_URL: httpApi,
|
||||
HTTP_REQUEST_URL_TWO: httpApiTwo,
|
||||
HTTP_REQUEST_URL_THREE: httpApiThree,
|
||||
HTTP_REQUEST_URL_FOUR: httpApiFour,
|
||||
HTTP_REQUEST_URL_FIVE: httpApiFive,
|
||||
HTTP_REQUEST_URL_SIX: httpApiSix,
|
||||
VUE_APP_WS_URL: `${wsApi}?type=user`,
|
||||
VUE_APP_WS_URL_ONE:wsApi_one,
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
//H5接口是浏览器地址
|
||||
HTTP_REQUEST_URL: process.env.NODE_ENV == 'development'? httpApi : window.location.protocol + "//" + window.location.host,
|
||||
HTTP_REQUEST_URL_TWO: httpApiTwo,
|
||||
HTTP_REQUEST_URL_FIVE: httpApiFive,
|
||||
HTTP_REQUEST_URL_SIX: httpApiSix,
|
||||
HTTP_REQUEST_URL_FOUR: window.location.host == 'shop.lihaink.cn' ?'https://worker-task.lihaink.cn':window.location.host == 'test.shop.lihaink.cn'?'https://preview-worker-task.lihaink.cn':'https://ceshi-worker-task.lihaink.cn',
|
||||
|
||||
HTTP_REQUEST_URL: httpApi || window.location.protocol + "//" + window.location.host,
|
||||
HTTP_REQUEST_URL_TWO: httpApiTwo || window.location.protocol + "//" + window.location.host,
|
||||
// 聊天长连接地址
|
||||
VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL,
|
||||
// #endif
|
||||
openPlantGrass: openPlantGrass,
|
||||
ENV: env,
|
||||
OSS_URL: ossUrl,
|
||||
|
||||
HEADER: {
|
||||
'content-type': 'application/json',
|
||||
//#ifdef H5
|
||||
|
@ -38,6 +38,4 @@ module.exports = {
|
||||
CACHE_LONGITUDE: 'LONGITUDE',
|
||||
//缓存纬度
|
||||
CACHE_LATITUDE: 'LATITUDE',
|
||||
//缓存地址信息
|
||||
ADRESS_LOCATION:'ADRESS_LOCATION'
|
||||
}
|
||||
|
@ -130,7 +130,6 @@ export function Modal(title = '提示', content = '这是一个模态弹窗!', o
|
||||
}) {
|
||||
return new Promise((reslove, reject) => {
|
||||
uni.showModal({
|
||||
...obj,
|
||||
title: title,
|
||||
content: content,
|
||||
success: (res) => {
|
||||
|
85
main.js
85
main.js
@ -12,80 +12,70 @@ import App from './App'
|
||||
import store from './store'
|
||||
import Cache from './utils/cache'
|
||||
import util from 'utils/util'
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
import skeleton from './components/skeleton/index.vue'
|
||||
import BaseMoney from './components/BaseMoney.vue';
|
||||
import Loading from './components/Loading.vue';
|
||||
import activityHome from './components/activityHome.vue';
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
Vue.use(uView)
|
||||
Vue.component('skeleton', skeleton)
|
||||
Vue.component('BaseMoney', BaseMoney)
|
||||
Vue.component('Loading', Loading)
|
||||
Vue.component('activityHome', activityHome)
|
||||
Vue.prototype.$util = util;
|
||||
Vue.prototype.$Cache = Cache;
|
||||
Vue.prototype.$eventHub = new Vue();
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$bus = new Vue();
|
||||
|
||||
// #ifdef H5
|
||||
import {
|
||||
parseQuery
|
||||
} from "./utils";
|
||||
import { parseQuery } from "./utils";
|
||||
import Auth from './libs/wechat';
|
||||
import {
|
||||
SPREAD
|
||||
} from './config/cache';
|
||||
import { SPREAD } from './config/cache';
|
||||
// import wx from '@/node_modules/jweixin-module/lib/index'
|
||||
var __s = document.createElement('script');
|
||||
__s.src = HTTP_REQUEST_URL + "/api/script";
|
||||
document.head.appendChild(__s);
|
||||
Vue.prototype.$wechat = Auth;
|
||||
let cookieName = "VCONSOLE",
|
||||
query = parseQuery(),
|
||||
urlSpread = query["spread"],
|
||||
vconsole = query[cookieName.toLowerCase()],
|
||||
md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
|
||||
md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
|
||||
query = parseQuery(),
|
||||
urlSpread = query["spread"],
|
||||
vconsole = query[cookieName.toLowerCase()],
|
||||
md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
|
||||
md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
|
||||
|
||||
if (urlSpread !== undefined) {
|
||||
var spread = Cache.get(SPREAD);
|
||||
urlSpread = parseInt(urlSpread);
|
||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
||||
Cache.set("spread", urlSpread || 0);
|
||||
} else if (spread === 0 || typeof spread !== "number") {
|
||||
Cache.set("spread", urlSpread || 0);
|
||||
}
|
||||
var spread = Cache.get(SPREAD);
|
||||
urlSpread = parseInt(urlSpread);
|
||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
||||
Cache.set("spread", urlSpread || 0);
|
||||
} else if (spread === 0 || typeof spread !== "number") {
|
||||
Cache.set("spread", urlSpread || 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (vconsole !== undefined) {
|
||||
if (vconsole === md5UnCrmeb && Cache.has(cookieName))
|
||||
Cache.clear(cookieName);
|
||||
if (vconsole === md5UnCrmeb && Cache.has(cookieName))
|
||||
Cache.clear(cookieName);
|
||||
} else vconsole = Cache.get(cookieName);
|
||||
|
||||
import VConsole from './components/vconsole.min.js'
|
||||
|
||||
if (vconsole !== undefined && vconsole === md5Crmeb) {
|
||||
Cache.set(cookieName, md5Crmeb, 3600);
|
||||
let vConsole = new VConsole();
|
||||
Cache.set(cookieName, md5Crmeb, 3600);
|
||||
let vConsole = new VConsole();
|
||||
|
||||
}
|
||||
// 注册全局防抖指令
|
||||
Vue.directive('debounce', {
|
||||
inserted: (el, binding) => {
|
||||
let debounceTime = binding.value || 2000
|
||||
let timer
|
||||
el.addEventListener('click', e => {
|
||||
el.style.pointerEvents = 'none';
|
||||
if (!el.disabled) {
|
||||
timer = setTimeout(() => {
|
||||
el.style.pointerEvents = 'auto'
|
||||
}, debounceTime)
|
||||
}
|
||||
}, true)
|
||||
}
|
||||
inserted: (el, binding) => {
|
||||
let debounceTime = binding.value || 2000
|
||||
let timer
|
||||
el.addEventListener('click', e => {
|
||||
el.style.pointerEvents = 'none';
|
||||
if (!el.disabled) {
|
||||
timer = setTimeout(() => {
|
||||
el.style.pointerEvents = 'auto'
|
||||
}, debounceTime)
|
||||
}
|
||||
}, true)
|
||||
}
|
||||
})
|
||||
|
||||
// if(!!!Auth.isAndroid() && Auth.isWeixin()){
|
||||
@ -96,17 +86,12 @@ Vue.directive('debounce', {
|
||||
|
||||
// #endif
|
||||
|
||||
let appInfo = uni.getSystemInfo().then(res => {
|
||||
Vue.prototype.$appInfo = res[1];
|
||||
});
|
||||
|
||||
|
||||
App.mpType = 'app'
|
||||
|
||||
|
||||
const app = new Vue({
|
||||
...App,
|
||||
store,
|
||||
Cache
|
||||
...App,
|
||||
store,
|
||||
Cache
|
||||
})
|
||||
app.$mount();
|
@ -2,8 +2,8 @@
|
||||
"name" : "惠农生活",
|
||||
"appid" : "__UNI__3A527D1",
|
||||
"description" : "",
|
||||
"versionName" : "1.8.0",
|
||||
"versionCode" : 180,
|
||||
"versionName" : "1.0.18",
|
||||
"versionCode" : 142,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
@ -12,11 +12,8 @@
|
||||
"nvueCompiler" : "uni-app",
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||
},
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : false,
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
@ -30,14 +27,7 @@
|
||||
"Geolocation" : {},
|
||||
"Payment" : {},
|
||||
"Share" : {},
|
||||
"OAuth" : {},
|
||||
"UniMP" : {
|
||||
"description" : "uni小程序"
|
||||
},
|
||||
"Maps" : {},
|
||||
"Push" : {},
|
||||
"LivePusher" : {},
|
||||
"Record" : {}
|
||||
"OAuth" : {}
|
||||
},
|
||||
"safearea" : {
|
||||
"bottom" : {
|
||||
@ -50,8 +40,6 @@
|
||||
"android" : {
|
||||
"resizeableActivity" : true,
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
|
||||
@ -65,17 +53,17 @@
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
|
||||
],
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||
"permissionExternalStorage" : {
|
||||
@ -84,9 +72,7 @@
|
||||
},
|
||||
"permissionPhoneState" : {
|
||||
"request" : "none" //拨打电话权限关闭
|
||||
},
|
||||
"targetSdkVersion" : 30,
|
||||
"minSdkVersion" : 23
|
||||
}
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
@ -95,9 +81,7 @@
|
||||
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报",
|
||||
"NSCameraUsageDescription" : "上传用户头像保存分享海报",
|
||||
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
|
||||
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店",
|
||||
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
|
||||
"NSMicrophoneUsageDescription" : "根据用户录音进行语音识别转文字"
|
||||
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店"
|
||||
},
|
||||
"idfa" : false,
|
||||
"dSYMs" : false
|
||||
@ -106,35 +90,30 @@
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "82af93ec51139c712c4118d84ba684ee",
|
||||
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1",
|
||||
"name" : "amap_18982406440DFVLElaO"
|
||||
"appkey_ios" : "",
|
||||
"appkey_android" : ""
|
||||
}
|
||||
},
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"__platform__" : [ "android" ],
|
||||
"appid" : "wx9d68c92b550ddd1e",
|
||||
"UniversalLinks" : "https://shop.lihaink.cn/"
|
||||
"UniversalLinks" : "https://mer.crmeb.net/"
|
||||
}
|
||||
},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx9d68c92b550ddd1e",
|
||||
"UniversalLinks" : "https://shop.lihaink.cn/"
|
||||
"UniversalLinks" : "https://mer.crmeb.net/"
|
||||
}
|
||||
},
|
||||
"geolocation" : {
|
||||
"amap" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appkey_ios" : "82af93ec51139c712c4118d84ba684ee",
|
||||
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1",
|
||||
"name" : "amap_18982406440DFVLElaO"
|
||||
"system" : {
|
||||
"__platform__" : [ "ios", "android" ]
|
||||
}
|
||||
},
|
||||
"oauth" : {},
|
||||
"ad" : {},
|
||||
"push" : {}
|
||||
"ad" : {}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
@ -169,23 +148,13 @@
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"useOriginalMsgbox" : true,
|
||||
"androidStyle" : "default",
|
||||
"iosStyle" : "common",
|
||||
"ios" : {
|
||||
"storyboard" : "C:/Users/ghf/Downloads/CustomStoryboard.zip"
|
||||
},
|
||||
"android" : {
|
||||
"hdpi" : "",
|
||||
"xhdpi" : "",
|
||||
"xxhdpi" : "static/images/guide.png"
|
||||
}
|
||||
"useOriginalMsgbox" : true
|
||||
}
|
||||
},
|
||||
"nativePlugins" : {
|
||||
"JG-JCore" : {
|
||||
"JPUSH_APPKEY_IOS" : "8a5efd65cda14fafa6e64ad3",
|
||||
"JPUSH_CHANNEL_IOS" : "8a5efd65cda14fafa6e64ad3",
|
||||
"JPUSH_APPKEY_IOS" : "b5f679f4357018605ea6fd2e",
|
||||
"JPUSH_CHANNEL_IOS" : "",
|
||||
"JPUSH_APPKEY_ANDROID" : "b5f679f4357018605ea6fd2e",
|
||||
"JPUSH_CHANNEL_ANDROID" : "",
|
||||
"__plugin_info__" : {
|
||||
@ -202,7 +171,7 @@
|
||||
"JPUSH_APPKEY_IOS" : {
|
||||
"des" : "[iOS]极光portal配置应用信息时分配的AppKey",
|
||||
"key" : "JCore:APP_KEY",
|
||||
"value" : "daebe19b547c43128796a078"
|
||||
"value" : "7869a2f94b120cfb4431b96f"
|
||||
},
|
||||
"JPUSH_CHANNEL_IOS" : {
|
||||
"des" : "[iOS]用于统计分发渠道,不需要可填默认值developer-default",
|
||||
@ -223,9 +192,9 @@
|
||||
}
|
||||
},
|
||||
"JG-JPush" : {
|
||||
"JPUSH_ISPRODUCTION_IOS" : "true",
|
||||
"JPUSH_ISPRODUCTION_IOS" : "",
|
||||
"JPUSH_ADVERTISINGID_IOS" : "",
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS" : "true",
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS" : "",
|
||||
"JPUSH_OPPO_APPKEY" : "",
|
||||
"JPUSH_OPPO_APPID" : "",
|
||||
"JPUSH_OPPO_APPSECRET" : "",
|
||||
@ -350,10 +319,8 @@
|
||||
"domain" : "",
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"key" : "275cd3601b1b2d6414f6c988e7911664",
|
||||
"securityJsCode" : "d2d7c56801819e8bdf71b8a71846f235",
|
||||
"serviceHost" : ""
|
||||
"qqmap" : {
|
||||
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -361,6 +328,3 @@
|
||||
"template" : "template.h5.html"
|
||||
}
|
||||
}
|
||||
//拨打电话权限关闭
|
||||
/* ios打包配置 */
|
||||
|
||||
|
109
package-lock.json
generated
109
package-lock.json
generated
@ -1,23 +1,24 @@
|
||||
{
|
||||
"name": "e-select下拉选择器",
|
||||
"version": "1.0.7",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
|
||||
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||
"dev": true
|
||||
},
|
||||
"babel-code-frame": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^1.1.3",
|
||||
"esutils": "^2.0.2",
|
||||
@ -28,6 +29,7 @@
|
||||
"version": "6.26.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
|
||||
"integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.26.0",
|
||||
"babel-generator": "^6.26.0",
|
||||
@ -54,6 +56,7 @@
|
||||
"version": "6.26.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
|
||||
"integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-messages": "^6.23.0",
|
||||
"babel-runtime": "^6.26.0",
|
||||
@ -69,6 +72,7 @@
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
|
||||
"integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.22.0",
|
||||
"babel-template": "^6.24.1"
|
||||
@ -78,6 +82,7 @@
|
||||
"version": "6.23.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
|
||||
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.22.0"
|
||||
}
|
||||
@ -86,6 +91,7 @@
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
|
||||
"integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-runtime": "^6.26.0",
|
||||
@ -100,6 +106,7 @@
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
|
||||
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"core-js": "^2.4.0",
|
||||
"regenerator-runtime": "^0.11.0"
|
||||
@ -109,6 +116,7 @@
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
|
||||
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
"babel-traverse": "^6.26.0",
|
||||
@ -121,6 +129,7 @@
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
|
||||
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.26.0",
|
||||
"babel-messages": "^6.23.0",
|
||||
@ -137,6 +146,7 @@
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
|
||||
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
"esutils": "^2.0.2",
|
||||
@ -147,17 +157,20 @@
|
||||
"babylon": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
|
||||
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
|
||||
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
|
||||
"dev": true
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@ -167,6 +180,7 @@
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^2.2.1",
|
||||
"escape-string-regexp": "^1.0.2",
|
||||
@ -178,12 +192,14 @@
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"convert-source-map": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
|
||||
"integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "~5.1.1"
|
||||
}
|
||||
@ -191,12 +207,14 @@
|
||||
"core-js": {
|
||||
"version": "2.6.11",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
|
||||
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
|
||||
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
|
||||
"dev": true
|
||||
},
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
@ -205,6 +223,7 @@
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
|
||||
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"repeating": "^2.0.0"
|
||||
}
|
||||
@ -212,22 +231,26 @@
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
|
||||
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
|
||||
"dev": true
|
||||
},
|
||||
"globals": {
|
||||
"version": "9.18.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
|
||||
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ=="
|
||||
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
|
||||
"dev": true
|
||||
},
|
||||
"has-ansi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
@ -236,6 +259,7 @@
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
|
||||
"integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"os-homedir": "^1.0.0",
|
||||
"os-tmpdir": "^1.0.1"
|
||||
@ -245,6 +269,7 @@
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
|
||||
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
@ -252,32 +277,38 @@
|
||||
"is-finite": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
|
||||
"integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w=="
|
||||
"integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==",
|
||||
"dev": true
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
|
||||
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
||||
"dev": true
|
||||
},
|
||||
"jsesc": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
|
||||
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
|
||||
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
|
||||
"dev": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
|
||||
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
|
||||
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"dev": true
|
||||
},
|
||||
"loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
}
|
||||
@ -286,6 +317,7 @@
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@ -293,12 +325,14 @@
|
||||
"minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"dev": true
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
|
||||
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.5"
|
||||
}
|
||||
@ -306,37 +340,44 @@
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||
"dev": true
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"dev": true
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
"private": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
|
||||
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg=="
|
||||
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
|
||||
"dev": true
|
||||
},
|
||||
"regenerator-runtime": {
|
||||
"version": "0.11.1",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
||||
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
|
||||
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
|
||||
"dev": true
|
||||
},
|
||||
"repeating": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
|
||||
"integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-finite": "^1.0.0"
|
||||
}
|
||||
@ -344,22 +385,26 @@
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true
|
||||
},
|
||||
"slash": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
|
||||
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU="
|
||||
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
|
||||
"dev": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.4.18",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
|
||||
"integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"source-map": "^0.5.6"
|
||||
}
|
||||
@ -368,6 +413,7 @@
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
@ -375,17 +421,20 @@
|
||||
"supports-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
|
||||
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
||||
"dev": true
|
||||
},
|
||||
"to-fast-properties": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
|
||||
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc="
|
||||
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
|
||||
"dev": true
|
||||
},
|
||||
"trim-right": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
|
||||
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
|
||||
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,5 @@
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
]
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
}
|
496
pages.json
496
pages.json
@ -1,58 +1,20 @@
|
||||
{
|
||||
"pages": [
|
||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 300,
|
||||
// #ifdef APP-PLUS
|
||||
"enablePullDownRefresh": true,
|
||||
// #endif
|
||||
"app-plus": {
|
||||
"scrollIndicator": false //禁用原生导航栏
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/supply_chains/supply_chains",
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "供应",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
"enablePullDownRefresh": true,
|
||||
// #ifdef APP-PLUS
|
||||
"enablePullDownRefresh": true,
|
||||
// #endif
|
||||
"app-plus": {
|
||||
"scrollIndicator": false //禁用原生导航栏
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
//#ifdef APP-PLUS
|
||||
//启动页
|
||||
{
|
||||
"path": "pages/guide/judge",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"onReachBottomDistance": 100,
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"contentAdjust": false,
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/guide/guide",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"onReachBottomDistance": 100,
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"contentAdjust": false,
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
// #endif
|
||||
{
|
||||
"path": "pages/gather/gather",
|
||||
"style": {
|
||||
@ -66,7 +28,7 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "常用",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -75,27 +37,6 @@
|
||||
"navigationBarTitleText": "购物车"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/room/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "直播列表",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/room/spectator",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "直播间"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path": "pages/room/histroyroom",
|
||||
"style": {
|
||||
"navigationBarTitleText": "历史直播间",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/plant_grass/index",
|
||||
"style": {
|
||||
@ -145,175 +86,16 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付提示"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/moreProject/moreProject",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商户平台",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "uni_modules/guyue-updater/pages/updater",
|
||||
"path": "pages/supply_chains/supply_chains",
|
||||
"style": {
|
||||
"app-plus": {
|
||||
"animationDuration": 200,
|
||||
"animationType": "fade-in",
|
||||
"background": "transparent",
|
||||
"backgroundColorTop": "transparent",
|
||||
"bounce": "none",
|
||||
"popGesture": "none",
|
||||
"scrollIndicator": false,
|
||||
"titleNView": false
|
||||
},
|
||||
"backgroundColor": "transparent",
|
||||
"disableScroll": true,
|
||||
"navigationBarTitleText": "供应",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/margin/margin",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText":"缴纳押金",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path" : "pages/select_address/select_address",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "选择位置",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/select_address/select_address_n",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "选择位置",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/activityDetail/activityDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "活动",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/subsidy/subsidy",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "补贴记录",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/invitation/invitation",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "拉新活动",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/redpacket/redpacket",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "红包",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/redpacket/redpack_type",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "红包余额",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/subsidy/subsidy2",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "实物通用红包",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/subsidy/subsidy3",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "现金抵扣红包",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/towPrice/towPrice",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "两元专区",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/order_addcart/order_addcart_t",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "购物车",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/giftBag/giftBag",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "新人礼包",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/helpPeople/helpPeople",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/helpPeople/formTable",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "信息收集",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
}
|
||||
],
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pages/goods_cate",
|
||||
"name": "goods_cate",
|
||||
@ -336,15 +118,6 @@
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},{
|
||||
"path": "index_v",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP || APP-PLUS
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
@ -400,9 +173,8 @@
|
||||
}, {
|
||||
"path": "goods_list/index",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom"
|
||||
|
||||
"navigationBarTitleText": "里海云仓",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -428,44 +200,6 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "supply_chain/supplierA",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#e93323",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "supply_chain/supplierB",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#e93323",
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "supply_chain/suppliers",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#e93323",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "supply_chain/maps",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#e93323",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "supply_chain/merchant",
|
||||
"style": {
|
||||
@ -490,33 +224,8 @@
|
||||
}, {
|
||||
"path": "cloud_entrepot/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "里海云仓",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "cloud_entrepot/indexa",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "里海云仓",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "cloud_entrepot/indexb",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "里海云仓",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
},{
|
||||
"path": "cloud_entrepot/indexh",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "里海云仓",
|
||||
"enablePullDownRefresh": true
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}, {
|
||||
@ -527,62 +236,6 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "specialty/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "名优特产",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
},{
|
||||
"path": "specialty/short_index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "集体店铺",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "specialty/indexa",
|
||||
"style": {
|
||||
"navigationBarTitleText": "名优特产",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "food/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "当地美食",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "food/indexa",
|
||||
"style": {
|
||||
"navigationBarTitleText": "当地美食",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "tourism/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "特色文旅",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "tourism/indexa",
|
||||
"style": {
|
||||
"navigationBarTitleText": "特色文旅",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -668,14 +321,6 @@
|
||||
"navigationBarTitleText": "我的账户"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "user_money/money",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "我的余额",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_bill/index",
|
||||
"style": {
|
||||
@ -846,12 +491,6 @@
|
||||
"navigationBarTitleText": "采购订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "order_list/relase",
|
||||
"style": {
|
||||
"navigationBarTitleText": "委托订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "order_list/order",
|
||||
"style": {
|
||||
@ -1048,7 +687,7 @@
|
||||
}, {
|
||||
"path": "payment/payment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付",
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
@ -1066,13 +705,13 @@
|
||||
"root": "pages/releaseManagement",
|
||||
"name": "releaseManagement",
|
||||
"pages": [{
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
"path": "details/index",
|
||||
"style": {
|
||||
@ -1080,8 +719,7 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
{
|
||||
"root": "pages/commissionedSales",
|
||||
@ -1200,26 +838,10 @@
|
||||
{
|
||||
"path": "settled/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
|
||||
"navigationBarTitleText": "商家入驻"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "settled/unit",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
|
||||
"navigationBarTitleText": "个人入驻"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "applicationRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请记录"
|
||||
}
|
||||
}, {
|
||||
"path": "applicationRecord/unit",
|
||||
"path": "applicationRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请记录"
|
||||
}
|
||||
@ -1271,13 +893,7 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单列表"
|
||||
}
|
||||
}, {
|
||||
"path": "financial_management/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "财务管理"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "orderRefund/index",
|
||||
"style": {
|
||||
@ -1465,9 +1081,7 @@
|
||||
"pages": [{
|
||||
"path": "plant_detail/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "内容详情",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
"navigationBarTitleText": "内容详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -1840,53 +1454,37 @@
|
||||
"selectedColor": "#E93323",
|
||||
"borderStyle": "white",
|
||||
"backgroundColor": "#ffffff",
|
||||
"iconWidth": "36",
|
||||
|
||||
"list": [
|
||||
|
||||
// {
|
||||
// "pagePath": "pages/supply_chains/supply_chains",
|
||||
// "iconPath": "static/tabbar_icon/d.png",
|
||||
// "selectedIconPath": "static/tabbar_icon/d-a.png",
|
||||
// "text": "供销"
|
||||
// },
|
||||
{
|
||||
"list": [{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar_icon/a.png",
|
||||
"selectedIconPath": "static/tabbar_icon/a-a.png"
|
||||
// "text": "泸州"
|
||||
// "text": "供销"
|
||||
"selectedIconPath": "static/tabbar_icon/a-a.png",
|
||||
"text": "泸州"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/gather/gather",
|
||||
"iconPath": "static/tabbar_icon/b.png",
|
||||
"selectedIconPath": "static/tabbar_icon/b-a.png"
|
||||
// "text": "生产"
|
||||
"selectedIconPath": "static/tabbar_icon/b-a.png",
|
||||
"text": "工作台"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/plant_release/index",
|
||||
"iconPath": "static/tabbar_icon/d.png",
|
||||
"selectedIconPath": "static/tabbar_icon/d-a.png",
|
||||
"text": "发布"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/supply_chains/supply_chains",
|
||||
"iconPath": "static/tabbar_icon/c.png",
|
||||
"selectedIconPath": "static/tabbar_icon/c-a.png",
|
||||
"text": "供应"
|
||||
},
|
||||
// {
|
||||
// "pagePath": "pages/plant_release/index",
|
||||
// "iconPath": "static/tabbar_icon/c.png",
|
||||
// "selectedIconPath": "static/tabbar_icon/c-a.png",
|
||||
// "text": "发布"
|
||||
|
||||
// },
|
||||
{
|
||||
"pagePath": "pages/order_addcart/order_addcart_t",
|
||||
"iconPath": "static/tabbar_icon/d.png",
|
||||
"selectedIconPath": "static/tabbar_icon/d-a.png"
|
||||
// "text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/index",
|
||||
"iconPath": "static/tabbar_icon/e.png",
|
||||
"selectedIconPath": "static/tabbar_icon/e-a.png"
|
||||
// "text": "我的"
|
||||
"selectedIconPath": "static/tabbar_icon/e-a.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
"condition": { //模式配置,仅开发期间生效
|
||||
"current": 0, //当前激活的模式(list 的索引项)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,11 +6,10 @@
|
||||
<view class="iconfont icon-xiangzuo"></view>
|
||||
</view>
|
||||
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
|
||||
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
|
||||
:value='sotreParam.keyword' @confirm="searchSubmit"></input>
|
||||
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='sotreParam.keyword'
|
||||
@confirm="searchSubmit"></input>
|
||||
</view>
|
||||
<view v-if="mer_location == 1" style="text-align: right;" class='iconfont search-right'
|
||||
@click='showMaoLocation(latitude,longitude)'>
|
||||
<view v-if="mer_location == 1" style="text-align: right;" class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
|
||||
<view class="iconfont icon-dingwei"></view>
|
||||
<view class="right-text" v-if="recommend_address">
|
||||
{{recommend_address}}
|
||||
@ -20,8 +19,7 @@
|
||||
</view>
|
||||
<view class="nav-wrapper">
|
||||
<view class='nav acea-row row-middle'>
|
||||
<view v-for="item in downMenus" :key="item.key" class='item'
|
||||
:class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
|
||||
<view v-for="item in downMenus" :key="item.key" class='item' :class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
|
||||
<view>
|
||||
{{item.title}}
|
||||
</view>
|
||||
@ -32,7 +30,7 @@
|
||||
</view>
|
||||
<!-- 店铺 -->
|
||||
<block>
|
||||
<view class="mer-box" v-if="storeList.length > 0">
|
||||
<view class="mer-box"v-if="storeList.length > 0">
|
||||
<view class="mer-item" v-for="(item,index) in storeList" :key='index'>
|
||||
<view class="mer-hd" @click="goStore(item.mer_id)">
|
||||
<image :src="item.mini_banner?item.mini_banner:item.mer_banner"></image>
|
||||
@ -49,8 +47,7 @@
|
||||
{{item.care_count<10000 ? item.care_count : (item.care_count/10000).toFixed(2)+'万'}}人关注
|
||||
</view>
|
||||
<view class="line" v-if="item.distance"></view>
|
||||
<view class="distance" v-if="item.distance"
|
||||
@click.stop="showStoreLocation(item)">
|
||||
<view class="distance" v-if="item.distance" @click.stop="showStoreLocation(item)">
|
||||
<view class="">
|
||||
{{item.distance}}
|
||||
</view>
|
||||
@ -61,9 +58,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="pro-box">
|
||||
<navigator :url="`/pages/goods_details/index?id=${itemn.product_id}`" hover-class="none"
|
||||
class="pro-item" v-for="(itemn,indexn) in item.recommend" :key='indexn'
|
||||
v-if="item.recommend.length<=3">
|
||||
<navigator :url="`/pages/goods_details/index?id=${itemn.product_id}`" hover-class="none" class="pro-item" v-for="(itemn,indexn) in item.recommend"
|
||||
:key='indexn' v-if="item.recommend.length<=3">
|
||||
<image :src="itemn.image" mode=""></image>
|
||||
<view class="price">
|
||||
<text>¥</text>{{itemn.price}}
|
||||
@ -107,8 +103,7 @@
|
||||
} from "vuex";
|
||||
import {
|
||||
goShopDetail
|
||||
} from '@/libs/order.js';
|
||||
import { wgsToGcj } from "@/utils/wgs.js";
|
||||
} from '@/libs/order.js'
|
||||
const app = getApp();
|
||||
export default {
|
||||
data() {
|
||||
@ -191,7 +186,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
computed: {
|
||||
downMenus: function() {
|
||||
@ -208,7 +203,7 @@
|
||||
onLoad: function(options) {
|
||||
this.mer_id = options.mer_id;
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
// 打开地图
|
||||
showMaoLocation(lat, long) {
|
||||
// console.log(lat, long)
|
||||
@ -220,11 +215,11 @@
|
||||
this.$wechat.seeLocation({
|
||||
latitude: Number(lat),
|
||||
longitude: Number(long)
|
||||
}).then(res => {
|
||||
}).then(res=>{
|
||||
// console.log('success');
|
||||
})
|
||||
} else {
|
||||
//#endif
|
||||
}else{
|
||||
//#endif
|
||||
uni.openLocation({
|
||||
latitude: parseFloat(lat),
|
||||
longitude: parseFloat(long),
|
||||
@ -233,7 +228,7 @@
|
||||
// console.log(res)
|
||||
},
|
||||
});
|
||||
// #ifdef H5
|
||||
// #ifdef H5
|
||||
}
|
||||
//#endif
|
||||
},
|
||||
@ -248,33 +243,31 @@
|
||||
latitude: Number(item.lat),
|
||||
longitude: Number(item.long),
|
||||
name: item.mer_name,
|
||||
address: item.mer_address ? item.mer_address : '',
|
||||
}).then(res => {
|
||||
address: item.mer_address ? item.mer_address: '',
|
||||
}).then(res=>{
|
||||
// console.log('success');
|
||||
})
|
||||
} else {
|
||||
//#endif
|
||||
}else{
|
||||
//#endif
|
||||
uni.openLocation({
|
||||
latitude: parseFloat(item.lat),
|
||||
longitude: parseFloat(item.long),
|
||||
scale: 8,
|
||||
name: item.mer_name,
|
||||
address: item.mer_address ? item.mer_address : '',
|
||||
address: item.mer_address ? item.mer_address: '',
|
||||
success: function(res) {
|
||||
// console.log(res)
|
||||
},
|
||||
});
|
||||
// #ifdef H5
|
||||
// #ifdef H5
|
||||
}
|
||||
//#endif
|
||||
},
|
||||
selfLocation() {
|
||||
let self = this
|
||||
if (uni.getStorageSync('RejectTarget')) return
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: (res) => {
|
||||
res = wgsToGcj(res);
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
@ -286,9 +279,7 @@
|
||||
}).then(res => {
|
||||
// console.log(res)
|
||||
this.detaile_address = res.data.address;
|
||||
this.recommend_address = res.data.address.length > 4 ? res.data.address
|
||||
.slice(0, 4) + '...' : res.data.address
|
||||
uni.setStorageSync('adress_location', res.data.address)
|
||||
this.recommend_address = res.data.address.length > 4 ? res.data.address.slice(0,4) + '...' : res.data.address
|
||||
})
|
||||
},
|
||||
fail: (res) => {
|
||||
@ -387,7 +378,6 @@
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
background: var(--view-theme);
|
||||
|
||||
.search-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -396,7 +386,6 @@
|
||||
flex: 1;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.right-text {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@ -407,14 +396,12 @@
|
||||
color: #fff;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.icon-xiangyou,
|
||||
.icon-dingwei {
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.productList .search .back {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -426,7 +413,6 @@
|
||||
font-size: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.productList .search .input {
|
||||
flex: 1;
|
||||
// width: 540rpx;
|
||||
@ -436,23 +422,19 @@
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.productList .search .input input {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
font-size: 26rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.productList .search .input .placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.productList .search .input .iconfont {
|
||||
font-size: 35rpx;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.productList .search .icon-pailie,
|
||||
.productList .search .icon-tupianpailie {
|
||||
color: #fff;
|
||||
@ -461,7 +443,6 @@
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
}
|
||||
|
||||
.productList .nav-wrapper {
|
||||
z-index: 9;
|
||||
position: fixed;
|
||||
@ -470,11 +451,9 @@
|
||||
width: 100%;
|
||||
margin-top: 86rpx;
|
||||
background-color: $theme-color;
|
||||
|
||||
.tab-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tab-item {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
@ -485,7 +464,6 @@
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
|
||||
&::after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
@ -496,7 +474,6 @@
|
||||
background: transparent;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
&.on {
|
||||
&::after {
|
||||
background: #fff;
|
||||
@ -505,7 +482,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.productList .nav {
|
||||
height: 86rpx;
|
||||
color: #454545;
|
||||
@ -515,7 +491,6 @@
|
||||
justify-content: space-between;
|
||||
padding: 0 28rpx;
|
||||
}
|
||||
|
||||
.productList .nav .item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -524,12 +499,10 @@
|
||||
color: #FFFFFF;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.productList .nav .item.font-colors {
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.productList .nav .item .font-line {
|
||||
height: 4rpx;
|
||||
background-color: #fff;
|
||||
@ -543,32 +516,26 @@
|
||||
-o-animation: line 0.3s;
|
||||
/* Opera */
|
||||
}
|
||||
|
||||
@keyframes line {
|
||||
from {
|
||||
width: 0rpx;
|
||||
}
|
||||
|
||||
to {
|
||||
width: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.productList .nav .item image {
|
||||
width: 15rpx;
|
||||
height: 19rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.mer-box {
|
||||
padding: 20rpx 20rpx;
|
||||
margin-top: 168rpx;
|
||||
|
||||
.mer-item {
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.mer-hd {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@ -576,12 +543,10 @@
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mer-name {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
@ -589,7 +554,6 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10rpx;
|
||||
|
||||
image {
|
||||
width: 79rpx;
|
||||
height: 79rpx;
|
||||
@ -597,7 +561,6 @@
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.mer-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -605,7 +568,6 @@
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 6rpx;
|
||||
|
||||
.font-bg-red {
|
||||
margin-left: 20rpx;
|
||||
font-size: 18rpx;
|
||||
@ -616,72 +578,60 @@
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.mer-btn {
|
||||
color: rgba($color: #fff, $alpha: 0.7);
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 2rpx;
|
||||
height: 18rpx;
|
||||
color: rgba($color: #fff, $alpha: 0.7);
|
||||
margin: 0 12rpx;
|
||||
}
|
||||
|
||||
.distance {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: rgba($color: #fff, $alpha: 0.7);
|
||||
|
||||
.iconfont {
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.txt {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pro-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 20rpx 30rpx;
|
||||
|
||||
.pro-item {
|
||||
width: 218rpx;
|
||||
margin-right: 14rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 214rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.price {
|
||||
margin-top: 5rpx;
|
||||
font-size: 28rpx;
|
||||
color: var(--view-priceColor);
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.more-shop {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -702,7 +652,6 @@
|
||||
background-color: #fff;
|
||||
padding-bottom: calc(100% - 40rpx);
|
||||
padding-top: 200rpx;
|
||||
|
||||
.pictrue {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -715,4 +664,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -91,7 +91,6 @@
|
||||
import authorize from '@/components/Authorize';
|
||||
import emptyPage from '@/components/emptyPage.vue'
|
||||
import { configMap } from '@/utils';
|
||||
import { navigateBack } from '../../../libs/uniApi';
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
@ -199,14 +198,6 @@ import { navigateBack } from '../../../libs/uniApi';
|
||||
that.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
if(res.status==200){
|
||||
// uni.redirectTo({
|
||||
// url:'/admin/orderList/index?types=4&merId='+that.mer_id
|
||||
// })
|
||||
uni.navigateBack({
|
||||
delta:2
|
||||
})
|
||||
}
|
||||
that.getOrderData();
|
||||
})
|
||||
.catch(res => {
|
||||
|
@ -1,674 +0,0 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="finance_head">
|
||||
<view class="top">
|
||||
<view>
|
||||
<view v-if="user_id == 0" class="accont">
|
||||
<u--image
|
||||
:showLoading="true"
|
||||
:src="userInfo.avatar || '../../static/img/public/man.png'"
|
||||
width="44px"
|
||||
height="44px"
|
||||
shape="circle"
|
||||
></u--image>
|
||||
<view class="name">{{ userInfo.nickname }}</view>
|
||||
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
|
||||
</view>
|
||||
<view v-else class="accont">
|
||||
<u--image
|
||||
:showLoading="true"
|
||||
:src="userInfo.avatar || '../../static/img/public/man.png'"
|
||||
width="44px"
|
||||
height="44px"
|
||||
shape="circle"
|
||||
></u--image>
|
||||
|
||||
<view class="name">{{ userInfo.nickname }}</view>
|
||||
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="right" @click="navTo('/subpkg/topUp/topUp')">
|
||||
账户充值
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="center">
|
||||
<view class="title">
|
||||
<text style="margin-right: 20rpx">账户总金额(元)</text
|
||||
><uni-icons
|
||||
@click="updateEye()"
|
||||
:type="eyeType ? 'eye-filled' : 'eye-slash-filled'"
|
||||
color="#fff"
|
||||
></uni-icons>
|
||||
</view>
|
||||
<view class="price" v-show="eyeType"
|
||||
>{{ all_money }}元</view
|
||||
>
|
||||
<view class="price" v-show="!eyeType">****元</view>
|
||||
<view class="bubble">
|
||||
<!-- <image src="../../static/img/contract/bubble.png"></image> -->
|
||||
<view class="text" v-show="eyeType"
|
||||
>可提现金额{{ userInfo.user_money || 0.0 }}元</view
|
||||
>
|
||||
<view class="text" v-show="!eyeType">可提现金额****元</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom" @click="navTo('/subpkg/orderDetail/orderDetail')">
|
||||
<view class="item">
|
||||
<view>履约押金额(元)</view>
|
||||
<view class="num" v-show="eyeType">{{
|
||||
userInfo.deposit || 0.0
|
||||
}}</view>
|
||||
<view class="num" v-show="!eyeType">****</view>
|
||||
</view>
|
||||
<u-line direction="col" length="40%" color="#999999FF"></u-line>
|
||||
<view class="item">
|
||||
<view>个人收益金额(元)</view>
|
||||
<view class="num" v-show="eyeType">{{
|
||||
userInfo.user_money || 0.0
|
||||
}}</view>
|
||||
<view class="num" v-show="!eyeType">****</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bill">
|
||||
<view style="width: 100%; height: 90rpx; background-color: #fff"></view>
|
||||
<uni-section
|
||||
titleFontSize="32rpx"
|
||||
type="line"
|
||||
title="账单流水"
|
||||
></uni-section>
|
||||
<!-- <u-subsection :list="billTypeList" :current="current" mode="subsection"></u-subsection> -->
|
||||
<!-- <view class="type_box">
|
||||
<view class="type">
|
||||
<view :class="current == 0 ? 'active' : ''" @click="changeBillType(0)"
|
||||
>日账单</view
|
||||
>
|
||||
<view :class="current == 1 ? 'active' : ''" @click="changeBillType(1)"
|
||||
>月账单</view
|
||||
>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 日账单 -->
|
||||
<view class="bill_list" v-show="current == 0">
|
||||
<!-- <view class="card" v-for="(item, index) in billList" :key="index">
|
||||
<view class="top">
|
||||
<view class="blue">账单详情</view>
|
||||
<view>账单日期:{{item.create_time}}</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="left">
|
||||
<view>收益金额(元)</view>
|
||||
<view class="num">{{item.change_amount}}</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view>支出金额:{{item.change_amount_desc<0?item.change_amount:'0.00'}}</view>
|
||||
<view>入账金额:{{item.change_amount_desc>0?item.change_amount:'0.00'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="item" v-for="(item, index) in billList" :key="item.id">
|
||||
<view class="top">
|
||||
账单日期: {{ current ? item.month : item.create_time }}
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="text">
|
||||
<view class="t_item" v-if="current == 0">
|
||||
<view class="t_title">任务名称:</view>
|
||||
<view class="tips">{{ item.remark }}</view>
|
||||
</view>
|
||||
<!--<view class="t_item">
|
||||
<view class="t_title">金额归属:</view>
|
||||
<view class="tips">{{
|
||||
$store.state.app.userInfo.nickname
|
||||
}}</view>
|
||||
</view> -->
|
||||
|
||||
<view class="t_item">
|
||||
<view class="t_title">收益来源:</view>
|
||||
<view class="tips">
|
||||
<text v-if="item.change_type == 202" style="color: #46be61">{{
|
||||
item.type_desc
|
||||
}}</text>
|
||||
<text
|
||||
v-else-if="item.change_type == 203"
|
||||
style="color: #ff7c32"
|
||||
>{{ item.type_desc }}</text
|
||||
>
|
||||
<text v-else="item.change_type == 203">{{
|
||||
item.type_desc
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price">
|
||||
{{
|
||||
current
|
||||
? item.expenditure == 0
|
||||
? "+" + item.income
|
||||
: "-" + item.income
|
||||
: item.change_amount_desc
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="card" v-for="(item, index) in billList" :key="index">
|
||||
<view class="top">
|
||||
<view class="blue">账单详情</view>
|
||||
<view>账单日期:{{current?item.month:item.create_time}}</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="left">
|
||||
<view>收益金额(元)</view>
|
||||
<view class="num">
|
||||
{{current?(item.expenditure==0?item.income:'-'+item.income):item.change_amount_desc}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view>支出金额:{{item.expenditure>0?item.expenditure:'0.00'}}</view>
|
||||
<view>入账金额:{{item.income>0?item.income:'0.00'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
-->
|
||||
<u-loadmore
|
||||
:status="loadConfig.status"
|
||||
:loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText"
|
||||
:nomore-text="loadConfig.nomoreText"
|
||||
/>
|
||||
</view>
|
||||
<!-- 月账单 -->
|
||||
<view class="bill_list" v-show="current == 1">
|
||||
<view class="card" v-for="(item, index) in billListMonth" :key="index">
|
||||
<view class="top">
|
||||
<view class="blue">账单详情</view>
|
||||
<view>账单日期:{{ item.month }}</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="left">
|
||||
<view>个人收益金额(元)</view>
|
||||
<view class="num">{{ item.income }}</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view
|
||||
>支出金额:{{
|
||||
item.expenditure > 0 ? item.expenditure : "0.00"
|
||||
}}</view
|
||||
>
|
||||
<view>入账金额:{{ item.income > 0 ? item.income : "0.00" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore status="nomore" nomore-text="仅展示一年数据" />
|
||||
</view>
|
||||
|
||||
<!-- <button class="btn" @click="navTo('/subpkg/withdrawDeposit/withdrawDeposit')">提现余额</button> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {
|
||||
// accountLogLists,
|
||||
// accountLogListsMonth
|
||||
// } from "@/api/pay.js"
|
||||
// import {
|
||||
// userInfo
|
||||
// } from "@/api/oaUser.js"
|
||||
|
||||
// import {
|
||||
// Toast
|
||||
// } from '@/libs/uniApi.js'
|
||||
import {
|
||||
|
||||
getUserInfo,
|
||||
|
||||
} from '@/api/user.js';
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
user_id: 0,
|
||||
userInfo: {},
|
||||
otherUserInfo: {},
|
||||
billTypeList: ['日账单', '月账单'],
|
||||
current: 0,
|
||||
billList: [],
|
||||
eyeType:true,
|
||||
billListMonth: [],
|
||||
loadConfig: {
|
||||
page: 1,
|
||||
limit: 25,
|
||||
loadingText: '努力加载中',
|
||||
loadmoreText: '轻轻上拉',
|
||||
nomoreText: '没有更多账单了~~',
|
||||
status: 'loadmore'
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad (e) {
|
||||
if (e.id > 0) {
|
||||
this.user_id = e.id
|
||||
|
||||
}
|
||||
// this.loadBill()
|
||||
},
|
||||
onShow () {
|
||||
|
||||
if (this.user_id == 0) {
|
||||
this.userInfo = this.$store.state.app.userInfo;
|
||||
getUserInfo().then((res) => {
|
||||
this.$store.commit('setUserInfo', res.data);
|
||||
this.userInfo = res.data;
|
||||
})
|
||||
} else {
|
||||
this.OtherUserInfo()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// eyeType () {
|
||||
// return this.$store.state.config.eyeType;
|
||||
// },
|
||||
all_money(){
|
||||
let str = 0.00;
|
||||
|
||||
try{
|
||||
this.userInfo.user_money?str=str+parseFloat(this.userInfo.user_money):0.00;
|
||||
this.userInfo.deposit?str=str+parseFloat(this.userInfo.deposit):0.00;
|
||||
str = str.toFixed(2);
|
||||
}catch(e){
|
||||
str = 0.00;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
onBackPress () {
|
||||
this.loadBill()
|
||||
},
|
||||
methods: {
|
||||
navTo (url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
}) : Toast('暂未开放')
|
||||
},
|
||||
async OtherUserInfo () {
|
||||
// let res = await userInfo({
|
||||
// id: this.user_id
|
||||
// });
|
||||
|
||||
getUserInfo().then(res => {
|
||||
// that.userInfo = res.data;
|
||||
// that.userInfo.svip_open = true;
|
||||
// that.userInfo.vip_status = 2;
|
||||
// that.is_promoter = res.data.is_promoter;
|
||||
// that.extension_status = res.data.extension_status;
|
||||
// this.userInfo = res.data
|
||||
console.log(res.data)
|
||||
});
|
||||
// this.userInfo = res.data
|
||||
},
|
||||
updateEye () {
|
||||
this.eyeType=!this.eyeType
|
||||
},
|
||||
// 选择日账单月账单
|
||||
changeBillType (type) {
|
||||
this.current = type;
|
||||
if (type == 1) this.loadBillMonth();
|
||||
},
|
||||
async loadBill () {
|
||||
if (this.loadConfig.status == "nomore") return;
|
||||
this.loadConfig.status = "loading"
|
||||
let res = await accountLogLists({
|
||||
type: 'um', //账户余额
|
||||
page_no: this.loadConfig.page,
|
||||
page_size: this.loadConfig.limit,
|
||||
user_id: this.user_id
|
||||
});
|
||||
this.loadConfig.status = "loadmore"
|
||||
if (res.data.lists.length < this.loadConfig.limit) {
|
||||
this.loadConfig.status = "nomore"
|
||||
} else {
|
||||
this.loadConfig.page++;
|
||||
}
|
||||
this.billList = [...this.billList, ...res.data.lists];
|
||||
},
|
||||
async loadBillMonth () {
|
||||
let res = await accountLogListsMonth();
|
||||
let list = [];
|
||||
for (let key in res.data) {
|
||||
list.push(res.data[key])
|
||||
}
|
||||
this.billListMonth = list;
|
||||
}
|
||||
},
|
||||
onPullDownRefresh () {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
// background-color: #fff;
|
||||
}
|
||||
|
||||
.finance_head {
|
||||
background-color: #f02828;
|
||||
height: 400rpx;
|
||||
position: relative;
|
||||
// box-shadow: 0 -10px 20px rgba(#fff, 0.9) inset;
|
||||
background-image: linear-gradient(to top, rgba(#fff, 1), transparent);
|
||||
// box-shadow: -10px -10px 40px rgba(#fff, 0.9);
|
||||
background-size: 100% 35%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center bottom;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
color: #fff;
|
||||
padding: 10rpx 28rpx;
|
||||
|
||||
.accont {
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: auto;
|
||||
width: auto;
|
||||
line-height: 44px;
|
||||
|
||||
.name {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
|
||||
// .name {
|
||||
// margin: 0 17.5rpx;
|
||||
// }
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 24.53rpx;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.center {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
line-height: 39rpx;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 60rpx;
|
||||
font-weight: bold;
|
||||
line-height: 39rpx;
|
||||
margin-top: 28rpx;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.bubble {
|
||||
padding: 20rpx 28rpx 10rpx 28rpx;
|
||||
background-image: url("@/static/images/bubble.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.text {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
position: absolute;
|
||||
bottom: -78rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 694rpx;
|
||||
height: 140rpx;
|
||||
background: #ffffff;
|
||||
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
.item {
|
||||
text-align: center;
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
line-height: 39rpx;
|
||||
|
||||
.num {
|
||||
font-size: 39rpx;
|
||||
font-weight: 500;
|
||||
color: #f02828;
|
||||
line-height: 39rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bill {
|
||||
// padding: 28rpx;
|
||||
// padding-top: 90rpx;
|
||||
padding-bottom: 32rpx;
|
||||
background-color: #f5f5f5;
|
||||
|
||||
.type_box {
|
||||
background-color: #fff;
|
||||
padding: 32rpx 0;
|
||||
|
||||
.type {
|
||||
height: 53rpx;
|
||||
width: 333rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
color: #f02828;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #3274f9;
|
||||
|
||||
&:nth-child(1) {
|
||||
border-radius: 30rpx 0 0 30rpx;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
border-radius: 0 30rpx 30rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #f02828;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bill_list {
|
||||
// background-color: #f5f5f5;
|
||||
padding-bottom: 100rpx;
|
||||
padding-top: 28rpx;
|
||||
|
||||
.card {
|
||||
padding: 28rpx;
|
||||
background-color: #fff;
|
||||
margin-bottom: 21rpx;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
color: #333333ff;
|
||||
line-height: 39rpx;
|
||||
|
||||
.blue {
|
||||
width: 137rpx;
|
||||
height: 49rpx;
|
||||
background: #3274f9;
|
||||
border-radius: 26rpx 26rpx 26rpx 26rpx;
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 39rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 160rpx;
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
line-height: 39rpx;
|
||||
|
||||
.num {
|
||||
font-size: 39rpx;
|
||||
font-weight: 500;
|
||||
color: #f02828;
|
||||
line-height: 39rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
line-height: 39rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 28rpx;
|
||||
width: 694rpx;
|
||||
// height: 238rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
opacity: 1;
|
||||
padding: 28rpx;
|
||||
|
||||
.top {
|
||||
margin-bottom: 28rpx;
|
||||
font-size: 25rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
|
||||
&:before {
|
||||
display: inline-block;
|
||||
content: "账单详情";
|
||||
width: 137rpx;
|
||||
height: 49rpx;
|
||||
line-height: 49rpx;
|
||||
text-align: center;
|
||||
background: #3274f9;
|
||||
border-radius: 26rpx 26rpx 26rpx 26rpx;
|
||||
color: #fff;
|
||||
margin-right: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.text {
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
line-height: 39rpx;
|
||||
|
||||
.t_item {
|
||||
display: flex;
|
||||
|
||||
.t_title {
|
||||
margin-bottom: 16rpx;
|
||||
flex-shrink: 0 !important;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #f02828;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #fff;
|
||||
border-radius: 100px;
|
||||
text-align: center;
|
||||
line-height: 84.21rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 84.21rpx;
|
||||
width: 693.93rpx;
|
||||
height: 84.21rpx;
|
||||
background: #f02828;
|
||||
box-shadow: 0px 9px 26px 1px #e9eff5;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -264,22 +264,14 @@
|
||||
</view>
|
||||
<view class='product-intro' id="past3">
|
||||
<view class='title'>产品介绍</view>
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<jyf-parser v-if="description.type == 0 && typeof description.content == 'string'" :domain='domain'
|
||||
:html="description.content.replace(/<br\/>/ig, '')" ref="article"
|
||||
:tag-style="tagStyle"></jyf-parser>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view v-if="description.type == 0 && typeof description.content == 'string'" class="description"
|
||||
v-html="description.content.replace(/<br\/>/ig, '')"></view>
|
||||
<!-- #endif -->
|
||||
<jyf-parser v-if="description.type == 0" :domain='domain' :html="description.content.replace(/<br\/>/ig, '')"
|
||||
ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
<view v-else class="product_content">
|
||||
<view v-if="description.content && description.content.title" class="product_content_title">{{description.content.title}}
|
||||
<view v-if="description.content && description.content.title" class="title">{{description.content.title}}
|
||||
</view>
|
||||
<view v-if="description.content && description.content.image" class="pictures">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item"></image>
|
||||
</view>
|
||||
<block v-if="description.content && description.content.image">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item" mode="widthFix" style="background-color: #fff;width: 100vw;">
|
||||
</image>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
@ -566,23 +558,6 @@
|
||||
}
|
||||
that.$set(that, 'storeInfo', storeInfo);
|
||||
that.$set(that, 'description', storeInfo.content);
|
||||
if(typeof that.description.content == 'string'){
|
||||
try{
|
||||
that.description.content = JSON.parse(that.description.content);
|
||||
}catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
if (that.description.type == 0 && typeof that.description.content == 'string') {
|
||||
that.description.content = that.description.content.replace(
|
||||
/<img/gi,
|
||||
'<img style="max-width:100%;height:auto;float:left;display:block" '
|
||||
);
|
||||
that.description.content = that.description.content.replace(
|
||||
/<video/gi,
|
||||
'<video style="width:100%;height:300px;display:block" '
|
||||
);
|
||||
}
|
||||
that.$set(that, 'reply', res.data.topReply ? [res.data.topReply] : []);
|
||||
that.$set(that.attr, 'productAttr', res.data.attr);
|
||||
that.$set(that, 'productValue', res.data.sku);
|
||||
@ -633,23 +608,6 @@
|
||||
}
|
||||
that.$set(that, 'storeInfo', storeInfo);
|
||||
that.$set(that, 'description', storeInfo.content);
|
||||
if(typeof that.description.content == 'string'){
|
||||
try{
|
||||
that.description.content = JSON.parse(that.description.content);
|
||||
}catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
if (that.description.type == 0 && typeof that.description.content == 'string') {
|
||||
that.description.content = that.description.content.replace(
|
||||
/<img/gi,
|
||||
'<img style="max-width:100%;height:auto;float:left;display:block" '
|
||||
);
|
||||
that.description.content = that.description.content.replace(
|
||||
/<video/gi,
|
||||
'<video style="width:100%;height:300px;display:block" '
|
||||
);
|
||||
}
|
||||
that.$set(that.description, 'type', storeInfo.content.type || 0);
|
||||
that.$set(that, 'reply', res.data.topReply ? [res.data.topReply] : []);
|
||||
that.$set(that.attr, 'productAttr', res.data.attr);
|
||||
@ -1634,19 +1592,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.product_content{
|
||||
background-color: #fff;
|
||||
&_title{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
line-height: 50rpx;
|
||||
padding: 28rpx;
|
||||
word-wrap: break-word;
|
||||
text-align: center;
|
||||
}
|
||||
image{
|
||||
width: 750rpx;
|
||||
// height: 750rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -239,6 +239,7 @@
|
||||
const data = {
|
||||
product_type: this.where.product_type
|
||||
}
|
||||
console.log('data', data);
|
||||
orderStatistics(mer_id, data).then(
|
||||
res => {
|
||||
that.census = res.data.order;
|
||||
@ -264,9 +265,9 @@
|
||||
purchaseOrderList(mer_id) {
|
||||
this.where.limit = 2
|
||||
purchaseOrder(this.where, mer_id).then(res => {
|
||||
// console.log(res);
|
||||
console.log(res);
|
||||
this.OrderList = res.data
|
||||
// console.log(this.OrderList);
|
||||
console.log(this.OrderList);
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -146,7 +146,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:120upx;"></view>
|
||||
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'" style="padding-bottom: var(--status-bar-height);">
|
||||
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
|
||||
<view class="more"></view>
|
||||
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)">
|
||||
同意
|
||||
@ -165,7 +165,7 @@
|
||||
确认付款
|
||||
</view>
|
||||
|
||||
<view class="bnt delivery" @click="toPostagequ(orderInfo)" v-if="orderInfo.status == 0&&orderInfo.activity_type==0&& orderInfo.order_type !=1 ">
|
||||
<view class="bnt delivery" @click="toPostagequ(orderInfo)" v-if="orderInfo.status == 0&&orderInfo.activity_type==0">
|
||||
收件码
|
||||
</view>
|
||||
<navigator class="bnt delivery" v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0&&orderInfo.activity_type==98" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator>
|
||||
@ -376,11 +376,8 @@
|
||||
/*核销订单*/
|
||||
goCancellation() {
|
||||
let that = this;
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/admin/cancellate_result/index?mer_id='+that.mer_id+'&code='+that.orderInfo.verify_code,
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url: `/pages/admin/order_cancellation/index?mer_id=${that.mer_id}`
|
||||
url: '/pages/admin/cancellate_result/index?mer_id='+that.mer_id+'&code='+that.orderInfo.verify_code,
|
||||
})
|
||||
// uni.showModal({
|
||||
// title: '订单核销',
|
||||
|
@ -4,7 +4,7 @@
|
||||
<view class="search">
|
||||
<view class="search-content acea-row row-middle">
|
||||
<text class="iconfont icon-sousuo"></text>
|
||||
<input v-model="where.search_info" confirm-type="search" placeholder="请输收货人手机号或订单号搜索" class="input"
|
||||
<input v-model="where.store_name" confirm-type="search" placeholder="请输收货人手机号或退款订单号搜索" class="input"
|
||||
@confirm="handleSearch" />
|
||||
</view>
|
||||
</view>
|
||||
@ -172,7 +172,7 @@
|
||||
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&item.activity_type==98"
|
||||
@click="toPostage(item)">去发货
|
||||
</view>
|
||||
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&& item.order_type !=1 &&item.activity_type==0"
|
||||
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&item.activity_type==0"
|
||||
@click="toPostagequ(item)">收件码
|
||||
</view>
|
||||
<view class="bnt bnt_color"
|
||||
@ -261,7 +261,7 @@
|
||||
page: 1,
|
||||
limit: 10,
|
||||
status: 1,
|
||||
search_info: '',
|
||||
store_name: '',
|
||||
product_type: ''
|
||||
},
|
||||
list: [],
|
||||
@ -284,7 +284,9 @@
|
||||
that.init();
|
||||
}
|
||||
},
|
||||
|
||||
types: function() {
|
||||
this.getIndex();
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? ""
|
||||
@ -293,9 +295,6 @@
|
||||
this.merId = option.merId;
|
||||
this.getIndex();
|
||||
},
|
||||
onShow(){
|
||||
this.getIndex();
|
||||
},
|
||||
methods: {
|
||||
// 关闭二维码弹窗
|
||||
popUpClose() {
|
||||
@ -325,13 +324,12 @@
|
||||
},
|
||||
handleSearch() {
|
||||
this.loaded = false;
|
||||
this.where.page = 1;
|
||||
this.list = [];
|
||||
this.where.page = 3;
|
||||
this.list = [];
|
||||
this.getIndex();
|
||||
},
|
||||
// 获取数据
|
||||
getIndex() {
|
||||
|
||||
let that = this;
|
||||
if (that.loading || that.loaded) return;
|
||||
that.loading = true;
|
||||
@ -357,7 +355,7 @@
|
||||
that.loaded = res.data.list.length < that.where.limit;
|
||||
that.list.push.apply(that.list, res.data.list);
|
||||
that.where.page = that.where.page + 1;
|
||||
// console.log(that.list)
|
||||
console.log(that.list)
|
||||
|
||||
// console.log(that.list);
|
||||
},
|
||||
@ -383,12 +381,10 @@
|
||||
if (val != 'verify') {
|
||||
if (this.where.status != val) {
|
||||
this.where.status = val;
|
||||
this.where.search_info=''
|
||||
delete this.where.is_verify;
|
||||
this.init();
|
||||
}
|
||||
} else {
|
||||
this.where.search_info=''
|
||||
this.where.is_verify = 1;
|
||||
delete this.where.status;
|
||||
this.init();
|
||||
@ -556,7 +552,6 @@
|
||||
uni.navigateTo({
|
||||
url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}`
|
||||
})
|
||||
|
||||
},
|
||||
toRefundDetail(item) {
|
||||
uni.navigateTo({
|
||||
|
@ -134,15 +134,11 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let params = {
|
||||
status: that.status,
|
||||
fail_message: that.fail_message
|
||||
}
|
||||
|
||||
|
||||
if(that.orderInfo.refund_type == 2 && that.status != -1){
|
||||
if(that.orderInfo.refund_type == 2){
|
||||
if (!that.refundInfo.mer_delivery_user) {
|
||||
return that.$util.Tips({
|
||||
title: '请填写收货人姓名'
|
||||
|
@ -122,7 +122,6 @@
|
||||
},
|
||||
// 扫码核销
|
||||
scanCode() {
|
||||
|
||||
var self = this;
|
||||
// #ifdef MP || APP-PLUS
|
||||
wx.scanCode({
|
||||
@ -130,14 +129,11 @@
|
||||
success(res) {
|
||||
self.verify_code = res.result
|
||||
// console.log(self.verify_code);
|
||||
console.log('111',self.mer_id,self.verify_code)
|
||||
verifierOrder(self.mer_id,self.verify_code)
|
||||
.then(res => {
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id
|
||||
});
|
||||
|
||||
})
|
||||
.catch(res => {
|
||||
self.verify_code = ''
|
||||
@ -165,11 +161,9 @@
|
||||
scanType: ["qrCode", "barCode"]
|
||||
}).then(res=>{
|
||||
this.verify_code = res.resultStr
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id
|
||||
});
|
||||
|
||||
// this.codeChange();
|
||||
}).catch(res => {
|
||||
this.$util.Tips({
|
||||
|
@ -24,8 +24,7 @@
|
||||
<view>积分</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="num">{{ info.level_info.discount ? parseFloat(info.level_info.discount)/10 : '0'}}
|
||||
</view>
|
||||
<view class="num">{{ info.level_info.discount ? parseFloat(info.level_info.discount)/10 : '0'}}</view>
|
||||
<view>折扣</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -33,11 +32,11 @@
|
||||
</view>
|
||||
<view class="qrCode">
|
||||
<view class="header acea-row row-between-wrapper">
|
||||
<view class="title" :class="{'on': codeIndex == index,'onLeft':codeIndex == 1}"
|
||||
v-for="(item, index) in codeList" :key="index" @click="tapCode(index)">{{item.name}}</view>
|
||||
<view class="title" :class="{'on': codeIndex == index,'onLeft':codeIndex == 1}"
|
||||
v-for="(item, index) in codeList" :key="index" @click="tapCode(index)">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="acea-row row-center-wrapper" style="margin-top: 35rpx;">
|
||||
<w-qrcode :options="config.qrc" @generate="hello"></w-qrcode>
|
||||
<w-qrcode :options="config.qrc" @generate="hello"></w-qrcode>
|
||||
</view>
|
||||
</view>
|
||||
<view class="store acea-row row-between-wrapper" v-if="storeList.length">
|
||||
@ -46,18 +45,16 @@
|
||||
附近门店
|
||||
</view>
|
||||
<view class="acea-row" @click="goMap">
|
||||
距 <view class="storeName line1">{{storeList[0].name}}</view> {{storeList[0].range}}km<text
|
||||
class="iconfont icon-gengduo3"></text></view>
|
||||
距 <view class="storeName line1">{{storeList[0].name}}</view> {{storeList[0].range}}km<text class="iconfont icon-gengduo3"></text></view>
|
||||
</view>
|
||||
<home v-if="navigation"></home>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import home from '@/components/home/index.vue'
|
||||
import { wgsToGcj } from "@/utils/wgs.js";
|
||||
|
||||
import {
|
||||
getlevelInfo,
|
||||
getlevelInfo,
|
||||
getRandCode
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
@ -69,25 +66,25 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
info:{},
|
||||
codeList: [{
|
||||
name: '付款码'
|
||||
name: '付款码'
|
||||
}, {
|
||||
name: '核销码'
|
||||
name: '核销码'
|
||||
}],
|
||||
codeIndex: 0,
|
||||
codeIndex:0,
|
||||
config: {
|
||||
qrc: {
|
||||
code: '',
|
||||
size: 380, // 二维码大小
|
||||
level: 3, //等级 0~4
|
||||
bgColor: '#FFFFFF', //二维码背景色 默认白色
|
||||
border: {
|
||||
color: ['#eee', '#eee'], //边框颜色支持渐变色
|
||||
lineWidth: 1, //边框宽度
|
||||
},
|
||||
color: ['#333', '#333'], //边框颜色支持渐变色
|
||||
}
|
||||
qrc: {
|
||||
code: '',
|
||||
size: 380, // 二维码大小
|
||||
level: 3, //等级 0~4
|
||||
bgColor: '#FFFFFF', //二维码背景色 默认白色
|
||||
border: {
|
||||
color: ['#eee', '#eee'], //边框颜色支持渐变色
|
||||
lineWidth: 1, //边框宽度
|
||||
},
|
||||
color: ['#333', '#333'], //边框颜色支持渐变色
|
||||
}
|
||||
},
|
||||
user_latitude: 0,
|
||||
user_longitude: 0,
|
||||
@ -114,7 +111,7 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goMap() {
|
||||
goMap(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/store/map/index'
|
||||
})
|
||||
@ -132,11 +129,9 @@
|
||||
})
|
||||
} else {
|
||||
// #endif
|
||||
if (uni.getStorageSync('RejectTarget')) return
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
res = wgsToGcj(res);
|
||||
try {
|
||||
this.user_latitude = res.latitude;
|
||||
this.user_longitude = res.longitude;
|
||||
@ -172,96 +167,90 @@
|
||||
});
|
||||
},
|
||||
getCode() {
|
||||
getRandCode().then(res => {
|
||||
let code = res.data.code;
|
||||
this.config.qrc.code = code;
|
||||
}).catch(err => {
|
||||
return this.$util.Tips(err);
|
||||
})
|
||||
getRandCode().then(res => {
|
||||
let code = res.data.code;
|
||||
this.config.qrc.code = code;
|
||||
}).catch(err => {
|
||||
return this.$util.Tips(err);
|
||||
})
|
||||
},
|
||||
levelInfo() {
|
||||
getlevelInfo().then(res => {
|
||||
levelInfo(){
|
||||
getlevelInfo().then(res=>{
|
||||
this.info = res.data;
|
||||
}).catch(err => {
|
||||
}).catch(err=>{
|
||||
return this.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
},
|
||||
tapCode(index) {
|
||||
this.codeIndex = index;
|
||||
if (index == 0) {
|
||||
this.getCode();
|
||||
} else {
|
||||
let code = this.info.user.bar_code;
|
||||
this.config.qrc.code = code;
|
||||
}
|
||||
this.codeIndex = index;
|
||||
if (index == 0) {
|
||||
this.getCode();
|
||||
} else {
|
||||
let code = this.info.user.bar_code;
|
||||
this.config.qrc.code = code;
|
||||
}
|
||||
},
|
||||
hello(res) {
|
||||
},
|
||||
hello(res) {},
|
||||
},
|
||||
onReachBottom() {}
|
||||
onReachBottom() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
page{
|
||||
background: linear-gradient(121deg, #F5EBE1 0%, #FFDFBE 100%);
|
||||
}
|
||||
|
||||
.vipGrade {
|
||||
.headerBg {
|
||||
.vipGrade{
|
||||
.headerBg{
|
||||
background: url('../static/big-bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
height: 476rpx;
|
||||
padding-top: 1rpx;
|
||||
|
||||
.header {
|
||||
.header{
|
||||
background: url('../static/grade-bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 690rpx;
|
||||
height: 286rpx;
|
||||
margin: 26rpx auto;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
|
||||
.top {
|
||||
.pictrue {
|
||||
.top{
|
||||
.pictrue{
|
||||
width: 92rpx;
|
||||
height: 92rpx;
|
||||
border: 1px solid #FFFFFF;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
image {
|
||||
image{
|
||||
border-radius: 50%;
|
||||
width: 100%;
|
||||
width:100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
.text{
|
||||
width: 400rpx;
|
||||
|
||||
.name {
|
||||
.nameCon {
|
||||
.name{
|
||||
.nameCon{
|
||||
color: #EDCAAC;
|
||||
font-size: 28rpx;
|
||||
max-width: 332rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.num {
|
||||
.num{
|
||||
border-radius: 4px;
|
||||
border: 1px solid #EDCAAC;
|
||||
background: rgba(215, 177, 144, 0.2);
|
||||
background: rgba(215,177,144,0.2);
|
||||
font-size: 20rpx;
|
||||
font-weight: 400;
|
||||
color: #EDCAAC;
|
||||
padding: 0 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.idNum {
|
||||
.idNum{
|
||||
font-weight: 400;
|
||||
color: #EDCAAC;
|
||||
font-size: 24rpx;
|
||||
@ -270,32 +259,27 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
.list{
|
||||
margin-top: 46rpx;
|
||||
|
||||
.item {
|
||||
.item{
|
||||
color: #EDCAAC;
|
||||
font-size: 22rpx;
|
||||
text-align: center;
|
||||
|
||||
.num {
|
||||
.num{
|
||||
font-size: 40rpx;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.qrCode {
|
||||
.qrCode{
|
||||
width: 690rpx;
|
||||
height: 700rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
margin: -134rpx auto 0 auto;
|
||||
padding-top: 60rpx;
|
||||
|
||||
.header {
|
||||
.header{
|
||||
width: 330rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
@ -303,30 +287,28 @@
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
.title {
|
||||
width: 146rpx;
|
||||
height: 100%;
|
||||
line-height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
padding-right: 20rpx;
|
||||
|
||||
&.onLeft {
|
||||
padding-left: 34rpx;
|
||||
}
|
||||
|
||||
&.on {
|
||||
width: 170rpx;
|
||||
background-color: #333 !important;
|
||||
color: #fff;
|
||||
padding: 0 !important;
|
||||
}
|
||||
width: 146rpx;
|
||||
height: 100%;
|
||||
line-height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
padding-right: 20rpx;
|
||||
|
||||
&.onLeft {
|
||||
padding-left: 34rpx;
|
||||
}
|
||||
|
||||
&.on {
|
||||
width: 170rpx;
|
||||
background-color: #333 !important;
|
||||
color: #fff;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.store {
|
||||
.store{
|
||||
width: 690rpx;
|
||||
height: 100rpx;
|
||||
background: linear-gradient(90deg, #FFAE49 0%, #FCC887 100%);
|
||||
@ -336,20 +318,17 @@
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
|
||||
.iconfont {
|
||||
.iconfont{
|
||||
margin-right: 20rpx;
|
||||
font-size: 38rpx;
|
||||
}
|
||||
|
||||
.icon-gengduo3 {
|
||||
.icon-gengduo3{
|
||||
font-size: 24rpx;
|
||||
margin-left: 5rpx;
|
||||
margin-right: 0;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.storeName {
|
||||
.storeName{
|
||||
display: inline-block;
|
||||
max-width: 284rpx;
|
||||
vertical-align: middle;
|
||||
|
@ -53,8 +53,7 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.product.cart_info.product.store_name}}
|
||||
</div>
|
||||
{{val.product.cart_info.product.store_name}}</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.refundOrder.refund_price }}
|
||||
</div>
|
||||
@ -90,8 +89,7 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.cart_info.product.store_name}}
|
||||
</div>
|
||||
{{val.cart_info.product.store_name}}</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.orderInfo.pay_price }}
|
||||
</div>
|
||||
@ -116,8 +114,7 @@
|
||||
¥{{ item.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.product.store_name}}
|
||||
</div>
|
||||
{{item.product.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -138,8 +135,7 @@
|
||||
¥{{ item.presell.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.presell.store_name}}
|
||||
</div>
|
||||
{{item.presell.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -147,7 +143,7 @@
|
||||
<!--拼团商品链接-->
|
||||
<div class="conter acea-row row-middle"
|
||||
v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
|
||||
<div class="noPad">
|
||||
<div class=" noPad">
|
||||
<navigator class="acea-row row-column-around noPad"
|
||||
v-if="item.productGroup.product_group_id"
|
||||
:url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`"
|
||||
@ -160,8 +156,7 @@
|
||||
¥{{ item.productGroup.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.productGroup.product.store_name}}
|
||||
</div>
|
||||
{{item.productGroup.product.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -212,8 +207,7 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.product.cart_info.product.store_name}}
|
||||
</div>
|
||||
{{val.product.cart_info.product.store_name}}</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.refundOrder.refund_price }}
|
||||
</div>
|
||||
@ -222,7 +216,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</navigator>
|
||||
|
||||
<!--订单链接-->
|
||||
<div v-if="item.msn_type === 5 && item.orderInfo.order_id">
|
||||
<div class="broadcast-details_num acea-row row-middle">
|
||||
@ -250,8 +243,7 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.cart_info.product.store_name}}
|
||||
</div>
|
||||
{{val.cart_info.product.store_name}}</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.orderInfo.pay_price }}
|
||||
</div>
|
||||
@ -275,8 +267,7 @@
|
||||
¥{{ item.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.product.store_name}}
|
||||
</div>
|
||||
{{item.product.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -297,8 +288,7 @@
|
||||
¥{{ item.presell.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.presell.store_name}}
|
||||
</div>
|
||||
{{item.presell.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -319,8 +309,7 @@
|
||||
¥{{ item.productGroup.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.productGroup.product.store_name}}
|
||||
</div>
|
||||
{{item.productGroup.product.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -369,7 +358,6 @@
|
||||
<block v-for="(items,index) in history" v-if="userId == 0" :key="items.time">
|
||||
<div class="create_time">{{items.time}}</div>
|
||||
<block v-for="(item,j) in items.children" :key="item.service_log_id">
|
||||
|
||||
<!-- 左边 -->
|
||||
<div class="item acea-row row-top" v-if="item.send_type == 1">
|
||||
<div v-if="item.msn_type !== 100" class="pictrue">
|
||||
@ -400,8 +388,7 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.product.cart_info.product.store_name}}
|
||||
</div>
|
||||
{{val.product.cart_info.product.store_name}}</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ val.product.cart_info.productAttr.price }}
|
||||
</div>
|
||||
@ -438,8 +425,7 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.cart_info.product.store_name}}
|
||||
</div>
|
||||
{{val.cart_info.product.store_name}}</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.orderInfo.pay_price }}
|
||||
</div>
|
||||
@ -464,8 +450,7 @@
|
||||
¥{{ item.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.product.store_name}}
|
||||
</div>
|
||||
{{item.product.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -486,8 +471,7 @@
|
||||
¥{{ item.presell.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.presell.store_name}}
|
||||
</div>
|
||||
{{item.presell.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -508,8 +492,7 @@
|
||||
¥{{ item.productGroup.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.productGroup.product.store_name}}
|
||||
</div>
|
||||
{{item.productGroup.product.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -551,8 +534,7 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.product.cart_info.product.store_name}}
|
||||
</div>
|
||||
{{val.product.cart_info.product.store_name}}</div>
|
||||
<div class="broadcast_details_pic">
|
||||
共{{item.refundOrder.refund_num}}件商品,
|
||||
合计 ¥{{ item.refundOrder.refund_price }}
|
||||
@ -589,8 +571,7 @@
|
||||
</div>
|
||||
<div class="broadcast_details_picBox noPad">
|
||||
<div class="broadcast_details_tit">
|
||||
{{val.cart_info.product.store_name}}
|
||||
</div>
|
||||
{{val.cart_info.product.store_name}}</div>
|
||||
<div class="broadcast_details_pic">
|
||||
¥{{ item.orderInfo.pay_price }}
|
||||
</div>
|
||||
@ -615,8 +596,7 @@
|
||||
¥{{ item.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.product.store_name}}
|
||||
</div>
|
||||
{{item.product.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -637,8 +617,7 @@
|
||||
¥{{ item.presell.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.presell.store_name}}
|
||||
</div>
|
||||
{{item.presell.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -659,8 +638,7 @@
|
||||
¥{{ item.productGroup.product.price }}
|
||||
</div>
|
||||
<div class="broadcast_details_tit_no line1">
|
||||
{{item.productGroup.product.store_name}}
|
||||
</div>
|
||||
{{item.productGroup.product.store_name}}</div>
|
||||
</div>
|
||||
</navigator>
|
||||
</div>
|
||||
@ -780,7 +758,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div :style=" active === true ? 'height:' + footerConH + 'rem;' : 'height:' + footerH + 'rem;'"></div>
|
||||
<div :style=" active === true ? 'height: 0;' : 'height: 2rem;'"></div>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
@ -794,14 +771,14 @@
|
||||
{{ speak }}
|
||||
</div>
|
||||
<view class="input_count">
|
||||
<input type="text" placeholder-class='placeholder' :disabled="active" placeholder="输入内容" class="input" ref="input"
|
||||
<input type="text" placeholder-class='placeholder' placeholder="输入内容" class="input" ref="input"
|
||||
v-show="!voice" @input="bindInput" @keyup="keyup" @focus="focus" cursor-spacing="20"
|
||||
v-model="textCon" @click="handleClick">
|
||||
v-model="textCon">
|
||||
<div class="send iconfont icon-fasong" :style="'color:'+iconColor" @click="sendTest"></div>
|
||||
</view>
|
||||
</div>
|
||||
</form>
|
||||
<div class="banner slider-banner" >
|
||||
<div class="banner slider-banner">
|
||||
<swiper class="swiper-wrapper" :autoplay="autoplay" :circular="circular" :interval="interval"
|
||||
:duration="duration" v-if="emojiGroup.length > 0">
|
||||
<block v-for="(emojiList, index) in emojiGroup" :key="index">
|
||||
@ -811,9 +788,7 @@
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="recording" v-if="recording">
|
||||
<image src="/static/images/recording.png" />
|
||||
@ -1236,7 +1211,8 @@
|
||||
let self = this
|
||||
self.$util.uploadImageOne('upload/image', function(res) {
|
||||
if (res.status == 200) {
|
||||
self.sendMsg(res.data.path, 3)
|
||||
self.sendMsg(res.data.path, 3
|
||||
)
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -1402,14 +1378,9 @@
|
||||
});
|
||||
});
|
||||
},
|
||||
focus: async function() {
|
||||
this.active = false;
|
||||
focus: function() {
|
||||
this.active = false;
|
||||
},
|
||||
handleClick(){
|
||||
if(this.active){
|
||||
this.active = false;
|
||||
}
|
||||
},
|
||||
keyup: function() {
|
||||
if (this.$refs.input.value.length > 0) {
|
||||
this.sendColor = true;
|
||||
@ -1565,7 +1536,7 @@
|
||||
self.scrollTop = parseInt(scrollTop) + 100
|
||||
}
|
||||
}).exec()
|
||||
}, 200)
|
||||
}, 1000)
|
||||
},
|
||||
// 滚动到头部
|
||||
bindScroll() {
|
||||
@ -1631,8 +1602,7 @@
|
||||
margin-top: 20rpx;
|
||||
width: 710rpx;
|
||||
position: fixed;
|
||||
bottom: 180rpx;
|
||||
bottom: calc(160rpx + env(safe-area-inset-bottom)); /* 适应底部安全距离 */
|
||||
bottom: 120rpx;
|
||||
left: 20rpx;
|
||||
|
||||
.broadcast-details_box,
|
||||
@ -1819,7 +1789,6 @@
|
||||
|
||||
.broadcast-details .chat .item .text {
|
||||
margin-left: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.broadcast-details .chat .item .text.textR {
|
||||
@ -1973,22 +1942,18 @@
|
||||
transition: all 0.005s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
// bottom:var(--status-bar-height);
|
||||
bottom: 20rpx;
|
||||
bottom: calc(20rpx + env(safe-area-inset-bottom) );
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.broadcast-details .footerCon.on {
|
||||
position: relative;
|
||||
top: -360rpx;
|
||||
|
||||
top: -300rpx;
|
||||
transform: translate3d(0, 0, 0) !important;
|
||||
}
|
||||
|
||||
.broadcast-details .footerCon .banner {
|
||||
background: #fff;
|
||||
padding-top: var(--status-bar-height);
|
||||
}
|
||||
|
||||
.broadcast-details .footerCon .banner .swiper-slide {
|
||||
@ -2004,7 +1969,7 @@
|
||||
display: block;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin: 20rpx 0 0 40rpx;
|
||||
margin: 40rpx 0 0 50rpx;
|
||||
}
|
||||
|
||||
.broadcast-details .footerCon .banner .swiper-container-horizontal>.swiper-pagination-bullets {
|
||||
@ -2013,10 +1978,6 @@
|
||||
|
||||
.broadcast-details .footerCon .slider-banner .swiper-pagination-bullet-active {
|
||||
background-color: #999;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.broadcast-details .recording {
|
||||
@ -2073,8 +2034,6 @@
|
||||
padding: 0 80rpx 0 30rpx;
|
||||
height: 76rpx;
|
||||
position: relative;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.broadcast-details .footer .placeholder {
|
||||
@ -2103,9 +2062,7 @@
|
||||
display: inline-block;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
|
||||
|
||||
margin: 20rpx 0 0 40rpx;
|
||||
margin: 40rpx 0 0 50rpx;
|
||||
}
|
||||
|
||||
.emoji-outer {
|
||||
|
@ -62,9 +62,6 @@
|
||||
serviceList,
|
||||
serviceUserList
|
||||
} from "@/api/user";
|
||||
import {
|
||||
getUserInfo
|
||||
} from '@/api/user.js';
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
name: "CustomerList",
|
||||
@ -91,9 +88,13 @@
|
||||
computed: mapGetters(['isLogin','viewColor']),
|
||||
onLoad(optios) {
|
||||
this.type = optios.type;
|
||||
|
||||
|
||||
this.getindex()
|
||||
this.mer_id = optios.mer_id;
|
||||
if(this.isLogin){
|
||||
this.getList(this.mer_id)
|
||||
} else {
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}
|
||||
},
|
||||
onShow(option) {
|
||||
if(this.isLogin){
|
||||
@ -118,21 +119,6 @@
|
||||
this.clear = true;
|
||||
},
|
||||
methods: {
|
||||
//获取商户信息
|
||||
getindex(){
|
||||
getUserInfo().then(res => {
|
||||
|
||||
this.mer_id = res.data.service.mer_id;
|
||||
if(this.isLogin){
|
||||
this.getList(this.mer_id)
|
||||
} else {
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}
|
||||
// this.getList(this.mer_id)
|
||||
// this.getList(res.data.service.mer_id, true);
|
||||
});
|
||||
},
|
||||
onLoadFun() {
|
||||
this.isShowAuth = false;
|
||||
this.getList(this.mer_id);
|
||||
@ -231,7 +217,7 @@
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss">
|
||||
.CustomerList {
|
||||
.spin {
|
||||
display: block;
|
||||
|
@ -97,12 +97,10 @@
|
||||
hotSearchBox: false,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
back: false
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.searchValue = options.searchVal || '';
|
||||
if(options.back)this.back = true;
|
||||
this.searchValue = options.searchVal || ''
|
||||
},
|
||||
onShow: function() {
|
||||
try {
|
||||
@ -169,7 +167,6 @@
|
||||
this.$set(this, 'searchValue', event.detail.value);
|
||||
},
|
||||
searchBut: function() {
|
||||
if(this.back) return this.navigatorBack();
|
||||
if(/^(\/@[1-9]{1}).*\*\//.test(this.searchValue)){
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
@ -212,6 +209,7 @@
|
||||
this.searchValue = ""
|
||||
});
|
||||
}else{
|
||||
|
||||
let status = false
|
||||
this.tempStorage.forEach((el, index) => {
|
||||
if (el == this.searchValue) {
|
||||
@ -228,17 +226,10 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages/columnGoods/goods_search_con/index?searchValue=' + this.searchValue
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
navigatorBack(){
|
||||
if(this.searchValue!==undefined&&this.searchValue!==null){
|
||||
uni.navigateBack({
|
||||
success:()=> {
|
||||
uni.$emit('searchValue', this.searchValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -5,15 +5,14 @@
|
||||
<view class="back" @click='set_where(1)'>
|
||||
<view class="iconfont icon-xiangzuo"></view>
|
||||
</view>
|
||||
<view class='input acea-row row-between-wrapper'>
|
||||
<text class='iconfont icon-sousuo'></text>
|
||||
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
|
||||
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
|
||||
:value='where.keyword' @confirm="searchSubmit" @input="inputChange">
|
||||
:value='where.keyword' @confirm="searchSubmit" @input="inputChange"></input>
|
||||
</view>
|
||||
<view style="text-align: right;" v-if="tabIndex==1" class='iconfont'
|
||||
:class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
|
||||
<!-- <view v-else-if="mer_location == 1" style="text-align: right;" class='iconfont icon-dingwei'
|
||||
@click="showMaoLocation(latitude,longitude)"></view> -->
|
||||
<view v-else-if="mer_location == 1" style="text-align: right;" class='iconfont icon-dingwei'
|
||||
@click="showMaoLocation(latitude,longitude)"></view>
|
||||
</view>
|
||||
<view class="nav-wrapper">
|
||||
<view v-if="hide_mer_status == 0" class="tab-bar">
|
||||
@ -21,7 +20,7 @@
|
||||
<view class="tab-item" :class="{on:tabIndex==2}" @click="tabIndex = 2">店铺</view>
|
||||
</view>
|
||||
<block v-if="tabIndex==1">
|
||||
<view class='nav acea-row row-middle'>
|
||||
<view class='nav acea-row row-middle' >
|
||||
<view class='item' @click="downStatus = !downStatus"
|
||||
:class="{'t-color':downKey>0 && firstKey == 0}">
|
||||
{{downMenu[downKey].title}}
|
||||
@ -98,7 +97,7 @@
|
||||
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
|
||||
<!-- <view class="ticket-big" v-if="!is_switch && item.issetCoupon">领券满{{item.issetCoupon.use_min_price}}减{{item.issetCoupon.coupon_price}}</view> -->
|
||||
</view>
|
||||
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论 <text v-if="item.merchant">{{item.merchant.street_name}}</text></view>
|
||||
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论</view>
|
||||
<view class="company" v-if="item.merchant && hide_mer_status==0">
|
||||
<text class='name line1'>{{item.merchant.mer_name}}</text>
|
||||
|
||||
@ -145,7 +144,7 @@
|
||||
</view>
|
||||
<view class="zhezhao">
|
||||
</view>
|
||||
<view class="zhezhao1" @click="goStore(item.mer_id)">
|
||||
<view class="zhezhao1" @click="goStore(item.mer_id)">
|
||||
<view class="title">
|
||||
<view>{{item.mer_name}}
|
||||
</view>
|
||||
@ -157,28 +156,24 @@
|
||||
<view class="avater">
|
||||
<image :src="item.mer_avatar" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="text_one text_flex">
|
||||
<view class="text_flex">
|
||||
<view class=" text">
|
||||
<view class="text_one">
|
||||
<view class="">
|
||||
<image src="@/static/images/phone.png" mode=""></image>
|
||||
{{item.service_phone}}
|
||||
</view>
|
||||
<view class="text_one_r text_flex">
|
||||
<view class="text_one_r">
|
||||
<image src="@/static/images/clock.png" mode=""></image>
|
||||
{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="text_two text_flex">
|
||||
<view class="text_two">
|
||||
<image src="@/static/images/shangpu.png" mode=""></image>
|
||||
<view class="text_tip">
|
||||
{{item.mer_info}}
|
||||
</view>
|
||||
{{item.mer_info}}
|
||||
</view>
|
||||
<view class="text_three text_flex">
|
||||
<view class="text_three">
|
||||
<image src="@/static/images/dingwei.png" mode=""></image>
|
||||
<view class="text_tip">
|
||||
{{item.mer_address}}
|
||||
</view>
|
||||
{{item.mer_address}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -239,7 +234,6 @@
|
||||
storeMerchantList,
|
||||
getGeocoder
|
||||
} from '@/api/store.js';
|
||||
import { wgsToGcj } from "@/utils/wgs.js";
|
||||
import {
|
||||
initiateAssistApi
|
||||
} from '@/api/activity.js';
|
||||
@ -475,11 +469,9 @@
|
||||
//获取定位
|
||||
selfLocation() {
|
||||
let self = this
|
||||
if (uni.getStorageSync('RejectTarget')) return
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
type: 'gcj02',
|
||||
success: (res) => {
|
||||
res = wgsToGcj(res);
|
||||
// console.log(res)
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
@ -567,10 +559,9 @@
|
||||
limit: this.sotreParam.limit,
|
||||
order: this.sotreParam.order,
|
||||
category_id: this.sotreParam.category_id,
|
||||
type_id: this.sotreParam.type_id
|
||||
type_id: 10
|
||||
|
||||
}
|
||||
console.log(this.sotreParam.category_id)
|
||||
if (this.latitude) {
|
||||
serachData.location = this.latitude + ',' + this.longitude
|
||||
}
|
||||
@ -585,7 +576,7 @@
|
||||
this.storeList = this.storeList.concat(res.data.list)
|
||||
this.count = res.data.count
|
||||
this.loading = false
|
||||
|
||||
console.log(this.storeList);
|
||||
})
|
||||
},
|
||||
// 店铺排序
|
||||
@ -691,7 +682,6 @@
|
||||
},
|
||||
// 组件确定
|
||||
confirm2(data) {
|
||||
|
||||
let arr1 = [],
|
||||
arr2 = []
|
||||
if (data.storeTypeArr.length == 0) {
|
||||
@ -783,11 +773,11 @@
|
||||
that.hotScroll = res.data.list.length < that.hotLimit
|
||||
that.hostProduct = that.hostProduct.concat(res.data.list)
|
||||
if (that.hostProduct.length == res.data.count) {
|
||||
|
||||
|
||||
uni.showToast({
|
||||
title: '推荐商品,加载完毕',
|
||||
duration: 2000, // 显示时长,单位为毫秒
|
||||
icon: 'none'
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
@ -829,10 +819,8 @@
|
||||
//查找产品
|
||||
get_product_list: function(isPage) {
|
||||
let that = this;
|
||||
|
||||
if (that.loadend) return;
|
||||
if (that.loading) return;
|
||||
|
||||
if (isPage === true) that.$set(that, 'productList', []);
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
@ -907,14 +895,14 @@
|
||||
|
||||
.productList .search {
|
||||
width: 100%;
|
||||
height: 170rpx;
|
||||
padding: 0 20rpx;
|
||||
// box-sizing: border-box;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0rpx;
|
||||
height: 170rpx;
|
||||
padding: 0 20rpx;
|
||||
// box-sizing: border-box;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0rpx;
|
||||
padding-top: 60rpx;
|
||||
z-index: 9;
|
||||
z-index: 9;
|
||||
background-color: var(--view-theme);
|
||||
|
||||
.icon-dingwei {
|
||||
@ -970,7 +958,7 @@
|
||||
width: 62rpx;
|
||||
font-size: 40rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
line-height: 86rpx ;
|
||||
}
|
||||
|
||||
.productList .nav-wrapper {
|
||||
@ -1051,7 +1039,7 @@
|
||||
|
||||
.productList .list {
|
||||
padding: 0 20rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.productList .list.on {
|
||||
@ -1087,7 +1075,7 @@
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 345rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.productList .list .item .pictrue.on {
|
||||
@ -1210,12 +1198,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.text_flex{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.productList .list .item .text .money {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -1437,7 +1419,7 @@
|
||||
|
||||
.store-wrapper {
|
||||
margin-top: 310rpx;
|
||||
|
||||
|
||||
border-top: 1px solid #F6F6F6;
|
||||
|
||||
.star-box {
|
||||
@ -1533,12 +1515,11 @@
|
||||
margin-left: 20px;
|
||||
|
||||
.avater {
|
||||
width: 80px;
|
||||
width: 60px;
|
||||
height: 80px;
|
||||
flex-shrink: 0;
|
||||
|
||||
image {
|
||||
width: 80px;
|
||||
width: 60px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
@ -1554,13 +1535,10 @@
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.text_one_r {
|
||||
flex: 1;
|
||||
margin-left: 10px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1569,17 +1547,14 @@
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
.text_tip{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
image {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1588,11 +1563,9 @@
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
.text_tip{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
image {
|
||||
width: 20px;
|
||||
|
@ -1,26 +1,28 @@
|
||||
<template>
|
||||
|
||||
<view class="content">
|
||||
|
||||
<!-- #ifdef APP || H5 -->
|
||||
<view>
|
||||
<!-- #endif -->
|
||||
<form @submit="formSubmit" report-submit='true'>
|
||||
<view class="release_content">
|
||||
|
||||
|
||||
<view class="release_item">
|
||||
<view class="release_item-one">
|
||||
<view class="item-one">
|
||||
被委托商家
|
||||
</view>
|
||||
<e-select v-model="formData.entrust_mer_id" :value='formData.entrust_mer_id' :options="options1" @change="change1"
|
||||
placeholder="选择选项"></e-select>
|
||||
<e-select v-model="value1" :options="options1" placeholder="选择选项"></e-select>
|
||||
</view>
|
||||
<view class="release_item-one">
|
||||
<view class="item-one">
|
||||
委托周期
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" @click="calendar">
|
||||
|
||||
<input type="number" v-model="formData.entrust_day" />
|
||||
<input type="number" v-model="date" />
|
||||
</view>
|
||||
|
||||
<!-- <e-select v-model="value1" :options="options1" placeholder="选择选项"></e-select> -->
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='name'><text class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})
|
||||
@ -30,16 +32,16 @@
|
||||
<text v-if="productList.length == 0" class="text">选择产品</text>
|
||||
<view v-else class="text">
|
||||
<image class="image" v-for="(item,index) in productList" :key="index"
|
||||
:src="item.image"></image>
|
||||
:src="item.image || (item.spu && item.spu.image)"></image>
|
||||
</view>
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_center-one" v-for="(item,i) in productList" :key="i">
|
||||
<view class="content_center-one" v-for="(item,i) in productList" :key="i">
|
||||
<view class="center-one">
|
||||
<view class="center-one-img">
|
||||
<image :src="item.image" mode="aspectFit"></image>
|
||||
<image :src="item.image" mode=""></image>
|
||||
</view>
|
||||
<view class="center-one-txt">
|
||||
<view class="one-txta">
|
||||
@ -58,27 +60,29 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<button class="release_btn button" form-type="submit">提交</button>
|
||||
<button class="release_btn button" form-type="submit">发布</button>
|
||||
</view>
|
||||
</form>
|
||||
|
||||
<uni-calendar ref="calendar" :date="info.date" :insert="info.insert" :lunar="info.lunar"
|
||||
:startDate="info.startDate" :endDate="info.endDate" :range="info.range" @confirm="confirm"
|
||||
:showMonth="info.showMonth" @close="close" />
|
||||
|
||||
|
||||
<!-- 提到的宝贝弹窗 -->
|
||||
<uni-popup ref="associated" type="bottom">
|
||||
<associated @close="close" @getProduct="getProduct" :checkedObj="productList"></associated>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import associated from '@/components/realselist/realselist.vue';
|
||||
import eselect from '@/components/e-select/e-select.vue';
|
||||
import {
|
||||
supplychain,
|
||||
entrustchain,
|
||||
editentrust,
|
||||
entrustdetail
|
||||
} from '@/api/sale.js'
|
||||
// import {} from '@/api/sale.js'
|
||||
export default {
|
||||
components: {
|
||||
associated,
|
||||
@ -88,8 +92,20 @@
|
||||
return {
|
||||
value1: 1,
|
||||
value2: "",
|
||||
options1: [],
|
||||
options1: [{
|
||||
text: "Shenzhen1",
|
||||
value: 1
|
||||
}, {
|
||||
|
||||
text: "Shenzhen2",
|
||||
value: 2
|
||||
}, {
|
||||
|
||||
|
||||
text: "Shenzhen3",
|
||||
value: 3
|
||||
}],
|
||||
date: 1,
|
||||
productList: [],
|
||||
info: {
|
||||
startDate: '',
|
||||
@ -100,14 +116,6 @@
|
||||
selected: [],
|
||||
showMonth: false
|
||||
},
|
||||
formData: {
|
||||
entrust_mer_id: '',
|
||||
entrust_day: 15,
|
||||
is_type: "4",
|
||||
product_info: [],
|
||||
content: ''
|
||||
},
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -116,49 +124,27 @@
|
||||
},
|
||||
|
||||
|
||||
onLoad(e) {
|
||||
this.id = e.id;
|
||||
this.type = e.type
|
||||
if (this.type) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '编辑打折'
|
||||
})
|
||||
this.editlist(e.id)
|
||||
}
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.list()
|
||||
},
|
||||
|
||||
methods: {
|
||||
change1(item) {
|
||||
console.log(item);
|
||||
},
|
||||
list() {
|
||||
supplychain({
|
||||
page: 1
|
||||
}).then((res => {
|
||||
|
||||
for (let i in res.data.list) {
|
||||
this.options1.push({
|
||||
text: res.data.list[i].mer_name,
|
||||
value: res.data.list[i].mer_id
|
||||
})
|
||||
// 日历确定
|
||||
confirm(e) {
|
||||
|
||||
let self = this
|
||||
if (e.range.after && e.range.before) {
|
||||
let star = new Date(e.range.after).getTime()
|
||||
let stop = new Date(e.range.before).getTime()
|
||||
let arr = stop - star
|
||||
this.date = Math.floor(arr / (24 * 3600 * 1000));
|
||||
// console.log(days)
|
||||
if(this.date<0){
|
||||
this.date=this.date*-1
|
||||
}
|
||||
// console.log(res)
|
||||
}))
|
||||
}
|
||||
},
|
||||
editlist(id) {
|
||||
entrustdetail(id).then((res) => {
|
||||
this.formData.entrust_mer_id = res.data.entrust_mer_id
|
||||
this.formData.entrust_day = res.data.entrust_day
|
||||
this.productList = res.data.product_list
|
||||
this.getProduct(res.data.product_list)
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
calendar() {
|
||||
this.$refs.calendar.open()
|
||||
},
|
||||
@ -172,97 +158,11 @@
|
||||
},
|
||||
//获取商品信息
|
||||
getProduct(data) {
|
||||
this.formData.product_info=[]
|
||||
if (data.length > 0) {
|
||||
|
||||
for (let i in data) {
|
||||
this.formData.content += data[i].store_name + ','
|
||||
this.formData.product_info.push({
|
||||
product_attr_unique: data[i].product_attr_unique,
|
||||
number: Number(data[i].number),
|
||||
price: data[i].price
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$refs.associated.close()
|
||||
console.log(data)
|
||||
},
|
||||
//提交
|
||||
formSubmit(e) {
|
||||
console.log(e)
|
||||
let that = this,
|
||||
value = that.formData;
|
||||
|
||||
if (value.entrust_day.length == 0 || value.entrust_day <= 0) return that.$util.Tips({
|
||||
title: '请选择委托周期'
|
||||
});
|
||||
if (value.product_info.length == 0) return that.$util.Tips({
|
||||
title: '请选择产品'
|
||||
});
|
||||
if (!value.entrust_mer_id) return that.$util.Tips({
|
||||
title: '请添加商家'
|
||||
});
|
||||
this.type?
|
||||
editentrust(this.id,value).then(res => {
|
||||
if (res.status == '200') {
|
||||
uni.hideLoading()
|
||||
that.$util.Tips({
|
||||
title: '编辑成功',
|
||||
icon: 'success'
|
||||
});
|
||||
that.formData = {
|
||||
entrust_mer_id: '',
|
||||
entrust_day: 0,
|
||||
is_type: "4",
|
||||
product_info: []
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: '/pages/commissionedSales/initiateDelegation/index'
|
||||
})
|
||||
|
||||
} else {
|
||||
that.$util.Tips({
|
||||
title: res.messge,
|
||||
icon: 'success'
|
||||
});
|
||||
}
|
||||
}).catch(err => {
|
||||
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
|
||||
:
|
||||
entrustchain(value).then(res => {
|
||||
if (res.status == '200') {
|
||||
uni.hideLoading()
|
||||
that.$util.Tips({
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
});
|
||||
that.formData = {
|
||||
entrust_mer_id: '',
|
||||
entrust_day: 0,
|
||||
is_type: "4",
|
||||
product_info: []
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: '/pages/commissionedSales/initiateDelegation/index'
|
||||
})
|
||||
|
||||
} else {
|
||||
that.$util.Tips({
|
||||
title: res.messge,
|
||||
icon: 'success'
|
||||
});
|
||||
}
|
||||
}).catch(err => {
|
||||
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -273,10 +173,6 @@
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.release_content {
|
||||
|
||||
@ -521,10 +417,6 @@
|
||||
}
|
||||
|
||||
.release_btn {
|
||||
|
||||
position: absolute;
|
||||
bottom: 150rpx;
|
||||
left: 50%;
|
||||
margin-left: -347rpx;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
</style>
|
@ -6,46 +6,63 @@
|
||||
</view>
|
||||
<view class="content_top-two">
|
||||
<view class="top-two-one">
|
||||
|
||||
{{objinfo.mer_status==0?"待处理":""||objinfo.mer_status==2?"已拒绝":""||objinfo.mer_status==1?"已接受":""}}
|
||||
待评价
|
||||
</view>
|
||||
<view class="top-two-two">
|
||||
<!-- 2020-07-07 14:14:14
|
||||
-->
|
||||
{{objinfo.entrust_start_date}}
|
||||
2020-07-07 14:14:14
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_center">
|
||||
<view class="content_center-one" v-for="(item,index) in objinfo.product_list">
|
||||
<view class="content_center-one">
|
||||
<view class="center-one">
|
||||
<view class="center-one-img">
|
||||
<image :src="item.image[0]" mode="aspectFit"></image>
|
||||
<image src="../../annex/static/left.png" mode=""></image>
|
||||
</view>
|
||||
<view class="center-one-txt">
|
||||
<view class="one-txta">
|
||||
{{item.store_name}}
|
||||
良品铺子肉松饼1000g/箱 面...
|
||||
</view>
|
||||
<view class="one-txtb">
|
||||
<view class="">
|
||||
委托价:¥<span>{{item.price}}</span>
|
||||
委托价:¥<span>34.90</span>
|
||||
</view>
|
||||
<view class="">
|
||||
数量:{{item.number}}个
|
||||
数量:100个
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="content_center-one">
|
||||
<view class="center-one">
|
||||
<view class="center-one-img">
|
||||
<image src="../../annex/static/left.png" mode=""></image>
|
||||
</view>
|
||||
<view class="center-one-txt">
|
||||
<view class="one-txta">
|
||||
良品铺子肉松饼1000g/箱 面...
|
||||
</view>
|
||||
<view class="one-txtb">
|
||||
<view class="">
|
||||
委托价:¥<span>34.90</span>
|
||||
</view>
|
||||
<view class="">
|
||||
数量:100个
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content_center-two" v-if="objinfo">
|
||||
</view>
|
||||
<view class="content_center-two">
|
||||
<view class="center-two">
|
||||
<view class="center-twoa">
|
||||
委托方:
|
||||
</view>
|
||||
<view class="center-twob">
|
||||
{{objinfo.mer_info.mer_name}}
|
||||
通滩镇镇街店铺
|
||||
</view>
|
||||
</view>
|
||||
<view class="center-two">
|
||||
@ -53,7 +70,7 @@
|
||||
被委托方:
|
||||
</view>
|
||||
<view class="center-twob">
|
||||
{{objinfo.entrust_mer_info.mer_name}}
|
||||
通滩镇镇街店铺
|
||||
</view>
|
||||
</view>
|
||||
<view class="center-two">
|
||||
@ -61,7 +78,7 @@
|
||||
委托周期:
|
||||
</view>
|
||||
<view class="center-twob">
|
||||
{{objinfo.entrust_day}}
|
||||
通滩镇镇街店铺
|
||||
</view>
|
||||
</view>
|
||||
<view class="center-two">
|
||||
@ -69,7 +86,7 @@
|
||||
结算周期:
|
||||
</view>
|
||||
<view class="center-twob">
|
||||
{{objinfo.mer_info.settle_cycle}}
|
||||
通滩镇镇街店铺
|
||||
</view>
|
||||
</view>
|
||||
<view class="center-two">
|
||||
@ -77,7 +94,7 @@
|
||||
结算利息:
|
||||
</view>
|
||||
<view class="center-twob">
|
||||
{{objinfo.mer_info.interest_rate}}%
|
||||
通滩镇镇街店铺
|
||||
</view>
|
||||
</view>
|
||||
<view class="center-two">
|
||||
@ -85,8 +102,7 @@
|
||||
状态:
|
||||
</view>
|
||||
<view class="center-twob">
|
||||
|
||||
{{objinfo.mer_status==0?"待处理":""||objinfo.mer_status==2?"已拒绝":""||objinfo.mer_status==1?"已接受":""}}
|
||||
通滩镇镇街店铺
|
||||
</view>
|
||||
</view>
|
||||
<view class="center-two">
|
||||
@ -94,115 +110,51 @@
|
||||
是否结束委托:
|
||||
</view>
|
||||
<view class="center-twob">
|
||||
{{objinfo.entrust_finish==0?'未结束':""||objinfo.entrust_finish==1?'已结束':""||objinfo.entrust_finish==2?'商家拒绝':""||objinfo.entrust_finish==3?'申请':""}}
|
||||
通滩镇镇街店铺
|
||||
</view>
|
||||
</view>
|
||||
<view class="center-two" v-if="objinfo.entrust_finish_refusal">
|
||||
<view class="center-two">
|
||||
<view class="center-twoa">
|
||||
拒绝原因:
|
||||
</view>
|
||||
<view class="center-twob" :style="{'text-align':objinfo.entrust_finish_refusal.length<15?'right':'left'}">
|
||||
{{objinfo.entrust_finish_refusal}}
|
||||
<view class="center-twob">
|
||||
通滩镇镇街店铺通滩镇镇街店铺通滩镇镇街店铺通滩镇镇街店铺通滩镇镇街店铺通滩镇镇街店铺
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="content_bootm">
|
||||
<view class="content_bootm_txt" v-if="objinfo.product_list.length>0">
|
||||
查看TA提到的宝贝({{objinfo.product_list.length}})
|
||||
<view class="content_bootm_txt">
|
||||
查看TA提到的宝贝(2)
|
||||
</view>
|
||||
|
||||
|
||||
<view class="content_bootm_one" v-for="(item,i) in objinfo.product_list" @click="Merchbaby(item)">
|
||||
<view class="content_bootm_one">
|
||||
<view class="bootm_oneimg">
|
||||
<image :src="item.image[0]" mode="aspectFit"></image>
|
||||
<image src="@/static/images/bg2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="">
|
||||
{{item.store_name}}
|
||||
良品铺子肉松饼1000g/箱 面包糕...
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_bootm_one">
|
||||
<view class="bootm_oneimg">
|
||||
<image src="@/static/images/bg2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="">
|
||||
良品铺子肉松饼1000g/箱 面包糕...
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <button class="release_btn button" v-if="objinfo.mer_status==1&&type==1" @click="submit(objinfo)">发布</button> -->
|
||||
<button class="release_btn button" form-type="submit">发布</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addEntrustCart,
|
||||
entrustdetail
|
||||
} from '@/api/sale.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
objinfo: {},
|
||||
goodsData: [{
|
||||
name: '我发起的',
|
||||
name1: '委托销售商品',
|
||||
type: 1,
|
||||
src: require('@/static/images/wtbg1.png'),
|
||||
img: require('@/static/images/wtt1.png')
|
||||
},
|
||||
{
|
||||
name: '我收到的',
|
||||
name1: '帮助销售商品',
|
||||
type: 2,
|
||||
src: require('@/static/images/wtbg2.png'),
|
||||
img: require('@/static/images/wtt2.png')
|
||||
}
|
||||
],
|
||||
type: 0,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.list(e.id)
|
||||
this.type = e.type
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
//商品详情
|
||||
list(id) {
|
||||
entrustdetail(id).then((res) => {
|
||||
|
||||
this.objinfo = res.data
|
||||
})
|
||||
},
|
||||
//商品宝贝详情
|
||||
Merchbaby(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${item.product_id}`
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
//提交购物车
|
||||
submit(item) {
|
||||
addEntrustCart({
|
||||
community_id: item.community_id
|
||||
}).then(res => {
|
||||
|
||||
if (res.status == 200) {
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + res.data.cart_id.toString()
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
import {} from '@/api/sale.js'
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
position: relative;
|
||||
@ -234,7 +186,6 @@
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
margin-top: 10rpx;
|
||||
|
||||
}
|
||||
|
||||
.top-two-two {
|
||||
@ -321,7 +272,7 @@
|
||||
.center-twob {
|
||||
width: 360rpx;
|
||||
text-align: right;
|
||||
|
||||
border: 1px solid;
|
||||
word-wrap: break-word;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
|
@ -6,7 +6,7 @@
|
||||
<cxNavTitle :tabs="tabs" :activeItem="activeItem" @tabClick="tabClick" :show='false'></cxNavTitle>
|
||||
</view>
|
||||
<!-- 审核通过 打折的拒绝、同意功能 ,调货不需要功能 -->
|
||||
<view class="content-content" v-for="(item,i) in orderList" :key="i">
|
||||
<view class="content-content" v-for="(item,i) in list" :key="i">
|
||||
|
||||
<view class="content-one">
|
||||
<view class="content-one-img">
|
||||
@ -14,82 +14,84 @@
|
||||
</view>
|
||||
<view class="content-one-txt">
|
||||
<view class="one-txt-a">
|
||||
{{item.title}}
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="one-txt-b">
|
||||
委托周期:{{item.entrust_day}}
|
||||
委托周期:{{item.day}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="content-two_one" v-if="item.mer_status==0">
|
||||
<view class="content-two-edita" @click="order">
|
||||
<view class="content-two_one" v-if="item.type==1">
|
||||
|
||||
<view class="content-two-edita" @click="soldEdit">
|
||||
待处理
|
||||
</view>
|
||||
|
||||
<view class="contentgn">
|
||||
<!-- <view class="contentgn_a" @click="soldEdit(item)">
|
||||
<view class="contentgn_a">
|
||||
处理
|
||||
</view>
|
||||
<span></span>-->
|
||||
<view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)">
|
||||
编辑
|
||||
</view>
|
||||
<span></span>
|
||||
<view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
|
||||
删除
|
||||
</view>
|
||||
<span></span>
|
||||
<view class="contentgn_b" @click="detail(item)">
|
||||
<view class="contentgn_b" @click="detail">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-two_oneq" v-if="item.mer_status==1">
|
||||
<view class="content-two_oneq" v-if="item.type==2">
|
||||
|
||||
|
||||
<view class="content-two-editb" @click="accepted">
|
||||
已接受
|
||||
</view>
|
||||
|
||||
<view class="contentgn">
|
||||
<view class="contentgn_a" @click="closingorder(item)" v-if="item.entrust_finish==3">
|
||||
<view class="contentgn_a" @click="closingorder">
|
||||
结束委托
|
||||
</view>
|
||||
<span v-if="item.entrust_finish==3"></span>
|
||||
<view class="contentgn_b" @click="detail(item)">
|
||||
<span></span>
|
||||
<view class="contentgn_b">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-two_one" v-if="item.mer_status==2">
|
||||
<view class="content-two_one" v-if="item.type==3">
|
||||
|
||||
|
||||
<view class="content-two-editc" @click="declined">
|
||||
已拒绝
|
||||
</view>
|
||||
<view class="contentgn">
|
||||
<!--<view class="contentgn_a" @click="deleteOrder(item)">
|
||||
<view class="contentgn_a">
|
||||
删除
|
||||
</view>
|
||||
<span></span> -->
|
||||
<view class="contentgn_b" @click="detail(item)">
|
||||
<span></span>
|
||||
<view class="contentgn_b">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-two_one" v-if="item.type==4">
|
||||
|
||||
|
||||
<view class="content-two-editd" @click="soldEdit">
|
||||
已完成
|
||||
</view>
|
||||
<view class="contentgn">
|
||||
<view class="contentgn_a" @click="deleteOrder(item)">
|
||||
<view class="contentgn_a">
|
||||
删除
|
||||
</view>
|
||||
<span></span>
|
||||
<view class="contentgn_b" @click="detail(item)">
|
||||
<view class="contentgn_b">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="adddelegation" @click="addDelegation">
|
||||
<view class="adddelegation" @click="addDelegation">
|
||||
|
||||
<view class="adddelegation-one">
|
||||
<image src="@/static/images/delegation.png" mode=""></image>
|
||||
</view>
|
||||
@ -97,11 +99,11 @@
|
||||
新增委托
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderList.length == 0">
|
||||
<view v-if="orderList.length == 0 && this.where.page > 1">
|
||||
<emptyPage title="暂无订单~"></emptyPage>
|
||||
</view>
|
||||
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
|
||||
<uni-popup ref="bindmobile" type="center" @click="close">
|
||||
|
||||
<view class="" style="position: relative;">
|
||||
<view class="entrust">
|
||||
<view class="entrust_close" @click="close">
|
||||
@ -113,16 +115,19 @@
|
||||
委托申请处理
|
||||
</view>
|
||||
<view class="bg-content-b">
|
||||
结算周期: <span>{{obj.settle_cycle}}天</span>
|
||||
结算周期: <span>30天</span>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="bg-content-c">
|
||||
利息比例: <span>{{obj.interest_rate}}%</span>
|
||||
利息比例: <span>0.05%</span>
|
||||
</view>
|
||||
|
||||
<view class="entrust_bga_btn">
|
||||
<view class="cancellation" @click="passDelete(obj)">
|
||||
<view class="cancellation">
|
||||
拒绝
|
||||
</view>
|
||||
<view class="determine" @click="passagree(obj)">
|
||||
<view class="determine">
|
||||
接受
|
||||
</view>
|
||||
</view>
|
||||
@ -132,6 +137,7 @@
|
||||
</view>
|
||||
</uni-popup>
|
||||
<uni-popup ref="bindmobile1" type="center" @click="close">
|
||||
|
||||
<view class="" style="position: relative;">
|
||||
<view class="entrust">
|
||||
<view class="entrust_close" @click="close">
|
||||
@ -151,11 +157,15 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</uni-popup>
|
||||
<uni-popup ref="bindmobile2" type="center" @click="close">
|
||||
|
||||
<view class="" style="position: relative;">
|
||||
<view class="entrust">
|
||||
<view class="entrust_close" @click="close">
|
||||
@ -166,17 +176,20 @@
|
||||
<view class="bg-content-a" style="margin-left: 207rpx;">
|
||||
结束委托申请处理
|
||||
</view>
|
||||
<view class="bg-content-b" v-if="obj.mer_info">
|
||||
结算周期: <span>{{obj.mer_info.settle_cycle}}天</span>
|
||||
<view class="bg-content-b">
|
||||
结算周期: <span>30天</span>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="bg-content-c" v-if="obj.mer_info">
|
||||
利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
|
||||
<view class="bg-content-c">
|
||||
利息比例: <span>0.05%</span>
|
||||
</view>
|
||||
|
||||
<view class="entrust_bga_btn">
|
||||
<view class="cancellation" @click="refused">
|
||||
<view class="cancellation">
|
||||
拒绝
|
||||
</view>
|
||||
<view class="determine" @click="agree(obj)">
|
||||
<view class="determine">
|
||||
接受
|
||||
</view>
|
||||
</view>
|
||||
@ -197,19 +210,24 @@
|
||||
<view class="bg-content-a" style="margin-left: 207rpx;">
|
||||
结束委托申请处理
|
||||
</view>
|
||||
<view class="bg-content-b" v-if="obj.mer_info">
|
||||
结算周期: <span>{{obj.mer_info.settle_cycle}}天</span>
|
||||
</view>
|
||||
<view class="bg-content-c" v-if="obj.mer_info">
|
||||
利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
|
||||
<view class="bg-content-b">
|
||||
结算周期: <span>30天</span>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="bg-content-c">
|
||||
利息比例: <span>0.05%</span>
|
||||
</view>
|
||||
<view class="bg-content-c">
|
||||
|
||||
拒绝原因:
|
||||
<view class="" style="margin-top: 21rpx;">
|
||||
<textarea v-model="refuseds" placeholder="输入拒绝原因" class="bg-content_textarea" />
|
||||
|
||||
<textarea value="" placeholder="输入拒绝原因" class="bg-content_textarea" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="entrust_bga_btn" @click="agree(obj)">
|
||||
<view class="entrust_bga_btn">
|
||||
<view class="determine">
|
||||
接受
|
||||
</view>
|
||||
@ -225,44 +243,35 @@
|
||||
<script>
|
||||
import cxNavTitle from '@/components/cx-navTitle.vue'
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import {
|
||||
entrustlist,
|
||||
finishchain,
|
||||
checkchain,
|
||||
finishentrust
|
||||
} from '@/api/sale.js'
|
||||
import {} from '@/api/sale.js'
|
||||
export default {
|
||||
components: {
|
||||
cxNavTitle,
|
||||
emptyPage,
|
||||
|
||||
emptyPage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeItem: "tabOne",
|
||||
status: 'loadmore',
|
||||
tabTitle: "",
|
||||
orderList: [],
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
type: 1,
|
||||
status: 0
|
||||
limit: 10
|
||||
},
|
||||
tabs: [{
|
||||
name: "tabOne",
|
||||
label: '待处理',
|
||||
type: 0
|
||||
type: '1'
|
||||
},
|
||||
{
|
||||
name: "tabTwo",
|
||||
label: '已接受',
|
||||
type: 1
|
||||
type: '2'
|
||||
},
|
||||
{
|
||||
name: "tabThree",
|
||||
label: '已拒绝',
|
||||
type: 2
|
||||
type: '3'
|
||||
},
|
||||
|
||||
],
|
||||
@ -290,9 +299,7 @@
|
||||
type: 4
|
||||
|
||||
}
|
||||
],
|
||||
obj: {},
|
||||
refuseds: ''
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@ -302,50 +309,24 @@
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.commislist()
|
||||
|
||||
},
|
||||
methods: {
|
||||
onReachBottom() {
|
||||
if (this.status == 'nomore') return;
|
||||
this.status = 'loading';
|
||||
this.where.page = ++this.where.page;
|
||||
this.commislist()
|
||||
},
|
||||
nav(item) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/commissionedSales/delegation_details/index'
|
||||
// })
|
||||
},
|
||||
//获取分类数据
|
||||
commislist() {
|
||||
entrustlist(this.where).then((res) => {
|
||||
this.orderList.push(...res.data.list)
|
||||
if (res.data.list.length < this.where.limit) this.status = 'nomore'
|
||||
|
||||
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//选择
|
||||
tabClick(e) { //点击获取当前标签数据
|
||||
this.activeItem = e.name; //当前class类名
|
||||
this.tabTitle = e.name; //当前选的标签名
|
||||
this.where.page = 1
|
||||
this.orderList = []
|
||||
this.where.status = e.type
|
||||
this.commislist()
|
||||
},
|
||||
//编辑委托
|
||||
Edit(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/commissionedSales/addDelegation/index?id=' + item.community_id + '&type=edit'
|
||||
})
|
||||
},
|
||||
//新增委托
|
||||
addDelegation() {
|
||||
addDelegation(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/commissionedSales/addDelegation/index'
|
||||
url:'/pages/commissionedSales/addDelegation/index'
|
||||
})
|
||||
},
|
||||
//管理弹窗
|
||||
@ -355,127 +336,42 @@
|
||||
this.$refs.bindmobile2.close()
|
||||
this.$refs.bindmobile3.close()
|
||||
},
|
||||
//提交订单
|
||||
|
||||
order(item) {
|
||||
if (item.mer_status == 0 && entrust_order_id != 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id
|
||||
})
|
||||
} else {
|
||||
this.$util.Tips({
|
||||
title: '商家还没同意该订单',
|
||||
icon: 'err'
|
||||
})
|
||||
}
|
||||
},
|
||||
//详情
|
||||
|
||||
detail(item) {
|
||||
|
||||
detail() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id
|
||||
url: '/pages/commissionedSales/delegation_details/index'
|
||||
})
|
||||
},
|
||||
// 待处理
|
||||
soldEdit(item) {
|
||||
this.obj = item
|
||||
console.log(item)
|
||||
soldEdit() {
|
||||
|
||||
this.$refs.bindmobile.open()
|
||||
},
|
||||
//已接受
|
||||
accepted() {
|
||||
|
||||
this.$refs.bindmobile1.open()
|
||||
},
|
||||
//结束委托
|
||||
closingorder(item) {
|
||||
console.log(item)
|
||||
this.obj = item
|
||||
this.$refs.bindmobile2.open()
|
||||
// this.$refs.bindmobile3.open()
|
||||
},
|
||||
//拒绝申请委托
|
||||
refused() {
|
||||
this.$refs.bindmobile2.close()
|
||||
setTimeout(() => {
|
||||
this.$refs.bindmobile3.open()
|
||||
}, 1000)
|
||||
closingorder() {
|
||||
this.$refs.bindmobile3.open()
|
||||
},
|
||||
// 已拒绝
|
||||
declined() {
|
||||
// this.$refs.bindmobile2.open()
|
||||
this.$refs.bindmobile3.open()
|
||||
this.$refs.bindmobile2.open()
|
||||
},
|
||||
agree(item) {
|
||||
finishentrust(item.community_id, {
|
||||
status: 2,
|
||||
refusal: this.refuseds
|
||||
}).then(res => {
|
||||
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
this.orderList = []
|
||||
this.tabTitle = "tabTwo"
|
||||
this.$refs.bindmobile2.close()
|
||||
this.$refs.bindmobile3.close()
|
||||
this.commislist()
|
||||
})
|
||||
},
|
||||
//删除订单
|
||||
deleteOrder(item) {
|
||||
|
||||
checkchain(item.community_id, {
|
||||
status: 3
|
||||
}).then(res => {
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
this.orderList = []
|
||||
this.tabTitle = "tabOne"
|
||||
this.commislist()
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
this.$util.Tips({
|
||||
title: err,
|
||||
icon: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 审核未通过 编辑
|
||||
auditEdit() {
|
||||
|
||||
},
|
||||
//审核通过 拒绝
|
||||
passDelete(item) {
|
||||
checkchain(item.community_id, {
|
||||
status: 2
|
||||
}).then((res) => {
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
this.orderList = []
|
||||
this.tabTitle = "tabOne"
|
||||
this.commislist()
|
||||
})
|
||||
passDelete() {
|
||||
|
||||
},
|
||||
//审核通过 同意
|
||||
passagree(item) {
|
||||
checkchain(item.community_id, {
|
||||
status: 1
|
||||
}).then((res) => {
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
this.orderList = []
|
||||
this.tabTitle = "tabOne"
|
||||
this.commislist()
|
||||
this.$refs.bindmobile.close()
|
||||
})
|
||||
passagree() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -485,7 +381,7 @@
|
||||
.content {
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.content_top {
|
||||
@ -912,7 +808,7 @@
|
||||
|
||||
.entrust_bg-content {
|
||||
position: absolute;
|
||||
top: 304rpx;
|
||||
top: 404rpx;
|
||||
|
||||
.bg-content-a {
|
||||
margin-left: 242rpx;
|
||||
@ -958,7 +854,7 @@
|
||||
|
||||
.bg-content_textarea {
|
||||
width: 624rpx;
|
||||
height: 242rpx;
|
||||
height: 152rpx;
|
||||
padding: 25rpx 18rpx;
|
||||
|
||||
background: #F5F5F5;
|
||||
|
@ -5,8 +5,8 @@
|
||||
<!--选项卡滑动切换-->
|
||||
<cxNavTitle :tabs="tabs" :activeItem="activeItem" @tabClick="tabClick" :show='false'></cxNavTitle>
|
||||
</view>
|
||||
|
||||
<view class="content-content" v-for="(item,i) in orderList" :key="i" @click="nav(item)">
|
||||
<!-- 审核通过 打折的拒绝、同意功能 ,调货不需要功能 -->
|
||||
<view class="content-content" v-for="(item,i) in list" :key="i" @click="nav(item)">
|
||||
|
||||
<view class="content-one">
|
||||
<view class="content-one-img">
|
||||
@ -14,114 +14,108 @@
|
||||
</view>
|
||||
<view class="content-one-txt">
|
||||
<view class="one-txt-a">
|
||||
{{item.title}}
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="one-txt-b">
|
||||
委托周期:{{item.entrust_day}}
|
||||
</view>
|
||||
|
||||
<view class="one-txt-b" v-if="item.mer_status==1" style="color: red;margin-top: 3rpx;">
|
||||
{{item.entrust_finish==0?'未申请结束委托':""||item.entrust_finish==1?'委托已结束':""||item.entrust_finish==2?'商家拒绝结束委托':""||item.entrust_finish==3?'结束委托申请中':""}}
|
||||
委托周期:{{item.day}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-two_one" v-if="item.mer_status==0">
|
||||
<view class="content-two-edita" @click="order">
|
||||
<view class="content-two_one" v-if="item.type==1">
|
||||
<view class="content-two-edita" @click="soldEdit">
|
||||
待处理
|
||||
</view>
|
||||
<view class="contentgn">
|
||||
<view class="contentgn_a" @click="soldEdit(item)">
|
||||
<view class="contentgn_a">
|
||||
处理
|
||||
</view>
|
||||
<span></span>
|
||||
<!-- <view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)">
|
||||
编辑
|
||||
</view>
|
||||
<span></span> -->
|
||||
<!-- <view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
|
||||
删除
|
||||
</view>
|
||||
<span></span> -->
|
||||
<view class="contentgn_b" @click="detail(item)">
|
||||
<view class="contentgn_b">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-two_oneq" v-if="item.mer_status==1">
|
||||
<view class="content-two_oneq" v-if="item.type==2">
|
||||
|
||||
|
||||
<view class="content-two-editb" @click="accepted">
|
||||
已接受
|
||||
</view>
|
||||
<view class="contentgn">
|
||||
<view class="contentgn_a" style="margin-left: 10rpx;"
|
||||
v-if="item.entrust_order_id>0&&item.mer_status==1" @click="closingorder(item)">
|
||||
申请结束委托
|
||||
</view>
|
||||
<span v-if="item.entrust_order_id>0&&item.mer_status==1"></span>
|
||||
<view class="contentgn_a" v-if="item.entrust_order_id==0" style="margin-left: 10rpx;"
|
||||
@click="order(item)">
|
||||
去下单
|
||||
</view>
|
||||
<span v-if="item.entrust_order_id==0"></span>
|
||||
|
||||
<view class="contentgn_b" @click="detail(item)">
|
||||
<view class="contentgn">
|
||||
<view class="contentgn_a" @click="closingorder">
|
||||
结束委托
|
||||
</view>
|
||||
<span></span>
|
||||
<view class="contentgn_b">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-two_one" v-if="item.mer_status==2">
|
||||
<view class="content-two_one" v-if="item.type==3">
|
||||
|
||||
|
||||
<view class="content-two-editc" @click="declined">
|
||||
已拒绝
|
||||
</view>
|
||||
<view class="contentgn">
|
||||
<!--
|
||||
-->
|
||||
<view class="contentgn_b" @click="detail(item)">
|
||||
<view class="contentgn_a">
|
||||
删除
|
||||
</view>
|
||||
<span></span>
|
||||
<view class="contentgn_b">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-two_one" v-if="item.type==4">
|
||||
|
||||
|
||||
<view class="content-two-editd" @click="soldEdit">
|
||||
已完成
|
||||
</view>
|
||||
<view class="contentgn">
|
||||
|
||||
<view class="contentgn_b" @click="detail(item)">
|
||||
<view class="contentgn_a">
|
||||
删除
|
||||
</view>
|
||||
<span></span>
|
||||
<view class="contentgn_b">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view v-if="orderList.length == 0">
|
||||
<view v-if="orderList.length == 0 && this.where.page > 1">
|
||||
<emptyPage title="暂无订单~"></emptyPage>
|
||||
</view>
|
||||
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
|
||||
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
|
||||
<uni-popup ref="bindmobile" type="center" @click="close">
|
||||
|
||||
<view class="" style="position: relative;">
|
||||
<view class="entrust">
|
||||
<view class="entrust_close" @click="close">
|
||||
<image src="@/static/images/wt_close.png" mode=""></image>
|
||||
</view>
|
||||
<view class="entrust_bg">
|
||||
<view class="entrust_bg-content" v-if="obj.mer_info">
|
||||
<view class="entrust_bg-content">
|
||||
<view class="bg-content-a">
|
||||
委托申请处理
|
||||
</view>
|
||||
<view class="bg-content-b" >
|
||||
结算周期: <span>{{obj.mer_info.settle_cycle}}天</span>
|
||||
<view class="bg-content-b">
|
||||
结算周期: <span>30天</span>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="bg-content-c" >
|
||||
利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
|
||||
<view class="bg-content-c">
|
||||
利息比例: <span>0.05%</span>
|
||||
</view>
|
||||
|
||||
<view class="entrust_bga_btn">
|
||||
<view class="cancellation" @click="passDelete(obj)">
|
||||
<view class="cancellation">
|
||||
拒绝
|
||||
</view>
|
||||
<view class="determine" @click="passagree(obj)">
|
||||
<view class="determine">
|
||||
接受
|
||||
</view>
|
||||
</view>
|
||||
@ -131,6 +125,7 @@
|
||||
</view>
|
||||
</uni-popup>
|
||||
<uni-popup ref="bindmobile1" type="center" @click="close">
|
||||
|
||||
<view class="" style="position: relative;">
|
||||
<view class="entrust">
|
||||
<view class="entrust_close" @click="close">
|
||||
@ -139,23 +134,26 @@
|
||||
<view class="entrust_bga">
|
||||
<view class="entrust_bg-content">
|
||||
<view class="bg-content-a">
|
||||
<!-- 确定结束委托? -->
|
||||
申请委托结束处理
|
||||
确定结束委托?
|
||||
</view>
|
||||
<view class="entrust_bga_btn">
|
||||
<view class="cancellation" @click="close">
|
||||
<view class="cancellation">
|
||||
取消
|
||||
</view>
|
||||
<view class="determine" @click="deteragrss(obj)">
|
||||
<view class="determine">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</uni-popup>
|
||||
<uni-popup ref="bindmobile2" type="center" @click="close">
|
||||
|
||||
<view class="" style="position: relative;">
|
||||
<view class="entrust">
|
||||
<view class="entrust_close" @click="close">
|
||||
@ -168,10 +166,13 @@
|
||||
</view>
|
||||
<view class="bg-content-b">
|
||||
结算周期: <span>30天</span>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="bg-content-c">
|
||||
利息比例: <span>0.05%</span>
|
||||
</view>
|
||||
|
||||
<view class="entrust_bga_btn">
|
||||
<view class="cancellation">
|
||||
拒绝
|
||||
@ -199,15 +200,20 @@
|
||||
</view>
|
||||
<view class="bg-content-b">
|
||||
结算周期: <span>30天</span>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="bg-content-c">
|
||||
利息比例: <span>0.05%</span>
|
||||
</view>
|
||||
<view class="bg-content-c">
|
||||
|
||||
拒绝原因:
|
||||
<view class="" style="margin-top: 21rpx;">
|
||||
|
||||
<textarea value="" placeholder="输入拒绝原因" class="bg-content_textarea" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="entrust_bga_btn">
|
||||
<view class="determine">
|
||||
@ -225,12 +231,7 @@
|
||||
<script>
|
||||
import cxNavTitle from '@/components/cx-navTitle.vue'
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import {
|
||||
entrustlist,
|
||||
addEntrustCart,
|
||||
finishchain,
|
||||
checkchain
|
||||
} from '@/api/sale.js'
|
||||
import {} from '@/api/sale.js'
|
||||
export default {
|
||||
components: {
|
||||
cxNavTitle,
|
||||
@ -238,32 +239,27 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
obj: {},
|
||||
activeItem: "tabOne",
|
||||
status: 'loadmore',
|
||||
activeItem: "tabOne",
|
||||
tabTitle: "",
|
||||
orderList: [],
|
||||
where: {
|
||||
page: 1,
|
||||
type: 2,
|
||||
limit: 10,
|
||||
status: 0
|
||||
limit: 10
|
||||
},
|
||||
tabs: [{
|
||||
name: "tabOne",
|
||||
label: '待处理',
|
||||
type: '0'
|
||||
type: '1'
|
||||
},
|
||||
{
|
||||
name: "tabTwo",
|
||||
label: '已接受',
|
||||
type: '1'
|
||||
type: '2'
|
||||
},
|
||||
{
|
||||
name: "tabThree",
|
||||
label: '已拒绝',
|
||||
type: '2'
|
||||
type: '3'
|
||||
},
|
||||
|
||||
],
|
||||
@ -301,166 +297,59 @@
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.commislist()
|
||||
|
||||
},
|
||||
methods: {
|
||||
onReachBottom() {
|
||||
if (this.status == 'nomore') return;
|
||||
this.status = 'loading';
|
||||
this.where.page = ++this.where.page;
|
||||
this.commislist()
|
||||
},
|
||||
nav(item) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/commissionedSales/delegation_details/index'
|
||||
// })
|
||||
},
|
||||
//获取分类数据
|
||||
commislist() {
|
||||
entrustlist(this.where).then((res) => {
|
||||
this.orderList.push(...res.data.list)
|
||||
if (res.data.list.length < this.where.limit) this.status = 'nomore'
|
||||
|
||||
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/commissionedSales/delegation_details/index'
|
||||
})
|
||||
},
|
||||
|
||||
//选择
|
||||
tabClick(e) { //点击获取当前标签数据
|
||||
this.activeItem = e.name; //当前class类名
|
||||
this.tabTitle = e.name; //当前选的标签名
|
||||
this.where.page = 1
|
||||
this.orderList = []
|
||||
this.where.status = e.type
|
||||
this.commislist()
|
||||
},
|
||||
//管理弹窗
|
||||
close() {
|
||||
console.log('1111111')
|
||||
this.$refs.bindmobile.close()
|
||||
this.$refs.bindmobile1.close()
|
||||
this.$refs.bindmobile2.close()
|
||||
this.$refs.bindmobile3.close()
|
||||
},
|
||||
//详情
|
||||
detail(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id
|
||||
})
|
||||
},
|
||||
// 待处理
|
||||
soldEdit(item) {
|
||||
this.obj = item
|
||||
soldEdit() {
|
||||
|
||||
this.$refs.bindmobile.open()
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
//已接受
|
||||
accepted() {
|
||||
|
||||
this.$refs.bindmobile1.open()
|
||||
},
|
||||
//结束委托
|
||||
closingorder(item) {
|
||||
this.obj = item
|
||||
this.$refs.bindmobile1.open()
|
||||
// this.$refs.bindmobile3.open()
|
||||
},
|
||||
//下单
|
||||
order(item) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + '&type=1'
|
||||
// })
|
||||
addEntrustCart({
|
||||
community_id: item.community_id
|
||||
}).then(res => {
|
||||
|
||||
if (res.status == 200) {
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + res.data.cart_id.toString()
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
//申请结束委托申请
|
||||
deteragrss(item) {
|
||||
|
||||
finishchain(item.community_id, {
|
||||
status: 1
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
this.orderList = []
|
||||
this.tabTitle = "tabTwo"
|
||||
this.commislist()
|
||||
this.$refs.bindmobile1.close()
|
||||
}).catch((err) => {
|
||||
this.$refs.bindmobile1.close()
|
||||
this.$util.Tips({
|
||||
title: err,
|
||||
icon: 'error'
|
||||
})
|
||||
})
|
||||
closingorder() {
|
||||
this.$refs.bindmobile3.open()
|
||||
},
|
||||
// 已拒绝
|
||||
declined() {
|
||||
// this.$refs.bindmobile2.open()
|
||||
this.$refs.bindmobile3.open()
|
||||
},
|
||||
//删除订单
|
||||
deleteOrder(item) {
|
||||
checkchain(item.community_id, {
|
||||
status: 3
|
||||
}).then(res => {
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
this.orderList = []
|
||||
this.tabTitle = "tabOne"
|
||||
this.commislist()
|
||||
})
|
||||
this.$refs.bindmobile2.open()
|
||||
},
|
||||
|
||||
// 审核未通过 编辑
|
||||
auditEdit() {
|
||||
|
||||
},
|
||||
//审核通过 拒绝
|
||||
passDelete(item) {
|
||||
checkchain(item.community_id, {
|
||||
status: 2
|
||||
}).then((res) => {
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
this.orderList = []
|
||||
this.tabTitle = "tabOne"
|
||||
this.commislist()
|
||||
this.$refs.bindmobile.close()
|
||||
})
|
||||
passDelete() {
|
||||
|
||||
},
|
||||
//审核通过 同意
|
||||
passagree(item) {
|
||||
checkchain(item.community_id, {
|
||||
status: 1
|
||||
}).then((res) => {
|
||||
this.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
})
|
||||
this.orderList = []
|
||||
this.tabTitle = "tabOne"
|
||||
this.commislist()
|
||||
this.$refs.bindmobile.close()
|
||||
})
|
||||
passagree() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -470,11 +359,9 @@
|
||||
.content_top {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.content_top {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content-content {
|
||||
|
||||
margin-top: 21rpx;
|
||||
@ -685,7 +572,6 @@
|
||||
|
||||
|
||||
}
|
||||
|
||||
.entrust {
|
||||
|
||||
.entrust_close {
|
||||
@ -849,7 +735,7 @@
|
||||
|
||||
.entrust_bg-content {
|
||||
position: absolute;
|
||||
top: 304rpx;
|
||||
top: 404rpx;
|
||||
|
||||
.bg-content-a {
|
||||
margin-left: 242rpx;
|
||||
@ -895,7 +781,7 @@
|
||||
|
||||
.bg-content_textarea {
|
||||
width: 624rpx;
|
||||
height: 242rpx;
|
||||
height: 152rpx;
|
||||
padding: 25rpx 18rpx;
|
||||
|
||||
background: #F5F5F5;
|
||||
|
@ -1,99 +1,249 @@
|
||||
<template>
|
||||
<view class="gather">
|
||||
<view v-if="isFshow">
|
||||
<view class="site-box flex_a_c_j_sb" :style="{ opacity: backColor }" @click="selectLocation">
|
||||
<view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="selectLocation">
|
||||
<view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']" style="margin-left: 20rpx">
|
||||
<zbpSwiper></zbpSwiper>
|
||||
<u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText"
|
||||
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
|
||||
<block v-if="isShow">
|
||||
<view class="special_work com" v-if="userInfoData.mer_info.type_id === 12">
|
||||
<view class="special_work com" v-if="true">
|
||||
<view class="title">市级供应链</view>
|
||||
<view class="content">
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}zsgl.png`" mode="aspectFill"></image>
|
||||
<text class="text">在售管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image>
|
||||
<text class="text">财务管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=1`)">
|
||||
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">入库管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}&product_type=98`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"></image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">提现管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/teach_video/teach_video`)">
|
||||
<image class="icon_img"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/spjs.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">视频教学</text>
|
||||
</view>
|
||||
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">财务公开</text>
|
||||
</view> -->
|
||||
<!-- <view class="examine" @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单管理</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="town_name">{{ street }}</view>
|
||||
</view>
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="!isFshow">
|
||||
<view class="site-box1 flex_a_c_j_sb">
|
||||
<view class="place_wrapper flex_a_c" @click="changeMap">
|
||||
<view class="iconfont icon-weizhi"></view>
|
||||
<view class="town_name">{{street||'定位中' }}</view>
|
||||
<!-- <view class="town_name rotate-box" @click.stop="getPositionFn()"><uni-icons type="loop"
|
||||
color="#fff"></uni-icons></view> -->
|
||||
|
||||
<view class="business com" v-if="userInfoData.mer_info.type_id === 10">
|
||||
<view class="business com" v-if="true">
|
||||
<view class="special_work com">
|
||||
<view class="title">我的店铺</view>
|
||||
<view class="content ">
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
|
||||
<!-- @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`) -->
|
||||
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
|
||||
<text class="text">供货采购</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator('/pages/users/order_list/indexCopy?status=-1&product_type=98')">
|
||||
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
|
||||
<text class="text">进货管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">扫码出库</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=2`)">
|
||||
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">入库管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">提现管理</text>
|
||||
</view>
|
||||
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">客服记录</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单核销</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&type_id=${userInfoData.mer_info.type_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/users/trading_hall/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/diaohuo.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">交易大厅</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/commissionedSales/index/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">委托销售</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/releaseManagement/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/fabu.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">发布管理</text>
|
||||
</view>
|
||||
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">财务公开</text>
|
||||
</view> -->
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <gatherBusiness :userInfoData="userInfoData" /> -->
|
||||
</view>
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view class="iconfont icon-xiaoxi" style="color: #fff"> </view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view class="business com" v-if="userInfoData.mer_info.type_id!=null&&userInfoData.mer_info.type_id === 11">
|
||||
<view class="business com" v-if="true">
|
||||
<view class="special_work com">
|
||||
<view class="title">里海云仓</view>
|
||||
<view class="content ">
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
|
||||
<text class="text">供货采购</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator('/pages/users/order_list/index?status=-1')">
|
||||
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
|
||||
<text class="text">进货管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">扫码出库</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=2`)">
|
||||
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">入库管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">提现管理</text>
|
||||
</view>
|
||||
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">客服记录</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单核销</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&type_id=${userInfoData.mer_info.type_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">财务公开</text>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</block>
|
||||
<!-- <m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
<view class="custom_style">
|
||||
<view class="custom_style_icon"></view>
|
||||
</view>
|
||||
</template>
|
||||
</m-tabbar> -->
|
||||
<view class="" v-if='jurisdiction==false&&isShow==false'>
|
||||
<emptyPage title="暂无信息"></emptyPage>
|
||||
</view>
|
||||
|
||||
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town="street"></zbpSwiper>
|
||||
<u-empty :show="jurisdiction" mode="permission" :text="emptyText"
|
||||
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
|
||||
<view class="business com special_work" v-if="jurisdiction == false">
|
||||
<view class="title project">
|
||||
<view>更多功能</view>
|
||||
<view v-if="!editFlag" class="edit" @click="editFlag = true">编辑</view>
|
||||
<view v-else class="edit" @click="editComfirm">完成</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<block v-if="nowMenuList.length > 0">
|
||||
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
|
||||
<view class="examine" @click="
|
||||
editFlag ? removeMenu(item) : clickMenu(item)
|
||||
">
|
||||
<image class="icon_img" :src="item.pic" mode="aspectFit">
|
||||
</image>
|
||||
<u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon>
|
||||
<text class="text">{{ item.name }}</text>
|
||||
</view>
|
||||
</u-transition>
|
||||
</block>
|
||||
<view v-else-if="!editFlag" @click="editFlag = true"
|
||||
style="text-align: center; width: 100%; color: #aaa">还没有应用,点我添加应用</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="editFlag" class="business com special_work edit_card">
|
||||
<view class="title project" style="padding: 0 28rpx">
|
||||
<view>编辑功能</view>
|
||||
<view class="edit2" @click="editComfirm">完成</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
|
||||
<view class="examine" @click="pushMenu(item)">
|
||||
<image class="icon_img" :src="item.pic" mode="aspectFit"> </image>
|
||||
<u-icon class="icon" name="plus-circle-fill"></u-icon>
|
||||
<text class="text">{{ item.name }}</text>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</view>
|
||||
<view class="location" v-if="isshow">
|
||||
<view class="locationa"> 位置权限使用说明 </view>
|
||||
<view class="locationb"> 用于向你推荐最近门店 </view>
|
||||
<view class="locationx" @click.stop="isshow=false">x</view>
|
||||
</view>
|
||||
<u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
<!-- <m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
<view class="custom_style">
|
||||
<view class="custom_style_icon"></view>
|
||||
</view>
|
||||
</template>
|
||||
</m-tabbar> -->
|
||||
<Loading></Loading>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Cache from '@/utils/cache';
|
||||
import { wgsToGcj } from "@/utils/wgs.js";
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import {
|
||||
getArea,
|
||||
getStreet
|
||||
} from '@/api/article.js';
|
||||
import {
|
||||
mapState,
|
||||
mapGetters
|
||||
@ -107,7 +257,6 @@
|
||||
getUserInfo
|
||||
} from '@/api/user.js'
|
||||
import {
|
||||
getGeocoder,
|
||||
microSeachBarCode,
|
||||
microEadtProduct
|
||||
} from '@/api/store.js'
|
||||
@ -116,26 +265,15 @@
|
||||
} from '@/libs/uniApi';
|
||||
import {
|
||||
getDiy
|
||||
} from '@/api/api.js';
|
||||
import {
|
||||
applet
|
||||
} from '@/api/public.js';
|
||||
import {
|
||||
ENV
|
||||
} from "@/config/app.js"
|
||||
// #ifdef APP-PLUS
|
||||
import uniMP from '@/utils/uniMP.js';
|
||||
// #endif
|
||||
|
||||
} from '@/api/api.js'
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper
|
||||
zbpSwiper,
|
||||
emptyPage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
locationArr: ({}),
|
||||
isshow: false,
|
||||
emptyText: '暂无可用应用',
|
||||
jurisdiction: false, // 是否有权限
|
||||
mer_id: '',
|
||||
@ -145,357 +283,29 @@
|
||||
}
|
||||
},
|
||||
prefix: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/11/',
|
||||
isShow: false,
|
||||
isFshow: false,
|
||||
street: '',
|
||||
// 编辑中标记
|
||||
editFlag: false,
|
||||
// 所有菜单的按钮
|
||||
AllMenuList: [],
|
||||
nowMenuList: [],
|
||||
street: '',
|
||||
showPicker: false,
|
||||
columnData: [],
|
||||
isFshow: false,
|
||||
backColor: 'rgba(252, 252, 252, 0)'
|
||||
isShow: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'location', 'isLogin'])
|
||||
},
|
||||
created() {},
|
||||
onLoad() {
|
||||
this.Area();
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
if (this.isLogin) {
|
||||
this.emptyText = '暂无可用应用'
|
||||
this.jurisdiction = false
|
||||
this.initAllAppLet();
|
||||
} else {
|
||||
this.emptyText = '请登录'
|
||||
this.jurisdiction = true
|
||||
}
|
||||
this.getUserInfo();
|
||||
this.getUserInfo()
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
this.getUserInfo()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 销毁监听事件
|
||||
this.$bus.$off('value-updated')
|
||||
},
|
||||
mounted() {
|
||||
if (this.street.length <= 0) {
|
||||
this.selfLocation()
|
||||
}
|
||||
// #ifdef H5
|
||||
// 监听页面滚动事件
|
||||
window.addEventListener("scroll", this.scrolling);
|
||||
// #endif
|
||||
|
||||
this.$bus.$on('value-updated', (newValue) => {
|
||||
// 更新父组件的值
|
||||
this.street = newValue.split(',')[0]
|
||||
});
|
||||
|
||||
},
|
||||
// #ifdef APP-PLUS
|
||||
onPageScroll(e) {
|
||||
const scrollTop = e.scrollTop;
|
||||
if (scrollTop <= 20) {
|
||||
this.backColor = 'rgba(252, 252, 252, 0)'
|
||||
this.isFshow = false
|
||||
} else if (20 < scrollTop && scrollTop <= 100) {
|
||||
this.backColor = 'rgba(252, 252, 252, .5)'
|
||||
this.isFshow = true
|
||||
} else if (scrollTop > 100) {
|
||||
this.backColor = 'rgba(252, 252, 252, 1)'
|
||||
this.isFshow = true
|
||||
}
|
||||
},
|
||||
// #endif
|
||||
onHide() {
|
||||
uni.$emit('showLoading', false);
|
||||
},
|
||||
methods: {
|
||||
getPositionFn() {
|
||||
this.street = '定位中'
|
||||
this.$store.commit('setLocation', {
|
||||
lat: null,
|
||||
long: null
|
||||
})
|
||||
uni.removeStorageSync('RejectTarget')
|
||||
this.selfLocation()
|
||||
|
||||
},
|
||||
scrolling() {
|
||||
// 滚动条距文档顶部的距离
|
||||
let scrollTop =
|
||||
window.pageYOffset ||
|
||||
document.documentElement.scrollTop ||
|
||||
document.body.scrollTop;
|
||||
// 滚动条滚动的距离
|
||||
let scrollStep = scrollTop - this.oldScrollTop;
|
||||
// console.log("header 滚动距离 ", scrollTop);
|
||||
// 更新——滚动前,滚动条距文档顶部的距离
|
||||
this.oldScrollTop = scrollTop;
|
||||
|
||||
//变量windowHeight是可视区的高度
|
||||
let windowHeight =
|
||||
document.documentElement.clientHeight || document.body.clientHeight;
|
||||
//变量scrollHeight是滚动条的总高度
|
||||
let scrollHeight =
|
||||
document.documentElement.scrollHeight || document.body.scrollHeight;
|
||||
|
||||
//滚动条到底部的条件
|
||||
if (scrollTop + windowHeight == scrollHeight) {
|
||||
//你想做的事情
|
||||
// console.log("header 你已经到底部了");
|
||||
}
|
||||
|
||||
|
||||
if (scrollTop <= 20) {
|
||||
this.backColor = 'rgba(252, 252, 252, 0)'
|
||||
this.isFshow = false
|
||||
} else if (20 < scrollTop && scrollTop <= 100) {
|
||||
this.backColor = 'rgba(252, 252, 252, .5)'
|
||||
this.isFshow = true
|
||||
} else if (scrollTop > 100) {
|
||||
this.backColor = 'rgba(252, 252, 252, 1)'
|
||||
this.isFshow = true
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
initAllAppLet(){
|
||||
applet().then(res=>{
|
||||
this.AllMenuList = res.data;
|
||||
this.initMenu();
|
||||
// this.showControllerAllLet();
|
||||
}).catch(e=>{
|
||||
console.log(e);
|
||||
})
|
||||
},
|
||||
// 根据类型来判断是否显示
|
||||
showControllerAllLet() {
|
||||
let user;
|
||||
if (typeof this.$store.state.app.userInfo == 'string') {
|
||||
user = JSON.parse(this.$store.state.app.userInfo)
|
||||
} else user = JSON.parse(JSON.stringify(this.$store.state.app.userInfo))
|
||||
if (user?.show_controller_applet) {
|
||||
this.AllMenuList.push({
|
||||
name: '大屏控制',
|
||||
icon: '/static/applet/dp.png',
|
||||
data: {
|
||||
id: '__UNI__83ABA97',
|
||||
url: 'https://ceshi-worker-task.lihaink.cn/uploads/files/20231016/20231016112144fac6d9128.wgt',
|
||||
},
|
||||
type: 4,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 初始化菜单
|
||||
initMenu() {
|
||||
let nowMenu = uni.getStorageSync('gatherMenuList');
|
||||
try {
|
||||
let list = JSON.parse(nowMenu||'[]');
|
||||
let now = [];
|
||||
let all = [];
|
||||
this.AllMenuList.forEach((item) => {
|
||||
if(list.find(t => t.name == item.name)?.name != item.name) all.push(item);
|
||||
else now.push(item)
|
||||
})
|
||||
this.AllMenuList = all;
|
||||
this.nowMenuList = now;
|
||||
} catch (e) {
|
||||
this.nowMenuList = [];
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
clickMenu(data) {
|
||||
this.getUniMp(data);
|
||||
},
|
||||
// 添加菜单
|
||||
pushMenu(data) {
|
||||
this.nowMenuList.push(data);
|
||||
this.AllMenuList = this.AllMenuList.filter((item) => {
|
||||
return item.name != data.name;
|
||||
})
|
||||
},
|
||||
// 移除菜单
|
||||
removeMenu(data) {
|
||||
this.AllMenuList.push(data);
|
||||
this.nowMenuList = this.nowMenuList.filter((item) => {
|
||||
return item.name != data.name;
|
||||
})
|
||||
},
|
||||
// 编辑完成
|
||||
editComfirm() {
|
||||
this.editFlag = false;
|
||||
uni.setStorageSync('gatherMenuList', JSON.stringify(this.nowMenuList));
|
||||
},
|
||||
getUniMp(data) {
|
||||
let that = this;
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
if(data.version) return uniMP.loadAppletMP(data);
|
||||
else switch (data.type) {
|
||||
case 1:
|
||||
uniMP.loadMP(data.data);
|
||||
break;
|
||||
case 2:
|
||||
uniMP.loadMPx(data.data);
|
||||
break;
|
||||
case 3:
|
||||
uniMP.loadMPurl(data.data);
|
||||
break;
|
||||
case 4:
|
||||
uniMP.loadMPdns(data.data);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
// if (type == 2) {
|
||||
// this.navigator(`/pages/moreProject/moreProject`);
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// icon: 'none',
|
||||
// title: 'H5不支持打开小程序'
|
||||
// })
|
||||
// }
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: 'H5不支持打开小程序'
|
||||
})
|
||||
// #endif
|
||||
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e;
|
||||
if (columnIndex === 0) {
|
||||
getStreet({
|
||||
area_code: value[0]['code']
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Area() {
|
||||
getArea({
|
||||
city_code: 510500
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({
|
||||
area_code: code
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
selectLocation() {
|
||||
this.showPicker = true
|
||||
},
|
||||
confirm(e) {
|
||||
this.street = e.value[1].name
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
||||
|
||||
})
|
||||
this.showPicker = false
|
||||
},
|
||||
selfLocation() {
|
||||
if (uni.getStorageSync('RejectTarget')) return;
|
||||
if (uni.getStorageSync('loction') == true) {
|
||||
this.isshow = false
|
||||
} else {
|
||||
this.isshow = true
|
||||
uni.setStorageSync('loction', true);
|
||||
}
|
||||
if (this.$store?.state?.storage?.location?.lat) {
|
||||
this.isshow = false
|
||||
getGeocoder({
|
||||
lat: this.$store.state.storage.location.lat,
|
||||
long: this.$store.state.storage.location.long
|
||||
}).then(res => {
|
||||
let town = res.data.address_reference.town.title
|
||||
let street_id = res.data.address_reference.town.id
|
||||
this.street = res.data.address_reference.town.title;
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated', this.street + ',' +
|
||||
street_id);
|
||||
|
||||
})
|
||||
|
||||
}).catch(err => {
|
||||
this.isshow = false
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
} else uni.getLocation({
|
||||
type: 'wgs84',
|
||||
timeout: '10',
|
||||
success: (res) => {
|
||||
res = wgsToGcj(res);
|
||||
// console.log(res)
|
||||
this.isshow = false
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
this.$store.commit('setLocation', {
|
||||
lat: res.latitude.toFixed(6),
|
||||
long: res.longitude.toFixed(6),
|
||||
});
|
||||
getGeocoder({
|
||||
lat: latitude,
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
let town = res.data.address_reference.town.title
|
||||
let street_id = res.data.address_reference.town.id
|
||||
this.street = res.data.address_reference.town.title;
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated', this.street + ',' +
|
||||
street_id);
|
||||
|
||||
})
|
||||
|
||||
}).catch(err => {
|
||||
this.isshow = false
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
this.street = '定位失败'
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
this.isshow = false
|
||||
uni.setStorageSync("RejectTarget", true)
|
||||
Toast('定位失败,请检查定位权限是否开启')
|
||||
this.street = '定位失败'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
navigator(url, t) {
|
||||
// if (this.userInfoData.is_wsxx === 0 && t != '商户设置') return Toast("请完善商户信息");
|
||||
uni.navigateTo({
|
||||
@ -506,7 +316,6 @@
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.userInfoData = res.data;
|
||||
that.$store.commit('SET_USERINFO', res.data);
|
||||
// console.log(res.data.service);
|
||||
if (res.data.service == null) {
|
||||
// console.log('123');
|
||||
@ -521,133 +330,19 @@
|
||||
}
|
||||
// console.log(that.userInfoData);
|
||||
});
|
||||
},
|
||||
// 选择位置
|
||||
changeMap(){
|
||||
uni.navigateTo({
|
||||
url: `/pages/select_address/select_address_n`,
|
||||
success:()=> {
|
||||
uni.$once('changeAddress', (e)=>{
|
||||
// this.street_id = e.street.code;
|
||||
// this.street = e.street.name;
|
||||
if (e.longitude) {
|
||||
this.longitude = e.longitude;
|
||||
this.latitude = e.latitude;
|
||||
this.$store.commit('setLocation', {
|
||||
lat: e.latitude,
|
||||
long: e.longitude,
|
||||
});
|
||||
}
|
||||
this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.gather {
|
||||
padding-bottom: 164.91rpx;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sitebox {
|
||||
animation-name: fadeIn;
|
||||
animation-duration: 3s;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.site-box1 {
|
||||
width: 706rpx;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
height: 160rpx;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
height: 120rpx;
|
||||
/* #endif */
|
||||
margin-bottom: 26.32rpx;
|
||||
position: absolute;
|
||||
top: 45rpx;
|
||||
left: 20rpx;
|
||||
|
||||
z-index: 999;
|
||||
|
||||
// 位置
|
||||
.place_wrapper {
|
||||
color: #fff;
|
||||
margin-right: 0rpx;
|
||||
|
||||
font-size: 30rpx;
|
||||
|
||||
.town_name {
|
||||
margin-left: 21rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.site-box {
|
||||
width: 100%;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
height: 160rpx;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
height: 120rpx;
|
||||
/* #endif */
|
||||
margin-bottom: 26.32rpx;
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
padding-top: 75rpx;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
padding-top: 25rpx;
|
||||
/* #endif */
|
||||
// background-color: #e5e5e5;
|
||||
background: url("@/static/images/bg2.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
padding-right: 20rpx;
|
||||
|
||||
// 位置
|
||||
.place_wrapper {
|
||||
color: #fff;
|
||||
margin-right: 24.56rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
opacity: 0;
|
||||
|
||||
.town_name {
|
||||
margin-left: 21rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
opacity: 0;
|
||||
font-size: 30rpx;
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
|
||||
.top_box {
|
||||
// padding-top: 180rpx;
|
||||
background: linear-gradient(#36a2ff, #fff);
|
||||
background: linear-gradient(#36A2FF, #fff);
|
||||
}
|
||||
|
||||
.com {
|
||||
@ -673,27 +368,6 @@
|
||||
margin-bottom: 38.6rpx;
|
||||
}
|
||||
|
||||
.project {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
|
||||
.edit {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
|
||||
&::after {
|
||||
content: ">";
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.edit2 {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
@ -707,18 +381,11 @@
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
// margin: 0 0 33.33rpx 33.33rpx !important;
|
||||
|
||||
.icon_img {
|
||||
width: 83.16rpx;
|
||||
height: 83.16rpx;
|
||||
}
|
||||
|
||||
.icon {
|
||||
position: absolute;
|
||||
top: -5rpx;
|
||||
right: 25rpx;
|
||||
width: 63.16rpx;
|
||||
height: 63.16rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
@ -751,52 +418,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.edit_card {
|
||||
background-color: #fff;
|
||||
padding-top: 28rpx;
|
||||
}
|
||||
|
||||
.rotate-box {
|
||||
transform: rotate(0deg);
|
||||
transition: transform .5s ease-out;
|
||||
}
|
||||
|
||||
.rotate-box:active {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
|
||||
.location {
|
||||
background-color: #f6f6f6;
|
||||
width: 680rpx;
|
||||
height: 150rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
border-radius: 20rpx;
|
||||
left: 50%;
|
||||
margin-left: -340rpx;
|
||||
margin-top: 80rpx;
|
||||
padding-left: 20rpx;
|
||||
|
||||
.locationa {
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.locationb {
|
||||
font-size: 20rpx;
|
||||
color: #5a5a5a;
|
||||
}
|
||||
|
||||
.locationx {
|
||||
color: #000;
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,347 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="swiper-css zqui-rel" :style="{ height: hpx }">
|
||||
<swiper class="swiper" :style="{ height: hpx }" :indicator-dots="indicatorDots" :autoplay="autoplay"
|
||||
disable-touch='true' :interval="interval" :duration="duration" @change="guideAction">
|
||||
<swiper-item v-for="(item, index) in imageList" :key="index" catchtouchmove="stopChange">
|
||||
<image class="image-size" mode="widthFix" :src="item.src" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<!-- 按钮样式切换 -->
|
||||
<template v-if="cur != 2">
|
||||
<view class=" flex-column dots">
|
||||
<block v-for="(item,index) in imageList" :key="index">
|
||||
<view class="dot" :class="{'active': index == cur}"></view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 第三张图使用按钮《立即进入》 -->
|
||||
<template v-if="cur == 1">
|
||||
<button class="flex-column cu-btn footer" @click="launchApp">立即体验</button>
|
||||
</template>
|
||||
<!-- 右上角跳过按钮 -->
|
||||
<view class="btn-box" @click="launchApp"><text class="passbtn">{{num}}跳过</text></view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const animation = weex.requireModule('animation');
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//修改图片,文字描述
|
||||
imageList: [
|
||||
{
|
||||
src: '/static/images/guide.png'
|
||||
}
|
||||
|
||||
],
|
||||
indicatorDots: false,
|
||||
autoplay: false,
|
||||
interval: 10000,
|
||||
duration: 500,
|
||||
iStatusBarHeight: '0px',
|
||||
hpx: '100%',
|
||||
cur: 0,
|
||||
dotsStyles: '',
|
||||
num: 3
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
let that = this;
|
||||
plus.navigator.closeSplashscreen();
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
that.hpx = res.windowHeight + 'px';
|
||||
}
|
||||
});
|
||||
},
|
||||
onReady() {
|
||||
// this.move(0, 1);
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.countDown()
|
||||
|
||||
},
|
||||
methods: {
|
||||
countDown() {
|
||||
let {
|
||||
num
|
||||
} = this;
|
||||
// if (num === 3) this.nums = true;
|
||||
num = num > 0 ? num - 1 : "GO";
|
||||
setTimeout(() => {
|
||||
this.num = num;
|
||||
if (num == 'GO') {
|
||||
this.launchApp()
|
||||
return
|
||||
}
|
||||
this.countDown();
|
||||
}, 1000);
|
||||
|
||||
|
||||
},
|
||||
|
||||
stopTouchMove: function() {
|
||||
return false;
|
||||
},
|
||||
|
||||
launchApp() {
|
||||
|
||||
//跳过引导页,储存本地值,下次进入直接跳过
|
||||
uni.setStorage({
|
||||
key: 'launchFlag',
|
||||
data: true,
|
||||
success() {
|
||||
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
guideAction(event) {
|
||||
let that = this,
|
||||
index = event.detail.current;
|
||||
that.cur = index;
|
||||
// if (index == 0) {
|
||||
// that.move(0, 1);
|
||||
// that.moveTwo(150, 0.1);
|
||||
// that.moveThree(150, 0.1);
|
||||
// that.lefMainAction(0);
|
||||
// }
|
||||
// if (index == 1) {
|
||||
// that.moveTwo(0, 1);
|
||||
// that.move(150, 0.1);
|
||||
// that.moveThree(150, 0.1);
|
||||
// that.lefMainAction(uni.upx2px(80) + 'px');
|
||||
// }
|
||||
// if (index == 2) {
|
||||
// that.moveThree(0, 1);
|
||||
// that.moveTwo(150, 0.1);
|
||||
// that.move(150, 0.1);
|
||||
// that.lefMainAction(uni.upx2px(160) + 'px');
|
||||
// }
|
||||
},
|
||||
lefMainAction(mum) {
|
||||
var testLM = this.$refs.lefMain;
|
||||
animation.transition(
|
||||
testLM, {
|
||||
styles: {
|
||||
transform: 'translate(' + mum + ',0px)'
|
||||
},
|
||||
duration: 400, //ms
|
||||
timingFunction: 'ease',
|
||||
delay: 0 //ms
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
},
|
||||
move(tran, opa) {
|
||||
var testEl = this.$refs.box1;
|
||||
animation.transition(
|
||||
testEl, {
|
||||
styles: {
|
||||
transform: 'translate(' + tran + 'px,0px)',
|
||||
transformOrigin: 'center center',
|
||||
opacity: opa
|
||||
},
|
||||
duration: 800, //ms
|
||||
timingFunction: 'ease',
|
||||
delay: 0 //ms
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
var textE2 = this.$refs.box2;
|
||||
animation.transition(
|
||||
textE2, {
|
||||
styles: {
|
||||
transform: 'translate(0px,' + tran + 'px) scale(' + opa + ')',
|
||||
transformOrigin: 'center center',
|
||||
opacity: opa
|
||||
},
|
||||
duration: 800, //ms
|
||||
timingFunction: 'ease',
|
||||
delay: 0 //ms
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
},
|
||||
moveTwo(tran, opa) {
|
||||
var testEl = this.$refs.box3;
|
||||
animation.transition(
|
||||
testEl, {
|
||||
styles: {
|
||||
transform: 'translate(' + tran + 'px,0px)',
|
||||
transformOrigin: 'center center',
|
||||
opacity: opa
|
||||
},
|
||||
duration: 800, //ms
|
||||
timingFunction: 'ease',
|
||||
delay: 0 //ms
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
var textE2 = this.$refs.box4;
|
||||
animation.transition(
|
||||
textE2, {
|
||||
styles: {
|
||||
transform: 'translate(0px,' + tran + 'px) scale(' + opa + ')',
|
||||
transformOrigin: 'center center',
|
||||
opacity: opa
|
||||
},
|
||||
duration: 800, //ms
|
||||
timingFunction: 'ease',
|
||||
delay: 0 //ms
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
},
|
||||
moveThree(tran, opa) {
|
||||
var testEl = this.$refs.box5;
|
||||
animation.transition(
|
||||
testEl, {
|
||||
styles: {
|
||||
transform: 'translate(' + tran + 'px,0px)',
|
||||
transformOrigin: 'center center',
|
||||
opacity: opa
|
||||
},
|
||||
duration: 800, //ms
|
||||
timingFunction: 'ease',
|
||||
delay: 0 //ms
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
var textE2 = this.$refs.box6;
|
||||
animation.transition(
|
||||
textE2, {
|
||||
styles: {
|
||||
transform: 'translate(0px,' + tran + 'px) scale(' + opa + ')',
|
||||
transformOrigin: 'center center',
|
||||
opacity: opa
|
||||
},
|
||||
duration: 800, //ms
|
||||
timingFunction: 'ease',
|
||||
delay: 0 //ms
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.guide {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.image-size {
|
||||
width: 750rpx;
|
||||
height: 100%;
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
.title-box {
|
||||
padding: 250rpx 0 120rpx 64rpx;
|
||||
}
|
||||
|
||||
.guide-title {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
color: rgba(58, 61, 68, 1);
|
||||
}
|
||||
|
||||
.guide-subtitle {
|
||||
margin-top: 20rpx;
|
||||
font-size: 35rpx;
|
||||
color: rgba(131, 136, 146, 1);
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 231rpx;
|
||||
height: 80rpx;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
bottom: 116rpx;
|
||||
left: 37%;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
background-color: #2B9939;
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
right: 40rpx;
|
||||
top: 120rpx;
|
||||
}
|
||||
|
||||
.dots {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
height: 151rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 20rpx;
|
||||
}
|
||||
|
||||
.passbtn {
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
border-width: 1rpx;
|
||||
border-color: rgba(255, 255, 255, 0.5);
|
||||
border-style: solid;
|
||||
border-radius: 30rpx;
|
||||
font-size: 28rpx;
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 10rpx;
|
||||
padding-left: 25rpx;
|
||||
padding-right: 25rpx;
|
||||
}
|
||||
|
||||
.dot {
|
||||
margin: 0 4rpx;
|
||||
width: 15rpx;
|
||||
height: 15rpx;
|
||||
background: #CDD2DD;
|
||||
border-radius: 8rpx;
|
||||
transition: all .6s;
|
||||
}
|
||||
|
||||
.dot.active {
|
||||
width: 40rpx;
|
||||
background: #838892 !important;
|
||||
}
|
||||
|
||||
/* 相对定位 */
|
||||
.zqui-rel {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.swiper-css {
|
||||
width: 750rpx;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
width: 750rpx;
|
||||
}
|
||||
</style>
|
@ -1,33 +0,0 @@
|
||||
<template>
|
||||
<view class="content"></view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
onLoad() {
|
||||
this.checkGuide();
|
||||
},
|
||||
methods: {
|
||||
checkGuide() {
|
||||
console.log("进入checkGuide判断页");
|
||||
// 思路: 检测是否有启动缓存,如果没有,就是第一次启动,第一次启动就去 启动介绍页面
|
||||
try {
|
||||
var launchFlag = uni.getStorageSync('launchFlag');
|
||||
// console.log("launchFlag:" + launchFlag);
|
||||
if (launchFlag) { //判断本地缓存跳转首页
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
} else { //没有缓存进入启动页引导页
|
||||
console.log('去引导页');
|
||||
uni.redirectTo({
|
||||
url: '/pages/guide/guide'
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
File diff suppressed because it is too large
Load Diff
@ -1,84 +0,0 @@
|
||||
<template>
|
||||
|
||||
<view class="box" style="position: relative;">
|
||||
<image @click="back" class="bg_back"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
|
||||
<view class="li" @click="navSw('/pages/index/index')">
|
||||
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/edf53202401271436507555.png" width="690rpx"
|
||||
height="200rpx" style="position: absolute;" />
|
||||
<view class="btn">
|
||||
我是居民用户
|
||||
</view>
|
||||
</view>
|
||||
<view class="li" style="margin-top: 50rpx;" @click="navgo('/pages/helpPeople/formTable')">
|
||||
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/8489c202401271437055619.png" width="690rpx"
|
||||
height="200rpx" style="position: absolute;" />
|
||||
<view class="btn">
|
||||
我是农民用户
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
back(){
|
||||
uni.navigateBack();
|
||||
},
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
navSw(url){
|
||||
uni.switchTab({
|
||||
url:url
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.box {
|
||||
width: 750rpx;
|
||||
height: 1624rpx;
|
||||
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/9c4b4202401271437449183.png');
|
||||
background-size: 100% 100%;
|
||||
padding-top: 500rpx;
|
||||
}
|
||||
|
||||
|
||||
.li {
|
||||
margin: 0rpx auto;
|
||||
width: 690rpx;
|
||||
height: 200rpx;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
|
||||
.btn {
|
||||
z-index: 999;
|
||||
position: absolute;
|
||||
width: 287rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
opacity: 1;
|
||||
border: 2rpx solid #FF5E0C;
|
||||
text-align: center;
|
||||
line-height: 76rpx;
|
||||
color: #FF5E0C;
|
||||
font-size: 34rpx;
|
||||
right: 50rpx;
|
||||
bottom: 50rpx;
|
||||
|
||||
}
|
||||
}
|
||||
.bg_back {
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: calc(var(--status-bar-height) + 30rpx);
|
||||
left: 30rpx;
|
||||
}
|
||||
</style>
|
@ -1,379 +1,364 @@
|
||||
<template>
|
||||
<view class="Circle_friends">
|
||||
<view class="circle_friends_wrapper">
|
||||
<view class="Circle_friends">
|
||||
<view class="circle_friends_wrapper">
|
||||
|
||||
<zbpSwiper></zbpSwiper>
|
||||
<zbpSwiper></zbpSwiper>
|
||||
|
||||
<view class="tabs_wrapper">
|
||||
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
|
||||
</view>
|
||||
<view class="tabs_wrapper">
|
||||
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
|
||||
</view>
|
||||
|
||||
<view class="goods">
|
||||
<block v-for="(item,index) in cateGoods" :key="index">
|
||||
<view class="goods_item" @click="gogogo(item)">
|
||||
<image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
|
||||
<view class="botm">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="goods_info flex_a_c">
|
||||
<view class="l_info flex_a_c">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
|
||||
mode="aspectFit" class="g_img"></image>
|
||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||
</view>
|
||||
<view class="nice_box" @click.stop="giveStart(item)">
|
||||
<text class="iconfont"
|
||||
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text class="collect">{{item.count_start}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="empty_wrapper" v-if="emptyShow">
|
||||
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods">
|
||||
<block v-for="(item,index) in cateGoods" :key="index">
|
||||
<view class="goods_item" @click="gogogo(item)">
|
||||
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
|
||||
<view class="botm">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="goods_info flex_a_c">
|
||||
<view class="l_info flex_a_c">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill"
|
||||
class="g_img"></image>
|
||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||
</view>
|
||||
<view class="nice_box" @click.stop="giveStart(item)">
|
||||
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text class="collect">{{item.count_start}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="empty_wrapper" v-if="emptyShow">
|
||||
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
|
||||
<!-- <view class="bg_color"></view> -->
|
||||
<!-- <view class="bg_color"></view> -->
|
||||
|
||||
<!-- <m-tabbar native>
|
||||
<!-- <m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
<view class="custom_style">
|
||||
<view class="custom_style_icon"></view>
|
||||
</view>
|
||||
</template>
|
||||
</m-tabbar> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import { wgsToGcj } from "@/utils/wgs.js";
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import {
|
||||
getSlideAPI
|
||||
} from '@/api/lihai.js'
|
||||
import {
|
||||
graphicLstApi,
|
||||
getTopicList,
|
||||
graphicStartApi
|
||||
} from '@/api/community.js'
|
||||
import {
|
||||
getIndexData,
|
||||
getDiy
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
getGeocoder,
|
||||
merClassifly
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
getArea,
|
||||
getStreet
|
||||
} from '@/api/article.js';
|
||||
import {
|
||||
Toast
|
||||
} from '@/libs/uniApi'
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bgColor: '',
|
||||
showPicker: false,
|
||||
columnData: [],
|
||||
show: false,
|
||||
swiper: {
|
||||
url: [{
|
||||
img: ''
|
||||
}],
|
||||
indicatorDots: true, // 显示面板指示点
|
||||
vertical: false, // 滑动方向是否为纵向
|
||||
autoplay: true, // 是否自动切换
|
||||
interval: 2000, // 自动切换时间间隔
|
||||
duration: 500 // 滑动动画时长
|
||||
},
|
||||
tabsData: {
|
||||
list: [],
|
||||
tabsActive: 0
|
||||
},
|
||||
where: {
|
||||
category_id: 0,
|
||||
page: 1,
|
||||
limit: 30
|
||||
},
|
||||
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
||||
keyword: '',
|
||||
location: '',
|
||||
emptyShow: false,
|
||||
street: '',
|
||||
cateGoods: []
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onLoad() {
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
confirm(e) {
|
||||
this.where.street_id = e.value[1].code
|
||||
this.showPicker = false
|
||||
},
|
||||
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e;
|
||||
if (columnIndex === 0) {
|
||||
getStreet({
|
||||
area_code: value[0]['code']
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
Area() {
|
||||
getArea({
|
||||
city_code: 510500
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({
|
||||
area_code: code
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
gogogo(item) {
|
||||
if (this.tabsData.tabsActive == 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
|
||||
})
|
||||
}
|
||||
},
|
||||
giveStart(item) {
|
||||
let status = item.relevance_id ? 0 : 1
|
||||
graphicStartApi(item.community_id, {
|
||||
status: status
|
||||
}).then(res => {
|
||||
Toast(res.message)
|
||||
this.getGoods()
|
||||
})
|
||||
},
|
||||
dianji() {
|
||||
this.show = !this.show
|
||||
},
|
||||
// 获取发现商品
|
||||
getGoods: function() {
|
||||
// 数据写死:默认社区数据 category_id=69&page=1&limit=30
|
||||
graphicLstApi(this.where).then(res => {
|
||||
this.cateGoods = res.data.list
|
||||
res.data.list.length <= 0 ? this.emptyShow = true : this.emptyShow = false
|
||||
})
|
||||
},
|
||||
/*获取分类列表*/
|
||||
async getCateList() {
|
||||
const {
|
||||
data
|
||||
} = await getTopicList()
|
||||
this.tabsData.list = [{
|
||||
cate_name: "推荐",
|
||||
category_id: 0
|
||||
}, {
|
||||
cate_name: "视频",
|
||||
category_id: -1,
|
||||
children: []
|
||||
}, ...data]
|
||||
},
|
||||
tabsChange(item) {
|
||||
this.where.category_id = item.category_id
|
||||
this.getGoods()
|
||||
this.street_id = item.id
|
||||
this.tabsData.tabsActive = item.index
|
||||
if (item.index == 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
selfLocation() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
res = wgsToGcj(res);
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
getGeocoder({
|
||||
lat: latitude,
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
this.$store.commit('setLocation', res.data)
|
||||
this.street = res.data.address_component.street
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import { getSlideAPI } from '@/api/lihai.js'
|
||||
import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js'
|
||||
import { getIndexData, getDiy } from '@/api/api.js'
|
||||
import { getGeocoder, merClassifly } from '@/api/store.js';
|
||||
import { getArea, getStreet } from '@/api/article.js';
|
||||
import { Toast } from '@/libs/uniApi'
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bgColor: '',
|
||||
showPicker: false,
|
||||
columnData: [],
|
||||
show: false,
|
||||
swiper: {
|
||||
url: [{
|
||||
img: ''
|
||||
}],
|
||||
indicatorDots: true, // 显示面板指示点
|
||||
vertical: false, // 滑动方向是否为纵向
|
||||
autoplay: true, // 是否自动切换
|
||||
interval: 2000, // 自动切换时间间隔
|
||||
duration: 500 // 滑动动画时长
|
||||
},
|
||||
tabsData: {
|
||||
list: [],
|
||||
tabsActive: 0
|
||||
},
|
||||
where: {
|
||||
category_id: 0,
|
||||
page: 1,
|
||||
limit: 30
|
||||
},
|
||||
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
||||
keyword: '',
|
||||
location: '',
|
||||
emptyShow: false,
|
||||
street: '',
|
||||
cateGoods: []
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onLoad() {
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
confirm(e) {
|
||||
this.where.street_id = e.value[1].code
|
||||
this.showPicker = false
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e;
|
||||
if (columnIndex === 0) {
|
||||
getStreet({
|
||||
area_code: value[0]['code']
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
Area() {
|
||||
getArea({
|
||||
city_code: 510500
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({
|
||||
area_code: code
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
gogogo(item) {
|
||||
if (this.tabsData.tabsActive == 1) {
|
||||
uni.navigateTo({
|
||||
//#ifdef APP
|
||||
url: '/pages/short_video/appSwiper/index?id=' + item.community_id
|
||||
//#endif
|
||||
//#ifndef APP
|
||||
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id
|
||||
//#endif
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
|
||||
})
|
||||
}
|
||||
},
|
||||
giveStart(item) {
|
||||
let status = item.relevance_id ? 0 : 1
|
||||
graphicStartApi(item.community_id, {
|
||||
status: status
|
||||
}).then(res => {
|
||||
Toast(res.message)
|
||||
this.getGoods()
|
||||
})
|
||||
},
|
||||
dianji() {
|
||||
this.show = !this.show
|
||||
},
|
||||
// 获取发现商品
|
||||
getGoods: function() {
|
||||
// 数据写死:默认社区数据 category_id=69&page=1&limit=30
|
||||
graphicLstApi(this.where).then(res => {
|
||||
this.cateGoods = res.data.list
|
||||
res.data.list.length <= 0 ? this.emptyShow = true : this.emptyShow = false
|
||||
})
|
||||
},
|
||||
/*获取分类列表*/
|
||||
async getCateList() {
|
||||
const {
|
||||
data
|
||||
} = await getTopicList()
|
||||
this.tabsData.list = [{
|
||||
cate_name: "推荐",
|
||||
category_id: 0
|
||||
}, {
|
||||
cate_name: "视频",
|
||||
category_id: -1,
|
||||
children: []
|
||||
}, ...data]
|
||||
},
|
||||
tabsChange(item) {
|
||||
this.where.category_id = item.category_id
|
||||
this.getGoods()
|
||||
this.street_id = item.id
|
||||
this.tabsData.tabsActive = item.index
|
||||
if (item.index == 1) {
|
||||
uni.navigateTo({
|
||||
// #ifdef MP || H5
|
||||
url: '/pages/short_video/nvueSwiper/index?id=' + this.cateGoods[0].community_id
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
|
||||
// #endif
|
||||
})
|
||||
}
|
||||
},
|
||||
selfLocation() {
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: (res) => {
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
getGeocoder({ lat: latitude, long: longitude }).then(res => {
|
||||
this.$store.commit('setLocation', res.data)
|
||||
this.street = res.data.address_component.street
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
page {
|
||||
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
|
||||
.Circle_friends {
|
||||
position: relative;
|
||||
padding: 0 0 87.72rpx 0;
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
.Circle_friends {
|
||||
position: relative;
|
||||
padding: 0 0 87.72rpx 0;
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
|
||||
.circle_friends_wrapper {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
.circle_friends_wrapper {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
|
||||
.search_wrapper {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.search_wrapper {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.tabs_wrapper {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 21.05rpx;
|
||||
}
|
||||
.tabs_wrapper {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 21.05rpx;
|
||||
}
|
||||
|
||||
.empty_wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.empty_wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.goods {
|
||||
margin: 0 auto;
|
||||
width: 694.74rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.goods {
|
||||
margin: 0 auto;
|
||||
width: 694.74rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods_item {
|
||||
width: 342.11rpx;
|
||||
height: 491.23rpx;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 10.53rpx;
|
||||
.goods_item {
|
||||
width: 342.11rpx;
|
||||
height: 491.23rpx;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 10.53rpx;
|
||||
|
||||
.goods_img {
|
||||
width: 100%;
|
||||
height: 294.74rpx;
|
||||
}
|
||||
.goods_img {
|
||||
width: 100%;
|
||||
height: 294.74rpx;
|
||||
}
|
||||
|
||||
.botm {
|
||||
flex: 1;
|
||||
padding: 0 14.04rpx;
|
||||
padding-bottom: 21.05rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.botm {
|
||||
flex: 1;
|
||||
padding: 0 14.04rpx;
|
||||
padding-bottom: 21.05rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
margin: 12px 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.title {
|
||||
margin: 12px 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.goods_info {
|
||||
justify-content: space-between;
|
||||
.goods_info {
|
||||
justify-content: space-between;
|
||||
|
||||
.g_img {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.g_img {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.g_name {
|
||||
margin-left: 8.77rpx;
|
||||
width: 100.63rpx;
|
||||
text-overflow: ellipsis;
|
||||
/* 溢出显示省略号 */
|
||||
overflow: hidden;
|
||||
/* 溢出隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 强制不换行 */
|
||||
}
|
||||
.g_name {
|
||||
margin-left: 8.77rpx;
|
||||
width: 100.63rpx;
|
||||
text-overflow: ellipsis;
|
||||
/* 溢出显示省略号 */
|
||||
overflow: hidden;
|
||||
/* 溢出隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 强制不换行 */
|
||||
}
|
||||
|
||||
.nice_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.nice_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.isshow {
|
||||
color: #FE3530 !important;
|
||||
}
|
||||
.isshow {
|
||||
color: #FE3530 !important;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.icon-shoucang1 {
|
||||
color: #F84221;
|
||||
}
|
||||
.icon-shoucang1 {
|
||||
color: #F84221;
|
||||
}
|
||||
|
||||
.collect {
|
||||
font-size: 24rpx;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.collect {
|
||||
font-size: 24rpx;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -28,7 +28,7 @@
|
||||
</view>
|
||||
<view class="advertItem02 advertItem05 acea-row" v-if="style==4">
|
||||
<view class="item" v-for="(item,index) in picList" :key="index" @click="goDetail(item)">
|
||||
<image :src="item.image" mode="aspectFit" :style="'height:'+ imageH +'rpx;'"></image>
|
||||
<image :src="item.image" mode="aspectFill" :style="'height:'+ imageH +'rpx;'"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="advertItem02 advertItem06 acea-row" v-if="style==5">
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,337 +0,0 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="info">
|
||||
<view class="bg"></view>
|
||||
<view class="card">
|
||||
<view class="title">店铺押金信息</view>
|
||||
<view class="item">
|
||||
<text>已缴纳押金</text>
|
||||
<text>{{merchant_Data.paid_margin}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>剩余缴纳押金</text>
|
||||
<text>{{merchant_Data.unpaid_margin}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>缴纳店铺账户</text>
|
||||
<text>{{merchant_Data.mer_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price">
|
||||
<view class="title">缴纳金额</view>
|
||||
<view class="tab">
|
||||
<view class="item active" style="margin: 0;">{{merchant_Data.margin}}元</view>
|
||||
</view>
|
||||
<button class="btn" @click="paydecimal">缴纳</button>
|
||||
</view>
|
||||
<!-- <view class="tip">
|
||||
<view class="title">注意事项</view>
|
||||
<view class="text">充值后帐户的金额不能提现,可用于商城消费使用佣金导入账户之后不能再次导出、不可提现账户充值出现问题可联系商城客服,也可拨打商城客服热线<text @click="copyPhone('4008888888')">4008888888</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="content-order" v-for="(item,i ) in productList">
|
||||
<view class="">订单编号:{{item.order_sn}}</view>
|
||||
<view class="">支付金额:{{item.total_price}}</view>
|
||||
<view class="">支付状态:{{item.paid==1?'已支付':'待支付'}}</view>
|
||||
<view class="">支付时间:{{item.pay_time}}</view>
|
||||
</view>
|
||||
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
|
||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
merchant,
|
||||
paymerchant,
|
||||
marginlist
|
||||
} from '@/api/api.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mer_id: 0,
|
||||
merchant_Data: {},
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
productList: [],
|
||||
loadend: false,
|
||||
loading: false,
|
||||
loadTitle: '加载更多',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.mer_id = e.mer_id
|
||||
this.decimal()
|
||||
this.list(true)
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.productList.length > 0) {
|
||||
setTimeout(() => {
|
||||
this.list(false);
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
list(isPage) {
|
||||
let that = this;
|
||||
if (that.loadend) return;
|
||||
if (that.loading) return;
|
||||
if (isPage === true) that.$set(that, 'productList', []);
|
||||
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
marginlist(that.where).then(res => {
|
||||
let list = res.data.list;
|
||||
let productList = that.$util.SplitArray(list, that.productList);
|
||||
let loadend = list.length < that.where.limit;
|
||||
that.loadend = loadend;
|
||||
that.loading = false;
|
||||
that.loadTitle = loadend ? '已全部加载' : '加载更多';
|
||||
setTimeout(() => {
|
||||
that.$set(that, 'productList', productList);
|
||||
}, 500)
|
||||
|
||||
|
||||
that.$set(that.where, 'page', that.where.page + 1);
|
||||
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
|
||||
}).catch(err => {
|
||||
that.loading = false;
|
||||
that.loadTitle = '加载更多';
|
||||
});
|
||||
|
||||
},
|
||||
//获取押金信息
|
||||
decimal() {
|
||||
merchant({
|
||||
id: this.mer_id
|
||||
}).then((res) => {
|
||||
this.merchant_Data = res.data
|
||||
});
|
||||
},
|
||||
//缴纳押金
|
||||
paydecimal() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳押金',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
paymerchant().then((res) => {
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
orderInfo: res.data
|
||||
.config, //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
|
||||
success: (res) => {
|
||||
that.$util.Tips({
|
||||
title: '支付成功'
|
||||
});
|
||||
that.decimal()
|
||||
that.list(true)
|
||||
},
|
||||
fail: (err) => {
|
||||
that.$util.Tips({
|
||||
title: '支付失败'
|
||||
});
|
||||
console.log('fail:' + JSON.stringify(err));
|
||||
}
|
||||
});
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.content-order {
|
||||
background: #F4F4F4;
|
||||
border-radius: 21rpx 21rpx;
|
||||
margin-top: 30rpx;
|
||||
padding: 10rpx;
|
||||
margin-left: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
|
||||
view {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin: 20rpx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
height: 250rpx;
|
||||
|
||||
.bg {
|
||||
background-color: #FF5C2D;
|
||||
height: 170rpx;
|
||||
width: 100vw;
|
||||
border-radius: 0rpx 0rpx 28rpx 28rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 694rpx;
|
||||
min-height: 180rpx;
|
||||
background: #FFFFFF;
|
||||
margin-top: 38.55rpx;
|
||||
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
opacity: 1;
|
||||
padding: 31.5rpx 28rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
flex-shrink: 0;
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.price {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 28rpx;
|
||||
margin-top: 85rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 39rpx;
|
||||
margin-bottom: 42rpx;
|
||||
}
|
||||
|
||||
.tab {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: left;
|
||||
width: 694rpx;
|
||||
|
||||
.item {
|
||||
width: 217rpx;
|
||||
height: 131rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 7rpx 7rpx 7rpx 7rpx;
|
||||
border: 2rpx solid #F5F5F5;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
border: 2rpx solid #FF5C2D;
|
||||
color: #FF5C2D;
|
||||
}
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 100%;
|
||||
height: 112rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
opacity: 1;
|
||||
padding: 0 45.56rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 35rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 694rpx;
|
||||
height: 84rpx;
|
||||
margin-top: 73.6rpx;
|
||||
background: #FF5C2D;
|
||||
box-shadow: 0rpx 14rpx 44rpx 2rpx #E9EFF5;
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 28rpx;
|
||||
margin-top: 84rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #FF5C2D;
|
||||
line-height: 32rpx;
|
||||
margin-bottom: 21rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
line-height: 42rpx;
|
||||
-webkit-background-clip: text;
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
@ -1,195 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="bg">
|
||||
<image class="bg_img" mode="widthFix"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail.webp"></image>
|
||||
<image @click="back" class="bg_back"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
|
||||
<view class="b_body">
|
||||
<view class="b_content">
|
||||
<view v-if="info.content" v-html="info.content.content"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn_box">
|
||||
<image v-if="show_a1" @click="changeA(show_a1)" class="btn_image" mode="widthFix"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail_btn1.webp"></image>
|
||||
<image v-if="show_a2" @click="changeA(show_a2)" class="btn_image" mode="widthFix"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail_btn2.webp"></image>
|
||||
</view>
|
||||
<u-modal :show="show" :closeOnClickOverlay="true" :title="`[${activity.title}]`"
|
||||
content="选择活动后只有完成活动任务后才可参加另一个活动, 确定要参与这个活动吗" cancelText="我再想想" confirmText="参加活动" confirmColor="#e54841"
|
||||
@cancel="show = false" @confirm="joinA()" showCancelButton></u-modal>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
|
||||
:isGoIndex="false"></authorize>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { consumption, chooseConsumption } from "@/api/activity.js"
|
||||
import { getArticleList } from "@/api/api.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import authorize from "@/components/Authorize.vue";
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
export default {
|
||||
components: {
|
||||
authorize
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
userInfo: {},
|
||||
Alist: [],
|
||||
activity: {
|
||||
title: ''
|
||||
},
|
||||
show: false,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
is_join_activity: 0, //是否已确认参加活动
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getArticleList();
|
||||
this.is_join_activity = uni.getStorageSync('is_join_activity');
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfo();
|
||||
this.consumption();
|
||||
},
|
||||
computed: {
|
||||
show_a1() { //显示活动一
|
||||
return this.Alist.find(item => item.title == '用户消费补贴活动')
|
||||
},
|
||||
show_a2() { //显示活动二
|
||||
return this.Alist.find(item => item.title == '用户推荐拉新活动')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
consumption() {
|
||||
consumption().then(res => {
|
||||
this.Alist = res.data;
|
||||
})
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
changeA(item) {
|
||||
if (!this.userInfo.account) return this.openAuto();
|
||||
this.activity = item;
|
||||
if (this.is_join_activity) return this.joinA();
|
||||
this.show = true;
|
||||
},
|
||||
getArticleList() {
|
||||
getArticleList(25).then(res => {
|
||||
this.info = res.data.list[0]
|
||||
})
|
||||
},
|
||||
// 参加活动
|
||||
joinA() {
|
||||
chooseConsumption({
|
||||
coupon_id: this.activity.coupon_id,
|
||||
activity_id: 1, //活动默认传1即可
|
||||
}).then(res => {
|
||||
this.show = false;
|
||||
let url = '';
|
||||
if (this.activity.title == '用户消费补贴活动') url = "/pages/redpacket/redpack_type?type=1";
|
||||
if (this.activity.title == '用户推荐拉新活动') url = "/pages/newActivity/invitation/invitation";
|
||||
if (url) uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
}).catch(err => {
|
||||
this.show = false;
|
||||
this.$nextTick(() => {
|
||||
Toast('您正在参与活动,暂时不支持切换');
|
||||
})
|
||||
})
|
||||
uni.setStorageSync('is_join_activity', 1);
|
||||
this.is_join_activity = 1;
|
||||
},
|
||||
getUserInfo() {
|
||||
getUserInfo().then(res => {
|
||||
this.userInfo = res.data;
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
// 授权回调
|
||||
onLoadFun(data) {
|
||||
this.getUserInfo();
|
||||
this.isShowAuth = false;
|
||||
},
|
||||
// 打开授权
|
||||
openAuto() {
|
||||
// console.log('hajhcdsohjcosvjco')
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
},
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff5dd;
|
||||
}
|
||||
|
||||
.bg {
|
||||
position: relative;
|
||||
padding-bottom: 300rpx;
|
||||
|
||||
.bg_img {
|
||||
width: 750rpx;
|
||||
height: 652rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.bg_back {
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: calc(var(--status-bar-height) + 30rpx);
|
||||
left: 30rpx;
|
||||
}
|
||||
|
||||
.b_body {
|
||||
width: 710rpx;
|
||||
margin-left: 21rpx;
|
||||
margin-right: 19rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
border-radius: 0 0 60rpx 60rpx;
|
||||
padding: 28rpx;
|
||||
padding-top: 680rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.b_content {
|
||||
width: 100%;
|
||||
// height: 800rpx;
|
||||
// background-color: #eee;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.btn_box {
|
||||
position: fixed;
|
||||
bottom: 30rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
width: 710rpx;
|
||||
.btn_image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,909 +0,0 @@
|
||||
<template>
|
||||
<view class="m_body">
|
||||
<view class="bg">
|
||||
<view class="bg_box">
|
||||
<image class="bg_img" mode="widthFix"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/recharge.webp"></image>
|
||||
<view class="bg_border"></view>
|
||||
</view>
|
||||
<image @click="back" class="bg_back"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
|
||||
<view class="body_card">
|
||||
<view class="card1">
|
||||
<view class="change_list">
|
||||
<view class="change_item" @click="changeItem(item, index)"
|
||||
v-for="(item, index) in changeList" :key="index">
|
||||
<image class="item_pic" :src="item.pic"></image>
|
||||
<view class="item_content">
|
||||
<view class="top">
|
||||
<view class="top_left"><text class="c_icon">¥</text> <text class="c_content">{{item.count}}</text> <text class="tips">现在购买礼包即送</text></view>
|
||||
<view class="top_right">
|
||||
<text>数量: </text>
|
||||
<view @click="reduce(item)">- </view>
|
||||
<view>{{item.num}} </view>
|
||||
<view @click="append(item)">+ </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="bottom_item">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
|
||||
<view class="text">{{tipType[red_type].red1}}</view>
|
||||
</view>
|
||||
<view class="bottom_item">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
|
||||
<view class="text">{{tipType[red_type].red2}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<view class="f_tip">
|
||||
总计购买礼包金额:
|
||||
<view class="price">
|
||||
<text>{{total}}</text>元
|
||||
</view>
|
||||
</view>
|
||||
<view class="primary_btn" @click="$u.throttle(submitSub, 1500)">立即购买</view>
|
||||
</view>
|
||||
<uni-popup ref="redTipsRef">
|
||||
<view class="ref_ref">
|
||||
<view class="ref_top">
|
||||
购买礼包金额达到
|
||||
<text v-if="red_type==0">100-2000</text>
|
||||
<text v-if="red_type==1">2001-4000</text>
|
||||
<text v-if="red_type==2">4001-20000</text>
|
||||
!
|
||||
</view>
|
||||
<view class="ref_center">
|
||||
赠送红包变为
|
||||
</view>
|
||||
<view class="ref_bottom">
|
||||
<view class="bottom_item">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
|
||||
<view class="text">{{tipType[red_type].red1}}</view>
|
||||
</view>
|
||||
<view class="bottom_item">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
|
||||
<view class="text">{{tipType[red_type].red2}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<payment :payMode="payMode" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun"
|
||||
:totalPrice="totalPrice"></payment>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCommissionInfo } from "@/api/user.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import {
|
||||
getUserInfo,
|
||||
spreadInfo,
|
||||
rechargeWechat
|
||||
} from '@/api/user.js';
|
||||
import authorize from '@/components/Authorize';
|
||||
import payment from '@/components/payment';
|
||||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
payment
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
curNow: 0,
|
||||
list1: [{
|
||||
name: '余额购买'
|
||||
}, {
|
||||
name: '购买记录'
|
||||
}],
|
||||
changeList: [
|
||||
{
|
||||
count: 100, // 面额
|
||||
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item1.webp',
|
||||
num: 0, //购买的个数
|
||||
},
|
||||
{
|
||||
count: 200,
|
||||
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item2.webp',
|
||||
num: 0, //购买的个数
|
||||
},
|
||||
{
|
||||
count: 500,
|
||||
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item3.webp',
|
||||
num: 0, //购买的个数
|
||||
},
|
||||
{
|
||||
count: 1000,
|
||||
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item4.webp',
|
||||
num: 0, //购买的个数
|
||||
}
|
||||
],
|
||||
nowChange: 0,
|
||||
nowPrice: 0,
|
||||
priceCount: 1,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
recordList: [],
|
||||
tipType: [
|
||||
{
|
||||
red1: '8%无门槛红包',
|
||||
red2: '42%现金抵扣红包'
|
||||
},
|
||||
{
|
||||
red1: '12%无门槛红包',
|
||||
red2: '68%现金抵扣红包'
|
||||
},
|
||||
{
|
||||
red1: '15%无门槛红包',
|
||||
red2: '85%现金抵扣红包'
|
||||
},
|
||||
],
|
||||
red_type: 0,
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 15,
|
||||
type: 2
|
||||
},
|
||||
otherValue: '其他',
|
||||
now_money: 0,
|
||||
navRecharge: ['账户购买', '佣金转入'],
|
||||
active: 0,
|
||||
number: '',
|
||||
from: '',
|
||||
placeholder: "0.00",
|
||||
picList: [],
|
||||
activePic: 0,
|
||||
money: "",
|
||||
numberPic: '',
|
||||
rechar_id: '0',
|
||||
rechargeAttention: [],
|
||||
pay_close: false,
|
||||
totalPrice: '0',
|
||||
payMode: [{
|
||||
name: '微信支付',
|
||||
icon: 'icon-weixinzhifu',
|
||||
// #ifdef H5
|
||||
value: 'h5',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'routine',
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
value: 'weixin',
|
||||
// #endif
|
||||
title: '微信快捷支付',
|
||||
payStatus: true
|
||||
}],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
if (this.isLogin) {
|
||||
this.getUserInfo()
|
||||
} else {
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'viewColor', 'keyColor']),
|
||||
total() {
|
||||
return this.changeList.reduce((t, obj)=>{
|
||||
return t + (obj.count * obj.num);
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getCommissionInfo();
|
||||
},
|
||||
methods: {
|
||||
back(){
|
||||
uni.navigateBack();
|
||||
},
|
||||
clickTab1(e) {
|
||||
this.curNow = e.index;
|
||||
if (e.index == 1) {
|
||||
this.recordList = [];
|
||||
this.where.page = 1;
|
||||
this.getCommissionInfo();
|
||||
}
|
||||
},
|
||||
changeItem(e, index) {
|
||||
this.nowPrice = e;
|
||||
this.nowChange = index;
|
||||
if (this.priceCount * this.nowPrice > 20000) {
|
||||
this.priceCount = Math.floor(20000 / this.nowPrice);
|
||||
return Toast('不可超过2万元');
|
||||
}
|
||||
},
|
||||
append(item) {
|
||||
if(this.total + item.count >=2001 && this.total + item.count <=4000 && this.red_type != 1){
|
||||
this.red_type = 1;
|
||||
this.$refs.redTipsRef.open();
|
||||
}else if(this.total + item.count >=4001 && this.total + item.count <=20000 && this.red_type != 2){
|
||||
this.red_type = 2;
|
||||
this.$refs.redTipsRef.open();
|
||||
}
|
||||
if (this.total + item.count > 20000 || this.total>=20000) {
|
||||
return Toast('不可超过2万元');
|
||||
} else item.num++;
|
||||
},
|
||||
reduce(item) {
|
||||
if(this.total - item.count >=100 && this.total - item.count <=2000 && this.red_type != 0){
|
||||
this.red_type = 0;
|
||||
this.$refs.redTipsRef.open();
|
||||
}else if(this.total - item.count >=2001 && this.total - item.count <=4000 && this.red_type != 1){
|
||||
this.red_type = 1;
|
||||
this.$refs.redTipsRef.open();
|
||||
}
|
||||
if (this.total==0||item.num==0) return Toast('不能再少啦');
|
||||
else item.num--;
|
||||
},
|
||||
getCommissionInfo() {
|
||||
getCommissionInfo(this.where).then((res) => {
|
||||
if (res.data.list.length > 0) {
|
||||
this.recordList = [...this.recordList, ...res.data.list];
|
||||
if (res.data.list.length >= 15) this.where.page++;
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 选择金额
|
||||
*/
|
||||
picCharge(idx, item) {
|
||||
this.activePic = idx;
|
||||
if (item === undefined) {
|
||||
this.rechar_id = '0';
|
||||
this.numberPic = "";
|
||||
this.otherValue = ''
|
||||
} else {
|
||||
this.otherValue = '其他'
|
||||
this.total = "";
|
||||
this.rechar_id = item.id.toString();
|
||||
this.numberPic = item.data.price;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 购买额度选择
|
||||
*/
|
||||
getRecharge() {
|
||||
getRechargeApi()
|
||||
.then(res => {
|
||||
this.picList = res.data.recharge_quota;
|
||||
if (this.picList[0]) {
|
||||
this.rechar_id = this.picList[0].id.toString();
|
||||
this.numberPic = this.picList[0].data.price;
|
||||
}
|
||||
this.rechargeAttention = res.data.recharge_attention || [];
|
||||
})
|
||||
.catch(res => {
|
||||
this.$dialog.toast({
|
||||
mes: res
|
||||
});
|
||||
});
|
||||
},
|
||||
onLoadFun: function() {
|
||||
this.isShowAuth = false;
|
||||
this.getUserInfo();
|
||||
this.getRecharge();
|
||||
},
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
navRecharges: function(index) {
|
||||
this.active = index;
|
||||
},
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
getUserInfo: function() {
|
||||
let that = this;
|
||||
spreadInfo().then(res => {
|
||||
that.$set(that, 'userInfo', res.data);
|
||||
})
|
||||
},
|
||||
payClose: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
payCheck: function(type) {
|
||||
this.createOrder(type);
|
||||
},
|
||||
|
||||
/*
|
||||
* 用户购买
|
||||
*/
|
||||
submitSub: function(e) {
|
||||
let that = this
|
||||
let value = this.total;
|
||||
// 转入余额
|
||||
if (that.active) {
|
||||
if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
|
||||
return that.$util.Tips({
|
||||
title: '请输入金额'
|
||||
});
|
||||
}
|
||||
uni.showModal({
|
||||
title: '转入余额',
|
||||
content: '转入余额后无法再次转出,确认是否转入余额',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
rechargeBrokerage({
|
||||
brokerage: parseFloat(value),
|
||||
}).then(res => {
|
||||
// that.$set(that, 'userInfo.now_money', that.$util.$h.Add(value, that.userInfo.now_money))
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '转入成功'
|
||||
})
|
||||
// return that.$util.Tips({
|
||||
// title: '转入成功',
|
||||
// icon: 'success'
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: '/pages/users/user_money/index'
|
||||
// });
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
})
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
return that.$util.Tips({
|
||||
title: '已取消'
|
||||
});
|
||||
}
|
||||
},
|
||||
})
|
||||
} else {
|
||||
if (this.rechar_id == 0) {
|
||||
if (parseFloat(that.total) === 0) {
|
||||
return that.$util.Tips({
|
||||
title: '购买金额金额不能为0!'
|
||||
});
|
||||
}
|
||||
if (!that.total) {
|
||||
return that.$util.Tips({
|
||||
title: '请填写购买金额!'
|
||||
});
|
||||
}
|
||||
if (!Number(that.total)) {
|
||||
return that.$util.Tips({
|
||||
title: '请填写正确的金额!'
|
||||
});
|
||||
}
|
||||
}
|
||||
this.pay_close = true
|
||||
}
|
||||
},
|
||||
createOrder(type) {
|
||||
let that = this;
|
||||
let query = {
|
||||
price: that.rechar_id == 0 ? that.total : that.numberPic,
|
||||
recharge_id: that.rechar_id,
|
||||
type: type,
|
||||
// #ifdef H5
|
||||
return_url: location.port ? location.protocol + '//' + location.hostname + ':' + location.port +
|
||||
'/pages/users/user_money/money' : location.protocol + '//' + location.hostname +
|
||||
'/pages/users/user_money/money'
|
||||
// #endif
|
||||
};
|
||||
// #ifdef MP
|
||||
// openPaySubscribe().then(() => {
|
||||
rechargeWechat(query).then(res => {
|
||||
that.callPay(res);
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
// });
|
||||
// #endif
|
||||
// #ifndef MP
|
||||
rechargeWechat(query).then(res => {
|
||||
console.log('res', res);
|
||||
that.callPay(res);
|
||||
}).catch(err => {
|
||||
console.log('err', err);
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 调用支付
|
||||
callPay(res) {
|
||||
let that = this,
|
||||
status = res.data.type,
|
||||
orderId = res.data.recharge_id,
|
||||
callback_key = res.data.pay_key,
|
||||
jsConfig = res.data.config,
|
||||
goPages = '/pages/users/user_money/money';
|
||||
switch (status) {
|
||||
case 'ORDER_EXIST':
|
||||
case 'EXTEND_ORDER':
|
||||
case 'PAY_ERROR':
|
||||
case 'error':
|
||||
uni.hideLoading();
|
||||
Toast(res.message)
|
||||
// return that.$util.Tips({
|
||||
// title: res.message
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: goPages
|
||||
// });
|
||||
break;
|
||||
case 'success':
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: res.message
|
||||
})
|
||||
// if (that.seckillId)
|
||||
// return that.$util.Tips({
|
||||
// title: res.message,
|
||||
// icon: 'success'
|
||||
// }, {
|
||||
// tab: 4,
|
||||
// url: goPages
|
||||
// });
|
||||
// return that.$util.Tips({
|
||||
// title: res.message,
|
||||
// icon: 'success'
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: goPages
|
||||
// });
|
||||
break;
|
||||
case 'alipay':
|
||||
case "alipayQr":
|
||||
uni.hideLoading();
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' + jsConfig + '&type=10'
|
||||
})
|
||||
return;
|
||||
break;
|
||||
// #ifndef MP
|
||||
case "wechat":
|
||||
case "weixin":
|
||||
case "weixinApp":
|
||||
jsConfig.timeStamp = jsConfig.timestamp;
|
||||
// #ifndef APP-PLUS
|
||||
that.$wechat.pay(jsConfig).then(res => {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: res.message
|
||||
})
|
||||
// return that.$util.Tips({
|
||||
// title: res.message,
|
||||
// icon: 'success'
|
||||
// }, {
|
||||
// tab: 4,
|
||||
// url: goPages
|
||||
// });
|
||||
}).catch(res => {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '取消支付'
|
||||
})
|
||||
// if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
|
||||
// title: '取消支付'
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: goPages
|
||||
// });
|
||||
})
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
let mp_pay_name = ''
|
||||
if (uni.requestOrderPayment) {
|
||||
mp_pay_name = 'requestOrderPayment'
|
||||
} else {
|
||||
mp_pay_name = 'requestPayment'
|
||||
}
|
||||
uni[mp_pay_name]({
|
||||
provider: 'wxpay',
|
||||
orderInfo: jsConfig,
|
||||
success: (e) => {
|
||||
this.getUserInfo()
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '支付成功'
|
||||
})
|
||||
// let url = '/pages/users/user_money/money';
|
||||
// return that.$util.Tips({
|
||||
// title: '支付成功',
|
||||
// icon: 'success'
|
||||
// }, {
|
||||
// tab: 4,
|
||||
// url: url
|
||||
// });
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e);
|
||||
uni.showModal({
|
||||
content: "支付失败",
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
complete: () => {
|
||||
uni.hideLoading();
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
break;
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
case "routine":
|
||||
jsConfig.timeStamp = jsConfig.timestamp;
|
||||
let mp_pay_name = ''
|
||||
if (uni.requestOrderPayment) {
|
||||
mp_pay_name = 'requestOrderPayment'
|
||||
} else {
|
||||
mp_pay_name = 'requestPayment'
|
||||
}
|
||||
uni[mp_pay_name]({
|
||||
...jsConfig,
|
||||
success: function(res) {
|
||||
uni.hideLoading();
|
||||
that.getUserInfo();
|
||||
that.getRecharge();
|
||||
// console.log('12323424')
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '支付成功'
|
||||
})
|
||||
// return that.$util.Tips({
|
||||
// title: '支付成功',
|
||||
// icon: 'success'
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: goPages
|
||||
// });
|
||||
},
|
||||
fail: function(e) {
|
||||
uni.hideLoading();
|
||||
Toast('取消支付')
|
||||
// return that.$util.Tips({
|
||||
// title: '取消支付'
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: goPages
|
||||
// });
|
||||
},
|
||||
})
|
||||
break;
|
||||
// #endif
|
||||
case "balance":
|
||||
uni.hideLoading();
|
||||
//余额不足
|
||||
Toast(res.msg)
|
||||
// return that.$util.Tips({
|
||||
// title: res.msg
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: goPages
|
||||
// });
|
||||
break;
|
||||
// #ifdef H5
|
||||
case 'h5':
|
||||
let host = window.location.protocol + "//" + window.location.host;
|
||||
let url = `${host}/pages/users/user_money/money`
|
||||
let eUrl = encodeURIComponent(url)
|
||||
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
|
||||
let locations = `${jsurl}&redirect_url=${eUrl}`
|
||||
setTimeout(() => {
|
||||
location.href = locations;
|
||||
}, 100);
|
||||
break;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
case 'alipayApp':
|
||||
uni.requestPayment({
|
||||
provider: 'alipay',
|
||||
orderInfo: jsConfig,
|
||||
success: (e) => {
|
||||
this.getUserInfo()
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '支付成功'
|
||||
})
|
||||
// return that.$util.Tips({
|
||||
// title: '支付成功',
|
||||
// icon: 'success'
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: goPages
|
||||
// });
|
||||
},
|
||||
fail: (e) => {
|
||||
uni.showModal({
|
||||
content: "支付失败",
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
uni.redirectTo({
|
||||
url: goPages
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
complete: () => {
|
||||
uni.hideLoading();
|
||||
},
|
||||
});
|
||||
break;
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onChangeFun: function(e) {
|
||||
let opt = e;
|
||||
let action = opt.action || null;
|
||||
let value = opt.value != undefined ? opt.value : null;
|
||||
action && this[action] && this[action](value);
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
.bg {
|
||||
position: relative;
|
||||
padding-bottom: 300rpx;
|
||||
|
||||
.bg_box{
|
||||
height: 486rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.bg_img {
|
||||
width: 750rpx;
|
||||
height: 652rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.bg_border{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 30rpx;
|
||||
border-radius: 60rpx 60rpx 0 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.bg_back {
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: calc(var(--status-bar-height) + 30rpx);
|
||||
left: 30rpx;
|
||||
}
|
||||
|
||||
.body_card {
|
||||
color: #333;
|
||||
|
||||
.card1 {
|
||||
background-color: #fff;
|
||||
|
||||
.change_list {
|
||||
width: 700rpx;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.change_item {
|
||||
width: 700rpx;
|
||||
height: 172rpx;
|
||||
text-align: center;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
font-size: 40rpx;
|
||||
position: relative;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.item_pic{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.item_content{
|
||||
padding: 26rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.top{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 70rpx;
|
||||
.top_left{
|
||||
font-size: 58rpx;
|
||||
color: #ffc53d;
|
||||
display: flex;
|
||||
align-content: center;
|
||||
.tips{
|
||||
font-size: 24rpx;
|
||||
border: 5rpx solid #ffc53d;
|
||||
margin-left: 20rpx;
|
||||
padding: 5rpx 15rpx;
|
||||
border-radius: 60rpx;
|
||||
color: #7C5906;
|
||||
}
|
||||
.c_content{
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
.c_icon {
|
||||
padding-top: 15rpx;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
}
|
||||
.top_right{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #FF3A32;
|
||||
text{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
view{
|
||||
height: 60rpx;
|
||||
width: 40rpx;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom{
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #FF3A32;
|
||||
.bottom_item{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
image{
|
||||
width: 32rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.text{
|
||||
padding-left: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.change_item_active {
|
||||
background: rgba(#FF8056, 0.2);
|
||||
border: 5rpx solid #FF8056;
|
||||
color: #FF8056;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.m_body {
|
||||
|
||||
.footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 120rpx;
|
||||
width: 100vw;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 20rpx;
|
||||
|
||||
.f_tip {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
font-style: 26rpx;
|
||||
|
||||
.price {
|
||||
color: #FF8056;
|
||||
|
||||
text {
|
||||
font-size: 44rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.primary_btn {
|
||||
background-color: #fa8147;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
width: 180rpx;
|
||||
color: #fff;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ref_ref{
|
||||
width: 630rpx;
|
||||
height: 200rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx 10rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.ref_top{
|
||||
color: #ffc53d;
|
||||
}
|
||||
.ref_center{
|
||||
font-size: 24rpx;
|
||||
border: 5rpx solid #ffc53d;
|
||||
margin-left: 20rpx;
|
||||
padding: 5rpx 15rpx;
|
||||
border-radius: 60rpx;
|
||||
color: #7C5906;
|
||||
}
|
||||
.ref_bottom{
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: #FF3A32;
|
||||
.bottom_item{
|
||||
width: 280rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
image{
|
||||
width: 32rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.text{
|
||||
padding-left: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,384 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="bg">
|
||||
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/invitation.webp"></image>
|
||||
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
|
||||
<view class="bg_body">
|
||||
<view class="b_qr">
|
||||
<view class="qr_body">
|
||||
<view class="qr_code">
|
||||
<image :src="qr_img"></image>
|
||||
</view>
|
||||
<view class="qr_text">扫一扫,红包正在路上</view>
|
||||
<view class="qr_tips">温馨提示:邀请新用户才有机会获得红包哦</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b_user">
|
||||
<view class="users">
|
||||
<image v-for="(item, index) in info.user_info" :key="item.uid" class="avatar" :src="item.avatar||'/static/images/f.png'"></image>
|
||||
<block v-if="info.user_info.length<4">
|
||||
<view v-for="item in 4-info.user_info.length" :key="item+'n'" class="avatar_no">
|
||||
<u-icon name="plus" color="#fff" size="40rpx"></u-icon>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="u_tips">邀请新用户消费达目标金额,有机会领取红包哦~</view>
|
||||
<view class="u_btn">
|
||||
<image v-if="status==0" class="btn_image" @click="open" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/ibtn1.webp"></image>
|
||||
<image v-if="status==1" class="btn_image" @click="open" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/ibtn2.webp"></image>
|
||||
<image v-if="status==2" class="btn_image" @click="opened" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/ibtn3.webp"></image>
|
||||
</view>
|
||||
<uni-popup ref="redPacket">
|
||||
<view class="red_packet">
|
||||
<block v-if="status==0">
|
||||
<view class="packet_img">
|
||||
<image class="img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/red_packet1.webp"></image>
|
||||
<view class="p_text">
|
||||
<view class="big">抱歉!</view>
|
||||
<view class="smoll">有好友消费未达目标金额</view>
|
||||
<view class="smoll">无法领红包哦~</view>
|
||||
</view>
|
||||
</view>
|
||||
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png"></image>
|
||||
</block>
|
||||
<block v-if="status==1">
|
||||
<view class="packet_img" @click="openRedPacket()">
|
||||
<image class="img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/red_packet2.webp"></image>
|
||||
<view class="p_text">
|
||||
<view class="big">恭喜!</view>
|
||||
<view class="smoll">成功获得实物通用红包</view>
|
||||
<view class="smoll">赶快打开吧~</view>
|
||||
</view>
|
||||
</view>
|
||||
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png"></image>
|
||||
</block>
|
||||
<block v-if="status==2">
|
||||
<view class="packet_img">
|
||||
<image class="img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/red_packet3.webp"></image>
|
||||
<view class="p_text" style="bottom: 60rpx;">
|
||||
<view class="smoll">恭喜你!成功获得</view>
|
||||
<view class="smoll red_count"><text class="count">{{red_packet.amount}}</text>元</view>
|
||||
<view class="big2">购买指定商品可直接抵扣使用</view>
|
||||
<view class="smoll">{{red_packet.end_time}}过期</view>
|
||||
<image @click="close()" class="btn_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/put.webp"></image>
|
||||
</view>
|
||||
</view>
|
||||
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png"></image>
|
||||
</block>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
<view class="b_in_list">
|
||||
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/irecoed.webp"></image>
|
||||
<view class="b_head">
|
||||
<view style="width: 120rpx;"></view>
|
||||
<view class="head_title" style="width: 200rpx;">名称</view>
|
||||
<view class="head_title" style="width: 130rpx;">ID</view>
|
||||
<view class="head_title" style="width: 120rpx;">目标金额</view>
|
||||
<view class="head_title" style="width: 120rpx;">状态</view>
|
||||
</view>
|
||||
<view class="b_content">
|
||||
<view class="content_list" v-for="(item, index) in info.user_info" :key="item.uid">
|
||||
<image class="avatar" :src="item.avatar||'/static/images/f.png'"></image>
|
||||
<view class="content_item" style="width: 180rpx;margin: 0 10rpx;">{{item.nickname}}</view>
|
||||
<view class="content_item" style="width: 130rpx;">{{item.uid}}</view>
|
||||
<view class="content_item" style="width: 120rpx;">{{item.target_amount}}<text class="mall">元</text></view>
|
||||
<view class="content_item" style="width: 120rpx;">
|
||||
<text v-if="item.is_finish" style="color: #18CE61;">已完成</text>
|
||||
<text v-else style="color: #FA5A29;">未完成</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="mall none">暂无记录</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { storeActivityStatus, storeActivityReceive, storeActivityQrcode } from "@/api/activity.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
user_info: []
|
||||
},
|
||||
red_packet: {
|
||||
amount: '0.00',
|
||||
end_time: ''
|
||||
},
|
||||
status: 0, //0不可开, 1可开, 2已开
|
||||
qr_img: ''
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
this.storeActivityQrcode();
|
||||
this.loadInfo();
|
||||
},
|
||||
methods: {
|
||||
back(){
|
||||
uni.navigateBack()
|
||||
},
|
||||
loadInfo(){
|
||||
storeActivityStatus().then(res=>{
|
||||
this.info = res.data;
|
||||
if(res.data.allow_receive) this.status = 1;
|
||||
})
|
||||
},
|
||||
opened(){
|
||||
Toast('已经领取过啦!');
|
||||
},
|
||||
open(){
|
||||
this.$refs.redPacket.open();
|
||||
},
|
||||
close(){
|
||||
this.$refs.redPacket.close();
|
||||
},
|
||||
storeActivityQrcode(){
|
||||
storeActivityQrcode().then(res=>{
|
||||
this.qr_img = res.data.url;
|
||||
})
|
||||
},
|
||||
// 打开红包
|
||||
async openRedPacket(){
|
||||
this.$refs.redPacket.close();
|
||||
try{
|
||||
let {data} = await storeActivityReceive();
|
||||
this.$nextTick(()=>{
|
||||
this.red_packet = data;
|
||||
this.$u.sleep(800).then(()=>{
|
||||
this.status = 2;
|
||||
this.$u.sleep(100).then(()=>{
|
||||
this.open();
|
||||
})
|
||||
})
|
||||
})
|
||||
}catch(e){
|
||||
Toast(e)
|
||||
}
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #ff864d;
|
||||
}
|
||||
.bg{
|
||||
position: relative;
|
||||
height: auto;
|
||||
.bg_img{
|
||||
width: 750rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.bg_back{
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: calc(var(--status-bar-height) + 30rpx);
|
||||
left: 30rpx;
|
||||
}
|
||||
.bg_body{
|
||||
position: absolute;
|
||||
top: 414rpx;
|
||||
left: 0;
|
||||
.b_qr{
|
||||
width: 710rpx;
|
||||
height: 750rpx;
|
||||
margin: 0 20rpx;
|
||||
// background: linear-gradient(to top, #FFE3AE 0%, #FFF6EB 100%);
|
||||
background: #FFF6EB;
|
||||
border-radius: 50rpx;
|
||||
padding: 20rpx;
|
||||
.qr_body{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 5rpx solid #ffd588;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
flex-direction: column;
|
||||
.qr_code{
|
||||
width: 510rpx;
|
||||
height: 510rpx;
|
||||
// background-color: #f8962e;
|
||||
margin: 0 auto;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.qr_text{
|
||||
font-size: 36rpx;
|
||||
color: #C44100;
|
||||
font-weight: 500;
|
||||
}
|
||||
.qr_tips{
|
||||
font-size: 26rpx;
|
||||
color: #C44100;
|
||||
}
|
||||
}
|
||||
}
|
||||
.b_user{
|
||||
margin-top: 30rpx;
|
||||
.users{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.avatar{
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin: 15rpx;
|
||||
}
|
||||
.avatar_no{
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
font-weight: 200;
|
||||
border-radius: 50%;
|
||||
border: 2rpx dashed #fff;
|
||||
margin: 15rpx;
|
||||
background-color: rgba(#fff, 0.3);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.u_tips{
|
||||
color: #FFE5B3;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.u_btn{
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.btn_image{
|
||||
width: 403rpx;
|
||||
height: 113rpx;
|
||||
}
|
||||
}
|
||||
.red_packet{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.packet_img{
|
||||
width: 750rpx;
|
||||
position: relative;
|
||||
.img{
|
||||
width: 100%;
|
||||
}
|
||||
.p_text{
|
||||
position: absolute;
|
||||
bottom: 120rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
.big{
|
||||
font-size: 38rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.smoll{
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.big2{
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.btn_img{
|
||||
width: 310rpx;
|
||||
}
|
||||
.red_count{
|
||||
margin-top: 80rpx;
|
||||
margin-bottom: 40rpx;
|
||||
.count{
|
||||
font-size: 80rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.close_img{
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.b_in_list{
|
||||
width: 710rpx;
|
||||
margin: 0 20rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
|
||||
border-radius: 50rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
.body_head_img{
|
||||
width: 253rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.b_head{
|
||||
background-color: #fff2ed;
|
||||
border-radius: 20rpx;
|
||||
color: #854116;
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
text-align: center;
|
||||
.head_title{
|
||||
width: 150rpx;
|
||||
padding: 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.b_content{
|
||||
.mall{
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.content_list{
|
||||
background-color: #FFF6E9;
|
||||
border-radius: 20rpx;
|
||||
color: #C44100;
|
||||
padding-top: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 20rpx;
|
||||
text-align: center;
|
||||
.content_item{
|
||||
overflow: hidden;
|
||||
}
|
||||
.avatar{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
}
|
||||
.none{
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
@ -1,182 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view style="height: var(--status-bar-height);background-color: #e54841;"></view>
|
||||
<view class="bg">
|
||||
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/subsidy.webp"></image>
|
||||
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
|
||||
<view class="bg_title">补贴记录</view>
|
||||
<view class="b_title">
|
||||
<view>总计获得</view> <view class="count">{{total_amount}}</view> <view>元补贴红包</view>
|
||||
</view>
|
||||
<view class="b_body">
|
||||
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/srecord.webp"></image>
|
||||
<view class="b_head">
|
||||
<view class="head_title">消费金额</view>
|
||||
<view class="head_title">补贴金额</view>
|
||||
<view class="head_title2">红包获得时间</view>
|
||||
</view>
|
||||
<view class="b_content">
|
||||
<view class="content_list" v-for="(item, index) in list" :key="index">
|
||||
<view class="content_item">{{item.order_amount}}<text class="mall">元</text></view>
|
||||
<view class="content_item">{{item.coupon_price}}<text class="mall">元</text></view>
|
||||
<view class="content_item2"><text class="mall">{{item.create_time}}</text></view>
|
||||
</view>
|
||||
<view class="mall none" style="padding-top: 0;" v-if="list.length==0" @click="navTo">{{'暂无记录, 去消费领补贴 >>'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { storeActivityRecord } from "@/api/activity.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
total_amount: '0.00',
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
this.storeActivityRecord();
|
||||
},
|
||||
methods: {
|
||||
back(){
|
||||
uni.navigateBack()
|
||||
},
|
||||
storeActivityRecord(){
|
||||
storeActivityRecord().then(res=>{
|
||||
this.list = res.data.record;
|
||||
this.total_amount = res.data.total_amount || "0.00"
|
||||
})
|
||||
},
|
||||
navTo(){
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #ffe3bd;
|
||||
}
|
||||
.bg{
|
||||
position: relative;
|
||||
height: auto;
|
||||
.bg_img{
|
||||
width: 750rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.bg_back{
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
left: 30rpx;
|
||||
}
|
||||
.bg_title{
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
}
|
||||
.b_title{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
top: 225rpx;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #F1503F;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
.count{
|
||||
// height: 100%;
|
||||
font-size: 66rpx;
|
||||
font-weight: bold;
|
||||
margin: 10rpx 20rpx;
|
||||
}
|
||||
}
|
||||
.b_body{
|
||||
position: absolute;
|
||||
width: 710rpx;
|
||||
margin-left: 21rpx;
|
||||
margin-right: 19rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
top: 534rpx;
|
||||
left: 0;
|
||||
border-radius: 50rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
.body_head_img{
|
||||
width: 253rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.b_head{
|
||||
background-color: #FFF2E0;
|
||||
border-radius: 20rpx;
|
||||
color: #C44100;
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx 0;
|
||||
.head_title{
|
||||
padding-left: 20rpx;
|
||||
width: 190rpx;
|
||||
}
|
||||
.head_title2{
|
||||
padding-left: 20rpx;
|
||||
width: 280rpx;
|
||||
}
|
||||
}
|
||||
.b_content{
|
||||
background-color: #fff2ed;
|
||||
border-radius: 20rpx;
|
||||
color: #FF5A3A;
|
||||
padding-top: 20rpx;
|
||||
margin-top: 28rpx;
|
||||
font-size: 32rpx;
|
||||
.mall{
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.content_list{
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
.content_item{
|
||||
padding-left: 20rpx;
|
||||
width: 190rpx;
|
||||
}
|
||||
.content_item2{
|
||||
padding-left: 20rpx;
|
||||
width: 280rpx;
|
||||
}
|
||||
}
|
||||
.none{
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
@ -1,183 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="bg">
|
||||
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/subsidy.webp"></image>
|
||||
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
|
||||
<view class="bg_title">无门槛实物通用红包</view>
|
||||
<view class="b_title">
|
||||
<view>总计剩余</view> <view class="count">{{total_amount}}</view> <view>元通用红包</view>
|
||||
</view>
|
||||
<view class="b_body">
|
||||
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/srecord.webp"></image>
|
||||
<view class="b_head">
|
||||
<view class="head_title">消费金额</view>
|
||||
<view class="head_title">补贴金额</view>
|
||||
<view class="head_title2">红包获得时间</view>
|
||||
</view>
|
||||
<view class="b_content">
|
||||
<view class="content_list" v-for="(item, index) in list" :key="index">
|
||||
<view class="content_item">{{item.order_amount}}<text class="mall">元</text></view>
|
||||
<view class="content_item">{{item.coupon_price}}<text class="mall">元</text></view>
|
||||
<view class="content_item2"><text class="mall">{{item.create_time}}</text></view>
|
||||
</view>
|
||||
<view class="mall none" style="padding-top: 0;" v-if="list.length==0" @click="navTo">{{'暂无记录, 去消费领补贴 >>'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { storeActivityRecord } from "@/api/activity.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
total_amount: '0.00',
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
this.storeActivityRecord();
|
||||
},
|
||||
methods: {
|
||||
back(){
|
||||
uni.navigateBack()
|
||||
},
|
||||
storeActivityRecord(){
|
||||
storeActivityRecord({
|
||||
type: 1
|
||||
}).then(res=>{
|
||||
this.list = res.data.record;
|
||||
this.total_amount = res.data.total_amount || "0.00"
|
||||
})
|
||||
},
|
||||
navTo(){
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #ffe3bd;
|
||||
}
|
||||
.bg{
|
||||
position: relative;
|
||||
height: auto;
|
||||
.bg_img{
|
||||
width: 750rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.bg_back{
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: calc(var(--status-bar-height) + 30rpx);
|
||||
left: 30rpx;
|
||||
}
|
||||
.bg_title{
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
position: absolute;
|
||||
top: calc(var(--status-bar-height) + 30rpx);
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
}
|
||||
.b_title{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
top: 225rpx;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #F1503F;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
.count{
|
||||
// height: 100%;
|
||||
font-size: 66rpx;
|
||||
font-weight: bold;
|
||||
margin: 10rpx 20rpx;
|
||||
}
|
||||
}
|
||||
.b_body{
|
||||
position: absolute;
|
||||
width: 710rpx;
|
||||
margin-left: 21rpx;
|
||||
margin-right: 19rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
top: 534rpx;
|
||||
left: 0;
|
||||
border-radius: 50rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
.body_head_img{
|
||||
width: 253rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.b_head{
|
||||
background-color: #FFF2E0;
|
||||
border-radius: 20rpx;
|
||||
color: #C44100;
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx 0;
|
||||
.head_title{
|
||||
padding-left: 20rpx;
|
||||
width: 190rpx;
|
||||
}
|
||||
.head_title2{
|
||||
padding-left: 20rpx;
|
||||
width: 280rpx;
|
||||
}
|
||||
}
|
||||
.b_content{
|
||||
background-color: #fff2ed;
|
||||
border-radius: 20rpx;
|
||||
color: #FF5A3A;
|
||||
padding-top: 20rpx;
|
||||
margin-top: 28rpx;
|
||||
font-size: 32rpx;
|
||||
.mall{
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.content_list{
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
.content_item{
|
||||
padding-left: 20rpx;
|
||||
width: 190rpx;
|
||||
}
|
||||
.content_item2{
|
||||
padding-left: 20rpx;
|
||||
width: 280rpx;
|
||||
}
|
||||
}
|
||||
.none{
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
@ -1,183 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="bg">
|
||||
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/subsidy.webp"></image>
|
||||
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
|
||||
<view class="bg_title">现金抵扣红包</view>
|
||||
<view class="b_title">
|
||||
<view>总计剩余</view> <view class="count">{{total_amount}}</view> <view>元抵扣红包</view>
|
||||
</view>
|
||||
<view class="b_body">
|
||||
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/srecord.webp"></image>
|
||||
<view class="b_head">
|
||||
<view class="head_title">消费金额</view>
|
||||
<view class="head_title">补贴金额</view>
|
||||
<view class="head_title2">红包获得时间</view>
|
||||
</view>
|
||||
<view class="b_content">
|
||||
<view class="content_list" v-for="(item, index) in list" :key="index">
|
||||
<view class="content_item">{{item.order_amount}}<text class="mall">元</text></view>
|
||||
<view class="content_item">{{item.coupon_price}}<text class="mall">元</text></view>
|
||||
<view class="content_item2"><text class="mall">{{item.create_time}}</text></view>
|
||||
</view>
|
||||
<view class="mall none" style="padding-top: 0;" v-if="list.length==0" @click="navTo">{{'暂无记录, 去消费领补贴 >>'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { storeActivityRecord } from "@/api/activity.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
total_amount: '0.00',
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
this.storeActivityRecord();
|
||||
},
|
||||
methods: {
|
||||
back(){
|
||||
uni.navigateBack()
|
||||
},
|
||||
storeActivityRecord(){
|
||||
storeActivityRecord({
|
||||
type: 2
|
||||
}).then(res=>{
|
||||
this.list = res.data.record;
|
||||
this.total_amount = res.data.total_amount || "0.00"
|
||||
})
|
||||
},
|
||||
navTo(){
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #ffe3bd;
|
||||
}
|
||||
.bg{
|
||||
position: relative;
|
||||
height: auto;
|
||||
.bg_img{
|
||||
width: 750rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.bg_back{
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: calc(var(--status-bar-height) + 30rpx);
|
||||
left: 30rpx;
|
||||
}
|
||||
.bg_title{
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
position: absolute;
|
||||
top: calc(var(--status-bar-height) + 30rpx);
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
}
|
||||
.b_title{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
top: 225rpx;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #F1503F;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
.count{
|
||||
// height: 100%;
|
||||
font-size: 66rpx;
|
||||
font-weight: bold;
|
||||
margin: 10rpx 20rpx;
|
||||
}
|
||||
}
|
||||
.b_body{
|
||||
position: absolute;
|
||||
width: 710rpx;
|
||||
margin-left: 21rpx;
|
||||
margin-right: 19rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
top: 534rpx;
|
||||
left: 0;
|
||||
border-radius: 50rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
.body_head_img{
|
||||
width: 253rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.b_head{
|
||||
background-color: #FFF2E0;
|
||||
border-radius: 20rpx;
|
||||
color: #C44100;
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx 0;
|
||||
.head_title{
|
||||
padding-left: 20rpx;
|
||||
width: 190rpx;
|
||||
}
|
||||
.head_title2{
|
||||
padding-left: 20rpx;
|
||||
width: 280rpx;
|
||||
}
|
||||
}
|
||||
.b_content{
|
||||
background-color: #fff2ed;
|
||||
border-radius: 20rpx;
|
||||
color: #FF5A3A;
|
||||
padding-top: 20rpx;
|
||||
margin-top: 28rpx;
|
||||
font-size: 32rpx;
|
||||
.mall{
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.content_list{
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
.content_item{
|
||||
padding-left: 20rpx;
|
||||
width: 190rpx;
|
||||
}
|
||||
.content_item2{
|
||||
padding-left: 20rpx;
|
||||
width: 280rpx;
|
||||
}
|
||||
}
|
||||
.none{
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
@ -1,336 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="bg">
|
||||
<image class="bg_img" mode="widthFix"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/tow_price_bg.webp"></image>
|
||||
<image @click="back" class="bg_back"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
|
||||
<view class="b_body">
|
||||
<view class="b_content">
|
||||
<view style="padding-bottom: 16rpx;">
|
||||
<picker :range="addressList" range-key="street_name" @change="changeAddress">
|
||||
<block v-if="address.street_id">
|
||||
当前活动区域为 <text style="color: #f84221;margin-left: 5rpx;">[ {{address.townName}} ] , 点击切换</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<text style="color: #f84221;margin-left: 5rpx;">当前区域 [ {{address.townName}} ] 没有活动 , 点击切换</text>
|
||||
</block>
|
||||
</picker>
|
||||
</view>
|
||||
<block v-if="goodsList.length>0">
|
||||
<view v-if="item.product" v-for="(item, index) in goodsList" class="short_item" @click="clickProduct(item)">
|
||||
<image class="image" :src="item.product.image"></image>
|
||||
<view class="short_item_right">
|
||||
<view class="r_name">
|
||||
<text v-if="item.mer_labels_name" class="mer-labels">{{item.mer_labels_name}}</text>{{item.product.store_name}}
|
||||
</view>
|
||||
<view style="display: flex;justify-content: flex-start;margin-top: 5rpx;">
|
||||
<view class="r_street" v-if="item.merchant">{{item.merchant.street_name}}</view>
|
||||
<view class="r_type" v-if="item.product.store_info||getSkuName(item)||item.unit_name">
|
||||
<view v-if="getSkuName(item)">{{getSkuName(item)}}</view>
|
||||
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r_btn" v-if="item.product && item.product.price">
|
||||
<view style="color: #7f7f7f;">¥<text style="font-size: 33rpx;">{{ item.product.price.split('.')[0] }}.</text>{{item.product.price.split('.')[1]}} 限时特惠</view>
|
||||
<view class="qiang" :class="{'no_qiang': !can_buy}">¥{{item.limited_price}} 抢</view>
|
||||
<!-- <image src="@/static/images/icon/plus.png" style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image style="width: 100%;" mode="widthFix" src="/static/img/no_short.f2ffcd1c.png"></image>
|
||||
<view style="text-align: center;color: #999;">此区域没有找到活动商品,切换其他地方试试呢</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<shortPopupActive ref="shortPopupRef" @addCart="loadCart" :source="105" isBuy></shortPopupActive>
|
||||
<u-modal :show="show" :closeOnClickOverlay="true" :title="`[${activity.title}]`"
|
||||
content="选择活动后只有完成活动任务后才可参加另一个活动, 确定要参与这个活动吗" cancelText="我再想想" confirmText="参加活动" confirmColor="#e54841"
|
||||
@cancel="show = false" @confirm="joinA()" showCancelButton></u-modal>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
|
||||
:isGoIndex="false"></authorize>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getArticleList } from "@/api/api.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import authorize from "@/components/Authorize.vue";
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
import shortPopupActive from "@/components/shortPopupActive.vue"
|
||||
import { storeActivityProduct, storeActivityDistrict } from "@/api/activity.js"
|
||||
import {
|
||||
cloudWarehouse
|
||||
} from '@/api/requesta.js'
|
||||
import {
|
||||
getCartCounts,
|
||||
getCartList,
|
||||
} from '@/api/requesta.js';
|
||||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
shortPopupActive
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
userInfo: {},
|
||||
Alist: [],
|
||||
activity: {
|
||||
title: ''
|
||||
},
|
||||
address: {
|
||||
townName: '',
|
||||
street_id: ''
|
||||
},
|
||||
show: false,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
addressList: [],
|
||||
goodsList: [],
|
||||
goodsNum: 0,
|
||||
can_buy: 0, // 是否可以购买, 0不可以, 1可以
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.address = {
|
||||
street_id: options.street_id,
|
||||
townName: options.townName
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfo();
|
||||
this.loadList();
|
||||
this.cartFn();
|
||||
this.loadAddressList();
|
||||
},
|
||||
methods: {
|
||||
changeAddress(e){
|
||||
this.address = {
|
||||
street_id: this.addressList[e.detail.value].street_code,
|
||||
townName: this.addressList[e.detail.value].street_name
|
||||
}
|
||||
this.loadList();
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
getUserInfo() {
|
||||
getUserInfo().then(res => {
|
||||
this.userInfo = res.data;
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
loadList(){
|
||||
let location = '';
|
||||
if(this.$store.state.storage.location.lat) location = this.$store.state.storage.location.lat + ',' + this.$store.state.storage.location.long;
|
||||
storeActivityProduct({
|
||||
street_code: this.address.street_id,
|
||||
activity_id: 2, //默认传2
|
||||
location: location,
|
||||
source: 105
|
||||
}).then(res => {
|
||||
this.can_buy = res.data.can_buy;
|
||||
this.goodsList = res.data.list;
|
||||
}).catch(e=>{
|
||||
Toast(e.msg||e.message||e)
|
||||
})
|
||||
},
|
||||
loadAddressList(){
|
||||
storeActivityDistrict().then(res=>{
|
||||
this.addressList = res.data;
|
||||
if(!this.addressList.find(item=>item.street_code==this.address.street_id)){
|
||||
this.address.street_id = ''
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取规格名称
|
||||
getSkuName(item){
|
||||
return Object.keys(item.sku).join('/')||null;
|
||||
},
|
||||
// 点击商品
|
||||
clickProduct(data){
|
||||
if(!this.address.townName) return Toast('请先选择活动区域')
|
||||
if(!this.can_buy){
|
||||
return Toast('活动限购一件, 您已经买过了哦~')
|
||||
}
|
||||
this.$refs.shortPopupRef.setDatas(data, this.goodsNum);
|
||||
this.$refs.shortPopupRef.open();
|
||||
},
|
||||
// 刷新购物车
|
||||
loadCart(){
|
||||
this.cartFn();
|
||||
},
|
||||
// 购物车信息
|
||||
cartFn() {
|
||||
getCartCounts({
|
||||
source: 105,
|
||||
// product_type: 98
|
||||
}).then(res => {
|
||||
this.goodsNum = res.data[0].count
|
||||
})
|
||||
},
|
||||
// 授权回调
|
||||
onLoadFun(data) {
|
||||
this.getUserInfo();
|
||||
this.isShowAuth = false;
|
||||
},
|
||||
// 打开授权
|
||||
openAuto() {
|
||||
// console.log('hajhcdsohjcosvjco')
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
},
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff5dd;
|
||||
}
|
||||
|
||||
.bg {
|
||||
position: relative;
|
||||
padding-bottom: 30rpx;
|
||||
|
||||
.bg_img {
|
||||
width: 750rpx;
|
||||
height: 652rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.bg_back {
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: calc(var(--status-bar-height) + 30rpx);
|
||||
left: 30rpx;
|
||||
}
|
||||
|
||||
.b_body {
|
||||
width: 710rpx;
|
||||
margin-left: 21rpx;
|
||||
margin-right: 19rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
border-radius: 0 0 60rpx 60rpx;
|
||||
padding: 28rpx;
|
||||
padding-top: 680rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.b_content {
|
||||
width: 100%;
|
||||
// height: 800rpx;
|
||||
// background-color: #eee;
|
||||
.short_item {
|
||||
// padding: 20rpx;
|
||||
padding-bottom: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.image {
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
margin-right: 20rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.short_item_right {
|
||||
width: 430rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.r_name {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box; /* 使用弹性盒子布局 */
|
||||
-webkit-box-orient: vertical; /* 设置为垂直方向布局 */
|
||||
overflow: hidden; /* 隐藏超出部分 */
|
||||
-webkit-line-clamp: 2; /* 限制显示两行文本 */
|
||||
.mer-labels{
|
||||
background-color: #f84221;
|
||||
color: #fff;
|
||||
font-size: 18rpx;
|
||||
padding: 4rpx 8rpx;
|
||||
border-radius: 5rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.r_type {
|
||||
font-size: 22.78rpx;
|
||||
color: #737373;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
|
||||
view {
|
||||
height: 39rpx;
|
||||
line-height: 39rpx;
|
||||
background: #FEF5F3;
|
||||
padding: 0 16rpx;
|
||||
border-radius: 39rpx;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.r_btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 22.78rpx;
|
||||
color: #F84221;
|
||||
align-items: center;
|
||||
background-color: rgba(#F84221, 0.1);
|
||||
padding-left: 15rpx;
|
||||
border-radius: 0 60rpx 60rpx 0;
|
||||
.qiang{
|
||||
width: 160rpx;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #F84221;
|
||||
color: #fff;
|
||||
border-radius: 60rpx;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.no_qiang{
|
||||
background-color: #7f7f7f;
|
||||
}
|
||||
}
|
||||
.r_street{
|
||||
font-size: 24rpx;
|
||||
height: 39rpx;
|
||||
line-height: 39rpx;
|
||||
color: #7f7f7f;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
@ -1,352 +1,351 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class='newsDetail' style="padding-bottom: 50px;">
|
||||
<view class='title'>{{articleInfo.title}}</view>
|
||||
<view class='list acea-row row-middle'>
|
||||
<view class='label'>{{articleInfo.author}}</view>
|
||||
<view class='item'></text>{{articleInfo.create_time}}</view>
|
||||
<!-- <view class='item'><text class='iconfont icon-liulan'></text>{{articleInfo.visit}}</view> -->
|
||||
</view>
|
||||
<view class='conters'>
|
||||
<!-- <rich-text :nodes="content" class="conter"></rich-text> -->
|
||||
<jyf-parser :html="content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
</view>
|
||||
<view class="picTxt acea-row row-between-wrapper" v-if="store_info.id">
|
||||
<view class="pictrue">
|
||||
<image :src="store_info.image"></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="name line1">{{store_info.store_name}}</view>
|
||||
<view class="money font-color">
|
||||
¥<text class="num">{{store_info.price}}</text>
|
||||
</view>
|
||||
<view class="y_money">¥{{store_info.ot_price}}</view>
|
||||
</view>
|
||||
<navigator :url="'/pages/goods_details/index?id='+store_info.id" hover-class="none" class="label"><text
|
||||
class="span">查看商品</text></navigator>
|
||||
</view>
|
||||
<!-- #ifdef H5 -->
|
||||
<button class="bnt bg-color" hover-class='none' @click="listenerActionSheet">和好友一起分享</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<button class="bnt bg-color" open-type="share" hover-class='none'>和好友一起分享</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<button class="bnt bg-color" open-type="share" hover-class='none' @click="uniShare">分享</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo>
|
||||
<!-- <home></home> -->
|
||||
</view>
|
||||
<view>
|
||||
<view class='newsDetail' style="padding-bottom: 50px;">
|
||||
<view class='title'>{{articleInfo.title}}</view>
|
||||
<view class='list acea-row row-middle'>
|
||||
<view class='label'>{{articleInfo.author}}</view>
|
||||
<view class='item'></text>{{articleInfo.create_time}}</view>
|
||||
<!-- <view class='item'><text class='iconfont icon-liulan'></text>{{articleInfo.visit}}</view> -->
|
||||
</view>
|
||||
<view class='conters'>
|
||||
<!-- <rich-text :nodes="content" class="conter"></rich-text> -->
|
||||
<jyf-parser :html="content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
</view>
|
||||
<view class="picTxt acea-row row-between-wrapper" v-if="store_info.id">
|
||||
<view class="pictrue">
|
||||
<image :src="store_info.image" ></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="name line1">{{store_info.store_name}}</view>
|
||||
<view class="money font-color">
|
||||
¥<text class="num">{{store_info.price}}</text>
|
||||
</view>
|
||||
<view class="y_money">¥{{store_info.ot_price}}</view>
|
||||
</view>
|
||||
<navigator :url="'/pages/goods_details/index?id='+store_info.id" hover-class="none" class="label"><text
|
||||
class="span">查看商品</text></navigator>
|
||||
</view>
|
||||
<!-- #ifdef H5 -->
|
||||
<button class="bnt bg-color" hover-class='none' @click="listenerActionSheet"
|
||||
>和好友一起分享</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<button class="bnt bg-color" open-type="share" hover-class='none'>和好友一起分享</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<button class="bnt bg-color" open-type="share" hover-class='none' @click="uniShare" >分享</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo>
|
||||
<!-- <home></home> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import parser from "@/components/jyf-parser/jyf-parser";
|
||||
import {
|
||||
getArticleDetails
|
||||
} from '@/api/api.js';
|
||||
import shareInfo from '@/components/shareInfo';
|
||||
import home from '@/components/home';
|
||||
import UniShare from 'uni_modules/uni-share/js_sdk/uni-share.js';
|
||||
const uniShare = new UniShare();
|
||||
export default {
|
||||
components: {
|
||||
shareInfo,
|
||||
home,
|
||||
"jyf-parser": parser,
|
||||
},
|
||||
onBackPress({
|
||||
from
|
||||
}) {
|
||||
if (from == 'backbutton') {
|
||||
this.$nextTick(function() {
|
||||
uniShare.hide()
|
||||
})
|
||||
return uniShare.isShow;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
articleInfo: [],
|
||||
store_info: {},
|
||||
content: '',
|
||||
shareInfoStatus: false,
|
||||
tagStyle: {
|
||||
img: 'width:100%;display:block;'
|
||||
},
|
||||
};
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function(options) {
|
||||
if (options.hasOwnProperty('id')) {
|
||||
this.id = options.id;
|
||||
} else {
|
||||
// #ifndef H5
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
history.back();
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
this.getArticleOne();
|
||||
},
|
||||
methods: {
|
||||
// 分享
|
||||
uniShare() {
|
||||
uniShare.show({
|
||||
content: { //公共的分享参数配置 类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
|
||||
type: 0,
|
||||
href: 'https://uniapp.dcloud.io/',
|
||||
title: '标题',
|
||||
summary: '描述',
|
||||
imageUrl: 'https://img-cdn-aliyun.dcloud.net.cn/stream/icon/__UNI__HelloUniApp.png'
|
||||
},
|
||||
menus: [{
|
||||
"img": "/static/images/weixin.png",
|
||||
"text": "微信好友",
|
||||
"share": { //当前项的分享参数配置。可覆盖公共的配置如下:分享到微信小程序,配置了type=5
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneSession"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/images/weixin.png",
|
||||
"text": "微信朋友圈",
|
||||
"share": {
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneTimeline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/images/weixin.png",
|
||||
"text": "微信小程序",
|
||||
"share": {
|
||||
provider: "weixin",
|
||||
scene: "WXSceneSession",
|
||||
type: 5,
|
||||
miniProgram: {
|
||||
id: '123',
|
||||
path: '/pages/list/detail',
|
||||
webUrl: '/#/pages/list/detail',
|
||||
type: 0
|
||||
},
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "img": "/static/app-plus/sharemenu/weibo.png",
|
||||
// "text": "微博",
|
||||
// "share": {
|
||||
// "provider": "sinaweibo"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// "img": "/static/app-plus/sharemenu/qq.png",
|
||||
// "text": "QQ",
|
||||
// "share": {
|
||||
// "provider": "qq"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// "img": "/static/app-plus/sharemenu/copyurl.png",
|
||||
// "text": "复制",
|
||||
// "share": "copyurl"
|
||||
// },
|
||||
// {
|
||||
// "img": "/static/app-plus/sharemenu/more.png",
|
||||
// "text": "更多",
|
||||
// "share": "shareSystem"
|
||||
// }
|
||||
],
|
||||
cancelText: "取消分享",
|
||||
}, e => { //callback
|
||||
console.log(uniShare.isShow);
|
||||
console.log(e);
|
||||
})
|
||||
},
|
||||
getArticleOne: function() {
|
||||
let that = this;
|
||||
getArticleDetails(that.id).then(res => {
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.title.substring(0, 7) + "..."
|
||||
});
|
||||
that.$set(that, 'articleInfo', res.data);
|
||||
that.$set(that, 'store_info', res.data.store_info ? res.data.store_info : {});
|
||||
that.content = res.data.content.content;
|
||||
// #ifdef H5
|
||||
if (this.$wechat.isWeixin()) {
|
||||
this.setShareInfo();
|
||||
}
|
||||
// #endif
|
||||
});
|
||||
},
|
||||
listenerActionSheet() {
|
||||
this.shareInfoStatus = true
|
||||
},
|
||||
setShareInfoStatus() {
|
||||
this.shareInfoStatus = false
|
||||
},
|
||||
setShareInfo: function() {
|
||||
let href = location.href;
|
||||
let configAppMessage = {
|
||||
desc: this.articleInfo.synopsis,
|
||||
title: this.articleInfo.title,
|
||||
link: href,
|
||||
imgUrl: this.articleInfo.image_input
|
||||
};
|
||||
this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import parser from "@/components/jyf-parser/jyf-parser";
|
||||
import {
|
||||
getArticleDetails
|
||||
} from '@/api/api.js';
|
||||
import shareInfo from '@/components/shareInfo';
|
||||
import home from '@/components/home';
|
||||
import UniShare from 'uni_modules/uni-share/js_sdk/uni-share.js';
|
||||
const uniShare = new UniShare();
|
||||
export default {
|
||||
components: {
|
||||
shareInfo,
|
||||
home,
|
||||
"jyf-parser": parser,
|
||||
},
|
||||
onBackPress({from}) {
|
||||
if(from=='backbutton'){
|
||||
this.$nextTick(function(){
|
||||
uniShare.hide()
|
||||
})
|
||||
return uniShare.isShow;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
articleInfo: [],
|
||||
store_info: {},
|
||||
content: '',
|
||||
shareInfoStatus: false,
|
||||
tagStyle: {
|
||||
img: 'width:100%;display:block;'
|
||||
},
|
||||
};
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function(options) {
|
||||
if (options.hasOwnProperty('id')) {
|
||||
this.id = options.id;
|
||||
} else {
|
||||
// #ifndef H5
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
history.back();
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
this.getArticleOne();
|
||||
},
|
||||
methods: {
|
||||
// 分享
|
||||
uniShare() {
|
||||
uniShare.show({
|
||||
content: { //公共的分享参数配置 类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
|
||||
type: 0,
|
||||
href: 'https://uniapp.dcloud.io/',
|
||||
title: '标题',
|
||||
summary: '描述',
|
||||
imageUrl: 'https://img-cdn-aliyun.dcloud.net.cn/stream/icon/__UNI__HelloUniApp.png'
|
||||
},
|
||||
menus: [{
|
||||
"img": "/static/app-plus/sharemenu/wechatfriend.png",
|
||||
"text": "微信好友",
|
||||
"share": { //当前项的分享参数配置。可覆盖公共的配置如下:分享到微信小程序,配置了type=5
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneSession"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/wechatmoments.png",
|
||||
"text": "微信朋友圈",
|
||||
"share": {
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneTimeline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/mp_weixin.png",
|
||||
"text": "微信小程序",
|
||||
"share": {
|
||||
provider: "weixin",
|
||||
scene: "WXSceneSession",
|
||||
type: 5,
|
||||
miniProgram: {
|
||||
id: '123',
|
||||
path: '/pages/list/detail',
|
||||
webUrl: '/#/pages/list/detail',
|
||||
type: 0
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/weibo.png",
|
||||
"text": "微博",
|
||||
"share": {
|
||||
"provider": "sinaweibo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/qq.png",
|
||||
"text": "QQ",
|
||||
"share": {
|
||||
"provider": "qq"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/copyurl.png",
|
||||
"text": "复制",
|
||||
"share": "copyurl"
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/more.png",
|
||||
"text": "更多",
|
||||
"share": "shareSystem"
|
||||
}
|
||||
],
|
||||
cancelText: "取消分享",
|
||||
}, e => { //callback
|
||||
console.log(uniShare.isShow);
|
||||
console.log(e);
|
||||
})
|
||||
},
|
||||
getArticleOne: function() {
|
||||
let that = this;
|
||||
getArticleDetails(that.id).then(res => {
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.title.substring(0, 7) + "..."
|
||||
});
|
||||
that.$set(that, 'articleInfo', res.data);
|
||||
that.$set(that, 'store_info', res.data.store_info ? res.data.store_info : {});
|
||||
that.content = res.data.content.content;
|
||||
// #ifdef H5
|
||||
if (this.$wechat.isWeixin()) {
|
||||
this.setShareInfo();
|
||||
}
|
||||
// #endif
|
||||
});
|
||||
},
|
||||
listenerActionSheet() {
|
||||
this.shareInfoStatus = true
|
||||
},
|
||||
setShareInfoStatus() {
|
||||
this.shareInfoStatus = false
|
||||
},
|
||||
setShareInfo: function() {
|
||||
let href = location.href;
|
||||
let configAppMessage = {
|
||||
desc: this.articleInfo.synopsis,
|
||||
title: this.articleInfo.title,
|
||||
link: href,
|
||||
imgUrl: this.articleInfo.image_input
|
||||
};
|
||||
this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
page {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
.newsDetail .title {
|
||||
padding: 0 30rpx;
|
||||
font-size: 34rpx;
|
||||
color: #282828;
|
||||
font-weight: bold;
|
||||
margin: 45rpx 0 23rpx 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.newsDetail .title {
|
||||
padding: 0 30rpx;
|
||||
font-size: 34rpx;
|
||||
color: #282828;
|
||||
font-weight: bold;
|
||||
margin: 45rpx 0 23rpx 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.newsDetail .list {
|
||||
margin: 0 30rpx;
|
||||
padding-bottom: 25rpx;
|
||||
}
|
||||
.newsDetail .list {
|
||||
margin: 0 30rpx;
|
||||
padding-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.newsDetail .list .label {
|
||||
font-size: 30rpx;
|
||||
color: #B1B2B3;
|
||||
}
|
||||
.newsDetail .list .label {
|
||||
font-size: 30rpx;
|
||||
color: #B1B2B3;
|
||||
}
|
||||
|
||||
.newsDetail .list .item {
|
||||
margin-left: 27rpx;
|
||||
font-size: 30rpx;
|
||||
color: #B1B2B3;
|
||||
}
|
||||
.newsDetail .list .item {
|
||||
margin-left: 27rpx;
|
||||
font-size: 30rpx;
|
||||
color: #B1B2B3;
|
||||
}
|
||||
|
||||
.newsDetail .list .item .iconfont {
|
||||
font-size: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.newsDetail .list .item .iconfont {
|
||||
font-size: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.newsDetail .list .item .iconfont.icon-shenhezhong {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.newsDetail .list .item .iconfont.icon-shenhezhong {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.newsDetail .conters {
|
||||
padding: 0 30rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 1.7;
|
||||
.newsDetail .conters {
|
||||
padding: 0 30rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 1.7;
|
||||
|
||||
/deep/ img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
/deep/ img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.newsDetail .picTxt {
|
||||
width: 690rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 20rpx;
|
||||
border: 1px solid #e1e1e1;
|
||||
position: relative;
|
||||
margin: 30rpx auto 0 auto;
|
||||
}
|
||||
.newsDetail .picTxt {
|
||||
width: 690rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 20rpx;
|
||||
border: 1px solid #e1e1e1;
|
||||
position: relative;
|
||||
margin: 30rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .pictrue {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
.newsDetail .picTxt .pictrue {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
display: block;
|
||||
}
|
||||
.newsDetail .picTxt .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .text {
|
||||
width: 460rpx;
|
||||
}
|
||||
.newsDetail .picTxt .text {
|
||||
width: 460rpx;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .text .name {
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
}
|
||||
.newsDetail .picTxt .text .name {
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .text .money {
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.newsDetail .picTxt .text .money {
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .text .money .num {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.newsDetail .picTxt .text .money .num {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .text .y_money {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.newsDetail .picTxt .text .y_money {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .label {
|
||||
position: absolute;
|
||||
background-color: #303131;
|
||||
width: 160rpx;
|
||||
height: 50rpx;
|
||||
right: -7rpx;
|
||||
border-radius: 25rpx 0 6rpx 25rpx;
|
||||
text-align: center;
|
||||
line-height: 50rpx;
|
||||
bottom: 24rpx;
|
||||
}
|
||||
.newsDetail .picTxt .label {
|
||||
position: absolute;
|
||||
background-color: #303131;
|
||||
width: 160rpx;
|
||||
height: 50rpx;
|
||||
right: -7rpx;
|
||||
border-radius: 25rpx 0 6rpx 25rpx;
|
||||
text-align: center;
|
||||
line-height: 50rpx;
|
||||
bottom: 24rpx;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .label .span {
|
||||
background-image: linear-gradient(to right, #fff71e 0%, #f9b513 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
.newsDetail .picTxt .label .span {
|
||||
background-image: linear-gradient(to right, #fff71e 0%, #f9b513 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.newsDetail .picTxt .label:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-bottom: 8rpx solid #303131;
|
||||
border-right: 8rpx solid transparent;
|
||||
top: -7rpx;
|
||||
right: 0;
|
||||
}
|
||||
.newsDetail .picTxt .label:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-bottom: 8rpx solid #303131;
|
||||
border-right: 8rpx solid transparent;
|
||||
top: -7rpx;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.newsDetail .bnt {
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
width: 690rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 45rpx;
|
||||
margin: 48rpx auto;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.newsDetail .bnt {
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
width: 690rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 45rpx;
|
||||
margin: 48rpx auto;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
</style>
|
@ -1,352 +1,339 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class='newsList'>
|
||||
<view class='swiper' v-if="imgUrls.length > 0">
|
||||
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
|
||||
:duration="duration" indicator-color="rgba(102,102,102,0.3)" indicator-active-color="#666">
|
||||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item>
|
||||
<navigator :url="'/pages/news_details/index?id='+item.id">
|
||||
<image :src="item.image_input[0]" class="slide-image" />
|
||||
</navigator>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class='nav' v-if="navList.length > 0">
|
||||
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft"
|
||||
style="width:auto;overflow:hidden;">
|
||||
<block v-for="(item,index) in navList" :key="index">
|
||||
<view class='item' style="text-align: center;" :class='active==item.article_category_id?"on":""'
|
||||
@click='tabSelect(item.article_category_id)'>
|
||||
<view>{{item.title}}</view>
|
||||
<view class='line bg-color' v-if="active==item.article_category_id"></view>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<block v-for="(item,index) in articleList" :key="index">
|
||||
<navigator :url='"/pages/news_details/index?id="+item.article_id' hover-class='none'
|
||||
class='item acea-row row-between-wrapper'>
|
||||
<view class='text acea-row row-column-between'>
|
||||
<view class='name line2'>{{item.title}}</view>
|
||||
<view>{{item.create_time}}</view>
|
||||
</view>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image_input'></image>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class='empty-box acea-row row-middle' v-if="articleList.length == 0 && (page != 1 || active== 0)">
|
||||
<view class='pictrue'>
|
||||
<image src='../../static/images/empty-box.png'></image>
|
||||
<view class="txt">暂无新闻信息~</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <home></home> -->
|
||||
</view>
|
||||
<view>
|
||||
<view class='newsList'>
|
||||
<view class='swiper' v-if="imgUrls.length > 0">
|
||||
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
|
||||
:duration="duration" indicator-color="rgba(102,102,102,0.3)" indicator-active-color="#666">
|
||||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item>
|
||||
<navigator :url="'/pages/news_details/index?id='+item.id">
|
||||
<image :src="item.image_input[0]" class="slide-image" />
|
||||
</navigator>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class='nav' v-if="navList.length > 0">
|
||||
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft"
|
||||
style="width:auto;overflow:hidden;">
|
||||
<block v-for="(item,index) in navList" :key="index">
|
||||
<view class='item' style="text-align: center;" :class='active==item.article_category_id?"on":""'
|
||||
@click='tabSelect(item.article_category_id)'>
|
||||
<view>{{item.title}}</view>
|
||||
<view class='line bg-color' v-if="active==item.article_category_id"></view>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<block v-for="(item,index) in articleList" :key="index">
|
||||
<navigator :url='"/pages/news_details/index?id="+item.article_id' hover-class='none'
|
||||
class='item acea-row row-between-wrapper'>
|
||||
<view class='text acea-row row-column-between'>
|
||||
<view class='name line2'>{{item.title}}</view>
|
||||
<view>{{item.create_time}}</view>
|
||||
</view>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image_input'></image>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class='empty-box acea-row row-middle' v-if="articleList.length == 0 && (page != 1 || active== 0)">
|
||||
<view class='pictrue'>
|
||||
<image src='../../static/images/empty-box.png'></image>
|
||||
<view class="txt">暂无新闻信息~</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <home></home> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
getArticleCategoryLists,
|
||||
getArticleCategoryList,
|
||||
getArticleList,
|
||||
getArticleHotList,
|
||||
getArticleBannerList
|
||||
} from '@/api/api.js';
|
||||
import home from '@/components/home';
|
||||
export default {
|
||||
components: {
|
||||
home
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imgUrls: [],
|
||||
articleList: [],
|
||||
indicatorDots: false,
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
navList: [],
|
||||
active: 0,
|
||||
page: 1,
|
||||
limit: 8,
|
||||
status: false,
|
||||
scrollLeft: 0,
|
||||
type: 0
|
||||
};
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function() {},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onLoad: function(e) {
|
||||
|
||||
this.type = e.type
|
||||
this.getArticleCate();
|
||||
this.status = false;
|
||||
this.page = 1;
|
||||
this.articleList = [];
|
||||
},
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function() {
|
||||
this.getCidArticle();
|
||||
},
|
||||
methods: {
|
||||
getArticleHot: function() {
|
||||
let that = this;
|
||||
getArticleHotList().then(res => {
|
||||
that.$set(that, 'articleList', res.data);
|
||||
});
|
||||
},
|
||||
getArticleBanner: function() {
|
||||
let that = this;
|
||||
getArticleBannerList().then(res => {
|
||||
that.imgUrls = res.data;
|
||||
});
|
||||
},
|
||||
getCidArticle: function() {
|
||||
let that = this;
|
||||
if (that.active == 0) return;
|
||||
let limit = that.limit;
|
||||
let page = that.page;
|
||||
let articleList = that.articleList;
|
||||
if (that.status) return;
|
||||
getArticleList(that.active, {
|
||||
page: page,
|
||||
limit: limit
|
||||
}).then(res => {
|
||||
let articleListNew = [];
|
||||
let len = res.length;
|
||||
articleListNew = articleList.concat(res.data.list);
|
||||
that.page++;
|
||||
that.$set(that, 'articleList', articleListNew);
|
||||
that.status = limit > len;
|
||||
that.page = that.page;
|
||||
});
|
||||
},
|
||||
getArticleCate: function() {
|
||||
let that = this;
|
||||
if (this.type == 1) {
|
||||
getArticleCategoryLists().then(res => {
|
||||
this.active = res.data[0].article_category_id
|
||||
that.$set(that, 'navList', res.data);
|
||||
this.getCidArticle();
|
||||
});
|
||||
} else {
|
||||
getArticleCategoryList().then(res => {
|
||||
this.active = res.data[0].article_category_id
|
||||
that.$set(that, 'navList', res.data);
|
||||
this.getCidArticle();
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
tabSelect(active) {
|
||||
this.active = active;
|
||||
if (this.active == 0) this.getArticleHot();
|
||||
else {
|
||||
this.$set(this, 'articleList', []);
|
||||
this.page = 1;
|
||||
this.status = false;
|
||||
this.getCidArticle();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
getArticleCategoryList,
|
||||
getArticleList,
|
||||
getArticleHotList,
|
||||
getArticleBannerList
|
||||
} from '@/api/api.js';
|
||||
import home from '@/components/home';
|
||||
export default {
|
||||
components: {
|
||||
home
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imgUrls: [],
|
||||
articleList: [],
|
||||
indicatorDots: false,
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
navList: [],
|
||||
active: 0,
|
||||
page: 1,
|
||||
limit: 8,
|
||||
status: false,
|
||||
scrollLeft: 0
|
||||
};
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function() {},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onLoad: function() {
|
||||
this.getArticleCate();
|
||||
this.status = false;
|
||||
this.page = 1;
|
||||
this.articleList = [];
|
||||
},
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function() {
|
||||
this.getCidArticle();
|
||||
},
|
||||
methods: {
|
||||
getArticleHot: function() {
|
||||
let that = this;
|
||||
getArticleHotList().then(res => {
|
||||
that.$set(that, 'articleList', res.data);
|
||||
});
|
||||
},
|
||||
getArticleBanner: function() {
|
||||
let that = this;
|
||||
getArticleBannerList().then(res => {
|
||||
that.imgUrls = res.data;
|
||||
});
|
||||
},
|
||||
getCidArticle: function() {
|
||||
let that = this;
|
||||
if (that.active == 0) return;
|
||||
let limit = that.limit;
|
||||
let page = that.page;
|
||||
let articleList = that.articleList;
|
||||
if (that.status) return;
|
||||
getArticleList(that.active, {
|
||||
page: page,
|
||||
limit: limit
|
||||
}).then(res => {
|
||||
let articleListNew = [];
|
||||
let len = res.length;
|
||||
articleListNew = articleList.concat(res.data.list);
|
||||
that.page++;
|
||||
that.$set(that, 'articleList', articleListNew);
|
||||
that.status = limit > len;
|
||||
that.page = that.page;
|
||||
});
|
||||
},
|
||||
getArticleCate: function() {
|
||||
let that = this;
|
||||
getArticleCategoryList().then(res => {
|
||||
this.active = res.data[0].article_category_id
|
||||
that.$set(that, 'navList', res.data);
|
||||
this.getCidArticle();
|
||||
});
|
||||
},
|
||||
tabSelect(active) {
|
||||
this.active = active;
|
||||
if (this.active == 0) this.getArticleHot();
|
||||
else {
|
||||
this.$set(this, 'articleList', []);
|
||||
this.page = 1;
|
||||
this.status = false;
|
||||
this.getCidArticle();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
page {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
.newsList .swiper {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.newsList .swiper {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.newsList .swiper swiper {
|
||||
width: 100%;
|
||||
height: 365rpx;
|
||||
position: relative;
|
||||
}
|
||||
.newsList .swiper swiper {
|
||||
width: 100%;
|
||||
height: 365rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.newsList .swiper .slide-image {
|
||||
width: 100%;
|
||||
height: 335rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.newsList .swiper .slide-image {
|
||||
width: 100%;
|
||||
height: 335rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
.newsList .swiper .wx-swiper-dot {
|
||||
width: 12rpx !important;
|
||||
height: 12rpx !important;
|
||||
border-radius: 0;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
.newsList .swiper .wx-swiper-dot {
|
||||
width: 12rpx !important;
|
||||
height: 12rpx !important;
|
||||
border-radius: 0;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
|
||||
.newsList .swiper .wx-swiper-dot~.wx-swiper-dot {
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
.newsList .swiper .wx-swiper-dot~.wx-swiper-dot {
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
|
||||
.newsList .swiper .wx-swiper-dots.wx-swiper-dots-horizontal {
|
||||
margin-bottom: -15rpx;
|
||||
}
|
||||
.newsList .swiper .wx-swiper-dots.wx-swiper-dots-horizontal {
|
||||
margin-bottom: -15rpx;
|
||||
}
|
||||
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || H5
|
||||
.newsList .swiper .uni-swiper-dot {
|
||||
width: 12rpx !important;
|
||||
height: 12rpx !important;
|
||||
border-radius: 0;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || H5
|
||||
.newsList .swiper .uni-swiper-dot {
|
||||
width: 12rpx !important;
|
||||
height: 12rpx !important;
|
||||
border-radius: 0;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
|
||||
.newsList .swiper .uni-swiper-dot~.uni-swiper-dot {
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
.newsList .swiper .uni-swiper-dot~.uni-swiper-dot {
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
|
||||
.newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
|
||||
margin-bottom: -15rpx;
|
||||
}
|
||||
.newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
|
||||
margin-bottom: -15rpx;
|
||||
}
|
||||
|
||||
// #endif
|
||||
.newsList .nav {
|
||||
padding: 0 30rpx;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
margin-top: 43rpx;
|
||||
}
|
||||
// #endif
|
||||
.newsList .nav {
|
||||
padding: 0 30rpx;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
margin-top: 43rpx;
|
||||
}
|
||||
|
||||
.newsList .nav .item {
|
||||
display: inline-block;
|
||||
font-size: 32rpx;
|
||||
color: #999;
|
||||
min-width: 130rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: relative;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.newsList .nav .item {
|
||||
display: inline-block;
|
||||
font-size: 32rpx;
|
||||
color: #999;
|
||||
min-width: 130rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: relative;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.newsList .nav .item.on {
|
||||
color: #282828;
|
||||
}
|
||||
.newsList .nav .item.on {
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.newsList .nav .item~.item {
|
||||
margin-left: 46rpx;
|
||||
}
|
||||
.newsList .nav .item~.item {
|
||||
margin-left: 46rpx;
|
||||
}
|
||||
|
||||
.newsList .nav .item .line {
|
||||
width: 24rpx;
|
||||
height: 4rpx;
|
||||
border-radius: 2rpx;
|
||||
margin: 10rpx auto 0 auto;
|
||||
position: absolute;
|
||||
bottom: 5rpx;
|
||||
left: 50%;
|
||||
margin-left: -12rpx;
|
||||
}
|
||||
.newsList .nav .item .line {
|
||||
width: 24rpx;
|
||||
height: 4rpx;
|
||||
border-radius: 2rpx;
|
||||
margin: 10rpx auto 0 auto;
|
||||
position: absolute;
|
||||
bottom: 5rpx;
|
||||
left: 50%;
|
||||
margin-left: -12rpx;
|
||||
}
|
||||
|
||||
.newsList .list .item {
|
||||
margin: 0 30rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 35rpx 0;
|
||||
}
|
||||
.newsList .list .item {
|
||||
margin: 0 30rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 35rpx 0;
|
||||
}
|
||||
|
||||
.newsList .list .item .pictrue {
|
||||
width: 250rpx;
|
||||
height: 156rpx;
|
||||
}
|
||||
.newsList .list .item .pictrue {
|
||||
width: 250rpx;
|
||||
height: 156rpx;
|
||||
}
|
||||
|
||||
.newsList .list .item .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.newsList .list .item .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
.newsList .list .item .text {
|
||||
width: 420rpx;
|
||||
height: 156rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
.newsList .list .item .text {
|
||||
width: 420rpx;
|
||||
height: 156rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.newsList .list .item .text .name {
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
}
|
||||
.newsList .list .item .text .name {
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.newsList .list .item .picList .pictrue {
|
||||
width: 335rpx;
|
||||
height: 210rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.newsList .list .item .picList .pictrue {
|
||||
width: 335rpx;
|
||||
height: 210rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.newsList .list .item .picList.on .pictrue {
|
||||
width: 217rpx;
|
||||
height: 136rpx;
|
||||
}
|
||||
.newsList .list .item .picList.on .pictrue {
|
||||
width: 217rpx;
|
||||
height: 136rpx;
|
||||
}
|
||||
|
||||
.newsList .list .item .picList .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.newsList .list .item .picList .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
.newsList .list .item .time {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 22rpx;
|
||||
}
|
||||
.newsList .list .item .time {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 22rpx;
|
||||
}
|
||||
|
||||
.noCommodity {
|
||||
border: none;
|
||||
}
|
||||
.noCommodity {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.empty-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 200rpx;
|
||||
.empty-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 200rpx;
|
||||
|
||||
image {
|
||||
width: 414rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
image {
|
||||
width: 414rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
|
||||
.txt {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.txt {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user