全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug
246
App.vue
|
@ -1,74 +1,179 @@
|
|||
<!-- <template>
|
||||
<view>
|
||||
<iframe ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
|
||||
scrolling="no" src="https://java.crmeb.net">
|
||||
</iframe>
|
||||
</view>
|
||||
</template> -->
|
||||
<script>
|
||||
import { checkLogin } from "./libs/login";
|
||||
import { HTTP_REQUEST_URL } from './config/app';
|
||||
import {
|
||||
checkLogin
|
||||
} from "./libs/login";
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from './config/app';
|
||||
import Auth from './libs/wechat.js';
|
||||
import Routine from './libs/routine.js';
|
||||
import Apps from './libs/apps.js';
|
||||
import {
|
||||
mapActions
|
||||
} from 'vuex'
|
||||
|
||||
export default {
|
||||
globalData: {
|
||||
spid: 0,
|
||||
code:0,
|
||||
isLogin:false,
|
||||
userInfo:{},
|
||||
MyMenus:[]
|
||||
},
|
||||
code: 0,
|
||||
isLogin: false,
|
||||
userInfo: {},
|
||||
MyMenus: [],
|
||||
windowHeight: 0,
|
||||
id: 0
|
||||
},
|
||||
onLaunch: function(option) {
|
||||
let that = this;
|
||||
// #ifdef H5
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
// 首页没有title获取的整个页面的高度,里面的页面有原生标题要减掉就是视口的高度
|
||||
// 状态栏是动态的可以拿到 标题栏是固定写死的是44px
|
||||
let height = res.windowHeight - res.statusBarHeight - 44
|
||||
// #ifdef H5
|
||||
that.globalData.windowHeight = res.windowHeight + 'px'
|
||||
// #endif
|
||||
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef MP
|
||||
if (HTTP_REQUEST_URL==''){
|
||||
console.error("请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret");
|
||||
return false;
|
||||
}
|
||||
if (option.query.hasOwnProperty('scene')){
|
||||
switch (option.scene) {
|
||||
//扫描小程序码
|
||||
case 1047:
|
||||
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
|
||||
that.globalData.code = val.pid;
|
||||
break;
|
||||
//长按图片识别小程序码
|
||||
case 1048:
|
||||
that.globalData.code = option.query.scene;
|
||||
break;
|
||||
//手机相册选取小程序码
|
||||
case 1049:
|
||||
that.globalData.code = option.query.scene;
|
||||
break;
|
||||
//直接进入小程序
|
||||
case 1001:
|
||||
that.globalData.spid = option.query.scene;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
if (HTTP_REQUEST_URL == '') {
|
||||
console.error(
|
||||
"请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if (option.query.hasOwnProperty('scene')) {
|
||||
switch(option.scene){
|
||||
case 1047: //扫描小程序码
|
||||
case 1048: //长按图片识别小程序码
|
||||
case 1049: //手机相册选取小程序码
|
||||
case 1001: //直接进入小程序
|
||||
let value = this.$util.getUrlParams(decodeURIComponent(option.query.scene));
|
||||
let values = value.split(',');
|
||||
if(values.length === 2){
|
||||
let v1 = values[0].split(":");
|
||||
if (v1[0] === 'pid') {
|
||||
that.globalData.spid = v1[1];
|
||||
} else{
|
||||
that.globalData.id = v1[1];
|
||||
}
|
||||
let v2 = values[1].split(":");
|
||||
if (v2[0] === 'pid') {
|
||||
that.globalData.spid = v2[1];
|
||||
}else{
|
||||
that.globalData.id = v2[1];
|
||||
}
|
||||
}else{
|
||||
that.globalData.spid = values[0].split(":")[1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
// 获取导航高度;
|
||||
uni.getSystemInfo({
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
|
||||
}
|
||||
}
|
||||
});
|
||||
// #ifdef MP
|
||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
that.globalData.navH = menuButtonInfo.top * 2 + menuButtonInfo.height / 2;
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
let snsapiBase = 'snsapi_base';
|
||||
let urlData = location.pathname + location.search;
|
||||
if (!that.$store.getters.isLogin && Auth.isWeixin()) {
|
||||
const {
|
||||
code,
|
||||
state,
|
||||
scope
|
||||
} = option.query;
|
||||
if (code && code != uni.getStorageSync('snsapiCode') && location.pathname.indexOf(
|
||||
'/pages/users/wechat_login/index') === -1) {
|
||||
// 存储静默授权code
|
||||
uni.setStorageSync('snsapiCode', code);
|
||||
let spread = that.globalData.spid ? that.globalData.spid : 0;
|
||||
Auth.auth(code, that.$Cache.get('spread'))
|
||||
.then(res => {
|
||||
uni.setStorageSync('snRouter', decodeURIComponent(decodeURIComponent(option.query
|
||||
.back_url)));
|
||||
if (res.type === 'register') {
|
||||
this.$Cache.set('snsapiKey', res.key);
|
||||
}
|
||||
if (res.type === 'login') {
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.token
|
||||
});
|
||||
this.$store.commit("SETUID", res.uid);
|
||||
location.replace(decodeURIComponent(decodeURIComponent(option.query.back_url)));
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
// this.$util.Tips({
|
||||
// title: error
|
||||
// });
|
||||
if (!this.$Cache.has('snsapiKey')) {
|
||||
if (location.pathname.indexOf('/pages/users/wechat_login/index') === -1) {
|
||||
Auth.oAuth(snsapiBase, option.query.back_url);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!this.$Cache.has('snsapiKey')) {
|
||||
if (location.pathname.indexOf('/pages/users/wechat_login/index') === -1) {
|
||||
Auth.oAuth(snsapiBase, urlData);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (option.query.back_url) {
|
||||
location.replace(uni.getStorageSync('snRouter'));
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef MP
|
||||
// 小程序静默授权
|
||||
if (!this.$store.getters.isLogin) {
|
||||
let spread = that.globalData.spid ? that.globalData.spid : 0;
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
Routine.authUserInfo(code, {
|
||||
'spread_spid': spread
|
||||
}).then(res => {
|
||||
// that.$store.commit('AuthorizeType', res.data.type);
|
||||
})
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
if(this.$store.getters.isLogin && !this.$Cache.get('USER_INFO'))await this.$store.dispatch('USERINFO');
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
onShow: function() {
|
||||
// #ifdef H5
|
||||
uni.getSystemInfo({
|
||||
success(e){
|
||||
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
|
||||
if(e.windowWidth>420 && !window.top.isPC && !/iOS|Android/i.test(e.system)){
|
||||
// window.location.pathname = 'https://java.crmeb.net/';
|
||||
/* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
|
||||
window.location.pathname = '/static/html/pc.html';
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
// #ifdef H5
|
||||
uni.getSystemInfo({
|
||||
success(e) {
|
||||
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
|
||||
if (e.windowWidth > 420 && !window.top.isPC && !/iOS|Android/i.test(e.system)) {
|
||||
// window.location.pathname = 'https://java.crmeb.net/';
|
||||
/* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
|
||||
window.location.pathname = '/static/html/pc.html';
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
onHide: function() {
|
||||
//console.log('App Hide')
|
||||
}
|
||||
|
@ -81,32 +186,39 @@
|
|||
@import 'static/iconfont/iconfont.css';
|
||||
@import 'static/css/guildford.css';
|
||||
@import 'static/css/style.scss';
|
||||
|
||||
|
||||
/* 条件编译,仅在H5平台生效 */
|
||||
// #ifdef H5
|
||||
body::-webkit-scrollbar,html::-webkit-scrollbar {
|
||||
display: none;
|
||||
body::-webkit-scrollbar,
|
||||
html::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// #endif
|
||||
view{
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.bg-color-red {
|
||||
background-color: #e93323!important;
|
||||
background-color: #E93323 !important;
|
||||
}
|
||||
.syspadding{
|
||||
|
||||
.syspadding {
|
||||
padding-top: var(--status-bar-height);
|
||||
}
|
||||
.flex{
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.uni-scroll-view::-webkit-scrollbar {
|
||||
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
|
||||
display: none
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
</style><!-- -->
|
||||
</style>
|
||||
|
|
|
@ -55,7 +55,7 @@ export function getBargainList(data) {
|
|||
* @param object data
|
||||
*/
|
||||
export function getBargainUserList(data){
|
||||
return request.get('bargain/user/list',data);
|
||||
return request.get('bargain/record',data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -76,12 +76,13 @@ export function getBargainDetail(id) {
|
|||
}
|
||||
|
||||
/**
|
||||
* 砍价 开启砍价用户信息
|
||||
* 用户砍价信息,注意自己的活动和别人的活动的区别
|
||||
*/
|
||||
export function postBargainStartUser(data) {
|
||||
return request.get("bargain/start/user", data);
|
||||
export function getBargainUser(data) {
|
||||
return request.get("bargain/user", data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 砍价开启
|
||||
*/
|
||||
|
@ -110,20 +111,6 @@ export function postBargainHelpList(params,data) {
|
|||
return request.get("bargain/help/list?limit="+params.limit+"&page="+params.page, data,{});
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
|
||||
*/
|
||||
export function postBargainHelpCount(data) {
|
||||
return request.get("bargain/help/count", data,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价 观看/分享/参与次数
|
||||
*/
|
||||
export function postBargainShare(bargainId) {
|
||||
return request.get("bargain/share/" + bargainId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀产品时间区间
|
||||
*
|
||||
|
@ -193,5 +180,41 @@ export function scombinationCode(id) {
|
|||
* @param int id
|
||||
*/
|
||||
export function getSeckillHeaderApi(){
|
||||
return request.get('seckill/header',{},{noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页秒杀产品列表
|
||||
*/
|
||||
export function getSeckillIndexApi(){
|
||||
return request.get('seckill/index',{},{noAuth:true});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 首页拼团产品列表
|
||||
*/
|
||||
export function getCombinationIndexApi(){
|
||||
return request.get('combination/index',{},{noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页砍价产品列表
|
||||
*/
|
||||
export function getBargainIndexApi(){
|
||||
return request.get('bargain/index',{},{noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页砍价产品列表
|
||||
*/
|
||||
export function bargainHeaderApi(){
|
||||
return request.get('bargain/header');
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼图列表头部
|
||||
*/
|
||||
export function combinationHeaderApi(){
|
||||
return request.get('combination/header');
|
||||
}
|
|
@ -120,9 +120,6 @@ export function verifyCode(){
|
|||
export function registerVerify(phone){
|
||||
return request.post('sendCode', { phone: phone },{noAuth:true},1)
|
||||
}
|
||||
// export function registerVerify(phone, reset, key, code){
|
||||
// return request.post('register/verify', { phone: phone, type: reset === undefined ? 'reset' : reset, key: key, code: code },{noAuth:true})
|
||||
// }
|
||||
|
||||
/**
|
||||
* 手机号注册
|
||||
|
|
44
api/order.js
|
@ -4,10 +4,8 @@ import request from "@/utils/request.js";
|
|||
* 获取购物车列表
|
||||
* @param numType boolean true 购物车数量,false=购物车产品数量
|
||||
*/
|
||||
export function getCartCounts(numType) {
|
||||
return request.get("cart/count", {
|
||||
numType: numType === undefined ? true : numType
|
||||
});
|
||||
export function getCartCounts(numType,type) {
|
||||
return request.get("cart/count?numType=" + numType + "&type=" + type);
|
||||
}
|
||||
/**
|
||||
* 获取购物车列表
|
||||
|
@ -184,8 +182,8 @@ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain
|
|||
* @param string price
|
||||
*
|
||||
*/
|
||||
export function getCouponsOrderPrice(data) {
|
||||
return request.get('coupons/order', data)
|
||||
export function getCouponsOrderPrice(preOrderNo) {
|
||||
return request.get(`coupons/order/${preOrderNo}`)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -194,8 +192,8 @@ export function getCouponsOrderPrice(data) {
|
|||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function orderCreate(key, data) {
|
||||
return request.post('order/create/' + key, data);
|
||||
export function orderCreate(data) {
|
||||
return request.post('order/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -204,8 +202,8 @@ export function orderCreate(key, data) {
|
|||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export function postOrderComputed(key, data) {
|
||||
return request.post("order/computed/" + key, data);
|
||||
export function postOrderComputed(data) {
|
||||
return request.post("order/computed/price", data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -229,5 +227,29 @@ export function wechatOrderPay(data) {
|
|||
* @param object data
|
||||
*/
|
||||
export function wechatQueryPayResult(data) {
|
||||
return request.get('pay/queryPayResult', data);
|
||||
return request.get('pay/queryPayResult?orderNo=' + data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请退款商品详情
|
||||
* @param object data
|
||||
*/
|
||||
export function applyRefund(orderId) {
|
||||
return request.get(`order/apply/refund/${orderId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 预下单
|
||||
* @param object data
|
||||
*/
|
||||
export function preOrderApi(data) {
|
||||
return request.post(`order/pre/order`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载预下单
|
||||
* @param object preOrderNo
|
||||
*/
|
||||
export function loadPreOrderApi(preOrderNo) {
|
||||
return request.get(`order/load/pre/${preOrderNo}`);
|
||||
}
|
|
@ -12,22 +12,15 @@ export function getWechatConfig() {
|
|||
return request.get("wechat/config",{ url: encodeURIComponent(wechat.signLink()) },{ noAuth: true });
|
||||
}
|
||||
|
||||
// export function getWechatConfig() {
|
||||
// return request.get(
|
||||
// "wechat/config",
|
||||
// { url: encodeURIComponent(location.href.split('#')[0]) },
|
||||
// { noAuth: true }
|
||||
// );
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取微信sdk配置
|
||||
* @returns {*}
|
||||
*/
|
||||
export function wechatAuth(code, spread, login_type) {
|
||||
export function wechatAuth(code, spread) {
|
||||
var reg=/^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 ,判断正整数用/^[1-9]+[0-9]*]*$/
|
||||
spread = reg.test(spread) ? spread : 0;
|
||||
return request.get(
|
||||
"wechat/authorize/login",
|
||||
{ code, spread_spid:spread, login_type },
|
||||
"wechat/authorize/login?code=" + code + "&spread_spid=" + spread, {},
|
||||
{ noAuth: true }
|
||||
);
|
||||
}
|
||||
|
@ -98,14 +91,26 @@ export function getUserPhone(data){
|
|||
}
|
||||
|
||||
/**
|
||||
* 静默授权
|
||||
* APP微信登录
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function silenceAuth(data) {
|
||||
//#ifdef MP
|
||||
return request.get("wechat/authorize/program/login", data, { noAuth : true });
|
||||
//#endif
|
||||
//#ifdef H5
|
||||
return request.get("wechat/authorize/login", data, { noAuth : true });
|
||||
//#endif
|
||||
export function appAuth(data) {
|
||||
return request.post("wechat/authorize/app/login", data, { noAuth : true });
|
||||
}
|
||||
|
||||
/**
|
||||
* 苹果登录
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function appleLogin(data) {
|
||||
return request.post("ios/login", data, { noAuth : true });
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 苹果绑定手机号
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function iosBinding(data) {
|
||||
return request.post("ios/binding/phone", data, { noAuth : true });
|
||||
}
|
46
api/store.js
|
@ -5,8 +5,8 @@ import request from "@/utils/request.js";
|
|||
* @param int id
|
||||
*
|
||||
*/
|
||||
export function getProductDetail(id) {
|
||||
return request.get('product/detail/' + id, {}, {
|
||||
export function getProductDetail(id, type) {
|
||||
return request.get('product/detail/' + id + '?type=' + type, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
@ -41,15 +41,20 @@ export function collectAdd(id, category) {
|
|||
}
|
||||
|
||||
/**
|
||||
* 删除收藏产品
|
||||
* 取消收藏产品
|
||||
* @param int id
|
||||
* @param string category product=普通产品,product_seckill=秒杀产品
|
||||
*/
|
||||
export function collectDel(id, category) {
|
||||
return request.post('collect/del', {
|
||||
id: id,
|
||||
'category': category === undefined ? 'product' : category
|
||||
});
|
||||
export function collectDel(proId) {
|
||||
return request.post(`collect/cancel/${proId}`);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除收藏产品
|
||||
* @param string id
|
||||
*/
|
||||
export function collectDelete(ids) {
|
||||
return request.post(`collect/delete`,ids);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -111,7 +116,7 @@ export function collectAll(id, category) {
|
|||
*
|
||||
*/
|
||||
export function getGroomList(type, data) {
|
||||
return request.get('groom/list/' + type, data, {
|
||||
return request.get('index/product/' + type, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
@ -163,3 +168,24 @@ export function getSearchKeyword() {
|
|||
export function storeListApi(data) {
|
||||
return request.post("store/list", data, {}, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 优品推荐
|
||||
* @param object data
|
||||
*/
|
||||
export function getProductGood() {
|
||||
return request.get('product/good');
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页产品评论
|
||||
* @param int id
|
||||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function getReplyProduct(id) {
|
||||
return request.get('reply/product/' + id, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
32
api/user.js
|
@ -46,9 +46,6 @@ export function getCodeApi() {
|
|||
export function registerVerify(phone){
|
||||
return request.post('sendCode', { phone: phone },{noAuth:true},1)
|
||||
}
|
||||
// export function registerVerify(data) {
|
||||
// return request.post("register/verify", data, { noAuth : true });
|
||||
// }
|
||||
|
||||
/**
|
||||
* h5用户手机号注册
|
||||
|
@ -176,7 +173,7 @@ export function spreadCount(type){
|
|||
}
|
||||
|
||||
/*
|
||||
* 推广数据
|
||||
* 推广数据 当前佣金 提现总金额
|
||||
* */
|
||||
export function getSpreadInfo() {
|
||||
return request.get("commission");
|
||||
|
@ -316,6 +313,13 @@ export function rechargeWechat(data) {
|
|||
return request.post("recharge/wechat", data);
|
||||
}
|
||||
|
||||
/*
|
||||
* app微信充值
|
||||
* */
|
||||
export function appWechat(data) {
|
||||
return request.post("recharge/wechat/app", data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 余额充值
|
||||
* */
|
||||
|
@ -365,7 +369,7 @@ export function getChatRecord(to_uid, data) {
|
|||
*/
|
||||
export function spread(puid)
|
||||
{
|
||||
return request.get("user/bindSpread?spreadPid=" + puid);
|
||||
return request.get("user/bindSpread?spreadPid="+ puid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -414,5 +418,23 @@ export function getBillList(data)
|
|||
return request.get("recharge/bill/record",data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 积分中心详情
|
||||
* */
|
||||
export function postIntegralUser() {
|
||||
return request.get("integral/user");
|
||||
}
|
||||
|
||||
/*
|
||||
* 立即提现 冻结期、冻结佣金、可提现佣金、最低可提现金额
|
||||
* */
|
||||
export function extractUser() {
|
||||
return request.get("extract/user");
|
||||
}
|
||||
|
||||
/*
|
||||
* 推广人统计页 推广人数(一级+二级)、一级人数、二级人数
|
||||
* */
|
||||
export function spreadPeoCount() {
|
||||
return request.get("spread/people/count");
|
||||
}
|
|
@ -10,8 +10,7 @@
|
|||
<button class='item grant' @click="setUserInfo">去授权</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<!-- <button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button> -->
|
||||
<button hover-class="none" @tap="getUserProfile" class='item grant'>微信登录</button>
|
||||
<button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
|
@ -59,52 +58,6 @@
|
|||
this.setAuthStatus();
|
||||
},
|
||||
methods:{
|
||||
getUserProfile() {
|
||||
let self = this;
|
||||
uni.showLoading({
|
||||
title: '正在登录中'
|
||||
});
|
||||
Routine.getUserProfile()
|
||||
.then(res => {
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
self.getWxUser(code, res);
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
|
||||
getWxUser(code, res) {
|
||||
let self = this
|
||||
let userInfo = res.userInfo;
|
||||
userInfo.code = code;
|
||||
userInfo.spread_spid = app.globalData.spid; //获取推广人ID
|
||||
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
|
||||
userInfo.avatar = userInfo.userInfo.avatarUrl;
|
||||
userInfo.city = userInfo.userInfo.city;
|
||||
userInfo.country = userInfo.userInfo.country;
|
||||
userInfo.nickName = userInfo.userInfo.nickName;
|
||||
userInfo.province = userInfo.userInfo.province;
|
||||
userInfo.sex = userInfo.userInfo.gender;
|
||||
userInfo.type = 'routine'
|
||||
Routine.authUserInfo(code,userInfo).then(res=>{
|
||||
uni.hideLoading();
|
||||
this.$emit('authColse',false);
|
||||
this.$emit('onLoadFun',this.userInfo);
|
||||
}).catch(res=>{
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none',
|
||||
duration:2000
|
||||
});
|
||||
});
|
||||
},
|
||||
setAuthStatus(){
|
||||
Routine.authorize().then(res=>{
|
||||
if(res.islogin === false)
|
||||
|
@ -118,7 +71,6 @@
|
|||
},
|
||||
getUserInfo(code){
|
||||
Routine.getUserInfo().then(res=>{
|
||||
console.log('res',res);
|
||||
let userInfo = res.userInfo
|
||||
userInfo.code = code;
|
||||
userInfo.spread_spid = app.globalData.spid;//获取推广人ID
|
||||
|
@ -187,7 +139,7 @@
|
|||
.Popup .bottom .item{width:50%;height:80rpx;background-color:#eeeeee;text-align:center;line-height:80rpx;font-size:24rpx;color:#666;margin-top:54rpx;}
|
||||
.Popup .bottom .item.on{width: 100%}
|
||||
.flex{display:flex;}
|
||||
.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:#e93323;border-radius:0;padding:0;}
|
||||
.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:$theme-color;border-radius:0;padding:0;}
|
||||
.mask{position:fixed;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,0.65);z-index:310;}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -45,21 +45,26 @@
|
|||
isLog: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
//地址列表
|
||||
addressList: [],
|
||||
is_loading: true
|
||||
is_loading: true,
|
||||
addressList: []
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
tapAddress: function(e, addressid) {
|
||||
this.active = e;
|
||||
this.$emit('OnChangeAddress', addressid);
|
||||
let a = {};
|
||||
for (let i = 0, leng = this.addressList.length; i < leng; i++) {
|
||||
if (this.addressList[i].id == addressid) {
|
||||
a = this.addressList[i];
|
||||
}
|
||||
}
|
||||
this.$emit('OnChangeAddress', a);
|
||||
},
|
||||
close: function() {
|
||||
this.$emit('changeClose');
|
||||
|
@ -79,14 +84,18 @@
|
|||
limit: 5
|
||||
}).then(res => {
|
||||
let addressList = res.data.list;
|
||||
that.$set(that, 'addressList', addressList);
|
||||
that.is_loading = false;
|
||||
let defaultAddress = {};
|
||||
//处理默认选中项
|
||||
if(!that.address.addressId) return;
|
||||
for (let i = 0, leng = addressList.length; i < leng; i++) {
|
||||
if (addressList[i].id == that.address.addressId) {
|
||||
that.active = i;
|
||||
defaultAddress = this.addressList[i];
|
||||
}
|
||||
}
|
||||
that.$set(that, 'addressList', addressList);
|
||||
that.is_loading = false;
|
||||
this.$emit('OnDefaultAddress', defaultAddress);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<view class="time" :style="justifyLeft">
|
||||
<text class="red" v-if="tipText">{{ tipText }}</text>
|
||||
<text class="styleAll" v-if="isDay === true">{{ day }}</text>
|
||||
<text class="timeTxt red" v-if="dayText">{{ dayText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""'>{{ hour }}</text>
|
||||
<text class="timeTxt red" v-if="hourText">{{ hourText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""'>{{ minute }}</text>
|
||||
<text class="timeTxt red" v-if="minuteText">{{ minuteText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""'>{{ second }}</text>
|
||||
<text class="timeTxt red" v-if="secondText">{{ secondText }}</text>
|
||||
<text class="" v-if="tipText">{{ tipText }}</text>
|
||||
<text class="styleAll p6" v-if="isDay === true" :style="{background:bgColor.bgColor,color:bgColor.Color}">{{ day }}{{bgColor.isDay?'天':''}}</text>
|
||||
<text class="timeTxt" v-if="dayText" :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ dayText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ hour }}</text>
|
||||
<text class="timeTxt" v-if="hourText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ hourText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ minute }}</text>
|
||||
<text class="timeTxt" v-if="minuteText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ minuteText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ second }}</text>
|
||||
<text class="timeTxt" v-if="secondText">{{ secondText }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -52,6 +52,10 @@
|
|||
isCol: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bgColor: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
|
@ -112,7 +116,29 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.p6{
|
||||
padding: 0 8rpx;
|
||||
}
|
||||
.styleAll{
|
||||
/* color: #fff; */
|
||||
font-size: 24rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
/* padding: 0 6rpx; */
|
||||
}
|
||||
.timeTxt{
|
||||
text-align: center;
|
||||
/* width: 16rpx; */
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
.whit{
|
||||
color: #fff !important;
|
||||
}
|
||||
.time {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -124,13 +150,13 @@
|
|||
}
|
||||
|
||||
.timeCol {
|
||||
width: 40rpx;
|
||||
/* width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align:center;
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
font-size: 24rpx;
|
||||
font-size: 24rpx; */
|
||||
color: #E93323;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,110 +1,235 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class='coupon-list-window' :class='coupon.coupon==true?"on":""'>
|
||||
<view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view>
|
||||
<view class='coupon-list' v-if="coupon.list.length">
|
||||
<view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" @click="getCouponUser(index,item.id)" :key='index'>
|
||||
<view class='money acea-row row-column row-center-wrapper' :class='item.isUse?"moneyGray":""'>
|
||||
<view>¥<text class='num'>{{item.money?Number(item.money):''}}</text></view>
|
||||
<view class="pic-num">满{{item.minPrice}}元可用</view>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='condition line2'>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-if='item.useType===1'>通用</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-else-if='item.useType===3'>品类</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-else>商品</span>
|
||||
<span>{{item.name}}</span>
|
||||
<view v-if="!orderShow" class="nav acea-row row-around">
|
||||
<view :class="['acea-row', 'row-middle', type === 1 ? 'on' : '']" @click="setType(1)">通用券</view>
|
||||
<view :class="['acea-row', 'row-middle', type === 2 ? 'on' : '']" @click="setType(2)">商品券</view>
|
||||
<view :class="['acea-row', 'row-middle', type === 3 ? 'on' : '']" @click="setType(3)">品类券</view>
|
||||
</view>
|
||||
<!-- <view class="occupy" v-if="!orderShow"></view> -->
|
||||
<!-- <view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view> -->
|
||||
<view class='coupon-list' :style="{'margin-top':!orderShow?'0':'50rpx'}">
|
||||
<block v-if="coupon.list.length">
|
||||
<!-- <view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" :key='index'> -->
|
||||
<view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list"
|
||||
@click="getCouponUser(index,item.id)" :key='index'>
|
||||
<view class='money acea-row row-column row-center-wrapper' :class='item.isUse?"moneyGray":""'>
|
||||
<view>¥<text class='num'>{{item.money?Number(item.money):''}}</text></view>
|
||||
<view class="pic-num">满{{item.minPrice}}元可用</view>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='condition line2'>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-if='item.useType===1'>通用</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""'
|
||||
v-else-if='item.useType===3'>品类</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-else>商品</span>
|
||||
<span>{{item.name}}</span>
|
||||
</view>
|
||||
<view class='data acea-row row-between-wrapper'>
|
||||
<view v-if="item.day>0">领取后{{item.day}}天内可用</view>
|
||||
<view v-else>
|
||||
{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}
|
||||
</view>
|
||||
<view class='bnt gray' v-if="item.isUse">{{item.use_title || '已领取'}}</view>
|
||||
<view class='bnt bg-color' v-else>{{coupon.statusTile || '立即领取'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='data acea-row row-between-wrapper'>
|
||||
<view v-if="item.day>0">领取后{{item.day}}天内可用</view>
|
||||
<view v-else>{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}</view>
|
||||
<view class='bnt gray' v-if="item.isUse">{{item.use_title || '已领取'}}</view>
|
||||
<view class='bnt bg-color' v-else>{{coupon.statusTile || '立即领取'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 无优惠券 -->
|
||||
<view class='pictrue' v-else><image src='../../static/images/noCoupon.png'></image></view>
|
||||
</block>
|
||||
<!-- 无优惠券 -->
|
||||
<view class='pictrue' v-else>
|
||||
<image src='../../static/images/noCoupon.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class='mask' catchtouchmove="true" :hidden='coupon.coupon==false' @click='close'></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { setCouponReceive } from '@/api/api.js';
|
||||
import {
|
||||
setCouponReceive
|
||||
} from '@/api/api.js';
|
||||
export default {
|
||||
props: {
|
||||
//打开状态 0=领取优惠券,1=使用优惠券
|
||||
openType: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
coupon: {
|
||||
type: Object,
|
||||
default: function(){
|
||||
return {};
|
||||
}
|
||||
}
|
||||
openType: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
coupon: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
//下单页面使用优惠券组件不展示tab切换页
|
||||
orderShow: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
type: 1
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
close: function () {
|
||||
this.$emit('ChangCouponsClone');
|
||||
},
|
||||
getCouponUser:function(index,id){
|
||||
let that = this;
|
||||
let list = that.coupon.list;
|
||||
if (list[index].isUse == true && this.openType==0) return true;
|
||||
switch (this.openType){
|
||||
case 0:
|
||||
//领取优惠券
|
||||
let ids = [];
|
||||
ids.push(id);
|
||||
setCouponReceive(id).then(res=>{
|
||||
that.$emit('ChangCouponsUseState', index);
|
||||
that.$util.Tips({title: "领取成功"});
|
||||
that.$emit('ChangCoupons', list[index]);
|
||||
})
|
||||
break;
|
||||
case 1:
|
||||
that.$emit('ChangCoupons',index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
close: function() {
|
||||
this.type = 1
|
||||
this.$emit('ChangCouponsClone');
|
||||
},
|
||||
getCouponUser: function(index, id) {
|
||||
let that = this;
|
||||
let list = that.coupon.list;
|
||||
if (list[index].isUse == true && this.openType == 0) return true;
|
||||
switch (this.openType) {
|
||||
case 0:
|
||||
//领取优惠券
|
||||
let ids = [];
|
||||
ids.push(id);
|
||||
setCouponReceive(id).then(res => {
|
||||
that.$emit('ChangCouponsUseState', index);
|
||||
that.$util.Tips({
|
||||
title: "领取成功"
|
||||
});
|
||||
that.$emit('ChangCoupons', list[index]);
|
||||
})
|
||||
break;
|
||||
case 1:
|
||||
that.$emit('ChangCoupons', index);
|
||||
break;
|
||||
}
|
||||
},
|
||||
setType: function(type) {
|
||||
this.type = type;
|
||||
this.$emit('tabCouponType', type);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.coupon-list-window{position:fixed;bottom:0;left:0;width:100%;background-color:#f5f5f5;border-radius:16rpx 16rpx 0 0;z-index:555;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);}
|
||||
.coupon-list-window.on{transform:translate3d(0,0,0);}
|
||||
.coupon-list-window .title{height:124rpx;width:100%;text-align:center;line-height:124rpx;font-size:32rpx;font-weight:bold;position:relative;}
|
||||
.coupon-list-window .title .iconfont{position:absolute;right:30rpx;top:50%;transform:translateY(-50%);font-size:35rpx;color:#8a8a8a;font-weight:normal;}
|
||||
.coupon-list-window .coupon-list{margin:0 0 50rpx 0;height:550rpx;overflow:auto;}
|
||||
.coupon-list-window .pictrue{width:414rpx;height:336rpx;margin:0 auto 50rpx auto;}
|
||||
.coupon-list-window .pictrue image{width:100%;height:100%;}
|
||||
.pic-num{color: #fff;font-size: 24rpx;}
|
||||
.line-title{
|
||||
width:90rpx;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
background:rgba(255,247,247,1);
|
||||
border:1px solid rgba(232,51,35,1);
|
||||
opacity:1;
|
||||
border-radius:20rpx;
|
||||
font-size:20rpx;
|
||||
color: #E83323;
|
||||
margin-right: 12rpx;
|
||||
.coupon-list-window {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
z-index: 555;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
}
|
||||
.line-title.gray{
|
||||
border-color:#BBB;
|
||||
color:#bbb;
|
||||
background-color:#F5F5F5;
|
||||
|
||||
.coupon-list-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.coupon-list-window .title {
|
||||
height: 124rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 124rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.coupon-list-window .title .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.coupon-list-window .coupon-list {
|
||||
margin: 0 0 30rpx 0;
|
||||
height: 823rpx;
|
||||
overflow: auto;
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.coupon-list-window .pictrue {
|
||||
width: 414rpx;
|
||||
height: 336rpx;
|
||||
margin: 208rpx auto;
|
||||
}
|
||||
|
||||
.coupon-list-window .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pic-num {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.line-title {
|
||||
width: 90rpx;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
background: rgba(255, 247, 247, 1);
|
||||
border: 1px solid rgba(232, 51, 35, 1);
|
||||
opacity: 1;
|
||||
border-radius: 20rpx;
|
||||
font-size: 20rpx;
|
||||
color: #E83323;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.line-title.gray {
|
||||
border-color: #BBB;
|
||||
color: #bbb;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.nav {
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
border-bottom: 2rpx solid #F5F5F5;
|
||||
border-top-left-radius: 16rpx;
|
||||
border-top-right-radius: 16rpx;
|
||||
background-color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.nav .acea-row {
|
||||
border-top: 5rpx solid transparent;
|
||||
border-bottom: 5rpx solid transparent;
|
||||
}
|
||||
|
||||
.nav .acea-row.on {
|
||||
border-bottom-color: #E93323;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.nav .acea-row:only-child {
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
|
||||
.occupy {
|
||||
height: 106rpx;
|
||||
}
|
||||
|
||||
.coupon-list .item {
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.coupon-list .item .money {
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 200rpx;
|
||||
padding-bottom: 60rpx;
|
||||
image{
|
||||
width: 414rpx;
|
||||
height: 240rpx;
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
border-radius: 50rpx;
|
||||
opacity: 0;
|
||||
height: 0;
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view v-if="isUp">
|
||||
<view class="mobile-bg" @click="close"></view>
|
||||
<view class="mobile-mask animated" :class="{slideInUp:isUp}">
|
||||
<view class="mobile-bg" v-if="isShow" @click="close"></view>
|
||||
<view class="mobile-mask animated" :class="{slideInUp:isUp}" :style="{position:isPos?'fixed':'static'}">
|
||||
<view class="input-item">
|
||||
<input type="text" v-model="account" placeholder="输入手机号" />
|
||||
</view>
|
||||
|
@ -9,7 +9,7 @@
|
|||
<input type="text" v-model="codeNum" placeholder="输入验证码" />
|
||||
<button class="code" :disabled="disabled" @click="code">{{text}}</button>
|
||||
</view>
|
||||
<view class="sub_btn" @click="loginBtn">立即登录</view>
|
||||
<view class="sub_btn" @click="loginBtn">{{(!userInfo.phone && isLogin) || (userInfo.phone && isLogin)?'立即绑定':'立即登录'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -18,6 +18,7 @@
|
|||
const app = getApp();
|
||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import Routine from '@/libs/routine';
|
||||
import {mapGetters} from "vuex";
|
||||
import {
|
||||
loginMobile,
|
||||
registerVerify,
|
||||
|
@ -26,32 +27,59 @@
|
|||
phoneSilenceAuth,
|
||||
phoneWxSilenceAuth
|
||||
} from "@/api/user";
|
||||
import { bindingPhone } from '@/api/api.js'
|
||||
import { getUserPhone } from '@/api/public';
|
||||
export default{
|
||||
name:'login_mobile',
|
||||
props:{
|
||||
isUp:{
|
||||
type:Boolean,
|
||||
default:false,
|
||||
import {
|
||||
bindingPhone
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
getUserPhone,
|
||||
iosBinding
|
||||
} from '@/api/public';
|
||||
const BACK_URL = "login_back_url";
|
||||
export default {
|
||||
name: 'login_mobile',
|
||||
computed: mapGetters(['userInfo','isLogin']),
|
||||
props: {
|
||||
isUp: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
authKey:{
|
||||
type:String,
|
||||
default:'',
|
||||
authKey: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isPos: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
appleShow: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
platform: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
data(){
|
||||
data() {
|
||||
return {
|
||||
keyCode:'',
|
||||
account:'',
|
||||
codeNum:''
|
||||
keyCode: '',
|
||||
account: '',
|
||||
codeNum: '',
|
||||
isApp: 0
|
||||
}
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
mounted() {
|
||||
//this.getCode();
|
||||
},
|
||||
methods:{
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 获取验证码
|
||||
async code() {
|
||||
let that = this;
|
||||
|
@ -61,12 +89,14 @@
|
|||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
await registerVerify(that.account).then(res=>{
|
||||
that.$util.Tips({title:res.msg});
|
||||
await registerVerify(that.account).then(res => {
|
||||
that.$util.Tips({
|
||||
title: res.msg
|
||||
});
|
||||
that.sendCode();
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title:err
|
||||
title: err
|
||||
})
|
||||
})
|
||||
},
|
||||
|
@ -81,11 +111,11 @@
|
|||
});
|
||||
});
|
||||
},
|
||||
close(){
|
||||
this.$emit('close',false)
|
||||
close() {
|
||||
this.$emit('close', false)
|
||||
},
|
||||
// 登录
|
||||
loginBtn(){
|
||||
loginBtn() {
|
||||
let that = this
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
|
@ -99,47 +129,66 @@
|
|||
if (!/^[\w\d]+$/i.test(that.codeNum)) return that.$util.Tips({
|
||||
title: '请输入正确的验证码'
|
||||
});
|
||||
uni.showLoading({ title: '正在登录中' });
|
||||
getUserPhone({
|
||||
captcha: that.codeNum,
|
||||
phone: that.account,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
type: 'public',
|
||||
key: this.authKey
|
||||
}).then(res=>{
|
||||
let time = res.data.expires_time - this.$Cache.time();
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
});
|
||||
this.getUserInfo();
|
||||
}).catch(error=>{
|
||||
uni.hideLoading()
|
||||
this.$util.Tips({
|
||||
title:error
|
||||
uni.showLoading({
|
||||
title: !this.userInfo.phone && this.isLogin?'正在绑定中':'正在登录中'
|
||||
});
|
||||
if (!this.userInfo.phone && this.isLogin) {
|
||||
iosBinding({
|
||||
captcha: that.codeNum,
|
||||
phone: that.account
|
||||
}).then(res => {
|
||||
that.$util.Tips({
|
||||
title: '绑定手机号成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 3
|
||||
})
|
||||
that.isApp = 1;
|
||||
that.getUserInfo();
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
that.$util.Tips({
|
||||
title: error
|
||||
})
|
||||
})
|
||||
})
|
||||
} else {
|
||||
getUserPhone({
|
||||
captcha: that.codeNum,
|
||||
phone: that.account,
|
||||
// #ifdef H5
|
||||
type: 'public',
|
||||
// #endif
|
||||
key: that.authKey
|
||||
}).then(res => {
|
||||
that.$store.commit('LOGIN', {
|
||||
token: res.data.token
|
||||
});
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
that.getUserInfo();
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
that.$util.Tips({
|
||||
title: error
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// #ifdef MP
|
||||
phoneSilenceAuth(code){
|
||||
phoneSilenceAuth(code) {
|
||||
let self = this
|
||||
phoneSilenceAuth({
|
||||
code:code,
|
||||
code: code,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
phone:this.account,
|
||||
captcha:this.codeNum
|
||||
}).then(res=>{
|
||||
let time = res.data.expires_time - this.$Cache.time();
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
});
|
||||
phone: this.account,
|
||||
captcha: this.codeNum
|
||||
}).then(res => {
|
||||
this.$store.commit('LOGIN', res.data.token);
|
||||
this.$store.commit("SETUID", res.data.uid);
|
||||
this.getUserInfo();
|
||||
}).catch(error=>{
|
||||
}).catch(error => {
|
||||
self.$util.Tips({
|
||||
title:error
|
||||
title: error
|
||||
})
|
||||
})
|
||||
},
|
||||
|
@ -151,52 +200,56 @@
|
|||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
uni.hideLoading();
|
||||
that.userInfo = res.data
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
that.$store.commit("UPDATE_USERINFO", res.data);
|
||||
// #ifdef MP
|
||||
// #ifdef MP
|
||||
that.$util.Tips({
|
||||
title:'登录成功',
|
||||
icon:'success'
|
||||
},{
|
||||
tab:3
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 3
|
||||
})
|
||||
that.close()
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
that.$emit('wechatPhone',true)
|
||||
that.$emit('wechatPhone', true)
|
||||
// #endif
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
.mobile-bg{
|
||||
<style lang="stylus" scoped>
|
||||
.mobile-bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.isPos {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.mobile-mask {
|
||||
z-index: 20;
|
||||
position: fixed;
|
||||
// position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 67rpx 30rpx;
|
||||
background: #fff;
|
||||
.input-item{
|
||||
|
||||
.input-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
margin-bottom: 38rpx;
|
||||
input{
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
display: block;
|
||||
height: 100%;
|
||||
|
@ -204,7 +257,8 @@
|
|||
border-radius: 43rpx;
|
||||
border: 1px solid #DCDCDC;
|
||||
}
|
||||
.code{
|
||||
|
||||
.code {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
@ -213,15 +267,17 @@
|
|||
margin-left: 30rpx;
|
||||
background: rgba(233, 51, 35, 0.05);
|
||||
font-size: 28rpx;
|
||||
color: #E93323;
|
||||
color: $theme-color;
|
||||
border-radius: 43rpx;
|
||||
&[disabled]{
|
||||
|
||||
&[disabled] {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.sub_btn{
|
||||
|
||||
.sub_btn {
|
||||
width: 690rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
|
@ -233,7 +289,8 @@
|
|||
text-align: center;
|
||||
}
|
||||
}
|
||||
.animated{
|
||||
animation-duration:.4s
|
||||
|
||||
.animated {
|
||||
animation-duration: .4s
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
getCodeApi,
|
||||
getUserInfo
|
||||
} from "@/api/user";
|
||||
import { getLogo, silenceAuth, getUserPhone } from '@/api/public';
|
||||
import { getLogo, getUserPhone } from '@/api/public';
|
||||
export default{
|
||||
name:'routine_phone',
|
||||
props:{
|
||||
|
@ -51,7 +51,6 @@
|
|||
// #ifdef MP
|
||||
// 小程序获取手机号码
|
||||
getphonenumber(e){
|
||||
console.log(e)
|
||||
uni.showLoading({ title: '加载中' });
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
|
@ -67,22 +66,21 @@
|
|||
encryptedData: encryptedData,
|
||||
iv: iv,
|
||||
code: code,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
key:this.authKey,
|
||||
type: 'routine'
|
||||
})
|
||||
.then(res => {
|
||||
let time = res.data.expires_time - this.$Cache.time();
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
token: res.data.token
|
||||
});
|
||||
this.$store.commit("SETUID", res.data.uid);
|
||||
this.getUserInfo();
|
||||
})
|
||||
.catch(res => {
|
||||
console.log(res);
|
||||
uni.hideLoading();
|
||||
this.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -93,7 +91,6 @@
|
|||
getUserInfo().then(res => {
|
||||
uni.hideLoading();
|
||||
that.userInfo = res.data
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
that.$store.commit("UPDATE_USERINFO", res.data);
|
||||
that.isStatus = true
|
||||
this.close()
|
||||
|
@ -150,7 +147,7 @@
|
|||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
margin-top: 60rpx;
|
||||
background: #E93323;
|
||||
background: $theme-color;
|
||||
border-radius: 43rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
|
|
|
@ -1,26 +1,27 @@
|
|||
<template>
|
||||
<view class="orderGoods">
|
||||
<view class='total'>共{{totalNmu}}件商品</view>
|
||||
<view class='goodWrapper'>
|
||||
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index" @click="jumpCon(item.productId)">
|
||||
<view class="orderGoods borRadius14">
|
||||
<view class='total'>共{{ orderProNum?orderProNum:totalNmu}}件商品</view>
|
||||
<view class='goodWrapper pad30'>
|
||||
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index"
|
||||
@click="jumpCon(item.productId)">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.productInfo.attrInfo.image' v-if="item.productInfo.attrInfo"></image>
|
||||
<image :src='item.productInfo.image' v-else></image>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='acea-row row-between-wrapper'>
|
||||
<view class='name line1'>{{item.productInfo.storeName}}</view>
|
||||
<view class='num'>x {{item.cartNum}}</view>
|
||||
<view class='name line1'>{{item.productName ? item.productName : item.storeName}}</view>
|
||||
<view class='num'>x {{item.payNum ? item.payNum : item.cartNum}}</view>
|
||||
</view>
|
||||
<view class='attr line1' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.suk}}</view>
|
||||
<view class='money font-color' v-if="item.productInfo.attrInfo">¥{{item.productInfo.attrInfo.price}}</view>
|
||||
<view class='money font-color' v-else>¥{{item.productInfo.price}}</view>
|
||||
<view class='evaluate' v-if='item.isReply==0 && evaluate==3' @click.stop="evaluateTap(item.productAttrUnique,orderId,ids)">评价</view>
|
||||
<view class='evaluate' v-else-if="item.isReply==1 && evaluate==3">已评价</view>
|
||||
<view class='attr line1' v-if="item.sku">{{item.sku}}</view>
|
||||
<view class='money font-color'>¥{{item.price}}</view>
|
||||
<view class='evaluate' v-if='item.isReply==0 && evaluate==2' @click.stop="evaluateTap(item)">评价
|
||||
</view>
|
||||
<view class='evaluate' v-else-if="item.isReply==1">已评价</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -47,32 +48,45 @@
|
|||
jump: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
orderProNum: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
productType: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
totalNmu:''
|
||||
totalNmu: ''
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
cartInfo:function(nVal,oVal){
|
||||
watch: {
|
||||
cartInfo: function(nVal, oVal) {
|
||||
let num = 0
|
||||
nVal.forEach((item,index)=>{
|
||||
nVal.forEach((item, index) => {
|
||||
num += item.cartNum
|
||||
})
|
||||
this.totalNmu = num
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
evaluateTap:function(unique,orderId,ids){
|
||||
evaluateTap(item) {
|
||||
uni.navigateTo({
|
||||
url:"/pages/users/goods_comment_con/index?unique="+unique+"&uni="+orderId + "&id=" + ids
|
||||
url: "/pages/users/goods_comment_con/index?unique=" + item.attrId + "&orderId=" + this.orderId + '&id=' + this.ids
|
||||
})
|
||||
},
|
||||
jumpCon:function(id){
|
||||
if(this.jump){
|
||||
jumpCon: function(id) {
|
||||
let type = this.productType==0?'normal':'video'
|
||||
if (this.jump) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${id}`
|
||||
url: `/pages/goods_details/index?id=${id}&type=${type}`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -83,20 +97,21 @@
|
|||
<style scoped lang="scss">
|
||||
.orderGoods {
|
||||
background-color: #fff;
|
||||
margin-top: 12rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
.orderGoods .total {
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
padding: 0 30rpx;
|
||||
padding: 0 24rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
line-height: 86rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.pictrue image{
|
||||
|
||||
.pictrue image {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<view class="title acea-row row-center-wrapper">
|
||||
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode"
|
||||
:key="index">
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
|
||||
v-for="(item,index) in payMode" :key="index">
|
||||
<view class="left acea-row row-between-wrapper">
|
||||
<view class="iconfont" :class="item.icon"></view>
|
||||
<view class="text">
|
||||
|
@ -26,8 +26,12 @@
|
|||
<script>
|
||||
import {
|
||||
orderPay,
|
||||
wechatOrderPay
|
||||
wechatOrderPay,
|
||||
wechatQueryPayResult
|
||||
} from '@/api/order.js';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
props: {
|
||||
payMode: {
|
||||
|
@ -54,6 +58,7 @@
|
|||
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['systemPlatform']),
|
||||
methods: {
|
||||
close: function() {
|
||||
this.$emit('onChangeFun', {
|
||||
|
@ -71,18 +76,19 @@
|
|||
});
|
||||
uni.showLoading({
|
||||
title: '支付中'
|
||||
});
|
||||
});
|
||||
wechatOrderPay({
|
||||
orderNo: that.order_id,
|
||||
// #ifdef MP
|
||||
payChannel: 'routine',
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS
|
||||
// #ifdef H5
|
||||
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
|
||||
// #endif
|
||||
payType: paytype
|
||||
}).then(res => {
|
||||
let jsConfig = res.data.jsConfig;
|
||||
that.order_id = res.data.orderNo;
|
||||
switch (res.data.payType) {
|
||||
case 'weixin':
|
||||
// #ifdef MP
|
||||
|
@ -94,14 +100,22 @@
|
|||
paySign: jsConfig.paySign,
|
||||
success: function(ress) {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
wechatQueryPayResult(that.order_id).then(res => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: "支付成功",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
});
|
||||
}).cache(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
},
|
||||
fail: function(e) {
|
||||
uni.hideLoading();
|
||||
|
@ -115,13 +129,14 @@
|
|||
},
|
||||
complete: function(e) {
|
||||
uni.hideLoading();
|
||||
if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_fail'
|
||||
if (e.errMsg == 'requestPayment:cancel') return that.$util
|
||||
.Tips({
|
||||
title: '取消支付'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_fail'
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
})
|
||||
// #endif
|
||||
|
@ -135,13 +150,13 @@
|
|||
};
|
||||
that.$wechat.pay(datas).then(res => {
|
||||
if (res.errMsg == 'chooseWXPay:cancel') {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: '支付失败'
|
||||
});
|
||||
} else {
|
||||
wechatQueryPayResult({
|
||||
orderNo: that.order_id
|
||||
}).then(res => {
|
||||
wechatQueryPayResult(that.order_id).then(res => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: "支付成功",
|
||||
icon: 'success'
|
||||
|
@ -150,13 +165,19 @@
|
|||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
}).cache(errW => {
|
||||
}).cache(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: errW
|
||||
title: err
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
}).cache(errW => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: errW
|
||||
});
|
||||
})
|
||||
// #endif
|
||||
break;
|
||||
|
@ -171,18 +192,19 @@
|
|||
});
|
||||
});
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host + goPages + '&status=1');
|
||||
return that.$util.Tips({
|
||||
title: "支付中",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol +
|
||||
'//' + window.location.host + goPages + '&status=1');
|
||||
return that.$util.Tips({
|
||||
title: "支付中",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
|
|
|
@ -1,89 +1,149 @@
|
|||
<template>
|
||||
<!-- <view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots"
|
||||
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change">
|
||||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image"/>
|
||||
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view class='pages'>{{currents}}/{{imgUrls.length || 1}}</view>
|
||||
</view> -->
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323"
|
||||
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change">
|
||||
<swiper-item v-if="videoline">
|
||||
<view class="item">
|
||||
<video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% " show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"></video>
|
||||
<view class="poster" v-if="controls">
|
||||
<image class="image" :src="imgUrls[0]"></image>
|
||||
</view>
|
||||
<view class="stop" v-if="controls" @tap="bindPause">
|
||||
<image class="image" src="../../static/images/stop.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image"/>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
|
||||
:circular="circular" :interval="interval" :duration="duration" @change="change">
|
||||
|
||||
<swiper-item v-if="videoline">
|
||||
<view class="item">
|
||||
<view v-show="!controls" style="width:100%;height:100% ">
|
||||
<video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% "
|
||||
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"
|
||||
:enable-progress-gesture="false" :poster="imgUrls[0]" @pause="videoPause"></video>
|
||||
</view>
|
||||
<view class="poster" v-show="controls">
|
||||
<image class="image" :src="imgUrls[0]"></image>
|
||||
</view>
|
||||
<view class="stop" v-show="controls" @tap="bindPause">
|
||||
<image class="image" src="../../static/images/stop.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image" />
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
imgUrls: {
|
||||
type: Array,
|
||||
default: function(){
|
||||
return [];
|
||||
}
|
||||
},
|
||||
videoline:
|
||||
{
|
||||
type:String,
|
||||
value:""
|
||||
}
|
||||
imgUrls: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
videoline: {
|
||||
type: String,
|
||||
value: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
indicatorDots: true,
|
||||
circular: true,
|
||||
autoplay: false,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
currents: "1",
|
||||
controls:true
|
||||
indicatorDots: true,
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
currents: "1",
|
||||
controls: true,
|
||||
isPlay:true,
|
||||
videoContext:''
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
//this.videoContext = uni.createVideoContext('myVideo',this);
|
||||
mounted() {
|
||||
if(this.videoline){
|
||||
this.imgUrls.shift()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindPause:function(){
|
||||
this.videoContext.play();
|
||||
this.$set(this,'controls',false)
|
||||
},
|
||||
change: function (e) {
|
||||
this.$set(this,'currents',e.detail.current + 1);
|
||||
}
|
||||
videoPause(e){
|
||||
},
|
||||
bindPause: function() {
|
||||
this.videoContext.play();
|
||||
this.$set(this, 'controls', false)
|
||||
this.autoplay = false
|
||||
},
|
||||
change: function(e) {
|
||||
this.$set(this, 'currents', e.detail.current + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.product-bg{width:100%;height:750rpx;position:relative;}
|
||||
.product-bg swiper{width:100%;height:100%;position:relative;}
|
||||
.product-bg .slide-image{width:100%;height:100%;}
|
||||
.product-bg .pages{position:absolute;background-color:#fff;height:34rpx;padding:0 10rpx;border-radius:3rpx;right:30rpx;bottom:30rpx;line-height:34rpx;font-size:24rpx;color:#050505;}
|
||||
#myVideo{width: 100%;height: 100%}
|
||||
.product-bg .item{position:relative;width:100%;height:100%;}
|
||||
.product-bg .item .poster{position:absolute;top:0;left:0;height:750rpx;width:100%;z-index:9;}
|
||||
.product-bg .item .poster .image{width:100%;height:100%;}
|
||||
.product-bg .item .stop{position:absolute;top:50%;left:50%;width:136rpx;height:136rpx;margin-top:-68rpx;margin-left:-68rpx;z-index:9;}
|
||||
.product-bg .item .stop .image{width:100%;height:100%;}
|
||||
.product-bg {
|
||||
width: 100%;
|
||||
height: 750rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg .slide-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .pages {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
height: 34rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 3rpx;
|
||||
right: 30rpx;
|
||||
bottom: 30rpx;
|
||||
line-height: 34rpx;
|
||||
font-size: 24rpx;
|
||||
color: #050505;
|
||||
}
|
||||
|
||||
#myVideo {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.product-bg .item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .poster {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 750rpx;
|
||||
width: 100%;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .poster .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .stop {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
margin-top: -68rpx;
|
||||
margin-left: -68rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .stop .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="product-window" :class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
|
||||
<view class="product-window"
|
||||
:class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
|
||||
<view class="textpic acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="attr.productSelect.image"></image>
|
||||
|
@ -12,7 +13,7 @@
|
|||
<view class="money font-color">
|
||||
¥<text class="num">{{ attr.productSelect.price }}</text>
|
||||
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quotaShow}}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
|
||||
|
@ -22,9 +23,10 @@
|
|||
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
|
||||
<view class="title">{{ item.attrName }}</view>
|
||||
<view class="listn acea-row row-middle">
|
||||
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attrValue"
|
||||
@click="tapAttr(indexw, indexn)" :key="indexn">
|
||||
{{ itemn.attr }}
|
||||
<view class="itemn" :class="item.index === itemn ? 'on' : ''"
|
||||
v-for="(itemn, indexn) in item.attrValues" @click="tapAttr(indexw, indexn)"
|
||||
:key="indexn">
|
||||
{{ itemn }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -32,26 +34,32 @@
|
|||
<view class="cart acea-row row-between-wrapper">
|
||||
<view class="title">数量</view>
|
||||
<view class="carnum acea-row row-left">
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''"
|
||||
@click="CartNumDes">
|
||||
-
|
||||
</view>
|
||||
<view class='item num'>
|
||||
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)"></input>
|
||||
<input type="number" v-model="attr.productSelect.cart_num"
|
||||
data-name="productSelect.cart_num"
|
||||
@input="bindCode(attr.productSelect.cart_num)"></input>
|
||||
</view>
|
||||
<view v-if="iSplus" class="item plus" :class="
|
||||
attr.productSelect.cart_num >= attr.productSelect.stock
|
||||
? 'on'
|
||||
: ''
|
||||
"
|
||||
@click="CartNumAdd">
|
||||
" @click="CartNumAdd">
|
||||
+
|
||||
</view>
|
||||
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""' @click='CartNumAdd'>+</view>
|
||||
<view v-else class='item plus'
|
||||
:class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""'
|
||||
@click='CartNumAdd'>+</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0" @click="goCat">我要参团</view>
|
||||
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
|
||||
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0"
|
||||
@click="goCat">我要参团</view>
|
||||
<view class="joinBnt on"
|
||||
v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
|
||||
<view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">确定</view>
|
||||
<!-- <view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock && attr.productSelect.quota" @click="goCat">确定</view> -->
|
||||
<view class="joinBnt on" v-else-if="(iScart && !attr.productSelect.stock)">已售罄</view>
|
||||
|
@ -68,43 +76,42 @@
|
|||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
limitNum:{
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
isShow:{
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSbnt:{
|
||||
type:Number,
|
||||
value:0
|
||||
},
|
||||
iSplus:{
|
||||
type:Number,
|
||||
value:0
|
||||
},
|
||||
iScart:{
|
||||
type:Number,
|
||||
value:0
|
||||
}
|
||||
limitNum: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
isShow: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSbnt: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSplus: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iScart: {
|
||||
type: Number,
|
||||
value: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
goCat:function(){
|
||||
this.$emit('goCat');
|
||||
},
|
||||
/**
|
||||
* 购物车手动输入数量
|
||||
*
|
||||
*/
|
||||
bindCode: function (e) {
|
||||
this.$emit('iptCartNum', this.attr.productSelect.cart_num);
|
||||
},
|
||||
goCat: function() {
|
||||
this.$emit('goCat');
|
||||
},
|
||||
/**
|
||||
* 购物车手动输入数量
|
||||
*
|
||||
*/
|
||||
bindCode: function(e) {
|
||||
this.$emit('iptCartNum', this.attr.productSelect.cart_num);
|
||||
},
|
||||
closeAttr: function() {
|
||||
this.$emit('myevent');
|
||||
},
|
||||
|
@ -158,55 +165,57 @@
|
|||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
}
|
||||
|
||||
|
||||
.product-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.product-window.join{padding-bottom: 30rpx;}
|
||||
|
||||
.product-window.joinCart{
|
||||
|
||||
.product-window.join {
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.product-window.joinCart {
|
||||
padding-bottom: 30rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic {
|
||||
padding: 0 130rpx 0 30rpx;
|
||||
margin-top: 29rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .pictrue {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text {
|
||||
width: 410rpx;
|
||||
font-size: 32rpx;
|
||||
color: #202020;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money {
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money .num {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money .stock {
|
||||
color: #999;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
|
@ -214,63 +223,63 @@
|
|||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
|
||||
.product-window .rollTop{
|
||||
|
||||
.product-window .rollTop {
|
||||
max-height: 500rpx;
|
||||
overflow: auto;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item~.item {
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn {
|
||||
padding: 0 30rpx 0 16rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn {
|
||||
border: 1px solid #F2F2F2;
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
padding: 7rpx 33rpx;
|
||||
border-radius: 25rpx;
|
||||
border-radius: 40rpx;
|
||||
margin: 20rpx 0 0 14rpx;
|
||||
background-color: #F2F2F2;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.on {
|
||||
color: #E93323;
|
||||
background:rgba(255,244,243,1);
|
||||
border-color: #E93323;
|
||||
color: $theme-color;
|
||||
background: rgba(255, 244, 243, 1);
|
||||
border-color: $theme-color;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.limit {
|
||||
color: #999;
|
||||
text-decoration:line-through;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart {
|
||||
margin-top: 36rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum {
|
||||
height: 54rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum view {
|
||||
// border: 1px solid #a4a4a4;
|
||||
width: 84rpx;
|
||||
|
@ -280,35 +289,56 @@
|
|||
color: #282828;
|
||||
font-size: 45rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .reduce {
|
||||
border-right: 0;
|
||||
border-radius: 6rpx 0 0 6rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .reduce.on {
|
||||
// border-color: #e3e3e3;
|
||||
color: #DEDEDE;
|
||||
font-size: 60rpx;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .plus {
|
||||
border-left: 0;
|
||||
border-radius: 0 6rpx 6rpx 0;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .plus.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .num {
|
||||
background:rgba(242,242,242,1);
|
||||
background: rgba(242, 242, 242, 1);
|
||||
color: #282828;
|
||||
font-size: 28rpx;
|
||||
border-radius: 12rpx;
|
||||
line-height: 29px;
|
||||
height: 54rpx;
|
||||
|
||||
input {
|
||||
display: -webkit-inline-box;
|
||||
}
|
||||
}
|
||||
.product-window .joinBnt{font-size: 30rpx;width: 620rpx;height: 86rpx;border-radius: 50rpx;text-align: center;line-height: 86rpx;color: #fff;margin: 21rpx auto 0 auto;}
|
||||
.product-window .joinBnt.on{background-color:#bbb;color:#fff;}
|
||||
</style>
|
||||
|
||||
.product-window .joinBnt {
|
||||
font-size: 30rpx;
|
||||
width: 620rpx;
|
||||
height: 86rpx;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 86rpx;
|
||||
color: #fff;
|
||||
margin: 21rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.product-window .joinBnt.on {
|
||||
background-color: #bbb;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
|
||||
.recommend .title {
|
||||
height: 135rpx;
|
||||
line-height: 135rpx;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
@ -96,7 +97,7 @@
|
|||
.recommend .recommendList .item .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.recommend .recommendList .item .name {
|
||||
|
@ -108,6 +109,7 @@
|
|||
.recommend .recommendList .item .money {
|
||||
font-size: 20rpx;
|
||||
margin-top: 8rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.recommend .recommendList .item .money .num {
|
||||
|
|
|
@ -48,5 +48,5 @@
|
|||
.swiper swiper .slide-image{width:100%;height:100%;}
|
||||
.swiper .dots{position:absolute;right:40rpx;bottom:20rpx;}
|
||||
.swiper .dots .dot{width:12rpx;height:12rpx;border:2rpx solid #fff;border-radius:50%;margin-right:15rpx;}
|
||||
.swiper .dots .dot.active{border-color:#e93323;background-color:#e93323;}
|
||||
.swiper .dots .dot.active{border-color:$theme-color;background-color:$theme-color;}
|
||||
</style>
|
||||
|
|
|
@ -1,33 +1,36 @@
|
|||
<template>
|
||||
<!-- v-if="reply.length>0" -->
|
||||
<view class="evaluateWtapper">
|
||||
<view class="evaluateItem" v-for="(item, indexw) in reply" :key="indexw">
|
||||
<view class="pic-text acea-row row-middle">
|
||||
<view class="pic-text acea-row">
|
||||
<view class="pictrue">
|
||||
<image :src="item.avatar"></image>
|
||||
</view>
|
||||
<view class="acea-row row-between-wrapper" style="width: 87%;">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="name line1">{{ item.nickname }}</view>
|
||||
<view class="start" :class="'star' + item.productScore"></view>
|
||||
<view class="content">
|
||||
<view>
|
||||
<view class="acea-row row-between">
|
||||
<view class="acea-row">
|
||||
<view class="name line1">{{ item.nickname }}</view>
|
||||
<view class="start" :class="'star' + item.score"></view>
|
||||
</view>
|
||||
<view class="time">{{ item.createTime }}</view>
|
||||
</view>
|
||||
<view class="sku">规格:{{ item.sku?item.sku:'无' }}</view>
|
||||
</view>
|
||||
|
||||
<view class="evaluate-infor">{{ item.comment }}</view>
|
||||
<view class="imgList acea-row" v-if="item.pics && item.pics.length && item.pics[0]">
|
||||
<view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
|
||||
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply" v-if="item.merchantReplyContent">
|
||||
<text class="font-color">店小二</text>:{{ item.merchantReplyContent }}
|
||||
</view>
|
||||
<view class="time">{{ item.createTime }}</view>
|
||||
<!-- <view class="time">{{ item.createTime }}</view>
|
||||
<view class="time">{{ item.suk }}</view> -->
|
||||
<!-- <view class="time">{{ item.createTime }} {{ item.sku }}</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="time">规格:{{ item.sku?item.sku:'无' }}</view>
|
||||
<view class="evaluate-infor">{{ item.comment }}</view>
|
||||
<view class="imgList acea-row" v-if="item.pics.length && item.pics[0]">
|
||||
<view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
|
||||
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply" v-if="item.merchantReplyContent">
|
||||
<text class="font-color">店小二</text>:{{
|
||||
item.merchantReplyContent
|
||||
}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -55,7 +58,9 @@
|
|||
<style scoped lang='scss'>
|
||||
.evaluateWtapper .evaluateItem {
|
||||
background-color: #fff;
|
||||
padding-bottom: 25rpx;
|
||||
padding: 24rpx;
|
||||
border-bottom-left-radius: 14rpx;
|
||||
border-bottom-right-radius: 14rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem~.evaluateItem {
|
||||
|
@ -65,14 +70,15 @@
|
|||
.evaluateWtapper .evaluateItem .pic-text {
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
height: 95rpx;
|
||||
padding: 0 30rpx;
|
||||
.content{
|
||||
width: 84%;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .pic-text .pictrue {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 20rpx;
|
||||
width: 62rpx;
|
||||
height: 62rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .pic-text .pictrue image {
|
||||
|
@ -87,40 +93,47 @@
|
|||
|
||||
.evaluateWtapper .evaluateItem .time {
|
||||
font-size: 24rpx;
|
||||
color: #82848f;
|
||||
padding: 0 30rpx;
|
||||
color: #999999;
|
||||
|
||||
}
|
||||
.sku{
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .evaluate-infor {
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
margin-top: 19rpx;
|
||||
padding: 0 30rpx;
|
||||
color: #333;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .imgList {
|
||||
padding: 0 30rpx 0 15rpx;
|
||||
margin-top: 25rpx;
|
||||
.evaluateWtapper .evaluateItem .imgList {/*
|
||||
padding: 0 24rpx;
|
||||
margin-top: 16rpx; */
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .imgList .pictrue {
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
margin: 0 0 15rpx 15rpx;
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
margin-right: 14rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 16rpx;
|
||||
/* margin: 0 0 15rpx 15rpx; */
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .imgList .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .reply {
|
||||
font-size: 26rpx;
|
||||
color: #454545;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 5rpx;
|
||||
margin: 20rpx 30rpx 0 30rpx;
|
||||
border-radius: 14rpx;
|
||||
margin: 20rpx 30rpx 0 0rpx;
|
||||
padding: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@ let domain = 'http://127.0.0.1:8080'
|
|||
module.exports = {
|
||||
// 请求域名 格式: https://您的域名
|
||||
// #ifdef MP
|
||||
// HTTP_REQUEST_URL:'',
|
||||
HTTP_REQUEST_URL:domain,
|
||||
HTTP_REQUEST_URL: domain,
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
//H5接口是浏览器地址
|
||||
// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,
|
||||
// http://api.java.crmeb.net:20001
|
||||
HTTP_REQUEST_URL:domain,
|
||||
// #endif
|
||||
|
||||
|
|
|
@ -29,4 +29,6 @@ module.exports = {
|
|||
CACHE_LONGITUDE: 'LONGITUDE',
|
||||
//缓存纬度
|
||||
CACHE_LATITUDE: 'LATITUDE',
|
||||
//app手机信息
|
||||
PLATFORM: 'systemPlatform'
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import { appAuth } from '../api/public';
|
||||
|
||||
class Apps{
|
||||
/**
|
||||
* 授权登录获取token
|
||||
* @param {Object} code
|
||||
*/
|
||||
authApp(code) {
|
||||
return new Promise((resolve, reject) => {
|
||||
appAuth(code,{'spread_spid': 0})
|
||||
.then(({
|
||||
data
|
||||
}) => {
|
||||
resolve(data);
|
||||
Cache.set(WX_AUTH, code);
|
||||
Cache.clear(STATE_KEY);
|
||||
loginType && Cache.clear(LOGINTYPE);
|
||||
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
}
|
||||
export default new Apps();
|
|
@ -1,11 +1,12 @@
|
|||
import store from "../store";
|
||||
import Cache from '../utils/cache';
|
||||
// #ifdef H5 || APP-PLUS
|
||||
import { Debounce } from '@/utils/validate.js'
|
||||
// #ifdef H5
|
||||
import { isWeixin } from "../utils";
|
||||
import auth from './wechat';
|
||||
// #endif
|
||||
|
||||
import { LOGIN_STATUS, USER_INFO, EXPIRES_TIME, STATE_R_KEY} from './../config/cache';
|
||||
import { LOGIN_STATUS, USER_INFO, EXPIRES_TIME, STATE_R_KEY, BACK_URL} from './../config/cache';
|
||||
|
||||
function prePage(){
|
||||
let pages = getCurrentPages();
|
||||
|
@ -13,28 +14,55 @@ function prePage(){
|
|||
return prePage.route;
|
||||
}
|
||||
|
||||
export function toLogin(push, pathLogin) {
|
||||
export const toLogin = Debounce(_toLogin,800)
|
||||
|
||||
export function _toLogin(push, pathLogin) {
|
||||
|
||||
store.commit("LOGOUT");
|
||||
let path = prePage();
|
||||
let login_back_url = Cache.get(BACK_URL);
|
||||
// #ifdef H5
|
||||
path = location.href;
|
||||
// path = location.href;
|
||||
path = location.pathname + location.search;
|
||||
// #endif
|
||||
if(!pathLogin)
|
||||
if(!pathLogin){
|
||||
pathLogin = '/page/users/login/index'
|
||||
Cache.set('login_back_url',path);
|
||||
// #ifdef H5 || APP-PLUS
|
||||
Cache.set('login_back_url',path);
|
||||
}
|
||||
|
||||
// #ifdef H5
|
||||
if (isWeixin()) {
|
||||
auth.oAuth();
|
||||
let urlData = location.pathname + location.search
|
||||
if (urlData.indexOf('?') !== -1) {
|
||||
urlData += '&go_longin=1';
|
||||
} else {
|
||||
urlData += '?go_longin=1';
|
||||
}
|
||||
if (!Cache.has('snsapiKey')) {
|
||||
auth.oAuth('snsapi_base', urlData);
|
||||
} else {
|
||||
if (['/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/wechat_login/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (path !== pathLogin) {
|
||||
push ? uni.navigateTo({
|
||||
url:'/pages/users/login/index'
|
||||
}) : uni.reLaunch({
|
||||
url: '/pages/users/login/index'
|
||||
});
|
||||
if (['/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
if (['pages/user/index','/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
// #ifdef MP
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/wechat_login/index'
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -58,4 +86,4 @@ export function checkLogin()
|
|||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
export function goShopDetail(item,uid) {
|
||||
import {
|
||||
preOrderApi
|
||||
} from '@/api/order.js';
|
||||
import util from 'utils/util'
|
||||
|
||||
/**
|
||||
* 去商品详情
|
||||
*/
|
||||
export function goShopDetail(item, uid) {
|
||||
return new Promise(resolve => {
|
||||
if (item.activityH5 && item.activityH5.type === "1") {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}&time=${item.activityH5.time}&status=2`
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}`
|
||||
})
|
||||
} else if (item.activityH5 && item.activityH5.type === "2") {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&bargain=${uid}`
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&startBargainUid=${uid}`
|
||||
})
|
||||
} else if (item.activityH5 && item.activityH5.type === "3") {
|
||||
uni.navigateTo({
|
||||
|
@ -17,3 +25,23 @@ export function goShopDetail(item,uid) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 活动商品、普通商品、购物车、再次购买预下单
|
||||
*/
|
||||
export function getPreOrder(preOrderType, orderDetails) {
|
||||
return new Promise((resolve, reject) => {
|
||||
preOrderApi({
|
||||
"preOrderType": preOrderType,
|
||||
"orderDetails": orderDetails
|
||||
}).then(res => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?preOrderNo=' + res.data.preOrderNo
|
||||
});
|
||||
}).catch(err => {
|
||||
return util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import { checkLogin } from './login';
|
|||
import { login } from '../api/public';
|
||||
import Cache from '../utils/cache';
|
||||
import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS} from './../config/cache';
|
||||
|
||||
class Routine
|
||||
{
|
||||
|
||||
|
@ -25,16 +24,6 @@ class Routine
|
|||
getUserProfile(){
|
||||
let that = this , code = this.getUserCode();
|
||||
return new Promise( (resolve,reject) => {
|
||||
// uni.getUserInfo({
|
||||
// lang: 'zh_CN',
|
||||
// success(user) {
|
||||
// if(code) user.code = code;
|
||||
// resolve({userInfo:user,islogin:false});
|
||||
// },
|
||||
// fail(res){
|
||||
// reject(res);
|
||||
// }
|
||||
// })
|
||||
uni.getUserProfile({
|
||||
lang: 'zh_CN',
|
||||
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
||||
|
@ -76,9 +65,6 @@ class Routine
|
|||
async getCode(){
|
||||
let provider = await this.getProvider();
|
||||
return new Promise((resolve,reject)=>{
|
||||
if(Cache.has(STATE_R_KEY)){
|
||||
return resolve(Cache.get(STATE_R_KEY));
|
||||
}
|
||||
uni.login({
|
||||
provider:provider,
|
||||
success(res) {
|
||||
|
@ -130,17 +116,19 @@ class Routine
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序登录
|
||||
*/
|
||||
authUserInfo(code,data)
|
||||
{
|
||||
return new Promise((resolve, reject)=>{
|
||||
login(code,data).then(res=>{
|
||||
// let time = res.data.expiresTime - Cache.time();
|
||||
store.commit('UPDATE_USERINFO', res.data.user);
|
||||
store.commit('LOGIN', {token:res.data.token});
|
||||
store.commit('SETUID', res.data.user.uid);
|
||||
// Cache.set(EXPIRES_TIME,res.data.expiresTime,time);
|
||||
Cache.set(USER_INFO,res.data.user);
|
||||
if(res.data.type==='login'){
|
||||
store.commit('LOGIN', {
|
||||
token: res.data.token
|
||||
});
|
||||
store.commit("SETUID", res.data.uid);
|
||||
}
|
||||
return resolve(res);
|
||||
}).catch(res=>{
|
||||
return reject(res);
|
||||
|
|
115
libs/wechat.js
|
@ -112,6 +112,21 @@ class AuthWechat {
|
|||
});
|
||||
}
|
||||
|
||||
// 使用微信内置地图查看位置接口;
|
||||
seeLocation(config){
|
||||
return new Promise((resolve, reject) => {
|
||||
this.wechat().then(wx => {
|
||||
this.toPromise(wx.openLocation, config).then(res => {
|
||||
resolve(res);
|
||||
}).catch(err => {
|
||||
reject(err);
|
||||
});
|
||||
}).catch(err => {
|
||||
reject(err);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
* @param {Object} config
|
||||
|
@ -153,12 +168,37 @@ class AuthWechat {
|
|||
/**
|
||||
* 自动去授权
|
||||
*/
|
||||
oAuth() {
|
||||
if (uni.getStorageSync(WX_AUTH) && store.state.app.token) return;
|
||||
oAuth(snsapiBase,url) {
|
||||
if (uni.getStorageSync(WX_AUTH) && store.state.app.token && snsapiBase == 'snsapi_base') return;
|
||||
const {
|
||||
code
|
||||
} = parseQuery();
|
||||
if (!code) return this.toAuth();
|
||||
if (!code || code == uni.getStorageSync('snsapiCode')){
|
||||
return this.toAuth(snsapiBase,url);
|
||||
}else{
|
||||
if(Cache.has('snsapiKey'))
|
||||
return this.auth(code).catch(error=>{
|
||||
uni.showToast({
|
||||
title:error,
|
||||
icon:'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
// if (uni.getStorageSync(WX_AUTH) && store.state.app.token) return;
|
||||
// const {
|
||||
// code
|
||||
// } = parseQuery();
|
||||
// if (!code){
|
||||
// return this.toAuth(snsapiBase,url);
|
||||
// }else{
|
||||
// if(Cache.has('snsapiKey'))
|
||||
// return this.auth(code).catch(error=>{
|
||||
// uni.showToast({
|
||||
// title:error,
|
||||
// icon:'none'
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
}
|
||||
|
||||
clearAuthStatus() {
|
||||
|
@ -171,24 +211,16 @@ class AuthWechat {
|
|||
*/
|
||||
auth(code) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let loginType = Cache.get(LOGINTYPE);
|
||||
wechatAuth(code, Cache.get("spread"), loginType)
|
||||
wechatAuth(code, Cache.get("spread"))
|
||||
.then(({
|
||||
data
|
||||
}) => {
|
||||
// let expires_time = data.expires_time.substring(0, 19);
|
||||
// expires_time = expires_time.replace(/-/g, '/');
|
||||
// expires_time = new Date(expires_time).getTime();
|
||||
// let newTime = Math.round(new Date() / 1000);
|
||||
store.commit("LOGIN", {
|
||||
token: data.token
|
||||
// time: expires_time - newTime
|
||||
});
|
||||
resolve(data);
|
||||
Cache.set(WX_AUTH, code);
|
||||
Cache.clear(STATE_KEY);
|
||||
// Cache.clear('spread');
|
||||
loginType && Cache.clear(LOGINTYPE);
|
||||
resolve();
|
||||
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
|
@ -198,32 +230,43 @@ class AuthWechat {
|
|||
* 获取跳转授权后的地址
|
||||
* @param {Object} appId
|
||||
*/
|
||||
getAuthUrl(appId) {
|
||||
const redirect_uri = encodeURIComponent(
|
||||
`${location.origin}/pages/auth/index?back_url=` +
|
||||
encodeURIComponent(
|
||||
encodeURIComponent(
|
||||
uni.getStorageSync(BACK_URL) ?
|
||||
uni.getStorageSync(BACK_URL) :
|
||||
location.pathname + location.search
|
||||
)
|
||||
)
|
||||
);
|
||||
uni.removeStorageSync(BACK_URL);
|
||||
const state = encodeURIComponent(
|
||||
("" + Math.random()).split(".")[1] + "authorizestate"
|
||||
);
|
||||
uni.setStorageSync(STATE_KEY, state);
|
||||
return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=${state}#wechat_redirect`;
|
||||
}
|
||||
|
||||
getAuthUrl(appId,snsapiBase,backUrl) {
|
||||
let url = `${location.origin}${backUrl}`
|
||||
if(url.indexOf('?') == -1){
|
||||
url = url+'?'
|
||||
}else{
|
||||
url = url+'&'
|
||||
}
|
||||
const redirect_uri = encodeURIComponent(
|
||||
`${url}scope=${snsapiBase}&back_url=` +
|
||||
encodeURIComponent(
|
||||
encodeURIComponent(
|
||||
uni.getStorageSync(BACK_URL) ?
|
||||
uni.getStorageSync(BACK_URL) :
|
||||
location.pathname + location.search
|
||||
)
|
||||
)
|
||||
);
|
||||
uni.removeStorageSync(BACK_URL);
|
||||
const state = encodeURIComponent(
|
||||
("" + Math.random()).split(".")[1] + "authorizestate"
|
||||
);
|
||||
uni.setStorageSync(STATE_KEY, state);
|
||||
return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`;
|
||||
// if(snsapiBase==='snsapi_base'){
|
||||
// return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=${state}#wechat_redirect`;
|
||||
// }else{
|
||||
// return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`;
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转自动登录
|
||||
*/
|
||||
toAuth() {
|
||||
toAuth(snsapiBase,backUrl) {
|
||||
let that = this;
|
||||
this.wechat().then(wx => {
|
||||
location.href = this.getAuthUrl(that.initConfig.appId);
|
||||
location.href = this.getAuthUrl(that.initConfig.appId,snsapiBase,backUrl);
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -272,4 +315,4 @@ class AuthWechat {
|
|||
}
|
||||
|
||||
export default new AuthWechat();
|
||||
// #endif
|
||||
// #endif
|
||||
|
|
5
main.js
|
@ -4,13 +4,14 @@ import store from './store'
|
|||
import Cache from './utils/cache'
|
||||
import util from 'utils/util'
|
||||
import configs from './config/app.js'
|
||||
|
||||
import * as Order from './libs/order';
|
||||
|
||||
Vue.prototype.$util = util;
|
||||
Vue.prototype.$config = configs;
|
||||
Vue.prototype.$Cache = Cache;
|
||||
Vue.prototype.$eventHub = new Vue();
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$Order = Order;
|
||||
|
||||
// #ifdef H5
|
||||
import { parseQuery } from "./utils";
|
||||
|
@ -46,7 +47,7 @@ if (vconsole !== undefined && vconsole === md5Crmeb) {
|
|||
let vConsole = new VConsole();
|
||||
}
|
||||
|
||||
Auth.isWeixin() && Auth.oAuth();
|
||||
// Auth.isWeixin() && Auth.oAuth();
|
||||
|
||||
// #endif
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
"name" : "crmeb",
|
||||
"appid" : "__UNI__06E0263",
|
||||
"description" : "",
|
||||
"appid" : "__UNI__66E0853",
|
||||
"description" : "crmeb商城",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"versionCode" : 1001,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"alwaysShowBeforeRender" : false,
|
||||
"waiting" : false,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
|
@ -22,44 +22,47 @@
|
|||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
],
|
||||
"abiFilters" : []
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
"ios" : {
|
||||
"idfa" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
"sdkConfigs" : {},
|
||||
"icons" : {}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wxcda5a2b1b98b6a95",
|
||||
"appid" : "11",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : false,
|
||||
"urlCheck" : true,
|
||||
"minified" : true,
|
||||
"postcss" : true,
|
||||
"es6" : true
|
||||
},
|
||||
|
@ -98,10 +101,23 @@
|
|||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : "NO7BZ-APDKP-UCBD7-VT7CX-R5UZK-JBF2W"
|
||||
"key" : "map key"
|
||||
}
|
||||
}
|
||||
},
|
||||
"optimization" : {
|
||||
"treeShaking" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"async" : {
|
||||
"timeout" : 200000
|
||||
},
|
||||
"title" : "CRMEB"
|
||||
},
|
||||
"plus" : {
|
||||
"statusbar" : {
|
||||
"immersed" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
670
pages.json
|
@ -4,10 +4,10 @@
|
|||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"scrollIndicator": false //禁用原生导航栏
|
||||
}
|
||||
"navigationStyle": "custom"
|
||||
// "app-plus": {
|
||||
// "scrollIndicator": false //禁用原生导航栏
|
||||
// }
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -22,7 +22,8 @@
|
|||
"navigationBarTitleText": "个人中心",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
|
@ -30,9 +31,6 @@
|
|||
"path": "pages/goods_details/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -104,169 +102,179 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/components/a_seckill",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/index/components/b_combination",
|
||||
"style": {}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/index/components/a_seckill",
|
||||
"style" : {}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/index/components/b_combination",
|
||||
"style" : {}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pages/users",
|
||||
"name": "users",
|
||||
"pages": [
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pages/users",
|
||||
"name": "users",
|
||||
"pages": [
|
||||
{
|
||||
"path": "privacy/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "隐私协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "web_page/index",
|
||||
"style": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "retrievePassword/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "忘记密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_info/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人资料"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_get_coupon/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "领取优惠券"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_goods_collection/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "收藏商品"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_sgin/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_sgin_list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_money/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的账户"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_bill/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账单明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_integral/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_coupon/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的优惠券"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_user/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的推广",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_code/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分销海报"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_money/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "佣金记录",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_cash/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提现",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_vip/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员中心",
|
||||
"navigationBarBackgroundColor": "#232323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_address_list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_address/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加地址"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_phone/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "绑定手机",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_payment/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "余额充值"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_pwd_edit/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
"path": "user_info/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人资料"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_get_coupon/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "领取优惠券"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_goods_collection/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "收藏商品"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_sgin/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_sgin_list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_money/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的账户"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_bill/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账单明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_integral/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_coupon/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的优惠券"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_user/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的推广",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_code/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分销海报"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_money/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "佣金记录",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_cash/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提现",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_vip/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员中心"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_address_list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_address/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加地址"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_phone/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改手机号",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_payment/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "余额充值"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_pwd_edit/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "order_confirm/index",
|
||||
"style": {
|
||||
|
@ -284,9 +292,10 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "推广人列表",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -294,9 +303,10 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "推广人订单",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -304,9 +314,10 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "推广人排行",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -314,9 +325,10 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "佣金排行",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -367,196 +379,162 @@
|
|||
"navigationBarTitleText": "账户登录",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/activity",
|
||||
"name": "activity",
|
||||
"pages":[{
|
||||
"path": "goods_bargain/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_bargain_details/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination_details/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination_status/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "拼团"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_seckill/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "限时秒杀"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
,"navigationBarBackgroundColor":"#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_seckill_details/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "秒杀详情"
|
||||
// #ifdef MP
|
||||
,"navigationStyle": "custom"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "poster-poster/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价海报"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
,"navigationBarBackgroundColor":"#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "bargain/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价记录"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/admin",
|
||||
"name": "adminOrder",
|
||||
"pages":[
|
||||
{
|
||||
"path": "order/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "orderList/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "orderDetail/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "delivery/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单发货"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "statistics/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单数据统计"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "order_cancellation/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单核销"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/columnGoods",
|
||||
"name": "columnGoods",
|
||||
"pages":[
|
||||
},
|
||||
{
|
||||
"path": "HotNewGoods/index",
|
||||
"path": "app_login/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "精品推荐"
|
||||
"navigationBarTitleText": "绑定手机号",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/activity",
|
||||
"name": "activity",
|
||||
"pages": [{
|
||||
"path": "goods_bargain/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价列表"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_bargain_details/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价详情"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "拼团列表"
|
||||
// #ifdef MP || APP-PLUS
|
||||
,
|
||||
"navigationBarTextStyle": "#fff",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination_details/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination_status/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "拼团"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_seckill/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "限时秒杀"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_seckill_details/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "秒杀详情"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationStyle": "custom"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "poster-poster/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价海报"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "bargain/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价记录"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/columnGoods",
|
||||
"name": "columnGoods",
|
||||
"pages": [{
|
||||
"path": "HotNewGoods/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "精品推荐"
|
||||
}
|
||||
}]
|
||||
}
|
||||
],
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "crmeb",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"backgroundColor": "#F8F8F8",
|
||||
"titleNView": false,
|
||||
"rpxCalcMaxDeviceWidth": 960,
|
||||
"rpxCalcBaseDeviceWidth": 375,
|
||||
"rpxCalcIncludeWidth": 750
|
||||
"rpxCalcMaxDeviceWidth": 960,
|
||||
"rpxCalcBaseDeviceWidth": 375,
|
||||
"rpxCalcIncludeWidth": 750
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#282828",
|
||||
"selectedColor": "#fc4141",
|
||||
"borderStyle": "white",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/images/1-001.png",
|
||||
"selectedIconPath": "static/images/1-002.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/goods_cate/goods_cate",
|
||||
"iconPath": "static/images/2-001.png",
|
||||
"selectedIconPath": "static/images/2-002.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/order_addcart/order_addcart",
|
||||
"iconPath": "static/images/3-001.png",
|
||||
"selectedIconPath": "static/images/3-002.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/index",
|
||||
"iconPath": "static/images/4-001.png",
|
||||
"selectedIconPath": "static/images/4-002.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"condition" : { //模式配置,仅开发期间生效
|
||||
"current": 0, //当前激活的模式(list 的索引项)
|
||||
"list": [
|
||||
"list": [{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/images/1-001.png",
|
||||
"selectedIconPath": "static/images/1-002.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"name": "", //模式名称
|
||||
"path": "", //启动页面,必选
|
||||
"query": "" //启动参数,在页面的onLoad函数里面得到
|
||||
"pagePath": "pages/goods_cate/goods_cate",
|
||||
"iconPath": "static/images/2-001.png",
|
||||
"selectedIconPath": "static/images/2-002.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/order_addcart/order_addcart",
|
||||
"iconPath": "static/images/3-001.png",
|
||||
"selectedIconPath": "static/images/3-002.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/index",
|
||||
"iconPath": "static/images/4-001.png",
|
||||
"selectedIconPath": "static/images/4-002.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"condition": { //模式配置,仅开发期间生效
|
||||
"current": 0, //当前激活的模式(list 的索引项)
|
||||
"list": [{
|
||||
"name": "", //模式名称
|
||||
"path": "", //启动页面,必选
|
||||
"query": "" //启动参数,在页面的onLoad函数里面得到
|
||||
}]
|
||||
}
|
||||
}
|
|
@ -1,20 +1,21 @@
|
|||
<template>
|
||||
<view>
|
||||
<block v-if="bargain.length>0">
|
||||
<div class="bargain-record" ref="container">
|
||||
<div class="item" v-for="(item, index) in bargain" :key="index">
|
||||
<div class="bargain-record pad30" ref="container">
|
||||
<div class="item borRadius14" v-for="(item, index) in bargain" :key="index">
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div class="pictrue">
|
||||
<image :src="item.image" />
|
||||
</div>
|
||||
<div class="text acea-row row-column-around">
|
||||
<div class="line1" style="width: 100%;">{{ item.title }}</div>
|
||||
<count-down :justify-left="'justify-content:left'" :is-day="true" :tip-text="'倒计时 '" :day-text="' 天 '" :hour-text="' 时 '" :minute-text="' 分 '"
|
||||
:second-text="' 秒'" :datatime="item.datatime" v-if="item.status === 1"></count-down>
|
||||
<count-down :justify-left="'justify-content:left'" :bgColor="bgColor" :is-day="true" :tip-text="'倒计时 '" :day-text="'天'"
|
||||
:hour-text="' 时 '" :minute-text="' 分 '"
|
||||
:second-text="' 秒 '" :datatime="item.stopTime/1000" v-if="item.status === 1"></count-down>
|
||||
<div class="successTxt font-color-red" v-else-if="item.status === 3">砍价成功</div>
|
||||
<div class="endTxt" v-else>活动已结束</div>
|
||||
<div class="money font-color-red">
|
||||
已砍至<span class="symbol">¥</span><span class="num">{{ item.residue_price }}</span>
|
||||
<div class="money">
|
||||
已砍至<span class="symbol font-color-red">¥</span><span class="num font-color-red">{{ item.surplusPrice }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,13 +24,16 @@
|
|||
<div class="success" v-else-if="item.status === 3">砍价成功</div>
|
||||
<div class="end" v-else>活动已结束</div>
|
||||
<div class="acea-row row-middle row-right">
|
||||
<div class="bnt cancel" v-if="item.status === 1" @click="getBargainUserCancel(item.bargain_id)">
|
||||
取消活动
|
||||
<div class="bnt bg-color-red" v-if="item.status === 3 && !item.isOrder" @click="goConfirm(item)">
|
||||
去付款
|
||||
</div>
|
||||
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.bargain_id)">
|
||||
<div class="bnt bg-color-red" v-if="item.status === 3 && !item.isDel && item.isOrder && !item.isPay" @click="goPay(item.surplusPrice,item.orderNo)">
|
||||
立即付款
|
||||
</div>
|
||||
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.id)">
|
||||
继续砍价
|
||||
</div>
|
||||
<!-- <div class="bnt bg-color-red" v-else @click="goList">重开一个</div> -->
|
||||
<div class="bnt bg-color-red" v-if="item.status === 2" @click="goList">重开一个</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,6 +44,7 @@
|
|||
<emptyPage title="暂无砍价记录~"></emptyPage>
|
||||
</block>
|
||||
<home></home>
|
||||
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -49,44 +54,127 @@
|
|||
getBargainUserList,
|
||||
getBargainUserCancel
|
||||
} from "@/api/activity";
|
||||
import {
|
||||
getUserInfo
|
||||
} from '@/api/user.js';
|
||||
import Loading from "@/components/Loading";
|
||||
import home from '@/components/home';
|
||||
import payment from '@/components/payment';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
name: "BargainRecord",
|
||||
components: {
|
||||
CountDown,
|
||||
Loading,
|
||||
emptyPage,
|
||||
home
|
||||
home,
|
||||
payment
|
||||
},
|
||||
props: {},
|
||||
computed: mapGetters(['isLogin', 'userInfo', 'uid']),
|
||||
data: function() {
|
||||
return {
|
||||
bgColor:{
|
||||
'bgColor': '',
|
||||
'Color': '#E93323',
|
||||
'width': '40rpx',
|
||||
'timeTxtwidth': '28rpx',
|
||||
'isDay': false
|
||||
},
|
||||
bargain: [],
|
||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
||||
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
|
||||
page: 1, //页码
|
||||
limit: 20, //数量
|
||||
userInfo: {}
|
||||
payMode: [{
|
||||
name: "微信支付",
|
||||
icon: "icon-weixinzhifu",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付'
|
||||
},
|
||||
{
|
||||
name: "余额支付",
|
||||
icon: "icon-yuezhifu",
|
||||
value: 'yue',
|
||||
title: '可用余额:',
|
||||
number: 0
|
||||
}
|
||||
],
|
||||
pay_close: false,
|
||||
pay_order_id: '',
|
||||
totalPrice: '0'
|
||||
};
|
||||
},
|
||||
onLoad: function() {
|
||||
this.getBargainUserList();
|
||||
this.getUserInfo();
|
||||
// this.$scroll(this.$refs.container, () => {
|
||||
// !this.loadingList && this.getBargainUserList();
|
||||
// });
|
||||
},
|
||||
onShow() {
|
||||
if (this.isLogin) {
|
||||
this.payMode[1].number = this.userInfo.nowMoney;
|
||||
this.$set(this, 'payMode', this.payMode);
|
||||
} else {
|
||||
toLogin();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 打开支付组件
|
||||
*
|
||||
*/
|
||||
goPay(pay_price, order_id) {
|
||||
this.$set(this, 'pay_close', true);
|
||||
this.$set(this, 'pay_order_id', order_id);
|
||||
this.$set(this, 'totalPrice', pay_price);
|
||||
},
|
||||
/**
|
||||
* 事件回调
|
||||
*
|
||||
*/
|
||||
onChangeFun: function(e) {
|
||||
let opt = e;
|
||||
let action = opt.action || null;
|
||||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
/**
|
||||
* 关闭支付组件
|
||||
*
|
||||
*/
|
||||
payClose: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
/**
|
||||
* 支付成功回调
|
||||
*
|
||||
*/
|
||||
pay_complete: function() {
|
||||
this.status = false;
|
||||
this.page = 1;
|
||||
this.$set(this, 'bargain', []);
|
||||
this.$set(this, 'pay_close', false);
|
||||
this.getBargainUserList();
|
||||
},
|
||||
/**
|
||||
* 支付失败回调
|
||||
*
|
||||
*/
|
||||
pay_fail: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
goConfirm: function(item) { //立即支付
|
||||
if (this.isLogin === false) {
|
||||
toLogin();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&startBargainUid=${this.uid}&storeBargainId=${item.bargainUserId}`
|
||||
})
|
||||
}
|
||||
},
|
||||
goDetail: function(id) {
|
||||
// this.$router.push({
|
||||
// path: "/activity/dargain_detail/" + id +'&bargain='+ userInfo.uid
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${id}&bargain=${this.userInfo.uid}`
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${id}&startBargainUid=${this.uid}`
|
||||
})
|
||||
},
|
||||
// 砍价列表
|
||||
|
@ -104,8 +192,8 @@
|
|||
limit: that.limit
|
||||
})
|
||||
.then(res => {
|
||||
that.status = res.data.length < that.limit;
|
||||
that.bargain.push.apply(that.bargain, res.data);
|
||||
that.status = res.data.list.length < that.limit;
|
||||
that.bargain.push.apply(that.bargain, res.data.list);
|
||||
that.page++;
|
||||
that.loadingList = false;
|
||||
})
|
||||
|
@ -133,16 +221,7 @@
|
|||
title: res
|
||||
})
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取个人用户信息
|
||||
*/
|
||||
getUserInfo: function() {
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.userInfo = res.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getBargainUserList();
|
||||
|
@ -150,11 +229,15 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
/*砍价记录*/
|
||||
.bargain-record .item .picTxt .text .time .styleAll {
|
||||
color: #fc4141;
|
||||
font-size:24rpx;
|
||||
.bargain-record .item .picTxt .text .time {
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
.styleAll {
|
||||
color: #fc4141;
|
||||
font-size:24rpx;
|
||||
}
|
||||
}
|
||||
.bargain-record .item .picTxt .text .time .red {
|
||||
color: #999;
|
||||
|
@ -162,13 +245,13 @@
|
|||
}
|
||||
.bargain-record .item {
|
||||
background-color: #fff;
|
||||
margin-bottom: 12upx;
|
||||
margin-top: 15rpx;
|
||||
padding: 30rpx 24rpx 0 24rpx;
|
||||
}
|
||||
|
||||
.bargain-record .item .picTxt {
|
||||
height: 210upx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 0 30upx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.bargain-record .item .picTxt .pictrue {
|
||||
|
@ -183,10 +266,10 @@
|
|||
}
|
||||
|
||||
.bargain-record .item .picTxt .text {
|
||||
width: 515upx;
|
||||
width: 470rpx;
|
||||
font-size: 30upx;
|
||||
color: #282828;
|
||||
height: 150upx;
|
||||
color: #333333;
|
||||
height: 160rpx;
|
||||
}
|
||||
|
||||
.bargain-record .item .picTxt .text .time {
|
||||
|
@ -205,6 +288,7 @@
|
|||
}
|
||||
.bargain-record .item .picTxt .text .money {
|
||||
font-size: 24upx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.bargain-record .item .picTxt .text .money .num {
|
||||
|
@ -218,7 +302,6 @@
|
|||
|
||||
.bargain-record .item .bottom {
|
||||
height: 100upx;
|
||||
padding: 0 30upx;
|
||||
font-size: 27upx;
|
||||
}
|
||||
|
||||
|
@ -231,7 +314,7 @@
|
|||
}
|
||||
|
||||
.bargain-record .item .bottom .success {
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.bargain-record .item .bottom .bnt {
|
||||
|
|
|
@ -1,28 +1,29 @@
|
|||
<template>
|
||||
<div>
|
||||
<view class='flash-sale'>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class='iconfont icon-xiangzuo' @tap='goBack' :style="'top:'+ (navH/2) +'rpx'" v-if="returnShow"></view>
|
||||
<!-- #endif -->
|
||||
<view class="saleBox"></view>
|
||||
<!-- banner -->
|
||||
<!-- <navigator :url='item.url' class='slide-navigator acea-row row-between-wrapper' hover-class='none'>
|
||||
<image :src="item.pic" class="slide-image" lazy-load></image>
|
||||
</navigator> -->
|
||||
<view class="header" v-if="timeList.length">
|
||||
<view class="header" v-if="dataList.length">
|
||||
<swiper indicator-dots="true" autoplay="true" :circular="circular" interval="3000" duration="1500"
|
||||
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in timeList[active].slide" :key="index">
|
||||
<swiper-item>
|
||||
<image :src="item.sattDir" class="slide-image" lazy-load></image>
|
||||
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
||||
<block v-for="(items,index) in dataList[active].slide" :key="index">
|
||||
<swiper-item class="borRadius14">
|
||||
<image :src="items.sattDir" class="slide-image borRadius14" lazy-load></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
||||
</view>
|
||||
<view class="seckillList acea-row row-between-wrapper">
|
||||
<view class="priceTag">
|
||||
<image src="/static/images/priceTag.png"></image>
|
||||
</view>
|
||||
<view class='timeLsit'>
|
||||
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;height:106rpx;">
|
||||
<block v-for="(item,index) in timeList" :key='index'>
|
||||
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft"
|
||||
style="width:auto;overflow:hidden;">
|
||||
<block v-for="(item,index) in dataList" :key='index'>
|
||||
<view @tap='settimeList(item,index)' class='item' :class="active == index?'on':''">
|
||||
<view class='time'>{{item.time.split(',')[0]}}</view>
|
||||
<view class="state">{{item.statusName}}</view>
|
||||
|
@ -31,7 +32,7 @@
|
|||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='list' v-if='seckillList.length>0'>
|
||||
<view class='list pad30' v-if='seckillList.length>0'>
|
||||
<block v-for="(item,index) in seckillList" :key='index'>
|
||||
<view class='item acea-row row-between-wrapper' @tap='goDetails(item)'>
|
||||
<view class='pictrue'>
|
||||
|
@ -39,11 +40,12 @@
|
|||
</view>
|
||||
<view class='text acea-row row-column-around'>
|
||||
<view class='name line1'>{{item.title}}</view>
|
||||
<view class='money'>¥
|
||||
<view class='money'><text class="font-color">¥</text>
|
||||
<text class='num font-color'>{{item.price}}</text>
|
||||
<text class="y_money">¥{{item.otPrice}}</text>
|
||||
</view>
|
||||
<view class="limit">限量 <text class="limitPrice">{{item.quotaShow}} {{item.unitName}}</text></view>
|
||||
<view class="limit">限量 <text class="limitPrice">{{item.quota}} {{item.unitName}}</text>
|
||||
</view>
|
||||
<view class="progress">
|
||||
<view class='bg-reds' :style="'width:'+item.percent+'%;'"></view>
|
||||
<view class='piece'>已抢{{item.percent}}%</view>
|
||||
|
@ -70,7 +72,8 @@
|
|||
getSeckillHeaderApi,
|
||||
getSeckillList
|
||||
} from '../../../api/activity.js';
|
||||
import home from '@/components/home/index.vue'
|
||||
import home from '@/components/home/index.vue';
|
||||
let app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
home
|
||||
|
@ -80,11 +83,10 @@
|
|||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 500,
|
||||
// duration: 500,
|
||||
topImage: '',
|
||||
seckillList: [],
|
||||
timeList: [],
|
||||
active: 5,
|
||||
active: 0,
|
||||
scrollLeft: 0,
|
||||
interval: 0,
|
||||
status: 1,
|
||||
|
@ -96,31 +98,36 @@
|
|||
loading: false,
|
||||
loadend: false,
|
||||
pageloading: false,
|
||||
seckillHeader: []
|
||||
dataList: [],
|
||||
returnShow: true,
|
||||
navH: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var pages = getCurrentPages();
|
||||
this.returnShow = pages.length===1?false:true;
|
||||
// #ifdef H5
|
||||
this.navH = app.globalData.navHeight-18;
|
||||
// #endif
|
||||
this.getSeckillConfig();
|
||||
},
|
||||
methods: {
|
||||
goBack: function() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
getSeckillConfig: function() {
|
||||
let that = this;
|
||||
getSeckillHeaderApi().then(res => {
|
||||
res.data.seckillTime.map(item => {
|
||||
res.data.map(item => {
|
||||
item.slide = JSON.parse(item.slide)
|
||||
})
|
||||
that.timeList = res.data.seckillTime;
|
||||
that.active = res.data.seckillTimeIndex;
|
||||
if (that.timeList.length) {
|
||||
that.scrollLeft = (that.active - 1.37) * 100
|
||||
setTimeout(function() {
|
||||
that.loading = true
|
||||
}, 2000);
|
||||
that.seckillList = [],
|
||||
that.page = 1
|
||||
that.status = that.timeList[that.active].status
|
||||
that.getSeckillList();
|
||||
}
|
||||
that.dataList = res.data;
|
||||
that.getSeckillList();
|
||||
that.seckillList = [];
|
||||
that.page = 1;
|
||||
that.status = that.dataList[that.active].status;
|
||||
that.getSeckillList();
|
||||
|
||||
});
|
||||
},
|
||||
getSeckillList: function() {
|
||||
|
@ -132,7 +139,7 @@
|
|||
if (that.loadend) return;
|
||||
if (that.pageloading) return;
|
||||
this.pageloading = true
|
||||
getSeckillList(that.timeList[that.active].id, data).then(res => {
|
||||
getSeckillList(that.dataList[that.active].id, data).then(res => {
|
||||
var seckillList = res.data.list;
|
||||
var loadend = seckillList.length < that.limit;
|
||||
that.page++;
|
||||
|
@ -155,16 +162,16 @@
|
|||
that.countDownHour = "00";
|
||||
that.countDownMinute = "00";
|
||||
that.countDownSecond = "00";
|
||||
that.status = that.timeList[that.active].status;
|
||||
that.status = that.dataList[that.active].status;
|
||||
that.loadend = false;
|
||||
that.page = 1;
|
||||
that.seckillList = [];
|
||||
// wxh.time(e.currentTarget.dataset.stop, that);
|
||||
that.getSeckillList();
|
||||
},
|
||||
goDetails(item){
|
||||
goDetails(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/goods_seckill_details/index?id=' + item.id + '&time=' + this.timeList[this.active].timeSwap + '&status=' + this.status + '&productId=' + item.productId
|
||||
url: '/pages/activity/goods_seckill_details/index?id=' + item.id
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -181,22 +188,42 @@
|
|||
page {
|
||||
background-color: #F5F5F5 !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
|
||||
.icon-xiangzuo {
|
||||
font-size: 40rpx;
|
||||
color: #fff;
|
||||
position: fixed;
|
||||
left: 30rpx;
|
||||
z-index: 99;
|
||||
transform: translateY(-20%);
|
||||
}
|
||||
.flash-sale .header {
|
||||
width: 710rpx;
|
||||
height: 300rpx;
|
||||
margin: -215rpx auto 0 auto;
|
||||
border-radius: 20rpx;
|
||||
height: 330rpx;
|
||||
margin: -276rpx auto 0 auto;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
swiper{
|
||||
height: 330rpx !important;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.flash-sale .header image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20rpx;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
img{
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.flash-sale .seckillList {
|
||||
padding: 0 20rpx;
|
||||
padding: 25rpx;
|
||||
}
|
||||
|
||||
.flash-sale .seckillList .priceTag {
|
||||
|
@ -210,9 +237,8 @@
|
|||
}
|
||||
|
||||
.flash-sale .timeLsit {
|
||||
width: 610rpx;
|
||||
width: 596rpx;
|
||||
white-space: nowrap;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.flash-sale .timeLsit .item {
|
||||
|
@ -220,10 +246,9 @@
|
|||
font-size: 20rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
padding: 11rpx 0;
|
||||
box-sizing: border-box;
|
||||
height: 96rpx;
|
||||
margin-right: 35rpx;
|
||||
margin-right: 30rpx;
|
||||
width: 130rpx;
|
||||
}
|
||||
|
||||
.flash-sale .timeLsit .item .time {
|
||||
|
@ -233,13 +258,15 @@
|
|||
}
|
||||
|
||||
.flash-sale .timeLsit .item.on .time {
|
||||
color: #E93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.flash-sale .timeLsit .item.on .state {
|
||||
width: 90rpx;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 15rpx;
|
||||
width: 128rpx;
|
||||
/* padding: 0 12rpx; */
|
||||
background: linear-gradient(90deg, rgba(252, 25, 75, 1) 0%, rgba(252, 60, 32, 1) 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
@ -269,11 +296,11 @@
|
|||
.flash-sale .list .item {
|
||||
height: 230rpx;
|
||||
position: relative;
|
||||
width: 710rpx;
|
||||
/* width: 710rpx; */
|
||||
margin: 0 auto 20rpx auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 0 25rpx;
|
||||
border-radius: 14rpx;
|
||||
padding: 25rpx 24rpx;
|
||||
}
|
||||
|
||||
.flash-sale .list .item .pictrue {
|
||||
|
@ -290,7 +317,7 @@
|
|||
}
|
||||
|
||||
.flash-sale .list .item .text {
|
||||
width: 460rpx;
|
||||
width: 440rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
height: 166rpx;
|
||||
|
@ -302,7 +329,7 @@
|
|||
|
||||
.flash-sale .list .item .text .money {
|
||||
font-size: 30rpx;
|
||||
color: #E93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.flash-sale .list .item .text .money .num {
|
||||
|
@ -330,7 +357,7 @@
|
|||
|
||||
.flash-sale .list .item .text .progress {
|
||||
overflow: hidden;
|
||||
background-color: #FFEFEF;
|
||||
background-color: #EEEEEE;
|
||||
width: 260rpx;
|
||||
border-radius: 18rpx;
|
||||
height: 18rpx;
|
||||
|
@ -369,7 +396,10 @@
|
|||
|
||||
.flash-sale .saleBox {
|
||||
width: 100%;
|
||||
height: 230rpx;
|
||||
height: 298rpx;
|
||||
/* #ifdef MP */
|
||||
height: 300rpx;
|
||||
/* #endif */
|
||||
background: rgba(233, 51, 35, 1);
|
||||
border-radius: 0 0 50rpx 50rpx;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
<view>
|
||||
<view class='poster-poster'>
|
||||
<view class='tip'><text class='iconfont icon-shuoming'></text>提示:点击图片即可保存至手机相册 </view>
|
||||
<!-- <view class='pictrue'>
|
||||
<image :src='image' mode="widthFix"></image>
|
||||
</view> -->
|
||||
<view class='pictrue' v-if="canvasStatus">
|
||||
<image :src='imagePath'></image>
|
||||
</view>
|
||||
|
|
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 174 B |
After Width: | Height: | Size: 686 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 145 B |
After Width: | Height: | Size: 662 B |
|
@ -1,358 +0,0 @@
|
|||
<template>
|
||||
<view class="deliver-goods">
|
||||
<header>
|
||||
<view class="order-num acea-row row-between-wrapper">
|
||||
<view class="num line1">订单号:{{ order_id }}</view>
|
||||
<view class="name line1">
|
||||
<span class="iconfont icon-yonghu2"></span>{{ delivery.nickname }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="address">
|
||||
<view class="name">
|
||||
{{ delivery.real_name
|
||||
}}<span class="phone">{{ delivery.user_phone }}</span>
|
||||
</view>
|
||||
<view>{{ delivery.user_address }}</view>
|
||||
</view>
|
||||
<view class="line"><image src="@/static/images/line.jpg" /></view>
|
||||
</header>
|
||||
<view class="wrapper">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>发货方式</view>
|
||||
<view class="mode acea-row row-middle row-right">
|
||||
<view class="goods" :class="active === index ? 'on' : ''" v-for="(item, index) in types" :key="index" @click="changeType(item, index)">
|
||||
{{ item.title }}<span class="iconfont icon-xuanzhong2"></span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="logistics.length>0">
|
||||
<view class="list" v-show="active === 0">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>发货方式</view>
|
||||
<view class="select-box">
|
||||
<picker class="pickerBox" @change="bindPickerChange" :value="seIndex" :range="logistics" range-key="name">
|
||||
<!-- <view></view> -->
|
||||
<view class="uni-input">{{logistics[seIndex].name}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>快递单号</view>
|
||||
<input type="text" placeholder="填写快递单号" v-model="delivery_id" class="mode" />
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="list" v-show="active === 1">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>送货人</view>
|
||||
<input type="text" placeholder="填写送货人" v-model="delivery_name" class="mode" />
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>送货电话</view>
|
||||
<input type="text" placeholder="填写送货电话" v-model="delivery_id" class="mode" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:1.2rem;"></view>
|
||||
<view class="confirm" @click="saveInfo">确认提交</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getAdminOrderDelivery,
|
||||
setAdminOrderDelivery,
|
||||
getLogistics
|
||||
} from "@/api/admin";
|
||||
import { checkPhone } from '@/utils/validate.js'
|
||||
export default {
|
||||
name: "GoodsDeliver",
|
||||
components: {},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
types: [{
|
||||
type: "express",
|
||||
title: "发货"
|
||||
},
|
||||
{
|
||||
type: "send",
|
||||
title: "送货"
|
||||
},
|
||||
{
|
||||
type: "fictitious",
|
||||
title: "无需发货"
|
||||
}
|
||||
],
|
||||
active: 0,
|
||||
order_id: "",
|
||||
delivery: [],
|
||||
logistics: [],
|
||||
delivery_type: "express",
|
||||
delivery_name: "",
|
||||
delivery_id: "",
|
||||
seIndex:0,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"$route.params.oid": function(newVal) {
|
||||
let that = this;
|
||||
if (newVal != undefined) {
|
||||
that.order_id = newVal;
|
||||
that.getIndex();
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad: function(option) {
|
||||
this.order_id = option.id;
|
||||
this.getIndex();
|
||||
this.getLogistics();
|
||||
},
|
||||
methods: {
|
||||
changeType: function(item, index) {
|
||||
this.active = index;
|
||||
this.delivery_type = item.type;
|
||||
this.delivery_name = "";
|
||||
this.delivery_id = "";
|
||||
},
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
getAdminOrderDelivery(that.order_id).then(
|
||||
res => {
|
||||
that.delivery = res.data;
|
||||
},
|
||||
error => {
|
||||
that.$dialog.error(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
getLogistics: function() {
|
||||
let that = this;
|
||||
getLogistics().then(
|
||||
res => {
|
||||
that.logistics = res.data;
|
||||
},
|
||||
error => {
|
||||
that.$dialog.error(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
async saveInfo() {
|
||||
let that = this,
|
||||
delivery_type = that.delivery_type,
|
||||
delivery_name = that.logistics[that.seIndex].name,
|
||||
delivery_id = that.delivery_id,
|
||||
userName = that.delivery_name,
|
||||
save = {};
|
||||
save.order_id = that.order_id;
|
||||
save.delivery_type = that.delivery_type;
|
||||
switch (delivery_type) {
|
||||
case "send":
|
||||
if(!userName){
|
||||
return that.$util.Tips({
|
||||
title:'请填写送货人姓名'
|
||||
})
|
||||
}
|
||||
if(!delivery_id || !checkPhone(delivery_id)){
|
||||
return that.$util.Tips({
|
||||
title:'请填写正确的手机号码'
|
||||
})
|
||||
}
|
||||
save.delivery_name = userName;
|
||||
save.delivery_id = delivery_id;
|
||||
that.setInfo(save);
|
||||
break;
|
||||
case "express":
|
||||
if(!delivery_id){
|
||||
return this.$util.Tips({
|
||||
title:'请填写快递单号'
|
||||
})
|
||||
}
|
||||
save.delivery_name = delivery_name;
|
||||
save.delivery_id = delivery_id;
|
||||
that.setInfo(save);
|
||||
break;
|
||||
case "fictitious":
|
||||
that.setInfo(save);
|
||||
break;
|
||||
}
|
||||
},
|
||||
setInfo: function(item) {
|
||||
let that = this;
|
||||
setAdminOrderDelivery(item).then(
|
||||
res => {
|
||||
that.$util.Tips({
|
||||
title:res,
|
||||
icon:'success',
|
||||
mask:true
|
||||
})
|
||||
setTimeout(res=>{
|
||||
uni.navigateBack();
|
||||
},2000)
|
||||
},
|
||||
error => {
|
||||
that.$dialog.error(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
bindPickerChange(e){
|
||||
this.seIndex = e.detail.value
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/*发货*/
|
||||
.deliver-goods header {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-top: 10upx;
|
||||
}
|
||||
|
||||
.deliver-goods header .order-num {
|
||||
padding: 0 30upx;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
height: 67upx;
|
||||
}
|
||||
|
||||
.deliver-goods header .order-num .num {
|
||||
width: 430upx;
|
||||
font-size: 26upx;
|
||||
color: #282828;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.deliver-goods header .order-num .num:after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
width: 1px;
|
||||
height: 30upx;
|
||||
background-color: #ddd;
|
||||
top: 50%;
|
||||
margin-top: -15upx;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.deliver-goods header .order-num .name {
|
||||
width: 260upx;
|
||||
font-size: 26upx;
|
||||
color: #282828;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.deliver-goods header .order-num .name .iconfont {
|
||||
font-size: 35upx;
|
||||
color: #477ef3;
|
||||
vertical-align: middle;
|
||||
margin-right: 10upx;
|
||||
}
|
||||
|
||||
.deliver-goods header .address {
|
||||
font-size: 26upx;
|
||||
color: #868686;
|
||||
background-color: #fff;
|
||||
padding: 30upx;
|
||||
}
|
||||
|
||||
.deliver-goods header .address .name {
|
||||
font-size: 34upx;
|
||||
color: #282828;
|
||||
margin-bottom: 10upx;
|
||||
}
|
||||
|
||||
.deliver-goods header .address .name .phone {
|
||||
margin-left: 40upx;
|
||||
}
|
||||
|
||||
.deliver-goods header .line {
|
||||
width: 100%;
|
||||
height: 3upx;
|
||||
}
|
||||
|
||||
.deliver-goods header .line image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item {
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 0 30upx;
|
||||
height: 96upx;
|
||||
font-size: 32upx;
|
||||
color: #282828;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item .mode {
|
||||
width: 460upx;
|
||||
height: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item .mode .iconfont {
|
||||
font-size: 30upx;
|
||||
margin-left: 13upx;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item .mode .goods~.goods {
|
||||
margin-left: 30upx;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item .mode .goods {
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item .mode .goods.on {
|
||||
color: #477ef3;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item .icon-up {
|
||||
position: absolute;
|
||||
font-size: 35upx;
|
||||
color: #2c2c2c;
|
||||
right: 30upx;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item select {
|
||||
direction: rtl;
|
||||
padding-right: 60upx;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item input::placeholder {
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.deliver-goods .confirm {
|
||||
font-size: 32upx;
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
height: 100upx;
|
||||
background-color: #477ef3;
|
||||
text-align: center;
|
||||
line-height: 100upx;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
.select-box{
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
|
||||
.pickerBox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
|
@ -1,773 +0,0 @@
|
|||
<template>
|
||||
<view class="order-details pos-order-details">
|
||||
<view class="header acea-row row-middle">
|
||||
<view class="state">{{ title }}</view>
|
||||
<view class="data">
|
||||
<view class="order-num">订单:{{ orderInfo.order_id }}</view>
|
||||
<view>
|
||||
<span class="time">{{ orderInfo.add_time }}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="remarks acea-row row-between-wrapper" v-if="goname != 'looks'">
|
||||
<span class="iconfont icon-zhinengkefu-"></span>
|
||||
<input type="button" class="line1" style="text-align: left;" :value="
|
||||
orderInfo.remark ? orderInfo.remark : '订单未备注,点击添加备注信息'
|
||||
"
|
||||
@click="modify('1')" />
|
||||
</view>
|
||||
<view class="orderingUser acea-row row-middle">
|
||||
<span class="iconfont icon-yonghu2"></span>{{ orderInfo.nickname }}
|
||||
</view>
|
||||
<view class="address">
|
||||
<view class="name">
|
||||
{{ orderInfo.real_name
|
||||
}}<span class="phone">{{ orderInfo.user_phone }}</span>
|
||||
</view>
|
||||
<view>{{ orderInfo.user_address }}</view>
|
||||
</view>
|
||||
<view class="line">
|
||||
<image src="/static/images/line.jpg" />
|
||||
</view>
|
||||
<view class="pos-order-goods">
|
||||
<navigator :url="`/pages/goods_details/index?id=${item.cart_info.productInfo.product_id}`" hover-class="none" class="goods acea-row row-between-wrapper" v-for="(item, index) in orderInfo._info" :key="index">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="item.cart_info.productInfo.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-between row-column">
|
||||
<view class="info line2">
|
||||
{{ item.cart_info.productInfo.store_name }}
|
||||
</view>
|
||||
<view class="attr">{{ item.cart_info.productInfo.suk }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money">
|
||||
<view class="x-money">¥{{ item.cart_info.productInfo.price }}</view>
|
||||
<view class="num">x{{ item.cart_info.cart_num }}</view>
|
||||
<view class="y-money">¥{{ item.cart_info.productInfo.ot_price }}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="public-total">
|
||||
共{{ orderInfo.total_num }}件商品,应支付
|
||||
<span class="money">¥{{ orderInfo.pay_price }}</span> ( 邮费 ¥{{
|
||||
orderInfo.pay_postage
|
||||
}}
|
||||
)
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="item acea-row row-between">
|
||||
<view>订单编号:</view>
|
||||
<view class="conter acea-row row-middle row-right">
|
||||
{{ orderInfo.order_id
|
||||
}}
|
||||
<!-- #ifdef H5 -->
|
||||
<span class="copy copy-data" :data-clipboard-text="orderInfo.order_id">复制</span>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<span class="copy copy-data" @click="copyNum(orderInfo.order_id)">复制</span>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>下单时间:</view>
|
||||
<view class="conter">{{ orderInfo.add_time }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>支付状态:</view>
|
||||
<view class="conter">
|
||||
{{ orderInfo.paid == 1 ? "已支付" : "未支付" }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>支付方式:</view>
|
||||
<view class="conter">{{ payType }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>买家留言:</view>
|
||||
<view class="conter">{{ orderInfo.mark }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="item acea-row row-between">
|
||||
<view>支付金额:</view>
|
||||
<view class="conter">¥{{ orderInfo.total_price }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>优惠券抵扣:</view>
|
||||
<view class="conter">-¥{{ orderInfo.coupon_price }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>运费:</view>
|
||||
<view class="conter">¥{{ orderInfo.freight_price }}</view>
|
||||
</view>
|
||||
<view class="actualPay acea-row row-right">
|
||||
实付款:<span class="money font-color-red">¥{{ orderInfo.pay_price }}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper" v-if="
|
||||
orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2
|
||||
">
|
||||
<view class="item acea-row row-between">
|
||||
<view>配送方式:</view>
|
||||
<view class="conter" v-if="orderInfo.delivery_type === 'express'">
|
||||
快递
|
||||
</view>
|
||||
<view class="conter" v-if="orderInfo.delivery_type === 'send'">送货</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view v-if="orderInfo.delivery_type === 'express'">快递公司:</view>
|
||||
<view v-if="orderInfo.delivery_type === 'send'">送货人:</view>
|
||||
<view class="conter">{{ orderInfo.delivery_name }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view v-if="orderInfo.delivery_type === 'express'">快递单号:</view>
|
||||
<view v-if="orderInfo.delivery_type === 'send'">送货人电话:</view>
|
||||
<view class="conter">
|
||||
{{ orderInfo.delivery_id
|
||||
}}<span class="copy copy-data" :data-clipboard-text="orderInfo.delivery_id">复制</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:120upx;"></view>
|
||||
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
|
||||
<view class="more"></view>
|
||||
<view class="bnt cancel" @click="modify('0')" v-if="types == 0">
|
||||
一键改价
|
||||
</view>
|
||||
<view class="bnt cancel" @click="modify('0')" v-if="types == -1">
|
||||
立即退款
|
||||
</view>
|
||||
<view class="bnt cancel" @click="modify('1')">订单备注</view>
|
||||
<view class="bnt cancel" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay">
|
||||
确认付款
|
||||
</view>
|
||||
<navigator class="bnt delivery" v-if="types == 1" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id">去发货</navigator>
|
||||
</view>
|
||||
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
|
||||
:status="status"></PriceChange>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import PriceChange from "@/components/PriceChange";
|
||||
// #ifdef H5
|
||||
import ClipboardJS from "@/plugin/clipboard/clipboard.js";
|
||||
// #endif
|
||||
import {
|
||||
getAdminOrderDetail,
|
||||
setAdminOrderPrice,
|
||||
setAdminOrderRemark,
|
||||
setOfflinePay,
|
||||
setOrderRefund
|
||||
} from "@/api/admin";
|
||||
// import { required, num } from "@utils/validate";
|
||||
// import { validatorDefaultCatch } from "@utils/dialog";
|
||||
import {
|
||||
isMoney
|
||||
} from '@/utils/validate.js'
|
||||
|
||||
export default {
|
||||
name: "AdminOrder",
|
||||
components: {
|
||||
PriceChange
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
order: false,
|
||||
change: false,
|
||||
order_id: "",
|
||||
orderInfo: {
|
||||
_status: {}
|
||||
},
|
||||
status: "",
|
||||
title: "",
|
||||
payType: "",
|
||||
types: "",
|
||||
clickNum: 1,
|
||||
goname:''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"$route.params.oid": function(newVal) {
|
||||
let that = this;
|
||||
if (newVal != undefined) {
|
||||
that.order_id = newVal;
|
||||
that.getIndex();
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad: function(option) {
|
||||
let self = this
|
||||
this.order_id = option.id;
|
||||
this.goname = option.goname
|
||||
this.getIndex();
|
||||
// #ifdef H5
|
||||
this.$nextTick(function() {
|
||||
var clipboard = new ClipboardJS('.copy-data');
|
||||
// var copybtn = document.getElementsByClassName("copy-data");
|
||||
// var clipboard = new Clipboard(copybtn);
|
||||
clipboard.on('success', function(e) {
|
||||
self.$util.Tips({
|
||||
title:'复制成功'
|
||||
})
|
||||
});
|
||||
clipboard.on('error', function(e) {
|
||||
self.$util.Tips({
|
||||
title:'复制失败'
|
||||
})
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
|
||||
},
|
||||
methods: {
|
||||
more: function() {
|
||||
this.order = !this.order;
|
||||
},
|
||||
modify: function(status) {
|
||||
this.change = true;
|
||||
this.status = status;
|
||||
},
|
||||
changeclose: function(msg) {
|
||||
this.change = msg;
|
||||
},
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
getAdminOrderDetail(that.order_id).then(
|
||||
res => {
|
||||
that.orderInfo = res.data;
|
||||
that.types = res.data._status._type;
|
||||
that.title = res.data._status._title;
|
||||
that.payType = res.data._status._payType;
|
||||
},
|
||||
err => {
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
}, {
|
||||
tab: 3,
|
||||
url: 1
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
async savePrice(opt) {
|
||||
let that = this,
|
||||
data = {},
|
||||
price = opt.price,
|
||||
refund_price = opt.refund_price,
|
||||
refund_status = that.orderInfo.refund_status,
|
||||
remark = opt.remark;
|
||||
data.order_id = that.orderInfo.order_id;
|
||||
if (that.status == 0 && refund_status === 0) {
|
||||
if (!isMoney(price)) {
|
||||
return that.$util.Tips({
|
||||
title: '请输入正确的金额'
|
||||
});
|
||||
}
|
||||
data.price = price;
|
||||
setAdminOrderPrice(data).then(
|
||||
function() {
|
||||
that.change = false;
|
||||
that.$util.Tips({
|
||||
title: '改价成功',
|
||||
icon: 'success'
|
||||
})
|
||||
that.getIndex();
|
||||
},
|
||||
function() {
|
||||
that.change = false;
|
||||
that.$util.Tips({
|
||||
title: '改价失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
);
|
||||
} else if (that.status == 0 && refund_status === 1) {
|
||||
if (!isMoney(refund_price)) {
|
||||
return that.$util.Tips({
|
||||
title: '请输入正确的金额'
|
||||
});
|
||||
}
|
||||
data.price = refund_price;
|
||||
data.type = opt.type;
|
||||
setOrderRefund(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
that.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
that.getIndex();
|
||||
},
|
||||
err => {
|
||||
that.change = false;
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
}
|
||||
);
|
||||
} else {
|
||||
if (!remark) {
|
||||
return this.$util.Tips({
|
||||
title: '请输入备注'
|
||||
})
|
||||
}
|
||||
data.remark = remark;
|
||||
setAdminOrderRemark(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
this.$util.Tips({
|
||||
title: res,
|
||||
icon: 'success'
|
||||
})
|
||||
that.getIndex();
|
||||
},
|
||||
err => {
|
||||
that.change = false;
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
offlinePay: function() {
|
||||
setOfflinePay({
|
||||
order_id: this.orderInfo.order_id
|
||||
}).then(
|
||||
res => {
|
||||
this.$util.Tips({
|
||||
title: res,
|
||||
icon: 'success'
|
||||
});
|
||||
this.getIndex();
|
||||
},
|
||||
err => {
|
||||
this.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
// #ifdef MP
|
||||
copyNum(id) {
|
||||
|
||||
uni.setClipboardData({
|
||||
data: id,
|
||||
success: function() {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
},
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
webCopy(item, index) {
|
||||
let items = item
|
||||
let indexs = index
|
||||
let self = this
|
||||
|
||||
if (self.clickNum == 1) {
|
||||
self.clickNum += 1
|
||||
self.webCopy(items, indexs)
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*商户管理订单详情*/
|
||||
.pos-order-details .header {
|
||||
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
}
|
||||
|
||||
.pos-order-details .header .state {
|
||||
font-size: 36upx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pos-order-details .header .data {
|
||||
margin-left: 35upx;
|
||||
font-size: 28upx;
|
||||
}
|
||||
|
||||
.pos-order-details .header .data .order-num {
|
||||
font-size: 30upx;
|
||||
margin-bottom: 8upx;
|
||||
}
|
||||
|
||||
.pos-order-details .remarks {
|
||||
width: 100%;
|
||||
height: 86upx;
|
||||
background-color: #fff;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
|
||||
.pos-order-details .remarks .iconfont {
|
||||
font-size: 40upx;
|
||||
color: #2a7efb;
|
||||
}
|
||||
|
||||
.pos-order-details .remarks input {
|
||||
width: 630upx;
|
||||
height: 100%;
|
||||
font-size: 30upx;
|
||||
}
|
||||
|
||||
.pos-order-details .remarks input::placeholder {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.pos-order-details .orderingUser {
|
||||
font-size: 26upx;
|
||||
color: #282828;
|
||||
padding: 0 30upx;
|
||||
height: 67upx;
|
||||
background-color: #fff;
|
||||
margin-top: 16upx;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
}
|
||||
|
||||
.pos-order-details .orderingUser .iconfont {
|
||||
font-size: 40upx;
|
||||
color: #2a7efb;
|
||||
margin-right: 15upx;
|
||||
}
|
||||
|
||||
.pos-order-details .address {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.pos-order-details .pos-order-goods {
|
||||
margin-top: 17upx;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more {
|
||||
font-size: 27upx;
|
||||
color: #aaa;
|
||||
width: 100upx;
|
||||
height: 64upx;
|
||||
text-align: center;
|
||||
line-height: 64upx;
|
||||
margin-right: 25upx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .delivery {
|
||||
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order .arrow {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 11upx solid transparent;
|
||||
border-right: 11upx solid transparent;
|
||||
border-top: 20upx solid #e5e5e5;
|
||||
position: absolute;
|
||||
left: 15upx;
|
||||
bottom: -18upx;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order .arrow:before {
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 9upx solid transparent;
|
||||
border-right: 9upx solid transparent;
|
||||
border-top: 19upx solid #fff;
|
||||
position: absolute;
|
||||
left: -10upx;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order {
|
||||
width: 200upx;
|
||||
background-color: #fff;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 10upx;
|
||||
position: absolute;
|
||||
top: -200upx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order .item {
|
||||
height: 77upx;
|
||||
line-height: 77upx;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order .item~.item {
|
||||
border-top: 1px solid #f5f5f5;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .moreName {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/*订单详情*/
|
||||
.order-details .header {
|
||||
padding: 0 30upx;
|
||||
height: 150upx;
|
||||
}
|
||||
|
||||
.order-details .header.on {
|
||||
background-color: #666 !important;
|
||||
}
|
||||
|
||||
.order-details .header .pictrue {
|
||||
width: 110upx;
|
||||
height: 110upx;
|
||||
}
|
||||
|
||||
.order-details .header .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.order-details .header .data {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 24upx;
|
||||
margin-left: 27upx;
|
||||
}
|
||||
|
||||
.order-details .header.on .data {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.order-details .header .data .state {
|
||||
font-size: 30upx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
margin-bottom: 7upx;
|
||||
}
|
||||
|
||||
/* .order-details .header .data .time{margin-left:20upx;} */
|
||||
.order-details .nav {
|
||||
background-color: #fff;
|
||||
font-size: 26upx;
|
||||
color: #282828;
|
||||
padding: 25upx 0;
|
||||
}
|
||||
|
||||
.order-details .nav .navCon {
|
||||
padding: 0 40upx;
|
||||
}
|
||||
|
||||
.order-details .nav .navCon .on {
|
||||
font-weight: bold;
|
||||
color: #e93323;
|
||||
}
|
||||
|
||||
.order-details .nav .progress {
|
||||
padding: 0 65upx;
|
||||
margin-top: 10upx;
|
||||
}
|
||||
|
||||
.order-details .nav .progress .line {
|
||||
width: 100upx;
|
||||
height: 2upx;
|
||||
background-color: #939390;
|
||||
}
|
||||
|
||||
.order-details .nav .progress .iconfont {
|
||||
font-size: 25upx;
|
||||
color: #939390;
|
||||
margin-top: -2upx;
|
||||
width: 30upx;
|
||||
height: 30upx;
|
||||
line-height: 33upx;
|
||||
text-align: center;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.order-details .address {
|
||||
font-size: 26upx;
|
||||
color: #868686;
|
||||
background-color: #fff;
|
||||
padding: 25upx 30upx 30upx 30upx;
|
||||
}
|
||||
|
||||
.order-details .address .name {
|
||||
font-size: 30upx;
|
||||
color: #282828;
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
|
||||
.order-details .address .name .phone {
|
||||
margin-left: 40upx;
|
||||
}
|
||||
|
||||
.order-details .line {
|
||||
width: 100%;
|
||||
height: 3upx;
|
||||
}
|
||||
|
||||
.order-details .line image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.order-details .wrapper {
|
||||
background-color: #fff;
|
||||
margin-top: 12upx;
|
||||
padding: 30upx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item {
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item~.item {
|
||||
margin-top: 20upx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .conter {
|
||||
color: #868686;
|
||||
width: 500upx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .conter .copy {
|
||||
font-size: 20rpx;
|
||||
color: #333;
|
||||
border-radius: 3rpx;
|
||||
border: 1px solid #666;
|
||||
padding: 0rpx 15rpx;
|
||||
margin-left: 24rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .actualPay {
|
||||
border-top: 1upx solid #eee;
|
||||
margin-top: 30upx;
|
||||
padding-top: 30upx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .actualPay .money {
|
||||
font-weight: bold;
|
||||
font-size: 30upx;
|
||||
}
|
||||
|
||||
.order-details .footer {
|
||||
width: 100%;
|
||||
height: 100upx;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
padding: 0 30upx;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.order-details .footer .bnt {
|
||||
width: auto;
|
||||
height: 60upx;
|
||||
line-height: 60upx;
|
||||
text-align: center;
|
||||
line-height: upx;
|
||||
border-radius: 50upx;
|
||||
color: #fff;
|
||||
font-size: 27upx;
|
||||
padding: 0 3%;
|
||||
}
|
||||
|
||||
.order-details .footer .bnt.cancel {
|
||||
color: #aaa;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.order-details .footer .bnt.default {
|
||||
color: #444;
|
||||
border: 1px solid #444;
|
||||
}
|
||||
|
||||
.order-details .footer .bnt~.bnt {
|
||||
margin-left: 18upx;
|
||||
}
|
||||
|
||||
.pos-order-goods {
|
||||
padding: 0 30upx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods {
|
||||
height: 185upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods~.goods {
|
||||
border-top: 1px dashed #e5e5e5;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt {
|
||||
width: 515upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .pictrue {
|
||||
width: 130upx;
|
||||
height: 130upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .text {
|
||||
width: 365upx;
|
||||
height: 130upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .text .info {
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .text .attr {
|
||||
font-size: 24upx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money {
|
||||
width: 164upx;
|
||||
text-align: right;
|
||||
font-size: 28upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money .x-money {
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money .num {
|
||||
color: #ff9600;
|
||||
margin: 5upx 0;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money .y-money {
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.public-total {
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
border-top: 1px solid #eee;
|
||||
height: 92upx;
|
||||
line-height: 92upx;
|
||||
text-align: right;
|
||||
padding: 0 30upx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.public-total .money {
|
||||
color: #ff4c3c;
|
||||
}
|
||||
</style>
|
|
@ -1,466 +0,0 @@
|
|||
<template>
|
||||
<view class="pos-order-list" ref="container">
|
||||
<view class="nav acea-row row-around row-middle">
|
||||
<view class="item" :class="where.status == 0 ? 'on' : ''" @click="changeStatus(0)">
|
||||
待付款
|
||||
</view>
|
||||
<view class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">
|
||||
待发货
|
||||
</view>
|
||||
<view class="item" :class="where.status == 2 ? 'on' : ''" @click="changeStatus(2)">
|
||||
待收货
|
||||
</view>
|
||||
<view class="item" :class="where.status == 3 ? 'on' : ''" @click="changeStatus(3)">
|
||||
待评价
|
||||
</view>
|
||||
<view class="item" :class="where.status == 4 ? 'on' : ''" @click="changeStatus(4)">
|
||||
已完成
|
||||
</view>
|
||||
<view class="item" :class="where.status == -3 ? 'on' : ''" @click="changeStatus(-3)">
|
||||
退款
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
<view class="order-num acea-row row-middle" @click="toDetail(item)">
|
||||
订单号:{{ item.order_id }}
|
||||
<span class="time">下单时间:{{ item.add_time }}</span>
|
||||
</view>
|
||||
<view class="pos-order-goods" v-for="(val, key) in item._info" :key="key">
|
||||
<view class="goods acea-row row-between-wrapper" @click="toDetail(item)">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="val.cart_info.productInfo.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-between row-column">
|
||||
<view class="info line2">
|
||||
{{ val.cart_info.productInfo.store_name }}
|
||||
</view>
|
||||
<view class="attr" v-if="val.cart_info.productInfo.suk">
|
||||
{{ val.cart_info.productInfo.suk }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money">
|
||||
<view class="x-money">¥{{ val.cart_info.productInfo.price }}</view>
|
||||
<view class="num">x{{ val.cart_info.cart_num }}</view>
|
||||
<view class="y-money">
|
||||
¥{{ val.cart_info.productInfo.ot_price }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="public-total">
|
||||
共{{ item.total_num }}件商品,应支付
|
||||
<span class="money">¥{{ item.pay_price }}</span> ( 邮费 ¥{{
|
||||
item.total_postage
|
||||
}}
|
||||
)
|
||||
</view>
|
||||
<view class="operation acea-row row-between-wrapper">
|
||||
<view class="more">
|
||||
<!-- <view class="iconfont icon-gengduo" @click="more(index)"></view>-->
|
||||
<!-- <view class="order" v-show="current === index">-->
|
||||
<!-- <view class="items">-->
|
||||
<!-- {{ where.status > 0 ? "删除" : "取消" }}订单-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="arrow"></view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<view class="acea-row row-middle">
|
||||
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 0">
|
||||
一键改价
|
||||
</view>
|
||||
<view class="bnt" @click="modify(item, 1)">订单备注</view>
|
||||
<view class="bnt" @click="modify(item, 0)" v-if="where.status == -3 && item.refund_status === 1">
|
||||
立即退款
|
||||
</view>
|
||||
<view class="bnt cancel" v-if="item.pay_type === 'offline' && item.paid === 0" @click="offlinePay(item)">
|
||||
确认付款
|
||||
</view>
|
||||
<navigator class="bnt" v-if="where.status == 1" :url="'/pages/admin/delivery/index?id='+item.order_id">去发货
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
|
||||
:status="status"></PriceChange>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getAdminOrderList,
|
||||
setAdminOrderPrice,
|
||||
setAdminOrderRemark,
|
||||
setOfflinePay,
|
||||
setOrderRefund
|
||||
} from "@/api/admin";
|
||||
import Loading from '@/components/Loading/index'
|
||||
import PriceChange from '@/components/PriceChange/index'
|
||||
import { isMoney } from '@/utils/validate.js'
|
||||
export default {
|
||||
name: "AdminOrderList",
|
||||
components: {
|
||||
Loading,
|
||||
PriceChange
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
current: "",
|
||||
change: false,
|
||||
types: 0,
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
status: 0
|
||||
},
|
||||
list: [],
|
||||
loaded: false,
|
||||
loading: false,
|
||||
orderInfo: {},
|
||||
status: ""
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"$route.params.types": function(newVal) {
|
||||
let that = this;
|
||||
if (newVal != undefined) {
|
||||
that.where.status = newVal;
|
||||
that.init();
|
||||
}
|
||||
},
|
||||
types: function() {
|
||||
this.getIndex();
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.where.status = option.types
|
||||
this.current = "";
|
||||
this.getIndex();
|
||||
},
|
||||
methods: {
|
||||
// 获取数据
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
if (that.loading || that.loaded) return;
|
||||
that.loading = true;
|
||||
getAdminOrderList(that.where).then(
|
||||
res => {
|
||||
that.loading = false;
|
||||
that.loaded = res.data.length < that.where.limit;
|
||||
that.list.push.apply(that.list, res.data);
|
||||
that.where.page = that.where.page + 1;
|
||||
},
|
||||
err => {
|
||||
that.$dialog.error(err);
|
||||
}
|
||||
);
|
||||
},
|
||||
// 初始化
|
||||
init: function() {
|
||||
this.list = [];
|
||||
this.where.page = 1;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
this.getIndex();
|
||||
this.current = "";
|
||||
},
|
||||
// 导航切换
|
||||
changeStatus(val) {
|
||||
if (this.where.status != val) {
|
||||
this.where.status = val;
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
// 商品操作
|
||||
modify: function(item, status) {
|
||||
let temp = status.toString()
|
||||
this.change = true;
|
||||
this.orderInfo = item;
|
||||
this.status = temp;
|
||||
},
|
||||
changeclose: function(msg) {
|
||||
this.change = msg;
|
||||
},
|
||||
async savePrice(opt) {
|
||||
let that = this,
|
||||
data = {},
|
||||
price = opt.price,
|
||||
refund_price = opt.refund_price,
|
||||
refund_status = that.orderInfo.refund_status,
|
||||
remark = opt.remark;
|
||||
data.order_id = that.orderInfo.order_id;
|
||||
if (that.status == 0 && refund_status === 0) {
|
||||
if(!isMoney(price)){
|
||||
return that.$util.Tips({title: '请输入正确的金额'});
|
||||
}
|
||||
data.price = price;
|
||||
setAdminOrderPrice(data).then(
|
||||
function() {
|
||||
that.change = false;
|
||||
that.$util.Tips({
|
||||
title:'改价成功',
|
||||
icon:'success'
|
||||
})
|
||||
that.init();
|
||||
},
|
||||
function() {
|
||||
that.change = false;
|
||||
that.$util.Tips({
|
||||
title:'改价失败',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
);
|
||||
} else if (that.status == 0 && refund_status === 1) {
|
||||
if(!isMoney(refund_price)){
|
||||
return that.$util.Tips({title: '请输入正确的金额'});
|
||||
}
|
||||
data.price = refund_price;
|
||||
data.type = opt.type;
|
||||
setOrderRefund(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
that.$util.Tips({title: res});
|
||||
that.init();
|
||||
},
|
||||
err => {
|
||||
that.change = false;
|
||||
that.$util.Tips({title: err});
|
||||
}
|
||||
);
|
||||
} else {
|
||||
|
||||
if(!remark){
|
||||
return this.$util.Tips({
|
||||
title:'请输入备注'
|
||||
})
|
||||
}
|
||||
data.remark = remark;
|
||||
setAdminOrderRemark(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
this.$util.Tips({
|
||||
title:res,
|
||||
icon:'success'
|
||||
})
|
||||
that.init();
|
||||
},
|
||||
err => {
|
||||
that.change = false;
|
||||
that.$util.Tips({title: err});
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
toDetail(item){
|
||||
uni.navigateTo({
|
||||
url:`/pages/admin/orderDetail/index?id=${item.order_id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getIndex()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.pos-order-list .nav {
|
||||
width: 100%;
|
||||
height: 96upx;
|
||||
background-color: #fff;
|
||||
font-size: 30upx;
|
||||
color: #282828;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.pos-order-list .nav .item.on {
|
||||
color: #2291f8;
|
||||
}
|
||||
|
||||
.pos-order-list .list {
|
||||
margin-top: 120upx;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item~.item {
|
||||
margin-top: 24upx;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .order-num {
|
||||
height: 124upx;
|
||||
border-bottom: 1px solid #eee;
|
||||
font-size: 30upx;
|
||||
font-weight: bold;
|
||||
color: #282828;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .order-num .time {
|
||||
font-size: 26upx;
|
||||
font-weight: normal;
|
||||
color: #999;
|
||||
margin-top: -40upx;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation {
|
||||
padding: 20upx 30upx;
|
||||
margin-top: 3upx;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .more {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .icon-gengduo {
|
||||
font-size: 50upx;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .order .arrow {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 11upx solid transparent;
|
||||
border-right: 11upx solid transparent;
|
||||
border-top: 20upx solid #e5e5e5;
|
||||
position: absolute;
|
||||
left: 15upx;
|
||||
bottom: -18upx;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .order .arrow:before {
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 7upx solid transparent;
|
||||
border-right: 7upx solid transparent;
|
||||
border-top: 20upx solid #fff;
|
||||
position: absolute;
|
||||
left: -7upx;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .order {
|
||||
width: 200upx;
|
||||
background-color: #fff;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 10upx;
|
||||
position: absolute;
|
||||
top: -100upx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .order .items {
|
||||
height: 77upx;
|
||||
line-height: 77upx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .order .items~.items {
|
||||
border-top: 1px solid #f5f5f5;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .bnt {
|
||||
font-size: 28upx;
|
||||
color: #5c5c5c;
|
||||
width: 170upx;
|
||||
height: 60upx;
|
||||
border-radius: 30upx;
|
||||
border: 1px solid #bbb;
|
||||
text-align: center;
|
||||
line-height: 60upx;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .bnt~.bnt {
|
||||
margin-left: 14upx;
|
||||
}
|
||||
|
||||
.pos-order-goods {
|
||||
padding: 0 30upx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods {
|
||||
height: 185upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods~.goods {
|
||||
border-top: 1px dashed #e5e5e5;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt {
|
||||
width: 515upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .pictrue {
|
||||
width: 130upx;
|
||||
height: 130upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .text {
|
||||
width: 365upx;
|
||||
height: 130upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .text .info {
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .picTxt .text .attr {
|
||||
font-size: 24upx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money {
|
||||
width: 164upx;
|
||||
text-align: right;
|
||||
font-size: 28upx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money .x-money {
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money .num {
|
||||
color: #ff9600;
|
||||
margin: 5upx 0;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods .money .y-money {
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.public-total {
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
border-top: 1px solid #eee;
|
||||
height: 92upx;
|
||||
line-height: 92upx;
|
||||
text-align: right;
|
||||
padding: 0 30upx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.public-total .money {
|
||||
color: #ff4c3c;
|
||||
}
|
||||
</style>
|
Before Width: | Height: | Size: 191 KiB |
|
@ -1,631 +0,0 @@
|
|||
<template>
|
||||
<div class="statistical-page" ref="container">
|
||||
<div class="navs">
|
||||
<div class="list">
|
||||
<div class="item" :class="time == 'today' ? 'on' : ''" @click="setTime('today')">
|
||||
今天
|
||||
</div>
|
||||
<div class="item" :class="time == 'yesterday' ? 'on' : ''" @click="setTime('yesterday')">
|
||||
昨天
|
||||
</div>
|
||||
<div class="item" :class="time == 'seven' ? 'on' : ''" @click="setTime('seven')">
|
||||
最近7天
|
||||
</div>
|
||||
<div class="item" :class="time == 'month' ? 'on' : ''" @click="setTime('month')">
|
||||
本月
|
||||
</div>
|
||||
<div class="item" :class="time == 'date' ? 'on' : ''" @click="dateTitle">
|
||||
<!-- <span class="iconfont icon-xiangxia"></span>
|
||||
<span v-for="(value, index) in renderValues" :key="index">
|
||||
{{ value }}</span
|
||||
> -->
|
||||
自定义
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="title">
|
||||
{{ title }}{{ this.where.type == 1 ? "营业额(元)" : "订单量(份)" }}
|
||||
</div>
|
||||
<div class="money">{{ time_price }}</div>
|
||||
<div class="increase acea-row row-between-wrapper">
|
||||
<div>
|
||||
{{ title }}增长率:<span :class="increase_time_status === 1 ? 'red' : 'green'">{{ increase_time_status === 1 ? "" : "-" }}{{ growth_rate }}%
|
||||
<span class="iconfont" :class="
|
||||
increase_time_status === 1
|
||||
? 'icon-xiangshang1'
|
||||
: 'icon-xiangxia2'
|
||||
"></span></span>
|
||||
</div>
|
||||
<div>
|
||||
{{ title }}增长:<span :class="increase_time_status === 1 ? 'red' : 'green'">{{ increase_time_status === 1 ? "" : "-" }}{{ increase_time }}
|
||||
<span class="iconfont" :class="
|
||||
increase_time_status === 1
|
||||
? 'icon-xiangshang1'
|
||||
: 'icon-xiangxia2'
|
||||
"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart">
|
||||
<div class="chart-title">
|
||||
单位({{where.type == 1?'元':'份'}})
|
||||
</div>
|
||||
<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" disable-scroll=true @touchstart="touchLineA"
|
||||
@touchmove="moveLineA" @touchend="touchEndLineA"></canvas>
|
||||
</div>
|
||||
<div class="public-wrapper">
|
||||
<div class="title">
|
||||
<span class="iconfont icon-xiangxishuju"></span>详细数据
|
||||
</div>
|
||||
<div class="nav acea-row row-between-wrapper">
|
||||
<div class="data">日期</div>
|
||||
<div class="browse">订单量</div>
|
||||
<div class="turnover">成交额</div>
|
||||
</div>
|
||||
<div class="conter">
|
||||
<div class="item acea-row row-between-wrapper" v-for="(item, index) in list" :key="index">
|
||||
<div class="data">{{ item.time }}</div>
|
||||
<div class="browse">{{ item.count }}</div>
|
||||
<div class="turnover">{{ item.price }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<uni-calendar ref="calendar" :date="info.date" :insert="info.insert" :lunar="info.lunar" :startDate="info.startDate" :endDate="info.endDate" :range="info.range" @confirm="confirm" :showMonth="info.showMonth" />
|
||||
<div class="mask" @touchmove.prevent v-show="current === true" @click="close"></div>
|
||||
<!-- <Loading :loaded="loaded" :loading="loading"></Loading> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import uCharts from '@/components/ucharts/ucharts'
|
||||
import uniCalendar from '@/components/uni-calendar/uni-calendar.vue'
|
||||
var canvaLineA = null;
|
||||
// import Calendar from 'mpvue-calendar'
|
||||
// #ifdef MP-WEIXIN
|
||||
// import 'mpvue-calendar/src/style.css
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
// import 'mpvue-calendar/src/browser-style.css'
|
||||
// #endif
|
||||
|
||||
import {
|
||||
getStatisticsMonth,
|
||||
getStatisticsTime
|
||||
} from "@/api/admin";
|
||||
// import Loading from "@components/Loading";
|
||||
const year = new Date().getFullYear();
|
||||
const month = new Date().getMonth() + 1;
|
||||
const day = new Date().getDate();
|
||||
export default {
|
||||
name: "Statistics",
|
||||
components: {
|
||||
// Calendar,
|
||||
// uCharts
|
||||
uniCalendar
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
value: [
|
||||
[year, month, day - 1],
|
||||
[year, month, day]
|
||||
],
|
||||
isrange: true,
|
||||
weekSwitch: false,
|
||||
ismulti: false,
|
||||
monFirst: true,
|
||||
clean: false, //简洁模式
|
||||
lunar: false, //显示农历
|
||||
renderValues: [],
|
||||
monthRange: [],
|
||||
current: false,
|
||||
where: {
|
||||
start: "",
|
||||
stop: "",
|
||||
type: ""
|
||||
},
|
||||
types: "", //类型|order=订单数|price=营业额
|
||||
time: "", //时间|today=今天|yesterday=昨天|month=本月
|
||||
title: "", //时间|today=今天|yesterday=昨天|month=本月
|
||||
growth_rate: "", //增长率
|
||||
increase_time: "", //增长率
|
||||
increase_time_status: "", //增长率
|
||||
time_price: "", //增长率
|
||||
loaded: false,
|
||||
loading: false,
|
||||
filter: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
start: "",
|
||||
stop: ""
|
||||
},
|
||||
list: [],
|
||||
// charts
|
||||
cWidth: '',
|
||||
cHeight: '',
|
||||
pixelRatio: 1,
|
||||
textarea: '',
|
||||
"LineA": {
|
||||
"categories": ["2012", "2013", "2014", "2015", "2016", "2017"],
|
||||
"series": [{
|
||||
"data": [35, 8, 25, 37, 4, 20]
|
||||
}]
|
||||
},
|
||||
info: {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
lunar: false,
|
||||
range: true,
|
||||
insert: false,
|
||||
selected: [],
|
||||
showMonth:false
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"$route.params": function(newVal) {
|
||||
var that = this;
|
||||
if (newVal != undefined) {
|
||||
that.setType(newVal.type);
|
||||
that.setTime(newVal.time);
|
||||
that.getIndex();
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad: function(options) {
|
||||
this.setType(options.type);
|
||||
this.setTime(options.time);
|
||||
this.cWidth = uni.upx2px(690);
|
||||
this.cHeight = uni.upx2px(500);
|
||||
|
||||
// this.handelRenderValues();
|
||||
// this.getIndex();
|
||||
this.getInfo();
|
||||
// this.$scroll(this.$refs.container, () => {
|
||||
// !this.loading && this.getInfo();
|
||||
// });
|
||||
},
|
||||
computed: {
|
||||
monthRangeText() {
|
||||
return this.monthRange.length ? "固定" : "指定范围";
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getIndex: function() {
|
||||
let tempDay = []
|
||||
let tempNum = []
|
||||
var that = this;
|
||||
getStatisticsTime(that.where).then(
|
||||
res => {
|
||||
var _info = res.data.chart,
|
||||
day = [],
|
||||
num = [];
|
||||
_info.forEach(function(item) {
|
||||
day.push(item.time);
|
||||
num.push(item.num);
|
||||
});
|
||||
that.growth_rate = res.data.growth_rate;
|
||||
that.increase_time = res.data.increase_time;
|
||||
that.increase_time_status = res.data.increase_time_status;
|
||||
that.time_price = res.data.time;
|
||||
|
||||
res.data.chart.forEach((item, index) => {
|
||||
tempDay.push(item.time)
|
||||
tempNum.push(item.num)
|
||||
})
|
||||
that.LineA.categories = tempDay
|
||||
that.LineA.series[0].data = tempNum
|
||||
that.showLineA("canvasLineA", that.LineA);
|
||||
},
|
||||
error => {
|
||||
that.$dialog.error(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
setTime: function(time) {
|
||||
let self = this
|
||||
this.time = time;
|
||||
var year = new Date().getFullYear(),
|
||||
month = new Date().getMonth() + 1,
|
||||
day = new Date().getDate();
|
||||
this.list = [];
|
||||
this.filter.page = 1;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
switch (time) {
|
||||
case "today":
|
||||
this.where.start =
|
||||
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
|
||||
1000;
|
||||
this.where.stop =
|
||||
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
|
||||
1000 +
|
||||
24 * 60 * 60 -
|
||||
1;
|
||||
this.title = "今日";
|
||||
this.getIndex();
|
||||
this.getInfo();
|
||||
break;
|
||||
case "yesterday":
|
||||
this.where.start =
|
||||
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
|
||||
1000 -
|
||||
24 * 60 * 60;
|
||||
this.where.stop =
|
||||
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
|
||||
1000 -
|
||||
1;
|
||||
this.title = "昨日";
|
||||
this.getIndex();
|
||||
this.getInfo();
|
||||
break;
|
||||
case "month":
|
||||
this.where.start =
|
||||
new Date(year, new Date().getMonth(), 1).getTime() / 1000;
|
||||
this.where.stop = new Date(year, month, 1).getTime() / 1000 - 1;
|
||||
this.title = "本月";
|
||||
this.getIndex();
|
||||
this.getInfo();
|
||||
break;
|
||||
case "seven":
|
||||
this.where.start =
|
||||
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
|
||||
1000 +
|
||||
24 * 60 * 60 -
|
||||
7 * 3600 * 24;
|
||||
this.where.stop =
|
||||
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
|
||||
1000 +
|
||||
24 * 60 * 60 -
|
||||
1;
|
||||
this.title = "七日";
|
||||
this.getIndex();
|
||||
this.getInfo();
|
||||
break;
|
||||
}
|
||||
},
|
||||
setType: function(type) {
|
||||
switch (type) {
|
||||
case "price":
|
||||
this.where.type = 1;
|
||||
break;
|
||||
case "order":
|
||||
this.where.type = 2;
|
||||
break;
|
||||
}
|
||||
},
|
||||
dateTitle: function() {
|
||||
this.$refs.calendar.open()
|
||||
this.time = 'date'
|
||||
// this.current = true;
|
||||
},
|
||||
close: function() {
|
||||
this.current = false;
|
||||
},
|
||||
getInfo: function() {
|
||||
var that = this;
|
||||
if (that.loading || that.loaded) return;
|
||||
that.loading = true;
|
||||
that.filter.start = that.where.start;
|
||||
that.filter.stop = that.where.stop;
|
||||
getStatisticsMonth(that.filter).then(
|
||||
res => {
|
||||
that.loading = false;
|
||||
that.loaded = res.data.length < that.filter.limit;
|
||||
that.list.push.apply(that.list, res.data);
|
||||
that.filter.page = that.filter.page + 1;
|
||||
},
|
||||
error => {
|
||||
that.$dialog.message(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
// 创建charts
|
||||
showLineA(canvasId, chartData) {
|
||||
let _self = this
|
||||
canvaLineA = new uCharts({
|
||||
$this: _self,
|
||||
canvasId: canvasId,
|
||||
type: 'line',
|
||||
fontSize: 11,
|
||||
padding: [15, 15, 0, 15],
|
||||
legend: {
|
||||
show: false,
|
||||
padding: 5,
|
||||
lineHeight: 11,
|
||||
margin: 5,
|
||||
},
|
||||
dataLabel: true,
|
||||
dataPointShape: true,
|
||||
dataPointShapeType: 'hollow',
|
||||
background: '#FFFFFF',
|
||||
pixelRatio: _self.pixelRatio,
|
||||
categories: chartData.categories,
|
||||
series: chartData.series,
|
||||
animation: true,
|
||||
enableScroll: true, //开启图表拖拽功能
|
||||
xAxis: {
|
||||
disableGrid: false,
|
||||
type: 'grid',
|
||||
gridType: 'dash',
|
||||
itemCount: 4,
|
||||
scrollShow: true,
|
||||
scrollAlign: 'left'
|
||||
},
|
||||
yAxis: {
|
||||
//disabled:true
|
||||
gridType: 'dash',
|
||||
splitNumber: 8,
|
||||
min: 0,
|
||||
max: 30,
|
||||
format: (val) => {
|
||||
return val.toFixed(0)
|
||||
} //如不写此方法,Y轴刻度默认保留两位小数
|
||||
},
|
||||
width: _self.cWidth * _self.pixelRatio,
|
||||
height: _self.cHeight * _self.pixelRatio,
|
||||
extra: {
|
||||
line: {
|
||||
type: 'straight'
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// charts触摸事件
|
||||
touchLineA(e) {
|
||||
canvaLineA.scrollStart(e);
|
||||
},
|
||||
moveLineA(e) {
|
||||
canvaLineA.scroll(e);
|
||||
},
|
||||
touchEndLineA(e) {
|
||||
canvaLineA.scrollEnd(e);
|
||||
},
|
||||
// 日历确定
|
||||
confirm(e) {
|
||||
let self = this
|
||||
if(e.range.after && e.range.before){
|
||||
let star = new Date(e.range.after).getTime()/1000
|
||||
let stop = new Date(e.range.before).getTime()/1000
|
||||
self.where.start = star
|
||||
self.where.stop = stop
|
||||
self.list = [];
|
||||
self.filter.page = 1;
|
||||
self.loaded = false;
|
||||
self.loading = false;
|
||||
Promise.all([self.getIndex(),self.getInfo()]);
|
||||
}
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getInfo();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
/*交易额统计*/
|
||||
.statistical-page .navs {
|
||||
width: 100%;
|
||||
height: 96upx;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
line-height: 96upx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.statistical-page .navs .list {
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.statistical-page .navs .item {
|
||||
font-size: 32upx;
|
||||
color: #282828;
|
||||
margin-left: 60upx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.statistical-page .navs .item.on {
|
||||
color: #2291f8;
|
||||
}
|
||||
|
||||
.statistical-page .navs .item .iconfont {
|
||||
font-size: 25upx;
|
||||
margin-left: 13upx;
|
||||
}
|
||||
|
||||
.statistical-page .wrapper {
|
||||
width: 740upx;
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
margin: 119upx auto 0 auto;
|
||||
padding: 50upx 60upx;
|
||||
}
|
||||
|
||||
.statistical-page .wrapper .title {
|
||||
font-size: 30upx;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.statistical-page .wrapper .money {
|
||||
font-size: 72upx;
|
||||
color: #fba02a;
|
||||
text-align: center;
|
||||
margin-top: 10upx;
|
||||
}
|
||||
|
||||
.statistical-page .wrapper .increase {
|
||||
font-size: 28upx;
|
||||
color: #999;
|
||||
margin-top: 20upx;
|
||||
}
|
||||
|
||||
.statistical-page .wrapper .increase .red {
|
||||
color: #ff6969;
|
||||
}
|
||||
|
||||
.statistical-page .wrapper .increase .green {
|
||||
color: #1abb1d;
|
||||
}
|
||||
|
||||
.statistical-page .wrapper .increase .iconfont {
|
||||
font-size: 23upx;
|
||||
margin-left: 15upx;
|
||||
}
|
||||
|
||||
.statistical-page .chart {
|
||||
width: 690upx;
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
margin: 23upx auto 0 auto;
|
||||
/* padding: 25upx 22upx 0 22upx; */
|
||||
}
|
||||
|
||||
.statistical-page .chart .chart-title{
|
||||
padding:20upx 20upx 10upx;
|
||||
font-size: 26upx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.statistical-page .chart canvas {
|
||||
width: 100%;
|
||||
height: 530rpx;
|
||||
}
|
||||
|
||||
.statistical-page .chart .company {
|
||||
font-size: 26upx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.yd-confirm {
|
||||
background-color: #fff;
|
||||
font-size: unset;
|
||||
width: 540upx;
|
||||
height: 250upx;
|
||||
border-radius: 40upx;
|
||||
}
|
||||
|
||||
.yd-confirm-hd {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.yd-confirm-title {
|
||||
color: #030303;
|
||||
font-weight: bold;
|
||||
font-size: 36upx;
|
||||
}
|
||||
|
||||
.yd-confirm-bd {
|
||||
text-align: center;
|
||||
font-size: 28upx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.yd-confirm-ft {
|
||||
line-height: 90upx;
|
||||
margin-top: 14px;
|
||||
border-top: 1upx solid #eee;
|
||||
}
|
||||
|
||||
.yd-confirm-ft>a {
|
||||
color: #e93323;
|
||||
}
|
||||
|
||||
.yd-confirm-ft>a.primary {
|
||||
border-left: 1upx solid #eee;
|
||||
color: #e93323;
|
||||
}
|
||||
|
||||
.echarts {
|
||||
width: 100%;
|
||||
height: 550upx;
|
||||
}
|
||||
|
||||
.calendar-wrapper {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 777;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
}
|
||||
|
||||
.calendar-wrapper.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.statistical-page .wrapper .increase {
|
||||
font-size: 26upx;
|
||||
}
|
||||
|
||||
.statistical-page .wrapper .increase .iconfont {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.public-wrapper .title {
|
||||
font-size: 30upx;
|
||||
color: #282828;
|
||||
padding: 0 30upx;
|
||||
margin-bottom: 20upx;
|
||||
}
|
||||
|
||||
.public-wrapper .title .iconfont {
|
||||
color: #2291f8;
|
||||
font-size: 40upx;
|
||||
margin-right: 13upx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.public-wrapper {
|
||||
margin: 18upx auto 0 auto;
|
||||
width: 690upx;
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
padding-top: 25upx;
|
||||
}
|
||||
|
||||
.public-wrapper .nav {
|
||||
padding: 0 30upx;
|
||||
height: 70upx;
|
||||
line-height: 70upx;
|
||||
font-size: 24upx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.public-wrapper .data {
|
||||
width: 210upx;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.public-wrapper .browse {
|
||||
width: 192upx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.public-wrapper .turnover {
|
||||
width: 227upx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.public-wrapper .conter {
|
||||
padding: 0 30upx;
|
||||
}
|
||||
|
||||
.public-wrapper .conter .item {
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
height: 70upx;
|
||||
font-size: 24upx;
|
||||
}
|
||||
|
||||
.public-wrapper .conter .item .turnover {
|
||||
color: #d84242;
|
||||
}
|
||||
</style>
|
|
@ -25,7 +25,6 @@
|
|||
wechat.auth(code, state)
|
||||
.then(() => {
|
||||
getUserInfo().then(res => {
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
location.href = decodeURIComponent(
|
||||
decodeURIComponent(option.back_url)
|
||||
);
|
||||
|
|
|
@ -63,7 +63,6 @@ export default {
|
|||
if (this.type === "1") {
|
||||
this.name = "精品推荐";
|
||||
this.icon = "icon-jingpintuijian";
|
||||
// document.title = "精品推荐";
|
||||
uni.setNavigationBarTitle({
|
||||
title:"精品推荐"
|
||||
})
|
||||
|
|
|
@ -266,7 +266,6 @@
|
|||
import {
|
||||
getOrderDetail
|
||||
} from "@/api/order";
|
||||
// import VueCoreImageUpload from "vue-core-image-upload";
|
||||
import easyUpload from '@/components/easy-upload/easy-upload.vue'
|
||||
import {
|
||||
TOKENNAME,
|
||||
|
@ -291,8 +290,6 @@
|
|||
export default {
|
||||
name: NAME,
|
||||
components: {
|
||||
// swiper,
|
||||
// swiperSlide,
|
||||
easyUpload,
|
||||
home
|
||||
},
|
||||
|
@ -482,7 +479,6 @@
|
|||
this.getHistory();
|
||||
},
|
||||
imageuploaded(res) {
|
||||
console.log(res)
|
||||
if (res.status !== 200) return this.$dialog.error(res || "上传图片失败");
|
||||
this.sendMsg(res.data.url, 3);
|
||||
},
|
||||
|
@ -515,7 +511,6 @@
|
|||
this.active = false;
|
||||
},
|
||||
keyup: function() {
|
||||
console.log(this.$refs.input.innerHTML.length);
|
||||
if (this.$refs.input.innerHTML.length > 0) {
|
||||
this.sendColor = true;
|
||||
} else {
|
||||
|
@ -557,13 +552,6 @@
|
|||
}else{
|
||||
this.sendColor = false
|
||||
}
|
||||
// if ($event.keyCode === 13) {
|
||||
// $event.preventDefault();
|
||||
// if (this.$refs.input.innerHTML) {
|
||||
// this.sendMsg(this.$refs.input.innerHTML, 1);
|
||||
// this.$refs.input.innerHTML = "";
|
||||
// }
|
||||
// }
|
||||
this.height();
|
||||
},
|
||||
start() {
|
||||
|
@ -622,9 +610,6 @@
|
|||
// this.$refs.input.blur();
|
||||
// });
|
||||
}
|
||||
// this.$nextTick(function() {
|
||||
// window.scrollTo(0, document.documentElement.scrollHeight);
|
||||
// });
|
||||
this.height();
|
||||
},
|
||||
height() {
|
||||
|
@ -771,7 +756,7 @@
|
|||
|
||||
.broadcast_details_pic {
|
||||
font-size: 36rpx;
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
},
|
||||
onLoad: function (options) {
|
||||
this.type = options.type;
|
||||
cosole.log('hello')
|
||||
},
|
||||
onShow: function () {
|
||||
let type = this.type;
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<template>
|
||||
<view class='productSort copy-data'>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view class="sys-head" :style="{height:sysHeight}"></view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class='productSort'>
|
||||
<view class='header acea-row row-center-wrapper'>
|
||||
<view class='acea-row row-between-wrapper input'>
|
||||
<text class='iconfont icon-sousuo'></text>
|
||||
|
@ -11,15 +7,18 @@
|
|||
placeholder-class='placeholder'></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class='aside'>
|
||||
<view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""' v-for="(item,index) in productList"
|
||||
<view class='aside' :style="{bottom: tabbarH + 'px',height: height + 'rpx'}">
|
||||
<scroll-view scroll-y="true" scroll-with-animation='true' style="height: 100%;">
|
||||
<view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""' v-for="(item,index) in productList"
|
||||
:key="index" @click='tap(index,"b"+index)'><text>{{item.name}}</text></view>
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
<view class='conter'>
|
||||
<scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;"' @scroll="scroll"
|
||||
<scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;margin-top: 96rpx;"' @scroll="scroll"
|
||||
scroll-with-animation='true'>
|
||||
<block v-for="(item,index) in productList" :key="index">
|
||||
|
||||
|
||||
<view class='listw' :id="'b'+index">
|
||||
<view class='title acea-row row-center-wrapper'>
|
||||
<view class='line'></view>
|
||||
|
@ -29,10 +28,7 @@
|
|||
<view class='list acea-row'>
|
||||
<block v-for="(itemn,indexn) in item.child" :key="indexn">
|
||||
<navigator hover-class='none' :url='"/pages/goods_list/index?cid="+itemn.id+"&title="+itemn.name' class='item acea-row row-column row-middle'>
|
||||
<!-- <view class='picture' :style="{'background-color':(itemn.extra&&itemn.extra.indexOf('https://') > -1) || (itemn.extra&&itemn.extra.indexOf('http://') > -1)?'none':'#f7f7f7'}">
|
||||
<image :src='itemn.extra'></image>
|
||||
</view> -->
|
||||
<view class='picture' :style="{'background-color':itemn.extra?'none':'#f7f7f7'}">
|
||||
<view class='picture' :style="{'background-color':itemn.extra?'none':'#f7f7f7'}">
|
||||
<image :src='itemn.extra'></image>
|
||||
</view>
|
||||
<view class='name line1'>{{itemn.name}}</view>
|
||||
|
@ -48,7 +44,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
import {
|
||||
getCategoryList
|
||||
} from '@/api/store.js';
|
||||
|
@ -63,25 +58,25 @@
|
|||
height: 0,
|
||||
hightArr: [],
|
||||
toView: "",
|
||||
tabbarH: 0,
|
||||
sysHeight: sysHeight,
|
||||
tabbarH: 0
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.getAllCategory();
|
||||
},
|
||||
onShow() {},
|
||||
onShow(){
|
||||
},
|
||||
methods: {
|
||||
infoScroll: function() {
|
||||
let that = this;
|
||||
let len = that.productList.length;
|
||||
let child = that.productList[len - 1] && that.productList[len - 1].child ? that.productList[len - 1].child : [];
|
||||
this.number = child ? child.length : 0;
|
||||
|
||||
let child = that.productList[len - 1]&&that.productList[len - 1].child?that.productList[len - 1].child:[];
|
||||
this.number = child?child.length:0;
|
||||
|
||||
//设置商品列表高度
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
that.height = (res.windowHeight) * (750 / res.windowWidth);
|
||||
that.height = (res.windowHeight) * (750 / res.windowWidth) - 98;
|
||||
},
|
||||
});
|
||||
let height = 0;
|
||||
|
@ -106,9 +101,9 @@
|
|||
let that = this;
|
||||
getCategoryList().then(res => {
|
||||
that.productList = res.data;
|
||||
setTimeout(function() {
|
||||
setTimeout(function(){
|
||||
that.infoScroll();
|
||||
}, 500)
|
||||
},500)
|
||||
})
|
||||
},
|
||||
scroll: function(e) {
|
||||
|
@ -139,9 +134,6 @@
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.sys-head{
|
||||
background-color: #fff;
|
||||
}
|
||||
.productSort .header {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
|
@ -153,7 +145,7 @@
|
|||
z-index: 9;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
|
||||
.productSort .header .input {
|
||||
width: 700rpx;
|
||||
height: 60rpx;
|
||||
|
@ -162,45 +154,42 @@
|
|||
box-sizing: border-box;
|
||||
padding: 0 25rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .header .input .iconfont {
|
||||
font-size: 35rpx;
|
||||
font-size: 26rpx;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
|
||||
.productSort .header .input .placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
.productSort .header .input input {
|
||||
font-size: 26rpx;
|
||||
height: 100%;
|
||||
width: 597rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .aside {
|
||||
position: fixed;
|
||||
width: 24%;
|
||||
width: 180rpx;
|
||||
left: 0;
|
||||
top: 0;
|
||||
top:0;
|
||||
background-color: #f7f7f7;
|
||||
overflow-y: auto;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
height: auto;
|
||||
margin-top: 96rpx;
|
||||
/* 兼容 IOS<11.2 */
|
||||
bottom: calc(100rpx+ constant(safe-area-inset-bottom));
|
||||
/* 兼容 IOS>11.2 */
|
||||
bottom: calc(100rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
|
||||
.productSort .aside .item {
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
font-size: 26rpx;
|
||||
color: #424242;
|
||||
}
|
||||
|
||||
|
||||
.productSort .aside .item.on {
|
||||
background-color: #fff;
|
||||
border-left: 4rpx solid #fc4141;
|
||||
|
@ -209,55 +198,58 @@
|
|||
color: #fc4141;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter {
|
||||
margin: 96rpx 0 0 180rpx;
|
||||
padding: 0 14rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .listw {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .listw .title {
|
||||
height: 90rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .listw .title .line {
|
||||
width: 100rpx;
|
||||
height: 2rpx;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .listw .title .name {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
margin: 0 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list .item {
|
||||
width: 177rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list .item .picture {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list .item .picture image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
div{
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list .item .name {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
<view>
|
||||
<view class='productList'>
|
||||
<view class='search bg-color acea-row row-between-wrapper'>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="iconfont icon-xiangzuo" @click="goback()"></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" :value='where.keyword'
|
||||
@confirm="searchSubmit"></input>
|
||||
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
|
||||
:value='where.keyword' @confirm="searchSubmit"></input>
|
||||
</view>
|
||||
<view class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'>
|
||||
</view>
|
||||
<view class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
|
||||
</view>
|
||||
<view class='nav acea-row row-middle'>
|
||||
<view class='item' :class='title ? "font-color":""' @click='set_where(1)'>{{title ? title:'默认'}}</view>
|
||||
|
@ -26,22 +29,32 @@
|
|||
<!-- down -->
|
||||
<view class='item' :class='nows ? "font-color":""' @click='set_where(4)'>新品</view>
|
||||
</view>
|
||||
<view class='list acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
|
||||
<view class='item' :class='is_switch==true?"":"on"' hover-class='none' v-for="(item,index) in productList" :key="index" @click="godDetail(item)">
|
||||
<view class='pictrue' :class='is_switch==true?"":"on"'>
|
||||
<image :src='item.image' :class='is_switch==true?"":"on"'></image>
|
||||
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
|
||||
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
|
||||
</view>
|
||||
<view class='text' :class='is_switch==true?"":"on"'>
|
||||
<view class='name line1'>{{item.storeName}}</view>
|
||||
<view class='money font-color' :class='is_switch==true?"":"on"'>¥<text class='num'>{{item.price}}</text></view>
|
||||
<view class='vip acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
|
||||
<view class='vip-money' v-if="item.vip_price && item.vip_price > 0">¥{{item.vip_price}}
|
||||
<image src='../../static/images/vip.png'></image>
|
||||
<view :class='is_switch==true?"":"listBox"' v-if="productList.length>0">
|
||||
<view class='list acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
|
||||
<view class='item' :class='is_switch==true?"":"on"' hover-class='none'
|
||||
v-for="(item,index) in productList" :key="index" @click="godDetail(item)">
|
||||
<view class='pictrue' :class='is_switch==true?"":"on"'>
|
||||
<image :src='item.image' :class='is_switch==true?"":"on"'></image>
|
||||
<span class="pictrue_log_class"
|
||||
:class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'"
|
||||
v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log_class"
|
||||
:class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'"
|
||||
v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
|
||||
<span class="pictrue_log_class"
|
||||
:class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'"
|
||||
v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
|
||||
</view>
|
||||
<view class='text' :class='is_switch==true?"":"on"'>
|
||||
<view class='name line1'>{{item.storeName}}</view>
|
||||
<view class='money font-color' :class='is_switch==true?"":"on"'>¥<text
|
||||
class='num'>{{item.price}}</text></view>
|
||||
<view class='vip acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
|
||||
<view class='vip-money' v-if="item.vip_price && item.vip_price > 0">¥{{item.vip_price}}
|
||||
<image src='../../static/images/vip.png'></image>
|
||||
</view>
|
||||
<view>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</view>
|
||||
</view>
|
||||
<view>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -65,8 +78,12 @@
|
|||
getProductHot
|
||||
} from '@/api/store.js';
|
||||
import recommend from '@/components/recommend';
|
||||
import {mapGetters} from "vuex";
|
||||
import { goShopDetail } from '@/libs/order.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import {
|
||||
goShopDetail
|
||||
} from '@/libs/order.js'
|
||||
export default {
|
||||
computed: mapGetters(['uid']),
|
||||
components: {
|
||||
|
@ -93,9 +110,9 @@
|
|||
loadTitle: '加载更多',
|
||||
title: '',
|
||||
hostProduct: [],
|
||||
hotPage:1,
|
||||
hotLimit:10,
|
||||
hotScroll:false
|
||||
hotPage: 1,
|
||||
hotLimit: 10,
|
||||
hotScroll: false
|
||||
};
|
||||
},
|
||||
onLoad: function(options) {
|
||||
|
@ -103,10 +120,9 @@
|
|||
this.title = options.title || '';
|
||||
this.$set(this.where, 'keyword', options.searchValue || '');
|
||||
this.get_product_list();
|
||||
this.get_host_product();
|
||||
},
|
||||
methods: {
|
||||
goback(){
|
||||
goback() {
|
||||
// #ifdef H5
|
||||
return history.back();
|
||||
// #endif
|
||||
|
@ -117,10 +133,10 @@
|
|||
// #endif
|
||||
},
|
||||
// 去详情页
|
||||
godDetail(item){
|
||||
goShopDetail(item,this.uid).then(res=>{
|
||||
godDetail(item) {
|
||||
goShopDetail(item, this.uid).then(res => {
|
||||
uni.navigateTo({
|
||||
url:`/pages/goods_details/index?id=${item.id}`
|
||||
url: `/pages/goods_details/index?id=${item.id}`
|
||||
})
|
||||
})
|
||||
},
|
||||
|
@ -140,13 +156,13 @@
|
|||
*/
|
||||
get_host_product: function() {
|
||||
let that = this;
|
||||
if(that.hotScroll) return
|
||||
if (that.hotScroll) return
|
||||
getProductHot(
|
||||
that.hotPage,
|
||||
that.hotLimit,
|
||||
).then(res => {
|
||||
that.hotPage++
|
||||
that.hotScroll = res.data.list.length<that.hotLimit
|
||||
that.hotScroll = res.data.list.length < that.hotLimit
|
||||
that.hostProduct = that.hostProduct.concat(res.data.list)
|
||||
// that.$set(that, 'hostProduct', res.data)
|
||||
});
|
||||
|
@ -155,7 +171,7 @@
|
|||
set_where: function(e) {
|
||||
switch (e) {
|
||||
case 1:
|
||||
return;
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
if (this.price == 0) this.price = 1;
|
||||
|
@ -205,6 +221,9 @@
|
|||
that.loadTitle = loadend ? '已全部加载' : '加载更多';
|
||||
that.$set(that, 'productList', productList);
|
||||
that.$set(that.where, 'page', that.where.page + 1);
|
||||
if (that.productList.length === 0) {
|
||||
this.get_host_product();
|
||||
}
|
||||
}).catch(err => {
|
||||
that.loading = false;
|
||||
that.loadTitle = '加载更多';
|
||||
|
@ -215,20 +234,24 @@
|
|||
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.productList.length>0){
|
||||
if (this.productList.length > 0) {
|
||||
this.get_product_list();
|
||||
}else{
|
||||
} else {
|
||||
this.get_host_product();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.iconfont{
|
||||
.iconfont {
|
||||
color: #fff;
|
||||
}
|
||||
.listBox{
|
||||
padding: 20px 15px;
|
||||
margin-top: 154rpx;
|
||||
}
|
||||
.productList .search {
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
|
@ -250,7 +273,12 @@
|
|||
}
|
||||
|
||||
.productList .search .input input {
|
||||
/* #ifdef H5 */
|
||||
width: 528rpx;
|
||||
/* #endif */
|
||||
/* #ifndef H5 */
|
||||
width: 548rpx;
|
||||
/* #endif */
|
||||
height: 100%;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
@ -302,34 +330,39 @@
|
|||
}
|
||||
|
||||
.productList .list {
|
||||
padding: 0 20rpx;
|
||||
margin-top: 172rpx;
|
||||
padding: 0 30rpx;
|
||||
margin-top: 192rpx;
|
||||
|
||||
}
|
||||
|
||||
.productList .list.on {
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0 !important;
|
||||
background-color: #fff;
|
||||
border-top: 1px solid #f6f6f6;
|
||||
padding: 40rpx 0 0 0;
|
||||
// margin: 20rpx 0;
|
||||
// background-color: #fff;
|
||||
}
|
||||
|
||||
.productList .list .item {
|
||||
width: 345rpx;
|
||||
margin-top: 20rpx;
|
||||
width: 335rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.productList .list .item.on {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
border-bottom: 1rpx solid #f6f6f6;
|
||||
padding: 30rpx 0;
|
||||
padding: 0 24rpx 50rpx 24rpx;
|
||||
margin: 0;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.productList .list .item .pictrue {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 345rpx;
|
||||
height: 335rpx;
|
||||
}
|
||||
|
||||
.productList .list .item .pictrue.on {
|
||||
|
@ -348,14 +381,14 @@
|
|||
}
|
||||
|
||||
.productList .list .item .text {
|
||||
padding: 20rpx 17rpx 26rpx 17rpx;
|
||||
padding: 18rpx 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.productList .list .item .text.on {
|
||||
width: 508rpx;
|
||||
padding: 0 0 0 22rpx;
|
||||
width: 456rpx;
|
||||
padding: 0 0 0 20rpx;
|
||||
}
|
||||
|
||||
.productList .list .item .text .money {
|
||||
|
@ -397,5 +430,6 @@
|
|||
.noCommodity {
|
||||
background-color: #fff;
|
||||
padding-bottom: 30rpx;
|
||||
margin-top: 172rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class='noCommodity'>
|
||||
<view class='pictrue' v-if="bastList.length == 0">
|
||||
<view class='pictrue' v-if="bastList.length == 0 && isbastList">
|
||||
<image src='../../static/images/noSearch.png'></image>
|
||||
</view>
|
||||
<recommend :hostProduct='hostProduct' v-if="bastList.length == 0"></recommend>
|
||||
|
@ -56,7 +56,8 @@
|
|||
loadend: false,
|
||||
loadTitle: '加载更多',
|
||||
hotPage:1,
|
||||
isScroll:true
|
||||
isScroll:true,
|
||||
isbastList: false
|
||||
};
|
||||
},
|
||||
onShow: function() {
|
||||
|
@ -97,6 +98,7 @@
|
|||
that.loadend = loadend;
|
||||
that.loadTitle = loadend ? "😕人家是有底线的~~" : "加载更多";
|
||||
that.page = that.page + 1;
|
||||
that.isbastList = true;
|
||||
}).catch(err => {
|
||||
that.loading = false,
|
||||
that.loadTitle = '加载更多'
|
||||
|
@ -153,10 +155,11 @@
|
|||
|
||||
.searchGood .search {
|
||||
padding-left: 30rpx;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
.searchGood .search {
|
||||
margin-top: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.searchGood .search .input {
|
||||
|
@ -170,7 +173,7 @@
|
|||
|
||||
.searchGood .search .input input {
|
||||
width: 472rpx;
|
||||
font-size: 28rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.searchGood .search .input .placeholder {
|
||||
|
@ -206,7 +209,7 @@
|
|||
color: #454545;
|
||||
padding: 0 21rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 3rpx;
|
||||
border-radius: 30rpx;
|
||||
line-height: 60rpx;
|
||||
border: 1rpx solid #aaa;
|
||||
margin: 0 0 20rpx 20rpx;
|
||||
|
|
|
@ -1,17 +1,25 @@
|
|||
<template>
|
||||
<view :class="{borderShow:isBorader}">
|
||||
<view class="combination" v-if="combinationList.length">
|
||||
<view class="title acea-row row-right">
|
||||
<!-- <view class="acea-row row-middle">
|
||||
<view class="sign">
|
||||
<image src="../../../static/images/sign02.png"></image>
|
||||
<view class="title acea-row row-between">
|
||||
<view class="spike-bd">
|
||||
<view v-if="assistUserList.length > 0" class="activity_pic">
|
||||
<view v-for="(item,index) in assistUserList" :key="index" class="picture"
|
||||
:style='index===2?"position: relative":"position: static"'>
|
||||
<span class="avatar" :style='"background-image: url("+item+")"'></span>
|
||||
<span v-if="index===2 && Number(assistUserCount) > 3" class="mengceng">
|
||||
<i>···</i>
|
||||
</span>
|
||||
</view>
|
||||
<text class="pic_count">{{assistUserCount}}人参与</text>
|
||||
</view>
|
||||
<view class="name">拼团惠<text>享超值开团价</text></view>
|
||||
</view> -->
|
||||
<navigator url="/pages/activity/goods_combination/index" hover-class="none" class="more acea-row row-center-wrapper">更多<text class="iconfont icon-xiangyou"></text></navigator>
|
||||
</view>
|
||||
<navigator url="/pages/activity/goods_combination/index" hover-class="none"
|
||||
class="more acea-row row-center-wrapper">GO<text class="iconfont icon-xiangyou"></text></navigator>
|
||||
</view>
|
||||
<view class="conter acea-row">
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;" show-scrollbar="false">
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;"
|
||||
show-scrollbar="false">
|
||||
<view class="itemCon" v-for="(item, index) in combinationList" :key="index" @click="goDetail(item)">
|
||||
<view class="item">
|
||||
<view class="pictrue">
|
||||
|
@ -42,14 +50,16 @@
|
|||
<script>
|
||||
let app = getApp();
|
||||
import {
|
||||
getCombinationList
|
||||
getCombinationIndexApi
|
||||
} from '@/api/activity.js';
|
||||
export default {
|
||||
name: 'b_combination',
|
||||
data() {
|
||||
return {
|
||||
combinationList: [],
|
||||
isBorader:false,
|
||||
isBorader: false,
|
||||
assistUserList: [],
|
||||
assistUserCount: 0
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
@ -60,20 +70,17 @@
|
|||
// 拼团列表
|
||||
getCombinationList: function() {
|
||||
let that = this;
|
||||
// let limit = that.$config.LIMIT;
|
||||
let data = {
|
||||
page: 1,
|
||||
limit: 4
|
||||
};
|
||||
getCombinationList(data).then(function(res) {
|
||||
that.combinationList = res.data.list;
|
||||
getCombinationIndexApi().then(function(res) {
|
||||
that.combinationList = res.data.productList;
|
||||
that.assistUserList = res.data.avatarList;
|
||||
that.assistUserCount = res.data.totalPeople;
|
||||
}).catch((res) => {
|
||||
return that.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
})
|
||||
},
|
||||
goDetail(item){
|
||||
goDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_combination_details/index?id=${item.id}`
|
||||
})
|
||||
|
@ -83,7 +90,58 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.default{
|
||||
.mengceng {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
line-height: 36rpx;
|
||||
background: rgba(51, 51, 51, 0.6);
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
opacity: 1;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 2rpx;
|
||||
color: #FFF;
|
||||
i{
|
||||
font-style: normal;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.activity_pic {
|
||||
margin-left: 28rpx;
|
||||
padding-left: 20rpx;
|
||||
|
||||
.picture {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
display: inline-table;
|
||||
vertical-align: middle;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
border-radius: 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: 0 0;
|
||||
margin-right: -10rpx;
|
||||
box-shadow: 0 0 0 1px #fff;
|
||||
}
|
||||
|
||||
.pic_count {
|
||||
margin-left: 30rpx;
|
||||
color: $theme-color;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.default {
|
||||
width: 690rpx;
|
||||
height: 300rpx;
|
||||
border-radius: 14rpx;
|
||||
|
@ -91,36 +149,42 @@
|
|||
background-color: #ccc;
|
||||
text-align: center;
|
||||
line-height: 300rpx;
|
||||
.iconfont{
|
||||
|
||||
.iconfont {
|
||||
font-size: 80rpx;
|
||||
}
|
||||
}
|
||||
.combination{
|
||||
width: 700rpx;
|
||||
|
||||
.combination {
|
||||
width: auto;
|
||||
background-color: #fff;
|
||||
border-radius: 14rpx;
|
||||
margin: 26rpx auto 0 auto;
|
||||
padding: 25rpx 20rpx 21rpx 20rpx;
|
||||
margin: 0 auto 30rpx auto;
|
||||
padding: 16rpx 24rpx 24rpx 24rpx;
|
||||
background-image: url(../../../static/images/pth.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
|
||||
.title {
|
||||
width: 80%;
|
||||
margin-left: 128rpx;
|
||||
|
||||
.sign {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
color: #282828;
|
||||
margin-left: 12rpx;
|
||||
font-weight: bold;
|
||||
|
||||
|
||||
text {
|
||||
color: #797979;
|
||||
font-size: 24rpx;
|
||||
|
@ -128,55 +192,69 @@
|
|||
margin-left: 14rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.more {
|
||||
height: 37rpx;
|
||||
width: 86rpx;
|
||||
height: 40rpx;
|
||||
background: linear-gradient(142deg, #FFE9CE 0%, #FFD6A7 100%);
|
||||
opacity: 1;
|
||||
border-radius: 18px;
|
||||
font-size: 22rpx;
|
||||
color: #666666;
|
||||
padding-left: 2rpx;
|
||||
|
||||
color: #FE960F;
|
||||
padding-left: 8rpx;
|
||||
font-weight: 800;
|
||||
.iconfont {
|
||||
font-size: 20rpx;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.conter{
|
||||
margin-top: 28rpx;
|
||||
|
||||
.conter {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.itemCon {
|
||||
display: inline-block;
|
||||
width: 174rpx;
|
||||
width: 220rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
.item{
|
||||
width:100%;
|
||||
.pictrue{
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
|
||||
.pictrue {
|
||||
width: 100%;
|
||||
height: 174rpx;
|
||||
height: 220rpx;
|
||||
border-radius: 6rpx;
|
||||
image{
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
.text{
|
||||
|
||||
.text {
|
||||
margin-top: 4rpx;
|
||||
|
||||
.y_money {
|
||||
font-size: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 24rpx;
|
||||
color: #000;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
.money {
|
||||
color: #FD502F;
|
||||
font-size: 28rpx;
|
||||
height: 100%;
|
||||
font-weight: bold;
|
||||
margin: 2rpx 0;
|
||||
margin: 10rpx 0 0rpx 0;
|
||||
|
||||
.num {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
|
|
@ -3,12 +3,9 @@
|
|||
<view class="combination" v-if="bargList.length">
|
||||
<view class="title acea-row row-between">
|
||||
<view class="acea-row row-column">
|
||||
<view class="sign">
|
||||
Hi,{{userData.nickname || '亲爱的顾客'}}!
|
||||
</view>
|
||||
<view class="name"><text>你的好友正在邀请你参与砍价</text></view>
|
||||
<image src="../../../static/images/kanjia.png" class="pic"></image>
|
||||
</view>
|
||||
<navigator url="/pages/activity/goods_bargain/index" hover-class="none" class="more acea-row row-center-wrapper">更多<text class="iconfont icon-xiangyou"></text></navigator>
|
||||
<navigator url="/pages/activity/goods_bargain/index" hover-class="none" class="more acea-row row-center-wrapper">GO<text class="iconfont icon-xiangyou"></text></navigator>
|
||||
</view>
|
||||
<view class="conter acea-row">
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;" show-scrollbar="false">
|
||||
|
@ -21,7 +18,6 @@
|
|||
<view class="name line1">{{item.title}}</view>
|
||||
<view class="money">¥<text class="num">{{item.minPrice}}</text></view>
|
||||
<view class="btn">参与砍价</view>
|
||||
<!-- <view class="y_money">¥{{item.price}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -37,7 +33,7 @@
|
|||
toLogin
|
||||
} from '@/libs/login.js';
|
||||
import {
|
||||
getBargainList
|
||||
getBargainIndexApi
|
||||
} from '@/api/activity.js';
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
|
@ -60,17 +56,13 @@
|
|||
methods: {
|
||||
// 砍价列表
|
||||
getBargainList() {
|
||||
let limit = this.$config.LIMIT;
|
||||
getBargainList({
|
||||
page: 1,
|
||||
limit: limit
|
||||
}).then(res => {
|
||||
this.bargList = res.data.list
|
||||
getBargainIndexApi().then(res => {
|
||||
this.bargList = res.data ? res.data.productList : [];
|
||||
})
|
||||
},
|
||||
bargDetail(item){
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&bargain=${this.uid}`
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&startBargainUid=${this.uid}`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -78,6 +70,10 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pic{
|
||||
width: 130rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
.default{
|
||||
width: 690rpx;
|
||||
height: 300rpx;
|
||||
|
@ -91,20 +87,19 @@
|
|||
}
|
||||
}
|
||||
.combination{
|
||||
width: 690rpx;
|
||||
width: auto;
|
||||
background-image: url(../../../static/images/kjbj.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
// height: 288rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 14rpx;
|
||||
margin: 26rpx auto 0 auto;
|
||||
margin: 30rpx auto 0 auto;
|
||||
padding: 25rpx 20rpx 25rpx 20rpx;
|
||||
|
||||
.title {
|
||||
.sign {
|
||||
font-size: 32rpx;
|
||||
color: #E93323;
|
||||
color: $theme-color;
|
||||
margin-bottom: 2rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10rpx;
|
||||
|
@ -120,13 +115,17 @@
|
|||
}
|
||||
|
||||
.more {
|
||||
height: 37rpx;
|
||||
width: 86rpx;
|
||||
height: 40rpx;
|
||||
background: linear-gradient(142deg, #FFE9CE 0%, #FFD6A7 100%);
|
||||
opacity: 1;
|
||||
border-radius: 18px;
|
||||
font-size: 22rpx;
|
||||
color: #666666;
|
||||
padding-left: 2rpx;
|
||||
|
||||
color: #FE960F;
|
||||
padding-left: 8rpx;
|
||||
font-weight: 800;
|
||||
.iconfont {
|
||||
font-size: 20rpx;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,14 +133,14 @@
|
|||
margin-top: 28rpx;
|
||||
.itemCon {
|
||||
display: inline-block;
|
||||
width: 174rpx;
|
||||
width: 220rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
.item{
|
||||
width:100%;
|
||||
.pictrue{
|
||||
width: 100%;
|
||||
height: 174rpx;
|
||||
height: 220rpx;
|
||||
border-radius: 6rpx;
|
||||
image{
|
||||
width: 100%;
|
||||
|
@ -152,7 +151,7 @@
|
|||
.text{
|
||||
margin-top: 4rpx;
|
||||
.y_money {
|
||||
font-size: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
@ -166,13 +165,13 @@
|
|||
font-size: 28rpx;
|
||||
height: 100%;
|
||||
font-weight: bold;
|
||||
margin: 2rpx 0;
|
||||
margin: 10rpx 0;
|
||||
.num {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.btn{
|
||||
width: 174rpx;
|
||||
width: 220rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<view class='newsDetail'>
|
||||
<view class='title'>{{articleInfo.title}}</view>
|
||||
<view class='list acea-row row-middle'>
|
||||
<view class='label'>{{articleInfo.categoryName}}</view>
|
||||
<view class='label'>{{articleInfo.author}}</view>
|
||||
<view class='item'></text>{{articleInfo.createTime}}</view>
|
||||
<view class='item'><text class='iconfont icon-liulan'></text>{{articleInfo.visit}}</view>
|
||||
</view>
|
||||
|
@ -144,30 +144,25 @@
|
|||
page {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
.newsDetail{
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
.newsDetail .title {
|
||||
padding: 0 30rpx;
|
||||
font-size: 34rpx;
|
||||
color: #282828;
|
||||
font-weight: bold;
|
||||
margin: 45rpx 0 23rpx 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.newsDetail .list {
|
||||
margin: 0 30rpx;
|
||||
// border-bottom: 1rpx solid #eee;
|
||||
margin: 28rpx 30rpx 0 30rpx;
|
||||
padding-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.newsDetail .list .label {
|
||||
font-size: 30rpx;
|
||||
color: #B1B2B3;
|
||||
// height: 38rpx;
|
||||
// border-radius: 3rpx;
|
||||
// text-align: center;
|
||||
// line-height: 38rpx;
|
||||
// padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.newsDetail .list .item {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item>
|
||||
<navigator :url="'/pages/news_details/index?id='+item.id">
|
||||
<image :src="item.imageInput[0]" class="slide-image" />
|
||||
<image :src="item.imageInput" class="slide-image" />
|
||||
</navigator>
|
||||
</swiper-item>
|
||||
</block>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<view class='nav' v-if="navList.length > 0">
|
||||
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;">
|
||||
<block v-for="(item,index) in navList" :key="index">
|
||||
<view class='item' :class='active==item.id?"on":""' @click='tabSelect(item.id, index)'>
|
||||
<view class='item borRadius14' :class='active==item.id?"on":""' @click='tabSelect(item.id, index)'>
|
||||
<view>{{item.name}}</view>
|
||||
<view class='line bg-color' v-if="active==item.id"></view>
|
||||
</view>
|
||||
|
@ -25,38 +25,15 @@
|
|||
</view>
|
||||
<view class='list'>
|
||||
<block v-for="(item,index) in articleList" :key="index">
|
||||
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item acea-row row-between-wrapper'
|
||||
v-if="item.imageInput.length == 1">
|
||||
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item acea-row row-between-wrapper'>
|
||||
<view class='text acea-row row-column-between'>
|
||||
<view class='name line2'>{{item.title}}</view>
|
||||
<view>{{item.createTime}}</view>
|
||||
</view>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.imageInput[0]'></image>
|
||||
<image :src='item.imageInput'></image>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item' v-else-if="item.imageInput.length == 2">
|
||||
<view class='title line1'>{{item.title}}</view>
|
||||
<view class='picList acea-row row-between-wrapper'>
|
||||
<block v-for="(itemImg,indexImg) in item.imageInput" :key="indexImg">
|
||||
<view class='pictrue'>
|
||||
<image :src='itemImg'></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class='time'>{{item.createTime}}</view>
|
||||
</navigator>
|
||||
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item' v-else-if="item.imageInput.length > 2">
|
||||
<view class='title line1'>{{item.title}}</view>
|
||||
<view class='picList on acea-row row-between-wrapper'>
|
||||
<block v-for="(itemImg,indexImg) in item.imageInput" :key="indexImg">
|
||||
<view class='pictrue'>
|
||||
<image :src='itemImg'></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class='time'>{{item.createTime}}</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -194,7 +171,7 @@
|
|||
.newsList .swiper .slide-image {
|
||||
width: 100%;
|
||||
height: 335rpx;
|
||||
border-radius: 6rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
.newsList .swiper .wx-swiper-dot {
|
||||
|
@ -213,7 +190,6 @@
|
|||
margin-bottom: -15rpx;
|
||||
}
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || H5
|
||||
.newsList .swiper .uni-swiper-dot {
|
||||
width: 12rpx !important;
|
||||
height: 12rpx !important;
|
||||
|
@ -229,9 +205,8 @@
|
|||
.newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
|
||||
margin-bottom: -15rpx;
|
||||
}
|
||||
// #endif
|
||||
.newsList .nav {
|
||||
padding: 0 30rpx;
|
||||
padding: 0 24rpx;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
|
@ -260,7 +235,7 @@
|
|||
}
|
||||
|
||||
.newsList .list .item {
|
||||
margin: 0 30rpx;
|
||||
margin: 0 24rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
padding: 35rpx 0;
|
||||
}
|
||||
|
@ -273,7 +248,7 @@
|
|||
.newsList .list .item .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.newsList .list .item .text {
|
||||
|
|
|
@ -2,46 +2,52 @@
|
|||
<view>
|
||||
<view class='order-details'>
|
||||
<!-- 给header上与data上加on为退款订单-->
|
||||
<view class='header bg-color acea-row row-middle' :class='isGoodsReturn ? "on":""'>
|
||||
<view class='pictrue' v-if="isGoodsReturn==false">
|
||||
<image :src="orderInfo.statusPic"></image>
|
||||
</view>
|
||||
<view class='data' :class='isGoodsReturn ? "on":""'>
|
||||
<view class='state'>{{orderInfo.pstatus.msg}}</view>
|
||||
<view>{{orderInfo.createTime}}</view>
|
||||
<view class='header bg-color' :class='isGoodsReturn ? "on":""'>
|
||||
<view class='picTxt acea-row row-middle'>
|
||||
<view class='pictrue' v-if="isGoodsReturn==false">
|
||||
<image :src="orderInfo.statusPic"></image>
|
||||
</view>
|
||||
<view class='data' :class='isGoodsReturn ? "on":""'>
|
||||
<view class='state'>{{orderInfo.orderStatusMsg}}</view>
|
||||
<view>{{orderInfo.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isGoodsReturn==false">
|
||||
|
||||
<view v-if="isGoodsReturn==false" class="pad30">
|
||||
<view class='nav'>
|
||||
<view class='navCon acea-row row-between-wrapper'>
|
||||
<view :class="status.type == 0 || status.type == -9 ? 'on':''">待付款</view>
|
||||
<view :class="status.type == 1 ? 'on':''">{{orderInfo.shippingType==1 ? '待发货':'待核销'}}</view>
|
||||
<view :class="status.type == 2 ? 'on':''" v-if="orderInfo.shippingType == 1">待收货</view>
|
||||
<view :class="status.type == 3 ? 'on':''">待评价</view>
|
||||
<view :class="status.type == 4 ? 'on':''">已完成</view>
|
||||
<view :class="!orderInfo.paid ? 'on':''">待付款</view>
|
||||
<view :class="orderInfo.paid && orderInfo.status == 0 ? 'on':''">
|
||||
{{orderInfo.shippingType==1 ? '待发货':'待核销'}}</view>
|
||||
<view :class="orderInfo.status == 1 ? 'on':''" v-if="orderInfo.shippingType == 1">待收货</view>
|
||||
<view :class="orderInfo.status == 2 ? 'on':''">待评价</view>
|
||||
<view :class="orderInfo.status == 3 ? 'on':''">已完成</view>
|
||||
</view>
|
||||
<view class='progress acea-row row-between-wrapper'>
|
||||
<view class='iconfont' :class='(status.type == 0 || status.type == -9 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 0 ? "font-color":"")'></view>
|
||||
<view class='line' :class='status.type > 0 ? "bg-color":""'></view>
|
||||
<view class='iconfont' :class='(status.type == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 1 ? "font-color":"")'></view>
|
||||
<view class='line' :class='status.type > 1 ? "bg-color":""' v-if="orderInfo.shippingType == 1"></view>
|
||||
<view class='iconfont' :class='(status.type == 2 ? "icon-webicon318":"icon-yuandianxiao") + " " +(status.type >= 2 ? "font-color":"")'
|
||||
v-if="orderInfo.shippingType == 1"></view>
|
||||
<view class='line' :class='status.type > 2 ? "bg-color":""'></view>
|
||||
<view class='iconfont' :class='(status.type == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 3 ? "font-color":"")'></view>
|
||||
<view class='line' :class='status.type > 3 ? "bg-color":""'></view>
|
||||
<view class='iconfont' :class='(status.type == 4 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 4 ? "font-color":"")'></view>
|
||||
<view class='iconfont'
|
||||
:class='(!orderInfo.paid ? "icon-webicon318":"icon-yuandianxiao") + " " + ( orderInfo.paid ? "font-color":"")'>
|
||||
</view>
|
||||
<view class='line' :class='orderInfo.paid > 0 ? "bg-color":""'></view>
|
||||
<view class='iconfont'
|
||||
:class='(orderInfo.status == 0 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "font-color":"")'>
|
||||
</view>
|
||||
<view class='line' :class='orderInfo.status > 0 ? "bg-color":""'
|
||||
v-if="orderInfo.shippingType == 1"></view>
|
||||
<view class='iconfont'
|
||||
:class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status >= 1 ? "font-color":"")'
|
||||
v-if="orderInfo.shippingType == 1"></view>
|
||||
<view class='line' :class='orderInfo.status > 1 ? "bg-color":""'></view>
|
||||
<view class='iconfont'
|
||||
:class='(orderInfo.status == 2 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 2 ? "font-color":"")'>
|
||||
</view>
|
||||
<view class='line' :class='orderInfo.status > 2 ? "bg-color":""'></view>
|
||||
<view class='iconfont'
|
||||
:class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 3 ? "font-color":"")'>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 拒绝退款 -->
|
||||
<view class="refund" v-if="orderInfo.refundReason">
|
||||
<view class="title">
|
||||
<image src="/static/images/shuoming.png" mode=""></image>
|
||||
商家拒绝退款
|
||||
</view>
|
||||
<view class="con">拒绝原因:{{orderInfo.refundReason}}</view>
|
||||
</view>
|
||||
<view class="writeOff" v-if="orderInfo.shippingType == 2 && orderInfo.paid">
|
||||
<view v-if="orderInfo.shippingType == 2 && orderInfo.paid" class="writeOff borRadius14">
|
||||
<view class="title">核销信息</view>
|
||||
<view class="grayBg">
|
||||
<view class="pictrue">
|
||||
|
@ -60,7 +66,7 @@
|
|||
<text class="iconfont icon-shijian"></text>核销时间
|
||||
</view>
|
||||
<view class="info">
|
||||
每日:<text class="time">{{orderInfo.systemStore.dayTime}}</text>
|
||||
每日:<text class="time">{{orderInfo.systemStore.dayTime.replace(',','-')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
|
@ -71,169 +77,190 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="map acea-row row-between-wrapper" v-if="orderInfo.shippingType == 2">
|
||||
<view v-if="orderInfo.shippingType == 2" class="map acea-row row-between-wrapper borRadius14">
|
||||
<view>自提地址信息</view>
|
||||
<view class="place cart-color acea-row row-center-wrapper" @tap="showMaoLocation">
|
||||
<text class="iconfont icon-weizhi"></text>查看位置
|
||||
</view>
|
||||
</view>
|
||||
<view class='address' v-if="orderInfo.shippingType === 1">
|
||||
<view v-if="orderInfo.shippingType === 1" class='address borRadius14'>
|
||||
<view class='name'>{{orderInfo.realName}}<text class='phone'>{{orderInfo.userPhone}}</text></view>
|
||||
<view>{{orderInfo.userAddress}}</view>
|
||||
</view>
|
||||
<view class='address' v-else style="margin-top:0;">
|
||||
<view class='name' @tap="makePhone">{{orderInfo.systemStore?orderInfo.systemStore.name:''}}<text class='phone'>{{orderInfo.systemStore?orderInfo.systemStore.phone:''}}</text><text
|
||||
class="iconfont icon-tonghua font-color"></text></view>
|
||||
<view v-else class='address' style="margin-top:15rpx;">
|
||||
<view class='name' @tap="makePhone">{{orderInfo.systemStore?orderInfo.systemStore.name:''}}<text
|
||||
class='phone'>{{orderInfo.systemStore?orderInfo.systemStore.phone:''}}</text><text
|
||||
class="iconfont icon-tonghua font-color"></text></view>
|
||||
<view>{{orderInfo.systemStore?orderInfo.systemStore.detailedAddress:''}}</view>
|
||||
</view>
|
||||
<view class='line' v-if="orderInfo.shippingType === 1">
|
||||
<image src='../../static/images/line.jpg'></image>
|
||||
</view>
|
||||
</view>
|
||||
<orderGoods :evaluate='evaluate' :orderId="order_id" :ids="id" :uniId="uniId" :cartInfo="cartInfo" :jump="true"></orderGoods>
|
||||
<!-- <div class="goodCall" @click="goGoodCall"> -->
|
||||
<!-- #ifdef H5 -->
|
||||
<div class="goodCall" @click="kefuClick">
|
||||
<span class="iconfont icon-kefu"></span><span>联系客服</span>
|
||||
</div>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<div class="goodCall">
|
||||
<button open-type='contact' hover-class='none'>
|
||||
|
||||
<orderGoods :evaluate='evaluate' :productType="orderInfo.type" :orderId="order_id" :ids="id" :uniId="uniId" :cartInfo="cartInfo"
|
||||
:jump="true"></orderGoods>
|
||||
<!-- #ifndef MP -->
|
||||
<div class="goodCall borRadius14" @click="kefuClick">
|
||||
<span class="iconfont icon-kefu"></span><span>联系客服</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- #endif -->
|
||||
<view class='wrapper'>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>订单编号:</view>
|
||||
<view class='conter acea-row row-middle row-right'>{{orderInfo.orderId}}
|
||||
<!-- #ifndef H5 -->
|
||||
<text class='copy' @tap='copy'>复制</text>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<text class='copy copy-data' :data-clipboard-text="orderInfo.orderId">复制</text>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>下单时间:</view>
|
||||
<view class='conter'>{{(orderInfo.createTime || 0)}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>支付状态:</view>
|
||||
<view class='conter' v-if="orderInfo.paid">已支付</view>
|
||||
<view class='conter' v-else>未支付</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>支付方式:</view>
|
||||
<view class='conter'>{{orderInfo.pstatus.payType}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if="orderInfo.mark">
|
||||
<view>买家留言:</view>
|
||||
<view class='conter'>{{orderInfo.mark}}</view>
|
||||
</view>
|
||||
</div>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<div class="goodCall borRadius14">
|
||||
<button open-type='contact' hover-class='none'>
|
||||
<span class="iconfont icon-kefu"></span><span>联系客服</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<!-- 退款订单详情 -->
|
||||
<view class='wrapper' v-if="isGoodsReturn">
|
||||
<view class='item acea-row row-between'>
|
||||
<view>收货人:</view>
|
||||
<view class='conter'>{{orderInfo.realName}}</view>
|
||||
|
||||
<view class="pad30">
|
||||
<view class='nav refund' v-if="orderInfo.refundStatus>0">
|
||||
<view class="title">
|
||||
<image src="/static/images/shuoming.png" mode=""></image>
|
||||
{{orderInfo.refundStatus==1?'商家审核中':orderInfo.refundStatus==2?'商家已退款':'商家拒绝退款'}}
|
||||
</view>
|
||||
<view class="con pad30">{{orderInfo.refundStatus==1 ? "您已成功发起退款申请,请耐心等待商家处理;退款前请与商家协商一致,有助于更好的处理售后问题": orderInfo.refundStatus==2? "退款已成功受理,如商家已寄出商品请尽快退回;感谢您的支持": "拒绝原因:" + orderInfo.refundReason}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>联系电话:</view>
|
||||
<view class='conter'>{{orderInfo.userPhone}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>收货地址:</view>
|
||||
<view class='conter'>{{orderInfo.userAddress}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderInfo.status!=0">
|
||||
<view class='wrapper' v-if='orderInfo.deliveryType=="express"'>
|
||||
<view class='wrapper borRadius14'>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>配送方式:</view>
|
||||
<view class='conter'>发货</view>
|
||||
<view>订单编号:</view>
|
||||
<view class='conter acea-row row-middle row-right'>{{orderInfo.orderId}}
|
||||
<!-- #ifndef H5 -->
|
||||
<text class='copy' @tap='copy'>复制</text>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<text class='copy copy-data' :data-clipboard-text="orderInfo.orderId">复制</text>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>快递公司:</view>
|
||||
<view class='conter'>{{orderInfo.deliveryName || ''}}</view>
|
||||
<view>下单时间:</view>
|
||||
<view class='conter'>{{(orderInfo.createTime || 0)}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>快递号:</view>
|
||||
<view class='conter'>{{orderInfo.deliveryId || ''}}</view>
|
||||
<view>支付状态:</view>
|
||||
<view class='conter' v-if="orderInfo.paid">已支付</view>
|
||||
<view class='conter' v-else>未支付</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>支付方式:</view>
|
||||
<view class='conter'>{{orderInfo.payTypeStr}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if="orderInfo.mark">
|
||||
<view>买家留言:</view>
|
||||
<view class='conter'>{{orderInfo.mark}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrapper' v-else-if='orderInfo.deliveryType=="send"'>
|
||||
<!-- 退款订单详情 "-->
|
||||
<view v-if="isGoodsReturn" class='wrapper borRadius14' >
|
||||
<view class='item acea-row row-between'>
|
||||
<view>配送方式:</view>
|
||||
<view class='conter'>送货</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>配送人姓名:</view>
|
||||
<view class='conter'>{{orderInfo.deliveryName || ''}}</view>
|
||||
<view>收货人:</view>
|
||||
<view class='conter'>{{orderInfo.realName}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>联系电话:</view>
|
||||
<view class='conter acea-row row-middle row-right'>{{orderInfo.deliveryId || ''}}<text class='copy' @tap='goTel'>拨打</text></view>
|
||||
<view class='conter'>{{orderInfo.userPhone}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrapper' v-else-if='orderInfo.deliveryType=="fictitious"'>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>虚拟发货:</view>
|
||||
<view class='conter'>已发货,请注意查收</view>
|
||||
<view>收货地址:</view>
|
||||
<view class='conter'>{{orderInfo.userAddress}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderInfo.status>0">
|
||||
<view class='wrapper borRadius14' v-if='orderInfo.deliveryType=="express"'>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>配送方式:</view>
|
||||
<view class='conter'>发货</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>快递公司:</view>
|
||||
<view class='conter'>{{orderInfo.deliveryName || ''}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>快递号:</view>
|
||||
<view class='conter'>{{orderInfo.deliveryId || ''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType=="send"'>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>配送方式:</view>
|
||||
<view class='conter'>送货</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>配送人姓名:</view>
|
||||
<view class='conter'>{{orderInfo.deliveryName || ''}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>联系电话:</view>
|
||||
<view class='conter acea-row row-middle row-right'>{{orderInfo.deliveryId || ''}}<text
|
||||
class='copy' @tap='goTel'>拨打</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType=="fictitious"'>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>虚拟发货:</view>
|
||||
<view class='conter'>已发货,请注意查收</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrapper borRadius14'>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>商品总价:</view>
|
||||
<view class='conter'>¥{{orderInfo.proTotalPrice}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if="orderInfo.payPostage > 0">
|
||||
<view>运费:</view>
|
||||
<view class='conter'>¥{{orderInfo.payPostage}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if='orderInfo.couponId'>
|
||||
<view>优惠券抵扣:</view>
|
||||
<view class='conter'>-¥{{orderInfo.couponPrice}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if="orderInfo.useIntegral > 0">
|
||||
<view>积分抵扣:</view>
|
||||
<view class='conter'>-¥{{orderInfo.deductionPrice}}</view>
|
||||
</view>
|
||||
<view class='actualPay acea-row row-right'>实付款:<text
|
||||
class='money font-color'>¥{{orderInfo.payPrice}}</text></view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false">
|
||||
<view class="qs-btn" v-if="!orderInfo.paid" @click.stop="cancelOrder">取消订单</view>
|
||||
<view class='bnt bg-color' v-if="!orderInfo.paid" @tap='pay_open(orderInfo.orderId)'>立即付款</view>
|
||||
<!-- #ifdef MP -->
|
||||
<view @tap="openSubcribe('/pages/users/goods_return/index?orderId='+orderInfo.orderId)"
|
||||
class='bnt cancel' v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0 && orderInfo.type!==1 && type==='normal'">申请退款
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP -->
|
||||
<navigator hover-class="none" :url="'/pages/users/goods_return/index?orderId='+orderInfo.orderId"
|
||||
class='bnt cancel' v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0 && orderInfo.type!==1 && type==='normal'">申请退款
|
||||
</navigator>
|
||||
<!-- #endif -->
|
||||
<view class='bnt bg-color' v-if="orderInfo.combinationId > 0" @tap='goJoinPink'>查看拼团</view>
|
||||
<navigator class='bnt cancel' v-if="orderInfo.deliveryType == 'express' && orderInfo.status >0"
|
||||
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.orderId">查看物流
|
||||
</navigator>
|
||||
<view class='bnt bg-color' v-if="orderInfo.status==1" @tap='confirmOrder'>确认收货</view>
|
||||
<view class='bnt cancel' v-if="orderInfo.status==3" @tap='delOrder'>删除订单</view>
|
||||
<view class='bnt bg-color' v-if="orderInfo.status==3 && orderInfo.type!==1" @tap='goOrderConfirm'>再次购买</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrapper'>
|
||||
<view class='item acea-row row-between'>
|
||||
<view>支付金额:</view>
|
||||
<view class='conter'>¥{{orderInfo.totalPrice}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if='orderInfo.couponId'>
|
||||
<view>优惠券抵扣:</view>
|
||||
<view class='conter'>-¥{{orderInfo.couponPrice}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if="orderInfo.useIntegral > 0">
|
||||
<view>积分抵扣:</view>
|
||||
<view class='conter'>-¥{{orderInfo.deductionPrice}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if="orderInfo.payPostage > 0">
|
||||
<view>运费:</view>
|
||||
<view class='conter'>¥{{orderInfo.payPostage}}</view>
|
||||
</view>
|
||||
<view class='actualPay acea-row row-right'>实付款:<text class='money font-color'>¥{{orderInfo.payPrice}}</text></view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false || status.type == 9">
|
||||
<view class="qs-btn" v-if="status.type == 0 || status.type == -9" @click.stop="cancelOrder">取消订单</view>
|
||||
<view class='bnt bg-color' v-if="status.type==0" @tap='pay_open(orderInfo.orderId)'>立即付款</view>
|
||||
<!-- #ifdef MP -->
|
||||
<view @tap="openSubcribe('/pages/users/goods_return/index?orderId='+orderInfo.orderId)" class='bnt cancel'
|
||||
v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0">申请退款</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP -->
|
||||
<navigator hover-class="none" :url="'/pages/users/goods_return/index?orderId='+orderInfo.orderId" class='bnt cancel'
|
||||
v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0">申请退款</navigator>
|
||||
<!-- #endif -->
|
||||
<view class='bnt bg-color' v-if="status.class_status==1" @tap='goJoinPink'>查看拼团</view>
|
||||
<navigator class='bnt cancel' v-if="orderInfo.deliveryType == 'express' && status.class_status==3 && status.type==2"
|
||||
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.orderId">查看物流</navigator>
|
||||
<view class='bnt bg-color' v-if="status.class_status==3" @tap='confirmOrder'>确认收货</view>
|
||||
<view class='bnt cancel' v-if="status.type==4" @tap='delOrder'>删除订单</view>
|
||||
<view class='bnt bg-color' v-if="status.class_status==5" @tap='goOrderConfirm'>再次购买</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<home></home>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.shuoming{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.goodCall {
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
|
@ -255,15 +282,15 @@
|
|||
justify-content: center;
|
||||
height: 86rpx;
|
||||
font-size: 30rpx;
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.order-details .header {
|
||||
height: 250rpx;
|
||||
padding: 0 30rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
.order-details .header.on {
|
||||
|
@ -301,11 +328,18 @@
|
|||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.picTxt {
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
.order-details .nav {
|
||||
background-color: #fff;
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
padding: 25rpx 0;
|
||||
padding: 27rpx 0;
|
||||
width: 100%;
|
||||
border-radius: 14rpx;
|
||||
margin: -100rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.order-details .nav .navCon {
|
||||
|
@ -313,7 +347,7 @@
|
|||
}
|
||||
|
||||
.order-details .nav .on {
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.order-details .nav .progress {
|
||||
|
@ -337,8 +371,8 @@
|
|||
font-size: 26rpx;
|
||||
color: #868686;
|
||||
background-color: #fff;
|
||||
margin-top: 13rpx;
|
||||
padding: 35rpx 30rpx;
|
||||
margin-top: 15rpx;
|
||||
padding: 30rpx 24rpx;
|
||||
}
|
||||
|
||||
.order-details .address .name {
|
||||
|
@ -365,7 +399,7 @@
|
|||
.order-details .wrapper {
|
||||
background-color: #fff;
|
||||
margin-top: 12rpx;
|
||||
padding: 30rpx;
|
||||
padding: 30rpx 24rpx;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item {
|
||||
|
@ -379,14 +413,14 @@
|
|||
|
||||
.order-details .wrapper .item .conter {
|
||||
color: #868686;
|
||||
width: 460rpx;
|
||||
// width: 490rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item .conter .copy {
|
||||
font-size: 20rpx;
|
||||
color: #333;
|
||||
border-radius: 3rpx;
|
||||
border-radius: 20rpx;
|
||||
border: 1rpx solid #666;
|
||||
padding: 3rpx 15rpx;
|
||||
margin-left: 24rpx;
|
||||
|
@ -415,10 +449,10 @@
|
|||
}
|
||||
|
||||
.order-details .footer .bnt {
|
||||
width: 176rpx;
|
||||
height: 60rpx;
|
||||
width: 158rpx;
|
||||
height: 54rpx;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
line-height: 54rpx;
|
||||
border-radius: 50rpx;
|
||||
color: #fff;
|
||||
font-size: 27rpx;
|
||||
|
@ -435,8 +469,8 @@
|
|||
|
||||
.order-details .writeOff {
|
||||
background-color: #fff;
|
||||
margin-top: 13rpx;
|
||||
padding-bottom: 30rpx;
|
||||
margin-top: 15rpx;
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.order-details .writeOff .title {
|
||||
|
@ -444,7 +478,7 @@
|
|||
color: #282828;
|
||||
height: 87rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 0 30rpx;
|
||||
padding: 0 24rpx;
|
||||
line-height: 87rpx;
|
||||
}
|
||||
|
||||
|
@ -531,9 +565,9 @@
|
|||
color: #282828;
|
||||
line-height: 86rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
margin-top: 13rpx;
|
||||
margin-top: 15rpx;
|
||||
background-color: #fff;
|
||||
padding: 0 30rpx;
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.order-details .map .place {
|
||||
|
@ -558,8 +592,8 @@
|
|||
}
|
||||
|
||||
.refund {
|
||||
padding: 0 30rpx 30rpx;
|
||||
margin-top: 24rpx;
|
||||
padding: 0 !important;
|
||||
margin-top: 15rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.title {
|
||||
|
@ -569,7 +603,9 @@
|
|||
color: #333;
|
||||
height: 86rpx;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
|
||||
font-weight: 400;
|
||||
padding: 0 24rpx;
|
||||
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
|
@ -578,9 +614,9 @@
|
|||
}
|
||||
|
||||
.con {
|
||||
padding-top: 25rpx;
|
||||
font-size: 28rpx;
|
||||
color: #868686;
|
||||
font-size: 25rpx;
|
||||
color: #666666;
|
||||
padding: 30rpx 24rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -588,7 +624,6 @@
|
|||
<script>
|
||||
import {
|
||||
getOrderDetail,
|
||||
orderAgain,
|
||||
orderTake,
|
||||
orderDel,
|
||||
orderCancel,
|
||||
|
@ -597,9 +632,6 @@
|
|||
import {
|
||||
openOrderRefundSubscribe
|
||||
} from '@/utils/SubscribeMessage.js';
|
||||
import {
|
||||
getUserInfo
|
||||
} from '@/api/user.js';
|
||||
import home from '@/components/home';
|
||||
import payment from '@/components/payment';
|
||||
import orderGoods from "@/components/orderGoods";
|
||||
|
@ -660,10 +692,12 @@
|
|||
id: 0, //订单id
|
||||
uniId: '',
|
||||
utils: this.$util,
|
||||
type: 'normal'
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin', 'chatUrl']),
|
||||
computed: mapGetters(['isLogin', 'chatUrl', 'userInfo']),
|
||||
onLoad: function(options) {
|
||||
options.type == undefined || options.type == null ? this.type = 'normal' : this.type = options.type;
|
||||
if (!options.order_id && !options.uniId) return this.$util.Tips({
|
||||
title: '缺少参数'
|
||||
}, {
|
||||
|
@ -675,15 +709,10 @@
|
|||
onShow() {
|
||||
if (this.isLogin) {
|
||||
this.getOrderInfo();
|
||||
this.getUserInfo();
|
||||
this.payMode[1].number = this.userInfo.nowMoney;
|
||||
this.$set(this, 'payMode', this.payMode);
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onHide: function() {
|
||||
|
@ -700,6 +729,7 @@
|
|||
});
|
||||
});
|
||||
// #endif
|
||||
|
||||
},
|
||||
methods: {
|
||||
kefuClick() {
|
||||
|
@ -801,18 +831,6 @@
|
|||
*/
|
||||
onLoadFun: function() {
|
||||
this.getOrderInfo();
|
||||
this.getUserInfo();
|
||||
},
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
*/
|
||||
getUserInfo: function() {
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.payMode[1].number = res.data.nowMoney;
|
||||
that.$set(that, 'payMode', that.payMode);
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取订单详细信息
|
||||
|
@ -825,22 +843,22 @@
|
|||
});
|
||||
getOrderDetail(that.order_id).then(res => {
|
||||
uni.hideLoading();
|
||||
let _type = res.data.pstatus.type;
|
||||
that.$set(that, 'orderInfo', res.data);
|
||||
that.$set(that, 'evaluate', _type == 3 ? 3 : 0);
|
||||
that.$set(that, 'evaluate', res.data.status == 2 ? 2 : 0);
|
||||
that.$set(that, 'system_store', res.data.systemStore);
|
||||
that.$set(that, 'id', res.data.id);
|
||||
let cartInfo = res.data.cartInfo,
|
||||
newCartInfo = [];
|
||||
cartInfo.forEach((item, index) => {
|
||||
newCartInfo.push(item.info);
|
||||
});
|
||||
that.$set(that, 'cartInfo', newCartInfo);
|
||||
that.$set(that, 'cartInfo', res.data.orderInfoList);
|
||||
if (res.data.refundStatus != 0) {
|
||||
that.isGoodsReturn = true;
|
||||
};
|
||||
that.getOrderStatus();
|
||||
that.markCode(res.data.verifyCode);
|
||||
if (that.orderInfo.shippingType == 2 && that.orderInfo.paid) that.markCode(res.data
|
||||
.verifyCode);
|
||||
if(that.orderInfo.refundStatus>0){
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: '#666666'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
that.$util.Tips({
|
||||
|
@ -904,7 +922,8 @@
|
|||
if (type == 2 && delivery_type == 'express') status.class_status = 2; //查看物流
|
||||
if (type == 2) status.class_status = 3; //确认收货
|
||||
if (type == 4 || type == 0) status.class_status = 4; //删除订单
|
||||
if (!seckill_id && !bargain_id && !combination_id && (type == 3 || type == 4)) status.class_status = 5; //再次购买
|
||||
if (!seckill_id && !bargain_id && !combination_id && (type == 3 || type == 4)) status.class_status =
|
||||
5; //再次购买
|
||||
this.$set(this, 'status', status);
|
||||
},
|
||||
/**
|
||||
|
@ -921,16 +940,9 @@
|
|||
*
|
||||
*/
|
||||
goOrderConfirm: function() {
|
||||
let that = this;
|
||||
orderAgain(that.orderInfo.orderId).then(res => {
|
||||
return uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + res.data.cateId + '&again=true&new=true&addAgain=true'
|
||||
});
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
this.$Order.getPreOrder("again",[{
|
||||
orderNo: this.order_id
|
||||
}]);
|
||||
},
|
||||
confirmOrder: function() {
|
||||
let that = this;
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<button @click="goIndex" class='returnBnt cart-color' formType="submit" hover-class='none' v-else>返回首页</button>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
@ -88,16 +88,16 @@
|
|||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
// watch:{
|
||||
// isLogin:{
|
||||
// handler:function(newV,oldV){
|
||||
// if(newV){
|
||||
// this.getOrderPayInfo();
|
||||
// }
|
||||
// },
|
||||
// deep:true
|
||||
// }
|
||||
// },
|
||||
watch:{
|
||||
isLogin:{
|
||||
handler:function(newV,oldV){
|
||||
if(newV){
|
||||
this.getOrderPayInfo();
|
||||
}
|
||||
},
|
||||
deep:true
|
||||
}
|
||||
},
|
||||
onLoad: function(options) {
|
||||
if (!options.order_id) return this.$util.Tips({
|
||||
title: '缺少参数无法查看订单支付状态'
|
||||
|
@ -111,13 +111,7 @@
|
|||
if (this.isLogin) {
|
||||
this.getOrderPayInfo();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -1,126 +1,135 @@
|
|||
<template>
|
||||
<view class="new-users">
|
||||
<view class="head">
|
||||
<view class="user-card">
|
||||
<view class="new-users copy-data" :style="{height:pageHeight}">
|
||||
<view class="mid" style="flex:1;overflow: hidden;">
|
||||
<scroll-view scroll-y="true" style="height: 100%;">
|
||||
<view class="bg"></view>
|
||||
<view class="user-info">
|
||||
<image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar" @click="goEdit()"></image>
|
||||
<image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()"></image>
|
||||
<view class="info">
|
||||
<!-- #ifdef MP -->
|
||||
<view class="name" v-if="!userInfo.uid" @tap="openAuto">
|
||||
请点击授权
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="name" v-if="!userInfo.uid && isWeixin" @tap="openAuto">
|
||||
请点击授权
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="name" v-if="userInfo.uid">
|
||||
{{userInfo.nickname}}
|
||||
<view class="vip" v-if="userInfo.vip">
|
||||
<image :src="userInfo.vipIcon" alt="">
|
||||
<view style="margin-left: 10rpx;" class="vip-txt">{{userInfo.vipName || ''}}</view>
|
||||
<view class="head pad30">
|
||||
<view class="user-card">
|
||||
<view class="user-info">
|
||||
<image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar && uid"
|
||||
@click="goEdit()"></image>
|
||||
<image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()"></image>
|
||||
<view class="info">
|
||||
<view class="name" v-if="!uid" @tap="openAuto">
|
||||
请点击登录
|
||||
</view>
|
||||
<view class="name" v-if="uid">
|
||||
{{userInfo.nickname}}
|
||||
<view class="vip" v-if="userInfo.vip">
|
||||
<image :src="userInfo.vipIcon" alt="">
|
||||
<view style="margin-left: 10rpx;" class="vip-txt">{{userInfo.vipName || ''}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="num" v-if="userInfo.phone && uid" @click="goEdit()">
|
||||
<view class="num-txt">{{userInfo.phone}}</view>
|
||||
<view class="icon">
|
||||
<image src="/static/images/edit.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone">绑定手机号</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="num" v-if="userInfo.phone" @click="goEdit()">
|
||||
<view class="num-txt">{{userInfo.phone}}</view>
|
||||
<view class="icon">
|
||||
<image src="/static/images/edit.png" mode=""></image>
|
||||
<view class="num-wrapper">
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/user_money/index')">
|
||||
<text
|
||||
class="num">{{userInfo.nowMoney && uid ?Number(userInfo.nowMoney).toFixed(2):0}}</text>
|
||||
<view class="txt">余额</view>
|
||||
</view>
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
|
||||
<text class="num">{{userInfo.integral && uid ? userInfo.integral: 0}}</text>
|
||||
<view class="txt">积分</view>
|
||||
</view>
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
|
||||
<text class="num">{{userInfo.couponCount && uid ? userInfo.couponCount : 0}}</text>
|
||||
<view class="txt">优惠券</view>
|
||||
</view>
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/user_goods_collection/index')">
|
||||
<text class="num">{{userInfo.collectCount && uid ? userInfo.collectCount : 0}}</text>
|
||||
<view class="txt">收藏</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone">绑定手机号</view>
|
||||
<!-- <view class="sign" @click="goSignIn">签到</view> -->
|
||||
</view>
|
||||
<view class="order-wrapper">
|
||||
<view class="order-hd flex">
|
||||
<view class="left">订单中心</view>
|
||||
<navigator class="right flex" hover-class="none" url="/pages/users/order_list/index"
|
||||
open-type="navigate">
|
||||
查看全部
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="order-bd">
|
||||
<block v-for="(item,index) in orderMenu" :key="index">
|
||||
<navigator class="order-item" hover-class="none" :url="item.url">
|
||||
<view class="pic">
|
||||
<image :src="item.img" mode=""></image>
|
||||
<text class="order-status-num" v-if="item.num > 0">{{ item.num }}</text>
|
||||
</view>
|
||||
<view class="txt">{{item.title}}</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="num-wrapper">
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/user_money/index')">
|
||||
<text class="num">{{userInfo.nowMoney?Number(userInfo.nowMoney).toFixed(2):0}}</text>
|
||||
<view class="txt">余额</view>
|
||||
<view class="contenBox">
|
||||
<!-- 轮播 -->
|
||||
<view class="slider-wrapper" v-if="imgUrls.length>0">
|
||||
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
|
||||
:duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item class="borRadius14">
|
||||
<image :src="item.pic" class="slide-image" @click="navito(item.url)"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
|
||||
<text class="num">{{userInfo.integral || 0}}</text>
|
||||
<view class="txt">积分</view>
|
||||
</view>
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
|
||||
<text class="num">{{userInfo.couponCount || 0}}</text>
|
||||
<view class="txt">优惠券</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sign" @click="goSignIn">签到</view>
|
||||
</view>
|
||||
<view class="order-wrapper">
|
||||
<view class="order-hd flex">
|
||||
<view class="left">订单中心</view>
|
||||
<navigator class="right flex" hover-class="none" url="/pages/users/order_list/index" open-type="navigate">
|
||||
查看全部
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="order-bd">
|
||||
<block v-for="(item,index) in orderMenu" :key="index">
|
||||
<navigator class="order-item" hover-class="none" :url="item.url">
|
||||
<view class="pic">
|
||||
<image :src="item.img" mode=""></image>
|
||||
<text class="order-status-num" v-if="item.num > 0">{{ item.num }}</text>
|
||||
|
||||
<!-- 会员菜单 -->
|
||||
<view class="user-menus" style="margin-top: 20rpx;">
|
||||
<view class="menu-title">我的服务</view>
|
||||
<view class="list-box">
|
||||
<block v-for="(item,index) in MyMenus" :key="index">
|
||||
<navigator class="item" :url="item.url" hover-class="none"
|
||||
v-if="!(item.url =='/pages/service/index' || (item.url =='/pages/users/user_spread_user/index' && !userInfo.isPromoter))">
|
||||
<image :src="item.pic"></image>
|
||||
<text>{{item.name}}</text>
|
||||
</navigator>
|
||||
</block>
|
||||
<!-- #ifndef MP -->
|
||||
<view class="item" @click="kefuClick">
|
||||
<image :src="servicePic"></image>
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
<view class="txt">{{item.title}}</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 轮播 -->
|
||||
<view class="slider-wrapper" v-if="imgUrls.length>0">
|
||||
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration"
|
||||
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item>
|
||||
<image :src="item.pic" class="slide-image" @click="navito(item.url)"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- 会员菜单 -->
|
||||
<view class="user-menus" style="margin-top: 20rpx;">
|
||||
<block v-for="(item,index) in MyMenus" :key="index">
|
||||
<navigator class="item" :url="item.url" hover-class="none" v-if="!(item.url =='/pages/service/index' || (item.url =='/pages/users/user_spread_user/index' && !userInfo.isPromoter))">
|
||||
<view class="left">
|
||||
<image :src="item.pic"></image>
|
||||
<text>{{item.name}}</text>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<button class="item" open-type='contact' hover-class='none'>
|
||||
<image :src="servicePic"></image>
|
||||
<text>联系客服</text>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="iconfont icon-xiangyou"></view>
|
||||
</navigator>
|
||||
</block>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="item" @click="kefuClick">
|
||||
<view class="left">
|
||||
<image :src="servicePic"></image>
|
||||
<text>联系客服</text>
|
||||
<image src="/static/images/support.png" alt="" class='support'>
|
||||
<view class="uni-p-b-98"></view>
|
||||
</view>
|
||||
<view class="iconfont icon-xiangyou"></view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<button class="item" open-type='contact' hover-class='none'>
|
||||
<view class="left">
|
||||
<image :src="servicePic"></image>
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
<view class="iconfont icon-xiangyou"></view>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
|
||||
</scroll-view>
|
||||
</view>
|
||||
<img src="/static/images/support.png" alt="" class='support'>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
import Cache from '@/utils/cache';
|
||||
import {
|
||||
getMenuList,
|
||||
getUserInfo
|
||||
BACK_URL
|
||||
} from '@/config/cache';
|
||||
import {
|
||||
getMenuList
|
||||
// setVisit
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
|
@ -145,7 +154,7 @@
|
|||
authorize
|
||||
// #endif
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
computed: mapGetters(['isLogin', 'chatUrl', 'userInfo', 'uid']),
|
||||
data() {
|
||||
return {
|
||||
orderMenu: [{
|
||||
|
@ -188,10 +197,16 @@
|
|||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
orderStatusNum: {},
|
||||
userInfo: {},
|
||||
MyMenus: [],
|
||||
wechatUrl: [],
|
||||
servicePic: '',
|
||||
servicePic: '/static/images/customer.png',
|
||||
sysHeight: sysHeight,
|
||||
// #ifdef MP
|
||||
pageHeight: '100%',
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
pageHeight: app.globalData.windowHeight,
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
isWeixin: Auth.isWeixin()
|
||||
//#endif
|
||||
|
@ -199,33 +214,32 @@
|
|||
},
|
||||
onLoad() {
|
||||
let that = this;
|
||||
// #ifdef H5
|
||||
that.$set(that, 'pageHeight', app.globalData.windowHeight);
|
||||
// #endif
|
||||
that.$set(that, 'MyMenus', app.globalData.MyMenus);
|
||||
console.log('user页面',that.isLogin)
|
||||
// if (that.isLogin == false) {
|
||||
// // #ifdef H5 || APP-PLUS
|
||||
// toLogin();
|
||||
// // #endif
|
||||
// // #ifdef MP
|
||||
// this.isAuto = true;
|
||||
// this.$set(this, 'isShowAuth', true);
|
||||
// // #endif
|
||||
// }
|
||||
if (that.isLogin == false) {
|
||||
// #ifdef H5
|
||||
toLogin()
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
let that = this;
|
||||
// #ifdef H5
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
that.pageHeight = res.windowHeight + 'px'
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
if (that.isLogin) {
|
||||
this.getUserInfo();
|
||||
this.getMyMenus();
|
||||
// this.setVisit();
|
||||
this.getOrderData();
|
||||
}else{
|
||||
// #ifdef H5 || APP-PLUS
|
||||
this.$store.dispatch('USERINFO');
|
||||
} else {
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -235,15 +249,15 @@
|
|||
// url:'/pages/user/index'
|
||||
// }).then(res=>{})
|
||||
// },
|
||||
navito(e){
|
||||
navito(e) {
|
||||
window.location.href = 'https://' + e;
|
||||
},
|
||||
kefuClick(){
|
||||
location.href = this.wechatUrl[0].wap_url;
|
||||
kefuClick() {
|
||||
location.href = this.chatUrl;
|
||||
},
|
||||
getOrderData(){
|
||||
getOrderData() {
|
||||
let that = this;
|
||||
orderData().then(res=>{
|
||||
orderData().then(res => {
|
||||
that.orderMenu.forEach((item, index) => {
|
||||
switch (item.title) {
|
||||
case '待付款':
|
||||
|
@ -263,17 +277,16 @@
|
|||
break
|
||||
}
|
||||
})
|
||||
that.$set(that,'orderMenu',that.orderMenu);
|
||||
that.$set(that, 'orderMenu', that.orderMenu);
|
||||
})
|
||||
},
|
||||
// 打开授权
|
||||
openAuto() {
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
Cache.set(BACK_URL, '')
|
||||
toLogin();
|
||||
},
|
||||
// 授权回调
|
||||
onLoadFun() {
|
||||
this.getUserInfo();
|
||||
this.getMyMenus();
|
||||
// this.setVisit();
|
||||
this.getOrderData();
|
||||
|
@ -292,20 +305,9 @@
|
|||
// 绑定手机
|
||||
bindPhone() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_phone/index'
|
||||
url: '/pages/users/app_login/index'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取个人用户信息
|
||||
*/
|
||||
getUserInfo: function() {
|
||||
const _app = getApp();
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.userInfo = res.data;
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
});
|
||||
},
|
||||
/**
|
||||
*
|
||||
* 获取个人中心图标
|
||||
|
@ -319,7 +321,7 @@
|
|||
return item.url.indexOf('service') !== -1
|
||||
})
|
||||
res.data.routine_my_menus.map((item) => {
|
||||
if(item.url.indexOf('service') !==-1) that.servicePic = item.pic
|
||||
if (item.url.indexOf('service') !== -1) that.servicePic = item.pic
|
||||
})
|
||||
that.imgUrls = res.data.routine_my_banner
|
||||
});
|
||||
|
@ -327,21 +329,12 @@
|
|||
// 编辑页面
|
||||
goEdit() {
|
||||
if (this.isLogin == false) {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_info/index'
|
||||
})
|
||||
}
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/users/user_info/index'
|
||||
// })
|
||||
},
|
||||
// 签到
|
||||
goSignIn() {
|
||||
|
@ -350,14 +343,14 @@
|
|||
})
|
||||
},
|
||||
// goMenuPage
|
||||
goMenuPage(url){
|
||||
if(this.isLogin){
|
||||
goMenuPage(url) {
|
||||
if (this.isLogin) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
// #ifdef MP
|
||||
this.openAuto()
|
||||
this.openAuto()
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
@ -366,37 +359,62 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width:100%;
|
||||
height: 420rpx;
|
||||
background-image: url('~@/static/images/user_bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.contenBox {
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.support {
|
||||
width: 219rpx;
|
||||
height: 74rpx;
|
||||
margin: 54rpx auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.new-users {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
|
||||
.sys-head {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background: linear-gradient(90deg, $bg-star1 0%, $bg-end1 100%);
|
||||
|
||||
.sys-title {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
height: 43px;
|
||||
text-align: center;
|
||||
line-height: 43px;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.head {
|
||||
padding-top: 30rpx;
|
||||
background: #fff;
|
||||
background: linear-gradient(360deg, rgba(255, 121, 49, 0) 0%, rgba(248, 74, 29, 0.82) 39%, #E93323 100%);
|
||||
// padding: 0 30rpx;
|
||||
|
||||
.user-card {
|
||||
position: relative;
|
||||
width: 710rpx;
|
||||
height: 340rpx;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 35rpx 28rpx;
|
||||
background: linear-gradient(90deg, $bg-star 0%, $bg-end 100%);
|
||||
box-shadow: 0px 10rpx 20rpx 0px rgba(255, 2, 0, 0.2);
|
||||
border-radius: 24rpx;
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url('~@/static/images/user_bg.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
padding: 35rpx 0 30rpx 0;
|
||||
.user-info {
|
||||
z-index: 20;
|
||||
position: relative;
|
||||
|
@ -430,7 +448,6 @@
|
|||
border-radius: 18px;
|
||||
font-size: 20rpx;
|
||||
margin-left: 12rpx;
|
||||
// margin-top: 2rpx;
|
||||
|
||||
image {
|
||||
width: 27rpx;
|
||||
|
@ -460,8 +477,7 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 60rpx;
|
||||
// padding: 0 47rpx;
|
||||
margin-top: 30rpx;
|
||||
color: #fff;
|
||||
|
||||
.num-item {
|
||||
|
@ -474,7 +490,7 @@
|
|||
}
|
||||
|
||||
.txt {
|
||||
margin-top: 8rpx;
|
||||
margin-top: 10rpx;
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
@ -500,13 +516,24 @@
|
|||
}
|
||||
|
||||
.order-wrapper {
|
||||
background-color: #fff;
|
||||
border-radius: 14rpx;
|
||||
padding: 30rpx 16rpx;
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
|
||||
.order-hd {
|
||||
justify-content: space-between;
|
||||
padding: 0 20rpx 28rpx;
|
||||
margin-top: 33rpx;
|
||||
border-bottom: 1px solid #F5F5F5;
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
margin-bottom: 40rpx;
|
||||
padding: 0 16rpx;
|
||||
|
||||
.left {
|
||||
color: #282828;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.right {
|
||||
align-items: center;
|
||||
|
@ -515,22 +542,21 @@
|
|||
|
||||
.icon-xiangyou {
|
||||
margin-left: 5rpx;
|
||||
margin-top: 6rpx;
|
||||
font-size: 26rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order-bd {
|
||||
display: flex;
|
||||
padding: 0 24rpx;
|
||||
justify-content: space-between;
|
||||
padding: 0;
|
||||
|
||||
.order-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 20%;
|
||||
height: 160rpx;
|
||||
|
||||
.pic {
|
||||
position: relative;
|
||||
|
@ -554,7 +580,7 @@
|
|||
|
||||
.slider-wrapper {
|
||||
margin: 20rpx 0;
|
||||
height: 130rpx;
|
||||
height: 138rpx;
|
||||
|
||||
swiper,
|
||||
swiper-item {
|
||||
|
@ -563,47 +589,51 @@
|
|||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 130rpx;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.user-menus {
|
||||
background-color: #fff;
|
||||
border-radius: 14rpx;
|
||||
|
||||
.menu-title {
|
||||
padding: 30rpx 30rpx 40rpx;
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.list-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 90rpx;
|
||||
padding: 0 30rpx;
|
||||
flex-direction: column;
|
||||
width: 25%;
|
||||
margin-bottom: 47rpx;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin-right: 25rpx;
|
||||
}
|
||||
image {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 655rpx;
|
||||
height: 1px;
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
&:last-child::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
button{
|
||||
|
||||
button {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
@ -613,13 +643,13 @@
|
|||
}
|
||||
|
||||
.order-status-num {
|
||||
|
||||
min-width:12rpx;
|
||||
|
||||
min-width: 12rpx;
|
||||
background-color: #fff;
|
||||
color: #ee5a52;
|
||||
border-radius: 15px;
|
||||
position: absolute;
|
||||
right:-14rpx;
|
||||
right: -14rpx;
|
||||
top: -15rpx;
|
||||
font-size: 20rpx;
|
||||
padding: 0 8rpx;
|
||||
|
|
|
@ -0,0 +1,266 @@
|
|||
<template>
|
||||
<view class="appBox">
|
||||
<div class="shading">
|
||||
<image :src="logoUrl" v-if="logoUrl" />
|
||||
<image src="/static/images/logo2.png" v-else />
|
||||
</div>
|
||||
<mobileLogin :isUp="isUp" :isShow="isShow" :platform="platform" :isPos="isPos" :appleShow="appleShow" :authKey="authKey" @wechatPhone="wechatPhone"></mobileLogin>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const app = getApp();
|
||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import Routine from '@/libs/routine';
|
||||
import {
|
||||
loginMobile,
|
||||
registerVerify,
|
||||
getCodeApi,
|
||||
getUserInfo,
|
||||
phoneSilenceAuth,
|
||||
phoneWxSilenceAuth
|
||||
} from "@/api/user";
|
||||
import {
|
||||
bindingPhone
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
getUserPhone
|
||||
} from '@/api/public';
|
||||
import mobileLogin from '@/components/login_mobile/index.vue'
|
||||
export default {
|
||||
name: 'login_mobile',
|
||||
data() {
|
||||
return {
|
||||
options: '',
|
||||
keyCode: '',
|
||||
account: '',
|
||||
codeNum: '',
|
||||
isUp: true,
|
||||
authKey: '',
|
||||
logoUrl: '',
|
||||
isShow: false,
|
||||
isPos: false,
|
||||
platform: '', // 手机平台
|
||||
appleShow: '' //是否是苹果登录
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
mobileLogin
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
mounted() {
|
||||
//this.getCode();
|
||||
},
|
||||
onLoad: function(options) {
|
||||
let that = this;
|
||||
// 获取系统信息
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.platform = res.platform;
|
||||
}
|
||||
});
|
||||
const {
|
||||
code,
|
||||
state,
|
||||
scope,
|
||||
back_url,
|
||||
appleShow
|
||||
} = options;
|
||||
that.options = options
|
||||
if (options.authKey) that.authKey = options.authKey
|
||||
if (options.appleShow) that.appleShow = options.appleShow
|
||||
},
|
||||
methods: {
|
||||
wechatPhone() {
|
||||
this.$Cache.clear('snsapiKey');
|
||||
if (this.options.back_url) {
|
||||
let url = uni.getStorageSync('snRouter');
|
||||
url = url.indexOf('/pages/index/index') != -1 ? '/' : url;
|
||||
if (url.indexOf('/pages/users/wechat_login/index') !== -1) {
|
||||
url = '/';
|
||||
}
|
||||
if (!url) {
|
||||
url = '/pages/index/index';
|
||||
}
|
||||
this.isUp = false
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(res => {
|
||||
location.href = url
|
||||
}, 800)
|
||||
} else {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
// 获取验证码
|
||||
async code() {
|
||||
let that = this;
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
await registerVerify(that.account).then(res => {
|
||||
that.$util.Tips({
|
||||
title: res.msg
|
||||
});
|
||||
that.sendCode();
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取验证码api
|
||||
getCode() {
|
||||
let that = this
|
||||
getCodeApi().then(res => {
|
||||
that.keyCode = res.data.key;
|
||||
}).catch(res => {
|
||||
that.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
});
|
||||
},
|
||||
close() {
|
||||
this.$emit('close', false)
|
||||
},
|
||||
// #ifdef MP
|
||||
phoneSilenceAuth(code) {
|
||||
let self = this
|
||||
phoneSilenceAuth({
|
||||
code: code,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
phone: this.account,
|
||||
captcha: this.codeNum
|
||||
}).then(res => {
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token
|
||||
});
|
||||
this.$store.commit("SETUID", res.data.uid);
|
||||
this.getUserInfo();
|
||||
}).catch(error => {
|
||||
self.$util.Tips({
|
||||
title: error
|
||||
})
|
||||
})
|
||||
},
|
||||
// #endif
|
||||
/**
|
||||
* 获取个人用户信息
|
||||
*/
|
||||
getUserInfo: function() {
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
uni.hideLoading();
|
||||
that.userInfo = res.data
|
||||
that.$store.commit("UPDATE_USERINFO", res.data);
|
||||
// #ifdef MP
|
||||
that.$util.Tips({
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 3
|
||||
})
|
||||
that.close()
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
that.$emit('wechatPhone', true)
|
||||
// #endif
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.appBox {
|
||||
background-color: #fff;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.shading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
|
||||
|
||||
|
||||
|
||||
image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
}
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
.ChangePassword .phone {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-top: 55rpx;
|
||||
}
|
||||
|
||||
.ChangePassword .list {
|
||||
width: 580rpx;
|
||||
margin: 53rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.ChangePassword .list .item {
|
||||
width: 100%;
|
||||
height: 110rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.ChangePassword .list .item input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.ChangePassword .list .item .placeholder {
|
||||
color: #b9b9bc;
|
||||
}
|
||||
|
||||
.ChangePassword .list .item input.codeIput {
|
||||
width: 340rpx;
|
||||
}
|
||||
|
||||
.ChangePassword .list .item .code {
|
||||
font-size: 32rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.ChangePassword .list .item .code.on {
|
||||
color: #b9b9bc !important;
|
||||
}
|
||||
|
||||
.ChangePassword .confirmBnt {
|
||||
font-size: 32rpx;
|
||||
width: 580rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 45rpx;
|
||||
color: #fff;
|
||||
margin: 92rpx auto 0 auto;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
</style>
|
|
@ -29,11 +29,15 @@
|
|||
<view class="people font-color">¥{{item.brokeragePrice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='noCommodity' v-if="rankList.length == 0 && (page != 1 || active== 0)">
|
||||
<emptyPage title="暂无排行~"></emptyPage>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -45,6 +49,8 @@
|
|||
import {
|
||||
toLogin
|
||||
} from '@/libs/login.js';
|
||||
import home from '@/components/home';
|
||||
import emptyPage from '@/components/emptyPage.vue'
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
|
@ -53,6 +59,8 @@
|
|||
// #endif
|
||||
export default {
|
||||
components: {
|
||||
emptyPage,
|
||||
home,
|
||||
// #ifdef MP
|
||||
authorize
|
||||
// #endif
|
||||
|
@ -90,13 +98,7 @@
|
|||
this.getBrokerageRankList();
|
||||
this.getBrokerageRankNumber(this.type);
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -179,7 +181,7 @@
|
|||
.CommissionRank .wrapper {
|
||||
width: 710rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
border-radius: 14rpx;
|
||||
margin: -76rpx auto 0 auto;
|
||||
}
|
||||
|
||||
|
@ -193,7 +195,8 @@
|
|||
}
|
||||
|
||||
.CommissionRank .wrapper .nav .item.font-color {
|
||||
border-bottom: 4rpx solid #e93323;
|
||||
border-bottom: 4rpx solid $theme-color;
|
||||
margin-top: -2rpx;
|
||||
}
|
||||
|
||||
.CommissionRank .wrapper .list {
|
||||
|
|
|
@ -1,24 +1,27 @@
|
|||
<template>
|
||||
<view>
|
||||
<form @submit="formSubmit" report-submit='true'>
|
||||
<view class='evaluate-con'>
|
||||
<view class='goodsStyle acea-row row-between'>
|
||||
<view class='evaluate-con pad30'>
|
||||
<view class='goodsStyle acea-row row-between borRadius14'>
|
||||
<view class='pictrue'>
|
||||
<image :src='productInfo.image'></image>
|
||||
</view>
|
||||
<view class='text acea-row row-between'>
|
||||
<view class='name line2'>{{productInfo.storeName}}</view>
|
||||
<view>
|
||||
<view class='name line2'>{{productInfo.storeName}}</view>
|
||||
<view class='attr line1' v-if="productInfo.sku">{{productInfo.sku}}</view>
|
||||
</view>
|
||||
<view class='money'>
|
||||
<view>¥{{productInfo.price}}</view>
|
||||
<view class='num'>x{{cart_num}}</view>
|
||||
<view>¥{{productInfo.truePrice}}</view>
|
||||
<view class='num'>x{{productInfo.cartNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='score'>
|
||||
<view class='score borRadius14'>
|
||||
<view class='item acea-row row-middle' v-for="(item,indexw) in scoreList" :key="indexw">
|
||||
<view>{{item.name}}</view>
|
||||
<view class='starsList'>
|
||||
<text @click="stars(indexn, indexw)" v-for="(itemn, indexn) in item.stars" :key="indexn" class='iconfont' :class="item.index >= indexn? 'icon-shitixing font-color':'icon-kongxinxing'"></text>
|
||||
<text @click="stars(indexn, indexw)" v-for="(itemn, indexn) in item.stars" :key="indexn" class='iconfont' :class="item.index >= indexn? 'icon-shitixing':'icon-kongxinxing'"></text>
|
||||
</view>
|
||||
<text class='evaluate'>{{item.index === -1 ? "" : item.index + 1 + "分"}}</text>
|
||||
</view>
|
||||
|
@ -27,7 +30,7 @@
|
|||
<view class='list acea-row row-middle'>
|
||||
<view class='pictrue' v-for="(item,index) in picsPath" :key="index">
|
||||
<image :src='item'></image>
|
||||
<text class='iconfont icon-guanbi1 font-color' @click='DelPic(index)'></text>
|
||||
<text class='iconfont icon-guanbi1' @click='DelPic(index)'></text>
|
||||
</view>
|
||||
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic' v-if="picsPath.length < 8">
|
||||
<text class='iconfont icon-icon25201'></text>
|
||||
|
@ -40,7 +43,7 @@
|
|||
</view>
|
||||
</form>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
@ -103,26 +106,19 @@
|
|||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (!options.unique || !options.uni || !options.id) return this.$util.Tips({
|
||||
if (!options.unique || !options.orderId ) return this.$util.Tips({
|
||||
title: '缺少参数'
|
||||
}, {
|
||||
tab: 3,
|
||||
url: 1
|
||||
});
|
||||
this.unique = options.unique;
|
||||
this.orderId = options.uni;
|
||||
this.id = options.id;
|
||||
this.evaluateId = options.id;
|
||||
this.unique = Number(options.unique) || 0;
|
||||
this.orderId = options.orderId || 0;
|
||||
this.evaluateId = Number(options.id) || 0;
|
||||
if (this.isLogin) {
|
||||
this.getOrderProduct();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -140,12 +136,12 @@
|
|||
getOrderProduct: function() {
|
||||
let that = this;
|
||||
orderProduct({
|
||||
orderId: that.id,
|
||||
orderId: that.evaluateId,
|
||||
uni: that.unique
|
||||
}).then(res => {
|
||||
that.$set(that, 'productInfo', res.data.productInfo);
|
||||
that.$set(that, 'cart_num', res.data.cartNum);
|
||||
that.$set(that, 'productId', res.data.productId);
|
||||
that.$set(that, 'productInfo', res.data);
|
||||
// that.$set(that, 'cart_num', res.data.cartNum);
|
||||
// that.$set(that, 'productId', res.data.productId);
|
||||
});
|
||||
},
|
||||
stars: function(indexn, indexw) {
|
||||
|
@ -159,7 +155,7 @@
|
|||
let that = this,
|
||||
pic = this.picsPath[index];
|
||||
that.picsPath.splice(index, 1);
|
||||
that.$set(that, 'picsPath', that.picsPath);
|
||||
that.pics.splice(index, 1);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -196,10 +192,10 @@
|
|||
value.productScore = product_score;
|
||||
value.serviceScore = service_score;
|
||||
value.pics = that.pics.length>0?JSON.stringify(that.pics):'';
|
||||
value.productId = that.productId;
|
||||
value.oid = that.evaluateId;
|
||||
value.productId = that.productInfo.productId;
|
||||
value.orderNo = that.orderId;
|
||||
value.unique = that.unique;
|
||||
value.sku = that.productInfo.attrInfo.suk;
|
||||
value.sku = that.productInfo.sku;
|
||||
uni.showLoading({
|
||||
title: "正在发布评论……"
|
||||
});
|
||||
|
@ -221,16 +217,23 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.goodsStyle .text .name, .attr{
|
||||
//width: 496rpx;
|
||||
}
|
||||
.icon-shitixing{
|
||||
color: #FFBB00 !important;
|
||||
}
|
||||
.evaluate-con .score {
|
||||
background-color: #fff;
|
||||
border-top: 1rpx solid #f5f5f5;
|
||||
// border-top: 1rpx solid #f5f5f5;
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
padding: 48rpx 30rpx 65rpx 30rpx;
|
||||
padding: 46rpx 24rpx;
|
||||
}
|
||||
|
||||
.evaluate-con .score .item~.item {
|
||||
margin-top: 30rpx;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
.evaluate-con .score .item .starsList {
|
||||
|
@ -252,10 +255,10 @@
|
|||
}
|
||||
|
||||
.evaluate-con .score .textarea {
|
||||
width: 690rpx;
|
||||
background-color: #fafafa;
|
||||
border-radius: 10rpx;
|
||||
margin-top: 48rpx;
|
||||
width: 100%;
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 55rpx;
|
||||
}
|
||||
|
||||
.evaluate-con .score .textarea textarea {
|
||||
|
@ -264,6 +267,7 @@
|
|||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
height: 160rpx;
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
.evaluate-con .score .textarea .placeholder {
|
||||
|
@ -282,6 +286,7 @@
|
|||
position: relative;
|
||||
font-size: 22rpx;
|
||||
color: #bbb;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.evaluate-con .score .textarea .list .pictrue:nth-last-child(1) {
|
||||
|
@ -292,7 +297,7 @@
|
|||
.evaluate-con .score .textarea .list .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 3rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.evaluate-con .score .textarea .list .pictrue .icon-guanbi1 {
|
||||
|
@ -310,7 +315,7 @@
|
|||
.evaluate-con .score .evaluateBnt {
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
width: 690rpx;
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
border-radius: 43rpx;
|
||||
text-align: center;
|
||||
|
|
|
@ -1,23 +1,29 @@
|
|||
<template>
|
||||
<view>
|
||||
<view style="height: 100%;">
|
||||
<view class='evaluate-list'>
|
||||
<view class='generalComment acea-row row-between-wrapper'>
|
||||
<view class='acea-row row-middle font-color'>
|
||||
<view class='evaluate'>评分</view>
|
||||
<view class='start' :class="'star'+ (replyData.sumCount===0?'3':Math.round(replyData.replyStar/replyData.sumCount))"></view>
|
||||
<view class='start'
|
||||
:class="'star'+ (replyData.sumCount===0?'3':Math.round(replyData.replyStar/replyData.sumCount))">
|
||||
</view>
|
||||
</view>
|
||||
<view><text class='font-color'>{{(replyData.replyChance)*100}}%</text>好评率</view>
|
||||
</view>
|
||||
<view class='nav acea-row row-middle'>
|
||||
<view class='item' :class='type==0 ? "bg-color":""' @click='changeType(0)'>全部({{replyData.sumCount}})</view>
|
||||
<view class='item' :class='type==1 ? "bg-color":""' @click='changeType(1)'>好评({{replyData.goodCount}})</view>
|
||||
<view class='item' :class='type==2 ? "bg-color":""' @click='changeType(2)'>中评({{replyData.inCount}})</view>
|
||||
<view class='item' :class='type==3 ? "bg-color":""' @click='changeType(3)'>差评({{replyData.poorCount}})</view>
|
||||
<view class='item' :class='type==0 ? "bg-color":""' @click='changeType(0)'>全部({{replyData.sumCount}})
|
||||
</view>
|
||||
<view class='item' :class='type==1 ? "bg-color":""' @click='changeType(1)'>好评({{replyData.goodCount}})
|
||||
</view>
|
||||
<view class='item' :class='type==2 ? "bg-color":""' @click='changeType(2)'>中评({{replyData.inCount}})
|
||||
</view>
|
||||
<view class='item' :class='type==3 ? "bg-color":""' @click='changeType(3)'>差评({{replyData.poorCount}})
|
||||
</view>
|
||||
</view>
|
||||
<userEvaluation :reply="reply"></userEvaluation>
|
||||
<view class='loadingicon acea-row row-center-wrapper'>
|
||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
|
||||
</view>
|
||||
</view>
|
||||
<view class='loadingicon acea-row row-center-wrapper'>
|
||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
|
||||
</view>
|
||||
<view class='noCommodity' v-if="!replyData.sumCount && page > 1">
|
||||
<view class='pictrue'>
|
||||
|
@ -75,7 +81,7 @@
|
|||
getProductReplyCount: function() {
|
||||
let that = this;
|
||||
getReplyConfig(that.productId).then(res => {
|
||||
that.$set(that,'replyData',res.data);
|
||||
that.$set(that, 'replyData', res.data);
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -95,16 +101,16 @@
|
|||
let list = res.data.list,
|
||||
loadend = list.length < that.limit;
|
||||
that.reply = that.$util.SplitArray(list, that.reply);
|
||||
that.$set(that,'reply',that.reply);
|
||||
that.$set(that, 'reply', that.reply);
|
||||
that.loading = false;
|
||||
that.loadend = loadend;
|
||||
if(that.reply.length){
|
||||
if (that.reply.length) {
|
||||
that.loadTitle = loadend ? "😕人家是有底线的~~" : "加载更多";
|
||||
}
|
||||
that.page = that.page + 1;
|
||||
}).catch(err => {
|
||||
that.loading = false,
|
||||
that.loadTitle = '加载更多'
|
||||
that.loadTitle = '加载更多'
|
||||
});
|
||||
},
|
||||
/*
|
||||
|
@ -116,7 +122,7 @@
|
|||
this.type = type;
|
||||
this.page = 1;
|
||||
this.loadend = false;
|
||||
this.$set(this,'reply',[]);
|
||||
this.$set(this, 'reply', []);
|
||||
this.getProductReplyList();
|
||||
}
|
||||
},
|
||||
|
@ -130,10 +136,48 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{background-color:#fff;}
|
||||
.evaluate-list .generalComment{height:94rpx;padding:0 30rpx;margin-top:1rpx;background-color:#fff;font-size:28rpx;color:#808080;}
|
||||
.evaluate-list .generalComment .evaluate{margin-right:7rpx;}
|
||||
.evaluate-list .nav{font-size:24rpx;color:#282828;padding:0 30rpx 32rpx 30rpx;background-color:#fff;border-bottom:1rpx solid #f5f5f5;}
|
||||
.evaluate-list .nav .item{font-size:24rpx;color:#282828;border-radius:6rpx;height:54rpx;padding:0 20rpx;background-color:#f4f4f4;line-height:54rpx;margin-right:17rpx;}
|
||||
.evaluate-list .nav .item.bg-color{color:#fff;}
|
||||
page {
|
||||
background-color: #fff;
|
||||
height: 100%;
|
||||
}
|
||||
.evaluate-list{
|
||||
padding: 30rpx 0 0 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
.evaluate-list .generalComment {
|
||||
padding: 0 30rpx;
|
||||
margin-top: 1rpx;
|
||||
background-color: #fff;
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.evaluate-list .generalComment .evaluate {
|
||||
margin-right: 7rpx;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.evaluate-list .nav {
|
||||
font-size: 24rpx;
|
||||
color: #282828;
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
.evaluate-list .nav .item {
|
||||
font-size: 24rpx;
|
||||
color: #282828;
|
||||
border-radius: 27rpx;
|
||||
height: 54rpx;
|
||||
padding: 0 20rpx;
|
||||
background-color: #f4f4f4;
|
||||
line-height: 54rpx;
|
||||
margin-right: 17rpx;
|
||||
}
|
||||
|
||||
.evaluate-list .nav .item.bg-color {
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -12,32 +12,36 @@
|
|||
<div class="row-right">
|
||||
<div>
|
||||
<!-- #ifdef H5 -->
|
||||
<a class="store-phone" :href="'tel:' + item.phone"><span class="iconfont icon-dadianhua01"></span></a>
|
||||
<a class="store-phone" :href="'tel:' + item.phone"><span
|
||||
class="iconfont icon-dadianhua01"></span></a>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP || APP-PLUS -->
|
||||
<view class="store-phone" @click="call(item.phone)"><text class="iconfont icon-dadianhua01"></text></view>
|
||||
<!-- #ifdef MP -->
|
||||
<view class="store-phone" @click="call(item.phone)"><text
|
||||
class="iconfont icon-dadianhua01"></text></view>
|
||||
<!-- #endif -->
|
||||
</div>
|
||||
<!-- <div>
|
||||
<a class="store-phone" :href="'tel:' + item.phone"><span class="iconfont icon-dadianhua01"></span></a>
|
||||
</div> -->
|
||||
<div class="store-distance" @click.stop="showMaoLocation(item)">
|
||||
<span class="addressTxt" v-if="item.range">距离{{ item.range }}千米</span>
|
||||
<span class="addressTxt" v-if="item.distance">距离{{ item.distance/1000 }}千米</span>
|
||||
<span class="addressTxt" v-else>查看地图</span>
|
||||
<span class="iconfont icon-youjian"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
</div>
|
||||
<div>
|
||||
<iframe v-if="locationShow && !isWeixin" ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
|
||||
<!-- <iframe v-if="locationShow && !isWeixin" ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
|
||||
scrolling="no" :src="
|
||||
'https://apis.map.qq.com/tools/geolocation?key=' +
|
||||
mapKey +
|
||||
'&referer=myapp'
|
||||
">
|
||||
</iframe>
|
||||
</iframe> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -111,29 +115,60 @@
|
|||
},
|
||||
selfLocation() {
|
||||
let self = this
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(res) {
|
||||
try {
|
||||
uni.setStorageSync('user_latitude', res.latitude);
|
||||
uni.setStorageSync('user_longitude', res.longitude);
|
||||
} catch {}
|
||||
// #ifdef H5
|
||||
if (self.$wechat.isWeixin()) {
|
||||
self.$wechat.location().then(res => {
|
||||
this.user_latitude = res.latitude;
|
||||
this.user_longitude = res.longitude;
|
||||
uni.setStorageSync('user_latitude', res.latitude);
|
||||
uni.setStorageSync('user_longitude', res.longitude);
|
||||
self.getList();
|
||||
},
|
||||
complete:function() {
|
||||
self.getList();
|
||||
}
|
||||
});
|
||||
})
|
||||
} else {
|
||||
// #endif
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
try {
|
||||
this.user_latitude = res.latitude;
|
||||
this.user_longitude = res.longitude;
|
||||
uni.setStorageSync('user_latitude', res.latitude);
|
||||
uni.setStorageSync('user_longitude', res.longitude);
|
||||
} catch {}
|
||||
self.getList();
|
||||
},
|
||||
complete: function() {
|
||||
self.getList();
|
||||
}
|
||||
});
|
||||
// #ifdef H5
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
showMaoLocation(e) {
|
||||
uni.openLocation({
|
||||
latitude: Number(e.latitude),
|
||||
longitude: Number(e.longitude),
|
||||
success: function() {
|
||||
let self = this;
|
||||
// #ifdef H5
|
||||
if (self.$wechat.isWeixin()) {
|
||||
self.$wechat.seeLocation({
|
||||
latitude: Number(e.latitude),
|
||||
longitude: Number(e.longitude)
|
||||
}).then(res => {
|
||||
console.log('success');
|
||||
Number
|
||||
}
|
||||
});
|
||||
})
|
||||
} else {
|
||||
// #endif
|
||||
uni.openLocation({
|
||||
latitude: Number(e.latitude),
|
||||
longitude: Number(e.longitude),
|
||||
name: e.name,
|
||||
address: `${e.address}-${e.detailedAddress}`,
|
||||
success: function() {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
// #ifdef H5
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
// 选中门店
|
||||
checked(e) {
|
||||
|
@ -241,9 +276,10 @@
|
|||
border-radius: 50%;
|
||||
display: block;
|
||||
text-align: center;
|
||||
line-height: 50rpx;
|
||||
line-height: 48rpx;
|
||||
background-color: #e83323;
|
||||
margin-bottom: 22rpx;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.store-distance {
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
<view class='logistics'>
|
||||
<view class='header acea-row row-between row-top'>
|
||||
<view class='pictrue'>
|
||||
<image :src='product.productInfo.image'></image>
|
||||
<image :src='product.productImg'></image>
|
||||
</view>
|
||||
<view class='text acea-row row-between'>
|
||||
<view class='name line2'>{{product.productInfo.storeName}}</view>
|
||||
<view class='name line2'>{{product.productName}}</view>
|
||||
<view class='money'>
|
||||
<view>¥{{product.truePrice}}</view>
|
||||
<view>x{{product.cartNum}}</view>
|
||||
<view>¥{{product.price}}</view>
|
||||
<view>x{{product.payNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<recommend :hostProduct='hostProduct' v-if="hostProduct.length"></recommend>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
@ -106,13 +106,7 @@
|
|||
this.getExpress();
|
||||
this.get_host_product();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onReady: function() {
|
||||
|
@ -142,30 +136,11 @@
|
|||
let that=this;
|
||||
express(that.orderId).then(function(res){
|
||||
let result = res.data.express|| {};
|
||||
that.$set(that,'product',res.data.order.cartInfo[0] || {});
|
||||
that.$set(that,'product',res.data.order.info[0] || {});
|
||||
that.$set(that,'orderInfo',res.data.order);
|
||||
that.$set(that,'expressList',result.list || []);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取我的推荐
|
||||
*/
|
||||
// getGroomList(onloadH) {
|
||||
// this.loading = true
|
||||
// if (!this.goodScroll) return
|
||||
// if (onloadH) {
|
||||
// this.iSshowH = true
|
||||
// }
|
||||
// getGroomList(type, this.params).then(({
|
||||
// data
|
||||
// }) => {
|
||||
// this.iSshowH = false
|
||||
// this.loading = false
|
||||
// this.goodScroll = data.list.length >= this.params.limit
|
||||
// this.params.page++
|
||||
// this.tempArr = this.tempArr.concat(data.list)
|
||||
// })
|
||||
// }
|
||||
get_host_product: function () {
|
||||
this.loading = true
|
||||
if (!this.goodScroll) return
|
||||
|
@ -176,7 +151,6 @@
|
|||
that.goodScroll = res.data.list.length >= that.params.limit
|
||||
that.params.page++
|
||||
that.hostProduct = that.hostProduct.concat(res.data.list)
|
||||
// that.$set(that,'hostProduct',res.data.list);
|
||||
});
|
||||
},
|
||||
},
|
||||
|
@ -271,7 +245,7 @@
|
|||
height: 40rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
border-radius: 3rpx;
|
||||
border-radius: 20rpx;
|
||||
border: 1rpx solid #999;
|
||||
}
|
||||
|
||||
|
@ -291,15 +265,15 @@
|
|||
}
|
||||
|
||||
.logistics .logisticsCon .item .circular.on {
|
||||
background-color: #e93323;
|
||||
background-color: $theme-color;
|
||||
}
|
||||
|
||||
.logistics .logisticsCon .item .text.on-font {
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.logistics .logisticsCon .item .text .data.on-font {
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.logistics .logisticsCon .item .text {
|
||||
|
|
|
@ -2,21 +2,17 @@
|
|||
<view>
|
||||
<form @submit="subRefund" report-submit='true'>
|
||||
<view class='apply-return'>
|
||||
<view class='goodsStyle acea-row row-between' v-for="(item,index) in orderInfo.cartInfo" :key="index">
|
||||
<view class='pictrue'><image :src='item.info.productInfo.image'></image></view>
|
||||
<view class='goodsStyle acea-row row-between borRadius14' v-for="(item,index) in orderInfo.orderInfoList" :key="index">
|
||||
<view class='pictrue'><image :src='item.image'></image></view>
|
||||
<view class='text acea-row row-between'>
|
||||
<view class='name line2'>{{item.info.productInfo.storeName}}</view>
|
||||
<view class='money' v-if="item.info.productInfo.attrInfo">
|
||||
<view>¥{{item.info.productInfo.attrInfo.price}}</view>
|
||||
<view class='num'>x{{item.info.cartNum}}</view>
|
||||
</view>
|
||||
<view class='money' v-else>
|
||||
<view>¥{{item.info.productInfo.price}}</view>
|
||||
<view class='num'>x{{item.info.cartNum}}</view>
|
||||
<view class='name line2'>{{item.storeName}}</view>
|
||||
<view class='money'>
|
||||
<view>¥{{item.price}}</view>
|
||||
<view class='num'>x{{item.cartNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<view class='list borRadius14'>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view>退货件数</view>
|
||||
<view class='num'>{{orderInfo.totalNum}}</view>
|
||||
|
@ -38,7 +34,7 @@
|
|||
<view>备注说明</view>
|
||||
<textarea placeholder='填写备注信息,100字以内' class='num' name="refund_reason_wap_explain" placeholder-class='填写备注信息,100字以内'></textarea>
|
||||
</view>
|
||||
<view class='item acea-row row-between'>
|
||||
<view class='item acea-row row-between' style="border: none;">
|
||||
<view class='title acea-row row-between-wrapper'>
|
||||
<view>上传凭证</view>
|
||||
<view class='tip'>( 最多可上传3张 )</view>
|
||||
|
@ -54,17 +50,17 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class='returnBnt bg-color' form-type="submit">申请退款</button>
|
||||
</view>
|
||||
<button class='returnBnt bg-color' form-type="submit">申请退款</button>
|
||||
</view>
|
||||
</form>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { ordeRefundReason, orderRefundVerify, getOrderDetail} from '@/api/order.js';
|
||||
import { ordeRefundReason, orderRefundVerify, applyRefund} from '@/api/order.js';
|
||||
import {
|
||||
toLogin
|
||||
} from '@/libs/login.js';
|
||||
|
@ -111,13 +107,7 @@
|
|||
this.getOrderInfo();
|
||||
this.getRefundReason();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -131,7 +121,7 @@
|
|||
*/
|
||||
getOrderInfo:function(){
|
||||
let that=this;
|
||||
getOrderDetail(that.orderId).then(res=>{
|
||||
applyRefund(that.orderId).then(res=>{
|
||||
that.$set(that,'orderInfo',res.data);
|
||||
});
|
||||
},
|
||||
|
@ -190,22 +180,25 @@
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.apply-return .list{background-color:#fff;margin-top:18rpx;}
|
||||
.apply-return .list .item{margin-left:30rpx;padding-right:30rpx;min-height:90rpx;border-bottom:1rpx solid #eee;font-size:30rpx;color:#333;}
|
||||
.apply-return{
|
||||
padding: 20rpx 30rpx 70rpx 30rpx;
|
||||
}
|
||||
.apply-return .list{background-color:#fff;margin-top:18rpx;padding:0 24rpx 70rpx 24rpx;}
|
||||
.apply-return .list .item{min-height:90rpx;border-bottom:1rpx solid #eee;font-size:30rpx;color:#333;}
|
||||
.apply-return .list .item .num{color:#282828;width:427rpx;text-align:right;}
|
||||
.apply-return .list .item .num .picker .reason{width:385rpx;}
|
||||
.apply-return .list .item .num .picker .iconfont{color:#666;font-size:30rpx;margin-top:2rpx;}
|
||||
.apply-return .list .item.textarea{padding:30rpx 30rpx 30rpx 0;}
|
||||
.apply-return .list .item.textarea{padding:24rpx 0;}
|
||||
.apply-return .list .item textarea{height:100rpx;font-size:30rpx;}
|
||||
.apply-return .list .item .placeholder{color:#bbb;}
|
||||
.apply-return .list .item .title{height:95rpx;width:100%;}
|
||||
.apply-return .list .item .title .tip{font-size:30rpx;color:#bbb;}
|
||||
.apply-return .list .item .upload{padding-bottom:36rpx;}
|
||||
.apply-return .list .item .upload .pictrue{margin:22rpx 23rpx 0 0;width:156rpx;height:156rpx;position:relative;font-size:24rpx;color:#bbb;}
|
||||
.apply-return .list .item .upload .pictrue{border-radius: 14rpx; margin:22rpx 23rpx 0 0;width:156rpx;height:156rpx;position:relative;font-size:24rpx;color:#bbb;}
|
||||
.apply-return .list .item .upload .pictrue:nth-of-type(4n){margin-right:0;}
|
||||
.apply-return .list .item .upload .pictrue image{width:100%;height:100%;border-radius:3rpx;}
|
||||
.apply-return .list .item .upload .pictrue image{width:100%;height:100%;border-radius:14rpx;}
|
||||
.apply-return .list .item .upload .pictrue .icon-guanbi1{position:absolute;font-size:45rpx;top:-10rpx;right:-10rpx;}
|
||||
.apply-return .list .item .upload .pictrue .icon-icon25201{color:#bfbfbf;font-size:50rpx;}
|
||||
.apply-return .list .item .upload .pictrue:nth-last-child(1){border:1rpx solid #ddd;box-sizing:border-box;}
|
||||
.apply-return .returnBnt{font-size:32rpx;color:#fff;width:690rpx;height:86rpx;border-radius:50rpx;text-align:center;line-height:86rpx;margin:43rpx auto;}
|
||||
.apply-return .returnBnt{font-size:32rpx;color:#fff;width:100%;height:86rpx;border-radius:50rpx;text-align:center;line-height:86rpx;margin:43rpx auto;}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<web-view class="web-view" :webview-styles="webviewStyles" :src="url" :style="{width: windowW + 'px', height: windowH + 'px'}"></web-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
computed: mapGetters(['chatUrl']),
|
||||
data() {
|
||||
return {
|
||||
windowH: 0,
|
||||
windowW: 0,
|
||||
webviewStyles: {
|
||||
progress: {
|
||||
color: 'transparent'
|
||||
}
|
||||
},
|
||||
url: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.url = this.chatUrl;
|
||||
try {
|
||||
const res = uni.getSystemInfoSync();
|
||||
this.windowW = res.windowWidth;
|
||||
this.windowH = res.windowHeight;
|
||||
} catch (e) {
|
||||
// error
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,47 +1,37 @@
|
|||
<template>
|
||||
<div class="register absolute">
|
||||
<div class="login-wrapper">
|
||||
<div class="shading">
|
||||
<div class="pictrue acea-row row-center-wrapper">
|
||||
<image :src="logoUrl" v-if="logoUrl" />
|
||||
<image src="/static/images/logo2.png" v-else />
|
||||
</div>
|
||||
<!-- <image :src="logoUrl"/> -->
|
||||
<image :src="logoUrl"/>
|
||||
<!-- <image src="/static/images/logo2.png" v-if="!logoUrl" /> -->
|
||||
</div>
|
||||
<div class="whiteBg" v-if="formItem === 1">
|
||||
<div class="title acea-row row-center-wrapper">
|
||||
<div class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" @click="navTap(index)"
|
||||
:key="index">
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="list" :hidden="current !== 1">
|
||||
<div class="list" v-if="current !== 1">
|
||||
<form @submit.prevent="submit">
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/phone_1.png"></image>
|
||||
<input type="text" placeholder="输入手机号码" v-model="account" required />
|
||||
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
|
||||
<input type="text" class="texts" placeholder="输入手机号码" v-model="account" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<input type="password" placeholder="填写登录密码" v-model="password" required />
|
||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
||||
<input type="password" class="texts" placeholder="填写登录密码" v-model="password" required />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- <navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
|
||||
<span class="iconfont icon-wenti"></span>忘记密码
|
||||
</navigator> -->
|
||||
</div>
|
||||
<div class="list" :hidden="current !== 0">
|
||||
<div class="list" v-if="current !== 0 || appLoginStatus || appleLoginStatus">
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/phone_1.png"></image>
|
||||
<input type="text" placeholder="输入手机号码" v-model="account" />
|
||||
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
|
||||
<input type="text" class="texts" placeholder="输入手机号码" v-model="account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
||||
{{ text }}
|
||||
|
@ -50,59 +40,19 @@
|
|||
</div>
|
||||
<div class="item" v-if="isShowCode">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
|
||||
<div class="code" @click="again"><img :src="codeUrl" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="logon" @click="loginMobile" :hidden="current !== 0">登录</div>
|
||||
<div class="logon" @click="submit" :hidden="current === 0">登录</div>
|
||||
<div class="tip">
|
||||
<div :hidden="current !== 1">
|
||||
没有账号?
|
||||
<span @click="current = 0" class="font-color-red">快速登录</span>
|
||||
</div>
|
||||
<div class="logon" @click="loginMobile" v-if="current !== 0">登录</div>
|
||||
<div class="logon" @click="submit" v-if="current === 0">登录</div>
|
||||
<div class="tips">
|
||||
<div v-if="current==0" @click="current = 1">快速登录</div>
|
||||
<div v-if="current==1" @click="current = 0">账号登录</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="whiteBg" v-else>
|
||||
<div class="title">注册账号</div>
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/phone_1.png"></image>
|
||||
<input type="text" placeholder="输入手机号码" v-model="account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
||||
{{ text }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_1.png"></image>
|
||||
<input type="password" placeholder="填写您的登录密码" v-model="password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-if="isShowCode">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
|
||||
<div class="code" @click="again"><img :src="codeUrl" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="logon" @click="register">注册</div>
|
||||
<div class="tip">
|
||||
已有账号?
|
||||
<span @click="formItem = 1" class="font-color-red">立即登录</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="bottom"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -126,7 +76,7 @@
|
|||
validatorDefaultCatch
|
||||
} from "@/utils/dialog";
|
||||
import {
|
||||
getLogo
|
||||
getLogo, appAuth, appleLogin
|
||||
} from "@/api/public";
|
||||
import {
|
||||
VUE_APP_API_URL
|
||||
|
@ -140,7 +90,7 @@
|
|||
data: function() {
|
||||
return {
|
||||
navList: ["快速登录", "账号登录"],
|
||||
current: 0,
|
||||
current: 1,
|
||||
account: "",
|
||||
password: "",
|
||||
captcha: "",
|
||||
|
@ -150,7 +100,13 @@
|
|||
keyCode: "",
|
||||
codeUrl: "",
|
||||
codeVal: "",
|
||||
isShowCode: false
|
||||
isShowCode: false,
|
||||
platform: '',
|
||||
appLoginStatus: false, // 微信登录强制绑定手机号码状态
|
||||
appUserInfo: null, // 微信登录保存的用户信息
|
||||
appleLoginStatus: false, // 苹果登录强制绑定手机号码状态
|
||||
appleUserInfo: null,
|
||||
appleShow: false // 苹果登录版本必须要求ios13以上的
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
|
@ -166,7 +122,143 @@
|
|||
this.getCode();
|
||||
this.getLogoImage();
|
||||
},
|
||||
onLoad() {
|
||||
let self = this
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
if (res.platform.toLowerCase() == 'ios' && res.system.split(' ')[1] >= 13) {
|
||||
self.appleShow = true
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 苹果登录
|
||||
appleLogin() {
|
||||
let self = this
|
||||
this.account = ''
|
||||
this.captcha = ''
|
||||
uni.showLoading({
|
||||
title: '登录中'
|
||||
})
|
||||
uni.login({
|
||||
provider: 'apple',
|
||||
timeout: 10000,
|
||||
success(loginRes) {
|
||||
uni.getUserInfo({
|
||||
provider: 'apple',
|
||||
success: function(infoRes) {
|
||||
self.appleUserInfo = infoRes.userInfo
|
||||
self.appleLoginApi()
|
||||
},
|
||||
fail() {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '获取用户信息失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
},
|
||||
complete() {
|
||||
uni.hideLoading()
|
||||
}
|
||||
});
|
||||
},
|
||||
fail(error) {
|
||||
uni.hideLoading()
|
||||
console.log(error)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 苹果登录Api
|
||||
appleLoginApi() {
|
||||
let self = this
|
||||
appleLogin({
|
||||
openId: self.appleUserInfo.openId,
|
||||
email: self.appleUserInfo.email == undefined ? '' :self.appleUserInfo.email,
|
||||
identityToken: self.appleUserInfo.identityToken || ''
|
||||
}).then((res) => {
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': res.data.token
|
||||
});
|
||||
this.getUserInfo(res.data);
|
||||
}).catch(error => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `错误信息${error}`,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// App微信登录
|
||||
wxLogin() {
|
||||
let self = this
|
||||
this.account = ''
|
||||
this.captcha = ''
|
||||
uni.showLoading({
|
||||
title: '登录中'
|
||||
})
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: function(loginRes) {
|
||||
// 获取用户信息
|
||||
uni.getUserInfo({
|
||||
provider: 'weixin',
|
||||
success: function(infoRes) {
|
||||
uni.hideLoading();
|
||||
self.appUserInfo = infoRes.userInfo
|
||||
self.appUserInfo.type = self.platform === 'ios' ? 'iosWx' : 'androidWx'
|
||||
self.wxLoginGo(self.appUserInfo)
|
||||
},
|
||||
fail() {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '获取用户信息失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
},
|
||||
complete() {
|
||||
uni.hideLoading()
|
||||
}
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '登录失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
wxLoginGo(userInfo) {
|
||||
appAuth(userInfo).then(res => {
|
||||
if (res.data.type === 'register') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/app_login/index?authKey='+res.data.key
|
||||
})
|
||||
}
|
||||
if (res.data.type === 'login') {
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': res.data.token
|
||||
});
|
||||
this.getUserInfo(res.data);
|
||||
}
|
||||
}).catch(res => {
|
||||
that.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
});
|
||||
},
|
||||
again() {
|
||||
this.codeUrl =
|
||||
VUE_APP_API_URL +
|
||||
|
@ -177,20 +269,11 @@
|
|||
},
|
||||
getCode() {
|
||||
let that = this
|
||||
// getCodeApi()
|
||||
// .then(res => {
|
||||
// that.keyCode = res.data.key;
|
||||
// })
|
||||
// .catch(res => {
|
||||
// that.$util.Tips({
|
||||
// title: res
|
||||
// });
|
||||
// });
|
||||
},
|
||||
async getLogoImage() {
|
||||
let that = this;
|
||||
getLogo().then(res => {
|
||||
that.logoUrl = res.data.logoUrl;
|
||||
that.logoUrl = res.data.logoUrl?res.data.logoUrl:'/static/images/logo2.png';
|
||||
});
|
||||
},
|
||||
async loginMobile() {
|
||||
|
@ -208,34 +291,17 @@
|
|||
title: '请输入正确的验证码'
|
||||
});
|
||||
loginMobile({
|
||||
account: that.account,
|
||||
phone: that.account,
|
||||
captcha: that.captcha,
|
||||
spread: that.$Cache.get("spread")
|
||||
spread_spid: that.$Cache.get("spread")
|
||||
})
|
||||
.then(res => {
|
||||
let data = res.data;
|
||||
let newTime = Math.round(new Date() / 1000);
|
||||
that.$store.commit("LOGIN", {
|
||||
'token': data.token
|
||||
// 'time': dayjs(data.expiresTime) - newTime
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': res.data.token
|
||||
});
|
||||
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
|
||||
that.$Cache.clear(BACK_URL);
|
||||
// getUserInfo().then(res => {
|
||||
that.$store.commit("SETUID", res.data.user.uid);
|
||||
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ===
|
||||
'/pages/user/index') {
|
||||
|
||||
uni.switchTab({
|
||||
url: backUrl
|
||||
});
|
||||
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
}
|
||||
// })
|
||||
that.getUserInfo(data);
|
||||
})
|
||||
.catch(res => {
|
||||
that.$util.Tips({
|
||||
|
@ -290,21 +356,15 @@
|
|||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if (that.formItem == 2) that.type = "register";
|
||||
// phone: that.account
|
||||
// type: that.type,
|
||||
// key: that.keyCode,
|
||||
// code: that.codeVal
|
||||
await registerVerify(that.account)
|
||||
.then(res => {
|
||||
that.$util.Tips({title:res.message});
|
||||
that.sendCode();
|
||||
})
|
||||
.catch(res => {
|
||||
// if (res.data.status === 402) {
|
||||
// that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;
|
||||
// that.isShowCode = true;
|
||||
// }
|
||||
that.$util.Tips({title:res.message});
|
||||
.catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
});
|
||||
},
|
||||
navTap: function(index) {
|
||||
|
@ -329,44 +389,210 @@
|
|||
.then(({
|
||||
data
|
||||
}) => {
|
||||
// let newTime = Math.round(new Date() / 1000);
|
||||
that.$store.commit("LOGIN", {
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': data.token
|
||||
// 'time': dayjs(data.expiresTime) - newTime
|
||||
});
|
||||
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
|
||||
that.$Cache.clear(BACK_URL);
|
||||
getUserInfo().then(res => {
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ==='/pages/user/index') {
|
||||
uni.switchTab({
|
||||
url: backUrl
|
||||
});
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
}
|
||||
})
|
||||
that.getUserInfo(data);
|
||||
})
|
||||
.catch(e => {
|
||||
that.$util.Tips({
|
||||
title: e
|
||||
});
|
||||
});
|
||||
},
|
||||
getUserInfo(data){
|
||||
this.$store.commit("SETUID", data.uid);
|
||||
getUserInfo().then(res => {
|
||||
this.$store.commit("UPDATE_USERINFO", res.data);
|
||||
let backUrl = this.$Cache.get(BACK_URL) || "/pages/index/index";
|
||||
if (backUrl.indexOf('/pages/users/login/index') !== -1) {
|
||||
backUrl = '/pages/index/index';
|
||||
}
|
||||
uni.reLaunch({
|
||||
url: backUrl
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
.appLogin {
|
||||
margin-top: 60rpx;
|
||||
|
||||
.hds {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #B4B4B4;
|
||||
|
||||
.line {
|
||||
width: 68rpx;
|
||||
height: 1rpx;
|
||||
background: #CCCCCC;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.apple-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 30rpx;
|
||||
background: #000;
|
||||
border-radius: 34rpx;
|
||||
font-size: 40rpx;
|
||||
|
||||
.icon-s-pingguo {
|
||||
color: #fff;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 40rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wx {
|
||||
margin-right: 30rpx;
|
||||
background-color: #61C64F;
|
||||
}
|
||||
|
||||
.mima {
|
||||
background-color: #28B3E9;
|
||||
}
|
||||
|
||||
.yanzheng {
|
||||
background-color: #F89C23;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.code img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
.acea-row.row-middle {
|
||||
input {
|
||||
margin-left: 20rpx;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.login-wrapper {
|
||||
padding: 30rpx;
|
||||
|
||||
.shading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
|
||||
/* #ifdef APP-VUE */
|
||||
margin-top: 50rpx;
|
||||
/* #endif */
|
||||
/* #ifndef APP-VUE */
|
||||
|
||||
margin-top: 200rpx;
|
||||
/* #endif */
|
||||
|
||||
|
||||
image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.whiteBg {
|
||||
margin-top: 100rpx;
|
||||
|
||||
.list {
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.item {
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
background: #fff;
|
||||
|
||||
.row-middle {
|
||||
position: relative;
|
||||
padding: 16rpx 45rpx;
|
||||
|
||||
.texts{
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.code {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
color: $theme-color;
|
||||
font-size: 26rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
margin-top: 80rpx;
|
||||
background-color: $theme-color;
|
||||
border-radius: 120rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin: 30rpx;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class='order-submission'>
|
||||
<view class="allAddress" :style="store_self_mention ? '':'padding-top:10rpx'">
|
||||
<view class="allAddress" :style="store_self_mention ? '':'padding-top:10rpx;'">
|
||||
<view class="nav acea-row">
|
||||
<view class="item font-color" :class="shippingType == 0 ? 'on' : 'on2'" @tap="addressType(0)" v-if='store_self_mention'></view>
|
||||
<view class="item font-color" :class="shippingType == 1 ? 'on' : 'on2'" @tap="addressType(1)" v-if='store_self_mention'></view>
|
||||
<view class="item font-color" :class="shippingType == 0 ? 'on' : 'on2'" @tap="addressType(0)"
|
||||
v-if='store_self_mention'></view>
|
||||
<view class="item font-color" :class="shippingType == 1 ? 'on' : 'on2'" @tap="addressType(1)"
|
||||
v-if='store_self_mention'></view>
|
||||
</view>
|
||||
<view class='address acea-row row-between-wrapper' @tap='onAddress' v-if='shippingType == 0'>
|
||||
<view class='address acea-row row-between-wrapper' @tap='onAddress' v-if='shippingType == 0' :style="store_self_mention ? '':'border-top-left-radius: 14rpx;border-top-right-radius: 14rpx;'">
|
||||
<view class='addressCon' v-if="addressInfo.realName">
|
||||
<view class='name'>{{addressInfo.realName}}
|
||||
<text class='phone'>{{addressInfo.phone}}</text>
|
||||
</view>
|
||||
<view><text class='default font-color' v-if="addressInfo.isDefault">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.detail}}</view>
|
||||
<view class="acea-row">
|
||||
<text class='default font-color'
|
||||
v-if="addressInfo.isDefault">[默认]</text>
|
||||
<text class="line2">{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.detail}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class='addressCon' v-else>
|
||||
<view class='setaddress'>设置收货地址</view>
|
||||
|
@ -24,7 +30,8 @@
|
|||
<view class='name'>{{system_store.name}}
|
||||
<text class='phone'>{{system_store.phone}}</text>
|
||||
</view>
|
||||
<view class="line1"> {{system_store.address}}{{", " + system_store.detailedAddress}}</view>
|
||||
<view class="line1"> {{system_store.address}}{{", " + system_store.detailedAddress}}
|
||||
</view>
|
||||
</view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</block>
|
||||
|
@ -36,129 +43,134 @@
|
|||
<image src='/static/images/line.jpg'></image>
|
||||
</view>
|
||||
</view>
|
||||
<orderGoods :cartInfo="cartInfo"></orderGoods>
|
||||
<view class='wrapper'>
|
||||
<view class='item acea-row row-between-wrapper' @tap='couponTap' v-if="!pinkId && !BargainId && !combinationId && !seckillId">
|
||||
<view>优惠券</view>
|
||||
<view class='discount'>{{couponTitle}}
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper' v-if="!pinkId && !BargainId && !combinationId && !seckillId">
|
||||
<view>积分抵扣</view>
|
||||
<view class='discount acea-row row-middle'>
|
||||
<view> {{useIntegral ? "剩余积分":"当前积分"}}
|
||||
<text class='num font-color'>{{integral || 0}}</text>
|
||||
</view>
|
||||
<checkbox-group @change="ChangeIntegral">
|
||||
<checkbox :checked='useIntegral ? true : false' />
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper' v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId">
|
||||
<view>会员优惠</view>
|
||||
<view class='discount'>-¥{{priceGroup.vipPrice}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper' v-if='shippingType==0'>
|
||||
<view>快递费用</view>
|
||||
<view class='discount' v-if='parseFloat(priceGroup.storePostage) > 0'>+¥{{priceGroup.storePostage}}</view>
|
||||
<view class='discount' v-else>免运费</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>联系人</view>
|
||||
<view class="discount textR">
|
||||
<input type="text" placeholder="请填写您的联系姓名" placeholder-class="placeholder" @blur='realName'></input>
|
||||
<view class="pad30">
|
||||
<orderGoods :cartInfo="cartInfo" :orderProNum="orderProNum"></orderGoods>
|
||||
<view class='wrapper borRadius14'>
|
||||
<view class='item acea-row row-between-wrapper' @tap='couponTap'
|
||||
v-if="!orderInfoVo.bargainId && !orderInfoVo.combinationId && !orderInfoVo.seckillId && productType==='normal'">
|
||||
<view>优惠券</view>
|
||||
<view class='discount'>{{couponTitle}}
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>联系电话</view>
|
||||
<view class="discount textR">
|
||||
<input type="text" placeholder="请填写您的联系电话" placeholder-class="placeholder" @blur='phone'></input>
|
||||
|
||||
<view class='item acea-row row-between-wrapper'
|
||||
v-if="!orderInfoVo.bargainId && !orderInfoVo.combinationId && !orderInfoVo.seckillId && productType==='normal'">
|
||||
<view>积分抵扣</view>
|
||||
<!-- -->
|
||||
<view class='discount acea-row row-middle'>
|
||||
<view> {{useIntegral ? "剩余积分":"当前积分"}}
|
||||
<text class='num font-color'>{{useIntegral ? orderInfoVo.surplusIntegral : orderInfoVo.userIntegral || 0}}</text>
|
||||
</view>
|
||||
<checkbox-group @change="ChangeIntegral">
|
||||
<checkbox :checked='useIntegral ? true : false' :disabled="orderInfoVo.userIntegral==0 && !useIntegral"/>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class='item acea-row row-between-wrapper' wx:else>
|
||||
<!-- <view class='item acea-row row-between-wrapper'
|
||||
v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId">
|
||||
<view>会员优惠</view>
|
||||
<view class='discount'>-¥{{priceGroup.vipPrice}}</view>
|
||||
</view> -->
|
||||
<view class='item acea-row row-between-wrapper' v-if='shippingType==0'>
|
||||
<view>快递费用</view>
|
||||
<view class='discount' v-if='parseFloat(orderInfoVo.freightFee) > 0'>
|
||||
+¥{{orderInfoVo.freightFee}}
|
||||
</view>
|
||||
<view class='discount' v-else>免运费</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>联系人</view>
|
||||
<view class="discount textR">
|
||||
<input type="text" placeholder="请填写您的联系姓名" placeholder-style="color:#ccc;" placeholder-class="placeholder"
|
||||
@blur='realName'></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>联系电话</view>
|
||||
<view class="discount textR">
|
||||
<input type="text" placeholder="请填写您的联系电话" placeholder-style="color:#ccc;" placeholder-class="placeholder"
|
||||
@blur='phone'></input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class='item acea-row row-between-wrapper' wx:else>
|
||||
<view>自提门店</view>
|
||||
<view class='discount'>{{system_store.name}}</view>
|
||||
</view> -->
|
||||
<view class='item' v-if="textareaStatus">
|
||||
<view>备注信息</view>
|
||||
<textarea v-if="coupon.coupon===false" placeholder-class='placeholder' @input='bindHideKeyboard' value="" name="mark"
|
||||
placeholder='请添加备注(150字以内)'></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrapper'>
|
||||
<view class='item'>
|
||||
<view>支付方式</view>
|
||||
<view class='list'>
|
||||
<view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)' v-for="(item,index) in cartArr"
|
||||
:key='index' v-if="item.payStatus==1">
|
||||
<view class='name acea-row row-center-wrapper'>
|
||||
<view class='iconfont animated' :class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>{{item.name}}
|
||||
</view>
|
||||
<view class='tip'>{{item.title}}</view>
|
||||
</view>
|
||||
<!-- #ifdef MP || APP-PLUS -->
|
||||
<!-- <view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)' v-for="(item,index) in cartArr"
|
||||
:key='index' v-if="item.payStatus==1">
|
||||
<view class='name acea-row row-center-wrapper'>
|
||||
<view class='iconfont animated' :class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>{{item.name}}
|
||||
</view>
|
||||
<view class='tip'>{{item.title}}</view>
|
||||
</view> -->
|
||||
<!-- #endif -->
|
||||
<view class='item' v-if="textareaStatus">
|
||||
<view>备注信息</view>
|
||||
<textarea v-if="coupon.coupon===false" placeholder-class='placeholder' @input='bindHideKeyboard'
|
||||
value="" name="mark" placeholder='请添加备注(150字以内)'></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrapper borRadius14'>
|
||||
<view class='item'>
|
||||
<view>支付方式</view>
|
||||
<view class='list'>
|
||||
<view class='payItem acea-row row-middle' :class='active==index ?"on":""'
|
||||
@tap='payItem(index)' v-for="(item,index) in cartArr" :key='index'
|
||||
v-if="item.payStatus==1">
|
||||
<view class='name acea-row row-center-wrapper'>
|
||||
<view class='iconfont animated'
|
||||
:class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'>
|
||||
</view>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class='tip'>{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='moneyList borRadius14'>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view>商品总价:</view>
|
||||
<view class='money'>¥{{orderInfoVo.proTotalFee || 0}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.couponFee > 0">
|
||||
<view>优惠券抵扣:</view>
|
||||
<view class='money'>-¥{{orderInfoVo.couponFee}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.deductionPrice > 0">
|
||||
<view>积分抵扣:</view>
|
||||
<view class='money'>-¥{{orderInfoVo.deductionPrice}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.freightFee > 0">
|
||||
<view>运费:</view>
|
||||
<view class='money'>+¥{{orderInfoVo.freightFee}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
</view>
|
||||
<view class='moneyList'>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view>商品总价:</view>
|
||||
<view class='money'>¥{{priceGroup.totalPrice}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
|
||||
<view>优惠券抵扣:</view>
|
||||
<view class='money'>-¥{{coupon_price}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper' v-if="integral_price > 0">
|
||||
<view>积分抵扣:</view>
|
||||
<view class='money'>-¥{{integral_price}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
|
||||
<view>运费:</view>
|
||||
<view class='money'>+¥{{priceGroup.storePostage}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
<view class='footer acea-row row-between-wrapper'>
|
||||
<view>合计:
|
||||
<text class='font-color'>¥{{totalPrice || 0}}</text>
|
||||
<text class='font-color'>¥{{orderInfoVo.payFee || 0}}</text>
|
||||
</view>
|
||||
<view class='settlement' style='z-index:100' @tap="SubOrder">立即结算</view>
|
||||
</view>
|
||||
</view>
|
||||
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' :cartId='cartId'
|
||||
@ChangCoupons="ChangCoupons"></couponListWindow>
|
||||
<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address' :pagesUrl="pagesUrl"
|
||||
@OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
|
||||
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' @ChangCoupons="ChangCoupons" :orderShow="orderShow"></couponListWindow>
|
||||
<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address'
|
||||
:pagesUrl="pagesUrl" @OnDefaultAddress="OnDefaultAddress" @OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
orderConfirm,
|
||||
//orderConfirm,
|
||||
getCouponsOrderPrice,
|
||||
orderCreate,
|
||||
postOrderComputed,
|
||||
orderPay,
|
||||
wechatOrderPay,
|
||||
wechatQueryPayResult
|
||||
wechatQueryPayResult,
|
||||
loadPreOrderApi
|
||||
} from '@/api/order.js';
|
||||
import {
|
||||
getAddressDefault,
|
||||
getAddressList,
|
||||
getAddressDetail
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
|
@ -196,6 +208,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
orderShow: 'orderShow', //下单页面使用优惠券组件不展示tab切换页
|
||||
textareaStatus: true,
|
||||
//支付方式
|
||||
cartArr: [{
|
||||
|
@ -211,14 +224,14 @@
|
|||
value: 'yue',
|
||||
title: '可用余额:',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
"name": "线下支付", //offlinePayStatu:1开启线下支付;2关闭;offlinePostage:true有邮费
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
}
|
||||
// {
|
||||
// "name": "线下支付", //offlinePayStatu:1开启线下支付;2关闭;offlinePostage:true有邮费
|
||||
// "icon": "icon-yinhangqia",
|
||||
// value: 'offline',
|
||||
// title: '线下支付',
|
||||
// payStatus: 1,
|
||||
// },
|
||||
],
|
||||
payType: 'weixin', //支付方式
|
||||
openType: 1, //优惠券打开方式 1=使用
|
||||
|
@ -229,16 +242,13 @@
|
|||
statusTile: '立即使用'
|
||||
}, //优惠券组件
|
||||
address: {
|
||||
address: false
|
||||
address: false,
|
||||
addressId: 0
|
||||
}, //地址组件
|
||||
addressInfo: {}, //地址信息
|
||||
pinkId: 0, //拼团id
|
||||
addressId: 0, //地址id
|
||||
couponId: 0, //优惠券id
|
||||
cartId: '', //购物车id
|
||||
BargainId: 0,
|
||||
combinationId: 0,
|
||||
seckillId: 0,
|
||||
userInfo: {}, //用户信息
|
||||
mark: '', //备注信息
|
||||
couponTitle: '请选择', //优惠券
|
||||
|
@ -277,57 +287,45 @@
|
|||
bargain: false, //是否是砍价
|
||||
combination: false, //是否是拼团
|
||||
secKill: false, //是否是秒杀
|
||||
orderInfoVo: {},
|
||||
addressList: [], //地址列表数据
|
||||
orderProNum: 0,
|
||||
preOrderNo: '' //预下单订单号
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
watch:{
|
||||
isLogin:{
|
||||
handler:function(newV,oldV){
|
||||
if(newV){
|
||||
this.getaddressInfo();
|
||||
this.getConfirm();
|
||||
computed: mapGetters(['isLogin', 'systemPlatform', 'productType']),
|
||||
watch: {
|
||||
isLogin: {
|
||||
handler: function(newV, oldV) {
|
||||
if (newV) {
|
||||
this.getloadPreOrder();
|
||||
//this.getaddressInfo();
|
||||
}
|
||||
},
|
||||
deep:true
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
onLoad: function(options) {
|
||||
onLoad(options) {
|
||||
// #ifdef H5
|
||||
this.payChannel = this.$wechat.isWeixin() ? 'public' : 'weixinh5'
|
||||
this.payChannel = this.$wechat.isWeixin() ? 'public' : 'weixinh5';
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.payChannel = 'routine'
|
||||
this.payChannel = 'routine';
|
||||
// #endif
|
||||
if (!options.cartId) return this.$util.Tips({
|
||||
title: '请选择要购买的商品'
|
||||
}, {
|
||||
tab: 3,
|
||||
url: 1
|
||||
});
|
||||
this.couponId = options.couponId || 0;
|
||||
this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
|
||||
// if (!options.cartId) return this.$util.Tips({
|
||||
// title: '请选择要购买的商品'
|
||||
// }, {
|
||||
// tab: 3,
|
||||
// url: 1
|
||||
// });
|
||||
this.preOrderNo = options.preOrderNo || 0;
|
||||
this.addressId = options.addressId || 0;
|
||||
this.cartId = options.cartId;
|
||||
this.is_address = options.is_address ? true : false;
|
||||
this.news = options.new || true;
|
||||
this.again = options.again || false;
|
||||
this.addAgain = options.addAgain || false;
|
||||
this.secKill = options.secKill || false;
|
||||
this.combination = options.combination || false;
|
||||
this.bargain = options.bargain || false;
|
||||
if (this.isLogin) {
|
||||
this.getaddressInfo();
|
||||
this.getConfirm();
|
||||
//调用子页面方法授权后执行获取地址列表
|
||||
this.$nextTick(function() {})
|
||||
//this.getaddressInfo();
|
||||
this.getloadPreOrder();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
@ -335,12 +333,11 @@
|
|||
*/
|
||||
onShow: function() {
|
||||
let _this = this
|
||||
// wx.getLaunchOptionsSync
|
||||
this.textareaStatus = true;
|
||||
if (this.isLogin && this.toPay == false) {
|
||||
this.getaddressInfo();
|
||||
this.$nextTick(function() {
|
||||
this.$refs.addressWindow.getAddressList();
|
||||
})
|
||||
//this.getaddressInfo();
|
||||
|
||||
}
|
||||
|
||||
uni.$on("handClick", res => {
|
||||
|
@ -366,13 +363,34 @@
|
|||
// this.isClose = true
|
||||
// },
|
||||
methods: {
|
||||
// 订单详情
|
||||
getloadPreOrder: function() {
|
||||
loadPreOrderApi(this.preOrderNo).then(res => {
|
||||
let orderInfoVo = res.data.orderInfoVo
|
||||
this.orderInfoVo = orderInfoVo;
|
||||
this.cartInfo = orderInfoVo.orderDetailList;
|
||||
this.orderProNum = orderInfoVo.orderProNum;
|
||||
this.address.addressId = this.addressId ? this.addressId :orderInfoVo.addressId;
|
||||
this.cartArr[1].title = '可用余额:' + orderInfoVo.userBalance;
|
||||
this.cartArr[1].payStatus = parseInt(res.data.yuePayStatus) === 1 ? 1 : 2;
|
||||
this.cartArr[0].payStatus = parseInt(res.data.payWeixinOpen) === 1 ? 1 : 0;
|
||||
this.store_self_mention = res.data.storeSelfMention == 'true'&& this.productType === 'normal' ? true : false;
|
||||
//调用子页面方法授权后执行获取地址列表
|
||||
this.$nextTick(function() {
|
||||
this.$refs.addressWindow.getAddressList();
|
||||
})
|
||||
}).catch(err => {
|
||||
return this.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 授权回调事件
|
||||
*
|
||||
*/
|
||||
onLoadFun: function() {
|
||||
this.getaddressInfo();
|
||||
this.getConfirm();
|
||||
//this.getaddressInfo();
|
||||
//调用子页面方法授权后执行获取地址列表
|
||||
// this.$scope.selectComponent('#address-window').getAddressList();
|
||||
},
|
||||
|
@ -414,23 +432,28 @@
|
|||
})
|
||||
}
|
||||
},
|
||||
// 计算订单价格
|
||||
computedPrice: function() {
|
||||
let shippingType = this.shippingType;
|
||||
postOrderComputed(this.orderKey, {
|
||||
addressId: this.addressId,
|
||||
useIntegral: this.useIntegral ? 1 : 0,
|
||||
postOrderComputed({
|
||||
addressId: this.address.addressId,
|
||||
useIntegral: this.useIntegral ? true : false,
|
||||
couponId: this.couponId,
|
||||
shippingType: parseInt(shippingType) + 1,
|
||||
payType: this.payType
|
||||
preOrderNo: this.preOrderNo
|
||||
}).then(res => {
|
||||
let result = res.data.result.result;
|
||||
if (result) {
|
||||
this.totalPrice = result.orderId.payPrice;
|
||||
this.integral_price = result.orderId.deductionPrice;
|
||||
this.coupon_price = result.orderId.couponPrice;
|
||||
this.integral = this.useIntegral ? result.orderId.surplusIntegral : this.userInfo.integral;
|
||||
this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.orderId.payPostage);
|
||||
}
|
||||
let data = res.data;
|
||||
this.orderInfoVo.couponFee = data.couponFee;
|
||||
//赋值操作,userIntegral 当前积分,surplusIntegral 剩余积分
|
||||
this.orderInfoVo.userIntegral = data.surplusIntegral;
|
||||
this.orderInfoVo.deductionPrice = data.deductionPrice;
|
||||
this.orderInfoVo.freightFee = data.freightFee;
|
||||
this.orderInfoVo.payFee = data.payFee;
|
||||
this.orderInfoVo.proTotalFee = data.proTotalFee;
|
||||
this.orderInfoVo.useIntegral = data.useIntegral;
|
||||
this.orderInfoVo.usedIntegral = data.usedIntegral;
|
||||
this.orderInfoVo.surplusIntegral = data.surplusIntegral;
|
||||
//this.orderInfoVo.userIntegral = data.userIntegral;
|
||||
}).catch(err => {
|
||||
return this.$util.Tips({
|
||||
title: err
|
||||
|
@ -501,92 +524,37 @@
|
|||
this.useIntegral = !this.useIntegral;
|
||||
this.computedPrice();
|
||||
},
|
||||
/**
|
||||
* 首次进页面展示默认地址
|
||||
*/
|
||||
OnDefaultAddress: function(e) {
|
||||
this.addressInfo = e;
|
||||
this.address.addressId = e.id;
|
||||
},
|
||||
/**
|
||||
* 选择地址后改变事件
|
||||
* @param object e
|
||||
*/
|
||||
OnChangeAddress: function(e) {
|
||||
this.addressInfo = e;
|
||||
this.address.addressId = e.id;
|
||||
this.textareaStatus = true;
|
||||
this.addressId = e;
|
||||
//this.orderInfoVo.addressId = e;
|
||||
this.address.address = false;
|
||||
this.getaddressInfo();
|
||||
//this.getaddressInfo();
|
||||
this.computedPrice();
|
||||
},
|
||||
bindHideKeyboard: function(e) {
|
||||
this.mark = e.detail.value;
|
||||
},
|
||||
/**
|
||||
* 获取当前订单详细信息
|
||||
*
|
||||
*/
|
||||
getConfirm: function() {
|
||||
let that = this;
|
||||
orderConfirm(that.cartId, that.news, this.addAgain, this.secKill, this.combination, this.bargain).then(res => {
|
||||
that.$set(that, 'userInfo', res.data.userInfo);
|
||||
that.$set(that, 'integral', res.data.userInfo.integral);
|
||||
that.$set(that, 'cartInfo', res.data.cartInfo);
|
||||
that.$set(that, 'integralRatio', res.data.integralRatio);
|
||||
that.$set(that, 'offlinePostage', res.data.offlinePostage);
|
||||
that.$set(that, 'orderKey', res.data.orderKey);
|
||||
|
||||
that.$set(that, 'priceGroup', res.data.priceGroup);
|
||||
that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup.totalPrice), parseFloat(res.data
|
||||
.priceGroup.storePostage)));
|
||||
that.$set(that, 'seckillId', parseInt(res.data.secKillId));
|
||||
that.$set(that, 'store_self_mention', res.data.storeSelfMention == 'true' ? true : false);
|
||||
that.cartArr[1].title = '可用余额:' + res.data.userInfo.nowMoney;
|
||||
that.cartArr[0].payStatus = res.data.payWeixinOpen || 0
|
||||
that.cartArr[1].payStatus = res.data.yuePayStatus || 0
|
||||
if (res.data.offlinePayStatus == 1) {
|
||||
that.cartArr[2].payStatus = 1
|
||||
} else {
|
||||
that.cartArr[2].payStatus = 0
|
||||
}
|
||||
|
||||
// that.$set(that, 'cartArr', that.cartArr);
|
||||
that.$set(that, 'ChangePrice', that.totalPrice);
|
||||
that.getBargainId();
|
||||
if (!that.secKill) that.getCouponList();
|
||||
}).catch(err => {
|
||||
return this.$util.Tips({
|
||||
title: err
|
||||
}, {
|
||||
tab: 3,
|
||||
url: 1
|
||||
});
|
||||
});
|
||||
},
|
||||
/*
|
||||
* 提取砍价和拼团id
|
||||
*/
|
||||
getBargainId: function() {
|
||||
let that = this;
|
||||
let cartINfo = that.cartInfo;
|
||||
let BargainId = 0;
|
||||
let combinationId = 0;
|
||||
cartINfo.forEach(function(value, index, cartINfo) {
|
||||
BargainId = cartINfo[index].bargainId || 0,
|
||||
combinationId = cartINfo[index].combinationId || 0
|
||||
})
|
||||
that.$set(that, 'BargainId', parseInt(BargainId));
|
||||
that.$set(that, 'combinationId', parseInt(combinationId));
|
||||
if (that.cartArr.length == 3 && (BargainId || combinationId || that.seckillId)) {
|
||||
that.cartArr[2].payStatus = 0;
|
||||
that.$set(that, 'cartArr', that.cartArr);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取当前金额可用优惠券
|
||||
*
|
||||
*/
|
||||
getCouponList: function() {
|
||||
let that = this;
|
||||
let data = {
|
||||
cartId: this.cartId
|
||||
}
|
||||
getCouponsOrderPrice(data).then(res => {
|
||||
that.$set(that.coupon, 'list', res.data);
|
||||
that.openType = 1;
|
||||
getCouponsOrderPrice(this.preOrderNo).then(res => {
|
||||
this.$set(this.coupon, 'list', res.data);
|
||||
this.openType = 1;
|
||||
});
|
||||
},
|
||||
/*
|
||||
|
@ -627,6 +595,7 @@
|
|||
},
|
||||
couponTap: function() {
|
||||
this.coupon.coupon = true;
|
||||
if(!this.coupon.list.length)this.getCouponList();
|
||||
},
|
||||
car: function() {
|
||||
let that = this;
|
||||
|
@ -636,9 +605,7 @@
|
|||
let that = this;
|
||||
that.textareaStatus = false;
|
||||
that.address.address = true;
|
||||
that.pagesUrl = '/pages/users/user_address_list/index?cartId=' + this.cartId + '&pinkId=' + this.pinkId +
|
||||
'&couponId=' + this.couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' +
|
||||
this.bargain;
|
||||
that.pagesUrl = '/pages/users/user_address_list/index?preOrderNo='+ this.preOrderNo;
|
||||
},
|
||||
realName: function(e) {
|
||||
this.contacts = e.detail.value;
|
||||
|
@ -648,12 +615,8 @@
|
|||
},
|
||||
payment: function(data) {
|
||||
let that = this;
|
||||
orderCreate(that.orderKey, data).then(res => {
|
||||
orderCreate(data).then(res => {
|
||||
that.getOrderPay(res.data.orderNo, '支付成功');
|
||||
// if(that.totalPrice===0)return that.$util.Tips({
|
||||
// title: '支付成功',
|
||||
// icon: 'success'
|
||||
// });
|
||||
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
|
@ -667,13 +630,9 @@
|
|||
let goPages = '/pages/order_pay_status/index?order_id=' + orderNo + '&msg=' + message;
|
||||
wechatOrderPay({
|
||||
orderNo: orderNo,
|
||||
// #ifdef MP
|
||||
payChannel: 'routine',
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS
|
||||
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
|
||||
// #endif
|
||||
payType: that.payType
|
||||
payChannel: that.payChannel,
|
||||
payType: that.payType,
|
||||
scene: that.productType==='normal'? 0 :1177 //下单时小程序的场景值
|
||||
}).then(res => {
|
||||
let jsConfig = res.data.jsConfig;
|
||||
switch (res.data.payType) {
|
||||
|
@ -685,23 +644,34 @@
|
|||
package: jsConfig.packages,
|
||||
signType: jsConfig.signType,
|
||||
paySign: jsConfig.paySign,
|
||||
ticket: that.productType==='normal'? null : jsConfig.ticket,
|
||||
success: function(ress) {
|
||||
uni.hideLoading();
|
||||
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
|
||||
wechatQueryPayResult(orderNo).then(res => {
|
||||
uni.hideLoading();
|
||||
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that
|
||||
.orderInfoVo.seckillId)
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 4,
|
||||
url: goPages
|
||||
});
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 4,
|
||||
tab: 5,
|
||||
url: goPages
|
||||
});
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages
|
||||
});
|
||||
}).cache(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
|
||||
},
|
||||
fail: function(e) {
|
||||
uni.hideLoading();
|
||||
|
@ -715,12 +685,13 @@
|
|||
complete: function(e) {
|
||||
uni.hideLoading();
|
||||
//关闭当前页面跳转至订单状态
|
||||
if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '&status=2'
|
||||
});
|
||||
if (e.errMsg == 'requestPayment:cancel') return that.$util
|
||||
.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '&status=2'
|
||||
});
|
||||
},
|
||||
})
|
||||
// #endif
|
||||
|
@ -734,6 +705,7 @@
|
|||
};
|
||||
that.$wechat.pay(data).then(res => {
|
||||
if (res.errMsg == 'chooseWXPay:cancel') {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
|
@ -741,9 +713,8 @@
|
|||
url: goPages + '&status=2'
|
||||
});
|
||||
} else {
|
||||
wechatQueryPayResult({
|
||||
orderNo: orderNo
|
||||
}).then(res => {
|
||||
wechatQueryPayResult(orderNo).then(res => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
|
@ -752,12 +723,14 @@
|
|||
url: goPages
|
||||
});
|
||||
}).cache(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
}
|
||||
}).cache(res => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
|
@ -785,7 +758,8 @@
|
|||
url: goPages + '&status=0'
|
||||
});
|
||||
setTimeout(() => {
|
||||
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host +
|
||||
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location
|
||||
.protocol + '//' + window.location.host +
|
||||
goPages + '&status=1';
|
||||
}, 100)
|
||||
break;
|
||||
|
@ -814,7 +788,7 @@
|
|||
break;
|
||||
case 'SUCCESS':
|
||||
uni.hideLoading();
|
||||
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
|
||||
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that.orderInfoVo.seckillId)
|
||||
return that.$util.Tips({
|
||||
title: message,
|
||||
icon: 'success'
|
||||
|
@ -833,16 +807,16 @@
|
|||
case 'WECHAT_PAY':
|
||||
// #ifdef MP
|
||||
that.toPay = true;
|
||||
let packages = 'prepay_id=' + jsConfig.prepayId;
|
||||
let packagess = 'prepay_id=' + jsConfig.prepayId;
|
||||
uni.requestPayment({
|
||||
timeStamp: jsConfig.timeStamp.toString(),
|
||||
nonceStr: jsConfig.nonceStr,
|
||||
package: packages,
|
||||
package: packagess,
|
||||
signType: jsConfig.signType,
|
||||
paySign: jsConfig.paySign,
|
||||
success: function(res) {
|
||||
uni.hideLoading();
|
||||
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
|
||||
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that.orderInfoVo.seckillId)
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
|
@ -941,7 +915,7 @@
|
|||
if (!that.payType) return that.$util.Tips({
|
||||
title: '请选择支付方式'
|
||||
});
|
||||
if (!that.addressId && !that.shippingType) return that.$util.Tips({
|
||||
if (!that.address.addressId && !that.shippingType) return that.$util.Tips({
|
||||
title: '请选择收货地址'
|
||||
});
|
||||
if (that.shippingType == 1) {
|
||||
|
@ -967,26 +941,22 @@
|
|||
data = {
|
||||
realName: that.contacts,
|
||||
phone: that.contactsTel,
|
||||
addressId: that.addressId,
|
||||
formId: '',
|
||||
addressId: that.address.addressId,
|
||||
couponId: that.couponId,
|
||||
payType: that.payType,
|
||||
useIntegral: that.useIntegral,
|
||||
bargainId: that.BargainId,
|
||||
combinationId: that.combinationId,
|
||||
pinkId: that.pinkId,
|
||||
seckillId: that.seckillId,
|
||||
preOrderNo: that.preOrderNo,
|
||||
mark: that.mark,
|
||||
storeId: that.system_store.id || 0,
|
||||
shippingType: that.$util.$h.Add(that.shippingType, 1),
|
||||
isNew: that.news,
|
||||
payChannel: that.payChannel
|
||||
|
||||
};
|
||||
if (data.payType == 'yue' && parseFloat(that.userInfo.nowMoney) < parseFloat(that.totalPrice)) return that.$util
|
||||
.Tips({
|
||||
title: '余额不足!'
|
||||
});
|
||||
if (data.payType == 'yue' && parseFloat(that.userInfo.nowMoney) < parseFloat(that.totalPrice))
|
||||
return that.$util
|
||||
.Tips({
|
||||
title: '余额不足!'
|
||||
});
|
||||
uni.showLoading({
|
||||
title: '订单支付中'
|
||||
});
|
||||
|
@ -998,13 +968,15 @@
|
|||
// #ifndef MP
|
||||
that.payment(data);
|
||||
// #endif
|
||||
// that.payment(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.line2{
|
||||
width: 504rpx;
|
||||
}
|
||||
.textR {
|
||||
text-align: right;
|
||||
}
|
||||
|
@ -1021,13 +993,13 @@
|
|||
}
|
||||
|
||||
.order-submission .address {
|
||||
padding: 28rpx 30rpx;
|
||||
padding: 28rpx;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.order-submission .address .addressCon {
|
||||
width: 610rpx;
|
||||
width: 596rpx;
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
@ -1063,21 +1035,21 @@
|
|||
// background-image: linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
|
||||
// background-image: -webkit-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
|
||||
// background-image: -moz-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
|
||||
padding-top: 100rpx;
|
||||
padding: 100rpx 30rpx 0 30rpx;
|
||||
}
|
||||
|
||||
.order-submission .allAddress .nav {
|
||||
width: 710rpx;
|
||||
width: 690rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.order-submission .allAddress .nav .item {
|
||||
width: 355rpx;
|
||||
width: 334rpx;
|
||||
}
|
||||
|
||||
.order-submission .allAddress .nav .item.on {
|
||||
position: relative;
|
||||
width: 250rpx;
|
||||
width: 230rpx;
|
||||
}
|
||||
|
||||
.order-submission .allAddress .nav .item.on::before {
|
||||
|
@ -1092,7 +1064,7 @@
|
|||
border-style: none solid solid;
|
||||
border-color: transparent transparent #fff;
|
||||
z-index: 2;
|
||||
border-radius: 7rpx 30rpx 0 0;
|
||||
border-radius: 14rpx 36rpx 0 0;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
@ -1100,7 +1072,7 @@
|
|||
.order-submission .allAddress .nav .item:nth-of-type(2).on::before {
|
||||
content: "到店自提";
|
||||
border-width: 0 0 80rpx 20rpx;
|
||||
border-radius: 30rpx 7rpx 0 0;
|
||||
border-radius: 36rpx 14rpx 0 0;
|
||||
}
|
||||
|
||||
.order-submission .allAddress .nav .item.on2 {
|
||||
|
@ -1114,11 +1086,11 @@
|
|||
font-size: 28rpx;
|
||||
display: block;
|
||||
height: 0;
|
||||
width: 400rpx;
|
||||
width: 401rpx;
|
||||
border-width: 0 0 60rpx 60rpx;
|
||||
border-style: none solid solid;
|
||||
border-color: transparent transparent #f7c1bd;
|
||||
border-radius: 40rpx 6rpx 0 0;
|
||||
border-radius: 36rpx 14rpx 0 0;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
@ -1126,17 +1098,17 @@
|
|||
.order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
|
||||
content: "快递配送";
|
||||
border-width: 0 60rpx 60rpx 0;
|
||||
border-radius: 6rpx 40rpx 0 0;
|
||||
border-radius: 14rpx 36rpx 0 0;
|
||||
}
|
||||
|
||||
.order-submission .allAddress .address {
|
||||
width: 710rpx;
|
||||
height: 150rpx;
|
||||
width: 690rpx;
|
||||
max-height: 180rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.order-submission .allAddress .line {
|
||||
width: 710rpx;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
@ -1146,19 +1118,19 @@
|
|||
|
||||
.order-submission .wrapper {
|
||||
background-color: #fff;
|
||||
margin-top: 13rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
.order-submission .wrapper .item {
|
||||
padding: 27rpx 30rpx;
|
||||
padding: 27rpx 24rpx;
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
color: #333333;
|
||||
border-bottom: 1px solid #F5F5F5;
|
||||
}
|
||||
|
||||
.order-submission .wrapper .item .discount {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.order-submission .wrapper .item .discount .iconfont {
|
||||
|
@ -1191,12 +1163,13 @@
|
|||
|
||||
.order-submission .wrapper .item textarea {
|
||||
background-color: #f9f9f9;
|
||||
width: 690rpx;
|
||||
width: auto !important;
|
||||
height: 140rpx;
|
||||
border-radius: 3rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 30rpx;
|
||||
padding: 25rpx 28rpx;
|
||||
padding: 15rpx;
|
||||
box-sizing: border-box;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.order-submission .wrapper .item .placeholder {
|
||||
|
@ -1209,7 +1182,7 @@
|
|||
|
||||
.order-submission .wrapper .item .list .payItem {
|
||||
border: 1px solid #eee;
|
||||
border-radius: 6rpx;
|
||||
border-radius: 14rpx;
|
||||
height: 86rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
@ -1220,7 +1193,7 @@
|
|||
|
||||
.order-submission .wrapper .item .list .payItem.on {
|
||||
border-color: #fc5445;
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.order-submission .wrapper .item .list .payItem .name {
|
||||
|
@ -1253,7 +1226,7 @@
|
|||
}
|
||||
|
||||
.order-submission .moneyList {
|
||||
margin-top: 12rpx;
|
||||
margin-top: 15rpx;
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
@ -1268,7 +1241,7 @@
|
|||
}
|
||||
|
||||
.order-submission .moneyList .item .money {
|
||||
color: #868686;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.order-submission .footer {
|
||||
|
@ -1289,7 +1262,7 @@
|
|||
color: #fff;
|
||||
width: 240rpx;
|
||||
height: 70rpx;
|
||||
background-color: #e93323;
|
||||
background-color: $theme-color;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 70rpx;
|
||||
|
|
|
@ -36,48 +36,56 @@
|
|||
</view>
|
||||
<view class='list'>
|
||||
<view class='item' v-for="(item,index) in orderList" :key="index">
|
||||
<view @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>
|
||||
<view @click='goOrderDetails(item.orderId)'>
|
||||
<view class='title acea-row row-between-wrapper'>
|
||||
<view class="acea-row row-middle">
|
||||
<text class="sign cart-color acea-row row-center-wrapper" v-if="item.storeOrder.bargainId != 0">砍价</text>
|
||||
<text class="sign cart-color acea-row row-center-wrapper" v-if="item.activityType !== '普通' && item.activityType !== '核销'">{{item.activityType}}</text>
|
||||
<!-- <text class="sign cart-color acea-row row-center-wrapper" v-if="item.bargainId != 0">砍价</text>
|
||||
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.combinationId != 0">拼团</text>
|
||||
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.seckillId != 0">秒杀</text>
|
||||
<view>{{item.storeOrder.createTime}}</view>
|
||||
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.seckillId != 0">秒杀</text> -->
|
||||
<view>{{item.createTime}}</view>
|
||||
</view>
|
||||
<view v-if="item.status?item.status.type == 0:0" class='font-color'>待付款</view>
|
||||
<view class='font-color'>{{item.orderStatus}}</view>
|
||||
<!-- <view v-if="item.status?item.status.type == 0:0" class='font-color'>待付款</view>
|
||||
<view v-else-if="item.status?item.status.type == 1:0 && item.storeOrder.shippingType==1" class='font-color'>待发货</view>
|
||||
<view v-else-if="item.status?item.status.type == 2:0 && item.storeOrder.shippingType==1" class='font-color'>待收货</view>
|
||||
<view v-else-if="item.status?item.status.type == 3:0 && item.storeOrder.shippingType==1" class='font-color'>待评价</view>
|
||||
<view v-else-if="item.status?item.status.type == 4:0 && item.storeOrder.shippingType==1" class='font-color'>已完成</view>
|
||||
<view v-else-if="item.storeOrder.shippingType==2" class='font-color'>待核销</view>
|
||||
<view v-else-if="item.storeOrder.shippingType==2" class='font-color'>待核销</view> -->
|
||||
</view>
|
||||
<view class='item-info acea-row row-between row-top' v-for="(item,index) in item.cartInfo" :key="index">
|
||||
<view class='item-info acea-row row-between row-top' v-for="(items,index) in item.orderInfoList" :key="index">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.info.productInfo.image'></image>
|
||||
<image :src='items.image'></image>
|
||||
</view>
|
||||
<view class='text acea-row row-between'>
|
||||
<view class='name line2'>{{item.info.productInfo.storeName}}</view>
|
||||
<view class='name line2'>{{items.storeName}}</view>
|
||||
<view class='money'>
|
||||
<view v-if="item.info.productInfo.attrInfo">¥{{item.info.productInfo.attrInfo.price}}</view>
|
||||
<view v-else>¥{{item.info.productInfo.price}}</view>
|
||||
<view>x{{item.info.cartNum}}</view>
|
||||
<view>¥{{items.price}}</view>
|
||||
<view>x{{items.cartNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='totalPrice'>共{{(item.cartInfo?item.cartInfo.length:0) || 0}}件商品,总金额
|
||||
<text class='money font-color'>¥{{item.storeOrder.payPrice}}</text>
|
||||
<view class='totalPrice'>共{{item.totalNum}}件商品,总金额
|
||||
<text class='money font-color'>¥{{item.payPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class='bottom acea-row row-right row-middle'>
|
||||
<view class='bnt cancelBnt' v-if="item.status?item.status.type==0:0 || item.status?item.status.type == 9:0" @click='cancelOrder(index,item.storeOrder.id)'>取消订单</view>
|
||||
<view class='bnt bg-color' v-if="item.status?item.status.type == 0:0" @click='goPay(item.storeOrder.payPrice,item.storeOrder.orderId)'>立即付款</view>
|
||||
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 1:0 || item.status?item.status.type == 9:0" @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>查看详情</view>
|
||||
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 2:0 && item.status.deliveryType" @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>查看详情</view>
|
||||
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 3:0" @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>去评价</view>
|
||||
<view class='bnt bg-color' v-else-if="item.storeOrder.seckillId < 1 && item.storeOrder.bargainId < 1 && item.storeOrder.combinationId < 1 && item.status?item.status.type == 4:0"
|
||||
@click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>再次购买</view>
|
||||
<view class='bnt cancelBnt' v-if="item.status?item.status.type == 4:0" @click='delOrder(item.storeOrder.id,index)'>删除订单</view>
|
||||
<view class='bnt cancelBnt' v-if="!item.paid" @click='cancelOrder(index,item.id)'>取消订单</view>
|
||||
<view class='bnt bg-color' v-if="!item.paid" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
|
||||
<view class='bnt bg-color' v-else-if="item.status== 0 || item.status== 1 || item.status== 3" @click='goOrderDetails(item.orderId)'>查看详情</view>
|
||||
<view class='bnt bg-color' v-else-if="item.status==2" @click='goOrderDetails(item.orderId)'>去评价</view>
|
||||
<view class='bnt cancelBnt' v-if="item.status == 3" @click='delOrder(item.id,index)'>删除订单</view>
|
||||
</view>
|
||||
<!-- <view class='bottom acea-row row-right row-middle'>
|
||||
<view class='bnt cancelBnt' v-if="item.status?item.status.type==0:0 || item.status?item.status.type == 9:0" @click='cancelOrder(index,item.id)'>取消订单</view>
|
||||
<view class='bnt bg-color' v-if="item.status?item.status.type == 0:0" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
|
||||
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 1:0 || item.status?item.status.type == 9:0" @click='goOrderDetails(item.orderId)'>查看详情</view>
|
||||
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 2:0 && item.status.deliveryType" @click='goOrderDetails(item.orderId)'>查看详情</view>
|
||||
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 3:0" @click='goOrderDetails(item.orderId)'>去评价</view>
|
||||
<view class='bnt bg-color' v-else-if="item.storeOrder.seckillId < 1 && item.storeOrder.bargainId < 1 && item.storeOrder.combinationId < 1 && item.status?item.status.type == 4:0"
|
||||
@click='goOrderDetails(item.orderId)'>再次购买</view>
|
||||
<view class='bnt cancelBnt' v-if="item.status?item.status.type == 4:0" @click='delOrder(item.id,index)'>删除订单</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class='loadingicon acea-row row-center-wrapper' v-if="orderList.length>0">
|
||||
|
@ -93,7 +101,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
|
||||
|
@ -105,12 +113,8 @@
|
|||
getOrderList,
|
||||
orderData,
|
||||
orderCancel,
|
||||
orderDel,
|
||||
orderPay
|
||||
orderDel
|
||||
} from '@/api/order.js';
|
||||
import {
|
||||
getUserInfo
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
openOrderSubscribe
|
||||
} from '@/utils/SubscribeMessage.js';
|
||||
|
@ -166,27 +170,24 @@
|
|||
isShowAuth: false //是否隐藏授权
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
computed: mapGetters(['isLogin', 'userInfo']),
|
||||
onShow() {
|
||||
if (this.isLogin) {
|
||||
this.loadend = false;
|
||||
this.page = 1;
|
||||
this.$set(this, 'orderList', []);
|
||||
this.getOrderData();
|
||||
this.getOrderList();
|
||||
this.getUserInfo();
|
||||
this.payMode[1].number = this.userInfo.nowMoney;
|
||||
this.$set(this, 'payMode', this.payMode);
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onLoadFun() {
|
||||
this.getOrderData();
|
||||
this.getOrderList();
|
||||
this.getUserInfo();
|
||||
},
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
|
@ -202,17 +203,6 @@
|
|||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
*/
|
||||
getUserInfo: function() {
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.payMode[1].number = res.data.nowMoney;
|
||||
that.$set(that, 'payMode', that.payMode);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 关闭支付组件
|
||||
*
|
||||
|
@ -269,7 +259,7 @@
|
|||
* 打开支付组件
|
||||
*
|
||||
*/
|
||||
goPay: function(pay_price, order_id) {
|
||||
goPay(pay_price, order_id) {
|
||||
this.$set(this, 'pay_close', true);
|
||||
this.$set(this, 'pay_order_id', order_id);
|
||||
this.$set(this, 'totalPrice', pay_price);
|
||||
|
@ -282,8 +272,7 @@
|
|||
this.loadend = false;
|
||||
this.page = 1;
|
||||
this.$set(this, 'orderList', []);
|
||||
this.pay_close = false;
|
||||
this.pay_order_id = '';
|
||||
this.$set(this, 'pay_close', false);
|
||||
this.getOrderData();
|
||||
this.getOrderList();
|
||||
},
|
||||
|
@ -293,7 +282,6 @@
|
|||
*/
|
||||
pay_fail: function() {
|
||||
this.pay_close = false;
|
||||
this.pay_order_id = '';
|
||||
},
|
||||
/**
|
||||
* 去订单详情
|
||||
|
@ -346,7 +334,7 @@
|
|||
page: that.page,
|
||||
limit: that.limit,
|
||||
}).then(res => {
|
||||
let list = res.data || [];
|
||||
let list = res.data.list || [];
|
||||
let loadend = list.length < that.limit;
|
||||
that.orderList = that.$util.SplitArray(list, that.orderList);
|
||||
that.$set(that, 'orderList', that.orderList);
|
||||
|
@ -389,7 +377,7 @@
|
|||
|
||||
<style scoped lang="scss">
|
||||
.my-order .header {
|
||||
height: 260rpx;
|
||||
height: 250rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
@ -424,20 +412,24 @@
|
|||
background-color: #fff;
|
||||
width: 690rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 6rpx;
|
||||
margin: -73rpx auto 0 auto;
|
||||
border-radius: 14rpx;
|
||||
margin: -60rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.my-order .nav .item {
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
padding: 29rpx 0;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.my-order .nav .item.on {
|
||||
// font-weight: bold;
|
||||
// border-bottom: 5rpx solid #e93323;
|
||||
/* #ifdef H5 || MP */
|
||||
font-weight: bold;
|
||||
border-bottom: 5rpx solid #e93323;
|
||||
/* #endif */
|
||||
border-bottom: 5rpx solid $theme-color;
|
||||
}
|
||||
|
||||
.my-order .nav .item .num {
|
||||
|
@ -451,13 +443,13 @@
|
|||
|
||||
.my-order .list .item {
|
||||
background-color: #fff;
|
||||
border-radius: 6rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.my-order .list .item .title {
|
||||
height: 84rpx;
|
||||
padding: 0 30rpx;
|
||||
padding: 0 24rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
|
@ -465,13 +457,14 @@
|
|||
|
||||
.my-order .list .item .title .sign {
|
||||
font-size: 24rpx;
|
||||
padding: 0 7rpx;
|
||||
padding: 0 13rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 15rpx;
|
||||
border-radius: 18rpx;
|
||||
}
|
||||
|
||||
.my-order .list .item .item-info {
|
||||
padding: 0 30rpx;
|
||||
padding: 0 24rpx;
|
||||
margin-top: 22rpx;
|
||||
}
|
||||
|
||||
|
@ -483,18 +476,17 @@
|
|||
.my-order .list .item .item-info .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.my-order .list .item .item-info .text {
|
||||
width: 486rpx;
|
||||
width: 500rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.my-order .list .item .item-info .text .name {
|
||||
width: 306rpx;
|
||||
width: 350rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<jyf-parser :html="content" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import parser from "@/components/jyf-parser/jyf-parser";
|
||||
import {
|
||||
getUserAgreement,
|
||||
} from '@/api/user.js';
|
||||
export default {
|
||||
components: {
|
||||
"jyf-parser": parser
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tagStyle: {
|
||||
img: 'width:100%;display:block;',
|
||||
table: 'width:100%',
|
||||
video: 'width:100%'
|
||||
},
|
||||
content: ``
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getUserAgreement().then(res => {
|
||||
this.content = res.data.content
|
||||
}).catch(err => {
|
||||
that.$util.Tips({
|
||||
title: err.msg
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.content {
|
||||
padding: 40rpx 30rpx;
|
||||
line-height: 2;
|
||||
}
|
||||
</style>
|
|
@ -2,74 +2,84 @@
|
|||
<view>
|
||||
<view class="promoter-list">
|
||||
<view class='promoterHeader bg-color'>
|
||||
<view class='headerCon acea-row row-between-wrapper'>
|
||||
<view class='headerCon acea-row row-between'>
|
||||
<view>
|
||||
<view class='name'>推广人数</view>
|
||||
<view><text class='num'>{{teamCount}}</text>人</view>
|
||||
<view><text class='num'>{{peopleData.count}}</text>人</view>
|
||||
</view>
|
||||
<view class='iconfont icon-tuandui'></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='nav acea-row row-around'>
|
||||
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>一级({{total}})</view>
|
||||
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>二级({{totalLevel}})</view>
|
||||
</view>
|
||||
<view class='search acea-row row-between-wrapper'>
|
||||
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="keyword" @confirm="submitForm" confirm-type='search' name="search"></input></view>
|
||||
<button class='iconfont icon-sousuo2' @click="submitForm"></button>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<view class="sortNav acea-row row-middle">
|
||||
<view class="sortItem" @click='setSort("childCount","ASC")' v-if="sort == 'childCountDESC'">团队排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("childCount")' v-else-if="sort == 'childCountASC'">团队排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("childCount","DESC")' v-else>团队排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount","ASC")' v-if="sort == 'numberCountDESC'">金额排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount")' v-else-if="sort == 'numberCountASC'">金额排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount","DESC")' v-else>金额排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount","ASC")' v-if="sort == 'orderCountDESC'">订单排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount")' v-else-if="sort == 'orderCountASC'">订单排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount","DESC")' v-else>订单排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
<view class="pad30">
|
||||
<view class='nav acea-row row-around'>
|
||||
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>一级({{peopleData.total}})</view>
|
||||
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>二级({{peopleData.totalLevel}})
|
||||
</view>
|
||||
</view>
|
||||
<block v-for="(item,index) in recordList" :key="index">
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.avatar'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='name line1'>{{item.nickname}}</view>
|
||||
<view>加入时间: {{item.time}}</view>
|
||||
</view>
|
||||
<view class='search acea-row row-between-wrapper'>
|
||||
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="keyword"
|
||||
@confirm="submitForm" confirm-type='search' name="search"></input></view>
|
||||
<button class='iconfont icon-sousuo2' @click="submitForm"></button>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<view class="sortNav acea-row row-middle">
|
||||
<view class="sortItem" @click='setSort("childCount","ASC")' v-if="sort == 'childCountDESC'">团队排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view><text class='num font-color'>{{item.childCount ? item.childCount : 0}}</text>人</view>
|
||||
<view><text class="num">{{item.orderCount ? item.orderCount : 0}}</text>单</view>
|
||||
<view><text class="num">{{item.numberCount ? item.numberCount : 0}}</text>元</view>
|
||||
<view class="sortItem" @click='setSort("childCount")' v-else-if="sort == 'childCountASC'">团队排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("childCount","DESC")' v-else>团队排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount","ASC")' v-if="sort == 'numberCountDESC'">
|
||||
金额排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount")' v-else-if="sort == 'numberCountASC'">金额排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("numberCount","DESC")' v-else>金额排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount","ASC")' v-if="sort == 'orderCountDESC'">订单排序
|
||||
<image src='/static/images/sort1.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount")' v-else-if="sort == 'orderCountASC'">订单排序
|
||||
<image src='/static/images/sort3.png'></image>
|
||||
</view>
|
||||
<view class="sortItem" @click='setSort("orderCount","DESC")' v-else>订单排序
|
||||
<image src='/static/images/sort2.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-for="(item,index) in recordList" :key="index">
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.avatar'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='name line1'>{{item.nickname}}</view>
|
||||
<view>加入时间: {{item.time.split(' ')[0]}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view><text class='num font-color'>{{item.childCount ? item.childCount : 0}}</text>人
|
||||
</view>
|
||||
<view><text class="num">{{item.orderCount ? item.orderCount : 0}}</text>单</view>
|
||||
<view><text class="num">{{item.numberCount ? item.numberCount : 0}}</text>元</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<Loading :loaded="status" :loading="loadingList"></Loading>
|
||||
<block v-if="recordList.length == 0 && isShow">
|
||||
<emptyPage title="暂无推广人数~"></emptyPage>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
|
@ -77,7 +87,8 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
spreadPeople
|
||||
spreadPeople,
|
||||
spreadPeoCount
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
toLogin
|
||||
|
@ -85,12 +96,16 @@
|
|||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import emptyPage from '@/components/emptyPage.vue'
|
||||
import Loading from "@/components/Loading";
|
||||
// #ifdef MP
|
||||
import authorize from '@/components/Authorize';
|
||||
// #endif
|
||||
import home from '@/components/home';
|
||||
export default {
|
||||
components: {
|
||||
Loading,
|
||||
emptyPage,
|
||||
// #ifdef MP
|
||||
authorize,
|
||||
// #endif
|
||||
|
@ -98,9 +113,6 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
totalLevel: 0,
|
||||
teamCount: 0,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
keyword: '',
|
||||
|
@ -109,7 +121,10 @@
|
|||
sortKey: '',
|
||||
grade: 0,
|
||||
status: false,
|
||||
loadingList: false,
|
||||
recordList: [],
|
||||
peopleData: {},
|
||||
isShow: false,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false //是否隐藏授权
|
||||
};
|
||||
|
@ -118,14 +133,9 @@
|
|||
onLoad() {
|
||||
if (this.isLogin) {
|
||||
this.userSpreadNewList();
|
||||
this.spreadPeoCount();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
|
@ -142,10 +152,10 @@
|
|||
authColse: function(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
setSort: function(sortKey,isAsc) {
|
||||
setSort: function(sortKey, isAsc) {
|
||||
let that = this;
|
||||
that.isAsc = isAsc;
|
||||
that.sort = sortKey+isAsc;
|
||||
that.sort = sortKey + isAsc;
|
||||
that.sortKey = sortKey;
|
||||
that.page = 1;
|
||||
that.limit = 20;
|
||||
|
@ -160,7 +170,7 @@
|
|||
this.$set(this, 'recordList', []);
|
||||
this.userSpreadNewList();
|
||||
},
|
||||
|
||||
|
||||
setType: function(grade) {
|
||||
if (this.grade != grade) {
|
||||
this.grade = grade;
|
||||
|
@ -170,10 +180,16 @@
|
|||
this.sort = '';
|
||||
this.isAsc = '';
|
||||
this.status = false;
|
||||
this.loadingList = false;
|
||||
this.$set(this, 'recordList', []);
|
||||
this.userSpreadNewList();
|
||||
}
|
||||
},
|
||||
spreadPeoCount() {
|
||||
spreadPeoCount().then(res => {
|
||||
this.peopleData = res.data;
|
||||
});
|
||||
},
|
||||
userSpreadNewList: function() {
|
||||
let that = this;
|
||||
let page = that.page;
|
||||
|
@ -185,6 +201,7 @@
|
|||
let grade = that.grade;
|
||||
let recordList = that.recordList;
|
||||
let recordListNew = [];
|
||||
if (that.loadingList) return;
|
||||
if (status == true) return;
|
||||
spreadPeople({
|
||||
page: page,
|
||||
|
@ -194,15 +211,14 @@
|
|||
sortKey: sortKey,
|
||||
isAsc: isAsc
|
||||
}).then(res => {
|
||||
let recordListData = res.data.spreadPeopleList?res.data.spreadPeopleList:[];
|
||||
let recordListData = res.data.list ? res.data.list : [];
|
||||
let len = recordListData.length;
|
||||
recordListNew = recordList.concat(recordListData);
|
||||
that.total = res.data.total;
|
||||
that.totalLevel = res.data.totalLevel;
|
||||
that.teamCount = res.data.count;
|
||||
that.status = limit > len;
|
||||
that.page = page + 1;
|
||||
that.$set(that, 'recordList', recordListNew || []);
|
||||
that.loadingList = false;
|
||||
if(that.recordList.length===0) that.isShow = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -220,23 +236,28 @@
|
|||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
border-top-left-radius: 14rpx;
|
||||
border-top-right-radius: 14rpx;
|
||||
margin-top: -30rpx;
|
||||
}
|
||||
|
||||
.promoter-list .nav .item.on {
|
||||
border-bottom: 5rpx solid #e93323;
|
||||
color: #e93323;
|
||||
border-bottom: 5rpx solid $theme-color;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.promoter-list .search {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
height: 86rpx;
|
||||
padding-left: 30rpx;
|
||||
height: 100rpx;
|
||||
padding: 0 24rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom-left-radius: 14rpx;
|
||||
border-bottom-right-radius: 14rpx;
|
||||
}
|
||||
|
||||
.promoter-list .search .input {
|
||||
width: 610rpx;
|
||||
width: 592rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50rpx;
|
||||
background-color: #f5f5f5;
|
||||
|
@ -265,15 +286,14 @@
|
|||
}
|
||||
|
||||
.promoter-list .search .iconfont {
|
||||
font-size: 45rpx;
|
||||
font-size: 32rpx;
|
||||
color: #515151;
|
||||
width: 110rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list {
|
||||
margin-top: 12rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list .sortNav {
|
||||
|
@ -282,6 +302,8 @@
|
|||
border-bottom: 1rpx solid #eee;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
border-top-left-radius: 14rpx;
|
||||
border-top-right-radius: 14rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list .sortNav .sortItem {
|
||||
|
@ -300,14 +322,10 @@
|
|||
background-color: #fff;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
height: 152rpx;
|
||||
padding: 0 30rpx 0 20rpx;
|
||||
padding: 0 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.promoter-list .list .item .picTxt {
|
||||
width: 440rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list .item .picTxt .pictrue {
|
||||
width: 106rpx;
|
||||
|
@ -325,9 +343,10 @@
|
|||
}
|
||||
|
||||
.promoter-list .list .item .picTxt .text {
|
||||
width: 304rpx;
|
||||
// width: 304rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
|
||||
.promoter-list .list .item .picTxt .text .name {
|
||||
|
@ -337,13 +356,12 @@
|
|||
}
|
||||
|
||||
.promoter-list .list .item .right {
|
||||
width: 240rpx;
|
||||
text-align: right;
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.promoter-list .list .item .right .num{
|
||||
|
||||
.promoter-list .list .item .right .num {
|
||||
margin-right: 7rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<view class='iconfont icon-2'></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='list' v-if="recordList.length>0">
|
||||
<view class='list pad30' v-if="recordList.length>0">
|
||||
<block v-for="(item,index) in recordList" :key="index">
|
||||
<view class='item'>
|
||||
<view class='title acea-row row-column row-center'>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</view>
|
||||
<view class='listn'>
|
||||
<block v-for="(child,indexn) in item.child" :key="indexn">
|
||||
<view class='itenm'>
|
||||
<view class='itenm borRadius14'>
|
||||
<view class='top acea-row row-between-wrapper'>
|
||||
<view class='pictxt acea-row row-between-wrapper'>
|
||||
<view class='pictrue'>
|
||||
|
@ -46,7 +46,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
|
@ -92,13 +92,7 @@
|
|||
if (this.isLogin) {
|
||||
this.getRecordOrderList();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -160,7 +154,6 @@
|
|||
<style scoped lang="scss">
|
||||
.promoter-order .list .item .title {
|
||||
height: 133rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
@ -176,12 +169,11 @@
|
|||
}
|
||||
|
||||
.promoter-order .list .item .listn .itenm~.itenm {
|
||||
margin-top: 12rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.promoter-order .list .item .listn .itenm .top {
|
||||
margin-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
padding: 0 24rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
@ -215,7 +207,7 @@
|
|||
}
|
||||
|
||||
.promoter-order .list .item .listn .itenm .bottom {
|
||||
padding: 20rpx 30rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
|
@ -107,13 +107,7 @@
|
|||
if (this.isLogin) {
|
||||
this.getRanklist();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
// onShow: function () {
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
<template>
|
||||
<view>
|
||||
<form @submit="formSubmit" report-submit='true'>
|
||||
<view class='addAddress'>
|
||||
<view class='list'>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='addAddress pad30'>
|
||||
<view class='list borRadius14'>
|
||||
<view class='item acea-row row-between-wrapper' style="border: none;">
|
||||
<view class='name'>姓名</view>
|
||||
<input type='text' placeholder='请输入姓名' name='realName' :value="userAddress.realName" placeholder-class='placeholder'></input>
|
||||
<input type='text' placeholder='请输入姓名' placeholder-style="color:#ccc;" name='realName' :value="userAddress.realName"
|
||||
placeholder-class='placeholder'></input>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='name'>联系电话</view>
|
||||
<input type='text' placeholder='请输入联系电话' name="phone" :value='userAddress.phone' placeholder-class='placeholder'></input>
|
||||
<input type='text' placeholder='请输入联系电话' placeholder-style="color:#ccc;" name="phone" :value='userAddress.phone'
|
||||
placeholder-class='placeholder'></input>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='name'>所在地区</view>
|
||||
<view class="address">
|
||||
<picker mode="multiSelector" @change="bindRegionChange" @columnchange="bindMultiPickerColumnChange" :value="valueRegion"
|
||||
:range="multiArray">
|
||||
<picker mode="multiSelector" @change="bindRegionChange"
|
||||
@columnchange="bindMultiPickerColumnChange" :value="valueRegion" :range="multiArray">
|
||||
<view class='acea-row'>
|
||||
<view class="picker">{{region[0]}},{{region[1]}},{{region[2]}}</view>
|
||||
<view class="picker line1">{{region[0]}},{{region[1]}},{{region[2]}}</view>
|
||||
<view class='iconfont icon-dizhi font-color'></view>
|
||||
</view>
|
||||
</picker>
|
||||
|
@ -25,12 +27,14 @@
|
|||
</view>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='name'>详细地址</view>
|
||||
<input type='text' placeholder='请填写具体地址' name='detail' placeholder-class='placeholder' :value='userAddress.detail'></input>
|
||||
<input type='text' placeholder='请填写具体地址' placeholder-style="color:#ccc;" name='detail' placeholder-class='placeholder'
|
||||
:value='userAddress.detail'></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class='default acea-row row-middle'>
|
||||
<view class='default acea-row row-middle borRadius14'>
|
||||
<checkbox-group @change='ChangeIsDefault'>
|
||||
<checkbox :checked="userAddress.isDefault" />设置为默认地址</checkbox-group>
|
||||
<checkbox :checked="userAddress.isDefault" />设置为默认地址
|
||||
</checkbox-group>
|
||||
</view>
|
||||
|
||||
<button class='keepBnt bg-color' form-type="submit">立即保存</button>
|
||||
|
@ -43,7 +47,7 @@
|
|||
</view>
|
||||
</form>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
|
@ -102,26 +106,27 @@
|
|||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
watch:{
|
||||
isLogin:{
|
||||
handler:function(newV,oldV){
|
||||
if(newV){
|
||||
watch: {
|
||||
isLogin: {
|
||||
handler: function(newV, oldV) {
|
||||
if (newV) {
|
||||
this.getUserAddress();
|
||||
this.getCityList();
|
||||
}
|
||||
},
|
||||
deep:true
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (this.isLogin) {
|
||||
this.cartId = options.cartId || '';
|
||||
this.pinkId = options.pinkId || 0;
|
||||
this.couponId = options.couponId || 0;
|
||||
this.preOrderNo = options.preOrderNo || 0;
|
||||
// this.cartId = options.cartId || '';
|
||||
// this.pinkId = options.pinkId || 0;
|
||||
// this.couponId = options.couponId || 0;
|
||||
this.id = options.id || 0;
|
||||
this.secKill = options.secKill || false;
|
||||
this.combination = options.combination || false;
|
||||
this.bargain = options.bargain || false;
|
||||
// this.secKill = options.secKill || false;
|
||||
// this.combination = options.combination || false;
|
||||
// this.bargain = options.bargain || false;
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.id ? '修改地址' : '添加地址'
|
||||
})
|
||||
|
@ -131,13 +136,7 @@
|
|||
// this.initialize();
|
||||
// }
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -286,9 +285,23 @@
|
|||
that.pinkId = '';
|
||||
that.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
|
||||
res.data
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
url: '/pages/users/order_confirm/index?cartId=' +
|
||||
cartId +
|
||||
'&addressId=' + (
|
||||
that.id ? that
|
||||
.id :
|
||||
res.data
|
||||
.id) +
|
||||
'&pinkId=' +
|
||||
pinkId +
|
||||
'&couponId=' +
|
||||
couponId +
|
||||
'&secKill=' + that
|
||||
.secKill +
|
||||
'&combination=' +
|
||||
that.combination +
|
||||
'&bargain=' + that
|
||||
.bargain
|
||||
});
|
||||
} else {
|
||||
uni.navigateBack({
|
||||
|
@ -307,9 +320,10 @@
|
|||
});
|
||||
},
|
||||
fail: function(res) {
|
||||
if (res.errMsg == 'chooseAddress:cancel') return that.$util.Tips({
|
||||
title: '取消选择'
|
||||
});
|
||||
if (res.errMsg == 'chooseAddress:cancel') return that.$util
|
||||
.Tips({
|
||||
title: '取消选择'
|
||||
});
|
||||
},
|
||||
})
|
||||
},
|
||||
|
@ -361,13 +375,17 @@
|
|||
that.pinkId = '';
|
||||
that.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
|
||||
res.data
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
url: '/pages/users/order_confirm/index?cartId=' +
|
||||
cartId + '&addressId=' + (that.id ? that.id :
|
||||
res.data
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' +
|
||||
couponId + '&secKill=' + that.secKill +
|
||||
'&combination=' + that.combination + '&bargain=' +
|
||||
that.bargain
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url:'/pages/users/user_address_list/index'
|
||||
url: '/pages/users/user_address_list/index'
|
||||
})
|
||||
// history.back();
|
||||
}
|
||||
|
@ -436,16 +454,12 @@
|
|||
icon: 'success'
|
||||
});
|
||||
setTimeout(function() {
|
||||
if (that.cartId) {
|
||||
let cartId = that.cartId;
|
||||
let pinkId = that.pinkId;
|
||||
let couponId = that.couponId;
|
||||
that.cartId = '';
|
||||
that.pinkId = '';
|
||||
that.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data.id) +'&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
});
|
||||
if (that.preOrderNo>0) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/users/order_confirm/index?preOrderNo=' + that
|
||||
.preOrderNo + '&addressId=' + (that.id ? that.id : res.data
|
||||
.id)
|
||||
})
|
||||
} else {
|
||||
// #ifdef H5
|
||||
return history.back();
|
||||
|
@ -455,7 +469,29 @@
|
|||
delta: 1,
|
||||
})
|
||||
// #endif
|
||||
|
||||
}
|
||||
|
||||
// if (that.cartId) {
|
||||
// let cartId = that.cartId;
|
||||
// let pinkId = that.pinkId;
|
||||
// let couponId = that.couponId;
|
||||
// that.cartId = '';
|
||||
// that.pinkId = '';
|
||||
// that.couponId = '';
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data.id) +'&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
// });
|
||||
// } else {
|
||||
// // #ifdef H5
|
||||
// return history.back();
|
||||
// // #endif
|
||||
// // #ifndef H5
|
||||
// return uni.navigateBack({
|
||||
// delta: 1,
|
||||
// })
|
||||
// // #endif
|
||||
// }
|
||||
}, 1000);
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
|
@ -471,40 +507,42 @@
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.addAddress {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.addAddress .list {
|
||||
background-color: #fff;
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.addAddress .list .item {
|
||||
padding: 30rpx;
|
||||
border-top: 1rpx solid #eee;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.addAddress .list .item .name {
|
||||
width: 195rpx;
|
||||
// width: 195rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.addAddress .list .item .address {
|
||||
// width: 412rpx;
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
margin-left: 50rpx;
|
||||
}
|
||||
|
||||
.addAddress .list .item input {
|
||||
width: 475rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.addAddress .list .item .placeholder {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.addAddress .list .item picker {
|
||||
width: 475rpx;
|
||||
}
|
||||
|
||||
.addAddress .list .item picker .picker {
|
||||
width: 410rpx;
|
||||
font-size: 30rpx;
|
||||
|
@ -531,7 +569,7 @@
|
|||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 86rpx;
|
||||
margin: 50rpx auto;
|
||||
margin: 80rpx auto 24rpx auto;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
@ -544,7 +582,7 @@
|
|||
line-height: 86rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 32rpx;
|
||||
color: #fe960f;
|
||||
border: 1px solid #fe960f;
|
||||
color: #E93323 ;
|
||||
border: 1px solid #E93323;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class='line'>
|
||||
<image src='../../../static/images/line.jpg' v-if="addressList.length"></image>
|
||||
</view>
|
||||
<view class='address-management' :class='addressList.length < 1 && page > 1 ? "fff":""'>
|
||||
<view class='line'>
|
||||
<image src='../../../static/images/line.jpg' v-if="addressList.length"></image>
|
||||
</view>
|
||||
<radio-group class="radio-group" @change="radioChange" v-if="addressList.length">
|
||||
<view class='item' v-for="(item,index) in addressList" :key="index">
|
||||
<view class='item borRadius14' v-for="(item,index) in addressList" :key="index">
|
||||
<view class='address' @click='goOrder(item.id)'>
|
||||
<view class='consignee'>收货人:{{item.realName}}<text class='phone'>{{item.phone}}</text></view>
|
||||
<view>收货地址:{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
|
||||
|
@ -37,22 +37,19 @@
|
|||
</view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
<view class='footer acea-row row-between-wrapper'>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view class='addressBnt bg-color on' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-->
|
||||
<view class='addressBnt bg-color' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
|
||||
<view class='addressBnt wxbnt' @click='getWxAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5-->
|
||||
<view class='addressBnt bg-color' :class="this.$wechat.isWeixin()?'':'on'" @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
|
||||
<view class='addressBnt wxbnt' @click='getAddress' v-if="this.$wechat.isWeixin()"><text class='iconfont icon-weixin2'></text>导入微信地址</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<view class='footer acea-row row-between-wrapper'>
|
||||
<!-- #ifdef MP-->
|
||||
<view class='addressBnt bg-color' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
|
||||
<view class='addressBnt wxbnt' @click='getWxAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5-->
|
||||
<view class='addressBnt bg-color' :class="this.$wechat.isWeixin()?'':'on'" @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
|
||||
<view v-if="this.$wechat.isWeixin()" class='addressBnt wxbnt' @click='getAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
|
@ -114,21 +111,15 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
if (this.isLogin) {
|
||||
this.cartId = options.cartId || '';
|
||||
this.pinkId = options.pinkId || 0;
|
||||
this.couponId = options.couponId || 0;
|
||||
this.secKill = options.secKill || false;
|
||||
this.combination = options.combination || false;
|
||||
this.bargain = options.bargain || false;
|
||||
this.preOrderNo = options.preOrderNo || 0;
|
||||
// this.pinkId = options.pinkId || 0;
|
||||
// this.couponId = options.couponId || 0;
|
||||
// this.secKill = options.secKill || false;
|
||||
// this.combination = options.combination || false;
|
||||
// this.bargain = options.bargain || false;
|
||||
this.getAddressList(true);
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
|
@ -353,23 +344,13 @@
|
|||
this.pinkId = '';
|
||||
this.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_address/index?cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
|
||||
url: '/pages/users/user_address/index?preOrderNo=' + this.preOrderNo
|
||||
})
|
||||
},
|
||||
goOrder: function(id) {
|
||||
let cartId = '';
|
||||
let pinkId = '';
|
||||
let couponId = '';
|
||||
if (this.cartId && id) {
|
||||
cartId = this.cartId;
|
||||
pinkId = this.pinkId;
|
||||
couponId = this.couponId;
|
||||
this.cartId = '';
|
||||
this.pinkId = '';
|
||||
this.couponId = '';
|
||||
if(this.preOrderNo){
|
||||
uni.redirectTo({
|
||||
url: '/pages/users/order_confirm/index?is_address=1&cartId=' + cartId + '&addressId=' + id + '&pinkId=' +
|
||||
pinkId + '&couponId=' + couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
|
||||
url: '/pages/users/order_confirm/index?is_address=1&preOrderNo=' + this.preOrderNo + '&addressId=' + id
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -380,31 +361,32 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss" scoped>
|
||||
.address-management{
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
.address-management.fff {
|
||||
background-color: #fff;
|
||||
height: 1300rpx
|
||||
}
|
||||
|
||||
.address-management .line {
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 3rpx;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.address-management .line image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.address-management .item {
|
||||
background-color: #fff;
|
||||
padding: 0 30rpx;
|
||||
margin-bottom: 12rpx;
|
||||
padding: 0 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.address-management .item .address {
|
||||
padding: 30rpx 0;
|
||||
padding: 35rpx 0;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
|
@ -438,11 +420,11 @@
|
|||
}
|
||||
|
||||
.address-management .item .operation .iconfont.icon-shanchu {
|
||||
margin-left: 40rpx;
|
||||
margin-left: 35rpx;
|
||||
font-size: 38rpx;
|
||||
}
|
||||
|
||||
.address-management .footer {
|
||||
.footer {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
|
@ -452,7 +434,7 @@
|
|||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt {
|
||||
.footer .addressBnt {
|
||||
width: 330rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 50rpx;
|
||||
|
@ -462,18 +444,18 @@
|
|||
color: #fff;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt.on {
|
||||
.footer .addressBnt.on {
|
||||
width: 690rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt .iconfont {
|
||||
.footer .addressBnt .iconfont {
|
||||
font-size: 35rpx;
|
||||
margin-right: 8rpx;
|
||||
vertical-align: -1rpx;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt.wxbnt {
|
||||
.footer .addressBnt.wxbnt {
|
||||
background-color: #fe960f;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
<view class='bill-details'>
|
||||
<view class='nav acea-row'>
|
||||
<view class='item' :class='type==="all" ? "on":""' @click='changeType("all")'>全部</view>
|
||||
<view class='item' :class='type==="expenditure" ? "on":""' @click='changeType("expenditure")'>支出</view>
|
||||
<view class='item' :class='type==="income" ? "on":""' @click='changeType("income")'>收入</view>
|
||||
<view class='item' :class='type==="expenditure" ? "on":""' @click='changeType("expenditure")'>消费</view>
|
||||
<view class='item' :class='type==="income" ? "on":""' @click='changeType("income")'>充值</view>
|
||||
</view>
|
||||
<view class='sign-record'>
|
||||
<view class='list' v-for="(item,index) in userBillList" :key="index">
|
||||
<view class='list pad30' v-for="(item,index) in userBillList" :key="index">
|
||||
<view class='item'>
|
||||
<view class='data'>{{item.date}}</view>
|
||||
<view class='listn'>
|
||||
<view class='listn borRadius14'>
|
||||
<view class='itemn acea-row row-between-wrapper' v-for="(vo,indexn) in item.list" :key="indexn">
|
||||
<view>
|
||||
<view class='name line1'>{{vo.title}}</view>
|
||||
|
@ -31,7 +31,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<!-- #endif -->
|
||||
<home></home>
|
||||
</view>
|
||||
|
@ -78,13 +78,7 @@
|
|||
if (this.isLogin) {
|
||||
this.getUserBillList();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.isAuto = true;
|
||||
this.$set(this, 'isShowAuth', true);
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
@ -154,6 +148,9 @@
|
|||
</script>
|
||||
|
||||
<style scoped lang='scss'>
|
||||
.sign-record{
|
||||
|
||||
}
|
||||
.bill-details .nav {
|
||||
background-color: #fff;
|
||||
height: 90rpx;
|
||||
|
@ -169,7 +166,7 @@
|
|||
}
|
||||
|
||||
.bill-details .nav .item.on {
|
||||
color: #e93323;
|
||||
border-bottom: 3rpx solid #e93323;
|
||||
color: $theme-color;
|
||||
border-bottom: 3rpx solid $theme-color;
|
||||
}
|
||||
</style>
|
||||
|
|