chore(组件): privacyPopup 组件全部使用注册机制
This commit is contained in:
@@ -169,8 +169,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-index-page',
|
name: 'diy-index-page',
|
||||||
@@ -190,9 +188,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
components: {
|
|
||||||
MescrollUni
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageIndex: 0, //当前选中分类id
|
pageIndex: 0, //当前选中分类id
|
||||||
|
|||||||
@@ -103,9 +103,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
import auth from '@/common/js/auth.js';
|
import auth from '@/common/js/auth.js';
|
||||||
import validate from '@/common/js/validate.js';
|
import validate from '@/common/js/validate.js';
|
||||||
@@ -113,11 +111,6 @@ import validate from '@/common/js/validate.js';
|
|||||||
export default {
|
export default {
|
||||||
mixins: [auth],
|
mixins: [auth],
|
||||||
name: 'ns-login',
|
name: 'ns-login',
|
||||||
components: {
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: '',
|
url: '',
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- #ifdef MP -->
|
||||||
<view v-if="showPop">
|
<view v-if="showPop">
|
||||||
<view class="privacy-mask">
|
<view class="privacy-mask">
|
||||||
<view class="privacy-wrap">
|
<view class="privacy-wrap">
|
||||||
@@ -15,6 +16,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef WEB || H5 -->
|
||||||
|
<view v-if="showPop"></view>
|
||||||
|
<!-- #endif -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
57
package-lock.json
generated
57
package-lock.json
generated
@@ -1,11 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "uniappsaas",
|
"name": "frontend",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
|
"dependencies": {
|
||||||
|
"jweixin-module": "^1.6.0"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"terser-webpack-plugin": "^5.3.10"
|
"terser-webpack-plugin": "^5.3.10",
|
||||||
|
"zion-uniapp-mp-load-package": "^1.0.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/gen-mapping": {
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
@@ -619,6 +623,25 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/json5": {
|
||||||
|
"version": "2.2.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
|
||||||
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"json5": "lib/cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/jweixin-module": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/loader-runner": {
|
"node_modules/loader-runner": {
|
||||||
"version": "4.3.0",
|
"version": "4.3.0",
|
||||||
"resolved": "https://repo.huaweicloud.com/repository/npm/loader-runner/-/loader-runner-4.3.0.tgz",
|
"resolved": "https://repo.huaweicloud.com/repository/npm/loader-runner/-/loader-runner-4.3.0.tgz",
|
||||||
@@ -981,6 +1004,16 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.13.0"
|
"node": ">=10.13.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/zion-uniapp-mp-load-package": {
|
||||||
|
"version": "1.0.13",
|
||||||
|
"resolved": "https://registry.npmmirror.com/zion-uniapp-mp-load-package/-/zion-uniapp-mp-load-package-1.0.13.tgz",
|
||||||
|
"integrity": "sha512-QKJ6azXsJh9dVpjVS/48bGQELSI3FFtQ3QZic/Gs5z6v77BVjY7uGCXKxGuCwNwijtJnm8FRzlFGTVcQYU+wXA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"json5": "^2.2.3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1456,6 +1489,17 @@
|
|||||||
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
|
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"json5": {
|
||||||
|
"version": "2.2.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
|
||||||
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"jweixin-module": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
|
||||||
|
},
|
||||||
"loader-runner": {
|
"loader-runner": {
|
||||||
"version": "4.3.0",
|
"version": "4.3.0",
|
||||||
"resolved": "https://repo.huaweicloud.com/repository/npm/loader-runner/-/loader-runner-4.3.0.tgz",
|
"resolved": "https://repo.huaweicloud.com/repository/npm/loader-runner/-/loader-runner-4.3.0.tgz",
|
||||||
@@ -1681,6 +1725,15 @@
|
|||||||
"integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
|
"integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true
|
"peer": true
|
||||||
|
},
|
||||||
|
"zion-uniapp-mp-load-package": {
|
||||||
|
"version": "1.0.13",
|
||||||
|
"resolved": "https://registry.npmmirror.com/zion-uniapp-mp-load-package/-/zion-uniapp-mp-load-package-1.0.13.tgz",
|
||||||
|
"integrity": "sha512-QKJ6azXsJh9dVpjVS/48bGQELSI3FFtQ3QZic/Gs5z6v77BVjY7uGCXKxGuCwNwijtJnm8FRzlFGTVcQYU+wXA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"json5": "^2.2.3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
"mp-weixin": "node scripts/mp-weixin.patch.js"
|
"mp-weixin": "node scripts/mp-weixin.patch.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"terser-webpack-plugin": "^5.3.10"
|
"terser-webpack-plugin": "^5.3.10",
|
||||||
|
"zion-uniapp-mp-load-package": "^1.0.13"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jweixin-module": "^1.6.0"
|
"jweixin-module": "^1.6.0"
|
||||||
|
|||||||
@@ -954,7 +954,8 @@
|
|||||||
"autoscan": true,
|
"autoscan": true,
|
||||||
"custom": {
|
"custom": {
|
||||||
"diy-*(\\W.*)": "@/components-diy/diy$1.vue",
|
"diy-*(\\W.*)": "@/components-diy/diy$1.vue",
|
||||||
"uni-*(\\W.*)": "@/uni_modules/uni$1/components/uni$1/uni$1.vue"
|
"uni-*(\\W.*)": "@/uni_modules/uni$1/components/uni$1/uni$1.vue",
|
||||||
|
"MescrollUni": "@/components/mescroll/my-list-mescroll.vue"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"preloadRule": {
|
"preloadRule": {
|
||||||
|
|||||||
@@ -149,22 +149,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import diyJs from '@/common/js/diy.js';
|
import diyJs from '@/common/js/diy.js';
|
||||||
|
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
|
|
||||||
import indexJs from './public/js/index.js';
|
import indexJs from './public/js/index.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
mixins: [diyJs, scroll, indexJs]
|
mixins: [diyJs, scroll, indexJs]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -366,19 +366,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
import cart from './public/js/cart.js';
|
import cart from './public/js/cart.js';
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
mixins: [scroll, cart]
|
mixins: [scroll, cart]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -25,15 +25,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
diyData: null
|
diyData: null
|
||||||
|
|||||||
@@ -524,17 +524,8 @@
|
|||||||
import detail from './public/js/detail.js';
|
import detail from './public/js/detail.js';
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
import goodsDetailBase from '@/common/js/goods_detail_base.js';
|
import goodsDetailBase from '@/common/js/goods_detail_base.js';
|
||||||
// 按需引入全局组件
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup,
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
mixins: [goodsDetailBase, detail, scroll]
|
mixins: [goodsDetailBase, detail, scroll]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -307,19 +307,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import list from './public/js/list.js';
|
import list from './public/js/list.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -166,13 +166,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import orderMethod from './public/js/orderMethod.js';
|
import orderMethod from './public/js/orderMethod.js';
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
scrollInto: '',
|
scrollInto: '',
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8">
|
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="balances" v-if="accountList.length" v-for="item in accountList" :key="item.id">
|
<view class="balances" v-if="accountList.length" v-for="item in accountList" :key="item.id">
|
||||||
<image v-if="item.type == 'order'" :src="$util.img('public/uniapp/fenxiao/bill/jiesuan.png')" mode="widthFix"></image>
|
<image v-if="item.type == 'order'" :src="$util.img('public/uniapp/fenxiao/bill/jiesuan.png')"
|
||||||
|
mode="widthFix"></image>
|
||||||
<image v-else :src="$util.img('public/uniapp/fenxiao/bill/withdraw.png')" mode="widthFix"></image>
|
<image v-else :src="$util.img('public/uniapp/fenxiao/bill/withdraw.png')" mode="widthFix"></image>
|
||||||
<view class="balances-info">
|
<view class="balances-info">
|
||||||
<text>{{ item.type_name }}</text>
|
<text>{{ item.type_name }}</text>
|
||||||
@@ -11,7 +12,8 @@
|
|||||||
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="balances-num">
|
<view class="balances-num">
|
||||||
<text :class="item.money > 0 ? 'color-base-text' : ''">{{ item.money > 0 ? '+' + item.money : item.money }}</text>
|
<text :class="item.money > 0 ? 'color-base-text' : ''">{{ item.money > 0 ? '+' + item.money :
|
||||||
|
item.money }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<ns-empty v-if="!accountList.length && showEmpty" text="暂无账单信息" :isIndex="false"></ns-empty>
|
<ns-empty v-if="!accountList.length && showEmpty" text="暂无账单信息" :isIndex="false"></ns-empty>
|
||||||
@@ -22,11 +24,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -34,14 +31,8 @@ export default {
|
|||||||
showEmpty: true
|
showEmpty: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout( () => {
|
setTimeout(() => {
|
||||||
if (!this.addonIsExist.fenxiao) {
|
if (!this.addonIsExist.fenxiao) {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: '商家未开启分销',
|
title: '商家未开启分销',
|
||||||
@@ -52,7 +43,7 @@ export default {
|
|||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo('/pages/index/index');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
},1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData(mescroll) {
|
getData(mescroll) {
|
||||||
|
|||||||
@@ -40,10 +40,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -53,12 +49,6 @@ export default {
|
|||||||
emptyShow: false,
|
emptyShow: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
mixins: [fenxiaoWords],
|
mixins: [fenxiaoWords],
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -132,20 +132,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import list from './public/js/goods_list.js';
|
import list from './public/js/goods_list.js';
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
mixins: [list, fenxiaoWords]
|
mixins: [list, fenxiaoWords]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<view class="goods-sub-section">
|
<view class="goods-sub-section">
|
||||||
<view class="goods-price">
|
<view class="goods-price">
|
||||||
<text class="unit price-style small">{{ $lang('common.currencySymbol')
|
<text class="unit price-style small">{{ $lang('common.currencySymbol')
|
||||||
}}</text>
|
}}</text>
|
||||||
<text class="price-color price-style large">{{
|
<text class="price-color price-style large">{{
|
||||||
parseFloat(orderItem.price).toFixed(2).split(".")[0] }}</text>
|
parseFloat(orderItem.price).toFixed(2).split(".")[0] }}</text>
|
||||||
<text class="unit price-style small">.{{
|
<text class="unit price-style small">.{{
|
||||||
@@ -96,18 +96,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
category: [
|
category: [
|
||||||
|
|||||||
@@ -103,19 +103,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
|
|||||||
@@ -72,19 +72,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
orderList: [],
|
orderList: [],
|
||||||
|
|||||||
@@ -83,18 +83,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
levelList: [
|
levelList: [
|
||||||
|
|||||||
@@ -34,19 +34,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
withdrawState: {
|
withdrawState: {
|
||||||
|
|||||||
@@ -317,19 +317,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import list from './public/js/list.js';
|
import list from './public/js/list.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,9 +2,9 @@
|
|||||||
<view class="order-container" :style="themeColor" :class="{ 'safe-area': isIphoneX }">
|
<view class="order-container" :style="themeColor" :class="{ 'safe-area': isIphoneX }">
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view class="payment-navbar" :style="{
|
<view class="payment-navbar" :style="{
|
||||||
'padding-top': menuButtonBounding.top + 'px',
|
'padding-top': menuButtonBounding.top + 'px',
|
||||||
height: menuButtonBounding.height + 'px'
|
height: menuButtonBounding.height + 'px'
|
||||||
}">
|
}">
|
||||||
<view class="nav-wrap">
|
<view class="nav-wrap">
|
||||||
<text class="iconfont icon-back_light" @click="back"></text>
|
<text class="iconfont icon-back_light" @click="back"></text>
|
||||||
<view class="navbar-title">确认订单</view>
|
<view class="navbar-title">确认订单</view>
|
||||||
@@ -18,11 +18,12 @@
|
|||||||
<!-- 选择地址 -->
|
<!-- 选择地址 -->
|
||||||
<template v-if="orderPaymentData.exchange_info.type == 1 && orderPaymentData.is_virtual == 0">
|
<template v-if="orderPaymentData.exchange_info.type == 1 && orderPaymentData.is_virtual == 0">
|
||||||
<!-- 配送方式 -->
|
<!-- 配送方式 -->
|
||||||
<view class="delivery-mode" v-if="orderCreateData.delivery &&orderPaymentData.delivery.express_type.length > 1">
|
<view class="delivery-mode"
|
||||||
|
v-if="orderCreateData.delivery && orderPaymentData.delivery.express_type.length > 1">
|
||||||
<view class="action">
|
<view class="action">
|
||||||
<view v-for="(deliveryItem, deliveryIndex) in orderPaymentData.delivery.express_type"
|
<view v-for="(deliveryItem, deliveryIndex) in orderPaymentData.delivery.express_type"
|
||||||
:key="deliveryIndex"
|
:key="deliveryIndex"
|
||||||
:class="{active: deliveryItem.name == orderCreateData.delivery.delivery_type}"
|
:class="{ active: deliveryItem.name == orderCreateData.delivery.delivery_type }"
|
||||||
@click="selectDeliveryType(deliveryItem)">
|
@click="selectDeliveryType(deliveryItem)">
|
||||||
{{ deliveryItem.title }}
|
{{ deliveryItem.title }}
|
||||||
<!-- 外圆角 -->
|
<!-- 外圆角 -->
|
||||||
@@ -31,10 +32,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="address-box" :class="{'not-delivery-type': orderPaymentData.delivery.express_type.length <= 1}"
|
<view class="address-box"
|
||||||
|
:class="{ 'not-delivery-type': orderPaymentData.delivery.express_type.length <= 1 }"
|
||||||
v-if="orderPaymentData.delivery.delivery_type != 'store'">
|
v-if="orderPaymentData.delivery.delivery_type != 'store'">
|
||||||
<block v-if="storeInfo.storeList.length > 1 && orderPaymentData.delivery.delivery_type == 'local'">
|
<block v-if="storeInfo.storeList.length > 1 && orderPaymentData.delivery.delivery_type == 'local'">
|
||||||
<view class="local-delivery-store" v-if="Object.keys(storeInfo.currStore).length" @click="$refs.deliveryPopup.open()">
|
<view class="local-delivery-store" v-if="Object.keys(storeInfo.currStore).length"
|
||||||
|
@click="$refs.deliveryPopup.open()">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
由 <text class="store-name">{{ storeInfo.currStore.store_name }}</text> 提供配送
|
由 <text class="store-name">{{ storeInfo.currStore.store_name }}</text> 提供配送
|
||||||
</view>
|
</view>
|
||||||
@@ -49,14 +52,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view class="info-wrap" :class="{'local': orderPaymentData.delivery.delivery_type == 'local'}" v-if="orderCreateData.member_address" @click="selectAddress">
|
<view class="info-wrap" :class="{ 'local': orderPaymentData.delivery.delivery_type == 'local' }"
|
||||||
|
v-if="orderCreateData.member_address" @click="selectAddress">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<text class="name font-size-base">{{ orderCreateData.member_address.name ? orderCreateData.member_address.name : '' }}</text>
|
<text class="name font-size-base">{{ orderCreateData.member_address.name ?
|
||||||
<text class="font-size-base mobile">{{ orderCreateData.member_address.mobile ? orderCreateData.member_address.mobile : '' }}</text>
|
orderCreateData.member_address.name : '' }}</text>
|
||||||
|
<text class="font-size-base mobile">{{ orderCreateData.member_address.mobile ?
|
||||||
|
orderCreateData.member_address.mobile : '' }}</text>
|
||||||
<text class="cell-more iconfont icon-right"></text>
|
<text class="cell-more iconfont icon-right"></text>
|
||||||
<view class="desc-wrap">
|
<view class="desc-wrap">
|
||||||
{{ orderCreateData.member_address.full_address ? orderCreateData.member_address.full_address : '' }}
|
{{ orderCreateData.member_address.full_address ?
|
||||||
{{ orderCreateData.member_address.address ? orderCreateData.member_address.address : '' }}
|
orderCreateData.member_address.full_address : '' }}
|
||||||
|
{{ orderCreateData.member_address.address ? orderCreateData.member_address.address : ''
|
||||||
|
}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -69,11 +77,14 @@
|
|||||||
|
|
||||||
<!-- 外卖配送 -->
|
<!-- 外卖配送 -->
|
||||||
<block v-if="orderPaymentData.delivery.delivery_type == 'local'">
|
<block v-if="orderPaymentData.delivery.delivery_type == 'local'">
|
||||||
<view class="local-box" v-if="orderPaymentData.config.local.is_use && orderPaymentData.delivery.local.info && orderPaymentData.delivery.local.info.time_is_open == 1">
|
<view class="local-box"
|
||||||
|
v-if="orderPaymentData.config.local.is_use && orderPaymentData.delivery.local.info && orderPaymentData.delivery.local.info.time_is_open == 1">
|
||||||
<view class="pick-block" @click="localtime">
|
<view class="pick-block" @click="localtime">
|
||||||
<view class="font-size-base">送达时间</view>
|
<view class="font-size-base">送达时间</view>
|
||||||
<view class="time-picker">
|
<view class="time-picker">
|
||||||
<text :class="{'color-tip': !orderCreateData.buyer_ask_delivery_title}">{{ orderCreateData.buyer_ask_delivery_title ? orderCreateData.buyer_ask_delivery_title : '请选择送达时间' }}</text>
|
<text :class="{ 'color-tip': !orderCreateData.buyer_ask_delivery_title }">{{
|
||||||
|
orderCreateData.buyer_ask_delivery_title ?
|
||||||
|
orderCreateData.buyer_ask_delivery_title : '请选择送达时间' }}</text>
|
||||||
<text class="iconfont icon-right cell-more"></text>
|
<text class="iconfont icon-right cell-more"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -82,7 +93,9 @@
|
|||||||
<image class="address-line" :src="$util.img('public/uniapp/order/address-line.png')"></image>
|
<image class="address-line" :src="$util.img('public/uniapp/order/address-line.png')"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="store-box" :class="{'not-delivery-type': orderPaymentData.delivery.express_type.length <= 1}" v-if="orderPaymentData.delivery.delivery_type == 'store' && storeInfo.currStore">
|
<view class="store-box"
|
||||||
|
:class="{ 'not-delivery-type': orderPaymentData.delivery.express_type.length <= 1 }"
|
||||||
|
v-if="orderPaymentData.delivery.delivery_type == 'store' && storeInfo.currStore">
|
||||||
<block v-if="storeInfo.currStore">
|
<block v-if="storeInfo.currStore">
|
||||||
<view @click="openSiteDelivery" class="store-info">
|
<view @click="openSiteDelivery" class="store-info">
|
||||||
<view class="store-address-info">
|
<view class="store-address-info">
|
||||||
@@ -104,20 +117,22 @@
|
|||||||
<view class="mobile-wrap store-mobile">
|
<view class="mobile-wrap store-mobile">
|
||||||
<view class="form-group">
|
<view class="form-group">
|
||||||
<text class="text">姓名</text>
|
<text class="text">姓名</text>
|
||||||
<input type="text" placeholder-class="color-tip placeholder" class="input" v-model="member_address.name" disabled />
|
<input type="text" placeholder-class="color-tip placeholder" class="input"
|
||||||
|
v-model="member_address.name" disabled />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mobile-wrap store-mobile">
|
<view class="mobile-wrap store-mobile">
|
||||||
<view class="form-group">
|
<view class="form-group">
|
||||||
<text class="text">预留手机</text>
|
<text class="text">预留手机</text>
|
||||||
<input type="number" maxlength="11" placeholder="请输入您的手机号码"
|
<input type="number" maxlength="11" placeholder="请输入您的手机号码"
|
||||||
placeholder-class="color-tip placeholder" class="input" v-model="member_address.mobile" />
|
placeholder-class="color-tip placeholder" class="input"
|
||||||
|
v-model="member_address.mobile" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="store-time">
|
<view class="store-time">
|
||||||
<view class="left">自提时间</view>
|
<view class="left">自提时间</view>
|
||||||
<view class="right" @click="storetime">
|
<view class="right" @click="storetime">
|
||||||
{{orderCreateData.buyer_ask_delivery_title}}
|
{{ orderCreateData.buyer_ask_delivery_title }}
|
||||||
<text class="iconfont icon-right"></text>
|
<text class="iconfont icon-right"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -137,27 +152,35 @@
|
|||||||
<view class="form-group">
|
<view class="form-group">
|
||||||
<text class="iconfont icon-dianhua2"></text>
|
<text class="iconfont icon-dianhua2"></text>
|
||||||
<text class="text">手机号码</text>
|
<text class="text">手机号码</text>
|
||||||
<input type="number" maxlength="11" placeholder="请输入您的手机号码" placeholder-class="color-tip placeholder" class="input" v-model="orderCreateData.member_address.mobile" />
|
<input type="number" maxlength="11" placeholder="请输入您的手机号码"
|
||||||
|
placeholder-class="color-tip placeholder" class="input"
|
||||||
|
v-model="orderCreateData.member_address.mobile" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 店铺 -->
|
<!-- 店铺 -->
|
||||||
<view class="site-wrap" :class="orderPaymentData.exchange_info.type == 2 || orderPaymentData.exchange_info.type == 3 ? 'margin-top' : ''">
|
<view class="site-wrap"
|
||||||
|
:class="orderPaymentData.exchange_info.type == 2 || orderPaymentData.exchange_info.type == 3 ? 'margin-top' : ''">
|
||||||
<view class="site-body">
|
<view class="site-body">
|
||||||
<view class="goods-wrap">
|
<view class="goods-wrap">
|
||||||
<block v-if="orderPaymentData.exchange_info.type == 2">
|
<block v-if="orderPaymentData.exchange_info.type == 2">
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="orderPaymentData.exchange_info.image ? $util.img(orderPaymentData.exchange_info.image) : $util.img('public/uniapp/point/coupon.png')" @error="imageError()" mode="aspectFill"/>
|
<image
|
||||||
|
:src="orderPaymentData.exchange_info.image ? $util.img(orderPaymentData.exchange_info.image) : $util.img('public/uniapp/point/coupon.png')"
|
||||||
|
@error="imageError()" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else-if="orderPaymentData.exchange_info.type == 3">
|
<block v-else-if="orderPaymentData.exchange_info.type == 3">
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="orderPaymentData.exchange_info.image ? $util.img(orderPaymentData.exchange_info.image) : $util.img('public/uniapp/point/hongbao.png')" @error="imageError()" mode="aspectFill"/>
|
<image
|
||||||
|
:src="orderPaymentData.exchange_info.image ? $util.img(orderPaymentData.exchange_info.image) : $util.img('public/uniapp/point/hongbao.png')"
|
||||||
|
@error="imageError()" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="$util.img(orderPaymentData.exchange_info.image)" @error="imageError()" mode="aspectFill"/>
|
<image :src="$util.img(orderPaymentData.exchange_info.image)" @error="imageError()"
|
||||||
|
mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
@@ -182,7 +205,8 @@
|
|||||||
<view class="site-footer">
|
<view class="site-footer">
|
||||||
<view class="order-cell">
|
<view class="order-cell">
|
||||||
<text class="tit">买家留言</text>
|
<text class="tit">买家留言</text>
|
||||||
<view class="box"><input type="text" placeholder="留言前建议先与商家协调一致" placeholder-class="color-tip" v-model="orderCreateData.buyer_message" /></view>
|
<view class="box"><input type="text" placeholder="留言前建议先与商家协调一致" placeholder-class="color-tip"
|
||||||
|
v-model="orderCreateData.buyer_message" /></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -196,7 +220,8 @@
|
|||||||
<text class="unit">积分</text>
|
<text class="unit">积分</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-cell" v-if="orderPaymentData.exchange_info.type == 1 && orderPaymentData.delivery_money > 0">
|
<view class="order-cell"
|
||||||
|
v-if="orderPaymentData.exchange_info.type == 1 && orderPaymentData.delivery_money > 0">
|
||||||
<text class="tit">运费</text>
|
<text class="tit">运费</text>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||||
@@ -206,8 +231,9 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="error-message" v-if="orderPaymentData.delivery && orderPaymentData.delivery.delivery_type == 'local' && orderPaymentData.delivery && orderPaymentData.delivery.error && orderPaymentData.delivery.error !== ''">
|
<view class="error-message"
|
||||||
{{orderPaymentData.delivery.error_msg}}
|
v-if="orderPaymentData.delivery && orderPaymentData.delivery.delivery_type == 'local' && orderPaymentData.delivery && orderPaymentData.delivery.error && orderPaymentData.delivery.error !== ''">
|
||||||
|
{{ orderPaymentData.delivery.error_msg }}
|
||||||
</view>
|
</view>
|
||||||
<view class="order-submit" :class="{ 'bottom-safe-area': isIphoneX }">
|
<view class="order-submit" :class="{ 'bottom-safe-area': isIphoneX }">
|
||||||
<view class="order-settlement-info">
|
<view class="order-settlement-info">
|
||||||
@@ -221,12 +247,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-btn">
|
<view class="submit-btn">
|
||||||
<button v-if="createBtn()" type="primary" class="mini" size="mini" @click="openChoosePayment()">提交订单</button>
|
<button v-if="createBtn()" type="primary" class="mini" size="mini"
|
||||||
|
@click="openChoosePayment()">提交订单</button>
|
||||||
<button v-else class="no-submit mini" size="mini">
|
<button v-else class="no-submit mini" size="mini">
|
||||||
<block v-if="orderPaymentData.delivery && orderPaymentData.delivery.delivery_type == 'local' && orderPaymentData.delivery && orderPaymentData.delivery.error && orderPaymentData.delivery.start_money > orderPaymentData.price">
|
<block
|
||||||
差{{ orderPaymentData.delivery.start_money-orderPaymentData.price | moneyFormat }}起送
|
v-if="orderPaymentData.delivery && orderPaymentData.delivery.delivery_type == 'local' && orderPaymentData.delivery && orderPaymentData.delivery.error && orderPaymentData.delivery.start_money > orderPaymentData.price">
|
||||||
|
差{{ orderPaymentData.delivery.start_money - orderPaymentData.price | moneyFormat }}起送
|
||||||
</block>
|
</block>
|
||||||
<block v-else >提交订单</block>
|
<block v-else>提交订单</block>
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -241,22 +269,29 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="popup-body store-popup" :class="{ 'safe-area': isIphoneX }">
|
<view class="popup-body store-popup" :class="{ 'safe-area': isIphoneX }">
|
||||||
<view class="delivery-content">
|
<view class="delivery-content">
|
||||||
<view class="item-wrap" v-for="(item, index) in storeInfo.storeList" :key="index" @click="selectPickupPoint(item)">
|
<view class="item-wrap" v-for="(item, index) in storeInfo.storeList" :key="index"
|
||||||
|
@click="selectPickupPoint(item)">
|
||||||
<view class="detail">
|
<view class="detail">
|
||||||
<view class="name" :class="item.store_id == orderPaymentData.delivery.store_id ? 'color-base-text' : ''">
|
<view class="name"
|
||||||
|
:class="item.store_id == orderPaymentData.delivery.store_id ? 'color-base-text' : ''">
|
||||||
<text>{{ item.store_name }}</text>
|
<text>{{ item.store_name }}</text>
|
||||||
<text v-if="item.distance">({{ item.distance }}km)</text>
|
<text v-if="item.distance">({{ item.distance }}km)</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view :class="item.store_id == orderPaymentData.delivery.store_id ? 'color-base-text' : ''" class="font-size-goods-tag">
|
<view
|
||||||
|
:class="item.store_id == orderPaymentData.delivery.store_id ? 'color-base-text' : ''"
|
||||||
|
class="font-size-goods-tag">
|
||||||
营业时间:{{ item.open_date }}
|
营业时间:{{ item.open_date }}
|
||||||
</view>
|
</view>
|
||||||
<view :class="item.store_id == orderPaymentData.delivery.store_id ? 'color-base-text' : ''" class="font-size-goods-tag">
|
<view
|
||||||
|
:class="item.store_id == orderPaymentData.delivery.store_id ? 'color-base-text' : ''"
|
||||||
|
class="font-size-goods-tag">
|
||||||
地址:{{ item.full_address }}{{ item.address }}
|
地址:{{ item.full_address }}{{ item.address }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="icon" v-if="item.store_id == orderPaymentData.delivery.store_id"><text class="iconfont icon-yuan_checked color-base-text"></text></view>
|
<view class="icon" v-if="item.store_id == orderPaymentData.delivery.store_id"><text
|
||||||
|
class="iconfont icon-yuan_checked color-base-text"></text></view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!storeInfo.storeList" class="empty">所选择收货地址附近没有可以自提的门店</view>
|
<view v-if="!storeInfo.storeList" class="empty">所选择收货地址附近没有可以自提的门店</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -267,7 +302,8 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<!-- 选择支付方式弹窗 -->
|
<!-- 选择支付方式弹窗 -->
|
||||||
<ns-payment ref="choosePaymentPopup" :payMoney="orderPaymentData.order_money" @confirm="orderCreate"></ns-payment>
|
<ns-payment ref="choosePaymentPopup" :payMoney="orderPaymentData.order_money"
|
||||||
|
@confirm="orderCreate"></ns-payment>
|
||||||
|
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
|
|
||||||
@@ -277,38 +313,28 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import payment from './public/js/payment.js';
|
import payment from './public/js/payment.js';
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
mixins: [payment]
|
||||||
MescrollUni,
|
};
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
mixins: [payment]
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "@/common/css/order_parment.scss";
|
@import "@/common/css/order_parment.scss";
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
background: none;
|
background: none;
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
overflow-y: hidden !important;
|
overflow-y: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .uni-popup__wrapper {
|
/deep/ .uni-popup__wrapper {
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .uni-popup {
|
/deep/ .uni-popup {
|
||||||
z-index: 8;
|
z-index: 8;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -6,7 +6,8 @@
|
|||||||
<ns-adv keyword="NS_ARTICLE" class-name="adv-wrap"></ns-adv>
|
<ns-adv keyword="NS_ARTICLE" class-name="adv-wrap"></ns-adv>
|
||||||
<view class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)">
|
<view class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)">
|
||||||
<view class="article-img">
|
<view class="article-img">
|
||||||
<image class="cover-img" :src="$util.img(item.cover_img)" mode="widthFix" @error="imgError(index)"/>
|
<image class="cover-img" :src="$util.img(item.cover_img)" mode="widthFix"
|
||||||
|
@error="imgError(index)" />
|
||||||
</view>
|
</view>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<text class="title">{{ item.article_title }}</text>
|
<text class="title">{{ item.article_title }}</text>
|
||||||
@@ -33,195 +34,184 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
export default {
|
||||||
// #ifdef MP-WEIXIN
|
data() {
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
return {
|
||||||
// #endif
|
list: []
|
||||||
|
};
|
||||||
export default {
|
},
|
||||||
data() {
|
onShow() {
|
||||||
return {
|
this.setPublicShare();
|
||||||
list: []
|
},
|
||||||
};
|
methods: {
|
||||||
},
|
getData(mescroll) {
|
||||||
components: {
|
this.$api.sendRequest({
|
||||||
MescrollUni,
|
url: '/api/article/page',
|
||||||
// #ifdef MP-WEIXIN
|
data: {
|
||||||
privacyPopup
|
page_size: mescroll.size,
|
||||||
// #endif
|
page: mescroll.num
|
||||||
},
|
},
|
||||||
onShow() {
|
success: res => {
|
||||||
this.setPublicShare();
|
let newArr = [];
|
||||||
},
|
let msg = res.message;
|
||||||
methods: {
|
if (res.code == 0 && res.data) {
|
||||||
getData(mescroll) {
|
newArr = res.data.list;
|
||||||
this.$api.sendRequest({
|
} else {
|
||||||
url: '/api/article/page',
|
this.$util.showToast({
|
||||||
data: {
|
title: msg
|
||||||
page_size: mescroll.size,
|
});
|
||||||
page: mescroll.num
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
let newArr = [];
|
|
||||||
let msg = res.message;
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
newArr = res.data.list;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: msg
|
|
||||||
});
|
|
||||||
}
|
|
||||||
mescroll.endSuccess(newArr.length);
|
|
||||||
//设置列表数据
|
|
||||||
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
|
||||||
this.list = this.list.concat(newArr); //追加新数据
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
mescroll.endErr();
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
}
|
||||||
});
|
mescroll.endSuccess(newArr.length);
|
||||||
},
|
//设置列表数据
|
||||||
toDetail(item) {
|
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
||||||
this.$util.redirectTo('/pages_tool/article/detail', {
|
this.list = this.list.concat(newArr); //追加新数据
|
||||||
article_id: item.article_id
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
});
|
},
|
||||||
},
|
fail: res => {
|
||||||
imgError(index) {
|
mescroll.endErr();
|
||||||
if (this.list[index]) this.list[index].cover_img = this.$util.getDefaultImage().article;
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
},
|
}
|
||||||
// 设置公众号分享
|
});
|
||||||
setPublicShare() {
|
|
||||||
let shareUrl = this.$config.h5Domain + '/pages_tool/article/list';
|
|
||||||
this.$util.setPublicShare({
|
|
||||||
title: '文章列表',
|
|
||||||
desc: '',
|
|
||||||
link: shareUrl,
|
|
||||||
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onShareAppMessage(res) {
|
toDetail(item) {
|
||||||
var title = '文章列表';
|
this.$util.redirectTo('/pages_tool/article/detail', {
|
||||||
var path = '/pages_tool/article/list';
|
article_id: item.article_id
|
||||||
return {
|
});
|
||||||
title: title,
|
|
||||||
path: path,
|
|
||||||
success: res => {},
|
|
||||||
fail: res => {}
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
//分享到朋友圈
|
imgError(index) {
|
||||||
onShareTimeline() {
|
if (this.list[index]) this.list[index].cover_img = this.$util.getDefaultImage().article;
|
||||||
var title = '文章列表';
|
},
|
||||||
var query = '/pages_tool/article/list';
|
// 设置公众号分享
|
||||||
return {
|
setPublicShare() {
|
||||||
title: title,
|
let shareUrl = this.$config.h5Domain + '/pages_tool/article/list';
|
||||||
query: query,
|
this.$util.setPublicShare({
|
||||||
imageUrl: ''
|
title: '文章列表',
|
||||||
};
|
desc: '',
|
||||||
|
link: shareUrl,
|
||||||
|
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
onShareAppMessage(res) {
|
||||||
|
var title = '文章列表';
|
||||||
|
var path = '/pages_tool/article/list';
|
||||||
|
return {
|
||||||
|
title: title,
|
||||||
|
path: path,
|
||||||
|
success: res => { },
|
||||||
|
fail: res => { }
|
||||||
|
};
|
||||||
|
},
|
||||||
|
//分享到朋友圈
|
||||||
|
onShareTimeline() {
|
||||||
|
var title = '文章列表';
|
||||||
|
var query = '/pages_tool/article/list';
|
||||||
|
return {
|
||||||
|
title: title,
|
||||||
|
query: query,
|
||||||
|
imageUrl: ''
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .fixed {
|
/deep/ .fixed {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-wrap {
|
||||||
|
padding-top: 200rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-wrap {
|
||||||
|
background: #f8f8f8;
|
||||||
|
|
||||||
|
.adv-wrap {
|
||||||
|
margin: 24rpx 24rpx 0 24rpx;
|
||||||
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-wrap {
|
.item {
|
||||||
padding-top: 200rpx;
|
display: flex;
|
||||||
}
|
padding: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 24rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
|
||||||
.article-wrap {
|
.article-img {
|
||||||
background: #f8f8f8;
|
margin-right: 20rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
.adv-wrap {
|
image {
|
||||||
margin: 24rpx 24rpx 0 24rpx;
|
width: 100%;
|
||||||
width: auto;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.info-wrap {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20rpx;
|
flex-direction: column;
|
||||||
background-color: #fff;
|
justify-content: space-between;
|
||||||
margin: 24rpx;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
|
|
||||||
.article-img {
|
.title {
|
||||||
margin-right: 20rpx;
|
font-weight: bold;
|
||||||
width: 160rpx;
|
margin-bottom: 10rpx;
|
||||||
height: 160rpx;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
text-overflow: ellipsis;
|
||||||
align-items: center;
|
display: -webkit-box;
|
||||||
justify-content: center;
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
image {
|
font-size: 30rpx;
|
||||||
width: 100%;
|
line-height: 1.5;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-wrap {
|
.abstract {
|
||||||
flex: 1;
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
font-size: $font-size-tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
.read-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
color: #999ca7;
|
||||||
justify-content: space-between;
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
line-height: 1;
|
||||||
|
|
||||||
.title {
|
text {
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 10rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
font-size: 30rpx;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.abstract {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
.read-wrap {
|
.iconfont {
|
||||||
display: flex;
|
font-size: 36rpx;
|
||||||
color: #999ca7;
|
vertical-align: bottom;
|
||||||
justify-content: flex-start;
|
margin-right: 10rpx;
|
||||||
align-items: center;
|
}
|
||||||
margin-top: 10rpx;
|
|
||||||
line-height: 1;
|
|
||||||
|
|
||||||
text {
|
.category-icon {
|
||||||
font-size: $font-size-tag;
|
width: 8rpx;
|
||||||
}
|
height: 8rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: $base-color;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.iconfont {
|
.date {
|
||||||
font-size: 36rpx;
|
margin-left: 20rpx;
|
||||||
vertical-align: bottom;
|
|
||||||
margin-right: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category-icon {
|
|
||||||
width: 8rpx;
|
|
||||||
height: 8rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: $base-color;
|
|
||||||
margin-right: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.date {
|
|
||||||
margin-left: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,41 +2,23 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="search-wrap uni-flex uni-row">
|
<view class="search-wrap uni-flex uni-row">
|
||||||
<view class="flex-item input-wrap">
|
<view class="flex-item input-wrap">
|
||||||
<input
|
<input class="uni-input" maxlength="50" placeholder="请输入您要搜索的文件名称" v-model="keyword" @confirm="search"
|
||||||
class="uni-input"
|
@input="__set_model($event, 'keyword')" />
|
||||||
maxlength="50"
|
|
||||||
placeholder="请输入您要搜索的文件名称"
|
|
||||||
v-model="keyword"
|
|
||||||
@confirm="search"
|
|
||||||
@input="__set_model($event, 'keyword')"
|
|
||||||
/>
|
|
||||||
<text class="iconfont icon-sousuo3" @tap="search"></text>
|
<text class="iconfont icon-sousuo3" @tap="search"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<mescroll-uni
|
<mescroll-uni ref="mescroll" top="100" @getData="getData">
|
||||||
ref="mescroll"
|
|
||||||
top="100"
|
|
||||||
@getData="getData"
|
|
||||||
>
|
|
||||||
<view slot="list">
|
<view slot="list">
|
||||||
<block v-if="list.length > 0">
|
<block v-if="list.length > 0">
|
||||||
<view class="article-wrap">
|
<view class="article-wrap">
|
||||||
<ns-adv
|
<ns-adv keyword="NS_ARTICLE" class-name="adv-wrap"></ns-adv>
|
||||||
keyword="NS_ARTICLE"
|
|
||||||
class-name="adv-wrap"
|
|
||||||
></ns-adv>
|
|
||||||
<block v-for="(item, index) in list" :key="index">
|
<block v-for="(item, index) in list" :key="index">
|
||||||
<view class="item" @tap="toDetail(item.$orig)">
|
<view class="item" @tap="toDetail(item.$orig)">
|
||||||
<view class="article-img">
|
<view class="article-img">
|
||||||
<image
|
<image class="cover-img" :src="item.g1" mode="widthFix" @error="imgError(index)"></image>
|
||||||
class="cover-img"
|
|
||||||
:src="item.g1"
|
|
||||||
mode="widthFix"
|
|
||||||
@error="imgError(index)"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<view class="title">{{item.$orig.files_title}}</view>
|
<view class="title">{{ item.$orig.files_title }}</view>
|
||||||
<view class="read-wrap">
|
<view class="read-wrap">
|
||||||
<text>查看PDF文件</text>
|
<text>查看PDF文件</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -58,227 +40,231 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
export default {
|
||||||
// #ifdef MP-WEIXIN
|
data() {
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
return {
|
||||||
// #endif
|
category_id: '',
|
||||||
export default {
|
list: [],
|
||||||
components: {
|
title: '',
|
||||||
MescrollUni,
|
keyword: ''
|
||||||
// #ifdef MP-WEIXIN
|
}
|
||||||
privacyPopup,
|
},
|
||||||
// #endif
|
onLoad(options) {
|
||||||
|
if (options.category_id > 0) {
|
||||||
|
this.category_id = options.category_id
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
__set_model(event, field) {
|
||||||
|
this[field] = event.detail.value
|
||||||
},
|
},
|
||||||
data() {
|
search() {
|
||||||
return {
|
this.list = []
|
||||||
category_id: '',
|
this.$refs.mescroll.refresh()
|
||||||
list: [],
|
|
||||||
title: '',
|
|
||||||
keyword: ''
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
getData(page) {
|
||||||
if (options.category_id > 0) {
|
this.$api.sendRequest({
|
||||||
this.category_id = options.category_id
|
url: '/api/files/getpage',
|
||||||
}
|
data: {
|
||||||
},
|
page_size: page.size,
|
||||||
onShow() {
|
page: page.num,
|
||||||
},
|
category_id: this.category_id,
|
||||||
methods: {
|
keyword: this.keyword
|
||||||
__set_model(event, field) {
|
},
|
||||||
this[field] = event.detail.value
|
success: res => {
|
||||||
},
|
let list = []
|
||||||
search() {
|
let message = res.message
|
||||||
this.list = []
|
if (res.code === 0 && res.data) {
|
||||||
this.$refs.mescroll.refresh()
|
list = res.data.list
|
||||||
},
|
if (!this.title && res.data.list.length > 0) {
|
||||||
getData(page) {
|
uni.setNavigationBarTitle({
|
||||||
this.$api.sendRequest({
|
title: res.data.list[0].category_name
|
||||||
url: '/api/files/getpage',
|
|
||||||
data: {
|
|
||||||
page_size: page.size,
|
|
||||||
page: page.num,
|
|
||||||
category_id: this.category_id,
|
|
||||||
keyword: this.keyword
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
let list = []
|
|
||||||
let message = res.message
|
|
||||||
if (res.code === 0 && res.data) {
|
|
||||||
list = res.data.list
|
|
||||||
if (!this.title && res.data.list.length > 0) {
|
|
||||||
uni.setNavigationBarTitle({
|
|
||||||
title: res.data.list[0].category_name
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: message
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
page.endSuccess(list.length)
|
} else {
|
||||||
if (page.num === 1) {
|
this.$util.showToast({
|
||||||
this.list = []
|
title: message
|
||||||
}
|
})
|
||||||
this.list = this.list.concat(list.map(item => {
|
}
|
||||||
const orig = item
|
page.endSuccess(list.length)
|
||||||
const g1 = this.$util.img("addon/personnel/shop/view/enterprise/fileicon.png")
|
if (page.num === 1) {
|
||||||
return { $orig: orig, g1: g1 }
|
this.list = []
|
||||||
}))
|
}
|
||||||
if (this.$refs.loadingCover) {
|
this.list = this.list.concat(list.map(item => {
|
||||||
this.$refs.loadingCover.hide()
|
const orig = item
|
||||||
|
const g1 = this.$util.img("addon/personnel/shop/view/enterprise/fileicon.png")
|
||||||
|
return { $orig: orig, g1: g1 }
|
||||||
|
}))
|
||||||
|
if (this.$refs.loadingCover) {
|
||||||
|
this.$refs.loadingCover.hide()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
page.endErr()
|
||||||
|
if (this.$refs.loadingCover) {
|
||||||
|
this.$refs.loadingCover.hide()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toDetail(item) {
|
||||||
|
console.log(item.files_url)
|
||||||
|
uni.showLoading({
|
||||||
|
title: '正在加载'
|
||||||
|
})
|
||||||
|
try {
|
||||||
|
uni.downloadFile({
|
||||||
|
url: item.files_url,
|
||||||
|
success: res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
uni.openDocument({
|
||||||
|
filePath: res.tempFilePath,
|
||||||
|
success: () => {
|
||||||
|
console.log('打开成功')
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: () => {
|
fail: () => {
|
||||||
page.endErr()
|
uni.hideLoading()
|
||||||
if (this.$refs.loadingCover) {
|
},
|
||||||
this.$refs.loadingCover.hide()
|
complete: res => {
|
||||||
|
console.log('下载完成', res)
|
||||||
|
if (res.statusCode === 404) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '文件不存在',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
} catch (e) {
|
||||||
toDetail(item) {
|
console.log('CatchClause', e)
|
||||||
console.log(item.files_url)
|
uni.hideLoading()
|
||||||
uni.showLoading({
|
}
|
||||||
title: '正在加载'
|
},
|
||||||
})
|
imgError(index) {
|
||||||
try {
|
if (this.list[index]) {
|
||||||
uni.downloadFile({
|
this.list[index].cover_img = this.$util.getDefaultImage().article
|
||||||
url: item.files_url,
|
|
||||||
success: res => {
|
|
||||||
console.log(res)
|
|
||||||
if (res.statusCode === 200) {
|
|
||||||
uni.openDocument({
|
|
||||||
filePath: res.tempFilePath,
|
|
||||||
success: () => {
|
|
||||||
console.log('打开成功')
|
|
||||||
},
|
|
||||||
fail: () => {
|
|
||||||
},
|
|
||||||
complete: () => {
|
|
||||||
uni.hideLoading()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: () => {
|
|
||||||
uni.hideLoading()
|
|
||||||
},
|
|
||||||
complete: res => {
|
|
||||||
console.log('下载完成', res)
|
|
||||||
if (res.statusCode === 404) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '文件不存在',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} catch (e) {
|
|
||||||
console.log('CatchClause', e)
|
|
||||||
uni.hideLoading()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
imgError(index) {
|
|
||||||
if (this.list[index]) {
|
|
||||||
this.list[index].cover_img = this.$util.getDefaultImage().article
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.search-wrap {
|
.search-wrap {
|
||||||
flex: 0.5;
|
flex: 0.5;
|
||||||
padding: 30rpx 30rpx 0;
|
padding: 30rpx 30rpx 0;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.search-wrap .iconfont {
|
|
||||||
margin-left: 16rpx;
|
.search-wrap .iconfont {
|
||||||
font-size: 36rpx;
|
margin-left: 16rpx;
|
||||||
}
|
font-size: 36rpx;
|
||||||
.search-wrap .input-wrap {
|
}
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
.search-wrap .input-wrap {
|
||||||
justify-content: space-between;
|
flex: 1;
|
||||||
align-items: center;
|
display: flex;
|
||||||
background: #fff;
|
justify-content: space-between;
|
||||||
height: 64rpx;
|
align-items: center;
|
||||||
padding-left: 10rpx;
|
background: #fff;
|
||||||
border-radius: 70rpx;
|
height: 64rpx;
|
||||||
}
|
padding-left: 10rpx;
|
||||||
.search-wrap .input-wrap input {
|
border-radius: 70rpx;
|
||||||
width: 90%;
|
}
|
||||||
background: #fff;
|
|
||||||
font-size: 24rpx;
|
.search-wrap .input-wrap input {
|
||||||
height: 100%;
|
width: 90%;
|
||||||
padding: 0 25rpx 0 40rpx;
|
background: #fff;
|
||||||
line-height: 50rpx;
|
font-size: 24rpx;
|
||||||
border-radius: 40rpx;
|
height: 100%;
|
||||||
}
|
padding: 0 25rpx 0 40rpx;
|
||||||
.search-wrap .input-wrap text {
|
line-height: 50rpx;
|
||||||
font-size: 32rpx;
|
border-radius: 40rpx;
|
||||||
color: #909399;
|
}
|
||||||
width: 80rpx;
|
|
||||||
text-align: center;
|
.search-wrap .input-wrap text {
|
||||||
margin-right: 20rpx;
|
font-size: 32rpx;
|
||||||
}
|
color: #909399;
|
||||||
.empty-wrap {
|
width: 80rpx;
|
||||||
padding-top: 200rpx;
|
text-align: center;
|
||||||
}
|
margin-right: 20rpx;
|
||||||
.article-wrap {
|
}
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
.empty-wrap {
|
||||||
.article-wrap .adv-wrap {
|
padding-top: 200rpx;
|
||||||
margin: 24rpx 24rpx 0 24rpx;
|
}
|
||||||
width: auto;
|
|
||||||
}
|
.article-wrap {
|
||||||
.article-wrap .item {
|
background: #f8f8f8;
|
||||||
display: flex;
|
}
|
||||||
padding: 20rpx;
|
|
||||||
background-color: #fff;
|
.article-wrap .adv-wrap {
|
||||||
margin: 24rpx;
|
margin: 24rpx 24rpx 0 24rpx;
|
||||||
border-radius: 16rpx;
|
width: auto;
|
||||||
}
|
}
|
||||||
.article-wrap .item .article-img {
|
|
||||||
margin-right: 20rpx;
|
.article-wrap .item {
|
||||||
width: 80rpx;
|
display: flex;
|
||||||
height: 80rpx;
|
padding: 20rpx;
|
||||||
overflow: hidden;
|
background-color: #fff;
|
||||||
display: flex;
|
margin: 24rpx;
|
||||||
align-items: center;
|
border-radius: 16rpx;
|
||||||
justify-content: center;
|
}
|
||||||
}
|
|
||||||
.article-wrap .item .article-img image {
|
.article-wrap .item .article-img {
|
||||||
width: 100%;
|
margin-right: 20rpx;
|
||||||
}
|
width: 80rpx;
|
||||||
.article-wrap .item .info-wrap {
|
height: 80rpx;
|
||||||
flex: 1;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.article-wrap .item .info-wrap .title {
|
|
||||||
font-weight: 700;
|
.article-wrap .item .article-img image {
|
||||||
overflow: hidden;
|
width: 100%;
|
||||||
text-overflow: ellipsis;
|
}
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 1;
|
.article-wrap .item .info-wrap {
|
||||||
-webkit-box-orient: vertical;
|
flex: 1;
|
||||||
font-size: 24rpx;
|
display: flex;
|
||||||
}
|
flex-direction: column;
|
||||||
.article-wrap .item .info-wrap .read-wrap {
|
justify-content: space-between;
|
||||||
display: flex;
|
}
|
||||||
color: #999ca7;
|
|
||||||
justify-content: flex-start;
|
.article-wrap .item .info-wrap .title {
|
||||||
align-items: center;
|
font-weight: 700;
|
||||||
margin-top: 10rpx;
|
overflow: hidden;
|
||||||
line-height: 1;
|
text-overflow: ellipsis;
|
||||||
}
|
display: -webkit-box;
|
||||||
.article-wrap .item .info-wrap .read-wrap text {
|
-webkit-line-clamp: 1;
|
||||||
font-size: 24rpx;
|
-webkit-box-orient: vertical;
|
||||||
}
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-wrap .item .info-wrap .read-wrap {
|
||||||
|
display: flex;
|
||||||
|
color: #999ca7;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-wrap .item .info-wrap .read-wrap text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -24,104 +24,94 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
export default {
|
||||||
// #ifdef MP-WEIXIN
|
data() {
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
return {
|
||||||
// #endif
|
brandList: [],
|
||||||
export default {
|
siteId: 0
|
||||||
components: {
|
};
|
||||||
MescrollUni,
|
},
|
||||||
// #ifdef MP-WEIXIN
|
onLoad(options) {
|
||||||
privacyPopup
|
if (options.site_id) this.siteId = options.site_id;
|
||||||
// #endif
|
},
|
||||||
|
onShow() { },
|
||||||
|
methods: {
|
||||||
|
change(e) {
|
||||||
|
this.$util.redirectTo('/pages_goods/list', {
|
||||||
|
brand_id: this.brandList[e.detail.index].brand_id
|
||||||
|
});
|
||||||
},
|
},
|
||||||
data() {
|
getBrandList(mescroll) {
|
||||||
return {
|
this.$api.sendRequest({
|
||||||
brandList: [],
|
url: '/api/goodsbrand/page',
|
||||||
siteId: 0
|
data: {
|
||||||
};
|
page_size: mescroll.size,
|
||||||
},
|
page: mescroll.num,
|
||||||
onLoad(options) {
|
site_id: this.siteId
|
||||||
if (options.site_id) this.siteId = options.site_id;
|
},
|
||||||
},
|
success: res => {
|
||||||
onShow() {},
|
let newArr = [];
|
||||||
methods: {
|
let msg = res.message;
|
||||||
change(e) {
|
if (res.code == 0 && res.data) {
|
||||||
this.$util.redirectTo('/pages_goods/list', {
|
newArr = res.data.list;
|
||||||
brand_id: this.brandList[e.detail.index].brand_id
|
} else {
|
||||||
});
|
this.$util.showToast({
|
||||||
},
|
title: msg
|
||||||
getBrandList(mescroll) {
|
});
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/goodsbrand/page',
|
|
||||||
data: {
|
|
||||||
page_size: mescroll.size,
|
|
||||||
page: mescroll.num,
|
|
||||||
site_id: this.siteId
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
let newArr = [];
|
|
||||||
let msg = res.message;
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
newArr = res.data.list;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: msg
|
|
||||||
});
|
|
||||||
}
|
|
||||||
mescroll.endSuccess(newArr.length);
|
|
||||||
//设置列表数据
|
|
||||||
if (mescroll.num == 1) this.brandList = []; //如果是第一页需手动制空列表
|
|
||||||
this.brandList = this.brandList.concat(newArr); //追加新数据
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
mescroll.endErr();
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
}
|
||||||
});
|
mescroll.endSuccess(newArr.length);
|
||||||
}
|
//设置列表数据
|
||||||
},
|
if (mescroll.num == 1) this.brandList = []; //如果是第一页需手动制空列表
|
||||||
onShareAppMessage(res) {
|
this.brandList = this.brandList.concat(newArr); //追加新数据
|
||||||
var title = '你想要的大牌都在这里';
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
var path = '/pages_tool/goods/brand';
|
},
|
||||||
return {
|
fail() {
|
||||||
title: title,
|
mescroll.endErr();
|
||||||
path: path,
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
success: res => {},
|
}
|
||||||
fail: res => {}
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
onShareAppMessage(res) {
|
||||||
|
var title = '你想要的大牌都在这里';
|
||||||
|
var path = '/pages_tool/goods/brand';
|
||||||
|
return {
|
||||||
|
title: title,
|
||||||
|
path: path,
|
||||||
|
success: res => { },
|
||||||
|
fail: res => { }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/deep/ .uni-grid-item {
|
/deep/ .uni-grid-item {
|
||||||
width: calc((100vw - (#{$margin-both} * 2)) / 3) !important;
|
width: calc((100vw - (#{$margin-both} * 2)) / 3) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.adv-wrap {
|
||||||
|
margin: $margin-updown $margin-both;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-content {
|
||||||
|
padding: $padding 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #ffffff;
|
||||||
|
margin: $margin-updown $margin-both 0;
|
||||||
|
|
||||||
|
.brand-pic {
|
||||||
|
width: 60%;
|
||||||
|
height: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.adv-wrap {
|
.brand_name {
|
||||||
margin: $margin-updown $margin-both;
|
width: 70%;
|
||||||
width: auto;
|
overflow: hidden;
|
||||||
}
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
.brand-content {
|
text-align: center;
|
||||||
padding: $padding 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: #ffffff;
|
|
||||||
margin: $margin-updown $margin-both 0;
|
|
||||||
|
|
||||||
.brand-pic {
|
|
||||||
width: 60%;
|
|
||||||
height: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand_name {
|
|
||||||
width: 70%;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,42 +2,53 @@
|
|||||||
<view :style="themeColor">
|
<view :style="themeColor">
|
||||||
<view class="cf-container color-line-border">
|
<view class="cf-container color-line-border">
|
||||||
<view class="tab">
|
<view class="tab">
|
||||||
<view @click="changeSort(1)"><text :class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">全部</text></view>
|
<view @click="changeSort(1)"><text
|
||||||
<view @click="changeSort(2, 'reward')"><text :class="sort == 2 ? 'color-base-text active color-base-border-bottom' : ''">满减券</text></view>
|
:class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">全部</text></view>
|
||||||
<view @click="changeSort(3, 'discount')"><text :class="sort == 3 ? 'color-base-text active color-base-border-bottom' : ''">折扣券</text></view>
|
<view @click="changeSort(2, 'reward')"><text
|
||||||
<!-- <view @click="changeSort(4, 'no_threshold')"><text :class="sort == 4 ? 'color-base-text active color-base-border-bottom' : ''">无门槛券</text></view> -->
|
:class="sort == 2 ? 'color-base-text active color-base-border-bottom' : ''">满减券</text></view>
|
||||||
|
<view @click="changeSort(3, 'discount')"><text
|
||||||
|
:class="sort == 3 ? 'color-base-text active color-base-border-bottom' : ''">折扣券</text></view>
|
||||||
|
<!-- <view @click="changeSort(4, 'no_threshold')"><text :class="sort == 4 ? 'color-base-text active color-base-border-bottom' : ''">无门槛券</text></view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<mescroll-uni ref="mescroll" top="100" @getData="getMemberCouponList">
|
<mescroll-uni ref="mescroll" top="100" @getData="getMemberCouponList">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="coupon-listone">
|
<view class="coupon-listone">
|
||||||
<view class="item" v-for="(item, index) in list" :key="index" @click="liClick(item, index)" :style="{ backgroundColor: item.useState == 2 ? '#F2F2F2' : 'var(--main-color-shallow)' }">
|
<view class="item" v-for="(item, index) in list" :key="index" @click="liClick(item, index)"
|
||||||
|
:style="{ backgroundColor: item.useState == 2 ? '#F2F2F2' : 'var(--main-color-shallow)' }">
|
||||||
<view class="item-base" :class="{ disabled: item.useState == 2 }">
|
<view class="item-base" :class="{ disabled: item.useState == 2 }">
|
||||||
<image class="coupon-line" mode="heightFix" :src="$util.img('public/uniapp/coupon/coupon_line.png')"></image>
|
<image class="coupon-line" mode="heightFix"
|
||||||
|
:src="$util.img('public/uniapp/coupon/coupon_line.png')"></image>
|
||||||
<view>
|
<view>
|
||||||
<view class="use_price price-font" v-if="item.type == 'reward'" :class="{ disabled: item.useState == 2 }">
|
<view class="use_price price-font" v-if="item.type == 'reward'"
|
||||||
|
:class="{ disabled: item.useState == 2 }">
|
||||||
<text>¥</text>
|
<text>¥</text>
|
||||||
{{ parseFloat(item.money) }}
|
{{ parseFloat(item.money) }}
|
||||||
</view>
|
</view>
|
||||||
<view class="use_price price-font" v-else-if="item.type == 'discount'" :class="{ disabled: item.useState == 2 }">
|
<view class="use_price price-font" v-else-if="item.type == 'discount'"
|
||||||
|
:class="{ disabled: item.useState == 2 }">
|
||||||
{{ parseFloat(item.discount) }}
|
{{ parseFloat(item.discount) }}
|
||||||
<text>折</text>
|
<text>折</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="use_condition font-size-tag" v-if="item.at_least > 0" :class="{ disabled: item.useState == 2 }">满{{ item.at_least }}元可用</view>
|
<view class="use_condition font-size-tag" v-if="item.at_least > 0"
|
||||||
<view class="use_condition font-size-tag" v-else :class="{ disabled: item.useState == 2 }">无门槛优惠券</view>
|
:class="{ disabled: item.useState == 2 }">满{{ item.at_least }}元可用</view>
|
||||||
|
<view class="use_condition font-size-tag" v-else
|
||||||
|
:class="{ disabled: item.useState == 2 }">无门槛优惠券</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-info">
|
<view class="item-info">
|
||||||
<view class="use_title">
|
<view class="use_title">
|
||||||
<view class="title">{{ item.coupon_name }}</view>
|
<view class="title">{{ item.coupon_name }}</view>
|
||||||
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3" :class="{ disabled: item.useState == 2 }">指定商品</view>
|
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3"
|
||||||
|
:class="{ disabled: item.useState == 2 }">指定商品</view>
|
||||||
<view class="max_price" v-else :class="{ disabled: item.useState == 2 }">全场商品</view>
|
<view class="max_price" v-else :class="{ disabled: item.useState == 2 }">全场商品</view>
|
||||||
<view class="max_price" v-if="item.discount_limit != '0.00'">
|
<view class="max_price" v-if="item.discount_limit != '0.00'">
|
||||||
(最大优惠{{ item.discount_limit }}元)
|
(最大优惠{{ item.discount_limit }}元)
|
||||||
</view>
|
</view>
|
||||||
<view class="max_price" :class="{ disabled: item.useState == 2 }">{{ item.use_channel_name }}</view>
|
<view class="max_price" :class="{ disabled: item.useState == 2 }">{{
|
||||||
<!-- <view class="max_price truncate" v-if="item.use_channel!='online'" :class="{ disabled: item.useState == 2 }">
|
item.use_channel_name }}</view>
|
||||||
|
<!-- <view class="max_price truncate" v-if="item.use_channel!='online'" :class="{ disabled: item.useState == 2 }">
|
||||||
{{ item.use_store==='all'?'适用门店:全部门店': '适用门店:'+item.use_store_name}}
|
{{ item.use_store==='all'?'适用门店:全部门店': '适用门店:'+item.use_store_name}}
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
@@ -70,400 +81,391 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
export default {
|
||||||
// #ifdef MP-WEIXIN
|
data() {
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
return {
|
||||||
// #endif
|
list: [],
|
||||||
export default {
|
sort: 1,
|
||||||
components: {
|
types: '',
|
||||||
MescrollUni,
|
couponBtnSwitch: false,
|
||||||
// #ifdef MP-WEIXIN
|
//分享建立上下级id
|
||||||
privacyPopup
|
mpShareData: null //小程序分享数据
|
||||||
// #endif
|
};
|
||||||
},
|
},
|
||||||
data() {
|
onLoad(option) {
|
||||||
return {
|
setTimeout(() => {
|
||||||
list: [],
|
if (!this.addonIsExist.coupon) {
|
||||||
sort: 1,
|
this.$util.showToast({
|
||||||
types: '',
|
title: '商家未开启优惠券',
|
||||||
couponBtnSwitch: false,
|
mask: true,
|
||||||
//分享建立上下级id
|
duration: 2000
|
||||||
mpShareData: null //小程序分享数据
|
});
|
||||||
};
|
setTimeout(() => {
|
||||||
},
|
this.$util.redirectTo('/pages/index/index');
|
||||||
onLoad(option) {
|
}, 2000);
|
||||||
setTimeout( () => {
|
}
|
||||||
if (!this.addonIsExist.coupon) {
|
}, 1000);
|
||||||
this.$util.showToast({
|
|
||||||
title: '商家未开启优惠券',
|
//小程序分享接收source_member
|
||||||
mask: true,
|
if (option.source_member) {
|
||||||
duration: 2000
|
uni.setStorageSync('source_member', option.source_member);
|
||||||
});
|
}
|
||||||
setTimeout(() => {
|
// 小程序扫码进入,接收source_member
|
||||||
this.$util.redirectTo('/pages/index/index');
|
if (option.scene) {
|
||||||
}, 2000);
|
var sceneParams = decodeURIComponent(option.scene);
|
||||||
}
|
sceneParams = sceneParams.split('&');
|
||||||
},1000);
|
if (sceneParams.length) {
|
||||||
|
sceneParams.forEach(item => {
|
||||||
//小程序分享接收source_member
|
if (item.indexOf('sku_id') != -1) this.skuId = item.split('-')[1];
|
||||||
if (option.source_member) {
|
if (item.indexOf('m') != -1) uni.setStorageSync('source_member', item.split('-')[1]);
|
||||||
uni.setStorageSync('source_member', option.source_member);
|
if (item.indexOf('is_test') != -1) uni.setStorageSync('is_test', 1);
|
||||||
}
|
|
||||||
// 小程序扫码进入,接收source_member
|
|
||||||
if (option.scene) {
|
|
||||||
var sceneParams = decodeURIComponent(option.scene);
|
|
||||||
sceneParams = sceneParams.split('&');
|
|
||||||
if (sceneParams.length) {
|
|
||||||
sceneParams.forEach(item => {
|
|
||||||
if (item.indexOf('sku_id') != -1) this.skuId = item.split('-')[1];
|
|
||||||
if (item.indexOf('m') != -1) uni.setStorageSync('source_member', item.split('-')[1]);
|
|
||||||
if (item.indexOf('is_test') != -1) uni.setStorageSync('is_test', 1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
//记录分享关系
|
|
||||||
if (this.storeToken && uni.getStorageSync('source_member')) {
|
|
||||||
this.$util.onSourceMember(uni.getStorageSync('source_member'));
|
|
||||||
}
|
|
||||||
|
|
||||||
//小程序分享
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
this.$util.getMpShare().then(res => {
|
|
||||||
this.mpShareData = res;
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
//分享给好友
|
|
||||||
onShareAppMessage() {
|
|
||||||
return this.mpShareData.appMessage;
|
|
||||||
},
|
|
||||||
//分享到朋友圈
|
|
||||||
onShareTimeline() {
|
|
||||||
return this.mpShareData.timeLine;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeSort(sort, types) {
|
|
||||||
this.list = [];
|
|
||||||
this.sort = sort;
|
|
||||||
this.types = types;
|
|
||||||
this.$refs.mescroll.refresh(false);
|
|
||||||
},
|
|
||||||
liClick(item, index) {
|
|
||||||
if(['limit', 'expire', 'out'].includes(item.receivedType)) return false;
|
|
||||||
if (item.useState == 0) this.receiveCoupon(item, index);
|
|
||||||
else this.toGoodsList(item, index);
|
|
||||||
},
|
|
||||||
|
|
||||||
//领取优惠券
|
|
||||||
receiveCoupon(item, index) {
|
|
||||||
if (this.couponBtnSwitch) return;
|
|
||||||
this.couponBtnSwitch = true;
|
|
||||||
if (this.storeToken) {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/coupon/api/coupon/receive',
|
|
||||||
data: {
|
|
||||||
coupon_type_id: item.coupon_type_id,
|
|
||||||
get_type: 2 //获取方式:1订单2.直接领取3.活动领取
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
this.couponBtnSwitch = false;
|
|
||||||
let msg = '领取成功,快去使用吧';
|
|
||||||
let list = this.list;
|
|
||||||
if (res.code < 0) msg = res.message;
|
|
||||||
|
|
||||||
if (res.data.is_exist == 1) {
|
|
||||||
for (let i = 0; i < list.length; i++) {
|
|
||||||
if (list[i].coupon_type_id == item.coupon_type_id) {
|
|
||||||
list[i].useState = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (let i = 0; i < list.length; i++) {
|
|
||||||
if (list[i].coupon_type_id == item.coupon_type_id) {
|
|
||||||
list[i].receivedType = res.data.type;
|
|
||||||
list[i].useState = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.$util.showToast({
|
|
||||||
title: msg
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
this.couponBtnSwitch = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.couponBtnSwitch = false;
|
|
||||||
this.$refs.login.open('/pages_tool/goods/coupon');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//获取优惠券列表
|
|
||||||
getMemberCouponList(mescroll) {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/coupon/api/coupon/typepagelists',
|
|
||||||
data: {
|
|
||||||
page: mescroll.num,
|
|
||||||
page_size: mescroll.size,
|
|
||||||
sort: this.sort,
|
|
||||||
type: this.types
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
let newArr = [];
|
|
||||||
let msg = res.message;
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
newArr = res.data.list;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: msg
|
|
||||||
});
|
|
||||||
}
|
|
||||||
mescroll.endSuccess(newArr.length);
|
|
||||||
if (newArr.length) {
|
|
||||||
newArr.forEach(v => {
|
|
||||||
if (v.count == v.lead_count) v.useState = 2;
|
|
||||||
else if (v.max_fetch != 0 && v.member_coupon_num && v.member_coupon_num >= v.max_fetch) v.useState = 1;
|
|
||||||
else v.useState = 0;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//设置列表数据
|
|
||||||
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
|
||||||
this.list = this.list.concat(newArr); //追加新数据
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
mescroll.endErr();
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
imageError(index) {
|
|
||||||
this.list[index].logo = this.$util.getDefaultImage().goods;
|
|
||||||
this.$forceUpdate();
|
|
||||||
},
|
|
||||||
couponImageError(index) {
|
|
||||||
this.list[index].image = this.$util.img('public/uniapp/goods/coupon.png');
|
|
||||||
this.$forceUpdate();
|
|
||||||
},
|
|
||||||
toGoodsList(item) {
|
|
||||||
if (item.goods_type != 1) {
|
|
||||||
this.$util.redirectTo('/pages_goods/list', {
|
|
||||||
coupon: item.coupon_type_id
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$util.redirectTo('/pages_goods/list', {});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
onShow() {
|
||||||
|
//记录分享关系
|
||||||
|
if (this.storeToken && uni.getStorageSync('source_member')) {
|
||||||
|
this.$util.onSourceMember(uni.getStorageSync('source_member'));
|
||||||
|
}
|
||||||
|
|
||||||
|
//小程序分享
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.$util.getMpShare().then(res => {
|
||||||
|
this.mpShareData = res;
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
//分享给好友
|
||||||
|
onShareAppMessage() {
|
||||||
|
return this.mpShareData.appMessage;
|
||||||
|
},
|
||||||
|
//分享到朋友圈
|
||||||
|
onShareTimeline() {
|
||||||
|
return this.mpShareData.timeLine;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeSort(sort, types) {
|
||||||
|
this.list = [];
|
||||||
|
this.sort = sort;
|
||||||
|
this.types = types;
|
||||||
|
this.$refs.mescroll.refresh(false);
|
||||||
|
},
|
||||||
|
liClick(item, index) {
|
||||||
|
if (['limit', 'expire', 'out'].includes(item.receivedType)) return false;
|
||||||
|
if (item.useState == 0) this.receiveCoupon(item, index);
|
||||||
|
else this.toGoodsList(item, index);
|
||||||
|
},
|
||||||
|
|
||||||
|
//领取优惠券
|
||||||
|
receiveCoupon(item, index) {
|
||||||
|
if (this.couponBtnSwitch) return;
|
||||||
|
this.couponBtnSwitch = true;
|
||||||
|
if (this.storeToken) {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/coupon/api/coupon/receive',
|
||||||
|
data: {
|
||||||
|
coupon_type_id: item.coupon_type_id,
|
||||||
|
get_type: 2 //获取方式:1订单2.直接领取3.活动领取
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
this.couponBtnSwitch = false;
|
||||||
|
let msg = '领取成功,快去使用吧';
|
||||||
|
let list = this.list;
|
||||||
|
if (res.code < 0) msg = res.message;
|
||||||
|
|
||||||
|
if (res.data.is_exist == 1) {
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
if (list[i].coupon_type_id == item.coupon_type_id) {
|
||||||
|
list[i].useState = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
if (list[i].coupon_type_id == item.coupon_type_id) {
|
||||||
|
list[i].receivedType = res.data.type;
|
||||||
|
list[i].useState = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$util.showToast({
|
||||||
|
title: msg
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: res => {
|
||||||
|
this.couponBtnSwitch = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.couponBtnSwitch = false;
|
||||||
|
this.$refs.login.open('/pages_tool/goods/coupon');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//获取优惠券列表
|
||||||
|
getMemberCouponList(mescroll) {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/coupon/api/coupon/typepagelists',
|
||||||
|
data: {
|
||||||
|
page: mescroll.num,
|
||||||
|
page_size: mescroll.size,
|
||||||
|
sort: this.sort,
|
||||||
|
type: this.types
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
let newArr = [];
|
||||||
|
let msg = res.message;
|
||||||
|
if (res.code == 0 && res.data) {
|
||||||
|
newArr = res.data.list;
|
||||||
|
} else {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: msg
|
||||||
|
});
|
||||||
|
}
|
||||||
|
mescroll.endSuccess(newArr.length);
|
||||||
|
if (newArr.length) {
|
||||||
|
newArr.forEach(v => {
|
||||||
|
if (v.count == v.lead_count) v.useState = 2;
|
||||||
|
else if (v.max_fetch != 0 && v.member_coupon_num && v.member_coupon_num >= v.max_fetch) v.useState = 1;
|
||||||
|
else v.useState = 0;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//设置列表数据
|
||||||
|
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
||||||
|
this.list = this.list.concat(newArr); //追加新数据
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
},
|
||||||
|
fail() {
|
||||||
|
mescroll.endErr();
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
imageError(index) {
|
||||||
|
this.list[index].logo = this.$util.getDefaultImage().goods;
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
|
couponImageError(index) {
|
||||||
|
this.list[index].image = this.$util.img('public/uniapp/goods/coupon.png');
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
|
toGoodsList(item) {
|
||||||
|
if (item.goods_type != 1) {
|
||||||
|
this.$util.redirectTo('/pages_goods/list', {
|
||||||
|
coupon: item.coupon_type_id
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$util.redirectTo('/pages_goods/list', {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.coupon-head {
|
.coupon-head {
|
||||||
padding: 20rpx 50rpx;
|
padding: 20rpx 50rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.sort {
|
.sort {
|
||||||
border: 2rpx solid #c5c5c5;
|
border: 2rpx solid #c5c5c5;
|
||||||
padding: 1rpx 20rpx;
|
padding: 1rpx 20rpx;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-right: 15rpx;
|
margin-right: 15rpx;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.coupon-listone {
|
.coupon-listone {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: #fff2f0;
|
background-color: #fff2f0;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
align-items: stretch;
|
||||||
|
margin-top: $padding;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.item-base {
|
||||||
|
position: relative;
|
||||||
|
width: 197rpx;
|
||||||
|
min-width: 197rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: linear-gradient(to left, var(--bg-color), var(--bg-color-shallow));
|
||||||
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
border-radius: 20rpx;
|
padding: 38rpx 10rpx 38rpx 18rpx;
|
||||||
align-items: stretch;
|
|
||||||
margin-top: $padding;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.item-base {
|
&.disabled {
|
||||||
|
background: #dedede;
|
||||||
|
}
|
||||||
|
|
||||||
|
.coupon-line {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
>view {
|
||||||
|
height: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 197rpx;
|
top: 50%;
|
||||||
min-width: 197rpx;
|
transform: translate(0, -50%);
|
||||||
text-align: center;
|
}
|
||||||
background: linear-gradient(to left, var(--bg-color), var(--bg-color-shallow));
|
|
||||||
background-repeat: no-repeat;
|
.use_price {
|
||||||
background-size: 100% 100%;
|
font-size: 60rpx;
|
||||||
padding: 38rpx 10rpx 38rpx 18rpx;
|
line-height: 1;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: $font-size-toolbar;
|
||||||
|
}
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
background: #dedede;
|
color: $color-tip;
|
||||||
}
|
|
||||||
|
|
||||||
.coupon-line {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
>view {
|
|
||||||
height: auto;
|
|
||||||
position: relative;
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(0, -50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.use_price {
|
|
||||||
font-size: 60rpx;
|
|
||||||
line-height: 1;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
text {
|
|
||||||
font-size: $font-size-toolbar;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.disabled {
|
|
||||||
color: $color-tip;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.use_condition {
|
|
||||||
color: #fff;
|
|
||||||
margin-top: $padding;
|
|
||||||
|
|
||||||
&.margin_top_none {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.disabled {
|
|
||||||
color: $color-tip;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
content: '';
|
|
||||||
background-color: #f8f8f8;
|
|
||||||
left: 0;
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(0, -50%);
|
|
||||||
height: 30rpx;
|
|
||||||
width: 15rpx;
|
|
||||||
border-radius: 0 30rpx 30rpx 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-btn {
|
.use_condition {
|
||||||
width: 160rpx;
|
color: #fff;
|
||||||
min-width: 160rpx;
|
margin-top: $padding;
|
||||||
align-self: center;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
view {
|
&.margin_top_none {
|
||||||
width: 100rpx;
|
margin-top: 0;
|
||||||
height: 50rpx;
|
}
|
||||||
border-radius: $border-radius;
|
|
||||||
line-height: 50rpx;
|
&.disabled {
|
||||||
margin: auto;
|
color: $color-tip;
|
||||||
text-align: center;
|
}
|
||||||
background-image: linear-gradient(to right, var(--bg-color), var(--bg-color-shallow));
|
}
|
||||||
color: var(--btn-text-color);
|
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
left: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
height: 30rpx;
|
||||||
|
width: 15rpx;
|
||||||
|
border-radius: 0 30rpx 30rpx 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-btn {
|
||||||
|
width: 160rpx;
|
||||||
|
min-width: 160rpx;
|
||||||
|
align-self: center;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
line-height: 50rpx;
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
background-image: linear-gradient(to right, var(--bg-color), var(--bg-color-shallow));
|
||||||
|
color: var(--btn-text-color);
|
||||||
|
font-size: $font-size-tag;
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
background: #dedede !important;
|
||||||
|
color: #909399 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
height: 30rpx;
|
||||||
|
width: 15rpx;
|
||||||
|
border-radius: 30rpx 0 0 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-info {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
background-repeat-x: no-repeat;
|
||||||
|
background-repeat-y: repeat;
|
||||||
|
|
||||||
|
.use_time {
|
||||||
|
padding: 20rpx 0;
|
||||||
|
border-top: 2rpx dashed #cccccc;
|
||||||
|
font-size: $font-size-activity-tag;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
|
||||||
|
.use_title {
|
||||||
|
font-size: $font-size-base;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
|
||||||
|
// height:80rpx;
|
||||||
|
.title {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.max_price {
|
||||||
|
font-weight: 400;
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
|
|
||||||
&.disabled {
|
|
||||||
background: #dedede !important;
|
|
||||||
color: #909399 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
content: '';
|
|
||||||
background-color: #f8f8f8;
|
|
||||||
right: 0;
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(0, -50%);
|
|
||||||
height: 30rpx;
|
|
||||||
width: 15rpx;
|
|
||||||
border-radius: 30rpx 0 0 30rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-info {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-left: 20rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
background-repeat-x: no-repeat;
|
|
||||||
background-repeat-y: repeat;
|
|
||||||
|
|
||||||
.use_time {
|
|
||||||
padding: 20rpx 0;
|
|
||||||
border-top: 2rpx dashed #cccccc;
|
|
||||||
font-size: $font-size-activity-tag;
|
|
||||||
color: #909399;
|
|
||||||
}
|
|
||||||
|
|
||||||
.use_title {
|
|
||||||
font-size: $font-size-base;
|
|
||||||
font-weight: 500;
|
|
||||||
padding: 20rpx 0;
|
|
||||||
|
|
||||||
// height:80rpx;
|
|
||||||
.title {
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.max_price {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: $font-size-tag;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
margin-top: 200rpx;
|
margin-top: 200rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cf-container {
|
.cf-container {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
height: 86rpx;
|
||||||
|
|
||||||
|
>view {
|
||||||
|
text-align: center;
|
||||||
|
width: 33%;
|
||||||
height: 86rpx;
|
height: 86rpx;
|
||||||
|
|
||||||
>view {
|
text {
|
||||||
text-align: center;
|
display: inline-block;
|
||||||
width: 33%;
|
line-height: 86rpx;
|
||||||
height: 86rpx;
|
height: 80rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
text {
|
|
||||||
display: inline-block;
|
|
||||||
line-height: 86rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
border-bottom: 4rpx solid;
|
border-bottom: 4rpx solid;
|
||||||
}
|
}
|
||||||
.truncate {
|
|
||||||
overflow: hidden;
|
.truncate {
|
||||||
-o-text-overflow: ellipsis;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
-o-text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
text-overflow: ellipsis;
|
||||||
}
|
white-space: nowrap;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -74,19 +74,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
goodsId: 0,
|
goodsId: 0,
|
||||||
|
|||||||
@@ -67,18 +67,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList: [], //账号列表
|
dataList: [], //账号列表
|
||||||
|
|||||||
@@ -100,18 +100,8 @@
|
|||||||
import {
|
import {
|
||||||
Weixin
|
Weixin
|
||||||
} from 'common/js/wx-jssdk.js';
|
} from 'common/js/wx-jssdk.js';
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
addressList: [],
|
addressList: [],
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<text class="uni-tab-item-title" :class="statusIndex == orderStatus ? 'uni-tab-item-title-active' : ''">{{ statusItem.name }}</text>
|
<text class="uni-tab-item-title" :class="statusIndex == orderStatus ? 'uni-tab-item-title-active' : ''">{{ statusItem.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view> -->
|
</scroll-view> -->
|
||||||
<!-- <view class="tab color-bg">
|
<!-- <view class="tab color-bg">
|
||||||
<view class="tab-left">
|
<view class="tab-left">
|
||||||
<picker mode="date" :value="searchType.date" @change="bindDateChange" fields="month">
|
<picker mode="date" :value="searchType.date" @change="bindDateChange" fields="month">
|
||||||
<view class="uni-input">
|
<view class="uni-input">
|
||||||
@@ -27,15 +27,18 @@
|
|||||||
<block v-if="dataList.length > 0">
|
<block v-if="dataList.length > 0">
|
||||||
<view class="detailed-wrap">
|
<view class="detailed-wrap">
|
||||||
<view class="balances" v-for="(item, index) in dataList" :key="index">
|
<view class="balances" v-for="(item, index) in dataList" :key="index">
|
||||||
<image :src="$util.img('public/uniapp/balance/recharge.png')" class="balances-img" v-if="item.account_data > 0"></image>
|
<image :src="$util.img('public/uniapp/balance/recharge.png')" class="balances-img"
|
||||||
<image v-else :src="$util.img('public/uniapp/balance/shopping.png')" mode="widthFix"></image>
|
v-if="item.account_data > 0"></image>
|
||||||
|
<image v-else :src="$util.img('public/uniapp/balance/shopping.png')" mode="widthFix">
|
||||||
|
</image>
|
||||||
<view class="balances-info" @click="toFromDetail(item)">
|
<view class="balances-info" @click="toFromDetail(item)">
|
||||||
<text class="title">{{ item.remark }}</text>
|
<text class="title">{{ item.remark }}</text>
|
||||||
<!-- <text>{{ item.remark }}</text> -->
|
<!-- <text>{{ item.remark }}</text> -->
|
||||||
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="balances-num">
|
<view class="balances-num">
|
||||||
<text :class="item.account_data > 0 ? 'color-base-text' : ''">{{ item.account_data > 0 ? '+' + item.account_data : item.account_data }}元</text>
|
<text :class="item.account_data > 0 ? 'color-base-text' : ''">{{ item.account_data > 0 ?
|
||||||
|
'+' + item.account_data : item.account_data }}元</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -51,318 +54,309 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
data() {
|
||||||
MescrollUni,
|
const currentDate = this.getDate({
|
||||||
// #ifdef MP-WEIXIN
|
format: true
|
||||||
privacyPopup
|
});
|
||||||
// #endif
|
return {
|
||||||
|
dataList: [],
|
||||||
|
statusList: [{
|
||||||
|
name: '全部',
|
||||||
|
id: '0'
|
||||||
|
}, {
|
||||||
|
name: '收入',
|
||||||
|
id: '1'
|
||||||
|
}, {
|
||||||
|
name: '支出',
|
||||||
|
id: '2'
|
||||||
|
}],
|
||||||
|
scrollInto: '',
|
||||||
|
orderStatus: '0',
|
||||||
|
date: currentDate,
|
||||||
|
searchType: {
|
||||||
|
from_type: 0,
|
||||||
|
date: ''
|
||||||
|
},
|
||||||
|
balanceType: [{
|
||||||
|
label: '全部',
|
||||||
|
value: '0'
|
||||||
|
}], //积分类型
|
||||||
|
balanceIndex: 0,
|
||||||
|
related_id: 0
|
||||||
|
};
|
||||||
},
|
},
|
||||||
data() {
|
onLoad(option) {
|
||||||
const currentDate = this.getDate({
|
if (option.group_id) this.related_id = option.group_id ? option.group_id : 0;
|
||||||
format: true
|
if (option.from_type) this.searchType.from_type = option.from_type;
|
||||||
|
if (option.related_id) this.related_id = option.related_id ? option.related_id : 0;
|
||||||
|
if (option.status) this.orderStatus = option.status;
|
||||||
|
this.getbalanceType();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
if (!this.storeToken) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.login.open('/pages_tool/member/balance');
|
||||||
});
|
});
|
||||||
return {
|
}
|
||||||
dataList: [],
|
},
|
||||||
statusList: [{
|
methods: {
|
||||||
name: '全部',
|
bindDateChange: function (e) {
|
||||||
id: '0'
|
var temp = e.target.value;
|
||||||
}, {
|
var tempArr = temp.split('-');
|
||||||
name: '收入',
|
this.date = tempArr[0] + '年' + tempArr[1] + '月';
|
||||||
id: '1'
|
this.searchType.date = e.target.value;
|
||||||
}, {
|
this.$refs.mescroll.refresh();
|
||||||
name: '支出',
|
|
||||||
id: '2'
|
|
||||||
}],
|
|
||||||
scrollInto: '',
|
|
||||||
orderStatus: '0',
|
|
||||||
date: currentDate,
|
|
||||||
searchType: {
|
|
||||||
from_type: 0,
|
|
||||||
date: ''
|
|
||||||
},
|
|
||||||
balanceType: [{
|
|
||||||
label: '全部',
|
|
||||||
value: '0'
|
|
||||||
}], //积分类型
|
|
||||||
balanceIndex: 0,
|
|
||||||
related_id: 0
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
getDate(type) {
|
||||||
if (option.group_id) this.related_id = option.group_id ? option.group_id : 0;
|
const date = new Date();
|
||||||
if (option.from_type) this.searchType.from_type = option.from_type;
|
let year = date.getFullYear();
|
||||||
if (option.related_id) this.related_id = option.related_id ? option.related_id : 0;
|
let month = date.getMonth() + 1;
|
||||||
if (option.status) this.orderStatus = option.status;
|
let day = date.getDate();
|
||||||
this.getbalanceType();
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
if (!this.storeToken) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.login.open('/pages_tool/member/balance');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
bindDateChange: function(e) {
|
|
||||||
var temp = e.target.value;
|
|
||||||
var tempArr = temp.split('-');
|
|
||||||
this.date = tempArr[0] + '年' + tempArr[1] + '月';
|
|
||||||
this.searchType.date = e.target.value;
|
|
||||||
this.$refs.mescroll.refresh();
|
|
||||||
},
|
|
||||||
getDate(type) {
|
|
||||||
const date = new Date();
|
|
||||||
let year = date.getFullYear();
|
|
||||||
let month = date.getMonth() + 1;
|
|
||||||
let day = date.getDate();
|
|
||||||
|
|
||||||
if (type === 'start') {
|
if (type === 'start') {
|
||||||
year = year - 60;
|
year = year - 60;
|
||||||
} else if (type === 'end') {
|
} else if (type === 'end') {
|
||||||
year = year + 2;
|
year = year + 2;
|
||||||
}
|
}
|
||||||
month = month > 9 ? month : '0' + month;
|
month = month > 9 ? month : '0' + month;
|
||||||
day = day > 9 ? day : '0' + day;
|
day = day > 9 ? day : '0' + day;
|
||||||
return `${year}年${month}月`;
|
return `${year}年${month}月`;
|
||||||
},
|
},
|
||||||
bindPickerChange(e) {
|
bindPickerChange(e) {
|
||||||
this.balanceIndex = e.detail.value;
|
this.balanceIndex = e.detail.value;
|
||||||
this.searchType.from_type = this.balanceType[this.balanceIndex].value;
|
this.searchType.from_type = this.balanceType[this.balanceIndex].value;
|
||||||
this.$refs.mescroll.refresh();
|
this.$refs.mescroll.refresh();
|
||||||
},
|
},
|
||||||
//获取分类类型
|
//获取分类类型
|
||||||
getbalanceType() {
|
getbalanceType() {
|
||||||
this.$api.sendRequest({
|
this.$api.sendRequest({
|
||||||
url: '/api/memberaccount/fromType',
|
url: '/api/memberaccount/fromType',
|
||||||
success: res => {
|
success: res => {
|
||||||
let balanceType = Object.assign(res.balance, res.balance_money),
|
let balanceType = Object.assign(res.balance, res.balance_money),
|
||||||
typeArr = [{
|
typeArr = [{
|
||||||
label: '全部',
|
label: '全部',
|
||||||
value: '0'
|
value: '0'
|
||||||
}];
|
}];
|
||||||
for (var index in balanceType) {
|
for (var index in balanceType) {
|
||||||
typeArr.push({
|
typeArr.push({
|
||||||
label: balanceType[index].type_name,
|
label: balanceType[index].type_name,
|
||||||
value: index
|
value: index
|
||||||
})
|
})
|
||||||
}
|
|
||||||
this.balanceType = typeArr;
|
|
||||||
}
|
}
|
||||||
});
|
this.balanceType = typeArr;
|
||||||
},
|
|
||||||
ontabtap(e) {
|
|
||||||
let index = e.currentTarget.dataset.current;
|
|
||||||
this.orderStatus = this.statusList[index].id;
|
|
||||||
this.$refs.mescroll.refresh();
|
|
||||||
},
|
|
||||||
getData(mescroll) {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/memberaccount/page',
|
|
||||||
data: {
|
|
||||||
page_size: mescroll.size,
|
|
||||||
page: mescroll.num,
|
|
||||||
account_type: 'balance,balance_money',
|
|
||||||
from_type: this.searchType.from_type,
|
|
||||||
date: this.searchType.date,
|
|
||||||
related_id: this.related_id
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
let newArr = [];
|
|
||||||
let msg = res.message;
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
newArr = res.data.list;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: msg
|
|
||||||
});
|
|
||||||
}
|
|
||||||
mescroll.endSuccess(newArr.length);
|
|
||||||
//设置列表数据
|
|
||||||
if (mescroll.num == 1) {
|
|
||||||
this.dataList = []; //如果是第一页需手动制空列表
|
|
||||||
this.related_id = 0;
|
|
||||||
}
|
|
||||||
this.dataList = this.dataList.concat(newArr); //追加新数据
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
mescroll.endErr();
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
toFromDetail(item) {
|
|
||||||
if (item.from_type == 'order' && !isNaN(parseInt(item.type_tag))) {
|
|
||||||
this.$util.redirectTo('/pages_order/detail', {
|
|
||||||
order_id: item.type_tag
|
|
||||||
});
|
|
||||||
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
|
|
||||||
this.$util.redirectTo('/pages_order/detail', {
|
|
||||||
order_id: item.type_tag
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
ontabtap(e) {
|
||||||
|
let index = e.currentTarget.dataset.current;
|
||||||
|
this.orderStatus = this.statusList[index].id;
|
||||||
|
this.$refs.mescroll.refresh();
|
||||||
|
},
|
||||||
|
getData(mescroll) {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/api/memberaccount/page',
|
||||||
|
data: {
|
||||||
|
page_size: mescroll.size,
|
||||||
|
page: mescroll.num,
|
||||||
|
account_type: 'balance,balance_money',
|
||||||
|
from_type: this.searchType.from_type,
|
||||||
|
date: this.searchType.date,
|
||||||
|
related_id: this.related_id
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
let newArr = [];
|
||||||
|
let msg = res.message;
|
||||||
|
if (res.code == 0 && res.data) {
|
||||||
|
newArr = res.data.list;
|
||||||
|
} else {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: msg
|
||||||
|
});
|
||||||
|
}
|
||||||
|
mescroll.endSuccess(newArr.length);
|
||||||
|
//设置列表数据
|
||||||
|
if (mescroll.num == 1) {
|
||||||
|
this.dataList = []; //如果是第一页需手动制空列表
|
||||||
|
this.related_id = 0;
|
||||||
|
}
|
||||||
|
this.dataList = this.dataList.concat(newArr); //追加新数据
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
},
|
||||||
|
fail: res => {
|
||||||
|
mescroll.endErr();
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toFromDetail(item) {
|
||||||
|
if (item.from_type == 'order' && !isNaN(parseInt(item.type_tag))) {
|
||||||
|
this.$util.redirectTo('/pages_order/detail', {
|
||||||
|
order_id: item.type_tag
|
||||||
|
});
|
||||||
|
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
|
||||||
|
this.$util.redirectTo('/pages_order/detail', {
|
||||||
|
order_id: item.type_tag
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.detailed-wrap {
|
.detailed-wrap {
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
|
|
||||||
margin: 24rpx;
|
margin: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
background-color: $color-bg;
|
background-color: $color-bg;
|
||||||
|
|
||||||
view {
|
view {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-left {
|
|
||||||
display: flex;
|
|
||||||
padding-left: 46rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-right {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding-right: 26rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-nav {
|
.tab-left {
|
||||||
width: 100vw;
|
|
||||||
height: 70rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
padding-left: 46rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-right {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding-right: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-nav {
|
||||||
|
width: 100vw;
|
||||||
|
height: 70rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
/* #ifndef APP-PLUS */
|
||||||
|
white-space: nowrap;
|
||||||
|
/* #endif */
|
||||||
|
background: #fff;
|
||||||
|
border-bottom-left-radius: 24rpx;
|
||||||
|
border-bottom-right-radius: 24rpx;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
z-index: 998;
|
||||||
|
|
||||||
|
.uni-tab-item {
|
||||||
|
width: 33.33%;
|
||||||
|
text-align: center;
|
||||||
|
/* #ifndef APP-PLUS */
|
||||||
|
display: inline-block;
|
||||||
|
/* #endif */
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-tab-item-title {
|
||||||
|
color: #555;
|
||||||
|
font-size: $font-size-base;
|
||||||
|
display: block;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
border-bottom: 4rpx solid #fff;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
flex-wrap: nowrap;
|
||||||
/* #ifndef APP-PLUS */
|
/* #ifndef APP-PLUS */
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
background: #fff;
|
|
||||||
border-bottom-left-radius: 24rpx;
|
|
||||||
border-bottom-right-radius: 24rpx;
|
|
||||||
padding-bottom: 30rpx;
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
z-index: 998;
|
|
||||||
|
|
||||||
.uni-tab-item {
|
|
||||||
width: 33.33%;
|
|
||||||
text-align: center;
|
|
||||||
/* #ifndef APP-PLUS */
|
|
||||||
display: inline-block;
|
|
||||||
/* #endif */
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-tab-item-title {
|
|
||||||
color: #555;
|
|
||||||
font-size: $font-size-base;
|
|
||||||
display: block;
|
|
||||||
height: 64rpx;
|
|
||||||
line-height: 64rpx;
|
|
||||||
border-bottom: 4rpx solid #fff;
|
|
||||||
padding: 0 10rpx;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
/* #ifndef APP-PLUS */
|
|
||||||
white-space: nowrap;
|
|
||||||
/* #endif */
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-tab-item-title-active {
|
|
||||||
display: block;
|
|
||||||
height: 64rpx;
|
|
||||||
padding: 0 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
color: transparent;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.balances {
|
.uni-tab-item-title-active {
|
||||||
padding: $margin-both 24rpx;
|
display: block;
|
||||||
// margin: 0 $margin-both;
|
height: 64rpx;
|
||||||
box-sizing: border-box;
|
padding: 0 10rpx;
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
border-bottom: 2rpx solid $color-line;
|
|
||||||
background: #fff;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
border-radius: 24rpx;
|
|
||||||
image {
|
|
||||||
width: 54rpx;
|
|
||||||
height: 54rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
padding-top: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.balances-info {
|
|
||||||
flex: 1;
|
|
||||||
margin-left: 16rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
text {
|
|
||||||
font-size: $font-size-toolbar;
|
|
||||||
line-height: 1;
|
|
||||||
|
|
||||||
&:last-child {}
|
|
||||||
|
|
||||||
&:nth-child(2) {
|
|
||||||
margin-top: $margin-updown;
|
|
||||||
font-size: $font-size-activity-tag;
|
|
||||||
color: $color-tip;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(3) {
|
|
||||||
font-size: $font-size-activity-tag;
|
|
||||||
margin-top: $margin-updown;
|
|
||||||
color: $color-tip;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.balances-num {
|
|
||||||
text {
|
|
||||||
line-height: 1;
|
|
||||||
font-size: $font-size-toolbar;
|
|
||||||
font-weight: 500;
|
|
||||||
color:#09c15f;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty {
|
::-webkit-scrollbar {
|
||||||
width: 100%;
|
width: 0;
|
||||||
height: 500rpx;
|
height: 0;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.balances {
|
||||||
|
padding: $margin-both 24rpx;
|
||||||
|
// margin: 0 $margin-both;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
border-bottom: 2rpx solid $color-line;
|
||||||
|
background: #fff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 54rpx;
|
||||||
|
height: 54rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.balances-info {
|
||||||
|
flex: 1;
|
||||||
|
margin-left: 16rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
|
||||||
|
text {
|
||||||
|
font-size: $font-size-toolbar;
|
||||||
|
line-height: 1;
|
||||||
|
|
||||||
|
&:last-child {}
|
||||||
|
|
||||||
|
&:nth-child(2) {
|
||||||
|
margin-top: $margin-updown;
|
||||||
|
font-size: $font-size-activity-tag;
|
||||||
|
color: $color-tip;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(3) {
|
||||||
|
font-size: $font-size-activity-tag;
|
||||||
|
margin-top: $margin-updown;
|
||||||
|
color: $color-tip;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.balances-num {
|
||||||
|
text {
|
||||||
|
line-height: 1;
|
||||||
|
font-size: $font-size-toolbar;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #09c15f;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty {
|
||||||
|
width: 100%;
|
||||||
|
height: 500rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,19 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="themeColor">
|
<view :style="themeColor">
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh" v-if="storeToken">
|
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh"
|
||||||
|
v-if="storeToken">
|
||||||
<view class="goods_list" slot="list">
|
<view class="goods_list" slot="list">
|
||||||
<block v-if="collectionList.length > 0">
|
<block v-if="collectionList.length > 0">
|
||||||
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index" @click.stop="toDetail(item)">
|
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index"
|
||||||
|
@click.stop="toDetail(item)">
|
||||||
<view class="pic">
|
<view class="pic">
|
||||||
<image :src="$util.img(item.goods_image.split(',')[0], { size: 'mid' })" mode="aspectFill" @error="goodsImageError(index)"></image>
|
<image :src="$util.img(item.goods_image.split(',')[0], { size: 'mid' })" mode="aspectFill"
|
||||||
|
@error="goodsImageError(index)"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods_info">
|
<view class="goods_info">
|
||||||
<view class="goods_name font-size-base">{{ item.sku_name }}</view>
|
<view class="goods_name font-size-base">{{ item.sku_name }}</view>
|
||||||
<view class="goods_opection">
|
<view class="goods_opection">
|
||||||
<view class="left lineheight-clear ">
|
<view class="left lineheight-clear ">
|
||||||
<text class="symbol price-style small">¥</text>
|
<text class="symbol price-style small">¥</text>
|
||||||
<text class="price price-style large">{{ parseFloat(item.discount_price).toFixed(2).split('.')[0] }}</text>
|
<text class="price price-style large">{{
|
||||||
<text class="symbol price-style small">.{{ parseFloat(item.discount_price).toFixed(2).split('.')[1] }}</text>
|
parseFloat(item.discount_price).toFixed(2).split('.')[0] }}</text>
|
||||||
|
<text class="symbol price-style small">.{{
|
||||||
|
parseFloat(item.discount_price).toFixed(2).split('.')[1] }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="cars" @click.stop="deleteItem(item.goods_id)">
|
<view class="cars" @click.stop="deleteItem(item.goods_id)">
|
||||||
@@ -36,57 +41,47 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
import collection from './public/js/collection.js';
|
import collection from './public/js/collection.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
mixins: [collection],
|
||||||
MescrollUni,
|
data() {
|
||||||
// #ifdef MP-WEIXIN
|
return {};
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
},
|
||||||
mixins: [collection],
|
onShow() {
|
||||||
data() {
|
if (this.storeToken) {
|
||||||
return {};
|
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||||
},
|
} else {
|
||||||
onShow() {
|
this.$nextTick(() => {
|
||||||
if (this.storeToken) {
|
this.$refs.login.open('/pages_tool/member/collection');
|
||||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
});
|
||||||
} else {
|
}
|
||||||
this.$nextTick(() => {
|
},
|
||||||
this.$refs.login.open('/pages_tool/member/collection');
|
watch: {
|
||||||
});
|
storeToken: function (nVal, oVal) {
|
||||||
}
|
if (nVal) {
|
||||||
},
|
this.$refs.mescroll.refresh();
|
||||||
watch: {
|
|
||||||
storeToken: function(nVal, oVal) {
|
|
||||||
if (nVal) {
|
|
||||||
this.$refs.mescroll.refresh();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .fixed {
|
/deep/ .fixed {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .empty {
|
/deep/ .empty {
|
||||||
margin-top: 0 !important;
|
margin-top: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import './public/css/collection.scss';
|
@import './public/css/collection.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -70,17 +70,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
type: '',
|
type: '',
|
||||||
|
|||||||
@@ -65,18 +65,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var dateList = [];
|
var dateList = [];
|
||||||
|
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
|
|||||||
@@ -45,17 +45,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
const currentDate = this.getDate({
|
const currentDate = this.getDate({
|
||||||
format: true
|
format: true
|
||||||
|
|||||||
@@ -30,17 +30,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList: []
|
dataList: []
|
||||||
|
|||||||
@@ -28,17 +28,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni,
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList: []
|
dataList: []
|
||||||
|
|||||||
@@ -56,13 +56,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import refundMethod from './public/js/refundMethod.js';
|
import refundMethod from './public/js/refundMethod.js';
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
refundList: [],
|
refundList: [],
|
||||||
|
|||||||
@@ -41,12 +41,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
MescrollUni
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
orderList: []
|
orderList: []
|
||||||
|
|||||||
@@ -11,16 +11,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
src: ''
|
src: ''
|
||||||
|
|||||||
@@ -1,8 +1,24 @@
|
|||||||
|
const { zionUniMpLoadPackagePlugin } = require('zion-uniapp-mp-load-package/webpack');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
configureWebpack: config => {
|
configureWebpack: config => {
|
||||||
console.log('开始尝试配置极限压缩');
|
console.log('开始尝试配置极限压缩');
|
||||||
|
|
||||||
|
// 配置zion-uniapp-mp-load-package插件
|
||||||
|
config.plugins.push(new zionUniMpLoadPackagePlugin({
|
||||||
|
optimization: {
|
||||||
|
minimize: true,
|
||||||
|
moduleIds: 'named'
|
||||||
|
},
|
||||||
|
packages: [
|
||||||
|
'pages',
|
||||||
|
'pages_tool',
|
||||||
|
'pages_goods',
|
||||||
|
'pages_order',
|
||||||
|
'pages_promotion'
|
||||||
|
]
|
||||||
|
}));
|
||||||
|
|
||||||
// 确保minimizer数组存在
|
// 确保minimizer数组存在
|
||||||
if (config.optimization && config.optimization.minimizer && Array.isArray(config.optimization.minimizer)) {
|
if (config.optimization && config.optimization.minimizer && Array.isArray(config.optimization.minimizer)) {
|
||||||
// 查找TerserWebpackPlugin实例,而不是依赖索引
|
// 查找TerserWebpackPlugin实例,而不是依赖索引
|
||||||
@@ -65,6 +81,8 @@ module.exports = {
|
|||||||
sourceMap: false // 不生成source map
|
sourceMap: false // 不生成source map
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log('配置极限压缩完成');
|
console.log('配置极限压缩完成');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user