Refactor:分包
This commit is contained in:
+3
-768
@@ -429,7 +429,6 @@ import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
import ProductWindow from '@/components/ProductWindow'
|
||||
import goCartMixin from '@/mixins/goCartMixins'
|
||||
import FunctionGuide from '@/components/FunctionGuide'
|
||||
import GuideMixins from '@/mixins/GuideMixins'
|
||||
import AiEntrance from '@/components/aiChat/entrance'
|
||||
import {
|
||||
getSearchPageConfig
|
||||
@@ -451,7 +450,7 @@ export default {
|
||||
FunctionGuide,
|
||||
AiEntrance
|
||||
},
|
||||
mixins: [pageListenMixins, goCartMixin, GuideMixins],
|
||||
mixins: [pageListenMixins, goCartMixin],
|
||||
data() {
|
||||
return {
|
||||
isFirstLoad: true,
|
||||
@@ -522,8 +521,7 @@ export default {
|
||||
// uni.hideTabBar()
|
||||
const _this = this
|
||||
_this.init()
|
||||
_this.queryGuide('index')
|
||||
this.getSearch()
|
||||
_this.getSearch()
|
||||
uni.getSystemInfo({
|
||||
success: (e) => {
|
||||
let statusBar = 0
|
||||
@@ -539,7 +537,7 @@ export default {
|
||||
getWeixinShareConfig().then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.shareData = data
|
||||
_this.shareData = data
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -653,769 +651,6 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
showFunctionGuide() {
|
||||
if(this._step == this.functionGuideData.step) return
|
||||
this._step = this.functionGuideData.step
|
||||
if(this.functionGuideData.step == 1) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group1/Group 1-1.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '474rpx',
|
||||
top: '100rpx',
|
||||
left: '-110rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '289rpx',
|
||||
/* px: ; */
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group1/Group 1-2.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '186rpx',
|
||||
top: '350rpx',
|
||||
left: '240rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group1/Group 1-3.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '173rpx',
|
||||
top: '180rpx',
|
||||
right: '100rpx',
|
||||
height: '248rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
]
|
||||
this.getElementData('#step1', res=>{
|
||||
this.screenWidth = res.width - 20
|
||||
this.setFunctionGuideData({
|
||||
imgs: imgs,
|
||||
btnGroupPosition: {
|
||||
top: 510 - 100 + 'rpx',
|
||||
},
|
||||
tipsPosition: '420rpx',
|
||||
position: {
|
||||
top: 510 - 100 + 'rpx',
|
||||
left: res.left + 10 + 'px',
|
||||
width: `${res.width - 20}px`,
|
||||
height: `${160 + 228 + 16 + 514 + 16}rpx`,
|
||||
}
|
||||
})
|
||||
})
|
||||
}else {
|
||||
const menusUrl = this.menus.map(item => item.uniapp_url)
|
||||
const urls = {
|
||||
2: '/pages/chose-city/chose-city?type=0',
|
||||
3: '/pages/chose-city/chose-city?type=1',
|
||||
4: '/pkg_product/views/healthList',
|
||||
5: '/pkg_product/views/giftList',
|
||||
6: '/pkg_product/views/heritage',
|
||||
7: '/pkg_join/views/index',
|
||||
8: '/v4/views/attract/attract'
|
||||
}
|
||||
if(this.functionGuideData.step == 2) {
|
||||
if(menusUrl.indexOf(urls[2]) < 0) {
|
||||
this.$refs.FunctionGuide.next()
|
||||
return
|
||||
}
|
||||
if(menusUrl.indexOf(urls[2]) > -1) {
|
||||
const index = menusUrl.indexOf(urls[2])
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group2/Group 2-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '454rpx',
|
||||
top: '140rpx',
|
||||
left: '-130rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '258rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group2/Group 2-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: '-110rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group2/Group 2-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: '200rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
this.toEle('box-item' + index, imgs)
|
||||
}
|
||||
return
|
||||
}
|
||||
if(this.functionGuideData.step == 3) {
|
||||
if(menusUrl.indexOf(urls[3]) < 0) {
|
||||
this.$refs.FunctionGuide.next()
|
||||
return
|
||||
}
|
||||
if(menusUrl.indexOf(urls[3]) > -1) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group3/Group 3-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '620rpx',
|
||||
top: '540rpx',
|
||||
left: '-50rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '254rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group3/Group 3-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: '530rpx',
|
||||
left: '110rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group3/Group 3-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: '530rpx',
|
||||
left: '410rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
const index = menusUrl.indexOf(urls[3])
|
||||
this.toEle('box-item' + index, imgs)
|
||||
}
|
||||
return
|
||||
}
|
||||
if(this.functionGuideData.step == 4) {
|
||||
if(menusUrl.indexOf(urls[4]) < 0) {
|
||||
this.$refs.FunctionGuide.next()
|
||||
return
|
||||
}
|
||||
if(menusUrl.indexOf(urls[4]) > -1) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group4/Group 4-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '578rpx',
|
||||
top: '180rpx',
|
||||
left: '150rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '226rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group4/Group 4-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: '340rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group4/Group 4-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: '610rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
const index = menusUrl.indexOf(urls[4])
|
||||
this.toEle('box-item' + index, imgs)
|
||||
}
|
||||
return
|
||||
}
|
||||
if(this.functionGuideData.step == 5) {
|
||||
if(menusUrl.indexOf(urls[5]) < 0) {
|
||||
this.$refs.FunctionGuide.next()
|
||||
return
|
||||
}
|
||||
if(menusUrl.indexOf(urls[5]) > -1) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group5/Group 5-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '495rpx',
|
||||
top: '540rpx',
|
||||
left: '230rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '267rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group5/Group 5-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 265*2+'rpx',
|
||||
left: -120*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group5/Group 5-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 265*2+'rpx',
|
||||
left: 20*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
const index = menusUrl.indexOf(urls[5])
|
||||
this.toEle('box-item' + index, imgs)
|
||||
}
|
||||
return
|
||||
}
|
||||
if(this.functionGuideData.step == 6) {
|
||||
if(menusUrl.indexOf(urls[6]) < 0) {
|
||||
this.$refs.FunctionGuide.next()
|
||||
return
|
||||
}
|
||||
if(menusUrl.indexOf(urls[6]) > -1) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group6/Group 6-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '534rpx',
|
||||
top: '140rpx',
|
||||
left: '230rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '280rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group6/Group 6-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: -20*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group6/Group 6-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: 140*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
const index = menusUrl.indexOf(urls[6])
|
||||
this.toEle('box-item' + index, imgs)
|
||||
}
|
||||
return
|
||||
}
|
||||
// 7 商户, 8 招商
|
||||
if(this.functionGuideData.step == 7) {
|
||||
if(menusUrl.indexOf(urls[7]) < 0) {
|
||||
this.$refs.FunctionGuide.next()
|
||||
return
|
||||
}
|
||||
if(menusUrl.indexOf(urls[7]) > -1) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group13/Group 13-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: 291.5*2+'rpx',
|
||||
top: 280*2+'rpx',
|
||||
left: 10*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: 116.5*2+'rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group13/Group 13-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: -280*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group13/Group 13-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: -150*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
const index = menusUrl.indexOf(urls[7])
|
||||
this.toEle('box-item' + index, imgs)
|
||||
}
|
||||
return
|
||||
}
|
||||
if(this.functionGuideData.step == 8) {
|
||||
if(menusUrl.indexOf(urls[8]) < 0) {
|
||||
this.$refs.FunctionGuide.next()
|
||||
return
|
||||
}
|
||||
if(menusUrl.indexOf(urls[8]) > -1) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group14/Group 14-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '539rpx',
|
||||
top: 80*2+'rpx',
|
||||
left: 100*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '265rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group14/Group 14-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: 150*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group14/Group 14-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 213*2+'rpx',
|
||||
left: 10*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
]
|
||||
const index = menusUrl.indexOf(urls[8])
|
||||
this.toEle('box-item' + index, imgs)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (this.functionGuideData.step == 10) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group7/Group 7-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '438rpx',
|
||||
top: 140*2+'rpx',
|
||||
left: -164*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '336rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group8/Group 8-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '129rpx',
|
||||
top: 285*2+'rpx',
|
||||
left: 0+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group8/Group 8-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '129rpx',
|
||||
top: 285*2+'rpx',
|
||||
left: 139 * 2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
this.toEle('dibiao', imgs)
|
||||
return
|
||||
}
|
||||
if (this.functionGuideData.step == 9) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group8/Group 8-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '574rpx',
|
||||
top: 170*2+'rpx',
|
||||
left: -0+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '238rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group8/Group 8-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '118rpx',
|
||||
top: 285*2+'rpx',
|
||||
left: -290*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group8/Group 8-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '118rpx',
|
||||
top: 285*2+'rpx',
|
||||
left: -(290-130)*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
}
|
||||
]
|
||||
this.toEle('qianxian', imgs)
|
||||
return
|
||||
}
|
||||
if (this.functionGuideData.step == 11) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group9/Group 9-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '444rpx',
|
||||
top: 310*2+'rpx',
|
||||
left: 144*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '252rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group9/Group 9-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '118rpx',
|
||||
top: 435*2+'rpx',
|
||||
left: -235*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group9/Group 9-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '118rpx',
|
||||
top: 435*2+'rpx',
|
||||
left: -90*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
}
|
||||
]
|
||||
this.toEle('xkd', imgs)
|
||||
return
|
||||
}
|
||||
if (this.functionGuideData.step == 12) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group11/Group 11-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '450rpx',
|
||||
top: 465*2+'rpx',
|
||||
left: 120*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '218rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group11/Group 11-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '118rpx',
|
||||
top: 575*2+'rpx',
|
||||
left: -210*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group11/Group 11-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '118rpx',
|
||||
top: 575*2+'rpx',
|
||||
left: -70*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
}
|
||||
]
|
||||
this.toEle('xpsx', imgs)
|
||||
return
|
||||
}
|
||||
// top 140, buttom: 540
|
||||
if(this.functionGuideData.step == 13) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group10/Group 10-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '489rpx',
|
||||
top: 580*2+'rpx',
|
||||
left: 0+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '267rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group10/Group 10-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '118rpx',
|
||||
top: 555*2+'rpx',
|
||||
left: 0+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group10/Group 10-3.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '118rpx',
|
||||
top: 555*2+'rpx',
|
||||
left: 140*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
}
|
||||
]
|
||||
this.$nextTick(() => {
|
||||
this.setFunctionGuideData({
|
||||
imgs: imgs,
|
||||
btnGroupPosition: '',
|
||||
tipsPosition: '',
|
||||
position: {
|
||||
bottom: '10px',
|
||||
left: this.tabIconPostion.left + 'px',
|
||||
width: `${this.tabIconPostion.width}px`,
|
||||
height: `${this.tabIconPostion.height}px`,
|
||||
}
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (this.functionGuideData.step == 14) {
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group12/Group 12-1.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '479rpx',
|
||||
top: 665*2+'rpx',
|
||||
left: 40*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '180rpx',
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/首页引导/Group12/Group 12-2.png',
|
||||
style:{
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '118rpx',
|
||||
top: 750*2+'rpx',
|
||||
left: 40*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
}
|
||||
]
|
||||
this.setFunctionGuideData({
|
||||
imgs: imgs,
|
||||
btnGroupPosition: '',
|
||||
tipsPosition: '',
|
||||
position: {
|
||||
bottom: 10 + 'px',
|
||||
left: this.messageIcon.left + 'px',
|
||||
width: `${this.messageIcon.width}px`,
|
||||
height: `${this.messageIcon.height}px`,
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
toEle(id, imgs) {
|
||||
this.getElementData(`#${id}`, res=>{
|
||||
if(res.left + res.width / 2 > this.screenWidth) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,454 +0,0 @@
|
||||
<template>
|
||||
<view class="pkg-product-land-mark" v-if="mapData">
|
||||
<view class="top-box" :style="{'backgroundColor':topBoxBgColor}">
|
||||
<view class="view-box">
|
||||
<view class="search-box flex ai-center">
|
||||
<input
|
||||
v-model="keyword"
|
||||
type="text"
|
||||
placeholder="搜索商品"
|
||||
placeholder-style="color:#999"
|
||||
@confirm="search()"
|
||||
/>
|
||||
<image
|
||||
:src="webUrl+'/20231223183627184005.png'"
|
||||
mode="scaleToFill"
|
||||
style="width:30rpx;height:30rpx"
|
||||
@click="search()"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="map-box">
|
||||
<image class="img-map" :src="mapData.mapImage" mode="widthFix"/>
|
||||
|
||||
<view
|
||||
v-for="(item, index) in mapLocations"
|
||||
:key="index"
|
||||
class="item"
|
||||
:style="{'left':item.gx+'rpx','top':item.gy+'rpx'}"
|
||||
@click="goGoods(item.productId)"
|
||||
>
|
||||
<view class="round">
|
||||
<view class="line" :class="'line-'+directionClass[item.labelDirection]"></view>
|
||||
</view>
|
||||
<view class="label flex ai-end" :class="'label-'+directionClass[item.labelDirection]">
|
||||
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection===4"/>
|
||||
<view class="title flex ai-center">{{ item.mapTitle }}</view>
|
||||
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection!==4"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="nav flex">
|
||||
<view class="flex flex-0 ai-center" :class="{'active': navIndex===index}" v-for="(item,index) in navList"
|
||||
:key="index" @click="changeNav(index)">{{ item.provinceName }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="main-box" v-if="mapData.recommended.storeImage"
|
||||
@click="goGoods(mapData.recommended.productId)">
|
||||
<image class="bg-main" :src="mapData.recommended.storeImage" mode="scaleToFill"/>
|
||||
<view class="box-mask flex flex-col jc-end">
|
||||
<view class="one-t bold">{{ mapData.recommended.title }}</view>
|
||||
<view class="more-t">{{ mapData.recommended.description }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list-box flex flex-wrap">
|
||||
<view class="item" v-for="item in goods" :key="item.id" @click="goGoods(item.productId)">
|
||||
<image :src="item.storeImage" mode="scaleToFill"/>
|
||||
<view class="content flex flex-col jc-between">
|
||||
<view class="more-t bold">{{ item.title }}</view>
|
||||
<view class="flex jc-between ai-center">
|
||||
<text class="price">¥{{ item.price }}</text>
|
||||
<image class="btn" :src="webUrl+'/20231114151028082368.png'" mode="scaleToFill"/>
|
||||
<!-- <view class="btn flex jc-center ai-center">立即购买</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<image class="img-nodata" :src="webUrl+'/20231023131208675588.png'" mode="scaleToFill"
|
||||
v-if="goods.length===0"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getProvince, getProvinceGoods, getProvinceList} from "@/api/product";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: 'LandMarkPage',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
keyword: '',
|
||||
page: 1,
|
||||
navList: [],
|
||||
navIndex: 0,
|
||||
mapData: null,
|
||||
mapLocations: [],
|
||||
goods: [],
|
||||
directionClass: ['', 'up', 'right', 'down', 'left'],
|
||||
pageKeyId: Object.freeze('landmarkGoodsIndex')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
topBoxBgColor() {
|
||||
return this.navList.length > 0 ? this.navList[this.navIndex]['backgroundColor'] : '#FFFFFF';
|
||||
},
|
||||
viewBoxBgColor() {
|
||||
return this.mapData?.backgroundColor || '#FFFFFF';
|
||||
},
|
||||
scale() {
|
||||
return 718 / (this.mapData?.mapImageWidth || 1);
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getNavList();
|
||||
},
|
||||
onHide() {
|
||||
this.pageToHideHandle()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.page++;
|
||||
this.fetchGoods();
|
||||
},
|
||||
methods: {
|
||||
getNavList() {
|
||||
getProvinceList().then(({data}) => {
|
||||
this.navList = data;
|
||||
this.changeNav(this.navIndex);
|
||||
});
|
||||
},
|
||||
|
||||
search() {
|
||||
this.page = 1;
|
||||
this.fetchGoods();
|
||||
},
|
||||
|
||||
changeNav(index) {
|
||||
this.navIndex = index;
|
||||
this.page = 1;
|
||||
this.getMap();
|
||||
this.fetchGoods();
|
||||
},
|
||||
|
||||
getMap() {
|
||||
const id = this.navList[this.navIndex]['id']
|
||||
getProvince(id).then(({data}) => {
|
||||
this.mapData = data;
|
||||
this.mapLocations = data.mapLocations;
|
||||
this.calcPosition();
|
||||
});
|
||||
},
|
||||
|
||||
// 计算位置
|
||||
calcPosition() {
|
||||
this.mapLocations?.forEach(item => {
|
||||
item.gx = item.x * this.scale;
|
||||
item.gy = item.y * this.scale;
|
||||
})
|
||||
},
|
||||
|
||||
fetchGoods() {
|
||||
const id = this.navList[this.navIndex]['id']
|
||||
getProvinceGoods(id, this.keyword, this.page).then(({data}) => {
|
||||
if (this.page === 1) this.goods = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.goods.push(data[i]);
|
||||
}
|
||||
})
|
||||
},
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${id}&from=landmark`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.pkg-product-land-mark {
|
||||
background: #F7F3ED;
|
||||
|
||||
image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.top-box {
|
||||
padding: 32rpx 0 20rpx;
|
||||
|
||||
.view-box {
|
||||
position: relative;
|
||||
margin: 0 16rpx;
|
||||
border-radius: 40rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.search-box {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 34rpx;
|
||||
width: 650rpx;
|
||||
height: 64rpx;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 32rpx;
|
||||
background: #FFFFFF;
|
||||
z-index: 10;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
line-height: 64rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.map-box {
|
||||
position: relative;
|
||||
width: 718rpx;
|
||||
|
||||
.img-map {
|
||||
width: 718rpx;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.item {
|
||||
position: absolute;
|
||||
|
||||
.round {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 8rpx rgba(225, 38, 65, .4);;
|
||||
background: #E12641;
|
||||
}
|
||||
|
||||
.line {
|
||||
position: relative;
|
||||
border: 2rpx solid #E12641;
|
||||
}
|
||||
|
||||
.line-up {
|
||||
left: 50%;
|
||||
transform: translate(-50%, -100%);
|
||||
width: 0;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.line-right {
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
width: 30rpx;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.line-down {
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 0;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.line-left {
|
||||
top: 50%;
|
||||
transform: translate(-100%, -50%);
|
||||
width: 30rpx;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
position: relative;
|
||||
|
||||
.cover {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
box-sizing: border-box;
|
||||
border: 6rpx solid #E12641;
|
||||
border-radius: 50%;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 32rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 10rpx;
|
||||
padding: 0 16rpx;
|
||||
background: #E12641;
|
||||
color: #FFFFFF;
|
||||
font-size: 22rpx;
|
||||
line-height: 32rpx;
|
||||
white-space: nowrap;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.label-up {
|
||||
top: -80rpx;
|
||||
left: -50%;
|
||||
|
||||
.title {
|
||||
margin-right: -9rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.label-right {
|
||||
top: -40rpx;
|
||||
left: 32rpx;
|
||||
|
||||
.title {
|
||||
margin-right: -9rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.label-down {
|
||||
left: -50%;
|
||||
|
||||
.title {
|
||||
margin-right: -9rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.label-left {
|
||||
left: -100%;
|
||||
transform: translate(-30rpx, -40rpx);
|
||||
|
||||
.title {
|
||||
margin-left: -9rpx;
|
||||
border-radius: 0 20rpx 20rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav {
|
||||
padding: 30rpx 20rpx 0;
|
||||
overflow-x: scroll;
|
||||
|
||||
view {
|
||||
height: 52rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 18rpx;
|
||||
border: 4rpx solid transparent;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
border-color: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-box {
|
||||
position: relative;
|
||||
width: 718rpx;
|
||||
height: 360rpx;
|
||||
margin: 24rpx 16rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.bg-main {
|
||||
width: 718rpx;
|
||||
height: 360rpx;
|
||||
}
|
||||
|
||||
.box-mask {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx 16rpx 16rpx;
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
|
||||
color: #FFFFFF;
|
||||
|
||||
.one-t {
|
||||
margin-bottom: 16rpx;
|
||||
font-size: 46rpx;
|
||||
line-height: 52rpx;
|
||||
}
|
||||
|
||||
.more-t {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding-top: 10rpx;
|
||||
border-top: 1rpx solid #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-box {
|
||||
margin-top: 24rpx;
|
||||
padding: 0 16rpx 34rpx;
|
||||
|
||||
.item {
|
||||
width: 234rpx;
|
||||
height: 380rpx;
|
||||
margin-right: 8rpx;
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
background: #FFFFFF;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 234rpx;
|
||||
height: 234rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 122rpx;
|
||||
margin: 6rpx 6rpx 18rpx;
|
||||
|
||||
.more-t {
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
color: #DC1616;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 118rpx;
|
||||
height: 42rpx;
|
||||
//background: linear-gradient(180deg, #EFEDC7 0%, #EAC94B 100%);
|
||||
//border-radius: 4rpx;
|
||||
//color: #764A00;
|
||||
//font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.img-nodata {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 352rpx;
|
||||
height: 338rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,151 +0,0 @@
|
||||
<template>
|
||||
<view class="apply-return">
|
||||
<view class="goodsStyle acea-row row-between" v-for="cart in orderInfo.cartInfo" :key="cart.id">
|
||||
<view class="pictrue">
|
||||
<image v-if="orderInfo.isGiftCardReceiveBlind === 0" :src="cart.productInfo.image" class="image" />
|
||||
<image v-else class="image" :src="webUrl+'/orderIcon/盲盒礼包.png'"></image>
|
||||
</view>
|
||||
<view class="text acea-row row-between" >
|
||||
<view class="name line2">{{ orderInfo.isGiftCardReceiveBlind === 0 ? cart.productInfo.storeName : '盲盒礼包' }}</view>
|
||||
<view class="money" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
||||
<view>
|
||||
¥{{
|
||||
cart.productInfo.attrInfo
|
||||
? cart.productInfo.attrInfo.price
|
||||
: cart.productInfo.price
|
||||
}}
|
||||
</view>
|
||||
<view class="num">x{{ cart.cartNum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>退货件数</view>
|
||||
<view class="num">{{ orderInfo.totalNum }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
||||
<view>退款金额</view>
|
||||
<view class="num">¥{{ orderInfo.payPrice }}</view>
|
||||
</view>
|
||||
<picker :value="reason" :range="reasonList" @change="changeReason">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>退款原因</view>
|
||||
<view class="num">{{reason}}</view>
|
||||
<text class="iconfont icon-jiantou"></text>
|
||||
</view>
|
||||
</picker>
|
||||
<view class="item textarea acea-row row-between">
|
||||
<view>备注说明</view>
|
||||
<textarea placeholder="填写备注信息,100字以内" class="num inp" v-model="refundReasonWapExplain"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="returnBnt bg-color-red" @click="submit">申请退款</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
orderDetail,
|
||||
getRefundReason,
|
||||
postOrderRefund
|
||||
} from "@/api/order";
|
||||
import {
|
||||
trim
|
||||
} from "@/utils";
|
||||
import {
|
||||
VUE_APP_API_URL
|
||||
} from "@/config";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "goodsReturn",
|
||||
components: {
|
||||
// VueCoreImageUpload
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
url: `${VUE_APP_API_URL}/upload/image`,
|
||||
headers: {
|
||||
Authorization: "Bearer " + this.$store.state.token
|
||||
},
|
||||
id: 0,
|
||||
orderInfo: {},
|
||||
reasonList: [],
|
||||
reason: "",
|
||||
refundReasonWapExplain: "",
|
||||
pageKeyId: Object.freeze('userOrderRefundApply')
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeReason(e) {
|
||||
this.reason = this.reasonList[e.mp.detail.value];
|
||||
},
|
||||
getOrderDetail() {
|
||||
orderDetail(this.id)
|
||||
.then(res => {
|
||||
this.orderInfo = res.data;
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
getRefundReason() {
|
||||
getRefundReason().then(res => {
|
||||
this.reasonList = res.data;
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
const refundReasonWapExplain = trim(this.refundReasonWapExplain),
|
||||
text = this.reason;
|
||||
if (!text) {
|
||||
uni.showToast({
|
||||
title: "请选择退款原因",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return
|
||||
}
|
||||
postOrderRefund({
|
||||
text,
|
||||
uni: this.orderInfo.orderId,
|
||||
refundReasonWapExplain
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$yrouter.back();
|
||||
}, 1500);
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.$yroute.query.id || 0;
|
||||
this.getOrderDetail();
|
||||
this.getRefundReason();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.apply-return .list .item .inp {
|
||||
padding: 4rpx 20rpx;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
@@ -1,403 +0,0 @@
|
||||
<template>
|
||||
<view class="logistics">
|
||||
<view class="header acea-row row-between row-top" v-for="cart in cartInfo" :key="cart.id">
|
||||
<view class="pictrue">
|
||||
<image :src="cart.productInfo.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-between">
|
||||
<view class="name line2">{{ cart.productInfo.store_name }}</view>
|
||||
<view class="money">
|
||||
<view>¥{{ cart.truePrice }}</view>
|
||||
<view>x{{ cart.cart_num }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="logisticsCon" style="margin-bottom: 5px">
|
||||
<view class="company acea-row row-between-wrapper">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="iconfont icon-wuliu"></view>
|
||||
<view class="text">
|
||||
<view>
|
||||
<text class="name line1">物流公司:</text>
|
||||
{{ orderInfo.deliveryName }}
|
||||
</view>
|
||||
<view class="express line1">
|
||||
<text class="name">快递单号:</text>
|
||||
{{ orderInfo.deliveryId }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="copy acea-row row-center-wrapper copy-data"
|
||||
@click="copyClipboard(orderInfo.deliveryId)"
|
||||
>复制单号</view>
|
||||
</view>
|
||||
<view class="item" v-for="(express, expressListIndex) in expressList" :key="expressListIndex">
|
||||
<view class="circular" :class="expressListIndex === 0 ? 'on' : ''"></view>
|
||||
<view class="text">
|
||||
<view :class="expressListIndex === 0 ? 'font-color-red' : ''">{{ express.status }}</view>
|
||||
<view class="data">{{ express.time }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 物流进度条 -->
|
||||
<view class="div-bg bg-white" style="font-size:12px; background:#fff;">
|
||||
<!--物流跟踪-->
|
||||
<view style="margin-bottom:5px;">
|
||||
<view
|
||||
class="bg-white"
|
||||
style="width: 92%; margin-left: 4%;margin: auto;padding-left: 15px;padding-right: 15px;padding-top: 10px"
|
||||
>
|
||||
<view style="font-size: 26rpx;color: #111111; margin: 5px 0">
|
||||
物流跟踪
|
||||
<!--物流跟踪-->
|
||||
</view>
|
||||
<view>
|
||||
<view class="track-rcol">
|
||||
<view class="track-list">
|
||||
<view>
|
||||
<view
|
||||
class="track-list-item"
|
||||
v-for="(item,logisticsListindex) in logisticsList"
|
||||
:key="logisticsListindex"
|
||||
>
|
||||
<view class="active" v-if="logisticsListindex===0">
|
||||
<view></view>
|
||||
<i class="node-icon"></i>
|
||||
<text class="txt">{{item.acceptStation}}</text>
|
||||
<text class="time">{{item.acceptTime}}</text>
|
||||
</view>
|
||||
<view
|
||||
v-if="logisticsListindex > 0 && logisticsListindex !== logisticsList.length-1"
|
||||
>
|
||||
<i class="node-icon"></i>
|
||||
<text class="txt">{{item.acceptStation}}</text>
|
||||
<text class="time">{{item.acceptTime}}</text>
|
||||
</view>
|
||||
<view v-if="logisticsListindex === logisticsList.length-1" class="finall">
|
||||
<i class="div-spilander"></i>
|
||||
<i class="node-icon"></i>
|
||||
<text class="txt">{{item.acceptStation}}</text>
|
||||
<text class="time">{{item.acceptTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="no-express" v-if="loaded && !expressList.length">
|
||||
<image :src="webUrl+'/20210203153343122397.png'" />
|
||||
</view>
|
||||
<Recommend></Recommend>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import Recommend from "@/components/Recommend";
|
||||
import { express, orderDetail } from "@/api/order";
|
||||
import { copyClipboard } from "@/utils";
|
||||
|
||||
const NAME = "Logistics";
|
||||
|
||||
export default {
|
||||
name: NAME,
|
||||
components: {
|
||||
Recommend
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
id: "",
|
||||
index: null,
|
||||
cartInfo: [],
|
||||
orderInfo: {},
|
||||
expressList: [],
|
||||
loaded: false,
|
||||
logisticsList: [
|
||||
{
|
||||
message: "暂无数据",
|
||||
messageDate: ""
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad(opts) {
|
||||
this.index = opts.index || 0;
|
||||
},
|
||||
watch: {
|
||||
$yroute(n) {
|
||||
if (n.name === NAME && this.$yroute.query.id !== this.id) {
|
||||
this.id = this.$yroute.query.id;
|
||||
this.getExpress();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
this.id = this.$yroute.query.id;
|
||||
this.getExpress();
|
||||
},
|
||||
methods: {
|
||||
copyClipboard,
|
||||
getExpressInfo() {
|
||||
let params = {
|
||||
orderCode: this.id,
|
||||
shipperCode: this.orderInfo.deliverySn,
|
||||
logisticCode: this.orderInfo.deliveryId
|
||||
};
|
||||
express(params)
|
||||
.then(res => {
|
||||
this.logisticsList = res.data.Traces.reverse();
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg ,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
getExpress() {
|
||||
console.log(this.id, "this.id");
|
||||
|
||||
if (!this.id) {
|
||||
uni.showToast({
|
||||
title: '订单信息错误',
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.loaded = false;
|
||||
orderDetail(this.id)
|
||||
.then(res => {
|
||||
console.log(this.index, "this.orderInfo");
|
||||
const { data } = res;
|
||||
const current = data.deliveryInfo[+this.index ];
|
||||
console.log(current, "current");
|
||||
this.orderInfo = current;
|
||||
this.getExpressInfo();
|
||||
// const result = res.data.express.result || {};
|
||||
// this.cartInfo = res.data.order.cartInfo;
|
||||
// this.expressList = result.list || [];
|
||||
// this.loaded = true;
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg ,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.no-express {
|
||||
margin: 1.5 * 100rpx 0;
|
||||
}
|
||||
|
||||
.no-express image {
|
||||
width: 6 * 100rpx;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.message-text {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 1 * 100rpx;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
line-height: 3 * 100rpx;
|
||||
letter-spacing: 0 * 100rpx;
|
||||
color: #333333;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.fontblack {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.img2 {
|
||||
width: 0.81 * 100rpx;
|
||||
height: 0.8 * 100rpx;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.addressshow2 {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
width: 75%;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
font-size: 1 * 100rpx;
|
||||
}
|
||||
|
||||
.addressshow1 {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
width: 75%;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
font-size: 1 * 100rpx;
|
||||
}
|
||||
|
||||
.orderTitle {
|
||||
font-size: 1 * 100rpx;
|
||||
color: #333333;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
height: 2.5 * 100rpx;
|
||||
}
|
||||
|
||||
.orderDetail {
|
||||
font-size: 0.26 * 100rpx;
|
||||
color: #666666;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.border-ceter {
|
||||
width: 92%;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.pay-button {
|
||||
width: 88%;
|
||||
height: 2.6 * 100rpx;
|
||||
position: relative;
|
||||
background-color: red;
|
||||
color: white;
|
||||
|
||||
margin-left: 6%;
|
||||
}
|
||||
|
||||
ul view {
|
||||
list-style: none;
|
||||
font-size: 0.24 * 100rpx;
|
||||
}
|
||||
|
||||
ul {
|
||||
}
|
||||
|
||||
.track-rcol {
|
||||
}
|
||||
|
||||
.track-list {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.track-list > view {
|
||||
position: relative;
|
||||
padding: 0 0 0.5 * 100rpx 20rpx;
|
||||
}
|
||||
.track-list .track-list-item {
|
||||
position: relative;
|
||||
padding: 0 0 0.5 * 100rpx 20rpx;
|
||||
line-height: 0.3 * 100rpx;
|
||||
border-left: 1px solid #d9d9d9;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.track-list view.first {
|
||||
color: red;
|
||||
padding-top: 0;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
border-left: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.track-list view.node-icon {
|
||||
position: absolute;
|
||||
left: -6.5px;
|
||||
border-radius: 50%;
|
||||
width: 0.2 * 100rpx;
|
||||
height: 0.2 * 100rpx;
|
||||
top: 4px;
|
||||
background-color: #b2b2b2;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.track-list view.active .node-icon {
|
||||
background-position: 0 -72px;
|
||||
background-color: #ea7c0a;
|
||||
width: 0.3 * 100rpx;
|
||||
z-index: 2;
|
||||
height: 0.3 * 100rpx;
|
||||
position: absolute;
|
||||
left: -0.19 * 100rpx;
|
||||
top: 0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.track-list view.time {
|
||||
margin-right: 20px;
|
||||
position: relative;
|
||||
top: 4px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
color: #999;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.track-list view.txt {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
color: #999;
|
||||
left: 0.2 * 100rpx;
|
||||
top: 0.04 * 100rpx;
|
||||
}
|
||||
|
||||
.track-list view.first .time {
|
||||
text-align: left;
|
||||
width: 94%;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.track-list view.first .txt {
|
||||
color: red;
|
||||
text-align: left;
|
||||
width: 94%;
|
||||
}
|
||||
|
||||
.track-list view.finall {
|
||||
padding: 0px 0 0.5 * 100rpx 5px;
|
||||
line-height: 18px;
|
||||
border-color: white;
|
||||
border-left: 1px solid #ffffff;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.track-list view.finall .div-spilander {
|
||||
width: 1px;
|
||||
position: absolute;
|
||||
left: -1.5px;
|
||||
height: 0.5 * 100rpx;
|
||||
background-color: #d9d9d9;
|
||||
}
|
||||
</style>
|
||||
@@ -1127,7 +1127,7 @@ export default {
|
||||
},
|
||||
goLogistics(order) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/Logistics/index",
|
||||
path: "/pagesOrder/order/Logistics/index",
|
||||
query: {
|
||||
id: order.orderId
|
||||
}
|
||||
@@ -1154,7 +1154,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
path: "/pagesOrder/order/OrderDetails/index",
|
||||
query: {
|
||||
id: order.orderId,
|
||||
isGift: order.isGiftCardSend ? 1 : ''
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -457,7 +457,7 @@ export default {
|
||||
showStoreList() {
|
||||
this.$store.commit("get_to", "orders")
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/StoreList/index"
|
||||
path: "/pagesShop/shop/StoreList/index"
|
||||
})
|
||||
},
|
||||
force2Decimal(value) {
|
||||
@@ -486,7 +486,7 @@ export default {
|
||||
const data = res.data;
|
||||
if (data.status === "EXTEND_ORDER") {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
path: "/pagesOrder/order/OrderDetails/index",
|
||||
query: {
|
||||
id: data.result.orderId
|
||||
}
|
||||
@@ -718,7 +718,7 @@ export default {
|
||||
duration: 2000
|
||||
})
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
path: "/pagesOrder/order/OrderDetails/index",
|
||||
query: {
|
||||
id: orderId
|
||||
}
|
||||
@@ -748,7 +748,7 @@ export default {
|
||||
this.afterPaySuccess(orderId, (drawTicketResult) => {
|
||||
if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
path: "/pagesOrder/order/OrderDetails/index",
|
||||
query: this.buildOrderDetailQuery(orderId, drawTicketResult)
|
||||
})
|
||||
} else {
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<template>
|
||||
<view class="payment-status">
|
||||
<!--失败时: 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-red-->
|
||||
<view class="iconfont icon-duihao2 bg-color-red"></view>
|
||||
<!-- 失败时:订单支付失败 -->
|
||||
<view class="status">订单支付成功</view>
|
||||
<view class="wrapper">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>订单编号</view>
|
||||
<view class="itemCom">wx3265361456134568</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>下单时间</view>
|
||||
<view class="itemCom">2019-01-09 18:05</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>支付方式</view>
|
||||
<view class="itemCom">微信支付</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>支付金额</view>
|
||||
<view class="itemCom">2222.00</view>
|
||||
</view>
|
||||
<!--失败时加上这个 -->
|
||||
<!--<view class='item acea-row row-between-wrapper'>-->
|
||||
<!--<view>失败原因</view>-->
|
||||
<!--<view class='itemCom'>账户余额不足</view>-->
|
||||
<!--</view>-->
|
||||
</view>
|
||||
<!--失败时: 重新购买 -->
|
||||
<view class="returnBnt bg-color-red">返回查看订单</view>
|
||||
<view class="returnBnt cart-color">返回首页</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -1,106 +0,0 @@
|
||||
<template>
|
||||
<view class="return-list" ref="container">
|
||||
<view class="goodWrapper" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
|
||||
<view class="iconfont icon-tuikuanzhong powder" v-if="parseInt(order._status._type) === -1"></view>
|
||||
<view class="iconfont icon-yituikuan" v-if="parseInt(order._status._type) === -2"></view>
|
||||
<image class="iconfont" :src="webUrl+'/20230713110051999762.png'" v-if="parseInt(order._status._type) === -3"/>
|
||||
<view class="orderNum">订单号:{{ order.orderId }}</view>
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(cart,cartInfoIndex) in order.cartInfo"
|
||||
:key="cartInfoIndex"
|
||||
@click="goOrderDetails(order)"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)"/>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="acea-row row-between-wrapper">
|
||||
<view class="name line1">{{ cart.productInfo.storeName }}</view>
|
||||
<view class="num">x {{ cart.cartNum }}</view>
|
||||
</view>
|
||||
<view
|
||||
class="attr line1"
|
||||
v-if="cart.productInfo.attrInfo"
|
||||
>{{ cart.productInfo.attrInfo.sku }}
|
||||
</view>
|
||||
<view class="attr line1" v-else>{{ cart.productInfo.storeName }}</view>
|
||||
<view class="money">¥{{ cart.productInfo.price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="totalSum">
|
||||
共{{ order.cartInfo.length || 0 }}件商品,总金额
|
||||
<text
|
||||
class="font-color-red price"
|
||||
>¥{{ order.payPrice }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="noCart" v-if="orderList.length === 0 && page > 1">
|
||||
<view class="pictrue">
|
||||
<image :src="webUrl+'/20210203155245713983.png'"/>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getOrderList} from "@/api/order";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "ReturnList",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
orderList: [],
|
||||
page: 1,
|
||||
limit: 20,
|
||||
loading: false,
|
||||
loaded: false,
|
||||
pageKeyId: Object.freeze('userOrderRefundList')
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goGoodsCon(cart) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
query: {id: cart.productInfo.id}
|
||||
});
|
||||
},
|
||||
goOrderDetails(order) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: {id: order.orderId}
|
||||
});
|
||||
},
|
||||
getOrderList() {
|
||||
const {page, limit} = this;
|
||||
if (this.loading || this.loaded) return;
|
||||
this.loading = true;
|
||||
getOrderList({
|
||||
page,
|
||||
limit,
|
||||
type: -3
|
||||
}).then(res => {
|
||||
this.orderList = this.orderList.concat(res.data);
|
||||
this.loading = false;
|
||||
this.loaded = res.data.length < limit;
|
||||
this.page++;
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getOrderList();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.getOrderList();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,165 +0,0 @@
|
||||
<template>
|
||||
<view class="evaluate-list" ref="container">
|
||||
<view class="header">
|
||||
<view class="generalComment acea-row row-between-wrapper">
|
||||
<view class="acea-row row-middle font-color-red">
|
||||
<text class="evaluate">评分</text>
|
||||
<view class="start" :class="'star' + replyData.replyStar"></view>
|
||||
</view>
|
||||
<view>
|
||||
<text class="font-color-red">{{ isTravelGroup ? replyData.replyChance || 0 : replyData.replyChance + '%' || 0 }}</text>
|
||||
<text> {{ ` 好评率` }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav acea-row row-middle">
|
||||
<view
|
||||
class="acea-row row-center-wrapper"
|
||||
v-for="(item, navListIndex) in navList"
|
||||
:key="navListIndex"
|
||||
@click="changeType(navListIndex)"
|
||||
>
|
||||
<view
|
||||
class="item"
|
||||
:class="currentActive === navListIndex ? 'bg-color-red' : ''"
|
||||
v-if="item.num"
|
||||
>
|
||||
<text>{{ item.evaluate }}({{ item.num }})</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<UserEvaluation :reply="reply"></UserEvaluation>
|
||||
<Loading :loaded="loadend" :loading="loading"></Loading>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import UserEvaluation from "@/components/UserEvaluation";
|
||||
import { getReplyConfig, getReplyList } from "@/api/store";
|
||||
import { getJiaLouProductReply, getJiaLouProductReplyCount } from "@/api/qianxian";
|
||||
import Loading from "@/components/Loading";
|
||||
|
||||
export default {
|
||||
name: "EvaluateList",
|
||||
components: {
|
||||
UserEvaluation,
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
product_id: 0,
|
||||
isTravelGroup: false,
|
||||
replyData: {},
|
||||
navList: [
|
||||
{ evaluate: "全部", num: 0 },
|
||||
{ evaluate: "好评", num: 0 },
|
||||
{ evaluate: "中评", num: 0 },
|
||||
{ evaluate: "差评", num: 0 }
|
||||
],
|
||||
currentActive: 0,
|
||||
page: 1,
|
||||
limit: 8,
|
||||
reply: [],
|
||||
loadTitle: "",
|
||||
loading: false,
|
||||
loadend: false
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
this.product_id = this.$yroute.query.id;
|
||||
this.isTravelGroup = String(this.$yroute.query.isTravelGroup || '') === '1';
|
||||
this.getProductReplyCount();
|
||||
this.getProductReplyList();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.getProductReplyList();
|
||||
},
|
||||
methods: {
|
||||
getProductReplyCount: function() {
|
||||
let that = this;
|
||||
if (that.isTravelGroup) {
|
||||
getJiaLouProductReplyCount({
|
||||
travelGroupProductId: that.product_id
|
||||
}).then(res => {
|
||||
const data = res.data || {};
|
||||
that.$set(that, "replyData", data);
|
||||
that.navList[0].num = data.sumCount || 0;
|
||||
that.navList[1].num = data.goodCount || 0;
|
||||
that.navList[2].num = data.inCount || 0;
|
||||
that.navList[3].num = data.poorCount || 0;
|
||||
});
|
||||
} else {
|
||||
getReplyConfig(that.product_id).then(res => {
|
||||
const data = res.data || {};
|
||||
that.$set(that, "replyData", data);
|
||||
that.navList[0].num = data.sumCount || 0;
|
||||
that.navList[1].num = data.goodCount || 0;
|
||||
that.navList[2].num = data.inCount || 0;
|
||||
that.navList[3].num = data.poorCount || 0;
|
||||
});
|
||||
}
|
||||
},
|
||||
getProductReplyList: function() {
|
||||
let that = this;
|
||||
if (that.loading) return;
|
||||
if (that.loadend) return;
|
||||
that.loading = true;
|
||||
let q = { page: that.page, limit: that.limit, type: that.currentActive };
|
||||
if (that.isTravelGroup) {
|
||||
getJiaLouProductReply({
|
||||
travelGroupProductId: that.product_id,
|
||||
type: q.type,
|
||||
page: q.page,
|
||||
limit: q.limit
|
||||
}).then(res => {
|
||||
that.loading = false;
|
||||
const pageData = res.data || {};
|
||||
const rawList = Array.isArray(pageData.records) ? pageData.records : [];
|
||||
const list = rawList.map(item => {
|
||||
const productScore = Number(item.productScore) || 0;
|
||||
const serviceScore = Number(item.serviceScore) || 0;
|
||||
let star = productScore || serviceScore || 5;
|
||||
const skuText = '默认';
|
||||
const picturesArr = Array.isArray(item.pics) ? item.pics : [];
|
||||
return {
|
||||
...item,
|
||||
star,
|
||||
sku: item.travelGroupProductName || skuText,
|
||||
picturesArr
|
||||
};
|
||||
});
|
||||
that.reply.push.apply(that.reply, list);
|
||||
that.loadend = list.length < that.limit || !pageData.pages || that.page >= pageData.pages;
|
||||
that.page = that.page + 1;
|
||||
}).catch(() => {
|
||||
that.loading = false;
|
||||
});
|
||||
} else {
|
||||
getReplyList(that.product_id, q).then(res => {
|
||||
that.loading = false;
|
||||
const data = res.data || [];
|
||||
that.reply.push.apply(that.reply, data);
|
||||
that.loadend = data.length < that.limit;
|
||||
that.page = that.page + 1;
|
||||
}).catch(() => {
|
||||
that.loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
changeType: function(index) {
|
||||
let that = this;
|
||||
that.currentActive = index;
|
||||
that.page = 1;
|
||||
that.loadend = false;
|
||||
that.$set(that, "reply", []);
|
||||
that.getProductReplyList();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.noCommodity {
|
||||
height: 8*100rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -1,102 +0,0 @@
|
||||
<template>
|
||||
<view ref="container">
|
||||
<view class="collectionGoods" v-if="collectProductList.length > 0">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(item, collectProductListIndex) in collectProductList"
|
||||
:key="collectProductListIndex"
|
||||
@click="goGoodsCon(item)"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="item.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-column-between">
|
||||
<view class="infor line1">{{ item.storeName }}</view>
|
||||
<view class="acea-row row-between-wrapper">
|
||||
<view class="money font-color-red">¥{{ item.price }}</view>
|
||||
<view class="delete" @tap.stop="delCollection(collectProductListIndex)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loadend" :loading="loading"></Loading>
|
||||
<view
|
||||
class="noCommodity"
|
||||
style="background-color:#fff;"
|
||||
v-if="collectProductList.length < 1 && page > 1"
|
||||
>
|
||||
<view class="noPictrue">
|
||||
<image :src="webUrl+'/20210203154659687348.png'" class="image" />
|
||||
</view>
|
||||
<Recommend></Recommend>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import Recommend from "@/components/Recommend";
|
||||
import { getCollectUser, getCollectDel } from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
export default {
|
||||
name: "GoodsCollection",
|
||||
components: {
|
||||
Recommend,
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
collectProductList: [],
|
||||
loadTitle: "",
|
||||
loading: false,
|
||||
loadend: false
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
this.get_user_collect_product();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.get_user_collect_product();
|
||||
},
|
||||
methods: {
|
||||
goGoodsCon(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
query: { id: item.pid }
|
||||
});
|
||||
},
|
||||
get_user_collect_product: function() {
|
||||
let that = this;
|
||||
if (that.loading) return; //阻止下次请求(false可以进行请求);
|
||||
if (that.loadend) return; //阻止结束当前请求(false可以进行请求);
|
||||
that.loading = true;
|
||||
getCollectUser(that.page, that.limit).then(res => {
|
||||
that.loading = false;
|
||||
//apply();js将一个数组插入另一个数组;
|
||||
that.collectProductList.push.apply(that.collectProductList, res.data);
|
||||
that.loadend = res.data.length < that.limit; //判断所有数据是否加载完成;
|
||||
that.page = that.page + 1;
|
||||
});
|
||||
},
|
||||
//删除收藏;
|
||||
delCollection: function(index) {
|
||||
let that = this,
|
||||
id = that.collectProductList[index].pid,
|
||||
category = that.collectProductList[index].category;
|
||||
getCollectDel(id, category).then(function() {
|
||||
uni.showToast({
|
||||
title: "删除成功",
|
||||
icon: "success",
|
||||
duration: 2000,
|
||||
complete: () => {
|
||||
that.collectProductList.splice(index, 1);
|
||||
that.$set(that, "collectProductList", that.collectProductList);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1070,12 +1070,12 @@ export default {
|
||||
},
|
||||
goStoreList() {
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/StoreList/index'
|
||||
path: '/pagesShop/shop/StoreList/index'
|
||||
})
|
||||
},
|
||||
goEvaluateList(id) {
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/EvaluateList/index',
|
||||
path: '/pagesShop/shop/EvaluateList/index',
|
||||
query: {
|
||||
id
|
||||
}
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
<template>
|
||||
<view class="evaluate-con">
|
||||
<view
|
||||
v-if="isTravelGroup && travelOrderInfo && travelOrderInfo.travelGroupOrderInfo && travelOrderInfo.travelGroupOrderInfo.travelGroupProduct"
|
||||
class="goodsStyle acea-row row-between"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="travelOrderInfo.travelGroupOrderInfo.travelGroupProduct.mainImage" class="image"/>
|
||||
</view>
|
||||
<view class="text acea-row row-between">
|
||||
<view class="name line2">{{ travelOrderInfo.travelGroupOrderInfo.travelGroupProduct.name }}</view>
|
||||
<view class="money">
|
||||
<view>¥{{ travelOrderInfo.travelGroupOrderInfo.travelGroupProduct.price }}</view>
|
||||
<view class="num">x1</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-else-if="orderCon.productInfo"
|
||||
class="goodsStyle acea-row row-between"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="orderCon.productInfo.image" class="image"/>
|
||||
</view>
|
||||
<view class="text acea-row row-between">
|
||||
<view class="name line2">{{ orderCon.productInfo.storeName }}</view>
|
||||
<view class="money">
|
||||
<view>¥{{ orderCon.productInfo.price }}</view>
|
||||
<view class="num">x{{ orderCon.cartNum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="score">
|
||||
<view
|
||||
v-for="(item, scoreListIndexw) in scoreList"
|
||||
:key="scoreListIndexw"
|
||||
class="item acea-row row-middle"
|
||||
>
|
||||
<view>{{ item.name }}</view>
|
||||
<view class="starsList">
|
||||
<text
|
||||
v-for="(itemn, starsIndexn) in item.stars"
|
||||
:key="starsIndexn"
|
||||
:class="item.index >= starsIndexn ? 'icon-shitixing font-color-red' : 'icon-kongxinxing'"
|
||||
class="iconfont"
|
||||
@click="stars(starsIndexn, scoreListIndexw)"
|
||||
/>
|
||||
</view>
|
||||
<text class="evaluate">{{ item.index === -1 ? "" : item.index + 1 + "分" }}</text>
|
||||
</view>
|
||||
<view class="textarea">
|
||||
<textarea
|
||||
v-model="expect"
|
||||
placeholder="商品满足你的期待么?说说你的想法,分享给想买的他们吧~"
|
||||
:maxlength="140"
|
||||
/>
|
||||
<view class="v12-px-4 v12-font-24 v12-dark1-text v12-mb-3">{{ expect.length || 0 }} / 140</view>
|
||||
<view class="upload-title">
|
||||
添加视频/图片
|
||||
<text class="txt">
|
||||
({{ videoArr.length + picArr.length }}/9)
|
||||
</text>
|
||||
</view>
|
||||
<view class="upload-wrapper">
|
||||
<view v-show="picArr.length < 9" class="video-upload">
|
||||
<tm-upload
|
||||
:upload_img_wh="uploadImgWH"
|
||||
:upload_max="1"
|
||||
:upload_count="1"
|
||||
:url="uploadUrl"
|
||||
:header="uploadHeader"
|
||||
type='video'
|
||||
@change="uploadedVideoChange"
|
||||
/>
|
||||
</view>
|
||||
<view class="pic-upload">
|
||||
<tm-upload
|
||||
:upload_img_wh="uploadImgWH"
|
||||
:upload_max="9 - videoArr.length"
|
||||
:upload_count="9 - videoArr.length"
|
||||
:url="uploadUrl"
|
||||
:header="uploadHeader"
|
||||
:showBlankPlaceholder="picArr.length !== 9"
|
||||
type='image'
|
||||
@change="uploadedPicChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="evaluateBnt bg-color-red" @click="submit">立即评价</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { postOrderComment, postOrderProduct } from '@/api/store'
|
||||
import { fetchSojoumOrderDetail, sojoumOrderComment } from '@/api/sojoumOrder'
|
||||
import { trim } from '@/utils'
|
||||
import { required } from '@/utils/validate'
|
||||
import { validatorDefaultCatch } from '@/utils/dialog'
|
||||
import tmUpload from '@/components/tm-upload/tm-upload.vue'
|
||||
import {
|
||||
VUE_APP_API_URL
|
||||
} from '@/config'
|
||||
|
||||
export default {
|
||||
name: 'GoodsEvaluate',
|
||||
components: {
|
||||
tmUpload
|
||||
},
|
||||
props: {},
|
||||
data: function () {
|
||||
return {
|
||||
uploadUrl: VUE_APP_API_URL + '/api/upload',
|
||||
uploadImgWH: (750 - 3 * 16 - 2 * 32 - 16) / 3.0,
|
||||
uploadHeader: {
|
||||
Authorization: "Bearer " + this.$store.getters.token
|
||||
},
|
||||
orderCon: {
|
||||
cartProduct: {
|
||||
productInfo: {}
|
||||
}
|
||||
},
|
||||
isTravelGroup: false,
|
||||
travelOrderInfo: null,
|
||||
scoreList: [
|
||||
{
|
||||
name: '商品质量',
|
||||
stars: ['', '', '', '', ''],
|
||||
index: -1
|
||||
},
|
||||
{
|
||||
name: '服务态度',
|
||||
stars: ['', '', '', '', ''],
|
||||
index: -1
|
||||
}
|
||||
],
|
||||
uploadPictures: [],
|
||||
expect: '',
|
||||
unique: '',
|
||||
picArr: [],
|
||||
videoArr: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.unique = this.$yroute.query.id
|
||||
this.isTravelGroup = this.$yroute.query.isTravelGroup === '1'
|
||||
if (this.isTravelGroup) {
|
||||
this.getTravelOrderDetail()
|
||||
} else {
|
||||
this.getOrderProduct()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTravelOrderDetail() {
|
||||
fetchSojoumOrderDetail({ key: this.unique }).then(res => {
|
||||
this.travelOrderInfo = res.data
|
||||
})
|
||||
},
|
||||
getOrderProduct() {
|
||||
postOrderProduct(this.unique).then(res => {
|
||||
this.orderCon = res.data
|
||||
})
|
||||
},
|
||||
stars: function (indexn, indexw) {
|
||||
this.scoreList[indexw].index = indexn
|
||||
},
|
||||
uploadedVideoChange(uploadList) {
|
||||
this.videoArr = uploadList
|
||||
},
|
||||
uploadedPicChange(uploadList) {
|
||||
this.picArr = uploadList
|
||||
},
|
||||
async submit() {
|
||||
const expect = trim(this.expect).substring(0, 140)
|
||||
const product_score = this.scoreList[0].index + 1 === 0 ? "" : this.scoreList[0].index + 1
|
||||
const service_score = this.scoreList[1].index + 1 === 0 ? "" : this.scoreList[1].index + 1
|
||||
try {
|
||||
await this.$validator({
|
||||
product_score: [
|
||||
required('请选择商品质量分数', {
|
||||
type: 'number'
|
||||
})
|
||||
],
|
||||
service_score: [
|
||||
required('请选择服务态度分数', {
|
||||
type: 'number'
|
||||
})
|
||||
]
|
||||
}).validate({
|
||||
product_score,
|
||||
service_score
|
||||
})
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e)
|
||||
}
|
||||
const pics = this.picArr
|
||||
const video = this.videoArr[0] || ''
|
||||
const request = this.isTravelGroup
|
||||
? sojoumOrderComment({
|
||||
orderId: this.unique,
|
||||
comment: expect,
|
||||
pics,
|
||||
video,
|
||||
productScore: product_score,
|
||||
serviceScore: service_score
|
||||
})
|
||||
: postOrderComment({
|
||||
productScore: product_score,
|
||||
serviceScore: service_score,
|
||||
unique: this.unique,
|
||||
pics: this.picArr.join(','),
|
||||
comment: expect,
|
||||
video: this.videoArr.join(',')
|
||||
})
|
||||
request.then(() => {
|
||||
uni.showToast({
|
||||
title: '评价成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
this.$yrouter.back()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.upload-title {
|
||||
padding: 0 0 20rpx 16rpx;
|
||||
.txt {
|
||||
color: #999;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
.upload-wrapper {
|
||||
position: relative;
|
||||
padding: 0 0 0 16rpx;
|
||||
.video-upload {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 16rpx;
|
||||
z-index: 5;
|
||||
}
|
||||
.pic-upload {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
.evaluate-con .score .textarea .list .pictrue.uploadBnt {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
</style>
|
||||
@@ -1,78 +0,0 @@
|
||||
<template>
|
||||
<view class="quality-recommend">
|
||||
<!-- <view class="slider-banner swiper">
|
||||
<swiper indicatorDots="true" v-if="banner.length > 0">
|
||||
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
|
||||
<swiper-item>
|
||||
<image :src="item.img" class="slide-image" />
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view> -->
|
||||
<view class="title acea-row row-center-wrapper">
|
||||
<view class="line"></view>
|
||||
<view class="name">
|
||||
<text class="iconfont icon-cuxiaoguanli"></text>促销单品
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<Promotion-good :benefit="goodsList"></Promotion-good>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||
|
||||
import PromotionGood from "@/components/PromotionGood";
|
||||
import {
|
||||
getGroomList
|
||||
} from "@/api/store";
|
||||
export default {
|
||||
name: "GoodsPromotion",
|
||||
components: {
|
||||
// swiper,
|
||||
// swiperSlide,
|
||||
PromotionGood
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
imgUrls: [],
|
||||
goodsList: [],
|
||||
RecommendSwiper: {
|
||||
pagination: {
|
||||
el: ".swiper-pagination",
|
||||
clickable: true
|
||||
},
|
||||
autoplay: {
|
||||
disableOnInteraction: false,
|
||||
delay: 2000
|
||||
},
|
||||
loop: true,
|
||||
speed: 1000,
|
||||
observer: true,
|
||||
observeParents: true
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
this.getIndexGroomList();
|
||||
},
|
||||
methods: {
|
||||
getIndexGroomList: function() {
|
||||
let that = this;
|
||||
getGroomList(4)
|
||||
.then(res => {
|
||||
that.imgUrls = res.data.banner;
|
||||
that.goodsList = res.data.list;
|
||||
})
|
||||
.catch((err) => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,196 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="storeBox" ref="container">
|
||||
<view
|
||||
class="storeBox-box"
|
||||
v-for="(item, index) in storeList"
|
||||
:key="index"
|
||||
@click="checked(item)"
|
||||
>
|
||||
<view class="store-img">
|
||||
<img :src="item.image" lazy-load="true"/>
|
||||
</view>
|
||||
<view class="store-cent-left">
|
||||
<text class="store-name">{{ item.name }}</text>
|
||||
<text class="store-address line1">{{ item.address }}</text>
|
||||
</view>
|
||||
<view class="row-right">
|
||||
<view>
|
||||
<a class="store-phone" :href="'tel:' + item.phone">
|
||||
<text class="iconfont icon-dadianhua01"></text>
|
||||
</a>
|
||||
</view>
|
||||
<view class="store-distance" @click="showMaoLocation(item)">
|
||||
<text class="addressTxt" v-if="item.distance">距离{{ item.distance }}千米</text>
|
||||
<text class="addressTxt" v-else>查看地图</text>
|
||||
<text class="iconfont icon-youjian"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Loading from "@/components/Loading";
|
||||
import {storeListApi} from "@/api/store";
|
||||
import {mapGetters} from "vuex";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
|
||||
const LONGITUDE = "user_longitude";
|
||||
const LATITUDE = "user_latitude";
|
||||
const MAPKEY = "mapKey";
|
||||
export default {
|
||||
name: "storeList",
|
||||
components: {Loading},
|
||||
computed: mapGetters(["location", "goName"]),
|
||||
data() {
|
||||
return {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
loaded: false,
|
||||
loading: false,
|
||||
storeList: [],
|
||||
mapShow: false,
|
||||
system_store: {},
|
||||
mapKey: cookie.get(MAPKEY),
|
||||
locationShow: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.getOrderList();
|
||||
},
|
||||
methods: {
|
||||
showMaoLocation(data) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/map/index",
|
||||
query: data
|
||||
});
|
||||
},
|
||||
// 选中门店
|
||||
checked(e) {
|
||||
if (this.goName === "orders") {
|
||||
this.$store.commit("get_store", e);
|
||||
this.$yrouter.back();
|
||||
}
|
||||
},
|
||||
// 获取门店列表数据
|
||||
getList: function () {
|
||||
if (this.loading || this.loaded) return;
|
||||
this.loading = true;
|
||||
let data = {
|
||||
latitude: this.location.latitude, //纬度
|
||||
longitude: this.location.longitude, //经度
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
};
|
||||
storeListApi(data)
|
||||
.then(res => {
|
||||
this.loading = false;
|
||||
this.loaded = res.data.list.length < this.limit;
|
||||
this.storeList.push.apply(this.storeList, res.data.list);
|
||||
this.page = this.page + 1;
|
||||
this.mapKey = res.data.mapKey;
|
||||
})
|
||||
.catch(err => {
|
||||
this.$dialog.error(err.msg);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.geoPage {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.storeBox {
|
||||
background-color: #fff;
|
||||
padding: 0 0.3 * 100rpx;
|
||||
}
|
||||
|
||||
.storeBox-box {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.23 * 100rpx 0;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.store-cent {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.store-cent-left {
|
||||
width: 45%;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.store-img {
|
||||
width: 1.2 * 100rpx;
|
||||
height: 1.2 * 100rpx;
|
||||
border-radius: 0.06 * 100rpx;
|
||||
margin-right: 0.22 * 100rpx;
|
||||
}
|
||||
|
||||
.store-img img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.store-name {
|
||||
color: #282828;
|
||||
font-size: 0.3 * 100rpx;
|
||||
margin-bottom: 0.22 * 100rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.store-address {
|
||||
color: #666666;
|
||||
font-size: 0.24 * 100rpx;
|
||||
}
|
||||
|
||||
.store-phone {
|
||||
width: 0.5 * 100rpx;
|
||||
height: 0.5 * 100rpx;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
display: block;
|
||||
text-align: center;
|
||||
line-height: 0.5 * 100rpx;
|
||||
background-color: #e83323;
|
||||
margin-bottom: 0.22 * 100rpx;
|
||||
}
|
||||
|
||||
.store-distance {
|
||||
font-size: 0.22 * 100rpx;
|
||||
color: #e83323;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 0.2 * 100rpx;
|
||||
}
|
||||
|
||||
.row-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
width: 33.5%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,73 +0,0 @@
|
||||
<template>
|
||||
<view class="CustomerList">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
@click="goCustomerService(item)"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="item.avatar" />
|
||||
</view>
|
||||
<view class="text line1">{{ item.nickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { serviceList } from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "CustomerList",
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goCustomerService(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/user/CustomerService/index",
|
||||
query: { id: item.uid }
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
serviceList().then(res => {
|
||||
this.list = res.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.CustomerList {
|
||||
margin-top: 0.13*100rpx;
|
||||
}
|
||||
.CustomerList .item {
|
||||
height: 1.38*100rpx;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 0 0.24*100rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.CustomerList .item .pictrue {
|
||||
width: 0.9*100rpx;
|
||||
height: 0.9*100rpx;
|
||||
border-radius: 50%;
|
||||
border: 0.03*100rpx solid #fff;
|
||||
box-shadow: 0 0 0.1*100rpx 0.05*100rpx #f3f3f3;
|
||||
-webkit-box-shadow: 0 0 0.1*100rpx 0.05*100rpx #f3f3f3;
|
||||
-moz-box-shadow: 0 0 0.1*100rpx 0.05*100rpx #f3f3f3;
|
||||
}
|
||||
.CustomerList .item .pictrue image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.CustomerList .item .text {
|
||||
width: 5.82*100rpx;
|
||||
font-size: 0.32*100rpx;
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
@@ -1,357 +0,0 @@
|
||||
<template>
|
||||
<view class="v12-pb-10">
|
||||
<view class="v12-justify-around v12-pa-2 v12-white data-nav">
|
||||
<view
|
||||
v-for="(day, i) in currentWeek"
|
||||
:key="i"
|
||||
class="v12-font-26"
|
||||
>
|
||||
<view style="color:#BCBCBC" class="day-wrap">{{ getDate(day) }}</view>
|
||||
<view class="v12-dark-text day-wrap" :class="{'active': actived === i, 'disabled': disabled(day)}" @click="handle(day, i)">{{ getDay(day) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isLoad" class="history-wrap">
|
||||
<view
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
class="v12-mt-3"
|
||||
:id="`history-${item.historyDate}`"
|
||||
>
|
||||
<view class="" style="height: 56px; width: 100%" v-if="isSrcoll"></view>
|
||||
<view >
|
||||
<text class="v12-font-bold v12-font-32">{{ item.historyDate }}</text>
|
||||
<view class="wrapper">
|
||||
<view
|
||||
v-for="(historyItem, historyKey) in item.histories"
|
||||
:key="historyKey"
|
||||
class="v12-white v12-radius-20 history-card"
|
||||
@click="goodsDetail(historyItem)"
|
||||
>
|
||||
<view class="delete-icon" @click.stop="deleteHistoryItem(historyItem)">
|
||||
<u-icon
|
||||
name="close"
|
||||
color="#fff"
|
||||
size="16"
|
||||
/>
|
||||
</view>
|
||||
<image
|
||||
class="goods-img"
|
||||
:src="historyItem.image"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<view v-if="isInvalidItem(historyItem)" class="invalid-mask">
|
||||
<text class="invalid-mask-text">商品已下架</text>
|
||||
</view>
|
||||
<view class="good-info">
|
||||
<view
|
||||
v-if="historyItem.couponName"
|
||||
:style="{
|
||||
opacity: !historyItem.couponName ? 0 : 1
|
||||
}"
|
||||
class="v12-align-center v12-mt-2"
|
||||
>
|
||||
<view class="v12-primary-text v12-primary-border v12-radius-6 v12-font-18 v12-px-1">券</view>
|
||||
<view class="v12-primary-text v12-primary-border v12-radius-6 v12-font-18 v12-px-1">{{ historyItem.couponName }}</view>
|
||||
</view>
|
||||
<view class="more-t v12-font-20 v12-mt-2">{{ historyItem.storeName }}</view>
|
||||
<view class="v12-justify-between v12-mt-2 price">
|
||||
<view v-if="!historyItem.isNegotiable" class="v12-font-bold v12-primary-text" :class="{'v12-align-center': (historyItem.price).toString().length < 5 && (historyItem.otPrice).toString().length < 5 }">
|
||||
<text class="v12-font-16">¥</text>
|
||||
<text class="v12-font-24 v12-mr-1">{{ historyItem.price }}</text>
|
||||
<view class="ot-price v12-font-weight-400">
|
||||
<text class="v12-font-22">¥</text>
|
||||
<text class="v12-font-22">{{ historyItem.otPrice }}</text>
|
||||
<view class="under-line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="v12-font-26 v12-primary-text v12-font-bold">价格面议</view>
|
||||
<image
|
||||
:src="webUrl+'/orderIcon/组 355.png'"
|
||||
class="icon"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-px-6" v-if="items.length > 0">
|
||||
<u-divider text=" · 已经到底啦 · " textPosition="center"></u-divider>
|
||||
</view>
|
||||
<image
|
||||
v-if="items.length === 0"
|
||||
:src="webUrl + '/orderIcon/nohistory.png'"
|
||||
class="img-nodata v12-mt-16"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
<goo-skeleton
|
||||
v-else
|
||||
:show-avatar="false"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHistory, deleteHistory as deleteHistoryApi } from '@/api/user'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentWeek: [],
|
||||
actived: 0,
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
isLoad: false,
|
||||
items: [],
|
||||
isSrcoll: false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.queryHistory()
|
||||
},
|
||||
onShow() {
|
||||
this.$nextTick(() => {
|
||||
this.currentWeek = this.getWeek()
|
||||
this.actived = this.getActived()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
disabled(day) {
|
||||
const dayItems = this.items.filter(item => {
|
||||
return item.historyDate === day
|
||||
}).map(e => {
|
||||
return e.histories
|
||||
}).flat()
|
||||
return dayItems.length === 0
|
||||
},
|
||||
getActived() {
|
||||
const weekMap = this.currentWeek.map(e => new Date(e).getDay())
|
||||
const today = new Date().getDay()
|
||||
return weekMap.indexOf(today)
|
||||
},
|
||||
getWeek() {
|
||||
const dates = []
|
||||
const now = new Date();
|
||||
// 0-6, 0是周日
|
||||
const dayOfWeek = now.getDay()
|
||||
// 当前日
|
||||
const numDate = now.getDate()
|
||||
const numDaysToMonday = dayOfWeek - 1 > -1 ? dayOfWeek : 0
|
||||
|
||||
// 得到本周周一的日期
|
||||
const monday = new Date(now)
|
||||
monday.setDate(numDate - numDaysToMonday)
|
||||
|
||||
// 生成本周剩余的日期
|
||||
for (let i = 0; i < 7; i++) {
|
||||
dates.push(new Date(monday).toISOString().slice(0, 10))
|
||||
monday.setDate(monday.getDate() + 1)
|
||||
}
|
||||
|
||||
return dates
|
||||
},
|
||||
getDay(date) {
|
||||
return new Date(date).getDate()
|
||||
},
|
||||
getDate(date) {
|
||||
const dateMap = {
|
||||
1: '一',
|
||||
2: '二',
|
||||
3: '三',
|
||||
4: '四',
|
||||
5: '五',
|
||||
6: '六',
|
||||
0: '日'
|
||||
}
|
||||
const d = new Date(date).getDay()
|
||||
return dateMap[d]
|
||||
},
|
||||
handle(day, i) {
|
||||
if(this.disabled(day)) return
|
||||
this.actived = i
|
||||
this.isSrcoll = true
|
||||
uni.pageScrollTo({
|
||||
selector:`#history-${day}`,
|
||||
duration:200,
|
||||
success:(success)=>{
|
||||
this.isSrcoll = false
|
||||
},
|
||||
})
|
||||
},
|
||||
formatStr(str) {
|
||||
const regx = /-/g
|
||||
return str.replace(regx, '')
|
||||
},
|
||||
goodsDetail (item) {
|
||||
if (this.isInvalidItem(item)) {
|
||||
uni.showToast({
|
||||
title: '商品已下架',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
query: {
|
||||
id: item.productId
|
||||
}
|
||||
})
|
||||
},
|
||||
isInvalidItem(item) {
|
||||
if (!item) return false
|
||||
if (item.isInvalid === true || item.isInvalid === 'true') return true
|
||||
return Number(item.isInvalid) === 1
|
||||
},
|
||||
deleteHistoryItem(historyItem) {
|
||||
const id = historyItem.id
|
||||
if (!id) return
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除该浏览足迹吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
deleteHistoryApi(id).then(() => {
|
||||
this.queryHistory()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
queryHistory() {
|
||||
this.items = []
|
||||
this.isLoad = false
|
||||
getHistory().then(res => {
|
||||
const { data = [] } = res
|
||||
if (data.length > 0) {
|
||||
this.items = data.filter(e => e.histories && e.histories.length > 0).reverse()
|
||||
// data.map(item => {
|
||||
// if (item.histories) {
|
||||
// if (item.histories.length > 0) {
|
||||
// this.items.push(item)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}).finally(() => {
|
||||
this.isLoad = true
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.data-nav{
|
||||
position: sticky;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.disabled{
|
||||
color: #CBCBCB !important;
|
||||
}
|
||||
.history-wrap {
|
||||
padding: 0 20rpx;
|
||||
.img-nodata {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.under-line{
|
||||
width: 100%;
|
||||
height: 3rpx;
|
||||
background-color: #CBCBCB;
|
||||
position: absolute;
|
||||
top: 4rpx;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
|
||||
}
|
||||
.wrapper{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 710rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.history-card{
|
||||
width: 226rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 16rpx;
|
||||
margin-right: 16rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
&:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
.goods-img {
|
||||
display: block;
|
||||
width: 226rpx;
|
||||
height: 226rpx;
|
||||
}
|
||||
.invalid-mask{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1;
|
||||
.invalid-mask-text{
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
border: 1px solid rgba(255, 255, 255, 0.7);
|
||||
border-radius: 24rpx;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
}
|
||||
.good-info {
|
||||
padding: 12rpx 12rpx 20rpx 12rpx;
|
||||
.price {
|
||||
line-height: 34rpx;
|
||||
align-items: flex-end;
|
||||
.ot-price {
|
||||
// margin: 0 0 0 10rpx;
|
||||
color: #CBCBCB;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
.icon {
|
||||
display: block;
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.delete-icon{
|
||||
position: absolute;
|
||||
top: 8rpx;
|
||||
right: 8rpx;
|
||||
z-index: 2;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
// background-color: rgba(0, 0, 0, 0.35);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.active{
|
||||
background: #C52733;
|
||||
color: #fff !important;
|
||||
}
|
||||
.day-wrap{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,39 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="content">
|
||||
<view v-if="userInfo && userInfo.levelExplain" v-html="userInfo.levelExplain"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: mapGetters(["userInfo"]),
|
||||
onLoad:function(e){
|
||||
|
||||
},
|
||||
onShow:function(){
|
||||
this.$store.dispatch("getUser", true);
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content{
|
||||
background-color: #fff;
|
||||
margin: 20rpx;
|
||||
padding:20rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: normal;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,167 +0,0 @@
|
||||
<template>
|
||||
<view class="messageList">
|
||||
<mescroll-body ref="mescrollRef" top="16rpx" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption" @up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">
|
||||
<view class="acea-row row-column">
|
||||
<view
|
||||
@click="toDetail(msg.id)"
|
||||
class="acea-row message-box"
|
||||
v-for="(msg, index) in list"
|
||||
:key="index"
|
||||
>
|
||||
<view class="acea-row row-between row-middle">
|
||||
<view class="title line1">{{msg.noticeTitle}}</view>
|
||||
<!-- <div class="date">{{dataFormat(msg.createdTime,true)}}</div> -->
|
||||
<view class="date">{{dataFormat(msg.noticeTime/1000,true)}}</view>
|
||||
</view>
|
||||
<view class="acea-row row-middle row-between">
|
||||
<view class="content line1" v-html="msg.noticeContent"></view>
|
||||
<view v-if="msg.readFlag=='RF0'" class="unread-dot"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { noticeList } from "@/api/user";
|
||||
import { isWeixin, dataFormat } from "@/utils";
|
||||
import MescrollMixins from "@/mixins/mescroll-mixins.js";
|
||||
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
|
||||
export default {
|
||||
components:{
|
||||
MescrollBody
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list:[
|
||||
// {
|
||||
// noticeTitle:'ddjifjiejfiejife',
|
||||
// noticeTime:'2020-09-09',
|
||||
// noticeContent:'djdifjeijfiejifef'
|
||||
// }
|
||||
],
|
||||
upOption:{
|
||||
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||
auto:true,
|
||||
empty:{
|
||||
tip: '', // 提示
|
||||
icon:this.$VUE_APP_RESOURCES_URL+'/20240102232728574017.png',
|
||||
width:500,
|
||||
height:500
|
||||
// btnText:'点击刷新'
|
||||
}
|
||||
},
|
||||
downOption:{
|
||||
auto:false
|
||||
}
|
||||
}
|
||||
},
|
||||
mixins:[
|
||||
MescrollMixins({
|
||||
getPageData(mescroll){
|
||||
var _this = this;
|
||||
// 此时mescroll会携带page的参数:
|
||||
let pageNum = mescroll.num; // 页码, 默认从1开始
|
||||
let pageSize = mescroll.size; // 页长, 默认每页10条
|
||||
var params = {
|
||||
limit:pageSize,
|
||||
page:pageNum
|
||||
}
|
||||
// mescroll.endByPage(0, 0);
|
||||
// return;
|
||||
|
||||
noticeList(params)
|
||||
.then(res => {
|
||||
|
||||
|
||||
if(mescroll.num == 1) {
|
||||
_this.list = []; //如果是第一页需手动制空列表
|
||||
}
|
||||
_this.list = _this.list.concat(res.data);//追加新数据
|
||||
|
||||
mescroll.endSuccess(res.data.length);
|
||||
})
|
||||
.catch(err => {
|
||||
mescroll.endErr();
|
||||
uni.showToast({
|
||||
title: err + '',
|
||||
icon: 'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
],
|
||||
methods: {
|
||||
dataFormat,
|
||||
toDetail(mid){
|
||||
this.$yrouter.push('/pages/user/MessageDetail/MessageDetail?id='+mid);
|
||||
// this.$yrouter.push({
|
||||
// path: "/pages/user/MessageDetail/MessageDetail",
|
||||
// query: {
|
||||
// id:mid
|
||||
// }
|
||||
// });
|
||||
}
|
||||
},
|
||||
onLoad:function(e){
|
||||
|
||||
},
|
||||
onShow:function(){
|
||||
//静默刷新
|
||||
this.mescroll && this.mescroll.resetUpScroll(false);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
page{
|
||||
background-color: #fff;
|
||||
}
|
||||
.messageList{
|
||||
padding: 0.32*100rpx;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.message-box{
|
||||
background:rgba(246,247,250,1);
|
||||
border-radius:0.12*100rpx;
|
||||
padding: 0.24*100rpx;
|
||||
margin-bottom: 0.4*100rpx;
|
||||
display: block;
|
||||
// width: 100%;
|
||||
}
|
||||
|
||||
.unread-dot{
|
||||
position: absolute;
|
||||
right: 0.2*100rpx;
|
||||
top: auto;
|
||||
flex-shrink: 0;
|
||||
width:0.16*100rpx;
|
||||
height:0.16*100rpx;
|
||||
background:rgba(255,26,26,1);
|
||||
border-radius:50%;
|
||||
}
|
||||
|
||||
.content{
|
||||
flex: 1;
|
||||
color: #8B8F99;
|
||||
font-size: 0.24*100rpx;
|
||||
margin-top: 0.08*100rpx;
|
||||
}
|
||||
|
||||
.date{
|
||||
font-size:0.24*100rpx;
|
||||
font-weight: bold;
|
||||
color:rgba(139,143,153,1);
|
||||
flex-shrink: 0;
|
||||
color: #8B8F99;
|
||||
}
|
||||
|
||||
.title{
|
||||
flex: 1;
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,90 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="message">
|
||||
<view class="title">{{messageInfo.noticeTitle}}</view>
|
||||
<view class="date">{{dataFormat(messageInfo.noticeTime/1000,true)}}</view>
|
||||
<view class="content" v-html="messageInfo.noticeContent"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { noticeDetail } from "@/api/user";
|
||||
import { dataFormat } from "@/utils";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id:0,
|
||||
messageInfo:{}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dataFormat,
|
||||
getData:function(){
|
||||
let that = this;
|
||||
const id = this.id;
|
||||
if (!id) {
|
||||
uni.showToast({
|
||||
title:"消息id不存在",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
noticeDetail({
|
||||
id:this.id
|
||||
}).then((res)=>{
|
||||
|
||||
that.messageInfo = res.data;
|
||||
|
||||
}).catch((err)=>{
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
onLoad:function(e){
|
||||
this.id = e.id;
|
||||
this.getData();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
page{
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
.message{
|
||||
padding: 0.36*100rpx;
|
||||
|
||||
}
|
||||
|
||||
.title{
|
||||
font-size:0.36*100rpx;
|
||||
font-weight: bold;
|
||||
color:rgba(8,15,26,1);
|
||||
}
|
||||
|
||||
.date{
|
||||
font-size:0.24*100rpx;
|
||||
font-weight: bold;
|
||||
color:rgba(139,143,153,1);
|
||||
margin-top: 0.24*100rpx;
|
||||
margin-bottom: 0.4*100rpx;
|
||||
}
|
||||
|
||||
.content{
|
||||
padding: 0.1*100rpx;
|
||||
color: #080F1A;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,217 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
|
||||
<view class="content acea-row row-column">
|
||||
|
||||
<input class="phone-input" type="text" :value="phone" disabled/>
|
||||
<view class="acea-row row-middle" style="flex-wrap: nowrap;">
|
||||
<input type="text" placeholder="填写验证码" placeholder-style="color:#DADCE0;font-size:28rpx;" class="codeIput" v-model="captcha" />
|
||||
<button
|
||||
class="code acea-row row-middle"
|
||||
:disabled="disabled"
|
||||
:class="disabled === true ? 'on' : ''"
|
||||
@click="code"
|
||||
>{{ text }}</button>
|
||||
</view>
|
||||
<input type="number" maxlength="6" password placeholder="请输新6位数字支付密码" placeholder-style="color:#DADCE0;font-size:28rpx" class="payPwdInput" v-model="payPwd" @input='inputPaypwdChange' />
|
||||
</view>
|
||||
<view class="confirmBnt bg-color-red" @click="confirm()">保存</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import { required, alpha_num, chs_phone } from "@/utils/validate";
|
||||
import { validatorDefaultCatch } from "@/utils/dialog";
|
||||
import { getUserInfo, registerVerify, bindingPhone,modifyUserPayPwd } from "@/api/user";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
captcha: "",
|
||||
phone:'',
|
||||
payPwd:''
|
||||
|
||||
}
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
watch:{
|
||||
userInfo(){
|
||||
this.phone = this.userInfo.phone;
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
...mapGetters(["userInfo"]),
|
||||
},
|
||||
onLoad:function(e){
|
||||
if (e.isSetMode) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '设置支付密码'
|
||||
});
|
||||
} else{
|
||||
uni.setNavigationBarTitle({
|
||||
title: '修改支付密码'
|
||||
});
|
||||
}
|
||||
|
||||
//获取用户信息
|
||||
if (this.$store.getters.token) {
|
||||
this.$store.dispatch("getUser", true);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
inputPaypwdChange:function(event){
|
||||
var value = event.target.value;
|
||||
var filterValue = value.replace(/\D/g,"");
|
||||
//console.log('value:'+filterValue);
|
||||
this.payPwd = filterValue; // 不允许输入非数字字符
|
||||
},
|
||||
async code() {
|
||||
let that = this;
|
||||
const { phone } = that;
|
||||
try {
|
||||
await that
|
||||
.$validator({
|
||||
phone: [
|
||||
required(required.message("手机号码")),
|
||||
chs_phone(chs_phone.message())
|
||||
]
|
||||
})
|
||||
.validate({ phone });
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
|
||||
registerVerify({ phone: phone })
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
that.sendCode();
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
async confirm() {
|
||||
let that = this;
|
||||
const { phone, captcha, payPwd } = that;
|
||||
try {
|
||||
await that
|
||||
.$validator({
|
||||
phone: [
|
||||
chs_phone(chs_phone.message("手机号码")),
|
||||
alpha_num(alpha_num.message())
|
||||
],
|
||||
captcha: [
|
||||
required(required.message("验证码")),
|
||||
alpha_num(alpha_num.message("验证码"))
|
||||
],
|
||||
payPwd: [
|
||||
required(required.message("支付密码")),
|
||||
alpha_num(alpha_num.message("支付密码"))
|
||||
]
|
||||
})
|
||||
.validate({ phone, captcha,payPwd });
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
|
||||
//网络请求
|
||||
uni.showLoading();
|
||||
modifyUserPayPwd({
|
||||
passwordPay:that.payPwd,
|
||||
code:that.captcha,
|
||||
phone:that.phone
|
||||
}).then((res)=>{
|
||||
//提示成功并返回
|
||||
uni.hideLoading();
|
||||
that.$dialog.toast({ mes: "保存成功" });
|
||||
setTimeout(function(){
|
||||
that.$yrouter.back();
|
||||
},1000);
|
||||
|
||||
}).catch((err)=>{
|
||||
uni.hideLoading();
|
||||
that.$dialog.error(err.msg || "修改失败");
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page{
|
||||
background: #fff;
|
||||
}
|
||||
.container{
|
||||
background: #fff;
|
||||
}
|
||||
.confirmBnt {
|
||||
font-size: 32rpx;
|
||||
width: 580rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 45rpx;
|
||||
color: #fff;
|
||||
margin: 92rpx auto 0 auto;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.content{
|
||||
margin: 114rpx;
|
||||
}
|
||||
|
||||
.phone-input{
|
||||
color: #8B8F99;
|
||||
font-size: 36rpx;
|
||||
height:88rpx;
|
||||
background:rgba(247,247,249,1);
|
||||
opacity:1;
|
||||
border-radius:12rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.codeIput{
|
||||
font-size: 28rpx;
|
||||
height:88rpx;
|
||||
border:1px solid rgba(218,220,224,1);
|
||||
opacity:1;
|
||||
border-radius:12rpx;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.code{
|
||||
/* width:224rpx; */
|
||||
height:88rpx;
|
||||
background:rgba(121,129,253,1);
|
||||
opacity:1;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
border-radius:12rpxpx;
|
||||
flex-shrink: 0;
|
||||
margin-left: 16rpx;
|
||||
text-align: center;
|
||||
padding-left: 24rpx;
|
||||
padding-right: 24rpx;
|
||||
}
|
||||
|
||||
.payPwdInput{
|
||||
font-size: 28rpx;
|
||||
height:88rpx;
|
||||
border:1px solid rgba(218,220,224,1);
|
||||
opacity:1;
|
||||
border-radius:12rpx;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,368 +0,0 @@
|
||||
<template>
|
||||
<view class="point-page">
|
||||
<view v-if="isLoad">
|
||||
<view class="rule-btn" @click="showHidePopup(true)">
|
||||
积分规则
|
||||
</view>
|
||||
<view class="tab-wrap">
|
||||
<view
|
||||
:class="query.pm === 1 ? 'curr' : ''"
|
||||
class="tab-item"
|
||||
@click="tabItemClick(1)"
|
||||
>
|
||||
<view class="txt">当前总积分</view>
|
||||
<view class="number">
|
||||
<image
|
||||
v-if="query.pm === 1"
|
||||
:src="webUrl + '/page/my/coin.png'"
|
||||
class="icon"
|
||||
/>
|
||||
{{ point.currentPoints }}
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
:class="query.pm === 0 ? 'curr' : ''"
|
||||
class="tab-item"
|
||||
@click="tabItemClick(0)"
|
||||
>
|
||||
<view class="txt">已使用积分</view>
|
||||
<view class="number">
|
||||
<image
|
||||
v-if="query.pm === 0"
|
||||
:src="webUrl + '/page/my/coin.png'"
|
||||
class="icon"
|
||||
/>
|
||||
{{ point.totalUsedPoints }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-wrap">
|
||||
<view
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
class="item"
|
||||
>
|
||||
<view v-if="item.orderId" class="order">
|
||||
<view class="title">
|
||||
<view class="img">
|
||||
<image :src="item.image" class="img" />
|
||||
</view>
|
||||
<view class="name more-t">
|
||||
<view class="more-t">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view
|
||||
:class="item.pm ? 'red' : 'green'"
|
||||
class="number"
|
||||
>
|
||||
{{ item.pm ? '+' : '-' }}{{ item.number }}
|
||||
<text class="txt">积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom" @click="goOrderDetails(item)">
|
||||
<view class="txt">
|
||||
点击查看详情 >>
|
||||
</view>
|
||||
<text class="iconfont icon-jiantou"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="lottery">
|
||||
<image :src="webUrl + '/points-lottery.png'" class="img" />
|
||||
<view class="one-t title">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view
|
||||
:class="item.pm ? 'red' : 'green'"
|
||||
class="number"
|
||||
>
|
||||
{{ item.pm ? '+' : '-' }}{{ item.number }}
|
||||
<text class="txt">积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<goo-skeleton
|
||||
v-if="isLoading"
|
||||
:show-avatar="false"
|
||||
/>
|
||||
<view v-else>
|
||||
<view v-if="list.length === 0" class="no-data">
|
||||
暂无数据
|
||||
</view>
|
||||
<!-- <u-loadmore
|
||||
v-if="query.page >= totalPage && list.length > 0"
|
||||
:line="true"
|
||||
status="nomore"
|
||||
nomore-text="到底了"
|
||||
/> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<goo-skeleton
|
||||
v-else
|
||||
:show-avatar="false"
|
||||
/>
|
||||
<u-popup
|
||||
:show="show"
|
||||
mode="center"
|
||||
round="10"
|
||||
closeable
|
||||
@close="showHidePopup(false)"
|
||||
>
|
||||
<view class="popup-body">
|
||||
<view class="title bold">积分规则</view>
|
||||
<view class="content">
|
||||
<view class="content-html">
|
||||
<rich-text :nodes="point.pointsRule" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getUserPointInfo,
|
||||
getUserPointBill
|
||||
} from '@/api/user'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: 'UserPoints',
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
query: {
|
||||
pm: 1, // 0-支出,1-收入
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
isLoading: false,
|
||||
list: [],
|
||||
totalPage: 1,
|
||||
isLoad: false,
|
||||
point: {
|
||||
currentPoints: 0, // 当前总积分
|
||||
totalUsedPoints: 0, // 累计使用积分
|
||||
pointsRule: ''
|
||||
},
|
||||
show: false,
|
||||
pageKeyId: Object.freeze('userPointsBill')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getInfo()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.isLoading || this.query.page >= this.totalPage) {
|
||||
return
|
||||
}
|
||||
this.query.page++
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
tabItemClick(type) {
|
||||
if (this.query.pm === type) {
|
||||
return
|
||||
}
|
||||
this.query.pm = type
|
||||
this.query.page = 1
|
||||
this.list = []
|
||||
this.getList()
|
||||
},
|
||||
getInfo() {
|
||||
getUserPointInfo().then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.isLoad = true
|
||||
this.point = data
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.isLoading = true
|
||||
getUserPointBill(this.query).then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.totalPage = data.pages || 1
|
||||
if (data.records.length > 0) {
|
||||
data.records.map(item => {
|
||||
this.list.push(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
goOrderDetails(order) {
|
||||
this.$yrouter.push({
|
||||
path: '/pages/order/OrderDetails/index',
|
||||
query: {
|
||||
id: order.orderId
|
||||
}
|
||||
})
|
||||
},
|
||||
showHidePopup(value) {
|
||||
this.show = value
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.point-page {
|
||||
padding: 30rpx;
|
||||
.rule-btn {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 255rpx;
|
||||
z-index: 9;
|
||||
height: 24rpx;
|
||||
padding: 20rpx 30rpx 20rpx 40rpx;
|
||||
border-top-left-radius: 35rpx;
|
||||
border-bottom-left-radius: 35rpx;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
line-height: 24rpx;
|
||||
background-color: #C51919;
|
||||
}
|
||||
.tab-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
border-radius: 15rpx;
|
||||
background-color: #fff;
|
||||
.txt {
|
||||
width: 100px;
|
||||
height: 36px;
|
||||
padding: 0 20rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #C51919;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
color: #C51919;
|
||||
font-size: 16px;
|
||||
}
|
||||
.number {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 20rpx 0 0 0;
|
||||
font-size: 20px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
line-height: 26px;
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin: 0 20rpx 0 0;
|
||||
}
|
||||
}
|
||||
&.curr {
|
||||
padding: 35rpx 20rpx;
|
||||
background-color: #C51919;
|
||||
.txt {
|
||||
border-color: #fff;
|
||||
color: #fff;
|
||||
}
|
||||
.number {
|
||||
font-size: 26px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-wrap {
|
||||
padding: 60rpx 0 0 0;
|
||||
.item {
|
||||
margin: 30rpx 0 0 0;
|
||||
border-radius: 8px;
|
||||
background-color: #fff;
|
||||
.order {
|
||||
.title {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
.img {
|
||||
display: block;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
margin: 0 20rpx 0 0;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.name {
|
||||
width: calc(100% - 140rpx);
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
border-top: 1rpx solid #f6f6f6;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
.txt {
|
||||
flex: 1;
|
||||
color: #FD5749;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.lottery {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
.img {
|
||||
display: block;
|
||||
width: 62rpx;
|
||||
height: 62rpx;
|
||||
margin: 0 20rpx 0 0;
|
||||
}
|
||||
.title {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.number {
|
||||
text-align: right;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
.txt {
|
||||
font-size: 12px;
|
||||
}
|
||||
&.red {
|
||||
color: #FD5749;
|
||||
}
|
||||
&.green {
|
||||
color: #3DC260;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.no-data {
|
||||
line-height: 200rpx;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: #999;
|
||||
}
|
||||
.popup-body {
|
||||
.title {
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.content {
|
||||
padding: 0 30rpx 30rpx 30rpx;
|
||||
.content-html {
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,335 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="payment-top acea-row row-column row-center-wrapper">
|
||||
<text class="name">我的余额</text>
|
||||
<view class="pic">
|
||||
<text>
|
||||
¥
|
||||
<text class="pic-font">{{ now_money || 0 }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="recharge">
|
||||
<view class="nav acea-row row-around row-middle">
|
||||
<view class="item on">账户充值</view>
|
||||
</view>
|
||||
<view class="info-wrapper">
|
||||
<view class="picList acea-row row-between mt-20">
|
||||
<view
|
||||
class="pic-box pic-box-color acea-row row-center-wrapper row-column"
|
||||
:class="activePic === index ? 'pic-box-color-active' : ''"
|
||||
v-for="(item, index) in picList"
|
||||
:key="index"
|
||||
@click="picCharge(index, item)"
|
||||
>
|
||||
<view class="pic-number-pic">
|
||||
<text>
|
||||
{{ item.value.price }}
|
||||
<text class="pic-number">元</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="pic-number" v-if="item.value.give_price > 0">赠送:{{ item.value.give_price }} 元</view>
|
||||
</view>
|
||||
<!-- <view
|
||||
class="pic-box pic-box-color acea-row row-center-wrapper"
|
||||
@click="picCharge(picList.length, money)"
|
||||
>
|
||||
<input
|
||||
type="number"
|
||||
placeholder="其他"
|
||||
v-model="money"
|
||||
class="pic-box-money pic-number-pic"
|
||||
/>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="tip">提示:充值后帐户的金额不能提现</view>
|
||||
<view class="pay-btn bg-color-red" @click="recharge">立即充值</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import { weappPay } from "@/libs/wechat";
|
||||
import { rechargeWechat, getRechargeApi } from "@/api/user";
|
||||
import { add, sub } from "@/utils/bc";
|
||||
|
||||
export default {
|
||||
name: "Recharge",
|
||||
components: {},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
active: 0,
|
||||
from: this.$deviceType,
|
||||
money: "",
|
||||
now_money: "",
|
||||
picList: [],
|
||||
activePic: 0,
|
||||
numberPic: "",
|
||||
paid_price: "",
|
||||
rechar_id: 0
|
||||
|
||||
};
|
||||
},
|
||||
computed: mapGetters(["userInfo"]),
|
||||
mounted: function() {
|
||||
this.now_money = this.userInfo.nowMoney;
|
||||
this.getRecharge();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 充值额度选择
|
||||
*/
|
||||
getRecharge() {
|
||||
getRechargeApi()
|
||||
.then(res => {
|
||||
this.picList = res.data.recharge_price_ways || [];
|
||||
if (this.picList[0]) {
|
||||
this.rechar_id = this.picList[0].id;
|
||||
this.paid_price = this.picList[0].value.price;
|
||||
this.numberPic = this.picList[0].value.give_price;
|
||||
}
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 选择金额
|
||||
*/
|
||||
picCharge(idx, item) {
|
||||
this.activePic = idx;
|
||||
if (idx == this.picList.length) {
|
||||
this.rechar_id = 0;
|
||||
this.paid_price = "";
|
||||
this.numberPic = "";
|
||||
} else {
|
||||
this.money = "";
|
||||
this.rechar_id = item.id;
|
||||
this.paid_price = item.value.give_price;
|
||||
this.numberPic = item.value.price;
|
||||
}
|
||||
},
|
||||
recharge: function() {
|
||||
let that = this,
|
||||
price = Number(this.money);
|
||||
if (this.picList.length == this.activePic && price === 0) {
|
||||
uni.showToast({
|
||||
title: "请输入您要充值的金额",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
} else if (this.picList.length == this.activePic && price < 0.01) {
|
||||
uni.showToast({
|
||||
title: "充值金额不能低于0.01",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
let prices = "",
|
||||
paid_price = "";
|
||||
if (price) {
|
||||
prices = price;
|
||||
paid_price = 0;
|
||||
} else {
|
||||
prices = that.numberPic;
|
||||
paid_price = that.paid_price;
|
||||
}
|
||||
rechargeWechat({
|
||||
price: prices,
|
||||
from: that.from,
|
||||
paid_price: paid_price,
|
||||
rechar_id: that.rechar_id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
var data = res.data.data;
|
||||
weappPay(res.data.data)
|
||||
.then(() => {
|
||||
prices = add(prices, paid_price);
|
||||
that.now_money = add(prices, parseFloat(that.userInfo.nowMoney));
|
||||
uni.showToast({
|
||||
title: "支付成功",
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
this.$yrouter.back();
|
||||
})
|
||||
.finally(res => {
|
||||
//if(typeof(res) == "undefined") return
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(function() {
|
||||
uni.showToast({
|
||||
title: "支付失败",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
#iframe {
|
||||
display: none;
|
||||
}
|
||||
.pic-box-color-active {
|
||||
background-color: #eb3729 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
.picList {
|
||||
margin-bottom: 0.3 * 100rpx;
|
||||
margin-top: 0.3 * 100rpx;
|
||||
}
|
||||
.font-color {
|
||||
color: #e83323;
|
||||
}
|
||||
.recharge {
|
||||
border-radius: 0.1 * 100rpx;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin: 0.2 * 100rpx auto 0 auto;
|
||||
padding: 0.3 * 100rpx;
|
||||
border-top-right-radius: 0.39 * 100rpx;
|
||||
border-top-left-radius: 0.39 * 100rpx;
|
||||
margin-top: -0.45 * 100rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.recharge .nav {
|
||||
height: 0.75 * 100rpx;
|
||||
line-height: 0.75 * 100rpx;
|
||||
padding: 0 1 * 100rpx;
|
||||
}
|
||||
.recharge .nav .item {
|
||||
font-size: 0.3 * 100rpx;
|
||||
color: #333;
|
||||
}
|
||||
.recharge .nav .item.on {
|
||||
font-weight: bold;
|
||||
border-bottom: 0.04 * 100rpx solid #e83323;
|
||||
}
|
||||
.recharge .info-wrapper {
|
||||
}
|
||||
.recharge .info-wrapper .money {
|
||||
margin-top: 0.6 * 100rpx;
|
||||
padding-bottom: 0.2 * 100rpx;
|
||||
border-bottom: 1px dashed #ddd;
|
||||
text-align: center;
|
||||
}
|
||||
.recharge .info-wrapper .money span {
|
||||
font-size: 0.56 * 100rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
.recharge .info-wrapper .money input {
|
||||
display: inline-block;
|
||||
width: 3 * 100rpx;
|
||||
font-size: 0.84 * 100rpx;
|
||||
text-align: center;
|
||||
color: #282828;
|
||||
font-weight: bold;
|
||||
padding-right: 0.7 * 100rpx;
|
||||
}
|
||||
.recharge .info-wrapper .money input::placeholder {
|
||||
color: #ddd;
|
||||
}
|
||||
.recharge .info-wrapper .money input::-webkit-input-placeholder {
|
||||
color: #ddd;
|
||||
}
|
||||
.recharge .info-wrapper .money input:-moz-placeholder {
|
||||
color: #ddd;
|
||||
}
|
||||
.recharge .info-wrapper .money input::-moz-placeholder {
|
||||
color: #ddd;
|
||||
}
|
||||
.recharge .info-wrapper .money input:-ms-input-placeholder {
|
||||
color: #ddd;
|
||||
}
|
||||
.tip {
|
||||
font-size: 0.28 * 100rpx;
|
||||
color: #333333;
|
||||
font-weight: 800;
|
||||
margin-bottom: 0.14 * 100rpx;
|
||||
}
|
||||
.recharge .info-wrapper .tips span {
|
||||
color: #ef4a49;
|
||||
}
|
||||
.recharge .info-wrapper .pay-btn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 0.86 * 100rpx;
|
||||
margin: 0.5 * 100rpx auto 0 auto;
|
||||
line-height: 0.86 * 100rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
border-radius: 0.5 * 100rpx;
|
||||
font-size: 0.3 * 100rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.payment-top {
|
||||
width: 100%;
|
||||
height: 3.5 * 100rpx;
|
||||
background-color: #eb3729;
|
||||
}
|
||||
.payment-top .name {
|
||||
font-size: 0.26 * 100rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
margin-top: -0.38 * 100rpx;
|
||||
margin-bottom: 0.3 * 100rpx;
|
||||
}
|
||||
.payment-top .pic {
|
||||
font-size: 0.32 * 100rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.payment-top .pic-font {
|
||||
font-size: 0.78 * 100rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.picList .pic-box {
|
||||
width: 32%;
|
||||
height: auto;
|
||||
border-radius: 0.2 * 100rpx;
|
||||
margin-top: 0.21 * 100rpx;
|
||||
padding: 0.2 * 100rpx 0;
|
||||
}
|
||||
.pic-box-color {
|
||||
background-color: #f4f4f4;
|
||||
color: #656565;
|
||||
}
|
||||
.pic-number {
|
||||
font-size: 0.22 * 100rpx;
|
||||
}
|
||||
.pic-number-pic {
|
||||
font-size: 0.38 * 100rpx;
|
||||
margin-right: 0.1 * 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.pic-box-money {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
@@ -1,153 +0,0 @@
|
||||
<template>
|
||||
<view class="register absolute">
|
||||
<view class="shading">
|
||||
<view class="pictrue acea-row row-center-wrapper">
|
||||
<image :src="`${staticUrl}/logo.png`" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="whiteBg">
|
||||
<view class="title">找回密码</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
<view>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-phone_" />
|
||||
</svg>
|
||||
<input type="text" placeholder="输入手机号码" v-model="account" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="align-left">
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-code_1" />
|
||||
</svg>
|
||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
||||
<button
|
||||
class="code"
|
||||
:disabled="disabled"
|
||||
:class="disabled === true ? 'on' : ''"
|
||||
@click="code"
|
||||
>{{ text }}</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view>
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-code_" />
|
||||
</svg>
|
||||
<input type="password" placeholder="填写您的登录密码" v-model="password" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="logon" @click="registerReset">确认</view>
|
||||
<view class="tip">
|
||||
<text @click="goLogin()" class="font-color-red">立即登录</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import { registerVerify, registerReset } from "@/api/user";
|
||||
import { validatorDefaultCatch } from "@/utils/dialog";
|
||||
import attrs, { required, alpha_num, chs_phone } from "@/utils/validate";
|
||||
|
||||
export default {
|
||||
name: "RetrievePassword",
|
||||
data: function() {
|
||||
return {
|
||||
staticUrl: this.$STATIC_RESOURCE_URL,
|
||||
account: "",
|
||||
password: "",
|
||||
captcha: ""
|
||||
};
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
methods: {
|
||||
goLogin() {
|
||||
this.$yrouter.push({ path: "/pages/user/Login/index" });
|
||||
},
|
||||
async registerReset() {
|
||||
var that = this;
|
||||
const { account, captcha, password } = that;
|
||||
try {
|
||||
await that
|
||||
.$validator({
|
||||
account: [
|
||||
required(required.message("手机号码")),
|
||||
chs_phone(chs_phone.message())
|
||||
],
|
||||
captcha: [
|
||||
required(required.message("验证码")),
|
||||
alpha_num(alpha_num.message("验证码"))
|
||||
],
|
||||
password: [
|
||||
required(required.message("密码")),
|
||||
attrs.range([6, 16], attrs.range.message("密码")),
|
||||
alpha_num(alpha_num.message("密码"))
|
||||
]
|
||||
})
|
||||
.validate({ account, captcha, password });
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
registerReset({
|
||||
account: that.account,
|
||||
captcha: that.captcha,
|
||||
password: that.password
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "success",
|
||||
duration: 2000,
|
||||
complete: () => {
|
||||
that.$yrouter.push({ name: "Login" });
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
async code() {
|
||||
var that = this;
|
||||
const { account } = that;
|
||||
try {
|
||||
await that
|
||||
.$validator({
|
||||
account: [
|
||||
required(required.message("手机号码")),
|
||||
chs_phone(chs_phone.message())
|
||||
]
|
||||
})
|
||||
.validate({ account });
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
registerVerify({ phone: that.account })
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
that.sendCode();
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,368 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
|
||||
<view class="content-box">
|
||||
<view class="content">
|
||||
<view v-if="userLevelInfo" class="verify-status-box acea-row row-center row-middle">
|
||||
<img v-if="userLevelInfo.checkState==3" class="verify-status-img" :src="webUrl+'/20200824093220483259.png'"/>
|
||||
<span class="verify-status-text">{{ getCheckState(userLevelInfo) }}</span>
|
||||
</view>
|
||||
<view v-if="userLevelInfo && userLevelInfo.checkState==4" class="reason">原因:{{ userLevelInfo.checkRemark }}
|
||||
</view>
|
||||
<view class="electronic-box acea-row row-middle row-center">
|
||||
<view class="checkbox-wrapper">
|
||||
<checkbox-group @change="toggleProtocolCheck()">
|
||||
<label class="well-check">
|
||||
<checkbox :checked="protocolChecked" color="#fff"
|
||||
style="border-radius: 50%;transform:scale(0.7)"></checkbox>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<view class="electronic-tip">
|
||||
<span class="">我已同意</span>
|
||||
<span @click="toggleProtocolPage()" class="electronic-protocol-text">《香道滇股东协议》</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="upload-box acea-row row-column row-center">
|
||||
<view class="idcard_pictrue">
|
||||
<view @tap="chooseIdCardFrontImage">
|
||||
<view class="pictrue">
|
||||
<img v-if="idCardFrontImg.length>0" :src="idCardFrontImg"/>
|
||||
<img v-else :src="webUrl+'/20200824092942325489.png'"/>
|
||||
</view>
|
||||
<view v-if="idCardFrontImg.length==0" class="add-icon">
|
||||
<img :src="webUrl+'/20200824093150470953.png'"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<span class="upload-tip">上传身份证正面照</span>
|
||||
<view class="idcard_pictrue">
|
||||
<view class="" @tap="chooseIdCardBackImage">
|
||||
<view class="pictrue">
|
||||
<img v-if="idCardBackImg.length>0" :src="idCardBackImg"/>
|
||||
<img v-else :src="webUrl+'/20200824093104069571.png'"/>
|
||||
</view>
|
||||
<view v-if="idCardBackImg.length==0" class="add-icon">
|
||||
<img :src="webUrl+'/20200824093150470953.png'"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<span class="upload-tip">上传身份证反面照</span>
|
||||
</view>
|
||||
<view v-if="userLevelInfo && userLevelInfo.checkState!=3 && userLevelInfo.checkState!=2" class="submit-btn"
|
||||
@click="submitBtnClick">保存
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
var that;
|
||||
import {mapGetters} from "vuex";
|
||||
import {chooseImage} from "@/utils";
|
||||
import {getUserLevelInfo, saveUserProtocol} from "@/api/user"
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
|
||||
export default {
|
||||
|
||||
components: {
|
||||
uniPopup
|
||||
},
|
||||
props: {},
|
||||
data: function () {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
idCardFrontImg: "",
|
||||
idCardBackImg: "",
|
||||
protocolChecked: true,
|
||||
protocolShow: false,
|
||||
verifyPass: 0,//是否审核通过
|
||||
userLevelInfo: null,
|
||||
avatar: ''
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
computed: mapGetters(["userInfo"]),
|
||||
onShow() {
|
||||
if (this.$store.getters.token) {
|
||||
this.$store.dispatch("getUser", true);
|
||||
}
|
||||
},
|
||||
onLoad: function () {
|
||||
//setTimeout里的this不是页面的this
|
||||
//所以这里要处理一下用that
|
||||
that = this;
|
||||
this.getUserLevelInfo();
|
||||
|
||||
},
|
||||
methods: {
|
||||
toggleProtocolCheck() {
|
||||
this.protocolChecked = !this.protocolChecked;
|
||||
},
|
||||
//checkState:1-新增 2-待审核 3-已审核 4-已驳回
|
||||
getCheckState(info) {
|
||||
var status = '';
|
||||
if (info) {
|
||||
switch (info.checkState) {
|
||||
case 1:
|
||||
status = '新增';
|
||||
break;
|
||||
case 2:
|
||||
status = '待审核';
|
||||
break;
|
||||
case 3:
|
||||
status = '审核通过';
|
||||
break;
|
||||
case 4:
|
||||
status = '审核驳回';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
},
|
||||
//显示协议内容
|
||||
toggleProtocolPage() {
|
||||
//this.$refs.popup.open();
|
||||
this.$yrouter.push('/pages/user/UpgradeProtocolDetail/UpgradeProtocolDetail')
|
||||
|
||||
},
|
||||
chooseIdCardFrontImage() {
|
||||
|
||||
// if(this.userLevelInfo && this.userLevelInfo.checkState!=3){
|
||||
// chooseImage(img => {
|
||||
// console.log(img)
|
||||
// this.avatar = img;
|
||||
// });
|
||||
// }
|
||||
|
||||
chooseImage(img => {
|
||||
console.log(img)
|
||||
|
||||
that.idCardFrontImg = img;
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
chooseIdCardBackImage() {
|
||||
chooseImage(img => {
|
||||
console.log(img)
|
||||
|
||||
that.idCardBackImg = img;
|
||||
|
||||
});
|
||||
},
|
||||
//提交
|
||||
submitBtnClick: function () {
|
||||
//var that = this;
|
||||
if (this.idCardFrontImg.length == 0) {
|
||||
this.$dialog.toast({mes: '请上传身份证正面照片'});
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.idCardBackImg.length == 0) {
|
||||
this.$dialog.toast({mes: '请上传身份证反面面照片'});
|
||||
return;
|
||||
}
|
||||
|
||||
this.$dialog.loading.open();
|
||||
saveUserProtocol({
|
||||
uid: that.userInfo.uid,
|
||||
idcardOne: that.idCardFrontImg,
|
||||
idcardTwo: that.idCardBackImg
|
||||
}).then((res) => {
|
||||
that.$dialog.toast({mes: "保存成功!"});
|
||||
//跳转回上一页
|
||||
setTimeout(function () {
|
||||
that.$yrouter.back();
|
||||
}, 1000);
|
||||
}).catch(err => {
|
||||
that.$dialog.error(err.msg || "保存失败!");
|
||||
}).finally(() => {
|
||||
that.$dialog.loading.close();
|
||||
});
|
||||
},
|
||||
// 获取用户等级信息
|
||||
getUserLevelInfo: function () {
|
||||
var that = this;
|
||||
getUserLevelInfo().then((res) => {
|
||||
if (res.data) {
|
||||
that.userLevelInfo = res.data;
|
||||
that.idCardFrontImg = res.data.idcardOne || "";
|
||||
that.idCardBackImg = res.data.idcardTwo || "";
|
||||
}
|
||||
}).catch(err => {
|
||||
|
||||
}).finally(() => {
|
||||
|
||||
});
|
||||
},
|
||||
idCardFrontImageuploaded(res) {
|
||||
if (res.errno !== 0)
|
||||
return this.$dialog.error(res.msg || "上传图片失败");
|
||||
this.idCardFrontImg = res.link;
|
||||
//this.$set(this.idCardFrontImg, "avatar", res.link);
|
||||
},
|
||||
idCardBackImageuploaded(res) {
|
||||
if (res.errno !== 0)
|
||||
return this.$dialog.error(res.msg || "上传图片失败");
|
||||
this.idCardBackImg = res.link;
|
||||
//this.$set(this.idCardBackImg, "avatar", res.link);
|
||||
},
|
||||
onBackClick: function () {
|
||||
this.$yrouter.back();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.content-box {
|
||||
background-color: #FFFAF5;
|
||||
padding: 38rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
border: 1px solid rgba(195, 172, 149, 1);
|
||||
padding: 54rpx;
|
||||
}
|
||||
|
||||
.checkbox-wrapper {
|
||||
/* width: 0.8rem; */
|
||||
width: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.checkbox-wrapper .icon {
|
||||
/* left: calc((0.8rem - 18px)/2); */
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.checkbox-wrapper input:checked + .icon {
|
||||
background-color: #FD2C4B !important;
|
||||
border-color: #FD2C4B !important;
|
||||
}
|
||||
|
||||
.electronic-tip {
|
||||
color: #9B6E40;
|
||||
font-size: 28rpx;
|
||||
/* padding-left: 48rpx; */
|
||||
}
|
||||
|
||||
.electronic-protocol-text {
|
||||
color: #FF8D5B;
|
||||
}
|
||||
|
||||
.protocol-wrapper {
|
||||
/* display: flex; */
|
||||
/* align-items: center; */
|
||||
/* justify-content: center; */
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.p-content {
|
||||
background-color: #fff;
|
||||
margin: 100rpx;
|
||||
padding: 20rpx;
|
||||
overflow-y: scroll;
|
||||
border-radius: 16rpx;
|
||||
height: calc(100% - 200rpx);
|
||||
}
|
||||
|
||||
.p-content .title {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
font-size: 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.overlay-protocol {
|
||||
z-index: 1000 !important;
|
||||
}
|
||||
|
||||
.upload-box {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.upload-box .idcard_pictrue {
|
||||
width: 568rpx;
|
||||
height: 320rpx;
|
||||
/* background:rgba(255,255,255,1); */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.upload-tip {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #C3AC95;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.upload-box .idcard_pictrue .pictrue {
|
||||
width: 568rpx;
|
||||
height: 320rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.upload-box .idcard_pictrue .pictrue img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.add-icon {
|
||||
width: 92rpx;
|
||||
height: 92rpx;
|
||||
position: absolute;
|
||||
left: calc((100% - 92rpx) / 2);
|
||||
top: calc((100% - 92rpx) / 2);
|
||||
}
|
||||
|
||||
.add-icon img {
|
||||
width: 92rpx;
|
||||
height: 92rpx;
|
||||
}
|
||||
|
||||
.verify-status-box {
|
||||
margin: 32rpx auto;
|
||||
}
|
||||
|
||||
.verify-status-img {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
}
|
||||
|
||||
.verify-status-text {
|
||||
color: #9B6E40;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
/* width:6.9rem; */
|
||||
height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
background-color: #00AAEA;
|
||||
margin: 76rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.reason {
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #FF0000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,211 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="WordSection1">
|
||||
<!-- <view class="MsoNormal" align="center" style="text-align:center;text-indent:38.95rpx"><span style="font-size:18.0rpx;font-family:宋体">共享股东协议</span></view> -->
|
||||
|
||||
<view class="MsoNormal" align="center" style="text-align:center;text-indent:30.3rpx"><span lang="EN-US" style="font-size:28rpx"> </span></view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:28.0rpx">
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
欢迎阅读香道滇官方商城服务条款
|
||||
</span>
|
||||
<span lang="EN-US" style="font-size:28rpx">(</span>
|
||||
<span style="font-size:28rpx;font-family:宋体">下称“本条款”</span>
|
||||
<span lang="EN-US" style="font-size:28rpx">)</span>
|
||||
<span
|
||||
style="font-size:28rpx;font-family:
|
||||
宋体"
|
||||
>
|
||||
。本条款阐述之条款和条件适用于您在香道滇官方商城平台无偿或有偿使用香道滇产品。
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:30.3rpx">
|
||||
<span lang="EN-US" style="font-size:30rpx">1. </span>
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
接受条款
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:30.3rpx">
|
||||
<u>
|
||||
<span style="font-size:28rpx;font-family:宋体">
|
||||
以任何方式使用香道滇产品即表示您同意自己已经与香道滇公司就香道滇官方商城平台服务事项(下称香道滇商城服务)订立本条款,且您将受本条款的条件约束。
|
||||
</span>
|
||||
</u>
|
||||
<span style="font-size:28rpx;font-family:宋体">
|
||||
您应在第一次提出申请前仔细阅读本条款,并有权选择停止或继续使用香道滇商城服务;一旦您继续使用香道滇商城服务,则表示您已接受本条款,当您与香道滇商城发生争议时,应以本条款作为约束双方的条款。
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:30.3rpx">
|
||||
<span lang="EN-US" style="font-size:30rpx">2. </span>
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
谁可成为
|
||||
</span>
|
||||
<span
|
||||
style="font-size:28rpx;font-family:
|
||||
宋体"
|
||||
>
|
||||
香道滇官方商城
|
||||
<span>平台的共享股东</span>
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:28.0rpx">
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
必需是注册成为香道滇官方商城会员后,对香道滇产品产生一定兴趣和拥有一定资源的合作伙伴:
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:28.0rpx">
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
升级成为群主——针对个人要求拥有吃货宣传带动力;
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:28.0rpx">
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
升级成为团长——针对个人要求具备一定的线上或线下实战带货力;
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:28.0rpx">
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
升级成为特约合作方——针对第三方合作要求具备一定实力的带货公司
|
||||
</span>
|
||||
<span lang="EN-US" style="font-size:28rpx">/</span>
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
平台。
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:28.0rpx">
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
请您先与商城管理员进行信息交流,让我们了解下您的资源情况,同时也把相应匹配的共享股东的具体权益让您也具体了解,待双方都明确的情况下在由您提出申请并提交相应资料信息后,即可完成对应升级。
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:30.3rpx">
|
||||
<span lang="EN-US" style="font-size:30rpx">3. </span>
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
您的资料与隐私
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:28.0rpx">
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
需要到您提交个人或平台方的资料仅作为香道滇官方商城合作备案,同时香道滇官方商城也保证不会泄露您的信息给第三方。
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:30.3rpx">
|
||||
<span lang="EN-US" style="font-size:28rpx">4. </span>
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
香道滇官方商城
|
||||
<span>平台产品责任</span>
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:28.0rpx">
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
(
|
||||
</span>
|
||||
<span lang="EN-US" style="font-size:28rpx">1</span>
|
||||
<span style="font-size:28rpx;font-family:宋体">)所有从本商城发货出去的产品均有品质保证,如因产品本身出现的质量问题均由本商城负责处理及承担相应责任;</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="margin-left:8.0rpx;text-indent:20.45rpx">
|
||||
<span style="font-size:28rpx;font-family:宋体">(</span>
|
||||
<span lang="EN-US" style="font-size:28rpx">2</span>
|
||||
<span
|
||||
style="font-size:28rpx;font-family:
|
||||
宋体"
|
||||
>
|
||||
)您作为香道滇官方商城产品的推广方用户,需按照本商城给予的指导售价、产品实际宣传内容以及有针对性的目标群体进行宣传推广,
|
||||
</span>
|
||||
<span style="font-size:28rpx;font-family:宋体">不得进行虚假宣传或者促使消费者误解的方式进行宣传,</span>
|
||||
<span style="font-size:28rpx;font-family:宋体">如此造成目标客户群体的影响则由其自行承担相应责任。</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:30.3rpx">
|
||||
<span lang="EN-US" style="font-size:30rpx">5. </span>
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
不可抗力
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal" style="text-indent:28.0rpx">
|
||||
<span
|
||||
style="font-size:28rpx;
|
||||
font-family:宋体"
|
||||
>
|
||||
由于自然灾害、暴动、战争行为、政府行为、通电信网络、黑客攻击、尚无有效防御措施的计算机病毒的发作及其他各方不能预见并且对其发生和后果不能防止并避免的不可抗力原因,致使凡香道滇官方商城延迟或未能履约的,香道滇公司不对您承担任何责任。
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="MsoNormal"><span lang="EN-US" style="font-size:28rpx"> </span></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<scrirpx>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</scrirpx>
|
||||
|
||||
<style>
|
||||
.container {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -86,7 +86,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="my-hdeader-bottom">
|
||||
<view class="item" @click="linkTo('/pages/user/UserBill/index')">
|
||||
<view class="item" @click="linkTo('/pagesUser/user/UserBill/index')">
|
||||
<view v-if="!isNoLogin" class="number">
|
||||
{{ userInfo.nowMoney ? force2Decimal(userInfo.nowMoney) : 0.00 }}
|
||||
</view>
|
||||
@@ -98,7 +98,7 @@
|
||||
余额
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" @click="linkTo('/pages/user/Points/index')">
|
||||
<view class="item" @click="linkTo('/pagesUser/user/Points/index')">
|
||||
<view v-if="!isNoLogin" class="number">
|
||||
{{ userInfo.integral || 0 }}
|
||||
</view>
|
||||
@@ -372,7 +372,7 @@ export default {
|
||||
},
|
||||
{
|
||||
text: '账户明细',
|
||||
url: '/pages/user/UserBill/index',
|
||||
url: '/pagesUser/user/UserBill/index',
|
||||
icon: '/icon/icon-coin.png',
|
||||
allowEnter: true
|
||||
},
|
||||
@@ -384,13 +384,13 @@ export default {
|
||||
},
|
||||
{
|
||||
text: '团队管理',
|
||||
url: '/pages/user/promotion/UserPromotion/index',
|
||||
url: '/pagesUser/user/promotion/UserPromotion/index',
|
||||
icon: '/icon/icon-users.png',
|
||||
allowEnter: true
|
||||
},
|
||||
{
|
||||
text: '商品足迹',
|
||||
url: '/pages/user/History/index',
|
||||
url: '/pagesUser/user/History/index',
|
||||
icon: '/icon/icon-help.png',
|
||||
allowEnter: true
|
||||
}
|
||||
@@ -512,7 +512,7 @@ export default {
|
||||
}
|
||||
},
|
||||
goReturnList() {
|
||||
this.$yrouter.push('/pages/order/ReturnList/index')
|
||||
this.$yrouter.push('/pagesOrder/order/ReturnList/index')
|
||||
},
|
||||
goMyOrder(type) {
|
||||
if (this.isNoLogin) {
|
||||
@@ -535,7 +535,7 @@ export default {
|
||||
},
|
||||
goUserAccount() {
|
||||
this.$yrouter.push({
|
||||
path: '/pages/user/UserAccount/index'
|
||||
path: '/pagesUser/user/UserAccount/index'
|
||||
})
|
||||
},
|
||||
goPersonalData() {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,111 +0,0 @@
|
||||
<template>
|
||||
<view class="my-account">
|
||||
<view class="wrapper">
|
||||
<view class="header">
|
||||
<view class="headerCon">
|
||||
<view class="account acea-row row-top row-between">
|
||||
<view class="assets">
|
||||
<view style="color: #fff;">总资产(元)</view>
|
||||
<view class="money">{{ now_money }}</view>
|
||||
</view>
|
||||
<!-- <navigator url="/pages/user/Recharge/index" class="recharge font-color-red">充值</navigator> -->
|
||||
</view>
|
||||
<view class="cumulative acea-row row-top">
|
||||
<view class="item">
|
||||
<view style="color: #fff;">累计消费(元)</view>
|
||||
<view class="money">{{ orderStatusSum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav acea-row row-middle">
|
||||
<view class="item" @click="goUserBill(0)">
|
||||
<view class="pictrue">
|
||||
<image :src="webUrl+'/20230304202916716809.png'" />
|
||||
</view>
|
||||
<view>账单记录</view>
|
||||
</view>
|
||||
<view class="item" @click="goUserBill(1)">
|
||||
<view class="pictrue">
|
||||
<image :src="webUrl+'/20230304202923197491.png'" />
|
||||
</view>
|
||||
<view>消费记录</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="advert acea-row row-between-wrapper"></view>
|
||||
</view>
|
||||
<Recommend></Recommend>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import Recommend from "@/components/Recommend";
|
||||
import { getActivityStatus, getBalance } from "@/api/user";
|
||||
export default {
|
||||
name: "UserAccount",
|
||||
components: {
|
||||
Recommend
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
now_money: 0,
|
||||
orderStatusSum: 0,
|
||||
recharge: 0,
|
||||
activity: {
|
||||
is_bargin: false,
|
||||
is_pink: false,
|
||||
is_seckill: false
|
||||
}
|
||||
};
|
||||
},
|
||||
onShow: function() {
|
||||
this.getIndex();
|
||||
// this.getActivity();
|
||||
},
|
||||
methods: {
|
||||
goUserBill(types) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/user/UserBill/index",
|
||||
query: { types }
|
||||
});
|
||||
},
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
getBalance().then(
|
||||
res => {
|
||||
that.now_money = res.data.now_money;
|
||||
that.orderStatusSum = res.data.orderStatusSum;
|
||||
that.recharge = res.data.recharge;
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
getActivity: function() {
|
||||
let that = this;
|
||||
getActivityStatus().then(
|
||||
res => {
|
||||
that.activity.is_bargin = res.data.is_bargin;
|
||||
that.activity.is_pink = res.data.is_pink;
|
||||
that.activity.is_seckill = res.data.is_seckill;
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,128 +0,0 @@
|
||||
<template>
|
||||
<view class="bill-details" ref="container">
|
||||
<view class="nav acea-row">
|
||||
<view class="item" :class="types == 0 ? 'on' : ''" @click="changeTypes(0)">全部</view>
|
||||
<view class="item" :class="types == 1 ? 'on' : ''" @click="changeTypes(1)">消费</view>
|
||||
<view class="item" :class="types == 2 ? 'on' : ''" @click="changeTypes(2)">充值</view>
|
||||
</view>
|
||||
<view class="sign-record">
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item, listIndex) in list" :key="listIndex">
|
||||
<view class="data">{{ item.time }}</view>
|
||||
<view class="listn" v-for="(val, key) in item.list" :key="key">
|
||||
<view class="itemn acea-row row-between-wrapper">
|
||||
<view>
|
||||
<view class="name line1">{{ val.title }}</view>
|
||||
<view>{{ val.addTime }}</view>
|
||||
</view>
|
||||
<view
|
||||
class="num"
|
||||
:class="val.pm == 0 ? 'font-color-red' : ''"
|
||||
>{{ val.pm == 0 ? "-" : "+" }}{{ force2Decimal(val.number) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
<view v-if="loaded && list.length === 0">
|
||||
<image :src="webUrl + '/noConsumption.png'" class="no-data"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getCommissionInfo } from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "UserBill",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
types: 0,
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 5
|
||||
},
|
||||
list: [],
|
||||
loaded: false,
|
||||
loading: false,
|
||||
pageKeyId: Object.freeze('userBalanceBill')
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"$yroute.query.types": function(newVal) {
|
||||
let that = this;
|
||||
if (newVal != undefined) {
|
||||
that.types = newVal;
|
||||
that.list = [];
|
||||
that.where.page = 1;
|
||||
that.loaded = false;
|
||||
that.loading = false;
|
||||
that.getIndex();
|
||||
}
|
||||
},
|
||||
types: function() {
|
||||
this.getIndex();
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
let that = this;
|
||||
|
||||
that.types = that.$yroute.query.types||0;
|
||||
that.getIndex();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.getIndex();
|
||||
},
|
||||
methods: {
|
||||
force2Decimal(v){
|
||||
return this.$force2Decimal(v);
|
||||
},
|
||||
code: function() {
|
||||
this.sendCode();
|
||||
},
|
||||
changeTypes: function(val) {
|
||||
if (val != this.types) {
|
||||
this.types = val;
|
||||
this.list = [];
|
||||
this.where.page = 1;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
if (that.loaded == true || that.loading == true) return;
|
||||
that.loading = true;
|
||||
getCommissionInfo(that.where, that.types).then(
|
||||
res => {
|
||||
that.loading = false;
|
||||
that.loaded = res.data.length < that.where.limit;
|
||||
that.where.page = that.where.page + 1;
|
||||
that.list.push.apply(that.list, res.data);
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.no-data {
|
||||
display: block;
|
||||
width: 500rpx;
|
||||
height: 500rpx;
|
||||
margin: 100rpx auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1,316 +0,0 @@
|
||||
<template>
|
||||
<view class="newsList" ref="container">
|
||||
<mescroll-body ref="mescrollRef" top="0" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption" @up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">
|
||||
|
||||
<view class="list" v-for="(item, index) in list" :key="index">
|
||||
<view @click="goNewsDetail(item)" class="item acea-row" style="flex-wrap: nowrap;">
|
||||
<view class="text acea-row row-column-between">
|
||||
<view class="acea-row row-column" style="position: relative;">
|
||||
<view class="name line2">{{ item.name }}</view>
|
||||
<view class="summary line1" style="width: 322rpx;">{{ shortDateString(item.createdTime) }}</view>
|
||||
|
||||
</view>
|
||||
<view class="acea-row row-left row-middle">
|
||||
<view class="see-num-box acea-row row-middle" style="margin-right: 20rpx;">
|
||||
<image :src="webUrl+'/20230304131559277594.png'" class="eye-icon" mode=""></image>
|
||||
<text class="see-num-text">{{$formatCount(item.pv||0)}}</text>
|
||||
</view>
|
||||
<view class="zan-num-box acea-row row-middle">
|
||||
<img class="zan-icon" :src="webUrl+'/20230304133322439350.png'" />
|
||||
<text class="zan-num-text">{{$formatCount(item.zan||0)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pictrue">
|
||||
|
||||
<image v-if="item.type=='NT_TEXT'" style="width: 100%;height: 100%;" :src="item.resources[0]" />
|
||||
<video v-if="item.type=='NT_VIDEO'" style="width: 100%;height: 100%;" :src="item.resources[0]"></video>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view id="loading-more"></view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import MescrollMixins from "@/mixins/mescroll-mixins.js";
|
||||
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
|
||||
import { getHotelNewsZanList } from "@/api/inn.js";
|
||||
import { formatDateTime,isNullOrEmpty} from "@/utils";
|
||||
var _this;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
list:[],
|
||||
upOption:{
|
||||
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||
auto:true,
|
||||
empty:{
|
||||
tip: '暂无数据' // 提示
|
||||
// btnText:'点击刷新'
|
||||
}
|
||||
},
|
||||
downOption:{
|
||||
auto:false
|
||||
}
|
||||
}
|
||||
},
|
||||
components:{
|
||||
MescrollBody
|
||||
},
|
||||
mixins:[
|
||||
MescrollMixins({
|
||||
getPageData(mescroll){
|
||||
var _this = this;
|
||||
// 此时mescroll会携带page的参数:
|
||||
let pageNum = mescroll.num; // 页码, 默认从1开始
|
||||
let pageSize = mescroll.size; // 页长, 默认每页10条
|
||||
var params = {
|
||||
limit:pageNum,
|
||||
page:pageSize
|
||||
}
|
||||
getHotelNewsZanList(params)
|
||||
.then(res => {
|
||||
|
||||
|
||||
if(mescroll.num == 1) {
|
||||
_this.list = []; //如果是第一页需手动制空列表
|
||||
}
|
||||
_this.list = _this.list.concat(res.data);//追加新数据
|
||||
mescroll.endSuccess(res.data.length);
|
||||
})
|
||||
.catch(err => {
|
||||
|
||||
console.log(err);
|
||||
mescroll.endErr();
|
||||
uni.showToast({
|
||||
title: err.msg || '请求出错',
|
||||
icon: 'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
],
|
||||
onLoad:function(e){
|
||||
_this = this;
|
||||
//从query里取模式
|
||||
//this.isSelectMode = this.$yroute.query.isSelected;
|
||||
},
|
||||
onShow:function(){
|
||||
//静默刷新
|
||||
this.mescroll && this.mescroll.resetUpScroll(false);
|
||||
},
|
||||
methods: {
|
||||
isNullOrEmpty,
|
||||
shortDateString(dateStr){
|
||||
var ret = '';
|
||||
if (isNullOrEmpty(dateStr)) {
|
||||
|
||||
} else{
|
||||
// var s = dataStr;
|
||||
// s = s.replace(/-/g,"/");
|
||||
// var date = new Date(s).getTime();
|
||||
ret = formatDateTime(dateStr,'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
goNewsDetail:function(item){
|
||||
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id='+item.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
.pink-dot{
|
||||
width:24rpx;
|
||||
height:24rpx;
|
||||
background:rgba(255,86,74,0.4);
|
||||
border-radius:50%;
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
bottom: 0;
|
||||
right: -12rpx;
|
||||
}
|
||||
.main-title{
|
||||
font-size: 36rpx;
|
||||
line-height: 36rpx;
|
||||
// color: #080F1A;
|
||||
color: #FFFFFF;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.eye-icon{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.zan-icon{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.zan-num-text{
|
||||
color: #080F1A;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.see-num-text{
|
||||
color: #080F1A;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.newsList .list .item .text .name{
|
||||
color: #080F1A !important;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.newsList .list .item .text{
|
||||
margin-right: 10rpx;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.newsList .list .item .pictrue{
|
||||
flex-shrink: 0;
|
||||
width: 288rpx !important;
|
||||
height: 216rpx !important;
|
||||
}
|
||||
|
||||
.newsList .list .item{
|
||||
background-color: #fff;
|
||||
flex-wrap: nowrap;
|
||||
padding: 35rpx !important;
|
||||
margin: 35rpx 30rpx !important;
|
||||
border-radius: 8rpx;
|
||||
|
||||
}
|
||||
|
||||
.summary{
|
||||
color: #C2C5CC;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.sub-title{
|
||||
font-size:14*2rpx;
|
||||
margin-top: 10rpx;
|
||||
color:rgba(252,85,179,0.7);
|
||||
}
|
||||
|
||||
.title .hot-title{
|
||||
font-size: 18*2rpx;
|
||||
color: #FF7900;
|
||||
background:rgba(255,255,255,1);
|
||||
margin-left: 5*2rpx;
|
||||
margin-right: 5*2rpx;
|
||||
}
|
||||
|
||||
.hotGoodsList{
|
||||
position: relative;
|
||||
margin: 35rpx 0;
|
||||
background-color: #fff;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.hotGoodsList .newProductsItem{
|
||||
margin-left: 35rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.img-box{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.price-tag{
|
||||
position: absolute;
|
||||
width: 39*2rpx;
|
||||
height: 19*2rpx;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.like-btn{
|
||||
position: absolute;
|
||||
width: 24*2rpx;
|
||||
height: 24*2rpx;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.inn-tag-wrap{
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.zanmost-tag{
|
||||
padding: 2rpx 8rpx 2rpx 8rpx;
|
||||
background: #FF2D69;
|
||||
font-size: 10*2rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.latest-tag{
|
||||
padding: 2rpx 8rpx 2rpx 8rpx;
|
||||
background: #0DC5C5;
|
||||
font-size: 10*2rpx;
|
||||
color: #FFFFFF;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.location-tag{
|
||||
padding: 2rpx 8rpx 2rpx 8rpx;
|
||||
background: #FD685D;
|
||||
font-size: 10*2rpx;
|
||||
color: #FFFFFF;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.inn-shop-icon{
|
||||
border-radius: 50%;
|
||||
width: 24*2rpx;
|
||||
height: 24*2rpx;
|
||||
}
|
||||
|
||||
.inn-shop-name{
|
||||
font-size: 24rpx;
|
||||
color: #080F1A;
|
||||
}
|
||||
|
||||
.inn-shop-date{
|
||||
font-size: 18rpx;
|
||||
color: #C2C5CC;
|
||||
}
|
||||
|
||||
.location{
|
||||
padding: 4rpx 16rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 22rpx;
|
||||
}
|
||||
|
||||
.city-name{
|
||||
color: #FD685D;
|
||||
font-size: 24rpx;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
.btLine{
|
||||
width: 100%;
|
||||
height: 12rpx;
|
||||
margin-top: -4rpx;
|
||||
background: #FD685D;
|
||||
}
|
||||
|
||||
.pro-info{
|
||||
font-size: 14*2rpx;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,209 +0,0 @@
|
||||
<template>
|
||||
<view class="member-center">
|
||||
<view class="header">
|
||||
<view class="slider-banner banner">
|
||||
<swiper indicatorDots="true" @change="swiperChange">
|
||||
<block v-for="(item, vipListIndex) in vipList" :key="vipListIndex">
|
||||
<swiper-item>
|
||||
<view class="swiper-slide" :style="{ backgroundImage: 'url(' + item.image + ')' }">
|
||||
<!-- <image :src="item.icon" />-->
|
||||
<view class="name">{{ item.name }}</view>
|
||||
<view class="discount">
|
||||
可享受商品折扣: {{ item.discount / 10 }}折
|
||||
<text class="iconfont icon-zhekou"></text>
|
||||
</view>
|
||||
<view class="nav acea-row" v-if="item.grade == grade">
|
||||
<view class="item" v-for="(val, indexn) in vipComplete" :key="indexn">
|
||||
<view class="num">{{ val.newNumber }}</view>
|
||||
<view>{{ val.realName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lock" v-if="item.grade > grade">
|
||||
<text class="iconfont icon-quanxianguanlisuozi"></text>该会员等级尚未解锁
|
||||
</view>
|
||||
<view class="lock" v-if="item.grade < grade">
|
||||
<text class="iconfont icon-xuanzhong1"></text>已解锁更高等级
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="title acea-row row-between-wrapper">
|
||||
<view>
|
||||
<text class="iconfont icon-jingyanzhi"></text>会员升级要求
|
||||
</view>
|
||||
<view class="num">
|
||||
<text class="current">{{ taskCount }}</text>
|
||||
/{{ vipRequire.length }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item, vipCompleteIndex) in vipComplete" :key="vipCompleteIndex">
|
||||
<view class="top acea-row row-between-wrapper">
|
||||
<view class="name">
|
||||
{{ item.name}}
|
||||
<text class="iconfont icon-wenti" v-if="item.illustrate" @click="showGrow(item)"></text>
|
||||
</view>
|
||||
<view>{{ item.finish ? "已满足条件" : "未满足条件" }}</view>
|
||||
</view>
|
||||
<view class="cu-progress">
|
||||
<view class="bg-red" :style="{ width: item.speed + '%' }"></view>
|
||||
</view>
|
||||
<view class="experience acea-row row-between-wrapper">
|
||||
<view>{{ item.taskTypeTitle }}</view>
|
||||
<view>
|
||||
<text class="num">{{ item.newNumber }}</text>
|
||||
/{{ item.number }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Recommend></Recommend>
|
||||
<view class="growthValue" :class="growthValue === false ? 'on' : ''">
|
||||
<view class="pictrue">
|
||||
<image :src="webUrl+'/20200729164901293388.jpg'" />
|
||||
<text class="iconfont icon-guanbi3" @click="growthTap"></text>
|
||||
</view>
|
||||
<view class="conter">{{ illustrate }}</view>
|
||||
</view>
|
||||
<view class="mask" :hidden="growthValue" @click="growthTap"></view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||
|
||||
import Recommend from "@/components/Recommend";
|
||||
import { getVipInfo, getVipTask, setDetection } from "@/api/user";
|
||||
export default {
|
||||
name: "Poster",
|
||||
components: {
|
||||
// swiper,
|
||||
// swiperSlide,
|
||||
Recommend
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
vipList: [], //等级列表
|
||||
vipRequire: [], //等级要求
|
||||
vipComplete: [], //完成情况
|
||||
taskCount: 0, //任务数
|
||||
grade: 0, //当前会员等级
|
||||
swiperVip: {
|
||||
speed: 1000,
|
||||
effect: "coverflow",
|
||||
slidesPerView: "auto",
|
||||
centeredSlides: true,
|
||||
// loop: true,
|
||||
coverflowEffect: {
|
||||
rotate: 0, // 旋转的角度
|
||||
stretch: -20, // 拉伸 图片间左右的间距和密集度
|
||||
depth: 100, // 深度 切换图片间上下的间距和密集度
|
||||
modifier: 2, // 修正值 该值越大前面的效果越明显
|
||||
slideShadows: false // 页面阴影效果
|
||||
},
|
||||
observer: true,
|
||||
observeParents: true
|
||||
},
|
||||
loading: false,
|
||||
growthValue: true,
|
||||
illustrate: "",
|
||||
activeIndex: 0
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
vipList: function() {
|
||||
let that = this;
|
||||
if (that.vipList.length > 0) {
|
||||
that.vipList.forEach(function(item, index) {
|
||||
if (item.isClear === false) {
|
||||
// that.swiper.slideTo(index);
|
||||
that.activeIndex = index;
|
||||
that.grade = item.grade;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
swiper() {
|
||||
// return this.$refs.mySwiper.swiper;
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
let that = this;
|
||||
setDetection();
|
||||
that.getInfo();
|
||||
// that.swiper.on("slideChange", function() {
|
||||
// that.activeIndex = that.swiper.activeIndex;
|
||||
// that.getTask();
|
||||
// });
|
||||
},
|
||||
|
||||
methods: {
|
||||
swiperChange: function(e) {
|
||||
let that = this;
|
||||
that.activeIndex = e.mp.detail.current;
|
||||
that.getTask();
|
||||
},
|
||||
growthTap: function() {
|
||||
this.growthValue = true;
|
||||
},
|
||||
getInfo: function() {
|
||||
let that = this;
|
||||
getVipInfo().then(
|
||||
res => {
|
||||
that.vipList = res.data.list;
|
||||
that.vipRequire = res.data.task.list;
|
||||
that.vipComplete = res.data.task.task;
|
||||
that.taskCount = res.data.task.reachCount;
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
getTask: function() {
|
||||
let that = this;
|
||||
getVipTask(that.vipList[that.activeIndex].id).then(
|
||||
res => {
|
||||
that.vipRequire = res.data.list;
|
||||
that.vipComplete = res.data.task;
|
||||
that.taskCount = res.data.reach_count;
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
showGrow: function(item) {
|
||||
if (this.illustrate != item.illustrate) this.illustrate = item.illustrate;
|
||||
this.growthValue = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.banner swiper {
|
||||
height: 328rpx;
|
||||
}
|
||||
.swiper-slide {
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1,33 +0,0 @@
|
||||
<template>
|
||||
<view class="cash-audit">
|
||||
<view class="pictrue">
|
||||
<image :src="`${staticUrl}/examine.png`" />
|
||||
</view>
|
||||
<view class="tip">提现申请已提交,等待人工审核</view>
|
||||
<view class="time">{{ time }}</view>
|
||||
<view class="bnt bg-color-red" @click="goUserPromotion()">好的</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "CashAudit",
|
||||
components: {},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
staticUrl:this.$STATIC_RESOURCE_URL,
|
||||
time: ""
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
let myData = new Date();
|
||||
this.time = myData.toLocaleString();
|
||||
},
|
||||
methods: {
|
||||
goUserPromotion() {
|
||||
this.$yrouter.back();
|
||||
// this.$yrouter.push({ path: "/pages/user/promotion/UserPromotion/index" });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,122 +0,0 @@
|
||||
<template>
|
||||
<view class="commission-details" ref="container">
|
||||
<view class="promoterHeader bg-color-red">
|
||||
<view class="headerCon acea-row row-between-wrapper">
|
||||
<view>
|
||||
<view class="name">佣金明细</view>
|
||||
<view class="money">
|
||||
¥<text class="num">{{ force2Decimal(commission) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sign-record" ref="content">
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
|
||||
<view class="data">{{ item.time }}</view>
|
||||
<view class="listn" v-for="(val, indexn) in item.list" :key="indexn">
|
||||
<view class="itemn acea-row row-between-wrapper">
|
||||
<view>
|
||||
<view class="name line1">{{ val.title }}</view>
|
||||
<view>{{ val.addTime }}</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" style="flex-shrink: 0;text-align: right;">{{val.status==0?"待收货确定":(val.status==1?"有效":"无效")}}</view>
|
||||
<view class="">
|
||||
<view class="num" v-if="val.pm == 1">+{{ force2Decimal(val.number) }}</view>
|
||||
<view class="num font-color-red" v-if="val.pm == 0">
|
||||
-{{ force2Decimal(val.number) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getCommissionInfo, getSpreadInfo } from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "CommissionDetails",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
info: [],
|
||||
commission: 0,
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 3
|
||||
},
|
||||
types: 9,//3,
|
||||
loaded: false,
|
||||
loading: false,
|
||||
pageKeyId: Object.freeze('userSpreadBill')
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
this.getCommission();
|
||||
this.getIndex();
|
||||
},
|
||||
onReachBottom() {
|
||||
this.loading === false && this.getIndex();
|
||||
},
|
||||
methods: {
|
||||
force2Decimal(v){
|
||||
return this.$force2Decimal(v);
|
||||
},
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
if (that.loading == true || that.loaded == true) return;
|
||||
that.loading = true;
|
||||
getCommissionInfo(that.where, that.types).then(
|
||||
res => {
|
||||
that.loading = false;
|
||||
that.loaded = res.data.length < that.where.limit;
|
||||
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
|
||||
that.where.page = that.where.page + 1;
|
||||
that.info.push.apply(that.info, res.data);
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
getCommission: function() {
|
||||
let that = this;
|
||||
getSpreadInfo().then(
|
||||
res => {
|
||||
that.commission = res.data.commissionCount;
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.promoterHeader {
|
||||
.headerCon {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,160 +0,0 @@
|
||||
<template>
|
||||
<view class="distribution-posters">
|
||||
<view class="slider-banner banner">
|
||||
<swiper indicatorDots="true">
|
||||
<block v-for="(item, infoIndex) in info" :key="infoIndex">
|
||||
<swiper-item>
|
||||
<image
|
||||
class="slide-image"
|
||||
:src="item.wap_poster"
|
||||
mode="widthFix"
|
||||
show-menu-by-longpress
|
||||
/>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="keep bg-color-red" @click="saveImg">保存海报</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||
import { getSpreadImg } from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "Poster",
|
||||
components: {
|
||||
// swiper,
|
||||
// swiperSlide
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
swiperPosters: {
|
||||
speed: 1000,
|
||||
effect: "coverflow",
|
||||
slidesPerView: "auto",
|
||||
centeredSlides: true,
|
||||
coverflowEffect: {
|
||||
rotate: 0, // 旋转的角度
|
||||
stretch: -20, // 拉伸 图片间左右的间距和密集度
|
||||
depth: 100, // 深度 切换图片间上下的间距和密集度
|
||||
modifier: 3, // 修正值 该值越大前面的效果越明显
|
||||
slideShadows: false // 页面阴影效果
|
||||
},
|
||||
observer: true,
|
||||
observeParents: true
|
||||
},
|
||||
info: [],
|
||||
activeIndex: 0
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
this.getIndex();
|
||||
let that = this;
|
||||
// this.swiper.on("slideChange", function() {
|
||||
// that.activeIndex = that.swiper.activeIndex;
|
||||
// });
|
||||
},
|
||||
computed: {
|
||||
swiper() {
|
||||
// return this.$refs.mySwiper.swiper;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
let from = {};
|
||||
if (this.$deviceType == "app") {
|
||||
from.from = "app";
|
||||
}
|
||||
getSpreadImg(from).then(
|
||||
res => {
|
||||
that.info = res.data;
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
downloadIamge: function(imgsrc, name) {
|
||||
var that = this;
|
||||
this.isDown = true;
|
||||
var downloadUrl = imgsrc;
|
||||
|
||||
if (!wx.saveImageToPhotosAlbum) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content:
|
||||
"当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"
|
||||
});
|
||||
that.openDialogVisible = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.writePhotosAlbum" 这个 scope
|
||||
wx.getSetting({
|
||||
success(res) {
|
||||
if (!res.authSetting["scope.writePhotosAlbum"]) {
|
||||
that.openDialogVisible = true;
|
||||
|
||||
// 接口调用询问
|
||||
wx.authorize({
|
||||
scope: "scope.writePhotosAlbum",
|
||||
success() {
|
||||
that.downloadImage(downloadUrl);
|
||||
},
|
||||
fail() {
|
||||
// 用户拒绝了授权
|
||||
// 打开设置页面
|
||||
wx.openSetting({
|
||||
success: function(data) {},
|
||||
fail: function(data) {}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.downloadImage(downloadUrl);
|
||||
}
|
||||
},
|
||||
fail(res) {
|
||||
that.openDialogVisible = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
saveImg: function() {
|
||||
this.downloadIamge(
|
||||
this.info[this.activeIndex].wap_poster,
|
||||
"poster" + this.activeIndex
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
.distribution-posters {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.banenr {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.banner swiper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.banner .slide-image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1,361 +0,0 @@
|
||||
<template>
|
||||
<view class="promoter-list" ref="container">
|
||||
<view class="header">
|
||||
|
||||
<!-- 搜索开始 -->
|
||||
<view class="search acea-row row-between-wrapper" style="background-color: #F5F5F5 !important;margin-top: 22rpx;">
|
||||
<form @submit.prevent="submitForm" style="width: 100% !important;">
|
||||
<view class="input" style="text-align: left !important;background: #fff !important;width: auto !important;">
|
||||
<text class="iconfont icon-sousuo2"
|
||||
style="left: 28rpx !important;right: auto !important;margin-right: 10rpx;font-size: 32rpx !important;color: #9D9D9D !important;"></text>
|
||||
<input style="margin-left: 70rpx !important;text-align: left !important;color: #CCCCCC !important;"
|
||||
placeholder="点击搜索会员名称" placeholder-style="color:#CCCCCC" v-model="screen.keyword"
|
||||
@confirm="submitForm"/>
|
||||
<!-- <text class="iconfont icon-guanbi"></text> -->
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<!-- 搜索结束 -->
|
||||
|
||||
<view class="promoterHeader" style="height: 160rpx !important;">
|
||||
<view class="headerCon acea-row row-between-wrapper"
|
||||
style="width: auto !important;padding: 0 32rpx !important;">
|
||||
<view class="acea-row row-column">
|
||||
<view class="name"
|
||||
style="color: #000000 !important;font-size: 32rpx !important;font-weight: 500;margin-bottom: 20rpx;">
|
||||
{{ first + second || '0' }}
|
||||
</view>
|
||||
<view style="color: #8C8C8C;font-size: 24rpx;"> 推广人数(人)</view>
|
||||
</view>
|
||||
<view class="acea-row row-middle">
|
||||
<view class="dropDownBtn acea-row row-middle row-center" @click="changeGrade()">
|
||||
<text style="color: #fff;font-size: 24rpx;margin-right: 28rpx;">
|
||||
{{ screen.grade == 0 ? '一级' : '二级' }}
|
||||
</text>
|
||||
<image style="width: 24rpx;height: 12rpx;" :src="webUrl+'/20210819151908963957.png'" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 一二级筛选 -->
|
||||
<!-- <view class="nav acea-row row-around">
|
||||
<view
|
||||
class="item"
|
||||
:class="screen.grade == 0 ? 'on' : ''"
|
||||
@click="checkGrade(0)"
|
||||
>一级({{ first||'0' }})</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="screen.grade == 1 ? 'on' : ''"
|
||||
@click="checkGrade(1)"
|
||||
>二级({{ second||'0' }})</view>
|
||||
</view> -->
|
||||
<!-- 一二级筛选 -->
|
||||
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="sortNav acea-row row-middle" :class="fixedState === true ? 'on' : ''">
|
||||
<view class="sortItem" :style="(childCount === 1 || childCount === 3) ? 'color:#0DC5C5' : ''"
|
||||
@click="sort('childCount')">
|
||||
团队排序
|
||||
<image :src="webUrl+'/20230304204227252460.png'" v-if="childCount == 1"/>
|
||||
<image :src="webUrl+'/20230304204233362231.png'" v-if="childCount == 2"/>
|
||||
<image :src="webUrl+'/20230304204240497772.png'" v-if="childCount == 3"/>
|
||||
</view>
|
||||
<view class="sortItem" :style="(numberCount === 1 || numberCount === 3) ? 'color:#0DC5C5' : ''"
|
||||
@click="sort('numberCount')">
|
||||
金额排序
|
||||
<image :src="webUrl+'/20230304204227252460.png'" v-if="numberCount == 1"/>
|
||||
<image :src="webUrl+'/20230304204233362231.png'" v-if="numberCount == 2"/>
|
||||
<image :src="webUrl+'/20230304204240497772.png'" v-if="numberCount == 3"/>
|
||||
</view>
|
||||
<view class="sortItem" :style="(orderCount === 1 || orderCount === 3) ? 'color:#0DC5C5' : ''"
|
||||
@click="sort('orderCount')">
|
||||
订单排序
|
||||
<image :src="webUrl+'/20230304204227252460.png'" v-if="orderCount == 1"/>
|
||||
<image :src="webUrl+'/20230304204233362231.png'" v-if="orderCount == 2"/>
|
||||
<image :src="webUrl+'/20230304204240497772.png'" v-if="orderCount == 3"/>
|
||||
</view>
|
||||
<view class="sortItem" :style="(levelCount === 1 || levelCount === 3) ? 'color:#0DC5C5' : ''"
|
||||
@click="sort('levelCount')">
|
||||
等级排序
|
||||
<image :src="webUrl+'/20230304204227252460.png'" v-if="levelCount == 1"/>
|
||||
<image :src="webUrl+'/20230304204233362231.png'" v-if="levelCount == 2"/>
|
||||
<image :src="webUrl+'/20230304204240497772.png'" v-if="levelCount == 3"/>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="fixedState === true ? 'sortList' : ''">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(val, spreadListIndex) in spreadList"
|
||||
:key="spreadListIndex"
|
||||
>
|
||||
<view class="picTxt acea-row row-between-wrapper" style="flex-wrap: nowrap;">
|
||||
<view class="" style="width: 60rpx;word-wrap: break-word;text-align: center;margin-right: 8rpx;">
|
||||
{{ spreadListIndex + 1 }}
|
||||
</view>
|
||||
<view class="pictrue" style="flex-shrink: 0;margin-right: 8rpx;">
|
||||
<image :src="val.avatar"/>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="name line1 acea-row row-middle">{{ val.nickname }}
|
||||
<text class="levelBox">{{ val.levelName }}</text>
|
||||
</view>
|
||||
<view style="color: #999999 !important;">加入时间: {{ val.time }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view>
|
||||
<text class="font-color-red">{{ val.childCount }}</text>
|
||||
人
|
||||
</view>
|
||||
<view>{{ val.orderCount }}单</view>
|
||||
<view>
|
||||
<text class="font-color-red">{{ val.numberCount ? val.numberCount : 0 }}</text>
|
||||
元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-px-6" v-if="spreadList.length === 0">
|
||||
<u-divider :text=" ' · 此级别未找到会员 · ' " textPosition="center"></u-divider>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import {getSpreadUser} from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "PromoterList",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data: function () {
|
||||
return {
|
||||
fixedState: false,
|
||||
screen: {
|
||||
page: 1,
|
||||
limit: 15,
|
||||
grade: 0,
|
||||
keyword: "",
|
||||
sort: ""
|
||||
},
|
||||
childCount: 2,
|
||||
numberCount: 2,
|
||||
orderCount: 2,
|
||||
levelCount: 2,
|
||||
loaded: false,
|
||||
loading: false,
|
||||
spreadList: [],
|
||||
loadTitle: "",
|
||||
first: "",
|
||||
second: "",
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
pageKeyId: Object.freeze('userSpreadStat')
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
this.getSpreadUsers();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.getSpreadUsers();
|
||||
},
|
||||
watch: {
|
||||
"screen.sort": function () {
|
||||
this.screen.page = 1;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
this.spreadList = [];
|
||||
this.getSpreadUsers();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeGrade: function () {
|
||||
var that = this;
|
||||
uni.showActionSheet({
|
||||
itemList: ['一级', '二级'],
|
||||
success: function (res) {
|
||||
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
|
||||
that.checkGrade(res.tapIndex);
|
||||
},
|
||||
fail: function (res) {
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
handleScroll: function () {
|
||||
// var scrollTop =
|
||||
// document.documentElement.scrollTop || document.body.scrollTop;
|
||||
// var offsetTop = document.querySelector(".header").clientHeight;
|
||||
// if (scrollTop >= offsetTop) {
|
||||
// this.fixedState = true;
|
||||
// } else {
|
||||
// this.fixedState = false;
|
||||
// }
|
||||
},
|
||||
submitForm: function () {
|
||||
this.screen.page = 1;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
this.spreadList = [];
|
||||
this.getSpreadUsers();
|
||||
},
|
||||
getSpreadUsers: function () {
|
||||
let that = this,
|
||||
screen = that.screen;
|
||||
if (that.loaded || that.loading) return;
|
||||
that.loading = true;
|
||||
getSpreadUser(screen).then(
|
||||
res => {
|
||||
that.loading = false;
|
||||
that.spreadList.push.apply(that.spreadList, res.data.list);
|
||||
that.loaded = res.data.list.length < that.screen.limit; //判断所有数据是否加载完成;
|
||||
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
|
||||
that.screen.page = that.screen.page + 1;
|
||||
that.first = res.data.total;
|
||||
that.second = res.data.totalLevel;
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
},
|
||||
300
|
||||
);
|
||||
},
|
||||
checkGrade: function (val) {
|
||||
if (val == this.screen.grade) return;
|
||||
else {
|
||||
this.screen.page = 1;
|
||||
this.screen.grade = val;
|
||||
this.loading = false;
|
||||
this.loaded = false;
|
||||
this.spreadList = [];
|
||||
this.getSpreadUsers();
|
||||
}
|
||||
},
|
||||
sort: function (types) {
|
||||
let that = this;
|
||||
switch (types) {
|
||||
case "childCount":
|
||||
if (that.childCount == 2) {
|
||||
that.childCount = 1;
|
||||
that.orderCount = 2;
|
||||
that.numberCount = 2;
|
||||
that.levelCount = 2;
|
||||
that.screen.sort = "childCount DESC";
|
||||
} else if (that.childCount == 1) {
|
||||
that.childCount = 3;
|
||||
that.orderCount = 2;
|
||||
that.numberCount = 2;
|
||||
that.levelCount = 2;
|
||||
that.screen.sort = "childCount ASC";
|
||||
} else if (that.childCount == 3) {
|
||||
that.childCount = 2;
|
||||
that.orderCount = 2;
|
||||
that.numberCount = 2;
|
||||
that.levelCount = 2;
|
||||
that.screen.sort = "";
|
||||
}
|
||||
break;
|
||||
case "numberCount":
|
||||
if (that.numberCount == 2) {
|
||||
that.numberCount = 1;
|
||||
that.orderCount = 2;
|
||||
that.childCount = 2;
|
||||
that.levelCount = 2;
|
||||
that.screen.sort = "numberCount DESC";
|
||||
} else if (that.numberCount == 1) {
|
||||
that.numberCount = 3;
|
||||
that.orderCount = 2;
|
||||
that.childCount = 2;
|
||||
that.levelCount = 2;
|
||||
that.screen.sort = "numberCount ASC";
|
||||
} else if (that.numberCount == 3) {
|
||||
that.numberCount = 2;
|
||||
that.orderCount = 2;
|
||||
that.childCount = 2;
|
||||
that.levelCount = 2;
|
||||
that.screen.sort = "";
|
||||
}
|
||||
break;
|
||||
case "orderCount":
|
||||
if (that.orderCount == 2) {
|
||||
that.orderCount = 1;
|
||||
that.numberCount = 2;
|
||||
that.childCount = 2;
|
||||
that.levelCount = 2;
|
||||
that.screen.sort = "orderCount DESC";
|
||||
} else if (that.orderCount == 1) {
|
||||
that.orderCount = 3;
|
||||
that.numberCount = 2;
|
||||
that.childCount = 2;
|
||||
that.levelCount = 2;
|
||||
that.screen.sort = "orderCount ASC";
|
||||
} else if (that.orderCount == 3) {
|
||||
that.orderCount = 2;
|
||||
that.numberCount = 2;
|
||||
that.childCount = 2;
|
||||
that.levelCount = 2;
|
||||
that.screen.sort = "";
|
||||
}
|
||||
break;
|
||||
case "levelCount":
|
||||
if (that.levelCount == 2) {
|
||||
that.levelCount = 1;
|
||||
that.orderCount = 2;
|
||||
that.numberCount = 2;
|
||||
that.childCount = 2;
|
||||
that.screen.sort = "level desc";
|
||||
} else if (that.levelCount == 1) {
|
||||
that.levelCount = 3;
|
||||
that.orderCount = 2;
|
||||
that.numberCount = 2;
|
||||
that.childCount = 2;
|
||||
that.screen.sort = "level ASC";
|
||||
} else if (that.levelCount == 3) {
|
||||
that.levelCount = 2;
|
||||
that.orderCount = 2;
|
||||
that.numberCount = 2;
|
||||
that.childCount = 2;
|
||||
that.screen.sort = "";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
that.screen.sort = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.dropDownBtn {
|
||||
width: 176rpx;
|
||||
height: 60rpx;
|
||||
background: #0DC5C5;
|
||||
box-shadow: 0px 8rpx 14rpx rgba(179, 188, 191, 0.6);
|
||||
opacity: 1;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.levelBox {
|
||||
padding: 0 10rpx;
|
||||
font-size: 18rpx;
|
||||
line-height: 28rpx;
|
||||
height: 28rpx;
|
||||
background: #FF564A;
|
||||
color: #fff;
|
||||
border-radius: 14rpx;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,134 +0,0 @@
|
||||
<template>
|
||||
<view class="promoter-order" ref="container">
|
||||
<view class="promoterHeader bg-color-red">
|
||||
<view class="headerCon acea-row row-between-wrapper" style="flex-wrap: nowrap;">
|
||||
<view style="flex-shrink: 0;margin-right: 40rpx;">
|
||||
<text class="name">累计推广订单</text>
|
||||
<view>
|
||||
<text class="num">{{ count||'0' }}</text>
|
||||
<text>单</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="flex-grow: 1;font-size: 24rpx;">
|
||||
{{ ruleText }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item, listIndex) in list" :key="listIndex">
|
||||
<view class="title acea-row row-column row-center">
|
||||
<view class="data">{{ item.time }}</view>
|
||||
<text>本月累计推广订单:{{ item.count ? item.count : 0 }}单</text>
|
||||
</view>
|
||||
<view class="listn">
|
||||
<view class="itenm" v-for="(val, indexn) in item.child" :key="indexn">
|
||||
<view class="top acea-row row-between-wrapper">
|
||||
<view class="pictxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="val.avatar" />
|
||||
</view>
|
||||
<text class="text line1">{{ val.nickname }}</text>
|
||||
</view>
|
||||
<view class="money">
|
||||
<text>返佣:</text>
|
||||
<text class="font-color-red">¥{{ val.number ? val.number : 0 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
|
||||
<view class="acea-row row-between" style="flex-wrap: nowrap;">
|
||||
<view style="flex-grow: 1;">
|
||||
<text class="name">订单金额:</text>
|
||||
<text class="font-color-red">¥{{ val.payPrice || 0 }}(¥{{ val.totalPrice || 0 }}+¥{{ val.totalPostage || 0 }}运费)</text>
|
||||
</view>
|
||||
<view class="" style="flex-shrink: 0;">{{val.billStatus==0?"待收货确定":(val.billStatus==1?"有效":"无效")}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<text class="name">订单号:</text>
|
||||
{{ val.orderId }}
|
||||
</view>
|
||||
<view>
|
||||
<text class="name">下单时间:</text>
|
||||
{{ val.time }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getSpreadOrder, getUserSpreadRule } from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "PromoterOrder",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
list: [],
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 15
|
||||
},
|
||||
loaded: false,
|
||||
loading: false,
|
||||
loadTitle: '',
|
||||
count: '',
|
||||
ruleText: '',
|
||||
pageKeyId: Object.freeze('userSpreadOrder')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getIndex()
|
||||
this.getRuleText()
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.getIndex()
|
||||
},
|
||||
methods: {
|
||||
getRuleText() {
|
||||
getUserSpreadRule().then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.ruleText = data.userSpreadRule || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
getIndex() {
|
||||
let there = this
|
||||
if (there.loaded == true || there.loading == true) return
|
||||
there.loading = true
|
||||
getSpreadOrder(there.where).then(
|
||||
res => {
|
||||
there.loading = false
|
||||
there.loaded = res.data.list.length < there.where.limit
|
||||
there.loadTitle = there.loaded ? "人家是有底线的" : "上拉加载更多"
|
||||
there.where.page = there.where.page + 1
|
||||
there.list.push.apply(there.list, res.data.list)
|
||||
there.count = res.data.count
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.promoterHeader .headerCon{
|
||||
width: auto !important;
|
||||
padding: 0 20rpx 0 20rpx !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,212 +0,0 @@
|
||||
<template>
|
||||
<view class="cash-withdrawal">
|
||||
<view class="nav acea-row">
|
||||
<view
|
||||
v-for="(item, navListIndex) in navList"
|
||||
class="item font-color-red"
|
||||
@click="swichNav(navListIndex, item)"
|
||||
:key="navListIndex"
|
||||
>
|
||||
<view class="line bg-color-red" :class="currentTab === navListIndex ? 'on' : ''"></view>
|
||||
<view class="iconfont" :class="item.icon + ' ' + (currentTab === navListIndex ? 'on' : '')"></view>
|
||||
<view>{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view :hidden="currentTab !== 0" class="list">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view class="name">微信号</view>
|
||||
<view class="input">
|
||||
<input placeholder="请输入微信号" v-model="post.weixin" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view class="name">提现</view>
|
||||
<view class="input">
|
||||
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
|
||||
<view class="bnt bg-color-red" @click="submitted">提现</view>
|
||||
</view>
|
||||
<view :hidden="currentTab !== 1" class="list">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view class="name">用户名</view>
|
||||
<view class="input">
|
||||
<input placeholder="请填写您的支付宝用户名" v-model="post.name" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view class="name">账号</view>
|
||||
<view class="input">
|
||||
<input placeholder="请填写您的支付宝账号" v-model="post.alipay_code" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view class="name">提现</view>
|
||||
<view class="input">
|
||||
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
|
||||
<view class="bnt bg-color-red" @click="submitted">提现</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getBank, postCashInfo } from "@/api/user";
|
||||
import { required } from "@/utils/validate";
|
||||
import { validatorDefaultCatch } from "@/utils/dialog";
|
||||
|
||||
export default {
|
||||
name: "UserCash",
|
||||
components: {},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
navList: [
|
||||
{ name: "微信", type: "weixin", icon: "icon-weixin2" },
|
||||
{ name: "支付宝", type: "alipay", icon: "icon-icon34" }
|
||||
],
|
||||
post: {
|
||||
extract_type: "weixin",
|
||||
alipay_code: "",
|
||||
money: "",
|
||||
name: "",
|
||||
bankname: "",
|
||||
cardnum: "",
|
||||
weixin: ""
|
||||
},
|
||||
currentTab: 0,
|
||||
minPrice: 0,
|
||||
banks: [],
|
||||
commissionCount: 0
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
this.getBank();
|
||||
},
|
||||
methods: {
|
||||
swichNav: function(index, item) {
|
||||
console.log(item);
|
||||
this.currentTab = index;
|
||||
this.post.extract_type = item.type;
|
||||
},
|
||||
getBank: function() {
|
||||
let that = this;
|
||||
getBank().then(
|
||||
res => {
|
||||
that.banks = res.data.extractBank;
|
||||
that.minPrice = res.data.minPrice;
|
||||
that.commissionCount = res.data.commissionCount;
|
||||
},
|
||||
function(err) {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
async submitted() {
|
||||
let bankname = this.post.bankname,
|
||||
alipay_code = this.post.alipay_code,
|
||||
money = this.post.money,
|
||||
name = this.post.name,
|
||||
cardnum = this.post.cardnum,
|
||||
weixin = this.post.weixin,
|
||||
that = this;
|
||||
// console.log(parseFloat(money))
|
||||
if (
|
||||
parseFloat(money) > parseFloat(that.commissionCount) ||
|
||||
parseFloat(that.commissionCount) == 0
|
||||
)
|
||||
return that.$dialog.message("余额不足");
|
||||
if (parseFloat(money) < parseFloat(that.minPrice))
|
||||
return that.$dialog.message("最低提现金额" + that.minPrice);
|
||||
//console.log(that.post.extract_type)
|
||||
switch (that.post.extract_type) {
|
||||
case "alipay":
|
||||
// if (!name) {
|
||||
// uni.showToast({
|
||||
// title: "请输入支付宝用户名",
|
||||
// icon: "none",
|
||||
// duration: 2000
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// if (!alipay_code) {
|
||||
// uni.showToast({
|
||||
// title: "请输入支付宝账号",
|
||||
// icon: "none",
|
||||
// duration: 2000
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// if (!money) {
|
||||
// uni.showToast({
|
||||
// title: "请输入提现金额",
|
||||
// icon: "none",
|
||||
// duration: 2000
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
try {
|
||||
await this.$validator({
|
||||
name: [required(required.message("支付宝用户名"))],
|
||||
alipay_code: [required(required.message("支付宝账号"))],
|
||||
money: [required(required.message("提现金额"))]
|
||||
}).validate({ name, alipay_code, money });
|
||||
let save = {
|
||||
extractType: that.post.extract_type,
|
||||
alipayCode: alipay_code,
|
||||
name: name,
|
||||
money: money
|
||||
};
|
||||
that.save(save);
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
break;
|
||||
case "weixin":
|
||||
try {
|
||||
await this.$validator({
|
||||
weixin: [required(required.message("提现微信号"))],
|
||||
money: [required(required.message("提现金额"))]
|
||||
}).validate({ weixin, money });
|
||||
let save = {
|
||||
extractType: that.post.extract_type,
|
||||
weixin: weixin,
|
||||
money: money
|
||||
};
|
||||
that.save(save);
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
save: function(info) {
|
||||
postCashInfo(info).then(
|
||||
res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
this.router.push({ path: "/user/audit" });
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,242 +0,0 @@
|
||||
<template>
|
||||
<view class="my-promotion">
|
||||
|
||||
<view class="topBanner acea-row row-middle row-center">
|
||||
<view class="item acea-row row-column">
|
||||
<view class="itemValue">{{ force2Decimal(Info.commissionCount) }}</view>
|
||||
<view class="itemTitle">当前佣金</view>
|
||||
</view>
|
||||
<view class="vline"></view>
|
||||
<view class="item acea-row row-column">
|
||||
<view class="itemValue">{{ force2Decimal(Info.lastDayCount) }}</view>
|
||||
<view class="itemTitle">今日收益</view>
|
||||
</view>
|
||||
<view class="vline"></view>
|
||||
<view class="item acea-row row-column">
|
||||
<view class="itemValue">{{ force2Decimal(Info.extractCount) }}</view>
|
||||
<view class="itemTitle">累计已提</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="acea-row row-right">
|
||||
<view class="withdrawRecordBtn acea-row row-middle row-center" @click="goCashRecord()">
|
||||
<image :src="webUrl+'/20210819120620545726.png'" mode="" style="width: 24rpx;height: 24rpx;margin-right: 10rpx;"></image>
|
||||
<text style="color: #fff;font-size: 24rpx;">提现记录</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-list acea-row row-column">
|
||||
<view class="menu-item acea-row row-middle" @click="goPromoterList()">
|
||||
<image class="menu-item-img" :src="webUrl+'/20210819120915878640.png'" mode=""></image>
|
||||
<text class="menu-item-title">推广统计</text>
|
||||
<text class="iconfont icon-jiantou" style="font-size: 24rpx;color: #999999;"></text>
|
||||
</view>
|
||||
<view class="menu-item acea-row row-middle" @click="goCommissionDetails()">
|
||||
<image class="menu-item-img" :src="webUrl+'/20210819133737716135.png'" mode=""></image>
|
||||
<text class="menu-item-title">佣金明细</text>
|
||||
<text class="iconfont icon-jiantou" style="font-size: 24rpx;color: #999999;"></text>
|
||||
</view>
|
||||
<view class="menu-item acea-row row-middle" @click="goPromoterOrder()">
|
||||
<image class="menu-item-img" :src="webUrl+'/20210819133751983817.png'" mode=""></image>
|
||||
<text class="menu-item-title">推广人订单</text>
|
||||
<text class="iconfont icon-jiantou" style="font-size: 24rpx;color: #999999;"></text>
|
||||
</view>
|
||||
<view class="menu-item acea-row row-middle" @click="toCash()">
|
||||
<image class="menu-item-img" :src="webUrl+'/20210819133726059725.png'" mode=""></image>
|
||||
<text class="menu-item-title">立即提现</text>
|
||||
<text class="iconfont icon-jiantou" style="font-size: 24rpx;color: #999999;"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- <view class="header">
|
||||
<view class="name acea-row row-center-wrapper">
|
||||
<view>当前佣金</view>
|
||||
<view class="record" @click="goCashRecord()">
|
||||
提现记录
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="num">{{ force2Decimal(Info.commissionCount) }}</view>
|
||||
<view class="profit acea-row row-between-wrapper">
|
||||
<view class="item">
|
||||
<view>今日收益</view>
|
||||
<view class="money">{{ force2Decimal(Info.lastDayCount) }}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view>累积已提</view>
|
||||
<view class="money">{{ force2Decimal(Info.extractCount) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list acea-row row-between-wrapper">
|
||||
<view class="item acea-row row-center-wrapper row-column" @click="goPoster()">
|
||||
<text class="iconfont icon-erweima"></text>
|
||||
<view>推广名片</view>
|
||||
</view>
|
||||
<view class="item acea-row row-center-wrapper row-column" @click="goPromoterList()">
|
||||
<text class="iconfont icon-tongji"></text>
|
||||
<view>推广人统计</view>
|
||||
</view>
|
||||
<view class="item acea-row row-center-wrapper row-column" @click="goCommissionDetails()">
|
||||
<text class="iconfont icon-qiandai"></text>
|
||||
<view>佣金明细</view>
|
||||
</view>
|
||||
<view class="item acea-row row-center-wrapper row-column" @click="goPromoterOrder()">
|
||||
<text class="iconfont icon-dingdan"></text>
|
||||
<view>推广人订单</view>
|
||||
</view>
|
||||
<view class="item acea-row row-center-wrapper row-column" @click="toCash()">
|
||||
<text class="iconfont icon-chongzhi"></text>
|
||||
<view>立即提现</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
|
||||
import { getSpreadInfo } from "@/api/user";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "UserPromotion",
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
Info: {
|
||||
lastDayCount: 0,
|
||||
extractCount: 0,
|
||||
commissionCount: 0
|
||||
},
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
pageKeyId: Object.freeze('userSpreadIndex')
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
|
||||
},
|
||||
onShow:function(){
|
||||
this.getInfo();
|
||||
},
|
||||
methods: {
|
||||
force2Decimal(v){
|
||||
return this.$force2Decimal(v);
|
||||
},
|
||||
goPoster() {
|
||||
this.$yrouter.push("/pages/user/promotion/Poster/index");
|
||||
},
|
||||
goCashRecord() {
|
||||
this.$yrouter.push('/pkg_user/views/withdrawalLog');
|
||||
},
|
||||
goPromoterList() {
|
||||
this.$yrouter.push("/pages/user/promotion/PromoterList/index");
|
||||
},
|
||||
goCommissionDetails() {
|
||||
this.$yrouter.push("/pages/user/promotion/CommissionDetails/index");
|
||||
},
|
||||
goPromoterOrder() {
|
||||
this.$yrouter.push("/pages/user/promotion/PromoterOrder/index");
|
||||
},
|
||||
getInfo: function() {
|
||||
let that = this;
|
||||
getSpreadInfo().then(
|
||||
res => {
|
||||
that.Info = res.data;
|
||||
},
|
||||
function(err) {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
toCash: function() {
|
||||
this.$yrouter.push("/pkg_user/views/withdrawal");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="less">
|
||||
.my-promotion{
|
||||
padding: 32rpx;
|
||||
}
|
||||
.my-promotion .header{
|
||||
background-image: none !important;
|
||||
background-color: #FE5261;
|
||||
}
|
||||
.my-promotion .list .item .iconfont{
|
||||
color: #FE5261 !important;
|
||||
}
|
||||
|
||||
.topBanner{
|
||||
height: 180rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 6rpx 16rpx rgba(232, 236, 241, 0.5);
|
||||
border-radius: 16rpx;
|
||||
padding: 32rpx;
|
||||
}
|
||||
.topBanner .item{
|
||||
flex: 1;
|
||||
}
|
||||
.topBanner .item .itemValue{
|
||||
color: #333333;
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.topBanner .item .itemTitle{
|
||||
color: #999999;
|
||||
font-size: 22rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.vline{
|
||||
background-color: #E3E3E3;
|
||||
width: 1px;
|
||||
height: 64rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
.withdrawRecordBtn{
|
||||
width: 174rpx;
|
||||
height: 60rpx;
|
||||
background: #0DC5C5;
|
||||
box-shadow: 0px 8rpx 14rpx rgba(179, 188, 191, 0.6);
|
||||
border-radius: 8rpx;
|
||||
margin: 32rpx 0;
|
||||
}
|
||||
|
||||
|
||||
.menu-list{
|
||||
|
||||
}
|
||||
.menu-list .menu-item{
|
||||
padding: 24rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 6rpx 16rpx rgba(232, 236, 241, 0.5);
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.menu-list .menu-item .menu-item-title{
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.menu-list .menu-item .menu-item-img{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
flex-shrink:0;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user