代码更新

This commit is contained in:
jia 2023-09-12 12:43:03 +08:00
parent 30449aaf6d
commit 44f7662fc0
96 changed files with 22564 additions and 17525 deletions

174
App.vue
View File

@ -8,9 +8,11 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// #ifdef APP-PLUS // #ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush"); let jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif import { const mp = uni.requireNativePlugin('uniMP');
// #endif
import {
checkLogin checkLogin
} from "./libs/login"; } from "./libs/login";
import { import {
@ -21,7 +23,13 @@
history history
} from '@/api/public.js' } from '@/api/public.js'
import Routine from './libs/routine.js'; import Routine from './libs/routine.js';
export default { export default {
data() {
return {
audioTeam: []
}
},
globalData: { globalData: {
spid: 0, spid: 0,
code: 0, code: 0,
@ -67,7 +75,29 @@
}, },
onLaunch: function(option) { onLaunch: function(option) {
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
this.globalData.uid = this.$store.state.app.uid this.globalData.uid = this.$store.state.app.uid;
let appkey = uni.getStorage({
key: 'launchFlag'
})
if (appkey) {
setTimeout(() => {
this.$store.dispatch('INIT_CONFIG');
}, 6000)
}
// #ifdef APP-PLUS
//uni
mp.onUniMPEventReceive(ret => {
console.log('小程序事件: ', ret);
if (ret.event == 'closeApp') {
mp.closeUniMP(ret.fromAppid, (ret) => {
console.log('closeUniMP: ' + JSON.stringify(ret));
});
}
});
// #endif
let that = this; let that = this;
// #ifdef MP // #ifdef MP
if (HTTP_REQUEST_URL == '') { if (HTTP_REQUEST_URL == '') {
@ -118,11 +148,12 @@
// #endif // #endif
that.getConfigData() that.getConfigData()
//#ifdef APP-PLUS //#ifdef APP-PLUS
jpushModule.setLoggerEnable(true); jpushModule.setLoggerEnable(true);
jpushModule.initJPushService() jpushModule.initJPushService()
jpushModule.addConnectEventListener(result=>{ jpushModule.addConnectEventListener(result => {
let connectEnable = result.connectEnable let connectEnable = result.connectEnable
// console.log("jpush", connectEnable) // console.log("jpush", connectEnable)
}) })
@ -151,6 +182,17 @@
let extras = result.extras let extras = result.extras
console.log("通知", result) console.log("通知", result)
if (result.extras.type == 'ORDER_CREATE') {
if (this.audioTeam.length > 0) {
this.audioTeam.push(result.extras.type);
} else {
this.audio()
this.audioTeam.push(result.extras.type);
}
}
// //
if (notificationEventType == 'notificationOpened') { if (notificationEventType == 'notificationOpened') {
uni.navigateTo({ uni.navigateTo({
@ -170,8 +212,10 @@
}, },
onShow() { onShow() {
let that = this let that = this
// H5 // H5
if (this.$store.state.app.token) { if (this.$store.state.app.token) {
@ -199,12 +243,112 @@
}, 1500) }, 1500)
// #endif // #endif
}, },
mounted() {
},
methods: { 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
}
}
})
}
})
},
/**
* 语音播报
*
*
*/
async audio() {
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
innerAudioContext.src = `/static/audio/order.mp3`;
innerAudioContext.onPlay(() => {
console.log('开始播放')
});
innerAudioContext.onEnded(() => {
console.log('语音播报结束')
innerAudioContext.destroy() //
if (this.audioTeam.length > 1) {
this.audioTeam.splice(0, 1);
console.log('队列中');
this.audio()
} else {
console.log('队列为零');
this.audioTeam = []
}
});
innerAudioContext.onError(() => {
console.log('语音播报失败')
innerAudioContext.destroy() //
});
},
// //
setOpenShare: function(data) { setOpenShare: function(data) {
let that = this; let that = this;
let href = location.href; let href = location.href;
href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this.globalData href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this
.globalData
.uid; .uid;
if (that.$wechat.isWeixin()) { if (that.$wechat.isWeixin()) {
let configAppMessage = { let configAppMessage = {
@ -213,7 +357,8 @@
link: href, link: href,
imgUrl: data.share_pic imgUrl: data.share_pic
}; };
that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage); that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
configAppMessage);
} }
}, },
// //
@ -254,6 +399,7 @@
this.globalData.community_reply_auth = res.data.community_reply_auth this.globalData.community_reply_auth = res.data.community_reply_auth
this.globalData.margin_ico_switch = res.data.margin_ico_switch this.globalData.margin_ico_switch = res.data.margin_ico_switch
this.globalData.margin_ico = res.data.margin_ico 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("VIEW_COLOR", res.data.global_theme.theme)
this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type) this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type)
try { try {
@ -289,8 +435,10 @@
@import 'static/css/base.css'; @import 'static/css/base.css';
@import 'static/iconfont/iconfont.css'; @import 'static/iconfont/iconfont.css';
@import 'static/iconfont/iconlihai.css'; @import 'static/iconfont/iconlihai.css';
@import 'static/iconfont/icontan.css';
@import 'static/css/style.scss'; @import 'static/css/style.scss';
view { view {
box-sizing: border-box; box-sizing: border-box;
} }
@ -314,9 +462,17 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: -40rpx; margin-top: -50rpx;
// box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3); // 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 { .bg-color-red {

View File

@ -1,27 +1,27 @@
{ {
"version": "1", "version" : "1",
"prompt": "template", "prompt" : "template",
"title": "服务协议和隐私政策", "title" : "服务协议与隐私政策",
"message": "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_user_agree\">《服务协议》</a>和<a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", "message" : "\t请务必审慎阅读、充分理解“服务协议与 隐私政策”各条款,包括但不限于:为了 向你提供即时通讯、内容分享等服务,我 们需要收集你的设备信息、操作日志、OAID等个 人信息。你可以在“设置”中查看、变更、删除个人信息并管理你的授权。<br/>\r\r\t你可以阅读 <a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_user_agree\">《用户协议》</a> 与 <a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>了解详细信息。如你同意,请点击“我同意”开始接受我们的服务。",
"buttonAccept": "同意并接受", "buttonAccept" : "同意并接受",
"buttonRefuse": "暂不同意", "buttonRefuse" : "暂不同意",
"second": { "second" : {
"title": "确认提示", "title" : "确认提示",
"message": "  进入应用前,你需先同意<a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_user_agree\">《服务协议》</a>和<a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>,否则将退出应用。", "message" : "进入应用前,你需先同意<a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_user_agree\">《用户协议》</a> 与 <a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept": "同意并继续", "buttonAccept" : "同意并继续",
"buttonRefuse": "退出应用" "buttonRefuse" : "退出应用"
}, },
"styles": { "styles" : {
"backgroundColor": "#fff", "backgroundColor" : "#fff",
"borderRadius":"5px", "borderRadius" : "5px",
"title": { "title" : {
"color": "#000" "color" : "#000"
}, },
"buttonAccept": { "buttonAccept" : {
"color": "#fff" "color" : "#fff"
}, },
"buttonRefuse": { "buttonRefuse" : {
"color": "#ccc" "color" : "#ccc"
} }
} }
} }

View File

@ -13,68 +13,107 @@ import request from "@/utils/request.js";
* 统计数据 * 统计数据
*/ */
export function getStatisticsInfo() { export function getStatisticsInfo() {
return request.get("admin/order/statistics", {}, { login: true }); return request.get("admin/order/statistics", {}, {
login: true
});
} }
/** /**
* 订单月统计 * 订单月统计
*/ */
export function getStatisticsMonth(where) { 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) { 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) { 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
});
}
/**
* 先货后款订单结算
*/
export function postsettle(merId, data) {
return request.post("admin/" + merId + "/settle", data, {
login: true
});
} }
/** /**
* 订单备注 * 订单备注
*/ */
export function setAdminOrderRemark(merId, id, data) { 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) { 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) { 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) { 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) { 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) { 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) { 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
});
} }
/** /**
@ -82,7 +121,9 @@ export function setOrderRefund(merId, data) {
* @returns {*} * @returns {*}
*/ */
export function getLogistics() { export function getLogistics() {
return request.get("logistics", {}, { login: false }); return request.get("logistics", {}, {
login: false
});
} }
/** /**
@ -108,40 +149,57 @@ export function verifierOrder(mer_id, code) {
export function orderStatistics(mer_id, data) { export function orderStatistics(mer_id, data) {
return request.get("admin/" + mer_id + "/statistics", data); return request.get("admin/" + mer_id + "/statistics", data);
} }
/**
* 订单
* @returns {*}
*/
export function orderStat(data) {
return request.get("admin/1/statistics", data);
}
/** /**
* 每日成交额 * 每日成交额
* @returns {*} * @returns {*}
*/ */
export function orderPrice(where, mer_id) { 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 {*} * @returns {*}
*/ */
export function getOrderList(where, merId) { 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 {*} * @returns {*}
*/ */
export function getRefundOrderList(where, merId) { 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 {*} * @returns {*}
*/ */
export function turnoverStatistics(where, merId) { 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 {*} * @returns {*}
*/ */
export function orderNumberStatistics(where, merId) { 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
});
} }
/** /**
* 获取订单打印默认配置 * 获取订单打印默认配置
@ -183,26 +241,34 @@ export function getRefundOrderInfo(merId, id) {
* @returns {*} * @returns {*}
*/ */
export function refundOrderSubmit(merId, id, data) { 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 {*} * @returns {*}
*/ */
export function refundOrderReceive(merId, id) { 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) { 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) { 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
});
} }
/** /**
* 去核销 * 去核销
@ -211,3 +277,20 @@ export function setRefundMark(merId, orderId, data) {
export function orderCancellation(merId, id) { 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
});
}
/**
* 商家物流取件二维码
* @param object data
*/
export function logisticsCode(id) {
return request.get(`order/logistics_code/${id}`);
}

View File

@ -103,6 +103,10 @@ export function getUserCoupons(data) {
export function getArticleCategoryList() { export function getArticleCategoryList() {
return request.get('article/category/lst', {}, { noAuth: true }) 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 * @param int cid
@ -269,3 +273,21 @@ export function ajcaptchaCheck(data) {
noAuth: true noAuth: true
}); });
} }
/**
* 获取所在的地区数据
* @param {Object} data
*/
export function village(data) {
return request.get('v2/system/geo/lst', data, { noAuth: true });
}
/**
* 获取所在的村队数据
* @param {Object} data
*/
export function brigade(data) {
return request.get('v2/system/brigade', data, { noAuth: true });
}

View File

@ -82,11 +82,16 @@ export function videoList(data) {
}); });
} }
/**自己的视频列表*/ /**自己的视频列表*/
export function deoList(id) {
return request.get(`community/show/${id}`);
}
export function myVideoList(id,data) { export function myVideoList(id,data) {
return request.get(`community/user/community_video/${id}`, data, { return request.get(`community/user/community_video/${id}`, data, {
noAuth: true noAuth: true
}); });
} }
/**文章点赞*/ /**文章点赞*/
export function graphicStartApi(id, status) { export function graphicStartApi(id, status) {
return request.post(`community/start/${id}`, status); return request.post(`community/start/${id}`, status);

View File

@ -107,7 +107,7 @@ export function orderDel(id) {
} }
/** /**
* 订单详情 * 已付款订单详情
* @param string uni * @param string uni
*/ */
export function getOrderDetail(uni) { export function getOrderDetail(uni) {
@ -115,11 +115,11 @@ export function getOrderDetail(uni) {
} }
/** /**
* 订单详情 * 未付款订单详情
* @param string uni * @param string uni
*/ */
export function groupOrderDetail(uni) { export function groupOrderDetail(uni,product_type) {
return request.get('order/group_order_detail/' + uni); return request.get('order/group_order_detail/' + uni+'?product_type=' + product_type);
} }
// 支付状态订单 // 支付状态订单
@ -327,3 +327,11 @@ export function applyInvoiceApi(id, data) {
export function refundCancelApi(id) { export function refundCancelApi(id) {
return request.post(`refund/cancel/${id}`); return request.post(`refund/cancel/${id}`);
} }
/**
* 售后
* @param object data
*/
export function refundlist(data) {
return request.get(`refund/list`,data);
}

View File

@ -14,6 +14,18 @@ import request from "@/utils/request.js";
*/ */
export const getProductDetailsAPI = (data) => request.get('micro/product_details', data) 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);
}
/** /**
* 获取商户基本信息 http://127.0.0.1:8324/api/store/merchant/info?id=4 * 获取商户基本信息 http://127.0.0.1:8324/api/store/merchant/info?id=4
*/ */

View File

@ -24,6 +24,7 @@ export function getWechatConfig() {
); );
} }
/** /**
* 获取微信sdk配置 * 获取微信sdk配置
* @returns {*} * @returns {*}

View File

@ -467,7 +467,9 @@ export function getGeocoder(data) {
* *
*/ */
export function getStoreTypeApi() { export function getStoreTypeApi() {
return request.get('intention/type', {}, { return request.get('intention/type', {
sift_store: 0
}, {
noAuth: true noAuth: true
}); });
} }
@ -544,3 +546,30 @@ export function priceRuleApi(id) {
noAuth: true 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`);
}

View File

@ -9,6 +9,14 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import request from "@/utils/request.js"; import request from "@/utils/request.js";
import Cache from '@/utils/cache' import Cache from '@/utils/cache'
/**
* 获取版本信息
*/
export function Appversion(data) {
return request.get(`app/version`, data, {
noAuth: true
});
}
/** /**
* 提交提现 * 提交提现
*/ */
@ -708,3 +716,7 @@ export function hasServiceApi(id) {
export function getBankInfo() { export function getBankInfo() {
return request.get(`user/extract/history_bank`) return request.get(`user/extract/history_bank`)
} }
// 商户账单管理
export function getBillDetil() {
return request.get(`mer/financial_record`)
}

View File

@ -80,7 +80,7 @@ export default {
require: true require: true
}, },
type: { type: {
type: Number, type: Number|String,
default: 0 default: 0
}, },
isStore: { isStore: {

View File

@ -8,7 +8,7 @@
<text class='iconfont icon-ditu' :class='active==index?"t-color":""'></text> <text class='iconfont icon-ditu' :class='active==index?"t-color":""'></text>
<view class='address'> <view class='address'>
<view class='name' :class='active==index?"t-color":""'>{{item.real_name}}<text class='phone'>{{item.phone}}</text></view> <view class='name' :class='active==index?"t-color":""'>{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
<view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.street || ''}}{{item.detail}}</view> <view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.street || ''}}{{item.brigade}}{{item.detail}}</view>
</view> </view>
<text class='iconfont icon-complete' :class='active==index?"t-color":""'></text> <text class='iconfont icon-complete' :class='active==index?"t-color":""'></text>
</view> </view>

View File

@ -36,7 +36,7 @@
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import {getAddressList} from '@/api/user.js'; import {getAddressList} from '@/api/user.js';
import { getCityV2 } from '@/api/api.js'; import { getCityV2,village } from '@/api/api.js';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
const CACHE_ADDRESS = {}; const CACHE_ADDRESS = {};
export default { export default {
@ -87,25 +87,74 @@
this.loadAddress(0) this.loadAddress(0)
}, },
methods: { methods: {
change(pid,index){ change(pid){
if(this.selectedIndex == index) return; if(this.selectedIndex == index) return;
if(pid === -1){ if(pid === -1){
pid = this.selectedArr.length ? this.selectedArr[this.selectedArr.length -1].id : 0; pid = this.selectedArr.length ? this.selectedArr[this.selectedArr.length -1].id : 0;
} }
console.log(index)
this.selectedIndex = index; this.selectedIndex = index;
this.loadAddress(pid); this.loadAddress(pid);
}, },
loadAddress(pid){ loadAddress(pid,type){
if(CACHE_ADDRESS[pid]){ if(CACHE_ADDRESS[pid]){
this.addressList = CACHE_ADDRESS[pid]; this.addressList = CACHE_ADDRESS[pid];
return ; return ;
} }
this.is_loading = true; this.is_loading = true;
getCityV2(pid).then(res=>{ // getCityV2(pid).then(res=>{
// this.is_loading = false;
// CACHE_ADDRESS[pid] = res.data;
// this.addressList = res.data;
// })
if(type=='province'){
village({province_code:pid}).then(res=>{
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
})
}else if(type=='city'){
village({city_code:pid}).then(res=>{
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
})
}else if(type=='area'){
village({area_code:pid}).then(res=>{
if(res.data.length>0){
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
}else{
this.$emit('submit', [...this.selectedArr]);
this.$emit('changeClose');
}
})
}else if(type=='street'){
village({street_code:pid}).then(res=>{
if(res.data.length>0){
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
}else{
this.$emit('submit', [...this.selectedArr]);
this.$emit('changeClose');
}
})
}else{
village().then(res=>{
this.is_loading = false; this.is_loading = false;
CACHE_ADDRESS[pid] = res.data; CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data; this.addressList = res.data;
}) })
}
this.goTop() this.goTop()
}, },
selected(item){ selected(item){
@ -114,17 +163,49 @@
this.selectedArr.splice(this.selectedIndex + 1,999) this.selectedArr.splice(this.selectedIndex + 1,999)
this.selectedArr[this.selectedIndex] = item; this.selectedArr[this.selectedIndex] = item;
this.selectedIndex = -1; this.selectedIndex = -1;
}else if(!item.parent_id){ }
// else if(!item.parent_id){
// this.selectedArr = [item];
// }else{
// this.selectedArr.push(item);
// }
else if(!item.id){
this.selectedArr = [item]; this.selectedArr = [item];
}else{ }else{
if(this.selectedArr.length>4){
let arry=[]
arry.push(item)
this.selectedArr=arry
}else{
this.selectedArr.push(item); this.selectedArr.push(item);
} }
if(item.snum){
this.loadAddress(item.id);
}
if(item.type=="province"){
this.loadAddress(item.code,"province");
}else if(item.type=="city"){
this.loadAddress(item.code,"city");
}else if(item.type=="area"){
this.loadAddress(item.code,"area");
}else if(item.type=="street"){
this.loadAddress(item.code,"street");
} else { } else {
this.$emit('submit', [...this.selectedArr]); this.$emit('submit', [...this.selectedArr]);
this.$emit('changeClose'); this.$emit('changeClose');
} }
// if(item.snum){
// this.loadAddress(item.id);
// } else {
// this.$emit('submit', [...this.selectedArr]);
// this.$emit('changeClose');
// }
this.goTop() this.goTop()
}, },
close: function() { close: function() {

View File

@ -9,7 +9,8 @@
<view class="close" @click="closeShowBox"><text class="iconfont icon-guanbi"></text></view> <view class="close" @click="closeShowBox"><text class="iconfont icon-guanbi"></text></view>
</view> </view>
<view class="box"> <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>{{item.title}}</view>
<view class="radio" @click="bindCheck(item,index)"> <view class="radio" @click="bindCheck(item,index)">
<block v-if="index == newData.order.isTake"> <block v-if="index == newData.order.isTake">
@ -39,77 +40,79 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { mapGetters } from "vuex"; import {
export default{ mapGetters
name:'checkDelivery', } from "vuex";
props:{ export default {
isShowBox:{ name: 'checkDelivery',
type:Boolean, props: {
default:false isShowBox: {
type: Boolean,
default: false
}, },
activeObj:{ activeObj: {
type:Object, type: Object,
default:function(){ default: function() {
return {} return {}
} }
}, },
deliveryName:{ deliveryName: {
type:String, type: String,
default:'快递配送' default: '快递配送'
}, },
radioList:{ radioList: {
type:Array, type: Array,
default: [ default: [{
{ title: '快递配送',
title:'快递配送', check: true
check:true
}, },
{ {
title:'到店核销', title: '到店核销',
check:false check: false
} }
], ],
}, },
}, },
computed: mapGetters(['viewColor']), computed: mapGetters(['viewColor']),
data(){ data() {
return { return {
radioIndex:0, radioIndex: 0,
oldRadioIndex:'', // oldRadioIndex: '', //
newData:{} newData: {}
} }
}, },
created() { created() {
this.newData = JSON.parse(JSON.stringify(this.activeObj)) this.newData = JSON.parse(JSON.stringify(this.activeObj))
}, },
methods:{ methods: {
// //
closeShowBox(){ closeShowBox() {
this.$emit('close') this.$emit('close')
}, },
// //
bindCheck(item,index){ bindCheck(item, index) {
this.newData.order.isTake = index this.newData.order.isTake = index
}, },
confirmBtn(){ confirmBtn() {
this.$emit('confirmBtn',this.newData) this.$emit('confirmBtn', this.newData)
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.mask-box{ .mask-box {
.bg{ .bg {
z-index: 30; z-index: 30;
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0,0,0,0.5); background: rgba(0, 0, 0, 0.5);
} }
.mask-content{
.mask-content {
z-index: 40; z-index: 40;
position: fixed; position: fixed;
left: 0; left: 0;
@ -119,45 +122,54 @@
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9); transition: all .3s cubic-bezier(.25, .5, .5, .9);
.title-bar{
.title-bar {
position: relative; position: relative;
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-size: 32rpx; font-size: 32rpx;
color: #282828; color: #282828;
.close{
.close {
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
.iconfont{
.iconfont {
color: #8A8A8A; color: #8A8A8A;
} }
} }
} }
.box{
.box {
padding: 0 30rpx; padding: 0 30rpx;
.check-item{
.check-item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
height: 40rpx; height: 40rpx;
margin-bottom: 50rpx; margin-bottom: 50rpx;
font-size: 28rpx; font-size: 28rpx;
.iconfont{
.iconfont {
font-size: 38rpx; font-size: 38rpx;
color: #CCCCCC; color: #CCCCCC;
&.icon-xuanzhong1{
&.icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
} }
} }
.foot{
.foot {
padding: 15rpx 30rpx; padding: 15rpx 30rpx;
border-top: 1px solid #F5F5F5; border-top: 1px solid #F5F5F5;
.btn{
.btn {
width: 100%; width: 100%;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
@ -170,6 +182,7 @@
} }
} }
} }
.animated { .animated {
animation-duration: .3s animation-duration: .3s
} }

View File

@ -7,28 +7,47 @@
</view> </view>
<view v-for="(item,index) in cartInfo" :key="index"> <view v-for="(item,index) in cartInfo" :key="index">
<view v-if="activityType === 2"> <view v-if="activityType === 2">
<view class='item presell_item'> <view class='item presell_item'>
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class='pictrue' @click="jumpCon(item)"> <view class='pictrue' @click="jumpCon(item)">
<image :src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image' ></image> <image
:src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image'>
</image>
</view> </view>
<view class='text'> <view class='text'>
<view class='acea-row row-between-wrapper'> <view class='acea-row row-between-wrapper'>
<view class='name line1' style="width: 360rpx;"><text class="event_name event_bg">预售</text>{{item.cart_info.product.store_name}}</view> <view class='name line1' style="width: 360rpx;"><text
<view class='num'><text class="p-color">{{item.cart_info.productPresellAttr.presell_price}}</text><br/>x {{item.product_num}}</view> class="event_name event_bg">预售</text>{{item.cart_info.product.store_name}}
</view> </view>
<view class='attr line1' v-if="item.cart_info.productAttr.sku" style="margin-top: 0;">{{item.cart_info.productAttr.sku}}</view> <view class='num'><text
<view v-if="evaluate === 0 || evaluate === 10 || evaluate === 11" class="event_ship event_color">发货时间 class="p-color">{{item.cart_info.productPresellAttr.presell_price}}</text><br />x
{{item.product_num}}</view>
</view>
<view class='attr line1' v-if="item.cart_info.productAttr.sku" style="margin-top: 0;">
{{item.cart_info.productAttr.sku}}</view>
<view v-if="evaluate === 0 || evaluate === 10 || evaluate === 11"
class="event_ship event_color">发货时间
<!--全款预售--> <!--全款预售-->
<text v-if="item.cart_info.productPresell.presell_type === 1">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="item.cart_info.productPresell.presell_type === 1">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
<!--定金预售--> <!--定金预售-->
<text v-if="item.cart_info.productPresell.presell_type === 2">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="item.cart_info.productPresell.presell_type === 2">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
</view> </view>
<view class="right-btn-box event_box"> <view class="right-btn-box event_box">
<view class="btn-item" v-if="item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0" @click.stop="refund(item)">申请退款</view>
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x {{item.product_num - item.refund_num}}</view> <view class="btn-item"
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view> v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&&evaluate>=0 && evaluate != 1&& evaluate == 2"
<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> @click.stop="refund(item)">申请退款</view>
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x
{{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> <view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view> </view>
</view> </view>
@ -37,44 +56,68 @@
<view v-if="orderData.status >= 10" class="event_progress"> <view v-if="orderData.status >= 10" class="event_progress">
<view class="progress_list"> <view class="progress_list">
<view class="progress_name">阶段一 买家已付款</view> <view class="progress_name">阶段一 买家已付款</view>
<view class="progress_price">商品定金 <text class="align_right">{{ orderData.pay_price }}</text></view> <view class="progress_price">商品定金 <text
<view class="progress_pay">定金实付款<text class="align_right t-color">{{ orderData.pay_price }}</text></view> class="align_right">{{ orderData.pay_price }}</text></view>
<view class="progress_pay">定金实付款<text
class="align_right t-color">{{ orderData.pay_price }}</text></view>
</view> </view>
<view class="progress_list"> <view class="progress_list">
<view class="progress_name">阶段二 <view class="progress_name">阶段二
<text v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 0">未开始</text> <text
<text v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 1">等待买家付尾款</text> v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 0">未开始</text>
<text v-if="orderData.status == 11 || orderData.presellOrder.activeStatus == 2">交易已关闭</text> <text
v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 1">等待买家付尾款</text>
<text
v-if="orderData.status == 11 || orderData.presellOrder.activeStatus == 2">交易已关闭</text>
</view> </view>
<view class="progress_price">商品尾款 <text class="align_right">{{ orderData.presellOrder.pay_price }}</text></view> <view class="progress_price">商品尾款 <text
<view class="progress_pay">尾款需付款<text class="align_right t-color">{{ orderData.presellOrder.pay_price }}</text></view> class="align_right">{{ orderData.presellOrder.pay_price }}</text></view>
<view class="progress_pay">尾款需付款<text
class="align_right t-color">{{ orderData.presellOrder.pay_price }}</text></view>
</view> </view>
</view> </view>
</view> </view>
<view v-else class='item'> <view v-else class='item'>
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class='pictrue' @click="jumpCon(item)"> <view class='pictrue' @click="jumpCon(item)">
<image :src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image' ></image> <image
:src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image'>
</image>
</view> </view>
<view class='text'> <view class='text'>
<view class='acea-row row-between-wrapper'> <view class='acea-row row-between-wrapper'>
<view class='name line1'><text v-if="item.product_type != 0 && item.product_type != 10" :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>{{item.cart_info.product.store_name}}</view> <view class='name line1'><text v-if="item.product_type != 0 && item.product_type != 10"
: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>{{item.cart_info.product.store_name}}
</view>
<view class='num'>x {{item.product_num}}</view> <view class='num'>x {{item.product_num}}</view>
</view> </view>
<view class='attr line1' v-if="item.cart_info.productAttr.sku">{{item.cart_info.productAttr.sku}}</view> <view class='attr line1' v-if="item.cart_info.productAttr.sku">
<view class='money p-color' v-if="item.cart_info.product_type ==3">{{item.cart_info.productAssistAttr.assist_price}}</view> {{item.cart_info.productAttr.sku}}</view>
<view class='money p-color' v-else-if="item.cart_info.product_type ==4">{{item.cart_info.activeSku.active_price}}</view> <view class='money p-color' v-if="item.cart_info.product_type ==3">
{{item.cart_info.productAssistAttr.assist_price}}</view>
<view class='money p-color' v-else-if="item.cart_info.product_type ==4">
{{item.cart_info.activeSku.active_price}}</view>
<view class='money acea-row row-middle' v-else> <view class='money acea-row row-middle' v-else>
<text>{{item.cart_info.productAttr.price}}</text> <text>{{item.cart_info.productAttr.price}}</text>
<image v-if="item.cart_info.productAttr.show_svip_price" class="svip-img" src="/static/images/svip.png"></image> <image v-if="item.cart_info.productAttr.show_svip_price" class="svip-img"
src="/static/images/svip.png"></image>
</view> </view>
</view> </view>
</view> </view>
<view class="right-btn-box"> <view class="right-btn-box">
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x {{item.product_num - item.refund_num}}</view> <view class="btn-item err" v-if="item.is_refund ==1">退款中 x
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view> {{item.product_num - item.refund_num}}</view>
<view class="btn-item" v-if="item.is_refund ==0 && evaluate!=9 && orderData.refund_status || item.refund_num > 0" @click.stop="refund(item)">申请退款</view> <view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.refund_num > 0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view> </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"
@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'
@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 class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view> </view>
</view> </view>
@ -93,10 +136,18 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { openOrderRefundSubscribe } from '@/utils/SubscribeMessage.js'; import {
import { goShopDetail } from '@/libs/order.js' openOrderRefundSubscribe
import { initiateAssistApi } from '@/api/activity.js'; } from '@/utils/SubscribeMessage.js';
import { mapGetters } from "vuex"; import {
goShopDetail
} from '@/libs/order.js'
import {
initiateAssistApi
} from '@/api/activity.js';
import {
mapGetters
} from "vuex";
export default { export default {
props: { props: {
evaluate: { evaluate: {
@ -131,14 +182,14 @@
computed: mapGetters(['viewColor']), computed: mapGetters(['viewColor']),
data() { data() {
return { return {
totalNmu:'', totalNmu: '',
isTimePay: false, // isTimePay: false, //
}; };
}, },
watch:{ watch: {
cartInfo:function(nVal,oVal){ cartInfo: function(nVal, oVal) {
let num = 0 let num = 0
nVal.forEach((item,index)=>{ nVal.forEach((item, index) => {
num += item.cart_num num += item.cart_num
}) })
this.totalNmu = num this.totalNmu = num
@ -149,25 +200,28 @@
}, },
mounted() {}, mounted() {},
methods: { methods: {
evaluateTap:function(unique,orderId){ evaluateTap: function(unique, orderId) {
uni.navigateTo({ uni.navigateTo({
url:`/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}` url: `/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}`
}) })
}, },
// //
isPayBalance(){ isPayBalance() {
let that = this; let that = this;
if(that.orderData.status === 10){ if (that.orderData.status === 10) {
if(new Date() < new Date(that.orderData.presellOrder.final_start_time)){ if (new Date() < new Date(that.orderData.presellOrder.final_start_time)) {
that.isTimePay = false; // that.isTimePay = false; //
}else if((new Date() >= new Date(that.orderData.presellOrder.final_start_time)) && (new Date() <= new Date(that.orderData.presellOrder.final_start_time)) ){ } else if ((new Date() >= new Date(that.orderData.presellOrder.final_start_time)) && (new Date() <=
new Date(that.orderData.presellOrder.final_start_time))) {
that.isTimePay = true; // that.isTimePay = true; //
} }
} }
}, },
jumpCon:function(item){ jumpCon: function(item) {
if(item.product_type == 4)item.activity_id = item.cart_info && item.cart_info.activeSku.product_group_id if (item.product_type == 4) item.activity_id = item.cart_info && item.cart_info.activeSku
if(item.product_type == 3)item.activity_id = item.cart_info && item.cart_info.productAssistAttr.product_assist_id .product_group_id
if (item.product_type == 3) item.activity_id = item.cart_info && item.cart_info.productAssistAttr
.product_assist_id
goShopDetail(item).then(res => { goShopDetail(item).then(res => {
initiateAssistApi(item.activity_id).then(res => { initiateAssistApi(item.activity_id).then(res => {
let id = res.data.product_assist_set_id; let id = res.data.product_assist_set_id;
@ -184,17 +238,21 @@
}) })
}, },
// 退 // 退
refund(item){ refund(item) {
// #ifdef MP // #ifdef MP
openOrderRefundSubscribe().then(() => { openOrderRefundSubscribe().then(() => {
uni.hideLoading(); uni.hideLoading();
if(this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1){ if (this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/confirm?order_id='+this.orderId+'&type=1'+'&ids='+item.order_product_id+'&refund_type=1&order_type='+this.orderData.order_type url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' +
'&ids=' + item.order_product_id + '&refund_type=1&order_type=' + this
.orderData.order_type
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/select?order_id='+this.orderId+'&type=1&order_type='+this.orderData.order_type+'&ids='+item.order_product_id url: '/pages/users/refund/select?order_id=' + this.orderId +
'&type=1&order_type=' + this.orderData.order_type + '&ids=' + item
.order_product_id
}) })
} }
}).catch(() => { }).catch(() => {
@ -202,13 +260,15 @@
}) })
// #endif // #endif
// #ifdef H5 || APP-PLUS // #ifdef H5 || APP-PLUS
if(this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1){ if (this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/confirm?order_id='+this.orderId+'&type=1'+'&ids='+item.order_product_id+'&refund_type=1&order_type='+this.orderData.order_type url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' + '&ids=' + item
.order_product_id + '&refund_type=1&order_type=' + this.orderData.order_type
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/select?order_id='+this.orderId+'&type=1&order_type='+this.orderData.order_type+'&ids='+item.order_product_id url: '/pages/users/refund/select?order_id=' + this.orderId + '&type=1&order_type=' + this
.orderData.order_type + '&ids=' + item.order_product_id
}) })
} }
// #endif // #endif
@ -221,22 +281,27 @@
.orderGoods { .orderGoods {
background-color: #fff; background-color: #fff;
} }
.p-color { .p-color {
color: var(--view-priceColor); color: var(--view-priceColor);
} }
.t-color{
.t-color {
color: var(--view-theme); color: var(--view-theme);
} }
.svip-img{
.svip-img {
width: 65rpx; width: 65rpx;
height: 28rpx; height: 28rpx;
margin: 4rpx 0 0 4rpx; margin: 4rpx 0 0 4rpx;
} }
.title{
.title {
height: 86rpx; height: 86rpx;
position: relative; position: relative;
padding: 0 30rpx; padding: 0 30rpx;
&::after{
&::after {
content: ""; content: "";
width: 750rpx; width: 750rpx;
border-bottom: 2rpx dotted #D8D8D8; border-bottom: 2rpx dotted #D8D8D8;
@ -244,60 +309,73 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
.item-status{
.item-status {
color: #999999; color: #999999;
font-size: 30rpx; font-size: 30rpx;
&.status0{
&.status0 {
color: #2291F8; color: #2291F8;
} }
} }
.item-date{
.item-date {
color: #666666; color: #666666;
font-size: 28rpx; font-size: 28rpx;
} }
} }
.right-btn-box{
.right-btn-box {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
&.event_box{
&.event_box {
position: static; position: static;
} }
.btn-item{
.btn-item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width:140rpx; width: 140rpx;
height:46rpx; height: 46rpx;
margin-left: 10rpx; margin-left: 10rpx;
border:1px solid rgba(187,187,187,1); border: 1px solid rgba(187, 187, 187, 1);
border-radius:23rpx; border-radius: 23rpx;
font-size: 24rpx; font-size: 24rpx;
color: #282828; color: #282828;
&.on{
background:rgba(220,220,220,1); &.on {
border-color: rgba(220,220,220,1); background: rgba(220, 220, 220, 1);
border-color: rgba(220, 220, 220, 1);
} }
&.err{
background:rgba(247,247,247,1); &.err {
border-color: rgba(247,247,247,1); background: rgba(247, 247, 247, 1);
border-color: rgba(247, 247, 247, 1);
color: #AAAAAA; color: #AAAAAA;
} }
} }
} }
.event_bg{
.event_bg {
background: #FF7F00; background: #FF7F00;
} }
.event_color{
.event_color {
color: #FF7F00; color: #FF7F00;
} }
.presell_item{
.presell_item {
height: auto; height: auto;
padding-bottom: 15rpx; padding-bottom: 15rpx;
} }
.event_progress{
.event_progress {
margin-top: 20rpx; margin-top: 20rpx;
background: #fff; background: #fff;
.progress_name { .progress_name {
padding-left: 30rpx; padding-left: 30rpx;
height: 60rpx; height: 60rpx;
@ -306,7 +384,8 @@
font-weight: bold; font-weight: bold;
position: relative; position: relative;
color: var(--view-theme); color: var(--view-theme);
&::before{
&::before {
content: ""; content: "";
display: inline-block; display: inline-block;
width: 5rpx; width: 5rpx;
@ -317,23 +396,27 @@
left: 0; left: 0;
} }
} }
.align_right{
.align_right {
float: right; float: right;
font-weight: bold; font-weight: bold;
} }
.progress_price{
.progress_price {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
color: #999999; color: #999999;
font-size: 22rpx; font-size: 22rpx;
} }
.progress_pay{
.progress_pay {
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
background: var(--view-minorColor); background: var(--view-minorColor);
font-size: 26rpx; font-size: 26rpx;
color: #282828; color: #282828;
} }
} }
.event_name{
.event_name {
display: inline-block; display: inline-block;
margin-right: 9rpx; margin-right: 9rpx;
color: #fff; color: #fff;
@ -343,12 +426,14 @@
text-align: center; text-align: center;
border-radius: 6rpx; border-radius: 6rpx;
} }
.event_ship{
.event_ship {
font-size: 20rpx; font-size: 20rpx;
margin-top: 10rpx; margin-top: 10rpx;
} }
.goodWrapper.item1{
&::after{ .goodWrapper.item1 {
&::after {
content: ""; content: "";
display: block; display: block;
width: 750rpx; width: 750rpx;

View File

@ -4,8 +4,8 @@
<view class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text> 选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
</view> </view>
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode" <view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
:key="index" v-if="item.payStatus == 1"> v-for="(item,index) in payMode" :key="index" v-if="item.payStatus == 1">
<view class="left acea-row row-between-wrapper"> <view class="left acea-row row-between-wrapper">
<view class="iconfont" :class="item.icon"></view> <view class="iconfont" :class="item.icon"></view>
<view class="text"> <view class="text">
@ -78,6 +78,7 @@
}); });
}, },
goPay: function(number, paytype) { goPay: function(number, paytype) {
if (this.isCall) { if (this.isCall) {
return this.$emit('onChangeFun', { return this.$emit('onChangeFun', {
action: 'payCheck', action: 'payCheck',
@ -98,13 +99,17 @@
// #endif // #endif
} else if (paytype == 'balance') { } else if (paytype == 'balance') {
type = 'balance'; type = 'balance';
}else if(paytype == 'alipay'){ console.log('123');
} else if (paytype == 'alipay') {
// #ifndef MP // #ifndef MP
type = 'alipay'; type = 'alipay';
// #endif // #endif
// #ifdef MP // #ifdef MP
type = 'alipayQr'; type = 'alipayQr';
// #endif // #endif
} else if (paytype == 'creditBuy') {
console.log('123123');
type = 'creditBuy'
} }
if (!that.order_id) return that.$util.Tips({ if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单' title: '请选择要支付的订单'
@ -119,7 +124,12 @@
orderApi(that.order_id, { orderApi(that.order_id, {
type: type, type: type,
// #ifdef H5 // #ifdef H5
return_url: 'http://'+window.location.host+'/pages/users/order_list/index',
return_url: this.order_type == 98 ? 'http://' + window.location.host +
'/pages/users/order_list/indexCopy' : 'http://' + window.location.host +
'/pages/users/order_list/index',
// #endif // #endif
}).then(res => { }).then(res => {
@ -127,7 +137,9 @@
orderId = res.data.result.order_id, orderId = res.data.result.order_id,
jsConfig = res.data.result.config, jsConfig = res.data.result.config,
callback_key = res.data.result.pay_key, callback_key = res.data.result.pay_key,
goPages = '/pages/users/order_list/index';
goPages = this.order_type == 98 ? '/pages/users/order_list/indexCopy' :
'/pages/users/order_list/index'
switch (status) { switch (status) {
case 'ORDER_EXIST': case 'ORDER_EXIST':
case 'EXTEND_ORDER': case 'EXTEND_ORDER':
@ -151,7 +163,7 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=1' url: goPages + '?status=2'
}); });
break; break;
case 'alipay': case 'alipay':
@ -161,7 +173,8 @@
action: 'payClose' action: 'payClose'
}); });
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode='+callback_key+'&url='+jsConfig, url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
jsConfig,
}) })
return return
break; break;
@ -182,33 +195,34 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + 'status=1' url: goPages + 'status=2'
}); });
}).catch(res => { }).catch(res => {
// console.log('catch'+res.data) // console.log('catch'+res.data)
if (res.errMsg == 'chooseWXPay:cancel'){ if (res.errMsg == 'chooseWXPay:cancel') {
if(that.isCall){ if (that.isCall) {
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}); });
}else{ } else {
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=0' url: goPages + '?status=1'
}); });
} }
} }
}) })
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
let mp_pay_name='' let mp_pay_name = ''
if(uni.requestOrderPayment){ if (uni.requestOrderPayment) {
mp_pay_name='requestOrderPayment' mp_pay_name = 'requestOrderPayment'
}else{ } else {
mp_pay_name='requestPayment' mp_pay_name = 'requestPayment'
} }
console.log(mp_pay_name, jsConfig)
uni[mp_pay_name]({ uni[mp_pay_name]({
provider: 'wxpay', provider: 'wxpay',
orderInfo: jsConfig, orderInfo: jsConfig,
@ -221,20 +235,21 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + 'status=1' url: goPages + 'status=2'
}); });
}, },
fail: (e) => { fail: (e) => {
if(that.isCall){ console.log(e)
if (that.isCall) {
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}); });
}else{ } else {
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=0' url: goPages + '?status=1'
}); });
} }
}, },
@ -249,11 +264,11 @@
case "routine": case "routine":
jsConfig.timeStamp = jsConfig.timestamp; jsConfig.timeStamp = jsConfig.timestamp;
that.toPay = true; that.toPay = true;
let mp_pay_name='' let mp_pay_name = ''
if(uni.requestOrderPayment){ if (uni.requestOrderPayment) {
mp_pay_name='requestOrderPayment' mp_pay_name = 'requestOrderPayment'
}else{ } else {
mp_pay_name='requestPayment' mp_pay_name = 'requestPayment'
} }
uni[mp_pay_name]({ uni[mp_pay_name]({
...jsConfig, ...jsConfig,
@ -262,13 +277,14 @@
that.$emit('onChangeFun', { that.$emit('onChangeFun', {
action: 'payClose' action: 'payClose'
}); });
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId) if (that.BargainId || that.combinationId || that.pinkId || that
.seckillId)
return that.$util.Tips({ return that.$util.Tips({
title: '支付成功', title: '支付成功',
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=1' url: goPages + '?status=2'
}); });
return that.$util.Tips({ return that.$util.Tips({
@ -276,7 +292,7 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + '?status=1' url: goPages + '?status=2'
}); });
}, },
fail: function(e) { fail: function(e) {
@ -291,7 +307,8 @@
complete: function(e) { complete: function(e) {
uni.hideLoading(); uni.hideLoading();
// //
if (res.errMsg == 'requestPayment:cancel') return that.$util.Tips({ if (res.errMsg == 'requestPayment:cancel') return that.$util
.Tips({
title: '取消支付' title: '取消支付'
}); });
that.$emit('onChangeFun', { that.$emit('onChangeFun', {
@ -313,7 +330,7 @@
break; break;
// #ifdef H5 // #ifdef H5
case '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 url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
let eUrl = encodeURIComponent(url) let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url let jsurl = jsConfig.mweb_url || jsConfig.h5_url
@ -338,7 +355,7 @@
icon: 'success' icon: 'success'
}, { }, {
tab: 5, tab: 5,
url: goPages + 'status=1' url: goPages + 'status=2'
}); });
}, },
@ -375,7 +392,7 @@
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
background-color: #fff; background-color: #fff;
padding-bottom: 60rpx; padding-bottom: 60rpx;
z-index: 99; z-index: 99999;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9); transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
} }

View File

@ -5,7 +5,7 @@
<block v-for="(item,index) in imgUrls" :key='index'> <block v-for="(item,index) in imgUrls" :key='index'>
<swiper-item> <swiper-item>
<image :src="item" class="slide-image" /> <image :src="item" class="slide-image" mode="aspectFit" />
<!-- <view class="stop" v-if="isType == 2"> <!-- <view class="stop" v-if="isType == 2">
<image class="image" src="/static/images/stop.png"></image> <image class="image" src="/static/images/stop.png"></image>
</view> --> </view> -->

View File

@ -360,27 +360,36 @@
margin-right: 30rpx; margin-right: 30rpx;
} }
.product-window .cart .carnum .item { .product-window .cart .carnum .item {
border: 1px solid #a4a4a4;
width: 84rpx; width: 63rpx;
text-align: center; text-align: center;
height: 100%; height: 100%;
line-height: 54rpx; line-height: 42rpx;
color: #a4a4a4; color: #333333;
font-size: 45rpx; font-weight: 400;
font-size: 26rpx;
} }
.product-window .cart .carnum .reduce { .product-window .cart .carnum .reduce {
border-right: 0; border: 1px solid #a4a4a4;
border-radius: 6rpx 0 0 6rpx; width: 44rpx;
line-height: 48rpx; height: 42rpx;
// border-right: 0;
border-radius: 0 7rpx 7rpx 0;
line-height: 30rpx;
} }
.product-window .cart .carnum .reduce.on { .product-window .cart .carnum .reduce.on {
border-color: #e3e3e3; border-color: #e3e3e3;
color: #dedede; color: #dedede;
} }
.product-window .cart .carnum .plus { .product-window .cart .carnum .plus {
border-left: 0; border: 1px solid #a4a4a4;
border-radius: 0 6rpx 6rpx 0; width: 44rpx;
line-height: 46rpx; height: 42rpx;
// border-right: 0;
border-radius: 0 7rpx 7rpx 0;
line-height: 30rpx
} }
.product-window .cart .carnum .plus.on { .product-window .cart .carnum .plus.on {
border-color: #e3e3e3; border-color: #e3e3e3;

View File

@ -4,7 +4,9 @@
<view class="bg-img"> <view class="bg-img">
<img :src="bgColor" alt=""> <img :src="bgColor" alt="">
</view> </view>
<view class="site-box flex_a_c_j_sb"> <view class="site-box flex_a_c_j_sb">
<view class="place_wrapper flex_a_c" @click="selectLocation"> <view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view> <view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view> <view class="town_name">{{street}}</view>
@ -16,8 +18,9 @@
<!-- 搜索栏 --> <!-- 搜索栏 -->
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb"> <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="flex_a_c">
<view class="iconfont icon-sousuo"></view> <view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" disabled> <input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;"
disabled>
</view> </view>
<button class="search_btn">搜索</button> <button class="search_btn">搜索</button>
</navigator> </navigator>
@ -28,7 +31,7 @@
indicator-active-color="#fff"> indicator-active-color="#fff">
<block v-for="(item,index) in swiper['url']" :key="index"> <block v-for="(item,index) in swiper['url']" :key="index">
<swiper-item class="swi_item" @click="swiperClick(item)"> <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 :showLoading="true" :src="item.img" width="724rpx" height="259rpx" mode="aspectFit">
</u--image> </u--image>
</swiper-item> </swiper-item>
</block> </block>
@ -40,11 +43,23 @@
</template> </template>
<script> <script>
import { getArea, getStreet } from '@/api/article.js'; import {
import { getIndexData, getDiy } from '@/api/api.js' getArea,
import { getGeocoder } from '@/api/store.js'; getStreet
import { mapGetters } from 'vuex' } from '@/api/article.js';
import { Toast } from '../libs/uniApi'; 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'; import Cache from '@/utils/cache';
export default { export default {
props: { props: {
@ -55,12 +70,18 @@
location_Arr: { location_Arr: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
} },
town: {
type: String,
default: false
},
}, },
data() { data() {
return { return {
defaInd: [0, 0], defaInd: [0, 0],
street: '', street: '',
showPicker: false, showPicker: false,
styleConfig: [], styleConfig: [],
columnData: [], columnData: [],
@ -77,22 +98,29 @@
interval: 2000, // interval: 2000, //
duration: 400 // duration: 400 //
}, },
} }
}, },
computed: mapGetters(['location']),
watch: { watch: {
location: { street(nval, val) {
handler(newVal, oldVal) { this.street = nval
if (newVal.address_component?.street) this.street = newVal.address_component.street
},
immediate: true
} }
}, },
created() { created() {
this.getBanner() this.getBanner()
this.Area() this.Area()
if (this.location.address_component?.street) this.street = this.location.address_component.street
}, },
mounted() {
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
},
methods: { methods: {
swiperClick(item) { swiperClick(item) {
const url = item.info[1].value const url = item.info[1].value
@ -102,13 +130,22 @@
}, },
selectLocation() { selectLocation() {
this.isSelectPlace ? this.showPicker = true : '' this.isSelectPlace ? this.showPicker = true : ''
}, },
confirm(e) { confirm(e) {
this.street = e.value[1].name
this.showPicker = false this.showPicker = false
this.$emit('selectPlce', e) this.$emit('selectPlce', e)
let adress = Cache.get('LOCATION_DATA',true) this.$emit('change', e)
Cache.set('LOCATION_DATA',adress) this.street = e.value[1].name
this.$nextTick(() => {
this.$bus.$emit('value-updated',e.value[1].name + ',' +e.value[1].code);
})
}, },
changeHandler(e) { changeHandler(e) {
const { const {
@ -119,29 +156,41 @@
picker = this.$refs.uPicker picker = this.$refs.uPicker
} = e; } = e;
if (columnIndex === 0) { if (columnIndex === 0) {
getStreet({ area_code: value[0]['code'] }).then(res => { getStreet({
area_code: value[0]['code']
}).then(res => {
picker.setColumnValues(1, res.data); picker.setColumnValues(1, res.data);
}); });
} }
}, },
Area() { Area() {
getArea({ city_code: 510500 }).then(res => { getArea({
city_code: 510500
}).then(res => {
this.$refs.uPicker.setColumnValues(0, res.data); this.$refs.uPicker.setColumnValues(0, res.data);
this.Street(res.data[0]['code']); this.Street(res.data[0]['code']);
}); });
}, },
Street(code) { Street(code) {
getStreet({ area_code: code }).then(res => { getStreet({
area_code: code
}).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data); this.$refs.uPicker.setColumnValues(1, res.data);
}); });
}, },
swiperChange(e) { swiperChange(e) {
let { current, source } = e.detail; let {
current,
source
} = e.detail;
if (source === 'autoplay' || source === 'touch') { if (source === 'autoplay' || source === 'touch') {
this.bgColor = this.swiper.url[e.detail.current]['img'] this.bgColor = this.swiper.url[e.detail.current]['img']
this.$emit('kkchange', this.bgColor)
} }
}, },
// //
objToArr(data) { objToArr(data) {
let obj = Object.keys(data).sort(); let obj = Object.keys(data).sort();
@ -150,7 +199,11 @@
}, },
async getBanner(id) { async getBanner(id) {
let that = this; let that = this;
const { data } = await getDiy({ id: 0 }) const {
data
} = await getDiy({
id: 0
})
that.styleConfig = that.objToArr(data.value); that.styleConfig = that.objToArr(data.value);
/* 循环数组得到数据*/ /* 循环数组得到数据*/
that.styleConfig.forEach((item, index, arr) => { that.styleConfig.forEach((item, index, arr) => {
@ -166,7 +219,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.zbp-head-wrapper { .zbp-head-wrapper {
position: relative; position: relative;
padding-top: 78.95rpx; padding-top: 78.95rpx;
@ -213,15 +266,17 @@
height: 66.67rpx; height: 66.67rpx;
margin-bottom: 26.32rpx; margin-bottom: 26.32rpx;
position: relative; position: relative;
z-index: 9999;
// //
.place_wrapper { .place_wrapper {
color: #fff; color: #fff;
margin-right: 24.56rpx; margin-right: 24.56rpx;
font-size: 31.58rpx; font-size: 30rpx;
.town_name { .town_name {
margin-left: 10.53rpx; margin-left: 21rpx;
} }
} }
@ -236,12 +291,12 @@
.search_content { .search_content {
margin: 0 auto; margin: 0 auto;
width: 694.74rpx; width: 724rpx;
height: 61.4rpx; height: 74rpx;
padding: 2px 2px 2px 21.05rpx; padding: 2px 2px 2px 21.05rpx;
border-radius: 100px; border-radius: 175rpx;
background: #fff; background: #fff;
margin-bottom: 17.54rpx; margin-bottom: 21rpx;
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
@ -269,15 +324,15 @@
z-index: 2; z-index: 2;
.swiper { .swiper {
width: 694.74rpx; width: 724rpx;
height: 242.11rpx; height: 259rpx;
margin: 0 auto; margin: 0 auto;
border-radius: 15px; border-radius: 20rpx 20rpx 20rpx 20rpx;
overflow: hidden; overflow: hidden;
.swi_item { .swi_item {
width: 100%; width: 100%;
height: 242.11rpx; height: 259rpx;
} }
} }
} }

View File

@ -9,9 +9,11 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https // 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试 // let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
// httpApi = 'https://shop.lihaink.cn' // 生产 httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn" // httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222" // httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325'
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
httpApiTwo = "https://nk.lihaink.cn" httpApiTwo = "https://nk.lihaink.cn"
httpApiThree = 'http://ceshi-oa.lihaink.cn' httpApiThree = 'http://ceshi-oa.lihaink.cn'

View File

@ -38,4 +38,6 @@ module.exports = {
CACHE_LONGITUDE: 'LONGITUDE', CACHE_LONGITUDE: 'LONGITUDE',
//缓存纬度 //缓存纬度
CACHE_LATITUDE: 'LATITUDE', CACHE_LATITUDE: 'LATITUDE',
//缓存地址信息
ADRESS_LOCATION:'ADRESS_LOCATION'
} }

19
main.js
View File

@ -12,7 +12,9 @@ import App from './App'
import store from './store' import store from './store'
import Cache from './utils/cache' import Cache from './utils/cache'
import util from 'utils/util' 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 skeleton from './components/skeleton/index.vue'
import BaseMoney from './components/BaseMoney.vue'; import BaseMoney from './components/BaseMoney.vue';
import uView from '@/uni_modules/uview-ui' import uView from '@/uni_modules/uview-ui'
@ -23,11 +25,15 @@ Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache; Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue(); Vue.prototype.$eventHub = new Vue();
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$bus = new Vue();
// #ifdef H5 // #ifdef H5
import { parseQuery } from "./utils"; import {
parseQuery
} from "./utils";
import Auth from './libs/wechat'; import Auth from './libs/wechat';
import { SPREAD } from './config/cache'; import {
SPREAD
} from './config/cache';
// import wx from '@/node_modules/jweixin-module/lib/index' // import wx from '@/node_modules/jweixin-module/lib/index'
var __s = document.createElement('script'); var __s = document.createElement('script');
__s.src = HTTP_REQUEST_URL + "/api/script"; __s.src = HTTP_REQUEST_URL + "/api/script";
@ -86,6 +92,11 @@ Vue.directive('debounce', {
// #endif // #endif
let appInfo = uni.getSystemInfo().then(res => {
Vue.prototype.$appInfo = res[1];
});
App.mpType = 'app' App.mpType = 'app'

View File

@ -2,8 +2,8 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "1.0.15", "versionName" : "1.3.5",
"versionCode" : 138, "versionCode" : 135,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -26,7 +26,12 @@
"Camera" : {}, "Camera" : {},
"Geolocation" : {}, "Geolocation" : {},
"Payment" : {}, "Payment" : {},
"Share" : {} "Share" : {},
"OAuth" : {},
"UniMP" : {
"description" : "uni小程序"
},
"Maps" : {}
}, },
"safearea" : { "safearea" : {
"bottom" : { "bottom" : {
@ -80,7 +85,8 @@
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报", "NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报",
"NSCameraUsageDescription" : "上传用户头像保存分享海报", "NSCameraUsageDescription" : "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店", "NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店" "NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店"
}, },
"idfa" : false, "idfa" : false,
"dSYMs" : false "dSYMs" : false
@ -89,13 +95,13 @@
"sdkConfigs" : { "sdkConfigs" : {
"maps" : { "maps" : {
"amap" : { "amap" : {
"appkey_ios" : "", "appkey_ios" : "048d9f3f323eea894b49c3a7edbc8d87",
"appkey_android" : "" "appkey_android" : "048d9f3f323eea894b49c3a7edbc8d87"
} }
}, },
"payment" : { "payment" : {
"weixin" : { "weixin" : {
"__platform__" : [ "android" ], "__platform__" : [ "ios", "android" ],
"appid" : "wx9d68c92b550ddd1e", "appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/" "UniversalLinks" : "https://mer.crmeb.net/"
} }
@ -111,9 +117,7 @@
"__platform__" : [ "ios", "android" ] "__platform__" : [ "ios", "android" ]
} }
}, },
"oauth" : { "oauth" : {},
"apple" : {}
},
"ad" : {} "ad" : {}
}, },
"icons" : { "icons" : {
@ -329,3 +333,6 @@
"template" : "template.h5.html" "template" : "template.h5.html"
} }
} }
//
/* ios */

View File

@ -1,5 +1,33 @@
{ {
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [
//#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
//pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@ -27,7 +55,7 @@
"style": { "style": {
"navigationBarTitleText": "常用", "navigationBarTitleText": "常用",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": true "enablePullDownRefresh": false
} }
}, },
{ {
@ -93,8 +121,33 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, {
"path": "pages/moreProject/moreProject",
"style": {
"navigationBarTitleText": "更多功能",
"enablePullDownRefresh": false
} }
],
}
,{
"path": "uni_modules/guyue-updater/pages/updater",
"style": {
"app-plus": {
"animationDuration": 200,
"animationType": "fade-in",
"background": "transparent",
"backgroundColorTop": "transparent",
"bounce": "none",
"popGesture": "none",
"scrollIndicator": false,
"titleNView": false
},
"backgroundColor": "transparent",
"disableScroll": true,
"navigationStyle": "custom"
}
}
],
"subPackages": [{ "subPackages": [{
"root": "pages/goods_cate", "root": "pages/goods_cate",
"name": "goods_cate", "name": "goods_cate",
@ -166,14 +219,15 @@
"pages": [{ "pages": [{
"path": "gather/select_warehouse", "path": "gather/select_warehouse",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "入库管理",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, { }, {
"path": "goods_list/index", "path": "goods_list/index",
"style": { "style": {
"navigationBarTitleText": "里海云仓", "enablePullDownRefresh": true,
"enablePullDownRefresh": true "navigationStyle": "custom"
} }
}, },
{ {
@ -193,16 +247,43 @@
}, { }, {
"path": "supply_chain/supplier", "path": "supply_chain/supplier",
"style": { "style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#e93323" "navigationBarTitleText": "",
// "navigationStyle": "custom" "navigationBarBackgroundColor": "#e93323",
"navigationStyle": "custom"
}
}, {
"path": "supply_chain/supplierA",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#e93323",
"navigationStyle": "custom"
}
},
{
"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", "path": "supply_chain/merchant",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "商品",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -223,20 +304,67 @@
}, { }, {
"path": "cloud_entrepot/index", "path": "cloud_entrepot/index",
"style": { "style": {
"navigationStyle": "custom",
"navigationBarTitleText": "里海云仓", "navigationBarTitleText": "里海云仓",
"enablePullDownRefresh": false "enablePullDownRefresh": true
} }
} }, {
,{ "path": "teach_video/teach_video",
"path" : "teach_video/teach_video", "style": {
"style" :
{
"navigationBarTitleText": "教学视频", "navigationBarTitleText": "教学视频",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, {
"path": "specialty/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"
}
} }
] ]
}, },
@ -249,12 +377,24 @@
"navigationBarTitleText": "忘记密码" "navigationBarTitleText": "忘记密码"
} }
}, },
{
"path": "online_warehousing/index",
"style": {
"navigationBarTitleText": "采购订单"
}
},
{ {
"path": "user_setting/index", "path": "user_setting/index",
"style": { "style": {
"navigationBarTitleText": "设置" "navigationBarTitleText": "设置"
} }
}, },
{
"path": "supply_procurement/index",
"style": {
"navigationBarTitleText": "供货采购"
}
},
// //
{ {
"path": "user_about/index", "path": "user_about/index",
@ -381,7 +521,7 @@
} }
}, },
{ {
"path": "gather_list/index" , "path": "gather_list/index",
"style": { "style": {
"navigationBarTitleText": "提现流水" "navigationBarTitleText": "提现流水"
} }
@ -474,6 +614,24 @@
"navigationBarTitleText": "我的订单" "navigationBarTitleText": "我的订单"
} }
}, },
{
"path": "order_list/indexCopy",
"style": {
"navigationBarTitleText": "采购订单"
}
},
{
"path": "order_list/relase",
"style": {
"navigationBarTitleText": "委托订单"
}
},
{
"path": "order_list/order",
"style": {
"navigationBarTitleText": "我的订单"
}
},
{ {
"path": "order_list/search", "path": "order_list/search",
"style": { "style": {
@ -656,14 +814,125 @@
} }
}, { }, {
"path": "embody/embody", "path": "embody/embody",
"style": {
"navigationBarTitleText": "提现",
"enablePullDownRefresh": false
}
}, {
"path": "payment/payment",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, {
"path": "trading_hall/index",
"style": {
"navigationBarTitleText": "交易大厅",
"enablePullDownRefresh": false
}
} }
] ]
}, },
{
"root": "pages/releaseManagement",
"name": "releaseManagement",
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "发布管理",
"enablePullDownRefresh": false
}
},
{
"path": "details/index",
"style": {
"navigationBarTitleText": "发起委托",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "pages/commissionedSales",
"name": "commissionedSales",
"pages": [{
"path": "index/index",
"style": {
"navigationBarTitleText": "委托销售",
"enablePullDownRefresh": false
}
},
{
"path": "initiateDelegation/index",
"style": {
"navigationBarTitleText": "发起委托",
"enablePullDownRefresh": false
}
},
{
"path": "addDelegation/index",
"style": {
"navigationBarTitleText": "新增委托",
"enablePullDownRefresh": false
}
},
{
"path": "receivedCommission/index",
"style": {
"navigationBarTitleText": "收到委托",
"enablePullDownRefresh": false
}
},
{
"path": "delegation_details/index",
"style": {
"navigationBarTitleText": "委托销售详情",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "pages/trading_hall",
"name": "trading_hall",
"pages": [
{
"path": "transfer_goods/index",
"style": {
"navigationBarTitleText": "新增调货",
"enablePullDownRefresh": false
}
}, {
"path": "adddiscounts/index",
"style": {
"navigationBarTitleText": "新增打折",
"enablePullDownRefresh": false
}
}, {
"path": "product_details/index",
"style": {
"navigationBarTitleText": "商品详情",
"enablePullDownRefresh": false
}
}
]
},
{ {
"root": "pages/store", "root": "pages/store",
"name": "store", "name": "store",
@ -760,7 +1029,13 @@
"style": { "style": {
"navigationBarTitleText": "订单列表" "navigationBarTitleText": "订单列表"
} }
}, {
"path": "financial_management/index",
"style": {
"navigationBarTitleText": "财务管理"
}
}, },
{ {
"path": "orderRefund/index", "path": "orderRefund/index",
"style": { "style": {
@ -822,6 +1097,12 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, {
"path": "order/monitor",
"style": {
"navigationBarTitleText": "订单监控",
"enablePullDownRefresh": false
}
} }
] ]
}, },
@ -949,7 +1230,7 @@
"path": "plant_release/index", "path": "plant_release/index",
"style": { "style": {
"navigationBarTitleText": "内容发布", "navigationBarTitleText": "内容发布",
"enablePullDownRefresh":true "enablePullDownRefresh": false
} }
}, },
{ {
@ -1028,12 +1309,16 @@
"path": "goods_search/index", "path": "goods_search/index",
"style": { "style": {
"navigationBarTitleText": "搜索商品" "navigationBarTitleText": "搜索商品"
} }
}, },
{ {
"path": "goods_search_con/index", "path": "goods_search_con/index",
"style": { "style": {
"navigationBarTitleText": "搜索商品" "navigationBarTitleText": "搜索商品",
"app-plus": {
"titleNView": false
}
} }
} }
] ]
@ -1209,10 +1494,11 @@
"path": "nvueSwiper/index", "path": "nvueSwiper/index",
//#endif //#endif
"style": { "style": {
"navigationBarTitleText": "社区视频", "navigationBarTitleText": "社区视频",
"navigationStyle": "custom", "navigationStyle": "custom",
"app-plus": { "app-plus": {
"titleNView": false, "titleNView": false,
"bounce": "none" "bounce": "none"
} }
} }
@ -1310,11 +1596,13 @@
"selectedColor": "#E93323", "selectedColor": "#E93323",
"borderStyle": "white", "borderStyle": "white",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [{ "list": [{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/tabbar_icon/a.png", "iconPath": "static/tabbar_icon/a.png",
"selectedIconPath": "static/tabbar_icon/a-a.png", "selectedIconPath": "static/tabbar_icon/a-a.png",
"text": "泸州" "text": "泸州"
}, },
{ {
"pagePath": "pages/gather/gather", "pagePath": "pages/gather/gather",
@ -1324,14 +1612,16 @@
}, },
{ {
"pagePath": "pages/plant_release/index", "pagePath": "pages/plant_release/index",
"iconPath": "static/tabbar_icon/d.png", "iconPath": "static/tabbar_icon/c.png",
"selectedIconPath": "static/tabbar_icon/d-a.png", "selectedIconPath": "static/tabbar_icon/c-a.png",
"text": "发布" "text": "发布"
}, },
{ {
"pagePath": "pages/supply_chains/supply_chains", "pagePath": "pages/supply_chains/supply_chains",
"iconPath": "static/tabbar_icon/c.png",
"selectedIconPath": "static/tabbar_icon/c-a.png", "iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "供应" "text": "供应"
}, },
{ {
@ -1341,6 +1631,10 @@
"text": "我的" "text": "我的"
} }
] ]
}, },
"condition": { // "condition": { //
"current": 0, //(list ) "current": 0, //(list )

File diff suppressed because it is too large Load Diff

View File

@ -280,6 +280,7 @@
// console.log(res) // console.log(res)
this.detaile_address = res.data.address; this.detaile_address = res.data.address;
this.recommend_address = res.data.address.length > 4 ? res.data.address.slice(0,4) + '...' : 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)
}) })
}, },
fail: (res) => { fail: (res) => {

View File

@ -2,30 +2,36 @@
<view> <view>
<view class="order-index" ref="container"> <view class="order-index" ref="container">
<view class="header acea-row"> <view class="header acea-row">
<navigator class="item" :url="`/pages/admin/orderList/index?types=1&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=1&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.unpaid }}</view> <view class="num">{{ census.unpaid }}</view>
<view>待付款</view> <view>待付款</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=2&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=2&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.unshipped }}</view> <view class="num">{{ census.unshipped }}</view>
<view>待发货</view> <view>待发货</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=3&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=3&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.untake }}</view> <view class="num">{{ census.untake }}</view>
<view>待收货</view> <view>待收货</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=4&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=4&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.unevaluate }}</view> <view class="num">{{ census.unevaluate }}</view>
<view>待评价</view> <view>待评价</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=6&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=6&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.refund }}</view> <view class="num">{{ census.refund }}</view>
<view>退款</view> <view>退款</view>
</navigator> </navigator>
</view> </view>
<view class="wrapper"> <view class="wrapper">
<view class="title"> <view class="title">
<span class="iconfont icon-shujutongji"></span>数据统计 <image src="@/static/images/sjtj.png" mode="widthFix" style="width:40rpx;translate: 0 10rpx;">
</image>数据统计
</view> </view>
<view class="list acea-row" v-if="orderData"> <view class="list acea-row" v-if="orderData">
<navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=today&merId=${mer_id}`" <navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=today&merId=${mer_id}`"
@ -33,7 +39,8 @@
<view class="num">{{ orderData.today.payPrice }}</view> <view class="num">{{ orderData.today.payPrice }}</view>
<view>今日成交额</view> <view>今日成交额</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=yesterday&merId=${mer_id}`" <navigator class="item"
:url="`/pages/admin/statistics/index?type=price&time=yesterday&merId=${mer_id}`"
hover-class="none"> hover-class="none">
<view class="num">{{ orderData.yesterday.payPrice }}</view> <view class="num">{{ orderData.yesterday.payPrice }}</view>
<view>昨日成交额</view> <view>昨日成交额</view>
@ -48,7 +55,8 @@
<view class="num">{{ orderData.today.orderNum}}</view> <view class="num">{{ orderData.today.orderNum}}</view>
<view>今日订单数</view> <view>今日订单数</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=order&time=yesterday&merId=${mer_id}`" <navigator class="item"
:url="`/pages/admin/statistics/index?type=order&time=yesterday&merId=${mer_id}`"
hover-class="none"> hover-class="none">
<view class="num">{{ orderData.yesterday.orderNum }}</view> <view class="num">{{ orderData.yesterday.orderNum }}</view>
<view>昨日订单数</view> <view>昨日订单数</view>
@ -62,7 +70,8 @@
</view> </view>
<view class="public-wrapper"> <view class="public-wrapper">
<view class="title"> <view class="title">
<span class="iconfont icon-xiangxishuju"></span>详细数据 <image src="@/static/images/xxsj.png" mode="widthFix" style="width:40rpx;translate: 0 10rpx;">
</image>详细数据
</view> </view>
<view class="nav acea-row row-between-wrapper"> <view class="nav acea-row row-between-wrapper">
<view class="data">日期</view> <view class="data">日期</view>
@ -77,13 +86,83 @@
</view> </view>
</view> </view>
</view> </view>
<view class="public_footer" v-if="this.type_id == 12">
<view class="footer_bon">
<view class="footer_top public-wrapper ">
<image src="@/static/images/ddjk.png" mode="widthFix" style="width:40rpx;"></image>订单监控
</view>
<view v-for="(item,index) in OrderList" :key="index">
<view class="" v-for="(val, key) in item.orderProduct">
<view class="bon_top" :key="key" @click="toDetail(item)">
<view class="public_img">
<image class="public_img" :src="val.cart_info.product.image" mode=""></image>
</view>
<view>
<view class="text_top">
<view class="text">
{{ val.cart_info.product.store_name }}
</view>
<view class="monry">
{{ val.total_price }}
</view>
</view>
<view class="text_order">
订单号: {{ item.order_sn }}
</view>
</view>
</view>
<view class="bon_bon" :key="key" @click="toDetail(item)">
<view class="order">
采购数量
<view class="txt">
{{ val.product_num }}
</view>
</view>
<view class="order"
style="border-left: 1px solid #999999;border-right: 1px solid #999999;">
已售数量
<view class="txt">
{{ val.sales_volume }}
</view>
</view>
<view class="order">
库存数量
<view class="txt">
{{ val.product_num - val.sales_volume }}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<button v-if="this.type_id == 12" class="footer-bnt" @click="navigator()">查看更多 ></button>
<!-- <view class="public-wrapper">
<navigator class="item" :url="`/pages/admin/order/monitor?merId=${mer_id}`"
hover-class="none">
<view class="num">订单监控</view>
</navigator>
</view> -->
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { getStatisticsInfo, getStatisticsMonth, orderStatistics, orderPrice } from "@/api/admin"; import {
getStatisticsInfo,
getStatisticsMonth,
orderStatistics,
orderPrice,
purchaseOrder
} from "@/api/admin";
import Loading from '@/components/Loading/index.vue' import Loading from '@/components/Loading/index.vue'
export default { export default {
name: 'adminOrder', name: 'adminOrder',
@ -99,22 +178,28 @@
month: {} month: {}
}, },
list: [], list: [],
OrderList: [], //
where: { where: {
page: 1, page: 1,
limit: 15, limit: 10,
status: 1,
keyword: '',
product_type: '' product_type: ''
}, },
loaded: false, loaded: false,
loading: false, loading: false,
mer_id: '', mer_id: '',
type_id: '', //
} }
}, },
onLoad(options) { onLoad(options) {
this.type_id = options.type_id
this.where.product_type = options.product_type ?? 0 this.where.product_type = options.product_type ?? 0
this.mer_id = options.mer_id this.mer_id = options.mer_id
options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE"); options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE");
this.getOrderStatistics(this.mer_id); this.getOrderStatistics(this.mer_id);
this.getList(this.mer_id) this.getList(this.mer_id)
this.purchaseOrderList(this.mer_id)
}, },
methods: { methods: {
getIndex: function() { getIndex: function() {
@ -151,8 +236,9 @@
}, },
getOrderStatistics: function(mer_id) { getOrderStatistics: function(mer_id) {
let that = this; let that = this;
const data = { product_type: this.where.product_type } const data = {
console.log('data', data); product_type: this.where.product_type
}
orderStatistics(mer_id, data).then( orderStatistics(mer_id, data).then(
res => { res => {
that.census = res.data.order; that.census = res.data.order;
@ -164,6 +250,24 @@
}) })
} }
); );
},
toDetail(item) {
uni.navigateTo({
url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}`
})
},
navigator() {
uni.navigateTo({
url: `/pages/admin/order/monitor?merId=${this.mer_id}`
})
},
purchaseOrderList(mer_id) {
this.where.limit = 2
purchaseOrder(this.where, mer_id).then(res => {
// console.log(res);
this.OrderList = res.data
// console.log(this.OrderList);
})
} }
}, },
onReachBottom() { onReachBottom() {
@ -172,7 +276,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.popupn { .popupn {
position: fixed; position: fixed;
width: 100%; width: 100%;
@ -201,6 +305,14 @@
color: #fff; color: #fff;
} }
.supervisory_img {
display: inline-block;
width: 500rpx;
height: 500rpx;
background-color: red;
overflow: hidden;
}
.iconfont { .iconfont {
display: inline-block; display: inline-block;
position: relative; position: relative;
@ -228,7 +340,7 @@
/*订单首页*/ /*订单首页*/
.order-index .header { .order-index .header {
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/beijing2.png"); background: url("@/static/images/beijin.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 100%; width: 100%;
height: 280upx; height: 280upx;
@ -307,6 +419,14 @@
background-color: #fff; background-color: #fff;
border-radius: 10upx; border-radius: 10upx;
padding-top: 25upx; padding-top: 25upx;
.item {
.num {
display: flex;
justify-content: flex-start;
align-items: center;
}
}
} }
.public-wrapper .nav { .public-wrapper .nav {
@ -340,9 +460,118 @@
border-bottom: 1px solid #f7f7f7; border-bottom: 1px solid #f7f7f7;
height: 70upx; height: 70upx;
font-size: 24upx; font-size: 24upx;
} }
.public-wrapper .conter .item .turnover { .public-wrapper .conter .item .turnover {
color: #d84242; color: #d84242;
} }
.public_footer {
width: 90vw;
margin: auto;
.footer_top {
display: flex;
align-items: center;
margin: 16px 0 16px 25rpx;
.jk_img {
width: 18px;
height: 18px;
overflow: hidden;
// border: 1px solid red;
border-radius: 40px;
image {
width: 22px;
height: 22px;
margin-right: 5px;
}
}
}
.footer_bon {
width: 100%;
border-radius: 8px;
background-color: #fff;
padding-bottom: 10px;
margin-bottom: 10px;
.bon_top {
display: flex;
justify-content: flex-start;
align-items: center;
.public_img {
width: 60px;
height: 60px;
margin: 12px;
}
.text_top {
display: flex;
justify-content: flex-start;
align-items: center;
margin: 3px 0 3px 3px;
.text {
width: 140px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.monry {
margin-left: 10px;
color: #F84221;
}
}
.text_order {
width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-left: 3px;
}
}
.bon_bon {
width: 90%;
height: 66px;
background: #F5F5F5;
border-radius: 4px 4px 4px 4px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
margin: auto;
margin-bottom: 10px;
margin-top: 5px;
.order {
width: 120px;
.txt {
margin-top: 5px;
}
}
}
}
}
.footer-bnt {
width: 100px;
height: 40px;
border-radius: 15px;
margin: auto;
line-height: 40px;
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
color: #999999;
font-size: 13px
}
</style> </style>

View File

@ -86,7 +86,7 @@
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>支付方式</view> <view>支付方式</view>
<view class="conter">{{ orderInfo.pay_type == 0 ? "余额支付" : (orderInfo.pay_type == 1 || orderInfo.pay_type == 2 || orderInfo.pay_type == 3) ? "微信支付" : "支付宝支付" }}</view> <view class="conter">{{ orderInfo.pay_type == 0 ? "余额支付" : (orderInfo.pay_type == 1 || orderInfo.pay_type == 2 || orderInfo.pay_type == 3) ? "微信支付" : "先货后款" }}</view>
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>买家留言</view> <view>买家留言</view>
@ -146,8 +146,14 @@
</view> </view>
</view> </view>
<view style="height:120upx;"></view> <view style="height:120upx;"></view>
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'"> <view class="footer acea-row row-right row-middle" v-if="goname != 'looks'" style="margin-bottom: var(--status-bar-height);">
<view class="more"></view> <view class="more"></view>
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)">
同意
</view>
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,2)">
拒绝
</view>
<view class="bnt cancel" @click="modify('0')" v-if="orderInfo.paid == 0"> <view class="bnt cancel" @click="modify('0')" v-if="orderInfo.paid == 0">
一键改价 一键改价
</view> </view>
@ -158,11 +164,24 @@
<view class="bnt cancel" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay"> <view class="bnt cancel" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay">
确认付款 确认付款
</view> </view>
<navigator class="bnt delivery" v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator>
<view class="bnt delivery" @click="toPostagequ(orderInfo)" v-if="orderInfo.status == 0&&orderInfo.activity_type==0&& orderInfo.order_type !=1 ">
收件码
</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>
<view class="bnt delivery" v-if="orderInfo.paid == 1 && (orderInfo.status == 0 || orderInfo.status == 9) && orderInfo.order_type == 1" @click="goCancellation">去核销</view> <view class="bnt delivery" v-if="orderInfo.paid == 1 && (orderInfo.status == 0 || orderInfo.status == 9) && orderInfo.order_type == 1" @click="goCancellation">去核销</view>
</view> </view>
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice" <PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
:status="status"></PriceChange> :status="status"></PriceChange>
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
<view style="text-align: center;margin-top: 30rpx;">
请把二维码展示给取货人员
</view>
<view style="padding: 28.07rpx;">
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
</view>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
@ -185,7 +204,9 @@
setAdminOrderRemark, setAdminOrderRemark,
setOfflinePay, setOfflinePay,
setOrderRefund, setOrderRefund,
orderCancellation orderCancellation,
logisticsCode,
postconfirm
} from "@/api/admin"; } from "@/api/admin";
import { isMoney } from '@/utils/validate.js' import { isMoney } from '@/utils/validate.js'
import { HTTP_REQUEST_URL } from '@/config/app'; import { HTTP_REQUEST_URL } from '@/config/app';
@ -211,7 +232,10 @@
payType: "", payType: "",
types: "", types: "",
clickNum: 1, clickNum: 1,
goname:''
goname:'',
popUpShow: false,
payCodeUrl:''
}; };
}, },
watch: { watch: {
@ -225,12 +249,12 @@
}, },
onLoad: function(option) { onLoad: function(option) {
let self = this let self = this
this.order_id = option.id self.order_id = option.id
this.mer_id = option.mer_id self.mer_id = option.mer_id
this.goname = option.goname self.goname = option.goname
this.getIndex(); self.getIndex();
// #ifdef H5 // #ifdef H5
this.$nextTick(function() { self.$nextTick(function() {
var clipboard = new ClipboardJS('.copy-data'); var clipboard = new ClipboardJS('.copy-data');
// var copybtn = document.getElementsByClassName("copy-data"); // var copybtn = document.getElementsByClassName("copy-data");
// var clipboard = new Clipboard(copybtn); // var clipboard = new Clipboard(copybtn);
@ -249,6 +273,42 @@
}, },
methods: { methods: {
//
toPostagequ(item){
this.popUpShow = true
logisticsCode(item.order_id).then(res => {
if (res.status == 200) {
this.payCodeUrl = res.data.qrcode
}
})
},
//
popUpClose() {
this.popUpShow = false
},
//
tongyi(id,number){
let data={
id:id,
type:number
}
if(number == 1){
this.$nextTick(()=>{
uni.navigateTo({
url:`/pages/admin/orderList/index?types=1&merId=${this.mer_id}`
})
})
}else if(number == 2){
uni.navigateTo({
url:`/pages/admin/orderList/index?types=1&merId=${this.mer_id}`
})
}
postconfirm(this.mer_id,data).then(res=>{
})
},
more: function() { more: function() {
this.order = !this.order; this.order = !this.order;
}, },

View File

@ -45,7 +45,8 @@
退款单号{{ item.refund_order_sn }} 退款单号{{ item.refund_order_sn }}
<text class="time">申请时间{{ item.create_time }}</text> <text class="time">申请时间{{ item.create_time }}</text>
</view> </view>
<view class="pos-order-goods" v-for="(val, key) in item.refundProduct" :key="key" @click="toRefundDetail(item)"> <view class="pos-order-goods" v-for="(val, key) in item.refundProduct" :key="key"
@click="toRefundDetail(item)">
<view class="goods acea-row row-between-wrapper"> <view class="goods acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<view class="pictrue"> <view class="pictrue">
@ -80,9 +81,11 @@
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="bnt" @click="refundModify(item, 1)">订单备注</view> <view class="bnt" @click="refundModify(item, 1)">订单备注</view>
<navigator class="bnt bnt_color" v-if="item.status == 0" <navigator class="bnt bnt_color" v-if="item.status == 0"
:url="'/pages/admin/orderRefund/index?id='+item.refund_order_id+'&merId='+merId">立即退款</navigator> :url="'/pages/admin/orderRefund/index?id='+item.refund_order_id+'&merId='+merId">立即退款
</navigator>
<navigator class="bnt" v-if="item.status == 2" <navigator class="bnt" v-if="item.status == 2"
:url="'/pages/users/goods_logistics/index?refundId='+item.refund_order_id+'&merId='+merId">查看物流 :url="'/pages/users/goods_logistics/index?refundId='+item.refund_order_id+'&merId='+merId">
查看物流
</navigator> </navigator>
<view class="bnt bnt_color" v-if="item.status == 2" @tap='confirmOrder(item)'>确认收货</view> <view class="bnt bnt_color" v-if="item.status == 2" @tap='confirmOrder(item)'>确认收货</view>
</view> </view>
@ -100,7 +103,8 @@
<text class="order-status" <text class="order-status"
v-if="item.refunding != 0 && where.status != 1">{{item.refunding==1 ? '退款中' : item.refunding==2 ? '部分退款' : '全部退款'}}</text> v-if="item.refunding != 0 && where.status != 1">{{item.refunding==1 ? '退款中' : item.refunding==2 ? '部分退款' : '全部退款'}}</text>
</view> </view>
<view class="pos-order-goods" v-for="(val, key) in item.orderProduct" :key="key" @click="toDetail(item)"> <view class="pos-order-goods" v-for="(val, key) in item.orderProduct" :key="key"
@click="toDetail(item)">
<view class="goods"> <view class="goods">
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
@ -130,24 +134,49 @@
</view> </view>
</view> </view>
<view class="public-total"> <view class="public-total" v-if="item.pay_type !== 8">
{{ item.total_num }}件商品 {{ item.total_num }}件商品
<span v-if="where.status <= 1"></span> <span v-if="where.status <= 1"></span>
<span v-else></span> <span v-else></span>
支付 支付
<span class="money">{{ item.pay_price }}</span> (邮费 ¥{{ item.pay_postage}}) <span class="money" style="margin-right: 30rpx;">{{ item.pay_price }}</span> (邮费
¥{{ item.pay_postage}})
</view>
<view class="public-total" v-else>
先货后款
<span v-if="where.status <= 1"></span>
<span v-else></span>
支付
<span class="money" style="margin-right: 30rpx;">0.00</span> (邮费 ¥{{ item.pay_postage}})
</view>
<view class="public-total" v-if="item.pay_type == 8 ">
{{item.total_num}}件商品结算周期到期后付款{{ item.pay_price }}
</view> </view>
<view class="operation acea-row row-between-wrapper"> <view class="operation acea-row row-between-wrapper">
<view class="more"> <view class="more">
</view> </view>
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 1 && item.activity_type != 2"> <view class="bnt" v-if="item.pay_type == 8 && item.status == 12"
@click="tongyi(item.group_order_id,1)">
同意
</view>
<view class="bnt" v-if="item.pay_type == 8 && item.status == 12 "
@click="tongyi(item.group_order_id,2)">
拒绝
</view>
<view class="bnt" @click="modify(item, 0)"
v-if="item.pay_type !=8 && item.paid !=1 &&!(item.status ==2 && item.pau_type==8) ">
一键改价 一键改价
</view> </view>
<view class="bnt" @click="modify(item, 1)">订单备注</view> <view class="bnt" @click="modify(item, 1)">订单备注</view>
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0" @click="toPostage(item)">去发货 <view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&item.activity_type==98"
@click="toPostage(item)">去发货
</view> </view>
<view class="bnt bnt_color" v-if="(where.status == 2 && item.order_type == 1) || where.is_verify == 1" <view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&& item.order_type !=1 &&item.activity_type==0"
@click="toPostagequ(item)">收件码
</view>
<view class="bnt bnt_color"
v-if="(where.status == 2 && item.order_type == 1) || where.is_verify == 1"
@click="toDetail(item)">去核销</view> @click="toDetail(item)">去核销</view>
</view> </view>
</view> </view>
@ -175,6 +204,16 @@
</view> </view>
<view class="mask" @touchmove.prevent v-show="refundMark === true"></view> <view class="mask" @touchmove.prevent v-show="refundMark === true"></view>
</view> </view>
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
<view style="text-align: center;margin-top: 30rpx;">
请把二维码展示给取货人员
</view>
<view style="padding: 28.07rpx;">
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
</view>
</u-popup>
</view> </view>
</template> </template>
@ -196,11 +235,16 @@
setOfflinePay, setOfflinePay,
setOrderRefund, setOrderRefund,
refundOrderReceive, refundOrderReceive,
setRefundMark setRefundMark,
postconfirm,
logisticsCode
} from "@/api/admin"; } from "@/api/admin";
import Loading from '@/components/Loading/index' import Loading from '@/components/Loading/index'
import PriceChange from '@/components/PriceChange/index' import PriceChange from '@/components/PriceChange/index'
import { isMoney } from '@/utils/validate.js' import {
isMoney
} from '@/utils/validate.js'
export default { export default {
name: "AdminOrderList", name: "AdminOrderList",
components: { components: {
@ -226,7 +270,10 @@
refundInfo: {}, refundInfo: {},
orderInfo: {}, orderInfo: {},
status: "", status: "",
merId: '' codeShow: false,
merId: '',
popUpShow: false,
payCodeUrl: ''
}; };
}, },
watch: { watch: {
@ -249,9 +296,35 @@
this.getIndex(); this.getIndex();
}, },
methods: { methods: {
//
popUpClose() {
this.popUpShow = false
},
//
tongyi(id, number) {
let data = {
id: id,
type: number
}
if (number == 1) {
this.$nextTick(() => {
this.where.status = 2;
delete this.where.is_verify;
this.init();
})
} else if (number == 2) {
uni.navigateTo({
url: `/pages/admin/orderList/index?types=1&merId=${this.merId}`
})
}
postconfirm(this.merId, data).then(res => {
// console.log(res);
})
},
handleSearch() { handleSearch() {
this.loaded = false; this.loaded = false;
this.where.page = 1; this.where.page = 3;
this.list = []; this.list = [];
this.getIndex(); this.getIndex();
}, },
@ -265,11 +338,14 @@
res => { res => {
that.loading = false; that.loading = false;
that.loaded = res.data.list.length < that.where.limit; that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list); that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
}, },
err => { err => {
that.$util.Tips({ title: err }); that.$util.Tips({
title: err
});
} }
); );
} else { } else {
@ -279,9 +355,14 @@
that.loaded = res.data.list.length < that.where.limit; that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list); that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
console.log(that.list)
// console.log(that.list);
}, },
err => { err => {
that.$util.Tips({ title: err }); that.$util.Tips({
title: err
});
} }
); );
} }
@ -328,7 +409,9 @@
title: '请输入备注' title: '请输入备注'
}) })
} }
setRefundMark(that.merId, that.refundInfo.refund_order_id, { mer_mark: that.refundInfo.mer_mark }).then( setRefundMark(that.merId, that.refundInfo.refund_order_id, {
mer_mark: that.refundInfo.mer_mark
}).then(
res => { res => {
that.refundMark = false; that.refundMark = false;
this.$util.Tips({ this.$util.Tips({
@ -371,6 +454,16 @@
} }
}) })
}, },
//
toPostagequ(item) {
this.popUpShow = true
logisticsCode(item.order_id).then(res => {
if (res.status == 200) {
this.payCodeUrl = res.data.qrcode
}
})
},
toPostage(item) { toPostage(item) {
let that = this; let that = this;
if (item.refunding != 0) { if (item.refunding != 0) {
@ -382,6 +475,7 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/admin/delivery/index?id=${item.order_id}&merId=${that.merId}` url: `/pages/admin/delivery/index?id=${item.order_id}&merId=${that.merId}`
}) })
} }
} }
}) })
@ -406,7 +500,9 @@
let id = that.orderInfo.order_id; let id = that.orderInfo.order_id;
if (that.status == 0) { if (that.status == 0) {
if (!isMoney(opt.orderInfo.pay_postage || opt.orderInfo.total_price)) { if (!isMoney(opt.orderInfo.pay_postage || opt.orderInfo.total_price)) {
return that.$util.Tips({ title: '请输入正确的金额' }); return that.$util.Tips({
title: '请输入正确的金额'
});
} }
data.pay_price = price; data.pay_price = price;
setAdminOrderPrice(this.merId, id, parmas).then( setAdminOrderPrice(this.merId, id, parmas).then(
@ -432,7 +528,9 @@
title: '请输入备注' title: '请输入备注'
}) })
} }
setAdminOrderRemark(this.merId, id, { remark: remark }).then( setAdminOrderRemark(this.merId, id, {
remark: remark
}).then(
res => { res => {
that.change = false; that.change = false;
this.$util.Tips({ this.$util.Tips({
@ -443,7 +541,9 @@
}, },
err => { err => {
that.change = false; that.change = false;
that.$util.Tips({ title: err }); that.$util.Tips({
title: err
});
} }
); );
} }
@ -631,7 +731,7 @@
.pos-order-list .list .item .operation .bnt { .pos-order-list .list .item .operation .bnt {
font-size: 28upx; font-size: 28upx;
color: #5c5c5c; color: #5c5c5c;
width: 170upx; width: 160upx;
height: 60upx; height: 60upx;
border-radius: 30upx; border-radius: 30upx;
border: 1px solid #bbb; border: 1px solid #bbb;

View File

@ -789,6 +789,7 @@
</block> </block>
</swiper> </swiper>
</div> </div>
</div> </div>
<div class="recording" v-if="recording"> <div class="recording" v-if="recording">
<image src="/static/images/recording.png" /> <image src="/static/images/recording.png" />
@ -1944,6 +1945,7 @@
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
margin-bottom: var(--status-bar-height);;
} }
.broadcast-details .footerCon.on { .broadcast-details .footerCon.on {

View File

@ -158,9 +158,9 @@
} else { } else {
this.$set(this, 'searchValue', event); this.$set(this, 'searchValue', event);
} }
this.$nextTick(() => { // this.$nextTick(() => {
this.focus = true // this.focus = true
}) // })
this.searchBut() this.searchBut()
}, },
setValue: function(event) { setValue: function(event) {

View File

@ -2,19 +2,17 @@
<view :style="viewColor"> <view :style="viewColor">
<view class='productList'> <view class='productList'>
<view class='search acea-row row-between-wrapper'> <view class='search acea-row row-between-wrapper'>
<!--#ifdef H5-->
<view class="back" @click='set_where(1)'> <view class="back" @click='set_where(1)'>
<view class="iconfont icon-xiangzuo"></view> <view class="iconfont icon-xiangzuo"></view>
</view> </view>
<!--#endif-->
<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" <input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='where.keyword' @confirm="searchSubmit" @input="inputChange"></input> :value='where.keyword' @confirm="searchSubmit" @input="inputChange"></input>
</view> </view>
<view style="text-align: right;" v-if="tabIndex==1" class='iconfont' <view style="text-align: right;" v-if="tabIndex==1" class='iconfont'
:class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view> :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' <!-- <view v-else-if="mer_location == 1" style="text-align: right;" class='iconfont icon-dingwei'
@click="showMaoLocation(latitude,longitude)"></view> @click="showMaoLocation(latitude,longitude)"></view> -->
</view> </view>
<view class="nav-wrapper"> <view class="nav-wrapper">
<view v-if="hide_mer_status == 0" class="tab-bar"> <view v-if="hide_mer_status == 0" class="tab-bar">
@ -22,7 +20,7 @@
<view class="tab-item" :class="{on:tabIndex==2}" @click="tabIndex = 2">店铺</view> <view class="tab-item" :class="{on:tabIndex==2}" @click="tabIndex = 2">店铺</view>
</view> </view>
<block v-if="tabIndex==1"> <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" <view class='item' @click="downStatus = !downStatus"
:class="{'t-color':downKey>0 && firstKey == 0}"> :class="{'t-color':downKey>0 && firstKey == 0}">
{{downMenu[downKey].title}} {{downMenu[downKey].title}}
@ -413,7 +411,7 @@
} }
} }
}); });
this.mTop = this.hide_mer_status == 0 ? '238rpx' : '170rpx' this.mTop = this.hide_mer_status == 0 ? '308rpx' : '170rpx'
}, },
computed: { computed: {
shopTab: function() { shopTab: function() {
@ -561,9 +559,10 @@
limit: this.sotreParam.limit, limit: this.sotreParam.limit,
order: this.sotreParam.order, order: this.sotreParam.order,
category_id: this.sotreParam.category_id, category_id: this.sotreParam.category_id,
type_id: 10 type_id: this.sotreParam.type_id
} }
console.log(this.sotreParam.category_id)
if (this.latitude) { if (this.latitude) {
serachData.location = this.latitude + ',' + this.longitude serachData.location = this.latitude + ',' + this.longitude
} }
@ -578,7 +577,7 @@
this.storeList = this.storeList.concat(res.data.list) this.storeList = this.storeList.concat(res.data.list)
this.count = res.data.count this.count = res.data.count
this.loading = false this.loading = false
console.log(this.storeList);
}) })
}, },
// //
@ -684,6 +683,7 @@
}, },
// //
confirm2(data) { confirm2(data) {
let arr1 = [], let arr1 = [],
arr2 = [] arr2 = []
if (data.storeTypeArr.length == 0) { if (data.storeTypeArr.length == 0) {
@ -821,8 +821,10 @@
// //
get_product_list: function(isPage) { get_product_list: function(isPage) {
let that = this; let that = this;
if (that.loadend) return; if (that.loadend) return;
if (that.loading) return; if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []); if (isPage === true) that.$set(that, 'productList', []);
that.loading = true; that.loading = true;
that.loadTitle = ''; that.loadTitle = '';
@ -897,12 +899,13 @@
.productList .search { .productList .search {
width: 100%; width: 100%;
height: 86rpx; height: 170rpx;
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; // box-sizing: border-box;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0rpx;
padding-top: 60rpx;
z-index: 9; z-index: 9;
background-color: var(--view-theme); background-color: var(--view-theme);
@ -966,7 +969,7 @@
z-index: 9; z-index: 9;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 70rpx;
width: 100%; width: 100%;
margin-top: 86rpx; margin-top: 86rpx;
background-color: var(--view-theme); background-color: var(--view-theme);
@ -1040,6 +1043,7 @@
.productList .list { .productList .list {
padding: 0 20rpx; padding: 0 20rpx;
} }
.productList .list.on { .productList .list.on {
@ -1075,6 +1079,7 @@
position: relative; position: relative;
width: 100%; width: 100%;
height: 345rpx; height: 345rpx;
} }
.productList .list .item .pictrue.on { .productList .list .item .pictrue.on {
@ -1417,7 +1422,8 @@
} }
.store-wrapper { .store-wrapper {
margin-top: 240rpx; margin-top: 310rpx;
border-top: 1px solid #F6F6F6; border-top: 1px solid #F6F6F6;
.star-box { .star-box {

View File

@ -1,203 +1,75 @@
<template> <template>
<view class="gather"> <view class="gather">
<zbpSwiper></zbpSwiper> <view @click="selectLocation" v-if="isFshow">
<u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText"
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
<view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']"
style="color:#000;margin-left: 20rpx;">
</view>
<view class="town_name" style="color:#000;">{{street}}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#000;"></view>
</navigator>
</view>
<!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
<view class="bg-img">
<img :src="bgColor" alt="">
</view>
</view> -->
</view>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town="street" @kkchange="kkchange"></zbpSwiper>
<u-empty :show="jurisdiction" mode="permission" :text="emptyText"
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty> icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
<block v-if="isShow"> <view class="business com special_work" v-if="jurisdiction == false">
<view class="special_work com" v-if="userInfoData.mer_info.type_id === 12"> <view class="title project">
<view class="special_work com" v-if="true"> <view>更多功能</view>
<view class="title">市级供应链</view> <view v-if="!editFlag" class="edit" @click="editFlag = true">编辑</view>
<view v-else class="edit" @click="editComfirm">完成</view>
</view>
<view class="content"> <view class="content">
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)"> <block v-if="nowMenuList.length > 0">
<image class="icon_img" :src="`${prefix}zsgl.png`" mode="aspectFill"></image> <u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
<text class="text">在售管理</text> <view class="examine" @click="
</view> editFlag ? removeMenu(item) : clickMenu(item.type, item.data)
<view class="examine" ">
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&product_type=98`)"> <image class="icon_img" :src="item.icon" mode="aspectFit">
<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> </image>
<text class="text">入库管理</text> <u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon>
</view> <text class="text">{{ item.name }}</text>
<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>
</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/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}`)">
<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>
<!-- <gatherBusiness :userInfoData="userInfoData" /> -->
</view>
</view>
<view class="business com" v-if="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}`)">
<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> </view>
</u-transition>
</block> </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.icon" 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="" v-if="jurisdiction == false && isShow == false">
<emptyPage title="暂无信息"></emptyPage>
</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> <!-- <m-tabbar native>
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
<view class="custom_style"> <view class="custom_style">
@ -209,8 +81,14 @@
</template> </template>
<script> <script>
import Cache from '@/utils/cache';
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import emptyPage from '@/components/emptyPage.vue';
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
import {
getArea,
getStreet
} from '@/api/article.js';
import { import {
mapState, mapState,
mapGetters mapGetters
@ -224,6 +102,7 @@
getUserInfo getUserInfo
} from '@/api/user.js' } from '@/api/user.js'
import { import {
getGeocoder,
microSeachBarCode, microSeachBarCode,
microEadtProduct microEadtProduct
} from '@/api/store.js' } from '@/api/store.js'
@ -232,14 +111,20 @@
} from '@/libs/uniApi'; } from '@/libs/uniApi';
import { import {
getDiy getDiy
} from '@/api/api.js' } from '@/api/api.js';
// #ifdef APP-PLUS
import uniMP from '@/utils/uniMP.js';
// #endif
export default { export default {
components: { components: {
mTabbar, mTabbar,
zbpSwiper zbpSwiper,
emptyPage
}, },
data() { data() {
return { return {
locationArr: ({}),
emptyText: '暂无可用应用', emptyText: '暂无可用应用',
jurisdiction: false, // jurisdiction: false, //
mer_id: '', mer_id: '',
@ -249,14 +134,44 @@
} }
}, },
prefix: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/11/', prefix: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/11/',
isShow: false isShow: false,
bgColor: '',
isFshow: false,
street: '',
//
editFlag: false,
//
AllMenuList: [{
name: '商户平台',
icon: '/static/applet/shop_app.png',
data: '/pages/moreProject/moreProject',
type: 2,
},
{
name: '供销平台',
icon: '/static/applet/gx_app.png',
data: '__UNI__B5B1EDD',
type: 1,
},
],
nowMenuList: [],
street: '',
showPicker: false,
columnData: [],
bgColor: '',
isFshow: false,
backColor: 'rgba(252, 252, 252, 0)'
}; };
}, },
computed: { computed: {
...mapGetters(['userInfo', 'location', 'isLogin']) ...mapGetters(['userInfo', 'location', 'isLogin'])
}, },
created() {}, created() {},
onLoad() {}, onLoad() {
this.Area()
this.initMenu();
},
onShow() { onShow() {
if (this.isLogin) { if (this.isLogin) {
this.emptyText = '暂无可用应用' this.emptyText = '暂无可用应用'
@ -266,12 +181,231 @@
this.jurisdiction = true this.jurisdiction = true
} }
this.getUserInfo() this.getUserInfo()
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getUserInfo() this.getUserInfo()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
beforeDestroy() {
//
this.$bus.$off('value-updated')
},
mounted() {
if (this.street.length <= 0) {
this.appLocation()
}
// #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
methods: { methods: {
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
}
},
//
initMenu() {
let now = uni.getStorageSync('gatherNowMenuList');
try {
this.nowMenuList = JSON.parse(now);
this.AllMenuList = this.AllMenuList.filter((item) => {
return this.nowMenuList.find(t => t.name == item.name)?.name != item.name;
})
} catch (e) {
this.nowMenuList = [];
}
},
clickMenu(e, data) {
switch (e) {
case 1:
this.getUniMp(data);
break;
case 2:
this.navigator(data);
break;
}
},
//
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('gatherNowMenuList', JSON.stringify(this.nowMenuList));
},
getUniMp(appid) {
console.log('点击供销平台');
// #ifdef APP-PLUS
uniMP.loadMP(appid);
return;
// #endif
uni.showToast({
icon: 'none',
title: 'H5不支持打开小程序'
})
},
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
},
appLocation() {
uni.getLocation({
type: 'wgs84',
timeout: '10',
success: (res) => {
// console.log(res)
this.isshow = false
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
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_component.street
this.$nextTick(() => {
this.$bus.$emit('value-updated', this.street + ',' +
street_id);
})
}).catch(err => {
this.isshow = false
uni.showToast({
title: err,
icon: 'none'
})
})
},
fail: (err) => {
this.isshow = false
}
});
},
kkchange(e) {
this.bgColor = e
},
navigator(url, t) { navigator(url, t) {
// if (this.userInfoData.is_wsxx === 0 && t != '') return Toast(""); // if (this.userInfoData.is_wsxx === 0 && t != '') return Toast("");
uni.navigateTo({ uni.navigateTo({
@ -290,10 +424,11 @@
this.isShow = true this.isShow = true
this.mer_id = res.data.service.mer_id this.mer_id = res.data.service.mer_id
} }
if (!res.data.mer_info) { if (!res.data.mer_info) {
that.$set(this, 'jurisdiction', false); that.$set(this, 'jurisdiction', false);
} }
console.log(that.userInfoData); // console.log(that.userInfoData);
}); });
} }
} }
@ -302,12 +437,71 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.gather { .gather {
padding-bottom: 164.91rpx; padding-bottom: 164.91rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%); 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-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 */
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;
}
} }
.top_box { .top_box {
// padding-top: 180rpx; // padding-top: 180rpx;
background: linear-gradient(#36A2FF, #fff); background: linear-gradient(#36a2ff, #fff);
} }
.com { .com {
@ -333,6 +527,27 @@
margin-bottom: 38.6rpx; 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 { .content {
display: flex; display: flex;
align-content: center; align-content: center;
@ -346,11 +561,18 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: relative;
// margin: 0 0 33.33rpx 33.33rpx !important; // margin: 0 0 33.33rpx 33.33rpx !important;
.icon_img { .icon_img {
width: 63.16rpx; width: 83.16rpx;
height: 63.16rpx; height: 83.16rpx;
}
.icon {
position: absolute;
top: -5rpx;
right: 25rpx;
} }
.text { .text {
@ -383,4 +605,9 @@
} }
} }
} }
.edit_card {
background-color: #fff;
padding-top: 28rpx;
}
</style> </style>

View File

@ -585,6 +585,7 @@
])), ])),
}, },
onLoad(options) { onLoad(options) {
// console.log(options)
this.referer = options.referer this.referer = options.referer
if (options.product_type) { if (options.product_type) {
this.product_type = options.product_type this.product_type = options.product_type
@ -1349,9 +1350,10 @@
postCartAdd(q) postCartAdd(q)
.then(function(res) { .then(function(res) {
that.isOpen = that.attr.cartAttr = false; that.isOpen = that.attr.cartAttr = false;
// console.log(that.storeInfo);
if (news) { if (news) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}` url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}&type_id=${that.storeInfo.merchant.type_id}`
}); });
} else { } else {
that.$util.Tips({ that.$util.Tips({

View File

@ -11,17 +11,18 @@
<view class="goods"> <view class="goods">
<block v-for="(item,index) in cateGoods" :key="index"> <block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)"> <view class="goods_item" @click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image> <image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
<view class="botm"> <view class="botm">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c"> <view class="goods_info flex_a_c">
<view class="l_info flex_a_c"> <view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill" <image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
class="g_img"></image> mode="aspectFit" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view> <view class="g_name">{{item.author && item.author.nickname}}</view>
</view> </view>
<view class="nice_box" @click.stop="giveStart(item)"> <view class="nice_box" @click.stop="giveStart(item)">
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text> <text class="iconfont"
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text class="collect">{{item.count_start}}</text> <text class="collect">{{item.count_start}}</text>
</view> </view>
</view> </view>
@ -52,12 +53,29 @@
<script> <script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
import { getSlideAPI } from '@/api/lihai.js' import {
import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js' getSlideAPI
import { getIndexData, getDiy } from '@/api/api.js' } from '@/api/lihai.js'
import { getGeocoder, merClassifly } from '@/api/store.js'; import {
import { getArea, getStreet } from '@/api/article.js'; graphicLstApi,
import { Toast } from '@/libs/uniApi' 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 { export default {
components: { components: {
mTabbar, mTabbar,
@ -115,6 +133,7 @@
this.where.street_id = e.value[1].code this.where.street_id = e.value[1].code
this.showPicker = false this.showPicker = false
}, },
changeHandler(e) { changeHandler(e) {
const { const {
columnIndex, columnIndex,
@ -149,13 +168,9 @@
gogogo(item) { gogogo(item) {
if (this.tabsData.tabsActive == 1) { if (this.tabsData.tabsActive == 1) {
uni.navigateTo({ uni.navigateTo({
//#ifdef APP url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
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 { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
@ -203,12 +218,7 @@
this.tabsData.tabsActive = item.index this.tabsData.tabsActive = item.index
if (item.index == 1) { if (item.index == 1) {
uni.navigateTo({ 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}` url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif
}) })
} }
}, },
@ -219,7 +229,10 @@
let latitude, longitude; let latitude, longitude;
latitude = res.latitude.toString(); latitude = res.latitude.toString();
longitude = res.longitude.toString(); longitude = res.longitude.toString();
getGeocoder({ lat: latitude, long: longitude }).then(res => { getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
this.$store.commit('setLocation', res.data) this.$store.commit('setLocation', res.data)
this.street = res.data.address_component.street this.street = res.data.address_component.street
}).catch(err => { }).catch(err => {

View File

@ -28,7 +28,7 @@
</view> </view>
<view class="advertItem02 advertItem05 acea-row" v-if="style==4"> <view class="advertItem02 advertItem05 acea-row" v-if="style==4">
<view class="item" v-for="(item,index) in picList" :key="index" @click="goDetail(item)"> <view class="item" v-for="(item,index) in picList" :key="index" @click="goDetail(item)">
<image :src="item.image" mode="aspectFill" :style="'height:'+ imageH +'rpx;'"></image> <image :src="item.image" mode="aspectFit" :style="'height:'+ imageH +'rpx;'"></image>
</view> </view>
</view> </view>
<view class="advertItem02 advertItem06 acea-row" v-if="style==5"> <view class="advertItem02 advertItem06 acea-row" v-if="style==5">

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
</view> </view>
<view class="picTxt acea-row row-between-wrapper" v-if="store_info.id"> <view class="picTxt acea-row row-between-wrapper" v-if="store_info.id">
<view class="pictrue"> <view class="pictrue">
<image :src="store_info.image" ></image> <image :src="store_info.image"></image>
</view> </view>
<view class="text"> <view class="text">
<view class="name line1">{{store_info.store_name}}</view> <view class="name line1">{{store_info.store_name}}</view>
@ -26,14 +26,13 @@
class="span">查看商品</text></navigator> class="span">查看商品</text></navigator>
</view> </view>
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<button class="bnt bg-color" hover-class='none' @click="listenerActionSheet" <button class="bnt bg-color" hover-class='none' @click="listenerActionSheet">和好友一起分享</button>
>和好友一起分享</button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #ifdef MP -->
<button class="bnt bg-color" open-type="share" hover-class='none'>和好友一起分享</button> <button class="bnt bg-color" open-type="share" hover-class='none'>和好友一起分享</button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<button class="bnt bg-color" open-type="share" hover-class='none' @click="listenerActionSheet" >和好友一起分享</button> <button class="bnt bg-color" open-type="share" hover-class='none' @click="uniShare">分享</button>
<!-- #endif --> <!-- #endif -->
</view> </view>
<shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo> <shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo>
@ -57,12 +56,24 @@
} from '@/api/api.js'; } from '@/api/api.js';
import shareInfo from '@/components/shareInfo'; import shareInfo from '@/components/shareInfo';
import home from '@/components/home'; import home from '@/components/home';
import UniShare from 'uni_modules/uni-share/js_sdk/uni-share.js';
const uniShare = new UniShare();
export default { export default {
components: { components: {
shareInfo, shareInfo,
home, home,
"jyf-parser": parser, "jyf-parser": parser,
}, },
onBackPress({
from
}) {
if (from == 'backbutton') {
this.$nextTick(function() {
uniShare.hide()
})
return uniShare.isShow;
}
},
data() { data() {
return { return {
id: 0, id: 0,
@ -96,6 +107,78 @@
this.getArticleOne(); this.getArticleOne();
}, },
methods: { methods: {
//
uniShare() {
uniShare.show({
content: { // typeherftitlesummaryimageUrl
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() { getArticleOne: function() {
let that = this; let that = this;
getArticleDetails(that.id).then(res => { getArticleDetails(that.id).then(res => {

View File

@ -61,6 +61,7 @@
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { import {
getArticleCategoryLists,
getArticleCategoryList, getArticleCategoryList,
getArticleList, getArticleList,
getArticleHotList, getArticleHotList,
@ -85,7 +86,8 @@
page: 1, page: 1,
limit: 8, limit: 8,
status: false, status: false,
scrollLeft: 0 scrollLeft: 0,
type: 0
}; };
}, },
/** /**
@ -95,7 +97,9 @@
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onLoad: function() { onLoad: function(e) {
this.type = e.type
this.getArticleCate(); this.getArticleCate();
this.status = false; this.status = false;
this.page = 1; this.page = 1;
@ -142,11 +146,20 @@
}, },
getArticleCate: function() { getArticleCate: function() {
let that = this; 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 => { getArticleCategoryList().then(res => {
this.active = res.data[0].article_category_id this.active = res.data[0].article_category_id
that.$set(that, 'navList', res.data); that.$set(that, 'navList', res.data);
this.getCidArticle(); this.getCidArticle();
}); });
}
}, },
tabSelect(active) { tabSelect(active) {
this.active = active; this.active = active;

View File

@ -1,5 +1,6 @@
<template> <template>
<view class="cloud_entrepot" :style="{'min-height': winHeight + 'px'}"> <view class="">
<!-- <view class="cloud_entrepot" :style="{'min-height': winHeight + 'px'}">
<view class="head-wrapper"></view> <view class="head-wrapper"></view>
<view class="town-title">{{town}}里海云仓</view> <view class="town-title">{{town}}里海云仓</view>
<view class="body-wrapper"> <view class="body-wrapper">
@ -13,48 +14,895 @@
</navigator> </navigator>
</block> </block>
</view> </view>
</view> -->
<view class="" v-if="cloudList.length>0">
<view class="">
<!-- <view :style="`height: ${appInfo.top}px;background-color: red;z-index: 99999;`"></view> -->
<transition name="fade">
<view class="head" style="padding-top: var(--status-bar-height);" v-if="showtit">
<view style="display: flex;align-items: center;">
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
height="50.82rpx" @click='goBack'></u--image>
<view class="head_tit">
{{town}}里海云仓
</view> </view>
</view>
<view class="head_r" @click="showPop=true">
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
height="50.82rpx"></u--image>
<text>全部</text>
</view>
</view>
</transition>
<transition name="fade">
<!-- 滚动 -->
<view class="heads" style="padding-top: var(--status-bar-height);" v-if="!showtit">
<view style="align-items: center;display: flex;justify-content: space-between;">
<view class="" style="display: flex;align-items: center;">
<view class="back" style="margin-right: 17rpx;">
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
height="50.82rpx" @click='goBack'></u--image>
</view>
<view class="" style="font-size: 40rpx;transform: skewX(-10deg);">
供销综合云市场
</view>
</view>
<view style="position: relative;width: 289.14rpx;">
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="请输入..."
v-model="keyword" class="serch_cls"></u-search>
<u--image class="img_cls" :showLoading="true" src="/static/images/GXSC/SS.png"
width="115.65rpx" height="56.82rpx" @click="serch"></u--image>
</view>
<view class='head_r' @click="showPop=true">
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
height="50.82rpx"></u--image>
<text class="">全部</text>
<view class="flags">
</view>
</view>
</view>
</view>
</transition>
<view class="box">
<view :class="act_swiper">
<swiper :autoplay="false" :active-class="activeClass" :interval="3000" class="swipers"
:circular="true" previous-margin='0rpx' next-margin='0rpx' :current="current"
:disable-touch="true">
<swiper-item v-for="(item,index) in cloudList">
<u--image :showLoading="true" :src="item.cover" :class="act_img" width="750rpx"
height="998.83rpx"></u--image>
</swiper-item>
</swiper>
</view>
<view class="" style="height:998.83rpx;" v-if="act_swiper">
</view>
<!-- <u--image :showLoading="true" src="/static/images/LHYC/BG.png" width="750rpx"
height="998.83rpx"></u--image> -->
<view class="menu" style="z-index: 999;" v-if="showtit">
<swiper :autoplay="false" :active-class="activeClass" :interval="3000" class="swiper"
:circular="true" previous-margin='270rpx' next-margin='270rpx' :current="current"
@change="test">
<!-- :class="{active_swiper:index==current}" -->
<swiper-item v-for="(item,index) in cloudList" :key="index">
<view class="swiper_item" :class="{swiper_item_act:index==current}">
<u--image :showLoading="true" :src="item.background" class="swiper_b"
width="175.23rpx" height="175.23rpx"></u--image>
</view>
</swiper-item>
</swiper>
</view>
<!-- 商品列表 -->
<transition name="fade">
<view class="content">
<view class="content_sift" :style="{position:pocls,top:(headtop+16)+'px'}" v-if="!showtit">
<view :class="{act:item.act}" v-for="item,index in actList" :key="index"
@click="screenGoods(item.screen,index)">
{{item.tit}}
</view>
</view>
<view class="goods_list" v-if="goodsList.length>0">
<view class="empty" v-if='showLoading'>
<u-loading-icon v-if='showLoading' text="加载中" textSize="18"></u-loading-icon>
</view>
<view class="goods" @click="godDetail(item)" v-else v-for="item,index in goodsList">
<view class="left">
<u--image :showLoading="true" :src="item.image" width="192.76rpx"
height="192.76rpx"></u--image>
</view>
<view class="right">
<view class="tit">
<!-- 亿福馒头粉纯天然无添加小麦粉加工 1000g/ -->
{{item.store_info}}
</view>
<view class="">
<view class="good_score">
<text style="margin-right: 10rpx;color: #F84221;">{{item.rate}}</text>
<text>{{item.reply_count}}评论</text>
</view>
<view class="good_price">
<view class="good_price_l">
<view class=""
style="color: #F84221;font-size: 22.78rpx;font-weight: bold;">
<text style="font-size: 30rpx;">{{item.price}}</text>
</view>
<view class="old_price">
30.00
</view>
</view>
<!-- :style="{'transform': `translateY(${trnList[index].bottom}) translateX(${trnList[index].left})`,'transition':'1s'}" -->
<view class="good_price_r" @click.stop="addcart(item)">
<u--image :class="'act_class'+index" class="act_class"
:showLoading="true" src="/static/images/LHYC/J.png"
width="49.07rpx" height="49.07rpx"></u--image>
<!-- <u--image class="act_class" :showLoading="true"
src="/static/images/LHYC/J.png" width="49.07rpx"
height="49.07rpx"></u--image> -->
</view>
</view>
</view>
</view>
</view>
<view style="height: 100rpx;">
<!-- <u-loadmore :status="status" /> -->
</view>
</view>
<!-- -->
<view v-else>
<view class="empty">
<view class="info">
<u--image :showLoading="true" src="/static/images/noCart.png" width="400.09rpx"
height="400.09rpx"></u--image>
</view>
</view>
</view>
<!-- 购物车 -->
<view class="card" :style="`bottom:${appInfo.bottom}px`"
@click="navgo('/pages/order_addcart/order_addcart')">
<view class="left">
<view class="cart" :class="{act_cart:act_cart}"
style="position: relative;z-index: 9999999;">
<u--image :showLoading="true" src="/static/images/LHYC/GWC.png" width="63.09rpx"
height="63.09rpx"></u--image>
<view class="badge" v-show="goodsNum">
{{goodsNum}}
</view>
</view>
<view class="tot_price">
<view class="">
{{totalMoney}}
</view>
<view class="">
支持配送 售后无忧
</view>
</view>
</view>
<view class="right">
去结算
</view>
</view>
</view>
</transition>
</view>
<!-- http://192.168.1.5:8080/ -->
</view>
<!-- 组件 -->
<view<u-popup mode="right" :show="showPop" @close="showPop=false" @open="showPop=true">
<view class="pop">
<view style="height: var(--status-bar-height);"></view>
<view class="pop_head" style="display: flex;">
<u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx" @click='showPop=false'></u--image>
<view class="head_tit">
里海云仓
</view>
</view>
<view class="pop_content">
<view class="pop_li" @click="all(index)" v-for="item,index in cloudList" :key="index">
<u--image :showLoading="true" :src="item.background" width="84.11rpx"
height="84.11rpx"></u--image>
<view class="" style="margin-left: 20rpx;">
<view style="font-size: 33.29rpx;color: black;">
{{item.category_name}}云仓服务
</view>
<view class="" style="font-size: 22.78rpx;">
{{item.description}}
</view>
</view>
</view>
</view>
</view>
</u-popup>
</view>
<view class="empty" style="" v-else>
<view style="height: var(--status-bar-height);"></view>
<view class="info">
<u--image :showLoading="true" src="/static/images/noCart.png" width="400.09rpx"
height="400.09rpx"></u--image>
</view>
</view>
<view class="" :style="`height:${appInfo.bottom}px;background-color:white`">
</view>
</view>
</view>
</template> </template>
<script> <script>
import { getCityCloundShop } from '@/api/api.js' import {
import { Toast } from '@/libs/uniApi'; cloudWarehouse,
getCityCloundShop
} from '@/api/api.js'
import {
Toast
} from '@/libs/uniApi';
import {
initiateAssistApi
} from '@/api/activity.js';
import {
getCartCounts,
getCartList,
} from '@/api/order.js';
import {
goShopDetail
} from '@/libs/order.js'
import {
postCartAdd,
} from '@/api/store.js';
export default { export default {
data() { data() {
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13'; let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
return { return {
trnList: [],
act_cart: false,
appInfo: {},
pocls: "",
type: "",
act_swiper: "",
current: 1,
goodsNum: 0,
goodsList: [],
winHeight: 0, winHeight: 0,
cloudList: [], cloudList: [],
street_code: '', street_code: '',
town: '' totalMoney: 0,
town: '',
list: [1, 1, 1, 1, 1],
showPop: false,
keyword: "",
showLoading: false,
tot_price: 1,
showtit: true,
cartList: [],
activeClass: 'activeClass',
headtop: 0,
page_num: 1,
act_img: "",
cartTagInfo: {},
actList: [{
tit: '综合',
act: "",
screen: ""
}, {
tit: '销量',
act: "",
screen: "sales"
}, {
tit: '价格',
act: "",
screen: "price_asc"
}],
status: "loadmore",
flag: false,
} }
}, },
onLoad(e) { onLoad(e) {
uni.getSystemInfo({ this.cartFn()
success: (res) => { this.appInfo = this.$appInfo.safeAreaInsets
this.winHeight = res.windowHeight this.winHeight = this.$appInfo.windowHeight
},
});
this.street_code = e.street this.street_code = e.street
this.town = e.town this.town = e.town
this.getCloundShop() this.getCloundShop()
// console.log(this.appInfo, "")
},
//
// onReachBottom() {
// if (this.flag) return
// this.status = "loading"
// this.page_num += 1
// this.flag = true
// this.getList().then(res => {
// return
// this.goodsList = this.goodsList.concat(res.data.data)
// this.flag = false
// if (!res.data.data.length) {
// this.status = "nomore"
// this.flag = true
// }
// })
// },
onPageScroll(e) {
let that = this
this.showtit = !Boolean(e.scrollTop)
uni.createSelectorQuery()
.in(this)
.select('.content')
.boundingClientRect(rect => {
if (rect.top <= (this.headtop + 16)) {
this.pocls = 'fixed'
this.act_swiper = 'act_swiper'
this.act_img = 'act_img'
} else {
this.pocls = ''
this.act_swiper = ''
this.act_img = ''
}
})
.exec();
if (this.headtop) return
uni.createSelectorQuery()
.in(this)
.select('.flags')
.boundingClientRect(rect => {
this.headtop = rect.top
})
.exec();
uni.createSelectorQuery()
.in(this)
.select('.cart')
.boundingClientRect(rect => {
this.cartTagInfo = rect
})
.exec();
}, },
onShow() {},
onPullDownRefresh() { onPullDownRefresh() {
this.getCloundShop()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
this.getCloundShop()
this.getList()
this.cartFn()
}, },
// onReachBottom() {
// console.log("daidi")
// },
methods: { methods: {
cartFn() {
getCartList().then(res => {
console.log(res)
this.totalMoney = 0
this.cartList = res.data.list
this.cartList.forEach(e => {
this.totalMoney += e.list[0].cart_num * e.list[0].productAttr.price
// console.log(e.list[0].cart_num, e.list[0].productAttr.price)
// return
// console.log(e.list[0].cart_num, e.productAttr[0].price)
// this.totalMoney = this.totalMoney + Number(e.productAttr.price) * e.cart_num
// console.log(e.productAttr.price, e.cart_num)
})
})
getCartCounts().then(res => {
this.goodsNum = res.data[0].count
})
},
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
}
})
},
serch() {
// console.log(this.keyword)
this.getList()
},
goBack() {
uni.navigateBack()
},
screenGoods(type, i) {
this.actList.forEach(item => {
item.act = ""
})
this.actList[i].act = true
this.type = type
this.getList()
// console.log(this.type)
},
navgo(url) {
uni.navigateTo({
url
})
},
getList() {
this.showLoading = true
cloudWarehouse({
street_code: this.street_code,
category_id: this.cloudList[this.current].category_id,
order: this.type,
keyword: this.keyword,
// page_num: this.page_num
}).then(res => {
this.goodsList = res.data.list
this.showLoading = false
})
},
addcart(i) {
let data = {
cart_num: 1,
is_new: 0,
product_attr_unique: i.sku[''].unique,
product_id: i.product_id,
product_type: i.product_type,
spread_id: "",
}
let that = this
let res = postCartAdd({
...data
}).then((res, err) => {
this.act_cart = true
this.cartFn()
uni.showToast({
title: "加入成功",
duration: 1000,
})
}).catch(err => {
// this.act_cart = false
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
setTimeout(() => {
that.act_cart = false
}, 500)
// let that = this
// uni.createSelectorQuery().in(this).select(`.act_class${i}`).boundingClientRect(data1 => {
// that.trnList[i].left = this.cartTagInfo.left - data1.left + 'px';
// that.trnList[i].bottom = this.cartTagInfo.top - data1.top + 'px';
// console.log(that.trnList[i])
// }).exec();
// this.tot_price += Number(price)
},
all(index) {
this.showPop = false
this.current = index
this.getList()
},
test(e) {
// console.log(e.target.current)
this.current = e.target.current
// console.log(e)
this.getList()
},
async getCloundShop() { async getCloundShop() {
const { data } = await getCityCloundShop({ street_code: this.street_code }) const {
data
} = await getCityCloundShop({
street_code: this.street_code
})
this.cloudList = data this.cloudList = data
cloudWarehouse({
street_code: this.street_code,
category_id: this.cloudList[this.current].category_id
}).then(res => {
this.goodsList = res.data.list
this.goodsList.forEach(item => {
this.trnList.push({
left: 0,
bottom: 0
})
})
})
// console.log(this.cloudList)
data.length < 1 ? Toast("暂无云仓") : ''; data.length < 1 ? Toast("暂无云仓") : '';
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.flags {
background-color: red;
z-index: 99999999;
}
.swiper_item {
display: flex;
justify-content: space-around;
transition: .5s;
padding: 40rpx;
// transform: scale(1.2);
}
.swiper_item_act {
transform: scale(1.2);
}
// .swiper_item:hover {}
// .swiper_item {
// transform: scale(1.2);
// }
.swiper_b {
transition: 1s;
}
// .swiper_b:active {
// transform: scale(1.5);
// }
.act_cart {
transition: 0.5s;
transform: scale(1.1);
}
.box {
position: relative;
.content {
width: 100vw;
// position: absolute;
// top: 965rpx;
// border-top: 5px solid red;
z-index: 99;
background-color: #F4F4F4;
// padding: 0 10rpx;
}
.active_swiper {
transform: scale(1.3);
// transform: translateX() translateY();
}
.pictrue {
position: relative;
width: 100%;
height: 345rpx;
}
.act {
color: #FF6D20;
}
.act_content {
width: 100vw;
// position: absolute;
// top: 965rpx;
z-index: 99;
background-color: #F4F4F4;
padding: 0 10rpx;
// transition: opt\ linear;
padding-top: 200rpx;
}
.act_class {
transition: 0.5s;
}
.act_class:active {
transform: scale(2);
}
.content_act {
width: 100vw;
position: absolute;
top: 165rpx;
z-index: 99;
background-color: #F4F4F4;
padding: 0 10rpx;
}
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.head_tits {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0 20rpx;
color: white;
}
.img_cls {
position: absolute;
top: 50%;
right: 7rpx;
transform: translateY(-50%);
}
.pop {
width: 615.07rpx;
padding: 30rpx 28rpx;
.pop_content {
width: 559rpx;
height: 80vh;
background-color: #F4F4F4;
padding: 28rpx;
border-radius: 21.03rpx 21.03rpx 0rpx 0rpx;
margin-top: 47rpx;
.pop_head {
// display: flex;
}
.pop_li {
display: flex;
margin-bottom: 52rpx;
}
}
}
.head_tit {
margin-left: 20rpx;
font-size: 40rpx;
// font-weight: 700;
transform: skewX(-10deg);
}
.act {
color: red;
}
.head {
position: absolute;
z-index: 100;
color: white;
display: flex;
justify-content: space-between;
width: 100%;
padding: 0 20rpx;
align-items: center;
}
.heads {
position: fixed;
z-index: 100;
color: white;
width: 100%;
padding: 0 20rpx;
// background-color: white;
}
.menu {
position: absolute;
top: 748rpx;
width: 750rpx;
background-color: rgba(255, 255, 255, 0.5);
// height: 175.23rpx;
// box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.5);
box-shadow: 0 0 100rpx 30rpx rgba(255, 255, 255, 0.9);
}
.goods_list {
min-height: 95vh;
padding: 0 10rpx;
// background-color: red;
.goods {
display: flex;
padding: 21rpx;
background-color: white;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
margin-bottom: 20rpx;
.left {
width: 192.76rpx;
height: 192.76rpx;
border-radius: 10.51rpx 10.51rpx 10.51rpx 10.51rpx;
margin-right: 21rpx;
}
.right {
display: flex;
justify-content: space-between;
flex-direction: column;
.tit {
font-size: 29.79rpx;
color: black;
font-weight: bold;
}
.good_score {
font-size: 26rpx;
color: #B3B3B3;
margin-bottom: 15rpx;
}
.good_price {
display: flex;
justify-content: space-between;
align-items: center;
width: 60vw;
.good_price_r {
z-index: 9;
}
.good_price_l {
display: flex;
.old_price {
color: #B3B3B3;
text-decoration: line-through;
font-size: 26.29rpx;
margin-left: 15rpx;
}
}
}
}
// color: greenyellow;
}
}
.activeClass {
width: 400rpx;
height: 400rpx;
}
.act_swiper {
height: 150rpx;
position: fixed;
z-index: 99;
overflow: hidden;
}
.act_img {
// transition:t;
transform: translateY(-848rpx);
}
// .act_swiper2 {
// height: 998rpx;
// }
.content_sift {
width: 750rpx;
padding: 22rpx 0;
display: flex;
justify-content: space-around;
background-color: white;
// background-color: green;
z-index: 99;
box-sizing: border-box;
margin-bottom: 20rpx;
}
.swipers {
width: 750rpx;
height: 998.83rpx;
}
.card {
width: 720rpx;
z-index: 999999;
// margin:auto;
left: 50%;
transform: translateX(-50%);
position: fixed;
// bottom: 0;
background-color: #333333;
height: 101.64rpx;
border-radius: 50.82rpx;
overflow: hidden;
color: white;
display: flex;
justify-content: space-between;
box-sizing: border-box;
.left {
display: flex;
align-items: center;
padding: 10rpx 35rpx;
.tot_price {
display: flex;
margin-left: 42rpx;
flex-direction: column;
justify-content: space-between;
}
}
.right {
font-size: 33.29rpx;
line-height: 50px;
background: linear-gradient(to right, #F84221, #FF6D20);
width: 175.23rpx;
text-align: center;
}
}
.badge {
position: absolute;
top: 0;
right: 0;
background-color: red;
transform: translate(50%, -50%);
padding: 0 10rpx;
border-radius: 30rpx;
}
.cloud_entrepot { .cloud_entrepot {
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/ycbg.png") no-repeat; background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/ycbg.png") no-repeat;
background-size: cover; background-size: cover;
@ -98,6 +946,7 @@
} }
} }
.body-wrapper { .body-wrapper {
width: 694.74rpx; width: 694.74rpx;
display: flex; display: flex;
@ -139,4 +988,33 @@
} }
} }
} }
.empty {
// display: flex;
// justify-content: space-between;
// flex-direction: column;
// align-items: center;
// padding: 20vh 0;
position: relative;
height: 100vh;
.info {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
// padding-top: 100px;
}
.head_r {
display: flex;
flex-direction: column;
align-items: center;
}
.cart {
z-index: 999;
}
</style> </style>

View File

@ -2,7 +2,8 @@
<view class="select_warehouse"> <view class="select_warehouse">
<view class="wrapper flex_a_c_j_sb"> <view class="wrapper flex_a_c_j_sb">
<block v-for="item in goodsData" :key="item.name"> <block v-for="item in goodsData" :key="item.name">
<view class="select_item" @click="navigato(item.type)" :style="{'background-image': `url(${item.src})`}"> <view class="select_item" @click="navigato(item.type)"
:style="{'background-image': `url(${item.src})`}">
<view class="title">{{ item.name }}</view> <view class="title">{{ item.name }}</view>
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </view>
@ -135,7 +136,7 @@
if (err == "已经导入过该商品了") { if (err == "已经导入过该商品了") {
Toast('已经导入过该商品了') Toast('已经导入过该商品了')
this.addGoodsShow = false this.addGoodsShow = false
}else{ } else {
Toast('导入出错') Toast('导入出错')
this.addGoodsShow = false this.addGoodsShow = false
} }
@ -219,14 +220,14 @@
await seachBarCodeAPI({ await seachBarCodeAPI({
code: code, code: code,
mer_id: this.mer_id mer_id: this.mer_id
}).then(res=>{ }).then(res => {
if(!res.data){ if (!res.data) {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
duration: 3000, duration: 3000,
icon:'none', icon: 'none',
}); });
}else{ } else {
if (res.data.list.length < 1) { if (res.data.list.length < 1) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/addGoods/index?mer_id=${this.mer_id}&code=${code}` url: `/pages/product/addGoods/index?mer_id=${this.mer_id}&code=${code}`

View File

@ -11,8 +11,8 @@
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" <input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='where.keyword' @confirm="searchSubmit"></input> :value='where.keyword' @confirm="searchSubmit"></input>
</view> </view>
<view style="text-align: right;" class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' <view style="text-align: right;" class='iconfont'
@click='Changswitch'></view> :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
</view> </view>
<view class="nav-wrapper"> <view class="nav-wrapper">
<view class='nav acea-row row-middle'> <view class='nav acea-row row-middle'>
@ -94,8 +94,8 @@
<view class="down-wrapper" v-if="downStatus"> <view class="down-wrapper" v-if="downStatus">
<view class="bg"></view> <view class="bg"></view>
<view class="down-box"> <view class="down-box">
<view class="down-item" v-for="(item,index) in downMenu" :key="item.key" :class="{'on':index == downKey}" <view class="down-item" v-for="(item,index) in downMenu" :key="item.key"
@click="bindDown(item,index)"> :class="{'on':index == downKey}" @click="bindDown(item,index)">
{{item.title}} {{item.title}}
<text v-if="index == downKey" class="iconfont icon-gou"></text> <text v-if="index == downKey" class="iconfont icon-gou"></text>
</view> </view>
@ -118,10 +118,18 @@
import recommend from '@/components/recommend'; import recommend from '@/components/recommend';
import rightSlider from '@/components/rightSlider.vue' import rightSlider from '@/components/rightSlider.vue'
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue' import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
import { initiateAssistApi } from '@/api/activity.js'; import {
import { cloudWarehouse } from '@/api/api.js' initiateAssistApi
import { configMap } from "@/utils"; } from '@/api/activity.js';
import { mapGetters } from "vuex"; import {
cloudWarehouse
} from '@/api/api.js'
import {
configMap
} from "@/utils";
import {
mapGetters
} from "vuex";
// #ifndef H5 // #ifndef H5
import passwordPopup from '@/components/passwordPopup'; import passwordPopup from '@/components/passwordPopup';
// #endif // #endif
@ -129,10 +137,15 @@
import { import {
goShopDetail goShopDetail
} from '@/libs/order.js' } from '@/libs/order.js'
import { HTTP_REQUEST_URL } from '@/config/app'; import {
HTTP_REQUEST_URL
} from '@/config/app';
const app = getApp(); const app = getApp();
export default { export default {
computed: configMap({ hide_mer_status: 1, recommend_switch: 0 }, mapGetters(['uid', 'isLogin', 'scrollTop', computed: configMap({
hide_mer_status: 1,
recommend_switch: 0
}, mapGetters(['uid', 'isLogin', 'scrollTop',
'viewColor', 'keyColor' 'viewColor', 'keyColor'
])), ])),
components: { components: {
@ -322,6 +335,8 @@
}, },
// //
godDetail(item) { godDetail(item) {
console.log(452)
return
goShopDetail(item, this.uid).then(res => { goShopDetail(item, this.uid).then(res => {
if (this.isLogin) { if (this.isLogin) {
initiateAssistApi(item.activity_id).then(res => { initiateAssistApi(item.activity_id).then(res => {

View File

@ -11,7 +11,7 @@
<view class="store_site flex_a_c" v-if="store_item.street_name">{{ store_item.street_name }}</view> <view class="store_site flex_a_c" v-if="store_item.street_name">{{ store_item.street_name }}</view>
<view class="name">{{ store_item.mer_name }}</view> <view class="name">{{ store_item.mer_name }}</view>
</view> </view>
<image class="high_img" :src="youZhiImg" mode="aspectFill"></image> <image class="high_img" :src="youZhiImg" mode="aspectFit"></image>
</view> </view>
<view class="mct_msg_detail flex_a_c"> <view class="mct_msg_detail flex_a_c">
<view class="product_score">{{ store_item.product_score }}</view> <view class="product_score">{{ store_item.product_score }}</view>
@ -32,7 +32,7 @@
<scroll-view scroll-x="true" class="goods_info"> <scroll-view scroll-x="true" class="goods_info">
<view v-for="(itemn,indexn) in store_item.recommend" :key="indexn" class="goods_info_item" <view v-for="(itemn,indexn) in store_item.recommend" :key="indexn" class="goods_info_item"
@click.stop="navTogoodsDetail(itemn.product_id)"> @click.stop="navTogoodsDetail(itemn.product_id)">
<image class="goods_info_img" :src="itemn.image" mode="aspectFill"></image> <image class="goods_info_img" :src="itemn.image" mode="aspectFit"></image>
<view class="goods_info_name">{{itemn.store_name}}</view> <view class="goods_info_name">{{itemn.store_name}}</view>
<view class="goods_info_price">{{itemn.price}}</view> <view class="goods_info_price">{{itemn.price}}</view>
</view> </view>

View File

@ -11,15 +11,15 @@
</view> </view>
<block v-for="(item,i) in goodsList" :key="i"> <block v-for="(item,i) in goodsList" :key="i">
<view class="list_item flex_a_c"> <view class="list_item flex_a_c">
<image class="goods_img" :src="item.image" mode="aspectFill"></image> <image class="goods_img" :src="item.image" mode="aspectFit"></image>
<view class="r_box flex_a_c_j_sb"> <view class="r_box flex_a_c_j_sb">
<view class="message"> <view class="message">
<view class="title">{{item.store_name}}</view> <view class="goodstitle">{{item.store_name}}</view>
<view class="flex_a_c"> <view class="flex_a_c">
<view class="">分类{{item.storeCategory.cate_name}}</view> <view class="">分类{{item.storeCategory.cate_name}}</view>
<view class="unit">单位{{item.unit_name}}</view> <view class="unit">单位{{item.unit_name}}</view>
</view> </view>
<view class="bar_code">条形码{{ item.bar_code || "0" }}</view> <view class="bar_code">条形码{{ item.bar_code || "" }}</view>
</view> </view>
<view class="redact_box"> <view class="redact_box">
<view class="order_price">订货价{{item.price}}</view> <view class="order_price">订货价{{item.price}}</view>
@ -38,13 +38,13 @@
<view class="">订货价{{redactGoods.price}}</view> <view class="">订货价{{redactGoods.price}}</view>
</view> </view>
<view class="bar_code flex_a_c_j_sb"> <view class="bar_code flex_a_c_j_sb">
<view>条形码{{ redactGoods.bar_code || "0" }}</view> <view>条形码{{ redactGoods.bar_code || "" }}</view>
<view>库存{{ redactGoods.stock }}</view> <view>库存{{ redactGoods.stock }}</view>
</view> </view>
<view class="sub_title">订货价</view> <view class="sub_title">订货价</view>
<input class="input" type="text" placeholder="请输入价格" v-model="goodsPrive"> <input class="input" type="text" placeholder="请输入价格" v-model="goodsPrive">
<view class="sub_title">库存量</view> <!-- <view class="sub_title">库存量</view>
<input class="input" type="number" placeholder="请输入库存数量" v-model="goodsNum"> <input class="input" type="number" placeholder="请输入库存数量" v-model="goodsNum"> -->
<view class="btns_box"> <view class="btns_box">
<view class="cancel" @click="popupClose">取消</view> <view class="cancel" @click="popupClose">取消</view>
<view class="save" @click="submitCreatedGoods">保存</view> <view class="save" @click="submitCreatedGoods">保存</view>
@ -53,7 +53,6 @@
</u-popup> </u-popup>
</view> </view>
</template> </template>
<script> <script>
import { import {
getStorage, getStorage,
@ -63,8 +62,15 @@
hideLoading, hideLoading,
Modal Modal
} from '@/libs/uniApi.js'; } from '@/libs/uniApi.js';
import { productLstApi, productCreate, productUpdate, productDetail } from '@/api/product.js' import {
import { checkLogin } from '../../../libs/login'; productLstApi,
productCreate,
productUpdate,
productDetail
} from '@/api/product.js'
import {
checkLogin
} from '../../../libs/login';
export default { export default {
data() { data() {
return { return {
@ -110,11 +116,15 @@
onShow() {}, onShow() {},
methods: { methods: {
async searchClick() { async searchClick() {
const { data } = await productLstApi(this.mer_id, this.params) const {
data
} = await productLstApi(this.mer_id, this.params)
this.goodsList = data.list this.goodsList = data.list
}, },
async getGoodsList() { async getGoodsList() {
const { data } = await productLstApi(this.mer_id, this.params) const {
data
} = await productLstApi(this.mer_id, this.params)
this.goodsList.push(...data.list) this.goodsList.push(...data.list)
if (data.length < 9) this.status = 'nomore'; if (data.length < 9) this.status = 'nomore';
}, },
@ -140,6 +150,7 @@
const res = await productUpdate(this.merId, this.product_id, this.particulars) const res = await productUpdate(this.merId, this.product_id, this.particulars)
// Toast(message) // Toast(message)
this.getGoodsList() this.getGoodsList()
this.goodsList = []
this.popupShow = false this.popupShow = false
this.goodsPrive = '' this.goodsPrive = ''
this.goodsNum = '' this.goodsNum = ''
@ -168,7 +179,8 @@
if (getStorage('addGoodsSecoundData')) { if (getStorage('addGoodsSecoundData')) {
Object.keys(this.addGoodsSecoundData).forEach(item => { Object.keys(this.addGoodsSecoundData).forEach(item => {
if (getStorage('addGoodsSecoundData')[item] || getStorage('addGoodsSecoundData')[item] == 0) { if (getStorage('addGoodsSecoundData')[item] || getStorage('addGoodsSecoundData')[item] ==
0) {
this.addGoodsSecoundData[item] = getStorage('addGoodsSecoundData')[item]; this.addGoodsSecoundData[item] = getStorage('addGoodsSecoundData')[item];
} }
}); });
@ -221,6 +233,7 @@
line-height: 59.65rpx; line-height: 59.65rpx;
background: $uni-theme-bg-color; background: $uni-theme-bg-color;
border-radius: 100px; border-radius: 100px;
font-size: 25rpx;
} }
} }
} }
@ -236,7 +249,7 @@
margin-top: 21.05rpx; margin-top: 21.05rpx;
.title { .title {
font-size: 31.58rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }
@ -262,6 +275,7 @@
line-height: 50.88rpx; line-height: 50.88rpx;
background: $uni-theme-bg-color; background: $uni-theme-bg-color;
border-radius: 7px; border-radius: 7px;
font-size: 25rpx
} }
.r_box { .r_box {
@ -281,6 +295,17 @@
} }
} }
.goodstitle {
width: 42vw;
font-weight: bold;
white-space: nowrap;
/* 不换行 */
overflow: hidden;
/* 溢出隐藏 */
text-overflow: ellipsis;
}
.popup_cont { .popup_cont {
width: 680.7rpx; width: 680.7rpx;
padding: 31.58rpx; padding: 31.58rpx;
@ -288,13 +313,12 @@
.message { .message {
margin: 28.07rpx 0 21.05rpx 0; margin: 28.07rpx 0 21.05rpx 0;
} }
.title {
text-align: center;
font-size: 31.58rpx;
font-weight: bold;
}
.sub_title { .sub_title {
font-size: 28.07rpx; font-size: 28.07rpx;

View File

@ -20,7 +20,7 @@
<block v-for="(item,index) in list" :key="index"> <block v-for="(item,index) in list" :key="index">
<view class="item_list flex"> <view class="item_list flex">
<view> <view>
<image class="goods_image" :src="item.image" mode="aspectFill"></image> <image class="goods_image" :src="item.image" mode="aspectFit"></image>
</view> </view>
<view class="left_goods_msg"> <view class="left_goods_msg">
<view class="name">{{ item.store_name }}</view> <view class="name">{{ item.store_name }}</view>
@ -41,6 +41,35 @@
<navigator class="bottom_purchase" url="./shopping_trolley" open-type="navigate">采购清单</navigator> <navigator class="bottom_purchase" url="./shopping_trolley" open-type="navigate">采购清单</navigator>
<goodsPopup :goodsStatu="isPopupShow" @colses="isPopupShow=false" :goods_info="goodsInfo"></goodsPopup> <goodsPopup :goodsStatu="isPopupShow" @colses="isPopupShow=false" :goods_info="goodsInfo"></goodsPopup>
<u-popup :show="show" @close="close">
<view>
<h3 style=" margin: 15px 5px 5px 24px;">颜色规格</h3>
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y">
<view class="scroll-view-item" v-for="(item,index) in attrValue" :key="index">
<view class="scroll_item_top">
<image :src="Image" mode=""></image>
<view class="text">
<view>{{item.sku}}</view>
<view>库存: <text>{{item.stock}}</text> </view>
</view>
</view>
<view class="scroll_item_bon">
<view class="reduce" @click.stop='subCart(item,index)'>-</view>
<input type="text" disabled="true" v-model="goods[index].cart_num" />
<view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(item,index)'>+</view>
<!-- <u-number-box
button-size="36"
color="#ffffff"
bgColor="#2979ff"
iconStyle="color: #fff"
v-model="number.cart_num"
></u-number-box> -->
</view>
</view>
</scroll-view>
<button class="btn" @click="addshopcart">确定</button>
</view>
</u-popup>
</view> </view>
</template> </template>
@ -52,6 +81,9 @@
} from '@/api/store.js' } from '@/api/store.js'
import { Toast } from '@/libs/uniApi' import { Toast } from '@/libs/uniApi'
import goodsPopup from '../cpns/goodsPopup.vue' import goodsPopup from '../cpns/goodsPopup.vue'
import {
changeCartNum
} from '@/api/order.js';
export default { export default {
components: { components: {
goodsPopup goodsPopup
@ -88,7 +120,16 @@
}, },
id: '', id: '',
order: true, order: true,
num: '' num: '',
show: false,
scrollTop: 0,
attrValue: [],
Image: '',
goods: [{
cart_num: 0
}],
goodsLite: {},
goodsindexL: ''
} }
}, },
onLoad(e) { onLoad(e) {
@ -176,23 +217,27 @@
* 获取产品详情 * 获取产品详情
*/ */
getGoodsDetails(item) { getGoodsDetails(item) {
// console.log('e,item',e,item); console.log(item);
// let that = this; if (item.product.attrValue.length == 1) {
// const count = e.value
// getProductDetail(item.product_id).then(res => {
// const unique = Object.values(res.data.sku)[0].unique
// console.log(res.data.product_id, count, unique,'123123');
// that.goCat(res.data.product_id, count, unique)
// })
let that = this; let that = this;
const count = '1' const count = '1'
// console.log(111);
getProductDetail(item.product_id, { product_type: 98 }).then(res => { getProductDetail(item.product_id, { product_type: 98 }).then(res => {
const unique = Object.values(res.data.sku)[0].unique const unique = Object.values(res.data.sku)[0].unique
that.goCat(res.data.product_id, count, unique) that.goCat(res.data.product_id, count, unique)
}).catch(err => { }).catch(err => {
Toast(err) Toast(err)
}) })
} else {
this.show = true
this.attrValue = item.product.attrValue
this.Image = item.image
for (let i = 1; i < item.product.attrValue.length; i++) {
this.goods.push({
cart_num: 0
})
}
}
}, },
/* /*
* 加入购物车 * 加入购物车
@ -220,8 +265,97 @@
}); });
}); });
}, },
close() {
this.show = false
},
//
addCart(item, index) {
let that = this
that.goods[index].cart_num = that.goods[index].cart_num + 1
that.goods.numAdd = true
that.goodsLite = item
that.goodsindexL = index
let q = {
is_new: 0,
product_id: that.goodsLite.product_id,
cart_num: that.goods[that.goodsindexL].cart_num,
product_attr_unique: that.goodsLite.unique,
// source: this.source,
product_type: 98,
spread_id: ''
};
postCartAdd(q).then(res => {
that.$util.Tips({
title: "添加购物车成功",
});
})
.catch(res => {
this.show = false
return that.$util.Tips({
title: res
});
});
}, },
subCart(item, index) {
let that = this
if (that.goods[index].cart_num == 0) {
return
} else {
that.goods[index].cart_num = that.goods[index].cart_num - 1
that.goods.numAdd = true
that.goodsLite = item
that.goodsindexL = index
let q = {
is_new: 0,
product_id: that.goodsLite.product_id,
cart_num: that.goods[that.goodsindexL].cart_num,
product_attr_unique: that.goodsLite.unique,
// source: this.source,
product_type: 98,
spread_id: ''
};
postCartAdd(q).then(res => {
that.$util.Tips({
title: "添加购物车成功",
});
})
.catch(res => {
this.show = false
return that.$util.Tips({
title: res
});
});
}
},
addshopcart() {
console.log(this.goodsLite);
console.log(this.goodsindexL);
this.show = false
// let that = this
// let q = {
// is_new: 0,
// product_id: that.goodsLite.product_id,
// cart_num: that.goods[that.goodsindexL].cart_num,
// product_attr_unique: that.goodsLite.unique,
// // source: this.source,
// product_type: 98,
// spread_id: ''
// };
// postCartAdd(q).then(res => {
// this.show = false
// that.$util.Tips({
// title: "",
// });
// })
// .catch(res => {
// this.show = false
// return that.$util.Tips({
// title: res
// });
// });
}
},
onReachBottom() { onReachBottom() {
//nomore //nomore
if (this.status != 'nomore') { if (this.status != 'nomore') {
@ -395,4 +529,91 @@
background-color: $uni-theme-color; background-color: $uni-theme-color;
color: #fff; color: #fff;
} }
.scroll-Y {
height: 50vh;
width: 90%;
margin: auto;
}
.scroll-view-item {
font-size: 36rpx;
border-bottom: 1px solid #ccc;
.scroll_item_top {
height: 60px;
display: flex;
justify-content: flex-start;
align-items: center;
image {
width: 50px;
height: 50px;
margin: 5px;
}
.text {
width: 200px;
height: 60px;
float: left;
view {
height: 30px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text {
color: #F84221;
}
}
}
}
.scroll_item_bon {
width: 100%;
height: 40px;
display: flex;
justify-content: flex-end;
align-items: center;
.reduce {
width: 30px;
height: 30px;
text-align: center;
color: #BDC4CE;
background: #EEEEEE;
}
input {
width: 50px;
height: 30px;
text-align: center;
}
.plus {
width: 30px;
text-align: center;
height: 30px;
color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
}
.on {
background-color: #e3e3e3;
color: #dedede;
}
}
}
.btn {
width: 100%;
height: 50px;
background: linear-gradient(84deg, #F98649 0%, #F34E45 100%);
border-radius: 24px 24px 24px 24px;
line-height: 50px;
color: white;
}
</style> </style>

View File

@ -242,6 +242,7 @@
currSku: '', currSku: '',
newData: {}, newData: {},
activeRouter: '', activeRouter: '',
type_id:''
}; };
}, },
computed: configMap({ hide_mer_status: 1, recommend_switch: 0, navigation: {} }, mapGetters(['isLogin', computed: configMap({ hide_mer_status: 1, recommend_switch: 0, navigation: {} }, mapGetters(['isLogin',
@ -348,7 +349,7 @@
this.cartList.valid.forEach(el => { this.cartList.valid.forEach(el => {
el.list.forEach(goods => { el.list.forEach(goods => {
if (goods.check) { if (goods.check) {
type_id.push(goods.spu.spu_id) type_id.push(goods.product_id)
} }
}) })
}) })
@ -357,6 +358,8 @@
title: '请选择产品' title: '请选择产品'
}); });
} else { } else {
collectAll({ collectAll({
type_id: type_id, type_id: type_id,
type: 1 type: 1
@ -568,7 +571,7 @@
}) })
if (selectValue.length > 0) { if (selectValue.length > 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_confirm/index?product_type=98&cartId=' + selectValue.join(',') url: `/pages/users/order_confirm/index?product_type=98&cartId=${selectValue.join(',')}&type_id=12`
}); });
} else { } else {
return this.$util.Tips({ return this.$util.Tips({
@ -578,12 +581,13 @@
}, },
// //
addCart: function(goods, index) { addCart: function(goods, index) {
console.log(goods.cart_id);
let that = this; let that = this;
changeCartNum(goods.cart_id, { changeCartNum(goods.cart_id, {
cart_num: goods.cart_num + 1 cart_num: goods.cart_num + 1
}).then(res => { }).then(res => {
goods.cart_num = Number(goods.cart_num) + 1 goods.cart_num = Number(goods.cart_num) + 1
that.cartTotalCount = Number(that.cartTotalCount) + 1; // that.cartTotalCount = Number(that.cartTotalCount) + 1;
if (goods.hasOwnProperty('productAttr') && goods.cart_num > goods.productAttr.stock) { if (goods.hasOwnProperty('productAttr') && goods.cart_num > goods.productAttr.stock) {
goods.cart_num = goods.productAttr.stock; goods.cart_num = goods.productAttr.stock;
goods.numAdd = true; goods.numAdd = true;
@ -649,7 +653,7 @@
goods.numSub = true; goods.numSub = true;
} }
goods.cart_num = Number(goods.cart_num) - 1 goods.cart_num = Number(goods.cart_num) - 1
this.cartTotalCount = Number(this.cartTotalCount) - 1; // this.cartTotalCount = Number(this.cartTotalCount) - 1;
this.cartAllCheck('goodsCheck') this.cartAllCheck('goodsCheck')
}).catch(error => { }).catch(error => {
this.$util.Tips({ this.$util.Tips({
@ -671,6 +675,7 @@
let that = this; let that = this;
getCartList({ product_type: 98 }).then(res => { getCartList({ product_type: 98 }).then(res => {
// console.log("", res) // console.log("", res)
this.type_id=res.data.list[0].type_id
res.data.list.forEach((item, index) => { res.data.list.forEach((item, index) => {
item.allCheck = true item.allCheck = true
item.list.forEach((goods, j) => { item.list.forEach((goods, j) => {

View File

@ -33,7 +33,7 @@
<view class="right_storee"> <view class="right_storee">
<scroll-view scroll-y="true" style="height: 100%; overflow: hidden;" scroll-with-animation='true' <scroll-view scroll-y="true" style="height: 100%; overflow: hidden;" scroll-with-animation='true'
@scrolltolower="scrolltolower" class="my-scroll-view"> @scrolltolower="scrolltolower" class="my-scroll-view">
<image class="banner" :src="src" mode="aspectFill"></image> <image class="banner" :src="src" mode="aspectFit"></image>
<view style="background-color: #fff;width: 100%;"> <view style="background-color: #fff;width: 100%;">
<view class="tabs_box flex_a_c_j_sb"> <view class="tabs_box flex_a_c_j_sb">
<view v-for="(item,index) in tabsList" :key="index" class="flex_a_c" :class="active==index?'active':''"> <view v-for="(item,index) in tabsList" :key="index" class="flex_a_c" :class="active==index?'active':''">

View File

@ -1,26 +1,112 @@
<template> <template>
<view> <view style="background-color: #F0F2F5;">
<!-- <view style="height: var(--status-bar-height);background-color: red;height: 10vh;">dsfdsfsdfds</view> -->
<view class='productList' :style="viewColor"> <view class='productList' :style="viewColor">
<view class='search acea-row row-between-wrapper' :class="'styleType'+store_street_theme"> <!-- 顶部 -->
<!--#ifdef H5--> <view class="top">
<view class="back" @click='backjJump()'> <view style="height: 10px;">
<view class="iconfont icon-xiangzuo"></view>
</view> </view>
<!--#endif-->
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search" <view class="head_tit">
:value='sotreParam.keyword' @confirm="searchSubmit"></input> <view class="" style="display: flex;align-items: center;">
<view class="back" @click='backjJump()' style="margin-right: 17rpx;">
<view class="iconfont icon-xiangzuo" style="color: #333333;"></view>
</view> </view>
<view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;" <view class="" style="font-size: 40rpx;font-weight: 700;transform: skewX(-10deg);">
class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'> 供销综合云市场
<view class="iconfont icon-dingwei"></view>
<view class="right-text" v-if="recommend_address">
{{recommend_address}}
</view>
<view class="iconfont icon-xiangyou" v-if="recommend_address"></view>
</view> </view>
</view> </view>
<view class="nav-wrapper" :class="'styleType'+store_street_theme">
<view style="position: relative;width: 289.14rpx;">
<u-search borderColor="#FF6D20" bgColor="white" @change="test" :showAction="false"
placeholder="请输入..." v-model="sotreParam.keyword" class="serch_cls"></u-search>
<u--image @tap="searchSubmit" class="img_cls" :showLoading="true"
src="/static/images/GXSC/SS.png" width="115.65rpx" height="56.82rpx"></u--image>
</view>
<view class='iconfont search-right'
@click="goMap(`/pages/nongKe/supply_chain/maps?street_id=${street_id}`)">
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="50.82rpx"
height="50.82rpx"></u--image>
</view>
</view>
</view>
<view class="content">
<view style="background-color: red;height: 10px">
asdasd
</view>
<view class="hot_serch">
<text>热搜:</text> <text @click="hotSerchFn('小张副食')">小张副食</text> <text
@click="hotSerchFn('正新酒店')">正新酒店</text>
<text @click="hotSerchFn('麻辣鸡')">麻辣鸡</text>
<text @click="hotSerchFn('手撕椒麻鸡')">手撕椒麻鸡</text>
</view>
<view class="menu_cls">
<u-scroll-list indicatorActiveColor='#FF6D20'>
<view class="menu_li" @click="navGo(item.merchant_category_id)" v-for="item,index in menuList"
:key="index">
<!-- {{item.merchant_category_id}} -->
<u--image :showLoading="true" :src="imgList[index]" width="94.63rpx" height="99.63rpx"
style="margin-bottom: 20rpx;"></u--image>
<text
style="display: block;font-size: 26.29rpx; width: 15vw;">{{item.category_name}}</text>
</view>
</u-scroll-list>
</view>
<view class="goods_list">
<view class="goods_card" @click="goStore(item.mer_id)" v-for="(item,index) in storeList"
:key="index">
<view class="left">
<u--image :showLoading="true" :src="item.mer_avatar" width="157.71rpx"
height="157.71rpx"></u--image>
</view>
<view class="right">
<view class="li head">
<text class="com_name">{{item.mer_name}}</text>
<text
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
</view>
<view class="li">
<u--image v-for="item,index in [1,1,,1,1,1]" :key="index" :showLoading="true"
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image>
<text style="margin-left: 20rpx;color: #FF6D20; ">5.0</text>
<text>月销{{item.sales}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text> {{item.service_phone}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/SJ.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text>{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text class="address">{{item.mer_address}}</text>
</view>
</view>
</view>
</view>
</view>
<!-- 热搜 -->
<!-- <view class="nav-wrapper" :class="'styleType'+store_street_theme">
<view class='nav acea-row row-middle' :class="'styleType'+store_street_theme"> <view class='nav acea-row row-middle' :class="'styleType'+store_street_theme">
<view v-for="item in downMenus" :key="item.key" class='item' <view v-for="item in downMenus" :key="item.key" class='item'
:class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'> :class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
@ -30,16 +116,14 @@
<view class="line" :class="{'font-line':firstKey == item.key}"> <view class="line" :class="{'font-line':firstKey == item.key}">
</view> </view>
</view> </view>
<view class="item" @click="bindRight">
<view>筛选
<!-- <text class="iconfont icon-shaixuan"></text> -->
</view>
<view class="line">
</view>
</view>
</view> </view>
</view> </view>
-->
<!-- 店铺 --> <!-- 店铺 -->
<!--
<block> <block>
<view class="store-wrapper"> <view class="store-wrapper">
<view class="store-item" v-for="(item,index) in storeList" :key="index"> <view class="store-item" v-for="(item,index) in storeList" :key="index">
@ -175,9 +259,12 @@
<view class='loadingicon acea-row row-center-wrapper' v-if="loading"> <view class='loadingicon acea-row row-center-wrapper' v-if="loading">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}} <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view> </view>
-->
</view> </view>
<view class='no-shop' v-if="!storeList.length && !loading && !loadingIcon" v-cloak> <view class='no-shop' v-if="!storeList.length && !loading && !loadingIcon" v-cloak>
<view class='pictrue' style="margin: 0 auto;"> <view class='pictrue' style="margin: 0 auto;background-color: #F5F5F5;">
<image src='../../../static/images/noCart.png'></image> <image src='../../../static/images/noCart.png'></image>
<text>暂无店铺快去搜索其他店铺吧</text> <text>暂无店铺快去搜索其他店铺吧</text>
</view> </view>
@ -195,7 +282,8 @@
<script> <script>
import { import {
storeMerchantList, storeMerchantList,
getGeocoder getGeocoder,
supMenuApi
} from '@/api/store.js'; } from '@/api/store.js';
import recommend from './component/recommend'; import recommend from './component/recommend';
import rightSlider from './component/rightSlider'; import rightSlider from './component/rightSlider';
@ -222,6 +310,25 @@
}, },
data() { data() {
return { return {
imgList: [
"/static/images/GXSC/BBY.png",
"/static/images/GXSC/NYSC.png",
"/static/images/GXSC/SHFW.png",
"/static/images/GXSC/SCFW.png",
"/static/images/GXSC/NFCP.png",
"/static/images/GXSC/WLSY.png",
"/static/images/GXSC/WYLY.png",
"/static/images/GXSC/MSGY.png",
"/static/images/GXSC/YLBJ.png",
"/static/images/GXSC/JYPX.png",
"/static/images/GXSC/JJRB.png",
"/static/images/GXSC/ZXJZ.png",
"/static/images/GXSC/NMJD.png",
"/static/images/GXSC/GXZH.png",
"/static/images/GXSC/DFTC.png",
"/static/images/GXSC/JDMS.png",
],
street_id: "",
price: 0, price: 0,
stock: 0, stock: 0,
nows: false, nows: false,
@ -238,6 +345,7 @@
brandList: [], brandList: [],
downKey: 0, downKey: 0,
downStatus: false, downStatus: false,
menuList: [],
// //
downMenu: [{ downMenu: [{
title: '默认', title: '默认',
@ -288,16 +396,19 @@
storeTypeArr: [], // storeTypeArr: [], //
merList: [], // merList: [], //
product_type: 0, product_type: 0,
show:false, show: false,
image: '' // image: '', //,
credit_buy: '', //
}; };
}, },
onLoad(options) { onLoad(options) {
console.log(options); // console.log(options);
this.street_id = options.street_id
this.product_type = options.product_type ?? 0 this.product_type = options.product_type ?? 0
if (options.street_id != undefined) { if (options.street_id != undefined) {
this.sotreParam.street_id = options.street_id this.sotreParam.street_id = options.street_id
} }
this.credit_buy = options.credit_buy
this.sotreParam.type_id = options.type_id this.sotreParam.type_id = options.type_id
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || '' this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || '' this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
@ -308,6 +419,10 @@
this.storeMerchantList(); this.storeMerchantList();
this.getClassfication(); this.getClassfication();
this.getStoreType(); this.getStoreType();
supMenuApi().then(res => {
this.menuList = res.data
})
}, },
computed: { computed: {
downMenus: function() { downMenus: function() {
@ -328,6 +443,28 @@
}, mapGetters(['viewColor'])), }, mapGetters(['viewColor'])),
}, },
methods: { methods: {
test() {
if (this.sotreParam.keyword.length > 3) {
this.sotreParam.keyword.slice(0, 3)
this.sotreParam.keyword = this.sotreParam.keyword.slice(0, 3) + "..."
console.log(this.sotreParam.keyword)
}
// console.log(this.sotreParam.keyword.length)
},
hotSerchFn(keywords) {
this.sotreParam.keyword = keywords
this.searchSubmit()
},
goMap(url) {
uni.navigateTo({
url
})
},
navGo(id) {
uni.navigateTo({
url: `/pages/nongKe/supply_chain/supplierA?type_id=10&merchant_category_id=${id}&street_id=${this.street_id}`
})
},
go_details: function(product_type, product_id) { go_details: function(product_type, product_id) {
if (product_type == 98) { if (product_type == 98) {
uni.navigateTo({ uni.navigateTo({
@ -496,7 +633,8 @@
order: this.sotreParam.order, order: this.sotreParam.order,
category_id: this.sotreParam.category_id, category_id: this.sotreParam.category_id,
type_id: this.sotreParam.type_id, type_id: this.sotreParam.type_id,
street_id: this.sotreParam.street_id street_id: this.sotreParam.street_id,
credit_buy: this.credit_buy
} }
if (this.latitude) { if (this.latitude) {
rqData.location = this.latitude + ',' + this.longitude rqData.location = this.latitude + ',' + this.longitude
@ -523,9 +661,9 @@
} }
} }
}, },
searchSubmit: function(e) { searchSubmit: function() {
let that = this; let that = this;
that.$set(that.sotreParam, 'keyword', e.detail.value); that.$set(that.sotreParam, 'keyword', this.sotreParam.keyword);
this.set_where(this.firstKey) this.set_where(this.firstKey)
}, },
// //
@ -618,48 +756,121 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.productList .search { * {
width: 100%; margin: 0;
height: 86rpx; padding: 0;
padding: 0 20rpx;
box-sizing: border-box;
position: fixed;
left: 0;
top: 0;
z-index: 9;
display: flex;
flex-wrap: nowrap;
background-color: #fff;
&.styleType1 {
background-color: var(--view-theme);
} }
.search-right { .com_name {
font-size: 33.29rpx;
// background-color: red;
// max-width: 45vw;
max-width: 40vw;
white-space: nowrap;
/* 防止文字换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 使用省略号表示溢出的内容 */
// width: 200px;
/* 可根据实际情况调整容器宽度 */
}
.head_tit {
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
max-width: max-content; align-items: center;
flex: 1; box-sizing: border-box;
padding-left: 20rpx; padding: 0 20rpx;
} }
.right-text { .productList {
// padding-top: 50rpx;
// padding: 0 20rpx 0;
.top {
padding-top: var(--status-bar-height);
/* #ifdef H5 */
padding-top: 30rpx;
/* #endif */
// padding-top: 80rpx;
background-color: #F0F2F5;
position: fixed;
z-index: 999;
width: 100%;
// margin-top: 10px;
}
.content {
padding: 20rpx;
}
.menu_cls {
background-color: white;
// height: 199.77rpx;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
padding: 20rpx 20rpx 0 20rpx;
.menu_li {
margin-right: 50rpx;
// background-color: red;
width: 50vw;
// width: 120rpx;
// display: inline-block;
}
}
.goods_list {
margin-top: 20rpx;
.goods_card {
margin-top: 20rpx;
height: auto;
background-color: white;
padding: 20rpx;
border-radius: 20rpx;
display: flex;
// align-items: center;
.left {
margin-right: 20rpx;
width: 158rpx;
height: 158rpx;
border-radius: 20rpx;
overflow: hidden;
}
.right {
.head {
font-weight: bold;
// color: red;
}
.li {
display: flex;
font-size: 26.29rpx;
margin-bottom: 10rpx;
align-items: center;
text {
margin: 0 20rpx 0 5rpx;
}
}
}
}
}
.address {
white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; width: 200px;
font-size: 28rpx; }
width: max-content;
color: #fff;
padding: 0 10rpx;
} }
.icon-xiangyou,
.icon-dingwei {
font-size: 30rpx;
color: #fff;
}
}
.search-right.styleType2 .right-text, .search-right.styleType2 .right-text,
.search-right.styleType3 .right-text { .search-right.styleType3 .right-text {
@ -688,6 +899,27 @@
} }
} }
.hot_serch {
color: #B3B3B3;
display: flex;
justify-content: space-around;
margin-top: 40rpx;
flex-wrap: wrap;
// margin-top: 50rpx;
// padding-top: 100rpx;
padding-top: var(--status-bar-height);
// margin-top: 10px;
/* #ifdef H5 */
padding-top: 50rpx;
/* #endif */
// margin-top: 200rpx;
text {
margin: 10rpx;
}
}
.productList .search .input { .productList .search .input {
flex: 1; flex: 1;
height: 60rpx; height: 60rpx;
@ -731,7 +963,7 @@
z-index: 9; z-index: 9;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 25px;
width: 100%; width: 100%;
margin-top: 86rpx; margin-top: 86rpx;
background-color: #fff; background-color: #fff;
@ -853,7 +1085,7 @@
} }
.store-wrapper { .store-wrapper {
margin-top: 165rpx; margin-top: 235rpx;
border-top: 1px solid #F6F6F6; border-top: 1px solid #F6F6F6;
.store-item { .store-item {
@ -1110,7 +1342,7 @@
.no-shop { .no-shop {
background-color: #fff; background-color: #fff;
padding-bottom: calc(100% - 176rpx); // padding-bottom: calc(100% - 176rpx);
.pictrue { .pictrue {
display: flex; display: flex;
@ -1124,12 +1356,21 @@
} }
} }
} }
.guanbi { .guanbi {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin: 30px auto; margin: 30px auto;
} }
.img_cls {
position: absolute;
top: 50%;
right: 7rpx;
transform: translateY(-50%);
}
.pop { .pop {
z-index: 1; z-index: 1;
} }

View File

@ -8,8 +8,9 @@
</view> </view>
<view class='nav acea-row row-between-wrapper'> <view class='nav acea-row row-between-wrapper'>
<view>购物数量 <text class='num t-color'>{{cartTotalCount}}</text></view> <view>购物数量 <text class='num t-color'>{{cartTotalCount}}</text></view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0" class='administrate acea-row row-center-wrapper' <view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0"
@click='manage'>{{ footerswitch ? '管理' : '取消'}}</view> class='administrate acea-row row-center-wrapper' @click='manage'>{{ footerswitch ? '管理' : '取消'}}
</view>
</view> </view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0"> <view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0">
<view class='list'> <view class='list'>
@ -20,31 +21,38 @@
<text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text> <text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text>
<text v-else class="iconfont icon-xuanzhong1"></text> <text v-else class="iconfont icon-xuanzhong1"></text>
</view> </view>
<navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'" class="info"> <navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'"
class="info">
<text class="iconfont icon-shangjiadingdan"></text> <text class="iconfont icon-shangjiadingdan"></text>
<view class="name">{{item.mer_name}}</view> <view class="name">{{item.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</navigator> </navigator>
<view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view> <view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view>
</view> </view>
<navigator v-for="goods in item.list" :key="goods.cart_id" :url='"/pages/goods_details/index?id="+goods.product.product_id' <navigator v-for="goods in item.list" :key="goods.cart_id"
hover-class='none' class='picTxt acea-row'> :url='"/pages/goods_details/index?id="+goods.product.product_id' hover-class='none'
class='picTxt acea-row'>
<view class="checkbox" @click.stop="goodsCheck(goods,index)"> <view class="checkbox" @click.stop="goodsCheck(goods,index)">
<text v-if="!goods.check" class="iconfont icon-weixuanzhong"></text> <text v-if="!goods.check" class="iconfont icon-weixuanzhong"></text>
<text v-else class="iconfont icon-xuanzhong1"></text> <text v-else class="iconfont icon-xuanzhong1"></text>
</view> </view>
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.productAttr && goods.productAttr.image) || goods.product.image'></image> <image :src='(goods.productAttr && goods.productAttr.image) || goods.product.image'>
</image>
<!-- <image v-else :src='item.productInfo.image'></image> --> <!-- <image v-else :src='item.productInfo.image'></image> -->
</view> </view>
<view class='text'> <view class='text'>
<view class='line1'>{{goods.product.store_name}}</view> <view class='line1'>{{goods.product.store_name}}</view>
<view class='infor line1' v-if="goods.productAttr.sku" @click.stop='changeCart(goods,goods.cart_id)'> <view class='infor line1' v-if="goods.productAttr.sku"
@click.stop='changeCart(goods,goods.cart_id)'>
{{goods.productAttr.sku}} {{goods.productAttr.sku}}
<text class="iconfont icon-xiala1"></text> <text class="iconfont icon-xiala1"></text>
</view> </view>
<view v-if="goods.product.once_max_count>0 && goods.product.once_min_count>0" class="buy_limit"> <view v-if="goods.product.once_max_count>0 && goods.product.once_min_count>0"
<text v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购,</text><text v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text> class="buy_limit">
<text
v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购</text><text
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view> </view>
<view class='money acea-row row-middle'> <view class='money acea-row row-middle'>
<text>{{goods.productAttr.price}}</text> <text>{{goods.productAttr.price}}</text>
@ -54,9 +62,11 @@
</view> </view>
</view> </view>
<view class='carnum acea-row row-center-wrapper'> <view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>-</view> <view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>
-</view>
<view class='num'>{{goods.cart_num}}</view> <view class='num'>{{goods.cart_num}}</view>
<view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+</view> <view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+
</view>
</view> </view>
</navigator> </navigator>
</view> </view>
@ -64,15 +74,18 @@
</view> </view>
<view class='invalidGoods' v-if="cartList.invalid.length > 0"> <view class='invalidGoods' v-if="cartList.invalid.length > 0">
<view class='goodsNav acea-row row-between-wrapper'> <view class='goodsNav acea-row row-between-wrapper'>
<view @click='goodsOpen'><text class='iconfont' :class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view> <view @click='goodsOpen'><text class='iconfont'
:class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view>
<view class='del' @click='unsetCart'><text class='iconfont icon-shanchu1'></text>清空</view> <view class='del' @click='unsetCart'><text class='iconfont icon-shanchu1'></text>清空</view>
</view> </view>
<view class='goodsList' :hidden='goodsHidden'> <view class='goodsList' :hidden='goodsHidden'>
<block v-for="(item,index) in cartList.invalid" :key='index'> <block v-for="(item,index) in cartList.invalid" :key='index'>
<navigator :url="'/pages/goods_details/index?id='+item.product_id" class='item acea-row row-between-wrapper' hover-class='none'> <navigator :url="'/pages/goods_details/index?id='+item.product_id"
class='item acea-row row-between-wrapper' hover-class='none'>
<view class='invalid'>失效</view> <view class='invalid'>失效</view>
<view class='pictrue'> <view class='pictrue'>
<image :src='(item.productAttr && item.productAttr.image) || item.product.image'></image> <image :src='(item.productAttr && item.productAttr.image) || item.product.image'>
</image>
</view> </view>
<view class='text acea-row row-column-between'> <view class='text acea-row row-column-between'>
@ -88,17 +101,20 @@
</view> </view>
</view> </view>
</view> </view>
<view class='noCart' v-if="recommend" :style="{marginTop:cartList.invalid.length ==0 && cartList.invalid.length ==0?'170rpx':'' }"> <view class='noCart' v-if="recommend"
:style="{marginTop:cartList.invalid.length ==0 && cartList.invalid.length ==0?'170rpx':'' }">
<view class='pictrue'> <view class='pictrue'>
<image src='../../static/images/noCart.png'></image> <image src='../../static/images/noCart.png'></image>
<view>暂无商品去添加点什么吧</view> <view>暂无商品去添加点什么吧</view>
</view> </view>
<recommend v-if="recommend_switch == 1" :hostProduct='hostProduct' :isLogin="isLogin"></recommend> <recommend v-if="recommend_switch == 1" :hostProduct='hostProduct' :isLogin="isLogin"></recommend>
<view class='loadingicon acea-row row-center-wrapper' v-if="hostProduct.length>5 && recommend_switch == 1"> <view class='loadingicon acea-row row-center-wrapper'
v-if="hostProduct.length>5 && recommend_switch == 1">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}} <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view> </view>
</view> </view>
<view class='footer acea-row row-between-wrapper' :class="isFooter?'':'on'" v-if="cartList.valid.length > 0"> <view class='footer acea-row row-between-wrapper' :style="`bottom:${appInfo.bottom+40}px`"
:class="isFooter?'':'on'" v-if="cartList.valid.length > 0">
<view> <view>
<view class="allcheckbox" @click.stop="checkboxAllChange"> <view class="allcheckbox" @click.stop="checkboxAllChange">
<text v-if="!isAllSelect" class="iconfont icon-weixuanzhong"></text> <text v-if="!isAllSelect" class="iconfont icon-weixuanzhong"></text>
@ -124,19 +140,16 @@
</view> </view>
<!-- 优惠券弹窗 --> <!-- 优惠券弹窗 -->
<block v-if="coupon.coupon"> <block v-if="coupon.coupon">
<couponListWindow <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone"
:coupon='coupon' @ChangCouponsUseState="ChangCouponsUseState"></couponListWindow>
@ChangCouponsClone="ChangCouponsClone"
@ChangCouponsUseState="ChangCouponsUseState"
></couponListWindow>
</block> </block>
<!-- 组件 --> <!-- 组件 -->
<addcartWindow :attr="attr" :isShow='1' :iSplus='1' :destri='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @goCat="goCat" @attrVal="attrVal" id='product-window'></addcartWindow> <addcartWindow :attr="attr" :isShow='1' :iSplus='1' :destri='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@goCat="goCat" @attrVal="attrVal" id='product-window'></addcartWindow>
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
<view class="foot" v-if="newData.status && newData.status.status"> <view class="foot" v-if="newData.status && newData.status.status">
<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}"> <view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" <view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" @click="goRouter(item)">
@click="goRouter(item)">
<block v-if="item.link == activeRouter"> <block v-if="item.link == activeRouter">
<image :src="item.imgList[0]"></image> <image :src="item.imgList[0]"></image>
<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}} <view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}}
@ -183,7 +196,9 @@
} from "vuex"; } from "vuex";
import recommend from '@/components/recommend'; import recommend from '@/components/recommend';
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { configMap } from '@/utils'; import {
configMap
} from '@/utils';
const app = getApp(); const app = getApp();
export default { export default {
props: { props: {
@ -200,10 +215,11 @@
}, },
data() { data() {
return { return {
appInfo: null,
loading: false, // loading: false, //
loadend: false, // loadend: false, //
loadTitle: '加载更多', // loadTitle: '加载更多', //
isFooter:false, isFooter: false,
cartCount: 0, cartCount: 0,
goodsHidden: true, goodsHidden: true,
footerswitch: true, footerswitch: true,
@ -226,7 +242,7 @@
list: [], list: [],
}, },
// //
cartTotalCount:0, cartTotalCount: 0,
recommend: false, recommend: false,
productValue: [], // productValue: [], //
attr: { attr: {
@ -248,13 +264,18 @@
activeRouter: '', activeRouter: '',
}; };
}, },
computed: configMap({hide_mer_status: 1,recommend_switch:0,navigation: {}}, mapGetters(['isLogin','viewColor'])), computed: configMap({
onReady(){}, hide_mer_status: 1,
recommend_switch: 0,
navigation: {}
}, mapGetters(['isLogin', 'viewColor'])),
onReady() {},
mounted: function() {}, mounted: function() {},
onLoad: function(options) { onLoad: function(options) {
}, },
onShow: function() { onShow: function() {
this.appInfo = this.$appInfo.safeAreaInsets
let that = this let that = this
let routes = getCurrentPages(); let routes = getCurrentPages();
let curRoute = routes[routes.length - 1].route let curRoute = routes[routes.length - 1].route
@ -270,12 +291,12 @@
this.selectValue = []; // this.selectValue = []; //
this.isShowAuth = false; this.isShowAuth = false;
uni.setStorage({ uni.setStorage({
key:'invoice_Data', key: 'invoice_Data',
data:{}, data: {},
success: function(){} success: function() {}
}) })
}else{ } else {
setTimeout(() =>{ setTimeout(() => {
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true this.isShowAuth = true
}, 300); }, 300);
@ -284,10 +305,10 @@
methods: { methods: {
// //
authColse: function(e) { authColse: function(e) {
// console.log(e,'authColse') console.log(e, 'authColse')
this.isShowAuth = e; this.isShowAuth = e;
}, },
onLoadFun(){ onLoadFun() {
this.isShowAuth = false; this.isShowAuth = false;
}, },
goRouter(item) { goRouter(item) {
@ -317,21 +338,21 @@
subDel: function(event) { subDel: function(event) {
let that = this let that = this
let type_id = [] let type_id = []
this.cartList.valid.forEach(el=>{ this.cartList.valid.forEach(el => {
el.list.forEach(goods=>{ el.list.forEach(goods => {
if(goods.check){ if (goods.check) {
type_id.push(goods.cart_id) type_id.push(goods.cart_id)
} }
}) })
}) })
if(type_id.length == 0){ if (type_id.length == 0) {
return that.$util.Tips({ return that.$util.Tips({
title: '请选择产品' title: '请选择产品'
}); });
}else{ } else {
cartDel({ cartDel({
cart_id:type_id, cart_id: type_id,
}).then(res=>{ }).then(res => {
this.getCartList(); this.getCartList();
this.getCartNum(); this.getCartNum();
return that.$util.Tips({ return that.$util.Tips({
@ -349,22 +370,22 @@
subCollect: function(event) { subCollect: function(event) {
let that = this let that = this
let type_id = [] let type_id = []
this.cartList.valid.forEach(el=>{ this.cartList.valid.forEach(el => {
el.list.forEach(goods=>{ el.list.forEach(goods => {
if(goods.check){ if (goods.check) {
type_id.push(goods.spu.spu_id) type_id.push(goods.spu.spu_id)
} }
}) })
}) })
if(type_id.length == 0){ if (type_id.length == 0) {
return that.$util.Tips({ return that.$util.Tips({
title: '请选择产品' title: '请选择产品'
}); });
}else{ } else {
collectAll({ collectAll({
type_id:type_id, type_id: type_id,
type:1 type: 1
}).then(res=>{ }).then(res => {
return that.$util.Tips({ return that.$util.Tips({
title: res.message, title: res.message,
icon: 'success' icon: 'success'
@ -385,20 +406,20 @@
*/ */
changeCart: function(goods, id) { changeCart: function(goods, id) {
let that = this; let that = this;
if(that.goods == goods){ if (that.goods == goods) {
that.isOpen = that.attr.cartAttr = true; that.isOpen = that.attr.cartAttr = true;
return return
}else{ } else {
that.goods = JSON.parse((JSON.stringify(goods))); that.goods = JSON.parse((JSON.stringify(goods)));
that.currSku = goods.productAttr.sku.split(","); that.currSku = goods.productAttr.sku.split(",");
that.$set(that.attr, 'productAttr', goods.attr); that.$set(that.attr, 'productAttr', goods.attr);
const sku = {} const sku = {}
that.attrValue = goods.productAttr.sku that.attrValue = goods.productAttr.sku
that.attrImage = goods.product.image that.attrImage = goods.product.image
goods.attrValue.forEach((itemn)=>{ goods.attrValue.forEach((itemn) => {
sku[itemn.sku] = itemn; sku[itemn.sku] = itemn;
}) })
that.$set(that, 'productValue',sku); that.$set(that, 'productValue', sku);
let productSelect = sku[that.attrValue]; let productSelect = sku[that.attrValue];
that.isOpen = that.attr.cartAttr = true; that.isOpen = that.attr.cartAttr = true;
// //
@ -413,10 +434,10 @@
let productAttr = this.attr.productAttr; let productAttr = this.attr.productAttr;
let value = []; let value = [];
let arr = [] let arr = []
// console.log(arr, 'arr') console.log(arr, 'arr')
if(this.currSku){ if (this.currSku) {
value = this.currSku value = this.currSku
}else{ } else {
for (var key in this.productValue) { for (var key in this.productValue) {
if (this.productValue[key].stock > 0) { if (this.productValue[key].stock > 0) {
value = this.attr.productAttr.length ? key.split(",") : []; value = this.attr.productAttr.length ? key.split(",") : [];
@ -434,7 +455,8 @@
"store_name", "store_name",
goods.product.store_name goods.product.store_name
); );
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product.image); this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods
.product.image);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -495,7 +517,7 @@
} }
this.goCart(productSelect); this.goCart(productSelect);
}, },
goCart(productSelect){ goCart(productSelect) {
let that = this; let that = this;
//,, //,,
if ( if (
@ -513,7 +535,8 @@
} }
}, },
attrVal(val) { attrVal(val) {
this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val.indexn]); this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val
.indexn]);
}, },
/** /**
* 属性变动赋值 * 属性变动赋值
@ -523,18 +546,19 @@
let productSelect = this.productValue[res]; let productSelect = this.productValue[res];
this.currSku = res; this.currSku = res;
this.newVal = this.productValue[res]; this.newVal = this.productValue[res];
if(productSelect)this.$set(this, "uniqueValue", productSelect.unique); if (productSelect) this.$set(this, "uniqueValue", productSelect.unique);
if (productSelect && productSelect.stock > 0) { if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique); this.$set(this, "uniqueValue", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1); this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", res); this.$set(this, "attrValue", res);
} } else {
else { this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); .attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", 0); this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
@ -545,9 +569,9 @@
// //
subOrder: function(event) { subOrder: function(event) {
let selectValue = [] let selectValue = []
this.cartList.valid.forEach(el=>{ this.cartList.valid.forEach(el => {
el.list.forEach(goods=>{ el.list.forEach(goods => {
if(goods.check){ if (goods.check) {
selectValue.push(goods.cart_id) selectValue.push(goods.cart_id)
} }
}) })
@ -593,7 +617,8 @@
cart_num: that.goods.cart_num, cart_num: that.goods.cart_num,
product_attr_unique: that.newVal.unique product_attr_unique: that.newVal.unique
}).then(res => { }).then(res => {
if (that.goods.hasOwnProperty('productAttr') && that.goods.cart_num > that.goods.productAttr.stock) { if (that.goods.hasOwnProperty('productAttr') && that.goods.cart_num > that.goods
.productAttr.stock) {
that.goods.cart_num = that.goods.productAttr.stock; that.goods.cart_num = that.goods.productAttr.stock;
that.goods.numAdd = true; that.goods.numAdd = true;
that.goods.numSub = false; that.goods.numSub = false;
@ -631,7 +656,7 @@
}).then(res => { }).then(res => {
goods.numSub = false; goods.numSub = false;
goods.numAdd = false; goods.numAdd = false;
if(goods.cart_num <= 1){ if (goods.cart_num <= 1) {
goods.numSub = true; goods.numSub = true;
} }
goods.cart_num = Number(goods.cart_num) - 1 goods.cart_num = Number(goods.cart_num) - 1
@ -673,12 +698,12 @@
}) })
this.cartList.valid = res.data.list this.cartList.valid = res.data.list
this.cartList.invalid = res.data.fail this.cartList.invalid = res.data.fail
if(res.data.list.length == 0 && res.data.list.length == 0){ if (res.data.list.length == 0 && res.data.list.length == 0) {
this.recommend = true; this.recommend = true;
if(!this.hostProduct.length){ if (!this.hostProduct.length) {
this.getHostProduct(); this.getHostProduct();
} }
}else{ } else {
this.recommend = false this.recommend = false
} }
const sku = {} const sku = {}
@ -732,7 +757,8 @@
// // // //
el.list.forEach(e => { el.list.forEach(e => {
if (e.check) { if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.price, e.cart_num)) totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr
.price, e.cart_num))
totalNum += e.cart_num totalNum += e.cart_num
} }
}) })
@ -778,12 +804,13 @@
}, },
// //
unsetCart: function() { unsetCart: function() {
let that = this,ids = []; let that = this,
ids = [];
for (let i = 0, len = that.cartList.invalid.length; i < len; i++) { for (let i = 0, len = that.cartList.invalid.length; i < len; i++) {
ids.push(that.cartList.invalid[i].cart_id); ids.push(that.cartList.invalid[i].cart_id);
} }
cartDel({ cartDel({
cart_id:ids cart_id: ids
}).then(res => { }).then(res => {
that.$util.Tips({ that.$util.Tips({
title: '清除成功' title: '清除成功'
@ -793,13 +820,13 @@
}).catch(res => {}); }).catch(res => {});
}, },
// //
giveCoupon(item){ giveCoupon(item) {
let that = this; let that = this;
let goodsArr = [] let goodsArr = []
let couponList = []; let couponList = [];
let activeList = []; let activeList = [];
let ids = [] let ids = []
item.list.map(el=>{ item.list.map(el => {
ids.push(el.product_id) ids.push(el.product_id)
}) })
uni.showLoading({ uni.showLoading({
@ -807,15 +834,17 @@
mask: true mask: true
}); });
getCoupons({ getCoupons({
ids:ids.join(',') ids: ids.join(',')
}).then(res => { }).then(res => {
goodsArr = res.data goodsArr = res.data
getShopCoupons(item.mer_id).then(({data})=>{ getShopCoupons(item.mer_id).then(({
data
}) => {
uni.hideLoading(); uni.hideLoading();
couponList = goodsArr.concat(data) couponList = goodsArr.concat(data)
this.$set(this.coupon, 'list', couponList); this.$set(this.coupon, 'list', couponList);
this.$set(this.coupon, 'coupon', true); this.$set(this.coupon, 'coupon', true);
}).catch(error=>{}) }).catch(error => {})
}); });
}, },
ChangCouponsClone: function() { ChangCouponsClone: function() {
@ -824,7 +853,7 @@
ChangCouponsUseState(index) { ChangCouponsUseState(index) {
let that = this; let that = this;
that.coupon.list[index].issue = true; that.coupon.list[index].issue = true;
// console.log(that.coupon.list[index]) console.log(that.coupon.list[index])
}, },
}, },
onReachBottom() { onReachBottom() {
@ -852,19 +881,23 @@
z-index: 5; z-index: 5;
top: 0; top: 0;
} }
.icon-xiala1{
.icon-xiala1 {
display: inline-block; display: inline-block;
transform: rotate(180deg); transform: rotate(180deg);
font-size: 14rpx; font-size: 14rpx;
padding: 0 5rpx; padding: 0 5rpx;
} }
.shoppingCart .labelNav .item .iconfont { .shoppingCart .labelNav .item .iconfont {
font-size: 25rpx; font-size: 25rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.t-color { .t-color {
color: var(--view-theme); color: var(--view-theme);
} }
.shoppingCart { .shoppingCart {
/* #ifndef MP */ /* #ifndef MP */
padding-bottom: 180rpx; padding-bottom: 180rpx;
@ -872,13 +905,15 @@
/* #ifdef MP */ /* #ifdef MP */
padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom));
padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); padding-bottom: calc(0rpx + env(safe-area-inset-bottom));
/* #endif */ /* #endif */
&.showFoot{ &.showFoot {
padding-bottom: calc(180rpx+ constant(safe-area-inset-bottom)); padding-bottom: calc(180rpx+ constant(safe-area-inset-bottom));
padding-bottom: calc(180rpx + env(safe-area-inset-bottom)); padding-bottom: calc(180rpx + env(safe-area-inset-bottom));
} }
} }
.shoppingCart .nav { .shoppingCart .nav {
width: 100%; width: 100%;
height: 80rpx; height: 80rpx;
@ -892,6 +927,7 @@
z-index: 5; z-index: 5;
top: 76rpx; top: 76rpx;
} }
.shoppingCart .nav .administrate { .shoppingCart .nav .administrate {
font-size: 26rpx; font-size: 26rpx;
color: #282828; color: #282828;
@ -900,30 +936,37 @@
border-radius: 6rpx; border-radius: 6rpx;
border: 1px solid #868686; border: 1px solid #868686;
} }
.shoppingCart .noCart { .shoppingCart .noCart {
margin-top: 20rpx; margin-top: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #fff; background-color: #fff;
padding-top: 0.1rpx; padding-top: 0.1rpx;
} }
.shoppingCart .noCart .pictrue { .shoppingCart .noCart .pictrue {
text-align: center; text-align: center;
margin: 78rpx auto 56rpx auto; margin: 78rpx auto 56rpx auto;
padding-bottom: 60rpx; padding-bottom: 60rpx;
} }
.shoppingCart .noCart .pictrue image { .shoppingCart .noCart .pictrue image {
width: 414rpx; width: 414rpx;
height: 305rpx; height: 305rpx;
} }
.shoppingCart .noCart .pictrue view{
.shoppingCart .noCart .pictrue view {
color: #999; color: #999;
} }
.shoppingCart .list { .shoppingCart .list {
margin: 171rpx 0 20rpx; margin: 171rpx 0 20rpx;
} }
.shoppingCart .list .item { .shoppingCart .list .item {
background-color: #fff; background-color: #fff;
margin-bottom: 15rpx; margin-bottom: 15rpx;
.store-title { .store-title {
display: flex; display: flex;
align-items: center; align-items: center;
@ -931,35 +974,43 @@
padding: 0 30rpx; padding: 0 30rpx;
height: 85rpx; height: 85rpx;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
.checkbox { .checkbox {
width: 60rpx; width: 60rpx;
.iconfont { .iconfont {
font-size: 40rpx; font-size: 40rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
.info { .info {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
.iconfont { .iconfont {
font-size: 36rpx; font-size: 36rpx;
} }
.name { .name {
margin: 0 0 0 10rpx; margin: 0 0 0 10rpx;
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
font-weight: bold; font-weight: bold;
} }
.icon-xiangyou { .icon-xiangyou {
margin-top: 6rpx; margin-top: 6rpx;
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
} }
} }
.coupon-btn { .coupon-btn {
color: var(--view-theme); color: var(--view-theme);
font-size: 22rpx; font-size: 22rpx;
@ -971,53 +1022,64 @@
} }
} }
} }
.vipImg { .vipImg {
width: 65rpx; width: 65rpx;
height: 28rpx; height: 28rpx;
margin-left: 10rpx; margin-left: 10rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
} }
.shoppingCart .list .item .picTxt { .shoppingCart .list .item .picTxt {
width: 100%; width: 100%;
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
position: relative; position: relative;
align-items: center; align-items: center;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
.checkbox { .checkbox {
width: 60rpx; width: 60rpx;
.iconfont { .iconfont {
font-size: 40rpx; font-size: 40rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
} }
.shoppingCart .list .item .picTxt .pictrue { .shoppingCart .list .item .picTxt .pictrue {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
} }
.shoppingCart .list .item .picTxt .pictrue image { .shoppingCart .list .item .picTxt .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6rpx; border-radius: 6rpx;
} }
.shoppingCart .list .item .picTxt .text { .shoppingCart .list .item .picTxt .text {
width: 444rpx; width: 444rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
.shoppingCart .list .item .picTxt .buy_limit { .shoppingCart .list .item .picTxt .buy_limit {
margin-top: 10rpx; margin-top: 10rpx;
color: #E93323; color: #E93323;
font-size: 22rpx; font-size: 22rpx;
} }
.shoppingCart .list .item .picTxt .text .infor { .shoppingCart .list .item .picTxt .text .infor {
display: inline-block; display: inline-block;
padding: 6rpx; padding: 6rpx;
@ -1028,17 +1090,20 @@
background-color: #F5F5F5; background-color: #F5F5F5;
max-width: 460rpx; max-width: 460rpx;
} }
.shoppingCart .list .item .picTxt .text .money { .shoppingCart .list .item .picTxt .text .money {
font-size: 32rpx; font-size: 32rpx;
color: #282828; color: #282828;
margin-top: 28rpx; margin-top: 28rpx;
} }
.shoppingCart .list .item .picTxt .carnum { .shoppingCart .list .item .picTxt .carnum {
height: 47rpx; height: 47rpx;
position: absolute; position: absolute;
bottom: 30rpx; bottom: 30rpx;
right: 30rpx; right: 30rpx;
} }
.shoppingCart .list .item .picTxt .carnum view { .shoppingCart .list .item .picTxt .carnum view {
border: 1px solid #a4a4a4; border: 1px solid #a4a4a4;
min-width: 66rpx; min-width: 66rpx;
@ -1048,24 +1113,30 @@
font-size: 28rpx; font-size: 28rpx;
color: #a4a4a4; color: #a4a4a4;
} }
.shoppingCart .list .item .picTxt .carnum .reduce { .shoppingCart .list .item .picTxt .carnum .reduce {
border-right: 0; border-right: 0;
border-radius: 3rpx 0 0 3rpx; border-radius: 3rpx 0 0 3rpx;
} }
.shoppingCart .list .item .picTxt .carnum .reduce.on { .shoppingCart .list .item .picTxt .carnum .reduce.on {
border-color: #e3e3e3; border-color: #e3e3e3;
color: #dedede; color: #dedede;
} }
.shoppingCart .list .item .picTxt .carnum .plus { .shoppingCart .list .item .picTxt .carnum .plus {
border-left: 0; border-left: 0;
border-radius: 0 3rpx 3rpx 0; border-radius: 0 3rpx 3rpx 0;
} }
.shoppingCart .list .item .picTxt .carnum .num { .shoppingCart .list .item .picTxt .carnum .num {
color: #282828; color: #282828;
} }
.shoppingCart .invalidGoods { .shoppingCart .invalidGoods {
background-color: #fff; background-color: #fff;
} }
.shoppingCart .invalidGoods .goodsNav { .shoppingCart .invalidGoods .goodsNav {
width: 100%; width: 100%;
height: 66rpx; height: 66rpx;
@ -1074,25 +1145,30 @@
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
.shoppingCart .invalidGoods .goodsNav .iconfont { .shoppingCart .invalidGoods .goodsNav .iconfont {
color: #424242; color: #424242;
font-size: 28rpx; font-size: 28rpx;
margin-right: 17rpx; margin-right: 17rpx;
} }
.shoppingCart .invalidGoods .goodsNav .del { .shoppingCart .invalidGoods .goodsNav .del {
font-size: 26rpx; font-size: 26rpx;
color: #999; color: #999;
} }
.shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1 { .shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1 {
color: #999; color: #999;
font-size: 33rpx; font-size: 33rpx;
vertical-align: -2rpx; vertical-align: -2rpx;
margin-right: 8rpx; margin-right: 8rpx;
} }
.shoppingCart .invalidGoods .goodsList .item { .shoppingCart .invalidGoods .goodsList .item {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
border-top: 1px solid #f5f5f5; border-top: 1px solid #f5f5f5;
} }
.shoppingCart .invalidGoods .goodsList .item .invalid { .shoppingCart .invalidGoods .goodsList .item .invalid {
font-size: 22rpx; font-size: 22rpx;
color: #fff; color: #fff;
@ -1103,31 +1179,38 @@
text-align: center; text-align: center;
line-height: 36rpx; line-height: 36rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .pictrue { .shoppingCart .invalidGoods .goodsList .item .pictrue {
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .pictrue image { .shoppingCart .invalidGoods .goodsList .item .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6rpx; border-radius: 6rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .text { .shoppingCart .invalidGoods .goodsList .item .text {
width: 433rpx; width: 433rpx;
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
height: 140rpx; height: 140rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .text .name { .shoppingCart .invalidGoods .goodsList .item .text .name {
width: 100%; width: 100%;
} }
.shoppingCart .invalidGoods .goodsList .item .text .infor { .shoppingCart .invalidGoods .goodsList .item .text .infor {
font-size: 24rpx; font-size: 24rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .text .end { .shoppingCart .invalidGoods .goodsList .item .text .end {
font-size: 26rpx; font-size: 26rpx;
color: #bbb; color: #bbb;
} }
.shoppingCart .footer { .shoppingCart .footer {
z-index: 9; z-index: 9;
width: 100%; width: 100%;
@ -1137,23 +1220,27 @@
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #eee; border-top: 1px solid #eee;
bottom: 98rpx; bottom: 40px;
bottom: calc(98rpx + constant(safe-area-inset-bottom)); /// IOS<11.2/ bottom: calc(40px + constant(safe-area-inset-bottom)); /// IOS<11.2/
bottom: calc(98rpx + env(safe-area-inset-bottom)); /// IOS>11.2/ bottom: calc(40px + env(safe-area-inset-bottom)); /// IOS>11.2/
} }
.shoppingCart .footer.on { .shoppingCart .footer.on {
// #ifndef H5 // #ifndef H5
bottom: 0rpx; bottom: 0rpx;
// #endif // #endif
} }
.shoppingCart .footer .checkAll { .shoppingCart .footer .checkAll {
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
margin-left: 16rpx; margin-left: 16rpx;
} }
.shoppingCart .footer .money { .shoppingCart .footer .money {
font-size: 30rpx; font-size: 30rpx;
} }
.shoppingCart .footer .placeOrder { .shoppingCart .footer .placeOrder {
color: #fff; color: #fff;
font-size: 30rpx; font-size: 30rpx;
@ -1165,6 +1252,7 @@
margin-left: 22rpx; margin-left: 22rpx;
background-color: var(--view-theme); background-color: var(--view-theme);
} }
.shoppingCart .footer .button .bnt { .shoppingCart .footer .button .bnt {
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
@ -1174,27 +1262,33 @@
height: 60rpx; height: 60rpx;
text-align: center; text-align: center;
line-height: 60rpx; line-height: 60rpx;
&.bt-color { &.bt-color {
color: var(--view-theme); color: var(--view-theme);
border: 1px solid var(--view-theme); border: 1px solid var(--view-theme);
} }
} }
.shoppingCart .footer .button form~form { .shoppingCart .footer .button form~form {
margin-left: 17rpx; margin-left: 17rpx;
} }
.allcheckbox { .allcheckbox {
display: flex; display: flex;
align-items: center; align-items: center;
width: 260rpx; width: 260rpx;
.iconfont { .iconfont {
margin-right: 20rpx; margin-right: 20rpx;
font-size: 40rpx; font-size: 40rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
.page-footer { .page-footer {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
@ -1211,9 +1305,11 @@
box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32); box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
padding-bottom: constant(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/ padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
&.filter{
&.filter {
filter: blur(2rpx); filter: blur(2rpx);
} }
.foot-item { .foot-item {
display: flex; display: flex;
width: max-content; width: max-content;
@ -1221,6 +1317,7 @@
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
.count-num { .count-num {
position: absolute; position: absolute;
display: flex; display: flex;
@ -1237,15 +1334,16 @@
padding: 4rpx; padding: 4rpx;
} }
} }
.foot-item image { .foot-item image {
height: 50rpx; height: 50rpx;
width: 50rpx; width: 50rpx;
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
} }
.foot-item .txt { .foot-item .txt {
font-size: 24rpx; font-size: 24rpx;
} }
} }
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
<view :style="viewColor"> <view :style="viewColor">
<view class='payment-status'> <view class='payment-status'>
<!--失败时 用icon-iconfontguanbi fail替换icon-duihao2 bg-color--> <!--失败时 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-->
<view class='iconfont icon-duihao2 icon' v-if ="order_pay_info.paid !=0"></view> <view class='iconfont icon-duihao2 icon' v-if="order_pay_info.paid !=0"></view>
<view class='iconfont icon-iconfontguanbi icon' v-else></view> <view class='iconfont icon-iconfontguanbi icon' v-else></view>
<!-- 失败时订单支付失败 --> <!-- 失败时订单支付失败 -->
<view class='status'>{{order_pay_info.paid == 1 ?'支付成功':'订单未支付'}}</view> <view class='status'>{{order_pay_info.paid == 1 ?'支付成功':'订单未支付'}}</view>
@ -14,26 +14,30 @@
</view> </view>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view>支付方式</view> <view>支付方式</view>
<view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3" class='itemCom'>微信</view> <view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3"
<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝</view> class='itemCom'>微信</view>
<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝
</view>
<view v-else class='itemCom'>余额</view> <view v-else class='itemCom'>余额</view>
</view> </view>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view>支付金额</view> <view>支付金额</view>
<view class='itemCom'>{{order_pay_info.pay_price}}</view> <view class='itemCom'>{{order_pay_info.pay_price}}</view>
</view> </view>
<view v-if="order_pay_info.give_integral > 0 && order_pay_info.paid" class='item acea-row row-between-wrapper'> <view v-if="order_pay_info.give_integral > 0 && order_pay_info.paid"
class='item acea-row row-between-wrapper'>
<view>赠送积分</view> <view>赠送积分</view>
<view class='itemCom t-color'>{{order_pay_info.give_integral}}</view> <view class='itemCom t-color'>{{order_pay_info.give_integral}}</view>
</view> </view>
<!--失败时加上这个 --> <!--失败时加上这个 -->
<view class='item acea-row row-between-wrapper' v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success'"> <view class='item acea-row row-between-wrapper'
v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success'">
<view>失败原因</view> <view>失败原因</view>
<view class='itemCom'>{{order_pay_info.pay_type==0 ? '余额不足':msg}}</view> <view class='itemCom'>{{order_pay_info.pay_type==0 ? '余额不足':msg}}</view>
</view> </view>
</view> </view>
<!--失败时 重新购买 --> <!--失败时 重新购买 -->
<view @tap="goOrderDetails"> <view @tap="goOrderDetails(order_pay_info.paid)">
<button formType="submit" class='returnBnt gColor' hover-class='none'>查看订单</button> <button formType="submit" class='returnBnt gColor' hover-class='none'>查看订单</button>
</view> </view>
<!-- <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==1"> <!-- <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==1">
@ -42,8 +46,10 @@
<!-- <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==2"> <!-- <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==2">
<button class='returnBnt bg-color' hover-class='none'>重新支付</button> <button class='returnBnt bg-color' hover-class='none'>重新支付</button>
</view> --> </view> -->
<button @click="goPink(order_pay_info.activity_id)" class='returnBnt s-Color' formType="submit" hover-class='none' v-if="order_pay_info.activity_type == 4 && order_pay_info.paid">邀请好友参团</button> <button @click="goPink(order_pay_info.activity_id)" class='returnBnt s-Color' formType="submit"
<button v-if="!order_pay_info.paid || order_pay_info.activity_type != 4" @click="goIndex" class='returnBnt s-Color' formType="submit" hover-class='none'>返回首页</button> hover-class='none' v-if="order_pay_info.activity_type == 4 && order_pay_info.paid">邀请好友参团</button>
<button v-if="!order_pay_info.paid || order_pay_info.activity_type != 4" @click="goIndex"
class='returnBnt s-Color' formType="submit" hover-class='none'>返回首页</button>
<view class="coupon-wrapper" v-if="couponList.length>0 && order_pay_info.paid"> <view class="coupon-wrapper" v-if="couponList.length>0 && order_pay_info.paid">
<view class="hd"> <view class="hd">
<view class="line"></view> <view class="line"></view>
@ -53,12 +59,16 @@
<view class="coupon-box" :class="{on:isOpen}"> <view class="coupon-box" :class="{on:isOpen}">
<block v-for="(item,index) in couponList" :key="index"> <block v-for="(item,index) in couponList" :key="index">
<view class="coupon-item flex"> <view class="coupon-item flex">
<view class="left-bg" :style="{ 'background-image': `url(${domain}/static/diy/couponBg${keyColor}.png)` }"><text></text>{{item.coupon_price}}</view> <view class="left-bg"
:style="{ 'background-image': `url(${domain}/static/diy/couponBg${keyColor}.png)` }">
<text></text>{{item.coupon_price}}
</view>
<view class="info"> <view class="info">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="des">{{item.use_min_price}}元可用</view> <view class="des">{{item.use_min_price}}元可用</view>
<block v-if="item.coupon_type == 1"> <block v-if="item.coupon_type == 1">
<view class="des">有效期:{{ item.use_start_time |timeYMD }}-{{ item.use_end_time |timeYMD}}</view> <view class="des">
有效期:{{ item.use_start_time |timeYMD }}-{{ item.use_end_time |timeYMD}}</view>
</block> </block>
<block v-if="item.coupon_type == 0"> <block v-if="item.coupon_type == 0">
<view class="des">领取后{{ item.coupon_time}}天内可用</view> <view class="des">领取后{{ item.coupon_time}}天内可用</view>
@ -88,19 +98,27 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import {getPayOrder} from '@/api/order.js'; import {
import {openOrderSubscribe} from '@/utils/SubscribeMessage.js'; getPayOrder
import {mapGetters} from "vuex"; } from '@/api/order.js';
import {
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { HTTP_REQUEST_URL } from '@/config/app'; import {
HTTP_REQUEST_URL
} from '@/config/app';
export default { export default {
components: { components: {
authorize, authorize,
}, },
filters: { filters: {
timeYMD: function (value) { timeYMD: function(value) {
if(value){ if (value) {
var newDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(value) var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(value)
return newDate[0] return newDate[0]
} }
} }
@ -115,14 +133,16 @@
isShowAuth: false, // isShowAuth: false, //
status: 0, status: 0,
msg: '', msg: '',
couponList:[], // couponList: [], //
isOpen:false ,// isOpen: false, //
moneyBg: '/static/images/couponBg', moneyBg: '/static/images/couponBg',
text: '展开更多', text: '展开更多',
timer: null timer: null,
product_type: '',
}; };
}, },
computed: mapGetters(['isLogin','viewColor','keyColor']), computed: mapGetters(['isLogin', 'viewColor', 'keyColor']),
onLoad: function(options) { onLoad: function(options) {
if (!options.order_id) return this.$util.Tips({ if (!options.order_id) return this.$util.Tips({
title: '缺少参数无法查看订单支付状态' title: '缺少参数无法查看订单支付状态'
@ -134,6 +154,7 @@
this.order_type = options.order_type; this.order_type = options.order_type;
this.status = options.status || 0; this.status = options.status || 0;
this.msg = options.msg || ''; this.msg = options.msg || '';
this.product_type = options.product_type
if (this.isLogin) { if (this.isLogin) {
this.refreshData(); this.refreshData();
} else { } else {
@ -142,13 +163,12 @@
} }
}, },
methods: { methods: {
refreshData(){ refreshData() {
this.timer = setInterval(()=>{
this.getOrderPayInfo(); this.getOrderPayInfo();
},1000)
}, },
// //
bindMore(){ bindMore() {
this.isOpen = !this.isOpen this.isOpen = !this.isOpen
this.text = this.text == '展开更多' ? '收起' : '展开更多'; this.text = this.text == '展开更多' ? '收起' : '展开更多';
}, },
@ -173,7 +193,7 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: res.data.paid == 1 ? '支付成功' : '支付失败' title: res.data.paid == 1 ? '支付成功' : '支付失败'
}); });
if(res.data.paid == 1){ if (res.data.paid == 1) {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
} }
@ -199,16 +219,41 @@
* *
* 去订单详情页面 * 去订单详情页面
*/ */
goOrderDetails: function(e) { goOrderDetails: function(val) {
let that = this; let that = this;
if (this.order_pay_info.paid == 0) { if (this.product_type == 98) {
uni.redirectTo({ if(val==1){
url: '/pages/users/order_list/index' uni.navigateTo({
url: `/pages/users/order_list/indexCopy?status=1&product_type=${this.product_type}`
}) })
}else{
uni.navigateTo({
url: `/pages/users/order_list/indexCopy?status=0&product_type=${this.product_type}`
})
}
} else if (this.product_type == 99) {
if(val==1){
uni.navigateTo({
url: `/pages/users/order_list/relase?status=1&product_type=${this.product_type}`
})
}else{
uni.navigateTo({
url: `/pages/users/order_list/relase?status=0&product_type=${this.product_type}`
})
}
} else { } else {
uni.redirectTo({ if(val==1){
url: '/pages/users/order_list/index?status=1' uni.navigateTo({
url: '/pages/users/order_list/index?status=1&product_type=0'
}) })
}else{
uni.navigateTo({
url: '/pages/users/order_list/index?status=0&product_type=0'
})
}
} }
} }
@ -231,6 +276,7 @@
border-radius: 10rpx; border-radius: 10rpx;
padding: 1rpx 0 28rpx 0; padding: 1rpx 0 28rpx 0;
} }
.payment-status .icon { .payment-status .icon {
font-size: 70rpx; font-size: 70rpx;
width: 140rpx; width: 140rpx;
@ -242,19 +288,23 @@
border: 6rpx solid #f5f5f5; border: 6rpx solid #f5f5f5;
margin: -76rpx auto 0 auto; margin: -76rpx auto 0 auto;
background-color: #999; background-color: #999;
&.icon-duihao2{
&.icon-duihao2 {
background-color: var(--view-theme); background-color: var(--view-theme);
} }
} }
.payment-status .icon.fail { .payment-status .icon.fail {
text-shadow: 0px 4px 0px #7a7a7a; text-shadow: 0px 4px 0px #7a7a7a;
} }
.payment-status .status { .payment-status .status {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
margin: 25rpx 0 37rpx 0; margin: 25rpx 0 37rpx 0;
} }
.payment-status .wrapper { .payment-status .wrapper {
border: 1px solid #eee; border: 1px solid #eee;
margin: 0 30rpx 47rpx 30rpx; margin: 0 30rpx 47rpx 30rpx;
@ -262,16 +312,20 @@
border-left: 0; border-left: 0;
border-right: 0; border-right: 0;
} }
.payment-status .wrapper .item { .payment-status .wrapper .item {
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
.payment-status .wrapper .item~.item { .payment-status .wrapper .item~.item {
margin-top: 20rpx; margin-top: 20rpx;
} }
.payment-status .wrapper .item .itemCom { .payment-status .wrapper .item .itemCom {
color: #666; color: #666;
} }
.payment-status .returnBnt { .payment-status .returnBnt {
width: 630rpx; width: 630rpx;
height: 86rpx; height: 86rpx;
@ -281,46 +335,56 @@
text-align: center; text-align: center;
line-height: 86rpx; line-height: 86rpx;
margin: 0 auto 20rpx auto; margin: 0 auto 20rpx auto;
&.gColor{
&.gColor {
background-color: var(--view-theme); background-color: var(--view-theme);
} }
&.s-Color{
&.s-Color {
color: var(--view-theme); color: var(--view-theme);
border: 1px solid var(--view-theme); border: 1px solid var(--view-theme);
} }
} }
.t-color { .t-color {
color: var(--view-theme)!important; color: var(--view-theme) !important;
} }
.coupon-wrapper{
.hd{ .coupon-wrapper {
.hd {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 30rpx 0; margin: 30rpx 0;
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
.line{
.line {
width: 70rpx; width: 70rpx;
height: 1px; height: 1px;
background: #DCDCDC; background: #DCDCDC;
} }
.txt{
.txt {
margin: 0 20rpx; margin: 0 20rpx;
} }
} }
.coupon-box{
.coupon-box {
height: 356rpx; height: 356rpx;
padding: 0 20rpx; padding: 0 20rpx;
overflow: hidden; overflow: hidden;
&.on{
&.on {
height: auto; height: auto;
} }
.coupon-item{
.coupon-item {
width: 100%; width: 100%;
margin-bottom: 20rpx; margin-bottom: 20rpx;
box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.06); box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06);
.left-bg{
.left-bg {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -328,36 +392,42 @@
height: 160rpx; height: 160rpx;
color: #fff; color: #fff;
font-size: 64rpx; font-size: 64rpx;
text{
text {
margin-top: 26rpx; margin-top: 26rpx;
font-size: 36rpx; font-size: 36rpx;
} }
} }
.info{
.info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
margin-left: 20rpx; margin-left: 20rpx;
padding: 20rpx 0; padding: 20rpx 0;
.title{
.title {
color: #282828; color: #282828;
font-size: 30rpx; font-size: 30rpx;
} }
.des{
.des {
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
} }
} }
} }
} }
.more{
.more {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-top: 24rpx; padding-top: 24rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
.iconfont{
.iconfont {
margin-top: 6rpx; margin-top: 6rpx;
margin-left: 10rpx; margin-left: 10rpx;
font-size: 20rpx; font-size: 20rpx;

File diff suppressed because it is too large Load Diff

View File

@ -2,8 +2,9 @@
<view :style="viewColor"> <view :style="viewColor">
<form @submit="formSubmit" report-submit='true'> <form @submit="formSubmit" report-submit='true'>
<view class="release_content"> <view class="release_content">
<view v-if="community_app_switch.length == 1" class="release_tab acea-row"> <!-- v-if="community_app_switch.length == 1" -->
<view class="tab_item" v-for="(item, index) in tabList" :key="item.value" :class="{on:tabActive == item.value}" @click="changeTab(item)"> <view class="release_tab acea-row">
<view class="tab_item" v-for="(item, index) in tabList" :key="item.value" :class="{on:tabActive == index}" @click="changeTab(index)">
<text class="iconfont" :class="item.icon"></text>{{item.name}} <text class="iconfont" :class="item.icon"></text>{{item.name}}
</view> </view>
</view> </view>
@ -11,7 +12,7 @@
<view class="release_item"> <view class="release_item">
<view class="photo_count"> <view class="photo_count">
<view class="input_photo acea-row row-middle"> <view class="input_photo acea-row row-middle">
<block v-if="tabActive == 2"> <block v-if="tabActive == 1">
<view class="pictrue" v-if="formData.video_link"> <view class="pictrue" v-if="formData.video_link">
<image class="video-bg" mode="widthFix" src="../static/images/video_bg.png"></image> <image class="video-bg" mode="widthFix" src="../static/images/video_bg.png"></image>
<view class="videoHover" @click="videoshow"> <view class="videoHover" @click="videoshow">
@ -26,7 +27,7 @@
<view><text class='iconfont icon-tianjiashipin'></text></view> <view><text class='iconfont icon-tianjiashipin'></text></view>
<view class="text">添加视频</view> <view class="text">添加视频</view>
</view> </view>
<view v-if="formData.image.length < 1" class="pictrue acea-row row-center-wrapper row-column add" @click.stop="clk"> <view class="pictrue acea-row row-center-wrapper row-column add" @click.stop="clk">
<view><text class='iconfont icon-fengmian'></text></view> <view><text class='iconfont icon-fengmian'></text></view>
<view class="text">添加封面</view> <view class="text">添加封面</view>
</view> </view>
@ -36,7 +37,7 @@
<text class="cover_text" v-if="tabActive == 2">封面</text> <text class="cover_text" v-if="tabActive == 2">封面</text>
<view class="close_btn" @click="DelPic(index)"><text class="iconfont icon-guanbi4"></text></view> <view class="close_btn" @click="DelPic(index)"><text class="iconfont icon-guanbi4"></text></view>
</view> </view>
<block v-if="tabActive == 1"> <block v-if="tabActive == 0">
<view v-if="formData.image.length < 6" class="pictrue acea-row row-center-wrapper row-column add" @click.stop="clk"> <view v-if="formData.image.length < 6" class="pictrue acea-row row-center-wrapper row-column add" @click.stop="clk">
<view><text class='iconfont icon-icon25201'></text></view> <view><text class='iconfont icon-icon25201'></text></view>
<view class="text">添加图片</view> <view class="text">添加图片</view>
@ -186,7 +187,7 @@
// #endif // #endif
}, },
onLoad(options) { onLoad(options) {
console.log(this.community_app_switch); console.log(options.type);
this.id = options.id; this.id = options.id;
this.order_id = options.order_id; this.order_id = options.order_id;
this.tabActive = options.type || 1; this.tabActive = options.type || 1;
@ -246,9 +247,10 @@
}) })
}, },
/*切换tab*/ /*切换tab*/
changeTab(item) { changeTab(index) {
if(this.tabActive == item.value) return
this.tabActive = item.value
this.tabActive =index
this.formData.image = [] this.formData.image = []
}, },
/*删除话题*/ /*删除话题*/
@ -467,6 +469,7 @@
}); });
} }
}else{ }else{
if (value.image.length == 0) return that.$util.Tips({ if (value.image.length == 0) return that.$util.Tips({
title: '请添加话题图片' title: '请添加话题图片'
}); });

View File

@ -17,7 +17,7 @@
<text>{{userInfo.focus}}</text>关注 <text>{{userInfo.focus}}</text>关注
</navigator> </navigator>
<navigator :url="userInfo.is_self ? '/pages/plantGrass/plant_user_fans/index' : ''" class="item" hover-class="none"> <navigator :url="userInfo.is_self ? '/pages/plantGrass/plant_user_fans/index' : ''" class="item" hover-class="none">
<text>{{userInfo.fans}}</text>粉丝 <text>{{userInfo.fans==null?0:userInfo.fans}}</text>粉丝
</navigator> </navigator>
<view class="item"> <view class="item">
<text>{{userInfo.start}}</text>获赞 <text>{{userInfo.start}}</text>获赞
@ -37,6 +37,7 @@
</view> </view>
</view> </view>
<view class="main"> <view class="main">
<view v-if="userInfo.is_self" class="tab_count"> <view v-if="userInfo.is_self" class="tab_count">
<text @click.stop="changeTab(0)" :class="tab==0 ? 'on' : ''">作品</text> <text @click.stop="changeTab(0)" :class="tab==0 ? 'on' : ''">作品</text>
<text @click.stop="changeTab(1)" :class="tab==1 ? 'on' : ''">赞过</text> <text @click.stop="changeTab(1)" :class="tab==1 ? 'on' : ''">赞过</text>

View File

@ -20,7 +20,8 @@
<block v-if="tabActive == 2"> <block v-if="tabActive == 2">
<view class="pictrue" v-if="formData.video_link"> <view class="pictrue" v-if="formData.video_link">
<view v-if="videoplay"> <view v-if="videoplay">
<video controls id="myvideo" :src="video_link" @fullscreenchange="screenChange"></video> <video controls id="myvideo" :src="video_link"
@fullscreenchange="screenChange"></video>
</view> </view>
<!--#ifndef APP-PLUS--> <!--#ifndef APP-PLUS-->
<video class="pictrue" :src="formData.video_link"></video> <video class="pictrue" :src="formData.video_link"></video>
@ -35,14 +36,16 @@
</view> </view>
<text class="video-text">点击可预览视频</text> <text class="video-text">点击可预览视频</text>
<view class="close_btn" @click="formData.video_link = ''"><text <view class="close_btn" @click="delVideo"><text
class="iconfont icon-guanbi4"></text></view> class="iconfont icon-guanbi4"></text></view>
</view> </view>
<view v-else class="pictrue acea-row row-center-wrapper row-column add" @click="uploadVideo"> <view v-else class="pictrue acea-row row-center-wrapper row-column add"
@click="uploadVideo">
<view><text class='iconfont icon-tianjiashipin'></text></view> <view><text class='iconfont icon-tianjiashipin'></text></view>
<view class="text">添加视频</view> <view class="text">添加视频</view>
</view> </view>
<view v-if="formData.image.length < 1" class="pictrue acea-row row-center-wrapper row-column add" <view v-if="formData.image.length < 1"
class="pictrue acea-row row-center-wrapper row-column add"
@click.stop="clk"> @click.stop="clk">
<view><text class='iconfont icon-fengmian'></text></view> <view><text class='iconfont icon-fengmian'></text></view>
<view class="text">添加封面</view> <view class="text">添加封面</view>
@ -51,17 +54,20 @@
<view class="pictrue" v-for="(item, index) in formData.image" :key="index"> <view class="pictrue" v-for="(item, index) in formData.image" :key="index">
<easy-loadimage mode="widthFix" :image-src="item"></easy-loadimage> <easy-loadimage mode="widthFix" :image-src="item"></easy-loadimage>
<text class="cover_text" v-if="tabActive == 2">封面</text> <text class="cover_text" v-if="tabActive == 2">封面</text>
<view class="close_btn" @click="DelPic(index)"><text class="iconfont icon-guanbi4"></text></view> <view class="close_btn" @click="DelPic(index)"><text
class="iconfont icon-guanbi4"></text></view>
</view> </view>
<block v-if="tabActive == 1"> <block v-if="tabActive == 1">
<view v-if="formData.image.length < 6" class="pictrue acea-row row-center-wrapper row-column add" <view v-if="formData.image.length < 6"
class="pictrue acea-row row-center-wrapper row-column add"
@click.stop="clk"> @click.stop="clk">
<view><text class='iconfont icon-icon25201'></text></view> <view><text class='iconfont icon-icon25201'></text></view>
<view class="text">添加图片</view> <view class="text">添加图片</view>
</view> </view>
</block> </block>
<view v-if="showCd" :ratio="16/9" class="container"> <view v-if="showCd" :ratio="16/9" class="container">
<bt-cropper ref="cropper" :imageSrc="imageSrc" @cropEnd="loadImage" :dWidth="800" :compress="true"> <bt-cropper ref="cropper" :imageSrc="imageSrc" @cropEnd="loadImage"
:dWidth="800" :compress="true">
<!-- 你想插入的内容 --> <!-- 你想插入的内容 -->
<button class="crop_btn" @click="crop">裁切</button> <button class="crop_btn" @click="crop">裁切</button>
</bt-cropper> </bt-cropper>
@ -69,13 +75,15 @@
</view> </view>
</view> </view>
<view class="textarea"> <view class="textarea">
<textarea placeholder='分享使用体验和心得,获得更多点赞和关注哦~(600字以内)' name="comment" placeholder-class='placeholder' <textarea placeholder='分享使用体验和心得,获得更多点赞和关注哦~(600字以内)' name="comment"
v-model="formData.content" maxlength="600"></textarea> placeholder-class='placeholder' v-model="formData.content"
maxlength="600"></textarea>
</view> </view>
</view> </view>
<view class="release_item"> <view class="release_item">
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'><text class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})</view> <view class='name'><text
class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})</view>
<view class="select"> <view class="select">
<view class="select_count" @click.stop="addProduct"> <view class="select_count" @click.stop="addProduct">
<text v-if="productList.length == 0" class="text">选择产品</text> <text v-if="productList.length == 0" class="text">选择产品</text>
@ -118,7 +126,8 @@
<!--#endif--> <!--#endif-->
</view> </view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view> <view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx"> <avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx"
selHeight="250upx">
</avatar> </avatar>
<!-- 提到的宝贝弹窗 --> <!-- 提到的宝贝弹窗 -->
<uni-popup ref="associated" type="bottom"> <uni-popup ref="associated" type="bottom">
@ -128,12 +137,16 @@
<uni-popup ref="participateTopic" type="bottom"> <uni-popup ref="participateTopic" type="bottom">
<participate-topic @close="close" @getTopic="getTopic"></participate-topic> <participate-topic @close="close" @getTopic="getTopic"></participate-topic>
</uni-popup> </uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
</authorize>
<!-- <m-tabbar native> <!-- <m-tabbar native>
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
<view class="custom_style"> <view class="custom_style">
<view class="custom_style_icon"></view> <view class="custom_style_icon"></view>
<view class="custom_style-txt" style="color: red;">
发布
</view>
</view> </view>
</template> </template>
</m-tabbar> --> </m-tabbar> -->
@ -142,16 +155,31 @@
<script> <script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import avatar from "@/components/yq-avatar/yq-avatar.vue"; import avatar from "@/components/yq-avatar/yq-avatar.vue";
import associated from '@/components/associated.vue'; import associated from '@/components/associated.vue';
import participateTopic from '@/components/participateTopic.vue'; import participateTopic from '@/components/participateTopic.vue';
import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js'; import {
import { createPlantApi, updatePlantApi, plantDetailApi, orderAssociatePlantApi } from "@/api/community"; TOKENNAME,
import { setStorage, getStorage } from '@/libs/uniApi.js'; HTTP_REQUEST_URL
} from '@/config/app.js';
import {
createPlantApi,
updatePlantApi,
plantDetailApi,
orderAssociatePlantApi
} from "@/api/community";
import {
setStorage,
getStorage
} from '@/libs/uniApi.js';
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import { configMap } from '@/utils'; import {
configMap
} from '@/utils';
import store from '@/store'; import store from '@/store';
export default { export default {
components: { components: {
@ -183,9 +211,16 @@
imgName: "", imgName: "",
upload_max: 50, upload_max: 50,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`, uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
tabList: [ tabList: [{
{ name: '图文', value: 1, icon: 'icon-tuwen' }, name: '图文',
{ name: '视频', value: 2, icon: 'icon-shipin' }, value: 1,
icon: 'icon-tuwen'
},
{
name: '视频',
value: 2,
icon: 'icon-shipin'
},
], ],
tabActive: 1, tabActive: 1,
isPlay: false, isPlay: false,
@ -198,7 +233,9 @@
}, },
computed: { computed: {
...mapGetters(['isLogin', 'viewColor', 'uid']), ...mapGetters(['isLogin', 'viewColor', 'uid']),
...configMap({ community_app_switch: [] }) ...configMap({
community_app_switch: []
})
}, },
watch: { watch: {
// formData:{ // formData:{
@ -218,6 +255,7 @@
// #endif // #endif
}, },
onLoad(options) { onLoad(options) {
// uni.hideTabBar() // uni.hideTabBar()
this.id = options.id; this.id = options.id;
this.order_id = options.order_id; this.order_id = options.order_id;
@ -243,16 +281,17 @@
} }
this.videoContext = uni.createVideoContext("myvideo", this); this.videoContext = uni.createVideoContext("myvideo", this);
}, },
onTabItemTap(){ onTabItemTap() {
this.$refs.associated.close(); this.$refs.associated.close();
this.formData.content='' this.formData.content = ''
this.formData.image=[] this.formData.image = []
this.formData.topic_id='' this.formData.topic_id = ''
this.formData.spu_id='' this.formData.spu_id = ''
this.formData.video_link='' this.formData.video_link = ''
this.productList=[] this.productList = []
this.topicName={} this.topicName = {}
}, },
methods: { methods: {
onLoadFun() { onLoadFun() {
this.isShowAuth = false; this.isShowAuth = false;
@ -291,6 +330,18 @@
if (this.tabActive == item.value) return if (this.tabActive == item.value) return
this.tabActive = item.value this.tabActive = item.value
this.formData.image = [] this.formData.image = []
this.productList = []
/**
* 将对象所有值为空
* */
this.formData = {
image: [],
content: "",
topic_id: "",
spu_id: [],
video_link: "",
}
this.topicName = {}
}, },
/*删除话题*/ /*删除话题*/
deleteTopic() { deleteTopic() {
@ -442,6 +493,10 @@
let that = this let that = this
that.formData.image.splice(index, 1); that.formData.image.splice(index, 1);
}, },
/*删除视频*/
delVideo() {
this.formData.video_link = '';
},
/*添加宝贝*/ /*添加宝贝*/
addProduct() { addProduct() {
this.$refs.associated.open(); this.$refs.associated.open();
@ -508,7 +563,9 @@
}); });
} }
if (!value.category_id || !value.topic_id) { if (!value.category_id || !value.topic_id) {
return that.$util.Tips({ title: '请选择话题' }) return that.$util.Tips({
title: '请选择话题'
})
} }
if (that.id) { if (that.id) {
if (value.relevance.length) { if (value.relevance.length) {
@ -530,19 +587,22 @@
setTimeout(function() { setTimeout(function() {
if (that.tabActive == 2) { if (that.tabActive == 2) {
uni.redirectTo({ uni.navigateTo({
//#ifdef APP //#ifdef APP
url: '/pages/short_video/appSwiper/index?id=' + res.data.community_id + '&user=1&uid=' + url: '/pages/short_video/appSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid that.uid
//#endif //#endif
//#ifndef APP //#ifndef APP
url: '/pages/short_video/nvueSwiper/index?id=' + res.data.community_id + '&user=1&uid=' + url: '/pages/short_video/nvueSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid that.uid
//#endif //#endif
}); });
} else { } else {
uni.redirectTo({ uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + res.data.community_id + '&type=' + that url: '/pages/plantGrass/plant_detail/index?id=' + res.data
.community_id + '&type=' + that
.tabActive .tabActive
}) })
} }
@ -574,19 +634,22 @@
setStorage('addPlant', ''); setStorage('addPlant', '');
setTimeout(function() { setTimeout(function() {
if (that.tabActive == 2) { if (that.tabActive == 2) {
uni.redirectTo({ uni.navigateTo({
//#ifdef APP //#ifdef APP
url: '/pages/short_video/appSwiper/index?id=' + res.data.community_id + '&user=1&uid=' + url: '/pages/short_video/appSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid that.uid
//#endif //#endif
//#ifndef APP //#ifndef APP
url: '/pages/short_video/nvueSwiper/index?id=' + res.data.community_id + '&user=1&uid=' + url: '/pages/short_video/nvueSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid that.uid
//#endif //#endif
}); });
} else { } else {
uni.redirectTo({ uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + res.data.community_id + '&type=' + that url: '/pages/plantGrass/plant_detail/index?id=' + res.data
.community_id + '&type=' + that
.tabActive .tabActive
}) })
} }
@ -617,6 +680,36 @@
page { page {
background: #F5F5F5; background: #F5F5F5;
} }
.custom_style {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
&_icon {
background-image: url('@/static/tabbar_icon/d-a.png');
background-repeat: no-repeat;
background-size: cover;
font-size: 80rpx;
width: 100rpx;
height: 100rpx;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-top: -50rpx;
// 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;
}
}
.crop_btn { .crop_btn {
line-height: 90rpx; line-height: 90rpx;
@ -720,11 +813,11 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 0; z-index: 100;
.iconfont { .iconfont {
color: #ffffff; color: #ffffff;
font-size: 12rpx ; font-size: 12rpx;
} }
} }

View File

@ -162,22 +162,22 @@
<checkbox-group class="select_group flex_start" @change="deliveryWayChange"> <checkbox-group class="select_group flex_start" @change="deliveryWayChange">
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value"> <label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view> <view>
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value)" /> <checkbox :value="val.value" disabled :checked="setFormData.delivery_way.includes(val.value)" />
</view> </view>
<view>{{ val.name }}</view> <view>{{ val.name }}</view>
</label> </label>
</checkbox-group> </checkbox-group>
</view> </view>
<view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item"> <!-- <view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item">
<view class="popup_group_item_label">是否包邮</view> <view class="popup_group_item_label">是否包邮</view>
<view class="popup_group_item_value"> <view class="popup_group_item_value">
<view class="popup_group_item_message"> <view class="popup_group_item_message">
<switch :checked="setFormData.delivery_free == '1'" color="#E93323" <switch :checked="setFormData.delivery_free == '1'" color="#E93323"
style="transform:scale(0.8)" @change="deliveryFreeChange" /> style="transform:scale(0.8)" @change="deliveryFreeChange" disabled="true"/>
</view>
</view> </view>
</view> </view>
</view> -->
<view class="popup_group_item" <view class="popup_group_item"
v-if="setFormData.delivery_way.includes('2') && setFormData.delivery_free == 0" v-if="setFormData.delivery_way.includes('2') && setFormData.delivery_free == 0"
@ -304,7 +304,7 @@
specifica: '', // specifica: '', //
setSpecificaValue: '', // setSpecificaValue: '', //
setSpecificaValue2: '', setSpecificaValue2: '',
delivery_way: [], // 1 2 delivery_way: [1,2], // 1 2
delivery_free: '1', // 0 1 delivery_free: '1', // 0 1
temp_id: '', // ID temp_id: '', // ID
tempName: '' // tempName: '' //

View File

@ -39,11 +39,6 @@
</view> </view>
<view v-if="item.more_thanFlag"> <view v-if="item.more_thanFlag">
<view class="multiSpecifica_container_item">
<view class="multiSpecifica_container_item_label flex-start">库存</view>
<view class="multiSpecifica_container_item_value"><input v-model="item.stock" type="number" placeholder="请填写商品库存" /></view>
</view>
<view class="multiSpecifica_container_item"> <view class="multiSpecifica_container_item">
<view class="multiSpecifica_container_item_label flex-start">商品编号</view> <view class="multiSpecifica_container_item_label flex-start">商品编号</view>
<view class="multiSpecifica_container_item_value"><input v-model="item.bar_code" type="text" placeholder="请填写商品编号" /></view> <view class="multiSpecifica_container_item_value"><input v-model="item.bar_code" type="text" placeholder="请填写商品编号" /></view>
@ -112,12 +107,6 @@
<view class="changePopup_container_content_item_label">原价</view> <view class="changePopup_container_content_item_label">原价</view>
<view class="changePopup_container_content_item_value"><input v-model="batchData.ot_price" type="number" placeholder="0.00" /></view> <view class="changePopup_container_content_item_value"><input v-model="batchData.ot_price" type="number" placeholder="0.00" /></view>
</view> </view>
<view class="changePopup_container_content_item">
<view class="changePopup_container_content_item_label">库存</view>
<view class="changePopup_container_content_item_value"><input v-model="batchData.stock" type="number" placeholder="0.00" /></view>
</view>
<view class="popup_moreThan" @click="popupOpenModel = !popupOpenModel" v-if="!popupOpenModel"> <view class="popup_moreThan" @click="popupOpenModel = !popupOpenModel" v-if="!popupOpenModel">
<text>展开</text> <text>展开</text>
<text class="iconfont">&#xe8ca;</text> <text class="iconfont">&#xe8ca;</text>
@ -182,7 +171,6 @@ export default {
price: '', // price: '', //
cost: '', // cost: '', //
ot_price: '', // ot_price: '', //
stock: '', //
bar_code: '', // bar_code: '', //
weight: '', // weight: '', //
volume: '', // volume: '', //
@ -363,7 +351,6 @@ export default {
price: 0, price: 0,
cost: 0, cost: 0,
ot_price: 0, ot_price: 0,
stock: 0,
bar_code: '', bar_code: '',
weight: 0, weight: 0,
volume: 0, volume: 0,
@ -397,7 +384,6 @@ export default {
price: 0, price: 0,
cost: 0, cost: 0,
ot_price: 0, ot_price: 0,
stock: 0,
bar_code: '', bar_code: '',
weight: 0, weight: 0,
volume: 0, volume: 0,

View File

@ -50,10 +50,39 @@
<view class="video_list"> <view class="video_list">
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link"> <view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
<view class="jiao" @click="deleteImage()"> <view class="jiao" @click="deleteImage()">
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="addGoodsSecoundData.video_link"></video> <video :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png" style=" width:150rpx" ></img>
<!--#endif-->
<image src="../static/images/close.png" mode="widthFix"></image> <image src="../static/images/close.png" mode="widthFix"></image>
</view> </view>
<!--#ifndef APP-PLUS-->
<view style="position: absolute;">
<view class="videoHover" @click="videoshow">
</view> </view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<view class='preview_video'>
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
</view>
<view class="photo" @click="uploadVideo" v-else> <view class="photo" @click="uploadVideo" v-else>
<view> <view>
<image src="../static/images/creamer.png" mode="widthFix"></image> <image src="../static/images/creamer.png" mode="widthFix"></image>
@ -63,7 +92,17 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="showVideo" class="video-count">
<!--#ifndef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop muted :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop
:src='addGoodsSecoundData.video_link && (addGoodsSecoundData.video_link.substring(0,4) == "http" || addGoodsSecoundData.video_link.substring(0,5) == "https") ?addGoodsSecoundData.video_link : "http:" + addGoodsSecoundData.video_link'></video>
<!--#endif-->
</view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
<view class="handle dobuButton"> <view class="handle dobuButton">
<view class="handle_button margin_right" @click="lastStep">上一步</view> <view class="handle_button margin_right" @click="lastStep">上一步</view>
<view class="handle_button" @click="submitCreatedGoods">提交</view> <view class="handle_button" @click="submitCreatedGoods">提交</view>
@ -109,6 +148,7 @@
}, },
data() { data() {
return { return {
showVideo:false,
disModel: false, disModel: false,
upload_max: 10, upload_max: 10,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`, uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
@ -144,6 +184,16 @@
} }
}, },
methods: { methods: {
videoshow() {
this.showVideo = true
this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(() => {
this.videoContext.play();
})
// this.video_link = this.formData.video_link;
// this.videoContext.requestFullScreen({ direction: 90 });
// this.videoContext.play(); this.videoplay = true;
},
initData() { initData() {
let editGoodsDetils = {}; let editGoodsDetils = {};
if (getStorage('goodsDis')) { if (getStorage('goodsDis')) {
@ -199,8 +249,10 @@
video_link: this.addGoodsSecoundData.video_link video_link: this.addGoodsSecoundData.video_link
}; };
if(attrValue){
postData.attrValue = attrValue.filter(item => item != ''); postData.attrValue = attrValue.filter(item => item != '');
postData.attrValue[0].bar_code postData.attrValue[0].bar_code
}
// console.log(postData); // console.log(postData);
if (getStorage('addGoodsFormData').spec_type == 0) { if (getStorage('addGoodsFormData').spec_type == 0) {
// postData.attr = [getStorage('singleSpecification')]; // postData.attr = [getStorage('singleSpecification')];
@ -270,6 +322,8 @@
uni.chooseVideo({ uni.chooseVideo({
sourceType: ['camera', 'album'], sourceType: ['camera', 'album'],
success: res => { success: res => {
console.log(res)
if (Math.ceil(res.size / 1024) < this.upload_max * 1024) { if (Math.ceil(res.size / 1024) < this.upload_max * 1024) {
uni.uploadFile({ uni.uploadFile({
url: this.uploadUrl, // url: this.uploadUrl, //
@ -301,9 +355,11 @@
} }
}, },
fail: err => { fail: err => {
uni.showModal({ //
content: JSON.stringify(err) // uni.showModal({
}); // content: JSON.stringify(err)
// });
console.log(err)
} }
}); });
}, },
@ -357,7 +413,32 @@
} }
} }
} }
.videoHover {
width: 180rpx;
height: 180rpx;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
left: 0;
z-index: 10;
view {
width: 50rpx;
height: 50rpx;
background: #000000;
border-radius: 50rpx;
display: flex;
align-items: center;
justify-content: center;
.iconfont {
color: #ffffff;
font-size: 21rpx;
}
}
}
.photo { .photo {
border: 1px solid #dddddd; border: 1px solid #dddddd;
opacity: 1; opacity: 1;
@ -400,7 +481,10 @@
height: 150rpx; height: 150rpx;
} }
} }
.preview_video{
position: absolute;
}
.container_input { .container_input {
background: #fff; background: #fff;
padding: 0 20rpx; padding: 0 20rpx;
@ -519,7 +603,24 @@
.marginTop_none { .marginTop_none {
margin-top: 0; margin-top: 0;
} }
.video-count {
position: fixed;
width: 600rpx;
height: 500rpx;
top: 50%;
left: 50%;
margin-left: -300rpx;
margin-top: -250rpx;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
.videoLink {
width: 600rpx;
height: 500rpx;
}
}
// .writeBg { // .writeBg {
// background: #fff; // background: #fff;
// } // }

View File

@ -26,7 +26,6 @@
price: '', // price: '', //
cost: '', // cost: '', //
ot_price: '', // ot_price: '', //
stock: '', //
bar_code: '', // bar_code: '', //
weight: '', // weight: '', //
volume: '', // volume: '', //
@ -56,13 +55,6 @@
type: 'digit', type: 'digit',
holder: '请填写原价', holder: '请填写原价',
model: 'ot_price' model: 'ot_price'
},
{
id: 4,
label: '库存',
type: 'number',
holder: '请填写库存',
model: 'stock'
} }
], ],
moreThanList: [ moreThanList: [

View File

@ -8,7 +8,7 @@
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view> <view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view>
<block v-if="images[0].img"> <block v-if="images[0].img">
<u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px"
@click="delImg(0)" mode="aspectFill"></u--image> @click="delImg(0)" mode="aspectFit"></u--image>
</block> </block>
<view v-else class="upload" @click="seleckImage(0)"> <view v-else class="upload" @click="seleckImage(0)">
<view class="iconfont icon-tupian1"></view> <view class="iconfont icon-tupian1"></view>
@ -19,8 +19,8 @@
<view class="avatar_box"> <view class="avatar_box">
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺头像</view> <view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺头像</view>
<block v-if="images[1].img"> <block v-if="images[1].img">
<u--image :showLoading="true" :src="images[1].img" width="210.53rpx" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[1].img" width="210.53rpx" height="210.53rpx"
@click="delImg(1)" mode="aspectFill"></u--image> radius="4px" @click="delImg(1)" mode="aspectFit"></u--image>
</block> </block>
<view v-else class="avatar_img" @click="seleckImage(1)"> <view v-else class="avatar_img" @click="seleckImage(1)">
<view class="iconfont icon-tupian1"></view> <view class="iconfont icon-tupian1"></view>
@ -30,8 +30,8 @@
<view class="zizhi_box"> <view class="zizhi_box">
<view class="text">店铺资质</view> <view class="text">店铺资质</view>
<block v-if="images[3].img"> <block v-if="images[3].img">
<u--image :showLoading="true" :src="images[3].img" width="382.46rpx" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[3].img" width="382.46rpx" height="210.53rpx"
@click="delImg(3)"></u--image> radius="4px" @click="delImg(3)"></u--image>
</block> </block>
<view v-else class="zizhi_img" @click="seleckImage(3)"> <view v-else class="zizhi_img" @click="seleckImage(3)">
<view class="iconfont icon-tupian1"></view> <view class="iconfont icon-tupian1"></view>
@ -54,7 +54,7 @@
<view class="street_bg"> <view class="street_bg">
<view class="text flex_a_c"> <i class="iconfont icon-xinghao"></i> 店铺街背景图</view> <view class="text flex_a_c"> <i class="iconfont icon-xinghao"></i> 店铺街背景图</view>
<block v-if="images[2].img"> <block v-if="images[2].img">
<u--image :showLoading="true" :src="images[2].img" width="388px" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[2].img" width="360px" height="210.53rpx" radius="4px"
@click="delImg(2)"></u--image> @click="delImg(2)"></u--image>
</block> </block>
<view v-else class="street_img flex_a_c" @click="seleckImage(2)"> <view v-else class="street_img flex_a_c" @click="seleckImage(2)">
@ -72,9 +72,9 @@
<view class="flex_a_c"> <view class="flex_a_c">
<text class="sub_title">配送方式</text> <text class="sub_title">配送方式</text>
<view class="flex"> <view class="flex">
<checkbox-group name="" @change="checkboxChange"> <checkbox-group name="" @change="checkboxChange" >
<checkbox :checked="isZiti" :value="check.ziti" /><text class="text ziti">到店自提(加入供应链)</text> <checkbox disabled='true' :checked="isZiti" :value="check.ziti" /><text class="text ziti">到店自提(加入供应链)</text>
<checkbox :checked="isKuaidi" :value="check.kuaidi" /><text class="text">快递配送</text> <checkbox disabled='true' :checked="isKuaidi" :value="check.kuaidi" /><text class="text">快递配送</text>
</checkbox-group> </checkbox-group>
</view> </view>
</view> </view>
@ -83,7 +83,7 @@
</view> </view>
</view> </view>
<block > <block>
<view class="item_cell flex_a_c"> <view class="item_cell flex_a_c">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>详细地址</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>详细地址</view>
<input class="com_input" type="text" v-model="mer_address" placeholder="输入商户地址"> <input class="com_input" type="text" v-model="mer_address" placeholder="输入商户地址">
@ -107,9 +107,11 @@
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>店铺营业时间:</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>店铺营业时间:</view>
<view class="bus_time flex_a_c"> <view class="bus_time flex_a_c">
<view class="select" @click="beginTimeShow = true">{{ mer_take_time[0] ? mer_take_time[0] : '选择开始时间' }}</view> <view class="select" @click="beginTimeShow = true">
{{ mer_take_time[0] ? mer_take_time[0] : '选择开始时间' }}</view>
<view class="select" @click="overTimeShow = true">{{ mer_take_time[1] ? mer_take_time[1] : '选择结束时间' }}</view> <view class="select" @click="overTimeShow = true">
{{ mer_take_time[1] ? mer_take_time[1] : '选择结束时间' }}</view>
</view> </view>
</block> </block>
</view> </view>
@ -118,6 +120,10 @@
<view class="headline"> <view class="headline">
<view class="text flex_a_c">商户信息配置</view> <view class="text flex_a_c">商户信息配置</view>
</view> </view>
<view class="item_cell flex_a_c">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>商户名称</view>
<input class="com_input" type="text" v-model="mer_name" disabled placeholder="输入商户名称">
</view>
<view class="item_cell flex_a_c"> <view class="item_cell flex_a_c">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>商户简介</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>商户简介</view>
<input class="com_input" type="text" v-model="intro" placeholder="输入商户简介"> <input class="com_input" type="text" v-model="intro" placeholder="输入商户简介">
@ -126,6 +132,21 @@
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>客服电话</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>客服电话</view>
<input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话"> <input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话">
</view> </view>
<!-- <view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" >
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao" v-if="credit_buy"></i>开启先货后款</view>
<u-switch v-model="credit_buy" @change="change"></u-switch>
</view> -->
<view class="item_cell flex_a_c" v-if="credit_buy">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算周期</view>
<input type="number" v-model="settle_cycle" placeholder="请输入 /周期单位为:天">
</view>
<view class="remarks" v-if="credit_buy">*周期结算时间范围为:15~90 周期单位为:</view>
<view class="item_cell flex_a_c" v-if="credit_buy">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算利率</view>
<input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %">
</view>
<!-- <view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> -->
<!-- <view class="item_cell"> <!-- <view class="item_cell">
<view class="if_btn flex_a_c_j_sb"> <view class="if_btn flex_a_c_j_sb">
<text class="sub_title">是否开启商户</text> <text class="sub_title">是否开启商户</text>
@ -134,22 +155,32 @@
<text style="color: #CCCCCC;">开启后店铺即可展示在移动端</text> <text style="color: #CCCCCC;">开启后店铺即可展示在移动端</text>
</view> --> </view> -->
</view> </view>
<button class="submit_btn l_center" @click="postMerchantUpdata">提交审核</button> <button class="submit_btn l_center" @click="postMerchantUpdata">提交审核</button>
<u-datetime-picker :show="beginTimeShow" v-model="mer_take_time[0]" mode="time" @close="beginTimeShow = false" <u-datetime-picker :show="beginTimeShow" v-model="mer_take_time[0]" mode="time" @close="beginTimeShow = false"
:closeOnClickOverlay="true" @cancel="beginTimeShow = false" @confirm="beginTimeShow = false"></u-datetime-picker> :closeOnClickOverlay="true" @cancel="beginTimeShow = false"
@confirm="beginTimeShow = false"></u-datetime-picker>
<u-datetime-picker :show="overTimeShow" v-model="mer_take_time[1]" mode="time" @close="overTimeShow = false" <u-datetime-picker :show="overTimeShow" v-model="mer_take_time[1]" mode="time" @close="overTimeShow = false"
:closeOnClickOverlay="true" @cancel="overTimeShow = false" @confirm="overTimeShow = false"></u-datetime-picker> :closeOnClickOverlay="true" @cancel="overTimeShow = false"
@confirm="overTimeShow = false"></u-datetime-picker>
</view> </view>
</template> </template>
<script> <script>
import { Toast } from '@/libs/uniApi.js' import {
import { merchantUpdateAPI, merchantInfoAPI } from "@/api/product" Toast
import { uploads } from '@/api/upload.js' } from '@/libs/uniApi.js'
import {
merchantUpdateAPI,
merchantInfoAPI
} from "@/api/product"
import {
uploads
} from '@/api/upload.js'
export default { export default {
data() { data() {
return { return {
@ -170,7 +201,15 @@
text: '闪光强烈' text: '闪光强烈'
} }
], ],
images: [{ img: '' }, { img: '' }, { img: '' }, { img: '' }], images: [{
img: ''
}, {
img: ''
}, {
img: ''
}, {
img: ''
}],
storeBg: '', storeBg: '',
check: { check: {
ziti: '1', ziti: '1',
@ -178,7 +217,7 @@
}, },
isZiti: false, isZiti: false,
isKuaidi: false, isKuaidi: false,
delivery_way: [], delivery_way: [1,2],
takeName: '', takeName: '',
takePhone: '', takePhone: '',
servicePhone: '', servicePhone: '',
@ -224,17 +263,27 @@
overTimeShow: false, overTimeShow: false,
mer_address: '', mer_address: '',
id: '', id: '',
mer_certificate: '' mer_certificate: '',
credit_buy: false, //
interest_rate: '', //
settle_cycle: '', //
mer_name:'',
type_code:''
} }
}, },
onLoad(e) { onLoad(e) {
this.id = e.mer_id this.id = e.mer_id
this.getMerchantInfo(e.mer_id) this.getMerchantInfo(e.mer_id)
this.isZiti = true
this.isKuaidi = true
}, },
onShow() {}, onShow() {},
methods: { methods: {
getMerchantInfo(id) { getMerchantInfo(id) {
merchantInfoAPI({ id }).then(res => { merchantInfoAPI({
id
}).then(res => {
console.log(res); console.log(res);
this.images[0].img = res.data.mer_banner this.images[0].img = res.data.mer_banner
this.images[1].img = res.data.mer_avatar this.images[1].img = res.data.mer_avatar
@ -252,12 +301,26 @@
res.data.mer_take_day.forEach((item, i) => { res.data.mer_take_day.forEach((item, i) => {
this.dateWeek[Number(item) - 1].isCheck = true this.dateWeek[Number(item) - 1].isCheck = true
}) })
this.type_code= res.data.type_code
this.mer_take_time = res.data.mer_take_time this.mer_take_time = res.data.mer_take_time
this.intro = res.data.mer_info this.intro = res.data.mer_info
this.cruxText = res.data.mer_keyword this.cruxText = res.data.mer_keyword
this.mer_name= res.data.mer_name
this.servicePhone = res.data.service_phone this.servicePhone = res.data.service_phone
this.mer_address = res.data.mer_address this.mer_address = res.data.mer_address
this.merState = res.data.mer_state === 1 ? true : false this.merState = res.data.mer_state === 1 ? true : false
this.credit_buy = res.data.credit_buy === 1 ? true : false
if (res.data.settle_cycle == 0) {
this.settle_cycle = ''
} else {
this.settle_cycle = res.data.settle_cycle
}
if (res.data.interest_rate == 0) {
this.interest_rate = ''
} else {
this.interest_rate = res.data.interest_rate
}
// console.log('res', res.data); // console.log('res', res.data);
}).catch(err => { }).catch(err => {
// console.log('err', err); // console.log('err', err);
@ -266,6 +329,11 @@
checkboxChange(val) { checkboxChange(val) {
this.delivery_way = val.detail.value this.delivery_way = val.detail.value
}, },
//
change(e) {
this.credit_buy = e
console.log(e);
},
// //
sel(item, i) { sel(item, i) {
if (item.isCheck == false) { if (item.isCheck == false) {
@ -287,6 +355,16 @@
}) })
}, },
submitData() { submitData() {
if (this.settle_cycle < 15) {
this.settle_cycle = 15
} else if (this.settle_cycle > 90) {
this.settle_cycle = 90
}
if (this.interest_rate < 0.01) {
this.interest_rate = 0.01
} else if (this.interest_rate > 0.1) {
this.interest_rate = 0.1
}
let data = { let data = {
mer_banner: this.images[0].img, mer_banner: this.images[0].img,
mer_avatar: this.images[1].img, mer_avatar: this.images[1].img,
@ -308,7 +386,10 @@
mer_state: this.merState ? '1' : '0', mer_state: this.merState ? '1' : '0',
type: '2', type: '2',
uploadedqualifications: '', uploadedqualifications: '',
id: this.id id: this.id,
credit_buy: this.credit_buy,
settle_cycle: this.settle_cycle,
interest_rate: this.interest_rate
} }
merchantUpdateAPI(data).then(res => { merchantUpdateAPI(data).then(res => {
Toast(res.message) Toast(res.message)
@ -325,12 +406,14 @@
}) })
}, },
selfLocation() { selfLocation() {
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'wgs84',
success: (res) => { success: (res) => {
// console.log(res);
this.latitude = res.latitude.toString(); this.latitude = res.latitude.toString();
this.longitude = res.longitude.toString(); this.longitude = res.longitude.toString();
this.longLati = `${res.longitude},${res.longitude}` this.longLati = `${res.latitude},${res.longitude}`
}, },
fail: (err) => { fail: (err) => {
Toast(err) Toast(err)
@ -345,7 +428,9 @@
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: function(res) { success: function(res) {
console.log(res); console.log(res);
uni.showLoading({ title: '上传中...' }) uni.showLoading({
title: '上传中...'
})
uploads(res.tempFilePaths[0], 'img').then(res => { uploads(res.tempFilePaths[0], 'img').then(res => {
that.images[i].img = res that.images[i].img = res
uni.hideLoading() uni.hideLoading()
@ -555,6 +640,12 @@
color: #CCCCCC; color: #CCCCCC;
} }
.remarks {
margin-left: 20px;
font-size: 24.56rpx;
color: #CCCCCC;
}
.long_lat { .long_lat {
margin: 31.58rpx 0; margin: 31.58rpx 0;
width: 100%; width: 100%;

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
<template> <template>
<view class="container"> <view class="container">
<!-- <!--
注意:这是 App 所用页面,请勿引入微信小程序或浏览器运行,最好运行在真机 注意:这是 App 所用页面,请勿引入微信小程序或浏览器运行,最好运行在真机
@ -20,7 +21,7 @@
--> -->
<!-- 头部导航 --> <!-- 头部导航 -->
<view v-if="!isUser" class="header"> <!-- <view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#000'}" >
<view class="items" @click.stop="navTap(2)"> <view class="items" @click.stop="navTap(2)">
<text class="tName" :class="currentNav==2?'on':''">关注</text> <text class="tName" :class="currentNav==2?'on':''">关注</text>
</view> </view>
@ -30,13 +31,13 @@
<view class="items" @click.stop="navTap(3)"> <view class="items" @click.stop="navTap(3)">
<text class="tName" :class="currentNav==3?'on':''">列表</text> <text class="tName" :class="currentNav==3?'on':''">列表</text>
</view> </view>
</view> </view> -->
<view class="noVideo acea-row row-center-wrapper" v-if="!dataList.length && !loadVideo"> <!-- <view class="noVideo acea-row row-center-wrapper" v-if="!dataList.length && !loadVideo">
<view> <view>
<image :src="imgHost+'/static/no-video.png'" class="pictrue"></image> <image :src="imgHost+'/static/no-video.png'" class="pictrue"></image>
<text class="tips">暂无短视频内容哦~</text> <text class="tips">暂无短视频内容哦~</text>
</view> </view>
</view> </view> -->
<view v-if="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'"> <view v-if="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
<!-- <!--
1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view 1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view
@ -47,9 +48,9 @@
1Mac按住 option 键,然后点击方法名,即可跳转到方法 1Mac按住 option 键,然后点击方法名,即可跳转到方法
2windows按住 Alt 键,然后鼠标左击,即可跳转到方法 2windows按住 Alt 键,然后鼠标左击,即可跳转到方法
--> -->
<list @loadmore="getData" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false" ref="listBox" <list @loadmore="getData" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false"
:pagingEnabled="true" :scrollable="true"> ref="listBox" :pagingEnabled="true" :scrollable="true">
<!-- 刷新模块 -->
<refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown" <refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
:display="refreshing ? 'show' : 'hide'"> :display="refreshing ? 'show' : 'hide'">
<loading style="background-color: #FFFFFF;"> <loading style="background-color: #FFFFFF;">
@ -63,7 +64,7 @@
<!-- 用div把视频模组套起来 --> <!-- 用div把视频模组套起来 -->
<div :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'"> <div :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
<!-- <view v-if="Math.abs(k-i)<=1"> --> <!-- <view v-if="Math.abs(k-i)<=1"> -->
<view v-if="max > i"> <view v-if="Math.abs(k-i)<=1">
<view class="root"> <view class="root">
<!-- <!--
具体视频参数可以参考官方文档 具体视频参数可以参考官方文档
@ -94,15 +95,17 @@
6在 timeupdate 方法里加入if(index == this.k){把里面的加一个总的判断} 6在 timeupdate 方法里加入if(index == this.k){把里面的加一个总的判断}
3.其他的下面有详解 3.其他的下面有详解
--> -->
<video :ref="'item'+i" :id="item.community_id" :loop="true" :autoplay="i == k" :src="item.video_link" <video :ref="'item'+i" :id="item.community_id" :loop="true" :autoplay="i == k"
:muted="item.isplay" :enable-progress-gesture="false" :page-gesture="false" :controls="false" :src="item.video_link" :muted="item.isplay" :enable-progress-gesture="false"
:show-loading="true" :show-fullscreen-btn="false" :show-center-play-btn="false" :style="boxStyle" :page-gesture="false" :controls="false" :show-loading="true"
:show-fullscreen-btn="false" :show-center-play-btn="false" :style="boxStyle"
:object-fit="object_fit" @timeupdate="timeupdate($event,i)"></video> :object-fit="object_fit" @timeupdate="timeupdate($event,i)"></video>
</view> </view>
<!-- 直接用 view 就行了,一样是可以覆盖原生组件的 --> <!-- 直接用 view 就行了,一样是可以覆盖原生组件的 -->
<!-- 这个是暂停时出现的图标 --> <!-- 这个是暂停时出现的图标 -->
<view class="videoHover" @click="tapVideoHover(item.state,$event)" :style="boxStyle"> <view class="videoHover" @click="tapVideoHover(item.state,$event)" :style="boxStyle">
<image v-if="item.state=='pause'" class="playState" src="../static/img/index/play.png"></image> <image v-if="item.state=='pause'" class="playState" src="../static/img/index/play.png">
</image>
</view> </view>
<!--审核状态--> <!--审核状态-->
<view v-if="item.status==-1 || item.status==0 || item.status==-2" class="video-status"> <view v-if="item.status==-1 || item.status==0 || item.status==-2" class="video-status">
@ -137,19 +140,23 @@
</view> </view>
</view> </view>
<view v-if="item.relevance.length > 0 && k==i" class="product"> <view v-if="item.relevance.length > 0 && k==i" class="product">
<scroll-view class="scroll-view" scroll-x="true" style="white-space: nowrap; display: flex;" <scroll-view class="scroll-view" scroll-x="true"
scroll-with-animation show-scrollbar="true"> style="white-space: nowrap; display: flex;" scroll-with-animation
show-scrollbar="true">
<view class="product-item" v-for="(goods,idx) in item.relevance" :key="idx"> <view class="product-item" v-for="(goods,idx) in item.relevance" :key="idx">
<view v-if="goods.spu" class="item-count acea-row" @click="goDetail(goods.spu)"> <view v-if="goods.spu" class="item-count acea-row"
@click="goDetail(goods.spu)">
<view class="picture"> <view class="picture">
<image class="image" :src="goods.spu.image"></image> <image class="image" :src="goods.spu.image"></image>
</view> </view>
<view class="product-text"> <view class="product-text">
<text class="name line1" <text class="name line1"
v-if="goods.spu && goods.spu.store_name.length>=12">{{goods.spu.store_name.slice(0,12)}}...</text> v-if="goods.spu && goods.spu.store_name.length>=12">{{goods.spu.store_name.slice(0,12)}}...</text>
<text class="name line1" v-else>{{goods.spu && goods.spu.store_name}}</text> <text class="name line1"
v-else>{{goods.spu && goods.spu.store_name}}</text>
<view class="product-price"> <view class="product-price">
<view class="price"><text class="sm">¥</text><text class="money">{{goods.spu.price}}</text> <view class="price"><text class="sm">¥</text><text
class="money">{{goods.spu.price}}</text>
</view> </view>
<text class="buy-btn">购买</text> <text class="buy-btn">购买</text>
</view> </view>
@ -170,30 +177,36 @@
<!-- 1.头像 --> <!-- 1.头像 -->
<navigator v-if="userInfo.uid != item.author.uid" hover-class="none" <navigator v-if="userInfo.uid != item.author.uid" hover-class="none"
:url="'/pages/plantGrass/plant_user/index?id='+item.uid" class="pictrue"> :url="'/pages/plantGrass/plant_user/index?id='+item.uid" class="pictrue">
<image class="userAvatar" :src="item.author.avatar || '/static/images/f.png'" mode="aspectFill"> <image class="userAvatar" :src="item.author.avatar || '/static/images/f.png'"
mode="aspectFit">
</image> </image>
<view v-if="!item.is_fans || userInfo.uid == 0" class="guanzhu" @click.stop="followAuthor(item)"><text <view v-if="!item.is_fans || userInfo.uid == 0" class="guanzhu"
@click.stop="followAuthor(item)"><text
class="iconfont icon-shangpinshuliang-jia">+</text></view> class="iconfont icon-shangpinshuliang-jia">+</text></view>
<view v-else class="yiguanzhu"><text class="iconfont"></text></view> <view v-else class="yiguanzhu"><text class="iconfont"></text></view>
</navigator> </navigator>
<!-- 2.点赞 --> <!-- 2.点赞 -->
<view @click="cLike(item);" style="margin-top: 5px;" :class="{'likeNumActive':item.relevance_id}"> <view @click="cLike(item);" style="margin-top: 5px;"
<image v-if="item.relevance_id" src="../static/img/index/xin.png" style="width: 32px; height: 32px;"> :class="{'likeNumActive':item.relevance_id}">
<image v-if="item.relevance_id" src="../static/img/index/xin.png"
style="width: 32px; height: 32px;">
</image> </image>
<image v-if="!item.relevance_id" src="../static/img/index/xin-2.png" <image v-if="!item.relevance_id" src="../static/img/index/xin-2.png"
style="width: 32px; height: 32px;"></image> style="width: 32px; height: 32px;"></image>
<text class="info-text">{{item.count_start > 0 ? item.count_start : '点赞'}}</text> <text class="info-text">{{item.count_start > 0 ? item.count_start : '点赞'}}</text>
</view> </view>
<!-- 3.评论 --> <!-- 3.评论 -->
<view v-if="community_reply_status == 1 && item.status == 1" class="comment" @click="toComment(item,i)" <view v-if="community_reply_status == 1 && item.status == 1" class="comment"
style="margin-top: 18px;"> @click="toComment(item,i)" style="margin-top: 18px;">
<image src="../static/img/index/evaluate.png" style="width: 54rpx; height: 50rpx;"></image> <image src="../static/img/index/evaluate.png" style="width: 54rpx; height: 50rpx;">
</image>
<text class="info-text">{{item.count_reply>0 ? item.count_reply : '评论'}}</text> <text class="info-text">{{item.count_reply>0 ? item.count_reply : '评论'}}</text>
</view> </view>
<!-- 4.分享 --> <!-- 4.分享 -->
<view v-if="item.status == 1" @click="appShare('WXSceneSession',item.community_id)" <view v-if="item.status == 1" @click="appShare('WXSceneSession',item.community_id)"
style="margin-top: 17px;"> style="margin-top: 17px;">
<image src="../static/img/index/share-fill.png" style="width: 40px; height: 40px;"></image> <image src="../static/img/index/share-fill.png" style="width: 40px; height: 40px;">
</image>
<text class="info-text">分享</text> <text class="info-text">分享</text>
</view> </view>
<!-- 5.自己的视频 --> <!-- 5.自己的视频 -->
@ -216,12 +229,15 @@
<view v-if="showManage" class="manage"> <view v-if="showManage" class="manage">
<view class="manage-gou"></view> <view class="manage-gou"></view>
<navigator hover-class="none" <navigator hover-class="none"
:url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'" class="items"> :url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'"
<image src="../static/img/index/video-edit.png" style="width: 16px; height: 16px;"></image> class="items">
<image src="../static/img/index/video-edit.png" style="width: 16px; height: 16px;">
</image>
<text class="text">编辑</text> <text class="text">编辑</text>
</navigator> </navigator>
<view class="items" @click.stop="deleteTopic(item)"> <view class="items" @click.stop="deleteTopic(item)">
<image src="../static/img/index/video-delete.png" style="width: 16px; height: 16px;"></image> <image src="../static/img/index/video-delete.png"
style="width: 16px; height: 16px;"></image>
<text class="text">删除</text> <text class="text">删除</text>
</view> </view>
</view> </view>
@ -232,7 +248,8 @@
--> -->
<!-- 3.阿里云视频截帧地址https://help.aliyun.com/document_detail/64555.html --> <!-- 3.阿里云视频截帧地址https://help.aliyun.com/document_detail/64555.html -->
<image v-if="item.isShowimage == true" <image v-if="item.isShowimage == true"
:src="item.src+'?x-oss-process=video/snapshot,t_'+ currenttimes +'000,f_jpg'" mode="aspectFill" :src="item.src+'?x-oss-process=video/snapshot,t_'+ currenttimes +'000,f_jpg'"
mode="aspectFit"
:style="'width: 120upx; height: 160upx; border-radius: 10upx; position: absolute; bottom: '+ (ProgressBarBottom + 160) +'upx; left: '+ (currentPositions - 15) +'px;'"> :style="'width: 120upx; height: 160upx; border-radius: 10upx; position: absolute; bottom: '+ (ProgressBarBottom + 160) +'upx; left: '+ (currentPositions - 15) +'px;'">
</image> </image>
</view> </view>
@ -241,22 +258,25 @@
</list> </list>
</view> </view>
<waterfall class="video-list" v-if="currentNav === 3" column-gap="6" column-count="2" :show-scrollbar="false" @loadmore="getGoods()" <waterfall class="video-list" v-if="currentNav === 3" column-gap="6" column-count="2" :show-scrollbar="false"
column-width="195px" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'" > @loadmore="getGoods()" column-width="195px"
:style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
<cell class="goods_item" style="margin-bottom: 10px;" v-for="(item,index) in cateGoods" :key="item.uid" <cell class="goods_item" style="margin-bottom: 10px;" v-for="(item,index) in cateGoods" :key="item.uid"
@click="gogogo(item)" > @click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image> <image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
<view class="botm"> <view class="botm">
<text class="title">{{item.title}}</text> <text class="title">{{item.title}}</text>
<view class="goods_info"> <view class="goods_info">
<view class="l_info"> <view class="l_info">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill" <image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFit"
class="g_img"></image> class="g_img"></image>
<text class="g_name">{{item.author && item.author.nickname}}</text> <text class="g_name">{{item.author && item.author.nickname}}</text>
</view> </view>
<view class="nice_box flex_a_c" @click.stop="giveStart(item)"> <view class="nice_box flex_a_c" @click.stop="giveStart(item)">
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text> <text class="iconfont"
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text class="collect">{{item.count_start}}</text> <text class="collect">{{item.count_start}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -307,9 +327,15 @@
<script> <script>
const app = getApp(); const app = getApp();
let sysHeight = uni.getSystemInfoSync().statusBarHeight let sysHeight = uni.getSystemInfoSync().statusBarHeight
import { toLogin } from '@/libs/login.js'; import {
import { mapGetters } from 'vuex'; toLogin
import { configMap } from '@/utils'; } from '@/libs/login.js';
import {
mapGetters
} from 'vuex';
import {
configMap
} from '@/utils';
/* /*
引入评论组件 引入评论组件
*/ */
@ -317,6 +343,7 @@
import mentioned from '../components/mentioned/mentioned.vue' import mentioned from '../components/mentioned/mentioned.vue'
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { import {
deoList,
videoList, videoList,
myVideoList, myVideoList,
graphicStartApi, graphicStartApi,
@ -325,10 +352,17 @@
focusArticleLst, focusArticleLst,
graphicLstApi graphicLstApi
} from '@/api/community.js'; } from '@/api/community.js';
import { HTTP_REQUEST_URL } from '@/config/app.js'; import {
import { getUserInfo } from '@/api/user.js'; HTTP_REQUEST_URL
} from '@/config/app.js';
import {
getUserInfo
} from '@/api/user.js';
export default { export default {
computed: configMap({ statusBarHeight: 0, community_reply_status: 0 }, mapGetters(['isLogin', 'uid'])), computed: configMap({
statusBarHeight: 0,
community_reply_status: 0
}, mapGetters(['isLogin', 'uid'])),
data() { data() {
return { return {
imgHost: HTTP_REQUEST_URL, imgHost: HTTP_REQUEST_URL,
@ -387,7 +421,9 @@
currentNav: 1, currentNav: 1,
limit: 6, limit: 6,
page: 1, page: 1,
userInfo: { uid: 0 }, userInfo: {
uid: 0
},
moreList: [], moreList: [],
isShowAuth: false, //是否隐藏授权 isShowAuth: false, //是否隐藏授权
isAuto: false, //没有授权的不会自动授权 isAuto: false, //没有授权的不会自动授权
@ -452,12 +488,12 @@
// console.log('到后台'); // console.log('到后台');
}, },
onLoad(options) { onLoad(options) {
console.log(options);
this.videoID = options.id || 0; this.videoID = options.id || 0;
this.isUser = options.user == 1 ? true : false; this.isUser = options.user == 1 ? true : false;
this.userUid = options.uid ? options.uid : 0; this.userUid = options.uid ? options.uid : 0;
this.isSatrt = options.tab == 1 ? 1 : 0; this.isSatrt = options.tab == 1 ? 1 : 0;
if (options.pid) app.globalData.spid = options.pid; // if (options.pid) app.globalData.spid = options.pid;
// console.log('到后台'); // console.log('到后台');
this.platform = uni.getSystemInfoSync().platform this.platform = uni.getSystemInfoSync().platform
this.windowWidth = uni.getSystemInfoSync().screenWidth //获取屏幕宽度 this.windowWidth = uni.getSystemInfoSync().screenWidth //获取屏幕宽度
@ -465,7 +501,7 @@
this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度 this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
this.boxStyle.height = this.wHeight; //改变视频高度 this.boxStyle.height = this.wHeight; //改变视频高度
this.get() //这一步,加载视频数据 this.get() //这一步,加载视频数据
if (this.isLogin) this.getUserInfo() // if (this.isLogin) this.getUserInfo()
}, },
onReady() {}, onReady() {},
methods: { methods: {
@ -558,6 +594,7 @@
} }
}); });
}, },
// #endif // #endif
/** /**
* 获取个人用户信息 * 获取个人用户信息
@ -575,7 +612,9 @@
this.isShowAuth = true this.isShowAuth = true
} else { } else {
let status = 1 let status = 1
followAuthorApi(item.uid, { status: status }).then(res => { followAuthorApi(item.uid, {
status: status
}).then(res => {
if (res.status === 200) { if (res.status === 200) {
item.is_fans = true item.is_fans = true
} }
@ -605,7 +644,8 @@
}); });
setTimeout(function() { setTimeout(function() {
uni.redirectTo({ uni.redirectTo({
url: '/pages/plantGrass/plant_user/index?id=' + item.uid url: '/pages/plantGrass/plant_user/index?id=' +
item.uid
}) })
}, 1000); }, 1000);
} }
@ -621,7 +661,7 @@
this.isShowAuth = false this.isShowAuth = false
this.getUserInfo() this.getUserInfo()
}, },
// 授权关闭 //授权关闭
authColse: function(e) { authColse: function(e) {
this.isShowAuth = e this.isShowAuth = e
}, },
@ -649,37 +689,44 @@
getData() { getData() {
// 这里就是数据加载完以后再向后端发送数据的地方, // 这里就是数据加载完以后再向后端发送数据的地方,
let that = this; let that = this;
if (!that.loadVideo) return // if (!that.loadVideo) return
that.loadVideo = true // that.loadVideo = true
that.isUser ? // '
myVideoList(that.userUid, { // deoList(that.videoID).then(res => {
// that.loadVideo = false
// that.getVideoData([res.data]);
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })'
// that.isUser ?
videoList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
is_star: that.isSatrt, id: this.videoID
community_id: that.videoID
}).then(res => {
that.loadVideo = false
that.getVideoData(res.data.list);
}).catch(err => {
return uni.showToast({
title: err,
icon: 'none',
duration: 2000
});
}) :
graphicLstApi({
page: that.page,
limit: that.limit,
category_id: -1
}).then(res => { }).then(res => {
that.getVideoData(res.data.list); that.getVideoData(res.data.list);
}).catch(err => {
return uni.showToast({
title: err,
icon: 'none',
duration: 2000
});
}) })
//:
// graphicLstApi({
// page: that.page,
// limit: that.limit,
// category_id: -1
// }).then(res => {
// that.getVideoData(res.data.list);
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
}, },
getFocusList() { getFocusList() {
let that = this; let that = this;
@ -698,16 +745,18 @@
}) })
}, },
getVideoData(list) { getVideoData(list) {
if (list.length == 0) return if (list.length == 0) return
let that = this; let that = this;
that.loadVideo = list.length == that.limit that.loadVideo = list.length == that.limit
that.page = that.page + 1; that.page = that.page + 1
var msg = list var msg = list
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
msg[i]['isMore'] = false msg[i]['isMore'] = false
msg[i]['community_id'] = msg[i]['community_id'].toString() msg[i]['community_id'] = msg[i]['community_id'].toString()
that.dataList.push(msg[i]) that.dataList.push(msg[i])
} }
if (that.dataList.length !== 0) { if (that.dataList.length !== 0) {
that.dataList[that.k].state = 'play'; that.dataList[that.k].state = 'play';
setTimeout(function() { setTimeout(function() {
@ -830,17 +879,12 @@
get() { get() {
// if(!this.loadVideo) return // if(!this.loadVideo) return
this.loadVideo = true this.loadVideo = true
// 这个方法主要就是用来第一次进入视频播放时用来处理的 // 这个方法主要就是用来第一次进入视频播放时用来处理
this.isUser ? deoList(this.videoID).then(async (res) => {
myVideoList(this.userUid, {
page: this.page,
limit: this.limit,
is_star: this.isSatrt,
community_id: this.videoID
}).then(async (res) => {
this.loadVideo = false this.loadVideo = false
this.userUid = res.data.uid
this.page = this.page + 1; this.page = this.page + 1;
var msg = res.data.list; var msg = [res.data];
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
msg[i]['isMore'] = false msg[i]['isMore'] = false
msg[i]['playIng'] = false msg[i]['playIng'] = false
@ -850,6 +894,7 @@
msg[i]['community_id'] = msg[i]['community_id'].toString() msg[i]['community_id'] = msg[i]['community_id'].toString()
} }
this.dataList = msg; this.dataList = msg;
if (this.dataList.length !== 0) { if (this.dataList.length !== 0) {
this.dataList[this.k].state = 'play'; this.dataList[this.k].state = 'play';
uni.createVideoContext(this.dataList[this.k].community_id, this).play() uni.createVideoContext(this.dataList[this.k].community_id, this).play()
@ -860,29 +905,62 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
}) :
graphicLstApi({
page: this.page,
limit: this.limit,
category_id: -1
}).then(async (res) => {
this.page = this.page + 1;
var msg = res.data.list;
for (let i = 0; i < msg.length; i++) {
msg[i]['isMore'] = false
msg[i]['playIng'] = false
msg[i]['state'] = false
msg[i]['isplay'] = false
msg[i]['community_id'] = msg[i]['community_id'].toString()
}
this.dataList = msg;
}).catch(err => {
return uni.showToast({
title: err,
icon: 'none',
duration: 2000
});
}) })
// this.isUser ?
// myVideoList(this.userUid, {
// page: this.page,
// limit: this.limit,
// is_star: this.isSatrt,
// community_id: this.videoID
// }).then(async (res) => {
// this.loadVideo = false
// this.page = this.page + 1;
// var msg = res.data.list;
// for (let i = 0; i < msg.length; i++) {
// msg[i]['isMore'] = false
// msg[i]['playIng'] = false
// msg[i]['state'] = false
// msg[i]['isplay'] = false
// msg[i]['loading'] = false
// msg[i]['community_id'] = msg[i]['community_id'].toString()
// }
// this.dataList = msg;
// if (this.dataList.length !== 0) {
// this.dataList[this.k].state = 'play';
// uni.createVideoContext(this.dataList[this.k].community_id, this).play()
// }
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// }) :
// graphicLstApi({
// page: this.page,
// limit: this.limit,
// category_id: -1
// }).then(async (res) => {
// this.page = this.page + 1;
// var msg = res.data.list;
// for (let i = 0; i < msg.length; i++) {
// msg[i]['isMore'] = false
// msg[i]['playIng'] = false
// msg[i]['state'] = false
// msg[i]['isplay'] = false
// msg[i]['community_id'] = msg[i]['community_id'].toString()
// }
// this.dataList = msg;
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
}, },
onpullingdown() { onpullingdown() {
this.refreshing = true this.refreshing = true
@ -939,7 +1017,9 @@
this.isShowAuth = true this.isShowAuth = true
} else { } else {
let status = item.relevance_id ? 0 : 1 let status = item.relevance_id ? 0 : 1
graphicStartApi(item.community_id, { status: status }).then(res => { graphicStartApi(item.community_id, {
status: status
}).then(res => {
if (item.relevance_id) { if (item.relevance_id) {
item.count_start--; item.count_start--;
item.count_start = item.count_start == 0 ? 0 : item.count_start item.count_start = item.count_start == 0 ? 0 : item.count_start
@ -1037,13 +1117,14 @@
padding-top: 200rpx; padding-top: 200rpx;
/* #endif */ /* #endif */
background-color: #000000; background-color: #000000;
background-color: #F5F5F5;
.goods_item { .goods_item {
width: 342.11rpx; width: 342.11rpx;
height: 491.23rpx; height: 491.23rpx;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
background-color: #000; // background-color: #000;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-bottom: 10px; padding-bottom: 10px;
@ -1158,6 +1239,7 @@
top: 70rpx; top: 70rpx;
height: 86rpx; height: 86rpx;
.icon-xiangzuo { .icon-xiangzuo {
margin-left: 10px; margin-left: 10px;
width: 20px; width: 20px;
@ -1170,17 +1252,17 @@
position: fixed; position: fixed;
z-index: 9; z-index: 9;
width: 750rpx; width: 750rpx;
height: 86rpx; height: 186rpx;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
top: 70rpx; padding-top: 70rpx;
.items { .items {
margin: 0 30rpx; margin: 0 30rpx;
.tName { .tName {
color: #ffffff; color: #000;
font-size: 32rpx; font-size: 32rpx;
&.on { &.on {
@ -1191,7 +1273,7 @@
} }
.container { .container {
background-color: #000000; background-color: #F5F5F5;
} }
.item { .item {
@ -1248,7 +1330,7 @@
.userInfo { .userInfo {
position: absolute; position: absolute;
bottom: 30px; bottom: 400rpx;
right: 10px; right: 10px;
display: flex; display: flex;
align-items: center; align-items: center;
@ -1631,6 +1713,6 @@
.root { .root {
background-color: #000000; background-color: #000000;
} }
</style> </style>

View File

@ -13,8 +13,16 @@
--> -->
<!-- 头部导航 --> <!-- 头部导航 -->
<!-- 头部导航 --> <!-- 头部导航 -->
<view v-if="!isUser" class="header">
<view class="header">
<view class="tool-bar"> <view class="tool-bar">
<view class='xiangzuo' @tap='goBack'>
<!-- <image src="@/static/images/icon-back.png" mode="aspectFit"></image> -->
</view>
</view>
<!-- <view class="tool-bar">
<view class='iconfont icon-xiangzuo' @tap='goBack'></view> <view class='iconfont icon-xiangzuo' @tap='goBack'></view>
</view> </view>
<view class="items" @click.stop="navTap(2)"> <view class="items" @click.stop="navTap(2)">
@ -24,14 +32,30 @@
<text class="tName" :class="currentNav==1?'on':''">推荐</text> <text class="tName" :class="currentNav==1?'on':''">推荐</text>
</view> </view>
<view class="items" @click.stop="navTap(3)"> <view class="items" @click.stop="navTap(3)">
<text class="tName" :class="currentNav==3?'on':''">列表</text> <text class="tName" :class="currentNav==3?'on':''">热点资讯</text>
</view> </view>
<view class="items" @click.stop="navTap(4)">
<text class="tName" :class="currentNav==4?'on':''">社区</text>
</view> -->
</view> </view>
<swiper v-show="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'" <swiper v-show="currentNav !== 3&&currentNav != 4"
:vertical="true" @animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false"> :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'" :vertical="true"
@animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false">
<swiper-item v-for="(list,index) in dataList"> <swiper-item v-for="(list,index) in dataList">
<view v-if="max > index"> <view v-if="max > index">
<!-- <view style="width: 100px;height: 100px;background-color: red;">
5666
</view> -->
<view> <view>
<!-- 这种视频背景模糊的效果怎么做呢 -->
<!-- <!--
1.v-if用于控制视频在节点的渲染数 1.v-if用于控制视频在节点的渲染数
2.muted的默认值是 false代表默认是禁音视频的 2.muted的默认值是 false代表默认是禁音视频的
@ -46,13 +70,18 @@
:show-center-play-btn="false" :enable-progress-gesture="false" :src="list.video_link" :show-center-play-btn="false" :enable-progress-gesture="false" :src="list.video_link"
@ended="ended" @play="play(index)" @click="tapVideoHover(list.state,$event)" @ended="ended" @play="play(index)" @click="tapVideoHover(list.state,$event)"
@waiting="waiting(index)" @waiting="waiting(index)"
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;z-index: -1;'"></video> style="width: 100vw; height: 100vh;z-index: -1;transform: scale(4)">
</video>
</view> </view>
<!-- 播放状态pause 的时候就会暂停 --> <!-- 播放状态pause 的时候就会暂停 -->
<view class="videoHover" @click="tapVideoHover(list.state,$event)" <!-- <view class="videoHover" @click="tapVideoHover(list.state,$event)"
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'"> :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'">
<image v-if="list.state=='pause'" class="playState" src="../static/img/index/play.png"></image> <image v-if="list.state=='pause'" class="playState" src="../static/img/index/play.png"></image>
</view> </view> -->
<!--审核状态--> <!--审核状态-->
<view v-if="list.status==-1 || list.status==0 || list.status==-2" class="video-status"> <view v-if="list.status==-1 || list.status==0 || list.status==-2" class="video-status">
<view v-if="list.status == -1 || list.status == -2" class="status-title"> <view v-if="list.status == -1 || list.status == -2" class="status-title">
@ -226,6 +255,7 @@
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
<!-- <view class="video-list" v-if="currentNav === 3" <!-- <view class="video-list" v-if="currentNav === 3"
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'"> :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'">
@ -275,6 +305,8 @@
</view> </view>
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas> <canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view> </view>
</template> </template>
@ -291,10 +323,12 @@
} from '@/utils'; } from '@/utils';
import comment from '@/components/comment.vue'; import comment from '@/components/comment.vue';
import mentioned from '@/components/mentioned.vue'; import mentioned from '@/components/mentioned.vue';
import { import {
HTTP_REQUEST_URL HTTP_REQUEST_URL
} from '@/config/app'; } from '@/config/app';
import { import {
deoList,
videoList, videoList,
myVideoList, myVideoList,
graphicStartApi, graphicStartApi,
@ -314,11 +348,13 @@
components: { components: {
comment, comment,
mentioned, mentioned,
authorize authorize,
}, },
computed: configMap({ computed: configMap({
community_reply_status: 0 community_reply_status: 0
}, mapGetters(['isLogin', 'uid'])), }, mapGetters(['isLogin', 'uid'])),
data() { data() {
return { return {
isTriggered: false, isTriggered: false,
@ -394,6 +430,7 @@
communityId: '', communityId: '',
Listcount: '', Listcount: '',
loadMore: true, loadMore: true,
videoshow: true
} }
}, },
watch: { watch: {
@ -711,16 +748,13 @@
} }
}, },
get() { get() {
let that = this let that = this
// 1.这里引入后端请求数据 // 1.这里引入后端请求数据
that.isUser ? if (that.videoshow) {
myVideoList(that.userUid, { deoList(this.videoID).then(res => {
page: that.page, that.videoData([res.data])
limit: that.limit,
is_star: that.isSatrt,
community_id: that.videoID
}).then(res => {
that.videoData(res.data.list)
if (res.data.list.length < that.limit) { if (res.data.list.length < that.limit) {
this.loadMore = false; this.loadMore = false;
} }
@ -730,11 +764,18 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
}) : })
graphicLstApi({ this.videoshow = false
} else {
// videoList().then(res=>{
// that.videoData(res.data.list);
// })
// console.log(that.userUid,that.videoID)
videoList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
category_id: -1 id: this.videoID
}).then(res => { }).then(res => {
that.videoData(res.data.list) that.videoData(res.data.list)
if (res.data.list.length < that.limit) { if (res.data.list.length < that.limit) {
@ -747,6 +788,43 @@
duration: 2000 duration: 2000
}); });
}) })
}
// that.isUser ?
// myVideoList(that.userUid, {
// page: that.page,
// limit: that.limit,
// is_star: that.isSatrt,
// community_id: that.videoID
// }).then(res => {
// that.videoData(res.data.list)
// if (res.data.list.length < that.limit) {
// this.loadMore = false;
// }
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
//:
// graphicLstApi({
// page: that.page,
// limit: that.limit,
// category_id: -1
// }).then(res => {
// that.videoData(res.data.list)
// if (res.data.list.length < that.limit) {
// this.loadMore = false;
// }
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
that.loadVideo = true that.loadVideo = true
}, },
getFocusList() { getFocusList() {
@ -1135,10 +1213,11 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.video-list { .video-list {
padding: 200rpx 28.07rpx 28.07rpx 28.07rpx; padding: 150rpx 28.07rpx 28.07rpx 28.07rpx;
/* #ifdef MP */ /* #ifdef MP */
padding-top: 200rpx; padding-top: 150rpx;
/* #endif */ /* #endif */
background-color: #F5F5F5;
.goods_item { .goods_item {
width: 342.11rpx; width: 342.11rpx;
@ -1237,13 +1316,13 @@
position: fixed; position: fixed;
z-index: 9; z-index: 9;
width: 750rpx; width: 750rpx;
height: 86rpx; height: 120rpx;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
top: 20rpx; padding-top: 20rpx;
/* #ifdef MP */ /* #ifdef MP */
top: 75rpx; padding-top: 75rpx;
/* #endif */ /* #endif */
.tool-bar { .tool-bar {
@ -1255,23 +1334,40 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
.icon-xiangzuo { .xiangzuo {
width: 23rpx;
height: 42rpx;
margin-right: 40rpx; margin-right: 40rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: 26rpx;
color: #fff; image {
width: 100%;
height: 100%;
}
} }
} }
.items { .items {
margin: 0 30rpx; margin: 0 30rpx;
image {
width: 58rpx;
height: 58rpx;
}
.tName { .tName {
color: #ffffff; font-size: 33rpx;
font-size: 32rpx; font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #737373;
line-height: 50px;
&.on { &.on {
font-size: 38rpx; font-size: 33rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
} }
} }
@ -1290,6 +1386,7 @@
.shortVideo, .shortVideo,
.container { .container {
background: linear-gradient(180deg, rgba(0, 0, 0, .8) 0%, #000000 100%); background: linear-gradient(180deg, rgba(0, 0, 0, .8) 0%, #000000 100%);
} }
.item { .item {
@ -1336,6 +1433,7 @@
flex: 1; flex: 1;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
// background-color: red;
} }
.playState { .playState {
@ -1346,7 +1444,7 @@
.userInfo { .userInfo {
position: absolute; position: absolute;
bottom: 60rpx; bottom: 420rpx;
right: 20rpx; right: 20rpx;
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;
@ -1861,4 +1959,8 @@
color: #999; color: #999;
} }
} }
.videoa {
background-color: red;
}
</style> </style>

View File

@ -83,7 +83,7 @@
}, },
// //
jump(item) { jump(item) {
// console.log(item) console.log(item)
if ([0, 2].includes(item.status)) { if ([0, 2].includes(item.status)) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/store/settled/index?mer_i_id=${item.mer_intention_id}` url: `/pages/store/settled/index?mer_i_id=${item.mer_intention_id}`

View File

@ -1198,7 +1198,7 @@
this.isTriggered = true; this.isTriggered = true;
const newList = this.goods.reverse(); const newList = this.goods.reverse();
this.goods = newList; this.goods = newList;
this.getProductSpu() // this.getProductSpu()
setTimeout(() => { setTimeout(() => {
this.isTriggered = false; this.isTriggered = false;
}, 500) }, 500)
@ -1210,7 +1210,7 @@
// //
if (this.tabActive == 0) { if (this.tabActive == 0) {
setTimeout(() => { setTimeout(() => {
this.goods.push(...this.goods); // this.goods.push(...this.goods);
}, 500) }, 500)
} }
}, },
@ -1220,7 +1220,8 @@
setTimeout(() => { setTimeout(() => {
const newList = this.goods.reverse(); const newList = this.goods.reverse();
this.goods = newList; this.goods = newList;
this.getProductSpu() // this.getGoods()
// this.getProductSpu()
// uni.startPullDownRefresh(); // uni.startPullDownRefresh();
// uni.stopPullDownRefresh(); // uni.stopPullDownRefresh();
}, 500) }, 500)

View File

@ -2,9 +2,11 @@
<view :style="viewColor"> <view :style="viewColor">
<view class='productList'> <view class='productList'>
<view class='search acea-row row-between-wrapper'> <view class='search acea-row row-between-wrapper'>
<!-- #ifdef H5 -->
<view class="back" @click='set_where(1)'> <view class="back" @click='set_where(1)'>
<view class="iconfont icon-xiangzuo"></view> <view class="iconfont icon-xiangzuo"></view>
</view> </view>
<!-- #endif -->
<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' <input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='where.keyword'
@confirm="searchSubmit"></input> @confirm="searchSubmit"></input>

View File

@ -1,6 +1,65 @@
<template> <template>
<view class="merchant-details"> <view class="merchant-details">
<view class="top"> <view style="height: var(--status-bar-height);"></view>
<view class="tit">
<u--image style="margin: 0 auto;" :showLoading="true" src="../../../static/images/SJRZ/succes.png"
width="348.83rpx" height="271.77rpx" @click="goBack"></u--image>
恭喜您的申请已通过
</view>
<view class="content">
<view class="steps">
<u-steps current="3" direction="column" mode="number">
<u-steps-item title="运输中" desc="11:40">
<!-- <u--image style="margin: 0 auto;" :showLoading="true" src="../../../static/images/SJRZ/CGBZ.png"
width="31.54rpx" height="31.54rpx"></u--image> -->
<!-- <u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/succes.png" width="348.83rpx" height="271.77rpx"
@click="goBack"></u--image> -->
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
<u-steps-item title="待审核" desc="10:35">
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
<u-steps-item title="审核通过" desc="11:40">
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
</u-steps>
</view>
<view class="msg" v-if="mer_id > 0 && resData.login_url" @click="copyTBL()">
<view style="margin-bottom: 20rpx;">
<text style="font-weight: bold;">登录地址</text>
<text class="">{{resData.login_url}}</text>
</view>
<view>
<text style="font-weight: bold;">商户账号</text>
<text class="">{{resData.phone}}</text>
</view>
<!-- <view class=" phone">
<view class="">
<text class="head">商户账号</text>
<text class="content">{{resData.phone}}</text>
</view>
<text class="cope" @click="copyTBL()">复制</text>
</view> -->
</view>
</view>
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
</view>
</view>
<view class="btn_bottom" @click="navgo(`/pages/product/basicSet?mer_id=${mer_id}`)">
<u-button type="primary" style="background-color: #3274F9;border-radius: 30rpx;border: none;"
text="完善商户信息"></u-button>
</view>
<!-- <view class="top">
<image class="img" src="../static/images/successTop.png" mode=""></image> <image class="img" src="../static/images/successTop.png" mode=""></image>
<view class="title"> <view class="title">
恭喜您的申请已通过 恭喜您的申请已通过
@ -18,12 +77,8 @@
</view> </view>
<text class="cope" @click="copyTBL()">复制</text> <text class="cope" @click="copyTBL()">复制</text>
</view> </view>
</view> </view> -->
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
</view>
</view>
</view> </view>
</template> </template>
@ -54,6 +109,11 @@
} }
}, },
methods: { methods: {
navgo(url) {
uni.navigateTo({
url
})
},
getGoodsDetails(id) { getGoodsDetails(id) {
getGoodsDetails(id).then(res => { getGoodsDetails(id).then(res => {
this.resData = res.data this.resData = res.data
@ -138,69 +198,100 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.merchant-details { .merchant-details {
display: flex; padding: 0 4vw;
flex-direction: column; // padding: ;
align-items: center;
background-color: #fff;
height: 100vh; height: 100vh;
position: relative; position: relative;
// background-color: #C5D9FD;
background-image: url("../../../static/images/SJRZ/bg.png");
background-repeat: no-repeat;
position: relative;
.tit {
color: white;
font-size: 33.29rpx;
text-align: center;
// padding: 50vh 0;
transform: translateY(5vh);
display: flex;
// justify-content: space-around;
flex-direction: column;
align-items: center;
}
.content {
background-color: white;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
// transform: translateY(20vh);
margin-top: 100rpx;
box-sizing: border-box;
padding: 2vw;
// .steps {}
.msg {
width: 85%;
padding: 30rpx;
// height: 150rpx;
margin: 30rpx auto;
background-color: #F4F7FE;
border-radius: 8rpx;
.li {
// margin-: ;
// display: flex;
// justify-content: left;
// display: flex;
// flex-shrink: 1;
}
}
}
.top { .top {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.img { .img {
width: 340rpx; width: 340rpx;
height: 280rpx; height: 280rpx;
margin: 140rpx 0 30rpx 0; margin: 140rpx 0 30rpx 0;
} }
.title { .title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }
} }
.msg {
width: 85%;
padding: 30rpx;
height: 150rpx;
margin: 70rpx 70rpx;
background-color: #F6F6F6;
border-radius: 8rpx;
.url {
display: flex;
flex-wrap: nowrap;
margin-bottom: 20rpx;
}
.phone {
display: flex;
justify-content: space-between;
}
.head {
color: #333333;
font-size: 28rpx;
font-weight: 500;
white-space: nowrap;
}
.content {
color: #999999;
font-size: 26rpx;
}
.cope {
padding: 5rpx 16rpx;
color: #FFFFFF;
border-radius: 30rpx;
background-color: #999999;
margin-left: 40rpx;
font-size: 20rpx;
}
}
.btn { .btn {
width: 70%; // width: 70%;
position: absolute; // position: absolute;
text-align: center; // text-align: center;
color: #999999; // color: #999999;
font-size: 24rpx; // font-size: 24rpx;
bottom: 80rpx // bottom: 80rpx
// background-color: red;
// height: 100vw;
margin-top: 5vw;
}
.btn_bottom {
position: fixed;
width: 92vw;
bottom: 20rpx;
} }
} }
</style> </style>

View File

@ -367,7 +367,7 @@
// //
getGoodsDetails(id) { getGoodsDetails(id) {
getGoodsDetails(id).then(res => { getGoodsDetails(id).then(res => {
// console.log(res); console.log(res);
let arr = Object.keys(this.merchantData) let arr = Object.keys(this.merchantData)
let resData = res.data let resData = res.data
arr.map(item => { arr.map(item => {
@ -411,7 +411,7 @@
this.validateBtn() this.validateBtn()
}, },
bindPickerChange1: function(e) { bindPickerChange1: function(e) {
// console.log(e); console.log(e);
this.index1 = e.target.value this.index1 = e.target.value
let idx = e.target.value let idx = e.target.value
this.merchantData.mer_type = this.storeTypeArr[idx]['mer_type_id'] this.merchantData.mer_type = this.storeTypeArr[idx]['mer_type_id']
@ -443,7 +443,7 @@
getStoreType: function() { getStoreType: function() {
getStoreTypeApi() getStoreTypeApi()
.then(res => { .then(res => {
// console.log(res); console.log(res);
this.storeTypeArr = res.data this.storeTypeArr = res.data
}) })
.catch(res => { .catch(res => {

File diff suppressed because it is too large Load Diff

View File

@ -21,8 +21,9 @@
<view class="bg"></view> <view class="bg"></view>
<view class="user-info"> <view class="user-info">
<view class="avatar-box" :class="{on:userInfo.is_svip > 0 && svip_switch_status == 1}"> <view class="avatar-box" :class="{on:userInfo.is_svip > 0 && svip_switch_status == 1}">
<image class="avatar skeleton-radius" :src="userInfo.avatar ? userInfo.avatar : '/static/images/f.png'" <image class="avatar skeleton-radius"
@click="goEdit"></image> :src="userInfo.avatar ? userInfo.avatar : '/static/images/f.png'" @click="goEdit">
</image>
<view class="headwear" v-if="userInfo.is_svip > 0 && svip_switch_status == 1"> <view class="headwear" v-if="userInfo.is_svip > 0 && svip_switch_status == 1">
<image src="/static/images/headwear.png"></image> <image src="/static/images/headwear.png"></image>
</view> </view>
@ -81,7 +82,8 @@
</view> </view>
<navigator hover-class="none" <navigator hover-class="none"
:url="userInfo.is_svip > 0 ? '/pages/annex/vip_center/index' : '/pages/annex/vip_paid/index'" :url="userInfo.is_svip > 0 ? '/pages/annex/vip_center/index' : '/pages/annex/vip_paid/index'"
class="cardVipA acea-row row-between-wrapper" v-if="userInfo.svip_open && svip_switch_status == 1"> class="cardVipA acea-row row-between-wrapper"
v-if="userInfo.svip_open && svip_switch_status == 1">
<image class="svip_user" src="/static/images/svip_user.png"></image> <image class="svip_user" src="/static/images/svip_user.png"></image>
<view class="left-box"> <view class="left-box">
<view v-if="userInfo.is_svip > 0" class="small">累计为您节省{{userInfo.svip_save_money}}</view> <view v-if="userInfo.is_svip > 0" class="small">累计为您节省{{userInfo.svip_save_money}}</view>
@ -105,7 +107,8 @@
<view class="order-wrapper"> <view class="order-wrapper">
<view class="order-hd flex skeleton-rect"> <view class="order-hd flex skeleton-rect">
<view class="left">我的订单</view> <view class="left">我的订单</view>
<view class="right flex" @click="authTo('/pages/users/order_list/index?status=-1')" hover-class="none" <view class="right flex"
@click="authTo('/pages/users/order_list/index?status=-1&product_type=0')" hover-class="none"
open-type="navigate"> open-type="navigate">
全部订单 全部订单
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
@ -225,6 +228,9 @@
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
<view class="custom_style"> <view class="custom_style">
<view class="custom_style_icon"></view> <view class="custom_style_icon"></view>
<view class="custom_style-txt" style="color: #282828;">
发布
</view>
</view> </view>
</template> </template>
</m-tabbar> --> </m-tabbar> -->
@ -233,19 +239,33 @@
<script> <script>
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import { getMenuList, getUserInfo, setVisit } from '@/api/user.js'; import {
import { getVersion } from "@/api/public"; getMenuList,
import { orderData } from '@/api/order.js' getUserInfo,
import { mapGetters } from "vuex"; setVisit
} from '@/api/user.js';
import {
getVersion
} from "@/api/public";
import {
orderData
} from '@/api/order.js'
import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import dayjs from '@/plugin/dayjs/dayjs.min.js'; import dayjs from '@/plugin/dayjs/dayjs.min.js';
import Cache from '@/utils/cache'; import Cache from '@/utils/cache';
// #ifndef H5 // #ifndef H5
import passwordPopup from '@/components/passwordPopup'; import passwordPopup from '@/components/passwordPopup';
// #endif // #endif
import { configMap } from '@/utils'; import {
configMap
} from '@/utils';
import Auth from '../../libs/wechat'; import Auth from '../../libs/wechat';
import { HTTP_REQUEST_URL } from '@/config/app'; import {
HTTP_REQUEST_URL
} from '@/config/app';
const app = getApp(); const app = getApp();
export default { export default {
components: { components: {
@ -287,19 +307,19 @@
{ {
icon: 'icon-daifahuo1', icon: 'icon-daifahuo1',
title: '待发货', title: '待发货',
url: '/pages/users/order_list/index?status=1', url: '/pages/users/order_list/index?status=2',
num: 0 num: 0
}, },
{ {
icon: 'icon-daishouhuo1', icon: 'icon-daishouhuo1',
title: '待收货', title: '待收货',
url: '/pages/users/order_list/index?status=2', url: '/pages/users/order_list/index?status=3',
num: 0 num: 0
}, },
{ {
icon: 'icon-daipingjia1', icon: 'icon-daipingjia1',
title: '待评价', title: '待评价',
url: '/pages/users/order_list/index?status=3', url: '/pages/users/order_list/index?status=4',
num: 0 num: 0
}, },
{ {
@ -309,22 +329,72 @@
num: 0 num: 0
}, },
], ],
imgUrls: [{ url: '', pic: '' }], imgUrls: [{
url: '',
pic: ''
}],
userMenu: [], userMenu: [],
skeletonMenu: [], skeletonMenu: [],
personalMenu: [ personalMenu: [{
{ pic: '', name: '', isShow: true }, pic: '',
{ pic: '', name: '', isShow: true }, name: '',
{ pic: '', name: '', isShow: true }, isShow: true
{ pic: '', name: '', isShow: true }, },
{ pic: '', name: '', isShow: true }, {
{ pic: '', name: '', isShow: true }, pic: '',
{ pic: '', name: '', isShow: true }, name: '',
{ pic: '', name: '', isShow: true }, isShow: true
{ pic: '', name: '', isShow: true }, },
{ pic: '', name: '', isShow: true }, {
{ pic: '', name: '', isShow: true }, pic: '',
{ pic: '', name: '', isShow: true } name: '',
isShow: true
},
{
pic: '',
name: '',
isShow: true
},
{
pic: '',
name: '',
isShow: true
},
{
pic: '',
name: '',
isShow: true
},
{
pic: '',
name: '',
isShow: true
},
{
pic: '',
name: '',
isShow: true
},
{
pic: '',
name: '',
isShow: true
},
{
pic: '',
name: '',
isShow: true
},
{
pic: '',
name: '',
isShow: true
},
{
pic: '',
name: '',
isShow: true
}
], ],
autoplay: true, autoplay: true,
circular: true, circular: true,
@ -333,7 +403,9 @@
isAuto: false, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
orderStatusNum: {}, orderStatusNum: {},
userInfo: { aratar: '/static/f.png' }, userInfo: {
aratar: '/static/f.png'
},
MyMenus: [], MyMenus: [],
is_promoter: 0, //广 1 is_promoter: 0, //广 1
extension_status: 0, extension_status: 0,
@ -420,8 +492,10 @@
// //
filterMenus: function(item) { filterMenus: function(item) {
let that = this; let that = this;
if (item.url == '/pages/users/user_money/index') item.isShow = that.balance_func_status == 1 if (item.url == '/pages/users/user_money/index') {
else if (item.url == '/pages/users/user_spread_user/index') { // item.isShow = that.balance_func_status == 1
item.isShow = true
} else if (item.url == '/pages/users/user_spread_user/index') {
if (that.extension_status == 0) { if (that.extension_status == 0) {
item.isShow = false item.isShow = false
} else if (that.extension_status == 1) { } else if (that.extension_status == 1) {
@ -436,6 +510,8 @@
else if (item.url == '/pages/users/user_grade/index') item.isShow = that.member_status == 1 else if (item.url == '/pages/users/user_grade/index') item.isShow = that.member_status == 1
else if (item.url == '/pages/users/user_integral/index') item.isShow = that.integral_status == 1 else if (item.url == '/pages/users/user_integral/index') item.isShow = that.integral_status == 1
else item.isShow = true else item.isShow = true
}, },
showMenu(menu) { showMenu(menu) {
return !menu || ['integral', 'service', 'admin_order', 'verify_order', 'intention', 'promoter', 'balance'] return !menu || ['integral', 'service', 'admin_order', 'verify_order', 'intention', 'promoter', 'balance']
@ -556,6 +632,7 @@
that.filterMenus(item) that.filterMenus(item)
that.personalMenu.push(item) that.personalMenu.push(item)
}) })
that.imgUrls = res.data.banner that.imgUrls = res.data.banner
}); });
}, },

View File

@ -51,7 +51,7 @@
</view> </view>
<view class='tip mt25'> <view class='tip mt25'>
当前可提现金额: <text 当前可提现金额: <text
class="price">{{userInfo.brokerage_price}},</text>冻结佣金{{userInfo.lock_brokerage}} class="price">{{extract_money}},</text>冻结佣金{{userInfo.lock_brokerage}}
</view> </view>
<view class='tip'> <view class='tip'>
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现 说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现
@ -92,7 +92,7 @@
<view class='tip mt25'> <view class='tip mt25'>
当前可提现金额: <text 当前可提现金额: <text
class="price">{{userInfo.brokerage_price}},</text>冻结佣金{{userInfo.lock_brokerage}} class="price">{{extract_money}},</text>冻结佣金{{userInfo.lock_brokerage}}
</view> </view>
<view class='tip'> <view class='tip'>
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现 说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现
@ -100,7 +100,7 @@
<button formType="submit" class='bnt b-color'>提现</button> <button formType="submit" class='bnt b-color'>提现</button>
</view> </view>
<view v-else class="auto_arrival"> <view v-else class="auto_arrival">
<view class='tip'>当前可提现金额: <text class="price">{{userInfo.brokerage_price}}</text> <view class='tip'>当前可提现金额: <text class="price">{{extract_money}}</text>
</view> </view>
<view class='input'><input placeholder-class='placeholder1' name="extract_price" <view class='input'><input placeholder-class='placeholder1' name="extract_price"
type='digit' :placeholder="placeholderValue" @focus="placeholderValue = ''" type='digit' :placeholder="placeholderValue" @focus="placeholderValue = ''"
@ -141,7 +141,7 @@
</view> </view>
<view class='tip mb25'> <view class='tip mb25'>
当前可提现金额: <text 当前可提现金额: <text
class="price">{{userInfo.brokerage_price}},</text>冻结佣金{{userInfo.lock_brokerage}} class="price">{{extract_money}},</text>冻结佣金{{userInfo.lock_brokerage}}
</view> </view>
<view class='tip' v-if="userInfo.broken_day>0"> <view class='tip' v-if="userInfo.broken_day>0">
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现 说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现
@ -166,7 +166,8 @@
getAdminApplyAPI, getAdminApplyAPI,
getLisApplyAPI, getLisApplyAPI,
getAccountApplyAPI, getAccountApplyAPI,
postAccountApplyAPI postAccountApplyAPI,
} from '@/api/user.js' } from '@/api/user.js'
import { import {
extractCash, extractCash,
@ -192,6 +193,7 @@
}, },
data() { data() {
return { return {
extract_money:"",
mode: { mode: {
bank_address: "", bank_address: "",
bank_code: "", bank_code: "",
@ -276,6 +278,8 @@
this.mode.bank_code = res.data.financial_bank_code this.mode.bank_code = res.data.financial_bank_code
this.mode.bank_name = res.data.financial_bank_bank this.mode.bank_name = res.data.financial_bank_bank
this.mode.bank_address = res.data.financial_bank_branch this.mode.bank_address = res.data.financial_bank_branch
this.extract_money=res.data.extract_money
console.log(this.extract_money)
} catch (err) { } catch (err) {
//TODO handle the exception //TODO handle the exception
Toast(err) Toast(err)
@ -443,6 +447,11 @@
console.log(res); console.log(res);
}).catch(err => { }).catch(err => {
Toast(err) Toast(err)
setTimeout(()=>{
uni.navigateBack({
delta: 1
})}, 1000)
}) })
}, },
async postCreate(price) { async postCreate(price) {

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="list"> <view class="list">
<view class="head"> <view class="head">
<view class="head_conent"> <view class="head_conent">
<view class="tatil"> <view class="tatil">
@ -8,8 +8,9 @@
<h3>提现次数</h3> <h3>提现次数</h3>
</view> </view>
<view class="sum"> <view class="sum">
<u-count-to :startVal="0" :endVal="sum"></u-count-to> <u-count-to :startVal="0" :endVal="sumTofixed" :decimals="2"></u-count-to>
<h3>提现总额</h3> <h3>提现总额</h3>
</view> </view>
</view> </view>
</view> </view>
@ -66,7 +67,11 @@
UserApplylist:[] UserApplylist:[]
} }
}, },
computed: {}, computed: {
sumTofixed(){
return this.returnFloat(this.sum)
}
},
watch: { watch: {
}, },
@ -79,6 +84,21 @@
// }) // })
}, },
methods: { methods: {
/**数字强制转为两位小数*/
returnFloat(value){
var value=Math.round(parseFloat(value)*100)/100;
var xsd=value.toString().split(".");
if(xsd.length==1){
value=value.toString()+".00";
return value;
}
if(xsd.length>1){
if(xsd[1].length<2){
value=value.toString()+"0";
}
return value;
}
},
tixian() { tixian() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1

View File

@ -80,39 +80,7 @@
class="font_pro">隐私政策</text></text> class="font_pro">隐私政策</text></text>
</checkbox-group> </checkbox-group>
</div> </div>
<!-- #ifdef MP -->
<!-- <view class="appLogin">
<view class="hds">
<span class="line"></span>
<p>其他方式登录</p>
<span class="line"></span>
</view>
<view class="btn-wrapper">
<button form-type="submit" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<view class="btn wx">
<span class="iconfont icon-s-weixindenglu1"></span>
</view>
</button>
</view>
</view> -->
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<!-- <view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
<view class="hds">
<span class="line"></span>
<p>其他方式登录</p>
<span class="line"></span>
</view>
<view class="btn-wrapper">
<view class="btn wx" @click="wxLogin">
<span class="iconfont icon-s-weixindenglu1"></span>
</view>
<view class="btn wx btn-apple" @click="appleLogin" v-if="appleShow">
<span class="iconfont icon-s-pingguo"></span>
</view>
</view>
</view> -->
<!-- #endif -->
</div> </div>
<div class="whiteBg" v-else> <div class="whiteBg" v-else>
<div class="title">注册账号</div> <div class="title">注册账号</div>
@ -168,24 +136,6 @@
class="font_pro">隐私政策</text></text> class="font_pro">隐私政策</text></text>
</checkbox-group> </checkbox-group>
</div> </div>
<!-- #ifdef APP-PLUS -->
<view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
<view class="hds">
<span class="line"></span>
<p>其他方式登录</p>
<span class="line"></span>
</view>
<view class="btn-wrapper">
<view class="btn wx" @click="wxLogin">
<span class="iconfont icon-s-weixindenglu1"></span>
</view>
<view class="btn wx btn-apple" @click="appleLogin" v-if="appleShow">
<span class="iconfont icon-s-pingguo"></span>
</view>
</view>
</view>
<!-- #endif -->
</div> </div>
</div> </div>
<div class="bottom"></div> <div class="bottom"></div>

View File

@ -8,8 +8,10 @@
<text class='phone'>{{addressInfo.phone}}</text> <text class='phone'>{{addressInfo.phone}}</text>
</view> </view>
<view> <view>
<text class='default t-color' <text class='default t-color'
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}{{addressInfo.detail}} v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}
<text v-if='addressInfo.brigade'>{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}</text>
</view> </view>
</view> </view>
<navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none" <navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none"
@ -119,6 +121,7 @@
<view class="boxs"> <view class="boxs">
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view>配送方式</view> <view>配送方式</view>
<view <view
v-if="item.delivery_way.length == 2 && (item.order.allow_delivery && item.order.allow_take)" v-if="item.delivery_way.length == 2 && (item.order.allow_delivery && item.order.allow_take)"
class='discount' @tap="openShowBox(item,index)"> class='discount' @tap="openShowBox(item,index)">
@ -161,13 +164,13 @@
<view class='discount'>暂无优惠券</view> <view class='discount'>暂无优惠券</view>
</block> </block>
</view> </view>
<view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'> <!-- <view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'>
<view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view> <view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view>
<view class='discount discount_voice' @tap="goInvoice(item.mer_id)"> <view class='discount discount_voice' @tap="goInvoice(item.mer_id)">
{{(item.invoiceData && item.invoiceData.receipt_title) ? item.invoiceData.receipt_title : '不开发票'}} {{(item.invoiceData && item.invoiceData.receipt_title) ? item.invoiceData.receipt_title : '不开发票'}}
<text class='iconfont icon-jiantou'></text> <text class='iconfont icon-jiantou'></text>
</view> </view>
</view> </view> -->
<view v-if="order_type === 2 && item.list[0].productPresell.presell_type ==2" <view v-if="order_type === 2 && item.list[0].productPresell.presell_type ==2"
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
style="border-top: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;"> style="border-top: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;">
@ -188,6 +191,10 @@
<view class="price" v-if="item.isTake == 0"><text></text>{{ item.order.pay_price }}</view> <view class="price" v-if="item.isTake == 0"><text></text>{{ item.order.pay_price }}</view>
<view class="price" v-if="item.isTake == 1"><text></text>{{ item.order.org_price}}</view> <view class="price" v-if="item.isTake == 1"><text></text>{{ item.order.org_price}}</view>
</view> </view>
<view class="total" v-if="item.credit_buy == 1 && active == 4">
实付价
<view class="price"><text></text>0.00</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -379,7 +386,11 @@
<view class="footer_count"> <view class="footer_count">
<view> <view>
合计: 合计:
<text class='pColor'>{{totalPrice || 0}}</text> <text class='pColor' v-if="cartArr[4].payStatus == 1 && active == 4">0.00</text>
<text class='pColor' v-else>{{totalPrice }}</text>
</view>
<view style="font-size: 14px;color: #F84221;" v-if="cartArr[4].payStatus == 1 && active == 4">
可结算周期到期后再付款{{totalPrice}}
</view> </view>
<view class="coupon_price" v-if="couponData.total_coupon > 0"> <view class="coupon_price" v-if="couponData.total_coupon > 0">
优惠:¥ {{couponData.total_coupon}} 优惠:¥ {{couponData.total_coupon}}
@ -524,6 +535,12 @@
value: 'offline', value: 'offline',
title: '线下支付', title: '线下支付',
payStatus: 2, payStatus: 2,
}, {
"name": "先货后款",
"icon": "tan-a-lujing17324",
value: 'creditBuy',
title: `结算周期:${this.settle_cycle}天 日利率:${this.interest_rate}%`,
payStatus: '',
}, },
], ],
tagStyle: { tagStyle: {
@ -638,6 +655,10 @@
order_key: '', order_key: '',
is_take: '', is_take: '',
domain: HTTP_REQUEST_URL, domain: HTTP_REQUEST_URL,
product_type: '',
interest_rate: '', //
settle_cycle: '', //
type_id: '', //
}; };
}, },
computed: { computed: {
@ -655,6 +676,8 @@
onReady() {}, onReady() {},
mounted: function() {}, mounted: function() {},
onLoad: function(options) { onLoad: function(options) {
this.type_id = options.type_id
this.product_type = options.product_type
this.seckillId = options.seckillId this.seckillId = options.seckillId
// #ifdef H5 // #ifdef H5
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5' this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
@ -794,6 +817,7 @@
getUserInfo() { getUserInfo() {
getUserInfo().then(res => { getUserInfo().then(res => {
this.userInfo = res.data this.userInfo = res.data
}) })
}, },
/*获取发票说明*/ /*获取发票说明*/
@ -989,6 +1013,9 @@
*/ */
getConfirm: function(address_id) { getConfirm: function(address_id) {
// console.log(address_id, 'address_id') // console.log(address_id, 'address_id')
// console.log(this.take,)
// console.log(this.subCoupon,)
// console.log(this.use_integral, )
let that = this; let that = this;
// console.log(that.cartId.split(",")) // console.log(that.cartId.split(","))
uni.showLoading({ uni.showLoading({
@ -1003,6 +1030,7 @@
use_integral: that.use_integral use_integral: that.use_integral
}).then(res => { }).then(res => {
// //
that.product_type=res.data.order_type
that.is_take = false that.is_take = false
res.data.order.forEach(el => { res.data.order.forEach(el => {
if (el.order.isTake == 1) that.is_take = true if (el.order.isTake == 1) that.is_take = true
@ -1053,6 +1081,16 @@
that.allow_address = res.data.allow_address that.allow_address = res.data.allow_address
that.deliveryName = res.data.order_model == 0 ? '快递配送' : '虚拟发货' that.deliveryName = res.data.order_model == 0 ? '快递配送' : '虚拟发货'
that.order_key = res.data.key that.order_key = res.data.key
that.cartArr[4].title =
`结算周期:${res.data.order[0].settle_cycle}天 日利率:${res.data.order[0].interest_rate}%`
if (res.data.order[0].credit_buy == 1 && this.type_id == 12) {
this.cartArr[4].payStatus = 1
} else {
this.cartArr[4].payStatus = 0
}
uni.getStorage({ uni.getStorage({
key: "invoice_Data", key: "invoice_Data",
success: function(res) { success: function(res) {
@ -1080,6 +1118,7 @@
if (that.addressId) { if (that.addressId) {
getAddressDetail(that.addressId).then(res => { getAddressDetail(that.addressId).then(res => {
res.data.is_default = parseInt(res.data.is_default); res.data.is_default = parseInt(res.data.is_default);
that.addressInfo = res.data || {}; that.addressInfo = res.data || {};
that.addressId = res.data.address_id || 0; that.addressId = res.data.address_id || 0;
that.address.addressId = res.data.address_id || 0; that.address.addressId = res.data.address_id || 0;
@ -1087,8 +1126,12 @@
real_name: res.data.real_name, real_name: res.data.real_name,
phone: res.data.phone phone: res.data.phone
} }
this.$nextTick(() => {
this.getConfirm(that.addressId); this.getConfirm(that.addressId);
}) })
})
} else { } else {
getAddressList().then(res => { getAddressList().then(res => {
that.addressInfo = res.data.list.length > 0 ? res.data.list[0] : {}; that.addressInfo = res.data.list.length > 0 ? res.data.list[0] : {};
@ -1106,10 +1149,10 @@
} }
}, },
payItem: function(e) { payItem: function(e) {
console.log(e);
let that = this; let that = this;
let active = e; let active = e;
that.active = active; that.active = active;
// console.log(this.active);
that.animated = true; that.animated = true;
that.payType = that.cartArr[active].value; that.payType = that.cartArr[active].value;
if (that.payType == 'weixin') { if (that.payType == 'weixin') {
@ -1174,7 +1217,12 @@
orderId = res.data.result.order_id, orderId = res.data.result.order_id,
callback_key = res.data.result.pay_key, callback_key = res.data.result.pay_key,
jsConfig = res.data.result.config, jsConfig = res.data.result.config,
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message; //
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message +
'&product_type=' + that.product_type,
goPagesOrder = '/pages/order_details/stay?order_id=' + orderId +
'&credit_buy=1&product_type=' + that.product_type;
that.orderPay = true; that.orderPay = true;
uni.hideLoading(); uni.hideLoading();
switch (status) { switch (status) {
@ -1186,7 +1234,7 @@
title: res.message title: res.message
}, { }, {
tab: 5, tab: 5,
url: goPages url: goPagesOrder
}); });
break; break;
case 'success': case 'success':
@ -1200,10 +1248,10 @@
break; break;
case 'alipay': case 'alipay':
case "alipayQr": case "alipayQr":
uni.navigateTo({ // uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' + // url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
jsConfig // jsConfig
}) // })
return; return;
break; break;
// #ifndef MP // #ifndef MP
@ -1240,8 +1288,10 @@
provider: 'wxpay', provider: 'wxpay',
orderInfo: jsConfig, orderInfo: jsConfig,
success: (e) => { success: (e) => {
//
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=支付成功'; '&msg=支付成功' + '&product_type=' + that.product_type;
return that.$util.Tips({ return that.$util.Tips({
title: '支付成功', title: '支付成功',
icon: 'success' icon: 'success'
@ -1251,8 +1301,10 @@
}); });
}, },
fail: (e) => { fail: (e) => {
console.log(e,'111111111')
//
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付'; '&msg=取消支付' + '&product_type=' + that.product_type;
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付', title: '取消支付',
}, { }, {
@ -1260,15 +1312,17 @@
url: url url: url
}); });
}, },
complete: () => { complete: (res) => {
let url = '/pages/order_pay_status/index?order_id=' + orderId + uni.hideLoading();
'&msg=取消支付'; //
return that.$util.Tips({ // let url = '/pages/order_pay_status/index?order_id=' + orderId +
title: '取消支付', // '&msg=' + '&product_type=' + that.product_type;
}, { // return that.$util.Tips({
tab: 4, // title: '',
url: url // }, {
}); // tab: 4,
// url: url
// });
}, },
}); });
// #endif // #endif
@ -1297,8 +1351,10 @@
}); });
}, },
fail: function(e) { fail: function(e) {
//
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' orderId + '&msg=取消支付' + '&product_type=' + that
.product_type
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {
@ -1322,10 +1378,11 @@
case 'h5': case 'h5':
let host = window.location.protocol + "//" + window.location.host; let host = window.location.protocol + "//" + window.location.host;
let url = let url =
`${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}` `${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}&product_type=${that.product_type}`
let eUrl = encodeURIComponent(url) let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}` let locations = `${jsurl}&redirect_url=${eUrl}`
//
setTimeout(() => { setTimeout(() => {
location.href = locations; location.href = locations;
}, 100); }, 100);
@ -1346,8 +1403,10 @@
}); });
}, },
fail: (e) => { fail: (e) => {
//
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=支付失败' orderId + '&msg=支付失败' + '&product_type=' + that
.product_type
return that.$util.Tips({ return that.$util.Tips({
title: '支付失败' title: '支付失败'
}, { }, {
@ -1357,21 +1416,26 @@
}, },
complete: () => { complete: () => {
uni.hideLoading(); uni.hideLoading();
let pages = '/pages/order_pay_status/index?order_id=' + // //
orderId + '&msg=取消支付' // let pages = '/pages/order_pay_status/index?order_id=' +
return that.$util.Tips({ // orderId + '&msg=' + '&product_type=' + that
title: '取消支付' // .product_type
}, {
tab: 5, // return that.$util.Tips({
url: pages // title: ''
}); // }, {
// tab: 5,
// url: pages
// });
}, },
}); });
break; break;
// #endif // #endif
default: default:
//
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' orderId + '&msg=取消支付' + '&product_type=' + that.product_type
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {
@ -1429,7 +1493,6 @@
this.virtualIndex = index; this.virtualIndex = index;
}, },
SubOrder: function(e) { SubOrder: function(e) {
console.log(this.active);
let that = this, let that = this,
data = {}; data = {};
@ -1555,6 +1618,15 @@
.Tips({ .Tips({
title: '余额不足!' title: '余额不足!'
}); });
//
// if (this.payType == 'creditBuy') {
// uni.navigateTo({
// ur
// })
// return
// }
uni.showLoading({ uni.showLoading({
title: '订单支付中', title: '订单支付中',
mask: true mask: true
@ -1567,8 +1639,6 @@
// #ifndef MP // #ifndef MP
that.payment(data); that.payment(data);
// #endif // #endif
}, },
// //
openShowBox(item, index) { openShowBox(item, index) {

View File

@ -1,7 +1,9 @@
<template> <template>
<view :style="viewColor"> <view :style="viewColor">
<view class='my-order'> <view class='my-order'>
<view class='header'> <view class='header'>
<view class='picTxt acea-row row-between-wrapper'> <view class='picTxt acea-row row-between-wrapper'>
<view class='text'> <view class='text'>
<view class='name'>订单信息</view> <view class='name'>订单信息</view>
@ -19,35 +21,38 @@
<view class='nav acea-row row-around'> <view class='nav acea-row row-around'>
<view class='item' :class='orderStatus==-1 ? "on": ""' @click="statusClick(-1)"> <view class='item' :class='orderStatus==-1 ? "on": ""' @click="statusClick(-1)">
<view>全部</view> <view>全部</view>
<view class='num'>{{orderData.all || 0}}</view> <view class='num'>{{orderData.orderCount || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)"> <view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)">
<view>待付款</view> <view>待付款</view>
<view class='num'>{{orderData.noPay || 0}}</view> <view class='num'>{{orderData.noPay || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==1 ? "on": ""' @click="statusClick(1)"> <view class='item' :class='orderStatus==2 ? "on": ""' @click="statusClick(2)">
<view>待发货</view> <view>待发货</view>
<view class='num'>{{orderData.noPostage || 0}}</view> <view class='num'>{{orderData.noPostage || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==2 ? "on": ""' @click="statusClick(2)"> <view class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)">
<view>待收货</view> <view>待收货</view>
<view class='num '>{{orderData.noDeliver || 0}}</view> <view class='num '>{{orderData.noDeliver || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)"> <view class='item' :class='orderStatus==4 ? "on": ""' @click="statusClick(4)">
<view>待评价</view> <view>待评价</view>
<view class='num'>{{orderData.noComment || 0}}</view> <view class='num'>{{orderData.noComment || 0}}</view>
</view> </view>
</view> </view>
<!--定金预售订单--> <!--定金预售订单-->
<view v-if="presellProList.length > 0" class="event_container"> <view v-if="presellProList.length > 0" class="event_container">
<navigator class="acea-row row-between" url="/pages/users/presell_order_list/index" hover-class='none' > <navigator class="acea-row row-between" url="/pages/users/presell_order_list/index" hover-class='none'>
<view class="info"> <view class="info">
<view class="title">预售尾款订单转到这里了</view> <view class="title">预售尾款订单转到这里了</view>
<view class="desc"> <text class="t-color">{{ presellOrderCount }}</text> 笔预售尾款订单待付款请点击查看</view> <view class="desc"> <text class="t-color">{{ presellOrderCount }}</text> 笔预售尾款订单待付款请点击查看
</view>
</view> </view>
<view class="photo acea-row row-between"> <view class="photo acea-row row-between">
<view class='picture'> <view class='picture'>
<image :src='(presellProList[0].orderProduct[0].cart_info.productAttr && presellProList[0].orderProduct[0].cart_info.productAttr.image) || presellProList[0].orderProduct[0].cart_info.product.image'></image> <image
:src='(presellProList[0].orderProduct[0].cart_info.productAttr && presellProList[0].orderProduct[0].cart_info.productAttr.image) || presellProList[0].orderProduct[0].cart_info.product.image'>
</image>
</view> </view>
<view class="more_btn"><text class="iconfont icon-gengduo3"></text></view> <view class="more_btn"><text class="iconfont icon-gengduo3"></text></view>
</view> </view>
@ -63,7 +68,9 @@
<view class="acea-row row-middle left-wrapper"> <view class="acea-row row-middle left-wrapper">
{{item.group_order_sn}} {{item.group_order_sn}}
</view> </view>
<view class='t-color'>{{ item.orderList[0].activity_type === 2 && item.orderList[0].orderProduct[0].cart_info.productPresell.presell_type ==2 ? "待付定金" : "待付款" }}</view> <view class='t-color'>
{{ item.orderList[0].activity_type === 2 && item.orderList[0].orderProduct[0].cart_info.productPresell.presell_type ==2 ? "待付定金" : "待付款" }}
</view>
</view> </view>
<view v-for="(order,j) in item.orderList" :key="order.order_id+j"> <view v-for="(order,j) in item.orderList" :key="order.order_id+j">
<!--预售--> <!--预售-->
@ -71,28 +78,36 @@
<block v-for="(goods,g) in order.orderProduct"> <block v-for="(goods,g) in order.orderProduct">
<view class='item-info acea-row row-between row-top'> <view class='item-info acea-row row-between row-top'>
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image> <image
:src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'>
</image>
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name line1'> <view class='name line1'>
<text class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text> <text
class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text>
<view class="event_ship event_color">发货时间 <view class="event_ship event_color">发货时间
<!--全款预售--> <!--全款预售-->
<text v-if="goods.cart_info.productPresell.presell_type === 1"> <text
v-if="goods.cart_info.productPresell.presell_type === 1">
{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内 {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
</text> </text>
<!--定金预售--> <!--定金预售-->
<text v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text>
</view> </view>
</view> </view>
<view class='money'> <view class='money'>
<view>{{goods.cart_info.productPresellAttr.presell_price}}</view> <view>{{goods.cart_info.productPresellAttr.presell_price}}
</view>
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
</view> </view>
</view> </view>
<view v-if="goods.cart_info.productPresell.presell_type === 2" class="event_price"> <view v-if="goods.cart_info.productPresell.presell_type === 2"
class="event_price">
定金待支付 <text class="t-color">{{ order.pay_price }}</text> 定金待支付 <text class="t-color">{{ order.pay_price }}</text>
尾款待支付 <text class="t-color">{{ order.presellOrder.pay_price }}</text> 尾款待支付 <text
class="t-color">{{ order.presellOrder.pay_price }}</text>
</view> </view>
</view> </view>
</block> </block>
@ -101,14 +116,18 @@
<block v-for="(goods,g) in order.orderProduct"> <block v-for="(goods,g) in order.orderProduct">
<view class='item-info acea-row row-between row-top'> <view class='item-info acea-row row-between row-top'>
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image> <image
:src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'>
</image>
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name line2'>{{goods.cart_info.product.store_name}}</view> <view class='name line2'>{{goods.cart_info.product.store_name}}
</view>
<view class='money' v-if="item.orderList[0].activity_type == 4"> <view class='money' v-if="item.orderList[0].activity_type == 4">
<view v-if="goods.cart_info.activeSku">{{goods.cart_info.activeSku.active_price}}</view> <view v-if="goods.cart_info.activeSku">
{{goods.cart_info.activeSku.active_price}}</view>
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
</view> </view>
<view v-else class='money'> <view v-else class='money'>
@ -120,11 +139,13 @@
</block> </block>
</view> </view>
</view> </view>
<view class='totalPrice' v-if="item.orderList[0].activity_type !== 2">{{item.total_num || 0}}件商品总金额 <view class='totalPrice' v-if="item.orderList[0].activity_type !== 2">
{{item.total_num || 0}}件商品总金额
<text class='money p-color'>{{item.pay_price}}</text> <text class='money p-color'>{{item.pay_price}}</text>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<view class='bnt b-color' @click.stop='goPay(item.pay_price,item.group_order_id)'>立即付款</view> <view class='bnt b-color' @click.stop='goPay(item.pay_price,item.group_order_id)'>
立即付款</view>
</view> </view>
</view> </view>
</view> </view>
@ -139,32 +160,46 @@
<view class="store-name">{{item.merchant.mer_name}}</view> <view class="store-name">{{item.merchant.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</view> </view>
<view v-if="item.status == 0" class='t-color'>
<text v-if="item.order_type==1">{{item.takeOrderCount > 0 ? '部分核销' : '待核销'}}</text> <view v-if="item.order_status ==7" class='t-color'>
<text v-else>待发货</text> <text
v-if="item.order_type==1">{{item.takeOrderCount > 0 ? '部分核销' : '待核销'}}</text>
<!-- <text v-else>待发货</text> -->
</view> </view>
<view v-if="item.status == 1" class='t-color'>待收货</view> <view v-if="item.order_status == 2 && item.pay_type !=3" class='t-color'>待发货</view>
<view v-if="item.status == 2" class='t-color'>待评价</view> <view v-if="item.order_status == 1 && item.pay_type==3" class='t-color'>待付款</view>
<view v-if="item.status == 3" class='t-color'>已完成</view> <view v-if="item.order_status == 3" class='t-color'>待收货</view>
<view v-if="item.status == -1" class='t-color'>已退款</view> <view v-if="item.order_status == 4 && item.pay_type !== 8" class='t-color'>待评价</view>
<view v-if="item.order_status == 5" class='t-color'>已完成</view>
<view v-if="item.order_status == 6" class='t-color'>已退款</view>
<view v-if="item.order_status == 8 && item.pay_type == 8" class='t-color'>待结算</view>
</view> </view>
<view v-if="item.activity_type === 2"> <view v-if="item.activity_type === 2">
<view class='item-info acea-row row-between row-top' v-for="(goods,index) in item.orderProduct" :key="index"> <view class='item-info acea-row row-between row-top'
v-for="(goods,index) in item.orderProduct" :key="index">
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image> <image
:src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'>
</image>
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name '> <view class='name '>
<view class='name' :class="item.status === 0 ? 'line1' : 'line2'"> <view class='name' :class="item.status === 0 ? 'line1' : 'line2'">
<text class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text> <text
class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text>
<view v-if="item.status == 0" class="event_ship event_color">发货时间 <view v-if="item.status == 0" class="event_ship event_color">发货时间
<!--全款预售--> <!--全款预售-->
<text v-if="goods.cart_info.productPresell.presell_type === 1">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="goods.cart_info.productPresell.presell_type === 1">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text>
<!--定金预售--> <!--定金预售-->
<text v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text>
</view> </view>
</view> </view>
<view style="margin-top: 10rpx;" class="t-color">{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}</view> <view style="margin-top: 10rpx;" class="t-color">
{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
</view>
</view> </view>
<view class='money'> <view class='money'>
<view>{{goods.cart_info.productPresellAttr.presell_price}}</view> <view>{{goods.cart_info.productPresellAttr.presell_price}}</view>
@ -174,23 +209,30 @@
</view> </view>
</view> </view>
<view v-else> <view v-else>
<view class='item-info acea-row row-between row-top' v-for="(goods,index) in item.orderProduct" :key="index"> <view class='item-info acea-row row-between row-top'
v-for="(goods,index) in item.orderProduct" :key="index">
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image> <image
:src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'>
</image>
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name '> <view class='name '>
<view class='name line2'> <view class='name line2'>
<text>{{goods.cart_info.product.store_name}}</text> <text>{{goods.cart_info.product.store_name}}</text>
</view> </view>
<view style="margin-top: 10rpx;" class="t-color">{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}</view> <view style="margin-top: 10rpx;" class="t-color">
{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
</view>
</view> </view>
<view class='money' v-if="item.activity_type == 3"> <view class='money' v-if="item.activity_type == 3">
<view v-if="goods.cart_info.productAssistAttr">{{goods.cart_info.productAssistAttr.assist_price}}</view> <view v-if="goods.cart_info.productAssistAttr">
{{goods.cart_info.productAssistAttr.assist_price}}</view>
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
</view> </view>
<view class='money' v-else-if="item.activity_type == 4"> <view class='money' v-else-if="item.activity_type == 4">
<view v-if="goods.cart_info.activeSku">{{goods.cart_info.activeSku.active_price}}</view> <view v-if="goods.cart_info.activeSku">
{{goods.cart_info.activeSku.active_price}}</view>
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
</view> </view>
<view class='money' v-else> <view class='money' v-else>
@ -208,27 +250,36 @@
</view> </view>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt' @click.stop='applyInvoice(item.order_id)'>申请开票</view> <!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> -->
<block v-if="item.status == 0 || item.status == 9 || item.status == -1"> <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>
</block> </block>
<block v-if="item.status == 1"> <block v-if="item.status == 1">
<view class='bnt cancelBnt' v-if="item.delivery_type == 1 || item.delivery_type == 2" @click='goOrderDetails(item.order_id)'>查看物流</view> <view class='bnt cancelBnt'
<view class='bnt b-color' @tap='confirmOrder(item,index)'>确认收货</view> v-if="item.delivery_type == 1 || item.delivery_type == 2"
@click='goOrderDetails(item.order_id)'>查看物流</view>
<view class='bnt b-color' @tap='confirmOrder(item,index)'>取件码</view>
</block> </block>
<block v-if="item.status == 2"> <block v-if="item.status == 2">
<navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none"> <!--
<navigator v-if="community_status == 1 && !item.community_id"
:url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id+'&type='+1"
class='bnt colorBnt' hover-class="none">
<text class="iconfont icon-fabu"></text> <text class="iconfont icon-fabu"></text>
发布种草 发布种草
</navigator> </navigator> -->
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价</view> <view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价
</view>
</block> </block>
<block v-if="item.status == 3"> <block v-if="item.status == 3">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-if="item.activity_type == 2 || item.activity_type == 3 || item.activity_type == 10">查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)'
<navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none"> v-if="item.activity_type == 2 || item.activity_type == 3 || item.activity_type == 10">
查看详情</view>
<!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none">
<text class="iconfont icon-fabu"></text> <text class="iconfont icon-fabu"></text>
发布种草 发布种草
</navigator> </navigator> -->
<view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-else>再次购买</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-else>再次购买</view>
</block> </block>
</view> </view>
@ -245,12 +296,13 @@
</view> </view>
<home></home> <home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment> <payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
:totalPrice='totalPrice'></payment>
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing> <addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
</view> </view>
</template> </template>
<script> <script>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | CRMEB [ CRMEB ] // | CRMEB [ CRMEB ]
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
@ -274,15 +326,23 @@
import { import {
getUserInfo getUserInfo
} from '@/api/user.js'; } from '@/api/user.js';
import {openOrderSubscribe} from '@/utils/SubscribeMessage.js'; import {
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
import payment from '@/components/payment'; import payment from '@/components/payment';
import home from '@/components/home/index.vue'; import home from '@/components/home/index.vue';
import addInvoicing from '@/components/addInvoicing'; import addInvoicing from '@/components/addInvoicing';
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import emptyPage from '@/components/emptyPage.vue'; import emptyPage from '@/components/emptyPage.vue';
import { configMap } from '@/utils' import {
import { HTTP_REQUEST_URL } from '@/config/app'; configMap
} from '@/utils'
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default { export default {
components: { components: {
payment, payment,
@ -341,14 +401,14 @@
}; };
}, },
computed: { computed: {
...mapGetters(['isLogin','viewColor']), ...mapGetters(['isLogin', 'viewColor']),
...configMap(['hide_mer_status', 'community_status', 'alipay_open', 'yue_pay_status']), ...configMap(['hide_mer_status', 'community_status', 'alipay_open', 'yue_pay_status']),
}, },
watch: { watch: {
alipay_open(n){ alipay_open(n) {
this.payMode[1].payStatus = n this.payMode[1].payStatus = n
}, },
yue_pay_status(n){ yue_pay_status(n) {
this.payMode[2].payStatus = n this.payMode[2].payStatus = n
} }
}, },
@ -360,22 +420,30 @@
this.getOrderData(); this.getOrderData();
this.getOrderList(); this.getOrderList();
this.getUserInfo(); this.getUserInfo();
this.getpreSellOrderList(); // this.getpreSellOrderList();
} else { } else {
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true this.isShowAuth = true
} }
}, },
onReady(){ onReady() {},
}, mounted: function() {},
mounted: function() {
},
methods: { methods: {
// 退
returns() {
uni.navigateBack()
},
//
goHome() {
uni.switchTab({
url: '/pages/index/index'
});
},
// //
goMall(item){ goMall(item) {
if(this.hide_mer_status == 0){ if (this.hide_mer_status == 0) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/store/home/index?id='+item.mer_id url: '/pages/store/home/index?id=' + item.mer_id
}) })
} }
}, },
@ -421,7 +489,9 @@
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function(options) {
if (options.status) this.orderStatus = options.status; if (options.status) this.orderStatus = options.status;
}, },
/** /**
* 获取订单统计数据 * 获取订单统计数据
@ -429,7 +499,9 @@
*/ */
getOrderData: function() { getOrderData: function() {
let that = this; let that = this;
orderData().then(res => { orderData({
product_type: 0
}).then(res => {
that.$set(that, 'orderData', res.data); that.$set(that, 'orderData', res.data);
}) })
}, },
@ -493,7 +565,9 @@
* 去订单详情 * 去订单详情
*/ */
goOrderDetails: function(order_id) { goOrderDetails: function(order_id) {
let self = this let self = this
if (!order_id) return that.$util.Tips({ if (!order_id) return that.$util.Tips({
title: '缺少订单号无法查看订单详情' title: '缺少订单号无法查看订单详情'
}); });
@ -501,12 +575,19 @@
uni.showLoading({ uni.showLoading({
title: '正在加载', title: '正在加载',
}) })
openOrderSubscribe().then(() => { openOrderSubscribe().then(() => {
uni.hideLoading(); uni.hideLoading();
if (self.orderStatus == 0) { if (self.orderStatus == 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + order_id
}) })
} else if (self.orderStatus == 1) {
uni.navigateTo({
url: `/pages/order_details/stay?order_id=${order_id}&orderStatus=${self.orderStatus}`
})
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: '/pages/order_details/index?order_id=' + order_id
@ -521,6 +602,13 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + order_id
}) })
} else if (self.orderStatus == 1) {
// uni.navigateTo({
// url: '/pages/order_details/index?order_id=' + order_id
// })
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
})
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: '/pages/order_details/index?order_id=' + order_id
@ -564,6 +652,7 @@
*/ */
statusClick: function(status) { statusClick: function(status) {
if (status == this.orderStatus) return; if (status == this.orderStatus) return;
this.orderStatus = status; this.orderStatus = status;
this.loadend = false; this.loadend = false;
this.loading = false; this.loading = false;
@ -580,18 +669,20 @@
if (that.loading) return; if (that.loading) return;
that.loading = true; that.loading = true;
that.loadTitle = "加载更多"; that.loadTitle = "加载更多";
if(that.isReady){ if (that.isReady) {
that.isReady = false that.isReady = false
if (that.orderStatus == 0) { if (that.orderStatus == 0) {
groupOrderList({ groupOrderList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 0
}).then(res => { }).then(res => {
that.isReady = true; that.isReady = true;
let list = res.data.list || []; let list = res.data.list || [];
let loadend = list.length < that.limit; let loadend = list.length < that.limit;
// console.log(that.orderList) // console.log(that.orderList)
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that.orderList); that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that
.orderList);
that.$set(that, 'orderList', that.orderList); that.$set(that, 'orderList', that.orderList);
// console.log(that.orderList) // console.log(that.orderList)
that.getProductCount(); that.getProductCount();
@ -601,14 +692,22 @@
that.page = that.page + 1 that.page = that.page + 1
}) })
} else { } else {
let arr;
if (that.orderStatus > -1) {
arr = that.orderStatus
} else {
arr = ''
}
getOrderList({ getOrderList({
status: that.orderStatus - 1, status: arr,
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 0
}).then(res => { }).then(res => {
let list = res.data.list || []; let list = res.data.list || [];
let loadend = list.length < that.limit; let loadend = list.length < that.limit;
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that.orderList); that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that
.orderList);
that.$set(that, 'orderList', that.orderList); that.$set(that, 'orderList', that.orderList);
that.getProductCount(); that.getProductCount();
that.loadend = loadend; that.loadend = loadend;
@ -641,15 +740,15 @@
/** /**
* 获取单个订单商品数量 * 获取单个订单商品数量
*/ */
getProductCount: function(){ getProductCount: function() {
if(this.orderStatus !== 0){ if (this.orderStatus !== 0) {
this.orderList.forEach((item,i) => { this.orderList.forEach((item, i) => {
let orderNum = 0 let orderNum = 0
if(item.orderProduct){ if (item.orderProduct) {
item.orderProduct.forEach((val) => { item.orderProduct.forEach((val) => {
orderNum += val.product_num orderNum += val.product_num
}) })
this.orderList[i]['orderNum']=orderNum; this.orderList[i]['orderNum'] = orderNum;
} }
}) })
} }
@ -676,28 +775,40 @@
}, },
// //
confirmOrder: function(item, index) { confirmOrder: function(item, index) {
let that = this;
uni.showModal({ uni.showModal({
title: '确认收货', title: '取件码',
content: '为保障权益,请收到货确认无误后,再确认收货', content: item.logistics_code,
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
orderTake(item.order_id).then(res => { // console.log('');
return that.$util.Tips({ } else if (res.cancel) {
title: '操作成功', // console.log('');
icon: 'success'
}, function() {
that.orderList.splice(index, 1);
that.getOrderData();
});
}).catch(err => {
return that.$util.Tips({
title: err
});
})
} }
} }
}) })
// let that = this;
// uni.showModal({
// title: '',
// content: '',
// success: function(res) {
// if (res.confirm) {
// orderTake(item.order_id).then(res => {
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, function() {
// that.orderList.splice(index, 1);
// that.getOrderData();
// });
// }).catch(err => {
// return that.$util.Tips({
// title: err
// });
// })
// }
// }
// })
}, },
/*申请开票*/ /*申请开票*/
applyInvoice(order_id) { applyInvoice(order_id) {
@ -709,13 +820,13 @@
}, },
// //
changeInvoiceClose: function(data) { changeInvoiceClose: function(data) {
if(data)this.getInvoiceData(data); if (data) this.getInvoiceData(data);
this.$set(this.invoice, 'invoice', false); this.$set(this.invoice, 'invoice', false);
}, },
// //
getInvoiceData(data) { getInvoiceData(data) {
let that = this let that = this
applyInvoiceApi(that.invoice_order_id,data).then(res => { applyInvoiceApi(that.invoice_order_id, data).then(res => {
return that.$util.Tips({ return that.$util.Tips({
title: res.message, title: res.message,
}); });
@ -730,17 +841,34 @@
this.getOrderList(); this.getOrderList();
} }
} }
</script> </script>
<style scoped lang="scss">
.head-menu {
height: 50rpx;
padding-left: 20rpx;
line-height: 50rpx;
font-weight: bold;
}
<style scoped lang="scss">
.my-order .header { .my-order .header {
height: 260rpx; height: 260rpx;
padding: 0 30rpx; padding: 0 30rpx;
background-color: var(--view-theme); background-color: var(--view-theme);
} }
.t-color{color: var(--view-theme);}
.p-color{color: var(--view-priceColor);} .t-color {
.b-color{background-color:var(--view-theme);} color: var(--view-theme);
}
.p-color {
color: var(--view-priceColor);
}
.b-color {
background-color: var(--view-theme);
}
.my-order .header .picTxt { .my-order .header .picTxt {
height: 190rpx; height: 190rpx;
} }
@ -859,13 +987,16 @@
width: 320rpx; width: 320rpx;
color: #282828; color: #282828;
} }
.event_bg{
.event_bg {
background: #FF7F00; background: #FF7F00;
} }
.event_color{
.event_color {
color: #FF7F00; color: #FF7F00;
} }
.my-order .list .item .event_name{
.my-order .list .item .event_name {
display: inline-block; display: inline-block;
margin-right: 9rpx; margin-right: 9rpx;
color: #fff; color: #fff;
@ -875,13 +1006,16 @@
text-align: center; text-align: center;
border-radius: 6rpx; border-radius: 6rpx;
} }
.my-order .list .item .event_ship{
.my-order .list .item .event_ship {
font-size: 20rpx; font-size: 20rpx;
margin-top: 10rpx; margin-top: 10rpx;
} }
.my-order .list .event_price{
.my-order .list .event_price {
margin: 0 0 50rpx 120rpx; margin: 0 0 50rpx 120rpx;
} }
.my-order .list .item .item-info .text .money { .my-order .list .item .item-info .text .money {
text-align: right; text-align: right;
} }
@ -920,14 +1054,17 @@
border: 1px solid #ddd; border: 1px solid #ddd;
color: #aaa; color: #aaa;
} }
.my-order .list .item .bottom .bnt.colorBnt { .my-order .list .item .bottom .bnt.colorBnt {
border: 1px solid var(--view-theme); border: 1px solid var(--view-theme);
color: var(--view-theme); color: var(--view-theme);
} }
.my-order .list .item .bottom .bnt .icon-fabu{
.my-order .list .item .bottom .bnt .icon-fabu {
font-size: 26rpx; font-size: 26rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.my-order .list .item .bottom .bnt~.bnt { .my-order .list .item .bottom .bnt~.bnt {
margin-left: 17rpx; margin-left: 17rpx;
} }
@ -947,7 +1084,8 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.event_container{
.event_container {
width: 690rpx; width: 690rpx;
background-image: url(../static/images/presell_orderBg.png); background-image: url(../static/images/presell_orderBg.png);
background-size: cover; background-size: cover;
@ -955,30 +1093,37 @@
margin: 20rpx auto; margin: 20rpx auto;
padding: 26rpx 30rpx; padding: 26rpx 30rpx;
border-radius: 16rpx; border-radius: 16rpx;
.info{
.info {
width: 420rpx; width: 420rpx;
.title{
.title {
color: #282828; color: #282828;
font-size: 26rpx; font-size: 26rpx;
} }
.desc{
.desc {
color: #999; color: #999;
font-size: 24rpx; font-size: 24rpx;
margin-top: 30rpx; margin-top: 30rpx;
} }
} }
.photo{
.photo {
width: 180rpx; width: 180rpx;
.picture{
.picture {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
image{
image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 8rpx; border-radius: 8rpx;
} }
} }
.more_btn{
.more_btn {
color: #fff; color: #fff;
background: #F97E3B; background: #F97E3B;
width: 40rpx; width: 40rpx;
@ -988,7 +1133,8 @@
line-height: 40rpx; line-height: 40rpx;
position: relative; position: relative;
top: 40rpx; top: 40rpx;
text{
text {
font-size: 20rpx; font-size: 20rpx;
} }
} }
@ -1009,4 +1155,4 @@
font-size: 23rpx; font-size: 23rpx;
} }
} }
</style> </style>

View File

@ -110,11 +110,24 @@
<view class="store-name">{{item.merchant.mer_name}}</view> <view class="store-name">{{item.merchant.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</view> </view>
<view v-if="item.status == 0" class='t-color'>待发货</view>
<view v-if="item.status == 1" class='t-color'>待收货</view>
<view v-if="item.status == 2" class='t-color'>待评价</view>
<view v-if="item.status == 3" class='t-color'>已完成</view>
<view v-if="item.status == -1" class='t-color'>已退款</view> <view v-if="item.order_status == 2 &&item.pay_type==0&& item.pay_type !=3"
class='t-color'>待发货</view>
<view v-if="item.order_status == 1 &&item.pay_type==0 && item.pay_type==3"
class='t-color'>待付款</view>
<view v-if="item.order_status == 3" class='t-color'>待收货</view>
<view v-if="item.order_status == 4 && item.pay_type !== 8" class='t-color'>待评价
</view>
<view v-if="item.order_status == 5" class='t-color'>已完成</view>
<view v-if="item.order_status == 6" class='t-color'>已退款</view>
<view v-if="item.order_status == 8 && item.pay_type == 8" class='t-color'>待结算
</view>
</view> </view>
<view v-if="item.activity_type === 2"> <view v-if="item.activity_type === 2">
<view class='item-info acea-row row-between row-top' v-for="(goods,index) in item.orderProduct" :key="index"> <view class='item-info acea-row row-between row-top' v-for="(goods,index) in item.orderProduct" :key="index">
@ -185,18 +198,18 @@
<view class='bnt b-color' @tap='confirmOrder(item,index)'>确认收货</view> <view class='bnt b-color' @tap='confirmOrder(item,index)'>确认收货</view>
</block> </block>
<block v-if="item.status == 2"> <block v-if="item.status == 2">
<navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none"> <!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id+'&type='+1" class='bnt colorBnt' hover-class="none">
<text class="iconfont icon-fabu"></text> <text class="iconfont icon-fabu"></text>
发布种草 发布种草
</navigator> </navigator> -->
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价</view> <view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价</view>
</block> </block>
<block v-if="item.status == 3"> <block v-if="item.status == 3">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-if="item.activity_type == 2 || item.activity_type == 3 || item.activity_type == 10">查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-if="item.activity_type == 2 || item.activity_type == 3 || item.activity_type == 10">查看详情</view>
<navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none"> <!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id+'&type='+1" class='bnt colorBnt' hover-class="none">
<text class="iconfont icon-fabu"></text> <text class="iconfont icon-fabu"></text>
发布种草 发布种草
</navigator> </navigator> -->
<view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-else>再次购买</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-else>再次购买</view>
</block> </block>
</view> </view>

View File

@ -1,7 +1,8 @@
<template> <template>
<view class="refund-list" :style="viewColor"> <view class="refund-list" :style="viewColor">
<view class="tab-box"> <view class="tab-box">
<view class="item" v-for="(item,index) in tabList" :key="index" :class="{'active':index == tabIndex}" @click="bindTab(index)">{{item.title}}</view> <view class="item" v-for="(item,index) in tabList" :key="index" :class="{'active':index == tabIndex}"
@click="bindTab(index)">{{item.title}}</view>
</view> </view>
<view class="goods-wrapper"> <view class="goods-wrapper">
<view v-if="goodsList.length > 0"> <view v-if="goodsList.length > 0">
@ -15,7 +16,9 @@
<view class="product-item" v-for="goods in item.refundProduct" :key="goods.order_product_id"> <view class="product-item" v-for="goods in item.refundProduct" :key="goods.order_product_id">
<image class="img-box" :src="goods.product.cart_info.product.image" mode=""></image> <image class="img-box" :src="goods.product.cart_info.product.image" mode=""></image>
<view class="msg"> <view class="msg">
<view class="name line1"><text v-if="goods.product.cart_info.product_type === 2" class="event_name event_bg">预售</text>{{goods.product.cart_info.product.store_name}}</view> <view class="name line1"><text v-if="goods.product.cart_info.product_type === 2"
class="event_name event_bg">预售</text>{{goods.product.cart_info.product.store_name}}
</view>
<view class="des">{{goods.product.cart_info.productAttr.sku}}</view> <view class="des">{{goods.product.cart_info.productAttr.sku}}</view>
<view class="price">退款{{goods.refund_price}}</view> <view class="price">退款{{goods.refund_price}}</view>
<view class="num">x {{goods.refund_num}}</view> <view class="num">x {{goods.refund_num}}</view>
@ -76,98 +79,128 @@
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
let app = getApp(); let app = getApp();
import { refundList,refundDel } from '@/api/order.js' import {
import { mapGetters } from "vuex"; refundList,
import { configMap } from '@/utils'; refundDel
export default{ } from '@/api/order.js'
computed:{ import {
mapGetters
} from "vuex";
import {
configMap
} from '@/utils';
export default {
computed: {
...mapGetters(['viewColor']), ...mapGetters(['viewColor']),
...configMap(['hide_mer_status']) ...configMap(['hide_mer_status'])
}, },
data(){ data() {
return { return {
tabIndex:0, tabIndex: 0,
tabList:[ tabList: [{
{ title: '全部'
title:'全部'
}, },
{ {
title:'处理中' title: '处理中'
}, },
{ {
title:'已处理' title: '已处理'
}, },
], ],
goodsList:[], goodsList: [],
isScroll:true, isScroll: true,
page:1, page: 1,
limit:15, limit: 15,
type: 0
} }
}, },
onLoad() { onLoad(e) {
if (e.type) {
this.type = e.type
this.getList(this.type);
} else {
this.getList(); this.getList();
}
}, },
onReady(){ onReady() {},
}, mounted: function() {},
mounted: function() { methods: {
}, goStore(item) {
methods:{ if (this.hide_mer_status == 0) {
goStore(item){
if(this.hide_mer_status == 0){
uni.navigateTo({ uni.navigateTo({
url:`/pages/store/home/index?id=${item.merchant.mer_id}` url: `/pages/store/home/index?id=${item.merchant.mer_id}`
}) })
} }
}, },
goPage(id){ goPage(id) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/goods/index?id='+id url: '/pages/users/refund/goods/index?id=' + id
}) })
}, },
applyAgain(item){ applyAgain(item) {
uni.navigateTo({ uni.navigateTo({
url:`/pages/order_details/index?order_id=${item.refundProduct[0].product.order_id}` url: `/pages/order_details/index?order_id=${item.refundProduct[0].product.order_id}`
}) })
}, },
bindTab(index){ bindTab(index) {
this.tabIndex = index this.tabIndex = index
this.page =1 this.page = 1
this.isScroll = true this.isScroll = true
this.goodsList = [] this.goodsList = []
this.getList() this.getList()
}, },
getList(){ getList() {
if(!this.isScroll) return if (!this.isScroll) return
if (this.type == 0) {
refundList({ refundList({
type:this.tabIndex, type: this.tabIndex,
page:this.page, page: this.page,
limit:this.limit limit: this.limit
}).then(({data})=>{ }).then(({
this.isScroll = data.list.length>=this.limit data
}) => {
this.isScroll = data.list.length >= this.limit
this.goodsList = this.goodsList.concat(data.list) this.goodsList = this.goodsList.concat(data.list)
this.page+=1 this.page += 1
}) })
} else {
refundList({
product_type: this.type,
type: this.tabIndex,
page: this.page,
limit: this.limit
}).then(({
data
}) => {
this.isScroll = data.list.length >= this.limit
this.goodsList = this.goodsList.concat(data.list)
this.page += 1
})
}
}, },
// //
goDetail(item){ goDetail(item) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/detail?id='+item.refund_order_id url: '/pages/users/refund/detail?id=' + item.refund_order_id
}) })
}, },
// //
bindDetele(item,index){ bindDetele(item, index) {
let self = this let self = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定删除该记录吗?', content: '确定删除该记录吗?',
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
refundDel(item.refund_order_id).then(res=>{ refundDel(item.refund_order_id).then(res => {
self.goodsList.splice(index,1) self.goodsList.splice(index, 1)
}) })
uni.showToast({ uni.showToast({
title:'删除成功', title: '删除成功',
icon:'none' icon: 'none'
}) })
} else if (res.cancel) { } else if (res.cancel) {
// console.log(''); // console.log('');
@ -183,15 +216,16 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.refund-list{ .refund-list {
.tab-box{ .tab-box {
z-index: 50; z-index: 50;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
display: flex; display: flex;
.item{
.item {
flex: 1; flex: 1;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -199,67 +233,80 @@
height: 90rpx; height: 90rpx;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
&.active{
&.active {
color: var(--view-theme); color: var(--view-theme);
border-color: var(--view-theme); border-color: var(--view-theme);
} }
} }
} }
.goods-wrapper{
.goods-wrapper {
margin-top: 102rpx; margin-top: 102rpx;
} }
.info-box{
.info-box {
position: relative; position: relative;
margin-top: 12rpx; margin-top: 12rpx;
background-color: #fff; background-color: #fff;
.title{ .title {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 32rpx; padding: 0 32rpx;
height: 86rpx; height: 86rpx;
border-bottom: 1px solid #F0F0F0; border-bottom: 1px solid #F0F0F0;
color: #282828; color: #282828;
.icon-shangjiadingdan{
.icon-shangjiadingdan {
font-size: 32rpx; font-size: 32rpx;
} }
.txt{
margin: 0 5rpx ; .txt {
margin: 0 5rpx;
} }
.icon-xiangyou{
.icon-xiangyou {
color: #999; color: #999;
font-size: 20rpx; font-size: 20rpx;
margin-top: 6rpx; margin-top: 6rpx;
} }
} }
.product-box{
.product-item{ .product-box {
.product-item {
display: flex; display: flex;
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
.img-box{
width:130rpx; .img-box {
height:130rpx; width: 130rpx;
border-radius:16rpx; height: 130rpx;
border-radius: 16rpx;
} }
.msg{
.msg {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
width: 440rpx; width: 440rpx;
margin-left: 26rpx; margin-left: 26rpx;
.name{
.name {
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
.des{
.des {
font-size: 20rpx; font-size: 20rpx;
color: #868686; color: #868686;
} }
.price{
.price {
font-size: 26rpx; font-size: 26rpx;
} }
.num{
.num {
position: absolute; position: absolute;
right: -80rpx; right: -80rpx;
top: 4rpx; top: 4rpx;
@ -268,7 +315,8 @@
} }
} }
} }
.event_name{
.event_name {
display: inline-block; display: inline-block;
margin-right: 9rpx; margin-right: 9rpx;
color: #fff; color: #fff;
@ -279,49 +327,58 @@
border-radius: 6rpx; border-radius: 6rpx;
} }
} }
.btn-box{
.btn-box {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
padding:0 20rpx 20rpx; padding: 0 20rpx 20rpx;
.btn{
width:176rpx; .btn {
height:60rpx; width: 176rpx;
height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
margin-left: 18rpx; margin-left: 18rpx;
text-align: center; text-align: center;
background: var(--view-theme); background: var(--view-theme);
border-radius:30rpx; border-radius: 30rpx;
color: #fff; color: #fff;
font-size: 27rpx; font-size: 27rpx;
&.gray{
border:1px solid #ddd; &.gray {
border: 1px solid #ddd;
background: transparent; background: transparent;
color: #aaa; color: #aaa;
} }
} }
} }
.status{
.status {
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
top: 0; top: 0;
.iconfont{
.iconfont {
font-size: 120rpx; font-size: 120rpx;
opacity: .3; opacity: .3;
} }
.p-color{
.p-color {
color: var(--view-theme); color: var(--view-theme);
} }
} }
} }
} }
.event_bg{
.event_bg {
background: #FF7F00; background: #FF7F00;
} }
.nothing { .nothing {
margin-top: 200rpx; margin-top: 200rpx;
text-align: center; text-align: center;
} }
.nothing_text{
.nothing_text {
margin-top: 20rpx; margin-top: 20rpx;
color: #999999; color: #999999;
} }

View File

@ -5,37 +5,52 @@
<view class='list'> <view class='list'>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'>姓名</view> <view class='name'>姓名</view>
<input type='text' placeholder='请输入姓名' name='real_name' :value="userAddress.real_name" placeholder-class='placeholder'></input> <input type='text' placeholder='请输入姓名' name='real_name' :value="userAddress.real_name"
placeholder-class='placeholder'></input>
</view> </view>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'>联系电话</view> <view class='name'>联系电话</view>
<input type='text' placeholder='请输入联系电话' name="phone" :value='userAddress.phone' placeholder-class='placeholder'></input> <input type='text' placeholder='请输入联系电话' name="phone" :value='userAddress.phone'
placeholder-class='placeholder'></input>
</view> </view>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'>所在地区</view> <view class='name'>所在地区</view>
<view class="region"> <view class="region">
<view class="region_count" @click="changeRegion"> <view class="region_count" @click="changeRegion">
<text v-if="!addressInfo.length" style="color:#cdcdcd;">请选择地</text> <text v-if="!addressInfo.length" style="color:#cdcdcd;">请选择地</text>
<text v-else>{{addressText}}</text> <text v-else>{{addressText}}</text>
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</view> </view>
</view> </view>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>所在村队</view>
<view class="region">
<view class="region_count" @click="changevillage">
<text v-if="!villageInfo.length" style="color:#cdcdcd;">请选择村队</text>
<text v-else>{{villageText}}</text>
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
</view> </view>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'>详细地址</view> <view class='name'>详细地址</view>
<input type='text' class="location-input" placeholder='请填写具体地址' name='detail' placeholder-class='placeholder' v-model="userAddress.detail"></input> <input type='text' class="location-input" placeholder='请填写具体地址' name='detail'
<view class="location" @click="selfLocation"> placeholder-class='placeholder' v-model="userAddress.detail"></input>
<!--<view class="location" @click="selfLocation">
<text class="iconfont icon-chakanditu"></text> <text class="iconfont icon-chakanditu"></text>
<br> <br>
定位 定位
</view> </view> -->
</view> </view>
</view> </view>
<view class='default acea-row row-middle'> <view class='default acea-row row-middle'>
<checkbox-group @change='ChangeIsDefault'> <checkbox-group @change='ChangeIsDefault'>
<checkbox :checked="userAddress.is_default ? true : false" />设置为默认地址</checkbox-group> <checkbox :checked="userAddress.is_default ? true : false" />设置为默认地址
</checkbox-group>
</view> </view>
<button class='keepBnt' form-type="submit">立即保存</button> <button class='keepBnt' form-type="submit">立即保存</button>
@ -43,12 +58,16 @@
<view class="wechatAddress" v-if="!address_id" @click="getWxAddress">导入微信地址</view> <view class="wechatAddress" v-if="!address_id" @click="getWxAddress">导入微信地址</view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<view class="wechatAddress" v-if="this.$wechat.isWeixin() && !address_id" @click="getAddress">导入微信地址</view> <view class="wechatAddress" v-if="this.$wechat.isWeixin() && !address_id" @click="getAddress">导入微信地址
</view>
<!-- #endif --> <!-- #endif -->
</view> </view>
</form> </form>
<areaWindow ref="areaWindow" :display="display" :address="addressInfo" <areaWindow ref="areaWindow" :display="display" :address="addressInfo" @submit="OnChangeAddress"
@submit="OnChangeAddress" @changeClose="changeClose"></areaWindow> @changeClose="changeClose"></areaWindow>
<villageTeam ref="villageTeam" :display="display_one" :address="villageInfo" :villageaddress="list"
@submit="OnChangevAddress" @changeClose="changevClose"></villageTeam>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view> </view>
</template> </template>
@ -63,16 +82,28 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { editAddress, getAddressDetail } from '@/api/user.js'; import {
import { getCityV2, getCityList } from '@/api/api.js'; editAddress,
import { mapGetters } from "vuex"; getAddressDetail
} from '@/api/user.js';
import {
getCityV2,
getCityList
} from '@/api/api.js';
import {
mapGetters
} from "vuex";
import areaWindow from '@/components/areaWindow'; import areaWindow from '@/components/areaWindow';
import { getGeocoder } from '@/api/store.js'; import villageTeam from '@/components/villageTeam/villageTeam.vue';
import {
getGeocoder
} from '@/api/store.js';
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
export default { export default {
components: { components: {
areaWindow, areaWindow,
authorize, authorize,
villageTeam
}, },
data() { data() {
return { return {
@ -92,14 +123,21 @@
multiIndex: [0, 0, 0], multiIndex: [0, 0, 0],
cityId: 0, cityId: 0,
display: false, display: false,
addressInfo:[], display_one: false,
addressInfo: [],
villageInfo: [],
list: [],
latitude: '', latitude: '',
longitude: '' longitude: ''
}; };
}, },
computed: {...mapGetters(['isLogin','viewColor']), computed: {
addressText(){ ...mapGetters(['isLogin', 'viewColor']),
return this.addressInfo.map(v=>v.name).join('/'); addressText() {
return this.addressInfo.map(v => v.name).join('/');
},
villageText() {
return this.villageInfo.map(v => v.name).join('/');
} }
}, },
onLoad(options) { onLoad(options) {
@ -119,8 +157,13 @@
} }
}, },
methods: { methods: {
OnChangeAddress(address){ OnChangeAddress(address) {
this.addressInfo = address; this.addressInfo = address;
this.list = address
},
OnChangevAddress(address) {
this.villageInfo = address;
console.log(this.villageInfo)
}, },
// //
getCityList: function() { getCityList: function() {
@ -129,13 +172,19 @@
this.district = res.data this.district = res.data
}) })
}, },
changeRegion(){ changeRegion() {
this.display = true; this.display = true;
}, },
changevillage() {
this.display_one = true;
},
// //
changeClose: function() { changeClose: function() {
this.display = false; this.display = false;
}, },
changevClose: function() {
this.display_one = false;
},
// //
onLoadFun: function() { onLoadFun: function() {
this.isShowAuth = false; this.isShowAuth = false;
@ -155,11 +204,12 @@
if (!this.address_id) return false; if (!this.address_id) return false;
let that = this; let that = this;
getAddressDetail(this.address_id).then(res => { getAddressDetail(this.address_id).then(res => {
let region = [res.data.province, res.data.city, res.data.district]; let region = [res.data.province, res.data.city, res.data.district, res.data.street, res.data.village];
that.$set(that, 'userAddress', res.data); that.$set(that, 'userAddress', res.data);
that.$set(that, 'region', region); that.$set(that, 'region', region);
that.city_id = res.data.city_id that.city_id = res.data.city_id
that.addressInfo = res.data.area that.addressInfo = res.data.areas
that.villageInfo = [res.data.brigade]
}); });
}, },
// //
@ -170,7 +220,8 @@
success: function(res) { success: function(res) {
uni.chooseAddress({ uni.chooseAddress({
success: function(res) { success: function(res) {
getCityList(res.provinceName+'/'+res.cityName+'/'+res.countyName).then(res=>{ getCityList(res.provinceName + '/' + res.cityName + '/' + res
.countyName).then(res => {
that.addressInfo = res.data; that.addressInfo = res.data;
}) })
that.userAddress.real_name = res.userName; that.userAddress.real_name = res.userName;
@ -183,7 +234,8 @@
icon: 'none', icon: 'none',
duration: 1000 duration: 1000
}); });
if (res.errMsg == 'chooseAddress:cancel') return that.$util.Tips({ if (res.errMsg == 'chooseAddress:cancel') return that.$util
.Tips({
title: '取消选择' title: '取消选择'
}); });
}, },
@ -212,7 +264,7 @@
getAddress() { getAddress() {
let that = this; let that = this;
that.$wechat.openAddress().then(res => { that.$wechat.openAddress().then(res => {
getCityList(res.provinceName+'/'+res.cityName+'/'+res.countryName).then(res=>{ getCityList(res.provinceName + '/' + res.cityName + '/' + res.countryName).then(res => {
that.addressInfo = res.data; that.addressInfo = res.data;
}) })
that.userAddress.real_name = res.userName; that.userAddress.real_name = res.userName;
@ -241,11 +293,15 @@
long: longitude long: longitude
}).then(res => { }).then(res => {
const data = res.data; const data = res.data;
getCityList(data.address_component.province+'/'+data.address_component.city+'/'+data.address_component.district+'/'+(!data.address_reference.town ? '' : data.address_reference.town.title)).then(res=>{ getCityList(data.address_component.province + '/' + data.address_component
.city + '/' + data.address_component.district + '/' + (!data
.address_reference.town ? '' : data.address_reference.town
.title)).then(res => {
self.addressInfo = res.data; self.addressInfo = res.data;
self.$set(self.userAddress, 'detail', data.formatted_addresses.recommend); self.$set(self.userAddress, 'detail', data.formatted_addresses
.recommend);
uni.hideLoading(); uni.hideLoading();
}).catch(e=>{ }).catch(e => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: '定位失败,请手动输入地址', title: '定位失败,请手动输入地址',
@ -253,7 +309,7 @@
duration: 1000 duration: 1000
}); });
}) })
}).catch(e=>{ }).catch(e => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: '定位失败,请手动输入地址', title: '定位失败,请手动输入地址',
@ -291,12 +347,16 @@
if (!that.addressInfo.length) return that.$util.Tips({ if (!that.addressInfo.length) return that.$util.Tips({
title: '请选择所在地区' title: '请选择所在地区'
}); });
if (!that.villageInfo.length) return that.$util.Tips({
title: '请选择所在村队'
});
if (!value.detail) return that.$util.Tips({ if (!value.detail) return that.$util.Tips({
title: '请填写详细地址' title: '请填写详细地址'
}); });
value.address_id = that.address_id; value.address_id = that.address_id;
value.is_default = that.userAddress.is_default ? 1 : 0; value.is_default = that.userAddress.is_default ? 1 : 0;
value.area = that.addressInfo; value.area = that.addressInfo;
value.brigade=that.villageInfo[0]
uni.showLoading({ uni.showLoading({
title: '保存中', title: '保存中',
@ -323,8 +383,10 @@
that.couponId = ''; that.couponId = '';
uni.$emit('updataAddress') uni.$emit('updataAddress')
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data url: '/pages/users/order_confirm/index?cartId=' + cartId +
.address_id) + '&pinkId=' + pinkId + '&couponId=' + couponId '&addressId=' + (that.id ? that.id : res.data
.address_id) + '&pinkId=' + pinkId + '&couponId=' +
couponId
}); });
} else { } else {
// #ifdef H5 // #ifdef H5
@ -353,74 +415,92 @@
<style scoped lang="scss"> <style scoped lang="scss">
/deep/checkbox .uni-checkbox-input.uni-checkbox-input-checked, /deep/checkbox .uni-checkbox-input.uni-checkbox-input-checked,
/deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked { /deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: 1px solid var(--view-theme)!important; border: 1px solid var(--view-theme) !important;
background-color: var(--view-theme)!important; background-color: var(--view-theme) !important;
color: #fff!important; color: #fff !important;
} }
.addAddress .list { .addAddress .list {
background-color: #fff; background-color: #fff;
} }
.addAddress .list .item { .addAddress .list .item {
padding: 30rpx; padding: 30rpx;
border-top: 1px solid #eee; border-top: 1px solid #eee;
position: relative; position: relative;
} }
.addAddress .list .item .location{
.addAddress .list .item .location {
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
top: 15rpx; top: 15rpx;
text-align: center; text-align: center;
font-size: 20rpx; font-size: 20rpx;
.iconfont{
.iconfont {
color: var(--view-theme); color: var(--view-theme);
} }
} }
.addAddress .list .item .name { .addAddress .list .item .name {
width: 195rpx; width: 195rpx;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
} }
.addAddress .list .item .address { .addAddress .list .item .address {
flex: 1; flex: 1;
margin-left: 20rpx; margin-left: 20rpx;
} }
.addAddress .list .item input,.region .region_count {
.addAddress .list .item input,
.region .region_count {
width: 475rpx; width: 475rpx;
font-size: 30rpx; font-size: 30rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.region .region_count{
.region .region_count {
height: 42rpx; height: 42rpx;
line-height: 42rpx; line-height: 42rpx;
.icon-xiangyou{
.icon-xiangyou {
float: right; float: right;
} }
} }
.addAddress .list .location-input{
.addAddress .list .location-input {
padding-right: 70rpx; padding-right: 70rpx;
} }
.addAddress .list .item .placeholder { .addAddress .list .item .placeholder {
color: #ccc; color: #ccc;
} }
.addAddress .list .item picker { .addAddress .list .item picker {
width: 475rpx; width: 475rpx;
} }
.addAddress .list .item picker .picker { .addAddress .list .item picker .picker {
width: 410rpx; width: 410rpx;
font-size: 30rpx; font-size: 30rpx;
} }
.addAddress .list .item picker .iconfont { .addAddress .list .item picker .iconfont {
font-size: 43rpx; font-size: 43rpx;
} }
.addAddress .default { .addAddress .default {
padding: 0 30rpx; padding: 0 30rpx;
height: 90rpx; height: 90rpx;
background-color: #fff; background-color: #fff;
margin-top: 23rpx; margin-top: 23rpx;
} }
.addAddress .default checkbox { .addAddress .default checkbox {
margin-right: 15rpx; margin-right: 15rpx;
} }
.addAddress .keepBnt { .addAddress .keepBnt {
width: 690rpx; width: 690rpx;
height: 86rpx; height: 86rpx;
@ -432,6 +512,7 @@
color: #fff; color: #fff;
background-color: var(--view-theme); background-color: var(--view-theme);
} }
.addAddress .wechatAddress { .addAddress .wechatAddress {
width: 690rpx; width: 690rpx;
height: 86rpx; height: 86rpx;

View File

@ -10,10 +10,10 @@
<view class='money'>{{userInfo.now_money || 0}}</view> <view class='money'>{{userInfo.now_money || 0}}</view>
</view> </view>
<!-- #ifdef APP-PLUS || H5 --> <!-- #ifdef APP-PLUS || H5 -->
<navigator v-if="recharge_switch == 1" url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator> <navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #ifdef MP -->
<view v-if="recharge_switch == 1" @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view> <view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
<!-- #endif --> <!-- #endif -->
</view> </view>
<view class='cumulative acea-row row-top'> <view class='cumulative acea-row row-top'>
@ -52,7 +52,7 @@
</navigator> </navigator>
</view> </view>
</view> </view>
<recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend> <recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
</view> </view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view> </view>

View File

@ -19,6 +19,7 @@
<view>协议规则</view> <view>协议规则</view>
<text class='iconfont icon-you'></text> <text class='iconfont icon-you'></text>
</view> </view>
<!-- #ifdef MP --> <!-- #ifdef MP -->
<view class='item acea-row row-between-wrapper' @click="Setting"> <view class='item acea-row row-between-wrapper' @click="Setting">
<view>隐私设置</view> <view>隐私设置</view>

View File

@ -54,7 +54,7 @@ body {overflow-x: hidden;}
-o-box-pack: end; -o-box-pack: end;
-ms-flex-pack: end; -ms-flex-pack: end;
-webkit-justify-content: flex-end; -webkit-justify-content: flex-end;
justify-content: flex-end justify-content: flex-end;
} }
.acea-row.row-left { .acea-row.row-left {
-webkit-box-pack: start; -webkit-box-pack: start;

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 827 B

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,10 +1,21 @@
import { getUserInfo } from "../../api/user.js"; import {
import { LOGIN_STATUS, UID } from '../../config/cache'; getUserInfo,
Appversion
} from "../../api/user.js";
import {
LOGIN_STATUS,
UID
} from '../../config/cache';
import Cache from '../../utils/cache'; import Cache from '../../utils/cache';
import { USER_INFO } from '../../config/cache'; import {
USER_INFO
} from '../../config/cache';
// #ifdef APP-PLUS
import Updater from '@/uni_modules/guyue-updater/index';
// #endif
const state = { const state = {
location: Cache.get('LOCATION_DATA',true) || {}, location: Cache.get('LOCATION_DATA', true) || {},
token: Cache.get(LOGIN_STATUS) || null, token: Cache.get(LOGIN_STATUS) || null,
backgroundColor: "#fff", backgroundColor: "#fff",
userInfo: null, userInfo: null,
@ -20,7 +31,6 @@ const state = {
const mutations = { const mutations = {
setLocation(state, data) { setLocation(state, data) {
// console.log(data);
state.location = data state.location = data
Cache.set('LOCATION_DATA', data); Cache.set('LOCATION_DATA', data);
}, },
@ -93,9 +103,80 @@ const actions = {
}).catch(() => { }).catch(() => {
}); });
},
async INIT_CONFIG({
state,
commit
}, data = false) {
const wgt_v = uni.getStorageSync('wgt_version') || '1.0.0';
// #ifdef APP-PLUS
let os = uni.getSystemInfoSync();
let apptype;
if (os.osName == 'ios') {
apptype = 2
} else {
apptype = 1
}
Appversion({
version: os.appWgtVersion,
type: apptype
}).then((res) => {
if (Object.keys(res.data.appInfo).length > 0) {
if(res.data.appInfo.version) uni.showLoading({
title: '检查更新中'
})
// 版本更新
if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 &&
compareVersions(res.data.appInfo.version,
wgt_v) == 1) {
try {
let info = res.data.appInfo || {};
let version = {
title: info.title || '发现新版本',
content: info.content || '修复了部分BUG',
versionName: info.version || '1.0.1',
downUrl: info.dow_url || '',
force: info.force == 1 ? true : false, // 是否强制更新
quiet: info.quiet == 1 ? true : false // 是否静默更新
}
Updater.update(version);
} catch (e) {
console.log(e);
}
uni.hideLoading();
}
}
}).catch((err) => {
// console.log(err)
})
// #endif
} }
}; };
function compareVersions(version1, version2) {
const arr1 = version1.split('.').map(Number);
const arr2 = version2.split('.').map(Number);
for (let i = 0; i < Math.max(arr1.length, arr2.length); i++) {
const num1 = i < arr1.length ? arr1[i] : 0;
const num2 = i < arr2.length ? arr2[i] : 0;
if (num1 > num2) {
return 1;
} else if (num1 < num2) {
return -1;
}
}
return 0;
}
export default { export default {
state, state,
mutations, mutations,

View File

@ -13,8 +13,8 @@
*/ */
@import '@/uni_modules/uview-ui/theme.scss'; @import '@/uni_modules/uview-ui/theme.scss';
/* 颜色变量 */ /* 颜色变量 */
$uni-theme-color: #F45846; $uni-theme-color: #f45846;
$uni-theme-bg-color: linear-gradient(180deg, #F98649 0%, #F34E45 100%); $uni-theme-bg-color: linear-gradient(180deg, #f98649 0%, #f34e45 100%);
/* 行为相关颜色 */ /* 行为相关颜色 */
$uni-color-primary: #007aff; $uni-color-primary: #007aff;
@ -24,31 +24,31 @@ $uni-color-error: #dd524d;
$uni-nothing-text: #999; //空白页文字 $uni-nothing-text: #999; //空白页文字
$theme-color:#E93323; $theme-color: #e93323;
$theme-color-opacity:rgba(233,51,35,.6); $theme-color-opacity: rgba(233, 51, 35, 0.6);
$bg-star: #f62c2c; $bg-star: #f62c2c;
$bg-end:#f96e29; $bg-end: #f96e29;
/* 背景颜色 */ /* 背景颜色 */
$uni-bg-color:#ffffff; $uni-bg-color: #ffffff;
$uni-bg-color-grey:#f8f8f8; $uni-bg-color-grey: #f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色 $uni-bg-color-hover: #f1f1f1; //点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 $uni-bg-color-mask: rgba(0, 0, 0, 0.4); //遮罩颜色
/* 边框颜色 */ /* 边框颜色 */
$uni-border-color:#c8c7cc; $uni-border-color: #c8c7cc;
/* 尺寸变量 */ /* 尺寸变量 */
/* 文字尺寸 */ /* 文字尺寸 */
$uni-font-size-sm:24upx; $uni-font-size-sm: 24upx;
$uni-font-size-base:28upx; $uni-font-size-base: 28upx;
$uni-font-size-lg:32upx; $uni-font-size-lg: 32upx;
/* 图片尺寸 */ /* 图片尺寸 */
$uni-img-size-sm:40upx; $uni-img-size-sm: 40upx;
$uni-img-size-base:52upx; $uni-img-size-base: 52upx;
$uni-img-size-lg:80upx; $uni-img-size-lg: 80upx;
/* Border Radius */ /* Border Radius */
$uni-border-radius-sm: 4upx; $uni-border-radius-sm: 4upx;
@ -70,9 +70,9 @@ $uni-spacing-col-lg: 24upx;
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */ /* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色 $uni-color-title: #2c405a; // 文章标题颜色
$uni-font-size-title:40upx; $uni-font-size-title: 40upx;
$uni-color-subtitle: #555555; // 二级标题颜色 $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36upx; $uni-font-size-subtitle: 36upx;
$uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph:30upx; $uni-font-size-paragraph: 30upx;