全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug
This commit is contained in:
34
README.md
34
README.md
@@ -19,18 +19,19 @@ JAVA版商城系统是基于Java(SpringBoot) + Vue(Element UI) + UniApp开发的
|
||||
网络营销的一款企业应用,更适合企业二次开发。
|
||||
|
||||
~~~~
|
||||
|
||||

|
||||

|
||||
|
||||
## 导航栏目
|
||||
|
||||
[](http://help.crmeb.net/crmeb_java/1748037t)
|
||||
<!-- [](http://help.crmeb.net/crmeb_java/1748037t)
|
||||
[](https://q.crmeb.net)
|
||||
[](https://www.crmeb.com)
|
||||
[](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=dligum2z)
|
||||
[](http://crmeb.com/web/auth/apply)
|
||||
[](https://github.com/crmeb/crmeb_java)
|
||||
[](https://gitee.com/ZhongBangKeJi/crmeb_java)
|
||||
[](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)
|
||||
|
||||
## 预览
|
||||

|
||||
@@ -72,9 +73,12 @@ JAVA版商城系统是基于Java(SpringBoot) + Vue(Element UI) + UniApp开发的
|
||||
~~~
|
||||
|
||||
## 移动端预览
|
||||

|
||||
<!-- 
|
||||

|
||||

|
||||
 -->
|
||||

|
||||

|
||||

|
||||
|
||||
## 功能图预览
|
||||

|
||||
@@ -86,22 +90,6 @@ JAVA版商城系统是基于Java(SpringBoot) + Vue(Element UI) + UniApp开发的
|
||||

|
||||

|
||||

|
||||
<!-- 
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
 -->
|
||||
|
||||
|
||||
|
||||
## 项目源码
|
||||
@@ -110,7 +98,7 @@ JAVA版商城系统是基于Java(SpringBoot) + Vue(Element UI) + UniApp开发的
|
||||
|gitHub| https://github.com/crmeb/crmeb_java|
|
||||
|gitee|https://gitee.com/ZhongBangKeJi/crmeb_java|
|
||||
|
||||

|
||||
|
||||
|
||||
## 运行环境及框架
|
||||
~~~
|
||||
|
||||
@@ -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
|
||||
@@ -79,7 +102,7 @@ export function couponUserListApi(params) {
|
||||
*/
|
||||
export function integralListApi(params, data) {
|
||||
return request({
|
||||
url: '/admin/user/bill/list',
|
||||
url: '/admin/user/integral/list',
|
||||
method: 'post',
|
||||
params,
|
||||
data
|
||||
@@ -439,3 +462,109 @@ export function exportcombiantionApi(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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 订单 列表
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function orderListApi(params) {
|
||||
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) {
|
||||
return request({
|
||||
@@ -27,7 +49,7 @@ export function orderDeleteApi(params) {
|
||||
|
||||
/**
|
||||
* 订单 编辑
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function orderUpdateApi(data, params) {
|
||||
return request({
|
||||
@@ -40,7 +62,7 @@ export function orderUpdateApi(data, params) {
|
||||
|
||||
/**
|
||||
* 订单 记录
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function orderLogApi(params) {
|
||||
return request({
|
||||
@@ -52,7 +74,7 @@ export function orderLogApi(params) {
|
||||
|
||||
/**
|
||||
* 订单 详情
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function orderDetailApi(params) {
|
||||
return request({
|
||||
@@ -64,7 +86,7 @@ export function orderDetailApi(params) {
|
||||
|
||||
/**
|
||||
* 订单 备注
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function orderMarkApi(params) {
|
||||
return request({
|
||||
@@ -76,7 +98,7 @@ export function orderMarkApi(params) {
|
||||
|
||||
/**
|
||||
* 订单 发货
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function orderSendApi(data) {
|
||||
return request({
|
||||
@@ -88,7 +110,7 @@ export function orderSendApi(data) {
|
||||
|
||||
/**
|
||||
* 订单 拒绝退款
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function orderRefuseApi(params) {
|
||||
return request({
|
||||
@@ -100,7 +122,7 @@ export function orderRefuseApi(params) {
|
||||
|
||||
/**
|
||||
* 订单 立即退款
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function orderRefundApi(params) {
|
||||
return request({
|
||||
@@ -112,7 +134,7 @@ export function orderRefundApi(params) {
|
||||
|
||||
/**
|
||||
* 订单 核销订单
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function writeUpdateApi(vCode) {
|
||||
return request({
|
||||
@@ -123,7 +145,7 @@ export function writeUpdateApi(vCode) {
|
||||
|
||||
/**
|
||||
* 订单 核销码查询待核销订单
|
||||
* @param pram
|
||||
* @param prams
|
||||
*/
|
||||
export function writeConfirmApi(vCode) {
|
||||
return request({
|
||||
@@ -195,3 +217,24 @@ export function getLogisticsInfoApi(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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -44,7 +44,8 @@ export function adminAdd(pram) {
|
||||
pwd: pram.pwd,
|
||||
realName: pram.realName,
|
||||
roles: pram.roles.join(','),
|
||||
status: pram.status
|
||||
status: pram.status,
|
||||
phone: pram.phone
|
||||
}
|
||||
return request({
|
||||
url: '/admin/system/admin/save',
|
||||
|
||||
@@ -357,3 +357,14 @@ export function updateSpreadApi(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 修改手机号
|
||||
*/
|
||||
export function updatePhoneApi(params) {
|
||||
return request({
|
||||
url: `/admin/user/update/phone`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
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
85
admin/src/assets/js/canvas-nest.min.js
vendored
Normal 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)
|
||||
}();
|
||||
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<el-input v-model="editPram.name" :maxlength="biztype.value === 1 ? 8 : 20" placeholder="分类名称" />
|
||||
</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-form-item>
|
||||
<el-form-item label="父级" v-if="biztype.value!==3">
|
||||
|
||||
@@ -13,13 +13,14 @@ couponFrom.install = function(Vue, options) {
|
||||
const instance = new ToastConstructor()
|
||||
instance.$mount(document.createElement('div'))
|
||||
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.handle = handle
|
||||
instance.keyNum = keyNum
|
||||
instance.coupons = coupons
|
||||
instance.userIds = userIds
|
||||
instance.callback = callback
|
||||
instance.userType = userType
|
||||
}
|
||||
}
|
||||
export default couponFrom
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
width="896px"
|
||||
: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" />-->
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -24,7 +24,8 @@
|
||||
handle: '',
|
||||
keyNum: 0,
|
||||
coupons: [],
|
||||
userIds: ''
|
||||
userIds: '',
|
||||
userType: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<div class="header clearfix">
|
||||
<div class="container">
|
||||
<el-form inline size="small">
|
||||
<el-form-item label="优惠劵名称:">
|
||||
<el-input v-model="tableFrom.name" placeholder="请输入优惠券名称" class="selWidth" size="small">
|
||||
<el-form-item label="优惠卷名称:">
|
||||
<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-input>
|
||||
</el-form-item>
|
||||
@@ -91,7 +91,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { marketingListApi, couponUserApi } from '@/api/marketing'
|
||||
import { marketingListApi, couponUserApi, marketingSendApi } from '@/api/marketing'
|
||||
export default {
|
||||
name: 'CouponList',
|
||||
props: {
|
||||
@@ -110,6 +110,10 @@ export default {
|
||||
userIds: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
userType: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -122,10 +126,8 @@ export default {
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
name: '',
|
||||
// type: 0,
|
||||
isDel: 0,
|
||||
status: 1
|
||||
keywords: '',
|
||||
type: ''
|
||||
},
|
||||
multipleSelection: [],
|
||||
multipleSelectionAll: [],
|
||||
@@ -145,6 +147,7 @@ export default {
|
||||
mounted() {
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
if(!this.couponData) return;
|
||||
this.couponData.forEach(row => {
|
||||
this.$refs.table.toggleRowSelection(row);
|
||||
});
|
||||
@@ -233,7 +236,8 @@ export default {
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
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.total = res.total
|
||||
this.listLoading = false
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<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="handleDelete(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-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
@@ -94,7 +94,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="pictrueList acea-row">
|
||||
<div class="pictrueList acea-row" v-loading="loadingPic">
|
||||
<div v-show="isShowPic" class="imagesNo">
|
||||
<i class="el-icon-picture" style="font-size: 60px;color: rgb(219, 219, 219);" />
|
||||
<span class="imagesNo_sp">图片库为空</span>
|
||||
@@ -184,6 +184,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loadingPic: false,
|
||||
loading: false,
|
||||
modals: false,
|
||||
allTreeList:[],
|
||||
@@ -318,7 +319,7 @@ export default {
|
||||
// 表单分类
|
||||
handlerGetList() {
|
||||
let datas = {
|
||||
name: '全部分类',
|
||||
name: '全部图片',
|
||||
id: ''
|
||||
}
|
||||
treeCategroy(this.treeFrom).then(data => {
|
||||
@@ -334,7 +335,7 @@ export default {
|
||||
// 所有分类
|
||||
getList() {
|
||||
const data = {
|
||||
name: '全部分类',
|
||||
name: '全部图片',
|
||||
id: 10000
|
||||
}
|
||||
treeCategroy(this.treeFrom).then(res => {
|
||||
@@ -409,6 +410,7 @@ export default {
|
||||
// 文件列表
|
||||
getFileList() {
|
||||
if ( this.tableData.pid === 10000) this.tableData.pid = 0
|
||||
this.loadingPic = true;
|
||||
fileListApi(this.tableData).then(async res => {
|
||||
this.pictrueList.list = res.list
|
||||
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.pictrueList.total = res.total
|
||||
this.loadingPic = false;
|
||||
}).catch(()=>{
|
||||
this.loadingPic = false;
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
|
||||
@@ -58,14 +58,6 @@
|
||||
<span>{{ scope.row.addres }}</span>
|
||||
</template>
|
||||
</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>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
|
||||
@@ -202,3 +202,29 @@ export function onePassTypeFilter(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]
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ export default {
|
||||
background: #f5f5f5;
|
||||
/* 84 = navbar + tags-view = 50 + 34 */
|
||||
min-height: calc(100vh - 84px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.fixed-header+.app-main {
|
||||
|
||||
@@ -25,7 +25,6 @@ import { mapGetters } from 'vuex'
|
||||
import Logo from './Logo'
|
||||
import SidebarItem from './SidebarItem'
|
||||
import variables from '@/styles/variables.scss'
|
||||
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
computed: {
|
||||
|
||||
@@ -69,6 +69,16 @@ const maintainRouter = {
|
||||
icon: 'clipboard'
|
||||
},
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
path: 'authCRMEB',
|
||||
name: 'authCRMEB',
|
||||
component: () => import('@/views/maintain/authCRMEB'),
|
||||
meta: {
|
||||
title: '授权',
|
||||
icon: 'clipboard'
|
||||
},
|
||||
hidden: false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ const marketingRouter = {
|
||||
path: 'record',
|
||||
component: () => import('@/views/marketing/coupon/record/index'),
|
||||
name: 'Record',
|
||||
meta: { title: '会员领取记录', icon: '' }
|
||||
meta: { title: '领取记录', icon: '' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ const storeRouter = {
|
||||
meta: { title: '商品评论', icon: '' }
|
||||
},
|
||||
{
|
||||
path: 'list/creatProduct/:id?',
|
||||
path: 'list/creatProduct/:id?/:isDisabled?',
|
||||
component: () => import('@/views/store/creatStore/index'),
|
||||
name: 'SortCreat',
|
||||
meta: { title: '商品添加', noCache: true, activeMenu: `/store/index` },
|
||||
|
||||
@@ -89,6 +89,15 @@
|
||||
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{
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -85,11 +85,11 @@ export function setDomain(url) {
|
||||
url = url ? url.toString() : '';
|
||||
// 正则替换存在的转义符
|
||||
url = url.replace(/\\/g,'');
|
||||
url = url.replace('http://','https://');
|
||||
url = window.location.protocol==='https:'? url.replace('http://','https://') : url;
|
||||
if(url.startsWith('src="')){
|
||||
url = url.replaceAll('src="','');
|
||||
}
|
||||
if(url.startsWith('//img')){
|
||||
if(url.startsWith('//img') && window.location.protocol==='https:'){
|
||||
url = url.replace('//img','https://img');
|
||||
}
|
||||
return url;
|
||||
|
||||
@@ -6,7 +6,7 @@ import SettingMer from '@/utils/settingMer'
|
||||
import { isPhone } from "@/libs/wechat";
|
||||
const service = axios.create({
|
||||
baseURL: SettingMer.apiBaseURL,
|
||||
timeout: 20000 // 过期时间
|
||||
timeout: 60000 // 过期时间
|
||||
})
|
||||
|
||||
// request interceptor
|
||||
|
||||
@@ -78,11 +78,11 @@
|
||||
<el-form-item label="appid" prop="appid">
|
||||
<el-input v-model="formValidate.appid" placeholder="请填写appid" class="spwidth" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备用网页" prop="pagepath">
|
||||
<el-input v-model="formValidate.pagepath" placeholder="请填写备用网页" class="spwidth" />
|
||||
<el-form-item label="备用网页" prop="url">
|
||||
<el-input v-model="formValidate.url" placeholder="请填写备用网页" class="spwidth" />
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序路径" prop="url">
|
||||
<el-input v-model="formValidate.url" placeholder="请填写小程序路径" class="spwidth" />
|
||||
<el-form-item label="小程序路径" prop="pagepath">
|
||||
<el-input v-model="formValidate.pagepath" placeholder="请填写小程序路径" class="spwidth" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="formValidate.type === 'view'">
|
||||
@@ -144,7 +144,7 @@
|
||||
{ required: true, message: '请填写appid', trigger: 'blur' }
|
||||
],
|
||||
pagepath: [
|
||||
{ required: true, message: '请填写备用网页', trigger: 'blur' }
|
||||
{ required: true, message: '请填写小程序路径', trigger: 'blur' }
|
||||
],
|
||||
url: [
|
||||
{ required: true, message: '请填写跳转地址', trigger: 'blur' }
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<el-col v-bind="grid" class="ivu-mb">
|
||||
<el-card :bordered="false" dis-hover :padding="12">
|
||||
<div slot="header" class="acea-row row-between-wrapper">
|
||||
<span>用户量访问</span>
|
||||
<span>用户访问量</span>
|
||||
<el-tag type="success">昨日</el-tag>
|
||||
</div>
|
||||
<div class="content" v-if="views">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<el-form-item prop="storeBrokerageStatus">
|
||||
<span slot="label">
|
||||
<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" />
|
||||
</el-tooltip>
|
||||
</span>
|
||||
|
||||
@@ -53,43 +53,50 @@
|
||||
<el-table-column
|
||||
sortable
|
||||
prop="spreadCount"
|
||||
label="推广用户数量"
|
||||
min-width="120"
|
||||
label="推广用户(一级)数量"
|
||||
:sort-method="(a,b)=>{return a.spreadCount - b.spreadCount}"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
sortable
|
||||
label="推广订单数量"
|
||||
prop="spreadOrderNum"
|
||||
:sort-method="(a,b)=>{return a.spreadOrderNum - b.spreadOrderNum}"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
sortable
|
||||
label="推广订单金额"
|
||||
min-width="120"
|
||||
:sort-method="(a,b)=>{return a.spreadOrderTotalPrice - b.spreadOrderTotalPrice}"
|
||||
prop="spreadOrderTotalPrice"
|
||||
/>
|
||||
<el-table-column
|
||||
sortable
|
||||
label="佣金总金额"
|
||||
min-width="120"
|
||||
:sort-method="(a,b)=>{return a.totalBrokeragePrice - b.totalBrokeragePrice}"
|
||||
prop="totalBrokeragePrice"
|
||||
/>
|
||||
<el-table-column
|
||||
sortable
|
||||
label="已提现金额"
|
||||
min-width="120"
|
||||
:sort-method="(a,b)=>{return a.extractCountPrice - b.extractCountPrice}"
|
||||
prop="extractCountPrice"
|
||||
/>
|
||||
<el-table-column
|
||||
sortable
|
||||
label="已提现次数"
|
||||
min-width="120"
|
||||
:sort-method="(a,b)=>{return a.extractCountNum - b.extractCountNum}"
|
||||
prop="extractCountNum"
|
||||
/>
|
||||
<el-table-column
|
||||
sortable
|
||||
label="未提现金额"
|
||||
min-width="120"
|
||||
:sort-method="(a,b)=>{return a.brokeragePrice - b.brokeragePrice}"
|
||||
prop="brokeragePrice"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -209,11 +216,11 @@
|
||||
min-width="120"
|
||||
prop="payCount"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="spreadTime"
|
||||
label="关注时间"
|
||||
min-width="150"
|
||||
/>
|
||||
<!--<el-table-column-->
|
||||
<!--prop="spreadTime"-->
|
||||
<!--label="关注时间"-->
|
||||
<!--min-width="150"-->
|
||||
<!--/>-->
|
||||
</el-table>
|
||||
<el-table
|
||||
v-if="onName === 'order'"
|
||||
@@ -239,7 +246,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
prop="updateTime"
|
||||
label="时间"
|
||||
min-width="150"
|
||||
/>
|
||||
@@ -247,7 +254,7 @@
|
||||
sortable
|
||||
label="返佣金额"
|
||||
min-width="120"
|
||||
prop="deductionPrice"
|
||||
prop="price"
|
||||
/>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
@@ -322,8 +329,8 @@
|
||||
this.cardLists = [
|
||||
{ name: '分销人员人数', count: res.distributionNum },
|
||||
{ name: '发展会员人数', count: res.developNum },
|
||||
{ name: '订单总数', count: res.orderNum },
|
||||
{ name: '订单金额(元)', count: res.orderPriceCount },
|
||||
{ name: '推广总数', count: res.orderNum },
|
||||
{ name: '推广金额(元)', count: res.orderPriceCount },
|
||||
{ name: '提现次数', count: res.withdrawCount }
|
||||
]
|
||||
})
|
||||
@@ -423,7 +430,7 @@
|
||||
this.tableFrom.page = 1
|
||||
this.timeVal = []
|
||||
this.spreadStatistics()
|
||||
// this.getList()
|
||||
this.getList()
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
:default-sort = "{prop: 'brokerage', order: 'descending'}"
|
||||
prop="brokerage"
|
||||
label="账户佣金"
|
||||
min-width="200"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
sortable
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<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-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>
|
||||
@@ -17,8 +17,13 @@
|
||||
<!--<el-radio-button label="0">未支付</el-radio-button>-->
|
||||
<!--</el-radio-group>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="关键字:" class="width100">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="微信昵称/姓名/订单号" class="selWidth" size="small" clearable>
|
||||
<el-form-item label="用户id:">
|
||||
<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-input>
|
||||
</el-form-item>
|
||||
@@ -35,8 +40,8 @@
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
label="ID"
|
||||
prop="uid"
|
||||
label="UID"
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -156,7 +161,8 @@
|
||||
},
|
||||
listLoading: true,
|
||||
tableFrom: {
|
||||
paid: '',
|
||||
uid: '',
|
||||
// paid: '',
|
||||
dateLimit: '',
|
||||
keywords: '',
|
||||
page: 1,
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
|
||||
<script>
|
||||
import { validUsername } from '@/utils/validate'
|
||||
import "@/assets/js/canvas-nest.min.js";
|
||||
import { getLoginPicApi, captchaApi, codeCheckApi } from '@/api/user'
|
||||
import { getStoreStaff } from '@/libs/public'
|
||||
import { getWXCodeByUrl, loginByWxCode } from "@/libs/wechat";
|
||||
@@ -191,6 +192,15 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
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 === '') {
|
||||
this.$refs.account.focus()
|
||||
} else if (this.loginForm.pwd === '') {
|
||||
@@ -199,11 +209,23 @@ export default {
|
||||
this.getCaptcha()
|
||||
this.agentWeiXinLogin()
|
||||
},
|
||||
beforeCreate() {
|
||||
if (this.fullWidth < 768) {
|
||||
document
|
||||
.getElementsByTagName("canvas")[0]
|
||||
.removeAttribute("class", "index_bg");
|
||||
} else {
|
||||
document.getElementsByTagName("canvas")[0].className = "index_bg";
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
// window.removeEventListener('storage', this.afterQRScan)
|
||||
},
|
||||
beforeDestroy: function() {
|
||||
window.removeEventListener('resize', this.handleResize)
|
||||
document
|
||||
.getElementsByTagName("canvas")[0]
|
||||
.removeAttribute("class", "index_bg");
|
||||
},
|
||||
methods: {
|
||||
agentWeiXinLogin(){ // 判断是否需要微信公众号登陆
|
||||
@@ -237,6 +259,13 @@ export default {
|
||||
},
|
||||
handleResize(event) {
|
||||
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() {
|
||||
getLoginPicApi().then(res => {
|
||||
|
||||
11
admin/src/views/login/mixins.js
Normal file
11
admin/src/views/login/mixins.js
Normal 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'
|
||||
])
|
||||
}
|
||||
}
|
||||
24
admin/src/views/maintain/authCRMEB/index.vue
Normal file
24
admin/src/views/maintain/authCRMEB/index.vue
Normal 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>
|
||||
@@ -218,9 +218,6 @@
|
||||
<el-form-item label="商品详情:">
|
||||
<ueditor-from v-model="formValidate.content" :content="formValidate.content" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品规则:">
|
||||
<ueditor-from v-model="formValidate.rule" :content="formValidate.rule" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item style="margin-top:30px;">
|
||||
<el-button
|
||||
@@ -300,8 +297,7 @@
|
||||
startTime: '',
|
||||
stopTime: '',
|
||||
timeVal: [],
|
||||
status: 0,
|
||||
rule: ''
|
||||
status: 0
|
||||
}
|
||||
const objTitle = {
|
||||
price: {
|
||||
@@ -565,8 +561,7 @@
|
||||
status: 0,
|
||||
num : 1,
|
||||
bargainNum : 2,
|
||||
peopleNum : 1,
|
||||
rule : ''
|
||||
peopleNum : 1
|
||||
}
|
||||
if(res.specType){
|
||||
res.attrValues.forEach((row) => {
|
||||
@@ -614,8 +609,7 @@
|
||||
status: res.status,
|
||||
num : res.num,
|
||||
bargainNum : res.bargainNum,
|
||||
peopleNum : res.peopleNum,
|
||||
rule : res.rule
|
||||
peopleNum : res.peopleNum
|
||||
}
|
||||
if(res.specType){
|
||||
this.ManyAttrValue = res.attrValues;
|
||||
|
||||
@@ -108,12 +108,13 @@
|
||||
/>
|
||||
</template>
|
||||
</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">
|
||||
<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 } ">
|
||||
<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>
|
||||
<el-button type="text" class="mr10" size="small" @click="handleDelMenu(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -179,7 +180,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { marketingListApi, couponIssueStatusApi, couponUserListApi } from '@/api/marketing'
|
||||
import { marketingListApi, couponIssueStatusApi, couponUserListApi, couponDeleteApi } from '@/api/marketing'
|
||||
import { roterPre } from '@/settings'
|
||||
export default {
|
||||
name: 'CouponList',
|
||||
@@ -274,7 +275,15 @@
|
||||
}).catch(()=>{
|
||||
row.status = !row.status
|
||||
})
|
||||
}
|
||||
},
|
||||
handleDelMenu(rowData) {
|
||||
this.$confirm('确定删除当前数据?').then(() => {
|
||||
couponDeleteApi({id: rowData.id}).then(data => {
|
||||
this.$message.success('删除成功')
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="领取人:">
|
||||
<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
|
||||
v-for="item in options"
|
||||
:key="item.uid"
|
||||
|
||||
@@ -15,15 +15,9 @@
|
||||
@change="onchangeTime"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户微信昵称:">
|
||||
<el-select v-model="tableFrom.userIdList" style="width: 500px" reserve-keyword multiple remote filterable
|
||||
:remote-method="remoteMethod" :loading="loading" placeholder="请输入用户微信昵称" clearable @change="seachList">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.uid"
|
||||
:label="item.nickname"
|
||||
:value="item.uid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<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-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -58,8 +52,8 @@
|
||||
sortable
|
||||
label="明细数字"
|
||||
min-width="120"
|
||||
prop="number"
|
||||
:sort-method="(a,b)=>{return a.number - b.number}"
|
||||
prop="integral"
|
||||
:sort-method="(a,b)=>{return a.integral - b.integral}"
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
@@ -72,7 +66,7 @@
|
||||
prop="nickName"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
prop="updateTime"
|
||||
label=" 添加时间"
|
||||
min-width="150"
|
||||
/>
|
||||
@@ -94,7 +88,6 @@
|
||||
|
||||
<script>
|
||||
import { integralListApi } from '@/api/marketing'
|
||||
import { userListApi } from '@/api/user'
|
||||
import cardsData from '@/components/cards/index'
|
||||
export default {
|
||||
components: { cardsData },
|
||||
@@ -111,9 +104,8 @@
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
category: 'integral',
|
||||
dateLimit: '',
|
||||
userIdList: []
|
||||
keywords: ''
|
||||
},
|
||||
userIdList: [],
|
||||
userList: [],
|
||||
@@ -126,19 +118,6 @@
|
||||
// this.getUserList()
|
||||
},
|
||||
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() {
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
|
||||
@@ -3,13 +3,10 @@
|
||||
<div class="priceChange" :class="change === true ? 'on' : ''">
|
||||
<div class="priceTitle">
|
||||
{{
|
||||
status === 0 || status === 2
|
||||
? orderInfo.refundStatus === 1
|
||||
? "立即退款"
|
||||
: "一键改价"
|
||||
: "订单备注"
|
||||
status === 0 || status === 2 ? orderInfo.refundStatus === 1 ? "立即退款" : "一键改价" : status === 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 class="listChange" v-if="status === 0 || status === 2">
|
||||
<div
|
||||
@@ -68,6 +65,12 @@
|
||||
</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>
|
||||
<textarea
|
||||
:placeholder="
|
||||
@@ -77,11 +80,11 @@
|
||||
></textarea>
|
||||
</div>
|
||||
<div class="modify" @click="save">
|
||||
{{ orderInfo.refundStatus === 0 || status === 1 ? "立即修改" : "确认退款" }}
|
||||
</div>
|
||||
<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1 && status === 2">
|
||||
拒绝退款
|
||||
{{ orderInfo.refundStatus === 0 || status === 1 || status === 3 ? "立即提交" : "确认退款" }}
|
||||
</div>
|
||||
<!--<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1 && status === 2">-->
|
||||
<!--拒绝退款-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
<div class="maskModel" @touchmove.prevent v-show="change === true"></div>
|
||||
</div>
|
||||
@@ -109,7 +112,8 @@
|
||||
focus: false,
|
||||
price: 0,
|
||||
refundPrice: 0,
|
||||
remark: ""
|
||||
remark: "",
|
||||
reason: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -131,14 +135,17 @@
|
||||
this.$emit("closechange", false);
|
||||
},
|
||||
save() {
|
||||
this.savePrice({
|
||||
price: this.price,
|
||||
refundPrice: this.refundPrice,
|
||||
type: 1,
|
||||
remark: this.remark,
|
||||
id: this.orderInfo.id,
|
||||
orderId: this.orderInfo.orderId
|
||||
})
|
||||
if(this.status === 3) {
|
||||
this.refuse();
|
||||
}else{
|
||||
this.savePrice({
|
||||
price: this.price,
|
||||
refundPrice: this.refundPrice,
|
||||
type: 1,
|
||||
remark: this.remark,
|
||||
orderId: this.orderInfo.orderId
|
||||
})
|
||||
}
|
||||
},
|
||||
async savePrice(opt) {
|
||||
let that = this,
|
||||
@@ -159,7 +166,7 @@
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.price = price;
|
||||
data.orderId = opt.orderId;
|
||||
data.orderNo = opt.orderId;
|
||||
editPriceApi(data).then(() => {
|
||||
// that.change = false;
|
||||
this.$emit("closechange", false);
|
||||
@@ -182,7 +189,7 @@
|
||||
}
|
||||
data.amount = refundPrice;
|
||||
data.type = opt.type;
|
||||
data.orderId = opt.id;
|
||||
data.orderNo = opt.orderId;
|
||||
orderRefundApi(data).then(
|
||||
res => {
|
||||
this.$emit("closechange", false);
|
||||
@@ -205,7 +212,7 @@
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.mark = remark;
|
||||
data.id = opt.id;
|
||||
data.orderNo = opt.orderId;
|
||||
orderMarkApi(data).then(
|
||||
res => {
|
||||
this.$emit("closechange", false);
|
||||
@@ -222,9 +229,16 @@
|
||||
);
|
||||
}
|
||||
},
|
||||
refuse: function () {
|
||||
let that = this;
|
||||
that.$emit("getRefuse", this.orderInfo.id);
|
||||
async refuse() {
|
||||
let reason= this.reason;
|
||||
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;}
|
||||
.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 .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 .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;}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-show="iShidden === false">
|
||||
<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">
|
||||
{{ orderInfo.orderId }}
|
||||
<div class="views" @click="toDetail(orderInfo)">
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
methods: {
|
||||
toDetail: function(item) {
|
||||
this.$router.push({
|
||||
path: "/javaMobile/orderDetail/" + item.id + "/looks"
|
||||
path: "/javaMobile/orderDetail/" + item.orderId + "/looks"
|
||||
});
|
||||
},
|
||||
cancel: function() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="order-num acea-row row-between-wrapper">
|
||||
<div class="num line1">订单号:{{ orderId }}</div>
|
||||
<div class="name line1">
|
||||
<span class="iconfont icon-yonghu2"></span>{{ delivery.user.nickname }}
|
||||
<span class="iconfont icon-yonghu2"></span>{{ delivery.nickname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="address">
|
||||
@@ -34,10 +34,10 @@
|
||||
<div class="list" v-show="active === 0">
|
||||
<div class="item acea-row row-between-wrapper">
|
||||
<div>发货方式</div>
|
||||
<select class="mode" v-model="expressId">
|
||||
<select class="mode" v-model="expressCode">
|
||||
<option value="">选择快递公司</option>
|
||||
<option
|
||||
:value="item.id"
|
||||
:value="item.code"
|
||||
v-for="(item, index) in express"
|
||||
:key="index"
|
||||
>{{ item.name }}</option
|
||||
@@ -50,7 +50,7 @@
|
||||
<input
|
||||
type="text"
|
||||
placeholder="填写快递单号"
|
||||
v-model="expressCode"
|
||||
v-model="expressNumber"
|
||||
class="mode"
|
||||
/>
|
||||
</div>
|
||||
@@ -61,7 +61,7 @@
|
||||
<input
|
||||
type="text"
|
||||
placeholder="填写送货人"
|
||||
v-model="expressId"
|
||||
v-model="deliveryName"
|
||||
class="mode"
|
||||
/>
|
||||
</div>
|
||||
@@ -70,7 +70,7 @@
|
||||
<input
|
||||
type="text"
|
||||
placeholder="填写送货电话"
|
||||
v-model="expressCode"
|
||||
v-model="deliveryTel"
|
||||
class="mode"
|
||||
/>
|
||||
</div>
|
||||
@@ -111,8 +111,10 @@ export default {
|
||||
delivery: {},
|
||||
express: [],
|
||||
type: "1",
|
||||
expressId: "",
|
||||
expressCode: ""
|
||||
deliveryName: "",
|
||||
expressCode: "",
|
||||
expressNumber: '',
|
||||
deliveryTel: ""
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -133,14 +135,16 @@ export default {
|
||||
this.getLogistics();
|
||||
},
|
||||
methods: {
|
||||
changeType: function(item, index) {
|
||||
changeType(item, index) {
|
||||
this.active = index;
|
||||
this.type = item.type;
|
||||
this.expressId = "";
|
||||
this.deliveryName = "";
|
||||
this.deliveryTel = "";
|
||||
this.expressCode = "";
|
||||
this.expressNumber = "";
|
||||
},
|
||||
getIndex() {
|
||||
orderDetailApi({ id: this.$route.params.id }).then(res => {
|
||||
orderDetailApi({ orderNo: this.orderId }).then(res => {
|
||||
this.delivery = res
|
||||
}).catch((error)=>{
|
||||
this.$dialog.error(error.message);
|
||||
@@ -152,14 +156,29 @@ export default {
|
||||
})
|
||||
},
|
||||
async saveInfo() {
|
||||
// type: '1',
|
||||
// expressRecordType: '1',
|
||||
// expressId: '',
|
||||
// expressCode: '',
|
||||
// deliveryName: '',
|
||||
// deliveryTel: '',
|
||||
// // expressName: '',
|
||||
// expressNumber: '',
|
||||
// expressTempId: '',
|
||||
// toAddr: '',
|
||||
// toName: '',
|
||||
// toTel: '',
|
||||
// orderNo: ''
|
||||
|
||||
|
||||
let that = this,
|
||||
type = that.type,
|
||||
expressId = that.expressId,
|
||||
expressCode = that.expressCode,
|
||||
deliveryName = that.deliveryName,
|
||||
deliveryTel = that.deliveryTel,
|
||||
save = {};
|
||||
save.id = that.$route.params.id;
|
||||
save.type = that.type;
|
||||
switch (type) {
|
||||
save.orderNo = that.orderId;
|
||||
|
||||
switch (that.type) {
|
||||
case "1":
|
||||
// try {
|
||||
// await this.$validator({
|
||||
@@ -169,24 +188,24 @@ export default {
|
||||
// } catch (e) {
|
||||
// return validatorDefaultCatch(e);
|
||||
// }
|
||||
if( !that.expressId ) return that.$dialog.error('请输入快递公司');
|
||||
if( !that.expressCode ) return that.$dialog.error('请输入快递单号');
|
||||
save.expressId = expressId;
|
||||
save.expressCode = expressCode;
|
||||
save.id = this.$route.params.id;
|
||||
if( !that.expressCode ) return that.$dialog.error('请输入快递公司');
|
||||
if( !that.expressNumber ) return that.$dialog.error('请输入快递单号');
|
||||
save.expressNumber = that.expressNumber;
|
||||
save.expressRecordType = 1;
|
||||
save.expressCode = that.expressCode;
|
||||
that.setInfo(save);
|
||||
break;
|
||||
case "2":
|
||||
try {
|
||||
await this.$validator({
|
||||
expressId: [required(required.message("发货人姓名"))],
|
||||
expressCode: [required(required.message("发货人电话"))]
|
||||
}).validate({ expressId, expressCode });
|
||||
deliveryName: [required(required.message("发货人姓名"))],
|
||||
deliveryTel: [required(required.message("发货人电话"))]
|
||||
}).validate({ deliveryName, deliveryTel });
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
save.expressId = expressId;
|
||||
save.expressCode = expressCode;
|
||||
save.deliveryName = deliveryName;
|
||||
save.deliveryTel = deliveryTel;
|
||||
that.setInfo(save);
|
||||
break;
|
||||
case "3":
|
||||
|
||||
@@ -43,19 +43,19 @@
|
||||
>
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div class="pictrue">
|
||||
<img :src="item.info.productInfo.image"/>
|
||||
<img :src="item.info.image"/>
|
||||
</div>
|
||||
<div class="text">
|
||||
<div class="info line2">
|
||||
{{ item.info.productInfo.storeName }}
|
||||
{{ item.info.productName }}
|
||||
</div>
|
||||
<div class="attr">{{ item.info.productInfo.attrInfo.suk }}</div>
|
||||
<div class="attr">{{ item.info.sku }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="money">
|
||||
<div class="x-money">¥{{ item.info.productInfo.price }}</div>
|
||||
<div class="num">x{{ item.info.cartNum }}</div>
|
||||
<div class="y-money">¥{{ item.info.productInfo.otPrice }}</div>
|
||||
<div class="x-money">¥{{ item.info.price }}</div>
|
||||
<div class="num">x{{ item.info.payNum }}</div>
|
||||
<!--<div class="y-money">¥{{ item.info.price }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -249,7 +249,7 @@ export default {
|
||||
},
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
orderDetailApi({id: this.$route.params.id}).then(
|
||||
orderDetailApi({orderNo: this.$route.params.id}).then(
|
||||
res => {
|
||||
that.orderInfo = res;
|
||||
that.types = res.statusStr.key;
|
||||
|
||||
@@ -63,20 +63,20 @@
|
||||
>
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div class="pictrue">
|
||||
<img :src="val.info.productInfo.image" />
|
||||
<img :src="val.info.image" />
|
||||
</div>
|
||||
<div class="text ">
|
||||
<div class="info line2">
|
||||
{{ val.info.productInfo.storeName }}
|
||||
{{ val.info.productName }}
|
||||
</div>
|
||||
<div class="attr" v-if="val.info.productInfo.attrInfo.suk">
|
||||
{{ val.info.productInfo.attrInfo.suk }}
|
||||
<div class="attr" v-if="val.info.sku">
|
||||
{{ val.info.sku }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="money">
|
||||
<div class="x-money">¥{{ val.info.productInfo.attrInfo.price }}</div>
|
||||
<div class="num">x{{ val.info.cartNum }}</div>
|
||||
<div class="x-money">¥{{ val.info.price }}</div>
|
||||
<div class="num">x{{ val.info.payNum }}</div>
|
||||
<div class="y-money">
|
||||
<!--¥{{ val.info.productInfo.attrInfo.otPrice }}-->
|
||||
</div>
|
||||
@@ -113,6 +113,13 @@
|
||||
>
|
||||
立即退款
|
||||
</div>
|
||||
<div
|
||||
class="bnt"
|
||||
@click="modify(item, 3)"
|
||||
v-if="where.status === 'refunding' && item.refundStatus === 1"
|
||||
>
|
||||
拒绝退款
|
||||
</div>
|
||||
<!--<div-->
|
||||
<!--class="bnt cancel"-->
|
||||
<!--v-if="item.pay_type === 'offline' && item.paid === 0"-->
|
||||
@@ -147,6 +154,7 @@
|
||||
:orderInfo="orderInfo"
|
||||
v-on:closechange="changeclose($event)"
|
||||
:status="status"
|
||||
@getRefuse="getRefuse"
|
||||
></PriceChange>
|
||||
</div>
|
||||
</template>
|
||||
@@ -220,13 +228,13 @@
|
||||
this.init()
|
||||
},
|
||||
// 拒绝退款
|
||||
getRefuse(id) {
|
||||
orderRefuseApi(data).then(() =>{
|
||||
that.change = false;
|
||||
that.$dialog.success("已拒绝退款");
|
||||
that.init();
|
||||
getRefuse(id, reason) {
|
||||
orderRefuseApi({ orderNo: id, reason: reason}).then(() =>{
|
||||
this.change = false;
|
||||
this.$dialog.success("已拒绝退款");
|
||||
this.init();
|
||||
}).catch((error) => {
|
||||
that.$dialog.error(error.message);
|
||||
this.$dialog.error(error.message);
|
||||
});
|
||||
},
|
||||
async savePrice(opt) {
|
||||
@@ -247,7 +255,7 @@
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.price = price;
|
||||
data.orderId = opt.orderId;
|
||||
data.orderNo = opt.orderId;
|
||||
editPriceApi(data).then(() =>{
|
||||
that.change = false;
|
||||
that.$dialog.success("改价成功");
|
||||
@@ -268,7 +276,7 @@
|
||||
}
|
||||
data.amount = refundPrice;
|
||||
data.type = opt.type;
|
||||
data.orderId = opt.orderId;
|
||||
data.orderNo = opt.orderId;
|
||||
orderRefundApi(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
@@ -289,7 +297,7 @@
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.mark = remark;
|
||||
data.id = opt.id;
|
||||
data.orderNo = opt.orderId;
|
||||
orderMarkApi(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
@@ -317,8 +325,8 @@
|
||||
orderListApi(this.where).then(
|
||||
res => {
|
||||
this.loading = false;
|
||||
this.loaded = res.list.list.length < this.where.limit;
|
||||
this.list.push.apply(this.list, res.list.list);
|
||||
this.loaded = res.list.length < this.where.limit;
|
||||
this.list.push.apply(this.list, res.list);
|
||||
this.where.page = this.where.page + 1;
|
||||
},
|
||||
err => {
|
||||
@@ -333,7 +341,7 @@
|
||||
}
|
||||
},
|
||||
toDetail(item) {
|
||||
this.$router.push({ path: "/javaMobile/orderDetail/" + item.id });
|
||||
this.$router.push({ path: "/javaMobile/orderDetail/" + item.orderId });
|
||||
},
|
||||
offlinePay(item) {
|
||||
// setOfflinePay({ order_id: item.order_id }).then(
|
||||
|
||||
@@ -31,8 +31,18 @@
|
||||
</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-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-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-input>
|
||||
</el-form-item>
|
||||
@@ -49,27 +59,27 @@
|
||||
highlight-current-row
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="商品总价:">
|
||||
<span>{{ props.row.totalPrice }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="推广人:">
|
||||
<span>{{ props.row.spreadInfo.id + ' / ' + props.row.spreadInfo.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户备注:">
|
||||
<span>{{ props.row.mark }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家备注:">
|
||||
<span>{{ props.row.remark }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="核销码:" v-if="props.row.shippingType === 2">
|
||||
<span>{{ props.row.verifyCode }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column type="expand">-->
|
||||
<!--<template slot-scope="props">-->
|
||||
<!--<el-form label-position="left" inline class="demo-table-expand">-->
|
||||
<!--<el-form-item label="商品总价:">-->
|
||||
<!--<span>{{ props.row.totalPrice | filterEmpty }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="推广人:">-->
|
||||
<!--<span>{{ props.row.spreadInfo.id + ' / ' + props.row.spreadInfo.name }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="用户备注:">-->
|
||||
<!--<span>{{ props.row.mark | filterEmpty }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="商家备注:">-->
|
||||
<!--<span>{{ props.row.remark | filterEmpty }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="核销码:" v-if="props.row.verifyCode">-->
|
||||
<!--<span>{{ props.row.verifyCode }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-form>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column
|
||||
type="selection"
|
||||
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 class="demo-image__preview mr10">
|
||||
<el-image
|
||||
:src="val.info.productInfo.image"
|
||||
:preview-src-list="[val.info.productInfo.image]"
|
||||
:src="val.info.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_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span>
|
||||
<span class="tabBox_tit mr10">{{ val.info.productName + ' | ' }}{{ val.info.sku ? val.info.sku:'-' }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.info.price ? val.info.price + ' x '+ val.info.payNum : '-' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -162,15 +172,15 @@
|
||||
<el-table-column label="操作" min-width="150" fixed="right" align="center">
|
||||
<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.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.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 === 'notShipped' && scope.row.refundStatus ===0" type="text" size="small" class="mr10" @click="sendOrder(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">
|
||||
<span class="el-dropdown-link">
|
||||
更多<i class="el-icon-arrow-down el-icon--right" />
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="onOrderDetails(scope.row.id)">订单详情</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="onOrderLog(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.orderId)">订单记录</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>
|
||||
<!--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-video-send ref="videoSend" :orderId="orderId" @submitFail="getList"></order-video-send>
|
||||
|
||||
<!--拒绝退款-->
|
||||
<el-dialog
|
||||
title="拒绝退款原因"
|
||||
@@ -274,7 +287,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!--立即拒绝-->
|
||||
<!--立即退款-->
|
||||
<el-dialog
|
||||
title="退款处理"
|
||||
:visible.sync="refundVisible"
|
||||
@@ -293,11 +306,12 @@
|
||||
</template>
|
||||
|
||||
<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 zbParser from '@/components/FormGenerator/components/parser/ZBParser'
|
||||
import detailsFrom from './orderDetail'
|
||||
import orderSend from './orderSend'
|
||||
import orderVideoSend from './orderVideoSend'
|
||||
import { storeStaffListApi } from '@/api/storePoint'
|
||||
import Cookies from 'js-cookie'
|
||||
import { isWriteOff } from "@/utils";
|
||||
@@ -307,13 +321,21 @@
|
||||
cardsData,
|
||||
zbParser,
|
||||
detailsFrom,
|
||||
orderSend
|
||||
orderSend,
|
||||
orderVideoSend
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '商城订单'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '视频号订单'
|
||||
}],
|
||||
RefuseVisible: false,
|
||||
RefuseData:{},
|
||||
orderId: 0,
|
||||
orderId: '',
|
||||
refundVisible: false,
|
||||
refundData: {},
|
||||
dialogVisibleJI: false,
|
||||
@@ -324,7 +346,7 @@
|
||||
tableFromLog: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
oid: null
|
||||
orderNo: 0
|
||||
},
|
||||
LogLoading: false,
|
||||
isCreate: 1,
|
||||
@@ -338,9 +360,10 @@
|
||||
tableFrom: {
|
||||
status: 'all',
|
||||
dateLimit: '',
|
||||
orderId: '',
|
||||
orderNo: '',
|
||||
page: 1,
|
||||
limit: 20
|
||||
limit: 20,
|
||||
type: ''
|
||||
},
|
||||
orderChartType: {},
|
||||
timeVal: [],
|
||||
@@ -349,11 +372,14 @@
|
||||
ids: '',
|
||||
orderids: '',
|
||||
cardLists: [],
|
||||
isWriteOff: isWriteOff()
|
||||
isWriteOff: isWriteOff(),
|
||||
proType: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
this.getOrderStatusNum();
|
||||
this.getOrderListData();
|
||||
},
|
||||
methods: {
|
||||
resetFormRefundhandler(){
|
||||
@@ -384,7 +410,7 @@
|
||||
this.RefuseVisible = false
|
||||
},
|
||||
onOrderRefuse(row) {
|
||||
this.orderids = row.id
|
||||
this.orderids = row.orderId
|
||||
this.RefuseData = {
|
||||
orderId: row.orderId,
|
||||
reason: ''
|
||||
@@ -392,7 +418,7 @@
|
||||
this.RefuseVisible = true
|
||||
},
|
||||
RefusehandlerSubmit(formValue) {
|
||||
orderRefuseApi({ id: this.orderids, reason: formValue.reason}).then(data => {
|
||||
orderRefuseApi({ orderNo: this.orderids, reason: formValue.reason}).then(data => {
|
||||
this.$message.success('操作成功')
|
||||
this.RefuseVisible = false
|
||||
this.getList()
|
||||
@@ -408,11 +434,11 @@
|
||||
amount: row.payPrice,
|
||||
type: ''
|
||||
}
|
||||
this.orderids = row.id
|
||||
this.orderids = row.orderId
|
||||
this.refundVisible = true
|
||||
},
|
||||
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.refundVisible = false
|
||||
this.getList()
|
||||
@@ -420,16 +446,21 @@
|
||||
},
|
||||
// 发送
|
||||
sendOrder(row) {
|
||||
this.$refs.send.modals = true;
|
||||
this.$refs.send.getList();
|
||||
this.$refs.send.sheetInfo();
|
||||
this.orderId = row.id;
|
||||
if(row.type===0){
|
||||
this.$refs.send.modals = true;
|
||||
this.$refs.send.getList();
|
||||
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) {
|
||||
if (row.isDel) {
|
||||
this.$modalSure().then(() => {
|
||||
orderDeleteApi({ id: row.id }).then(() => {
|
||||
orderDeleteApi({ orderNo: row.orderId }).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.tableData.data.splice(idx, 1)
|
||||
})
|
||||
@@ -451,7 +482,7 @@
|
||||
onOrderLog(id) {
|
||||
this.dialogVisibleJI = true
|
||||
this.LogLoading = true
|
||||
this.tableFromLog.oid = id
|
||||
this.tableFromLog.orderNo = id
|
||||
orderLogApi( this.tableFromLog ).then(res => {
|
||||
this.tableDataLog.data = res.list
|
||||
this.tableDataLog.total = res.total
|
||||
@@ -462,11 +493,11 @@
|
||||
},
|
||||
pageChangeLog(page) {
|
||||
this.tableFromLog.page = page
|
||||
this.getList()
|
||||
this.onOrderLog()
|
||||
},
|
||||
handleSizeChangeLog(val) {
|
||||
this.tableFromLog.limit = val
|
||||
this.getList()
|
||||
this.onOrderLog()
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
@@ -482,7 +513,7 @@
|
||||
inputPlaceholder: '请输入订单备注',
|
||||
inputValidator: (value) => { if(!value) return '输入不能为空'}
|
||||
}).then(({value}) => {
|
||||
orderMarkApi({ mark : value, id: row.id}).then(() => {
|
||||
orderMarkApi({ mark : value, orderNo: row.orderId}).then(() => {
|
||||
this.$message.success('操作成功')
|
||||
this.getList();
|
||||
})
|
||||
@@ -503,6 +534,8 @@
|
||||
this.timeVal = [];
|
||||
this.tableFrom.page = 1
|
||||
this.getList();
|
||||
this.getOrderStatusNum();
|
||||
this.getOrderListData();
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime (e) {
|
||||
@@ -510,6 +543,8 @@
|
||||
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
|
||||
this.tableFrom.page = 1
|
||||
this.getList();
|
||||
this.getOrderStatusNum();
|
||||
this.getOrderListData();
|
||||
},
|
||||
// 编辑
|
||||
edit(row) {
|
||||
@@ -535,21 +570,30 @@
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
orderListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list.list || []
|
||||
this.tableData.total = res.list.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.tableData.data = res.list || [];
|
||||
this.tableData.total = res.total;
|
||||
this.listLoading = false
|
||||
}).catch(() => {
|
||||
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) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<div class="description" v-loading="loading">
|
||||
<div class="title">用户信息</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">用户昵称:{{orderDatalist.user?orderDatalist.user.nickname:orderDatalist.realName}}</div>
|
||||
<div class="description-term">绑定电话:{{orderDatalist.user.phone ? orderDatalist.user.phone : '无'}}</div>
|
||||
<div class="description-term">用户昵称:{{orderDatalist.realName}}</div>
|
||||
<div class="description-term">绑定电话:{{orderDatalist.phone ? orderDatalist.phone : '无'}}</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="title">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货信息': '收货信息'}}</div>
|
||||
@@ -25,8 +25,8 @@
|
||||
<div class="description-term">订单编号:{{orderDatalist.orderId}}</div>
|
||||
<div class="description-term" style="color: red">订单状态:{{orderDatalist.statusStr.value}}</div>
|
||||
<div class="description-term">商品总数:{{orderDatalist.totalNum}}</div>
|
||||
<div class="description-term">商品总价:{{orderDatalist.totalPrice}}</div>
|
||||
<div class="description-term">交付邮费:{{orderDatalist.payPostage}}</div>
|
||||
<div class="description-term">商品总价:{{orderDatalist.proTotalPrice}}</div>
|
||||
<div class="description-term">支付邮费:{{orderDatalist.payPostage}}</div>
|
||||
<div class="description-term">优惠券金额:{{orderDatalist.couponPrice}}</div>
|
||||
<div class="description-term">实际支付:{{orderDatalist.payPrice}}</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">创建时间:{{orderDatalist.createTime}}</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.user_phone}}</div>
|
||||
<div class="description-term">商家备注:{{orderDatalist.remark}}</div>
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
name: 'OrderDetail',
|
||||
props: {
|
||||
orderId: {
|
||||
type: Number,
|
||||
type: String,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
@@ -129,13 +129,13 @@ export default {
|
||||
},
|
||||
// 获取订单物流信息
|
||||
getOrderData () {
|
||||
getLogisticsInfoApi({id:this.orderId}).then(async res => {
|
||||
getLogisticsInfoApi({orderNo:this.orderId}).then(async res => {
|
||||
this.result = res.list;
|
||||
})
|
||||
},
|
||||
getDetail(id) {
|
||||
this.loading = true
|
||||
orderDetailApi({id: id}).then(res => {
|
||||
orderDetailApi({orderNo: id}).then(res => {
|
||||
this.orderDatalist = res
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
export default {
|
||||
name: 'orderSend',
|
||||
props: {
|
||||
orderId: Number
|
||||
orderId: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -100,7 +100,6 @@
|
||||
expressRecordType: '1',
|
||||
expressId: '',
|
||||
expressCode: '',
|
||||
id: '',
|
||||
deliveryName: '',
|
||||
deliveryTel: '',
|
||||
// expressName: '',
|
||||
@@ -109,6 +108,7 @@
|
||||
toAddr: '',
|
||||
toName: '',
|
||||
toTel: '',
|
||||
orderNo: ''
|
||||
},
|
||||
modals: false,
|
||||
express: [],
|
||||
@@ -192,7 +192,7 @@
|
||||
},
|
||||
// 提交
|
||||
putSend(name) {
|
||||
this.formItem.id = this.orderId
|
||||
this.formItem.orderNo = this.orderId;
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
orderSendApi(this.formItem).then(async => {
|
||||
|
||||
120
admin/src/views/order/orderVideoSend.vue
Normal file
120
admin/src/views/order/orderVideoSend.vue
Normal 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>
|
||||
@@ -38,11 +38,19 @@
|
||||
<el-button size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;"
|
||||
@click="handleSubmit('formInline')">登录
|
||||
</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-divider direction="vertical"></el-divider>
|
||||
<el-button size="mini" type="text" style="margin-left: 0" @click="changeReg">注册账户</el-button>
|
||||
</div>
|
||||
<el-tooltip class="item" effect="dark" content="
|
||||
一号通为我司一个第三方平台
|
||||
专门提供短信 , 物流查询,商品复制,电子面单等个性化服务
|
||||
省去了自己单独接入功能的麻烦
|
||||
初次运行代码默认是没有账号的,需要自行注册,
|
||||
登录成功后根据提示购买自己需要用到的服务即可" placement="bottom">
|
||||
<span style="margin-left: 0">平台说明</span>
|
||||
</el-tooltip>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -11,6 +11,15 @@
|
||||
<span class="mr10" @click="onChangePassswordIndex">修改密码</span>
|
||||
<span class="mr10" @click="onChangePhone">修改手机号</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>
|
||||
|
||||
@@ -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-price" :class="{active:index === current}">
|
||||
<span>短信条数: {{ item.num }}</span>
|
||||
<span>{{tableFrom.type | onePassTypeFilter}}条数: {{ item.num }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<el-step title="商品信息" />
|
||||
<el-step title="商品详情" />
|
||||
<el-step title="其他设置" />
|
||||
<el-step title="规格设置" />
|
||||
<!--<el-step title="规格设置" />-->
|
||||
</el-steps>
|
||||
</div>
|
||||
<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-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-col>
|
||||
<el-col v-bind="grid2">
|
||||
<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-col>
|
||||
<el-col v-bind="grid2">
|
||||
<el-form-item label="商品关键字:">
|
||||
<el-input v-model="formValidate.keyword" placeholder="请输入商品关键字" />
|
||||
<el-input v-model="formValidate.keyword" placeholder="请输入商品关键字" :disabled="isDisabled"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid2">
|
||||
<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-col>
|
||||
<el-col v-bind="grid2">
|
||||
<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-col>
|
||||
<el-col v-bind="grid2">
|
||||
<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-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
@@ -61,9 +61,9 @@
|
||||
@dragend="handleDragEnd($event, 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 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">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
@@ -74,7 +74,7 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="运费模板:" prop="tempId">
|
||||
<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
|
||||
v-for="item in shippingList"
|
||||
:key="item.id"
|
||||
@@ -82,97 +82,26 @@
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button class="mr15" @click="addTem">添加运费模板</el-button>
|
||||
<el-button v-show="!isDisabled" class="mr15" @click="addTem">添加运费模板</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</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-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="true">多规格</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<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="false">默认设置</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</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="">
|
||||
<div class="acea-row">
|
||||
<el-select v-model="formValidate.selectRule">
|
||||
@@ -233,7 +162,7 @@
|
||||
</el-form-item>
|
||||
</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-table :data="oneFormBatch" border class="tabNumWidth" size="mini">
|
||||
<el-table-column align="center" label="图片" min-width="80">
|
||||
@@ -287,30 +216,30 @@
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<template v-if="formValidate.isSub">
|
||||
<el-table-column align="center" label="一级返佣(元)" min-width="120">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="二级返佣(元)" min-width="120">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</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">
|
||||
<template v-if="manyTabDate">
|
||||
<el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center" :label="manyTabTit[iii].title" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<span class="priceBox" v-text="scope.row[iii]" />
|
||||
<span class="priceBox" v-text="scope.row[iii]"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
@@ -326,20 +255,20 @@
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="一级返佣(元)" min-width="120" v-if="formValidate.isSub">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="二级返佣(元)" min-width="120" v-if="formValidate.isSub">
|
||||
<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>
|
||||
</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">
|
||||
<el-button type="text" class="submission" @click="delAttrTable(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
@@ -348,10 +277,89 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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-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===3 || $route.params.id" type="primary" class="submission" @click="handleSubmit('formValidate')">提交</el-button>
|
||||
<el-button v-show="currentTab<2" type="primary" class="submission" @click="handleSubmitNest('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>
|
||||
</el-card>
|
||||
@@ -434,6 +442,7 @@
|
||||
components: {Templates, CreatTemplates },
|
||||
data() {
|
||||
return {
|
||||
isDisabled: this.$route.params.isDisabled==='1'?true:false,
|
||||
activity: { '默认': 'red', '秒杀': 'blue', '砍价': 'green', '拼团': 'yellow' },
|
||||
props2: {
|
||||
children: 'child',
|
||||
@@ -581,7 +590,7 @@
|
||||
}, '')
|
||||
},
|
||||
setTagsViewTitle() {
|
||||
const title = '编辑商品'
|
||||
const title = this.isDisabled?'商品详情':'编辑商品'
|
||||
const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.$route.params.id}` })
|
||||
this.$store.dispatch('tagsView/updateVisitedView', route)
|
||||
},
|
||||
@@ -804,6 +813,7 @@
|
||||
this.isBtn = false
|
||||
},
|
||||
clearAttr() {
|
||||
this.isAttr = true
|
||||
this.formDynamic.attrsName = ''
|
||||
this.formDynamic.attrsVal = ''
|
||||
},
|
||||
@@ -860,7 +870,7 @@
|
||||
getInfo () {
|
||||
this.fullscreenLoading = true
|
||||
productDetailApi(this.$route.params.id).then(async res => {
|
||||
this.isAttr = false;
|
||||
this.isAttr = true;
|
||||
let info = res
|
||||
this.formValidate = {
|
||||
image: this.$selfUtil.setDomain(info.image),
|
||||
@@ -896,7 +906,7 @@
|
||||
let imgss = []
|
||||
Object.keys(imgs).map(i => {
|
||||
imgss.push(this.$selfUtil.setDomain(imgs[i]))
|
||||
})
|
||||
})
|
||||
this.formValidate.sliderImages = [ ...imgss ]
|
||||
if(info.isHot) this.checkboxGroup.push('isHot')
|
||||
if(info.isGood) this.checkboxGroup.push('isGood')
|
||||
@@ -940,7 +950,8 @@
|
||||
},
|
||||
// 点击商品图
|
||||
modalPicTap (tit, num, i) {
|
||||
const _this = this
|
||||
const _this = this;
|
||||
if(_this.isDisabled) return;
|
||||
this.$modalUpload(function(img) {
|
||||
if(tit==='1'&& !num){
|
||||
_this.formValidate.image = img[0].sattDir
|
||||
@@ -1032,40 +1043,55 @@
|
||||
},
|
||||
// 移动
|
||||
handleDragStart (e, item) {
|
||||
this.dragging = item;
|
||||
if(!this.isDisabled) this.dragging = item;
|
||||
},
|
||||
handleDragEnd (e, item) {
|
||||
this.dragging = null
|
||||
if(!this.isDisabled) this.dragging = null
|
||||
},
|
||||
handleDragOver (e) {
|
||||
e.dataTransfer.dropEffect = 'move'
|
||||
if(!this.isDisabled) e.dataTransfer.dropEffect = 'move'
|
||||
},
|
||||
handleDragEnter (e, item) {
|
||||
e.dataTransfer.effectAllowed = 'move'
|
||||
if (item === this.dragging) {
|
||||
return
|
||||
if(!this.isDisabled){
|
||||
e.dataTransfer.effectAllowed = 'move'
|
||||
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) {
|
||||
e.dataTransfer.effectAllowed = 'move'
|
||||
if (item === this.dragging) {
|
||||
return
|
||||
if(!this.isDisabled){
|
||||
e.dataTransfer.effectAllowed = 'move'
|
||||
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>
|
||||
<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{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
@@ -1167,7 +1193,6 @@
|
||||
/deep/.el-form-item__label{
|
||||
float: none !important;
|
||||
display: inline-block !important;
|
||||
margin-left: 120px !important;
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,8 +118,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="150" fixed="right" align="center">
|
||||
<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}">
|
||||
<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>
|
||||
<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>
|
||||
@@ -221,9 +224,8 @@ export default {
|
||||
// 导出
|
||||
exports () {
|
||||
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 () {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-card>
|
||||
<div>生成的商品默认是没有上架的,请手动上架商品!
|
||||
<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>
|
||||
</router-link>
|
||||
</span>
|
||||
@@ -145,7 +145,7 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<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">
|
||||
<el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center"
|
||||
:label="manyTabTit[iii].title" min-width="80">
|
||||
@@ -156,19 +156,24 @@
|
||||
</template>
|
||||
<el-table-column align="center" label="图片" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<div class="upLoadPicBox" @click="modalPicTap('1','duo',scope.$index)">
|
||||
<div v-if="scope.row.image" class="pictrue pictrueTab"><img :src="scope.row.image"></div>
|
||||
<div v-else class="upLoad pictrueTab">
|
||||
<i class="el-icon-camera cameraIconfont"/>
|
||||
<el-form-item :rules="[{required: true, message: '请上传图片', trigger: 'change'}]" :prop="'attrValue.'+scope.$index+'.image'">
|
||||
<div class="upLoadPicBox" @click="modalPicTap('1','duo',scope.$index)">
|
||||
<div v-if="scope.row.image" class="pictrue pictrueTab"><img :src="scope.row.image"></div>
|
||||
<div v-else class="upLoad pictrueTab">
|
||||
<i class="el-icon-camera cameraIconfont"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title"
|
||||
align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'"
|
||||
class="priceBox"/>
|
||||
<el-form-item :rules="[{required: true, message: '请输入'+formThead[iii].title, trigger: 'blur'}]" :prop="formThead[iii].title!=='商品编号'?'attrValue.'+scope.$index+'.'+iii:''">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" min-width="80">
|
||||
@@ -216,8 +221,8 @@
|
||||
otPrice: null,
|
||||
stock: null,
|
||||
barCode: '',
|
||||
weight: null,
|
||||
volume: null
|
||||
weight: 0,
|
||||
volume: 0
|
||||
}]
|
||||
const objTitle = {
|
||||
price: {
|
||||
@@ -287,6 +292,9 @@
|
||||
],
|
||||
keyword: [
|
||||
{required: true, message: '请输入商品关键字', trigger: 'blur'}
|
||||
],
|
||||
attrValue: [
|
||||
{ required: true, message: '请上传商品轮播图', type: 'array', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
grid: {
|
||||
@@ -330,7 +338,7 @@
|
||||
methods: {
|
||||
// 删除表格中的属性
|
||||
delAttrTable(index) {
|
||||
this.ManyAttrValue.splice(index, 1)
|
||||
this.formValidate.attrValue.splice(index, 1)
|
||||
},
|
||||
getCopyConfig() {
|
||||
copyConfigApi().then(res => {
|
||||
@@ -341,7 +349,7 @@
|
||||
batchAdd() {
|
||||
// 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('请填写完整的批量设置内容!');
|
||||
for (const val of this.ManyAttrValue) {
|
||||
for (const val of this.formValidate.attrValue) {
|
||||
this.$set(val, 'image', this.oneFormBatch[0].image)
|
||||
this.$set(val, 'price', this.oneFormBatch[0].price)
|
||||
this.$set(val, 'cost', this.oneFormBatch[0].cost)
|
||||
@@ -359,7 +367,7 @@
|
||||
tmp['value' + i] = {title: o.attrName}
|
||||
tmpTab['value' + i] = ''
|
||||
})
|
||||
this.ManyAttrValue = this.attrFormat(val)
|
||||
this.formValidate.attrValue = this.attrFormat(val)
|
||||
this.manyTabTit = tmp
|
||||
this.manyTabDate = tmpTab
|
||||
this.formThead = Object.assign({}, this.formThead, tmp)
|
||||
@@ -555,7 +563,7 @@
|
||||
},
|
||||
// 提交
|
||||
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.sliderImage = JSON.stringify(this.formValidate.sliderImages)
|
||||
for (var i = 0; i < this.formValidate.attr.length; i++) {
|
||||
@@ -598,7 +606,7 @@
|
||||
_this.OneattrValue[0].image = img[0].sattDir
|
||||
}
|
||||
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') {
|
||||
_this.oneFormBatch[0].image = img[0].sattDir
|
||||
@@ -633,6 +641,11 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.formValidate{
|
||||
/deep/ .el-form-item__error{
|
||||
position: static !important;
|
||||
}
|
||||
}
|
||||
.selWidth {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -64,12 +64,12 @@
|
||||
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="val.info.productInfo.image"
|
||||
:preview-src-list="[val.info.productInfo.image]"
|
||||
:src="val.info.image"
|
||||
:preview-src-list="[val.info.image]"
|
||||
/>
|
||||
</div>
|
||||
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span>
|
||||
<span class="tabBox_tit mr10">{{ val.info.productName + ' | ' }}{{ val.info.suk ? val.info.suk:'-' }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.info.price ? val.info.price + ' x '+ val.info.payNum : '-' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<el-input-number :min="0" :max="100" step-strictly v-model="formValidate.discount" placeholder="请输入享受折扣"></el-input-number>
|
||||
</el-form-item>
|
||||
<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 label="图标" prop="icon">
|
||||
<div class="upLoadPicBox" @click="modalPicTap('1', 'icon')">
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
cancelButtonText: '取消',
|
||||
inputErrorMessage: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称',
|
||||
inputType: 'text',
|
||||
closeOnClickModal: false,
|
||||
inputValue: row ? (this.$route.path.indexOf('group') !== -1?row.groupName:row.name): '' ,
|
||||
inputPlaceholder: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称',
|
||||
inputValidator: (value) => { if(!value) return '输入不能为空'}
|
||||
|
||||
@@ -3,25 +3,25 @@
|
||||
<el-form-item label="用户编号:">
|
||||
<el-input v-model="ruleForm.id" disabled class="selWidth"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名:">
|
||||
<el-input v-model="ruleForm.realName" class="selWidth"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码:" prop="phone">
|
||||
<el-input v-model.number="ruleForm.phone" class="selWidth"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生日:">
|
||||
<el-date-picker
|
||||
v-model="ruleForm.birthday"
|
||||
type="date"
|
||||
class="selWidth"
|
||||
placeholder="选择日期"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号:">
|
||||
<el-input v-model="ruleForm.cardId" class="selWidth"></el-input>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="真实姓名:">-->
|
||||
<!--<el-input v-model="ruleForm.realName" class="selWidth"></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="手机号码:" prop="phone">-->
|
||||
<!--<el-input v-model.number="ruleForm.phone" class="selWidth" readonly></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="生日:">-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="ruleForm.birthday"-->
|
||||
<!--type="date"-->
|
||||
<!--class="selWidth"-->
|
||||
<!--placeholder="选择日期"-->
|
||||
<!--format="yyyy 年 MM 月 dd 日"-->
|
||||
<!--value-format="yyyy-MM-dd">-->
|
||||
<!--</el-date-picker>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="身份证号:">-->
|
||||
<!--<el-input v-model="ruleForm.cardId" class="selWidth"></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="用户地址:">
|
||||
<el-input v-model="ruleForm.addres" class="selWidth"></el-input>
|
||||
</el-form-item>
|
||||
@@ -65,17 +65,17 @@
|
||||
<script>
|
||||
import { groupListApi, levelListApi, tagListApi, userInfoApi, userUpdateApi } from '@/api/user'
|
||||
const defaultObj = {
|
||||
birthday: '',
|
||||
cardId: '',
|
||||
// birthday: '',
|
||||
// cardId: '',
|
||||
id : null,
|
||||
mark: '',
|
||||
phone: '',
|
||||
realName: '',
|
||||
// phone: '',
|
||||
// realName: '',
|
||||
addres:'',
|
||||
groupId: '',
|
||||
level: '',
|
||||
isPromoter: false,
|
||||
status: false,
|
||||
status: false
|
||||
}
|
||||
export default {
|
||||
name: "UserEdit",
|
||||
@@ -107,12 +107,12 @@
|
||||
userInfo () {
|
||||
userInfoApi({ id: this.uid}).then(async res => {
|
||||
this.ruleForm = {
|
||||
birthday: res.birthday,
|
||||
cardId: res.cardId,
|
||||
// birthday: res.birthday,
|
||||
// cardId: res.cardId,
|
||||
id : res.uid,
|
||||
mark: res.mark,
|
||||
phone: res.phone,
|
||||
realName: res.realName,
|
||||
// phone: res.phone,
|
||||
// realName: res.realName,
|
||||
status: res.status,
|
||||
addres: res.addres,
|
||||
groupId: Number(res.groupId) || '',
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
|
||||
<el-col v-bind="grid">
|
||||
<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-col>
|
||||
<!--<el-col :span="24">-->
|
||||
@@ -115,12 +115,12 @@
|
||||
<el-form-item label="消费情况:">
|
||||
<el-select v-model="userFrom.payCount" placeholder="请选择" class="selWidth" clearable>
|
||||
<el-option value="" label="全部"></el-option>
|
||||
<el-option value="-1" label="0"></el-option>
|
||||
<el-option value="0" label="1+"></el-option>
|
||||
<el-option value="1" label="2+"></el-option>
|
||||
<el-option value="2" label="3+"></el-option>
|
||||
<el-option value="3" label="4+"></el-option>
|
||||
<el-option value="4" label="5+"></el-option>
|
||||
<el-option value="0" label="0"></el-option>
|
||||
<el-option value="1" label="1+"></el-option>
|
||||
<el-option value="2" label="2+"></el-option>
|
||||
<el-option value="3" label="3+"></el-option>
|
||||
<el-option value="4" label="4+"></el-option>
|
||||
<el-option value="5" label="5+"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -189,21 +189,21 @@
|
||||
<el-form-item label="近次访问:">
|
||||
<span>{{ props.row.updateTime | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号:">
|
||||
<span>{{ props.row.cardId | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="身份证号:">-->
|
||||
<!--<span>{{ props.row.cardId | filterEmpty }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="手机号:">
|
||||
<span>{{ props.row.phone | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名:">
|
||||
<span>{{ props.row.realName | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="真实姓名:">-->
|
||||
<!--<span>{{ props.row.realName | filterEmpty }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="标签:">
|
||||
<span>{{ props.row.tagName | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="生日:">
|
||||
<span>{{ props.row.birthday | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="生日:">-->
|
||||
<!--<span>{{ props.row.birthday | filterEmpty }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="地址:">
|
||||
<span>{{ props.row.addres | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
@@ -260,13 +260,21 @@
|
||||
min-width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
label="用户类型"
|
||||
label="手机号"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.userType | typeFilter}}</span>
|
||||
<span>{{scope.row.phone | filterEmpty}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column-->
|
||||
<!--label="用户类型"-->
|
||||
<!--min-width="100"-->
|
||||
<!-->-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<span>{{scope.row.userType | typeFilter}}</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column
|
||||
prop="nowMoney"
|
||||
label="余额"
|
||||
@@ -289,6 +297,7 @@
|
||||
<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('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="clearSpread(scope.row)" v-if="scope.row.spreadUid && scope.row.spreadUid>0">清除上级推广人</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -403,7 +412,7 @@
|
||||
label="余额"
|
||||
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
|
||||
label="修改积分"
|
||||
@@ -418,7 +427,7 @@
|
||||
label="积分"
|
||||
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>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -439,7 +448,7 @@
|
||||
</template>
|
||||
|
||||
<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 editFrom from './edit'
|
||||
import userDetails from './userDetails'
|
||||
@@ -638,6 +647,29 @@
|
||||
this.getCityList()
|
||||
},
|
||||
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) {
|
||||
this.$modalSure('解除【' + row.nickname + '】的上级推广人吗').then(() => {
|
||||
@@ -735,7 +767,7 @@
|
||||
_this.couponData.push(item.title)
|
||||
})
|
||||
_this.selectionList = []
|
||||
},this.userIds)
|
||||
},this.userIds,'user')
|
||||
},
|
||||
Close() {
|
||||
this.Visible = false
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
<script>
|
||||
import { infobyconditionApi, topdetailApi } from '@/api/user'
|
||||
import { integralListApi } from '@/api/marketing'
|
||||
export default {
|
||||
name: "UserDetails",
|
||||
props:{
|
||||
@@ -97,7 +98,48 @@
|
||||
methods: {
|
||||
changeType(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() {
|
||||
this.tableFrom.userId = this.uid
|
||||
@@ -140,35 +182,6 @@
|
||||
}
|
||||
]
|
||||
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':
|
||||
this.columns = [
|
||||
{
|
||||
@@ -217,7 +230,7 @@
|
||||
},
|
||||
{
|
||||
title: '兑换时间',
|
||||
key: 'useTime',
|
||||
key: 'updateTime',
|
||||
minWidth: 120
|
||||
}
|
||||
]
|
||||
|
||||
246
app/App.vue
246
app/App.vue
@@ -1,74 +1,179 @@
|
||||
<!-- <template>
|
||||
<view>
|
||||
<iframe ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
|
||||
scrolling="no" src="https://java.crmeb.net">
|
||||
</iframe>
|
||||
</view>
|
||||
</template> -->
|
||||
<script>
|
||||
import { checkLogin } from "./libs/login";
|
||||
import { HTTP_REQUEST_URL } from './config/app';
|
||||
import {
|
||||
checkLogin
|
||||
} from "./libs/login";
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from './config/app';
|
||||
import Auth from './libs/wechat.js';
|
||||
import Routine from './libs/routine.js';
|
||||
import Apps from './libs/apps.js';
|
||||
import {
|
||||
mapActions
|
||||
} from 'vuex'
|
||||
|
||||
export default {
|
||||
globalData: {
|
||||
spid: 0,
|
||||
code:0,
|
||||
isLogin:false,
|
||||
userInfo:{},
|
||||
MyMenus:[]
|
||||
},
|
||||
code: 0,
|
||||
isLogin: false,
|
||||
userInfo: {},
|
||||
MyMenus: [],
|
||||
windowHeight: 0,
|
||||
id: 0
|
||||
},
|
||||
onLaunch: function(option) {
|
||||
let that = this;
|
||||
// #ifdef H5
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
// 首页没有title获取的整个页面的高度,里面的页面有原生标题要减掉就是视口的高度
|
||||
// 状态栏是动态的可以拿到 标题栏是固定写死的是44px
|
||||
let height = res.windowHeight - res.statusBarHeight - 44
|
||||
// #ifdef H5
|
||||
that.globalData.windowHeight = res.windowHeight + 'px'
|
||||
// #endif
|
||||
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef MP
|
||||
if (HTTP_REQUEST_URL==''){
|
||||
console.error("请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret");
|
||||
return false;
|
||||
}
|
||||
if (option.query.hasOwnProperty('scene')){
|
||||
switch (option.scene) {
|
||||
//扫描小程序码
|
||||
case 1047:
|
||||
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
|
||||
that.globalData.code = val.pid;
|
||||
break;
|
||||
//长按图片识别小程序码
|
||||
case 1048:
|
||||
that.globalData.code = option.query.scene;
|
||||
break;
|
||||
//手机相册选取小程序码
|
||||
case 1049:
|
||||
that.globalData.code = option.query.scene;
|
||||
break;
|
||||
//直接进入小程序
|
||||
case 1001:
|
||||
that.globalData.spid = option.query.scene;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
if (HTTP_REQUEST_URL == '') {
|
||||
console.error(
|
||||
"请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if (option.query.hasOwnProperty('scene')) {
|
||||
switch(option.scene){
|
||||
case 1047: //扫描小程序码
|
||||
case 1048: //长按图片识别小程序码
|
||||
case 1049: //手机相册选取小程序码
|
||||
case 1001: //直接进入小程序
|
||||
let value = this.$util.getUrlParams(decodeURIComponent(option.query.scene));
|
||||
let values = value.split(',');
|
||||
if(values.length === 2){
|
||||
let v1 = values[0].split(":");
|
||||
if (v1[0] === 'pid') {
|
||||
that.globalData.spid = v1[1];
|
||||
} else{
|
||||
that.globalData.id = v1[1];
|
||||
}
|
||||
let v2 = values[1].split(":");
|
||||
if (v2[0] === 'pid') {
|
||||
that.globalData.spid = v2[1];
|
||||
}else{
|
||||
that.globalData.id = v2[1];
|
||||
}
|
||||
}else{
|
||||
that.globalData.spid = values[0].split(":")[1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
// 获取导航高度;
|
||||
uni.getSystemInfo({
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
|
||||
}
|
||||
}
|
||||
});
|
||||
// #ifdef MP
|
||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
that.globalData.navH = menuButtonInfo.top * 2 + menuButtonInfo.height / 2;
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
let snsapiBase = 'snsapi_base';
|
||||
let urlData = location.pathname + location.search;
|
||||
if (!that.$store.getters.isLogin && Auth.isWeixin()) {
|
||||
const {
|
||||
code,
|
||||
state,
|
||||
scope
|
||||
} = option.query;
|
||||
if (code && code != uni.getStorageSync('snsapiCode') && location.pathname.indexOf(
|
||||
'/pages/users/wechat_login/index') === -1) {
|
||||
// 存储静默授权code
|
||||
uni.setStorageSync('snsapiCode', code);
|
||||
let spread = that.globalData.spid ? that.globalData.spid : 0;
|
||||
Auth.auth(code, that.$Cache.get('spread'))
|
||||
.then(res => {
|
||||
uni.setStorageSync('snRouter', decodeURIComponent(decodeURIComponent(option.query
|
||||
.back_url)));
|
||||
if (res.type === 'register') {
|
||||
this.$Cache.set('snsapiKey', res.key);
|
||||
}
|
||||
if (res.type === 'login') {
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.token
|
||||
});
|
||||
this.$store.commit("SETUID", res.uid);
|
||||
location.replace(decodeURIComponent(decodeURIComponent(option.query.back_url)));
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
// this.$util.Tips({
|
||||
// title: error
|
||||
// });
|
||||
if (!this.$Cache.has('snsapiKey')) {
|
||||
if (location.pathname.indexOf('/pages/users/wechat_login/index') === -1) {
|
||||
Auth.oAuth(snsapiBase, option.query.back_url);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!this.$Cache.has('snsapiKey')) {
|
||||
if (location.pathname.indexOf('/pages/users/wechat_login/index') === -1) {
|
||||
Auth.oAuth(snsapiBase, urlData);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (option.query.back_url) {
|
||||
location.replace(uni.getStorageSync('snRouter'));
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef MP
|
||||
// 小程序静默授权
|
||||
if (!this.$store.getters.isLogin) {
|
||||
let spread = that.globalData.spid ? that.globalData.spid : 0;
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
Routine.authUserInfo(code, {
|
||||
'spread_spid': spread
|
||||
}).then(res => {
|
||||
// that.$store.commit('AuthorizeType', res.data.type);
|
||||
})
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
if(this.$store.getters.isLogin && !this.$Cache.get('USER_INFO'))await this.$store.dispatch('USERINFO');
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
onShow: function() {
|
||||
// #ifdef H5
|
||||
uni.getSystemInfo({
|
||||
success(e){
|
||||
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
|
||||
if(e.windowWidth>420 && !window.top.isPC && !/iOS|Android/i.test(e.system)){
|
||||
// window.location.pathname = 'https://java.crmeb.net/';
|
||||
/* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
|
||||
window.location.pathname = '/static/html/pc.html';
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
// #ifdef H5
|
||||
uni.getSystemInfo({
|
||||
success(e) {
|
||||
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
|
||||
if (e.windowWidth > 420 && !window.top.isPC && !/iOS|Android/i.test(e.system)) {
|
||||
// window.location.pathname = 'https://java.crmeb.net/';
|
||||
/* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
|
||||
window.location.pathname = '/static/html/pc.html';
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
onHide: function() {
|
||||
//console.log('App Hide')
|
||||
}
|
||||
@@ -81,32 +186,39 @@
|
||||
@import 'static/iconfont/iconfont.css';
|
||||
@import 'static/css/guildford.css';
|
||||
@import 'static/css/style.scss';
|
||||
|
||||
|
||||
/* 条件编译,仅在H5平台生效 */
|
||||
// #ifdef H5
|
||||
body::-webkit-scrollbar,html::-webkit-scrollbar {
|
||||
display: none;
|
||||
body::-webkit-scrollbar,
|
||||
html::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// #endif
|
||||
view{
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.bg-color-red {
|
||||
background-color: #e93323!important;
|
||||
background-color: #E93323 !important;
|
||||
}
|
||||
.syspadding{
|
||||
|
||||
.syspadding {
|
||||
padding-top: var(--status-bar-height);
|
||||
}
|
||||
.flex{
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.uni-scroll-view::-webkit-scrollbar {
|
||||
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
|
||||
display: none
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
</style><!-- -->
|
||||
</style>
|
||||
|
||||
@@ -55,7 +55,7 @@ export function getBargainList(data) {
|
||||
* @param object data
|
||||
*/
|
||||
export function getBargainUserList(data){
|
||||
return request.get('bargain/user/list',data);
|
||||
return request.get('bargain/record',data);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,12 +76,13 @@ export function getBargainDetail(id) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价 开启砍价用户信息
|
||||
* 用户砍价信息,注意自己的活动和别人的活动的区别
|
||||
*/
|
||||
export function postBargainStartUser(data) {
|
||||
return request.get("bargain/start/user", data);
|
||||
export function getBargainUser(data) {
|
||||
return request.get("bargain/user", data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 砍价开启
|
||||
*/
|
||||
@@ -110,20 +111,6 @@ export function postBargainHelpList(params,data) {
|
||||
return request.get("bargain/help/list?limit="+params.limit+"&page="+params.page, data,{});
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
|
||||
*/
|
||||
export function postBargainHelpCount(data) {
|
||||
return request.get("bargain/help/count", data,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价 观看/分享/参与次数
|
||||
*/
|
||||
export function postBargainShare(bargainId) {
|
||||
return request.get("bargain/share/" + bargainId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀产品时间区间
|
||||
*
|
||||
@@ -193,5 +180,41 @@ export function scombinationCode(id) {
|
||||
* @param int id
|
||||
*/
|
||||
export function getSeckillHeaderApi(){
|
||||
return request.get('seckill/header',{},{noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页秒杀产品列表
|
||||
*/
|
||||
export function getSeckillIndexApi(){
|
||||
return request.get('seckill/index',{},{noAuth:true});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 首页拼团产品列表
|
||||
*/
|
||||
export function getCombinationIndexApi(){
|
||||
return request.get('combination/index',{},{noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页砍价产品列表
|
||||
*/
|
||||
export function getBargainIndexApi(){
|
||||
return request.get('bargain/index',{},{noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页砍价产品列表
|
||||
*/
|
||||
export function bargainHeaderApi(){
|
||||
return request.get('bargain/header');
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼图列表头部
|
||||
*/
|
||||
export function combinationHeaderApi(){
|
||||
return request.get('combination/header');
|
||||
}
|
||||
@@ -120,9 +120,6 @@ export function verifyCode(){
|
||||
export function registerVerify(phone){
|
||||
return request.post('sendCode', { phone: phone },{noAuth:true},1)
|
||||
}
|
||||
// export function registerVerify(phone, reset, key, code){
|
||||
// return request.post('register/verify', { phone: phone, type: reset === undefined ? 'reset' : reset, key: key, code: code },{noAuth:true})
|
||||
// }
|
||||
|
||||
/**
|
||||
* 手机号注册
|
||||
|
||||
@@ -4,10 +4,8 @@ import request from "@/utils/request.js";
|
||||
* 获取购物车列表
|
||||
* @param numType boolean true 购物车数量,false=购物车产品数量
|
||||
*/
|
||||
export function getCartCounts(numType) {
|
||||
return request.get("cart/count", {
|
||||
numType: numType === undefined ? true : numType
|
||||
});
|
||||
export function getCartCounts(numType,type) {
|
||||
return request.get("cart/count?numType=" + numType + "&type=" + type);
|
||||
}
|
||||
/**
|
||||
* 获取购物车列表
|
||||
@@ -184,8 +182,8 @@ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain
|
||||
* @param string price
|
||||
*
|
||||
*/
|
||||
export function getCouponsOrderPrice(data) {
|
||||
return request.get('coupons/order', data)
|
||||
export function getCouponsOrderPrice(preOrderNo) {
|
||||
return request.get(`coupons/order/${preOrderNo}`)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,8 +192,8 @@ export function getCouponsOrderPrice(data) {
|
||||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function orderCreate(key, data) {
|
||||
return request.post('order/create/' + key, data);
|
||||
export function orderCreate(data) {
|
||||
return request.post('order/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -204,8 +202,8 @@ export function orderCreate(key, data) {
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export function postOrderComputed(key, data) {
|
||||
return request.post("order/computed/" + key, data);
|
||||
export function postOrderComputed(data) {
|
||||
return request.post("order/computed/price", data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,5 +227,29 @@ export function wechatOrderPay(data) {
|
||||
* @param object data
|
||||
*/
|
||||
export function wechatQueryPayResult(data) {
|
||||
return request.get('pay/queryPayResult', data);
|
||||
return request.get('pay/queryPayResult?orderNo=' + data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请退款商品详情
|
||||
* @param object data
|
||||
*/
|
||||
export function applyRefund(orderId) {
|
||||
return request.get(`order/apply/refund/${orderId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 预下单
|
||||
* @param object data
|
||||
*/
|
||||
export function preOrderApi(data) {
|
||||
return request.post(`order/pre/order`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载预下单
|
||||
* @param object preOrderNo
|
||||
*/
|
||||
export function loadPreOrderApi(preOrderNo) {
|
||||
return request.get(`order/load/pre/${preOrderNo}`);
|
||||
}
|
||||
@@ -12,22 +12,15 @@ export function getWechatConfig() {
|
||||
return request.get("wechat/config",{ url: encodeURIComponent(wechat.signLink()) },{ noAuth: true });
|
||||
}
|
||||
|
||||
// export function getWechatConfig() {
|
||||
// return request.get(
|
||||
// "wechat/config",
|
||||
// { url: encodeURIComponent(location.href.split('#')[0]) },
|
||||
// { noAuth: true }
|
||||
// );
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取微信sdk配置
|
||||
* @returns {*}
|
||||
*/
|
||||
export function wechatAuth(code, spread, login_type) {
|
||||
export function wechatAuth(code, spread) {
|
||||
var reg=/^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 ,判断正整数用/^[1-9]+[0-9]*]*$/
|
||||
spread = reg.test(spread) ? spread : 0;
|
||||
return request.get(
|
||||
"wechat/authorize/login",
|
||||
{ code, spread_spid:spread, login_type },
|
||||
"wechat/authorize/login?code=" + code + "&spread_spid=" + spread, {},
|
||||
{ noAuth: true }
|
||||
);
|
||||
}
|
||||
@@ -98,14 +91,26 @@ export function getUserPhone(data){
|
||||
}
|
||||
|
||||
/**
|
||||
* 静默授权
|
||||
* APP微信登录
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function silenceAuth(data) {
|
||||
//#ifdef MP
|
||||
return request.get("wechat/authorize/program/login", data, { noAuth : true });
|
||||
//#endif
|
||||
//#ifdef H5
|
||||
return request.get("wechat/authorize/login", data, { noAuth : true });
|
||||
//#endif
|
||||
export function appAuth(data) {
|
||||
return request.post("wechat/authorize/app/login", data, { noAuth : true });
|
||||
}
|
||||
|
||||
/**
|
||||
* 苹果登录
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function appleLogin(data) {
|
||||
return request.post("ios/login", data, { noAuth : true });
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 苹果绑定手机号
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function iosBinding(data) {
|
||||
return request.post("ios/binding/phone", data, { noAuth : true });
|
||||
}
|
||||
@@ -5,8 +5,8 @@ import request from "@/utils/request.js";
|
||||
* @param int id
|
||||
*
|
||||
*/
|
||||
export function getProductDetail(id) {
|
||||
return request.get('product/detail/' + id, {}, {
|
||||
export function getProductDetail(id, type) {
|
||||
return request.get('product/detail/' + id + '?type=' + type, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
@@ -41,15 +41,20 @@ export function collectAdd(id, category) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收藏产品
|
||||
* 取消收藏产品
|
||||
* @param int id
|
||||
* @param string category product=普通产品,product_seckill=秒杀产品
|
||||
*/
|
||||
export function collectDel(id, category) {
|
||||
return request.post('collect/del', {
|
||||
id: id,
|
||||
'category': category === undefined ? 'product' : category
|
||||
});
|
||||
export function collectDel(proId) {
|
||||
return request.post(`collect/cancel/${proId}`);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除收藏产品
|
||||
* @param string id
|
||||
*/
|
||||
export function collectDelete(ids) {
|
||||
return request.post(`collect/delete`,ids);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +116,7 @@ export function collectAll(id, category) {
|
||||
*
|
||||
*/
|
||||
export function getGroomList(type, data) {
|
||||
return request.get('groom/list/' + type, data, {
|
||||
return request.get('index/product/' + type, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
@@ -163,3 +168,24 @@ export function getSearchKeyword() {
|
||||
export function storeListApi(data) {
|
||||
return request.post("store/list", data, {}, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 优品推荐
|
||||
* @param object data
|
||||
*/
|
||||
export function getProductGood() {
|
||||
return request.get('product/good');
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页产品评论
|
||||
* @param int id
|
||||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function getReplyProduct(id) {
|
||||
return request.get('reply/product/' + id, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
@@ -46,9 +46,6 @@ export function getCodeApi() {
|
||||
export function registerVerify(phone){
|
||||
return request.post('sendCode', { phone: phone },{noAuth:true},1)
|
||||
}
|
||||
// export function registerVerify(data) {
|
||||
// return request.post("register/verify", data, { noAuth : true });
|
||||
// }
|
||||
|
||||
/**
|
||||
* h5用户手机号注册
|
||||
@@ -176,7 +173,7 @@ export function spreadCount(type){
|
||||
}
|
||||
|
||||
/*
|
||||
* 推广数据
|
||||
* 推广数据 当前佣金 提现总金额
|
||||
* */
|
||||
export function getSpreadInfo() {
|
||||
return request.get("commission");
|
||||
@@ -316,6 +313,13 @@ export function rechargeWechat(data) {
|
||||
return request.post("recharge/wechat", data);
|
||||
}
|
||||
|
||||
/*
|
||||
* app微信充值
|
||||
* */
|
||||
export function appWechat(data) {
|
||||
return request.post("recharge/wechat/app", data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 余额充值
|
||||
* */
|
||||
@@ -365,7 +369,7 @@ export function getChatRecord(to_uid, data) {
|
||||
*/
|
||||
export function spread(puid)
|
||||
{
|
||||
return request.get("user/bindSpread?spreadPid=" + puid);
|
||||
return request.get("user/bindSpread?spreadPid="+ puid);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -414,5 +418,23 @@ export function getBillList(data)
|
||||
return request.get("recharge/bill/record",data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 积分中心详情
|
||||
* */
|
||||
export function postIntegralUser() {
|
||||
return request.get("integral/user");
|
||||
}
|
||||
|
||||
/*
|
||||
* 立即提现 冻结期、冻结佣金、可提现佣金、最低可提现金额
|
||||
* */
|
||||
export function extractUser() {
|
||||
return request.get("extract/user");
|
||||
}
|
||||
|
||||
/*
|
||||
* 推广人统计页 推广人数(一级+二级)、一级人数、二级人数
|
||||
* */
|
||||
export function spreadPeoCount() {
|
||||
return request.get("spread/people/count");
|
||||
}
|
||||
@@ -10,8 +10,7 @@
|
||||
<button class='item grant' @click="setUserInfo">去授权</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<!-- <button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button> -->
|
||||
<button hover-class="none" @tap="getUserProfile" class='item grant'>微信登录</button>
|
||||
<button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -59,52 +58,6 @@
|
||||
this.setAuthStatus();
|
||||
},
|
||||
methods:{
|
||||
getUserProfile() {
|
||||
let self = this;
|
||||
uni.showLoading({
|
||||
title: '正在登录中'
|
||||
});
|
||||
Routine.getUserProfile()
|
||||
.then(res => {
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
self.getWxUser(code, res);
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
|
||||
getWxUser(code, res) {
|
||||
let self = this
|
||||
let userInfo = res.userInfo;
|
||||
userInfo.code = code;
|
||||
userInfo.spread_spid = app.globalData.spid; //获取推广人ID
|
||||
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
|
||||
userInfo.avatar = userInfo.userInfo.avatarUrl;
|
||||
userInfo.city = userInfo.userInfo.city;
|
||||
userInfo.country = userInfo.userInfo.country;
|
||||
userInfo.nickName = userInfo.userInfo.nickName;
|
||||
userInfo.province = userInfo.userInfo.province;
|
||||
userInfo.sex = userInfo.userInfo.gender;
|
||||
userInfo.type = 'routine'
|
||||
Routine.authUserInfo(code,userInfo).then(res=>{
|
||||
uni.hideLoading();
|
||||
this.$emit('authColse',false);
|
||||
this.$emit('onLoadFun',this.userInfo);
|
||||
}).catch(res=>{
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none',
|
||||
duration:2000
|
||||
});
|
||||
});
|
||||
},
|
||||
setAuthStatus(){
|
||||
Routine.authorize().then(res=>{
|
||||
if(res.islogin === false)
|
||||
@@ -118,7 +71,6 @@
|
||||
},
|
||||
getUserInfo(code){
|
||||
Routine.getUserInfo().then(res=>{
|
||||
console.log('res',res);
|
||||
let userInfo = res.userInfo
|
||||
userInfo.code = code;
|
||||
userInfo.spread_spid = app.globalData.spid;//获取推广人ID
|
||||
@@ -187,7 +139,7 @@
|
||||
.Popup .bottom .item{width:50%;height:80rpx;background-color:#eeeeee;text-align:center;line-height:80rpx;font-size:24rpx;color:#666;margin-top:54rpx;}
|
||||
.Popup .bottom .item.on{width: 100%}
|
||||
.flex{display:flex;}
|
||||
.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:#e93323;border-radius:0;padding:0;}
|
||||
.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:$theme-color;border-radius:0;padding:0;}
|
||||
.mask{position:fixed;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,0.65);z-index:310;}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -45,21 +45,26 @@
|
||||
isLog: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
//地址列表
|
||||
addressList: [],
|
||||
is_loading: true
|
||||
is_loading: true,
|
||||
addressList: []
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
tapAddress: function(e, addressid) {
|
||||
this.active = e;
|
||||
this.$emit('OnChangeAddress', addressid);
|
||||
let a = {};
|
||||
for (let i = 0, leng = this.addressList.length; i < leng; i++) {
|
||||
if (this.addressList[i].id == addressid) {
|
||||
a = this.addressList[i];
|
||||
}
|
||||
}
|
||||
this.$emit('OnChangeAddress', a);
|
||||
},
|
||||
close: function() {
|
||||
this.$emit('changeClose');
|
||||
@@ -79,14 +84,18 @@
|
||||
limit: 5
|
||||
}).then(res => {
|
||||
let addressList = res.data.list;
|
||||
that.$set(that, 'addressList', addressList);
|
||||
that.is_loading = false;
|
||||
let defaultAddress = {};
|
||||
//处理默认选中项
|
||||
if(!that.address.addressId) return;
|
||||
for (let i = 0, leng = addressList.length; i < leng; i++) {
|
||||
if (addressList[i].id == that.address.addressId) {
|
||||
that.active = i;
|
||||
defaultAddress = this.addressList[i];
|
||||
}
|
||||
}
|
||||
that.$set(that, 'addressList', addressList);
|
||||
that.is_loading = false;
|
||||
this.$emit('OnDefaultAddress', defaultAddress);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<view class="time" :style="justifyLeft">
|
||||
<text class="red" v-if="tipText">{{ tipText }}</text>
|
||||
<text class="styleAll" v-if="isDay === true">{{ day }}</text>
|
||||
<text class="timeTxt red" v-if="dayText">{{ dayText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""'>{{ hour }}</text>
|
||||
<text class="timeTxt red" v-if="hourText">{{ hourText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""'>{{ minute }}</text>
|
||||
<text class="timeTxt red" v-if="minuteText">{{ minuteText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""'>{{ second }}</text>
|
||||
<text class="timeTxt red" v-if="secondText">{{ secondText }}</text>
|
||||
<text class="" v-if="tipText">{{ tipText }}</text>
|
||||
<text class="styleAll p6" v-if="isDay === true" :style="{background:bgColor.bgColor,color:bgColor.Color}">{{ day }}{{bgColor.isDay?'天':''}}</text>
|
||||
<text class="timeTxt" v-if="dayText" :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ dayText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ hour }}</text>
|
||||
<text class="timeTxt" v-if="hourText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ hourText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ minute }}</text>
|
||||
<text class="timeTxt" v-if="minuteText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ minuteText }}</text>
|
||||
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ second }}</text>
|
||||
<text class="timeTxt" v-if="secondText">{{ secondText }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
isCol: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bgColor: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
@@ -112,7 +116,29 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.p6{
|
||||
padding: 0 8rpx;
|
||||
}
|
||||
.styleAll{
|
||||
/* color: #fff; */
|
||||
font-size: 24rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
/* padding: 0 6rpx; */
|
||||
}
|
||||
.timeTxt{
|
||||
text-align: center;
|
||||
/* width: 16rpx; */
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
.whit{
|
||||
color: #fff !important;
|
||||
}
|
||||
.time {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -124,13 +150,13 @@
|
||||
}
|
||||
|
||||
.timeCol {
|
||||
width: 40rpx;
|
||||
/* width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align:center;
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
font-size: 24rpx;
|
||||
font-size: 24rpx; */
|
||||
color: #E93323;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,110 +1,235 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class='coupon-list-window' :class='coupon.coupon==true?"on":""'>
|
||||
<view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view>
|
||||
<view class='coupon-list' v-if="coupon.list.length">
|
||||
<view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" @click="getCouponUser(index,item.id)" :key='index'>
|
||||
<view class='money acea-row row-column row-center-wrapper' :class='item.isUse?"moneyGray":""'>
|
||||
<view>¥<text class='num'>{{item.money?Number(item.money):''}}</text></view>
|
||||
<view class="pic-num">满{{item.minPrice}}元可用</view>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='condition line2'>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-if='item.useType===1'>通用</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-else-if='item.useType===3'>品类</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-else>商品</span>
|
||||
<span>{{item.name}}</span>
|
||||
<view v-if="!orderShow" class="nav acea-row row-around">
|
||||
<view :class="['acea-row', 'row-middle', type === 1 ? 'on' : '']" @click="setType(1)">通用券</view>
|
||||
<view :class="['acea-row', 'row-middle', type === 2 ? 'on' : '']" @click="setType(2)">商品券</view>
|
||||
<view :class="['acea-row', 'row-middle', type === 3 ? 'on' : '']" @click="setType(3)">品类券</view>
|
||||
</view>
|
||||
<!-- <view class="occupy" v-if="!orderShow"></view> -->
|
||||
<!-- <view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view> -->
|
||||
<view class='coupon-list' :style="{'margin-top':!orderShow?'0':'50rpx'}">
|
||||
<block v-if="coupon.list.length">
|
||||
<!-- <view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" :key='index'> -->
|
||||
<view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list"
|
||||
@click="getCouponUser(index,item.id)" :key='index'>
|
||||
<view class='money acea-row row-column row-center-wrapper' :class='item.isUse?"moneyGray":""'>
|
||||
<view>¥<text class='num'>{{item.money?Number(item.money):''}}</text></view>
|
||||
<view class="pic-num">满{{item.minPrice}}元可用</view>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='condition line2'>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-if='item.useType===1'>通用</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""'
|
||||
v-else-if='item.useType===3'>品类</span>
|
||||
<span class='line-title' :class='item.isUse?"gray":""' v-else>商品</span>
|
||||
<span>{{item.name}}</span>
|
||||
</view>
|
||||
<view class='data acea-row row-between-wrapper'>
|
||||
<view v-if="item.day>0">领取后{{item.day}}天内可用</view>
|
||||
<view v-else>
|
||||
{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}
|
||||
</view>
|
||||
<view class='bnt gray' v-if="item.isUse">{{item.use_title || '已领取'}}</view>
|
||||
<view class='bnt bg-color' v-else>{{coupon.statusTile || '立即领取'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='data acea-row row-between-wrapper'>
|
||||
<view v-if="item.day>0">领取后{{item.day}}天内可用</view>
|
||||
<view v-else>{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}</view>
|
||||
<view class='bnt gray' v-if="item.isUse">{{item.use_title || '已领取'}}</view>
|
||||
<view class='bnt bg-color' v-else>{{coupon.statusTile || '立即领取'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 无优惠券 -->
|
||||
<view class='pictrue' v-else><image src='../../static/images/noCoupon.png'></image></view>
|
||||
</block>
|
||||
<!-- 无优惠券 -->
|
||||
<view class='pictrue' v-else>
|
||||
<image src='../../static/images/noCoupon.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class='mask' catchtouchmove="true" :hidden='coupon.coupon==false' @click='close'></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { setCouponReceive } from '@/api/api.js';
|
||||
import {
|
||||
setCouponReceive
|
||||
} from '@/api/api.js';
|
||||
export default {
|
||||
props: {
|
||||
//打开状态 0=领取优惠券,1=使用优惠券
|
||||
openType: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
coupon: {
|
||||
type: Object,
|
||||
default: function(){
|
||||
return {};
|
||||
}
|
||||
}
|
||||
openType: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
coupon: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
//下单页面使用优惠券组件不展示tab切换页
|
||||
orderShow: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
type: 1
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
close: function () {
|
||||
this.$emit('ChangCouponsClone');
|
||||
},
|
||||
getCouponUser:function(index,id){
|
||||
let that = this;
|
||||
let list = that.coupon.list;
|
||||
if (list[index].isUse == true && this.openType==0) return true;
|
||||
switch (this.openType){
|
||||
case 0:
|
||||
//领取优惠券
|
||||
let ids = [];
|
||||
ids.push(id);
|
||||
setCouponReceive(id).then(res=>{
|
||||
that.$emit('ChangCouponsUseState', index);
|
||||
that.$util.Tips({title: "领取成功"});
|
||||
that.$emit('ChangCoupons', list[index]);
|
||||
})
|
||||
break;
|
||||
case 1:
|
||||
that.$emit('ChangCoupons',index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
close: function() {
|
||||
this.type = 1
|
||||
this.$emit('ChangCouponsClone');
|
||||
},
|
||||
getCouponUser: function(index, id) {
|
||||
let that = this;
|
||||
let list = that.coupon.list;
|
||||
if (list[index].isUse == true && this.openType == 0) return true;
|
||||
switch (this.openType) {
|
||||
case 0:
|
||||
//领取优惠券
|
||||
let ids = [];
|
||||
ids.push(id);
|
||||
setCouponReceive(id).then(res => {
|
||||
that.$emit('ChangCouponsUseState', index);
|
||||
that.$util.Tips({
|
||||
title: "领取成功"
|
||||
});
|
||||
that.$emit('ChangCoupons', list[index]);
|
||||
})
|
||||
break;
|
||||
case 1:
|
||||
that.$emit('ChangCoupons', index);
|
||||
break;
|
||||
}
|
||||
},
|
||||
setType: function(type) {
|
||||
this.type = type;
|
||||
this.$emit('tabCouponType', type);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.coupon-list-window{position:fixed;bottom:0;left:0;width:100%;background-color:#f5f5f5;border-radius:16rpx 16rpx 0 0;z-index:555;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);}
|
||||
.coupon-list-window.on{transform:translate3d(0,0,0);}
|
||||
.coupon-list-window .title{height:124rpx;width:100%;text-align:center;line-height:124rpx;font-size:32rpx;font-weight:bold;position:relative;}
|
||||
.coupon-list-window .title .iconfont{position:absolute;right:30rpx;top:50%;transform:translateY(-50%);font-size:35rpx;color:#8a8a8a;font-weight:normal;}
|
||||
.coupon-list-window .coupon-list{margin:0 0 50rpx 0;height:550rpx;overflow:auto;}
|
||||
.coupon-list-window .pictrue{width:414rpx;height:336rpx;margin:0 auto 50rpx auto;}
|
||||
.coupon-list-window .pictrue image{width:100%;height:100%;}
|
||||
.pic-num{color: #fff;font-size: 24rpx;}
|
||||
.line-title{
|
||||
width:90rpx;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
background:rgba(255,247,247,1);
|
||||
border:1px solid rgba(232,51,35,1);
|
||||
opacity:1;
|
||||
border-radius:20rpx;
|
||||
font-size:20rpx;
|
||||
color: #E83323;
|
||||
margin-right: 12rpx;
|
||||
.coupon-list-window {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
z-index: 555;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
}
|
||||
.line-title.gray{
|
||||
border-color:#BBB;
|
||||
color:#bbb;
|
||||
background-color:#F5F5F5;
|
||||
|
||||
.coupon-list-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.coupon-list-window .title {
|
||||
height: 124rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 124rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.coupon-list-window .title .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.coupon-list-window .coupon-list {
|
||||
margin: 0 0 30rpx 0;
|
||||
height: 823rpx;
|
||||
overflow: auto;
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.coupon-list-window .pictrue {
|
||||
width: 414rpx;
|
||||
height: 336rpx;
|
||||
margin: 208rpx auto;
|
||||
}
|
||||
|
||||
.coupon-list-window .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pic-num {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.line-title {
|
||||
width: 90rpx;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
background: rgba(255, 247, 247, 1);
|
||||
border: 1px solid rgba(232, 51, 35, 1);
|
||||
opacity: 1;
|
||||
border-radius: 20rpx;
|
||||
font-size: 20rpx;
|
||||
color: #E83323;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.line-title.gray {
|
||||
border-color: #BBB;
|
||||
color: #bbb;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.nav {
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
border-bottom: 2rpx solid #F5F5F5;
|
||||
border-top-left-radius: 16rpx;
|
||||
border-top-right-radius: 16rpx;
|
||||
background-color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.nav .acea-row {
|
||||
border-top: 5rpx solid transparent;
|
||||
border-bottom: 5rpx solid transparent;
|
||||
}
|
||||
|
||||
.nav .acea-row.on {
|
||||
border-bottom-color: #E93323;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.nav .acea-row:only-child {
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
|
||||
.occupy {
|
||||
height: 106rpx;
|
||||
}
|
||||
|
||||
.coupon-list .item {
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.coupon-list .item .money {
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 200rpx;
|
||||
padding-bottom: 60rpx;
|
||||
image{
|
||||
width: 414rpx;
|
||||
height: 240rpx;
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
border-radius: 50rpx;
|
||||
opacity: 0;
|
||||
height: 0;
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view v-if="isUp">
|
||||
<view class="mobile-bg" @click="close"></view>
|
||||
<view class="mobile-mask animated" :class="{slideInUp:isUp}">
|
||||
<view class="mobile-bg" v-if="isShow" @click="close"></view>
|
||||
<view class="mobile-mask animated" :class="{slideInUp:isUp}" :style="{position:isPos?'fixed':'static'}">
|
||||
<view class="input-item">
|
||||
<input type="text" v-model="account" placeholder="输入手机号" />
|
||||
</view>
|
||||
@@ -9,7 +9,7 @@
|
||||
<input type="text" v-model="codeNum" placeholder="输入验证码" />
|
||||
<button class="code" :disabled="disabled" @click="code">{{text}}</button>
|
||||
</view>
|
||||
<view class="sub_btn" @click="loginBtn">立即登录</view>
|
||||
<view class="sub_btn" @click="loginBtn">{{(!userInfo.phone && isLogin) || (userInfo.phone && isLogin)?'立即绑定':'立即登录'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -18,6 +18,7 @@
|
||||
const app = getApp();
|
||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import Routine from '@/libs/routine';
|
||||
import {mapGetters} from "vuex";
|
||||
import {
|
||||
loginMobile,
|
||||
registerVerify,
|
||||
@@ -26,32 +27,59 @@
|
||||
phoneSilenceAuth,
|
||||
phoneWxSilenceAuth
|
||||
} from "@/api/user";
|
||||
import { bindingPhone } from '@/api/api.js'
|
||||
import { getUserPhone } from '@/api/public';
|
||||
export default{
|
||||
name:'login_mobile',
|
||||
props:{
|
||||
isUp:{
|
||||
type:Boolean,
|
||||
default:false,
|
||||
import {
|
||||
bindingPhone
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
getUserPhone,
|
||||
iosBinding
|
||||
} from '@/api/public';
|
||||
const BACK_URL = "login_back_url";
|
||||
export default {
|
||||
name: 'login_mobile',
|
||||
computed: mapGetters(['userInfo','isLogin']),
|
||||
props: {
|
||||
isUp: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
authKey:{
|
||||
type:String,
|
||||
default:'',
|
||||
authKey: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isPos: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
appleShow: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
platform: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
data(){
|
||||
data() {
|
||||
return {
|
||||
keyCode:'',
|
||||
account:'',
|
||||
codeNum:''
|
||||
keyCode: '',
|
||||
account: '',
|
||||
codeNum: '',
|
||||
isApp: 0
|
||||
}
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
mounted() {
|
||||
//this.getCode();
|
||||
},
|
||||
methods:{
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 获取验证码
|
||||
async code() {
|
||||
let that = this;
|
||||
@@ -61,12 +89,14 @@
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
await registerVerify(that.account).then(res=>{
|
||||
that.$util.Tips({title:res.msg});
|
||||
await registerVerify(that.account).then(res => {
|
||||
that.$util.Tips({
|
||||
title: res.msg
|
||||
});
|
||||
that.sendCode();
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title:err
|
||||
title: err
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -81,11 +111,11 @@
|
||||
});
|
||||
});
|
||||
},
|
||||
close(){
|
||||
this.$emit('close',false)
|
||||
close() {
|
||||
this.$emit('close', false)
|
||||
},
|
||||
// 登录
|
||||
loginBtn(){
|
||||
loginBtn() {
|
||||
let that = this
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
@@ -99,47 +129,66 @@
|
||||
if (!/^[\w\d]+$/i.test(that.codeNum)) return that.$util.Tips({
|
||||
title: '请输入正确的验证码'
|
||||
});
|
||||
uni.showLoading({ title: '正在登录中' });
|
||||
getUserPhone({
|
||||
captcha: that.codeNum,
|
||||
phone: that.account,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
type: 'public',
|
||||
key: this.authKey
|
||||
}).then(res=>{
|
||||
let time = res.data.expires_time - this.$Cache.time();
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
});
|
||||
this.getUserInfo();
|
||||
}).catch(error=>{
|
||||
uni.hideLoading()
|
||||
this.$util.Tips({
|
||||
title:error
|
||||
uni.showLoading({
|
||||
title: !this.userInfo.phone && this.isLogin?'正在绑定中':'正在登录中'
|
||||
});
|
||||
if (!this.userInfo.phone && this.isLogin) {
|
||||
iosBinding({
|
||||
captcha: that.codeNum,
|
||||
phone: that.account
|
||||
}).then(res => {
|
||||
that.$util.Tips({
|
||||
title: '绑定手机号成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 3
|
||||
})
|
||||
that.isApp = 1;
|
||||
that.getUserInfo();
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
that.$util.Tips({
|
||||
title: error
|
||||
})
|
||||
})
|
||||
})
|
||||
} else {
|
||||
getUserPhone({
|
||||
captcha: that.codeNum,
|
||||
phone: that.account,
|
||||
// #ifdef H5
|
||||
type: 'public',
|
||||
// #endif
|
||||
key: that.authKey
|
||||
}).then(res => {
|
||||
that.$store.commit('LOGIN', {
|
||||
token: res.data.token
|
||||
});
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
that.getUserInfo();
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
that.$util.Tips({
|
||||
title: error
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// #ifdef MP
|
||||
phoneSilenceAuth(code){
|
||||
phoneSilenceAuth(code) {
|
||||
let self = this
|
||||
phoneSilenceAuth({
|
||||
code:code,
|
||||
code: code,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
phone:this.account,
|
||||
captcha:this.codeNum
|
||||
}).then(res=>{
|
||||
let time = res.data.expires_time - this.$Cache.time();
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
});
|
||||
phone: this.account,
|
||||
captcha: this.codeNum
|
||||
}).then(res => {
|
||||
this.$store.commit('LOGIN', res.data.token);
|
||||
this.$store.commit("SETUID", res.data.uid);
|
||||
this.getUserInfo();
|
||||
}).catch(error=>{
|
||||
}).catch(error => {
|
||||
self.$util.Tips({
|
||||
title:error
|
||||
title: error
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -151,52 +200,56 @@
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
uni.hideLoading();
|
||||
that.userInfo = res.data
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
that.$store.commit("UPDATE_USERINFO", res.data);
|
||||
// #ifdef MP
|
||||
// #ifdef MP
|
||||
that.$util.Tips({
|
||||
title:'登录成功',
|
||||
icon:'success'
|
||||
},{
|
||||
tab:3
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 3
|
||||
})
|
||||
that.close()
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
that.$emit('wechatPhone',true)
|
||||
that.$emit('wechatPhone', true)
|
||||
// #endif
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
.mobile-bg{
|
||||
<style lang="stylus" scoped>
|
||||
.mobile-bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.isPos {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.mobile-mask {
|
||||
z-index: 20;
|
||||
position: fixed;
|
||||
// position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 67rpx 30rpx;
|
||||
background: #fff;
|
||||
.input-item{
|
||||
|
||||
.input-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
margin-bottom: 38rpx;
|
||||
input{
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
display: block;
|
||||
height: 100%;
|
||||
@@ -204,7 +257,8 @@
|
||||
border-radius: 43rpx;
|
||||
border: 1px solid #DCDCDC;
|
||||
}
|
||||
.code{
|
||||
|
||||
.code {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -213,15 +267,17 @@
|
||||
margin-left: 30rpx;
|
||||
background: rgba(233, 51, 35, 0.05);
|
||||
font-size: 28rpx;
|
||||
color: #E93323;
|
||||
color: $theme-color;
|
||||
border-radius: 43rpx;
|
||||
&[disabled]{
|
||||
|
||||
&[disabled] {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.sub_btn{
|
||||
|
||||
.sub_btn {
|
||||
width: 690rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
@@ -233,7 +289,8 @@
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.animated{
|
||||
animation-duration:.4s
|
||||
|
||||
.animated {
|
||||
animation-duration: .4s
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
getCodeApi,
|
||||
getUserInfo
|
||||
} from "@/api/user";
|
||||
import { getLogo, silenceAuth, getUserPhone } from '@/api/public';
|
||||
import { getLogo, getUserPhone } from '@/api/public';
|
||||
export default{
|
||||
name:'routine_phone',
|
||||
props:{
|
||||
@@ -51,7 +51,6 @@
|
||||
// #ifdef MP
|
||||
// 小程序获取手机号码
|
||||
getphonenumber(e){
|
||||
console.log(e)
|
||||
uni.showLoading({ title: '加载中' });
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
@@ -67,22 +66,21 @@
|
||||
encryptedData: encryptedData,
|
||||
iv: iv,
|
||||
code: code,
|
||||
spid: app.globalData.spid,
|
||||
spread: app.globalData.code,
|
||||
key:this.authKey,
|
||||
type: 'routine'
|
||||
})
|
||||
.then(res => {
|
||||
let time = res.data.expires_time - this.$Cache.time();
|
||||
this.$store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
token: res.data.token
|
||||
});
|
||||
this.$store.commit("SETUID", res.data.uid);
|
||||
this.getUserInfo();
|
||||
})
|
||||
.catch(res => {
|
||||
console.log(res);
|
||||
uni.hideLoading();
|
||||
this.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
@@ -93,7 +91,6 @@
|
||||
getUserInfo().then(res => {
|
||||
uni.hideLoading();
|
||||
that.userInfo = res.data
|
||||
that.$store.commit("SETUID", res.data.uid);
|
||||
that.$store.commit("UPDATE_USERINFO", res.data);
|
||||
that.isStatus = true
|
||||
this.close()
|
||||
@@ -150,7 +147,7 @@
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
margin-top: 60rpx;
|
||||
background: #E93323;
|
||||
background: $theme-color;
|
||||
border-radius: 43rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
<template>
|
||||
<view class="orderGoods">
|
||||
<view class='total'>共{{totalNmu}}件商品</view>
|
||||
<view class='goodWrapper'>
|
||||
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index" @click="jumpCon(item.productId)">
|
||||
<view class="orderGoods borRadius14">
|
||||
<view class='total'>共{{ orderProNum?orderProNum:totalNmu}}件商品</view>
|
||||
<view class='goodWrapper pad30'>
|
||||
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index"
|
||||
@click="jumpCon(item.productId)">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.productInfo.attrInfo.image' v-if="item.productInfo.attrInfo"></image>
|
||||
<image :src='item.productInfo.image' v-else></image>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='acea-row row-between-wrapper'>
|
||||
<view class='name line1'>{{item.productInfo.storeName}}</view>
|
||||
<view class='num'>x {{item.cartNum}}</view>
|
||||
<view class='name line1'>{{item.productName ? item.productName : item.storeName}}</view>
|
||||
<view class='num'>x {{item.payNum ? item.payNum : item.cartNum}}</view>
|
||||
</view>
|
||||
<view class='attr line1' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.suk}}</view>
|
||||
<view class='money font-color' v-if="item.productInfo.attrInfo">¥{{item.productInfo.attrInfo.price}}</view>
|
||||
<view class='money font-color' v-else>¥{{item.productInfo.price}}</view>
|
||||
<view class='evaluate' v-if='item.isReply==0 && evaluate==3' @click.stop="evaluateTap(item.productAttrUnique,orderId,ids)">评价</view>
|
||||
<view class='evaluate' v-else-if="item.isReply==1 && evaluate==3">已评价</view>
|
||||
<view class='attr line1' v-if="item.sku">{{item.sku}}</view>
|
||||
<view class='money font-color'>¥{{item.price}}</view>
|
||||
<view class='evaluate' v-if='item.isReply==0 && evaluate==2' @click.stop="evaluateTap(item)">评价
|
||||
</view>
|
||||
<view class='evaluate' v-else-if="item.isReply==1">已评价</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -47,32 +48,45 @@
|
||||
jump: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
orderProNum: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
productType: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
totalNmu:''
|
||||
totalNmu: ''
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
cartInfo:function(nVal,oVal){
|
||||
watch: {
|
||||
cartInfo: function(nVal, oVal) {
|
||||
let num = 0
|
||||
nVal.forEach((item,index)=>{
|
||||
nVal.forEach((item, index) => {
|
||||
num += item.cartNum
|
||||
})
|
||||
this.totalNmu = num
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
evaluateTap:function(unique,orderId,ids){
|
||||
evaluateTap(item) {
|
||||
uni.navigateTo({
|
||||
url:"/pages/users/goods_comment_con/index?unique="+unique+"&uni="+orderId + "&id=" + ids
|
||||
url: "/pages/users/goods_comment_con/index?unique=" + item.attrId + "&orderId=" + this.orderId + '&id=' + this.ids
|
||||
})
|
||||
},
|
||||
jumpCon:function(id){
|
||||
if(this.jump){
|
||||
jumpCon: function(id) {
|
||||
let type = this.productType==0?'normal':'video'
|
||||
if (this.jump) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${id}`
|
||||
url: `/pages/goods_details/index?id=${id}&type=${type}`
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -83,20 +97,21 @@
|
||||
<style scoped lang="scss">
|
||||
.orderGoods {
|
||||
background-color: #fff;
|
||||
margin-top: 12rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
.orderGoods .total {
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
padding: 0 30rpx;
|
||||
padding: 0 24rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
line-height: 86rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.pictrue image{
|
||||
|
||||
.pictrue image {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<view class="title acea-row row-center-wrapper">
|
||||
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode"
|
||||
:key="index">
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
|
||||
v-for="(item,index) in payMode" :key="index">
|
||||
<view class="left acea-row row-between-wrapper">
|
||||
<view class="iconfont" :class="item.icon"></view>
|
||||
<view class="text">
|
||||
@@ -26,8 +26,12 @@
|
||||
<script>
|
||||
import {
|
||||
orderPay,
|
||||
wechatOrderPay
|
||||
wechatOrderPay,
|
||||
wechatQueryPayResult
|
||||
} from '@/api/order.js';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
props: {
|
||||
payMode: {
|
||||
@@ -54,6 +58,7 @@
|
||||
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['systemPlatform']),
|
||||
methods: {
|
||||
close: function() {
|
||||
this.$emit('onChangeFun', {
|
||||
@@ -71,18 +76,19 @@
|
||||
});
|
||||
uni.showLoading({
|
||||
title: '支付中'
|
||||
});
|
||||
});
|
||||
wechatOrderPay({
|
||||
orderNo: that.order_id,
|
||||
// #ifdef MP
|
||||
payChannel: 'routine',
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS
|
||||
// #ifdef H5
|
||||
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
|
||||
// #endif
|
||||
payType: paytype
|
||||
}).then(res => {
|
||||
let jsConfig = res.data.jsConfig;
|
||||
that.order_id = res.data.orderNo;
|
||||
switch (res.data.payType) {
|
||||
case 'weixin':
|
||||
// #ifdef MP
|
||||
@@ -94,14 +100,22 @@
|
||||
paySign: jsConfig.paySign,
|
||||
success: function(ress) {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
wechatQueryPayResult(that.order_id).then(res => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: "支付成功",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
});
|
||||
}).cache(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
},
|
||||
fail: function(e) {
|
||||
uni.hideLoading();
|
||||
@@ -115,13 +129,14 @@
|
||||
},
|
||||
complete: function(e) {
|
||||
uni.hideLoading();
|
||||
if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_fail'
|
||||
if (e.errMsg == 'requestPayment:cancel') return that.$util
|
||||
.Tips({
|
||||
title: '取消支付'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_fail'
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
})
|
||||
// #endif
|
||||
@@ -135,13 +150,13 @@
|
||||
};
|
||||
that.$wechat.pay(datas).then(res => {
|
||||
if (res.errMsg == 'chooseWXPay:cancel') {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: '支付失败'
|
||||
});
|
||||
} else {
|
||||
wechatQueryPayResult({
|
||||
orderNo: that.order_id
|
||||
}).then(res => {
|
||||
wechatQueryPayResult(that.order_id).then(res => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: "支付成功",
|
||||
icon: 'success'
|
||||
@@ -150,13 +165,19 @@
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
}).cache(errW => {
|
||||
}).cache(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: errW
|
||||
title: err
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
}).cache(errW => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: errW
|
||||
});
|
||||
})
|
||||
// #endif
|
||||
break;
|
||||
@@ -171,18 +192,19 @@
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host + goPages + '&status=1');
|
||||
return that.$util.Tips({
|
||||
title: "支付中",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol +
|
||||
'//' + window.location.host + goPages + '&status=1');
|
||||
return that.$util.Tips({
|
||||
title: "支付中",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
|
||||
@@ -1,89 +1,149 @@
|
||||
<template>
|
||||
<!-- <view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots"
|
||||
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change">
|
||||
<block v-for="(item,index) in imgUrls" :key="index">
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image"/>
|
||||
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view class='pages'>{{currents}}/{{imgUrls.length || 1}}</view>
|
||||
</view> -->
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323"
|
||||
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change">
|
||||
<swiper-item v-if="videoline">
|
||||
<view class="item">
|
||||
<video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% " show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"></video>
|
||||
<view class="poster" v-if="controls">
|
||||
<image class="image" :src="imgUrls[0]"></image>
|
||||
</view>
|
||||
<view class="stop" v-if="controls" @tap="bindPause">
|
||||
<image class="image" src="../../static/images/stop.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image"/>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
|
||||
:circular="circular" :interval="interval" :duration="duration" @change="change">
|
||||
|
||||
<swiper-item v-if="videoline">
|
||||
<view class="item">
|
||||
<view v-show="!controls" style="width:100%;height:100% ">
|
||||
<video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% "
|
||||
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"
|
||||
:enable-progress-gesture="false" :poster="imgUrls[0]" @pause="videoPause"></video>
|
||||
</view>
|
||||
<view class="poster" v-show="controls">
|
||||
<image class="image" :src="imgUrls[0]"></image>
|
||||
</view>
|
||||
<view class="stop" v-show="controls" @tap="bindPause">
|
||||
<image class="image" src="../../static/images/stop.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image" />
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
imgUrls: {
|
||||
type: Array,
|
||||
default: function(){
|
||||
return [];
|
||||
}
|
||||
},
|
||||
videoline:
|
||||
{
|
||||
type:String,
|
||||
value:""
|
||||
}
|
||||
imgUrls: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
videoline: {
|
||||
type: String,
|
||||
value: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
indicatorDots: true,
|
||||
circular: true,
|
||||
autoplay: false,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
currents: "1",
|
||||
controls:true
|
||||
indicatorDots: true,
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
currents: "1",
|
||||
controls: true,
|
||||
isPlay:true,
|
||||
videoContext:''
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
//this.videoContext = uni.createVideoContext('myVideo',this);
|
||||
mounted() {
|
||||
if(this.videoline){
|
||||
this.imgUrls.shift()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindPause:function(){
|
||||
this.videoContext.play();
|
||||
this.$set(this,'controls',false)
|
||||
},
|
||||
change: function (e) {
|
||||
this.$set(this,'currents',e.detail.current + 1);
|
||||
}
|
||||
videoPause(e){
|
||||
},
|
||||
bindPause: function() {
|
||||
this.videoContext.play();
|
||||
this.$set(this, 'controls', false)
|
||||
this.autoplay = false
|
||||
},
|
||||
change: function(e) {
|
||||
this.$set(this, 'currents', e.detail.current + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.product-bg{width:100%;height:750rpx;position:relative;}
|
||||
.product-bg swiper{width:100%;height:100%;position:relative;}
|
||||
.product-bg .slide-image{width:100%;height:100%;}
|
||||
.product-bg .pages{position:absolute;background-color:#fff;height:34rpx;padding:0 10rpx;border-radius:3rpx;right:30rpx;bottom:30rpx;line-height:34rpx;font-size:24rpx;color:#050505;}
|
||||
#myVideo{width: 100%;height: 100%}
|
||||
.product-bg .item{position:relative;width:100%;height:100%;}
|
||||
.product-bg .item .poster{position:absolute;top:0;left:0;height:750rpx;width:100%;z-index:9;}
|
||||
.product-bg .item .poster .image{width:100%;height:100%;}
|
||||
.product-bg .item .stop{position:absolute;top:50%;left:50%;width:136rpx;height:136rpx;margin-top:-68rpx;margin-left:-68rpx;z-index:9;}
|
||||
.product-bg .item .stop .image{width:100%;height:100%;}
|
||||
.product-bg {
|
||||
width: 100%;
|
||||
height: 750rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg .slide-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .pages {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
height: 34rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 3rpx;
|
||||
right: 30rpx;
|
||||
bottom: 30rpx;
|
||||
line-height: 34rpx;
|
||||
font-size: 24rpx;
|
||||
color: #050505;
|
||||
}
|
||||
|
||||
#myVideo {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.product-bg .item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .poster {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 750rpx;
|
||||
width: 100%;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .poster .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.product-bg .item .stop {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
margin-top: -68rpx;
|
||||
margin-left: -68rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.product-bg .item .stop .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="product-window" :class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
|
||||
<view class="product-window"
|
||||
:class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
|
||||
<view class="textpic acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="attr.productSelect.image"></image>
|
||||
@@ -12,7 +13,7 @@
|
||||
<view class="money font-color">
|
||||
¥<text class="num">{{ attr.productSelect.price }}</text>
|
||||
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quotaShow}}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
|
||||
@@ -22,9 +23,10 @@
|
||||
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
|
||||
<view class="title">{{ item.attrName }}</view>
|
||||
<view class="listn acea-row row-middle">
|
||||
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attrValue"
|
||||
@click="tapAttr(indexw, indexn)" :key="indexn">
|
||||
{{ itemn.attr }}
|
||||
<view class="itemn" :class="item.index === itemn ? 'on' : ''"
|
||||
v-for="(itemn, indexn) in item.attrValues" @click="tapAttr(indexw, indexn)"
|
||||
:key="indexn">
|
||||
{{ itemn }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -32,26 +34,32 @@
|
||||
<view class="cart acea-row row-between-wrapper">
|
||||
<view class="title">数量</view>
|
||||
<view class="carnum acea-row row-left">
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''"
|
||||
@click="CartNumDes">
|
||||
-
|
||||
</view>
|
||||
<view class='item num'>
|
||||
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)"></input>
|
||||
<input type="number" v-model="attr.productSelect.cart_num"
|
||||
data-name="productSelect.cart_num"
|
||||
@input="bindCode(attr.productSelect.cart_num)"></input>
|
||||
</view>
|
||||
<view v-if="iSplus" class="item plus" :class="
|
||||
attr.productSelect.cart_num >= attr.productSelect.stock
|
||||
? 'on'
|
||||
: ''
|
||||
"
|
||||
@click="CartNumAdd">
|
||||
" @click="CartNumAdd">
|
||||
+
|
||||
</view>
|
||||
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""' @click='CartNumAdd'>+</view>
|
||||
<view v-else class='item plus'
|
||||
:class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""'
|
||||
@click='CartNumAdd'>+</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0" @click="goCat">我要参团</view>
|
||||
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
|
||||
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0"
|
||||
@click="goCat">我要参团</view>
|
||||
<view class="joinBnt on"
|
||||
v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
|
||||
<view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">确定</view>
|
||||
<!-- <view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock && attr.productSelect.quota" @click="goCat">确定</view> -->
|
||||
<view class="joinBnt on" v-else-if="(iScart && !attr.productSelect.stock)">已售罄</view>
|
||||
@@ -68,43 +76,42 @@
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
limitNum:{
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
isShow:{
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSbnt:{
|
||||
type:Number,
|
||||
value:0
|
||||
},
|
||||
iSplus:{
|
||||
type:Number,
|
||||
value:0
|
||||
},
|
||||
iScart:{
|
||||
type:Number,
|
||||
value:0
|
||||
}
|
||||
limitNum: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
isShow: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSbnt: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iSplus: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iScart: {
|
||||
type: Number,
|
||||
value: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
goCat:function(){
|
||||
this.$emit('goCat');
|
||||
},
|
||||
/**
|
||||
* 购物车手动输入数量
|
||||
*
|
||||
*/
|
||||
bindCode: function (e) {
|
||||
this.$emit('iptCartNum', this.attr.productSelect.cart_num);
|
||||
},
|
||||
goCat: function() {
|
||||
this.$emit('goCat');
|
||||
},
|
||||
/**
|
||||
* 购物车手动输入数量
|
||||
*
|
||||
*/
|
||||
bindCode: function(e) {
|
||||
this.$emit('iptCartNum', this.attr.productSelect.cart_num);
|
||||
},
|
||||
closeAttr: function() {
|
||||
this.$emit('myevent');
|
||||
},
|
||||
@@ -158,55 +165,57 @@
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
}
|
||||
|
||||
|
||||
.product-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.product-window.join{padding-bottom: 30rpx;}
|
||||
|
||||
.product-window.joinCart{
|
||||
|
||||
.product-window.join {
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.product-window.joinCart {
|
||||
padding-bottom: 30rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic {
|
||||
padding: 0 130rpx 0 30rpx;
|
||||
margin-top: 29rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .pictrue {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text {
|
||||
width: 410rpx;
|
||||
font-size: 32rpx;
|
||||
color: #202020;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money {
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money .num {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money .stock {
|
||||
color: #999;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
@@ -214,63 +223,63 @@
|
||||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
|
||||
.product-window .rollTop{
|
||||
|
||||
.product-window .rollTop {
|
||||
max-height: 500rpx;
|
||||
overflow: auto;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item~.item {
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn {
|
||||
padding: 0 30rpx 0 16rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn {
|
||||
border: 1px solid #F2F2F2;
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
padding: 7rpx 33rpx;
|
||||
border-radius: 25rpx;
|
||||
border-radius: 40rpx;
|
||||
margin: 20rpx 0 0 14rpx;
|
||||
background-color: #F2F2F2;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.on {
|
||||
color: #E93323;
|
||||
background:rgba(255,244,243,1);
|
||||
border-color: #E93323;
|
||||
color: $theme-color;
|
||||
background: rgba(255, 244, 243, 1);
|
||||
border-color: $theme-color;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.limit {
|
||||
color: #999;
|
||||
text-decoration:line-through;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart {
|
||||
margin-top: 36rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum {
|
||||
height: 54rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum view {
|
||||
// border: 1px solid #a4a4a4;
|
||||
width: 84rpx;
|
||||
@@ -280,35 +289,56 @@
|
||||
color: #282828;
|
||||
font-size: 45rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .reduce {
|
||||
border-right: 0;
|
||||
border-radius: 6rpx 0 0 6rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .reduce.on {
|
||||
// border-color: #e3e3e3;
|
||||
color: #DEDEDE;
|
||||
font-size: 60rpx;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .plus {
|
||||
border-left: 0;
|
||||
border-radius: 0 6rpx 6rpx 0;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .plus.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .num {
|
||||
background:rgba(242,242,242,1);
|
||||
background: rgba(242, 242, 242, 1);
|
||||
color: #282828;
|
||||
font-size: 28rpx;
|
||||
border-radius: 12rpx;
|
||||
line-height: 29px;
|
||||
height: 54rpx;
|
||||
|
||||
input {
|
||||
display: -webkit-inline-box;
|
||||
}
|
||||
}
|
||||
.product-window .joinBnt{font-size: 30rpx;width: 620rpx;height: 86rpx;border-radius: 50rpx;text-align: center;line-height: 86rpx;color: #fff;margin: 21rpx auto 0 auto;}
|
||||
.product-window .joinBnt.on{background-color:#bbb;color:#fff;}
|
||||
</style>
|
||||
|
||||
.product-window .joinBnt {
|
||||
font-size: 30rpx;
|
||||
width: 620rpx;
|
||||
height: 86rpx;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 86rpx;
|
||||
color: #fff;
|
||||
margin: 21rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.product-window .joinBnt.on {
|
||||
background-color: #bbb;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
.recommend .title {
|
||||
height: 135rpx;
|
||||
line-height: 135rpx;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
}
|
||||
@@ -96,7 +97,7 @@
|
||||
.recommend .recommendList .item .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.recommend .recommendList .item .name {
|
||||
@@ -108,6 +109,7 @@
|
||||
.recommend .recommendList .item .money {
|
||||
font-size: 20rpx;
|
||||
margin-top: 8rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.recommend .recommendList .item .money .num {
|
||||
|
||||
@@ -48,5 +48,5 @@
|
||||
.swiper swiper .slide-image{width:100%;height:100%;}
|
||||
.swiper .dots{position:absolute;right:40rpx;bottom:20rpx;}
|
||||
.swiper .dots .dot{width:12rpx;height:12rpx;border:2rpx solid #fff;border-radius:50%;margin-right:15rpx;}
|
||||
.swiper .dots .dot.active{border-color:#e93323;background-color:#e93323;}
|
||||
.swiper .dots .dot.active{border-color:$theme-color;background-color:$theme-color;}
|
||||
</style>
|
||||
|
||||
@@ -1,33 +1,36 @@
|
||||
<template>
|
||||
<!-- v-if="reply.length>0" -->
|
||||
<view class="evaluateWtapper">
|
||||
<view class="evaluateItem" v-for="(item, indexw) in reply" :key="indexw">
|
||||
<view class="pic-text acea-row row-middle">
|
||||
<view class="pic-text acea-row">
|
||||
<view class="pictrue">
|
||||
<image :src="item.avatar"></image>
|
||||
</view>
|
||||
<view class="acea-row row-between-wrapper" style="width: 87%;">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="name line1">{{ item.nickname }}</view>
|
||||
<view class="start" :class="'star' + item.productScore"></view>
|
||||
<view class="content">
|
||||
<view>
|
||||
<view class="acea-row row-between">
|
||||
<view class="acea-row">
|
||||
<view class="name line1">{{ item.nickname }}</view>
|
||||
<view class="start" :class="'star' + item.score"></view>
|
||||
</view>
|
||||
<view class="time">{{ item.createTime }}</view>
|
||||
</view>
|
||||
<view class="sku">规格:{{ item.sku?item.sku:'无' }}</view>
|
||||
</view>
|
||||
|
||||
<view class="evaluate-infor">{{ item.comment }}</view>
|
||||
<view class="imgList acea-row" v-if="item.pics && item.pics.length && item.pics[0]">
|
||||
<view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
|
||||
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply" v-if="item.merchantReplyContent">
|
||||
<text class="font-color">店小二</text>:{{ item.merchantReplyContent }}
|
||||
</view>
|
||||
<view class="time">{{ item.createTime }}</view>
|
||||
<!-- <view class="time">{{ item.createTime }}</view>
|
||||
<view class="time">{{ item.suk }}</view> -->
|
||||
<!-- <view class="time">{{ item.createTime }} {{ item.sku }}</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="time">规格:{{ item.sku?item.sku:'无' }}</view>
|
||||
<view class="evaluate-infor">{{ item.comment }}</view>
|
||||
<view class="imgList acea-row" v-if="item.pics.length && item.pics[0]">
|
||||
<view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
|
||||
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply" v-if="item.merchantReplyContent">
|
||||
<text class="font-color">店小二</text>:{{
|
||||
item.merchantReplyContent
|
||||
}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -55,7 +58,9 @@
|
||||
<style scoped lang='scss'>
|
||||
.evaluateWtapper .evaluateItem {
|
||||
background-color: #fff;
|
||||
padding-bottom: 25rpx;
|
||||
padding: 24rpx;
|
||||
border-bottom-left-radius: 14rpx;
|
||||
border-bottom-right-radius: 14rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem~.evaluateItem {
|
||||
@@ -65,14 +70,15 @@
|
||||
.evaluateWtapper .evaluateItem .pic-text {
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
height: 95rpx;
|
||||
padding: 0 30rpx;
|
||||
.content{
|
||||
width: 84%;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .pic-text .pictrue {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 20rpx;
|
||||
width: 62rpx;
|
||||
height: 62rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .pic-text .pictrue image {
|
||||
@@ -87,40 +93,47 @@
|
||||
|
||||
.evaluateWtapper .evaluateItem .time {
|
||||
font-size: 24rpx;
|
||||
color: #82848f;
|
||||
padding: 0 30rpx;
|
||||
color: #999999;
|
||||
|
||||
}
|
||||
.sku{
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .evaluate-infor {
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
margin-top: 19rpx;
|
||||
padding: 0 30rpx;
|
||||
color: #333;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .imgList {
|
||||
padding: 0 30rpx 0 15rpx;
|
||||
margin-top: 25rpx;
|
||||
.evaluateWtapper .evaluateItem .imgList {/*
|
||||
padding: 0 24rpx;
|
||||
margin-top: 16rpx; */
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .imgList .pictrue {
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
margin: 0 0 15rpx 15rpx;
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
margin-right: 14rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 16rpx;
|
||||
/* margin: 0 0 15rpx 15rpx; */
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .imgList .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem .reply {
|
||||
font-size: 26rpx;
|
||||
color: #454545;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 5rpx;
|
||||
margin: 20rpx 30rpx 0 30rpx;
|
||||
border-radius: 14rpx;
|
||||
margin: 20rpx 30rpx 0 0rpx;
|
||||
padding: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@ let domain = 'http://127.0.0.1:8080'
|
||||
module.exports = {
|
||||
// 请求域名 格式: https://您的域名
|
||||
// #ifdef MP
|
||||
// HTTP_REQUEST_URL:'',
|
||||
HTTP_REQUEST_URL:domain,
|
||||
HTTP_REQUEST_URL: domain,
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
//H5接口是浏览器地址
|
||||
// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,
|
||||
// http://api.java.crmeb.net:20001
|
||||
HTTP_REQUEST_URL:domain,
|
||||
// #endif
|
||||
|
||||
|
||||
@@ -29,4 +29,6 @@ module.exports = {
|
||||
CACHE_LONGITUDE: 'LONGITUDE',
|
||||
//缓存纬度
|
||||
CACHE_LATITUDE: 'LATITUDE',
|
||||
//app手机信息
|
||||
PLATFORM: 'systemPlatform'
|
||||
}
|
||||
24
app/libs/apps.js
Normal file
24
app/libs/apps.js
Normal 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();
|
||||
@@ -1,11 +1,12 @@
|
||||
import store from "../store";
|
||||
import Cache from '../utils/cache';
|
||||
// #ifdef H5 || APP-PLUS
|
||||
import { Debounce } from '@/utils/validate.js'
|
||||
// #ifdef H5
|
||||
import { isWeixin } from "../utils";
|
||||
import auth from './wechat';
|
||||
// #endif
|
||||
|
||||
import { LOGIN_STATUS, USER_INFO, EXPIRES_TIME, STATE_R_KEY} from './../config/cache';
|
||||
import { LOGIN_STATUS, USER_INFO, EXPIRES_TIME, STATE_R_KEY, BACK_URL} from './../config/cache';
|
||||
|
||||
function prePage(){
|
||||
let pages = getCurrentPages();
|
||||
@@ -13,28 +14,55 @@ function prePage(){
|
||||
return prePage.route;
|
||||
}
|
||||
|
||||
export function toLogin(push, pathLogin) {
|
||||
export const toLogin = Debounce(_toLogin,800)
|
||||
|
||||
export function _toLogin(push, pathLogin) {
|
||||
|
||||
store.commit("LOGOUT");
|
||||
let path = prePage();
|
||||
let login_back_url = Cache.get(BACK_URL);
|
||||
// #ifdef H5
|
||||
path = location.href;
|
||||
// path = location.href;
|
||||
path = location.pathname + location.search;
|
||||
// #endif
|
||||
if(!pathLogin)
|
||||
if(!pathLogin){
|
||||
pathLogin = '/page/users/login/index'
|
||||
Cache.set('login_back_url',path);
|
||||
// #ifdef H5 || APP-PLUS
|
||||
Cache.set('login_back_url',path);
|
||||
}
|
||||
|
||||
// #ifdef H5
|
||||
if (isWeixin()) {
|
||||
auth.oAuth();
|
||||
let urlData = location.pathname + location.search
|
||||
if (urlData.indexOf('?') !== -1) {
|
||||
urlData += '&go_longin=1';
|
||||
} else {
|
||||
urlData += '?go_longin=1';
|
||||
}
|
||||
if (!Cache.has('snsapiKey')) {
|
||||
auth.oAuth('snsapi_base', urlData);
|
||||
} else {
|
||||
if (['/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/wechat_login/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (path !== pathLogin) {
|
||||
push ? uni.navigateTo({
|
||||
url:'/pages/users/login/index'
|
||||
}) : uni.reLaunch({
|
||||
url: '/pages/users/login/index'
|
||||
});
|
||||
if (['/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
if (['pages/user/index','/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
// #ifdef MP
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/wechat_login/index'
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,4 +86,4 @@ export function checkLogin()
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
export function goShopDetail(item,uid) {
|
||||
import {
|
||||
preOrderApi
|
||||
} from '@/api/order.js';
|
||||
import util from 'utils/util'
|
||||
|
||||
/**
|
||||
* 去商品详情
|
||||
*/
|
||||
export function goShopDetail(item, uid) {
|
||||
return new Promise(resolve => {
|
||||
if (item.activityH5 && item.activityH5.type === "1") {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}&time=${item.activityH5.time}&status=2`
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}`
|
||||
})
|
||||
} else if (item.activityH5 && item.activityH5.type === "2") {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&bargain=${uid}`
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&startBargainUid=${uid}`
|
||||
})
|
||||
} else if (item.activityH5 && item.activityH5.type === "3") {
|
||||
uni.navigateTo({
|
||||
@@ -17,3 +25,23 @@ export function goShopDetail(item,uid) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 活动商品、普通商品、购物车、再次购买预下单
|
||||
*/
|
||||
export function getPreOrder(preOrderType, orderDetails) {
|
||||
return new Promise((resolve, reject) => {
|
||||
preOrderApi({
|
||||
"preOrderType": preOrderType,
|
||||
"orderDetails": orderDetails
|
||||
}).then(res => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?preOrderNo=' + res.data.preOrderNo
|
||||
});
|
||||
}).catch(err => {
|
||||
return util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import { checkLogin } from './login';
|
||||
import { login } from '../api/public';
|
||||
import Cache from '../utils/cache';
|
||||
import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS} from './../config/cache';
|
||||
|
||||
class Routine
|
||||
{
|
||||
|
||||
@@ -25,16 +24,6 @@ class Routine
|
||||
getUserProfile(){
|
||||
let that = this , code = this.getUserCode();
|
||||
return new Promise( (resolve,reject) => {
|
||||
// uni.getUserInfo({
|
||||
// lang: 'zh_CN',
|
||||
// success(user) {
|
||||
// if(code) user.code = code;
|
||||
// resolve({userInfo:user,islogin:false});
|
||||
// },
|
||||
// fail(res){
|
||||
// reject(res);
|
||||
// }
|
||||
// })
|
||||
uni.getUserProfile({
|
||||
lang: 'zh_CN',
|
||||
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
||||
@@ -76,9 +65,6 @@ class Routine
|
||||
async getCode(){
|
||||
let provider = await this.getProvider();
|
||||
return new Promise((resolve,reject)=>{
|
||||
if(Cache.has(STATE_R_KEY)){
|
||||
return resolve(Cache.get(STATE_R_KEY));
|
||||
}
|
||||
uni.login({
|
||||
provider:provider,
|
||||
success(res) {
|
||||
@@ -130,17 +116,19 @@ class Routine
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序登录
|
||||
*/
|
||||
authUserInfo(code,data)
|
||||
{
|
||||
return new Promise((resolve, reject)=>{
|
||||
login(code,data).then(res=>{
|
||||
// let time = res.data.expiresTime - Cache.time();
|
||||
store.commit('UPDATE_USERINFO', res.data.user);
|
||||
store.commit('LOGIN', {token:res.data.token});
|
||||
store.commit('SETUID', res.data.user.uid);
|
||||
// Cache.set(EXPIRES_TIME,res.data.expiresTime,time);
|
||||
Cache.set(USER_INFO,res.data.user);
|
||||
if(res.data.type==='login'){
|
||||
store.commit('LOGIN', {
|
||||
token: res.data.token
|
||||
});
|
||||
store.commit("SETUID", res.data.uid);
|
||||
}
|
||||
return resolve(res);
|
||||
}).catch(res=>{
|
||||
return reject(res);
|
||||
|
||||
@@ -112,6 +112,21 @@ class AuthWechat {
|
||||
});
|
||||
}
|
||||
|
||||
// 使用微信内置地图查看位置接口;
|
||||
seeLocation(config){
|
||||
return new Promise((resolve, reject) => {
|
||||
this.wechat().then(wx => {
|
||||
this.toPromise(wx.openLocation, config).then(res => {
|
||||
resolve(res);
|
||||
}).catch(err => {
|
||||
reject(err);
|
||||
});
|
||||
}).catch(err => {
|
||||
reject(err);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
* @param {Object} config
|
||||
@@ -153,12 +168,37 @@ class AuthWechat {
|
||||
/**
|
||||
* 自动去授权
|
||||
*/
|
||||
oAuth() {
|
||||
if (uni.getStorageSync(WX_AUTH) && store.state.app.token) return;
|
||||
oAuth(snsapiBase,url) {
|
||||
if (uni.getStorageSync(WX_AUTH) && store.state.app.token && snsapiBase == 'snsapi_base') return;
|
||||
const {
|
||||
code
|
||||
} = parseQuery();
|
||||
if (!code) return this.toAuth();
|
||||
if (!code || code == uni.getStorageSync('snsapiCode')){
|
||||
return this.toAuth(snsapiBase,url);
|
||||
}else{
|
||||
if(Cache.has('snsapiKey'))
|
||||
return this.auth(code).catch(error=>{
|
||||
uni.showToast({
|
||||
title:error,
|
||||
icon:'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
// if (uni.getStorageSync(WX_AUTH) && store.state.app.token) return;
|
||||
// const {
|
||||
// code
|
||||
// } = parseQuery();
|
||||
// if (!code){
|
||||
// return this.toAuth(snsapiBase,url);
|
||||
// }else{
|
||||
// if(Cache.has('snsapiKey'))
|
||||
// return this.auth(code).catch(error=>{
|
||||
// uni.showToast({
|
||||
// title:error,
|
||||
// icon:'none'
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
}
|
||||
|
||||
clearAuthStatus() {
|
||||
@@ -171,24 +211,16 @@ class AuthWechat {
|
||||
*/
|
||||
auth(code) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let loginType = Cache.get(LOGINTYPE);
|
||||
wechatAuth(code, Cache.get("spread"), loginType)
|
||||
wechatAuth(code, Cache.get("spread"))
|
||||
.then(({
|
||||
data
|
||||
}) => {
|
||||
// let expires_time = data.expires_time.substring(0, 19);
|
||||
// expires_time = expires_time.replace(/-/g, '/');
|
||||
// expires_time = new Date(expires_time).getTime();
|
||||
// let newTime = Math.round(new Date() / 1000);
|
||||
store.commit("LOGIN", {
|
||||
token: data.token
|
||||
// time: expires_time - newTime
|
||||
});
|
||||
resolve(data);
|
||||
Cache.set(WX_AUTH, code);
|
||||
Cache.clear(STATE_KEY);
|
||||
// Cache.clear('spread');
|
||||
loginType && Cache.clear(LOGINTYPE);
|
||||
resolve();
|
||||
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
@@ -198,32 +230,43 @@ class AuthWechat {
|
||||
* 获取跳转授权后的地址
|
||||
* @param {Object} appId
|
||||
*/
|
||||
getAuthUrl(appId) {
|
||||
const redirect_uri = encodeURIComponent(
|
||||
`${location.origin}/pages/auth/index?back_url=` +
|
||||
encodeURIComponent(
|
||||
encodeURIComponent(
|
||||
uni.getStorageSync(BACK_URL) ?
|
||||
uni.getStorageSync(BACK_URL) :
|
||||
location.pathname + location.search
|
||||
)
|
||||
)
|
||||
);
|
||||
uni.removeStorageSync(BACK_URL);
|
||||
const state = encodeURIComponent(
|
||||
("" + Math.random()).split(".")[1] + "authorizestate"
|
||||
);
|
||||
uni.setStorageSync(STATE_KEY, state);
|
||||
return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=${state}#wechat_redirect`;
|
||||
}
|
||||
|
||||
getAuthUrl(appId,snsapiBase,backUrl) {
|
||||
let url = `${location.origin}${backUrl}`
|
||||
if(url.indexOf('?') == -1){
|
||||
url = url+'?'
|
||||
}else{
|
||||
url = url+'&'
|
||||
}
|
||||
const redirect_uri = encodeURIComponent(
|
||||
`${url}scope=${snsapiBase}&back_url=` +
|
||||
encodeURIComponent(
|
||||
encodeURIComponent(
|
||||
uni.getStorageSync(BACK_URL) ?
|
||||
uni.getStorageSync(BACK_URL) :
|
||||
location.pathname + location.search
|
||||
)
|
||||
)
|
||||
);
|
||||
uni.removeStorageSync(BACK_URL);
|
||||
const state = encodeURIComponent(
|
||||
("" + Math.random()).split(".")[1] + "authorizestate"
|
||||
);
|
||||
uni.setStorageSync(STATE_KEY, state);
|
||||
return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`;
|
||||
// if(snsapiBase==='snsapi_base'){
|
||||
// return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=${state}#wechat_redirect`;
|
||||
// }else{
|
||||
// return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`;
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转自动登录
|
||||
*/
|
||||
toAuth() {
|
||||
toAuth(snsapiBase,backUrl) {
|
||||
let that = this;
|
||||
this.wechat().then(wx => {
|
||||
location.href = this.getAuthUrl(that.initConfig.appId);
|
||||
location.href = this.getAuthUrl(that.initConfig.appId,snsapiBase,backUrl);
|
||||
})
|
||||
}
|
||||
|
||||
@@ -272,4 +315,4 @@ class AuthWechat {
|
||||
}
|
||||
|
||||
export default new AuthWechat();
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
@@ -4,13 +4,14 @@ import store from './store'
|
||||
import Cache from './utils/cache'
|
||||
import util from 'utils/util'
|
||||
import configs from './config/app.js'
|
||||
|
||||
import * as Order from './libs/order';
|
||||
|
||||
Vue.prototype.$util = util;
|
||||
Vue.prototype.$config = configs;
|
||||
Vue.prototype.$Cache = Cache;
|
||||
Vue.prototype.$eventHub = new Vue();
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$Order = Order;
|
||||
|
||||
// #ifdef H5
|
||||
import { parseQuery } from "./utils";
|
||||
@@ -46,7 +47,7 @@ if (vconsole !== undefined && vconsole === md5Crmeb) {
|
||||
let vConsole = new VConsole();
|
||||
}
|
||||
|
||||
Auth.isWeixin() && Auth.oAuth();
|
||||
// Auth.isWeixin() && Auth.oAuth();
|
||||
|
||||
// #endif
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"name" : "crmeb",
|
||||
"appid" : "__UNI__06E0263",
|
||||
"description" : "",
|
||||
"appid" : "__UNI__66E0853",
|
||||
"description" : "crmeb商城",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"versionCode" : 1001,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"alwaysShowBeforeRender" : false,
|
||||
"waiting" : false,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
@@ -22,44 +22,47 @@
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
],
|
||||
"abiFilters" : []
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
"ios" : {
|
||||
"idfa" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
"sdkConfigs" : {},
|
||||
"icons" : {}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wxcda5a2b1b98b6a95",
|
||||
"appid" : "11",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : false,
|
||||
"urlCheck" : true,
|
||||
"minified" : true,
|
||||
"postcss" : true,
|
||||
"es6" : true
|
||||
},
|
||||
@@ -98,10 +101,23 @@
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : "NO7BZ-APDKP-UCBD7-VT7CX-R5UZK-JBF2W"
|
||||
"key" : "map key"
|
||||
}
|
||||
}
|
||||
},
|
||||
"optimization" : {
|
||||
"treeShaking" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"async" : {
|
||||
"timeout" : 200000
|
||||
},
|
||||
"title" : "CRMEB"
|
||||
},
|
||||
"plus" : {
|
||||
"statusbar" : {
|
||||
"immersed" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
670
app/pages.json
670
app/pages.json
@@ -4,10 +4,10 @@
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"scrollIndicator": false //禁用原生导航栏
|
||||
}
|
||||
"navigationStyle": "custom"
|
||||
// "app-plus": {
|
||||
// "scrollIndicator": false //禁用原生导航栏
|
||||
// }
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -22,7 +22,8 @@
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
@@ -30,9 +31,6 @@
|
||||
"path": "pages/goods_details/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -104,169 +102,179 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/components/a_seckill",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/index/components/b_combination",
|
||||
"style": {}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/index/components/a_seckill",
|
||||
"style" : {}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/index/components/b_combination",
|
||||
"style" : {}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pages/users",
|
||||
"name": "users",
|
||||
"pages": [
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pages/users",
|
||||
"name": "users",
|
||||
"pages": [
|
||||
{
|
||||
"path": "privacy/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "隐私协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "web_page/index",
|
||||
"style": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "retrievePassword/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "忘记密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_info/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人资料"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_get_coupon/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "领取优惠券"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_goods_collection/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "收藏商品"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_sgin/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_sgin_list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_money/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的账户"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_bill/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账单明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_integral/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_coupon/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的优惠券"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_user/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的推广",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_code/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分销海报"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_money/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "佣金记录",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_cash/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提现",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_vip/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员中心",
|
||||
"navigationBarBackgroundColor": "#232323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_address_list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_address/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加地址"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_phone/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "绑定手机",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_payment/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "余额充值"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_pwd_edit/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
"path": "user_info/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人资料"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_get_coupon/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "领取优惠券"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_goods_collection/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "收藏商品"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_sgin/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_sgin_list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_money/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的账户"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_bill/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账单明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_integral/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_coupon/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的优惠券"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_user/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的推广",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_code/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分销海报"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_spread_money/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "佣金记录",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_cash/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提现",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_vip/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员中心"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_address_list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_address/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加地址"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_phone/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改手机号",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_payment/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "余额充值"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_pwd_edit/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "order_confirm/index",
|
||||
"style": {
|
||||
@@ -284,9 +292,10 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "推广人列表",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -294,9 +303,10 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "推广人订单",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -304,9 +314,10 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "推广人排行",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -314,9 +325,10 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "佣金排行",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -367,196 +379,162 @@
|
||||
"navigationBarTitleText": "账户登录",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/activity",
|
||||
"name": "activity",
|
||||
"pages":[{
|
||||
"path": "goods_bargain/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_bargain_details/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination_details/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination_status/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "拼团"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_seckill/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "限时秒杀"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
,"navigationBarBackgroundColor":"#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_seckill_details/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "秒杀详情"
|
||||
// #ifdef MP
|
||||
,"navigationStyle": "custom"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "poster-poster/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价海报"
|
||||
// #ifdef MP
|
||||
,"navigationBarTextStyle": "#fff"
|
||||
,"navigationBarBackgroundColor":"#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "bargain/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价记录"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/admin",
|
||||
"name": "adminOrder",
|
||||
"pages":[
|
||||
{
|
||||
"path": "order/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "orderList/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "orderDetail/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "delivery/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单发货"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "statistics/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单数据统计"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "order_cancellation/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单核销"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/columnGoods",
|
||||
"name": "columnGoods",
|
||||
"pages":[
|
||||
},
|
||||
{
|
||||
"path": "HotNewGoods/index",
|
||||
"path": "app_login/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "精品推荐"
|
||||
"navigationBarTitleText": "绑定手机号",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/activity",
|
||||
"name": "activity",
|
||||
"pages": [{
|
||||
"path": "goods_bargain/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价列表"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_bargain_details/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价详情"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "拼团列表"
|
||||
// #ifdef MP || APP-PLUS
|
||||
,
|
||||
"navigationBarTextStyle": "#fff",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination_details/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_combination_status/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "拼团"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_seckill/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "限时秒杀"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goods_seckill_details/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "秒杀详情"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationStyle": "custom"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "poster-poster/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价海报"
|
||||
// #ifdef MP
|
||||
,
|
||||
"navigationBarTextStyle": "#fff",
|
||||
"navigationBarBackgroundColor": "#e93323"
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "bargain/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价记录"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/columnGoods",
|
||||
"name": "columnGoods",
|
||||
"pages": [{
|
||||
"path": "HotNewGoods/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "精品推荐"
|
||||
}
|
||||
}]
|
||||
}
|
||||
],
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "crmeb",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"backgroundColor": "#F8F8F8",
|
||||
"titleNView": false,
|
||||
"rpxCalcMaxDeviceWidth": 960,
|
||||
"rpxCalcBaseDeviceWidth": 375,
|
||||
"rpxCalcIncludeWidth": 750
|
||||
"rpxCalcMaxDeviceWidth": 960,
|
||||
"rpxCalcBaseDeviceWidth": 375,
|
||||
"rpxCalcIncludeWidth": 750
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#282828",
|
||||
"selectedColor": "#fc4141",
|
||||
"borderStyle": "white",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/images/1-001.png",
|
||||
"selectedIconPath": "static/images/1-002.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/goods_cate/goods_cate",
|
||||
"iconPath": "static/images/2-001.png",
|
||||
"selectedIconPath": "static/images/2-002.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/order_addcart/order_addcart",
|
||||
"iconPath": "static/images/3-001.png",
|
||||
"selectedIconPath": "static/images/3-002.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/index",
|
||||
"iconPath": "static/images/4-001.png",
|
||||
"selectedIconPath": "static/images/4-002.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"condition" : { //模式配置,仅开发期间生效
|
||||
"current": 0, //当前激活的模式(list 的索引项)
|
||||
"list": [
|
||||
"list": [{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/images/1-001.png",
|
||||
"selectedIconPath": "static/images/1-002.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"name": "", //模式名称
|
||||
"path": "", //启动页面,必选
|
||||
"query": "" //启动参数,在页面的onLoad函数里面得到
|
||||
"pagePath": "pages/goods_cate/goods_cate",
|
||||
"iconPath": "static/images/2-001.png",
|
||||
"selectedIconPath": "static/images/2-002.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/order_addcart/order_addcart",
|
||||
"iconPath": "static/images/3-001.png",
|
||||
"selectedIconPath": "static/images/3-002.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/index",
|
||||
"iconPath": "static/images/4-001.png",
|
||||
"selectedIconPath": "static/images/4-002.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"condition": { //模式配置,仅开发期间生效
|
||||
"current": 0, //当前激活的模式(list 的索引项)
|
||||
"list": [{
|
||||
"name": "", //模式名称
|
||||
"path": "", //启动页面,必选
|
||||
"query": "" //启动参数,在页面的onLoad函数里面得到
|
||||
}]
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,21 @@
|
||||
<template>
|
||||
<view>
|
||||
<block v-if="bargain.length>0">
|
||||
<div class="bargain-record" ref="container">
|
||||
<div class="item" v-for="(item, index) in bargain" :key="index">
|
||||
<div class="bargain-record pad30" ref="container">
|
||||
<div class="item borRadius14" v-for="(item, index) in bargain" :key="index">
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div class="pictrue">
|
||||
<image :src="item.image" />
|
||||
</div>
|
||||
<div class="text acea-row row-column-around">
|
||||
<div class="line1" style="width: 100%;">{{ item.title }}</div>
|
||||
<count-down :justify-left="'justify-content:left'" :is-day="true" :tip-text="'倒计时 '" :day-text="' 天 '" :hour-text="' 时 '" :minute-text="' 分 '"
|
||||
:second-text="' 秒'" :datatime="item.datatime" v-if="item.status === 1"></count-down>
|
||||
<count-down :justify-left="'justify-content:left'" :bgColor="bgColor" :is-day="true" :tip-text="'倒计时 '" :day-text="'天'"
|
||||
:hour-text="' 时 '" :minute-text="' 分 '"
|
||||
:second-text="' 秒 '" :datatime="item.stopTime/1000" v-if="item.status === 1"></count-down>
|
||||
<div class="successTxt font-color-red" v-else-if="item.status === 3">砍价成功</div>
|
||||
<div class="endTxt" v-else>活动已结束</div>
|
||||
<div class="money font-color-red">
|
||||
已砍至<span class="symbol">¥</span><span class="num">{{ item.residue_price }}</span>
|
||||
<div class="money">
|
||||
已砍至<span class="symbol font-color-red">¥</span><span class="num font-color-red">{{ item.surplusPrice }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -23,13 +24,16 @@
|
||||
<div class="success" v-else-if="item.status === 3">砍价成功</div>
|
||||
<div class="end" v-else>活动已结束</div>
|
||||
<div class="acea-row row-middle row-right">
|
||||
<div class="bnt cancel" v-if="item.status === 1" @click="getBargainUserCancel(item.bargain_id)">
|
||||
取消活动
|
||||
<div class="bnt bg-color-red" v-if="item.status === 3 && !item.isOrder" @click="goConfirm(item)">
|
||||
去付款
|
||||
</div>
|
||||
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.bargain_id)">
|
||||
<div class="bnt bg-color-red" v-if="item.status === 3 && !item.isDel && item.isOrder && !item.isPay" @click="goPay(item.surplusPrice,item.orderNo)">
|
||||
立即付款
|
||||
</div>
|
||||
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.id)">
|
||||
继续砍价
|
||||
</div>
|
||||
<!-- <div class="bnt bg-color-red" v-else @click="goList">重开一个</div> -->
|
||||
<div class="bnt bg-color-red" v-if="item.status === 2" @click="goList">重开一个</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -40,6 +44,7 @@
|
||||
<emptyPage title="暂无砍价记录~"></emptyPage>
|
||||
</block>
|
||||
<home></home>
|
||||
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@@ -49,44 +54,127 @@
|
||||
getBargainUserList,
|
||||
getBargainUserCancel
|
||||
} from "@/api/activity";
|
||||
import {
|
||||
getUserInfo
|
||||
} from '@/api/user.js';
|
||||
import Loading from "@/components/Loading";
|
||||
import home from '@/components/home';
|
||||
import payment from '@/components/payment';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
name: "BargainRecord",
|
||||
components: {
|
||||
CountDown,
|
||||
Loading,
|
||||
emptyPage,
|
||||
home
|
||||
home,
|
||||
payment
|
||||
},
|
||||
props: {},
|
||||
computed: mapGetters(['isLogin', 'userInfo', 'uid']),
|
||||
data: function() {
|
||||
return {
|
||||
bgColor:{
|
||||
'bgColor': '',
|
||||
'Color': '#E93323',
|
||||
'width': '40rpx',
|
||||
'timeTxtwidth': '28rpx',
|
||||
'isDay': false
|
||||
},
|
||||
bargain: [],
|
||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
||||
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
|
||||
page: 1, //页码
|
||||
limit: 20, //数量
|
||||
userInfo: {}
|
||||
payMode: [{
|
||||
name: "微信支付",
|
||||
icon: "icon-weixinzhifu",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付'
|
||||
},
|
||||
{
|
||||
name: "余额支付",
|
||||
icon: "icon-yuezhifu",
|
||||
value: 'yue',
|
||||
title: '可用余额:',
|
||||
number: 0
|
||||
}
|
||||
],
|
||||
pay_close: false,
|
||||
pay_order_id: '',
|
||||
totalPrice: '0'
|
||||
};
|
||||
},
|
||||
onLoad: function() {
|
||||
this.getBargainUserList();
|
||||
this.getUserInfo();
|
||||
// this.$scroll(this.$refs.container, () => {
|
||||
// !this.loadingList && this.getBargainUserList();
|
||||
// });
|
||||
},
|
||||
onShow() {
|
||||
if (this.isLogin) {
|
||||
this.payMode[1].number = this.userInfo.nowMoney;
|
||||
this.$set(this, 'payMode', this.payMode);
|
||||
} else {
|
||||
toLogin();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 打开支付组件
|
||||
*
|
||||
*/
|
||||
goPay(pay_price, order_id) {
|
||||
this.$set(this, 'pay_close', true);
|
||||
this.$set(this, 'pay_order_id', order_id);
|
||||
this.$set(this, 'totalPrice', pay_price);
|
||||
},
|
||||
/**
|
||||
* 事件回调
|
||||
*
|
||||
*/
|
||||
onChangeFun: function(e) {
|
||||
let opt = e;
|
||||
let action = opt.action || null;
|
||||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
/**
|
||||
* 关闭支付组件
|
||||
*
|
||||
*/
|
||||
payClose: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
/**
|
||||
* 支付成功回调
|
||||
*
|
||||
*/
|
||||
pay_complete: function() {
|
||||
this.status = false;
|
||||
this.page = 1;
|
||||
this.$set(this, 'bargain', []);
|
||||
this.$set(this, 'pay_close', false);
|
||||
this.getBargainUserList();
|
||||
},
|
||||
/**
|
||||
* 支付失败回调
|
||||
*
|
||||
*/
|
||||
pay_fail: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
goConfirm: function(item) { //立即支付
|
||||
if (this.isLogin === false) {
|
||||
toLogin();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&startBargainUid=${this.uid}&storeBargainId=${item.bargainUserId}`
|
||||
})
|
||||
}
|
||||
},
|
||||
goDetail: function(id) {
|
||||
// this.$router.push({
|
||||
// path: "/activity/dargain_detail/" + id +'&bargain='+ userInfo.uid
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${id}&bargain=${this.userInfo.uid}`
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${id}&startBargainUid=${this.uid}`
|
||||
})
|
||||
},
|
||||
// 砍价列表
|
||||
@@ -104,8 +192,8 @@
|
||||
limit: that.limit
|
||||
})
|
||||
.then(res => {
|
||||
that.status = res.data.length < that.limit;
|
||||
that.bargain.push.apply(that.bargain, res.data);
|
||||
that.status = res.data.list.length < that.limit;
|
||||
that.bargain.push.apply(that.bargain, res.data.list);
|
||||
that.page++;
|
||||
that.loadingList = false;
|
||||
})
|
||||
@@ -133,16 +221,7 @@
|
||||
title: res
|
||||
})
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取个人用户信息
|
||||
*/
|
||||
getUserInfo: function() {
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.userInfo = res.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getBargainUserList();
|
||||
@@ -150,11 +229,15 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
/*砍价记录*/
|
||||
.bargain-record .item .picTxt .text .time .styleAll {
|
||||
color: #fc4141;
|
||||
font-size:24rpx;
|
||||
.bargain-record .item .picTxt .text .time {
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
.styleAll {
|
||||
color: #fc4141;
|
||||
font-size:24rpx;
|
||||
}
|
||||
}
|
||||
.bargain-record .item .picTxt .text .time .red {
|
||||
color: #999;
|
||||
@@ -162,13 +245,13 @@
|
||||
}
|
||||
.bargain-record .item {
|
||||
background-color: #fff;
|
||||
margin-bottom: 12upx;
|
||||
margin-top: 15rpx;
|
||||
padding: 30rpx 24rpx 0 24rpx;
|
||||
}
|
||||
|
||||
.bargain-record .item .picTxt {
|
||||
height: 210upx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 0 30upx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.bargain-record .item .picTxt .pictrue {
|
||||
@@ -183,10 +266,10 @@
|
||||
}
|
||||
|
||||
.bargain-record .item .picTxt .text {
|
||||
width: 515upx;
|
||||
width: 470rpx;
|
||||
font-size: 30upx;
|
||||
color: #282828;
|
||||
height: 150upx;
|
||||
color: #333333;
|
||||
height: 160rpx;
|
||||
}
|
||||
|
||||
.bargain-record .item .picTxt .text .time {
|
||||
@@ -205,6 +288,7 @@
|
||||
}
|
||||
.bargain-record .item .picTxt .text .money {
|
||||
font-size: 24upx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.bargain-record .item .picTxt .text .money .num {
|
||||
@@ -218,7 +302,6 @@
|
||||
|
||||
.bargain-record .item .bottom {
|
||||
height: 100upx;
|
||||
padding: 0 30upx;
|
||||
font-size: 27upx;
|
||||
}
|
||||
|
||||
@@ -231,7 +314,7 @@
|
||||
}
|
||||
|
||||
.bargain-record .item .bottom .success {
|
||||
color: #e93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.bargain-record .item .bottom .bnt {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,28 +1,29 @@
|
||||
<template>
|
||||
<div>
|
||||
<view class='flash-sale'>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class='iconfont icon-xiangzuo' @tap='goBack' :style="'top:'+ (navH/2) +'rpx'" v-if="returnShow"></view>
|
||||
<!-- #endif -->
|
||||
<view class="saleBox"></view>
|
||||
<!-- banner -->
|
||||
<!-- <navigator :url='item.url' class='slide-navigator acea-row row-between-wrapper' hover-class='none'>
|
||||
<image :src="item.pic" class="slide-image" lazy-load></image>
|
||||
</navigator> -->
|
||||
<view class="header" v-if="timeList.length">
|
||||
<view class="header" v-if="dataList.length">
|
||||
<swiper indicator-dots="true" autoplay="true" :circular="circular" interval="3000" duration="1500"
|
||||
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in timeList[active].slide" :key="index">
|
||||
<swiper-item>
|
||||
<image :src="item.sattDir" class="slide-image" lazy-load></image>
|
||||
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
||||
<block v-for="(items,index) in dataList[active].slide" :key="index">
|
||||
<swiper-item class="borRadius14">
|
||||
<image :src="items.sattDir" class="slide-image borRadius14" lazy-load></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
||||
</view>
|
||||
<view class="seckillList acea-row row-between-wrapper">
|
||||
<view class="priceTag">
|
||||
<image src="/static/images/priceTag.png"></image>
|
||||
</view>
|
||||
<view class='timeLsit'>
|
||||
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;height:106rpx;">
|
||||
<block v-for="(item,index) in timeList" :key='index'>
|
||||
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft"
|
||||
style="width:auto;overflow:hidden;">
|
||||
<block v-for="(item,index) in dataList" :key='index'>
|
||||
<view @tap='settimeList(item,index)' class='item' :class="active == index?'on':''">
|
||||
<view class='time'>{{item.time.split(',')[0]}}</view>
|
||||
<view class="state">{{item.statusName}}</view>
|
||||
@@ -31,7 +32,7 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='list' v-if='seckillList.length>0'>
|
||||
<view class='list pad30' v-if='seckillList.length>0'>
|
||||
<block v-for="(item,index) in seckillList" :key='index'>
|
||||
<view class='item acea-row row-between-wrapper' @tap='goDetails(item)'>
|
||||
<view class='pictrue'>
|
||||
@@ -39,11 +40,12 @@
|
||||
</view>
|
||||
<view class='text acea-row row-column-around'>
|
||||
<view class='name line1'>{{item.title}}</view>
|
||||
<view class='money'>¥
|
||||
<view class='money'><text class="font-color">¥</text>
|
||||
<text class='num font-color'>{{item.price}}</text>
|
||||
<text class="y_money">¥{{item.otPrice}}</text>
|
||||
</view>
|
||||
<view class="limit">限量 <text class="limitPrice">{{item.quotaShow}} {{item.unitName}}</text></view>
|
||||
<view class="limit">限量 <text class="limitPrice">{{item.quota}} {{item.unitName}}</text>
|
||||
</view>
|
||||
<view class="progress">
|
||||
<view class='bg-reds' :style="'width:'+item.percent+'%;'"></view>
|
||||
<view class='piece'>已抢{{item.percent}}%</view>
|
||||
@@ -70,7 +72,8 @@
|
||||
getSeckillHeaderApi,
|
||||
getSeckillList
|
||||
} from '../../../api/activity.js';
|
||||
import home from '@/components/home/index.vue'
|
||||
import home from '@/components/home/index.vue';
|
||||
let app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
home
|
||||
@@ -80,11 +83,10 @@
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 500,
|
||||
// duration: 500,
|
||||
topImage: '',
|
||||
seckillList: [],
|
||||
timeList: [],
|
||||
active: 5,
|
||||
active: 0,
|
||||
scrollLeft: 0,
|
||||
interval: 0,
|
||||
status: 1,
|
||||
@@ -96,31 +98,36 @@
|
||||
loading: false,
|
||||
loadend: false,
|
||||
pageloading: false,
|
||||
seckillHeader: []
|
||||
dataList: [],
|
||||
returnShow: true,
|
||||
navH: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var pages = getCurrentPages();
|
||||
this.returnShow = pages.length===1?false:true;
|
||||
// #ifdef H5
|
||||
this.navH = app.globalData.navHeight-18;
|
||||
// #endif
|
||||
this.getSeckillConfig();
|
||||
},
|
||||
methods: {
|
||||
goBack: function() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
getSeckillConfig: function() {
|
||||
let that = this;
|
||||
getSeckillHeaderApi().then(res => {
|
||||
res.data.seckillTime.map(item => {
|
||||
res.data.map(item => {
|
||||
item.slide = JSON.parse(item.slide)
|
||||
})
|
||||
that.timeList = res.data.seckillTime;
|
||||
that.active = res.data.seckillTimeIndex;
|
||||
if (that.timeList.length) {
|
||||
that.scrollLeft = (that.active - 1.37) * 100
|
||||
setTimeout(function() {
|
||||
that.loading = true
|
||||
}, 2000);
|
||||
that.seckillList = [],
|
||||
that.page = 1
|
||||
that.status = that.timeList[that.active].status
|
||||
that.getSeckillList();
|
||||
}
|
||||
that.dataList = res.data;
|
||||
that.getSeckillList();
|
||||
that.seckillList = [];
|
||||
that.page = 1;
|
||||
that.status = that.dataList[that.active].status;
|
||||
that.getSeckillList();
|
||||
|
||||
});
|
||||
},
|
||||
getSeckillList: function() {
|
||||
@@ -132,7 +139,7 @@
|
||||
if (that.loadend) return;
|
||||
if (that.pageloading) return;
|
||||
this.pageloading = true
|
||||
getSeckillList(that.timeList[that.active].id, data).then(res => {
|
||||
getSeckillList(that.dataList[that.active].id, data).then(res => {
|
||||
var seckillList = res.data.list;
|
||||
var loadend = seckillList.length < that.limit;
|
||||
that.page++;
|
||||
@@ -155,16 +162,16 @@
|
||||
that.countDownHour = "00";
|
||||
that.countDownMinute = "00";
|
||||
that.countDownSecond = "00";
|
||||
that.status = that.timeList[that.active].status;
|
||||
that.status = that.dataList[that.active].status;
|
||||
that.loadend = false;
|
||||
that.page = 1;
|
||||
that.seckillList = [];
|
||||
// wxh.time(e.currentTarget.dataset.stop, that);
|
||||
that.getSeckillList();
|
||||
},
|
||||
goDetails(item){
|
||||
goDetails(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/goods_seckill_details/index?id=' + item.id + '&time=' + this.timeList[this.active].timeSwap + '&status=' + this.status + '&productId=' + item.productId
|
||||
url: '/pages/activity/goods_seckill_details/index?id=' + item.id
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -181,22 +188,42 @@
|
||||
page {
|
||||
background-color: #F5F5F5 !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
|
||||
.icon-xiangzuo {
|
||||
font-size: 40rpx;
|
||||
color: #fff;
|
||||
position: fixed;
|
||||
left: 30rpx;
|
||||
z-index: 99;
|
||||
transform: translateY(-20%);
|
||||
}
|
||||
.flash-sale .header {
|
||||
width: 710rpx;
|
||||
height: 300rpx;
|
||||
margin: -215rpx auto 0 auto;
|
||||
border-radius: 20rpx;
|
||||
height: 330rpx;
|
||||
margin: -276rpx auto 0 auto;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
swiper{
|
||||
height: 330rpx !important;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.flash-sale .header image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20rpx;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
img{
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.flash-sale .seckillList {
|
||||
padding: 0 20rpx;
|
||||
padding: 25rpx;
|
||||
}
|
||||
|
||||
.flash-sale .seckillList .priceTag {
|
||||
@@ -210,9 +237,8 @@
|
||||
}
|
||||
|
||||
.flash-sale .timeLsit {
|
||||
width: 610rpx;
|
||||
width: 596rpx;
|
||||
white-space: nowrap;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.flash-sale .timeLsit .item {
|
||||
@@ -220,10 +246,9 @@
|
||||
font-size: 20rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
padding: 11rpx 0;
|
||||
box-sizing: border-box;
|
||||
height: 96rpx;
|
||||
margin-right: 35rpx;
|
||||
margin-right: 30rpx;
|
||||
width: 130rpx;
|
||||
}
|
||||
|
||||
.flash-sale .timeLsit .item .time {
|
||||
@@ -233,13 +258,15 @@
|
||||
}
|
||||
|
||||
.flash-sale .timeLsit .item.on .time {
|
||||
color: #E93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.flash-sale .timeLsit .item.on .state {
|
||||
width: 90rpx;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 15rpx;
|
||||
width: 128rpx;
|
||||
/* padding: 0 12rpx; */
|
||||
background: linear-gradient(90deg, rgba(252, 25, 75, 1) 0%, rgba(252, 60, 32, 1) 100%);
|
||||
color: #fff;
|
||||
}
|
||||
@@ -269,11 +296,11 @@
|
||||
.flash-sale .list .item {
|
||||
height: 230rpx;
|
||||
position: relative;
|
||||
width: 710rpx;
|
||||
/* width: 710rpx; */
|
||||
margin: 0 auto 20rpx auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 0 25rpx;
|
||||
border-radius: 14rpx;
|
||||
padding: 25rpx 24rpx;
|
||||
}
|
||||
|
||||
.flash-sale .list .item .pictrue {
|
||||
@@ -290,7 +317,7 @@
|
||||
}
|
||||
|
||||
.flash-sale .list .item .text {
|
||||
width: 460rpx;
|
||||
width: 440rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
height: 166rpx;
|
||||
@@ -302,7 +329,7 @@
|
||||
|
||||
.flash-sale .list .item .text .money {
|
||||
font-size: 30rpx;
|
||||
color: #E93323;
|
||||
color: $theme-color;
|
||||
}
|
||||
|
||||
.flash-sale .list .item .text .money .num {
|
||||
@@ -330,7 +357,7 @@
|
||||
|
||||
.flash-sale .list .item .text .progress {
|
||||
overflow: hidden;
|
||||
background-color: #FFEFEF;
|
||||
background-color: #EEEEEE;
|
||||
width: 260rpx;
|
||||
border-radius: 18rpx;
|
||||
height: 18rpx;
|
||||
@@ -369,7 +396,10 @@
|
||||
|
||||
.flash-sale .saleBox {
|
||||
width: 100%;
|
||||
height: 230rpx;
|
||||
height: 298rpx;
|
||||
/* #ifdef MP */
|
||||
height: 300rpx;
|
||||
/* #endif */
|
||||
background: rgba(233, 51, 35, 1);
|
||||
border-radius: 0 0 50rpx 50rpx;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,9 +2,6 @@
|
||||
<view>
|
||||
<view class='poster-poster'>
|
||||
<view class='tip'><text class='iconfont icon-shuoming'></text>提示:点击图片即可保存至手机相册 </view>
|
||||
<!-- <view class='pictrue'>
|
||||
<image :src='image' mode="widthFix"></image>
|
||||
</view> -->
|
||||
<view class='pictrue' v-if="canvasStatus">
|
||||
<image :src='imagePath'></image>
|
||||
</view>
|
||||
|
||||
BIN
app/pages/activity/static/btn.png
Normal file
BIN
app/pages/activity/static/btn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
app/pages/activity/static/canbj.png
Normal file
BIN
app/pages/activity/static/canbj.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
app/pages/activity/static/cheng.png
Normal file
BIN
app/pages/activity/static/cheng.png
Normal 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
Reference in New Issue
Block a user