全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug

This commit is contained in:
stivepeim
2021-06-11 17:41:16 +08:00
parent 0b9f28fa52
commit b76840e10f
582 changed files with 35633 additions and 28276 deletions

View File

@@ -19,18 +19,19 @@ JAVA版商城系统是基于Java(SpringBoot) + Vue(Element UI) + UniApp开发的
网络营销的一款企业应用,更适合企业二次开发。 网络营销的一款企业应用,更适合企业二次开发。
~~~~ ~~~~
![](https://gitee.com/stivepeim/img4mk/raw/master/20210611144457.png)
![](https://gitee.com/stivepeim/img4mk/raw/master/20210205091003.png)
## 导航栏目 ## 导航栏目
[![帮助手册](https://img.shields.io/badge/%E5%B8%AE%E5%8A%A9%E6%89%8B%E5%86%8C-Java%E5%B8%AE%E5%8A%A9%E6%89%8B%E5%86%8C-orange)](http://help.crmeb.net/crmeb_java/1748037t) <!-- [![帮助手册](https://img.shields.io/badge/%E5%B8%AE%E5%8A%A9%E6%89%8B%E5%86%8C-Java%E5%B8%AE%E5%8A%A9%E6%89%8B%E5%86%8C-orange)](http://help.crmeb.net/crmeb_java/1748037t)
[![论坛地址](https://img.shields.io/badge/CRMEB-Java%E8%AE%BA%E5%9D%9B-green)](https://q.crmeb.net) [![论坛地址](https://img.shields.io/badge/CRMEB-Java%E8%AE%BA%E5%9D%9B-green)](https://q.crmeb.net)
[![官网地址](https://img.shields.io/badge/CRMEB-%E5%AE%98%E7%BD%91-brightgreen)](https://www.crmeb.com) [![官网地址](https://img.shields.io/badge/CRMEB-%E5%AE%98%E7%BD%91-brightgreen)](https://www.crmeb.com)
[![服务器](https://img.shields.io/badge/Server-%E6%9C%8D%E5%8A%A1%E5%99%A8-yellowgreen)](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=dligum2z) [![服务器](https://img.shields.io/badge/Server-%E6%9C%8D%E5%8A%A1%E5%99%A8-yellowgreen)](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=dligum2z)
[![授权价格](https://img.shields.io/badge/authorize-%E6%8E%88%E6%9D%83-red)](http://crmeb.com/web/auth/apply) [![授权价格](https://img.shields.io/badge/authorize-%E6%8E%88%E6%9D%83-red)](http://crmeb.com/web/auth/apply)
[![GitHub地址](https://img.shields.io/badge/gitHub-gitHub-lightgrey)](https://github.com/crmeb/crmeb_java) [![GitHub地址](https://img.shields.io/badge/gitHub-gitHub-lightgrey)](https://github.com/crmeb/crmeb_java)
[![码云地址](https://img.shields.io/badge/gitee-%E7%A0%81%E4%BA%91-blue)](https://gitee.com/ZhongBangKeJi/crmeb_java) [![码云地址](https://img.shields.io/badge/gitee-%E7%A0%81%E4%BA%91-blue)](https://gitee.com/ZhongBangKeJi/crmeb_java) -->
### [帮助手册](https://help.crmeb.net/crmeb_java/1748037) [论坛地址](https://q.crmeb.net) [官网地址](https://www.crmeb.com) [服务器](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=dligum2z) [授权价格](http://crmeb.com/web/auth/apply) [GitHub地址](https://github.com/crmeb/crmeb_java) [码云地址](https://gitee.com/ZhongBangKeJi/crmeb_java)
## 预览 ## 预览
![二维码预览](https://gitee.com/stivepeim/img4mk/raw/master/20210519104517.jpg) ![二维码预览](https://gitee.com/stivepeim/img4mk/raw/master/20210519104517.jpg)
@@ -72,9 +73,12 @@ JAVA版商城系统是基于Java(SpringBoot) + Vue(Element UI) + UniApp开发的
~~~ ~~~
## 移动端预览 ## 移动端预览
![](https://gitee.com/stivepeim/img4mk/raw/master/20210204184108.jpg) <!-- ![](https://gitee.com/stivepeim/img4mk/raw/master/20210204184108.jpg)
![](https://gitee.com/stivepeim/img4mk/raw/master/20210204184109.jpg) ![](https://gitee.com/stivepeim/img4mk/raw/master/20210204184109.jpg)
![](https://gitee.com/stivepeim/img4mk/raw/master/20210204184110.jpg) ![](https://gitee.com/stivepeim/img4mk/raw/master/20210204184110.jpg) -->
![](https://gitee.com/stivepeim/img4mk/raw/master/20210611145305.png)
![](https://gitee.com/stivepeim/img4mk/raw/master/20210611145407.png)
![](https://gitee.com/stivepeim/img4mk/raw/master/20210611145443.png)
## 功能图预览 ## 功能图预览
![项目基本功能介绍](https://gitee.com/stivepeim/img4mk/raw/master/20201225180349.jpeg) ![项目基本功能介绍](https://gitee.com/stivepeim/img4mk/raw/master/20201225180349.jpeg)
@@ -86,22 +90,6 @@ JAVA版商城系统是基于Java(SpringBoot) + Vue(Element UI) + UniApp开发的
![复制第三方平台商品](https://gitee.com/stivepeim/img4mk/raw/master/20210202175224.png) ![复制第三方平台商品](https://gitee.com/stivepeim/img4mk/raw/master/20210202175224.png)
![营销功能](https://gitee.com/stivepeim/img4mk/raw/master/20210202175547.png) ![营销功能](https://gitee.com/stivepeim/img4mk/raw/master/20210202175547.png)
![自定义表单组件](https://gitee.com/stivepeim/img4mk/raw/master/20210202175013.png) ![自定义表单组件](https://gitee.com/stivepeim/img4mk/raw/master/20210202175013.png)
<!-- ![商品规格](https://images.gitee.com/uploads/images/2020/0824/154034_745ba403_2012975.png "屏幕截图.png")
![商品分类](https://images.gitee.com/uploads/images/2020/0824/154123_b4b0adf8_2012975.png "屏幕截图.png")
![订单管理](https://images.gitee.com/uploads/images/2020/0824/154210_e4c821ed_2012975.png "屏幕截图.png")
![用户管理](https://images.gitee.com/uploads/images/2020/0824/154353_c5e5f618_2012975.png "屏幕截图.png")
![用户等级](https://images.gitee.com/uploads/images/2020/0824/154427_77f4e80d_2012975.png "屏幕截图.png")
![文章管理](https://images.gitee.com/uploads/images/2020/0824/154443_cd6c6a90_2012975.png "屏幕截图.png")
![微信](https://images.gitee.com/uploads/images/2020/0824/154515_9db27282_2012975.png "屏幕截图.png")
![优惠券](https://images.gitee.com/uploads/images/2020/0824/154536_8d1d2db2_2012975.png "屏幕截图.png")
![分销](https://images.gitee.com/uploads/images/2020/0824/154553_0b9f66a4_2012975.png "屏幕截图.png")
![身份](https://images.gitee.com/uploads/images/2020/0824/154609_e9616963_2012975.png "屏幕截图.png")
![权限](https://images.gitee.com/uploads/images/2020/0824/154647_f7fb8c69_2012975.png "屏幕截图.png")
![账号](https://images.gitee.com/uploads/images/2020/0824/154709_db94d36a_2012975.png "屏幕截图.png")
![系统设置](https://images.gitee.com/uploads/images/2020/0824/154727_fc2e4f49_2012975.png "屏幕截图.png")
![短信](https://images.gitee.com/uploads/images/2020/0824/154752_5552a5d0_2012975.png "屏幕截图.png")
![系统设置分类](https://images.gitee.com/uploads/images/2020/0824/154816_db8139fd_2012975.png "屏幕截图.png") -->
## 项目源码 ## 项目源码
@@ -110,7 +98,7 @@ JAVA版商城系统是基于Java(SpringBoot) + Vue(Element UI) + UniApp开发的
|gitHub| https://github.com/crmeb/crmeb_java| |gitHub| https://github.com/crmeb/crmeb_java|
|gitee|https://gitee.com/ZhongBangKeJi/crmeb_java| |gitee|https://gitee.com/ZhongBangKeJi/crmeb_java|
![](https://gitee.com/stivepeim/img4mk/raw/master/20210205091002.jpeg)
## 运行环境及框架 ## 运行环境及框架
~~~ ~~~

View File

@@ -12,6 +12,17 @@ export function marketingListApi(params) {
}) })
} }
/**
* 用户管理 优惠券列表
* @param pram
*/
export function marketingSendApi(params) {
return request({
url: '/admin/marketing/coupon/send/list',
method: 'get',
params
})
}
/** /**
* 优惠券 详情 * 优惠券 详情
@@ -61,6 +72,18 @@ export function couponIssueStatusApi(params) {
}) })
} }
/**
* 优惠券 删除
* @param pram
*/
export function couponDeleteApi(params) {
return request({
url: '/admin/marketing/coupon/delete',
method: 'post',
params
})
}
/** /**
* 会员领取记录 列表 * 会员领取记录 列表
* @param pram * @param pram
@@ -79,7 +102,7 @@ export function couponUserListApi(params) {
*/ */
export function integralListApi(params, data) { export function integralListApi(params, data) {
return request({ return request({
url: '/admin/user/bill/list', url: '/admin/user/integral/list',
method: 'post', method: 'post',
params, params,
data data
@@ -439,3 +462,109 @@ export function exportcombiantionApi(params) {
params params
}) })
} }
/**
* 视频号 草稿列表
*/
export function draftListApi(params) {
return request({
url: `/admin/pay/component/product/draft/list`,
method: 'get',
params
})
}
/**
* 视频号 商品列表
*/
export function videoProductListApi(params) {
return request({
url: `/admin/pay/component/product/list`,
method: 'get',
params
})
}
/**
* 视频号 类目
*/
export function catListApi(params) {
return request({
url: `/admin/pay/component/cat/get/list`,
method: 'get'
})
}
/**
* 视频号 添加
*/
export function videoAddApi(data) {
return request({
url: `/admin/pay/component/product/add`,
method: 'post',
data
})
}
/**
* 视频号 编辑
*/
export function videoUpdateApi(data) {
return request({
url: `/admin/pay/component/product/update`,
method: 'post',
data
})
}
/**
* 视频号 上架
*/
export function videoUpApi(proId) {
return request({
url: `/admin/pay/component/product/listing/${proId}`,
method: 'post'
})
}
/**
* 视频号 下架
*/
export function videoDownApi(proId) {
return request({
url: `/admin/pay/component/product/delisting/${proId}`,
method: 'post'
})
}
/**
* 视频号 删除
*/
export function videoDelApi(proId) {
return request({
url: `/admin/pay/component/product/delete/${proId}`,
method: 'post'
})
}
/**
* 视频号 草稿商品详情
*/
export function draftInfoApi(id) {
return request({
url: `/admin/pay/component/product/draft/get/${id}`,
method: 'get'
})
}
/**
* 视频号 草稿商品编辑
*/
export function draftUpdateApi(data) {
return request({
url: `/admin/pay/component/product/update`,
method: 'post',
data
})
}

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
/** /**
* 订单 列表 * 订单 列表
* @param pram * @param prams
*/ */
export function orderListApi(params) { export function orderListApi(params) {
return request({ return request({
@@ -12,10 +12,32 @@ export function orderListApi(params) {
}) })
} }
/**
* 订单 列表 获取各状态数量
* @param params
*/
export function orderStatusNumApi(params) {
return request({
url: '/admin/store/order/status/num',
method: 'get',
params
})
}
/**
* 订单 列表 数据统计
* @param params
*/
export function orderListDataApi(params) {
return request({
url: '/admin/store/order/list/data',
method: 'get',
params
})
}
/** /**
* 订单 删除 * 订单 删除
* @param pram * @param params
*/ */
export function orderDeleteApi(params) { export function orderDeleteApi(params) {
return request({ return request({
@@ -27,7 +49,7 @@ export function orderDeleteApi(params) {
/** /**
* 订单 编辑 * 订单 编辑
* @param pram * @param prams
*/ */
export function orderUpdateApi(data, params) { export function orderUpdateApi(data, params) {
return request({ return request({
@@ -40,7 +62,7 @@ export function orderUpdateApi(data, params) {
/** /**
* 订单 记录 * 订单 记录
* @param pram * @param prams
*/ */
export function orderLogApi(params) { export function orderLogApi(params) {
return request({ return request({
@@ -52,7 +74,7 @@ export function orderLogApi(params) {
/** /**
* 订单 详情 * 订单 详情
* @param pram * @param prams
*/ */
export function orderDetailApi(params) { export function orderDetailApi(params) {
return request({ return request({
@@ -64,7 +86,7 @@ export function orderDetailApi(params) {
/** /**
* 订单 备注 * 订单 备注
* @param pram * @param prams
*/ */
export function orderMarkApi(params) { export function orderMarkApi(params) {
return request({ return request({
@@ -76,7 +98,7 @@ export function orderMarkApi(params) {
/** /**
* 订单 发货 * 订单 发货
* @param pram * @param prams
*/ */
export function orderSendApi(data) { export function orderSendApi(data) {
return request({ return request({
@@ -88,7 +110,7 @@ export function orderSendApi(data) {
/** /**
* 订单 拒绝退款 * 订单 拒绝退款
* @param pram * @param prams
*/ */
export function orderRefuseApi(params) { export function orderRefuseApi(params) {
return request({ return request({
@@ -100,7 +122,7 @@ export function orderRefuseApi(params) {
/** /**
* 订单 立即退款 * 订单 立即退款
* @param pram * @param prams
*/ */
export function orderRefundApi(params) { export function orderRefundApi(params) {
return request({ return request({
@@ -112,7 +134,7 @@ export function orderRefundApi(params) {
/** /**
* 订单 核销订单 * 订单 核销订单
* @param pram * @param prams
*/ */
export function writeUpdateApi(vCode) { export function writeUpdateApi(vCode) {
return request({ return request({
@@ -123,7 +145,7 @@ export function writeUpdateApi(vCode) {
/** /**
* 订单 核销码查询待核销订单 * 订单 核销码查询待核销订单
* @param pram * @param prams
*/ */
export function writeConfirmApi(vCode) { export function writeConfirmApi(vCode) {
return request({ return request({
@@ -195,3 +217,24 @@ export function getLogisticsInfoApi(params) {
params params
}) })
} }
/**
*视频号物流公司
*/
export function companyGetListApi() {
return request({
url: `/admin/pay/component/delivery/company/get/list`,
method: 'get'
})
}
/**
*视频号物流公司
*/
export function videoSendApi(data) {
return request({
url: `/admin/store/order/video/send`,
method: 'post',
data
})
}

View File

@@ -44,7 +44,8 @@ export function adminAdd(pram) {
pwd: pram.pwd, pwd: pram.pwd,
realName: pram.realName, realName: pram.realName,
roles: pram.roles.join(','), roles: pram.roles.join(','),
status: pram.status status: pram.status,
phone: pram.phone
} }
return request({ return request({
url: '/admin/system/admin/save', url: '/admin/system/admin/save',

View File

@@ -357,3 +357,14 @@ export function updateSpreadApi(data) {
data data
}) })
} }
/**
* @description 修改手机号
*/
export function updatePhoneApi(params) {
return request({
url: `/admin/user/update/phone`,
method: 'get',
params
})
}

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 95 KiB

85
admin/src/assets/js/canvas-nest.min.js vendored Normal file
View File

@@ -0,0 +1,85 @@
// JavaScript Document
! function() {
function o(w, v, i) {
return w.getAttribute(v) || i
}
function j(i) {
return document.getElementsByTagName(i)
}
function l() {
var i = j("script"),
w = i.length,
v = i[w - 1];
return {
l: w,
z: o(v, "zIndex", -2),
o: o(v, "opacity", 0.8),
c: o(v, "color", "255,255,255"),
n: o(v, "count", 240)
}
}
function k() {
r = u.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, n = u.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
}
function b() {
delay = delay + 1;
if( delay < 5 ) { m(b) } else { delay = 0;
e.clearRect(0, 0, r, n);
var w = [f].concat(t);
var x, v, A, B, z, y;
t.forEach(function(i) {
i.x += i.xa, i.y += i.ya, i.xa *= i.x > r || i.x < 0 ? -1 : 1, i.ya *= i.y > n || i.y < 0 ? -1 : 1, e.fillRect(i.x - 0.5, i.y - 0.5, 2, 2);e.fillStyle="#FFFFFF";
for (v = 0; v < w.length; v++) {
x = w[v];
if (i !== x && null !== x.x && null !== x.y) {
B = i.x - x.x, z = i.y - x.y, y = B * B + z * z;
y < x.max && (x === f && y >= x.max / 2 && (i.x -= 0.03 * B, i.y -= 0.03 * z), A = (x.max - y) / x.max, e.beginPath(), e.lineWidth = A / 2, e.strokeStyle = "rgba(" + s.c + "," + (A + 0.2) + ")", e.moveTo(i.x, i.y), e.lineTo(x.x, x.y), e.stroke())
}
}
w.splice(w.indexOf(i), 1)
}), m(b) }
}
var u = document.createElement("canvas"),
s = l(),
c = "c_n" + s.l,
e = u.getContext("2d"),
delay = 0,
r, n, m = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(i) {
window.setTimeout(i, 1000 / 45)
},
a = Math.random,
f = {
x: null,
y: null,
max: 20000
}
u.id = c;
u.style.cssText = "position:fixed;top:0;left:0;z-index:" + s.z + ";opacity:" + s.o;
j("body")[0].appendChild(u);
k(), window.onresize = k;
window.onmousemove = function(i) {
i = i || window.event, f.x = i.clientX, f.y = i.clientY
}, window.onmouseout = function() {
f.x = null, f.y = null
};
for (var t = [], p = 0; s.n > p; p++) {
var h = a() * r,
g = a() * n,
q = 2 * a() - 1,
d = 2 * a() - 1;
t.push({
x: h,
y: g,
xa: q,
ya: d,
max: 6000
})
}
setTimeout(function() {
b()
}, 100)
}();

View File

@@ -8,7 +8,7 @@
> >
<el-input v-model="editPram.name"  :maxlength="biztype.value === 1 ? 8 : 20" placeholder="分类名称" /> <el-input v-model="editPram.name"  :maxlength="biztype.value === 1 ? 8 : 20" placeholder="分类名称" />
</el-form-item> </el-form-item>
<el-form-item label="URL" v-if="biztype.value!==1"> <el-form-item label="URL" v-if="biztype.value!==1 && biztype.value!==3">
<el-input v-model="editPram.url" placeholder="URL" /> <el-input v-model="editPram.url" placeholder="URL" />
</el-form-item> </el-form-item>
<el-form-item label="父级" v-if="biztype.value!==3"> <el-form-item label="父级" v-if="biztype.value!==3">

View File

@@ -13,13 +13,14 @@ couponFrom.install = function(Vue, options) {
const instance = new ToastConstructor() const instance = new ToastConstructor()
instance.$mount(document.createElement('div')) instance.$mount(document.createElement('div'))
document.body.appendChild(instance.$el) document.body.appendChild(instance.$el)
Vue.prototype.$modalCoupon = function(handle, keyNum, coupons=[], callback, userIds='') { Vue.prototype.$modalCoupon = function(handle, keyNum, coupons=[], callback, userIds='', userType='') {
instance.visible = true instance.visible = true
instance.handle = handle instance.handle = handle
instance.keyNum = keyNum instance.keyNum = keyNum
instance.coupons = coupons instance.coupons = coupons
instance.userIds = userIds instance.userIds = userIds
instance.callback = callback instance.callback = callback
instance.userType = userType
} }
} }
export default couponFrom export default couponFrom

View File

@@ -6,7 +6,7 @@
width="896px" width="896px"
:before-close="handleClose" :before-close="handleClose"
> >
<coupon-list v-if="visible" :handle="handle" :userIds="userIds" :couponData="coupons" @getCouponId="getCouponId" :keyNum="keyNum"></coupon-list> <coupon-list v-if="visible" :handle="handle" :userIds="userIds" :couponData="coupons" @getCouponId="getCouponId" :keyNum="keyNum" :userType="userType"></coupon-list>
<!--<upload-index v-if="visible" :isMore="isMore" @getImage="getImage" />--> <!--<upload-index v-if="visible" :isMore="isMore" @getImage="getImage" />-->
</el-dialog> </el-dialog>
</div> </div>
@@ -24,7 +24,8 @@
handle: '', handle: '',
keyNum: 0, keyNum: 0,
coupons: [], coupons: [],
userIds: '' userIds: '',
userType: ''
} }
}, },
watch: { watch: {

View File

@@ -3,8 +3,8 @@
<div class="header clearfix"> <div class="header clearfix">
<div class="container"> <div class="container">
<el-form inline size="small"> <el-form inline size="small">
<el-form-item label="优惠名称:"> <el-form-item label="优惠名称:">
<el-input v-model="tableFrom.name" placeholder="请输入优惠券名称" class="selWidth" size="small"> <el-input v-model="tableFrom.keywords" placeholder="请输入优惠券名称" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" /> <el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input> </el-input>
</el-form-item> </el-form-item>
@@ -91,7 +91,7 @@
</template> </template>
<script> <script>
import { marketingListApi, couponUserApi } from '@/api/marketing' import { marketingListApi, couponUserApi, marketingSendApi } from '@/api/marketing'
export default { export default {
name: 'CouponList', name: 'CouponList',
props: { props: {
@@ -110,6 +110,10 @@ export default {
userIds: { userIds: {
type: String, type: String,
default: '' default: ''
},
userType: {
type: String,
default: ''
} }
}, },
data() { data() {
@@ -122,10 +126,8 @@ export default {
tableFrom: { tableFrom: {
page: 1, page: 1,
limit: 10, limit: 10,
name: '', keywords: '',
// type: 0, type: ''
isDel: 0,
status: 1
}, },
multipleSelection: [], multipleSelection: [],
multipleSelectionAll: [], multipleSelectionAll: [],
@@ -145,6 +147,7 @@ export default {
mounted() { mounted() {
this.tableFrom.page = 1 this.tableFrom.page = 1
this.getList() this.getList()
if(!this.couponData) return;
this.couponData.forEach(row => { this.couponData.forEach(row => {
this.$refs.table.toggleRowSelection(row); this.$refs.table.toggleRowSelection(row);
}); });
@@ -233,7 +236,8 @@ export default {
getList(num) { getList(num) {
this.listLoading = true this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page this.tableFrom.page = num ? num : this.tableFrom.page
marketingListApi(this.tableFrom).then(res => { this.userType ? this.tableFrom.type = 1 : this.tableFrom.type = 3;
marketingSendApi(this.tableFrom).then(res => {
this.tableData.data = res.list this.tableData.data = res.list
this.tableData.total = res.total this.tableData.total = res.total
this.listLoading = false this.listLoading = false

View File

@@ -37,8 +37,8 @@
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="onAdd(data.id)">添加分类</el-dropdown-item> <el-dropdown-item @click.native="onAdd(data.id)">添加分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部分类'" @click.native="onEdit(data.id)">编辑分类</el-dropdown-item> <el-dropdown-item v-if="node.label !== '全部图片'" @click.native="onEdit(data.id)">编辑分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部分类'" @click.native="handleDelete(data.id)">删除分类</el-dropdown-item> <el-dropdown-item v-if="node.label !== '全部图片'" @click.native="handleDelete(data.id)">删除分类</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</span> </span>
@@ -94,7 +94,7 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="pictrueList acea-row"> <div class="pictrueList acea-row" v-loading="loadingPic">
<div v-show="isShowPic" class="imagesNo"> <div v-show="isShowPic" class="imagesNo">
<i class="el-icon-picture" style="font-size: 60px;color: rgb(219, 219, 219);" /> <i class="el-icon-picture" style="font-size: 60px;color: rgb(219, 219, 219);" />
<span class="imagesNo_sp">图片库为空</span> <span class="imagesNo_sp">图片库为空</span>
@@ -184,6 +184,7 @@ export default {
}, },
data() { data() {
return { return {
loadingPic: false,
loading: false, loading: false,
modals: false, modals: false,
allTreeList:[], allTreeList:[],
@@ -318,7 +319,7 @@ export default {
// 表单分类 // 表单分类
handlerGetList() { handlerGetList() {
let datas = { let datas = {
name: '全部分类', name: '全部图片',
id: '' id: ''
} }
treeCategroy(this.treeFrom).then(data => { treeCategroy(this.treeFrom).then(data => {
@@ -334,7 +335,7 @@ export default {
// 所有分类 // 所有分类
getList() { getList() {
const data = { const data = {
name: '全部分类', name: '全部图片',
id: 10000 id: 10000
} }
treeCategroy(this.treeFrom).then(res => { treeCategroy(this.treeFrom).then(res => {
@@ -409,6 +410,7 @@ export default {
// 文件列表 // 文件列表
getFileList() { getFileList() {
if ( this.tableData.pid === 10000) this.tableData.pid = 0 if ( this.tableData.pid === 10000) this.tableData.pid = 0
this.loadingPic = true;
fileListApi(this.tableData).then(async res => { fileListApi(this.tableData).then(async res => {
this.pictrueList.list = res.list this.pictrueList.list = res.list
if(this.tableData.page === 1 && this.pictrueList.list.length > 0) this.pictrueList.list[0].localImg = this.localImg if(this.tableData.page === 1 && this.pictrueList.list.length > 0) this.pictrueList.list[0].localImg = this.localImg
@@ -418,6 +420,9 @@ export default {
this.isShowPic = true this.isShowPic = true
} }
this.pictrueList.total = res.total this.pictrueList.total = res.total
this.loadingPic = false;
}).catch(()=>{
this.loadingPic = false;
}) })
}, },
pageChange(page) { pageChange(page) {

View File

@@ -58,14 +58,6 @@
<span>{{ scope.row.addres }}</span> <span>{{ scope.row.addres }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="是否关注公众号"
min-width="120"
>
<template slot-scope="scope">
<span>{{ scope.row.sex | saxFilter }}</span>
</template>
</el-table-column>
</el-table> </el-table>
<div class="block"> <div class="block">
<el-pagination <el-pagination

View File

@@ -202,3 +202,29 @@ export function onePassTypeFilter(status) {
} }
return statusMap[status] return statusMap[status]
} }
/**
* @description 视频号商品草稿状态
*/
export function editStatusFilter(status) {
const statusMap = {
1: '未审核',
2: '审核中',
3: '审核失败',
4: '审核成功'
}
return statusMap[status]
}
/**
* @description 视频号正式商品状态
*/
export function videoStatusFilter(status) {
const statusMap = {
0: '初始值',
5: '上架',
11: '自主下架',
13: '违规下架/风控系统下架'
}
return statusMap[status]
}

View File

@@ -78,6 +78,7 @@ export default {
background: #f5f5f5; background: #f5f5f5;
/* 84 = navbar + tags-view = 50 + 34 */ /* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px); min-height: calc(100vh - 84px);
overflow-y: scroll;
} }
.fixed-header+.app-main { .fixed-header+.app-main {

View File

@@ -25,7 +25,6 @@ import { mapGetters } from 'vuex'
import Logo from './Logo' import Logo from './Logo'
import SidebarItem from './SidebarItem' import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss' import variables from '@/styles/variables.scss'
export default { export default {
components: { SidebarItem, Logo }, components: { SidebarItem, Logo },
computed: { computed: {

View File

@@ -69,6 +69,16 @@ const maintainRouter = {
icon: 'clipboard' icon: 'clipboard'
}, },
hidden: false hidden: false
},
{
path: 'authCRMEB',
name: 'authCRMEB',
component: () => import('@/views/maintain/authCRMEB'),
meta: {
title: '授权',
icon: 'clipboard'
},
hidden: false
} }
] ]
} }

View File

@@ -46,7 +46,7 @@ const marketingRouter = {
path: 'record', path: 'record',
component: () => import('@/views/marketing/coupon/record/index'), component: () => import('@/views/marketing/coupon/record/index'),
name: 'Record', name: 'Record',
meta: { title: '会员领取记录', icon: '' } meta: { title: '领取记录', icon: '' }
} }
] ]
}, },

View File

@@ -35,7 +35,7 @@ const storeRouter = {
meta: { title: '商品评论', icon: '' } meta: { title: '商品评论', icon: '' }
}, },
{ {
path: 'list/creatProduct/:id?', path: 'list/creatProduct/:id?/:isDisabled?',
component: () => import('@/views/store/creatStore/index'), component: () => import('@/views/store/creatStore/index'),
name: 'SortCreat', name: 'SortCreat',
meta: { title: '商品添加', noCache: true, activeMenu: `/store/index` }, meta: { title: '商品添加', noCache: true, activeMenu: `/store/index` },

View File

@@ -89,6 +89,15 @@
justify-content: space-around; justify-content: space-around;
-webkit-justify-content: space-around; -webkit-justify-content: space-around;
} }
//登录页动画
.index_bg {
width: 100%;
height: 100vh;
background: rgba(0, 0, 0, .6) !important;
z-index: 0 !important;
}
.divBox{ .divBox{
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;

View File

@@ -85,11 +85,11 @@ export function setDomain(url) {
url = url ? url.toString() : ''; url = url ? url.toString() : '';
// 正则替换存在的转义符 // 正则替换存在的转义符
url = url.replace(/\\/g,''); url = url.replace(/\\/g,'');
url = url.replace('http://','https://'); url = window.location.protocol==='https:'? url.replace('http://','https://') : url;
if(url.startsWith('src="')){ if(url.startsWith('src="')){
url = url.replaceAll('src="',''); url = url.replaceAll('src="','');
} }
if(url.startsWith('//img')){ if(url.startsWith('//img') && window.location.protocol==='https:'){
url = url.replace('//img','https://img'); url = url.replace('//img','https://img');
} }
return url; return url;

View File

@@ -6,7 +6,7 @@ import SettingMer from '@/utils/settingMer'
import { isPhone } from "@/libs/wechat"; import { isPhone } from "@/libs/wechat";
const service = axios.create({ const service = axios.create({
baseURL: SettingMer.apiBaseURL, baseURL: SettingMer.apiBaseURL,
timeout: 20000 // 过期时间 timeout: 60000 // 过期时间
}) })
// request interceptor // request interceptor

View File

@@ -78,11 +78,11 @@
<el-form-item label="appid" prop="appid"> <el-form-item label="appid" prop="appid">
<el-input v-model="formValidate.appid" placeholder="请填写appid" class="spwidth" /> <el-input v-model="formValidate.appid" placeholder="请填写appid" class="spwidth" />
</el-form-item> </el-form-item>
<el-form-item label="备用网页" prop="pagepath"> <el-form-item label="备用网页" prop="url">
<el-input v-model="formValidate.pagepath" placeholder="请填写备用网页" class="spwidth" /> <el-input v-model="formValidate.url" placeholder="请填写备用网页" class="spwidth" />
</el-form-item> </el-form-item>
<el-form-item label="小程序路径" prop="url"> <el-form-item label="小程序路径" prop="pagepath">
<el-input v-model="formValidate.url" placeholder="请填写小程序路径" class="spwidth" /> <el-input v-model="formValidate.pagepath" placeholder="请填写小程序路径" class="spwidth" />
</el-form-item> </el-form-item>
</div> </div>
<div v-if="formValidate.type === 'view'"> <div v-if="formValidate.type === 'view'">
@@ -144,7 +144,7 @@
{ required: true, message: '请填写appid', trigger: 'blur' } { required: true, message: '请填写appid', trigger: 'blur' }
], ],
pagepath: [ pagepath: [
{ required: true, message: '请填写备用网页', trigger: 'blur' } { required: true, message: '请填写小程序路径', trigger: 'blur' }
], ],
url: [ url: [
{ required: true, message: '请填写跳转地址', trigger: 'blur' } { required: true, message: '请填写跳转地址', trigger: 'blur' }

View File

@@ -24,7 +24,7 @@
<el-col v-bind="grid" class="ivu-mb"> <el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false" dis-hover :padding="12"> <el-card :bordered="false" dis-hover :padding="12">
<div slot="header" class="acea-row row-between-wrapper"> <div slot="header" class="acea-row row-between-wrapper">
<span>用户访问</span> <span>用户访问</span>
<el-tag type="success">昨日</el-tag> <el-tag type="success">昨日</el-tag>
</div> </div>
<div class="content" v-if="views"> <div class="content" v-if="views">

View File

@@ -17,7 +17,7 @@
<el-form-item prop="storeBrokerageStatus"> <el-form-item prop="storeBrokerageStatus">
<span slot="label"> <span slot="label">
<span>分销模式</span> <span>分销模式</span>
<el-tooltip class="item" effect="dark" content="人人分销”默认每个人都可以分销,“指定分销”仅可后台手动设置推广员,“满额分销”指用户购买商品满足消费金额后自动开启分销" placement="top-start"> <el-tooltip class="item" effect="dark" content="人人分销”默认每个人都可以分销,“指定分销”仅可后台手动设置推广员" placement="top-start">
<i class="el-icon-warning-outline" /> <i class="el-icon-warning-outline" />
</el-tooltip> </el-tooltip>
</span> </span>

View File

@@ -53,43 +53,50 @@
<el-table-column <el-table-column
sortable sortable
prop="spreadCount" prop="spreadCount"
label="推广用户数量" label="推广用户(一级)数量"
min-width="120" :sort-method="(a,b)=>{return a.spreadCount - b.spreadCount}"
min-width="150"
/> />
<el-table-column <el-table-column
sortable sortable
label="推广订单数量" label="推广订单数量"
prop="spreadOrderNum" prop="spreadOrderNum"
:sort-method="(a,b)=>{return a.spreadOrderNum - b.spreadOrderNum}"
min-width="120" min-width="120"
/> />
<el-table-column <el-table-column
sortable sortable
label="推广订单金额" label="推广订单金额"
min-width="120" min-width="120"
:sort-method="(a,b)=>{return a.spreadOrderTotalPrice - b.spreadOrderTotalPrice}"
prop="spreadOrderTotalPrice" prop="spreadOrderTotalPrice"
/> />
<el-table-column <el-table-column
sortable sortable
label="佣金总金额" label="佣金总金额"
min-width="120" min-width="120"
:sort-method="(a,b)=>{return a.totalBrokeragePrice - b.totalBrokeragePrice}"
prop="totalBrokeragePrice" prop="totalBrokeragePrice"
/> />
<el-table-column <el-table-column
sortable sortable
label="已提现金额" label="已提现金额"
min-width="120" min-width="120"
:sort-method="(a,b)=>{return a.extractCountPrice - b.extractCountPrice}"
prop="extractCountPrice" prop="extractCountPrice"
/> />
<el-table-column <el-table-column
sortable sortable
label="已提现次数" label="已提现次数"
min-width="120" min-width="120"
:sort-method="(a,b)=>{return a.extractCountNum - b.extractCountNum}"
prop="extractCountNum" prop="extractCountNum"
/> />
<el-table-column <el-table-column
sortable sortable
label="未提现金额" label="未提现金额"
min-width="120" min-width="120"
:sort-method="(a,b)=>{return a.brokeragePrice - b.brokeragePrice}"
prop="brokeragePrice" prop="brokeragePrice"
/> />
<el-table-column <el-table-column
@@ -209,11 +216,11 @@
min-width="120" min-width="120"
prop="payCount" prop="payCount"
/> />
<el-table-column <!--<el-table-column-->
prop="spreadTime" <!--prop="spreadTime"-->
label="关注时间" <!--label="关注时间"-->
min-width="150" <!--min-width="150"-->
/> <!--/>-->
</el-table> </el-table>
<el-table <el-table
v-if="onName === 'order'" v-if="onName === 'order'"
@@ -239,7 +246,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="updateTime"
label="时间" label="时间"
min-width="150" min-width="150"
/> />
@@ -247,7 +254,7 @@
sortable sortable
label="返佣金额" label="返佣金额"
min-width="120" min-width="120"
prop="deductionPrice" prop="price"
/> />
</el-table> </el-table>
<div class="block"> <div class="block">
@@ -322,8 +329,8 @@
this.cardLists = [ this.cardLists = [
{ name: '分销人员人数', count: res.distributionNum }, { name: '分销人员人数', count: res.distributionNum },
{ name: '发展会员人数', count: res.developNum }, { name: '发展会员人数', count: res.developNum },
{ name: '订单总数', count: res.orderNum }, { name: '推广总数', count: res.orderNum },
{ name: '订单金额(元)', count: res.orderPriceCount }, { name: '推广金额(元)', count: res.orderPriceCount },
{ name: '提现次数', count: res.withdrawCount } { name: '提现次数', count: res.withdrawCount }
] ]
}) })
@@ -423,7 +430,7 @@
this.tableFrom.page = 1 this.tableFrom.page = 1
this.timeVal = [] this.timeVal = []
this.spreadStatistics() this.spreadStatistics()
// this.getList() this.getList()
}, },
// 具体日期 // 具体日期
onchangeTime(e) { onchangeTime(e) {

View File

@@ -59,7 +59,7 @@
:default-sort = "{prop: 'brokerage', order: 'descending'}" :default-sort = "{prop: 'brokerage', order: 'descending'}"
prop="brokerage" prop="brokerage"
label="账户佣金" label="账户佣金"
min-width="200" min-width="100"
/> />
<el-table-column <el-table-column
sortable sortable

View File

@@ -3,7 +3,7 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<div class="container"> <div class="container">
<el-form size="small" label-width="100px"> <el-form size="small" label-width="100px" inline>
<el-form-item label="时间选择:" class="width100"> <el-form-item label="时间选择:" class="width100">
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)"> <el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button> <el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
@@ -17,8 +17,13 @@
<!--<el-radio-button label="0">未支付</el-radio-button>--> <!--<el-radio-button label="0">未支付</el-radio-button>-->
<!--</el-radio-group>--> <!--</el-radio-group>-->
<!--</el-form-item>--> <!--</el-form-item>-->
<el-form-item label="关键字:" class="width100"> <el-form-item label="用户id">
<el-input v-model="tableFrom.keywords" placeholder="微信昵称/姓名/订单号" class="selWidth" size="small" clearable> <el-input v-model="tableFrom.uid" placeholder="用户id" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
<el-form-item label="订单号:">
<el-input v-model="tableFrom.keywords" placeholder="订单号" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" /> <el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input> </el-input>
</el-form-item> </el-form-item>
@@ -35,8 +40,8 @@
highlight-current-row highlight-current-row
> >
<el-table-column <el-table-column
prop="id" prop="uid"
label="ID" label="UID"
width="60" width="60"
/> />
<el-table-column <el-table-column
@@ -156,7 +161,8 @@
}, },
listLoading: true, listLoading: true,
tableFrom: { tableFrom: {
paid: '', uid: '',
// paid: '',
dateLimit: '', dateLimit: '',
keywords: '', keywords: '',
page: 1, page: 1,

View File

@@ -92,6 +92,7 @@
<script> <script>
import { validUsername } from '@/utils/validate' import { validUsername } from '@/utils/validate'
import "@/assets/js/canvas-nest.min.js";
import { getLoginPicApi, captchaApi, codeCheckApi } from '@/api/user' import { getLoginPicApi, captchaApi, codeCheckApi } from '@/api/user'
import { getStoreStaff } from '@/libs/public' import { getStoreStaff } from '@/libs/public'
import { getWXCodeByUrl, loginByWxCode } from "@/libs/wechat"; import { getWXCodeByUrl, loginByWxCode } from "@/libs/wechat";
@@ -191,6 +192,15 @@ export default {
}, },
mounted() { mounted() {
this.getInfo() this.getInfo()
this.$nextTick(() => {
if (this.screenWidth < 768) {
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
} else {
document.getElementsByTagName("canvas")[0].className = "index_bg";
}
});
if (this.loginForm.account === '') { if (this.loginForm.account === '') {
this.$refs.account.focus() this.$refs.account.focus()
} else if (this.loginForm.pwd === '') { } else if (this.loginForm.pwd === '') {
@@ -199,11 +209,23 @@ export default {
this.getCaptcha() this.getCaptcha()
this.agentWeiXinLogin() this.agentWeiXinLogin()
}, },
beforeCreate() {
if (this.fullWidth < 768) {
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
} else {
document.getElementsByTagName("canvas")[0].className = "index_bg";
}
},
destroyed() { destroyed() {
// window.removeEventListener('storage', this.afterQRScan) // window.removeEventListener('storage', this.afterQRScan)
}, },
beforeDestroy: function() { beforeDestroy: function() {
window.removeEventListener('resize', this.handleResize) window.removeEventListener('resize', this.handleResize)
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
}, },
methods: { methods: {
agentWeiXinLogin(){ // 判断是否需要微信公众号登陆 agentWeiXinLogin(){ // 判断是否需要微信公众号登陆
@@ -237,6 +259,13 @@ export default {
}, },
handleResize(event) { handleResize(event) {
this.fullWidth = document.body.clientWidth this.fullWidth = document.body.clientWidth
if (this.fullWidth < 768) {
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
} else {
document.getElementsByTagName("canvas")[0].className = "index_bg";
}
}, },
getInfo() { getInfo() {
getLoginPicApi().then(res => { getLoginPicApi().then(res => {

View File

@@ -0,0 +1,11 @@
import iHeaderI18n from '@/layouts/basic-layout/header-i18n'
import { mapState } from 'vuex'
export default {
components: { iHeaderI18n },
computed: {
...mapState('admin/layout', [
'showI18n'
])
}
}

View File

@@ -0,0 +1,24 @@
<template>
<div class="divBox">
<el-card class="box-card">
<div class="acea-row row-center-wrapper">
<el-button type="primary" @click="onClick">申请授权</el-button>
</div>
</el-card>
</div>
</template>
<script>
export default {
name: "index",
methods:{
onClick() {
window.open('http://crmeb.com/web/auth/apply')
}
}
}
</script>
<style scoped>
</style>

View File

@@ -218,9 +218,6 @@
<el-form-item label="商品详情:"> <el-form-item label="商品详情:">
<ueditor-from v-model="formValidate.content" :content="formValidate.content" /> <ueditor-from v-model="formValidate.content" :content="formValidate.content" />
</el-form-item> </el-form-item>
<el-form-item label="商品规则:">
<ueditor-from v-model="formValidate.rule" :content="formValidate.rule" />
</el-form-item>
</div> </div>
<el-form-item style="margin-top:30px;"> <el-form-item style="margin-top:30px;">
<el-button <el-button
@@ -300,8 +297,7 @@
startTime: '', startTime: '',
stopTime: '', stopTime: '',
timeVal: [], timeVal: [],
status: 0, status: 0
rule: ''
} }
const objTitle = { const objTitle = {
price: { price: {
@@ -565,8 +561,7 @@
status: 0, status: 0,
num : 1, num : 1,
bargainNum : 2, bargainNum : 2,
peopleNum : 1, peopleNum : 1
rule : ''
} }
if(res.specType){ if(res.specType){
res.attrValues.forEach((row) => { res.attrValues.forEach((row) => {
@@ -614,8 +609,7 @@
status: res.status, status: res.status,
num : res.num, num : res.num,
bargainNum : res.bargainNum, bargainNum : res.bargainNum,
peopleNum : res.peopleNum, peopleNum : res.peopleNum
rule : res.rule
} }
if(res.specType){ if(res.specType){
this.ManyAttrValue = res.attrValues; this.ManyAttrValue = res.attrValues;

View File

@@ -108,12 +108,13 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="130" fixed="right"> <el-table-column label="操作" min-width="180" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" class="mr10" size="small" @click="receive(scope.row)">领取记录</el-button> <el-button type="text" class="mr10" size="small" @click="receive(scope.row)">领取记录</el-button>
<router-link :to=" { path: '/marketing/coupon/list/save/' + scope.row.id } "> <router-link :to=" { path: '/marketing/coupon/list/save/' + scope.row.id } ">
<el-button v-if="scope.row.status" type="text" size="small">复制</el-button> <el-button v-if="scope.row.status" type="text" size="small" class="mr10">复制</el-button>
</router-link> </router-link>
<el-button type="text" class="mr10" size="small" @click="handleDelMenu(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -179,7 +180,7 @@
</template> </template>
<script> <script>
import { marketingListApi, couponIssueStatusApi, couponUserListApi } from '@/api/marketing' import { marketingListApi, couponIssueStatusApi, couponUserListApi, couponDeleteApi } from '@/api/marketing'
import { roterPre } from '@/settings' import { roterPre } from '@/settings'
export default { export default {
name: 'CouponList', name: 'CouponList',
@@ -274,7 +275,15 @@
}).catch(()=>{ }).catch(()=>{
row.status = !row.status row.status = !row.status
}) })
} },
handleDelMenu(rowData) {
this.$confirm('确定删除当前数据?').then(() => {
couponDeleteApi({id: rowData.id}).then(data => {
this.$message.success('删除成功')
this.getList()
})
})
},
} }
} }
</script> </script>

View File

@@ -13,7 +13,7 @@
</el-form-item> </el-form-item>
<el-form-item label="领取人:"> <el-form-item label="领取人:">
<el-select v-model="tableFromIssue.uid" class="selWidth" reserve-keyword remote filterable <el-select v-model="tableFromIssue.uid" class="selWidth" reserve-keyword remote filterable
:remote-method="remoteMethod" :loading="loading" placeholder="请输入用户名称" clearable @change="seachList"> :remote-method="remoteMethod" :loading="loading" placeholder="请输入领取人" clearable @change="seachList">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.uid" :key="item.uid"

View File

@@ -15,15 +15,9 @@
@change="onchangeTime"/> @change="onchangeTime"/>
</el-form-item> </el-form-item>
<el-form-item label="用户微信昵称:"> <el-form-item label="用户微信昵称:">
<el-select v-model="tableFrom.userIdList" style="width: 500px" reserve-keyword multiple remote filterable <el-input v-model="tableFrom.keywords" placeholder="请输入用户微信昵称" class="selWidth" size="small">
:remote-method="remoteMethod" :loading="loading" placeholder="请输入用户微信昵称" clearable @change="seachList"> <el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
<el-option </el-input>
v-for="item in options"
:key="item.uid"
:label="item.nickname"
:value="item.uid">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@@ -58,8 +52,8 @@
sortable sortable
label="明细数字" label="明细数字"
min-width="120" min-width="120"
prop="number" prop="integral"
:sort-method="(a,b)=>{return a.number - b.number}" :sort-method="(a,b)=>{return a.integral - b.integral}"
/> />
<el-table-column <el-table-column
label="备注" label="备注"
@@ -72,7 +66,7 @@
prop="nickName" prop="nickName"
/> />
<el-table-column <el-table-column
prop="createTime" prop="updateTime"
label=" 添加时间" label=" 添加时间"
min-width="150" min-width="150"
/> />
@@ -94,7 +88,6 @@
<script> <script>
import { integralListApi } from '@/api/marketing' import { integralListApi } from '@/api/marketing'
import { userListApi } from '@/api/user'
import cardsData from '@/components/cards/index' import cardsData from '@/components/cards/index'
export default { export default {
components: { cardsData }, components: { cardsData },
@@ -111,9 +104,8 @@
tableFrom: { tableFrom: {
page: 1, page: 1,
limit: 20, limit: 20,
category: 'integral',
dateLimit: '', dateLimit: '',
userIdList: [] keywords: ''
}, },
userIdList: [], userIdList: [],
userList: [], userList: [],
@@ -126,19 +118,6 @@
// this.getUserList() // this.getUserList()
}, },
methods: { methods: {
remoteMethod(query) {
if (query !== '') {
this.loading = true;
setTimeout(() => {
this.loading = false;
userListApi({keywords: query, page: 1, limit: 10}).then(res => {
this.options = res.list
})
}, 200);
} else {
this.options = [];
}
},
seachList() { seachList() {
this.tableFrom.page = 1 this.tableFrom.page = 1
this.getList() this.getList()

View File

@@ -3,13 +3,10 @@
<div class="priceChange" :class="change === true ? 'on' : ''"> <div class="priceChange" :class="change === true ? 'on' : ''">
<div class="priceTitle"> <div class="priceTitle">
{{ {{
status === 0 || status === 2 status === 0 || status === 2 ? orderInfo.refundStatus === 1 ? "立即退款" : "一键改价" : status === 1?"订单备注":"拒绝原因"
? orderInfo.refundStatus === 1
? "立即退款"
: "一键改价"
: "订单备注"
}} }}
<span class="iconfont icon-guanbi" @click="close"></span> <i class="el-icon-circle-close iconfonts" @click="close"></i>
<!--<span class="iconfont icon-guanbi" @click="close"></span>-->
</div> </div>
<div class="listChange" v-if="status === 0 || status === 2"> <div class="listChange" v-if="status === 0 || status === 2">
<div <div
@@ -68,6 +65,12 @@
</div> </div>
</div> </div>
</div> </div>
<div class="listChange" v-else-if="status === 3">
<textarea
placeholder="请填写退款原因"
v-model="reason" maxlength="100"
></textarea>
</div>
<div class="listChange" v-else> <div class="listChange" v-else>
<textarea <textarea
:placeholder=" :placeholder="
@@ -77,11 +80,11 @@
></textarea> ></textarea>
</div> </div>
<div class="modify" @click="save"> <div class="modify" @click="save">
{{ orderInfo.refundStatus === 0 || status === 1 ? "立即修改" : "确认退款" }} {{ orderInfo.refundStatus === 0 || status === 1 || status === 3 ? "立即提交" : "确认退款" }}
</div>
<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1 && status === 2">
拒绝退款
</div> </div>
<!--<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1 && status === 2">-->
<!--拒绝退款-->
<!--</div>-->
</div> </div>
<div class="maskModel" @touchmove.prevent v-show="change === true"></div> <div class="maskModel" @touchmove.prevent v-show="change === true"></div>
</div> </div>
@@ -109,7 +112,8 @@
focus: false, focus: false,
price: 0, price: 0,
refundPrice: 0, refundPrice: 0,
remark: "" remark: "",
reason: ''
}; };
}, },
watch: { watch: {
@@ -131,14 +135,17 @@
this.$emit("closechange", false); this.$emit("closechange", false);
}, },
save() { save() {
this.savePrice({ if(this.status === 3) {
price: this.price, this.refuse();
refundPrice: this.refundPrice, }else{
type: 1, this.savePrice({
remark: this.remark, price: this.price,
id: this.orderInfo.id, refundPrice: this.refundPrice,
orderId: this.orderInfo.orderId type: 1,
}) remark: this.remark,
orderId: this.orderInfo.orderId
})
}
}, },
async savePrice(opt) { async savePrice(opt) {
let that = this, let that = this,
@@ -159,7 +166,7 @@
return validatorDefaultCatch(e); return validatorDefaultCatch(e);
} }
data.price = price; data.price = price;
data.orderId = opt.orderId; data.orderNo = opt.orderId;
editPriceApi(data).then(() => { editPriceApi(data).then(() => {
// that.change = false; // that.change = false;
this.$emit("closechange", false); this.$emit("closechange", false);
@@ -182,7 +189,7 @@
} }
data.amount = refundPrice; data.amount = refundPrice;
data.type = opt.type; data.type = opt.type;
data.orderId = opt.id; data.orderNo = opt.orderId;
orderRefundApi(data).then( orderRefundApi(data).then(
res => { res => {
this.$emit("closechange", false); this.$emit("closechange", false);
@@ -205,7 +212,7 @@
return validatorDefaultCatch(e); return validatorDefaultCatch(e);
} }
data.mark = remark; data.mark = remark;
data.id = opt.id; data.orderNo = opt.orderId;
orderMarkApi(data).then( orderMarkApi(data).then(
res => { res => {
this.$emit("closechange", false); this.$emit("closechange", false);
@@ -222,9 +229,16 @@
); );
} }
}, },
refuse: function () { async refuse() {
let that = this; let reason= this.reason;
that.$emit("getRefuse", this.orderInfo.id); try {
await this.$validator({
reason: [required(required.message("备注"))]
}).validate({reason});
} catch (e) {
return validatorDefaultCatch(e);
}
this.$emit("getRefuse", this.orderInfo.orderId, reason);
} }
} }
}; };
@@ -235,7 +249,7 @@
transform: scale(0);opacity:0;} transform: scale(0);opacity:0;}
.priceChange.on{opacity:1;transform: scale(1);-webkit-transform:scale(1);-o-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);} .priceChange.on{opacity:1;transform: scale(1);-webkit-transform:scale(1);-o-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);}
.priceChange .priceTitle{background:url("../../../assets/imgs/pricetitle.jpg") no-repeat;background-size:100% 100%;width:100%;height:1.6rem;border-radius:0.1rem 0.1rem 0 0;text-align:center;font-size:0.4rem;color:#fff;line-height:1.6rem;position:relative;} .priceChange .priceTitle{background:url("../../../assets/imgs/pricetitle.jpg") no-repeat;background-size:100% 100%;width:100%;height:1.6rem;border-radius:0.1rem 0.1rem 0 0;text-align:center;font-size:0.4rem;color:#fff;line-height:1.6rem;position:relative;}
.priceChange .priceTitle .iconfont{position:absolute;font-size:0.4rem;right:0.26rem;top:0.23rem;width:0.4rem;height:0.4rem;line-height:0.4rem;} .priceChange .priceTitle .iconfonts{position:absolute;font-size:0.4rem;right:0.26rem;top:0.23rem;width:0.4rem;height:0.4rem;line-height:0.4rem;}
.priceChange .listChange{padding:0 0.4rem;} .priceChange .listChange{padding:0 0.4rem;}
.priceChange .listChange .item{height:1.03rem;border-bottom:1px solid #e3e3e3;font-size:0.32rem;color:#333;} .priceChange .listChange .item{height:1.03rem;border-bottom:1px solid #e3e3e3;font-size:0.32rem;color:#333;}
.priceChange .listChange .item .money{color:#666;width:3rem;text-align:right;} .priceChange .listChange .item .money{color:#666;width:3rem;text-align:right;}

View File

@@ -1,7 +1,7 @@
<template> <template>
<div v-show="iShidden === false"> <div v-show="iShidden === false">
<div class="WriteOff"> <div class="WriteOff">
<div class="pictrue"><img :src="orderInfo.storeOrderInfoVos[0].info.productInfo.image" /></div> <div class="pictrue"><img :src="orderInfo.storeOrderInfoVos[0].info.image" /></div>
<div class="num acea-row row-center-wrapper"> <div class="num acea-row row-center-wrapper">
{{ orderInfo.orderId }} {{ orderInfo.orderId }}
<div class="views" @click="toDetail(orderInfo)"> <div class="views" @click="toDetail(orderInfo)">
@@ -37,7 +37,7 @@ export default {
methods: { methods: {
toDetail: function(item) { toDetail: function(item) {
this.$router.push({ this.$router.push({
path: "/javaMobile/orderDetail/" + item.id + "/looks" path: "/javaMobile/orderDetail/" + item.orderId + "/looks"
}); });
}, },
cancel: function() { cancel: function() {

View File

@@ -4,7 +4,7 @@
<div class="order-num acea-row row-between-wrapper"> <div class="order-num acea-row row-between-wrapper">
<div class="num line1">订单号{{ orderId }}</div> <div class="num line1">订单号{{ orderId }}</div>
<div class="name line1"> <div class="name line1">
<span class="iconfont icon-yonghu2"></span>{{ delivery.user.nickname }} <span class="iconfont icon-yonghu2"></span>{{ delivery.nickname }}
</div> </div>
</div> </div>
<div class="address"> <div class="address">
@@ -34,10 +34,10 @@
<div class="list" v-show="active === 0"> <div class="list" v-show="active === 0">
<div class="item acea-row row-between-wrapper"> <div class="item acea-row row-between-wrapper">
<div>发货方式</div> <div>发货方式</div>
<select class="mode" v-model="expressId"> <select class="mode" v-model="expressCode">
<option value="">选择快递公司</option> <option value="">选择快递公司</option>
<option <option
:value="item.id" :value="item.code"
v-for="(item, index) in express" v-for="(item, index) in express"
:key="index" :key="index"
>{{ item.name }}</option >{{ item.name }}</option
@@ -50,7 +50,7 @@
<input <input
type="text" type="text"
placeholder="填写快递单号" placeholder="填写快递单号"
v-model="expressCode" v-model="expressNumber"
class="mode" class="mode"
/> />
</div> </div>
@@ -61,7 +61,7 @@
<input <input
type="text" type="text"
placeholder="填写送货人" placeholder="填写送货人"
v-model="expressId" v-model="deliveryName"
class="mode" class="mode"
/> />
</div> </div>
@@ -70,7 +70,7 @@
<input <input
type="text" type="text"
placeholder="填写送货电话" placeholder="填写送货电话"
v-model="expressCode" v-model="deliveryTel"
class="mode" class="mode"
/> />
</div> </div>
@@ -111,8 +111,10 @@ export default {
delivery: {}, delivery: {},
express: [], express: [],
type: "1", type: "1",
expressId: "", deliveryName: "",
expressCode: "" expressCode: "",
expressNumber: '',
deliveryTel: ""
}; };
}, },
watch: { watch: {
@@ -133,14 +135,16 @@ export default {
this.getLogistics(); this.getLogistics();
}, },
methods: { methods: {
changeType: function(item, index) { changeType(item, index) {
this.active = index; this.active = index;
this.type = item.type; this.type = item.type;
this.expressId = ""; this.deliveryName = "";
this.deliveryTel = "";
this.expressCode = ""; this.expressCode = "";
this.expressNumber = "";
}, },
getIndex() { getIndex() {
orderDetailApi({ id: this.$route.params.id }).then(res => { orderDetailApi({ orderNo: this.orderId }).then(res => {
this.delivery = res this.delivery = res
}).catch((error)=>{ }).catch((error)=>{
this.$dialog.error(error.message); this.$dialog.error(error.message);
@@ -152,14 +156,29 @@ export default {
}) })
}, },
async saveInfo() { async saveInfo() {
// type: '1',
// expressRecordType: '1',
// expressId: '',
// expressCode: '',
// deliveryName: '',
// deliveryTel: '',
// // expressName: '',
// expressNumber: '',
// expressTempId: '',
// toAddr: '',
// toName: '',
// toTel: '',
// orderNo: ''
let that = this, let that = this,
type = that.type, deliveryName = that.deliveryName,
expressId = that.expressId, deliveryTel = that.deliveryTel,
expressCode = that.expressCode,
save = {}; save = {};
save.id = that.$route.params.id;
save.type = that.type; save.type = that.type;
switch (type) { save.orderNo = that.orderId;
switch (that.type) {
case "1": case "1":
// try { // try {
// await this.$validator({ // await this.$validator({
@@ -169,24 +188,24 @@ export default {
// } catch (e) { // } catch (e) {
// return validatorDefaultCatch(e); // return validatorDefaultCatch(e);
// } // }
if( !that.expressId ) return that.$dialog.error('请输入快递公司'); if( !that.expressCode ) return that.$dialog.error('请输入快递公司');
if( !that.expressCode ) return that.$dialog.error('请输入快递单号'); if( !that.expressNumber ) return that.$dialog.error('请输入快递单号');
save.expressId = expressId; save.expressNumber = that.expressNumber;
save.expressCode = expressCode; save.expressRecordType = 1;
save.id = this.$route.params.id; save.expressCode = that.expressCode;
that.setInfo(save); that.setInfo(save);
break; break;
case "2": case "2":
try { try {
await this.$validator({ await this.$validator({
expressId: [required(required.message("发货人姓名"))], deliveryName: [required(required.message("发货人姓名"))],
expressCode: [required(required.message("发货人电话"))] deliveryTel: [required(required.message("发货人电话"))]
}).validate({ expressId, expressCode }); }).validate({ deliveryName, deliveryTel });
} catch (e) { } catch (e) {
return validatorDefaultCatch(e); return validatorDefaultCatch(e);
} }
save.expressId = expressId; save.deliveryName = deliveryName;
save.expressCode = expressCode; save.deliveryTel = deliveryTel;
that.setInfo(save); that.setInfo(save);
break; break;
case "3": case "3":

View File

@@ -43,19 +43,19 @@
> >
<div class="picTxt acea-row row-between-wrapper"> <div class="picTxt acea-row row-between-wrapper">
<div class="pictrue"> <div class="pictrue">
<img :src="item.info.productInfo.image"/> <img :src="item.info.image"/>
</div> </div>
<div class="text"> <div class="text">
<div class="info line2"> <div class="info line2">
{{ item.info.productInfo.storeName }} {{ item.info.productName }}
</div> </div>
<div class="attr">{{ item.info.productInfo.attrInfo.suk }}</div> <div class="attr">{{ item.info.sku }}</div>
</div> </div>
</div> </div>
<div class="money"> <div class="money">
<div class="x-money">{{ item.info.productInfo.price }}</div> <div class="x-money">{{ item.info.price }}</div>
<div class="num">x{{ item.info.cartNum }}</div> <div class="num">x{{ item.info.payNum }}</div>
<div class="y-money">{{ item.info.productInfo.otPrice }}</div> <!--<div class="y-money">{{ item.info.price }}</div>-->
</div> </div>
</div> </div>
</div> </div>
@@ -249,7 +249,7 @@ export default {
}, },
getIndex: function() { getIndex: function() {
let that = this; let that = this;
orderDetailApi({id: this.$route.params.id}).then( orderDetailApi({orderNo: this.$route.params.id}).then(
res => { res => {
that.orderInfo = res; that.orderInfo = res;
that.types = res.statusStr.key; that.types = res.statusStr.key;

View File

@@ -63,20 +63,20 @@
> >
<div class="picTxt acea-row row-between-wrapper"> <div class="picTxt acea-row row-between-wrapper">
<div class="pictrue"> <div class="pictrue">
<img :src="val.info.productInfo.image" /> <img :src="val.info.image" />
</div> </div>
<div class="text "> <div class="text ">
<div class="info line2"> <div class="info line2">
{{ val.info.productInfo.storeName }} {{ val.info.productName }}
</div> </div>
<div class="attr" v-if="val.info.productInfo.attrInfo.suk"> <div class="attr" v-if="val.info.sku">
{{ val.info.productInfo.attrInfo.suk }} {{ val.info.sku }}
</div> </div>
</div> </div>
</div> </div>
<div class="money"> <div class="money">
<div class="x-money">{{ val.info.productInfo.attrInfo.price }}</div> <div class="x-money">{{ val.info.price }}</div>
<div class="num">x{{ val.info.cartNum }}</div> <div class="num">x{{ val.info.payNum }}</div>
<div class="y-money"> <div class="y-money">
<!--{{ val.info.productInfo.attrInfo.otPrice }}--> <!--{{ val.info.productInfo.attrInfo.otPrice }}-->
</div> </div>
@@ -113,6 +113,13 @@
> >
立即退款 立即退款
</div> </div>
<div
class="bnt"
@click="modify(item, 3)"
v-if="where.status === 'refunding' && item.refundStatus === 1"
>
拒绝退款
</div>
<!--<div--> <!--<div-->
<!--class="bnt cancel"--> <!--class="bnt cancel"-->
<!--v-if="item.pay_type === 'offline' && item.paid === 0"--> <!--v-if="item.pay_type === 'offline' && item.paid === 0"-->
@@ -147,6 +154,7 @@
:orderInfo="orderInfo" :orderInfo="orderInfo"
v-on:closechange="changeclose($event)" v-on:closechange="changeclose($event)"
:status="status" :status="status"
@getRefuse="getRefuse"
></PriceChange> ></PriceChange>
</div> </div>
</template> </template>
@@ -220,13 +228,13 @@
this.init() this.init()
}, },
// 拒绝退款 // 拒绝退款
getRefuse(id) { getRefuse(id, reason) {
orderRefuseApi(data).then(() =>{ orderRefuseApi({ orderNo: id, reason: reason}).then(() =>{
that.change = false; this.change = false;
that.$dialog.success("已拒绝退款"); this.$dialog.success("已拒绝退款");
that.init(); this.init();
}).catch((error) => { }).catch((error) => {
that.$dialog.error(error.message); this.$dialog.error(error.message);
}); });
}, },
async savePrice(opt) { async savePrice(opt) {
@@ -247,7 +255,7 @@
return validatorDefaultCatch(e); return validatorDefaultCatch(e);
} }
data.price = price; data.price = price;
data.orderId = opt.orderId; data.orderNo = opt.orderId;
editPriceApi(data).then(() =>{ editPriceApi(data).then(() =>{
that.change = false; that.change = false;
that.$dialog.success("改价成功"); that.$dialog.success("改价成功");
@@ -268,7 +276,7 @@
} }
data.amount = refundPrice; data.amount = refundPrice;
data.type = opt.type; data.type = opt.type;
data.orderId = opt.orderId; data.orderNo = opt.orderId;
orderRefundApi(data).then( orderRefundApi(data).then(
res => { res => {
that.change = false; that.change = false;
@@ -289,7 +297,7 @@
return validatorDefaultCatch(e); return validatorDefaultCatch(e);
} }
data.mark = remark; data.mark = remark;
data.id = opt.id; data.orderNo = opt.orderId;
orderMarkApi(data).then( orderMarkApi(data).then(
res => { res => {
that.change = false; that.change = false;
@@ -317,8 +325,8 @@
orderListApi(this.where).then( orderListApi(this.where).then(
res => { res => {
this.loading = false; this.loading = false;
this.loaded = res.list.list.length < this.where.limit; this.loaded = res.list.length < this.where.limit;
this.list.push.apply(this.list, res.list.list); this.list.push.apply(this.list, res.list);
this.where.page = this.where.page + 1; this.where.page = this.where.page + 1;
}, },
err => { err => {
@@ -333,7 +341,7 @@
} }
}, },
toDetail(item) { toDetail(item) {
this.$router.push({ path: "/javaMobile/orderDetail/" + item.id }); this.$router.push({ path: "/javaMobile/orderDetail/" + item.orderId });
}, },
offlinePay(item) { offlinePay(item) {
// setOfflinePay({ order_id: item.order_id }).then( // setOfflinePay({ order_id: item.order_id }).then(

View File

@@ -31,8 +31,18 @@
</el-radio-group> </el-radio-group>
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" @change="onchangeTime" /> <el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" @change="onchangeTime" />
</el-form-item> </el-form-item>
<el-form-item label="订单类型:" class="width100">
<el-select v-model="tableFrom.type" placeholder="请选择" class="selWidth" @change="seachList">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="订单号:" class="width100"> <el-form-item label="订单号:" class="width100">
<el-input v-model="tableFrom.orderId" placeholder="请输入订单号" class="selWidth" size="small" clearable> <el-input v-model="tableFrom.orderNo" placeholder="请输入订单号" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" /> <el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
</el-input> </el-input>
</el-form-item> </el-form-item>
@@ -49,27 +59,27 @@
highlight-current-row highlight-current-row
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="expand"> <!--<el-table-column type="expand">-->
<template slot-scope="props"> <!--<template slot-scope="props">-->
<el-form label-position="left" inline class="demo-table-expand"> <!--<el-form label-position="left" inline class="demo-table-expand">-->
<el-form-item label="商品总价:"> <!--<el-form-item label="商品总价:">-->
<span>{{ props.row.totalPrice }}</span> <!--<span>{{ props.row.totalPrice | filterEmpty }}</span>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="推广人:"> <!--<el-form-item label="推广人:">-->
<span>{{ props.row.spreadInfo.id + ' / ' + props.row.spreadInfo.name }}</span> <!--<span>{{ props.row.spreadInfo.id + ' / ' + props.row.spreadInfo.name }}</span>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="用户备注:"> <!--<el-form-item label="用户备注:">-->
<span>{{ props.row.mark }}</span> <!--<span>{{ props.row.mark | filterEmpty }}</span>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="商家备注:"> <!--<el-form-item label="商家备注:">-->
<span>{{ props.row.remark }}</span> <!--<span>{{ props.row.remark | filterEmpty }}</span>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="核销码:" v-if="props.row.shippingType === 2"> <!--<el-form-item label="核销码:" v-if="props.row.verifyCode">-->
<span>{{ props.row.verifyCode }}</span> <!--<span>{{ props.row.verifyCode }}</span>-->
</el-form-item> <!--</el-form-item>-->
</el-form> <!--</el-form>-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column <el-table-column
type="selection" type="selection"
width="55" width="55"
@@ -102,13 +112,13 @@
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle" style="flex-wrap: inherit;"> <div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle" style="flex-wrap: inherit;">
<div class="demo-image__preview mr10"> <div class="demo-image__preview mr10">
<el-image <el-image
:src="val.info.productInfo.image" :src="val.info.image"
:preview-src-list="[val.info.productInfo.image]" :preview-src-list="[val.info.image]"
/> />
</div> </div>
<div> <div>
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span> <span class="tabBox_tit mr10">{{ val.info.productName + ' | ' }}{{ val.info.sku ? val.info.sku:'-' }}</span>
<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span> <span class="tabBox_pice">{{ '¥'+ val.info.price ? val.info.price + ' x '+ val.info.payNum : '-' }}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -162,15 +172,15 @@
<el-table-column label="操作" min-width="150" fixed="right" align="center"> <el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.paid === false" type="text" size="small" @click="edit(scope.row)" class="mr10">编辑</el-button> <el-button v-if="scope.row.paid === false" type="text" size="small" @click="edit(scope.row)" class="mr10">编辑</el-button>
<el-button v-if="scope.row.statusStr.key === 'notShipped' && scope.row.shippingType === 1 && scope.row.refundStatus !==2" type="text" size="small" class="mr10" @click="sendOrder(scope.row)">发送货</el-button> <el-button v-if="scope.row.statusStr.key === 'notShipped' && scope.row.refundStatus ===0" type="text" size="small" class="mr10" @click="sendOrder(scope.row)">发送货</el-button>
<el-button v-if="scope.row.shippingType === 2 && scope.row.statusStr.key === 'toBeWrittenOff' && scope.row.paid == true && scope.row.refundStatus === 0 " type="text" size="small" class="mr10" @click="onWriteOff(scope.row)">立即核销</el-button> <el-button v-if=" scope.row.statusStr.key === 'toBeWrittenOff' && scope.row.paid == true && scope.row.refundStatus === 0 " type="text" size="small" class="mr10" @click="onWriteOff(scope.row)">立即核销</el-button>
<el-dropdown trigger="click"> <el-dropdown trigger="click">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
更多<i class="el-icon-arrow-down el-icon--right" /> 更多<i class="el-icon-arrow-down el-icon--right" />
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="onOrderDetails(scope.row.id)">订单详情</el-dropdown-item> <el-dropdown-item @click.native="onOrderDetails(scope.row.orderId)">订单详情</el-dropdown-item>
<el-dropdown-item @click.native="onOrderLog(scope.row.id)">订单记录</el-dropdown-item> <el-dropdown-item @click.native="onOrderLog(scope.row.orderId)">订单记录</el-dropdown-item>
<el-dropdown-item @click.native="onOrderMark(scope.row)">订单备注</el-dropdown-item> <el-dropdown-item @click.native="onOrderMark(scope.row)">订单备注</el-dropdown-item>
<el-dropdown-item v-show="scope.row.refundStatus === 1" @click.native="onOrderRefuse(scope.row)">拒绝退款</el-dropdown-item> <el-dropdown-item v-show="scope.row.refundStatus === 1" @click.native="onOrderRefuse(scope.row)">拒绝退款</el-dropdown-item>
<!--v-show="((scope.row.statusStr.key !== 'refunded' && scope.row.statusStr.key !== 'unPaid') && (parseFloat(scope.row.payPrice) >= parseFloat(scope.row.refundPrice))) || (scope.row.payPrice == 0 && [0,1].indexOf(scope.row.refundStatus) !== -1)"--> <!--v-show="((scope.row.statusStr.key !== 'refunded' && scope.row.statusStr.key !== 'unPaid') && (parseFloat(scope.row.payPrice) >= parseFloat(scope.row.refundPrice))) || (scope.row.payPrice == 0 && [0,1].indexOf(scope.row.refundStatus) !== -1)"-->
@@ -259,6 +269,9 @@
<!-- 发送货 --> <!-- 发送货 -->
<order-send ref="send" :orderId="orderId" @submitFail="getList"></order-send> <order-send ref="send" :orderId="orderId" @submitFail="getList"></order-send>
<!-- 发送货视频号商品 -->
<order-video-send ref="videoSend" :orderId="orderId" @submitFail="getList"></order-video-send>
<!--拒绝退款--> <!--拒绝退款-->
<el-dialog <el-dialog
title="拒绝退款原因" title="拒绝退款原因"
@@ -274,7 +287,7 @@
/> />
</el-dialog> </el-dialog>
<!--立即拒绝--> <!--立即退款-->
<el-dialog <el-dialog
title="退款处理" title="退款处理"
:visible.sync="refundVisible" :visible.sync="refundVisible"
@@ -293,11 +306,12 @@
</template> </template>
<script> <script>
import { writeUpdateApi, orderListApi, orderUpdateApi, orderLogApi, orderMarkApi, orderDeleteApi, orderRefuseApi, orderRefundApi } from '@/api/order' import { orderListDataApi, orderStatusNumApi, writeUpdateApi, orderListApi, orderUpdateApi, orderLogApi, orderMarkApi, orderDeleteApi, orderRefuseApi, orderRefundApi } from '@/api/order'
import cardsData from '@/components/cards/index' import cardsData from '@/components/cards/index'
import zbParser from '@/components/FormGenerator/components/parser/ZBParser' import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
import detailsFrom from './orderDetail' import detailsFrom from './orderDetail'
import orderSend from './orderSend' import orderSend from './orderSend'
import orderVideoSend from './orderVideoSend'
import { storeStaffListApi } from '@/api/storePoint' import { storeStaffListApi } from '@/api/storePoint'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import { isWriteOff } from "@/utils"; import { isWriteOff } from "@/utils";
@@ -307,13 +321,21 @@
cardsData, cardsData,
zbParser, zbParser,
detailsFrom, detailsFrom,
orderSend orderSend,
orderVideoSend
}, },
data() { data() {
return { return {
options: [{
value: 0,
label: '商城订单'
}, {
value: 1,
label: '视频号订单'
}],
RefuseVisible: false, RefuseVisible: false,
RefuseData:{}, RefuseData:{},
orderId: 0, orderId: '',
refundVisible: false, refundVisible: false,
refundData: {}, refundData: {},
dialogVisibleJI: false, dialogVisibleJI: false,
@@ -324,7 +346,7 @@
tableFromLog: { tableFromLog: {
page: 1, page: 1,
limit: 10, limit: 10,
oid: null orderNo: 0
}, },
LogLoading: false, LogLoading: false,
isCreate: 1, isCreate: 1,
@@ -338,9 +360,10 @@
tableFrom: { tableFrom: {
status: 'all', status: 'all',
dateLimit: '', dateLimit: '',
orderId: '', orderNo: '',
page: 1, page: 1,
limit: 20 limit: 20,
type: ''
}, },
orderChartType: {}, orderChartType: {},
timeVal: [], timeVal: [],
@@ -349,11 +372,14 @@
ids: '', ids: '',
orderids: '', orderids: '',
cardLists: [], cardLists: [],
isWriteOff: isWriteOff() isWriteOff: isWriteOff(),
proType: 0
} }
}, },
mounted() { mounted() {
this.getList() this.getList();
this.getOrderStatusNum();
this.getOrderListData();
}, },
methods: { methods: {
resetFormRefundhandler(){ resetFormRefundhandler(){
@@ -384,7 +410,7 @@
this.RefuseVisible = false this.RefuseVisible = false
}, },
onOrderRefuse(row) { onOrderRefuse(row) {
this.orderids = row.id this.orderids = row.orderId
this.RefuseData = { this.RefuseData = {
orderId: row.orderId, orderId: row.orderId,
reason: '' reason: ''
@@ -392,7 +418,7 @@
this.RefuseVisible = true this.RefuseVisible = true
}, },
RefusehandlerSubmit(formValue) { RefusehandlerSubmit(formValue) {
orderRefuseApi({ id: this.orderids, reason: formValue.reason}).then(data => { orderRefuseApi({ orderNo: this.orderids, reason: formValue.reason}).then(data => {
this.$message.success('操作成功') this.$message.success('操作成功')
this.RefuseVisible = false this.RefuseVisible = false
this.getList() this.getList()
@@ -408,11 +434,11 @@
amount: row.payPrice, amount: row.payPrice,
type: '' type: ''
} }
this.orderids = row.id this.orderids = row.orderId
this.refundVisible = true this.refundVisible = true
}, },
refundhandlerSubmit(formValue) { refundhandlerSubmit(formValue) {
orderRefundApi({ amount: formValue.amount, orderId: this.orderids, type: formValue.type}).then(data => { orderRefundApi({ amount: formValue.amount, orderNo: this.orderids}).then(data => {
this.$message.success('操作成功') this.$message.success('操作成功')
this.refundVisible = false this.refundVisible = false
this.getList() this.getList()
@@ -420,16 +446,21 @@
}, },
// 发送 // 发送
sendOrder(row) { sendOrder(row) {
this.$refs.send.modals = true; if(row.type===0){
this.$refs.send.getList(); this.$refs.send.modals = true;
this.$refs.send.sheetInfo(); this.$refs.send.getList();
this.orderId = row.id; this.$refs.send.sheetInfo();
}else{
this.$refs.videoSend.modals = true;
if(!JSON.parse(sessionStorage.getItem('videoExpress'))) this.$refs.videoSend.companyGetList();
}
this.orderId = row.orderId;
}, },
// 订单删除 // 订单删除
handleDelete(row, idx) { handleDelete(row, idx) {
if (row.isDel) { if (row.isDel) {
this.$modalSure().then(() => { this.$modalSure().then(() => {
orderDeleteApi({ id: row.id }).then(() => { orderDeleteApi({ orderNo: row.orderId }).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.tableData.data.splice(idx, 1) this.tableData.data.splice(idx, 1)
}) })
@@ -451,7 +482,7 @@
onOrderLog(id) { onOrderLog(id) {
this.dialogVisibleJI = true this.dialogVisibleJI = true
this.LogLoading = true this.LogLoading = true
this.tableFromLog.oid = id this.tableFromLog.orderNo = id
orderLogApi( this.tableFromLog ).then(res => { orderLogApi( this.tableFromLog ).then(res => {
this.tableDataLog.data = res.list this.tableDataLog.data = res.list
this.tableDataLog.total = res.total this.tableDataLog.total = res.total
@@ -462,11 +493,11 @@
}, },
pageChangeLog(page) { pageChangeLog(page) {
this.tableFromLog.page = page this.tableFromLog.page = page
this.getList() this.onOrderLog()
}, },
handleSizeChangeLog(val) { handleSizeChangeLog(val) {
this.tableFromLog.limit = val this.tableFromLog.limit = val
this.getList() this.onOrderLog()
}, },
handleClose() { handleClose() {
this.dialogVisible = false this.dialogVisible = false
@@ -482,7 +513,7 @@
inputPlaceholder: '请输入订单备注', inputPlaceholder: '请输入订单备注',
inputValidator: (value) => { if(!value) return '输入不能为空'} inputValidator: (value) => { if(!value) return '输入不能为空'}
}).then(({value}) => { }).then(({value}) => {
orderMarkApi({ mark : value, id: row.id}).then(() => { orderMarkApi({ mark : value, orderNo: row.orderId}).then(() => {
this.$message.success('操作成功') this.$message.success('操作成功')
this.getList(); this.getList();
}) })
@@ -503,6 +534,8 @@
this.timeVal = []; this.timeVal = [];
this.tableFrom.page = 1 this.tableFrom.page = 1
this.getList(); this.getList();
this.getOrderStatusNum();
this.getOrderListData();
}, },
// 具体日期 // 具体日期
onchangeTime (e) { onchangeTime (e) {
@@ -510,6 +543,8 @@
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : '' this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
this.tableFrom.page = 1 this.tableFrom.page = 1
this.getList(); this.getList();
this.getOrderStatusNum();
this.getOrderListData();
}, },
// 编辑 // 编辑
edit(row) { edit(row) {
@@ -535,21 +570,30 @@
getList() { getList() {
this.listLoading = true this.listLoading = true
orderListApi(this.tableFrom).then(res => { orderListApi(this.tableFrom).then(res => {
this.tableData.data = res.list.list || [] this.tableData.data = res.list || [];
this.tableData.total = res.list.total this.tableData.total = res.total;
this.orderChartType = res.status
const stat = res.top
this.cardLists = [
{ name: '订单数量', count: stat.count },
{ name: '订单金额', count: stat.amount },
{ name: '微信支付金额', count: stat.weChatAmount },
{ name: '余额支付金额', count: stat.yueAmount }
]
this.listLoading = false this.listLoading = false
}).catch(() => { }).catch(() => {
this.listLoading = false this.listLoading = false
}) })
}, },
// 数据统计
getOrderListData() {
orderListDataApi({dateLimit:this.tableFrom.dateLimit}).then(res => {
this.cardLists = [
{ name: '订单数量', count: res.count },
{ name: '订单金额', count: res.amount },
{ name: '微信支付金额', count: res.weChatAmount },
{ name: '余额支付金额', count: res.yueAmount }
]
});
},
// 获取各状态数量
getOrderStatusNum() {
orderStatusNumApi({dateLimit:this.tableFrom.dateLimit}).then(res => {
this.orderChartType = res;
});
},
pageChange(page) { pageChange(page) {
this.tableFrom.page = page this.tableFrom.page = page
this.getList() this.getList()

View File

@@ -9,8 +9,8 @@
<div class="description" v-loading="loading"> <div class="description" v-loading="loading">
<div class="title">用户信息</div> <div class="title">用户信息</div>
<div class="acea-row"> <div class="acea-row">
<div class="description-term">用户昵称{{orderDatalist.user?orderDatalist.user.nickname:orderDatalist.realName}}</div> <div class="description-term">用户昵称{{orderDatalist.realName}}</div>
<div class="description-term">绑定电话{{orderDatalist.user.phone ? orderDatalist.user.phone : '无'}}</div> <div class="description-term">绑定电话{{orderDatalist.phone ? orderDatalist.phone : '无'}}</div>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<div class="title">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货信息': '收货信息'}}</div> <div class="title">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货信息': '收货信息'}}</div>
@@ -25,8 +25,8 @@
<div class="description-term">订单编号{{orderDatalist.orderId}}</div> <div class="description-term">订单编号{{orderDatalist.orderId}}</div>
<div class="description-term" style="color: red">订单状态{{orderDatalist.statusStr.value}}</div> <div class="description-term" style="color: red">订单状态{{orderDatalist.statusStr.value}}</div>
<div class="description-term">商品总数{{orderDatalist.totalNum}}</div> <div class="description-term">商品总数{{orderDatalist.totalNum}}</div>
<div class="description-term">商品总价{{orderDatalist.totalPrice}}</div> <div class="description-term">商品总价{{orderDatalist.proTotalPrice}}</div>
<div class="description-term">付邮费{{orderDatalist.payPostage}}</div> <div class="description-term">付邮费{{orderDatalist.payPostage}}</div>
<div class="description-term">优惠券金额{{orderDatalist.couponPrice}}</div> <div class="description-term">优惠券金额{{orderDatalist.couponPrice}}</div>
<div class="description-term">实际支付{{orderDatalist.payPrice}}</div> <div class="description-term">实际支付{{orderDatalist.payPrice}}</div>
<div class="description-term fontColor3" v-if="orderDatalist.refundPrice">退款金额{{orderDatalist.refundPrice}}</div> <div class="description-term fontColor3" v-if="orderDatalist.refundPrice">退款金额{{orderDatalist.refundPrice}}</div>
@@ -34,7 +34,7 @@
<div class="description-term" v-if="orderDatalist.backIntegral">退回积分{{orderDatalist.backIntegral}}</div> <div class="description-term" v-if="orderDatalist.backIntegral">退回积分{{orderDatalist.backIntegral}}</div>
<div class="description-term">创建时间{{orderDatalist.createTime}}</div> <div class="description-term">创建时间{{orderDatalist.createTime}}</div>
<div class="description-term">支付方式{{orderDatalist.payTypeStr}}</div> <div class="description-term">支付方式{{orderDatalist.payTypeStr}}</div>
<div class="description-term">推广人{{orderDatalist.spreadInfo.id + ' / ' +orderDatalist.spreadInfo.name}}</div> <div class="description-term">推广人{{orderDatalist.spreadName | filterEmpty}}</div>
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">门店名称{{orderDatalist.storeName}}</div> <div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">门店名称{{orderDatalist.storeName}}</div>
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">核销码{{orderDatalist.user_phone}}</div> <div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">核销码{{orderDatalist.user_phone}}</div>
<div class="description-term">商家备注{{orderDatalist.remark}}</div> <div class="description-term">商家备注{{orderDatalist.remark}}</div>
@@ -106,7 +106,7 @@ export default {
name: 'OrderDetail', name: 'OrderDetail',
props: { props: {
orderId: { orderId: {
type: Number, type: String,
default: 0 default: 0
} }
}, },
@@ -129,13 +129,13 @@ export default {
}, },
// 获取订单物流信息 // 获取订单物流信息
getOrderData () { getOrderData () {
getLogisticsInfoApi({id:this.orderId}).then(async res => { getLogisticsInfoApi({orderNo:this.orderId}).then(async res => {
this.result = res.list; this.result = res.list;
}) })
}, },
getDetail(id) { getDetail(id) {
this.loading = true this.loading = true
orderDetailApi({id: id}).then(res => { orderDetailApi({orderNo: id}).then(res => {
this.orderDatalist = res this.orderDatalist = res
this.loading = false this.loading = false
}).catch(() => { }).catch(() => {

View File

@@ -91,7 +91,7 @@
export default { export default {
name: 'orderSend', name: 'orderSend',
props: { props: {
orderId: Number orderId: String
}, },
data() { data() {
return { return {
@@ -100,7 +100,6 @@
expressRecordType: '1', expressRecordType: '1',
expressId: '', expressId: '',
expressCode: '', expressCode: '',
id: '',
deliveryName: '', deliveryName: '',
deliveryTel: '', deliveryTel: '',
// expressName: '', // expressName: '',
@@ -109,6 +108,7 @@
toAddr: '', toAddr: '',
toName: '', toName: '',
toTel: '', toTel: '',
orderNo: ''
}, },
modals: false, modals: false,
express: [], express: [],
@@ -192,7 +192,7 @@
}, },
// 提交 // 提交
putSend(name) { putSend(name) {
this.formItem.id = this.orderId this.formItem.orderNo = this.orderId;
this.$refs[name].validate((valid) => { this.$refs[name].validate((valid) => {
if (valid) { if (valid) {
orderSendApi(this.formItem).then(async => { orderSendApi(this.formItem).then(async => {

View File

@@ -0,0 +1,120 @@
<template>
<el-dialog :visible.sync="modals" title="发送货" class="order_box" :before-close="handleClose" width="600px">
<el-form ref="formItem" :model="formItem" label-width="110px" @submit.native.prevent :rules="rules">
<el-form-item label="快递公司:" prop="expressCode">
<el-select v-model="formItem.deliveryId" filterable style="width:80%;">
<el-option v-for="(item,i) in express" :value="item.deliveryId" :key="i" :label="item.deliveryName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="快递单号:" prop="waybillId">
<el-input v-model="formItem.waybillId" placeholder="请输入快递单号" style="width:80%;"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button size="mini" type="primary" @click="putSend('formItem')">提交</el-button>
<el-button size="mini" @click="cancel('formItem')">取消</el-button>
</div>
</el-dialog>
</template>
<script>
import {videoSendApi, sheetInfoApi, companyGetListApi} from '@/api/order'
const validatePhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('请填写手机号'));
} else if (!/^1[3456789]\d{9}$/.test(value)) {
callback(new Error('手机号格式不正确!'));
} else {
callback();
}
};
export default {
name: 'orderSend',
props: {
orderId: String
},
data() {
return {
formItem: {
deliveryId: '',
orderNo: '',
waybillId: ''
},
modals: false,
express: [],
exportTempList: [],
tempImg: '',
rules: {
deliveryId: [
{required: true, message: '请选择快递公司', trigger: 'change'}
],
waybillId: [
{required: true, message: '请输入快递单号', trigger: 'blur'}
]
},
expressType: 'normal'
}
},
mounted() {
this.express = JSON.parse(sessionStorage.getItem('videoExpress'));
},
methods: {
// 视频号快递公司
companyGetList() {
companyGetListApi().then(async res => {
this.express = res;
sessionStorage.setItem('videoExpress', JSON.stringify(res))
})
},
// 提交
putSend(name) {
this.formItem.orderNo = this.orderId;
this.$refs[name].validate((valid) => {
if (valid) {
videoSendApi(this.formItem).then(async => {
this.$message.success('发送货成功');
this.modals = false;
this.$refs[name].resetFields();
this.$emit('submitFail')
})
} else {
this.$message.error('请填写信息');
}
})
},
handleClose() {
this.cancel('formItem');
},
cancel(name) {
this.modals = false;
this.$refs[name].resetFields();
this.formItem.type = '1';
this.formItem.expressRecordType = '1';
}
}
}
</script>
<style scoped lang="scss">
.width8 {
width: 80%;
}
.width9 {
width: 70%;
}
.tempImgList {
// opacity: 1;
width: 38px !important;
height: 30px !important;
// margin-top: -30px;
cursor: pointer;
position: absolute;
z-index: 11;
img {
width: 38px !important;
height: 30px !important;
}
}
</style>

View File

@@ -38,11 +38,19 @@
<el-button size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;" <el-button size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;"
@click="handleSubmit('formInline')">登录 @click="handleSubmit('formInline')">登录
</el-button> </el-button>
<div class="acea-row row-center-wrapper"> <div class="acea-row row-center-wrapper mb20">
<el-button size="mini" type="text" style="margin-left: 0" @click="changePassword">忘记密码</el-button> <el-button size="mini" type="text" style="margin-left: 0" @click="changePassword">忘记密码</el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-button size="mini" type="text" style="margin-left: 0" @click="changeReg">注册账户</el-button> <el-button size="mini" type="text" style="margin-left: 0" @click="changeReg">注册账户</el-button>
</div> </div>
<el-tooltip class="item" effect="dark" content="
一号通为我司一个第三方平台
专门提供短信 物流查询,商品复制,电子面单等个性化服务
省去了自己单独接入功能的麻烦
初次运行代码默认是没有账号的,需要自行注册,
登录成功后根据提示购买自己需要用到的服务即可" placement="bottom">
<span style="margin-left: 0">平台说明</span>
</el-tooltip>
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>

View File

@@ -11,6 +11,15 @@
<span class="mr10" @click="onChangePassswordIndex">修改密码</span> <span class="mr10" @click="onChangePassswordIndex">修改密码</span>
<span class="mr10" @click="onChangePhone">修改手机号</span> <span class="mr10" @click="onChangePhone">修改手机号</span>
<span @click="signOut" class="mr10">退出登录</span> <span @click="signOut" class="mr10">退出登录</span>
<el-tooltip class="item" effect="dark" content="
一号通为我司一个第三方平台
专门提供短信 物流查询,商品复制,电子面单等个性化服务
省去了自己单独接入功能的麻烦
初次运行代码默认是没有账号的,需要自行注册,
登录成功后根据提示购买自己需要用到的服务即可" placement="right">
<span class="mr10">平台说明</span>
</el-tooltip>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -51,7 +51,7 @@
> >
<div class="list-goods-list-item-title" :class="{active:index === current}">¥ <i>{{ item.price }}</i></div> <div class="list-goods-list-item-title" :class="{active:index === current}">¥ <i>{{ item.price }}</i></div>
<div class="list-goods-list-item-price" :class="{active:index === current}"> <div class="list-goods-list-item-price" :class="{active:index === current}">
<span>短信条数: {{ item.num }}</span> <span>{{tableFrom.type | onePassTypeFilter}}条数: {{ item.num }}</span>
</div> </div>
</div> </div>
</el-col> </el-col>

View File

@@ -6,7 +6,7 @@
<el-step title="商品信息" /> <el-step title="商品信息" />
<el-step title="商品详情" /> <el-step title="商品详情" />
<el-step title="其他设置" /> <el-step title="其他设置" />
<el-step title="规格设置" /> <!--<el-step title="规格设置" />-->
</el-steps> </el-steps>
</div> </div>
<el-form ref="formValidate" v-loading="fullscreenLoading" class="formValidate mt20" :rules="ruleValidate" :model="formValidate" label-width="120px" @submit.native.prevent> <el-form ref="formValidate" v-loading="fullscreenLoading" class="formValidate mt20" :rules="ruleValidate" :model="formValidate" label-width="120px" @submit.native.prevent>
@@ -14,32 +14,32 @@
<!-- 商品信息--> <!-- 商品信息-->
<el-col v-bind="grid2"> <el-col v-bind="grid2">
<el-form-item label="商品名称:" prop="storeName"> <el-form-item label="商品名称:" prop="storeName">
<el-input v-model="formValidate.storeName" maxlength="249" placeholder="请输入商品名称" /> <el-input v-model="formValidate.storeName" maxlength="249" placeholder="请输入商品名称" :disabled="isDisabled"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="grid2"> <el-col v-bind="grid2">
<el-form-item label="商品分类:" prop="cateIds"> <el-form-item label="商品分类:" prop="cateIds">
<el-cascader v-model="formValidate.cateIds" :options="merCateList" :props="props2" clearable class="selWidth" :show-all-levels="false" /> <el-cascader v-model="formValidate.cateIds" :options="merCateList" :props="props2" clearable class="selWidth" :show-all-levels="false" :disabled="isDisabled"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="grid2"> <el-col v-bind="grid2">
<el-form-item label="商品关键字:"> <el-form-item label="商品关键字:">
<el-input v-model="formValidate.keyword" placeholder="请输入商品关键字" /> <el-input v-model="formValidate.keyword" placeholder="请输入商品关键字" :disabled="isDisabled"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="grid2"> <el-col v-bind="grid2">
<el-form-item label="单位:" prop="unitName"> <el-form-item label="单位:" prop="unitName">
<el-input v-model="formValidate.unitName" placeholder="请输入单位" /> <el-input v-model="formValidate.unitName" placeholder="请输入单位" :disabled="isDisabled"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="grid2"> <el-col v-bind="grid2">
<el-form-item label="商品简介:"> <el-form-item label="商品简介:">
<el-input v-model="formValidate.storeInfo" type="textarea" maxlength="250" :rows="3" placeholder="请输入商品简介" /> <el-input v-model="formValidate.storeInfo" type="textarea" maxlength="250" :rows="3" placeholder="请输入商品简介" :disabled="isDisabled"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="grid2"> <el-col v-bind="grid2">
<el-form-item label="商品封面图:" prop="image"> <el-form-item label="商品封面图:" prop="image">
<div class="upLoadPicBox" @click="modalPicTap('1')"> <div class="upLoadPicBox" @click="modalPicTap('1')" :disabled="isDisabled">
<div v-if="formValidate.image" class="pictrue"><img :src="formValidate.image"></div> <div v-if="formValidate.image" class="pictrue"><img :src="formValidate.image"></div>
<div v-else class="upLoad"> <div v-else class="upLoad">
<i class="el-icon-camera cameraIconfont" /> <i class="el-icon-camera cameraIconfont" />
@@ -61,9 +61,9 @@
@dragend="handleDragEnd($event, item)" @dragend="handleDragEnd($event, item)"
> >
<img :src="item"> <img :src="item">
<i class="el-icon-error btndel" @click="handleRemove(index)" /> <i v-if="!isDisabled" class="el-icon-error btndel" @click="handleRemove(index)" />
</div> </div>
<div v-if="formValidate.sliderImages.length<10" class="upLoadPicBox" @click="modalPicTap('2')"> <div v-if="formValidate.sliderImages.length<10 && !isDisabled" class="upLoadPicBox" @click="modalPicTap('2')">
<div class="upLoad"> <div class="upLoad">
<i class="el-icon-camera cameraIconfont" /> <i class="el-icon-camera cameraIconfont" />
</div> </div>
@@ -74,7 +74,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="运费模板:" prop="tempId"> <el-form-item label="运费模板:" prop="tempId">
<div class="acea-row"> <div class="acea-row">
<el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidthd mr20"> <el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidthd mr20" :disabled="isDisabled">
<el-option <el-option
v-for="item in shippingList" v-for="item in shippingList"
:key="item.id" :key="item.id"
@@ -82,97 +82,26 @@
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
<el-button class="mr15" @click="addTem">添加运费模板</el-button> <el-button v-show="!isDisabled" class="mr15" @click="addTem">添加运费模板</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-form-item label="优惠券:" class="proCoupon">
<div class="acea-row">
<el-tag
v-for="(tag, index) in formValidate.coupons"
:key="index"
class="mr10 mb10"
closable
:disable-transitions="false"
@close="handleCloseCoupon(tag)"
>
{{ tag.name }}
</el-tag>
<el-button class="mr15" size="mini" @click="addCoupon">选择优惠券</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<!-- 商品详情-->
<el-row v-show="currentTab === 1">
<el-col :span="24">
<el-form-item label="商品详情:">
<ueditor-from v-model="formValidate.content" :content="formValidate.content" />
</el-form-item>
</el-col>
</el-row>
<!-- 其他设置-->
<el-row v-show="currentTab === 2">
<el-col :span="24">
<el-col v-bind="grid">
<el-form-item label="排序:">
<el-input-number v-model="formValidate.sort" :max="9999" placeholder="请输入排序" />
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-form-item label="积分:">
<el-input-number v-model="formValidate.giveIntegral" placeholder="请输入排序" />
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-form-item label="虚拟销量:">
<el-input-number v-model="formValidate.ficti" placeholder="请输入排序" />
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<el-form-item label="商品推荐:">
<el-checkbox-group v-model="checkboxGroup" size="small" @change="onChangeGroup">
<el-checkbox v-for="(item, index) in recommend" :key="index" :label="item.value">{{ item.name }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动优先级:">
<div class="color-list acea-row row-middle">
<div
class="color-item" :class="activity[item]"
v-for="item in formValidate.activity"
:key="item"
draggable="true"
@dragstart="handleDragStart($event, item)"
@dragover.prevent="handleDragOver($event, item)"
@dragenter="handleDragEnterFont($event, item)"
@dragend="handleDragEnd($event, item)"
>{{item}}</div>
<div class="tip">可拖动按钮调整活动的优先展示顺序</div>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentTab === 3">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="商品规格:" props="specType"> <el-form-item label="商品规格:" props="specType">
<el-radio-group v-model="formValidate.specType" @change="onChangeSpec(formValidate.specType)"> <el-radio-group v-model="formValidate.specType" @change="onChangeSpec(formValidate.specType)" :disabled="isDisabled">
<el-radio :label="false" class="radio">单规格</el-radio> <el-radio :label="false" class="radio">单规格</el-radio>
<el-radio :label="true">多规格</el-radio> <el-radio :label="true">多规格</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="佣金设置:" props="isSub"> <el-form-item label="佣金设置:" props="isSub">
<el-radio-group v-model="formValidate.isSub" @change="onChangetype(formValidate.isSub)"> <el-radio-group v-model="formValidate.isSub" @change="onChangetype(formValidate.isSub)" :disabled="isDisabled">
<el-radio :label="true" class="radio">单独设置</el-radio> <el-radio :label="true" class="radio">单独设置</el-radio>
<el-radio :label="false">默认设置</el-radio> <el-radio :label="false">默认设置</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 多规格添加--> <!-- 多规格添加-->
<el-col v-if="formValidate.specType" :span="24" class="noForm"> <el-col v-if="formValidate.specType && !isDisabled" :span="24" class="noForm">
<el-form-item label="选择规格:" prop=""> <el-form-item label="选择规格:" prop="">
<div class="acea-row"> <div class="acea-row">
<el-select v-model="formValidate.selectRule"> <el-select v-model="formValidate.selectRule">
@@ -233,7 +162,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 批量设置--> <!-- 批量设置-->
<el-col v-if="formValidate.attr.length>0 && formValidate.specType" :span="24" class="noForm"> <el-col v-if="formValidate.attr.length>0 && formValidate.specType && !isDisabled" :span="24" class="noForm">
<el-form-item label="批量设置:" class="labeltop"> <el-form-item label="批量设置:" class="labeltop">
<el-table :data="oneFormBatch" border class="tabNumWidth" size="mini"> <el-table :data="oneFormBatch" border class="tabNumWidth" size="mini">
<el-table-column align="center" label="图片" min-width="80"> <el-table-column align="center" label="图片" min-width="80">
@@ -287,30 +216,30 @@
</el-table-column> </el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120"> <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" /> <el-input :disabled="isDisabled" v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" />
</template> </template>
</el-table-column> </el-table-column>
<template v-if="formValidate.isSub"> <template v-if="formValidate.isSub">
<el-table-column align="center" label="一级返佣(元)" min-width="120"> <el-table-column align="center" label="一级返佣(元)" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.brokerage" type="number" :min="0" class="priceBox" /> <el-input :disabled="isDisabled" v-model="scope.row.brokerage" type="number" :min="0" class="priceBox" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="二级返佣(元)" min-width="120"> <el-table-column align="center" label="二级返佣(元)" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.brokerageTwo" type="number" :min="0" class="priceBox" /> <el-input :disabled="isDisabled" v-model="scope.row.brokerageTwo" type="number" :min="0" class="priceBox" />
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>
</el-form-item> </el-form-item>
<!-- 多规格表格--> <!-- 多规格表格-->
<el-form-item v-if="formValidate.attr.length>0 && formValidate.specType" label="商品属性:" class="labeltop"> <el-form-item v-if="formValidate.attr.length>0 && formValidate.specType" label="商品属性:" class="labeltop" :class="isDisabled?'disLabel':'disLabelmoren'">
<el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini"> <el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini">
<template v-if="manyTabDate"> <template v-if="manyTabDate">
<el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center" :label="manyTabTit[iii].title" min-width="80"> <el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center" :label="manyTabTit[iii].title" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="priceBox" v-text="scope.row[iii]" /> <span class="priceBox" v-text="scope.row[iii]"/>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
@@ -326,20 +255,20 @@
</el-table-column> </el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120"> <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" /> <el-input :disabled="isDisabled" v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="一级返佣(元)" min-width="120" v-if="formValidate.isSub"> <el-table-column align="center" label="一级返佣(元)" min-width="120" v-if="formValidate.isSub">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.brokerage" type="number" :min="0" :max="scope.row.price" class="priceBox" /> <el-input :disabled="isDisabled" v-model="scope.row.brokerage" type="number" :min="0" :max="scope.row.price" class="priceBox" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="二级返佣(元)" min-width="120" v-if="formValidate.isSub"> <el-table-column align="center" label="二级返佣(元)" min-width="120" v-if="formValidate.isSub">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.brokerageTwo" type="number" :min="0" :max="scope.row.price" class="priceBox" /> <el-input :disabled="isDisabled" v-model="scope.row.brokerageTwo" type="number" :min="0" :max="scope.row.price" class="priceBox" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column key="3" align="center" label="操作" min-width="80"> <el-table-column v-if="!isDisabled" key="3" align="center" label="操作" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" class="submission" @click="delAttrTable(scope.$index)">删除</el-button> <el-button type="text" class="submission" @click="delAttrTable(scope.$index)">删除</el-button>
</template> </template>
@@ -348,10 +277,89 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 商品详情-->
<el-row v-show="currentTab === 1 && !isDisabled">
<el-col :span="24">
<el-form-item label="商品详情:">
<ueditor-from v-model="formValidate.content" :content="formValidate.content" />
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentTab === 1 && isDisabled">
<el-col :span="24">
<el-form-item label="商品详情:">
<span v-html="formValidate.content || '无'"></span>
</el-form-item>
</el-col>
</el-row>
<!-- 其他设置-->
<el-row v-show="currentTab === 2">
<el-col :span="24">
<el-col v-bind="grid">
<el-form-item label="排序:">
<el-input-number v-model="formValidate.sort" :max="9999" placeholder="请输入排序" :disabled="isDisabled" />
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-form-item label="积分:">
<el-input-number v-model="formValidate.giveIntegral" placeholder="请输入排序" :disabled="isDisabled" />
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-form-item label="虚拟销量:">
<el-input-number v-model="formValidate.ficti" placeholder="请输入排序" :disabled="isDisabled" />
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<el-form-item label="商品推荐:">
<el-checkbox-group v-model="checkboxGroup" size="small" @change="onChangeGroup" :disabled="isDisabled">
<el-checkbox v-for="(item, index) in recommend" :key="index" :label="item.value">{{ item.name }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动优先级:">
<div class="color-list acea-row row-middle">
<div
:disabled="isDisabled"
class="color-item" :class="activity[item]"
v-for="item in formValidate.activity"
:key="item"
draggable="true"
@dragstart="handleDragStart($event, item)"
@dragover.prevent="handleDragOver($event, item)"
@dragenter="handleDragEnterFont($event, item)"
@dragend="handleDragEnd($event, item)"
>{{item}}</div>
<div class="tip">可拖动按钮调整活动的优先展示顺序</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="优惠券:" class="proCoupon">
<div class="acea-row">
<el-tag
v-if="!isDisabled"
v-for="(tag, index) in formValidate.coupons"
:key="index"
class="mr10 mb10"
:closable="!isDisabled"
:disable-transitions="false"
@close="handleCloseCoupon(tag)"
>
{{ tag.name }}
</el-tag>
<span v-if="isDisabled"></span>
<el-button v-if="!isDisabled" class="mr15" size="mini" @click="addCoupon">选择优惠券</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-form-item> <el-form-item>
<el-button v-show="currentTab>0" type="primary" class="submission" @click="handleSubmitUp">上一步</el-button> <el-button v-show="currentTab>0" type="primary" class="submission" @click="handleSubmitUp">上一步</el-button>
<el-button v-show="currentTab<3" type="primary" class="submission" @click="handleSubmitNest('formValidate')">下一步</el-button> <el-button v-show="currentTab<2" type="primary" class="submission" @click="handleSubmitNest('formValidate')">下一步</el-button>
<el-button v-show="currentTab===3 || $route.params.id" type="primary" class="submission" @click="handleSubmit('formValidate')">提交</el-button> <el-button v-show="(currentTab===2 || $route.params.id) && !isDisabled" type="primary" class="submission" @click="handleSubmit('formValidate')">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@@ -434,6 +442,7 @@
components: {Templates, CreatTemplates }, components: {Templates, CreatTemplates },
data() { data() {
return { return {
isDisabled: this.$route.params.isDisabled==='1'?true:false,
activity: { '默认': 'red', '秒杀': 'blue', '砍价': 'green', '拼团': 'yellow' }, activity: { '默认': 'red', '秒杀': 'blue', '砍价': 'green', '拼团': 'yellow' },
props2: { props2: {
children: 'child', children: 'child',
@@ -581,7 +590,7 @@
}, '') }, '')
}, },
setTagsViewTitle() { setTagsViewTitle() {
const title = '编辑商品' const title = this.isDisabled?'商品详情':'编辑商品'
const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.$route.params.id}` }) const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.$route.params.id}` })
this.$store.dispatch('tagsView/updateVisitedView', route) this.$store.dispatch('tagsView/updateVisitedView', route)
}, },
@@ -804,6 +813,7 @@
this.isBtn = false this.isBtn = false
}, },
clearAttr() { clearAttr() {
this.isAttr = true
this.formDynamic.attrsName = '' this.formDynamic.attrsName = ''
this.formDynamic.attrsVal = '' this.formDynamic.attrsVal = ''
}, },
@@ -860,7 +870,7 @@
getInfo () { getInfo () {
this.fullscreenLoading = true this.fullscreenLoading = true
productDetailApi(this.$route.params.id).then(async res => { productDetailApi(this.$route.params.id).then(async res => {
this.isAttr = false; this.isAttr = true;
let info = res let info = res
this.formValidate = { this.formValidate = {
image: this.$selfUtil.setDomain(info.image), image: this.$selfUtil.setDomain(info.image),
@@ -896,7 +906,7 @@
let imgss = [] let imgss = []
Object.keys(imgs).map(i => { Object.keys(imgs).map(i => {
imgss.push(this.$selfUtil.setDomain(imgs[i])) imgss.push(this.$selfUtil.setDomain(imgs[i]))
}) })
this.formValidate.sliderImages = [ ...imgss ] this.formValidate.sliderImages = [ ...imgss ]
if(info.isHot) this.checkboxGroup.push('isHot') if(info.isHot) this.checkboxGroup.push('isHot')
if(info.isGood) this.checkboxGroup.push('isGood') if(info.isGood) this.checkboxGroup.push('isGood')
@@ -940,7 +950,8 @@
}, },
// 点击商品图 // 点击商品图
modalPicTap (tit, num, i) { modalPicTap (tit, num, i) {
const _this = this const _this = this;
if(_this.isDisabled) return;
this.$modalUpload(function(img) { this.$modalUpload(function(img) {
if(tit==='1'&& !num){ if(tit==='1'&& !num){
_this.formValidate.image = img[0].sattDir _this.formValidate.image = img[0].sattDir
@@ -1032,40 +1043,55 @@
}, },
// 移动 // 移动
handleDragStart (e, item) { handleDragStart (e, item) {
this.dragging = item; if(!this.isDisabled) this.dragging = item;
}, },
handleDragEnd (e, item) { handleDragEnd (e, item) {
this.dragging = null if(!this.isDisabled) this.dragging = null
}, },
handleDragOver (e) { handleDragOver (e) {
e.dataTransfer.dropEffect = 'move' if(!this.isDisabled) e.dataTransfer.dropEffect = 'move'
}, },
handleDragEnter (e, item) { handleDragEnter (e, item) {
e.dataTransfer.effectAllowed = 'move' if(!this.isDisabled){
if (item === this.dragging) { e.dataTransfer.effectAllowed = 'move'
return if (item === this.dragging) {
return
}
const newItems = [...this.formValidate.sliderImages]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.sliderImages = newItems;
} }
const newItems = [...this.formValidate.sliderImages]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.sliderImages = newItems;
}, },
handleDragEnterFont(e, item) { handleDragEnterFont(e, item) {
e.dataTransfer.effectAllowed = 'move' if(!this.isDisabled){
if (item === this.dragging) { e.dataTransfer.effectAllowed = 'move'
return if (item === this.dragging) {
return
}
const newItems = [...this.formValidate.activity]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.activity = newItems;
} }
const newItems = [...this.formValidate.activity]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.activity = newItems;
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.disLabel{
/deep/.el-form-item__label{
margin-left: 36px !important;
}
}
.disLabelmoren{
/deep/.el-form-item__label{
margin-left: 120px !important;
}
}
.color-item{ .color-item{
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
@@ -1167,7 +1193,6 @@
/deep/.el-form-item__label{ /deep/.el-form-item__label{
float: none !important; float: none !important;
display: inline-block !important; display: inline-block !important;
margin-left: 120px !important;
width: auto !important; width: auto !important;
} }
} }

View File

@@ -118,8 +118,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="150" fixed="right" align="center"> <el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="{path: '/store/list/creatProduct/' + scope.row.id + '/1'}">
<el-button type="text" size="small" class="mr10">详情</el-button>
</router-link>
<router-link :to="{path: '/store/list/creatProduct/' + scope.row.id}"> <router-link :to="{path: '/store/list/creatProduct/' + scope.row.id}">
<el-button type="text" size="small" class="mr10" v-if="tableFrom.type !== '5'">编辑</el-button> <el-button type="text" size="small" class="mr10" v-if="tableFrom.type !== '5' && tableFrom.type !== '1'">编辑</el-button>
</router-link> </router-link>
<el-button v-if="tableFrom.type === '5'" type="text" size="small" @click="handleRestore(scope.row.id, scope.$index)">恢复商品</el-button> <el-button v-if="tableFrom.type === '5'" type="text" size="small" @click="handleRestore(scope.row.id, scope.$index)">恢复商品</el-button>
<el-button type="text" size="small" @click="handleDelete(scope.row.id, tableFrom.type)">{{ tableFrom.type === '5' ? '删除' : '加入回收站' }}</el-button> <el-button type="text" size="small" @click="handleDelete(scope.row.id, tableFrom.type)">{{ tableFrom.type === '5' ? '删除' : '加入回收站' }}</el-button>
@@ -221,9 +224,8 @@ export default {
// 导出 // 导出
exports () { exports () {
productExcelApi({cateId:this.tableFrom.cateId,keywords: this.tableFrom.keywords, type:this.tableFrom.type}).then((res) => { productExcelApi({cateId:this.tableFrom.cateId,keywords: this.tableFrom.keywords, type:this.tableFrom.type}).then((res) => {
window.open(res.fileName) window.location.href = res.fileName;
}) })
// window.open(this.objectUrl + 'admin/export/excel/product?type=1&Authori-zation=' + getToken())
}, },
// 获取商品表单头数量 // 获取商品表单头数量
goodHeade () { goodHeade () {

View File

@@ -3,7 +3,7 @@
<el-card> <el-card>
<div>生成的商品默认是没有上架的请手动上架商品 <div>生成的商品默认是没有上架的请手动上架商品
<span v-if="copyConfig.copyType && copyConfig.copyType==1">您当前剩余{{copyConfig.copyNum}}条采集次数 <span v-if="copyConfig.copyType && copyConfig.copyType==1">您当前剩余{{copyConfig.copyNum}}条采集次数
<router-link :to="{path:'/operation/onePass'}"> <router-link :to="{path:'/operation/systemSms/pay?type=copy'}">
<el-link type="primary" :underline="false">增加采集次数</el-link> <el-link type="primary" :underline="false">增加采集次数</el-link>
</router-link> </router-link>
</span> </span>
@@ -145,7 +145,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="商品规格:" props="spec_type" label-for="spec_type"> <el-form-item label="商品规格:" props="spec_type" label-for="spec_type">
<el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini"> <el-table :data="formValidate.attrValue" border class="tabNumWidth" size="mini">
<template v-if="manyTabDate"> <template v-if="manyTabDate">
<el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center" <el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center"
:label="manyTabTit[iii].title" min-width="80"> :label="manyTabTit[iii].title" min-width="80">
@@ -156,19 +156,24 @@
</template> </template>
<el-table-column align="center" label="图片" min-width="80"> <el-table-column align="center" label="图片" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="upLoadPicBox" @click="modalPicTap('1','duo',scope.$index)"> <el-form-item :rules="[{required: true, message: '请上传图片', trigger: 'change'}]" :prop="'attrValue.'+scope.$index+'.image'">
<div v-if="scope.row.image" class="pictrue pictrueTab"><img :src="scope.row.image"></div> <div class="upLoadPicBox" @click="modalPicTap('1','duo',scope.$index)">
<div v-else class="upLoad pictrueTab"> <div v-if="scope.row.image" class="pictrue pictrueTab"><img :src="scope.row.image"></div>
<i class="el-icon-camera cameraIconfont"/> <div v-else class="upLoad pictrueTab">
<i class="el-icon-camera cameraIconfont"/>
</div>
</div> </div>
</div> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title"
align="center" min-width="120"> align="center" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" <el-form-item :rules="[{required: true, message: '请输入'+formThead[iii].title, trigger: 'blur'}]" :prop="formThead[iii].title!=='商品编号'?'attrValue.'+scope.$index+'.'+iii:''">
class="priceBox"/> <el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" />
</el-form-item>
<!--<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'"-->
<!--class="priceBox"/>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" min-width="80"> <el-table-column align="center" label="操作" min-width="80">
@@ -216,8 +221,8 @@
otPrice: null, otPrice: null,
stock: null, stock: null,
barCode: '', barCode: '',
weight: null, weight: 0,
volume: null volume: 0
}] }]
const objTitle = { const objTitle = {
price: { price: {
@@ -287,6 +292,9 @@
], ],
keyword: [ keyword: [
{required: true, message: '请输入商品关键字', trigger: 'blur'} {required: true, message: '请输入商品关键字', trigger: 'blur'}
],
attrValue: [
{ required: true, message: '请上传商品轮播图', type: 'array', trigger: 'change' }
] ]
}, },
grid: { grid: {
@@ -330,7 +338,7 @@
methods: { methods: {
// 删除表格中的属性 // 删除表格中的属性
delAttrTable(index) { delAttrTable(index) {
this.ManyAttrValue.splice(index, 1) this.formValidate.attrValue.splice(index, 1)
}, },
getCopyConfig() { getCopyConfig() {
copyConfigApi().then(res => { copyConfigApi().then(res => {
@@ -341,7 +349,7 @@
batchAdd() { batchAdd() {
// if (!this.oneFormBatch[0].pic || !this.oneFormBatch[0].price || !this.oneFormBatch[0].cost || !this.oneFormBatch[0].ot_price || // if (!this.oneFormBatch[0].pic || !this.oneFormBatch[0].price || !this.oneFormBatch[0].cost || !this.oneFormBatch[0].ot_price ||
// !this.oneFormBatch[0].stock || !this.oneFormBatch[0].bar_code) return this.$Message.warning('请填写完整的批量设置内容!'); // !this.oneFormBatch[0].stock || !this.oneFormBatch[0].bar_code) return this.$Message.warning('请填写完整的批量设置内容!');
for (const val of this.ManyAttrValue) { for (const val of this.formValidate.attrValue) {
this.$set(val, 'image', this.oneFormBatch[0].image) this.$set(val, 'image', this.oneFormBatch[0].image)
this.$set(val, 'price', this.oneFormBatch[0].price) this.$set(val, 'price', this.oneFormBatch[0].price)
this.$set(val, 'cost', this.oneFormBatch[0].cost) this.$set(val, 'cost', this.oneFormBatch[0].cost)
@@ -359,7 +367,7 @@
tmp['value' + i] = {title: o.attrName} tmp['value' + i] = {title: o.attrName}
tmpTab['value' + i] = '' tmpTab['value' + i] = ''
}) })
this.ManyAttrValue = this.attrFormat(val) this.formValidate.attrValue = this.attrFormat(val)
this.manyTabTit = tmp this.manyTabTit = tmp
this.manyTabDate = tmpTab this.manyTabDate = tmpTab
this.formThead = Object.assign({}, this.formThead, tmp) this.formThead = Object.assign({}, this.formThead, tmp)
@@ -555,7 +563,7 @@
}, },
// 提交 // 提交
handleSubmit(name) { handleSubmit(name) {
this.formValidate.attr.length ? this.formValidate.attrValue = this.ManyAttrValue : this.formValidate.attrValue = [] // this.formValidate.attr.length ? this.formValidate.attrValue = this.ManyAttrValue : this.formValidate.attrValue = []
this.formValidate.cateId = this.formValidate.cateIds.join(',') this.formValidate.cateId = this.formValidate.cateIds.join(',')
this.formValidate.sliderImage = JSON.stringify(this.formValidate.sliderImages) this.formValidate.sliderImage = JSON.stringify(this.formValidate.sliderImages)
for (var i = 0; i < this.formValidate.attr.length; i++) { for (var i = 0; i < this.formValidate.attr.length; i++) {
@@ -598,7 +606,7 @@
_this.OneattrValue[0].image = img[0].sattDir _this.OneattrValue[0].image = img[0].sattDir
} }
if (tit === '1' && num === 'duo') { if (tit === '1' && num === 'duo') {
_this.ManyAttrValue[i].image = img[0].sattDir _this.this.formValidate.attrValue[i].image = img[0].sattDir
} }
if (tit === '1' && num === 'pi') { if (tit === '1' && num === 'pi') {
_this.oneFormBatch[0].image = img[0].sattDir _this.oneFormBatch[0].image = img[0].sattDir
@@ -633,6 +641,11 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.formValidate{
/deep/ .el-form-item__error{
position: static !important;
}
}
.selWidth { .selWidth {
width: 100%; width: 100%;
} }

View File

@@ -64,12 +64,12 @@
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle"> <div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle">
<div class="demo-image__preview"> <div class="demo-image__preview">
<el-image <el-image
:src="val.info.productInfo.image" :src="val.info.image"
:preview-src-list="[val.info.productInfo.image]" :preview-src-list="[val.info.image]"
/> />
</div> </div>
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span> <span class="tabBox_tit mr10">{{ val.info.productName + ' | ' }}{{ val.info.suk ? val.info.suk:'-' }}</span>
<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span> <span class="tabBox_pice">{{ '¥'+ val.info.price ? val.info.price + ' x '+ val.info.payNum : '-' }}</span>
</div> </div>
</div> </div>
</template> </template>

View File

@@ -15,7 +15,7 @@
<el-input-number :min="0" :max="100" step-strictly v-model="formValidate.discount" placeholder="请输入享受折扣"></el-input-number> <el-input-number :min="0" :max="100" step-strictly v-model="formValidate.discount" placeholder="请输入享受折扣"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="经验" prop="experience"> <el-form-item label="经验" prop="experience">
<el-input v-model.number="formValidate.experience" placeholder="请输入经验"></el-input> <el-input-number v-model.number="formValidate.experience" placeholder="请输入经验" :max="999999" step-strictly></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="图标" prop="icon"> <el-form-item label="图标" prop="icon">
<div class="upLoadPicBox" @click="modalPicTap('1', 'icon')"> <div class="upLoadPicBox" @click="modalPicTap('1', 'icon')">

View File

@@ -80,6 +80,7 @@
cancelButtonText: '取消', cancelButtonText: '取消',
inputErrorMessage: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称', inputErrorMessage: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称',
inputType: 'text', inputType: 'text',
closeOnClickModal: false,
inputValue: row ? (this.$route.path.indexOf('group') !== -1?row.groupName:row.name): '' , inputValue: row ? (this.$route.path.indexOf('group') !== -1?row.groupName:row.name): '' ,
inputPlaceholder: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称', inputPlaceholder: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称',
inputValidator: (value) => { if(!value) return '输入不能为空'} inputValidator: (value) => { if(!value) return '输入不能为空'}

View File

@@ -3,25 +3,25 @@
<el-form-item label="用户编号:"> <el-form-item label="用户编号:">
<el-input v-model="ruleForm.id" disabled class="selWidth"></el-input> <el-input v-model="ruleForm.id" disabled class="selWidth"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="真实姓名:"> <!--<el-form-item label="真实姓名:">-->
<el-input v-model="ruleForm.realName" class="selWidth"></el-input> <!--<el-input v-model="ruleForm.realName" class="selWidth"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="手机号码:" prop="phone"> <!--<el-form-item label="手机号码:" prop="phone">-->
<el-input v-model.number="ruleForm.phone" class="selWidth"></el-input> <!--<el-input v-model.number="ruleForm.phone" class="selWidth" readonly></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="生日:"> <!--<el-form-item label="生日:">-->
<el-date-picker <!--<el-date-picker-->
v-model="ruleForm.birthday" <!--v-model="ruleForm.birthday"-->
type="date" <!--type="date"-->
class="selWidth" <!--class="selWidth"-->
placeholder="选择日期" <!--placeholder="选择日期"-->
format="yyyy 年 MM 月 dd 日" <!--format="yyyy 年 MM 月 dd 日"-->
value-format="yyyy-MM-dd"> <!--value-format="yyyy-MM-dd">-->
</el-date-picker> <!--</el-date-picker>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="身份证号:"> <!--<el-form-item label="身份证号:">-->
<el-input v-model="ruleForm.cardId" class="selWidth"></el-input> <!--<el-input v-model="ruleForm.cardId" class="selWidth"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="用户地址:"> <el-form-item label="用户地址:">
<el-input v-model="ruleForm.addres" class="selWidth"></el-input> <el-input v-model="ruleForm.addres" class="selWidth"></el-input>
</el-form-item> </el-form-item>
@@ -65,17 +65,17 @@
<script> <script>
import { groupListApi, levelListApi, tagListApi, userInfoApi, userUpdateApi } from '@/api/user' import { groupListApi, levelListApi, tagListApi, userInfoApi, userUpdateApi } from '@/api/user'
const defaultObj = { const defaultObj = {
birthday: '', // birthday: '',
cardId: '', // cardId: '',
id : null, id : null,
mark: '', mark: '',
phone: '', // phone: '',
realName: '', // realName: '',
addres:'', addres:'',
groupId: '', groupId: '',
level: '', level: '',
isPromoter: false, isPromoter: false,
status: false, status: false
} }
export default { export default {
name: "UserEdit", name: "UserEdit",
@@ -107,12 +107,12 @@
userInfo () { userInfo () {
userInfoApi({ id: this.uid}).then(async res => { userInfoApi({ id: this.uid}).then(async res => {
this.ruleForm = { this.ruleForm = {
birthday: res.birthday, // birthday: res.birthday,
cardId: res.cardId, // cardId: res.cardId,
id : res.uid, id : res.uid,
mark: res.mark, mark: res.mark,
phone: res.phone, // phone: res.phone,
realName: res.realName, // realName: res.realName,
status: res.status, status: res.status,
addres: res.addres, addres: res.addres,
groupId: Number(res.groupId) || '', groupId: Number(res.groupId) || '',

View File

@@ -11,7 +11,7 @@
<el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18"> <el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
<el-col v-bind="grid"> <el-col v-bind="grid">
<el-form-item label="用户搜索:"> <el-form-item label="用户搜索:">
<el-input v-model="userFrom.keywords" placeholder="请输入" clearable class="selWidth"/> <el-input v-model="userFrom.keywords" placeholder="请输入姓名" clearable class="selWidth"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!--<el-col :span="24">--> <!--<el-col :span="24">-->
@@ -115,12 +115,12 @@
<el-form-item label="消费情况:"> <el-form-item label="消费情况:">
<el-select v-model="userFrom.payCount" placeholder="请选择" class="selWidth" clearable> <el-select v-model="userFrom.payCount" placeholder="请选择" class="selWidth" clearable>
<el-option value="" label="全部"></el-option> <el-option value="" label="全部"></el-option>
<el-option value="-1" label="0"></el-option> <el-option value="0" label="0"></el-option>
<el-option value="0" label="1+"></el-option> <el-option value="1" label="1+"></el-option>
<el-option value="1" label="2+"></el-option> <el-option value="2" label="2+"></el-option>
<el-option value="2" label="3+"></el-option> <el-option value="3" label="3+"></el-option>
<el-option value="3" label="4+"></el-option> <el-option value="4" label="4+"></el-option>
<el-option value="4" label="5+"></el-option> <el-option value="5" label="5+"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -189,21 +189,21 @@
<el-form-item label="近次访问:"> <el-form-item label="近次访问:">
<span>{{ props.row.updateTime | filterEmpty }}</span> <span>{{ props.row.updateTime | filterEmpty }}</span>
</el-form-item> </el-form-item>
<el-form-item label="身份证号:"> <!--<el-form-item label="身份证号:">-->
<span>{{ props.row.cardId | filterEmpty }}</span> <!--<span>{{ props.row.cardId | filterEmpty }}</span>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="手机号:"> <el-form-item label="手机号:">
<span>{{ props.row.phone | filterEmpty }}</span> <span>{{ props.row.phone | filterEmpty }}</span>
</el-form-item> </el-form-item>
<el-form-item label="真实姓名:"> <!--<el-form-item label="真实姓名:">-->
<span>{{ props.row.realName | filterEmpty }}</span> <!--<span>{{ props.row.realName | filterEmpty }}</span>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="标签:"> <el-form-item label="标签:">
<span>{{ props.row.tagName | filterEmpty }}</span> <span>{{ props.row.tagName | filterEmpty }}</span>
</el-form-item> </el-form-item>
<el-form-item label="生日:"> <!--<el-form-item label="生日:">-->
<span>{{ props.row.birthday | filterEmpty }}</span> <!--<span>{{ props.row.birthday | filterEmpty }}</span>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="地址:"> <el-form-item label="地址:">
<span>{{ props.row.addres | filterEmpty }}</span> <span>{{ props.row.addres | filterEmpty }}</span>
</el-form-item> </el-form-item>
@@ -260,13 +260,21 @@
min-width="130" min-width="130"
/> />
<el-table-column <el-table-column
label="用户类型" label="手机号"
min-width="100" min-width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.userType | typeFilter}}</span> <span>{{scope.row.phone | filterEmpty}}</span>
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column-->
<!--label="用户类型"-->
<!--min-width="100"-->
<!--&gt;-->
<!--<template slot-scope="scope">-->
<!--<span>{{scope.row.userType | typeFilter}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column <el-table-column
prop="nowMoney" prop="nowMoney"
label="余额" label="余额"
@@ -289,6 +297,7 @@
<el-dropdown-item @click.native="editPoint(scope.row.uid)">积分余额</el-dropdown-item> <el-dropdown-item @click.native="editPoint(scope.row.uid)">积分余额</el-dropdown-item>
<el-dropdown-item @click.native="setBatch('group',scope.row)">设置分组</el-dropdown-item> <el-dropdown-item @click.native="setBatch('group',scope.row)">设置分组</el-dropdown-item>
<el-dropdown-item @click.native="setBatch('label',scope.row)">设置标签</el-dropdown-item> <el-dropdown-item @click.native="setBatch('label',scope.row)">设置标签</el-dropdown-item>
<el-dropdown-item @click.native="setPhone(scope.row)">修改手机号</el-dropdown-item>
<el-dropdown-item @click.native="setExtension(scope.row)">修改上级推广人</el-dropdown-item> <el-dropdown-item @click.native="setExtension(scope.row)">修改上级推广人</el-dropdown-item>
<el-dropdown-item @click.native="clearSpread(scope.row)" v-if="scope.row.spreadUid && scope.row.spreadUid>0">清除上级推广人</el-dropdown-item> <el-dropdown-item @click.native="clearSpread(scope.row)" v-if="scope.row.spreadUid && scope.row.spreadUid>0">清除上级推广人</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
@@ -403,7 +412,7 @@
label="余额" label="余额"
required required
> >
<el-input-number type="text" v-model="PointValidateForm.moneyValue" :max="999999"></el-input-number> <el-input-number type="text" v-model="PointValidateForm.moneyValue" :precision="2" :step="0.1" :min="0" :max="999999"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="修改积分" label="修改积分"
@@ -418,7 +427,7 @@
label="积分" label="积分"
required required
> >
<el-input-number type="text" step-strictly v-model="PointValidateForm.integralValue" :max="999999"></el-input-number> <el-input-number type="text" step-strictly v-model="PointValidateForm.integralValue" :min="0" :max="999999"></el-input-number>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@@ -439,7 +448,7 @@
</template> </template>
<script> <script>
import { userListApi, groupListApi, levelListApi, tagListApi, groupPiApi, tagPiApi, foundsApi, updateSpreadApi } from '@/api/user' import { userListApi, groupListApi, levelListApi, tagListApi, groupPiApi, tagPiApi, foundsApi, updateSpreadApi, updatePhoneApi } from '@/api/user'
import { spreadClearApi } from '@/api/distribution' import { spreadClearApi } from '@/api/distribution'
import editFrom from './edit' import editFrom from './edit'
import userDetails from './userDetails' import userDetails from './userDetails'
@@ -638,6 +647,29 @@
this.getCityList() this.getCityList()
}, },
methods: { methods: {
setPhone(row) {
this.$prompt('修改手机号', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputErrorMessage: '请输入修改手机号',
inputType: 'text',
inputValue: row.phone,
inputPlaceholder: '请输入手机号',
closeOnClickModal: false,
inputValidator: (value) => {
if (!value) return '请填写手机号'
if (!/^1[3456789]\d{9}$/.test(value)) return '手机号格式不正确!'
// if(!value) return '输入不能为空'
}
}).then(({value}) => {
updatePhoneApi({id: row.uid,phone: value}).then(() => {
this.$message.success('编辑成功')
this.getList();
})
}).catch(() => {
this.$message.info('取消输入')
})
},
// 清除 // 清除
clearSpread(row) { clearSpread(row) {
this.$modalSure('解除【' + row.nickname + '】的上级推广人吗').then(() => { this.$modalSure('解除【' + row.nickname + '】的上级推广人吗').then(() => {
@@ -735,7 +767,7 @@
_this.couponData.push(item.title) _this.couponData.push(item.title)
}) })
_this.selectionList = [] _this.selectionList = []
},this.userIds) },this.userIds,'user')
}, },
Close() { Close() {
this.Visible = false this.Visible = false

View File

@@ -53,6 +53,7 @@
<script> <script>
import { infobyconditionApi, topdetailApi } from '@/api/user' import { infobyconditionApi, topdetailApi } from '@/api/user'
import { integralListApi } from '@/api/marketing'
export default { export default {
name: "UserDetails", name: "UserDetails",
props:{ props:{
@@ -97,7 +98,48 @@
methods: { methods: {
changeType(key) { changeType(key) {
this.tableFrom.type = key this.tableFrom.type = key
this.getInfo() if(key === '1'){
this.integral()
}else{
this.getInfo()
}
},
integral() {
this.loading = true
integralListApi({ limit:this.tableFrom.limit, page: this.tableFrom.page}, {uid:this.uid}).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.columns = [
{
title: '来源/用途',
key: 'title',
minWidth: 120
},
{
title: '积分变化',
key: 'integral',
minWidth: 120
},
{
title: '变化后积分',
key: 'balance',
minWidth: 120
},
{
title: '日期',
key: 'updateTime',
minWidth: 120
},
{
title: '备注',
key: 'mark',
minWidth: 120
}
]
this.loading = false
}).catch(res => {
this.loading = false
})
}, },
getInfo() { getInfo() {
this.tableFrom.userId = this.uid this.tableFrom.userId = this.uid
@@ -140,35 +182,6 @@
} }
] ]
break; break;
case '1':
this.columns = [
{
title: '来源/用途',
key: 'title',
minWidth: 120
},
{
title: '积分变化',
key: 'number',
minWidth: 120
},
{
title: '变化后积分',
key: 'balance',
minWidth: 120
},
{
title: '日期',
key: 'add_time',
minWidth: 120
},
{
title: '备注',
key: 'mark',
minWidth: 120
}
]
break;
case '2': case '2':
this.columns = [ this.columns = [
{ {
@@ -217,7 +230,7 @@
}, },
{ {
title: '兑换时间', title: '兑换时间',
key: 'useTime', key: 'updateTime',
minWidth: 120 minWidth: 120
} }
] ]

View File

@@ -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> <script>
import { checkLogin } from "./libs/login"; import {
import { HTTP_REQUEST_URL } from './config/app'; 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 { export default {
globalData: { globalData: {
spid: 0, spid: 0,
code:0, code: 0,
isLogin:false, isLogin: false,
userInfo:{}, userInfo: {},
MyMenus:[] MyMenus: [],
}, windowHeight: 0,
id: 0
},
onLaunch: function(option) { onLaunch: function(option) {
let that = this; 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 // #ifdef MP
if (HTTP_REQUEST_URL==''){ if (HTTP_REQUEST_URL == '') {
console.error("请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret"); console.error(
return false; "请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret"
} );
if (option.query.hasOwnProperty('scene')){ return false;
switch (option.scene) { }
//扫描小程序码 if (option.query.hasOwnProperty('scene')) {
case 1047: switch(option.scene){
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene)); case 1047: //扫描小程序码
that.globalData.code = val.pid; case 1048: //长按图片识别小程序码
break; case 1049: //手机相册选取小程序码
//长按图片识别小程序 case 1001: //直接进入小程序
case 1048: let value = this.$util.getUrlParams(decodeURIComponent(option.query.scene));
that.globalData.code = option.query.scene; let values = value.split(',');
break; if(values.length === 2){
//手机相册选取小程序码 let v1 = values[0].split(":");
case 1049: if (v1[0] === 'pid') {
that.globalData.code = option.query.scene; that.globalData.spid = v1[1];
break; } else{
//直接进入小程序 that.globalData.id = v1[1];
case 1001: }
that.globalData.spid = option.query.scene; let v2 = values[1].split(":");
break; if (v2[0] === 'pid') {
} that.globalData.spid = v2[1];
} }else{
// #endif that.globalData.id = v2[1];
}
}else{
that.globalData.spid = values[0].split(":")[1];
}
break;
}
}
// #endif
// 获取导航高度; // 获取导航高度;
uni.getSystemInfo({ uni.getSystemInfo({
success: function (res) { success: function(res) {
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91; 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() { onShow: function() {
// #ifdef H5 // #ifdef H5
uni.getSystemInfo({ uni.getSystemInfo({
success(e){ success(e) {
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */ /* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
if(e.windowWidth>420 && !window.top.isPC && !/iOS|Android/i.test(e.system)){ if (e.windowWidth > 420 && !window.top.isPC && !/iOS|Android/i.test(e.system)) {
// window.location.pathname = 'https://java.crmeb.net/'; // window.location.pathname = 'https://java.crmeb.net/';
/* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */ /* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
window.location.pathname = '/static/html/pc.html'; window.location.pathname = '/static/html/pc.html';
} }
} }
}) })
// #endif // #endif
}, },
onHide: function() { onHide: function() {
//console.log('App Hide') //console.log('App Hide')
} }
@@ -81,32 +186,39 @@
@import 'static/iconfont/iconfont.css'; @import 'static/iconfont/iconfont.css';
@import 'static/css/guildford.css'; @import 'static/css/guildford.css';
@import 'static/css/style.scss'; @import 'static/css/style.scss';
/* 条件编译仅在H5平台生效 */ /* 条件编译仅在H5平台生效 */
// #ifdef H5 // #ifdef H5
body::-webkit-scrollbar,html::-webkit-scrollbar { body::-webkit-scrollbar,
display: none; html::-webkit-scrollbar {
display: none;
} }
// #endif // #endif
view{ view {
box-sizing: border-box; box-sizing: border-box;
} }
.bg-color-red { .bg-color-red {
background-color: #e93323!important; background-color: #E93323 !important;
} }
.syspadding{
.syspadding {
padding-top: var(--status-bar-height); padding-top: var(--status-bar-height);
} }
.flex{
.flex {
display: flex; display: flex;
} }
.uni-scroll-view::-webkit-scrollbar { .uni-scroll-view::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */ /* 隐藏滚动条,但依旧具备可以滚动的功能 */
display: none display: none
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0; width: 0;
height: 0; height: 0;
color: transparent; color: transparent;
} }
</style><!-- --> </style>

View File

@@ -55,7 +55,7 @@ export function getBargainList(data) {
* @param object data * @param object data
*/ */
export function getBargainUserList(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) { export function getBargainUser(data) {
return request.get("bargain/start/user", 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,{}); 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 * @param int id
*/ */
export function getSeckillHeaderApi(){ export function getSeckillHeaderApi(){
return request.get('seckill/header',{},{noAuth:true});
}
/**
* 首页秒杀产品列表
*/
export function getSeckillIndexApi(){
return request.get('seckill/index',{},{noAuth:true}); 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');
} }

View File

@@ -120,9 +120,6 @@ export function verifyCode(){
export function registerVerify(phone){ export function registerVerify(phone){
return request.post('sendCode', { phone: phone },{noAuth:true},1) 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})
// }
/** /**
* 手机号注册 * 手机号注册

View File

@@ -4,10 +4,8 @@ import request from "@/utils/request.js";
* 获取购物车列表 * 获取购物车列表
* @param numType boolean true 购物车数量,false=购物车产品数量 * @param numType boolean true 购物车数量,false=购物车产品数量
*/ */
export function getCartCounts(numType) { export function getCartCounts(numType,type) {
return request.get("cart/count", { return request.get("cart/count?numType=" + numType + "&type=" + type);
numType: numType === undefined ? true : numType
});
} }
/** /**
* 获取购物车列表 * 获取购物车列表
@@ -184,8 +182,8 @@ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain
* @param string price * @param string price
* *
*/ */
export function getCouponsOrderPrice(data) { export function getCouponsOrderPrice(preOrderNo) {
return request.get('coupons/order', data) return request.get(`coupons/order/${preOrderNo}`)
} }
/** /**
@@ -194,8 +192,8 @@ export function getCouponsOrderPrice(data) {
* @param object data * @param object data
* *
*/ */
export function orderCreate(key, data) { export function orderCreate(data) {
return request.post('order/create/' + key, data); return request.post('order/create', data);
} }
/** /**
@@ -204,8 +202,8 @@ export function orderCreate(key, data) {
* @param data * @param data
* @returns {*} * @returns {*}
*/ */
export function postOrderComputed(key, data) { export function postOrderComputed(data) {
return request.post("order/computed/" + key, data); return request.post("order/computed/price", data);
} }
/** /**
@@ -229,5 +227,29 @@ export function wechatOrderPay(data) {
* @param object data * @param object data
*/ */
export function wechatQueryPayResult(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}`);
} }

View File

@@ -12,22 +12,15 @@ export function getWechatConfig() {
return request.get("wechat/config",{ url: encodeURIComponent(wechat.signLink()) },{ noAuth: true }); 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配置 * 获取微信sdk配置
* @returns {*} * @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( return request.get(
"wechat/authorize/login", "wechat/authorize/login?code=" + code + "&spread_spid=" + spread, {},
{ code, spread_spid:spread, login_type },
{ noAuth: true } { noAuth: true }
); );
} }
@@ -98,14 +91,26 @@ export function getUserPhone(data){
} }
/** /**
* 静默授权 * APP微信登录
* @param {Object} data * @param {Object} data
*/ */
export function silenceAuth(data) { export function appAuth(data) {
//#ifdef MP return request.post("wechat/authorize/app/login", data, { noAuth : true });
return request.get("wechat/authorize/program/login", data, { noAuth : true }); }
//#endif
//#ifdef H5 /**
return request.get("wechat/authorize/login", data, { noAuth : true }); * 苹果登录
//#endif * @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 });
} }

View File

@@ -5,8 +5,8 @@ import request from "@/utils/request.js";
* @param int id * @param int id
* *
*/ */
export function getProductDetail(id) { export function getProductDetail(id, type) {
return request.get('product/detail/' + id, {}, { return request.get('product/detail/' + id + '?type=' + type, {}, {
noAuth: true noAuth: true
}); });
} }
@@ -41,15 +41,20 @@ export function collectAdd(id, category) {
} }
/** /**
* 删除收藏产品 * 取消收藏产品
* @param int id * @param int id
* @param string category product=普通产品,product_seckill=秒杀产品
*/ */
export function collectDel(id, category) { export function collectDel(proId) {
return request.post('collect/del', { return request.post(`collect/cancel/${proId}`);
id: id, }
'category': category === undefined ? 'product' : category
});
/**
* 删除收藏产品
* @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) { export function getGroomList(type, data) {
return request.get('groom/list/' + type, data, { return request.get('index/product/' + type, data, {
noAuth: true noAuth: true
}); });
} }
@@ -163,3 +168,24 @@ export function getSearchKeyword() {
export function storeListApi(data) { export function storeListApi(data) {
return request.post("store/list", data, {}, 1); 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
})
}

View File

@@ -46,9 +46,6 @@ export function getCodeApi() {
export function registerVerify(phone){ export function registerVerify(phone){
return request.post('sendCode', { phone: phone },{noAuth:true},1) return request.post('sendCode', { phone: phone },{noAuth:true},1)
} }
// export function registerVerify(data) {
// return request.post("register/verify", data, { noAuth : true });
// }
/** /**
* h5用户手机号注册 * h5用户手机号注册
@@ -176,7 +173,7 @@ export function spreadCount(type){
} }
/* /*
* 推广数据 * 推广数据 当前佣金 提现总金额
* */ * */
export function getSpreadInfo() { export function getSpreadInfo() {
return request.get("commission"); return request.get("commission");
@@ -316,6 +313,13 @@ export function rechargeWechat(data) {
return request.post("recharge/wechat", 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) 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); 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");
}

View File

@@ -10,8 +10,7 @@
<button class='item grant' @click="setUserInfo">去授权</button> <button class='item grant' @click="setUserInfo">去授权</button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #ifdef MP -->
<!-- <button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button> --> <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>
<!-- #endif --> <!-- #endif -->
</view> </view>
</view> </view>
@@ -59,52 +58,6 @@
this.setAuthStatus(); this.setAuthStatus();
}, },
methods:{ 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(){ setAuthStatus(){
Routine.authorize().then(res=>{ Routine.authorize().then(res=>{
if(res.islogin === false) if(res.islogin === false)
@@ -118,7 +71,6 @@
}, },
getUserInfo(code){ getUserInfo(code){
Routine.getUserInfo().then(res=>{ Routine.getUserInfo().then(res=>{
console.log('res',res);
let userInfo = res.userInfo let userInfo = res.userInfo
userInfo.code = code; userInfo.code = code;
userInfo.spread_spid = app.globalData.spid;//获取推广人ID 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{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%} .Popup .bottom .item.on{width: 100%}
.flex{display:flex;} .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;} .mask{position:fixed;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,0.65);z-index:310;}
</style> </style>

View File

@@ -45,21 +45,26 @@
isLog: { isLog: {
type: Boolean, type: Boolean,
default: false, default: false,
}, }
}, },
data() { data() {
return { return {
active: 0, active: 0,
//地址列表 is_loading: true,
addressList: [], addressList: []
is_loading: true
}; };
}, },
methods: { methods: {
tapAddress: function(e, addressid) { tapAddress: function(e, addressid) {
this.active = e; 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() { close: function() {
this.$emit('changeClose'); this.$emit('changeClose');
@@ -79,14 +84,18 @@
limit: 5 limit: 5
}).then(res => { }).then(res => {
let addressList = res.data.list; 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++) { for (let i = 0, leng = addressList.length; i < leng; i++) {
if (addressList[i].id == that.address.addressId) { if (addressList[i].id == that.address.addressId) {
that.active = i; that.active = i;
defaultAddress = this.addressList[i];
} }
} }
that.$set(that, 'addressList', addressList); this.$emit('OnDefaultAddress', defaultAddress);
that.is_loading = false;
}) })
} }
} }

View File

@@ -1,14 +1,14 @@
<template> <template>
<view class="time" :style="justifyLeft"> <view class="time" :style="justifyLeft">
<text class="red" v-if="tipText">{{ tipText }}</text> <text class="" v-if="tipText">{{ tipText }}</text>
<text class="styleAll" v-if="isDay === true">{{ day }}</text> <text class="styleAll p6" v-if="isDay === true" :style="{background:bgColor.bgColor,color:bgColor.Color}">{{ day }}{{bgColor.isDay?'':''}}</text>
<text class="timeTxt red" v-if="dayText">{{ dayText }}</text> <text class="timeTxt" v-if="dayText" :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ dayText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""'>{{ hour }}</text> <text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ hour }}</text>
<text class="timeTxt red" v-if="hourText">{{ hourText }}</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":""'>{{ minute }}</text> <text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ minute }}</text>
<text class="timeTxt red" v-if="minuteText">{{ minuteText }}</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":""'>{{ second }}</text> <text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ second }}</text>
<text class="timeTxt red" v-if="secondText">{{ secondText }}</text> <text class="timeTxt" v-if="secondText">{{ secondText }}</text>
</view> </view>
</template> </template>
@@ -52,6 +52,10 @@
isCol: { isCol: {
type: Boolean, type: Boolean,
default: false default: false
},
bgColor: {
type: Object,
default: null
} }
}, },
data: function() { data: function() {
@@ -112,7 +116,29 @@
}; };
</script> </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 { .time {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -124,13 +150,13 @@
} }
.timeCol { .timeCol {
width: 40rpx; /* width: 40rpx;
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
text-align:center; text-align:center;
border-radius: 6px; border-radius: 6px;
background: #fff; background: #fff;
font-size: 24rpx; font-size: 24rpx; */
color: #E93323; color: #E93323;
} }
</style> </style>

View File

@@ -1,110 +1,235 @@
<template> <template>
<view> <view>
<view class='coupon-list-window' :class='coupon.coupon==true?"on":""'> <view class='coupon-list-window' :class='coupon.coupon==true?"on":""'>
<view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view> <view v-if="!orderShow" class="nav acea-row row-around">
<view class='coupon-list' v-if="coupon.list.length"> <view :class="['acea-row', 'row-middle', type === 1 ? 'on' : '']" @click="setType(1)">通用券</view>
<view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" @click="getCouponUser(index,item.id)" :key='index'> <view :class="['acea-row', 'row-middle', type === 2 ? 'on' : '']" @click="setType(2)">商品券</view>
<view class='money acea-row row-column row-center-wrapper' :class='item.isUse?"moneyGray":""'> <view :class="['acea-row', 'row-middle', type === 3 ? 'on' : '']" @click="setType(3)">品类券</view>
<view><text class='num'>{{item.money?Number(item.money):''}}</text></view> </view>
<view class="pic-num">{{item.minPrice}}元可用</view> <!-- <view class="occupy" v-if="!orderShow"></view> -->
</view> <!-- <view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view> -->
<view class='text'> <view class='coupon-list' :style="{'margin-top':!orderShow?'0':'50rpx'}">
<view class='condition line2'> <block v-if="coupon.list.length">
<span class='line-title' :class='item.isUse?"gray":""' v-if='item.useType===1'>通用</span> <!-- <view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" :key='index'> -->
<span class='line-title' :class='item.isUse?"gray":""' v-else-if='item.useType===3'>品类</span> <view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list"
<span class='line-title' :class='item.isUse?"gray":""' v-else>商品</span> @click="getCouponUser(index,item.id)" :key='index'>
<span>{{item.name}}</span> <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>
<view class='data acea-row row-between-wrapper'> </block>
<view v-if="item.day>0">领取后{{item.day}}天内可用</view> <!-- 无优惠券 -->
<view v-else>{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}</view> <view class='pictrue' v-else>
<view class='bnt gray' v-if="item.isUse">{{item.use_title || '已领取'}}</view> <image src='../../static/images/noCoupon.png'></image>
<view class='bnt bg-color' v-else>{{coupon.statusTile || '立即领取'}}</view> </view>
</view> </view>
</view>
</view>
</view>
<!-- 无优惠券 -->
<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 class='mask' catchtouchmove="true" :hidden='coupon.coupon==false' @click='close'></view>
</view> </view>
</template> </template>
<script> <script>
import { setCouponReceive } from '@/api/api.js'; import {
setCouponReceive
} from '@/api/api.js';
export default { export default {
props: { props: {
//打开状态 0=领取优惠券,1=使用优惠券 //打开状态 0=领取优惠券,1=使用优惠券
openType: { openType: {
type: Number, type: Number,
default: 0, default: 0,
}, },
coupon: { coupon: {
type: Object, type: Object,
default: function(){ default: function() {
return {}; return {};
} }
} },
//下单页面使用优惠券组件不展示tab切换页
orderShow: {
type: String,
default: function() {
return '';
}
}
}, },
data() { data() {
return { return {
type: 1
}; };
}, },
methods: { methods: {
close: function () { close: function() {
this.$emit('ChangCouponsClone'); this.type = 1
}, this.$emit('ChangCouponsClone');
getCouponUser:function(index,id){ },
let that = this; getCouponUser: function(index, id) {
let list = that.coupon.list; let that = this;
if (list[index].isUse == true && this.openType==0) return true; let list = that.coupon.list;
switch (this.openType){ if (list[index].isUse == true && this.openType == 0) return true;
case 0: switch (this.openType) {
//领取优惠券 case 0:
let ids = []; //领取优惠券
ids.push(id); let ids = [];
setCouponReceive(id).then(res=>{ ids.push(id);
that.$emit('ChangCouponsUseState', index); setCouponReceive(id).then(res => {
that.$util.Tips({title: "领取成功"}); that.$emit('ChangCouponsUseState', index);
that.$emit('ChangCoupons', list[index]); that.$util.Tips({
}) title: "领取成功"
break; });
case 1: that.$emit('ChangCoupons', list[index]);
that.$emit('ChangCoupons',index); })
break; break;
} case 1:
} that.$emit('ChangCoupons', index);
break;
}
},
setType: function(type) {
this.type = type;
this.$emit('tabCouponType', type);
}
} }
} }
</script> </script>
<style scoped lang="scss"> <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 {
.coupon-list-window.on{transform:translate3d(0,0,0);} position: fixed;
.coupon-list-window .title{height:124rpx;width:100%;text-align:center;line-height:124rpx;font-size:32rpx;font-weight:bold;position:relative;} bottom: 0;
.coupon-list-window .title .iconfont{position:absolute;right:30rpx;top:50%;transform:translateY(-50%);font-size:35rpx;color:#8a8a8a;font-weight:normal;} left: 0;
.coupon-list-window .coupon-list{margin:0 0 50rpx 0;height:550rpx;overflow:auto;} width: 100%;
.coupon-list-window .pictrue{width:414rpx;height:336rpx;margin:0 auto 50rpx auto;} background-color: #f5f5f5;
.coupon-list-window .pictrue image{width:100%;height:100%;} border-radius: 16rpx 16rpx 0 0;
.pic-num{color: #fff;font-size: 24rpx;} z-index: 555;
.line-title{ transform: translate3d(0, 100%, 0);
width:90rpx; transition: all .3s cubic-bezier(.25, .5, .5, .9);
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; .coupon-list-window.on {
color:#bbb; transform: translate3d(0, 0, 0);
background-color:#F5F5F5; }
.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> </style>

View File

@@ -24,6 +24,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: 200rpx; margin-top: 200rpx;
padding-bottom: 60rpx;
image{ image{
width: 414rpx; width: 414rpx;
height: 240rpx; height: 240rpx;

View File

@@ -73,7 +73,7 @@
border-radius: 50rpx; border-radius: 50rpx;
opacity: 0; opacity: 0;
height: 0; height: 0;
color: #e93323; color: $theme-color;
width: 0; width: 0;
} }

View File

@@ -1,7 +1,7 @@
<template> <template>
<view v-if="isUp"> <view v-if="isUp">
<view class="mobile-bg" @click="close"></view> <view class="mobile-bg" v-if="isShow" @click="close"></view>
<view class="mobile-mask animated" :class="{slideInUp:isUp}"> <view class="mobile-mask animated" :class="{slideInUp:isUp}" :style="{position:isPos?'fixed':'static'}">
<view class="input-item"> <view class="input-item">
<input type="text" v-model="account" placeholder="输入手机号" /> <input type="text" v-model="account" placeholder="输入手机号" />
</view> </view>
@@ -9,7 +9,7 @@
<input type="text" v-model="codeNum" placeholder="输入验证码" /> <input type="text" v-model="codeNum" placeholder="输入验证码" />
<button class="code" :disabled="disabled" @click="code">{{text}}</button> <button class="code" :disabled="disabled" @click="code">{{text}}</button>
</view> </view>
<view class="sub_btn" @click="loginBtn">立即登录</view> <view class="sub_btn" @click="loginBtn">{{(!userInfo.phone && isLogin) || (userInfo.phone && isLogin)?'立即绑定':'立即登录'}}</view>
</view> </view>
</view> </view>
</template> </template>
@@ -18,6 +18,7 @@
const app = getApp(); const app = getApp();
import sendVerifyCode from "@/mixins/SendVerifyCode"; import sendVerifyCode from "@/mixins/SendVerifyCode";
import Routine from '@/libs/routine'; import Routine from '@/libs/routine';
import {mapGetters} from "vuex";
import { import {
loginMobile, loginMobile,
registerVerify, registerVerify,
@@ -26,32 +27,59 @@
phoneSilenceAuth, phoneSilenceAuth,
phoneWxSilenceAuth phoneWxSilenceAuth
} from "@/api/user"; } from "@/api/user";
import { bindingPhone } from '@/api/api.js' import {
import { getUserPhone } from '@/api/public'; bindingPhone
export default{ } from '@/api/api.js'
name:'login_mobile', import {
props:{ getUserPhone,
isUp:{ iosBinding
type:Boolean, } from '@/api/public';
default:false, const BACK_URL = "login_back_url";
export default {
name: 'login_mobile',
computed: mapGetters(['userInfo','isLogin']),
props: {
isUp: {
type: Boolean,
default: false,
}, },
authKey:{ authKey: {
type:String, type: String,
default:'', default: '',
},
isShow: {
type: Boolean,
default: true
},
isPos: {
type: Boolean,
default: true
},
appleShow: {
type: String,
default: ''
},
platform: {
type: String,
default: '',
} }
}, },
data(){ data() {
return { return {
keyCode:'', keyCode: '',
account:'', account: '',
codeNum:'' codeNum: '',
isApp: 0
} }
}, },
mixins: [sendVerifyCode], mixins: [sendVerifyCode],
mounted() { mounted() {
//this.getCode(); //this.getCode();
}, },
methods:{ onLoad() {
},
methods: {
// 获取验证码 // 获取验证码
async code() { async code() {
let that = this; 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({ if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码' title: '请输入正确的手机号码'
}); });
await registerVerify(that.account).then(res=>{ await registerVerify(that.account).then(res => {
that.$util.Tips({title:res.msg}); that.$util.Tips({
title: res.msg
});
that.sendCode(); that.sendCode();
}).catch(err=>{ }).catch(err => {
return that.$util.Tips({ return that.$util.Tips({
title:err title: err
}) })
}) })
}, },
@@ -81,11 +111,11 @@
}); });
}); });
}, },
close(){ close() {
this.$emit('close',false) this.$emit('close', false)
}, },
// 登录 // 登录
loginBtn(){ loginBtn() {
let that = this let that = this
if (!that.account) return that.$util.Tips({ if (!that.account) return that.$util.Tips({
title: '请填写手机号码' title: '请填写手机号码'
@@ -99,47 +129,66 @@
if (!/^[\w\d]+$/i.test(that.codeNum)) return that.$util.Tips({ if (!/^[\w\d]+$/i.test(that.codeNum)) return that.$util.Tips({
title: '请输入正确的验证码' title: '请输入正确的验证码'
}); });
uni.showLoading({ title: '正在登录中' }); uni.showLoading({
getUserPhone({ title: !this.userInfo.phone && this.isLogin?'正在绑定中':'正在登录中'
captcha: that.codeNum, });
phone: that.account, if (!this.userInfo.phone && this.isLogin) {
spid: app.globalData.spid, iosBinding({
spread: app.globalData.code, captcha: that.codeNum,
type: 'public', phone: that.account
key: this.authKey }).then(res => {
}).then(res=>{ that.$util.Tips({
let time = res.data.expires_time - this.$Cache.time(); title: '绑定手机号成功',
this.$store.commit('LOGIN', { icon: 'success'
token: res.data.token, }, {
time: time tab: 3
}); })
this.getUserInfo(); that.isApp = 1;
}).catch(error=>{ that.getUserInfo();
uni.hideLoading() }).catch(error => {
this.$util.Tips({ uni.hideLoading()
title:error 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 // #ifdef MP
phoneSilenceAuth(code){ phoneSilenceAuth(code) {
let self = this let self = this
phoneSilenceAuth({ phoneSilenceAuth({
code:code, code: code,
spid: app.globalData.spid, spid: app.globalData.spid,
spread: app.globalData.code, spread: app.globalData.code,
phone:this.account, phone: this.account,
captcha:this.codeNum captcha: this.codeNum
}).then(res=>{ }).then(res => {
let time = res.data.expires_time - this.$Cache.time(); this.$store.commit('LOGIN', res.data.token);
this.$store.commit('LOGIN', { this.$store.commit("SETUID", res.data.uid);
token: res.data.token,
time: time
});
this.getUserInfo(); this.getUserInfo();
}).catch(error=>{ }).catch(error => {
self.$util.Tips({ self.$util.Tips({
title:error title: error
}) })
}) })
}, },
@@ -151,52 +200,56 @@
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then(res => {
uni.hideLoading(); uni.hideLoading();
that.userInfo = res.data
that.$store.commit("SETUID", res.data.uid);
that.$store.commit("UPDATE_USERINFO", res.data); that.$store.commit("UPDATE_USERINFO", res.data);
// #ifdef MP // #ifdef MP
that.$util.Tips({ that.$util.Tips({
title:'登录成功', title: '登录成功',
icon:'success' icon: 'success'
},{ }, {
tab:3 tab: 3
}) })
that.close() that.close()
// #endif // #endif
// #ifdef H5 // #ifdef H5
that.$emit('wechatPhone',true) that.$emit('wechatPhone', true)
// #endif // #endif
}); });
}, },
} }
} }
</script> </script>
<style lang="stylus"> <style lang="stylus" scoped>
.mobile-bg{ .mobile-bg {
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0,0,0,0.5); background: rgba(0, 0, 0, 0.5);
} }
.isPos {
position: static;
}
.mobile-mask { .mobile-mask {
z-index: 20; z-index: 20;
position: fixed; // position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
padding: 67rpx 30rpx; padding: 67rpx 30rpx;
background: #fff; background: #fff;
.input-item{
.input-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
height: 86rpx; height: 86rpx;
margin-bottom: 38rpx; margin-bottom: 38rpx;
input{
input {
flex: 1; flex: 1;
display: block; display: block;
height: 100%; height: 100%;
@@ -204,7 +257,8 @@
border-radius: 43rpx; border-radius: 43rpx;
border: 1px solid #DCDCDC; border: 1px solid #DCDCDC;
} }
.code{
.code {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -213,15 +267,17 @@
margin-left: 30rpx; margin-left: 30rpx;
background: rgba(233, 51, 35, 0.05); background: rgba(233, 51, 35, 0.05);
font-size: 28rpx; font-size: 28rpx;
color: #E93323; color: $theme-color;
border-radius: 43rpx; border-radius: 43rpx;
&[disabled]{
&[disabled] {
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
color: #999; color: #999;
} }
} }
} }
.sub_btn{
.sub_btn {
width: 690rpx; width: 690rpx;
height: 86rpx; height: 86rpx;
line-height: 86rpx; line-height: 86rpx;
@@ -233,7 +289,8 @@
text-align: center; text-align: center;
} }
} }
.animated{
animation-duration:.4s .animated {
animation-duration: .4s
} }
</style> </style>

View File

@@ -20,7 +20,7 @@
getCodeApi, getCodeApi,
getUserInfo getUserInfo
} from "@/api/user"; } from "@/api/user";
import { getLogo, silenceAuth, getUserPhone } from '@/api/public'; import { getLogo, getUserPhone } from '@/api/public';
export default{ export default{
name:'routine_phone', name:'routine_phone',
props:{ props:{
@@ -51,7 +51,6 @@
// #ifdef MP // #ifdef MP
// 小程序获取手机号码 // 小程序获取手机号码
getphonenumber(e){ getphonenumber(e){
console.log(e)
uni.showLoading({ title: '加载中' }); uni.showLoading({ title: '加载中' });
Routine.getCode() Routine.getCode()
.then(code => { .then(code => {
@@ -67,22 +66,21 @@
encryptedData: encryptedData, encryptedData: encryptedData,
iv: iv, iv: iv,
code: code, code: code,
spid: app.globalData.spid,
spread: app.globalData.code,
key:this.authKey, key:this.authKey,
type: 'routine' type: 'routine'
}) })
.then(res => { .then(res => {
let time = res.data.expires_time - this.$Cache.time();
this.$store.commit('LOGIN', { this.$store.commit('LOGIN', {
token: res.data.token, token: res.data.token
time: time
}); });
this.$store.commit("SETUID", res.data.uid);
this.getUserInfo(); this.getUserInfo();
}) })
.catch(res => { .catch(res => {
console.log(res);
uni.hideLoading(); uni.hideLoading();
this.$util.Tips({
title: res
});
}); });
}, },
/** /**
@@ -93,7 +91,6 @@
getUserInfo().then(res => { getUserInfo().then(res => {
uni.hideLoading(); uni.hideLoading();
that.userInfo = res.data that.userInfo = res.data
that.$store.commit("SETUID", res.data.uid);
that.$store.commit("UPDATE_USERINFO", res.data); that.$store.commit("UPDATE_USERINFO", res.data);
that.isStatus = true that.isStatus = true
this.close() this.close()
@@ -150,7 +147,7 @@
height: 86rpx; height: 86rpx;
line-height: 86rpx; line-height: 86rpx;
margin-top: 60rpx; margin-top: 60rpx;
background: #E93323; background: $theme-color;
border-radius: 43rpx; border-radius: 43rpx;
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;

View File

@@ -1,26 +1,27 @@
<template> <template>
<view class="orderGoods"> <view class="orderGoods borRadius14">
<view class='total'>{{totalNmu}}件商品</view> <view class='total'>{{ orderProNum?orderProNum:totalNmu}}件商品</view>
<view class='goodWrapper'> <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='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index"
@click="jumpCon(item.productId)">
<view class='pictrue'> <view class='pictrue'>
<image :src='item.productInfo.attrInfo.image' v-if="item.productInfo.attrInfo"></image> <image :src='item.image'></image>
<image :src='item.productInfo.image' v-else></image>
</view> </view>
<view class='text'> <view class='text'>
<view class='acea-row row-between-wrapper'> <view class='acea-row row-between-wrapper'>
<view class='name line1'>{{item.productInfo.storeName}}</view> <view class='name line1'>{{item.productName ? item.productName : item.storeName}}</view>
<view class='num'>x {{item.cartNum}}</view> <view class='num'>x {{item.payNum ? item.payNum : item.cartNum}}</view>
</view> </view>
<view class='attr line1' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.suk}}</view> <view class='attr line1' v-if="item.sku">{{item.sku}}</view>
<view class='money font-color' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.price}}</view> <view class='money font-color'>{{item.price}}</view>
<view class='money font-color' v-else>{{item.productInfo.price}}</view> <view class='evaluate' v-if='item.isReply==0 && evaluate==2' @click.stop="evaluateTap(item)">评价
<view class='evaluate' v-if='item.isReply==0 && evaluate==3' @click.stop="evaluateTap(item.productAttrUnique,orderId,ids)">评价</view> </view>
<view class='evaluate' v-else-if="item.isReply==1 && evaluate==3">已评价</view> <view class='evaluate' v-else-if="item.isReply==1">已评价</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
@@ -47,32 +48,45 @@
jump: { jump: {
type: Boolean, type: Boolean,
default: false, default: false,
},
orderProNum: {
type: Number,
default: function() {
return 0;
}
},
productType: {
type: Number,
default: function() {
return 0;
}
} }
}, },
data() { data() {
return { return {
totalNmu:'' totalNmu: ''
}; };
}, },
watch:{ watch: {
cartInfo:function(nVal,oVal){ cartInfo: function(nVal, oVal) {
let num = 0 let num = 0
nVal.forEach((item,index)=>{ nVal.forEach((item, index) => {
num += item.cartNum num += item.cartNum
}) })
this.totalNmu = num this.totalNmu = num
} }
}, },
methods: { methods: {
evaluateTap:function(unique,orderId,ids){ evaluateTap(item) {
uni.navigateTo({ 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){ jumpCon: function(id) {
if(this.jump){ let type = this.productType==0?'normal':'video'
if (this.jump) {
uni.navigateTo({ 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"> <style scoped lang="scss">
.orderGoods { .orderGoods {
background-color: #fff; background-color: #fff;
margin-top: 12rpx; margin-top: 15rpx;
} }
.orderGoods .total { .orderGoods .total {
width: 100%; width: 100%;
height: 86rpx; height: 86rpx;
padding: 0 30rpx; padding: 0 24rpx;
border-bottom: 2rpx solid #f0f0f0; border-bottom: 2rpx solid #f0f0f0;
font-size: 30rpx; font-size: 30rpx;
color: #282828; color: #282828;
line-height: 86rpx; line-height: 86rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.pictrue image{
.pictrue image {
background: #f4f4f4; background: #f4f4f4;
} }
</style> </style>

View File

@@ -4,8 +4,8 @@
<view class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text> 选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
</view> </view>
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode" <view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
:key="index"> v-for="(item,index) in payMode" :key="index">
<view class="left acea-row row-between-wrapper"> <view class="left acea-row row-between-wrapper">
<view class="iconfont" :class="item.icon"></view> <view class="iconfont" :class="item.icon"></view>
<view class="text"> <view class="text">
@@ -26,8 +26,12 @@
<script> <script>
import { import {
orderPay, orderPay,
wechatOrderPay wechatOrderPay,
wechatQueryPayResult
} from '@/api/order.js'; } from '@/api/order.js';
import {
mapGetters
} from "vuex";
export default { export default {
props: { props: {
payMode: { payMode: {
@@ -54,6 +58,7 @@
}; };
}, },
computed: mapGetters(['systemPlatform']),
methods: { methods: {
close: function() { close: function() {
this.$emit('onChangeFun', { this.$emit('onChangeFun', {
@@ -71,18 +76,19 @@
}); });
uni.showLoading({ uni.showLoading({
title: '支付中' title: '支付中'
}); });
wechatOrderPay({ wechatOrderPay({
orderNo: that.order_id, orderNo: that.order_id,
// #ifdef MP // #ifdef MP
payChannel: 'routine', payChannel: 'routine',
// #endif // #endif
// #ifdef H5 || APP-PLUS // #ifdef H5
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5', payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
// #endif // #endif
payType: paytype payType: paytype
}).then(res => { }).then(res => {
let jsConfig = res.data.jsConfig; let jsConfig = res.data.jsConfig;
that.order_id = res.data.orderNo;
switch (res.data.payType) { switch (res.data.payType) {
case 'weixin': case 'weixin':
// #ifdef MP // #ifdef MP
@@ -94,14 +100,22 @@
paySign: jsConfig.paySign, paySign: jsConfig.paySign,
success: function(ress) { success: function(ress) {
uni.hideLoading(); uni.hideLoading();
return that.$util.Tips({ wechatQueryPayResult(that.order_id).then(res => {
title: '支付成功', uni.hideLoading();
icon: 'success' return that.$util.Tips({
}, () => { title: "支付成功",
that.$emit('onChangeFun', { icon: 'success'
action: 'pay_complete' }, () => {
that.$emit('onChangeFun', {
action: 'pay_complete'
});
}); });
}); }).cache(err => {
uni.hideLoading();
return that.$util.Tips({
title: err
});
})
}, },
fail: function(e) { fail: function(e) {
uni.hideLoading(); uni.hideLoading();
@@ -115,13 +129,14 @@
}, },
complete: function(e) { complete: function(e) {
uni.hideLoading(); uni.hideLoading();
if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({ if (e.errMsg == 'requestPayment:cancel') return that.$util
title: '取消支付' .Tips({
}, () => { title: '取消支付'
that.$emit('onChangeFun', { }, () => {
action: 'pay_fail' that.$emit('onChangeFun', {
action: 'pay_fail'
});
}); });
});
}, },
}) })
// #endif // #endif
@@ -135,13 +150,13 @@
}; };
that.$wechat.pay(datas).then(res => { that.$wechat.pay(datas).then(res => {
if (res.errMsg == 'chooseWXPay:cancel') { if (res.errMsg == 'chooseWXPay:cancel') {
uni.hideLoading();
return that.$util.Tips({ return that.$util.Tips({
title: '支付失败' title: '支付失败'
}); });
} else { } else {
wechatQueryPayResult({ wechatQueryPayResult(that.order_id).then(res => {
orderNo: that.order_id uni.hideLoading();
}).then(res => {
return that.$util.Tips({ return that.$util.Tips({
title: "支付成功", title: "支付成功",
icon: 'success' icon: 'success'
@@ -150,13 +165,19 @@
action: 'pay_complete' action: 'pay_complete'
}); });
}); });
}).cache(errW => { }).cache(err => {
uni.hideLoading();
return that.$util.Tips({ return that.$util.Tips({
title: errW title: err
}); });
}) })
} }
}).cache(errW => {
uni.hideLoading();
return that.$util.Tips({
title: errW
});
}) })
// #endif // #endif
break; break;
@@ -171,18 +192,19 @@
}); });
}); });
break; break;
case 'weixinh5': case 'weixinh5':
uni.hideLoading(); uni.hideLoading();
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host + goPages + '&status=1'); location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol +
return that.$util.Tips({ '//' + window.location.host + goPages + '&status=1');
title: "支付中", return that.$util.Tips({
icon: 'success' title: "支付中",
}, () => { icon: 'success'
that.$emit('onChangeFun', { }, () => {
action: 'pay_complete' that.$emit('onChangeFun', {
}); action: 'pay_complete'
}); });
break; });
break;
} }
}).catch(err => { }).catch(err => {
uni.hideLoading(); uni.hideLoading();

View File

@@ -1,89 +1,149 @@
<template> <template>
<!-- <view class='product-bg'> <view class='product-bg'>
<swiper :indicator-dots="indicatorDots" <swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change"> :circular="circular" :interval="interval" :duration="duration" @change="change">
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item> <swiper-item v-if="videoline">
<image :src="item" class="slide-image"/> <view class="item">
<view v-show="!controls" style="width:100%;height:100% ">
</swiper-item> <video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% "
</block> show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"
</swiper> :enable-progress-gesture="false" :poster="imgUrls[0]" @pause="videoPause"></video>
<view class='pages'>{{currents}}/{{imgUrls.length || 1}}</view> </view>
</view> --> <view class="poster" v-show="controls">
<view class='product-bg'> <image class="image" :src="imgUrls[0]"></image>
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" </view>
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change"> <view class="stop" v-show="controls" @tap="bindPause">
<swiper-item v-if="videoline"> <image class="image" src="../../static/images/stop.png"></image>
<view class="item"> </view>
<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>
<view class="poster" v-if="controls"> </swiper-item>
<image class="image" :src="imgUrls[0]"></image>
</view> <block v-for="(item,index) in imgUrls" :key='index'>
<view class="stop" v-if="controls" @tap="bindPause"> <swiper-item>
<image class="image" src="../../static/images/stop.png"></image> <image :src="item" class="slide-image" />
</view> </swiper-item>
</view> </block>
</swiper-item> </swiper>
<block v-for="(item,index) in imgUrls" :key='index'> </view>
<swiper-item>
<image :src="item" class="slide-image"/>
</swiper-item>
</block>
</swiper>
</view>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
imgUrls: { imgUrls: {
type: Array, type: Array,
default: function(){ default: function() {
return []; return [];
} }
}, },
videoline: videoline: {
{ type: String,
type:String, value: ""
value:"" }
}
}, },
data() { data() {
return { return {
indicatorDots: true, indicatorDots: true,
circular: true, circular: true,
autoplay: false, autoplay: true,
interval: 3000, interval: 3000,
duration: 500, duration: 500,
currents: "1", currents: "1",
controls:true controls: true,
isPlay:true,
videoContext:''
}; };
}, },
mounted(){ mounted() {
//this.videoContext = uni.createVideoContext('myVideo',this); if(this.videoline){
this.imgUrls.shift()
}
}, },
methods: { methods: {
bindPause:function(){ videoPause(e){
this.videoContext.play(); },
this.$set(this,'controls',false) bindPause: function() {
}, this.videoContext.play();
change: function (e) { this.$set(this, 'controls', false)
this.$set(this,'currents',e.detail.current + 1); this.autoplay = false
} },
change: function(e) {
this.$set(this, 'currents', e.detail.current + 1);
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.product-bg{width:100%;height:750rpx;position:relative;} .product-bg {
.product-bg swiper{width:100%;height:100%;position:relative;} width: 100%;
.product-bg .slide-image{width:100%;height:100%;} height: 750rpx;
.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;} position: relative;
#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 swiper {
.product-bg .item .poster .image{width:100%;height:100%;} width: 100%;
.product-bg .item .stop{position:absolute;top:50%;left:50%;width:136rpx;height:136rpx;margin-top:-68rpx;margin-left:-68rpx;z-index:9;} height: 100%;
.product-bg .item .stop .image{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> </style>

View File

@@ -1,6 +1,7 @@
<template> <template>
<view> <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="textpic acea-row row-between-wrapper">
<view class="pictrue"> <view class="pictrue">
<image :src="attr.productSelect.image"></image> <image :src="attr.productSelect.image"></image>
@@ -12,7 +13,7 @@
<view class="money font-color"> <view class="money font-color">
<text class="num">{{ attr.productSelect.price }}</text> <text class="num">{{ attr.productSelect.price }}</text>
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</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> </view>
<view class="iconfont icon-guanbi" @click="closeAttr"></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="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<view class="title">{{ item.attrName }}</view> <view class="title">{{ item.attrName }}</view>
<view class="listn acea-row row-middle"> <view class="listn acea-row row-middle">
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attrValue" <view class="itemn" :class="item.index === itemn ? 'on' : ''"
@click="tapAttr(indexw, indexn)" :key="indexn"> v-for="(itemn, indexn) in item.attrValues" @click="tapAttr(indexw, indexn)"
{{ itemn.attr }} :key="indexn">
{{ itemn }}
</view> </view>
</view> </view>
</view> </view>
@@ -32,26 +34,32 @@
<view class="cart acea-row row-between-wrapper"> <view class="cart acea-row row-between-wrapper">
<view class="title">数量</view> <view class="title">数量</view>
<view class="carnum acea-row row-left"> <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>
<view class='item num'> <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>
<view v-if="iSplus" class="item plus" :class=" <view v-if="iSplus" class="item plus" :class="
attr.productSelect.cart_num >= attr.productSelect.stock attr.productSelect.cart_num >= attr.productSelect.stock
? 'on' ? 'on'
: '' : ''
" " @click="CartNumAdd">
@click="CartNumAdd">
+ +
</view> </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>
</view> </view>
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0" @click="goCat">我要参团</view> <view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0"
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view> @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="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 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> <view class="joinBnt on" v-else-if="(iScart && !attr.productSelect.stock)">已售罄</view>
@@ -68,43 +76,42 @@
type: Object, type: Object,
default: () => {} default: () => {}
}, },
limitNum:{ limitNum: {
type: Number, type: Number,
value: 0 value: 0
}, },
isShow:{ isShow: {
type: Number, type: Number,
value: 0 value: 0
}, },
iSbnt:{ iSbnt: {
type:Number, type: Number,
value:0 value: 0
}, },
iSplus:{ iSplus: {
type:Number, type: Number,
value:0 value: 0
}, },
iScart:{ iScart: {
type:Number, type: Number,
value:0 value: 0
} }
}, },
data() { data() {
return {}; return {};
}, },
mounted() { mounted() {},
},
methods: { methods: {
goCat:function(){ goCat: function() {
this.$emit('goCat'); this.$emit('goCat');
}, },
/** /**
* 购物车手动输入数量 * 购物车手动输入数量
* *
*/ */
bindCode: function (e) { bindCode: function(e) {
this.$emit('iptCartNum', this.attr.productSelect.cart_num); this.$emit('iptCartNum', this.attr.productSelect.cart_num);
}, },
closeAttr: function() { closeAttr: function() {
this.$emit('myevent'); this.$emit('myevent');
}, },
@@ -158,55 +165,57 @@
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9); transition: all .3s cubic-bezier(.25, .5, .5, .9);
} }
.product-window.on { .product-window.on {
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
} }
.product-window.join{padding-bottom: 30rpx;} .product-window.join {
padding-bottom: 30rpx;
.product-window.joinCart{ }
.product-window.joinCart {
padding-bottom: 30rpx; padding-bottom: 30rpx;
z-index: 999; z-index: 999;
} }
.product-window .textpic { .product-window .textpic {
padding: 0 130rpx 0 30rpx; padding: 0 130rpx 0 30rpx;
margin-top: 29rpx; margin-top: 29rpx;
position: relative; position: relative;
} }
.product-window .textpic .pictrue { .product-window .textpic .pictrue {
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
} }
.product-window .textpic .pictrue image { .product-window .textpic .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 10rpx; border-radius: 10rpx;
} }
.product-window .textpic .text { .product-window .textpic .text {
width: 410rpx; width: 410rpx;
font-size: 32rpx; font-size: 32rpx;
color: #202020; color: #333333;
} }
.product-window .textpic .text .money { .product-window .textpic .text .money {
font-size: 24rpx; font-size: 24rpx;
margin-top: 40rpx; margin-top: 40rpx;
} }
.product-window .textpic .text .money .num { .product-window .textpic .text .money .num {
font-size: 36rpx; font-size: 36rpx;
} }
.product-window .textpic .text .money .stock { .product-window .textpic .text .money .stock {
color: #999; color: #999;
margin-left: 18rpx; margin-left: 18rpx;
} }
.product-window .textpic .iconfont { .product-window .textpic .iconfont {
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
@@ -214,63 +223,63 @@
font-size: 35rpx; font-size: 35rpx;
color: #8a8a8a; color: #8a8a8a;
} }
.product-window .rollTop{ .product-window .rollTop {
max-height: 500rpx; max-height: 500rpx;
overflow: auto; overflow: auto;
margin-top: 36rpx; margin-top: 36rpx;
} }
.product-window .productWinList .item~.item { .product-window .productWinList .item~.item {
margin-top: 36rpx; margin-top: 36rpx;
} }
.product-window .productWinList .item .title { .product-window .productWinList .item .title {
font-size: 30rpx; font-size: 30rpx;
color: #999; color: #999;
padding: 0 30rpx; padding: 0 30rpx;
} }
.product-window .productWinList .item .listn { .product-window .productWinList .item .listn {
padding: 0 30rpx 0 16rpx; padding: 0 30rpx 0 16rpx;
} }
.product-window .productWinList .item .listn .itemn { .product-window .productWinList .item .listn .itemn {
border: 1px solid #F2F2F2; border: 1px solid #F2F2F2;
font-size: 26rpx; font-size: 26rpx;
color: #282828; color: #282828;
padding: 7rpx 33rpx; padding: 7rpx 33rpx;
border-radius: 25rpx; border-radius: 40rpx;
margin: 20rpx 0 0 14rpx; margin: 20rpx 0 0 14rpx;
background-color: #F2F2F2; background-color: #F2F2F2;
} }
.product-window .productWinList .item .listn .itemn.on { .product-window .productWinList .item .listn .itemn.on {
color: #E93323; color: $theme-color;
background:rgba(255,244,243,1); background: rgba(255, 244, 243, 1);
border-color: #E93323; border-color: $theme-color;
} }
.product-window .productWinList .item .listn .itemn.limit { .product-window .productWinList .item .listn .itemn.limit {
color: #999; color: #999;
text-decoration:line-through; text-decoration: line-through;
} }
.product-window .cart { .product-window .cart {
margin-top: 36rpx; margin-top: 36rpx;
padding: 0 30rpx; padding: 0 30rpx;
} }
.product-window .cart .title { .product-window .cart .title {
font-size: 30rpx; font-size: 30rpx;
color: #999; color: #999;
} }
.product-window .cart .carnum { .product-window .cart .carnum {
height: 54rpx; height: 54rpx;
margin-top: 24rpx; margin-top: 24rpx;
} }
.product-window .cart .carnum view { .product-window .cart .carnum view {
// border: 1px solid #a4a4a4; // border: 1px solid #a4a4a4;
width: 84rpx; width: 84rpx;
@@ -280,35 +289,56 @@
color: #282828; color: #282828;
font-size: 45rpx; font-size: 45rpx;
} }
.product-window .cart .carnum .reduce { .product-window .cart .carnum .reduce {
border-right: 0; border-right: 0;
border-radius: 6rpx 0 0 6rpx; border-radius: 6rpx 0 0 6rpx;
line-height: 48rpx; line-height: 48rpx;
} }
.product-window .cart .carnum .reduce.on { .product-window .cart .carnum .reduce.on {
// border-color: #e3e3e3; // border-color: #e3e3e3;
color: #DEDEDE; color: #DEDEDE;
font-size: 60rpx; font-size: 44rpx;
} }
.product-window .cart .carnum .plus { .product-window .cart .carnum .plus {
border-left: 0; border-left: 0;
border-radius: 0 6rpx 6rpx 0; border-radius: 0 6rpx 6rpx 0;
line-height: 46rpx; line-height: 46rpx;
} }
.product-window .cart .carnum .plus.on { .product-window .cart .carnum .plus.on {
border-color: #e3e3e3; border-color: #e3e3e3;
color: #dedede; color: #dedede;
} }
.product-window .cart .carnum .num { .product-window .cart .carnum .num {
background:rgba(242,242,242,1); background: rgba(242, 242, 242, 1);
color: #282828; color: #282828;
font-size: 28rpx; 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;} .product-window .joinBnt {
</style> 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>

View File

@@ -58,6 +58,7 @@
.recommend .title { .recommend .title {
height: 135rpx; height: 135rpx;
line-height: 135rpx;
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
@@ -96,7 +97,7 @@
.recommend .recommendList .item .pictrue image { .recommend .recommendList .item .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6rpx; border-radius: 14rpx;
} }
.recommend .recommendList .item .name { .recommend .recommendList .item .name {
@@ -108,6 +109,7 @@
.recommend .recommendList .item .money { .recommend .recommendList .item .money {
font-size: 20rpx; font-size: 20rpx;
margin-top: 8rpx; margin-top: 8rpx;
font-weight: 600;
} }
.recommend .recommendList .item .money .num { .recommend .recommendList .item .money .num {

View File

@@ -48,5 +48,5 @@
.swiper swiper .slide-image{width:100%;height:100%;} .swiper swiper .slide-image{width:100%;height:100%;}
.swiper .dots{position:absolute;right:40rpx;bottom:20rpx;} .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{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> </style>

View File

@@ -1,33 +1,36 @@
<template> <template>
<!-- v-if="reply.length>0" -->
<view class="evaluateWtapper"> <view class="evaluateWtapper">
<view class="evaluateItem" v-for="(item, indexw) in reply" :key="indexw"> <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"> <view class="pictrue">
<image :src="item.avatar"></image> <image :src="item.avatar"></image>
</view> </view>
<view class="acea-row row-between-wrapper" style="width: 87%;"> <view class="content">
<view class="acea-row row-middle"> <view>
<view class="name line1">{{ item.nickname }}</view> <view class="acea-row row-between">
<view class="start" :class="'star' + item.productScore"></view> <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>
<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> </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>
</view> </view>
</template> </template>
@@ -55,7 +58,9 @@
<style scoped lang='scss'> <style scoped lang='scss'>
.evaluateWtapper .evaluateItem { .evaluateWtapper .evaluateItem {
background-color: #fff; background-color: #fff;
padding-bottom: 25rpx; padding: 24rpx;
border-bottom-left-radius: 14rpx;
border-bottom-right-radius: 14rpx;
} }
.evaluateWtapper .evaluateItem~.evaluateItem { .evaluateWtapper .evaluateItem~.evaluateItem {
@@ -65,14 +70,15 @@
.evaluateWtapper .evaluateItem .pic-text { .evaluateWtapper .evaluateItem .pic-text {
font-size: 26rpx; font-size: 26rpx;
color: #282828; color: #282828;
height: 95rpx; .content{
padding: 0 30rpx; width: 84%;
margin-left: 20rpx;
}
} }
.evaluateWtapper .evaluateItem .pic-text .pictrue { .evaluateWtapper .evaluateItem .pic-text .pictrue {
width: 56rpx; width: 62rpx;
height: 56rpx; height: 62rpx;
margin-right: 20rpx;
} }
.evaluateWtapper .evaluateItem .pic-text .pictrue image { .evaluateWtapper .evaluateItem .pic-text .pictrue image {
@@ -87,40 +93,47 @@
.evaluateWtapper .evaluateItem .time { .evaluateWtapper .evaluateItem .time {
font-size: 24rpx; font-size: 24rpx;
color: #82848f; color: #999999;
padding: 0 30rpx;
}
.sku{
font-size: 24rpx;
color: #999999;
margin: 10rpx 0;
} }
.evaluateWtapper .evaluateItem .evaluate-infor { .evaluateWtapper .evaluateItem .evaluate-infor {
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #333;
margin-top: 19rpx; margin-bottom: 14rpx;
padding: 0 30rpx;
} }
.evaluateWtapper .evaluateItem .imgList { .evaluateWtapper .evaluateItem .imgList {/*
padding: 0 30rpx 0 15rpx; padding: 0 24rpx;
margin-top: 25rpx; margin-top: 16rpx; */
} }
.evaluateWtapper .evaluateItem .imgList .pictrue { .evaluateWtapper .evaluateItem .imgList .pictrue {
width: 156rpx; width: 102rpx;
height: 156rpx; height: 102rpx;
margin: 0 0 15rpx 15rpx; margin-right: 14rpx;
border-radius: 14rpx;
margin-bottom: 16rpx;
/* margin: 0 0 15rpx 15rpx; */
} }
.evaluateWtapper .evaluateItem .imgList .pictrue image { .evaluateWtapper .evaluateItem .imgList .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #f7f7f7; background-color: #f7f7f7;
border-radius: 14rpx;
} }
.evaluateWtapper .evaluateItem .reply { .evaluateWtapper .evaluateItem .reply {
font-size: 26rpx; font-size: 26rpx;
color: #454545; color: #454545;
background-color: #f7f7f7; background-color: #f7f7f7;
border-radius: 5rpx; border-radius: 14rpx;
margin: 20rpx 30rpx 0 30rpx; margin: 20rpx 30rpx 0 0rpx;
padding: 20rpx; padding: 20rpx;
position: relative; position: relative;
} }

View File

@@ -4,13 +4,13 @@ let domain = 'http://127.0.0.1:8080'
module.exports = { module.exports = {
// 请求域名 格式: https://您的域名 // 请求域名 格式: https://您的域名
// #ifdef MP // #ifdef MP
// HTTP_REQUEST_URL:'', HTTP_REQUEST_URL: domain,
HTTP_REQUEST_URL:domain,
// #endif // #endif
// #ifdef H5 // #ifdef H5
//H5接口是浏览器地址 //H5接口是浏览器地址
// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host, // HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,
// http://api.java.crmeb.net:20001
HTTP_REQUEST_URL:domain, HTTP_REQUEST_URL:domain,
// #endif // #endif

View File

@@ -29,4 +29,6 @@ module.exports = {
CACHE_LONGITUDE: 'LONGITUDE', CACHE_LONGITUDE: 'LONGITUDE',
//缓存纬度 //缓存纬度
CACHE_LATITUDE: 'LATITUDE', CACHE_LATITUDE: 'LATITUDE',
//app手机信息
PLATFORM: 'systemPlatform'
} }

24
app/libs/apps.js Normal file
View File

@@ -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();

View File

@@ -1,11 +1,12 @@
import store from "../store"; import store from "../store";
import Cache from '../utils/cache'; import Cache from '../utils/cache';
// #ifdef H5 || APP-PLUS import { Debounce } from '@/utils/validate.js'
// #ifdef H5
import { isWeixin } from "../utils"; import { isWeixin } from "../utils";
import auth from './wechat'; import auth from './wechat';
// #endif // #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(){ function prePage(){
let pages = getCurrentPages(); let pages = getCurrentPages();
@@ -13,28 +14,55 @@ function prePage(){
return prePage.route; return prePage.route;
} }
export function toLogin(push, pathLogin) { export const toLogin = Debounce(_toLogin,800)
export function _toLogin(push, pathLogin) {
store.commit("LOGOUT"); store.commit("LOGOUT");
let path = prePage(); let path = prePage();
let login_back_url = Cache.get(BACK_URL);
// #ifdef H5 // #ifdef H5
path = location.href; // path = location.href;
path = location.pathname + location.search;
// #endif // #endif
if(!pathLogin) if(!pathLogin){
pathLogin = '/page/users/login/index' pathLogin = '/page/users/login/index'
Cache.set('login_back_url',path); Cache.set('login_back_url',path);
// #ifdef H5 || APP-PLUS }
// #ifdef H5
if (isWeixin()) { 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 { } else {
if (path !== pathLogin) { if (['/pages/user/index'].indexOf(login_back_url) == -1) {
push ? uni.navigateTo({ uni.navigateTo({
url:'/pages/users/login/index' url: '/pages/users/login/index'
}) : uni.reLaunch({ })
url: '/pages/users/login/index'
});
} }
} }
// #endif // #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; return true;
} }
} }

View File

@@ -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 => { return new Promise(resolve => {
if (item.activityH5 && item.activityH5.type === "1") { if (item.activityH5 && item.activityH5.type === "1") {
uni.navigateTo({ 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") { } else if (item.activityH5 && item.activityH5.type === "2") {
uni.navigateTo({ 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") { } else if (item.activityH5 && item.activityH5.type === "3") {
uni.navigateTo({ 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
});
})
});
}

View File

@@ -3,7 +3,6 @@ import { checkLogin } from './login';
import { login } from '../api/public'; import { login } from '../api/public';
import Cache from '../utils/cache'; import Cache from '../utils/cache';
import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS} from './../config/cache'; import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS} from './../config/cache';
class Routine class Routine
{ {
@@ -25,16 +24,6 @@ class Routine
getUserProfile(){ getUserProfile(){
let that = this , code = this.getUserCode(); let that = this , code = this.getUserCode();
return new Promise( (resolve,reject) => { 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({ uni.getUserProfile({
lang: 'zh_CN', lang: 'zh_CN',
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
@@ -76,9 +65,6 @@ class Routine
async getCode(){ async getCode(){
let provider = await this.getProvider(); let provider = await this.getProvider();
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
if(Cache.has(STATE_R_KEY)){
return resolve(Cache.get(STATE_R_KEY));
}
uni.login({ uni.login({
provider:provider, provider:provider,
success(res) { success(res) {
@@ -130,17 +116,19 @@ class Routine
}); });
}); });
} }
/**
* 小程序登录
*/
authUserInfo(code,data) authUserInfo(code,data)
{ {
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject)=>{
login(code,data).then(res=>{ login(code,data).then(res=>{
// let time = res.data.expiresTime - Cache.time(); if(res.data.type==='login'){
store.commit('UPDATE_USERINFO', res.data.user); store.commit('LOGIN', {
store.commit('LOGIN', {token:res.data.token}); token: res.data.token
store.commit('SETUID', res.data.user.uid); });
// Cache.set(EXPIRES_TIME,res.data.expiresTime,time); store.commit("SETUID", res.data.uid);
Cache.set(USER_INFO,res.data.user); }
return resolve(res); return resolve(res);
}).catch(res=>{ }).catch(res=>{
return reject(res); return reject(res);

View File

@@ -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 * @param {Object} config
@@ -153,12 +168,37 @@ class AuthWechat {
/** /**
* 自动去授权 * 自动去授权
*/ */
oAuth() { oAuth(snsapiBase,url) {
if (uni.getStorageSync(WX_AUTH) && store.state.app.token) return; if (uni.getStorageSync(WX_AUTH) && store.state.app.token && snsapiBase == 'snsapi_base') return;
const { const {
code code
} = parseQuery(); } = 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() { clearAuthStatus() {
@@ -171,24 +211,16 @@ class AuthWechat {
*/ */
auth(code) { auth(code) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let loginType = Cache.get(LOGINTYPE); wechatAuth(code, Cache.get("spread"))
wechatAuth(code, Cache.get("spread"), loginType)
.then(({ .then(({
data data
}) => { }) => {
// let expires_time = data.expires_time.substring(0, 19); resolve(data);
// 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
});
Cache.set(WX_AUTH, code); Cache.set(WX_AUTH, code);
Cache.clear(STATE_KEY); Cache.clear(STATE_KEY);
// Cache.clear('spread'); // Cache.clear('spread');
loginType && Cache.clear(LOGINTYPE); loginType && Cache.clear(LOGINTYPE);
resolve();
}) })
.catch(reject); .catch(reject);
}); });
@@ -198,32 +230,43 @@ class AuthWechat {
* 获取跳转授权后的地址 * 获取跳转授权后的地址
* @param {Object} appId * @param {Object} appId
*/ */
getAuthUrl(appId) { getAuthUrl(appId,snsapiBase,backUrl) {
const redirect_uri = encodeURIComponent( let url = `${location.origin}${backUrl}`
`${location.origin}/pages/auth/index?back_url=` + if(url.indexOf('?') == -1){
encodeURIComponent( url = url+'?'
encodeURIComponent( }else{
uni.getStorageSync(BACK_URL) ? url = url+'&'
uni.getStorageSync(BACK_URL) : }
location.pathname + location.search const redirect_uri = encodeURIComponent(
) `${url}scope=${snsapiBase}&back_url=` +
) encodeURIComponent(
); encodeURIComponent(
uni.removeStorageSync(BACK_URL); uni.getStorageSync(BACK_URL) ?
const state = encodeURIComponent( uni.getStorageSync(BACK_URL) :
("" + Math.random()).split(".")[1] + "authorizestate" location.pathname + location.search
); )
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`; );
} 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; let that = this;
this.wechat().then(wx => { 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(); export default new AuthWechat();
// #endif // #endif

View File

@@ -4,13 +4,14 @@ import store from './store'
import Cache from './utils/cache' import Cache from './utils/cache'
import util from 'utils/util' import util from 'utils/util'
import configs from './config/app.js' import configs from './config/app.js'
import * as Order from './libs/order';
Vue.prototype.$util = util; Vue.prototype.$util = util;
Vue.prototype.$config = configs; Vue.prototype.$config = configs;
Vue.prototype.$Cache = Cache; Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue(); Vue.prototype.$eventHub = new Vue();
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$Order = Order;
// #ifdef H5 // #ifdef H5
import { parseQuery } from "./utils"; import { parseQuery } from "./utils";
@@ -46,7 +47,7 @@ if (vconsole !== undefined && vconsole === md5Crmeb) {
let vConsole = new VConsole(); let vConsole = new VConsole();
} }
Auth.isWeixin() && Auth.oAuth(); // Auth.isWeixin() && Auth.oAuth();
// #endif // #endif

View File

@@ -1,17 +1,17 @@
{ {
"name" : "crmeb", "name" : "crmeb",
"appid" : "__UNI__06E0263", "appid" : "__UNI__66E0853",
"description" : "", "description" : "crmeb商城",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : 1001,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
"usingComponents" : true, "usingComponents" : true,
"nvueCompiler" : "uni-app", "nvueCompiler" : "uni-app",
"splashscreen" : { "splashscreen" : {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender" : false,
"waiting" : true, "waiting" : false,
"autoclose" : true, "autoclose" : true,
"delay" : 0 "delay" : 0
}, },
@@ -22,44 +22,47 @@
/* android */ /* android */
"android" : { "android" : {
"permissions" : [ "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_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.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", "<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.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.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.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<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_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ],
"abiFilters" : []
}, },
/* ios */ /* ios */
"ios" : {}, "ios" : {
"idfa" : false
},
/* SDK */ /* SDK */
"sdkConfigs" : {} "sdkConfigs" : {},
"icons" : {}
} }
}, },
/* */ /* */
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wxcda5a2b1b98b6a95", "appid" : "11",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : true,
"minified" : false, "minified" : true,
"postcss" : true, "postcss" : true,
"es6" : true "es6" : true
}, },
@@ -98,10 +101,23 @@
"sdkConfigs" : { "sdkConfigs" : {
"maps" : { "maps" : {
"qqmap" : { "qqmap" : {
"key" : "NO7BZ-APDKP-UCBD7-VT7CX-R5UZK-JBF2W" "key" : "map key"
} }
} }
}, },
"optimization" : {
"treeShaking" : {
"enable" : true
}
},
"async" : {
"timeout" : 200000
},
"title" : "CRMEB" "title" : "CRMEB"
},
"plus" : {
"statusbar" : {
"immersed" : true
}
} }
} }

View File

@@ -4,10 +4,10 @@
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "首页", "navigationBarTitleText": "首页",
"navigationStyle": "custom", "navigationStyle": "custom"
"app-plus": { // "app-plus": {
"scrollIndicator": false //禁用原生导航栏 // "scrollIndicator": false //禁用原生导航栏
} // }
} }
}, },
{ {
@@ -22,7 +22,8 @@
"navigationBarTitleText": "个人中心", "navigationBarTitleText": "个人中心",
"navigationBarBackgroundColor": "#e93323" "navigationBarBackgroundColor": "#e93323"
// #ifdef MP // #ifdef MP
,"navigationBarTextStyle": "#fff" ,
"navigationBarTextStyle": "#fff"
// #endif // #endif
} }
}, },
@@ -30,9 +31,6 @@
"path": "pages/goods_details/index", "path": "pages/goods_details/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
// #endif
} }
}, },
{ {
@@ -104,169 +102,179 @@
"style": { "style": {
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"navigationBarBackgroundColor": "#e93323" "navigationBarBackgroundColor": "#e93323"
// #ifdef MP // #ifdef MP
,"navigationBarTextStyle": "#fff" ,
// #endif "navigationBarTextStyle": "#fff"
// #endif
} }
}, {
"path": "pages/index/components/a_seckill",
"style": {}
}, {
"path": "pages/index/components/b_combination",
"style": {}
} }
,{ ],
"path" : "pages/index/components/a_seckill", "subPackages": [{
"style" : {} "root": "pages/users",
} "name": "users",
,{ "pages": [
"path" : "pages/index/components/b_combination", {
"style" : {} "path": "privacy/index",
} "style": {
], "navigationBarTitleText": "隐私协议"
"subPackages": [ }
{ },
"root": "pages/users", {
"name": "users", "path": "web_page/index",
"pages": [ "style": {
}
},
{ {
"path": "retrievePassword/index", "path": "retrievePassword/index",
"style": { "style": {
"navigationBarTitleText": "忘记密码" "navigationBarTitleText": "忘记密码"
} }
}, },
{ {
"path": "user_info/index", "path": "user_info/index",
"style": { "style": {
"navigationBarTitleText": "个人资料" "navigationBarTitleText": "个人资料"
} }
}, },
{ {
"path": "user_get_coupon/index", "path": "user_get_coupon/index",
"style": { "style": {
"navigationBarTitleText": "领取优惠券" "navigationBarTitleText": "领取优惠券"
} }
}, },
{ {
"path": "user_goods_collection/index", "path": "user_goods_collection/index",
"style": { "style": {
"navigationBarTitleText": "收藏商品" "navigationBarTitleText": "收藏商品"
} }
}, },
{ {
"path": "user_sgin/index", "path": "user_sgin/index",
"style": { "style": {
"navigationBarTitleText": "签到" "navigationBarTitleText": "签到"
} }
}, },
{ {
"path": "user_sgin_list/index", "path": "user_sgin_list/index",
"style": { "style": {
"navigationBarTitleText": "签到记录" "navigationBarTitleText": "签到记录"
} }
}, },
{ {
"path": "user_money/index", "path": "user_money/index",
"style": { "style": {
"navigationBarTitleText": "我的账户" "navigationBarTitleText": "我的账户"
} }
}, },
{ {
"path": "user_bill/index", "path": "user_bill/index",
"style": { "style": {
"navigationBarTitleText": "账单明细" "navigationBarTitleText": "账单明细"
} }
}, },
{ {
"path": "user_integral/index", "path": "user_integral/index",
"style": { "style": {
"navigationBarTitleText": "积分详情" "navigationBarTitleText": "积分详情"
} }
}, },
{ {
"path": "user_coupon/index", "path": "user_coupon/index",
"style": { "style": {
"navigationBarTitleText": "我的优惠券" "navigationBarTitleText": "我的优惠券"
} }
}, },
{ {
"path": "user_spread_user/index", "path": "user_spread_user/index",
"style": { "style": {
"navigationBarTitleText": "我的推广", "navigationBarTitleText": "我的推广",
"navigationBarBackgroundColor": "#e93323" "navigationBarBackgroundColor": "#e93323"
// #ifdef MP // #ifdef MP
,"navigationBarTextStyle": "#fff" ,
// #endif "navigationBarTextStyle": "#fff"
} // #endif
}, }
{ },
"path": "user_spread_code/index", {
"style": { "path": "user_spread_code/index",
"navigationBarTitleText": "分销海报" "style": {
} "navigationBarTitleText": "分销海报"
}, }
{ },
"path": "user_spread_money/index", {
"style": { "path": "user_spread_money/index",
"navigationBarTitleText": "佣金记录", "style": {
"navigationBarBackgroundColor": "#e93323" "navigationBarTitleText": "佣金记录",
// #ifdef MP "navigationBarBackgroundColor": "#e93323"
,"navigationBarTextStyle": "#fff" // #ifdef MP
// #endif ,
} "navigationBarTextStyle": "#fff"
}, // #endif
{ }
"path": "user_cash/index", },
"style": { {
"navigationBarTitleText": "提现", "path": "user_cash/index",
"navigationBarBackgroundColor": "#e93323" "style": {
// #ifdef MP "navigationBarTitleText": "提现",
,"navigationBarTextStyle": "#fff" "navigationBarBackgroundColor": "#e93323"
// #endif // #ifdef MP
} ,
}, "navigationBarTextStyle": "#fff"
{ // #endif
"path": "user_vip/index", }
"style": { },
"navigationBarTitleText": "会员中心", {
"navigationBarBackgroundColor": "#232323" "path": "user_vip/index",
// #ifdef MP "style": {
,"navigationBarTextStyle": "#fff" "navigationBarTitleText": "会员中心"
// #endif }
} },
}, {
{ "path": "user_address_list/index",
"path": "user_address_list/index", "style": {
"style": { "navigationBarTitleText": "地址管理"
"navigationBarTitleText": "地址管理" }
} },
}, {
{ "path": "user_address/index",
"path": "user_address/index", "style": {
"style": { "navigationBarTitleText": "添加地址"
"navigationBarTitleText": "添加地址" }
} },
}, {
{ "path": "user_phone/index",
"path": "user_phone/index", "style": {
"style": { "navigationBarTitleText": "修改手机号",
"navigationBarTitleText": "绑定手机", "navigationBarBackgroundColor": "#e93323"
"navigationBarBackgroundColor": "#e93323" // #ifdef MP
// #ifdef MP ,
,"navigationBarTextStyle": "#fff" "navigationBarTextStyle": "#fff"
// #endif // #endif
} }
}, },
{ {
"path": "user_payment/index", "path": "user_payment/index",
"style": { "style": {
"navigationBarTitleText": "余额充值" "navigationBarTitleText": "余额充值"
} }
}, },
{ {
"path": "user_pwd_edit/index", "path": "user_pwd_edit/index",
"style": { "style": {
"navigationBarTitleText": "修改密码", "navigationBarTitleText": "修改密码",
"navigationBarBackgroundColor": "#e93323" "navigationBarBackgroundColor": "#e93323"
// #ifdef MP // #ifdef MP
,"navigationBarTextStyle": "#fff" ,
// #endif "navigationBarTextStyle": "#fff"
} // #endif
}, }
},
{ {
"path": "order_confirm/index", "path": "order_confirm/index",
"style": { "style": {
@@ -284,9 +292,10 @@
"style": { "style": {
"navigationBarTitleText": "推广人列表", "navigationBarTitleText": "推广人列表",
"navigationBarBackgroundColor": "#e93323" "navigationBarBackgroundColor": "#e93323"
// #ifdef MP // #ifdef MP
,"navigationBarTextStyle": "#fff" ,
// #endif "navigationBarTextStyle": "#fff"
// #endif
} }
}, },
{ {
@@ -294,9 +303,10 @@
"style": { "style": {
"navigationBarTitleText": "推广人订单", "navigationBarTitleText": "推广人订单",
"navigationBarBackgroundColor": "#e93323" "navigationBarBackgroundColor": "#e93323"
// #ifdef MP // #ifdef MP
,"navigationBarTextStyle": "#fff" ,
// #endif "navigationBarTextStyle": "#fff"
// #endif
} }
}, },
{ {
@@ -304,9 +314,10 @@
"style": { "style": {
"navigationBarTitleText": "推广人排行", "navigationBarTitleText": "推广人排行",
"navigationBarBackgroundColor": "#e93323" "navigationBarBackgroundColor": "#e93323"
// #ifdef MP // #ifdef MP
,"navigationBarTextStyle": "#fff" ,
// #endif "navigationBarTextStyle": "#fff"
// #endif
} }
}, },
{ {
@@ -314,9 +325,10 @@
"style": { "style": {
"navigationBarTitleText": "佣金排行", "navigationBarTitleText": "佣金排行",
"navigationBarBackgroundColor": "#e93323" "navigationBarBackgroundColor": "#e93323"
// #ifdef MP // #ifdef MP
,"navigationBarTextStyle": "#fff" ,
// #endif "navigationBarTextStyle": "#fff"
// #endif
} }
}, },
{ {
@@ -367,196 +379,162 @@
"navigationBarTitleText": "账户登录", "navigationBarTitleText": "账户登录",
"navigationStyle": "custom" "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": { "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": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "crmeb", "navigationBarTitleText": "crmeb",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
"backgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8",
"titleNView": false, "titleNView": false,
"rpxCalcMaxDeviceWidth": 960, "rpxCalcMaxDeviceWidth": 960,
"rpxCalcBaseDeviceWidth": 375, "rpxCalcBaseDeviceWidth": 375,
"rpxCalcIncludeWidth": 750 "rpxCalcIncludeWidth": 750
}, },
"tabBar": { "tabBar": {
"color": "#282828", "color": "#282828",
"selectedColor": "#fc4141", "selectedColor": "#fc4141",
"borderStyle": "white", "borderStyle": "white",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [ "list": [{
{ "pagePath": "pages/index/index",
"pagePath": "pages/index/index", "iconPath": "static/images/1-001.png",
"iconPath": "static/images/1-001.png", "selectedIconPath": "static/images/1-002.png",
"selectedIconPath": "static/images/1-002.png", "text": "首页"
"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": [
{ {
"name": "", //模式名称 "pagePath": "pages/goods_cate/goods_cate",
"path": "", //启动页面,必选 "iconPath": "static/images/2-001.png",
"query": "" //启动参数在页面的onLoad函数里面得到 "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函数里面得到
}]
} }
} }

View File

@@ -1,20 +1,21 @@
<template> <template>
<view> <view>
<block v-if="bargain.length>0"> <block v-if="bargain.length>0">
<div class="bargain-record" ref="container"> <div class="bargain-record pad30" ref="container">
<div class="item" v-for="(item, index) in bargain" :key="index"> <div class="item borRadius14" v-for="(item, index) in bargain" :key="index">
<div class="picTxt acea-row row-between-wrapper"> <div class="picTxt acea-row row-between-wrapper">
<div class="pictrue"> <div class="pictrue">
<image :src="item.image" /> <image :src="item.image" />
</div> </div>
<div class="text acea-row row-column-around"> <div class="text acea-row row-column-around">
<div class="line1" style="width: 100%;">{{ item.title }}</div> <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="' '" <count-down :justify-left="'justify-content:left'" :bgColor="bgColor" :is-day="true" :tip-text="'倒计时 '" :day-text="'天'"
:second-text="' '" :datatime="item.datatime" v-if="item.status === 1"></count-down> :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="successTxt font-color-red" v-else-if="item.status === 3">砍价成功</div>
<div class="endTxt" v-else>活动已结束</div> <div class="endTxt" v-else>活动已结束</div>
<div class="money font-color-red"> <div class="money">
已砍至<span class="symbol"></span><span class="num">{{ item.residue_price }}</span> 已砍至<span class="symbol font-color-red"></span><span class="num font-color-red">{{ item.surplusPrice }}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -23,13 +24,16 @@
<div class="success" v-else-if="item.status === 3">砍价成功</div> <div class="success" v-else-if="item.status === 3">砍价成功</div>
<div class="end" v-else>活动已结束</div> <div class="end" v-else>活动已结束</div>
<div class="acea-row row-middle row-right"> <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>
<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>
<!-- <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> </div>
</div> </div>
@@ -40,6 +44,7 @@
<emptyPage title="暂无砍价记录~"></emptyPage> <emptyPage title="暂无砍价记录~"></emptyPage>
</block> </block>
<home></home> <home></home>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
</view> </view>
</template> </template>
<script> <script>
@@ -49,44 +54,127 @@
getBargainUserList, getBargainUserList,
getBargainUserCancel getBargainUserCancel
} from "@/api/activity"; } from "@/api/activity";
import {
getUserInfo
} from '@/api/user.js';
import Loading from "@/components/Loading"; import Loading from "@/components/Loading";
import home from '@/components/home'; import home from '@/components/home';
import payment from '@/components/payment';
import {
mapGetters
} from "vuex";
export default { export default {
name: "BargainRecord", name: "BargainRecord",
components: { components: {
CountDown, CountDown,
Loading, Loading,
emptyPage, emptyPage,
home home,
payment
}, },
props: {}, props: {},
computed: mapGetters(['isLogin', 'userInfo', 'uid']),
data: function() { data: function() {
return { return {
bgColor:{
'bgColor': '',
'Color': '#E93323',
'width': '40rpx',
'timeTxtwidth': '28rpx',
'isDay': false
},
bargain: [], bargain: [],
status: false, //砍价列表是否获取完成 false 未完成 true 完成 status: false, //砍价列表是否获取完成 false 未完成 true 完成
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成 loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
page: 1, //页码 page: 1, //页码
limit: 20, //数量 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() { onLoad: function() {
this.getBargainUserList(); this.getBargainUserList();
this.getUserInfo();
// this.$scroll(this.$refs.container, () => { // this.$scroll(this.$refs.container, () => {
// !this.loadingList && this.getBargainUserList(); // !this.loadingList && this.getBargainUserList();
// }); // });
}, },
onShow() {
if (this.isLogin) {
this.payMode[1].number = this.userInfo.nowMoney;
this.$set(this, 'payMode', this.payMode);
} else {
toLogin();
}
},
methods: { 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) { goDetail: function(id) {
// this.$router.push({
// path: "/activity/dargain_detail/" + id +'&bargain='+ userInfo.uid
// });
uni.navigateTo({ 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 limit: that.limit
}) })
.then(res => { .then(res => {
that.status = res.data.length < that.limit; that.status = res.data.list.length < that.limit;
that.bargain.push.apply(that.bargain, res.data); that.bargain.push.apply(that.bargain, res.data.list);
that.page++; that.page++;
that.loadingList = false; that.loadingList = false;
}) })
@@ -133,16 +221,7 @@
title: res title: res
}) })
}); });
}, }
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.userInfo = res.data;
});
},
}, },
onReachBottom() { onReachBottom() {
this.getBargainUserList(); this.getBargainUserList();
@@ -150,11 +229,15 @@
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
/*砍价记录*/ /*砍价记录*/
.bargain-record .item .picTxt .text .time .styleAll { .bargain-record .item .picTxt .text .time {
color: #fc4141; height: 36rpx;
font-size:24rpx; line-height: 36rpx;
.styleAll {
color: #fc4141;
font-size:24rpx;
}
} }
.bargain-record .item .picTxt .text .time .red { .bargain-record .item .picTxt .text .time .red {
color: #999; color: #999;
@@ -162,13 +245,13 @@
} }
.bargain-record .item { .bargain-record .item {
background-color: #fff; background-color: #fff;
margin-bottom: 12upx; margin-top: 15rpx;
padding: 30rpx 24rpx 0 24rpx;
} }
.bargain-record .item .picTxt { .bargain-record .item .picTxt {
height: 210upx;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
padding: 0 30upx; padding-bottom: 30rpx;
} }
.bargain-record .item .picTxt .pictrue { .bargain-record .item .picTxt .pictrue {
@@ -183,10 +266,10 @@
} }
.bargain-record .item .picTxt .text { .bargain-record .item .picTxt .text {
width: 515upx; width: 470rpx;
font-size: 30upx; font-size: 30upx;
color: #282828; color: #333333;
height: 150upx; height: 160rpx;
} }
.bargain-record .item .picTxt .text .time { .bargain-record .item .picTxt .text .time {
@@ -205,6 +288,7 @@
} }
.bargain-record .item .picTxt .text .money { .bargain-record .item .picTxt .text .money {
font-size: 24upx; font-size: 24upx;
color: #999999;
} }
.bargain-record .item .picTxt .text .money .num { .bargain-record .item .picTxt .text .money .num {
@@ -218,7 +302,6 @@
.bargain-record .item .bottom { .bargain-record .item .bottom {
height: 100upx; height: 100upx;
padding: 0 30upx;
font-size: 27upx; font-size: 27upx;
} }
@@ -231,7 +314,7 @@
} }
.bargain-record .item .bottom .success { .bargain-record .item .bottom .success {
color: #e93323; color: $theme-color;
} }
.bargain-record .item .bottom .bnt { .bargain-record .item .bottom .bnt {

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,28 +1,29 @@
<template> <template>
<div> <div>
<view class='flash-sale'> <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> <view class="saleBox"></view>
<!-- banner --> <view class="header" v-if="dataList.length">
<!-- <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">
<swiper indicator-dots="true" autoplay="true" :circular="circular" interval="3000" duration="1500" <swiper indicator-dots="true" autoplay="true" :circular="circular" interval="3000" duration="1500"
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff"> indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<block v-for="(item,index) in timeList[active].slide" :key="index"> <block v-for="(items,index) in dataList[active].slide" :key="index">
<swiper-item> <swiper-item class="borRadius14">
<image :src="item.sattDir" class="slide-image" lazy-load></image> <image :src="items.sattDir" class="slide-image borRadius14" lazy-load></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</view> </view>
<view class="seckillList acea-row row-between-wrapper"> <view class="seckillList acea-row row-between-wrapper">
<view class="priceTag"> <view class="priceTag">
<image src="/static/images/priceTag.png"></image> <image src="/static/images/priceTag.png"></image>
</view> </view>
<view class='timeLsit'> <view class='timeLsit'>
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;height:106rpx;"> <scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft"
<block v-for="(item,index) in timeList" :key='index'> 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 @tap='settimeList(item,index)' class='item' :class="active == index?'on':''">
<view class='time'>{{item.time.split(',')[0]}}</view> <view class='time'>{{item.time.split(',')[0]}}</view>
<view class="state">{{item.statusName}}</view> <view class="state">{{item.statusName}}</view>
@@ -31,7 +32,7 @@
</scroll-view> </scroll-view>
</view> </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'> <block v-for="(item,index) in seckillList" :key='index'>
<view class='item acea-row row-between-wrapper' @tap='goDetails(item)'> <view class='item acea-row row-between-wrapper' @tap='goDetails(item)'>
<view class='pictrue'> <view class='pictrue'>
@@ -39,11 +40,12 @@
</view> </view>
<view class='text acea-row row-column-around'> <view class='text acea-row row-column-around'>
<view class='name line1'>{{item.title}}</view> <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='num font-color'>{{item.price}}</text>
<text class="y_money">¥{{item.otPrice}}</text> <text class="y_money">¥{{item.otPrice}}</text>
</view> </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="progress">
<view class='bg-reds' :style="'width:'+item.percent+'%;'"></view> <view class='bg-reds' :style="'width:'+item.percent+'%;'"></view>
<view class='piece'>已抢{{item.percent}}%</view> <view class='piece'>已抢{{item.percent}}%</view>
@@ -70,7 +72,8 @@
getSeckillHeaderApi, getSeckillHeaderApi,
getSeckillList getSeckillList
} from '../../../api/activity.js'; } from '../../../api/activity.js';
import home from '@/components/home/index.vue' import home from '@/components/home/index.vue';
let app = getApp();
export default { export default {
components: { components: {
home home
@@ -80,11 +83,10 @@
circular: true, circular: true,
autoplay: true, autoplay: true,
interval: 500, interval: 500,
// duration: 500,
topImage: '', topImage: '',
seckillList: [], seckillList: [],
timeList: [], timeList: [],
active: 5, active: 0,
scrollLeft: 0, scrollLeft: 0,
interval: 0, interval: 0,
status: 1, status: 1,
@@ -96,31 +98,36 @@
loading: false, loading: false,
loadend: false, loadend: false,
pageloading: false, pageloading: false,
seckillHeader: [] dataList: [],
returnShow: true,
navH: ''
} }
}, },
onLoad() { onLoad() {
var pages = getCurrentPages();
this.returnShow = pages.length===1?false:true;
// #ifdef H5
this.navH = app.globalData.navHeight-18;
// #endif
this.getSeckillConfig(); this.getSeckillConfig();
}, },
methods: { methods: {
goBack: function() {
uni.navigateBack();
},
getSeckillConfig: function() { getSeckillConfig: function() {
let that = this; let that = this;
getSeckillHeaderApi().then(res => { getSeckillHeaderApi().then(res => {
res.data.seckillTime.map(item => { res.data.map(item => {
item.slide = JSON.parse(item.slide) item.slide = JSON.parse(item.slide)
}) })
that.timeList = res.data.seckillTime; that.dataList = res.data;
that.active = res.data.seckillTimeIndex; that.getSeckillList();
if (that.timeList.length) { that.seckillList = [];
that.scrollLeft = (that.active - 1.37) * 100 that.page = 1;
setTimeout(function() { that.status = that.dataList[that.active].status;
that.loading = true that.getSeckillList();
}, 2000);
that.seckillList = [],
that.page = 1
that.status = that.timeList[that.active].status
that.getSeckillList();
}
}); });
}, },
getSeckillList: function() { getSeckillList: function() {
@@ -132,7 +139,7 @@
if (that.loadend) return; if (that.loadend) return;
if (that.pageloading) return; if (that.pageloading) return;
this.pageloading = true 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 seckillList = res.data.list;
var loadend = seckillList.length < that.limit; var loadend = seckillList.length < that.limit;
that.page++; that.page++;
@@ -155,16 +162,16 @@
that.countDownHour = "00"; that.countDownHour = "00";
that.countDownMinute = "00"; that.countDownMinute = "00";
that.countDownSecond = "00"; that.countDownSecond = "00";
that.status = that.timeList[that.active].status; that.status = that.dataList[that.active].status;
that.loadend = false; that.loadend = false;
that.page = 1; that.page = 1;
that.seckillList = []; that.seckillList = [];
// wxh.time(e.currentTarget.dataset.stop, that); // wxh.time(e.currentTarget.dataset.stop, that);
that.getSeckillList(); that.getSeckillList();
}, },
goDetails(item){ goDetails(item) {
uni.navigateTo({ 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 { page {
background-color: #F5F5F5 !important; 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 { .flash-sale .header {
width: 710rpx; width: 710rpx;
height: 300rpx; height: 330rpx;
margin: -215rpx auto 0 auto; margin: -276rpx auto 0 auto;
border-radius: 20rpx; border-radius: 14rpx;
overflow: hidden;
swiper{
height: 330rpx !important;
border-radius: 14rpx;
overflow: hidden;
}
} }
.flash-sale .header image { .flash-sale .header image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 20rpx; border-radius: 14rpx;
overflow: hidden;
img{
border-radius: 14rpx;
}
} }
.flash-sale .seckillList { .flash-sale .seckillList {
padding: 0 20rpx; padding: 25rpx;
} }
.flash-sale .seckillList .priceTag { .flash-sale .seckillList .priceTag {
@@ -210,9 +237,8 @@
} }
.flash-sale .timeLsit { .flash-sale .timeLsit {
width: 610rpx; width: 596rpx;
white-space: nowrap; white-space: nowrap;
margin: 10rpx 0;
} }
.flash-sale .timeLsit .item { .flash-sale .timeLsit .item {
@@ -220,10 +246,9 @@
font-size: 20rpx; font-size: 20rpx;
color: #666; color: #666;
text-align: center; text-align: center;
padding: 11rpx 0;
box-sizing: border-box; box-sizing: border-box;
height: 96rpx; margin-right: 30rpx;
margin-right: 35rpx; width: 130rpx;
} }
.flash-sale .timeLsit .item .time { .flash-sale .timeLsit .item .time {
@@ -233,13 +258,15 @@
} }
.flash-sale .timeLsit .item.on .time { .flash-sale .timeLsit .item.on .time {
color: #E93323; color: $theme-color;
} }
.flash-sale .timeLsit .item.on .state { .flash-sale .timeLsit .item.on .state {
width: 90rpx;
height: 30rpx; height: 30rpx;
line-height: 30rpx;
border-radius: 15rpx; border-radius: 15rpx;
width: 128rpx;
/* padding: 0 12rpx; */
background: linear-gradient(90deg, rgba(252, 25, 75, 1) 0%, rgba(252, 60, 32, 1) 100%); background: linear-gradient(90deg, rgba(252, 25, 75, 1) 0%, rgba(252, 60, 32, 1) 100%);
color: #fff; color: #fff;
} }
@@ -269,11 +296,11 @@
.flash-sale .list .item { .flash-sale .list .item {
height: 230rpx; height: 230rpx;
position: relative; position: relative;
width: 710rpx; /* width: 710rpx; */
margin: 0 auto 20rpx auto; margin: 0 auto 20rpx auto;
background-color: #fff; background-color: #fff;
border-radius: 20rpx; border-radius: 14rpx;
padding: 0 25rpx; padding: 25rpx 24rpx;
} }
.flash-sale .list .item .pictrue { .flash-sale .list .item .pictrue {
@@ -290,7 +317,7 @@
} }
.flash-sale .list .item .text { .flash-sale .list .item .text {
width: 460rpx; width: 440rpx;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
height: 166rpx; height: 166rpx;
@@ -302,7 +329,7 @@
.flash-sale .list .item .text .money { .flash-sale .list .item .text .money {
font-size: 30rpx; font-size: 30rpx;
color: #E93323; color: $theme-color;
} }
.flash-sale .list .item .text .money .num { .flash-sale .list .item .text .money .num {
@@ -330,7 +357,7 @@
.flash-sale .list .item .text .progress { .flash-sale .list .item .text .progress {
overflow: hidden; overflow: hidden;
background-color: #FFEFEF; background-color: #EEEEEE;
width: 260rpx; width: 260rpx;
border-radius: 18rpx; border-radius: 18rpx;
height: 18rpx; height: 18rpx;
@@ -369,7 +396,10 @@
.flash-sale .saleBox { .flash-sale .saleBox {
width: 100%; width: 100%;
height: 230rpx; height: 298rpx;
/* #ifdef MP */
height: 300rpx;
/* #endif */
background: rgba(233, 51, 35, 1); background: rgba(233, 51, 35, 1);
border-radius: 0 0 50rpx 50rpx; border-radius: 0 0 50rpx 50rpx;
} }

View File

File diff suppressed because one or more lines are too long

View File

@@ -2,9 +2,6 @@
<view> <view>
<view class='poster-poster'> <view class='poster-poster'>
<view class='tip'><text class='iconfont icon-shuoming'></text>提示点击图片即可保存至手机相册 </view> <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"> <view class='pictrue' v-if="canvasStatus">
<image :src='imagePath'></image> <image :src='imagePath'></image>
</view> </view>

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Some files were not shown because too many files have changed in this diff Show More