Compare commits

..

47 Commits
main ... main

Author SHA1 Message Date
sunday 9b5d11565b . 2024-10-03 20:44:35 +08:00
liqianjin 5931f2021d 【修复】详情 2023-04-21 18:30:12 +08:00
liqianjin 0a99f8c817 【修复】卖家
【修复】手机绑定
2023-04-20 17:16:25 +08:00
zoomtk@126.com 08a53d7359 xx 2023-04-20 15:20:26 +08:00
liqianjin c73a175145 Merge remote-tracking branch 'origin/main' 2023-04-07 19:08:48 +08:00
liqianjin cfe8d241b6 【修复】提货增加收获地址 2023-04-07 19:08:12 +08:00
zoomtk@126.com 77bdec78a7 g 2023-04-07 17:25:20 +08:00
zoomtk@126.com b29428ffdb 更新前端 2023-04-07 17:00:02 +08:00
liqianjin 550a129818 【修复】资讯页打不开 2023-04-04 11:34:55 +08:00
liqianjin 8f97cd259e 【修改】2023/4/1 2023-04-01 18:06:29 +08:00
zoomtk@126.com 5723718895 更新 2023-04-01 13:14:58 +08:00
wuhui_zzw 8b5fc7b5b9 优化 2023-03-23 18:32:07 +08:00
wuhui_zzw 400318c574 修复:在ios端登录弹框底部被遮挡部分内容
修复:注册时可能获取不到openid的问题
2023-03-23 18:29:34 +08:00
liqianjin 7827320707 【修复】首页分页未清空 2023-03-23 18:05:54 +08:00
wuhui_zzw a991e89a2b 修复:注册协议不能上下滑动的问题 2023-03-23 13:57:57 +08:00
wuhui_zzw 83ad7e9900 优化:登录弹框样式优化 2023-03-22 14:31:31 +08:00
wuhui_zzw 63d9b3bf86 优化:文章页面样式错误,间距不一致
修复:消息中心查看详情是乱的
修复:会员中心代理申请点进去一直转圈圈
优化:会员中心信息上方空白太多
2023-03-21 13:56:43 +08:00
wuhui_zzw 7970a355ef Merge remote-tracking branch 'origin/main' 2023-03-20 19:20:10 +08:00
wuhui_zzw 16f74331d4 优化:处理主包过大的问题;将秒杀相关内容移入rush包中,并且将主包的order内容移入rush包中。将部分仅某个分包使用的组件全部放入对应的分包中 2023-03-20 19:19:58 +08:00
liqianjin 526122e421 【修改】首页按钮颜色 2023-03-07 16:36:50 +08:00
wuhui_zzw 067f0cb3d1 商品详情显示赠送的钻石数量 2023-03-07 15:58:01 +08:00
wuhui_zzw 3971527e60 优化:我的订单列表 状态优化
优化:会员中心-我的小店-违规次数样式优化
优化:未开始和无商品状态的页面样式优化
2023-03-07 15:33:58 +08:00
wuhui_zzw e248b528c5 文章列表兼容小程序
添加vant小程序相关组件
2023-03-07 11:16:25 +08:00
wuhui_zzw 3e66ed6f96 部分样式兼容微信小程序优化 2023-03-06 11:21:35 +08:00
wuhui_zzw b51bc0c067 添加:消息添加留言回复 2023-03-06 10:40:31 +08:00
wuhui_zzw 644dc2012d 添加:消息相关接口对接 2023-03-04 16:35:32 +08:00
liqianjin 992bb55fa6 【修改】兑换券改积分,消费券改余额 2023-03-04 15:42:40 +08:00
wuhui_zzw 74919a62fc 修复:发布商品判断错误 2023-03-04 15:18:43 +08:00
wuhui_zzw 9455e4b5ad 优化:发布商品弹框添加服务费、实际收入、建议售价显示 2023-03-04 11:42:52 +08:00
wuhui_zzw 3dbb3102ea 优化:订单发布后跳转到我的售出订单列表
优化:订单列表已售出状态样式更改,增加圆角背景,取消上方选项卡
优化:未到秒杀时间页面banner要显示,不显示产品
2023-03-04 09:39:17 +08:00
wuhui_zzw 6f14e821c7 添加违规信息,
对接订单详情,订单发布,下架,收货信息。
2023-03-03 17:48:47 +08:00
liqianjin 543f7714a2 【修复】订单详情页 2023-03-03 15:27:36 +08:00
wuhui_zzw 162e031f7c 订单列表完成 2023-03-03 14:17:35 +08:00
liqianjin d5bdf7c2b9 【增加】首页diy 2023-03-03 13:39:03 +08:00
liqianjin ab8316cabb 【增加】文章tabbar 2023-03-03 11:51:53 +08:00
liqianjin 6710b2de4c 【增加】首页diy
【增加】下单页更新
2023-03-03 11:43:02 +08:00
liqianjin 4cd2cd308d 【增加】首页diy
【增加】下单页更新
2023-03-03 11:37:44 +08:00
wuhui_zzw 17289e08a2 添加:安装新的uni官方组件
对接秒杀列表、秒杀商品详情数据
2023-03-03 10:42:22 +08:00
wuhui_zzw 9417a6fa7e 我的小店页面完成 2023-03-01 12:02:50 +08:00
wuhui_zzw 2cf76eb3e7 秒杀商品详情页面完成 2023-02-28 17:40:56 +08:00
wuhui_zzw 0ddf87dd7f 秒杀商品列表页面样式完成 2023-02-28 09:50:49 +08:00
wuhui_zzw 3eb2395bec 分销商申请升级 2023-02-27 14:29:34 +08:00
wuhui_zzw 14089b377b 分销商申请升级 2023-02-27 10:58:24 +08:00
wuhui_zzw 37f778f24f Merge remote-tracking branch 'origin/main'
# Conflicts:
#	main.js
#	node_modules/jweixin-module/package.json
#	package-lock.json
#	pages.json
#	pages_promotion/fenxiao/index.vue
2023-02-24 14:56:29 +08:00
wuhui_zzw 9ac15f7f89 注释vant的使用 2023-02-24 14:55:48 +08:00
wuhui_zzw ea610f725a 添加:文章插件相关内容
添加:兼容vant2版本内容
2023-02-24 11:33:45 +08:00
wuhui_zzw 30a0d2979c 添加:注册流程重构,未注册不能直接登录,必须进行注册流程,注册前必须填写承诺书并且同意。 2023-02-22 13:55:56 +08:00
363 changed files with 17093 additions and 3549 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/unpackage /unpackage
/.hbuilderx /.hbuilderx
/.idea /.idea
/node_modules/

13
App.vue
View File

@ -1,12 +1,10 @@
<script> <script>
import auth from 'common/js/auth.js'; import auth from 'common/js/auth.js';
import { Weixin } from 'common/js/wx-jssdk.js'; import { Weixin } from 'common/js/wx-jssdk.js';
export default { export default {
mixins: [auth], mixins: [auth],
onLaunch: function() { onLaunch: function() {
uni.hideTabBar(); uni.hideTabBar();
// #ifdef MP // #ifdef MP
const updateManager = uni.getUpdateManager(); const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function(res) { updateManager.onCheckForUpdate(function(res) {
@ -30,13 +28,11 @@ export default {
// //
}); });
// #endif // #endif
// #ifdef H5 // #ifdef H5
if (uni.getSystemInfoSync().platform == 'ios') { if (uni.getSystemInfoSync().platform == 'ios') {
uni.setStorageSync('initUrl', location.href); uni.setStorageSync('initUrl', location.href);
} }
// #endif // #endif
uni.onNetworkStatusChange(function(res) { uni.onNetworkStatusChange(function(res) {
if (!res.isConnected) { if (!res.isConnected) {
uni.showModal({ uni.showModal({
@ -46,9 +42,7 @@ export default {
}); });
} }
}); });
this.$store.dispatch('init'); this.$store.dispatch('init');
// #ifdef H5 // #ifdef H5
// //
if (!uni.getStorageSync('token')) { if (!uni.getStorageSync('token')) {
@ -88,7 +82,6 @@ export default {
if (this.$util.isWeiXin()) { if (this.$util.isWeiXin()) {
this.$util.getUrlCode(urlParams => { this.$util.getUrlCode(urlParams => {
if (urlParams.source_member) uni.setStorageSync('source_member', urlParams.source_member); if (urlParams.source_member) uni.setStorageSync('source_member', urlParams.source_member);
if (urlParams.code == undefined) { if (urlParams.code == undefined) {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/wechat/api/wechat/authcode', url: '/wechat/api/wechat/authcode',
@ -170,7 +163,6 @@ export default {
if (res.code == 0) { if (res.code == 0) {
var wxJS = new Weixin(); var wxJS = new Weixin();
wxJS.init(res.data.jssdk_config); wxJS.init(res.data.jssdk_config);
let share_data = JSON.parse(JSON.stringify(res.data.share_config.data)); let share_data = JSON.parse(JSON.stringify(res.data.share_config.data));
if (share_data) { if (share_data) {
wxJS.setShareData( wxJS.setShareData(
@ -185,10 +177,8 @@ export default {
} }
); );
} }
let hideOptionMenu = res.data.share_config.permission.hideOptionMenu; let hideOptionMenu = res.data.share_config.permission.hideOptionMenu;
let hideMenuItems = res.data.share_config.permission.hideMenuItems; let hideMenuItems = res.data.share_config.permission.hideMenuItems;
if (hideOptionMenu) { if (hideOptionMenu) {
wxJS.weixin.hideOptionMenu(); // wxJS.weixin.hideOptionMenu(); //
} else { } else {
@ -218,4 +208,7 @@ export default {
@import './common/css/iconfont.css'; @import './common/css/iconfont.css';
@import './common/css/icondiy.css'; // @import './common/css/icondiy.css'; //
@import './common/css/icon/extend.css'; // @import './common/css/icon/extend.css'; //
// #ifdef MP-WEIXIN
@import '/wxcomponents/@vant/weapp/common/index.wxss';
// #endif
</style> </style>

View File

@ -480,8 +480,8 @@ uni-slider .uni-slider-track {
} }
} }
// ***************消费券*************** // ***************余额***************
// 消费券背景色渐变 // 余额背景色渐变
.balance-wrap { .balance-wrap {
// background: linear-gradient(to right, $base-color, mix($base-color, #fff, 70%)) !important; // background: linear-gradient(to right, $base-color, mix($base-color, #fff, 70%)) !important;
} }

View File

@ -37,7 +37,7 @@ export default {
}, },
fail: () => { fail: () => {
this.$util.showToast({ this.$util.showToast({
title: '请求失败' title: '登录请求失败'
}); });
} }
}) })

124
common/js/checkUpdater.js Normal file
View File

@ -0,0 +1,124 @@
import Config from './config.js';
export function checkUpdater(currentId, updaterPage) {
uni.request({
url: Config.baseUrl+'/api/version/id',
method: 'GET',
data: {
search: 'latestId'
},
success: res => {
if (res.statusCode === 200) {
const response = res.data
const latestId = response.latest.id
const method = response.latest.method
if (!latestId) {
console.log('当前没有发行版本')
} else if (currentId != latestId && method === 'force') {
console.log('确认强制更新,正在取得地址')
// 如果需要背地(静默)热更新,获取下载地址
uni.request({
url: Config.baseUrl+'/api/version/info',
method: 'GET',
data: {
search: 'latestInfo'
},
success: (res) => {
if (res.statusCode === 200) {
console.log('地址请求成功')
const response = res.data
const iosLink = response.latest.info.iosLink
const androidLink = response.latest.info.androidLink
let downloadLink = ''
let ready = false
// 判断系统类型
if (plus.os.name.toLowerCase() === 'android') {
console.log('安卓系统')
if (androidLink && androidLink !== '#') { // 我这里默认#也是没有地址,请根据业务自行修改
console.log('发现下载地址')
// 安卓:创建下载任务
if (androidLink.match(RegExp(/.wgt/))) {
console.log('确认wgt热更新包')
downloadLink = androidLink
ready = true
} else {
console.log('安卓推荐.wgt强制更新.apk的强制更新请您自行修改程序')
}
} else {
console.log('下载地址是空的,无法继续')
}
} else {
console.log('苹果系统')
if (iosLink && iosLink !== '#') { // 我这里默认#也是没有地址,请根据业务自行修改
console.log('发现下载地址')
// 苹果(A)进行热更新如果iosLink是wgt更新包的下载地址判断文件名中是否含有.wgt
if (iosLink.match(RegExp(/.wgt/))) {
console.log('确认wgt热更新包')
downloadLink = iosLink
ready = true
} else {
console.log('苹果只支持.wgt强制更新')
}
} else {
console.log('下载地址是空的,无法继续')
}
}
if (ready) {
console.log('任务开始')
let downloadTask = uni.downloadFile({
url: downloadLink,
success: (res) => {
if (res.statusCode === 200) {
// 保存下载的安装包
console.log('保存安装包')
uni.saveFile({
tempFilePath: res.tempFilePath,
success: (res) => {
const packgePath = res.savedFilePath
// 保存更新记录到stroage下次启动app时安装更新
uni.setStorage({
key: 'updated',
data: {
completed: false,
packgePath: packgePath
},
success: () => {
console.log('成功保存记录')
}
})
// 任务完成,关闭下载任务
console.log('任务完成,关闭下载任务,下一次启动应用时将安装更新')
downloadTask.abort()
downloadTask = null
}
})
}
}
})
} else {
console.log('下载地址未准备,无法开启下载任务')
}
}
}
})
} else if (currentId != latestId) {
console.log('检测到更新')
uni.showModal({
title: '发现新版本',
content: '有新版本可用 (版本id:' + latestId + '),请问您是否更新?',
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url: updaterPage
})
} else if (res.cancel) {
console.log('取消')
}
}
})
} else {
console.log('现在是最新版本')
}
}
}
})
}

View File

@ -1,14 +1,14 @@
var config = { var config = {
// api请求地址 // api请求地址
baseUrl: 'https://zyhj.zoomtk.com/', baseUrl: 'https://miaogou.cdlfjy.com/',
// 图片域名 // 图片域名
imgDomain: 'https://zyhj.zoomtk.com/', imgDomain: 'https://miaogou.cdlfjy.com/',
// H5端域名 // H5端域名
h5Domain: 'https://zyhj.zoomtk.com/', h5Domain: 'https://miaogou.cdlfjy.com/',
// 腾讯地图key // 腾讯地图key
mpKey: '', mpKey: '',
//客服地址 //客服地址
webSocket : 'https://zyhj.zoomtk.com/', webSocket : 'wss://miaogou.cdlfjy.com',
//本地端主动给服务器ping的时间, 0 则不开启 , 单位秒 //本地端主动给服务器ping的时间, 0 则不开启 , 单位秒
pingInterval: 1500 pingInterval: 1500
}; };

View File

@ -1,5 +1,4 @@
import WxMap from 'common/js/map-wx-jssdk.js'; import WxMap from 'common/js/map-wx-jssdk.js';
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
export default { export default {
data() { data() {
@ -44,9 +43,7 @@ export default {
uni.hideTabBar(); uni.hideTabBar();
this.name = data.name || ''; this.name = data.name || '';
this.isDefault = data.is_default || ''; this.isDefault = data.is_default || '';
if (data.source_member) uni.setStorageSync('source_member', data.source_member); if (data.source_member) uni.setStorageSync('source_member', data.source_member);
// 小程序扫码进入 // 小程序扫码进入
if (data.scene) { if (data.scene) {
var sceneParams = decodeURIComponent(data.scene); var sceneParams = decodeURIComponent(data.scene);

42
common/js/uni-copy.js Normal file
View File

@ -0,0 +1,42 @@
export default function uniCopy({content,success,error}) {
if(!content) return error('复制的内容不能为空 !')
content = typeof content === 'string' ? content : content.toString() // 复制内容,必须字符串,数字需要转换为字符串
/**
* 小程序端 app端的复制逻辑
*/
//#ifndef H5
uni.setClipboardData({
data: content,
success: function() {
success("复制成功~")
console.log('success');
},
fail:function(){
success("复制失败~")
}
});
//#endif
/**
* H5端的复制逻辑
*/
// #ifdef H5
if (!document.queryCommandSupported('copy')) { //为了兼容有些浏览器 queryCommandSupported 的判断
// 不支持
error('浏览器不支持')
}
let textarea = document.createElement("textarea")
textarea.value = content
textarea.readOnly = "readOnly"
document.body.appendChild(textarea)
textarea.select() // 选择对象
textarea.setSelectionRange(0, content.length) //核心
let result = document.execCommand("copy") // 执行浏览器复制命令
if(result){
success("复制成功~")
}else{
error("复制失败请检查h5中调用该方法的方式是不是用户点击的方式调用的如果不是请改为用户点击的方式触发该方法因为h5中安全性不能js直接调用")
}
textarea.remove()
// #endif
}

1439
common/js/uqrcode.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@ import Http from './http.js'
import { import {
Weixin Weixin
} from 'common/js/wx-jssdk.js'; } from 'common/js/wx-jssdk.js';
import validate from "./validate";
export default { export default {
/** /**
@ -896,5 +897,30 @@ export default {
return { return {
'bezier_points': bezier_points 'bezier_points': bezier_points
}; };
} },
/**
* 表单验证
* @param data 表单数据(array)
* @param rule 自定义验证规则array
* @returns {Promise<unknown>}
*/
verify(data,rule = []) {
let defaultRule = [];
// 如果存在自定义内容则合并
if(Object.keys(rule).length > 0)defaultRule.push(...rule);
// 验证结果
return new Promise((resolve, reject) => {
let checkRes = validate.check(data, defaultRule);
if (checkRes) {
resolve(data)
} else {
this.showToast({title: validate.error});
reject(validate);
}
});
},
} }

View File

@ -0,0 +1,413 @@
<template>
<view>
<view @touchmove.prevent.stop>
<uni-popup ref="bindMobile" :custom="true" :mask-click="true">
<view class="bind-wrap">
<!-- #ifdef H5 -->
<view class="head color-base-bg">检测到您还未绑定手机请立即绑定您的手机号</view>
<view class="form-wrap">
<view class="label">手机号码</view>
<view class="form-item"><input type="number" placeholder="请输入您的手机号码" v-model="formData.mobile" /></view>
<block v-if="captchaConfig">
<view class="label">验证码</view>
<view class="form-item">
<input type="number" placeholder="请输入验证码" v-model="formData.vercode" />
<image :src="captcha.img" class="captcha" @click="getCaptcha"></image>
</view>
</block>
<view class="label">动态码</view>
<view class="form-item">
<input type="number" placeholder="请输入动态码" v-model="formData.dynacode" />
<view class="send color-base-text" @click="sendMobileCode">{{ dynacodeData.codeText }}</view>
</view>
</view>
<view class="footer">
<view @click="cancel">取消</view>
<view class="color-base-text" @click="confirm">确定</view>
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-BAIDU -->
<view class="bind-tip-icon"><image :src="$util.img('public/picture/member/login.png')" mode="widthFix"></image></view>
<view class="bind-tips">为了方便您接收订单等信息需要绑定您的手机号码</view>
<button open-type="getPhoneNumber" class="auth-login ns-btn-default-all color-base-bg" @getphonenumber="mobileAuthLogin"><text>点击绑定手机号码</text></button>
<!-- #endif -->
</view>
</uni-popup>
</view>
<register-reward ref="registerReward"></register-reward>
</view>
</template>
<script>
import uniPopup from '../uni-popup/uni-popup.vue';
import validate from 'common/js/validate.js';
import registerReward from '../register-reward/register-reward.vue';
export default {
name: 'bind-mobile',
components: {
uniPopup,
registerReward
},
mixins: [validate],
data() {
return {
captchaConfig: 0,
captcha: {
id: '',
img: ''
},
dynacodeData: {
seconds: 120,
timer: null,
codeText: '获取动态码',
isSend: false
},
formData: {
key: '',
mobile: '',
vercode: '',
dynacode: ''
},
isSub: false
};
},
created() {
this.getCaptchaConfig();
},
methods: {
open() {
this.$refs.bindMobile.open();
},
cancel() {
this.$refs.bindMobile.close();
},
confirm() {
let authData = uni.getStorageSync('authInfo');
let data = {
mobile: this.formData.mobile,
key: this.formData.key,
code: this.formData.dynacode
};
if (this.captcha.id != '') {
data.captcha_id = this.captcha.id;
data.captcha_code = this.formData.vercode;
}
if (authData) Object.assign(data, authData);
if (authData.avatarUrl) data.headimg = authData.avatarUrl;
if (authData.nickName) data.nickname = authData.nickName;
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
if (this.verify(data)) {
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url: '/api/tripartite/mobile',
data,
success: res => {
if (res.code >= 0) {
uni.setStorage({
key: 'token',
data: res.data.token,
success: () => {
this.$store.commit('setToken', res.data.token);
this.$store.dispatch('getCartNumber');
}
});
this.$refs.bindMobile.close();
if (res.data.is_register && this.$refs.registerReward.getReward()) {
this.$refs.registerReward.open();
}
} else {
this.isSub = false;
this.getCaptcha();
this.$util.showToast({ title: res.message });
}
},
fail: res => {
this.isSub = false;
this.getCaptcha();
}
});
}
},
/**
* 表单验证
* @param {Object} data
*/
verify(data) {
let rule = [{ name: 'mobile', checkType: 'required', errorMsg: '请输入手机号' }, { name: 'mobile', checkType: 'phoneno', errorMsg: '请输入正确的手机号' }];
if (this.captchaConfig == 1) {
if (this.captcha.id != '') rule.push({ name: 'captcha_code', checkType: 'required', errorMsg: this.$lang('captchaPlaceholder') });
}
rule.push({ name: 'code', checkType: 'required', errorMsg: this.$lang('dynacodePlaceholder') });
var checkRes = validate.check(data, rule);
if (checkRes) {
return true;
} else {
this.$util.showToast({ title: validate.error });
return false;
}
},
/**
* 获取验证码配置
*/
getCaptchaConfig() {
this.$api.sendRequest({
url: '/api/config/getCaptchaConfig',
success: res => {
if (res.code >= 0) {
this.captchaConfig = res.data.data.value.shop_reception_login;
if (this.captchaConfig) this.getCaptcha();
}
}
});
},
/**
* 获取验证码
*/
getCaptcha() {
this.$api.sendRequest({
url: '/api/captcha/captcha',
data: {
captcha_id: this.captcha.id
},
success: res => {
if (res.code >= 0) {
this.captcha = res.data;
this.captcha.img = this.captcha.img.replace(/\r\n/g, '');
}
}
});
},
/**
* 发送手机动态码
*/
sendMobileCode() {
if (this.dynacodeData.seconds != 120) return;
var data = {
mobile: this.formData.mobile,
captcha_id: this.captcha.id,
captcha_code: this.formData.vercode
};
var rule = [{ name: 'mobile', checkType: 'required', errorMsg: '请输入手机号' }, { name: 'mobile', checkType: 'phoneno', errorMsg: '请输入正确的手机号' }];
if (this.captchaConfig == 1) {
rule.push({ name: 'captcha_code', checkType: 'required', errorMsg: '请输入验证码' });
}
var checkRes = validate.check(data, rule);
if (!checkRes) {
this.$util.showToast({ title: validate.error });
return;
}
if (this.dynacodeData.isSend) return;
this.dynacodeData.isSend = true;
if (this.dynacodeData.seconds == 120) {
this.dynacodeData.timer = setInterval(() => {
this.dynacodeData.seconds--;
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
}, 1000);
}
this.$api.sendRequest({
url: '/api/tripartite/mobileCode',
data: data,
success: res => {
this.dynacodeData.isSend = false;
if (res.code >= 0) {
this.formData.key = res.data.key;
} else {
this.$util.showToast({ title: res.message });
thi.refreshDynacodeData();
}
},
fail: () => {
this.$util.showToast({ title: 'request:fail' });
this.dynacodeData.isSend = false;
}
});
},
mobileAuthLogin(e) {
if (e.detail.errMsg == 'getPhoneNumber:ok') {
let authData = uni.getStorageSync('authInfo');
var data = {
iv: e.detail.iv,
encryptedData: e.detail.encryptedData
};
if (authData) Object.assign(data, authData);
if (authData.avatarUrl) data.headimg = authData.avatarUrl;
if (authData.nickName) data.nickname = authData.nickName;
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url: '/api/tripartite/mobileauth',
data,
success: res => {
if (res.code >= 0) {
uni.setStorage({
key: 'token',
data: res.data.token,
success: () => {
this.$store.dispatch('getCartNumber');
this.$store.commit('setToken', res.data.token);
}
});
this.$refs.bindMobile.close();
if (res.data.is_register && this.$refs.registerReward.getReward()) {
this.$refs.registerReward.open();
}
} else {
this.isSub = false;
this.$util.showToast({ title: res.message });
}
},
fail: res => {
this.isSub = false;
this.$util.showToast({ title: 'request:fail' });
}
});
}
},
refreshDynacodeData() {
this.getCaptcha();
clearInterval(this.dynacodeData.timer);
this.dynacodeData = {
seconds: 120,
timer: null,
codeText: '获取动态码',
isSend: false
};
}
},
watch: {
'dynacodeData.seconds': {
handler(newValue, oldValue) {
if (newValue == 0) {
this.refreshDynacodeData();
}
},
immediate: true,
deep: true
}
}
};
</script>
<style lang="scss">
.bind-wrap {
width: 600rpx;
background: #fff;
box-sizing: border-box;
border-radius: 20rpx;
overflow: hidden;
.head {
text-align: center;
height: 90rpx;
line-height: 90rpx;
color: #fff;
font-size: $font-size-tag;
}
.form-wrap {
padding: 30rpx 40rpx;
.label {
color: #000;
font-size: $font-size-base;
line-height: 1.3;
}
.form-item {
margin: 20rpx 0;
display: flex;
padding-bottom: 10rpx;
border-bottom: 2rpx solid #eee;
align-items: center;
input {
font-size: $font-size-tag;
flex: 1;
}
.send {
font-size: $font-size-tag;
line-height: 1;
}
.captcha {
margin: 4rpx;
height: 52rpx;
width: 140rpx;
}
}
}
.footer {
border-top: 2rpx solid #eee;
display: flex;
view {
flex: 1;
height: 100rpx;
line-height: 100rpx;
text-align: center;
&:first-child {
font-size: 28rpx;
border-right: 2rpx solid #eee;
}
}
}
.bind-tips {
color: #aaa;
font-size: $font-size-base;
padding: 20rpx 50rpx;
text-align: center;
}
.auth-login {
width: calc(100% - 100rpx);
margin: 20rpx auto 50rpx auto;
height: 80rpx;
line-height: 80rpx;
border-radius: 80rpx;
}
.bind-tip-icon {
padding-top: 80rpx;
width: 100%;
text-align: center;
image {
width: 300rpx;
}
}
}
.ns-btn-default-all {
width: 100%;
height: 70rpx;
border-radius: $border-radius;
text-align: center;
line-height: 70rpx;
color: #ffffff;
font-size: $font-size-base;
}
</style>
<style scoped>
/deep/ .reward-popup .uni-popup__wrapper-box {
background: none !important;
max-width: unset !important;
max-height: unset !important;
overflow: unset !important;
}
</style>

View File

@ -6,8 +6,7 @@
:style="{ :style="{
'padding-top': menuButtonBounding.top + 'px', 'padding-top': menuButtonBounding.top + 'px',
height: menuButtonBounding.height + 'px' height: menuButtonBounding.height + 'px'
}" }">
>
<view class="navbar-title">确认订单</view> <view class="navbar-title">确认订单</view>
</view> </view>
<view class="payment-navbar-block" :style="{ height: menuButtonBounding.bottom + 'px' }"></view> <view class="payment-navbar-block" :style="{ height: menuButtonBounding.bottom + 'px' }"></view>
@ -24,8 +23,7 @@
:class="{ active: item.name == orderCreateData.delivery.delivery_type }" :class="{ active: item.name == orderCreateData.delivery.delivery_type }"
v-for="(item, index) in goodsData.express_type" v-for="(item, index) in goodsData.express_type"
:key="index" :key="index"
@click="selectDeliveryType(item)" @click="selectDeliveryType(item)">
>
{{ item.title }} {{ item.title }}
<!-- 外圆角 --> <!-- 外圆角 -->
<view class="out-radio"></view> <view class="out-radio"></view>
@ -166,9 +164,7 @@
v-if=" v-if="
orderCreateData.delivery && orderCreateData.delivery &&
goodsItem.support_trade_type && goodsItem.support_trade_type &&
goodsItem.support_trade_type.indexOf(orderCreateData.delivery.delivery_type) == -1 goodsItem.support_trade_type.indexOf(orderCreateData.delivery.delivery_type) == -1">
"
>
<text class="iconfont icon-gantanhao"></text> <text class="iconfont icon-gantanhao"></text>
<text>该商品不支持{{ orderCreateData.delivery.delivery_type_name }}</text> <text>该商品不支持{{ orderCreateData.delivery.delivery_type_name }}</text>
</view> </view>
@ -203,8 +199,7 @@
<view <view
class="member-goods-card order-cell" class="member-goods-card order-cell"
v-if="calculateGoodsData && calculateGoodsData.goods_list[goodsIndex].member_card_list" v-if="calculateGoodsData && calculateGoodsData.goods_list[goodsIndex].member_card_list"
@click="selectMemberGoodsCard(goodsIndex)" @click="selectMemberGoodsCard(goodsIndex)">
>
<text class="tit">次卡抵扣</text> <text class="tit">次卡抵扣</text>
<view class="box text-overflow"> <view class="box text-overflow">
<block v-if="calculateGoodsData.goods_list[goodsIndex].card_promotion_money"> <block v-if="calculateGoodsData.goods_list[goodsIndex].card_promotion_money">
@ -230,33 +225,26 @@
</view> </view>
</view> </view>
<view class="site-wrap buyer-message"> <view class="site-wrap buyer-message" v-if="createDataKey !== 'futuresOrderCreateData'">
<view class="order-cell"> <!-- <view class="order-cell">
<text class="tit">买家留言</text> <text class="tit">买家留言</text>
<view class="box text-overflow " @click="openPopup('buyerMessagePopup')"> <view class="box text-overflow " @click="openPopup('buyerMessagePopup')">
<text v-if="orderCreateData.buyer_message">{{ orderCreateData.buyer_message }}</text> <text v-if="orderCreateData.buyer_message">{{ orderCreateData.buyer_message }}</text>
<text class="color-sub" v-else>无留言</text> <text class="color-sub" v-else>无留言</text>
</view> </view>
<text class="iconfont icon-right"></text> <text class="iconfont icon-right"></text>
</view> </view> -->
</view> </view>
<view v-if="paymentData.system_form" class="system-form-wrap"> <view v-if="paymentData.system_form" class="system-form-wrap">
<view class="order-cell"> <view class="order-cell">
<text class="tit">{{ paymentData.system_form.form_name }}</text> <text class="tit">{{ paymentData.system_form.form_name }}</text>
</view> </view>
<ns-form :data="paymentData.system_form.json_data" ref="form"></ns-form> <ns-form :data="paymentData.system_form.json_data" ref="form"></ns-form>
</view> </view>
<view <view
class="site-wrap" class="site-wrap" v-if="(calculateGoodsData && calculateGoodsData.coupon_list && calculateGoodsData.coupon_list.length) ||
v-if=" promotionInfo ||(calculateGoodsData && calculateGoodsData.max_usable_point > 0) ||
(calculateGoodsData && calculateGoodsData.coupon_list && calculateGoodsData.coupon_list.length) || goodsData.invoice">
promotionInfo ||
(calculateGoodsData && calculateGoodsData.max_usable_point > 0) ||
goodsData.invoice
"
>
<view class="site-footer"> <view class="site-footer">
<view class="order-cell coupon" v-if="calculateGoodsData && calculateGoodsData.coupon_list && calculateGoodsData.coupon_list.length"> <view class="order-cell coupon" v-if="calculateGoodsData && calculateGoodsData.coupon_list && calculateGoodsData.coupon_list.length">
<text class="tit">优惠券</text> <text class="tit">优惠券</text>
@ -279,7 +267,7 @@
</view> </view>
<view class="order-cell point" v-if="calculateGoodsData && calculateGoodsData.max_usable_point > 0"> <view class="order-cell point" v-if="calculateGoodsData && calculateGoodsData.max_usable_point > 0">
<text class="tit"> <text class="tit">
<text>使用{{ parseInt(calculateGoodsData.max_usable_point) }}兑换券可抵扣</text> <text>使用{{ parseInt(calculateGoodsData.max_usable_point) }}积分可抵扣</text>
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text> <text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
<text class="money price-font">{{ calculateData.point_money | moneyFormat }}</text> <text class="money price-font">{{ calculateData.point_money | moneyFormat }}</text>
</text> </text>
@ -298,7 +286,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="site-wrap box member-card-wrap" v-if="paymentData.recommend_member_card"> <view class="site-wrap box member-card-wrap" v-if="paymentData.recommend_member_card">
<view class="head" @click="selectMemberCard"> <view class="head" @click="selectMemberCard">
<text class="iconfont icon-huiyuan"></text> <text class="iconfont icon-huiyuan"></text>
@ -327,7 +314,7 @@
<!-- 订单金额 --> <!-- 订单金额 -->
<template v-if="calculateData"> <template v-if="calculateData">
<view class="order-money"> <view class="order-money" v-if="createDataKey !== 'futuresOrderCreateData'">
<view class="order-cell"> <view class="order-cell">
<text class="tit">商品金额</text> <text class="tit">商品金额</text>
<view class="box"> <view class="box">
@ -379,7 +366,7 @@
</view> </view>
</view> </view>
<view class="order-cell" v-if="calculateData.point_money > 0"> <view class="order-cell" v-if="calculateData.point_money > 0">
<text class="tit">兑换券抵扣</text> <text class="tit">积分抵扣</text>
<view class="box color-base-text"> <view class="box color-base-text">
<text class="operator">-</text> <text class="operator">-</text>
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text> <text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
@ -396,6 +383,52 @@
</view> </view>
</view> </view>
<view class="order-money" v-if="createDataKey === 'futuresOrderCreateData'">
<view class="order-cell">
<text class="tit">售卖价格</text>
<view class="box">
<text class="unit color-title price-font">{{ $lang('common.currencySymbol') }}</text>
<text class="money color-title price-font">{{ calculateData.futures_info.market_price * calculateData.futures_info.total | moneyFormat }}</text>
</view>
</view>
</view>
<view class="order-money" v-if="createDataKey === 'futuresOrderCreateData'">
<view class="order-cell">
<text class="tit">采购价格</text>
<view class="box">
<text class="unit color-title price-font">{{ $lang('common.currencySymbol') }}</text>
<text class="money color-title price-font" style="color: red !important;">{{ calculateData.goods_money | moneyFormat }}</text>
</view>
</view>
</view>
<view class="order-money" v-if="createDataKey === 'futuresOrderCreateData'">
<view class="order-cell">
<text class="tit">采购数量</text>
<view class="box">
<!-- <text class="unit color-title price-font">{{ $lang('common.currencySymbol') }}</text>-->
<text class="money color-title price-font">{{ calculateData.futures_info.total }}</text>
</view>
</view>
</view>
<view class="order-money" v-if="createDataKey === 'futuresOrderCreateData'">
<view class="order-cell">
<text class="tit">销售商</text>
<view class="box">
<!-- <text class="unit color-title price-font">{{ $lang('common.currencySymbol') }}</text>-->
<text class="money color-title price-font">{{ calculateData.futures_info.seller_nickname }}</text>
</view>
</view>
</view>
<view class="order-money" v-if="createDataKey === 'futuresOrderCreateData'">
<view class="order-cell">
<text class="tit">订单时间</text>
<view class="box">
<!-- <text class="unit color-title price-font">{{ $lang('common.currencySymbol') }}</text>-->
<text class="money color-title price-font">{{ timestampToTime((new Date()).toLocaleString('en-US',{hour12: false}).split(" ")) }}</text>
</view>
</view>
</view>
<view v-if="transactionAgreement.title && transactionAgreement.content" class="agreement"> <view v-if="transactionAgreement.title && transactionAgreement.content" class="agreement">
购买前请先阅读 购买前请先阅读
<text @click="$refs.agreementPopup.open()">{{ transactionAgreement.title }}</text> <text @click="$refs.agreementPopup.open()">{{ transactionAgreement.title }}</text>

View File

@ -50,6 +50,9 @@ export default {
this.orderCreateData.latitude = this.location.latitude; this.orderCreateData.latitude = this.location.latitude;
this.orderCreateData.longitude = this.location.longitude; this.orderCreateData.longitude = this.location.longitude;
} }
if(this.createDataKey === 'futuresOrderCreateData'){
this.orderCreateData.buyer_message = this.orderCreateData.order_remarks
}
this.payment(); this.payment();
} else { } else {
setTimeout(() => { setTimeout(() => {
@ -74,7 +77,7 @@ export default {
calculateGoodsData(){ calculateGoodsData(){
if (this.calculateData) return this.calculateData.shop_goods_list; if (this.calculateData) return this.calculateData.shop_goods_list;
}, },
// 消费券可抵扣金额 // 余额可抵扣金额
balanceDeduct() { balanceDeduct() {
if (this.calculateData) { if (this.calculateData) {
if (this.calculateData.member_account.balance_total <= parseFloat(this.calculateData.order_money).toFixed(2)) { if (this.calculateData.member_account.balance_total <= parseFloat(this.calculateData.order_money).toFixed(2)) {
@ -237,10 +240,10 @@ export default {
this.$util.showToast({ this.$util.showToast({
title: res.message title: res.message
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo('/pages/index/index'); this.$util.redirectTo('/pages/index/index');
}, 1000) }, 2000)
} }
} }
}) })
@ -725,7 +728,7 @@ export default {
this.calculate(); this.calculate();
}, },
/** /**
* 使用兑换券抵扣 * 使用积分抵扣
*/ */
usePoint() { usePoint() {
this.orderCreateData.is_point = this.orderCreateData.is_point ? 0 : 1; this.orderCreateData.is_point = this.orderCreateData.is_point ? 0 : 1;
@ -735,7 +738,7 @@ export default {
* 支付弹窗关闭 * 支付弹窗关闭
*/ */
payClose(){ payClose(){
this.$util.redirectTo('/pages/order/detail', {order_id: this.$refs.choosePaymentPopup.payInfo.order_id}, 'redirectTo'); this.$util.redirectTo('/pages_rush/order/detail', {order_id: this.$refs.choosePaymentPopup.payInfo.order_id}, 'redirectTo');
}, },
/** /**
* 选择优惠券 * 选择优惠券
@ -825,6 +828,15 @@ export default {
this.orderCreateData.member_goods_card[ this.selectGoodsCard.skuId ] = this.selectGoodsCard.itemId || 0; this.orderCreateData.member_goods_card[ this.selectGoodsCard.skuId ] = this.selectGoodsCard.itemId || 0;
this.$refs.memberGoodsCardPopup.close(); this.$refs.memberGoodsCardPopup.close();
this.calculate(); this.calculate();
},
timestampToTime(times) {
let time = times[1]
let mdy = times[0]
mdy = mdy.split('/')
let month = parseInt(mdy[0]);
let day = parseInt(mdy[1]);
let year = parseInt(mdy[2])
return year + '-' + month + '-' + day + ' ' + time
} }
}, },
filters: { filters: {

View File

@ -90,7 +90,7 @@ export default {
}); });
}, },
toDetail(item) { toDetail(item) {
this.$util.redirectTo('/pages_tool/article/detail', { this.$util.redirectTo('/pages_rush/article/detail', {
article_id: item.article_id article_id: item.article_id
}); });
}, },

View File

@ -457,7 +457,7 @@ export default {
cart_ids: cartIds.toString() cart_ids: cartIds.toString()
}, },
success: () => { success: () => {
this.$util.redirectTo('/pages/order/payment'); this.$util.redirectTo('/pages_rush/order/payment');
this.isSub = false; this.isSub = false;
} }
}); });

View File

@ -19,6 +19,10 @@
:class="[{ 'using-hidden': goodsValue.nameLineMode == 'single' }, { 'multi-hidden': goodsValue.nameLineMode == 'multiple' }]"> :class="[{ 'using-hidden': goodsValue.nameLineMode == 'single' }, { 'multi-hidden': goodsValue.nameLineMode == 'multiple' }]">
{{ item.goods_name }} {{ item.goods_name }}
</view> </view>
<view class="give-diamond" v-if="parseFloat(item.give_diamond) > 0">
<image class="give-diamond-image" :src="$util.img('public/static/img/futures/give_diamond.png')" mode="widthFix"></image>
{{ parseFloat(item.give_diamond) }}颗猕猴桃
</view>
<template v-if="goodsValue.tag"> <template v-if="goodsValue.tag">
<view class="tag-wrap" v-if="goodsValue.tag.value == 'label' && item.label_name"> <view class="tag-wrap" v-if="goodsValue.tag.value == 'label' && item.label_name">
<text class="hollow-tag">{{ item.label_name }}</text> <text class="hollow-tag">{{ item.label_name }}</text>
@ -106,6 +110,10 @@
:class="[{ 'using-hidden': goodsValue.nameLineMode == 'single' }, { 'multi-hidden': goodsValue.nameLineMode == 'multiple' }]"> :class="[{ 'using-hidden': goodsValue.nameLineMode == 'single' }, { 'multi-hidden': goodsValue.nameLineMode == 'multiple' }]">
{{ item.goods_name }} {{ item.goods_name }}
</view> </view>
<view class="give-diamond" v-if="parseFloat(item.give_diamond) > 0">
<image class="give-diamond-image" :src="$util.img('public/static/img/futures/give_diamond.png')" mode="widthFix"></image>
{{ parseFloat(item.give_diamond) }}颗猕猴桃
</view>
<template v-if="goodsValue.tag"> <template v-if="goodsValue.tag">
<view class="tag-wrap" v-if="goodsValue.tag.value == 'label' && item.label_name"> <view class="tag-wrap" v-if="goodsValue.tag.value == 'label' && item.label_name">
<text class="hollow-tag">{{ item.label_name }}</text> <text class="hollow-tag">{{ item.label_name }}</text>
@ -156,8 +164,7 @@
goodsValue.goodsNameStyle.control || goodsValue.goodsNameStyle.control ||
(goodsValue.tag && goodsValue.tag.value != 'hidden') || (goodsValue.tag && goodsValue.tag.value != 'hidden') ||
goodsValue.priceStyle.mainControl || goodsValue.priceStyle.mainControl ||
goodsValue.priceStyle.lineControl goodsValue.priceStyle.lineControl">
">
<view v-if="goodsValue.goodsNameStyle.control" class="goods-name" <view v-if="goodsValue.goodsNameStyle.control" class="goods-name"
:style="{ color: goodsValue.theme == 'diy' ? goodsValue.goodsNameStyle.color : '', fontWeight: goodsValue.goodsNameStyle.fontWeight ? 'bold' : '' }" :style="{ color: goodsValue.theme == 'diy' ? goodsValue.goodsNameStyle.color : '', fontWeight: goodsValue.goodsNameStyle.fontWeight ? 'bold' : '' }"
:class="[{ 'using-hidden': goodsValue.nameLineMode == 'single' }, { 'multi-hidden': goodsValue.nameLineMode == 'multiple' }]"> :class="[{ 'using-hidden': goodsValue.nameLineMode == 'single' }, { 'multi-hidden': goodsValue.nameLineMode == 'multiple' }]">
@ -344,6 +351,30 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.give-diamond{
max-width:200rpx;
// max-width:200rpx;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: center;
align-items: center;
border: 2rpx solid #f13453;
color: #f13453;
font-size: 24rpx;
height: 38rpx;
line-height: 38rpx;
padding: 0 15rpx;
border-radius: 60rpx;
//margin-left: 30rpx;
.give-diamond-image{
width: 22rpx!important;
height: 22rpx!important;
margin-right: 5rpx;
}
}
.goods-list { .goods-list {
overflow: hidden; overflow: hidden;
.goods-item { .goods-item {
@ -420,7 +451,7 @@
.buy-btn { .buy-btn {
color: #fff; color: #fff;
background-color: $base-color; background-color: #F13453;
color: var(--btn-text-color); color: var(--btn-text-color);
border-radius: 50rpx; border-radius: 50rpx;
font-size: $font-size-tag; font-size: $font-size-tag;

View File

@ -26,8 +26,7 @@
<view <view
class="graphic-img" class="graphic-img"
v-show="value.mode != 'text'" v-show="value.mode != 'text'"
:style="{ fontSize: value.imageSize * 2 + 'rpx', width: value.imageSize * 2 + 'rpx', height: value.imageSize * 2 + 'rpx' }" :style="{ fontSize: value.imageSize * 2 + 'rpx', width: value.imageSize * 2 + 'rpx', height: value.imageSize * 2 + 'rpx' }">
>
<image <image
v-if="item.iconType == 'img'" v-if="item.iconType == 'img'"
:src="$util.img(item.imageUrl) || $util.img('public/uniapp/default_img/goods.png')" :src="$util.img(item.imageUrl) || $util.img('public/uniapp/default_img/goods.png')"

View File

@ -1,6 +1,7 @@
<template> <template>
<view class="many-goods-list"> <view class="many-goods-list">
<scroll-view scroll-x="true" :scroll-into-view="'a' + cateIndex"> <!-- <scroll-view scroll-x="true" :scroll-into-view="'a' + cateIndex">-->
<view class="scroll">
<view <view
v-for="(item, index) in value.list" v-for="(item, index) in value.list"
class="scroll-item" class="scroll-item"
@ -13,13 +14,79 @@
<view class="split-line" v-if="index > 0"></view> <view class="split-line" v-if="index > 0"></view>
<view class="cate"> <view class="cate">
<view class="name">{{ item.title }}</view> <view class="name">{{ item.title }}</view>
<view class="desc" :class="{ 'color-base-bg': index == cateIndex && item.desc }">{{ item.desc }}</view> <view class="desc" :class="{ 'color-base-bg-red': index == cateIndex && item.desc }">{{ item.desc }}</view>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </view>
<diy-goods-list v-if="goodsValue" :value="goodsValue" ref="diyGoodsList"></diy-goods-list> <!-- </scroll-view>-->
</view> <diy-goods-list v-if="goodsValue && (goodsValue.sources ==='category' || goodsValue.sources ==='diy')" :value="goodsValue" ref="diyGoodsList"></diy-goods-list>
<view class="list-wrap" v-if="goodsValue && (goodsValue.sources =='point')">
<view class="goods-list double-column" v-if="goodsList.length">
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index">
<view class="goods-img" @click="toDetail(item)">
<image :src="goodsImg(item.image)" mode="widthFix" @error="imgError(index)"></image>
</view>
<view class="info-wrap">
<view class="name-wrap">
<view class="goods-name" @click="toDetail(item)">{{ item.name }}</view>
</view>
<view class="lineheight-clear">
<view class="discount-price">
<text class="unit ">{{ item.point }}</text>
<text class="unit font-size-tag">积分</text>
<block v-if="item.price > 0 && item.pay_type > 0">
<text class="unit font-size-tag">+</text>
<text class="unit font-size-tag">{{ $lang('common.currencySymbol') }}</text>
<text class="price font-size-toolbar" >{{ parseFloat(item.price).toFixed(2).split(".")[0] }}</text>
<text class="unit font-size-tag">.{{ parseFloat(item.price).toFixed(2).split(".")[1] }}</text>
</block>
</view>
</view>
<view class="pro-info" v-if="item.stock_show">
<view class="font-size-activity-tag color-tip">库存{{ item.stock }}</view>
<view class="sale font-size-activity-tag color-tip" @click="toDetail(item)">
<!-- <button type="primary" size="mini">立即兑换</button> -->
</view>
</view>
</view>
</view>
</view>
<view class="empty" v-if="goodsList.length == 0">
<ns-empty :isIndex="false" text="暂无积分商品"></ns-empty>
</view>
</view>
<view v-if="goodsValue && (goodsValue.sources =='jianlou')">
<view class="goods-list" v-if="list.length > 0">
<view class="goods-block" v-for="(item,index) in list" :key="index">
<view class="left">
<image class="goods-image" :src="$util.img(item.goods_image)" mode="widthFix"></image>
<view class="goods-status" v-if="parseInt(item.status) === 2">正在销售</view>
<view class="goods-status" v-else>{{ status_text[item.status] }}</view>
</view>
<view class="right">
<view class="goods-title">{{ item.goods_name }}</view>
<view class="goods-sell">
<view class="goods-sell-item">销售商{{ item.seller_nickname }}</view>
<view class="goods-sell-item">采购数量{{ item.total }}</view>
</view>
<view class="goods-bottom">
<view class="price">
<view class="price-item">单价:{{ item.market_price }}/{{ item.unit || '件' }}</view>
<view class="price-item">采购价:<text class="purchase_price">{{ item.price }}</text></view>
</view>
<view class="buy-button">
<view class="buy-btn" @click="$util.redirectTo('/pages_rush/futures/details', { id: item.id }, 'redirectTo');">前去采购</view>
</view>
</view>
</view>
</view>
</view>
<view v-else>
<ns-empty :isIndex="false" :text="msg"></ns-empty>
</view>
</view>
</view>
</template> </template>
<script> <script>
@ -36,7 +103,19 @@ export default {
data() { data() {
return { return {
cateIndex: 0, // id cateIndex: 0, // id
goodsValue: null // goodsValue: null, //
goodsList: [],
list : [],
msg: '暂无捡漏商品',
status_text: {
1 : '库存',
2 : '正在销售',
3 : '已售出',
4 : '提货中',
5 : '提货完成',
6 : '待支付',
7 : '捡漏',
},
}; };
}, },
created() { created() {
@ -44,6 +123,14 @@ export default {
}, },
methods: { methods: {
changeCateIndex(item, index, isFirst) { changeCateIndex(item, index, isFirst) {
switch (item.sources){
case 'jianlou':
this.getList()
break;
case 'point':
this.getData()
break;
}
this.cateIndex = index; this.cateIndex = index;
this.goodsValue = { this.goodsValue = {
sources: item.sources, sources: item.sources,
@ -77,14 +164,108 @@ export default {
// //
if (isFirst) return; if (isFirst) return;
this.$refs.diyGoodsList.goodsValue = this.goodsValue; // this.$refs.diyGoodsList.goodsValue = this.goodsValue;
this.$refs.diyGoodsList.getGoodsList(); // this.$refs.diyGoodsList.getGoodsList();
} },
} //
getData(mescroll) {
this.$api.sendRequest({
url: '/pointexchange/api/goods/page',
data: {
// page_size: mescroll.size,
// page: mescroll.num,
type: 1,
// keyword: this.keyword,
// category_id: this.categoryId,
// min_point: this.minPoint,
// max_point: this.maxPoint,
// is_free_shipping: (this.isFreeShipping ? 1 : 0),
// order: this.order,
// sort: this.sort,
// coupon: this.coupon
},
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.goodsList = []; //
this.goodsList = []
this.goodsList = this.goodsList.concat(newArr); //
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail() {
//
// mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
goodsImg(imgStr) {
let imgs = imgStr.split(',');
return imgs[0] ? this.$util.img(imgs[0], {
size: 'mid'
}) : this.$util.getDefaultImage().goods;
},
imgError(index) {
this.goodsList[index].goods_image = this.$util.getDefaultImage().goods;
},
//
toDetail(item) {
this.$util.redirectTo('/pages_promotion/point/detail', {
id: item.id
});
},
//
getList(mescroll) {
this.$api.sendRequest({
url: '/futures/api/futures/list',
data: {
// page: mescroll.num,
// page_size: mescroll.size,
status: 'jianlou',
},
success: res => {
if(parseInt(res.code) === 0){
// mescroll.endSuccess(Object.keys(res.data.list).length);
//
// if (parseInt(mescroll.num) === 1){
// this.list = []; //
// }
this.list = []
this.list = this.list.concat(res.data.list); //
// this.end_time = parseInt(res.data.end_time);
//
// this.countDown();
}else {
this.msg = res.message;
}
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail: res => {
// mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.color-base-bg-red {
background-color: #F13453 !important;
}
scroll-view { scroll-view {
width: 100%; width: 100%;
white-space: nowrap; white-space: nowrap;
@ -140,4 +321,448 @@ scroll-view {
} }
} }
} }
.scroll{
display: flex;
width: 100%;
white-space: nowrap;
box-sizing: border-box;
padding: 20px 10px;
justify-content: space-evenly;
.scroll-item {
display: inline-block;
text-align: center;
vertical-align: top;
.item-wrap {
display: flex;
align-items: center;
}
.split-line {
display: inline-block;
width: 1rpx;
height: 30rpx;
background-color: #e5e5e5;
margin: 0 35rpx;
}
&.active {
.name {
font-weight: bold;
}
.desc {
color: #ffffff;
border-radius: 20rpx;
}
}
.name {
font-size: 32rpx;
color: $color-title;
line-height: 1;
}
.desc {
font-size: $font-size-tag;
color: $color-tip;
height: 36rpx;
line-height: 36rpx;
margin-top: 10rpx;
min-width: 120rpx;
max-width: 220rpx;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 10rpx;
}
}
}
//
.goods-list.single-column {
.goods-item {
padding: 26rpx;
background: #fff;
margin: $margin-updown $margin-both;
border-radius: $border-radius;
display: flex;
position: relative;
.goods-img {
width: 200rpx;
height: 200rpx;
overflow: hidden;
border-radius: $border-radius;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.goods-tag {
color: #fff;
line-height: 1;
padding: 8rpx 12rpx;
position: absolute;
border-top-left-radius: $border-radius;
border-bottom-right-radius: $border-radius;
top: 26rpx;
left: 26rpx;
font-size: $font-size-goods-tag;
}
.goods-tag-img {
position: absolute;
border-top-left-radius: $border-radius;
width: 80rpx;
height: 80rpx;
top: 26rpx;
left: 26rpx;
z-index: 5;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.info-wrap {
flex: 1;
display: flex;
flex-direction: column;
}
.name-wrap {
flex: 1;
}
.goods-name {
font-size: $font-size-base;
line-height: 1.3;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
height: 68rpx;
}
.introduction {
line-height: 1;
margin-top: 10rpx;
}
.discount-price {
display: inline-block;
font-weight: bold;
line-height: 1;
margin-top: 16rpx;
color: var(--price-color);
.unit {
margin-right: 6rpx;
}
}
.pro-info {
display: flex;
margin-top: 16rpx;
.delete-price {
text-decoration: line-through;
flex: 1;
.unit {
margin-right: 6rpx;
}
}
&>view {
line-height: 1;
&:nth-child(2) {
text-align: right;
}
}
}
.member-price-tag {
display: inline-block;
width: 60rpx;
line-height: 1;
margin-left: 6rpx;
image {
width: 100%;
}
}
}
}
//
.goods-list.double-column {
display: flex;
flex-wrap: wrap;
margin: 0 $margin-both;
padding-top: $margin-updown;
.goods-item {
flex: 1;
position: relative;
background-color: #fff;
flex-basis: 48%;
max-width: calc((100% - 30rpx) / 2);
margin: 0 $margin-both $margin-updown 0;
border-radius: $border-radius;
&:nth-child(2n) {
margin-right: 0;
}
.goods-img {
position: relative;
overflow: hidden;
padding-top: 100%;
border-top-left-radius: $border-radius;
border-top-right-radius: $border-radius;
image {
width: 100%;
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
}
}
.goods-tag {
color: #fff;
line-height: 1;
padding: 8rpx 16rpx;
position: absolute;
border-bottom-right-radius: $border-radius;
top: 0;
left: 0;
font-size: $font-size-goods-tag;
}
.goods-tag-img {
position: absolute;
border-top-left-radius: $border-radius;
width: 80rpx;
height: 80rpx;
top: 0;
left: 0;
z-index: 5;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.info-wrap {
padding: 0 26rpx 26rpx 26rpx;
}
.goods-name {
font-size: $font-size-base;
line-height: 1.3;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-top: 20rpx;
height: 68rpx;
}
.discount-price {
display: inline-block;
font-weight: bold;
line-height: 1;
margin-top: 16rpx;
color: var(--price-color);
.unit {
margin-right: 6rpx;
}
}
.pro-info {
display: flex;
margin-top: 16rpx;
.delete-price {
text-decoration: line-through;
flex: 1;
.unit {
margin-right: 6rpx;
}
}
&>view {
line-height: 1;
&:nth-child(2) {
text-align: right;
}
}
}
.member-price-tag {
display: inline-block;
width: 60rpx;
line-height: 1;
margin-left: 6rpx;
image {
width: 100%;
}
}
}
}
.goods-list{
margin: 0 30rpx;
.goods-block{
--size--: calc((100vw - 100rpx) / 3);
border-radius: 20rpx;
background: #ffffff;
padding: 20rpx;
margin-bottom: 30rpx;
box-shadow: 0 2rpx 10rpx #eeeff2;
width: calc(100% - 40rpx);
display: inline-flex;
flex-wrap: nowrap;
flex-direction: row;
align-content: center;
justify-content: center;
align-items: center;
height: var(--size--);
.left{
margin-right: 20rpx;
height: var(--size--);
width: var(--size--);
position: relative;
border-radius: 20rpx;
overflow: hidden;
.goods-image{
max-width: 100% !important;
max-height: 100% !important;
}
.goods-status{
position: absolute;
bottom: 0;
width: 100%;
background: #fc4740;
color: #febebc;
font-size: 24rpx;
text-align: center;
height: 30rpx;
line-height: 30rpx;
}
}
.right{
width: calc((var(--size--) * 2) - 20rpx);
display: inline-flex;
flex-direction: column;
flex-wrap: wrap;
align-content: flex-start;
justify-content: flex-start;
align-items: flex-start;
height: 100%;
.goods-title{
width: 100%;
height: 50rpx;
line-height: 50rpx;
font-size: 30rpx;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.goods-sell{
width: 100%;
display: inline-flex;
height: 50rpx;
line-height: 50rpx;
color: #b5b7c0;
.goods-sell-item{
width: 50%;
color: #b5b7c0;
font-size: 24rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 50rpx;
}
.goods-sell-item:nth-of-type(1){
text-align: left;
}
.goods-sell-item:nth-of-type(2){
text-align: right;
}
}
.goods-bottom{
width: 100%;
height: calc(var(--size--) - 100rpx);
display: inline-flex;
align-items: flex-end;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
.price{
height: 100%;
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: flex-end;
align-items: flex-start;
width: calc(100% - 140rpx);
.price-item{
width: 100%;
color: #b5b7c0;
font-size: 24rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
height: 40rpx;
line-height: 40rpx;
.purchase_price{
color: #fe7e79;
font-size: 30rpx;
font-weight: bold;
}
}
}
.buy-button{
height: 100%;
display: inline-flex;
align-items: flex-end;
justify-content: flex-end;
.buy-btn{
width: 140rpx;
height: 70rpx;
line-height: 70rpx;
color: #fef5f5;
background: #ff2724;
font-size: 26rpx;
border-radius: 100rpx;
text-align: center;
margin-bottom: 8rpx;
}
}
}
}
}
}
</style> </style>

View File

@ -36,7 +36,7 @@
<!-- <view class="level-name">{{ memberInfo.member_level_name }}</view>--> <!-- <view class="level-name">{{ memberInfo.member_level_name }}</view>-->
<!-- </view>--> <!-- </view>-->
<view class="copy" >推荐码:{{memberInfo.rcode}} <view class="allmoney-top-btn" @click="CopyText">复制</view></view> <!-- <view class="copy" >推荐码:{{memberInfo.rcode}} <view class="allmoney-top-btn" @click="CopyText">复制</view></view> -->
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
@ -67,7 +67,7 @@
<image :src="$util.img('public/uniapp/member/supervip_icon.png')" mode="heightFix" class="level-icon"></image> <image :src="$util.img('public/uniapp/member/supervip_icon.png')" mode="heightFix" class="level-icon"></image>
<view class="level-name">{{ memberInfo.member_level_name }}</view> <view class="level-name">{{ memberInfo.member_level_name }}</view>
</view> </view>
<view class="copy" >推荐码:{{memberInfo.rcode}} <view class="allmoney-top-btn" @click="CopyText">复制</view></view> <!-- <view class="copy" >推荐码:{{memberInfo.rcode}} <view class="allmoney-top-btn" @click="CopyText">复制</view></view> -->
<!-- #endif --> <!-- #endif -->
</view> </view>
<!-- <text class="iconfont icon-qrcode member-code" @click="showMemberQrcode"></text>--> <!-- <text class="iconfont icon-qrcode member-code" @click="showMemberQrcode"></text>-->
@ -90,30 +90,20 @@
> >
<view class="account-item" @click="redirect('/pages_tool/member/balance')"> <view class="account-item" @click="redirect('/pages_tool/member/balance')">
<view class="value price-font">{{ memberInfo ? (parseFloat(memberInfo.balance) + parseFloat(memberInfo.balance_money)).toFixed(2) : '--' }}</view> <view class="value price-font">{{ memberInfo ? (parseFloat(memberInfo.balance) + parseFloat(memberInfo.balance_money)).toFixed(2) : '--' }}</view>
<view class="title">消费券</view> <view class="title">余额</view>
</view> </view>
<view class="solid"></view> <view class="solid"></view>
<view class="account-item" @click="redirect('/pages_tool/member/point')"> <view class="account-item" @click="redirect('/pages_tool/member/point')">
<view class="value price-font">{{ memberInfo ? parseFloat(memberInfo.point) : '--' }}</view> <view class="value price-font">{{ memberInfo ? parseFloat(memberInfo.point) : '--' }}</view>
<view class="title">兑换券</view>
</view>
<view class="solid"></view>
<view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill')">
<view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.points != undefined ? fenxiaoInfo.points : '--' }}</view>
<view class="title">积分</view> <view class="title">积分</view>
</view> </view>
<view class="solid"></view> <view class="solid"></view>
<view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill')"> <view class="account-item" @click="redirect('/pages_tool/member/balance_detail',{'from_type':'diamond'})">
<view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.contribution != undefined ? fenxiaoInfo.contribution : '--' }}</view> <view class="value price-font">{{ memberInfo ? memberInfo.diamond : '--' }}</view>
<view class="title">贡献值</view> <!-- <view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.diamond != undefined ? parseInt(fenxiaoInfo.diamond) : '--' }}</view> -->
</view> <view class="title">猕猴桃</view>
<view class="solid"></view> </view>
<view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill')">
<view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.house_purchase != undefined ? fenxiaoInfo.house_purchase : '--' }}</view>
<view class="title">购房券</view>
</view>
</view> </view>
<view class="super-member" v-if="superMember" :style="superMemberStyle"> <view class="super-member" v-if="superMember" :style="superMemberStyle">
<block v-if="value.style == 1 || value.style == 2"> <block v-if="value.style == 1 || value.style == 2">
<view class="super-info"> <view class="super-info">
@ -138,48 +128,42 @@
</block> </block>
</view> </view>
</view> </view>
<view <view
class="account-info" class="account-info"
v-show="value.style == 2" v-show="value.style == 2"
:style="{ 'margin-left': parseInt(value.infoMargin) * 2 + 'rpx', 'margin-right': parseInt(value.infoMargin) * 2 + 'rpx' }" :style="{ 'margin-left': parseInt(value.infoMargin) * 2 + 'rpx', 'margin-right': parseInt(value.infoMargin) * 2 + 'rpx' }">
> <view class="account-item" @click="redirect('/pages_tool/member/balance')">
<view> <view class="value price-font">{{ memberInfo ? (parseFloat(memberInfo.balance) + parseFloat(memberInfo.balance_money)).toFixed(2) : '--' }}</view>
<view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill',{type: 'points'})"> <view class="title">余额</view>
<view class="value price-font" style="font-size: 38rpx;">{{ fenxiaoInfo && fenxiaoInfo.points != undefined ? fenxiaoInfo.points : '--' }}</view> </view>
<view class="title" style="font-size: 30rpx;">积分</view> <view class="solid"></view>
</view> <view class="account-item" @click="redirect('/pages_tool/member/point')">
<view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill',{type: 'contribution'})"> <view class="value price-font">{{ memberInfo ? parseFloat(memberInfo.point).toFixed(2) : '--' }}</view>
<view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.contribution != undefined ? fenxiaoInfo.contribution : '--' }}</view> <view class="title">积分</view>
<view class="title">贡献值</view> </view>
</view>
</view>
<view class="solid"></view> <view class="solid"></view>
<view> <view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill')">
<view class="account-item" @click="redirect('/pages_tool/member/balance')"> <view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.diamond != undefined ? fenxiaoInfo.diamond : '--' }}</view>
<view class="value price-font" style="font-size: 38rpx;">{{ memberInfo ? (parseFloat(memberInfo.balance) + parseFloat(memberInfo.balance_money)).toFixed(2) : '--' }}</view> <view class="title">钻石</view>
<view class="title" style="font-size: 30rpx;">消费券</view>
</view>
<view class="account-item" @click="redirect('/pages_tool/member/point')">
<view class="value price-font">{{ memberInfo ? parseFloat(memberInfo.point).toFixed(2) : '--' }}</view>
<view class="title">兑换券</view>
</view>
</view> </view>
</view>
</view>
<!-- 会员码 -->
<uni-popup ref="erWeiPopup" type="center">
<view class="member-code-popup" v-if="memberCode">
<view class="popup-top">
<view class="popup-top-title">
<view class="iconfont icon-erweima"></view>
<view class="popup-top-title-txt">会员码</view>
</view>
<view class="popup-top-tiao"><image :src="$util.img(memberCode.barcode)" mode=""></image></view>
<view class="popup-top-erwei"><image :src="$util.img(memberCode.qrcode)" mode=""></image></view>
<view class="popup-top-text">如遇到扫码失败请将屏幕调至最亮重新扫码</view>
</view>
<view class="popup-bottom"><text class="iconfont iconfont-delete icon-close-guanbi" @click="closeMemberQrcode"></text></view>
</view> </view>
</uni-popup>
<view
class="account-info"
v-show="value.style == 2"
:style="{ 'margin-left': parseInt(value.infoMargin) * 2 + 'rpx', 'margin-right': parseInt(value.infoMargin) * 2 + 'rpx' }"
>
<view class="account-item" @click="redirect('/pages_tool/member/goufang')">
<view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.house_purchase != undefined ? fenxiaoInfo.house_purchase : '--' }}</view>
<view class="title">购房券</view>
</view>
</view>
</view>
<!-- 完善会员资料 --> <!-- 完善会员资料 -->
<view @touchmove.prevent.stop class="member-complete-info-popup"> <view @touchmove.prevent.stop class="member-complete-info-popup">
<uni-popup ref="completeInfoPopup" type="bottom" :maskClick="false"> <uni-popup ref="completeInfoPopup" type="bottom" :maskClick="false">
@ -200,12 +184,10 @@
<text class="label">昵称</text> <text class="label">昵称</text>
<input type="nickname" placeholder="请输入昵称" v-model="nickName" @blur="blurNickName" /> <input type="nickname" placeholder="请输入昵称" v-model="nickName" @blur="blurNickName" />
</view> </view>
<button type="default" class="save-btn" @click="saveCompleteInfo" :disabled="isDisabled">保存</button> <button type="default" class="save-btn" @click="saveCompleteInfo" :disabled="isDisabled">保存</button>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
<ns-login ref="login"></ns-login> <ns-login ref="login"></ns-login>
</view> </view>
</template> </template>
@ -384,18 +366,57 @@ export default {
}); });
}, },
/** /**
* 跳转 * 跳转
* @param {Object} url * @param {Object} url
* @param param */
*/ redirect(url) {
redirect(url, param = {}) {
if (!uni.getStorageSync('token')) { if (!uni.getStorageSync('token')) {
this.$refs.login.open(url); this.$refs.login.open(url);
} else { } else {
this.$util.redirectTo(url, param); this.$util.redirectTo(url);
} }
}, },
/**
* 显示会员码
*/
showMemberQrcode() {
if (!this.memberInfo.mobile && !this.memberInfo.member_code) {
uni.showModal({
title: '提示',
content: '使用会员码需先绑定手机号,是否绑定手机号?',
success: res => {
if (res.confirm) {
this.$util.redirectTo('/pages_tool/member/info_edit', { action: 'mobile' });
}
}
});
return;
}
if (this.memberCode) {
this.$refs.erWeiPopup.open();
}
this.$api.sendRequest({
url: '/api/member/membereqrcode',
data: {
page: ''
},
success: res => {
if (res.code == 0) {
this.memberCode = {
barcode: res.bar_code,
qrcode: res.data.path
};
this.$refs.erWeiPopup.open();
}
}
});
},
/**
* 关闭会员码
*/
closeMemberQrcode() {
this.$refs.erWeiPopup.close();
},
/** /**
* 跳转之前需先进行授权 * 跳转之前需先进行授权
* @param {Object} url * @param {Object} url
@ -691,9 +712,9 @@ export default {
} }
.account-info { .account-info {
display: flex; display: flex;
padding: 20rpx 0; padding: 40rpx 0;
align-items: center; align-items: center;
justify-content: space-evenly; justify-content: center;
view { view {
color: #fff; color: #fff;
} }
@ -710,7 +731,7 @@ export default {
.value { .value {
font-size: 34rpx; font-size: 34rpx;
font-weight: bold !important; font-weight: bold !important;
//margin-bottom: 4rpx; margin-bottom: 4rpx;
line-height: 1.3; line-height: 1.3;
} }
.title { .title {
@ -748,12 +769,10 @@ export default {
} }
.account-item { .account-item {
.value { .value {
color: #ee691c; color: #000000;
//color: #000000;
} }
.title { .title {
color: #ee691c; color: #666666;
//color: #666666;
} }
} }
} }

View File

@ -2,7 +2,7 @@
<view class="common-wrap" :style="warpCss"> <view class="common-wrap" :style="warpCss">
<view class="order-wrap"> <view class="order-wrap">
<view class="status-wrap"> <view class="status-wrap">
<view class="item-wrap" @click="redirect('/pages/order/list?status=waitpay')"> <view class="item-wrap" @click="redirect('/pages_rush/order/list?status=waitpay')">
<view class="icon-block"> <view class="icon-block">
<template v-if="value.style == 3"> <template v-if="value.style == 3">
<image :src="$util.img('public/uniapp/member/order/wait_pay.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/member/order/wait_pay.png')" mode="widthFix"></image>
@ -15,7 +15,7 @@
</view> </view>
<view class="title">待付款</view> <view class="title">待付款</view>
</view> </view>
<view class="item-wrap" @click="redirect('/pages/order/list?status=waitsend')"> <view class="item-wrap" @click="redirect('/pages_rush/order/list?status=waitsend')">
<view class="icon-block"> <view class="icon-block">
<template v-if="value.style == 3"> <template v-if="value.style == 3">
<image :src="$util.img('public/uniapp/member/order/wait_send.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/member/order/wait_send.png')" mode="widthFix"></image>
@ -28,7 +28,7 @@
</view> </view>
<view class="title">待发货</view> <view class="title">待发货</view>
</view> </view>
<view class="item-wrap" @click="redirect('/pages/order/list?status=waitconfirm')"> <view class="item-wrap" @click="redirect('/pages_rush/order/list?status=waitconfirm')">
<view class="icon-block"> <view class="icon-block">
<template v-if="value.style == 3"> <template v-if="value.style == 3">
<image :src="$util.img('public/uniapp/member/order/wait_confirm.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/member/order/wait_confirm.png')" mode="widthFix"></image>
@ -45,7 +45,7 @@
</view> </view>
<view class="title">待收货</view> <view class="title">待收货</view>
</view> </view>
<view class="item-wrap" @click="redirect('/pages/order/list?status=wait_use')"> <view class="item-wrap" @click="redirect('/pages_rush/order/list?status=wait_use')">
<view class="icon-block"> <view class="icon-block">
<template v-if="value.style == 3"> <template v-if="value.style == 3">
<image :src="$util.img('public/uniapp/member/order/wait_use.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/member/order/wait_use.png')" mode="widthFix"></image>
@ -58,23 +58,23 @@
</view> </view>
<view class="title">待使用</view> <view class="title">待使用</view>
</view> </view>
<!-- <view class="item-wrap" @click="redirect('/pages_tool/order/activist')">--> <view class="item-wrap" @click="redirect('/pages_tool/order/activist')">
<!-- <view class="icon-block">--> <view class="icon-block">
<!-- <template v-if="value.style == 3">--> <template v-if="value.style == 3">
<!-- <image :src="$util.img('public/uniapp/member/order/refunding.png')" mode="widthFix"></image>--> <image :src="$util.img('public/uniapp/member/order/refunding.png')" mode="widthFix"></image>
<!-- <view class="icon-shade" :style="'-webkit-mask-image: url(' + $util.img('public/uniapp/member/order/refunding_shade.png') + ')'"></view>--> <view class="icon-shade" :style="'-webkit-mask-image: url(' + $util.img('public/uniapp/member/order/refunding_shade.png') + ')'"></view>
<!-- </template>--> </template>
<!-- <template v-else>--> <template v-else>
<!-- <diy-icon--> <diy-icon
<!-- :icon="value.icon.refunding.icon"--> :icon="value.icon.refunding.icon"
<!-- v-if="value.icon.refunding"--> v-if="value.icon.refunding"
<!-- :value="value.icon.refunding.style ? value.icon.refunding.style : null"--> :value="value.icon.refunding.style ? value.icon.refunding.style : null"
<!-- ></diy-icon>--> ></diy-icon>
<!-- </template>--> </template>
<!-- <text v-if="orderNum.refunding > 0" class="order-num color-base-bg price-font">{{ orderNum.refunding > 99 ? '99+' : orderNum.refunding }}</text>--> <text v-if="orderNum.refunding > 0" class="order-num color-base-bg price-font">{{ orderNum.refunding > 99 ? '99+' : orderNum.refunding }}</text>
<!-- </view>--> </view>
<!-- <view class="title">售后</view>--> <view class="title">售后</view>
<!-- </view>--> </view>
</view> </view>
</view> </view>
<ns-login ref="login"></ns-login> <ns-login ref="login"></ns-login>

View File

@ -47,7 +47,7 @@
}" }"
> >
<text class="text">{{ value.btnStyle.text }}</text> <text class="text">{{ value.btnStyle.text }}</text>
<text class="fan" v-if="item.reward_type == 4">{{ item.reward_type_num }}兑换券</text> <text class="fan" v-if="item.reward_type == 4">{{ item.reward_type_num }}积分</text>
<text class="fan" v-if="item.reward_type == 1 || item.reward_type == 2">{{ item.reward_type_num }}</text> <text class="fan" v-if="item.reward_type == 1 || item.reward_type == 2">{{ item.reward_type_num }}</text>
<text class="fan" v-if="item.reward_type == 3">返优惠券</text> <text class="fan" v-if="item.reward_type == 3">返优惠券</text>
</button> </button>
@ -79,7 +79,7 @@
{{ item.pintuan_num }}人团 {{ item.pintuan_num }}人团
</text> </text>
<text class="content-tuan-price" :style="{ color: value.theme == 'diy' ? value.groupStyle.bgColor : '' }" v-if="item.reward_type == 4"> <text class="content-tuan-price" :style="{ color: value.theme == 'diy' ? value.groupStyle.bgColor : '' }" v-if="item.reward_type == 4">
{{ item.reward_type_num }}兑换券 {{ item.reward_type_num }}积分
</text> </text>
<text <text
class="content-tuan-price" class="content-tuan-price"
@ -127,7 +127,7 @@
{{ item.pintuan_num }}人团 {{ item.pintuan_num }}人团
</text> </text>
<text class="content-tuan-price" :style="{ color: value.theme == 'diy' ? value.groupStyle.bgColor : '' }" v-if="item.reward_type == 4"> <text class="content-tuan-price" :style="{ color: value.theme == 'diy' ? value.groupStyle.bgColor : '' }" v-if="item.reward_type == 4">
{{ item.reward_type_num }}兑换券 {{ item.reward_type_num }}积分
</text> </text>
<text <text
class="content-tuan-price" class="content-tuan-price"

View File

@ -0,0 +1,451 @@
// 商品详情业务
import {
Weixin
} from '@/common/js/wx-jssdk.js';
export default {
data() {
return {
skuId: 0,
goodsId:0,
isIphoneX: false, //判断手机是否是iphoneX以上
whetherCollection: 0,
//是否开启预览0不开启1开启
preview: 0,
token: "",
videoContext: '',
// 媒体,图片,视频
// 解决每个商品SKU图片数量不同时无法切换到第一个导致轮播图显示不出来
swiperInterval: 1,
swiperAutoplay: false,
swiperCurrent: 1,
switchMedia: 'img',
//评价
goodsEvaluate: [{
member_headimg: '',
member_name: '',
content: '',
images: [],
create_time: 0,
sku_name: ''
}],
evaluateConfig: {
evaluate_audit: 1,
evaluate_show: 0,
evaluate_status: 1
},
// 是否可分享到好物圈
goodsCircle: false,
memberId: 0,
service: null,
shareUrl: '', // 分享链接
source_member: 0, //分享人的id
isCommunity: false, //社群弹窗
poster: "-1", //海报
posterMsg: "", //海报错误信息
posterHeight: 0,
posterParams: {}, //海报所需参数
detailTab: 0,
goodsRoute:'',
posterApi:'',
}
},
created() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
this.token = uni.getStorageSync('token');
},
methods: {
init(params) {
this.skuId = params.sku_id;
this.goodsId = params.goods_id;
this.preview = params.preview;
this.source_member = params.source_member;
this.whetherCollection = params.whetherCollection;
this.posterParams = params.posterParams;
this.shareUrl = params.shareUrl;
this.memberId = params.memberId;
this.goodsRoute = params.goodsRoute;
this.posterApi = params.posterApi;
this.getService();
// 评价设置
this.getEvaluateConfig();
this.videoContext = uni.createVideoContext('goodsVideo');
// #ifdef MP-WEIXIN
this.goodsSyncToGoodsCircle();
// #endif
this.getWhetherCollection();
},
swiperChange(e) {
this.swiperCurrent = e.detail.current + 1;
},
//-------------------------------------服务-------------------------------------
openMerchantsServicePopup() {
this.$refs.merchantsServicePopup.open();
},
closeMerchantsServicePopup() {
this.$refs.merchantsServicePopup.close();
},
//-------------------------------------属性-------------------------------------
openAttributePopup() {
this.$refs.attributePopup.open();
},
closeAttributePopup() {
this.$refs.attributePopup.close();
},
//获取用户是否关注
async getWhetherCollection() {
this.$api.sendRequest({
url: "/api/goodscollect/iscollect",
data: {
goods_id: this.goodsId
},
success: res => {
this.whetherCollection = res.data;
}
});
},
//-------------------------------------评价-------------------------------------
//商品评论列表
getGoodsEvaluate() {
this.$api.sendRequest({
url: "/api/goodsevaluate/firstinfo",
data: {
goods_id: this.goodsSkuDetail.goods_id
},
success: res => {
let data = res.data;
if (data) {
this.goodsEvaluate = data;
this.goodsEvaluate.forEach((item, index) => {
if (this.goodsEvaluate[index].images) this.goodsEvaluate[index].images =
this.goodsEvaluate[index].images.split(",");
if (this.goodsEvaluate[index].is_anonymous == 1) this.goodsEvaluate[
index].member_name = this.goodsEvaluate[index].member_name
.replace(
this.goodsEvaluate[index].member_name.substring(1, this
.goodsEvaluate[index].member_name.length - 1), '***')
})
// if (this.goodsEvaluate.images) this.goodsEvaluate.images = this.goodsEvaluate.images.split(",");
// if (this.goodsEvaluate.is_anonymous == 1) this.goodsEvaluate.member_name = this.goodsEvaluate.member_name.replace(
// this.goodsEvaluate.member_name.substring(1, this.goodsEvaluate.member_name.length - 1), '***')
}
}
});
},
// 预览评价图片
previewEvaluate(index, img_index, field) {
var paths = [];
for (let i = 0; i < this.goodsEvaluate[index][field].length; i++) {
paths.push(this.$util.img(this.goodsEvaluate[index][field][i]));
}
uni.previewImage({
current: img_index,
urls: paths
});
},
//-------------------------------------关注-------------------------------------
editCollection() {
if (this.preview) return; // 开启预览,禁止任何操作和跳转
if (this.token) {
//未关注添加关注
if (this.whetherCollection == 0) {
this.$api.sendRequest({
url: "/api/goodscollect/add",
data: {
sku_id: this.skuId,
goods_id: this.goodsSkuDetail.goods_id,
sku_name: this.goodsSkuDetail.sku_name,
sku_price: this.goodsSkuDetail.show_price,
sku_image: this.goodsSkuDetail.sku_image
},
success: res => {
var data = res.data;
if (data > 0) {
this.whetherCollection = 1;
}
}
});
} else {
//已关注取消关注
this.$api.sendRequest({
url: "/api/goodscollect/delete",
data: {
goods_id: this.goodsSkuDetail.goods_id
},
success: res => {
var data = res.data;
if (data > 0) {
this.whetherCollection = 0;
}
}
});
}
} else {
if (this.source_member) {
this.$refs.login.open(this.shareUrl + '&source_member=' + this.source_member);
} else {
this.$refs.login.open(this.shareUrl);
}
}
},
collection() {
if (this.preview) return; // 开启预览,禁止任何操作和跳转
this.editCollection();
if (this.token) {
return this.whetherCollection ? 0 : 1;
}
},
//-------------------------------------分享-------------------------------------
// 打开分享弹出层
openSharePopup() {
this.$refs.sharePopup.open();
},
// 关闭分享弹出层
closeSharePopup() {
this.$refs.sharePopup.close();
},
copyUrl() {
let text = this.$config.h5Domain + this.shareUrl;
if (this.memberId) text += '&source_member=' + this.memberId;
this.$util.copy(text, () => {
this.closeSharePopup();
});
},
//-------------------------------------海报-------------------------------------
// 打开海报弹出层
openPosterPopup() {
this.getGoodsPoster();
this.$refs.sharePopup.close();
this.$refs.posterPopup.open();
if (this.poster != '-1') {
setTimeout(() => {
let view = uni.createSelectorQuery().in(this).select(".poster-layer .image-wrap");
view.fields({
size: true,
}, data => {
let posterWhith = data.width;
let ratio = parseFloat((740 / posterWhith).toFixed(2));
if (this.token != '') {
this.posterHeight = parseInt(1240 / ratio);
} else {
this.posterHeight = parseInt(1100 / ratio);
}
}).exec();
}, 100);
}
},
// 关闭海报弹出层
closePosterPopup() {
this.$refs.posterPopup.close();
},
//生成海报
getGoodsPoster() {
uni.showLoading({
'title' : '海报生成中...'
})
//活动海报信息
if (this.memberId) this.posterParams.source_member = this.memberId;
this.$api.sendRequest({
url: this.posterApi,
data: {
page: this.goodsRoute,
qrcode_param: JSON.stringify(this.posterParams)
},
success: res => {
if (res.code == 0) {
this.poster = res.data.path + "?time=" + new Date().getTime();
} else {
this.posterMsg = res.message;
}
uni.hideLoading();
},
fail: err => {
uni.hideLoading();
}
});
},
// 预览图片
previewMedia(index) {
var paths = [];
for (let i = 0; i < this.goodsSkuDetail.sku_images.length; i++) {
paths.push(this.$util.img(this.goodsSkuDetail.sku_images[i], {
size: 'big'
}));
}
uni.previewImage({
current: index,
urls: paths,
// longPressActions: {
// itemList: ['发送给朋友', '保存图片', '关注'],
// success: function(data) {
// console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
// },
// fail: function(err) {
// console.log(err.errMsg);
// }
// }
});
},
swiperImageError(index) {
this.goodsSkuDetail.sku_images[index] = this.$util.getDefaultImage().goods;
this.$forceUpdate();
},
// #ifdef MP || APP-PLUS
//小程序中保存海报
saveGoodsPoster() {
let url = this.$util.img(this.poster);
uni.downloadFile({
url: url,
success: (res) => {
if (res.statusCode === 200) {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: () => {
this.$util.showToast({
title: "保存成功"
});
},
fail: () => {
this.$util.showToast({
title: "保存失败,请稍后重试"
});
}
});
}
}
});
},
// #endif
//售后保障查询
getService() {
this.$api.sendRequest({
url: '/api/goods/aftersale',
success: res => {
if (res.code == 0 && res.data) {
this.service = res.data;
}
}
});
},
// #ifdef MP-WEIXIN
/**
* 将商品同步到微信圈子
*/
goodsSyncToGoodsCircle() {
this.$api.sendRequest({
url: '/goodscircle/api/goods/sync',
data: {
goods_id: this.goodsSkuDetail.goods_id
},
success: res => {
if (res.code == 0) {
this.goodsCircle = true;
}
}
})
},
/**
* 将商品推荐到微信圈子
*/
openBusinessView() {
if (wx.openBusinessView) {
wx.openBusinessView({
businessType: 'friendGoodsRecommend',
extraData: {
product: {
item_code: this.goodsSkuDetail.goods_id,
title: this.goodsSkuDetail.sku_name,
image_list: this.goodsSkuDetail.sku_images.map((ele) => {
return this.$util.img(ele);
})
}
},
success: function(res) {
console.log('success', res);
},
fail: function(res) {
console.log('fail', res);
}
})
}
},
// #endif
getEvaluateConfig() {
this.$api.sendRequest({
url: '/api/goodsevaluate/config',
success: res => {
if (res.code == 0) {
var data = res.data;
this.evaluateConfig = data;
if (this.evaluateConfig.evaluate_show == 1) {
//商品评论
this.getGoodsEvaluate();
}
}
}
});
},
toEvaluateDetail(id) {
this.$util.redirectTo('/pages_tool/goods/evaluate', {
goods_id: id
});
},
showImg(e) {
//拿到图片的路径里面的内容放在我们数组中
let contentimg = e.target.dataset.nodes || e.currentTarget.dataset.nodes;
let arrImg = [];
for (var i = 0; i < contentimg.length; i++) {
var img = contentimg[i].children;
if (Array.isArray(img)) {
for (var j = 0; j < img.length; j++) {
if (img[j].attrs && img[j].name == "img") {
if (img[j].attrs.src) {
arrImg.push(img[j].attrs.src)
}
}
}
}
}
//最后一步就是把我们的所有图片放在预览的api中就可以了
uni.previewImage({
current: arrImg,
urls: arrImg,
})
},
//-------------------------------------社群-------------------------------------
//添加福利群
onCommunity() {
this.isCommunity = true
},
onCloseCommunity() {
this.isCommunity = false
}
}
}

View File

@ -0,0 +1,350 @@
<template>
<view>
<view scroll-y="true" class="goods-detail" :class="isIphoneX ? 'active' : ''">
<view class="goods-container">
<!-- 弹幕 -->
<pengpai-fadein-out v-if="goodsSkuDetail.barrage_show && goodsSkuDetail.barrageData" ref="pengpai" :duration="1600" :wait="1900" :top="400" :left="0" :radius="60" :loop="true" :info="goodsSkuDetail.barrageData"></pengpai-fadein-out>
<!-- 商品媒体信息 -->
<view class="goods-media">
<!-- 商品图片 -->
<view class="goods-img" :class="{ show: switchMedia == 'img' }">
<swiper class="swiper" @change="swiperChange" :interval="swiperInterval" :autoplay="swiperAutoplay" autoplay="true" interval="4000" circular="true">
<swiper-item v-for="(item, index) in goodsSkuDetail.sku_images" :key="index" :item-id="'goods_id_' + index">
<view class="item" @click="previewMedia(index)">
<image :src="$util.img(item, { size: 'big' })" @error="swiperImageError(index)" mode="aspectFit" />
</view>
</swiper-item>
</swiper>
<view class="img-indicator-dots">
<text>{{ swiperCurrent }}</text>
<text v-if="goodsSkuDetail.sku_images">/{{ goodsSkuDetail.sku_images.length }}</text>
</view>
</view>
<!-- 商品视频 -->
<view class="goods-video" :class="{ show: switchMedia == 'video' }">
<video id="goodsVideo" :src="$util.img(goodsSkuDetail.video_url)" :poster="$util.img(goodsSkuDetail.sku_image, { size: 'big' })" objectFit="cover"></video>
</view>
<!-- 切换视频图片 -->
<view class="media-mode" v-if="goodsSkuDetail.video_url != ''">
<text :class="{ 'color-base-bg': switchMedia == 'video' }" @click="switchMedia = 'video'">{{ $lang('video') }}</text>
<text :class="{ 'color-base-bg': switchMedia == 'img' }" @click="(switchMedia = 'img'), videoContext.pause()">{{ $lang('image') }}</text>
</view>
</view>
<!-- 价格区域 -->
<view class="goods-gression">
<slot name="price"></slot>
</view>
<view class="newdetail margin-bottom">
<!-- 入口区域 -->
<slot name="entrance"></slot>
<view class="item goods-attribute" @click="openAttributePopup()" v-if="goodsSkuDetail.goods_attr_format && goodsSkuDetail.goods_attr_format.length > 0">
<view class="label">属性</view>
<view class="box">
<text v-for="(item, index) in goodsSkuDetail.goods_attr_format" :key="index" v-if="index < 2">{{ item.attr_name }}: {{ item.attr_value_name }}</text>
</view>
<text class="iconfont iconright"></text>
<!-- <view class="img-wrap"><image :src="$util.img('public/picture/goods/detail_more.png')" mode="aspectFit" /></view> -->
</view>
<view class="item service" @click="openMerchantsServicePopup()" v-if="goodsSkuDetail.goods_service.length">
<view class="label">服务</view>
<view class="list-wrap">
<view class="item-wrap" v-for="(item, index) in goodsSkuDetail.goods_service" :key="index" v-if="index < 3">
<view class="item-wrap-box">
<view class="item-wrap-icon">
<text class="iconfont icondui" v-if="!item.icon || (!item.icon.imageUrl && !item.icon.icon)"></text>
<image class="icon-img" v-else-if="item.icon.iconType == 'img'" :src=" $util.img(item.icon.imageUrl)" />
<diy-icon class="icon-box" v-else-if="item.icon.iconType == 'icon'" :icon="item.icon.icon" :value="item.icon.style ? item.icon.style : null"></diy-icon>
</view>
<text>{{ item.service_name }}</text>
</view>
</view>
</view>
<text class="iconfont iconright"></text>
<!-- <view class="img-wrap"><image :src="$util.img('public/picture/goods/detail_more.png')" mode="aspectFit" /></view> -->
</view>
</view>
<!-- 商品属性 -->
<view @touchmove.prevent.stop>
<uni-popup ref="attributePopup" type="bottom">
<view class="goods-attribute-popup-layer popup-layer">
<view class="head-wrap" @click="closeAttributePopup()">
<text>商品属性</text>
<text class="iconfont iconclose"></text>
</view>
<scroll-view scroll-y class="goods-attribute-body">
<view class="item" v-for="(item, index) in goodsSkuDetail.goods_attr_format" :key="index">
<text class="attr-name">{{ item.attr_name }}</text>
<text class="value-name">{{ item.attr_value_name }}</text>
</view>
</scroll-view>
<view class="button-box"><button type="primary" @click="closeAttributePopup()">确定</button></view>
</view>
</uni-popup>
</view>
<!-- 商品服务 -->
<view @touchmove.prevent.stop>
<uni-popup ref="merchantsServicePopup" type="bottom">
<view class="goods-merchants-service-popup-layer popup-layer">
<view class="head-wrap" @click="closeMerchantsServicePopup()">
<text>商品服务</text>
<text class="iconfont iconclose"></text>
</view>
<scroll-view scroll-y>
<view class="item" :class="{ 'empty-desc': !item.desc }" v-for="(item, index) in goodsSkuDetail.goods_service" :key="index">
<view class="item-icon" :class="{'empty-desc':!item.desc}">
<text class="iconfont icondui color-base-text" v-if="!item.icon || (!item.icon.imageUrl && !item.icon.icon)"></text>
<image class="icon-img" v-else-if="item.icon.iconType == 'img'" :src=" $util.img(item.icon.imageUrl)" />
<diy-icon class="icon-box" v-else-if="item.icon.iconType == 'icon'" :icon="item.icon.icon" :value="item.icon.style ? item.icon.style : null"></diy-icon>
</view>
<view class="info-wrap">
<text class="title">{{ item.service_name }}</text>
<text class="describe" v-if="item.desc">{{ item.desc }}</text>
</view>
</view>
</scroll-view>
<view class="button-box"><button type="primary" @click="closeMerchantsServicePopup()">确定</button></view>
</view>
</uni-popup>
</view>
<!-- 业务区域 -->
<slot name="business"></slot>
<view class="detail-community" v-if="goodsSkuDetail.qr_data && goodsSkuDetail.qr_data.qr_state == 1">
<view class="community-box">
<image :src="$util.img('public/picture/goods/detail_erweiImage.png')" mode="aspectFill"></image>
<view class="community-content">
<view class="community-title">{{ goodsSkuDetail.qr_data.qr_name }}</view>
<view class="community-txt">{{ goodsSkuDetail.qr_data.community_describe }}</view>
</view>
</view>
<view class="community-btn" @click="onCommunity()">添加</view>
</view>
<!-- 促销 -->
<view class="community-model" @touchmove.prevent.stop @click.stop="onCloseCommunity()" v-show="isCommunity">
<view class="community-model-content" @click.stop>
<view class="community-model-content-radius"><view>添加社群</view></view>
<view class="community-model-content-draw" v-if="goodsSkuDetail.qr_data && goodsSkuDetail.qr_data.qr_img">
<image
:src="
goodsSkuDetail.qr_data.qr_img != '' && goodsSkuDetail.qr_data.qr_state == 1
? $util.img(goodsSkuDetail.qr_data.qr_img)
: $util.img('public/picture/goods/detail_erweiImage.png')
"
mode="aspectFill"
show-menu-by-longpress="true"
></image>
</view>
<view class="community-model-content-text">长按识别二维码添加社群</view>
</view>
<view class="community-model-close" @click.stop="onCloseCommunity()"><text class="iconfont iconclose"></text></view>
</view>
<!-- 参与流程 -->
<slot name="articipation"></slot>
<!-- 产品属性 -->
<!-- 商品评价 -->
<!-- <view class="group-wrap" v-if="evaluateConfig.evaluate_show == 1">-->
<!-- <view class="goods-evaluate" @click="toEvaluateDetail(goodsSkuDetail.goods_id)">-->
<!-- <view class="tit">-->
<!-- &lt;!&ndash; <view class="tit" :class="{ active: goodsEvaluate.content }"> &ndash;&gt;-->
<!-- <view>-->
<!-- <text class="color-title font-size-toolbar">-->
<!-- 评价-->
<!-- <text class="font-size-base">({{ goodsSkuDetail.evaluate }})</text>-->
<!-- </text>-->
<!-- <text class="evaluate-item-empty" v-if="!goodsSkuDetail.evaluate">暂无评价</text>-->
<!-- <view class="evaluate-item-empty" v-else>-->
<!-- <text class="font-size-tag">查看全部</text>-->
<!-- <text class="iconfont iconright font-size-tag"></text>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="evaluate-item" v-for="(item, index) in goodsEvaluate" :key="index" v-if="item.content">-->
<!-- <view class="evaluator">-->
<!-- <view class="evaluator-info">-->
<!-- <view class="evaluator-face">-->
<!-- <image-->
<!-- v-if="item.member_headimg"-->
<!-- :src="$util.img(item.member_headimg)"-->
<!-- @error="item.member_headimg = $util.getDefaultImage().head"-->
<!-- mode="aspectFill"-->
<!-- />-->
<!-- <image-->
<!-- v-else-->
<!-- :src="$util.getDefaultImage().head"-->
<!-- @error="item.member_headimg = $util.getDefaultImage().head"-->
<!-- mode="aspectFill"-->
<!-- />-->
<!-- </view>-->
<!-- <text class="evaluator-name" v-if="item.member_name.length > 2 && item.is_anonymous == 1">-->
<!-- {{ item.member_name[0] }}***{{ item.member_name[item.member_name.length - 1] }}-->
<!-- </text>-->
<!-- <text class="evaluator-name" v-else>{{ item.member_name }}</text>-->
<!-- </view>-->
<!-- <text class="time color-tip">{{ $util.timeStampTurnTime(item.create_time) }}</text>-->
<!-- </view>-->
<!-- <view class="cont margin-top">{{ item.content }}</view>-->
<!-- <scroll-view scroll-x="true">-->
<!-- <view class="evaluate-img" v-if="item.images">-->
<!-- <view class="img-box" v-for="(img, img_index) in item.images" :key="img_index" @click="previewEvaluate(index, img_index, 'images')">-->
<!-- <image :src="$util.img(img)" mode="aspectFill" />-->
<!-- </view>-->
<!-- </view>-->
<!-- </scroll-view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- 详情 -->
<view class="goods-detail-tab">
<view class="detail-tab">
<!-- <view class="tab-line"></view> -->
<view class="tab-item">商品详情</view>
<!-- <view class="tab-line"></view> -->
<!-- <view v-if="service.is_display == 1" class="tab-item" :class="detailTab == 1 ? 'active color-base-text' : ''" @click="detailTab = 1">售后保障</view> -->
</view>
<view class="detail-content active" >
<view class="detail-content-item">
<view class="goods-details" v-if="goodsSkuDetail.goods_content">
<rich-text :nodes="goodsSkuDetail.goods_content" @click="showImg($event)" :data-nodes="goodsSkuDetail.goods_content"></rich-text>
</view>
<view class="goods-details active" v-else>该商家暂无上传相关详情哦</view>
</view>
<!-- <block v-if="service">
<view class="detail-content-item" v-show="detailTab == 1 && service.is_display == 1">
<view class="goods-details" v-if="service.content">
<rich-text :nodes="service.content" @click="showImg($event)" :data-nodes="service.content"></rich-text>
</view>
<view class="goods-details active" v-else>该商品暂无相关售后哦</view>
</view>
</block> -->
</view>
</view>
<!-- 商品推荐 -->
<!-- <ns-goods-recommend ref="goodrecommend" route="goodsdetail"></ns-goods-recommend>-->
<ns-copyright></ns-copyright>
<!-- 海报 -->
<view @touchmove.prevent.stop>
<uni-popup ref="posterPopup" type="bottom" class="poster-layer">
<template v-if="poster != '-1'">
<view>
<view class="image-wrap"><image :src="$util.img(poster)" :show-menu-by-longpress="true" /></view>
<!-- #ifdef MP || APP-PLUS -->
<view class="save" @click="saveGoodsPoster()">保存图片</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="save">长按保存图片</view>
<!-- #endif -->
</view>
<view class="close iconfont iconclose" @click="closePosterPopup()"></view>
</template>
<view v-else class="msg">{{ posterMsg }}</view>
</uni-popup>
</view>
<!-- 分享弹窗 -->
<view @touchmove.prevent.stop>
<uni-popup ref="sharePopup" type="bottom" class="share-popup">
<view>
<view class="share-title">分享</view>
<view class="share-content">
<!-- #ifdef MP -->
<view class="share-box">
<button class="share-btn" :plain="true" open-type="share">
<view class="iconfont iconiconfenxianggeihaoyou"></view>
<text>分享给好友</text>
</button>
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view class="share-box" v-if="goodsCircle">
<button class="share-btn" :plain="true" @click="openBusinessView">
<view class="iconfont iconhaowuquan"></view>
<text>分享到好物圈</text>
</button>
</view>
<!-- #endif -->
<view class="share-box" @click="openPosterPopup">
<button class="share-btn" :plain="true">
<view class="iconfont iconpengyouquan"></view>
<text>生成分享海报</text>
</button>
</view>
<!-- #ifdef H5 -->
<view class="share-box" @click="copyUrl">
<button class="share-btn" :plain="true">
<view class="iconfont iconfuzhilianjie"></view>
<text>复制链接</text>
</button>
</view>
<!-- #endif -->
</view>
<view class="share-footer" @click="closeSharePopup"><text>取消分享</text></view>
</view>
</uni-popup>
</view>
<slot name="fixedbtn"></slot>
</view>
</view>
<!-- 操作区域 -->
<slot name="action"></slot>
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
<ns-login ref="login"></ns-login>
</view>
</template>
<script>
//
import uniPopup from '@/components/uni-popup/uni-popup.vue';
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
import scroll from '@/common/js/scroll-view.js';
import toTop from '@/components/toTop/toTop.vue';
import goodsDetailBase from '@/common/js/goods_detail_base.js';
import pengpaiFadeinOut from '@/components/pengpai-fadein-out/pengpai-fadein-out.vue';
import detail from './detail.js';
export default {
name: 'goods-detail-view',
props: {
goodsSkuDetail: {
type: Object,
default: () => {
return {};
}
}
},
components: {
uniPopup,
nsGoodsRecommend,
pengpaiFadeinOut,
toTop
},
mixins: [scroll, detail]
};
</script>
<style lang="scss">
@import '@/common/css/goods_detail.scss';
</style>
<style scoped></style>

View File

@ -498,7 +498,7 @@ export default {
}, },
showImg(e) { showImg(e) {
//拿到图片的路径里面的内容放在我们数组中 //拿到图片的路径里面的内容放在我们数组中
let contentimg = e.target.dataset.nodes; let contentimg = e.target.dataset.nodes || e.currentTarget.dataset.nodes;
let arrImg = []; let arrImg = [];
for (var i = 0; i < contentimg.length; i++) { for (var i = 0; i < contentimg.length; i++) {
var img = contentimg[i].children; var img = contentimg[i].children;

View File

@ -44,18 +44,31 @@
<slot name="entrance"></slot> <slot name="entrance"></slot>
<!-- 配送 --> <!-- 配送 -->
<view class="item delivery-type" v-if="goodsSkuDetail.is_virtual == 0" @click="$refs.deliveryType.open()"> <!-- <view class="item delivery-type" v-if="goodsSkuDetail.is_virtual == 0" @click="$refs.deliveryType.open()">-->
<view class="label">配送</view> <!-- <view class="label">配送</view>-->
<block v-if="deliveryType"> <!-- <block v-if="deliveryType">-->
<view class="box"> <!-- <view class="box">-->
<block v-for="(item, index) in deliveryType" :key="index"> <!-- <block v-for="(item, index) in deliveryType" :key="index">-->
<text v-if="goodsSkuDetail.support_trade_type.indexOf(index) != -1">{{ item.name }}</text> <!-- <text v-if="goodsSkuDetail.support_trade_type.indexOf(index) != -1">{{ item.name }}</text>-->
</block> <!-- </block>-->
</view> <!-- </view>-->
<text class="iconfont icon-right"></text> <!-- <text class="iconfont icon-right"></text>-->
</block> <!-- </block>-->
<block v-else><view class="box">商家未配置配送方式</view></block> <!-- <block v-else><view class="box">商家未配置配送方式</view></block>-->
</view> <!-- </view>-->
<!--针对以上地区特殊时期发货延迟-->
<view class="item delivery-type" v-if="goodsSkuDetail.is_virtual == 0" @click="$refs.deliveryType.open()">
<!-- <view class="label">配送</view>-->
<!-- <block v-if="deliveryType">-->
<!-- <view class="box">-->
<!-- <block v-for="(item, index) in deliveryType" :key="index">-->
<!-- <text v-if="goodsSkuDetail.support_trade_type.indexOf(index) != -1">{{ item.name }}</text>-->
<!-- </block>-->
<!-- </view>-->
<!-- <text class="iconfont icon-right"></text>-->
<!-- </block>-->
<block><view class="box">新疆青海西藏需补差快递其余地方快递免费</view></block>
</view>
<!-- 门店 --> <!-- 门店 -->
<view class="item store-wrap" @click="openStoreListPopup()" v-if="addonIsExist.store && Object.keys(store).length" > <view class="item store-wrap" @click="openStoreListPopup()" v-if="addonIsExist.store && Object.keys(store).length" >

View File

@ -18,7 +18,7 @@
<view class="info"> <view class="info">
<text class="num"> <text class="num">
{{ parseFloat(birthday.point) }} {{ parseFloat(birthday.point) }}
<text class="type">兑换券</text> <text class="type">积分</text>
</text> </text>
<view class="desc">用于下单时抵现或兑换商品等</view> <view class="desc">用于下单时抵现或兑换商品等</view>
</view> </view>

View File

@ -19,7 +19,7 @@
<block v-if="type == 'point'"> <block v-if="type == 'point'">
<block v-if="goodsDetail.type == 1"> <block v-if="goodsDetail.type == 1">
<view class="price-wrap"> <view class="price-wrap">
<text class="price price-color font-size-toolbar">{{ goodsDetail.point }}兑换券</text> <text class="price price-color font-size-toolbar">{{ goodsDetail.point }}积分</text>
<block v-if="goodsDetail.exchange_price != '0.00' && goodsDetail.pay_type > 0"> <block v-if="goodsDetail.exchange_price != '0.00' && goodsDetail.pay_type > 0">
<text class="unit price-color font-size-tag">+</text> <text class="unit price-color font-size-tag">+</text>
<text class="price price-color font-size-toolbar price-font">{{ $lang('common.currencySymbol') }}{{ goodsDetail.exchange_price }}</text> <text class="price price-color font-size-toolbar price-font">{{ $lang('common.currencySymbol') }}{{ goodsDetail.exchange_price }}</text>
@ -32,7 +32,7 @@
<view class="price font-size-toolbar">{{ goodsDetail.name }}</view> <view class="price font-size-toolbar">{{ goodsDetail.name }}</view>
</view> </view>
<view class="stock" style="height: auto;"> <view class="stock" style="height: auto;">
兑换券 积分
<text class="price-color">{{ goodsDetail.point }}</text> <text class="price-color">{{ goodsDetail.point }}</text>
</view> </view>
<view class="stock"> <view class="stock">
@ -350,11 +350,12 @@
<button type="primary" v-else-if="goodsDetail.stock && goodsDetail.stock != 0 && type == 'confirm'">确认</button> <button type="primary" v-else-if="goodsDetail.stock && goodsDetail.stock != 0 && type == 'confirm'">确认</button>
<template v-else-if="goodsDetail.stock && goodsDetail.stock != 0"> <template v-else-if="goodsDetail.stock && goodsDetail.stock != 0">
<template v-if="goodsDetail.buy_num"> <template v-if="goodsDetail.buy_num">
<button type="primary" v-if="goodsDetail.buy_num <= goodsDetail.stock">立即抢购</button> <!-- <button type="primary" v-if="goodsDetail.buy_num <= goodsDetail.stock">立即抢购</button>-->
<button type="primary" v-if="goodsDetail.buy_num <= goodsDetail.stock">立即兑换</button>
<button type="primary" v-else disabled="true">库存不足</button> <button type="primary" v-else disabled="true">库存不足</button>
</template> </template>
<template v-else> <template v-else>
<button type="primary">立即抢购</button> <button type="primary">立即兑换</button>
</template> </template>
</template> </template>
<button type="primary" v-else disabled="true">库存不足</button> <button type="primary" v-else disabled="true">库存不足</button>
@ -723,7 +724,7 @@ export default {
} }
}); });
}, },
// //
getPointGoodsSkuList() { getPointGoodsSkuList() {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/pointexchange/api/goods/goodsSku', url: '/pointexchange/api/goods/goodsSku',
@ -1233,7 +1234,7 @@ export default {
key: 'orderCreateData', key: 'orderCreateData',
data: data, data: data,
success: () => { success: () => {
this.$util.redirectTo('/pages/order/payment'); this.$util.redirectTo('/pages_rush/order/payment');
this.btnSwitch = false; this.btnSwitch = false;
} }
}); });
@ -1361,7 +1362,7 @@ export default {
} }
}); });
} else if (this.type == 'point') { } else if (this.type == 'point') {
// //
var data = { var data = {
id: this.goodsDetail.exchange_id, id: this.goodsDetail.exchange_id,
sku_id: this.skuId, sku_id: this.skuId,

View File

@ -1,8 +1,105 @@
<template> <template>
<view> <view>
<!-- #ifdef MP-WEIXIN -->
<view @touchmove.prevent.stop class="new-complete-info-popup" :style="{ '--background-image-': 'url('+ $util.img('public/static/img/login_bg.jpg') +')' }">
<uni-popup ref="completeInfoPopup" type="center" :maskClick="true" @change="popupChange">
<view class="new-complete-info-wrap">
<!--登录主要内容-->
<view class="login-content">
<!--登录注册按钮-->
<view class="login-buttons">
<button class="mini-btn" type="default" size="mini" @click="promiseRegisterShow">我要注册</button>
<button class="mini-btn" type="primary" size="mini" @click="promiseLogin">我要登录</button>
</view>
<!-- 取消 -->
<view class="login-cancel-button">
<button class="mini-btn" type="default" size="mini" @click="$refs.completeInfoPopup.close()">取消</button>
</view>
</view>
<!--小程序授权信息-->
<view @touchmove.prevent.stop class="complete-info-popup">
<uni-popup ref="subCompleteInfoPopup" type="bottom" :maskClick="true">
<view class="complete-info-wrap">
<view class="head">
<text class="title">
获取您的昵称头像
<template v-if="forceBindingMobileControl">
手机号
</template>
</text>
<text class="color-tip tips">
获取用户头像昵称
<template v-if="forceBindingMobileControl">
手机号
</template>
完善个人资料主要用于向用户提供具有辨识度的用户中心界面
</text>
<text class="iconfont icon-close color-tip" @click="cancelCompleteInfo"></text>
</view>
<view class="item-wrap">
<text class="label">头像</text>
<button open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image :src="avatarUrl ? avatarUrl : $util.getDefaultImage().head" @error="avatarUrl = $util.getDefaultImage().head" mode="aspectFill"></image>
<text class="iconfont icon-right color-tip"></text>
</button>
</view>
<view class="item-wrap">
<text class="label">昵称</text>
<input type="nickname" placeholder="请输入昵称" v-model="nickName" @blur="blurNickName" maxlength="50" />
</view>
<view class="item-wrap" v-if="forceBindingMobileControl">
<text class="label">手机号</text>
<button open-type="getPhoneNumber" class="auth-login" @getphonenumber="getPhoneNumber">
<text class="mobile" v-if="formData.mobile">{{ formData.mobile }}</text>
<text class="color-base-text" v-else>获取手机号</text>
</button>
</view>
<button type="default" class="save-btn" @click="saveMp" :disabled="isDisabled">保存</button>
</view>
</uni-popup>
</view>
<!--注册时 承诺书填写弹框-->
<view @touchmove.prevent.stop class="complete-info-popup">
<uni-popup ref="registerPopup" type="bottom" :maskClick="true">
<view class="complete-info-wrap">
<view class="head">
<!--承诺书相关操作-->
<view class="promise-block">
<textarea v-model="promise_text" class="promise-textarea" placeholder-style="color: #e04242" placeholder="请输入以下承诺内容!" auto-height/>
<view class="promise-content">
<view class="promise-text">
<span class="promise-text-title">承诺内容</span>
{{ registerConfig.promise }}
<span class="promise-copy-button" @click="$util.copy(registerConfig.promise)">[复制]</span>
</view>
</view>
</view>
<!--同意协议-->
<view class="agreement">
<checkbox-group @change="checkboxChange">
<label>
<checkbox value="agree" style="transform: scale(0.8)"/>同意并且接受如上段落的注册协议
</label>
</checkbox-group>
</view>
<!--改变按钮-->
<text class="iconfont icon-close color-tip" @click="$refs.registerPopup.close()"></text>
</view>
<!--确认按钮-->
<button type="primary" class="save-btn" @click="promiseRegister">注册</button>
</view>
</uni-popup>
</view>
</view>
</uni-popup>
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<!-- 完善会员资料 --> <!-- 完善会员资料 -->
<view @touchmove.prevent.stop class="complete-info-popup"> <view @touchmove.prevent.stop class="complete-info-popup">
<uni-popup ref="completeInfoPopup" type="bottom" :maskClick="false"> <uni-popup ref="completeInfoPopup" type="bottom" :maskClick="true">
<view class="complete-info-wrap"> <view class="complete-info-wrap">
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<template v-if="forceBindingMobileControl"> <template v-if="forceBindingMobileControl">
@ -29,7 +126,7 @@
<button type="default" class="save-btn" @click="saveH5" :disabled="isDisabled">保存</button> <button type="default" class="save-btn" @click="saveH5" :disabled="isDisabled">保存</button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-BAIDU --> <!-- #ifdef MP-QQ || MP-BAIDU -->
<view class="head"> <view class="head">
<text class="title"> <text class="title">
获取您的昵称头像 获取您的昵称头像
@ -69,7 +166,10 @@
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
<!-- #endif -->
<!--注册内容-->
<register-reward ref="registerReward"></register-reward> <register-reward ref="registerReward"></register-reward>
</view> </view>
</template> </template>
@ -119,11 +219,17 @@ export default {
authMobileData: { authMobileData: {
iv: '', iv: '',
encryptedData: '' encryptedData: ''
} },
//
promise_text: '',//
request_type: 'login',// register= login=
popup_show: false,
is_checked: false,
}; };
}, },
options: { styleIsolation: 'shared' }, options: { styleIsolation: 'shared' },
created() { created() {
//
this.getRegisterConfig(); this.getRegisterConfig();
// #ifdef H5 // #ifdef H5
if (!uni.getStorageSync('token')) this.getCaptchaConfig(); if (!uni.getStorageSync('token')) this.getCaptchaConfig();
@ -182,6 +288,15 @@ export default {
}); });
}, },
open(url) { open(url) {
// #ifdef MP-WEIXIN
//
if(!this.popup_show){
this.$refs.completeInfoPopup.open();
return false;
}
// #endif
if (url) this.url = url; if (url) this.url = url;
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
this.getCode((authData) => { this.getCode((authData) => {
@ -209,8 +324,14 @@ export default {
else this.$util.redirectTo('/pages_tool/login/login'); else this.$util.redirectTo('/pages_tool/login/login');
}, },
cancelCompleteInfo() { cancelCompleteInfo() {
if (this.$refs.completeInfoPopup) this.$refs.completeInfoPopup.close(); // #ifdef MP-WEIXIN
this.$store.commit('setBottomNavHidden', false); // this.$refs.subCompleteInfoPopup.close()
// #endif
// #ifndef MP-WEIXIN
if (this.$refs.completeInfoPopup) this.$refs.completeInfoPopup.close();
this.$store.commit('setBottomNavHidden', false); //
// #endif
}, },
blurNickName(e) { blurNickName(e) {
if (e.detail.value) this.nickName = e.detail.value; if (e.detail.value) this.nickName = e.detail.value;
@ -403,10 +524,7 @@ export default {
}); });
this.$refs.completeInfoPopup.close(); this.$refs.completeInfoPopup.close();
this.$store.commit('setBottomNavHidden', false); // this.$store.commit('setBottomNavHidden', false); //
// if (res.data.is_register) this.$refs.registerReward.open(); if (res.data.is_register) this.$refs.registerReward.open();
this.$nextTick(()=>{
this.$refs.registerReward.open();
})
} else { } else {
this.isSub = false; this.isSub = false;
this.getCaptcha(); this.getCaptcha();
@ -467,11 +585,7 @@ export default {
this.cancelCompleteInfo(); this.cancelCompleteInfo();
} }
}); });
// if (res.data.is_register) this.$refs.registerReward.open(); if (res.data.is_register) this.$refs.registerReward.open();
this.$nextTick(()=>{
this.$refs.registerReward.open();
})
} else { } else {
this.$util.showToast({ title: res.message }); this.$util.showToast({ title: res.message });
} }
@ -490,10 +604,23 @@ export default {
key: 'authInfo', key: 'authInfo',
data: data data: data
}); });
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member'); if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
//let url = type === 'authLogin' ? '/api/login/auth' : '/api/login/authonlylogin';
let url = '/api/login/auth';
//
console.log(data);
console.log(this.registerConfig);
console.log(this.promise_text);
if(this.registerConfig.promise.length > 0){
data.promise_text = this.promise_text;
data.is_promise = 1;
data.request_type = this.request_type;
url = '/api/login/auth';
}
//
this.$api.sendRequest({ this.$api.sendRequest({
url: type == 'authLogin' ? '/api/login/auth' : '/api/login/authonlylogin', url: url,
data, data,
success: res => { success: res => {
if (res.code >= 0) { if (res.code >= 0) {
@ -503,18 +630,19 @@ export default {
success: () => { success: () => {
this.$store.dispatch('getCartNumber'); this.$store.dispatch('getCartNumber');
this.$store.commit('setToken', res.data.token); this.$store.commit('setToken', res.data.token);
// if (res.data.is_register) this.$refs.registerReward.open(); if (res.data.is_register) this.$refs.registerReward.open();
this.$nextTick(()=>{ // #ifdef MP-WEIXIN
this.$refs.registerReward.open(); this.$refs.completeInfoPopup.close()
}) // #endif
this.cancelCompleteInfo(); this.cancelCompleteInfo();
} }
}); });
setTimeout(() => { setTimeout(() => {
uni.hideLoading(); uni.hideLoading();
}, 1000); }, 1000);
} else if (res.code == -10016) { }
else if (res.code == -10016) {
let register_error = res.message; let register_error = res.message;
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/register/config', url: '/api/register/config',
@ -537,6 +665,10 @@ export default {
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.$util.showToast({ title: res.message }); this.$util.showToast({ title: res.message });
// #ifdef MP-WEIXIN
this.cancelCompleteInfo()
// #endif
} }
}, },
fail: () => { fail: () => {
@ -564,18 +696,74 @@ export default {
}); });
return; return;
} }
let authData = uni.getStorageSync('authInfo'); let authData = uni.getStorageSync('authInfo');
if (authData) Object.assign(authData, {nickName: this.nickName, avatarUrl: this.headImg}); if (authData) {
uni.setStorageSync('authInfo', authData); Object.assign(authData, {nickName: this.nickName, avatarUrl: this.headImg});
uni.setStorageSync('authInfo', authData);
if (this.forceBindingMobileControl) this.bindMobile(); if (this.forceBindingMobileControl) this.bindMobile();
else this.authLogin(authData); else this.authLogin(authData);
} } else {
this.getCode((authData) => {
Object.assign(authData, {nickName: this.nickName, avatarUrl: this.headImg});
uni.setStorageSync('authInfo', authData);
if (this.forceBindingMobileControl) this.bindMobile();
else this.authLogin(authData);
})
}
},
//
promiseLogin(){
this.request_type = 'login';
this.getCode((authData) => {
this.authLogin(authData);
})
},
//
popupChange(e){
this.popup_show = e.show;
if(e.show) this.$store.commit('setBottomNavHidden', true); //
else this.$store.commit('setBottomNavHidden', false); //
},
// -
promiseRegisterShow(){
this.request_type = 'register';
if (!uni.getStorageSync('source_member')){
uni.showModal({
title: '请扫推广码注册',
mask: true,
duration: 2000,
showCancel: false,
success: function () {}
});
}else {
this.$refs.registerPopup.open()
}
// this.$refs.registerPopup.open()
},
// -
promiseRegister(){
//
if(!this.is_checked){
this.$util.showToast({ title: '请同意协议后进行后续操作!' });
return false;
}
//
this.$refs.registerPopup.close()
this.$refs.subCompleteInfoPopup.open();
},
//
checkboxChange(e){
let values = e.detail.value;
this.is_checked = values.includes('agree');
}
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
//
.complete-info-popup { .complete-info-popup {
.complete-info-wrap { .complete-info-wrap {
background: #fff; background: #fff;
@ -680,6 +868,128 @@ export default {
} }
} }
} }
//
.new-complete-info-popup{
.new-complete-info-wrap{
.login-content{
background: var(--background-image-) no-repeat;
background-size: 100% 100%;
//background: #e2ea00;
width: 100vw;
height: 100vh;
margin: 0!important;
padding: 0!important;
position: fixed;
left: 0;
top: 0;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
align-content: center;
.login-buttons{
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
align-content: center;
}
.mini-btn{
display: block;
width: 80vw;
height: 90rpx;
line-height: 90rpx;
border-radius: 350rpx;
font-size: 30rpx;
}
.mini-btn:nth-child(1){
margin-bottom: 50rpx!important;
}
.login-cancel-button{
margin: 0!important;
padding: 0!important;
width: 100vw;
position: fixed;
left: 0;
bottom: 100rpx;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
align-content: center;
}
}
}
.complete-info-popup{
width: 100vw!important;
.complete-info-wrap{
width: calc(100vw - 80rpx)!important;
max-height: 80vh;
overflow: auto;
border-top-right-radius: 30rpx;
border-top-left-radius: 30rpx;
.head {
position: relative;
border-bottom: none;
padding-top: 30rpx;
.promise-textarea{
width: calc(100% - 20rpx);
min-height: 300rpx;
border: 1px solid #004cff;
padding: 10rpx;
}
.promise-content{
.promise-text{
color: #000000;
font-size: 26rpx;
font-weight: bold;
.promise-text-title{
color: #e04242;
font-weight: 100;
}
}
.promise-copy-button{
font-size: 26rpx;
color: #0e940d;
font-weight: 100;
}
}
.agreement{
border: 1px solid #cccccc;
padding: 10rpx 20rpx;
margin-top: 20rpx;
border-radius: 50rpx;
}
}
.save-btn {
width: 70%;
height: 70rpx;
line-height: 70rpx;
background-color: #007aff;
color: #fff;
margin: 20rpx auto;
border-radius: 70rpx;
}
}
/deep/ .goodslist-uni-popup-box{
width: 100vw!important;
}
/deep/ .uni-popup__wrapper-box {
background: none !important;
max-width: unset !important;
max-height: unset !important;
overflow: unset !important;
}
}
}
</style> </style>
<style scoped> <style scoped>
/deep/ .reward-popup .uni-popup__wrapper-box { /deep/ .reward-popup .uni-popup__wrapper-box {

View File

@ -20,7 +20,7 @@
<view class="info"> <view class="info">
<text class="num"> <text class="num">
{{ newgift.award_list.point }} {{ newgift.award_list.point }}
<text class="type">兑换券</text> <text class="type">积分</text>
</text> </text>
<view class="desc">用于参与活动购买商品时抵扣</view> <view class="desc">用于参与活动购买商品时抵扣</view>
</view> </view>

View File

@ -15,7 +15,7 @@
<view class="payment-item" v-if="balanceDeduct > 0 && balanceConfig == 1 && sale"> <view class="payment-item" v-if="balanceDeduct > 0 && balanceConfig == 1 && sale">
<view class="iconfont icon-yue"></view> <view class="iconfont icon-yue"></view>
<view class="info-wrap"> <view class="info-wrap">
<text class="name">消费券抵扣</text> <text class="name">余额抵扣</text>
<view class="money">可用¥{{ balanceDeduct }}</view> <view class="money">可用¥{{ balanceDeduct }}</view>
</view> </view>
<ns-switch class="balance-switch" @change="useBalance" :checked="isBalance == 1"></ns-switch> <ns-switch class="balance-switch" @change="useBalance" :checked="isBalance == 1"></ns-switch>
@ -146,7 +146,7 @@ export default {
close() { close() {
this.$refs.choosePaymentPopup.close(); this.$refs.choosePaymentPopup.close();
}, },
// 使 // 使
useBalance() { useBalance() {
this.$emit('useBalance'); this.$emit('useBalance');
}, },

View File

@ -11,16 +11,17 @@
<view class="pay-money"> <view class="pay-money">
<text class="money">支付金额{{ payMoney|moneyFormat }}</text> <text class="money">支付金额{{ payMoney|moneyFormat }}</text>
</view> </view>
<view class="payment-item" style="height: 78px;" v-if="balanceDeduct > 0 && balanceUsable && balanceConfig == 1">
<view class="payment-item" v-if="balanceDeduct > 0 && balanceUsable && balanceConfig == 1">
<view class="iconfont icon-yue"></view> <view class="iconfont icon-yue"></view>
<view class="info-wrap"> <view class="info-wrap">
<text class="name">消费券抵扣</text> <text class="name">余额抵扣</text>
<view class="money">可用¥{{ balanceDeduct|moneyFormat }}</view> <view class="money">可用{{ balanceDeduct|moneyFormat }}</view>
<view class="money">当前{{ balance |moneyFormat }} </view>
<button @click="$util.redirectTo('/pages_tool/recharge/list')">去充值</button>
</view> </view>
<ns-switch class="balance-switch" @change="useBalance" :checked="isBalance == 1"></ns-switch> <ns-switch v-if="isOnline" class="balance-switch" @change="useBalance" :checked="isBalance == 1"></ns-switch>
</view> </view>
<block v-if="payMoney > 0"> <block v-if="payMoney > 0 && isOnline">
<block v-if="payTypeList.length"> <block v-if="payTypeList.length">
<view class="payment-item" v-for="(item, index) in payTypeList" :key="index" <view class="payment-item" v-for="(item, index) in payTypeList" :key="index"
@click="payIndex = index"> @click="payIndex = index">
@ -47,13 +48,9 @@
<script> <script>
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
import nsSwitch from '@/components/ns-switch/ns-switch.vue'; import nsSwitch from '@/components/ns-switch/ns-switch.vue';
// #ifdef H5 // #ifdef H5
import { import {Weixin} from 'common/js/wx-jssdk.js';
Weixin
} from 'common/js/wx-jssdk.js';
// #endif // #endif
export default { export default {
name: 'payment', name: 'payment',
components: { components: {
@ -61,7 +58,7 @@
nsSwitch nsSwitch
}, },
props: { props: {
// //
balanceUsable: { balanceUsable: {
type: Boolean, type: Boolean,
default: true default: true
@ -97,6 +94,7 @@
// //
sale: true, sale: true,
isBalance: 0, isBalance: 0,
isOnline: true,
balance: 0 balance: 0
}; };
}, },
@ -116,7 +114,7 @@
let money = 0; let money = 0;
if (this.payInfo) { if (this.payInfo) {
money = this.payInfo.pay_money; money = this.payInfo.pay_money;
if (this.balanceDeduct && this.isBalance && this.balanceUsable) { if (this.balanceDeduct && this.isBalance && this.balanceUsable&&this.isOnline) {
money = this.payInfo.pay_money - this.balanceDeduct; money = this.payInfo.pay_money - this.balanceDeduct;
} }
} }
@ -128,10 +126,18 @@
this.$emit('close'); this.$emit('close');
this.$refs.choosePaymentPopup.close(); this.$refs.choosePaymentPopup.close();
}, },
// 使 // 使
useBalance() { useBalance(e,isOnline=true) {
this.isBalance = this.isBalance ? 0 : 1; this.isOnline=isOnline;
this.$emit('useBalance', this.isBalance) if(e){
this.isBalance=e;
if(isOnline){
}
}else{
this.isBalance = this.isBalance ? 0 : 1;
this.$emit('useBalance', this.isBalance)
}
}, },
confirm() { confirm() {
if (this.payTypeList.length == 0 && this.payMoney > 0) { if (this.payTypeList.length == 0 && this.payMoney > 0) {
@ -140,6 +146,12 @@
}); });
return; return;
} }
if(!this.isOnline && (this.payInfo.pay_money-this.balanceDeduct)>0){
this.$util.showToast({
title: '您余额不足!'
});
return;
}
uni.showLoading({ uni.showLoading({
title: '支付中...', title: '支付中...',
mask: true mask: true
@ -169,7 +181,7 @@
}); });
}, },
/** /**
* 获取消费券配置 * 获取余额配置
*/ */
getBalanceConfig() { getBalanceConfig() {
this.$api.sendRequest({ this.$api.sendRequest({
@ -181,7 +193,7 @@
}); });
}, },
/** /**
* 获取用户消费券 * 获取用户余额
*/ */
getMemberBalance() { getMemberBalance() {
this.$api.sendRequest({ this.$api.sendRequest({
@ -235,6 +247,7 @@
success: res => { success: res => {
uni.hideLoading(); uni.hideLoading();
if (res.code >= 0) { if (res.code >= 0) {
console.log(1111);
if (res.data.pay_success) { if (res.data.pay_success) {
this.paySuccess(); this.paySuccess();
return; return;
@ -435,6 +448,7 @@
* 支付成功之后跳转 * 支付成功之后跳转
*/ */
paySuccess() { paySuccess() {
console.log(this.payInfo)
if (this.payInfo.event == 'BlindboxGoodsOrderPayNotify') { if (this.payInfo.event == 'BlindboxGoodsOrderPayNotify') {
this.$util.redirectTo('/pages_promotion/blindbox/index', { this.$util.redirectTo('/pages_promotion/blindbox/index', {
outTradeNo: this.payInfo.out_trade_no outTradeNo: this.payInfo.out_trade_no
@ -509,10 +523,9 @@
height: calc(100% - 270rpx); height: calc(100% - 270rpx);
} }
} }
.popup-footer { .popup-footer {
height: 100rpx; height: 100rpx;
margin-top:30px;
.confirm-btn { .confirm-btn {
height: 72rpx; height: 72rpx;
line-height: 72rpx; line-height: 72rpx;
@ -521,7 +534,6 @@
margin: 20rpx 30rpx 0; margin: 20rpx 30rpx 0;
border-radius: $border-radius; border-radius: $border-radius;
} }
&.bottom-safe-area { &.bottom-safe-area {
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
@ -587,11 +599,18 @@
font-size: $font-size-base; font-size: $font-size-base;
flex: 1; flex: 1;
} }
.money { .money {
color: $color-tip; color: $color-tip;
font-size: $font-size-tag; font-size: $font-size-tag;
} }
.confirm-btn {
height: 72rpx;
line-height: 72rpx;
color: #fff;
text-align: center;
margin: 20rpx 30rpx 0;
border-radius: $border-radius;
}
} }
.box { .box {

View File

@ -1,92 +1,76 @@
<template> <template>
<view> <view>
<view @touchmove.prevent.stop v-if="reward" class="reward-popup"> <view @touchmove.prevent.stop v-if="reward" class="reward-popup">
<!-- <uni-popup ref="registerReward" type="center" :maskClick="false">--> <uni-popup ref="registerReward" type="center" :maskClick="false">
<!-- <view class="reward-wrap">--> <view class="reward-wrap">
<!-- <image :src="$util.img('public/uniapp/register_reward/register_reward_img.png')" mode="widthFix" class="bg-img-head"></image>--> <image :src="$util.img('public/uniapp/register_reward/register_reward_img.png')" mode="widthFix" class="bg-img-head"></image>
<!-- <image :src="$util.img('public/uniapp/register_reward/register_reward_money.png')" mode="widthFix" class="bg-img-money"></image>--> <image :src="$util.img('public/uniapp/register_reward/register_reward_money.png')" mode="widthFix" class="bg-img-money"></image>
<!-- <image :src="$util.img('public/uniapp/register_reward/register_reward_head.png')" mode="widthFix" class="bg-img"></image>--> <image :src="$util.img('public/uniapp/register_reward/register_reward_head.png')" mode="widthFix" class="bg-img"></image>
<!-- <view class="wrap">--> <view class="wrap">
<!-- <view>--> <view>
<!-- <scroll-view scroll-y="true" class="register-box">--> <scroll-view scroll-y="true" class="register-box">
<!-- <view class="reward-content">--> <view class="reward-content">
<!-- <view class="reward-item" v-if="reward.point > 0">--> <view class="reward-item" v-if="reward.point > 0">
<!-- <view class="head">兑换券奖励</view>--> <view class="head">积分奖励</view>
<!-- <view class="content">--> <view class="content">
<!-- <view class="info">--> <view class="info">
<!-- <view>--> <view>
<!-- <text class="num">{{ reward.point }}</text>--> <text class="num">{{ reward.point }}</text>
<!-- <text class="type">兑换券</text>--> <text class="type">积分</text>
<!-- </view>--> </view>
<!-- <view class="desc">用于下单时抵现或兑换商品等</view>--> <view class="desc">用于下单时抵现或兑换商品等</view>
<!-- </view>--> </view>
<!-- <view class="tip" @click="closeRewardPopup('point')">立即查看</view>--> <view class="tip" @click="closeRewardPopup('point')">立即查看</view>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- <view class="reward-item" v-if="reward.growth > 0">--> <view class="reward-item" v-if="reward.growth > 0">
<!-- <view class="head">成长值</view>--> <view class="head">成长值</view>
<!-- <view class="content">--> <view class="content">
<!-- <view class="info">--> <view class="info">
<!-- <view>--> <view>
<!-- <text class="num">{{ reward.growth }}</text>--> <text class="num">{{ reward.growth }}</text>
<!-- <text class="type">成长值</text>--> <text class="type">成长值</text>
<!-- </view>--> </view>
<!-- <view class="desc">用于提升会员等级</view>--> <view class="desc">用于提升会员等级</view>
<!-- </view>--> </view>
<!-- <view class="tip" @click="closeRewardPopup('growth')">立即查看</view>--> <view class="tip" @click="closeRewardPopup('growth')">立即查看</view>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- <view class="reward-item" v-if="reward.balance > 0">--> <view class="reward-item" v-if="reward.balance > 0">
<!-- <view class="head">红包奖励</view>--> <view class="head">红包奖励</view>
<!-- <view class="content">--> <view class="content">
<!-- <view class="info">--> <view class="info">
<!-- <view>--> <view>
<!-- <text class="num">{{ reward.balance }}</text>--> <text class="num">{{ reward.balance }}</text>
<!-- <text class="type"></text>--> <text class="type"></text>
<!-- </view>--> </view>
<!-- <view class="desc">不可提现下单时可用</view>--> <view class="desc">不可提现下单时可用</view>
<!-- </view>--> </view>
<!-- <view class="tip" @click="closeRewardPopup('balance')">立即查看</view>--> <view class="tip" @click="closeRewardPopup('balance')">立即查看</view>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- <view class="reward-item" v-if="reward.coupon_list.length > 0">--> <view class="reward-item" v-if="reward.coupon_list.length > 0">
<!-- <view class="head">优惠券奖励</view>--> <view class="head">优惠券奖励</view>
<!-- <view class="content" v-for="(item, index) in reward.coupon_list" :key="index">--> <view class="content" v-for="(item, index) in reward.coupon_list" :key="index">
<!-- <view class="info">--> <view class="info">
<!-- <view>--> <view>
<!-- <text class="num coupon-name">{{ item.coupon_name }}</text>--> <text class="num coupon-name">{{ item.coupon_name }}</text>
<!-- </view>--> </view>
<!-- <view class="desc" v-if="item.at_least > 0">--> <view class="desc" v-if="item.at_least > 0">
<!-- {{ item.at_least }}{{ item.type == 'discount' ? '打' + item.discount + '折' : '减' + item.money }}--> {{ item.at_least }}{{ item.type == 'discount' ? '打' + item.discount + '折' : '减' + item.money }}
<!-- </view>--> </view>
<!-- <view class="desc" v-else>无门槛{{ item.type == 'discount' ? '' + item.discount + '' : '' + item.money }}</view>--> <view class="desc" v-else>无门槛{{ item.type == 'discount' ? '' + item.discount + '' : '' + item.money }}</view>
<!-- </view>--> </view>
<!-- <view class="tip" @click="closeRewardPopup('coupon')">立即查看</view>--> <view class="tip" @click="closeRewardPopup('coupon')">立即查看</view>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- </scroll-view>--> </scroll-view>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- <view class="close-btn" @click="closeRewardPopup()"><text class="iconfont icon-close"></text></view>--> <view class="close-btn" @click="closeRewardPopup()"><text class="iconfont icon-close"></text></view>
<!-- </view>--> </view>
<!-- </uni-popup>--> </uni-popup>
<!-- 版本更新弹窗弹窗 -->
<uni-popup ref="registerReward" type="center" :maskClick="false">
<view class="version-popup-content">
<image class="img" :src="$util.img('app/shop/view/public/img/login/new_member.png')" mode="widthFix"></image>
<!-- <view class="title" >版本更新</view>-->
<view class="text">
恭喜你获得新人专属福利<br>
现送给你
</view>
<view class="jifen">
<view class="num">{{newuser_points}}</view>
<view class="jifen_text">积分</view>
</view>
<view class="button_img" @click="$refs.registerReward.close()">立即领取</view>
</view>
</uni-popup>
</view> </view>
</view> </view>
</template> </template>
@ -103,8 +87,7 @@ export default {
data() { data() {
return { return {
reward: null, reward: null,
back: '', back: ''
newuser_points: ''
}; };
}, },
created() { created() {
@ -115,12 +98,11 @@ export default {
}, },
open(back) { open(back) {
if (back) this.back = back; if (back) this.back = back;
// if (this.addonIsExist.memberregister) { if (this.addonIsExist.memberregister) {
this.getFenxiaoBasics();
this.getRegisterReward(); this.getRegisterReward();
// } else { } else {
// this.closeRewardPopup(); this.closeRewardPopup();
// } }
}, },
cancel() { cancel() {
this.$refs.registerReward.close(); this.$refs.registerReward.close();
@ -134,37 +116,14 @@ export default {
success: res => { success: res => {
if (res.code >= 0) { if (res.code >= 0) {
let data = res.data; let data = res.data;
// if (data.is_use == 1 && (data.value.point > 0 || data.value.balance > 0 || data.value.growth > 0 || data.value.coupon_list.length > 0)) { if (data.is_use == 1 && (data.value.point > 0 || data.value.balance > 0 || data.value.growth > 0 || data.value.coupon_list.length > 0)) {
this.reward = data.value; this.reward = data.value;
setTimeout(()=> { setTimeout(()=> {
this.$refs.registerReward.open(); this.$refs.registerReward.open();
}) })
// } else { } else {
// this.closeRewardPopup(); this.closeRewardPopup();
// } }
} else {
this.closeRewardPopup();
}
}
});
},
/**
* 获取新人礼配置
*/
getFenxiaoBasics() {
this.$api.sendRequest({
url: '/fenxiao/api/config/basics',
success: res => {
if (res.code >= 0) {
let data = res.data;
// if (data.is_use == 1 && (data.value.point > 0 || data.value.balance > 0 || data.value.growth > 0 || data.value.coupon_list.length > 0)) {
this.newuser_points = data.newuser_points;
// setTimeout(()=> {
// this.$refs.registerReward.open();
// })
// } else {
// this.closeRewardPopup();
// }
} else { } else {
this.closeRewardPopup(); this.closeRewardPopup();
} }
@ -324,80 +283,4 @@ export default {
} }
} }
} }
.version-popup-content{
.img{
width: 580rpx;
left: -5rpx;
}
.title{
position: absolute;
top: 68rpx;
left: 0;
right: 0;
margin: auto;
text-align: center;
font-size: large;
font-weight: 900;
color: white;
}
.con_title{
margin-top: 44rpx;
//margin-bottom: 14rpx;
font-size: 44rpx;
font-weight: 900;
color: #B6634F;
}
.text{
font-size: 36rpx;
color: #ffeed2;
line-height: 1.5;
position: absolute;
top: 300rpx;
left: 0;
right: 0;
margin: auto;
width: 400rpx;
text-align: center;
}
.jifen{
margin: auto;
display: flex;
position: absolute;
top: 400rpx;
width: 400rpx;
left: 0;
right: 0;
align-items: baseline;
justify-content: center;
.num{
font-size: 88rpx;
color: #ffeed2;
line-height: 1.5;
text-align: center;
}
.jifen_text{
font-size: 36rpx;
color: #ffeed2;
line-height: 1.5;
text-align: center;
}
}
.button_img{
//background: url("./public/img/index/friend-farm-button.png");
top: 590rpx;
width: 240rpx;
left: 0;
right: 0;
margin: auto;
position: absolute;
background-size: cover;
height: 80rpx;
font-size: 35rpx;
text-align: center;
font-weight: 900;
color: #e63c3d;
line-height: 80rpx;
}
}
</style> </style>

View File

@ -0,0 +1,7 @@
{
"uni-popup.cancel": "cancel",
"uni-popup.ok": "ok",
"uni-popup.placeholder": "pleace enter",
"uni-popup.title": "Hint",
"uni-popup.shareTitle": "Share to"
}

View File

@ -0,0 +1,8 @@
import en from './en.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
export default {
en,
'zh-Hans': zhHans,
'zh-Hant': zhHant
}

View File

@ -0,0 +1,7 @@
{
"uni-popup.cancel": "取消",
"uni-popup.ok": "确定",
"uni-popup.placeholder": "请输入",
"uni-popup.title": "提示",
"uni-popup.shareTitle": "分享到"
}

View File

@ -0,0 +1,7 @@
{
"uni-popup.cancel": "取消",
"uni-popup.ok": "確定",
"uni-popup.placeholder": "請輸入",
"uni-popup.title": "提示",
"uni-popup.shareTitle": "分享到"
}

View File

@ -0,0 +1,26 @@
export default {
data() {
return {
}
},
created(){
this.popup = this.getParent()
},
methods:{
/**
* 获取父元素实例
*/
getParent(name = 'uniPopup') {
let parent = this.$parent;
let parentName = parent.$options.name;
while (parentName !== name) {
parent = parent.$parent;
if (!parent) return false
parentName = parent.$options.name;
}
return parent;
},
}
}

View File

@ -1,4 +1,4 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '兑换券中心' title: '积分中心'
} }

View File

@ -1,13 +1,13 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '我的消费券', title: '我的余额',
accountBalance: '账户消费券 ', accountBalance: '账户余额 ',
money:' (元)', money:' (元)',
recharge: '充值', recharge: '充值',
withdrawal: '提现', withdrawal: '提现',
balanceDetailed: '消费券明细', balanceDetailed: '余额明细',
emptyTips: '暂无消费券记录', emptyTips: '暂无余额记录',
rechargeRecord:'充值记录', rechargeRecord:'充值记录',
ableAccountBalance:'现金消费券 ', ableAccountBalance:'现金余额 ',
noAccountBalance:'储值消费券 ', noAccountBalance:'储值余额 ',
} }

View File

@ -1,4 +1,4 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '消费券明细' title: '余额明细'
} }

View File

@ -27,10 +27,10 @@ export const lang = {
pintuanOrder: '拼团订单', pintuanOrder: '拼团订单',
yushouOrder: '预售订单', yushouOrder: '预售订单',
message: '我的消息', message: '我的消息',
exchangeOrder: '兑换券兑换', exchangeOrder: '积分兑换',
// 推广中心 // 推广中心
balance: '消费券', balance: '余额',
point: '兑换券', point: '积分',
coupon: '优惠券', coupon: '优惠券',
memberRecommend: '邀请有礼', memberRecommend: '邀请有礼',
myPresale: '我的预售', myPresale: '我的预售',

View File

@ -1,4 +1,4 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '我的兑换券' title: '我的积分'
} }

View File

@ -1,6 +1,6 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '兑换券明细', title: '积分明细',
emptyTpis: '您暂时还没有兑换券记录哦!', emptyTpis: '您暂时还没有积分记录哦!',
pointExplain: '兑换券说明' pointExplain: '积分说明'
} }

View File

@ -1,4 +1,4 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '兑换券商城' title: '积分商城'
} }

View File

@ -1,4 +1,4 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '兑换券兑换订单详情' title: '积分兑换订单详情'
} }

View File

@ -1,5 +1,5 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '兑换券兑换', title: '积分兑换',
emptyTips: '暂无更多数据了' emptyTips: '暂无更多数据了'
} }

View File

@ -10,6 +10,12 @@ import Lang from './common/js/lang.js'
import Config from './common/js/config.js' import Config from './common/js/config.js'
import globalConfig from './common/js/golbalConfig.js'; import globalConfig from './common/js/golbalConfig.js';
// #ifdef H5
import 'vant/lib/index.less';
import Vant from 'vant';
Vue.use(Vant);
// #endif
Vue.prototype.$store = store //挂在vue Vue.prototype.$store = store //挂在vue
Vue.config.productionTip = false Vue.config.productionTip = false

View File

@ -1,8 +1,8 @@
{ {
"name" : "单商户V4", "name" : "山野乡涧",
"appid" : "__UNI__460ACE5", "appid" : "__UNI__FF65C97",
"description" : "", "description" : "",
"versionName" : "5.1.2", "versionName" : "1.0.1",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
@ -58,7 +58,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx8bbb428472fccb07", "appid" : "wx833c180138b65656",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"postcss" : false, "postcss" : false,
@ -76,6 +76,7 @@
// "version" : "1.2.0", // "version" : "1.2.0",
// "provider" : "wx2b03c6e691cd7370" // "provider" : "wx2b03c6e691cd7370"
// } // }
"serviceProviderTicket" : "lyBy46wZhpT1CufMdv3hjl4GoiqOTDEQJ4jzK/Bdgbp7tSPVA+GnFpbEOqonmg95mLN88ZgH+EjENA81Q/7zIBA7dHm8h1luiOI=",
"requiredPrivateInfos" : [ "chooseLocation", "getLocation", "chooseAddress" ] "requiredPrivateInfos" : [ "chooseLocation", "getLocation", "chooseAddress" ]
}, },
"mp-alipay" : { "mp-alipay" : {

File diff suppressed because one or more lines are too long

128
package-lock.json generated
View File

@ -1,11 +1,121 @@
{ {
"requires": true, "name": "miaogou.cdlfjy.com",
"lockfileVersion": 1, "lockfileVersion": 2,
"dependencies": { "requires": true,
"mescroll-uni": { "packages": {
"version": "1.1.8", "": {
"resolved": "https://registry.npmjs.org/mescroll-uni/-/mescroll-uni-1.1.8.tgz", "dependencies": {
"integrity": "sha512-l1JJP6NVc5pCkojNWz7U1kcdw7f40ZDS1PGJ8NEI5/TDn22AKahLQJCdKTWwpx+jOZWX+aSiwFsIvcz11cnidQ==" "jweixin-module": "^1.4.1",
} "vant": "^2.12.51"
} }
},
"node_modules/@babel/runtime": {
"version": "7.19.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz",
"integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==",
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@vant/icons": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.8.0.tgz",
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
},
"node_modules/@vant/popperjs": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.3.0.tgz",
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
},
"node_modules/@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz",
"integrity": "sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA=="
},
"node_modules/jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"node_modules/regenerator-runtime": {
"version": "0.13.10",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz",
"integrity": "sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw=="
},
"node_modules/vant": {
"version": "2.12.51",
"resolved": "https://registry.npmjs.org/vant/-/vant-2.12.51.tgz",
"integrity": "sha512-0dZHcBWwKdQvgvAMr5hqObuwkHRn51c7ReLVDV/Ijp1twZ/9/JGMPKVCp1ebpzFAONudyDvu42adrkFUhheaUA==",
"dependencies": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.7.1",
"@vant/popperjs": "^1.1.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"vue-lazyload": "1.2.3"
},
"peerDependencies": {
"vue": ">= 2.6.0"
}
},
"node_modules/vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
}
},
"dependencies": {
"@babel/runtime": {
"version": "7.19.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz",
"integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"@vant/icons": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.8.0.tgz",
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
},
"@vant/popperjs": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.3.0.tgz",
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
},
"@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz",
"integrity": "sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA=="
},
"jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"regenerator-runtime": {
"version": "0.13.10",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz",
"integrity": "sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw=="
},
"vant": {
"version": "2.12.51",
"resolved": "https://registry.npmjs.org/vant/-/vant-2.12.51.tgz",
"integrity": "sha512-0dZHcBWwKdQvgvAMr5hqObuwkHRn51c7ReLVDV/Ijp1twZ/9/JGMPKVCp1ebpzFAONudyDvu42adrkFUhheaUA==",
"requires": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.7.1",
"@vant/popperjs": "^1.1.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"vue-lazyload": "1.2.3"
}
},
"vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
}
}
} }

6
package.json Normal file
View File

@ -0,0 +1,6 @@
{
"dependencies": {
"vant": "^2.12.51",
"jweixin-module": "^1.4.1"
}
}

View File

@ -52,60 +52,10 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},
//******************12******************
{
"path": "pages/order/payment",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/order/list",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
{
"path": "pages/order/detail",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
//
{
"path": "pages/order/detail_local_delivery",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
//
{
"path": "pages/order/detail_pickup",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
//
{
"path": "pages/order/detail_point",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
} }
], ],
"subPackages": [{ "subPackages": [
{
//******************26****************** //******************26******************
"root": "pages_promotion", "root": "pages_promotion",
"pages": [ "pages": [
@ -522,7 +472,7 @@
// #endif // #endif
} }
}, },
//----------2---------- //----------2----------
{ {
"path": "point/list", "path": "point/list",
"style": { "style": {
@ -639,7 +589,8 @@
//#endif //#endif
"navigationBarTitleText": "礼品卡" "navigationBarTitleText": "礼品卡"
} }
}, { },
{
"path": "giftcard/member", "path": "giftcard/member",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -647,7 +598,8 @@
//#endif //#endif
"navigationBarTitleText": "我的" "navigationBarTitleText": "我的"
} }
}, { },
{
"path": "giftcard/detail", "path": "giftcard/detail",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -655,7 +607,8 @@
//#endif //#endif
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, { },
{
"path": "giftcard/order_list", "path": "giftcard/order_list",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -663,7 +616,8 @@
//#endif //#endif
"navigationBarTitleText": "订单列表" "navigationBarTitleText": "订单列表"
} }
}, { },
{
"path": "giftcard/order_detail", "path": "giftcard/order_detail",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -671,7 +625,8 @@
//#endif //#endif
"navigationBarTitleText": "订单详情" "navigationBarTitleText": "订单详情"
} }
}, { },
{
"path": "giftcard/list", "path": "giftcard/list",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -680,7 +635,8 @@
"navigationBarTitleText": "卡包" "navigationBarTitleText": "卡包"
} }
}, { },
{
"path": "giftcard/card_info", "path": "giftcard/card_info",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -688,7 +644,8 @@
//#endif //#endif
"navigationBarTitleText": "礼品卡详情" "navigationBarTitleText": "礼品卡详情"
} }
}, { },
{
"path": "giftcard/give", "path": "giftcard/give",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -696,7 +653,8 @@
//#endif //#endif
"navigationBarTitleText": "礼品卡赠送" "navigationBarTitleText": "礼品卡赠送"
} }
}, { },
{
"path": "giftcard/give_info", "path": "giftcard/give_info",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -704,7 +662,8 @@
//#endif //#endif
"navigationBarTitleText": "领取礼品卡" "navigationBarTitleText": "领取礼品卡"
} }
}, { },
{
"path": "giftcard/member_give_info", "path": "giftcard/member_give_info",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -712,7 +671,8 @@
//#endif //#endif
"navigationBarTitleText": "礼品卡详情" "navigationBarTitleText": "礼品卡详情"
} }
}, { },
{
"path": "giftcard/exchange", "path": "giftcard/exchange",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -720,7 +680,8 @@
//#endif //#endif
"navigationBarTitleText": "卡密激活" "navigationBarTitleText": "卡密激活"
} }
}, { },
{
"path": "giftcard/payment", "path": "giftcard/payment",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -728,7 +689,8 @@
//#endif //#endif
"navigationBarTitleText": "待付款订单" "navigationBarTitleText": "待付款订单"
} }
}, { },
{
"path": "giftcard/receive_list", "path": "giftcard/receive_list",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -736,7 +698,8 @@
//#endif //#endif
"navigationBarTitleText": "收到的卡片" "navigationBarTitleText": "收到的卡片"
} }
}, { },
{
"path": "giftcard/give_list", "path": "giftcard/give_list",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -744,7 +707,8 @@
//#endif //#endif
"navigationBarTitleText": "赠送的卡片" "navigationBarTitleText": "赠送的卡片"
} }
}, { },
{
"path": "giftcard/card_use", "path": "giftcard/card_use",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -752,7 +716,8 @@
//#endif //#endif
"navigationBarTitleText": "礼品卡使用" "navigationBarTitleText": "礼品卡使用"
} }
}, { },
{
"path": "giftcard/not_exist", "path": "giftcard/not_exist",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -760,7 +725,8 @@
//#endif //#endif
"navigationBarTitleText": "礼品卡不存在" "navigationBarTitleText": "礼品卡不存在"
} }
}, { },
{
"path": "giftcard/use_select", "path": "giftcard/use_select",
"style": { "style": {
//#ifdef H5 //#ifdef H5
@ -929,7 +895,16 @@
// #ifdef H5 // #ifdef H5
"navigationStyle": "custom", "navigationStyle": "custom",
// #endif // #endif
"navigationBarTitleText": "分销商" "navigationBarTitleText": "服务商"
}
},
{
"path": "fenxiao/apply_upgrade",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "代理申请"
} }
} }
] ]
@ -1006,22 +981,6 @@
// #endif // #endif
} }
}, },
{
"path": "member/integral/transfer",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
{
"path": "member/balance_transfer",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
{ {
"path": "member/account", "path": "member/account",
"style": { "style": {
@ -1051,17 +1010,12 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "member/goufang", "path": "member/balance_transfer",
"style": { "style": {
"navigationStyle": "custom" // "navigationStyle": "custom"
} "navigationBarTitleText": "转账"
},
{
"path": "member/goufang_to_balance",
"style": {
"navigationStyle": "custom"
} }
}, },
{ {
@ -1575,9 +1529,192 @@
} }
} }
] ]
},
{
"root": "pages_rush",
"pages": [
//****************** ******************
{
"path": "article/list",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "文章"
}
},
{
"path": "article/record",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "文章"
}
},
{
"path": "article/detail",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "文章"
}
},
//****************** ******************
{
"path": "futures/list",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "交易市场"
}
},
{
"path": "futures/seckill",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "限时秒杀"
}
},
{
"path": "futures/details",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "商品详情"
}
},
{
"path": "futures/my_shop",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "我的小店"
}
},
{
"path": "futures/order",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "我的订单"
}
},
{
"path": "futures/order_details",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "订单详情"
}
},
{
"path": "futures/payment",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "交易下单"
}
},
//****************** ******************
{
"path": "message/index",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "消息中心"
}
},
{
"path": "message/list",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "消息列表"
}
},
{
"path": "message/words",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "留言反馈"
}
},
//******************12******************
{
"path": "order/payment",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "order/list",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
{
"path": "order/detail",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
{
"path": "order/detail_local_delivery",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
{
"path": "order/detail_pickup",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
{
"path": "order/detail_point",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
}
]
} }
], ],
"globalStyle": { "globalStyle": {
// #ifdef MP-WEIXIN
"usingComponents": {
"van-tabs": "/wxcomponents/@vant/weapp/tabs/index",
"van-tab": "/wxcomponents/@vant/weapp/tab/index",
"van-button": "/wxcomponents/@vant/weapp/button/index",
"van-cell": "/wxcomponents/@vant/weapp/cell/index",
"van-loading": "/wxcomponents/@vant/weapp/loading/index",
"van-popup": "/wxcomponents/@vant/weapp/popup/index",
"van-share-sheet": "/wxcomponents/@vant/weapp/share-sheet/index"
},
// #endif
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",

View File

@ -48,15 +48,13 @@
</text> </text>
<text class="price-symbol price-font"> <text class="price-symbol price-font">
.{{ .{{
parseFloat(goodsSkuDetail.discount_price) parseFloat(goodsSkuDetail.discount_price).toFixed(2).split('.')[1]
.toFixed(2)
.split('.')[1]
}} }}
</text> </text>
</template> </template>
<template v-else> <template v-else>
<template v-if="goodsSkuDetail.member_price > 0"> <template v-if="goodsSkuDetail.member_price > 0">
<view class="member-vip-wrap"><image :src="$util.img('public/uniapp/goods/member_vip.png')" mode="aspectFit"></image></view> <!--<view class="member-vip-wrap"><image :src="$util.img('public/uniapp/goods/member_vip.png')" mode="aspectFit"></image></view>-->
<text class="price-symbol price-font">{{ $lang('common.currencySymbol') }}</text> <text class="price-symbol price-font">{{ $lang('common.currencySymbol') }}</text>
<text class="price price-font"> <text class="price price-font">
{{ {{
@ -72,36 +70,34 @@
.split('.')[1] .split('.')[1]
}} }}
</text> </text>
<!-- <view class="member-price-wrap">--> <view class="member-price-wrap">
<!-- <text class="unit price-font">原价</text>--> <!--<text class="unit price-font">原价</text>-->
<!-- <text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>--> <text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
<!-- <text class="money price-font">{{ goodsSkuDetail.price }}</text>--> <text class="money price-font">{{ goodsSkuDetail.price }}</text>
<!-- </view>--> </view>
</template> </template>
<template v-else> <template v-else>
<text class="price price-font"> <text class="price price-font">
{{ {{
parseFloat(goodsSkuDetail.price) parseFloat(goodsSkuDetail.price).toFixed(2).split('.')[0]
.toFixed(2)
.split('.')[0]
}} }}
</text> </text>
<text class="price-symbol price-font"> <text class="price-symbol price-font">
.{{ .{{parseFloat(goodsSkuDetail.price).toFixed(2).split('.')[1]}}
parseFloat(goodsSkuDetail.price)
.toFixed(2)
.split('.')[1]
}}
</text> </text>
</template> </template>
</template> </template>
<view class="market-price-wrap" v-if="goodsSkuDetail.market_price_show"> <!--<view class="market-price-wrap" v-if="goodsSkuDetail.market_price_show">-->
<text class="unit price-font" v-if="(showDiscount && goodsSkuDetail.price > 0) || goodsSkuDetail.market_price > 0"> <!-- <text class="unit price-font" v-if="(showDiscount && goodsSkuDetail.price > 0) || goodsSkuDetail.market_price > 0">-->
{{ $lang('common.currencySymbol') }} <!-- {{ $lang('common.currencySymbol') }}-->
</text> <!-- </text>-->
<text class="money price-font" v-if="showDiscount && goodsSkuDetail.price > 0">{{ goodsSkuDetail.price }}</text> <!-- <text class="money price-font" v-if="showDiscount && goodsSkuDetail.price > 0">{{ goodsSkuDetail.price }}</text>-->
<text class="money price-font" v-else-if="goodsSkuDetail.market_price > 0">{{ goodsSkuDetail.market_price }}</text> <!-- <text class="money price-font" v-else-if="goodsSkuDetail.market_price > 0">{{ goodsSkuDetail.market_price }}</text>-->
</view> <!--</view>-->
<view class="give-diamond" v-if="parseFloat(goodsSkuDetail.give_diamond) > 0">
<image class="give-diamond-image" :src="$util.img('public/static/img/futures/give_diamond.png')" mode="widthFix"></image>
{{ parseFloat(goodsSkuDetail.give_diamond) }}颗猕猴桃
</view>
<view class="follow-and-share"> <view class="follow-and-share">
<text class="follow iconfont icon-share" @click="openSharePopup()"></text> <text class="follow iconfont icon-share" @click="openSharePopup()"></text>
<text class="share iconfont" @click="editCollection()" :class="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'"></text> <text class="share iconfont" @click="editCollection()" :class="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'"></text>
@ -400,7 +396,7 @@
<ns-goods-action :safeArea="isIphoneX"> <ns-goods-action :safeArea="isIphoneX">
<template v-if="goodsSkuDetail.goods_state == 1"> <template v-if="goodsSkuDetail.goods_state == 1">
<ns-goods-action-icon text="首页" icon="icon-shouye1" @click="goHome" /> <ns-goods-action-icon text="首页" icon="icon-shouye1" @click="goHome" />
<ns-goods-action-icon text="客服" icon="icon-kefu" :send-data="contactData" :chatParam="chatRoomParams" /> <!-- <ns-goods-action-icon text="客服" icon="icon-kefu" :send-data="contactData" :chatParam="chatRoomParams" /> -->
<ns-goods-action-icon <ns-goods-action-icon
text="购物车" text="购物车"
:cornerMarkBg="themeStyle.goods_detail.goods_cart_num_corner" :cornerMarkBg="themeStyle.goods_detail.goods_cart_num_corner"
@ -419,8 +415,7 @@
goodsSkuDetail.limit_type == 2 && goodsSkuDetail.limit_type == 2 &&
goodsSkuDetail.max_buy != 0 && goodsSkuDetail.max_buy != 0 &&
goodsSkuDetail.purchased_num >= goodsSkuDetail.max_buy goodsSkuDetail.purchased_num >= goodsSkuDetail.max_buy
" ">
>
<!-- (goodsSkuDetail.is_limit == 1 && goodsSkuDetail.limit_type == 1 && goodsSkuDetail.max_buy != 0) --> <!-- (goodsSkuDetail.is_limit == 1 && goodsSkuDetail.limit_type == 1 && goodsSkuDetail.max_buy != 0) -->
<ns-goods-action-button class="goods-action-button active3" disabled-text="已达最大限购数量" :disabled="true" /> <ns-goods-action-button class="goods-action-button active3" disabled-text="已达最大限购数量" :disabled="true" />
</block> </block>
@ -489,6 +484,29 @@ export default {
<style lang="scss"> <style lang="scss">
@import '@/common/css/goods_detail.scss'; @import '@/common/css/goods_detail.scss';
@import './public/css/detail.scss'; @import './public/css/detail.scss';
.give-diamond{
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: center;
align-items: center;
border: 2rpx solid #f13453;
color: #f13453;
font-size: 24rpx;
height: 38rpx;
line-height: 38rpx;
padding: 0 15rpx;
border-radius: 60rpx;
margin-left: 30rpx;
.give-diamond-image{
width: 22rpx!important;
height: 22rpx!important;
margin-right: 5rpx;
}
}
</style> </style>
<style scoped> <style scoped>
/deep/ .action-icon-wrap .iconfont.icon-shouye1 { /deep/ .action-icon-wrap .iconfont.icon-shouye1 {

View File

@ -351,7 +351,7 @@ export default {
cart_ids: cart_ids.toString() cart_ids: cart_ids.toString()
}, },
success: () => { success: () => {
this.$util.redirectTo('/pages/order/payment'); this.$util.redirectTo('/pages_rush/order/payment');
this.isSub = false; this.isSub = false;
} }
}); });

View File

@ -403,7 +403,7 @@ export default {
if (item.point != undefined || item.coupon != undefined) { if (item.point != undefined || item.coupon != undefined) {
let text = ''; let text = '';
if (item.point != undefined) { if (item.point != undefined) {
text = '送' + item.point + '兑换券'; text = '送' + item.point + '积分';
} }
if (item.coupon != undefined && item.coupon_data != undefined) { if (item.coupon != undefined && item.coupon_data != undefined) {
item.coupon_data.forEach((couponItem, couponIndex) => { item.coupon_data.forEach((couponItem, couponIndex) => {

View File

@ -90,4 +90,7 @@ export default {
.hide { .hide {
display: none; display: none;
} }
/deep/ .member-info{
padding-top: 0!important;
}
</style> </style>

View File

@ -23,7 +23,6 @@ export default {
onLoad(data) { onLoad(data) {
uni.hideTabBar(); uni.hideTabBar();
this.name = 'DIY_VIEW_MEMBER_INDEX'; this.name = 'DIY_VIEW_MEMBER_INDEX';
if (data.code) { if (data.code) {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/wechat/api/wechat/authcodetoopenid', url: '/wechat/api/wechat/authcodetoopenid',
@ -33,8 +32,7 @@ export default {
success: res => { success: res => {
if (res.code >= 0) { if (res.code >= 0) {
if (res.data.userinfo.nickName) this.modifyNickname(res.data.userinfo.nickName); if (res.data.userinfo.nickName) this.modifyNickname(res.data.userinfo.nickName);
if (res.data.userinfo.avatarUrl) this.modifyHeadimg(res.data.userinfo if (res.data.userinfo.avatarUrl) this.modifyHeadimg(res.data.userinfo.avatarUrl);
.avatarUrl);
} }
} }
}); });

View File

@ -174,13 +174,13 @@
</block> </block>
<block v-if="launchInfo.status == 1"> <block v-if="launchInfo.status == 1">
<button class="btn" @click="buyNow" v-if="launchInfo.order_id == 0">立即支付</button> <button class="btn" @click="buyNow" v-if="launchInfo.order_id == 0">立即支付</button>
<button class="btn" v-if="launchInfo.order_id > 0" @click="$util.redirectTo('/pages/order/detail', { order_id: launchInfo.order_id })"> <button class="btn" v-if="launchInfo.order_id > 0" @click="$util.redirectTo('/pages_rush/order/detail', { order_id: launchInfo.order_id })">
查看订单 查看订单
</button> </button>
<button class="btn-vice" @click="$util.redirectTo('/pages/index/index')">低价拿更多商品</button> <button class="btn-vice" @click="$util.redirectTo('/pages/index/index')">低价拿更多商品</button>
</block> </block>
<block v-if="launchInfo.status == 2"> <block v-if="launchInfo.status == 2">
<button class="btn" v-if="launchInfo.order_id > 0" @click="$util.redirectTo('/pages/order/detail', { order_id: launchInfo.order_id })"> <button class="btn" v-if="launchInfo.order_id > 0" @click="$util.redirectTo('/pages_rush/order/detail', { order_id: launchInfo.order_id })">
查看订单 查看订单
</button> </button>
<button class="btn" @click="$util.redirectTo('/pages/index/index')">低价拿更多商品</button> <button class="btn" @click="$util.redirectTo('/pages/index/index')">低价拿更多商品</button>
@ -197,7 +197,7 @@
</block> </block>
<block v-else> <block v-else>
<view class="flex-box success"> <view class="flex-box success">
<button class="btn" v-if="launchInfo.self && launchInfo.order_id > 0" @click="$util.redirectTo('/pages/order/detail', { order_id: launchInfo.order_id })"> <button class="btn" v-if="launchInfo.self && launchInfo.order_id > 0" @click="$util.redirectTo('/pages_rush/order/detail', { order_id: launchInfo.order_id })">
查看订单 查看订单
</button> </button>
<button class="btn-vice disabled">活动已结束</button> <button class="btn-vice disabled">活动已结束</button>
@ -445,7 +445,7 @@
</template> </template>
<script> <script>
import LTime from '@/components/l-time/l-time.vue'; import LTime from '@/pages_promotion/components/l-time/l-time.vue';
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
import goodsSku from '@/components/ns-goods-sku/ns-goods-sku.vue'; import goodsSku from '@/components/ns-goods-sku/ns-goods-sku.vue';
import nsLogin from '@/components/ns-login/ns-login.vue'; import nsLogin from '@/components/ns-login/ns-login.vue';

View File

@ -427,7 +427,7 @@ export default {
} }
}); });
}, },
// 使 // 使
useBalance() { useBalance() {
if (this.is_balance) { if (this.is_balance) {
this.is_balance = 0; this.is_balance = 0;
@ -603,7 +603,7 @@ export default {
} }
}, },
computed: { computed: {
// //
balanceDeduct() { balanceDeduct() {
if (this.info.member_info) { if (this.info.member_info) {
if (this.info.is_balance == 1) { if (this.info.is_balance == 1) {

View File

@ -50,7 +50,7 @@
</template> </template>
<script> <script>
import nsAdv from '@/components/ns-adv/ns-adv.vue'; import nsAdv from '@/pages_promotion/components/ns-adv/ns-adv.vue';
export default { export default {
components: { components: {
nsAdv nsAdv

View File

@ -183,7 +183,7 @@ export default {
}); });
}, },
look(e) { look(e) {
this.$util.redirectTo('/pages/order/list', { order_id: e.order_id }); this.$util.redirectTo('/pages_rush/order/list', { order_id: e.order_id });
} }
} }
}; };

View File

@ -287,7 +287,7 @@ export default {
success: res => { success: res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
this.$util.redirectTo('/pages/order/list', {}, 'redirectTo'); this.$util.redirectTo('/pages_rush/order/list', {}, 'redirectTo');
} else { } else {
if(res.data == ""){ if(res.data == ""){
this.$util.showToast({ this.$util.showToast({

View File

@ -87,7 +87,7 @@ export default {
}, },
toOrderDetail(item) { toOrderDetail(item) {
if(item.type == "order"){ if(item.type == "order"){
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_rush/order/detail', {
order_id: item.order_id order_id: item.order_id
}); });
} }

View File

@ -37,7 +37,7 @@
</template> </template>
<script> <script>
import nsAdv from '@/components/ns-adv/ns-adv.vue'; import nsAdv from '@/pages_promotion/components/ns-adv/ns-adv.vue';
export default { export default {
components: { components: {

View File

@ -116,7 +116,7 @@
</template> </template>
<script> <script>
import yuyueDate from '@/components/yuyue-date/yuyue-date.vue'; import yuyueDate from '@/pages_promotion/components/yuyue-date/yuyue-date.vue';
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default { export default {
components: { components: {

View File

@ -50,7 +50,7 @@
</template> </template>
<script> <script>
import yuyueDate from '@/components/yuyue-date/yuyue-date.vue'; import yuyueDate from '@/pages_promotion/components/yuyue-date/yuyue-date.vue';
export default { export default {
components: { components: {
yuyueDate yuyueDate

View File

@ -402,5 +402,5 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import './yuyue-date.scss'; @import 'yuyue-date';
</style> </style>

View File

@ -8,7 +8,6 @@
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<!-- <view class="head-nav color-base-bg" :class="{ active: isIphoneX }"></view> --> <!-- <view class="head-nav color-base-bg" :class="{ active: isIphoneX }"></view> -->
<!-- #endif --> <!-- #endif -->
<view v-if="status === ''"> <view v-if="status === ''">
<block v-if="basicsConfig.is_apply == 1"> <block v-if="basicsConfig.is_apply == 1">
<view class="image" :class="fenXiaoAgreement.agreement.img ? '' : 'color-base-bg'"> <view class="image" :class="fenXiaoAgreement.agreement.img ? '' : 'color-base-bg'">
@ -18,7 +17,6 @@
<view class="bg-img"><image :src="$util.img('public/uniapp/fenxiao/apply/edit.png')" mode="scaleToFill"></image></view> <view class="bg-img"><image :src="$util.img('public/uniapp/fenxiao/apply/edit.png')" mode="scaleToFill"></image></view>
</view> </view>
</view> </view>
<view class="apply-wrap"> <view class="apply-wrap">
<view class="app-info"> <view class="app-info">
<view class="info"> <view class="info">
@ -51,7 +49,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="apply-message-wrap" v-if="fenxiaoConfig.fenxiao_condition == 2 || fenxiaoConfig.fenxiao_condition == 3"> <view class="apply-message-wrap" v-if="fenxiaoConfig.fenxiao_condition == 2 || fenxiaoConfig.fenxiao_condition == 3">
<view class="apply-message"> <view class="apply-message">
<view class="apply-message-title color-base-bg-before">分销商申请条件</view> <view class="apply-message-title color-base-bg-before">分销商申请条件</view>
@ -136,8 +133,8 @@
<text v-if="status == 1">您已提交{{ fenxiaoWords.fenxiao_name }}申请等待平台审核</text> <text v-if="status == 1">您已提交{{ fenxiaoWords.fenxiao_name }}申请等待平台审核</text>
<block v-else-if="status == -1"> <block v-else-if="status == -1">
<text>您提交的{{ fenxiaoWords.fenxiao_name }}申请已被拒绝请再接再厉</text> <text>您提交的{{ fenxiaoWords.fenxiao_name }}申请已被拒绝请再接再厉</text>
<view class="again-btn color-base-bg" @click="againApply" v-if="fenxiaoConfig.fenxiao_condition != 0">重新申请</view> <view class="again-btn color-base-bg" @click="againApply">重新申请</view>
<view class="again-btn color-base-bg" @click="applyFenXiao" v-else>重新申请</view> <!-- <view class="again-btn color-base-bg" @click="applyFenXiao" v-else>重新申请</view> -->
</block> </block>
</view> </view>
<view @touchmove.prevent v-if="fenXiaoAgreement.document"> <view @touchmove.prevent v-if="fenXiaoAgreement.document">
@ -426,7 +423,6 @@ export default {
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.image { .image {
width: 100%; width: 100%;
@ -497,7 +493,6 @@ input::placeholder {
.apply-adv { .apply-adv {
width: 100%; width: 100%;
} }
.apply-wrap { .apply-wrap {
padding-bottom: 100rpx; padding-bottom: 100rpx;
.app-info { .app-info {
@ -793,13 +788,11 @@ input::placeholder {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
image { image {
width: 300rpx; width: 300rpx;
height: 176rpx; height: 176rpx;
margin-bottom: 50rpx; margin-bottom: 50rpx;
} }
text { text {
font-size: $font-size-goods-tag; font-size: $font-size-goods-tag;
font-weight: 600; font-weight: 600;

View File

@ -0,0 +1,566 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="apply-upgrade">
<view v-if="status === ''">
<!--顶部提示内容-->
<view class="top-tips" v-if="parseInt(info.status) === 3">驳回原因{{ info.reject_cause }}</view>
<!--表单让你-->
<view class="title">1.填写注册申请代理的信息</view>
<view class="form-list">
<view class="form-list-block">
<view class="left">真实姓名</view>
<view class="right"><input class="uni-input" v-model="info.username" placeholder="请输入真实姓名" /></view>
</view>
<view class="form-list-block">
<view class="left">联系电话</view>
<view class="right"><input class="uni-input" v-model="info.mobile" placeholder="请输入联系电话" /></view>
</view>
<view class="form-list-block">
<view class="left">身份证号</view>
<view class="right"><input class="uni-input" v-model="info.id_card" placeholder="请输入身份证号" /></view>
</view>
</view>
<view class="title">2.请拍摄并上传你的有效身份证</view>
<view class="id-card">
<view class="id-card-content">
<view class="id-card-block">
<image :src="$util.img(info.id_card_front || default_card_front)" mode="widthFix"></image>
<view class="upload-buttons" @click="uploadCard('id_card_front')">上传身份证正面</view>
</view>
<view class="id-card-block">
<image :src="$util.img(info.id_card_reverse || default_card_reverse)" mode="widthFix"></image>
<view class="upload-buttons" @click="uploadCard('id_card_reverse')">上传身份证反面</view>
</view>
</view>
<view class="id-card-tips">
<view class="id-card-tips-line">大陆公民持有的本人有效二代身份证</view>
<view class="id-card-tips-line">
上传时确保身份证
<text class="tips-stress">边框完整字体清晰亮度均匀</text>
</view>
</view>
</view>
<view class="title" v-if="parseInt(info.status) === 3 || parseInt(info.status) === 0">3.请完成协议</view>
<view class="agree" v-if="parseInt(info.status) === 3 || parseInt(info.status) === 0">
<textarea class="textarea-content" placeholder="请填写如下段落" auto-height v-model="info.upgrade_agree"></textarea>
<view class="agree-text">
<text class="agree-red">请输入这段话</text>
{{ basicsConfig.upgrade_agree }}
<text class="agree-red" @click="$util.copy(basicsConfig.upgrade_agree)">[复制]</text>
</view>
</view>
<button class="submit-button" @click="submitApply">确定提交</button>
</view>
<view class="empty" v-else>
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix"></image>
<text v-if="status == 1">您已提交{{ fenxiaoWords.fenxiao_name }}申请等待平台审核</text>
<block v-else-if="status == -1">
<text>您提交的{{ fenxiaoWords.fenxiao_name }}申请已被拒绝请再接再厉</text>
<view class="again-btn color-base-bg" @click="againApply">重新申请</view>
</block>
</view>
<!--登录弹框-->
<ns-login ref="login"></ns-login>
<!--加载动画-->
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>
<script>
import fenxiaoWords from 'common/js/fenxiao-words.js';
export default {
components: {},
data() {
return {
isChecked: false,
isShow: true,
isIphoneX: false,
//
sourceMemberInfo: {
fenxiao_name: '无'
},
formData: {
fenXiaoName: '',
mobile: ''
},
fenXiaoAgreement: {
agreement: {},
document: {}
},
isAgreement: false,
back: '',
isAbled: false,
status: '',
isSub: false,
fenxiaoConfig: {
fenxiao_condition: 0
},
basicsConfig: {},
goodsList: [],
isOpen: false,
baseInfo: {},
default_card_front: 'public/static/img/fenxiao/id_card_front.png',
default_card_reverse: 'public/static/img/fenxiao/id_card_reverse.png',
info: {
username: '',
mobile: '',
id_card: '',
id_card_front: '',
id_card_reverse: '',
upgrade_agree: '',
status: 0
}
};
},
mixins: [fenxiaoWords],
onLoad(option) {
if (option.back) this.back = option.back;
},
onReady() {
// if (uni.getStorageSync('token')) {
// this.getBaseInfo();
// } else {
// this.$refs.login.open('/pages_promotion/fenxiao/apply_upgrade');
// }
},
async onShow() {
setTimeout(() => {
if (this.addonIsExist && !this.addonIsExist.fenxiao) {
this.$util.showToast({
title: '商家未开启分销',
mask: true,
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index');
}, 2000);
return;
}
}, 1000);
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '申请');
if (uni.getStorageSync('token')) {
this.applyStatus();
this.getSourceMemberInfo();
} else {
this.$util.redirectTo(
'/pages_tool/login/login',
{
back: '/pages_promotion/fenxiao/apply'
},
'redirectTo'
);
}
this.getFenxiaoConfig();
this.getFenxiaoBasicsConfig();
},
methods: {
toClose() {
this.$refs.applyPopup.close();
},
ckeckedRuler() {
this.isChecked = !this.isChecked;
},
goodsImg(imgStr) {
let imgs = imgStr.split(',');
return imgs[0]
? this.$util.img(imgs[0], {
size: 'mid'
})
: this.$util.getDefaultImage().goods;
},
imgError(index) {
this.goodsList[index].goods_image = this.$util.getDefaultImage().goods;
},
onOpen() {
this.isOpen = this.isOpen ? false : true;
this.getFenxiaoConfig();
},
goodsTag(data) {
return data.label_name || '';
},
applyStatus() {
this.$api.sendRequest({
url: '/fenxiao/api/apply/status',
data: {},
success: res => {
if (res.code >= 0 && res.data) {
this.status = res.data.status;
this.isSub = false;
if (this.status == 2) {
this.$util.redirectTo('/pages/member/index');
}
}
this.$refs.loadingCover.hide();
}
});
},
navigateBack() {
this.$util.goBack();
},
//
getAgreement() {
this.$api.sendRequest({
url: '/fenxiao/api/config/agreement',
success: res => {
if (res.code === 0) {
this.fenXiaoAgreement = res.data;
if (this.fenXiaoAgreement.agreement.is_agreement === '1') {
this.isAgreement = true;
}
}
}
});
},
openPopup() {
if (this.isAgreement) this.$refs.applyPopup.open();
},
closePopup() {
this.$refs.applyPopup.close();
},
fenXiaoValidata() {
let rule = [
{
name: 'fenXiaoName',
checkType: 'required',
errorMsg: '请输入' + this.fenxiaoWords.fenxiao_name + '名称'
},
{
name: 'mobile',
checkType: 'required',
errorMsg: '请输入手机号'
},
{
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
}
];
var checkRes = validate.check(this.formData, rule);
if (checkRes) {
return true;
} else {
this.$util.showToast({
title: validate.error
});
return false;
}
},
// 广
getSourceMemberInfo() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/sourceinfo',
success: res => {
if (res.code == 0 && res.data) {
this.sourceMemberInfo = res.data;
}
}
});
},
/**
* 重新申请
*/
againApply() {
this.status = '';
},
/**
* 获取申请条件
*/
getFenxiaoConfig() {
this.$api.sendRequest({
url: '/fenxiao/api/config/fenxiao',
data: {},
success: res => {
if (res.code >= 0 && res.data) {
this.fenxiaoConfig = res.data;
this.goodsList = res.data.goods_list;
if (this.goodsList.length <= 3) {
this.isShow = false;
} else if (this.goodsList.length > 3 && this.isOpen == true) {
this.isShow = true;
this.goodsList = res.data.goods_list.slice(0, 3);
}
}
}
});
},
/**
* 获取分销基本配置
*/
getFenxiaoBasicsConfig() {
this.$api.sendRequest({
url: '/fenxiao/api/config/basics',
data: {},
success: res => {
if (res.code >= 0 && res.data) {
this.basicsConfig = res.data;
}
}
});
},
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index');
return true;
},
//
getBaseInfo() {
let _this = this;
_this.$api.sendRequest({
url: '/fenxiao/api/apply/upgradeBase',
success: res => {
if (res.code === 0) {
_this.baseInfo = res.data;
if (res.data.info) _this.info = res.data.info;
if (parseInt(this.info.status) === 2) {
_this.$util.showToast({
title: '审核已经通过',
mask: true,
duration: 1000,
success: function() {
setTimeout(() => {
_this.$util.redirectTo('/pages_promotion/fenxiao/index', {}, 'redirectTo');
}, 1000);
}
});
}
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} else {
this.$util.showToast({
title: res.message
});
}
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
//
uploadCard(type) {
let _this = this;
this.$util.upload(1, { path: 'evaluateimg' }, res => {
if (type === 'id_card_front') _this.info.id_card_front = res[0];
else _this.info.id_card_reverse = res[0];
this.$forceUpdate();
});
},
//
submitApply() {
let _this = this;
let defaultRule = [
{ name: 'username', checkType: 'required', errorMsg: '请输入真实姓名' },
{ name: 'mobile', checkType: 'required', errorMsg: '请输入联系电话' },
{ name: 'mobile', checkType: 'phoneno', errorMsg: '请输入正确的手机号' },
{ name: 'id_card', checkType: 'required', errorMsg: '请输入身份证号' },
{ name: 'id_card_front', checkType: 'required', errorMsg: '请上传身份证正面' },
{ name: 'id_card_reverse', checkType: 'required', errorMsg: '请上传身份证反面' },
{ name: 'upgrade_agree', checkType: 'required', errorMsg: '请输入协议内容以代表同意当前协议' },
{ name: 'upgrade_agree', checkType: 'same', errorMsg: '协议不一致,请检查输入协议是否和下放协议内容一直', checkRule: this.basicsConfig.upgrade_agree }
];
_this.$util
.verify(_this.info, defaultRule)
.then(res => {
_this.$api.sendRequest({
url: '/fenxiao/api/apply/applyfenxiao',
data: {
..._this.info,
fenxiao_condition: 1
},
success: res => {
if (res.code >= 0 && res.data) {
if (this.basicsConfig.is_examine == 1) {
this.applyStatus();
} else {
this.$util.redirectTo('/pages_promotion/fenxiao/index');
}
} else {
this.isSub = false;
this.$util.showToast({
title: res.message
});
}
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
})
.catch(reject => {
console.log(reject);
});
}
},
onBackPress(options) {
if (options.from === 'navigateBack') return false;
this.$util.redirectTo('/pages/member/index');
return true;
}
};
</script>
<style lang="scss" scoped>
.apply-upgrade {
padding: 30rpx;
.top-tips {
color: #f56c6c;
background-color: #fde2e2;
position: relative;
left: -15px;
top: -15px;
width: 100%;
padding: 15px;
line-height: 20px;
font-size: 15px;
}
.title {
width: 100%;
font-size: 30rpx;
color: #999999;
margin-bottom: 20rpx;
}
.form-list {
.form-list-block {
width: 100%;
color: #000000;
height: 90rpx;
line-height: 90rpx;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
align-items: center;
justify-content: space-between;
.left {
height: 70rpx;
font-size: 30rpx;
width: 240rpx;
}
.right {
font-size: 30rpx;
width: calc(100% - 240rpx);
input {
height: 70rpx;
text-align: right;
font-size: 30rpx;
color: #898989;
}
}
}
}
.id-card {
.id-card-content {
width: 100%;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
align-items: flex-start;
justify-content: space-between;
.id-card-block {
width: calc(50% - 15rpx);
position: relative;
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: center;
align-items: center;
overflow: hidden;
padding-top: 20rpx;
padding-bottom: 75rpx;
/deep/ image {
width: 90%;
div {
background-position: top center !important;
}
}
.upload-buttons {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
font-size: 32rpx;
text-align: center;
background: #5581fe;
color: #ecefff;
height: 60rpx;
line-height: 60rpx;
}
}
}
.id-card-tips {
padding: 30rpx 0;
.id-card-tips-line {
.tips-stress {
color: #e15c5c;
}
}
}
}
.agree {
.textarea-content {
width: calc(100% - 40rpx);
border: 2rpx solid #7796e9;
border-radius: 20rpx;
padding: 20rpx;
min-height: 300rpx;
font-size: 30rpx;
}
.agree-text {
font-size: 26rpx;
line-height: 40rpx;
margin-top: 20rpx;
.agree-red {
font-size: 26rpx;
line-height: 40rpx;
color: #ee7877;
}
}
}
.submit-button {
background: #5581fe;
border-radius: 100rpx;
color: #cbd9f7;
font-size: 30rpx;
height: 70rpx;
line-height: 70rpx;
margin-top: 100rpx;
}
.again-btn {
display: flex;
justify-content: center;
width: auto;
border-radius: $border-radius;
margin-top: 20rpx;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
padding: 10rpx 60rpx;
box-sizing: border-box;
}
.empty {
width: 100%;
margin-top: 200rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
image {
width: 300rpx;
height: 176rpx;
margin-bottom: 50rpx;
}
text {
font-size: $font-size-goods-tag;
font-weight: 600;
}
}
}
</style>

View File

@ -28,8 +28,7 @@ export default {
data() { data() {
return { return {
accountList: {}, accountList: {},
showEmpty: true, showEmpty: true
type: ''
}; };
}, },
onShow() { onShow() {
@ -48,12 +47,8 @@ export default {
}, 1000); }, 1000);
}, },
onLoad(res){
this.type = res.type
},
methods: { methods: {
getData(mescroll) { getData(mescroll) {
// this.type = this.$route.query.type;
if (mescroll.num == 1) { if (mescroll.num == 1) {
this.accountList = []; this.accountList = [];
} }
@ -61,8 +56,7 @@ export default {
url: '/fenxiao/api/account/page', url: '/fenxiao/api/account/page',
data: { data: {
page: mescroll.num, page: mescroll.num,
page_size: mescroll.size, page_size: mescroll.size
type: this.type
}, },
success: res => { success: res => {
let newArr = []; let newArr = [];

View File

@ -27,7 +27,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="empty" v-if="goodsList.length == 0"><ns-empty :isIndex="false" text="暂无分销商品"></ns-empty></view> <view class="empty" v-if="goodsList.length == 0"><ns-empty :isIndex="false" text="暂无商品"></ns-empty></view>
</block> </block>
</mescroll-uni> </mescroll-uni>
<view class="active-btn" v-if="goodsList.length"> <view class="active-btn" v-if="goodsList.length">

View File

@ -3,86 +3,39 @@
<view class="fenxiao-index"> <view class="fenxiao-index">
<block v-if="info.fenxiao_id > 0"> <block v-if="info.fenxiao_id > 0">
<!-- 头部 --> <!-- 头部 -->
<view class="fenxiao-index-header" :class="{'not-level': !levelList.length}" :style="{background: 'url('+ $util.img('public/uniapp/fenxiao/index/header_bg.png') +') no-repeat top left / 100% 100%'}"> <view
class="fenxiao-index-header"
:class="{ 'not-level': !levelList.length }"
:style="{ background: 'url(' + $util.img('public/uniapp/fenxiao/index/header_bg.png') + ') no-repeat top left / 100% 100%' }">
<view class="member"> <view class="member">
<view class="member-pic"> <view class="member-pic">
<image :src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head" <image
@error="info.headimg = $util.getDefaultImage().head" mode="aspectFill"></image> :src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head"
@error="info.headimg = $util.getDefaultImage().head"
mode="aspectFill"
></image>
<!-- <text class="level-name ">{{ info.level_name }}</text> --> <!-- <text class="level-name ">{{ info.level_name }}</text> -->
</view> </view>
<view class="member-info"> <view class="member-info">
<view @click="toLevel()" class="member-info-box"> <view class="member-info-box">
<text class="name">{{ info.fenxiao_name }}</text> <text class="name">{{ info.fenxiao_name }}</text>
</view> </view>
<view class="recommend" v-if="info.level_num > 0"> <view class="recommend" v-if="info.level_num > 0">{{ info.level_name }}</view>
{{ info.level_name }}
</view>
</view> </view>
</view> </view>
<view class="fenxiao-level-wrap" v-if="levelList.length"> <view class="fenxiao-level-wrap" v-if="levelList.length">
<image :src="$util.img('public/uniapp/fenxiao/index/level_icon.png')" mode="heightFix" class="level-icon"></image> <image :src="$util.img('public/uniapp/fenxiao/index/level_icon.png')" mode="heightFix" class="level-icon"></image>
<view class="level-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/level')"> <view class="level-wrap">
<view class="title">{{ info.level_num > 0 ? info.level_name : '等级未解锁' }}</view> <view class="title">{{ info.level_name }}</view>
<view class="desc">下单邀请好友均可提升等级</view> <view class="desc" v-if="parseInt(info.is_apply_upgrade) === 1">提交申请可以提升等级</view>
</view> </view>
<view class="btn" @click="$refs.taskPopup.open()" v-if="info.condition.last_level">做任务</view> <view class="btn" @click="$util.redirectTo('/pages_promotion/fenxiao/apply_upgrade')" v-if="parseInt(info.is_apply_upgrade) === 1">申请升级</view>
</view> </view>
</view> </view>
<!-- <view class="fenxiao-index-allmoney">-->
<!-- <view class="allmoney-top-money">-->
<!-- <view class="allmoney-top">-->
<!-- <view class="font-size-sub">{{ fenxiaoWords.withdraw }}</view>-->
<!-- <view class="withdrawal-record" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">提现记录<text class="iconfont icon-right"></text></view>-->
<!-- </view>-->
<!-- <view class="total-commission price-font">{{ info.account }}</view>-->
<!-- </view>-->
<!-- <view class="allmoney-bottom">-->
<!-- <view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">-->
<!-- <view class="title">{{ fenxiaoWords.account }}</view>-->
<!-- <view class="money price-font">{{ info.total_commission | moneyFormat }}</view>-->
<!-- </view>-->
<!-- <view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">-->
<!-- <view class="title">已提现{{ fenxiaoWords.account }}</view>-->
<!-- <view class="money price-font">{{ info.account_withdraw | moneyFormat }}</view>-->
<!-- </view>-->
<!-- <view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">-->
<!-- <view class="title">提现中{{ fenxiaoWords.account }}</view>-->
<!-- <view class="money price-font">{{ info.account_withdraw_apply | moneyFormat }}</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="withdraw-btn" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')">申请提现</view>-->
<!-- </view>-->
<view
class="account-info">
<!-- v-show="value.style == 2"-->
<!-- :style="{ 'margin-left': parseInt(value.infoMargin) * 2 + 'rpx', 'margin-right': parseInt(value.infoMargin) * 2 + 'rpx' }"-->
<!-- <view class="solid"></view>-->
<view class="account-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
<view class="value price-font">{{ info && info.points != undefined ? info.points : '--' }}</view>
<view class="title">积分</view>
</view>
<view class="solid"></view>
<view class="account-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
<view class="value price-font">{{ info && info.contribution != undefined ? info.contribution : '--' }}</view>
<view class="title">贡献值</view>
</view>
<view class="solid"></view>
<view class="account-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
<view class="value price-font">{{ info && info.house_purchase != undefined ? info.house_purchase : '--' }}</view>
<view class="title">购房券</view>
</view>
</view>
<view class="fenxiao-team"> <view class="fenxiao-team">
<view class="fenxiao-index-other"> <view class="fenxiao-index-other">
<view @click="$util.redirectTo('/pages_promotion/fenxiao/team')" class="all-money-item"> <view @click="$util.redirectTo('/pages_promotion/fenxiao/team')" class="all-money-item">
<view class="img-wrap"> <view class="img-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/team1.png')" mode="aspectFill"></image></view>
<image :src="$util.img('public/uniapp/fenxiao/index/team1.png')" mode="aspectFill"></image>
</view>
<view class="all-money-tit-wrap"> <view class="all-money-tit-wrap">
<text class="all-money-tit">我的团队</text> <text class="all-money-tit">我的团队</text>
<text class="all-money-num">{{ teamNum.num }}</text> <text class="all-money-num">{{ teamNum.num }}</text>
@ -91,9 +44,7 @@
</view> </view>
<view class="fenxiao-index-other"> <view class="fenxiao-index-other">
<view @click="$util.redirectTo('/pages_promotion/fenxiao/child_fenxiao')" class="all-money-item"> <view @click="$util.redirectTo('/pages_promotion/fenxiao/child_fenxiao')" class="all-money-item">
<view class="img-wrap"> <view class="img-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/team2.png')" mode="aspectFill"></image></view>
<image :src="$util.img('public/uniapp/fenxiao/index/team2.png')" mode="aspectFill"></image>
</view>
<view class="all-money-tit-wrap"> <view class="all-money-tit-wrap">
<text class="all-money-tit">{{ fenxiaoWords.fenxiao_name }}</text> <text class="all-money-tit">{{ fenxiaoWords.fenxiao_name }}</text>
<text class="all-money-num">{{ info.one_child_fenxiao_num }}</text> <text class="all-money-num">{{ info.one_child_fenxiao_num }}</text>
@ -105,78 +56,61 @@
<!-- 功能列表 --> <!-- 功能列表 -->
<view class="fenxiao-menu-list"> <view class="fenxiao-menu-list">
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')"> <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
<view class="icon-wrap"> <view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/tixian.png')" mode="widthFix"></image></view>
<image :src="$util.img('public/uniapp/fenxiao/index/tixian.png')" mode="widthFix"></image>
</view>
<view class="info"> <view class="info">
<view class="title">{{ fenxiaoWords.withdraw }}明细</view> <view class="title">{{ fenxiaoWords.withdraw }}明细</view>
<view class="desc">累计{{ fenxiaoWords.account }}{{ info.total_commission | moneyFormat }}</view> <view class="desc">累计{{ fenxiaoWords.account }}{{ info.total_commission | moneyFormat }}</view>
</view> </view>
</view> </view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/order')"> <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/order')">
<view class="icon-wrap"> <view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/order.png')" mode="widthFix"></image></view>
<image :src="$util.img('public/uniapp/fenxiao/index/order.png')" mode="widthFix"></image>
</view>
<view class="info"> <view class="info">
<view class="title">{{ fenxiaoWords.concept + '订单' }}</view> <view class="title">{{ fenxiaoWords.concept + '订单' }}</view>
<view class="desc">{{ fenxiaoWords.concept + '订单' }}明细</view> <view class="desc">{{ fenxiaoWords.concept + '订单' }}明细</view>
</view> </view>
</view> </view>
<view class="menu-item" <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/promote_code', { templateId: templateId })">
@click="$util.redirectTo('/pages_promotion/fenxiao/promote_code', { templateId: templateId })"> <view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/code.png')" mode="widthFix"></image></view>
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/code.png')" mode="widthFix"></image>
</view>
<view class="info"> <view class="info">
<view class="title">推广海报</view> <view class="title">推广海报</view>
<view class="desc">邀请好友</view> <view class="desc">邀请好友</view>
</view> </view>
</view> </view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')"> <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
<view class="icon-wrap"> <view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/bill.png')" mode="widthFix"></image></view>
<image :src="$util.img('public/uniapp/fenxiao/index/bill.png')" mode="widthFix"></image>
</view>
<view class="info"> <view class="info">
<view class="title">账单报表</view> <view class="title">账单报表</view>
<view class="desc">{{ fenxiaoWords.account }}变更明细</view> <view class="desc">{{ fenxiaoWords.account }}变更明细</view>
</view> </view>
</view> </view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/goods_list', { templateId: templateId })"> <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/goods_list', { templateId: templateId })">
<view class="icon-wrap"> <view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/market.png')" mode="widthFix"></image></view>
<image :src="$util.img('public/uniapp/fenxiao/index/market.png')" mode="widthFix"></image>
</view>
<view class="info"> <view class="info">
<view class="title">{{ fenxiaoWords.concept }}商品</view> <view class="title">{{ fenxiaoWords.concept }}商品</view>
<view class="desc">{{ fenxiaoWords.concept }}商品</view> <view class="desc">{{ fenxiaoWords.concept }}商品</view>
</view> </view>
</view> </view>
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', {type: 'profit'})">--> <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', { type: 'profit' })">
<!-- <view class="icon-wrap">--> <view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/commission_rank.png')" mode="widthFix"></image></view>
<!-- <image :src="$util.img('public/uniapp/fenxiao/index/commission_rank.png')" mode="widthFix"></image>-->
<!-- </view>-->
<!-- <view class="info">-->
<!-- <view class="title">{{ fenxiaoWords.account }}排行</view>-->
<!-- <view class="desc">您的排名为第{{profitRanking}}</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', {type: 'invited_num'})">-->
<!-- <view class="icon-wrap">-->
<!-- <image :src="$util.img('public/uniapp/fenxiao/index/promoter_rank.png')" mode="widthFix"></image>-->
<!-- </view>-->
<!-- <view class="info">-->
<!-- <view class="title">推广人排行</view>-->
<!-- <view class="desc">您的排名为{{ invitedNumRanking }}</view>-->
<!-- </view>-->
<!-- </view>-->
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/level')" v-if="levelList.length">
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/team_reward.png')" mode="widthFix"></image>
</view>
<view class="info"> <view class="info">
<view class="title">等级说明</view> <view class="title">{{ fenxiaoWords.account }}排行</view>
<view class="desc">{{ fenxiaoWords.concept }}等级说明</view> <view class="desc">您的排名为第{{ profitRanking }}</view>
</view> </view>
</view> </view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', { type: 'invited_num' })">
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/promoter_rank.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">推广人排行</view>
<view class="desc">您的排名为{{ invitedNumRanking }}</view>
</view>
</view>
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/level')" v-if="levelList.length">
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/team_reward.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">个人业绩</view>
<view class="desc">{{ fenxiaoWords.concept }}等级说明</view>
</view>
</view> -->
</view> </view>
</block> </block>
<ns-copyright></ns-copyright> <ns-copyright></ns-copyright>
@ -187,7 +121,6 @@
</view> </view>
<ns-login ref="login"></ns-login> <ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
<uni-popup ref="taskPopup" type="bottom"> <uni-popup ref="taskPopup" type="bottom">
<view class="deliverytype-popup-layer popup-layer" v-if="levelInfo"> <view class="deliverytype-popup-layer popup-layer" v-if="levelInfo">
<view class="head-wrap"> <view class="head-wrap">
@ -200,9 +133,7 @@
<text class="iconfont icon-wenhao" @click="openTips(item)"></text> <text class="iconfont icon-wenhao" @click="openTips(item)"></text>
<text class="incomplete">{{ item.progress == 100 ? '已完成' : '未完成' }}</text> <text class="incomplete">{{ item.progress == 100 ? '已完成' : '未完成' }}</text>
</text> </text>
<view class="circle"> <view class="circle"><progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" /></view>
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
</view>
<text class="zero">{{ item.value }}</text> <text class="zero">{{ item.value }}</text>
<text>/{{ item.condition }}</text> <text>/{{ item.condition }}</text>
<text class="to-complete-box" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')"> <text class="to-complete-box" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
@ -211,7 +142,6 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup type="bottom" ref="tips"> <uni-popup type="bottom" ref="tips">
<view class="popup"> <view class="popup">
<view class="popup-header"> <view class="popup-header">
@ -226,347 +156,365 @@
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
import fenxiaoWords from '@/common/js/fenxiao-words.js'; import fenxiaoWords from '@/common/js/fenxiao-words.js';
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default { export default {
components: { components: {
uniPopup uniPopup
}, },
data() { data() {
return { return {
info: { info: {
fenxiao_name: '', fenxiao_name: '',
fenxiao_id: 0 fenxiao_id: 0
}, },
showEmpty: false, showEmpty: false,
teamNum: { teamNum: {
fenxiao_num: 0, fenxiao_num: 0,
member_num: 0 member_num: 0
}, },
//id //id
templateId: '', templateId: '',
tips: '', tips: '',
profitRanking: 0, profitRanking: 0,
invitedNumRanking: 0, invitedNumRanking: 0,
levelList: [] levelList: []
}; };
}, },
components: {}, components: {},
mixins: [fenxiaoWords], mixins: [fenxiaoWords],
onShow() { onShow() {
setTimeout(() => { setTimeout(() => {
if (this.addonIsExist && !this.addonIsExist.fenxiao) { if (this.addonIsExist && !this.addonIsExist.fenxiao) {
this.$util.showToast({ this.$util.showToast({
title: '商家未开启分销', title: '商家未开启分销',
mask: true, mask: true,
duration: 2000 duration: 2000
}); });
setTimeout(() => {
this.$util.redirectTo('/pages/index/index', {}, 'redirectTo');
}, 2000);
return;
}
}, 1000);
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心');
if (uni.getStorageSync('token')) {
this.checkFenxiaoIsStart();
} else {
setTimeout(() => { setTimeout(() => {
this.$refs.login.open('/pages_promotion/fenxiao/index'); this.$util.redirectTo('/pages/index/index', {}, 'redirectTo');
}); }, 2000);
return;
} }
}, 1000);
this.getTemplateId(); if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心');
},
onLoad() { if (uni.getStorageSync('token')) {
this.getRanking('invited_num'); this.checkFenxiaoIsStart();
this.getRanking('profit'); } else {
this.getFenxiaoLevel(); setTimeout(() => {
}, this.$refs.login.open('/pages_promotion/fenxiao/index');
methods: { });
/** }
* 检测分销是否开启
*/ this.getTemplateId();
checkFenxiaoIsStart() { },
this.$api.sendRequest({ onLoad() {
url: '/fenxiao/api/config/basics', this.getRanking('invited_num');
success: res => { this.getRanking('profit');
if (res.code == 0 && res.data) { this.getFenxiaoLevel();
if (res.data.level > 0) { },
this.getFenxiaoDetail(); methods: {
} else { /**
this.$util.showToast({ * 检测分销是否开启
title: '商家未开启分销', */
mask: true, checkFenxiaoIsStart() {
duration: 2000 this.$api.sendRequest({
}); url: '/fenxiao/api/config/basics',
setTimeout(() => { success: res => {
this.$util.redirectTo('/pages/member/index'); if (res.code == 0 && res.data) {
}, 2000); if (res.data.level > 0) {
} this.getFenxiaoDetail();
}
}
});
},
//
getFenxiaoDetail() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/detail',
success: res => {
if (res.data) {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.info = res.data;
this.getTeamNum();
this.showEmpty = true;
} else { } else {
this.$util.redirectTo('/pages_promotion/fenxiao/apply', {}, 'redirectTo'); this.$util.showToast({
title: '商家未开启分销',
mask: true,
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/member/index');
}, 2000);
} }
}, }
fail: res => { }
this.showEmpty = true; });
},
//
getFenxiaoDetail() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/detail',
success: res => {
if (res.data) {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.info = res.data;
this.getTeamNum();
this.showEmpty = true;
} else {
this.$util.redirectTo('/pages_promotion/fenxiao/apply_upgrade', {}, 'redirectTo');
} }
}); },
}, fail: res => {
// this.showEmpty = true;
goTixian() { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply');
},
toLevel() {
this.$util.redirectTo('/pages_promotion/fenxiao/level');
},
close() {
this.$refs.taskPopup.close()
},
getTeamNum() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/teamnum',
success: res => {
if (res.code >= 0) {
this.teamNum = res.data;
}
}
});
},
/**
* 获取分享海报模板id
*/
getTemplateId() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/posterTemplateIds',
success: res => {
if (res.code >= 0) {
this.templateId = [...res.data].join();
}
}
});
},
moneyFormat(money) {
if (isNaN(parseFloat(money))) return money;
return parseFloat(money).toFixed(2);
},
openTips(data){
this.tips = data.tips;
this.$refs.tips.open();
},
getRanking(type){
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/ranking',
data: {
type: type
},
success: res => {
if (res.code >= 0) {
if (type == 'profit') this.profitRanking = res.data;
if (type == 'invited_num') this.invitedNumRanking = res.data;
}
}
})
},
getFenxiaoLevel() {
this.$api.sendRequest({
url: '/fenxiao/api/Level/lists',
success: res => {
if (res.code == 0 && res.data) {
this.levelList = res.data;
}
}
});
}
},
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
return true;
},
watch: {
storeToken: function(nVal, oVal) {
if (nVal) {
this.checkFenxiaoIsStart();
} }
} });
}, },
computed: { //
storeToken() { goTixian() {
return this.$store.state.token; this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply');
}, },
levelInfo() { toLevel() {
if (this.info && this.info.condition && this.info.condition.last_level) { this.$util.redirectTo('/pages_promotion/fenxiao/level');
let level = this.info.condition.last_level; },
level.task = []; close() {
level.complete = 0; this.$refs.taskPopup.close();
},
if (level.one_fenxiao_order_num > 0) { getTeamNum() {
let task = { this.$api.sendRequest({
title: '下级消费', url: '/fenxiao/api/fenxiao/teamnum',
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单', success: res => {
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数', if (res.code >= 0) {
condition: level.one_fenxiao_order_num, this.teamNum = res.data;
value: this.info.one_fenxiao_order_num,
progress: parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ? 100 : (parseFloat(this.info.one_fenxiao_order_num) / parseFloat(level.one_fenxiao_order_num) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
} }
if (level.one_fenxiao_total_order > 0) {
let task = {
title: '下级消费',
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
tips: '分销商自己购买和推荐的直属会员购买的订单的总额',
condition: this.moneyFormat(level.one_fenxiao_total_order),
value: this.info.one_fenxiao_total_order,
progress: parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ? 100 : (parseFloat(this.info.one_fenxiao_total_order) / parseFloat(level.one_fenxiao_total_order) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_fenxiao_order_money > 0) {
let task = {
title: '下级消费',
desc: '下级消费产生'+ this.fenxiaoWords.account +'总额满' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
tips: '分销商自己购买和自己推荐的直属会员购买的订单'+ this.fenxiaoWords.account +'总额',
condition: this.moneyFormat(level.one_fenxiao_order_money),
value: this.info.one_fenxiao_order_money,
progress: parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ? 100 : (parseFloat(this.info.one_fenxiao_order_money) / parseFloat(level.one_fenxiao_order_money) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.order_num > 0) {
let task = {
title: '自身消费',
desc: '自身消费单数满' + level.order_num + '单',
tips: '分销商自己购买的订单次数',
condition: level.order_num,
value: this.info.order_num,
progress: parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : (parseFloat(this.info.order_num) / parseFloat(level.order_num) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.order_money > 0) {
let task = {
title: '自身消费',
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
tips: '分销商自己购买的订单总额',
condition: this.moneyFormat(level.order_money),
value: this.info.order_money,
progress: parseFloat(this.info.order_money) > parseFloat(level.order_money) ? 100 : (parseFloat(this.info.order_money) / parseFloat(level.order_money) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_child_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友人数达到' + level.one_child_num + '人',
tips: '分销商的直属下级会员人数(包含已经申请成为分销商的)',
condition: level.one_child_num,
value: this.info.one_child_num,
progress: parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num) ? 100 : (parseFloat(this.info.one_child_num) / parseFloat(level.one_child_num) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_child_fenxiao_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
tips: '分销商的直属下级分销商人数',
condition: level.one_child_fenxiao_num,
value: this.info.one_child_fenxiao_num,
progress: parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ? 100 : (parseFloat(this.info.one_child_fenxiao_num) / parseFloat(level.one_child_fenxiao_num) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
level.task_num = level.upgrade_type == 1 ? 1 : level.task.length;
return level;
} }
});
},
/**
* 获取分享海报模板id
*/
getTemplateId() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/posterTemplateIds',
success: res => {
if (res.code >= 0) {
this.templateId = [...res.data].join();
}
}
});
},
moneyFormat(money) {
if (isNaN(parseFloat(money))) return money;
return parseFloat(money).toFixed(2);
},
openTips(data) {
this.tips = data.tips;
this.$refs.tips.open();
},
getRanking(type) {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/ranking',
data: {
type: type
},
success: res => {
if (res.code >= 0) {
if (type == 'profit') this.profitRanking = res.data;
if (type == 'invited_num') this.invitedNumRanking = res.data;
}
}
});
},
getFenxiaoLevel() {
this.$api.sendRequest({
url: '/fenxiao/api/Level/lists',
success: res => {
if (res.code == 0 && res.data) {
this.levelList = res.data;
}
}
});
}
},
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
return true;
},
watch: {
storeToken: function(nVal, oVal) {
if (nVal) {
this.checkFenxiaoIsStart();
} }
} }
}; },
computed: {
storeToken() {
return this.$store.state.token;
},
levelInfo() {
if (this.info && this.info.condition && this.info.condition.last_level) {
let level = this.info.condition.last_level;
level.task = [];
level.complete = 0;
if (level.one_fenxiao_order_num > 0) {
let task = {
title: '下级消费',
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数',
condition: level.one_fenxiao_order_num,
value: this.info.one_fenxiao_order_num,
progress:
parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num)
? 100
: ((parseFloat(this.info.one_fenxiao_order_num) / parseFloat(level.one_fenxiao_order_num)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_fenxiao_total_order > 0) {
let task = {
title: '下级消费',
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
tips: '分销商自己购买和推荐的直属会员购买的订单的总额',
condition: this.moneyFormat(level.one_fenxiao_total_order),
value: this.info.one_fenxiao_total_order,
progress:
parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order)
? 100
: ((parseFloat(this.info.one_fenxiao_total_order) / parseFloat(level.one_fenxiao_total_order)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_fenxiao_order_money > 0) {
let task = {
title: '下级消费',
desc: '下级消费产生' + this.fenxiaoWords.account + '总额满' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
tips: '分销商自己购买和自己推荐的直属会员购买的订单' + this.fenxiaoWords.account + '总额',
condition: this.moneyFormat(level.one_fenxiao_order_money),
value: this.info.one_fenxiao_order_money,
progress:
parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money)
? 100
: ((parseFloat(this.info.one_fenxiao_order_money) / parseFloat(level.one_fenxiao_order_money)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.order_num > 0) {
let task = {
title: '自身消费',
desc: '自身消费单数满' + level.order_num + '单',
tips: '分销商自己购买的订单次数',
condition: level.order_num,
value: this.info.order_num,
progress:
parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : ((parseFloat(this.info.order_num) / parseFloat(level.order_num)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.order_money > 0) {
let task = {
title: '自身消费',
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
tips: '分销商自己购买的订单总额',
condition: this.moneyFormat(level.order_money),
value: this.info.order_money,
progress:
parseFloat(this.info.order_money) > parseFloat(level.order_money)
? 100
: ((parseFloat(this.info.order_money) / parseFloat(level.order_money)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_child_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友人数达到' + level.one_child_num + '人',
tips: '分销商的直属下级会员人数(包含已经申请成为分销商的)',
condition: level.one_child_num,
value: this.info.one_child_num,
progress:
parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num)
? 100
: ((parseFloat(this.info.one_child_num) / parseFloat(level.one_child_num)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_child_fenxiao_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
tips: '分销商的直属下级分销商人数',
condition: level.one_child_fenxiao_num,
value: this.info.one_child_fenxiao_num,
progress:
parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num)
? 100
: ((parseFloat(this.info.one_child_fenxiao_num) / parseFloat(level.one_child_fenxiao_num)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
level.task_num = level.upgrade_type == 1 ? 1 : level.task.length;
return level;
}
}
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import './public/css/index.scss'; @import './public/css/index.scss';
/deep/ .ns-copyright-info { /deep/ .ns-copyright-info {
margin-bottom: 0; margin-bottom: 0;
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
.account-info { .account-info {
display: flex; display: flex;
padding: 40rpx 0; padding: 40rpx 0;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
view { view {
color: #fff; color: #fff;
} }
.solid { .solid {
height: 70rpx; height: 70rpx;
width: 2rpx; width: 2rpx;
background: #fff; background: #fff;
border-radius: 2rpx; border-radius: 2rpx;
} }
.account-item { .account-item {
flex: 1; flex: 1;
text-align: center; text-align: center;
.value { .value {
font-size: 34rpx; font-size: 34rpx;
font-weight: bold !important; font-weight: bold !important;
margin-bottom: 4rpx; margin-bottom: 4rpx;
line-height: 1.3; line-height: 1.3;
} }
.title { .title {
font-size: 26rpx; font-size: 26rpx;
} }
} }
} }
.account-info { .account-info {
width: 100%; width: 100%;
background: #fff; background: #fff;
margin: 20rpx 0 0 0; margin: 20rpx 0 0 0;
color: #333; color: #333;
border-radius: 18rpx; border-radius: 18rpx;
.solid { .solid {
background: #f2f2f2; background: #f2f2f2;
} }
.account-item { .account-item {
.value { .value {
color: #000000; color: #000000;
} }
.title { .title {
color: #666666; color: #666666;
} }
} }
} }
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box { /deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none; background: none;
@ -580,4 +528,3 @@
z-index: 8; z-index: 8;
} }
</style> </style>

View File

@ -4,7 +4,6 @@
<view class="level-top"> <view class="level-top">
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image> <image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
</view> </view>
<swiper :autoplay="false" :duration="500" class="level-swiper" previous-margin="50rpx" next-margin="50rpx" @change="swiperChange" :current="curr"> <swiper :autoplay="false" :duration="500" class="level-swiper" previous-margin="50rpx" next-margin="50rpx" @change="swiperChange" :current="curr">
<swiper-item v-for="(item, index) in levelList" :key="index"> <swiper-item v-for="(item, index) in levelList" :key="index">
<view class="level-item" :class="{'curr': index == curr}"> <view class="level-item" :class="{'curr': index == curr}">
@ -22,12 +21,12 @@
</view> </view>
<view class="level-rate"> <view class="level-rate">
<view class="rate-item" v-if="config.level > 0"> <view class="rate-item" v-if="config.level > 0">
<view class="title">一级分佣比率</view> <view class="title">管理业绩</view>
<view class="rate">{{ item.one_rate }}<text class="percentage">%</text></view> <view class="rate">{{ item.one_rate }}<text class="percentage"></text></view>
</view> </view>
<view class="rate-item" v-if="config.level > 1"> <view class="rate-item" v-if="config.level > 1">
<view class="title">二级分佣比率</view> <view class="title">推广业绩</view>
<view class="rate">{{ item.two_rate }}<text class="percentage">%</text></view> <view class="rate">{{ item.two_rate }}<text class="percentage"></text></view>
</view> </view>
<view class="rate-item" v-if="config.level > 2"> <view class="rate-item" v-if="config.level > 2">
<view class="title">三级分佣比率</view> <view class="title">三级分佣比率</view>
@ -56,19 +55,19 @@
<view class="flex-box"> <view class="flex-box">
<view class="title"> <view class="title">
{{item.title}} {{item.title}}
<text class="iconfont icon-wenxiao" @click="openTips(item)"></text> <!-- <text class="iconfont icon-wenxiao" @click="openTips(item)"></text> -->
</view> </view>
<view class="status" :class="{'complete': item.progress == 100}">{{ item.progress == 100 ? '已完成' : '未完成' }}</view> <!-- <view class="status" :class="{'complete': item.progress == 100}">{{ item.progress == 100 ? '已完成' : '未完成' }}</view> -->
</view> </view>
<view class="progress"> <view class="progress">
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" /> <!-- <progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" /> -->
</view> </view>
<view class="flex-box"> <view class="flex-box">
<view class="desc">{{item.desc}}</view> <view class="desc">{{item.desc}}</view>
<view class="rate price-font"> <!-- <view class="rate price-font">
<text class="complete">{{ item.value }}</text> <text class="complete">{{ item.value }}</text>
<text class="num">/{{ item.condition }}</text> <text class="num">/{{ item.condition }}</text>
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>

View File

@ -16,7 +16,6 @@
<text class="status-name color-text-green" v-else-if="orderItem.is_settlement == 1">已结算</text> <text class="status-name color-text-green" v-else-if="orderItem.is_settlement == 1">已结算</text>
<text class="status-name color-text-orange" v-else>待结算</text> <text class="status-name color-text-orange" v-else>待结算</text>
</view> </view>
<view class="order-body"> <view class="order-body">
<view class="goods-wrap"> <view class="goods-wrap">
<view class="goods-img"> <view class="goods-img">
@ -26,8 +25,8 @@
<view class="top-wrap"> <view class="top-wrap">
<view class="goods-name font-size-base">{{ orderItem.sku_name }}</view> <view class="goods-name font-size-base">{{ orderItem.sku_name }}</view>
<view> <view>
<text class="color-tip">{{ fenxiaoWords.account }}</text> <text class="color-tip"> {{ fenxiaoWords.account }}</text>
<text class="price-color price-style small">{{ $lang('common.currencySymbol') }}</text> <!-- <text class="price-color price-style small">{{ $lang('common.currencySymbol') }}</text> -->
<text class="price-color price-style large" >{{ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}</text> <text class="price-color price-style large" >{{ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}</text>
<text class="price-color price-style small">.{{ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}</text> <text class="price-color price-style small">.{{ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}</text>
</view> </view>
@ -59,8 +58,7 @@
</view> </view>
<view class="total"> <view class="total">
<text>合计</text> <text>合计</text>
<text class="price-color">{{ $lang('common.currencySymbol') }}</text> <text class="price-color">{{ $lang('common.currencySymbol') }}</text>
<text class="price-color font-size-toolbar" >{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}</text> <text class="price-color font-size-toolbar" >{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}</text>
<text class="price-color">.{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[1] }}</text> <text class="price-color">.{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[1] }}</text>
</view> </view>
@ -76,7 +74,6 @@
</view> </view>
</view> </view>
</mescroll-uni> </mescroll-uni>
<ns-login ref="login"></ns-login> <ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
</view> </view>
@ -187,6 +184,7 @@ export default {
this.$refs.mescroll.refresh(); this.$refs.mescroll.refresh();
}, },
toDetail(e) { toDetail(e) {
return false;
this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', { this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', {
id: e id: e
}); });

View File

@ -16,7 +16,7 @@
<text class="name">{{info.nickname}}</text> <text class="name">{{info.nickname}}</text>
</view> </view>
<view class="withdrawal" <view class="withdrawal"
@click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')" v-if="type == 'profit'">点击提现</view> @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')" v-if="type == 'profit'">转入余额</view>
<view class="withdrawal" <view class="withdrawal"
@click="$util.redirectTo('/pages_promotion/fenxiao/team')" v-if="type == 'invited_num'">我的团队</view> @click="$util.redirectTo('/pages_promotion/fenxiao/team')" v-if="type == 'invited_num'">我的团队</view>
@ -29,22 +29,22 @@
<view class="fenxiao-index-other"> <view class="fenxiao-index-other">
<view class="all-money-item"> <view class="all-money-item">
<view class="img-wrap"> <view class="img-wrap">
<text class="iconfont icon-fenxiao"></text> <!-- <text class="iconfont icon-fenxiao"></text> -->
</view> </view>
<view class="all-money-tit-wrap"> <view class="all-money-tit-wrap">
<text class="all-money-tit">分销佣金</text> <text class="all-money-tit">推广业绩</text>
<text class="all-money-num">{{ info.today_commission}}</text> <text class="all-money-num">{{info.one_commission}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="fenxiao-index-other"> <view class="fenxiao-index-other">
<view class="all-money-item"> <view class="all-money-item">
<view class="img-wrap"> <view class="img-wrap">
<text class="iconfont icon-baixingbeng"></text> <!-- <text class="iconfont icon-baixingbeng"></text> -->
</view> </view>
<view class="all-money-tit-wrap"> <view class="all-money-tit-wrap">
<text class="all-money-tit">佣金排行</text> <text class="all-money-tit">管理业绩</text>
<text class="all-money-num">您排行第{{ ranking }}</text> <text class="all-money-num">{{ info.two_commission}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -74,10 +74,10 @@
</view> </view>
</view> </view>
<view class="title-rakn-text" v-if="type == 'profit'">佣金排行</view> <view class="title-rakn-text" v-if="type == 'profit'&&!1">业绩排行</view>
<view class="title-rakn-text" v-if="type == 'invited_num'">推广排行</view> <view class="title-rakn-text" v-if="type == 'invited_num'">推广排行</view>
<view class="ranking-list"> <view class="ranking-list" v-if="!1">
<view class="ranking-item" v-for="(item, index) in list" :key="index"> <view class="ranking-item" v-for="(item, index) in list" :key="index">
<view class="ranking price-font">{{ index + 1 }}</view> <view class="ranking price-font">{{ index + 1 }}</view>
<view class="content"> <view class="content">
@ -88,7 +88,7 @@
<view class="nickname">{{ item.nickname }}</view> <view class="nickname">{{ item.nickname }}</view>
</view> </view>
<view class="price-font price-style" v-if="type == 'profit'"> <view class="price-font price-style" v-if="type == 'profit'">
{{ item.total_commission|moneyFormat }}</view> {{ item.total_commission|moneyFormat }}</view>
<view class="price-font price-style" v-if="type == 'invited_num'">{{ item.child_num }} <view class="price-font price-style" v-if="type == 'invited_num'">{{ item.child_num }}
</view> </view>
</view> </view>

View File

@ -21,7 +21,7 @@
<view class="top-wrap"> <view class="top-wrap">
<view class="goods-name font-size-base">{{ orderItem.sku_name }}</view> <view class="goods-name font-size-base">{{ orderItem.sku_name }}</view>
<view> <view>
<text class="color-tip">{{ fenxiaoWords.account }}</text> <text class="color-tip">{{ fenxiaoWords.account }}</text>
<text class="price-color font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text> <text class="price-color font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
<text class="price-color font-size-toolbar">{{ orderItem.commission }}</text> <text class="price-color font-size-toolbar">{{ orderItem.commission }}</text>
</view> </view>
@ -133,6 +133,7 @@ export default {
this.$forceUpdate(); this.$forceUpdate();
}, },
toDetail(e) { toDetail(e) {
return;
this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', { this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', {
id: e id: e
}); });

View File

@ -54,12 +54,10 @@
</block> </block>
</block> </block>
</mescroll-uni> </mescroll-uni>
<ns-login ref="login"></ns-login> <ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
</view> </view>
</template> </template>
<script> <script>
import fenxiaoWords from 'common/js/fenxiao-words.js'; import fenxiaoWords from 'common/js/fenxiao-words.js';
export default { export default {
@ -68,12 +66,12 @@ export default {
category: [ category: [
{ {
id: 0, id: 0,
name: '一级', name: '联创',
number: 0 number: 0
}, },
{ {
id: 1, id: 1,
name: '二级', name: '推广',
number: 2 number: 2
} }
], ],
@ -99,10 +97,8 @@ export default {
return; return;
} }
}, 1000); }, 1000);
if(this.fenxiaoWords && this.fenxiaoWords.my_team) this.$langConfig.title(this.fenxiaoWords.my_team); if(this.fenxiaoWords && this.fenxiaoWords.my_team) this.$langConfig.title(this.fenxiaoWords.my_team);
this.getFenXiaoLevel(); this.getFenXiaoLevel();
if (uni.getStorageSync('token')) { if (uni.getStorageSync('token')) {
this.token = uni.getStorageSync('token'); this.token = uni.getStorageSync('token');
} else { } else {
@ -192,7 +188,6 @@ export default {
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.team-cate { .team-cate {
padding: 0 30rpx; padding: 0 30rpx;
@ -204,7 +199,6 @@ export default {
position: fixed; position: fixed;
left: 0; left: 0;
top: var(--window-top); top: var(--window-top);
.cate-li { .cate-li {
flex: 1; flex: 1;
display: flex; display: flex;

View File

@ -19,12 +19,12 @@
<text class="tx-to" v-else-if="!isBalance">请添加提现账户</text> <text class="tx-to" v-else-if="!isBalance">请添加提现账户</text>
<view class="tx-wrap" v-else="isBalance"> <view class="tx-wrap" v-else="isBalance">
<text class="tx-to">提现到</text> <text class="tx-to">提现到</text>
<view class="tx-bank">消费券</view> <view class="tx-bank">余额</view>
<view class="tx-img"> <view class="tx-img">
<image :src="$util.img('public/uniapp/member/apply_withdrawal/tixian.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/member/apply_withdrawal/tixian.png')" mode="widthFix"></image>
</view> </view>
</view> </view>
<view class="iconfont icon-right"></view> <!-- <view class="iconfont icon-right"></view> -->
</view> </view>
<view class="empty-box"></view> <view class="empty-box"></view>
<view class="withdraw-wrap"> <view class="withdraw-wrap">
@ -36,7 +36,7 @@
</view> </view>
<view class="bootom"> <view class="bootom">
<view> <view>
<text class="color-tip">可提现佣金{{ $lang('common.currencySymbol') }}{{ withdrawInfo.account | moneyFormat }}</text> <text class="color-tip">可提现{{ $lang('common.currencySymbol') }}{{ withdrawInfo.account | moneyFormat }}</text>
<text class="all-tx color-base-text" @click="allTx">全部提现</text> <text class="all-tx color-base-text" @click="allTx">全部提现</text>
</view> </view>
</view> </view>
@ -50,11 +50,9 @@
<view <view
class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal" class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal"
:class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 }" :class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 }"
@click="withdraw" @click="withdraw">
>
提现 提现
</view> </view>
<view class="recoend" @click="toWithdrawal"><view class="recoend-con">提现记录</view></view> <view class="recoend" @click="toWithdrawal"><view class="recoend-con">提现记录</view></view>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
</view> </view>
@ -69,7 +67,7 @@ export default {
bankAccountInfo: {}, bankAccountInfo: {},
withdrawMoney: '', withdrawMoney: '',
isSub: false, isSub: false,
isBalance: 0, isBalance: 1,
payList: null payList: null
}; };
}, },
@ -146,7 +144,7 @@ export default {
if(res.data) if(res.data)
this.bankAccountInfo = res.data; this.bankAccountInfo = res.data;
else if(this.payList && this.payList.balance){ else if(this.payList && this.payList.balance){
// //
this.isBalance = 1; this.isBalance = 1;
} }
} }
@ -174,6 +172,7 @@ export default {
} }
let money = this.withdrawConfigInfo.max > this.withdrawInfo.account ? this.withdrawInfo.account : this.withdrawConfigInfo.max; let money = this.withdrawConfigInfo.max > this.withdrawInfo.account ? this.withdrawInfo.account : this.withdrawConfigInfo.max;
if (parseFloat(this.withdrawMoney) > 0 && (parseFloat(this.withdrawMoney) > parseFloat(money))) { if (parseFloat(this.withdrawMoney) > 0 && (parseFloat(this.withdrawMoney) > parseFloat(money))) {
console.log(money,this.withdrawMoney)
this.$util.showToast({ this.$util.showToast({
title: '提现金额超出可提现金额' title: '提现金额超出可提现金额'
}); });
@ -188,7 +187,7 @@ export default {
return true; return true;
}, },
withdraw() { withdraw() {
if (!this.bankAccountInfo.withdraw_type && !isBalance) { if (!this.bankAccountInfo.withdraw_type && !this.isBalance) {
this.$util.showToast({ this.$util.showToast({
title: '请先添加提现方式' title: '请先添加提现方式'
}); });
@ -206,7 +205,7 @@ export default {
} }
let withdrawType = this.isBalance ? 'balance' : this.bankAccountInfo.withdraw_type; let withdrawType = this.isBalance ? 'balance' : this.bankAccountInfo.withdraw_type;
let branchBankName = this.isBalance ? "消费券" : this.bankAccountInfo.branch_bank_name; let branchBankName = this.isBalance ? "余额" : this.bankAccountInfo.branch_bank_name;
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
// this.subscribeMessage(() => { // this.subscribeMessage(() => {
this.$api.sendRequest({ this.$api.sendRequest({
@ -277,6 +276,7 @@ export default {
} }
}, },
goAccount() { goAccount() {
return;
this.$util.redirectTo( this.$util.redirectTo(
'/pages_tool/member/account', '/pages_tool/member/account',
{ {

View File

@ -8,7 +8,7 @@
<view class="cont"> <view class="cont">
<view class="detailed-item" v-for="(item, index) in withdrawList" :key="index" @click="toDetail(item.id)"> <view class="detailed-item" v-for="(item, index) in withdrawList" :key="index" @click="toDetail(item.id)">
<view class="info"> <view class="info">
<view class="event">{{ item.transfer_type=='balance'&&'消费券' || item.transfer_type=='alipay'&&'支付宝' || item.transfer_type=='bank'&&'银行卡' || item.transfer_type=='wechatpay'&&'微信' }}</view> <view class="event">{{ item.transfer_type=='balance'&&'余额' || item.transfer_type=='alipay'&&'支付宝' || item.transfer_type=='bank'&&'银行卡' || item.transfer_type=='wechatpay'&&'微信' }}</view>
<view> <view>
<text class="time">{{ $util.timeStampTurnTime(item.create_time) }}</text> <text class="time">{{ $util.timeStampTurnTime(item.create_time) }}</text>
</view> </view>

View File

@ -14,7 +14,7 @@
<block v-if="gameInfo.status == 1"> <block v-if="gameInfo.status == 1">
<view class="text">刮开试试手气</view> <view class="text">刮开试试手气</view>
<view class="btn color-base-bg" :class="{ disabled: gameInfo.surplus_num == 0 }" @click="lottery"> <view class="btn color-base-bg" :class="{ disabled: gameInfo.surplus_num == 0 }" @click="lottery">
点我刮奖{{ '(' + gameInfo.points + '兑换券)' }} 点我刮奖{{ '(' + gameInfo.points + '积分)' }}
</view> </view>
</block> </block>
<block v-else-if="gameInfo.status == 0"><view class="text">活动尚未开始</view></block> <block v-else-if="gameInfo.status == 0"><view class="text">活动尚未开始</view></block>
@ -54,7 +54,7 @@
</view> </view>
<!-- 操作 --> <!-- 操作 -->
<view class="action-text"> <view class="action-text">
<view class="point">我的兑换券{{ point }}</view> <view class="point">我的积分{{ point }}</view>
<view class="record" @click="$util.redirectTo('/pages_promotion/game/record', { id: id })">我的中奖记录</view> <view class="record" @click="$util.redirectTo('/pages_promotion/game/record', { id: id })">我的中奖记录</view>
</view> </view>
<!-- 中奖名单 --> <!-- 中奖名单 -->
@ -87,7 +87,7 @@
<view class="tit">参与规则</view> <view class="tit">参与规则</view>
<view class="text" v-if="gameInfo.join_type == 0">每个用户活动期间共有{{ gameInfo.join_frequency }}次抽奖机会</view> <view class="text" v-if="gameInfo.join_type == 0">每个用户活动期间共有{{ gameInfo.join_frequency }}次抽奖机会</view>
<view class="text" v-else>每个用户活动期间每天都有{{ gameInfo.join_frequency }}次抽奖机会每天0点更新</view> <view class="text" v-else>每个用户活动期间每天都有{{ gameInfo.join_frequency }}次抽奖机会每天0点更新</view>
<view class="text">每次抽奖需消耗 {{ gameInfo.points }} 兑换券</view> <view class="text">每次抽奖需消耗 {{ gameInfo.points }} 积分</view>
<view class="text" v-if="gameInfo.level_id != 0">该活动只有{{ gameInfo.level_name }}等级的会员可参与</view> <view class="text" v-if="gameInfo.level_id != 0">该活动只有{{ gameInfo.level_name }}等级的会员可参与</view>
<block v-if="gameInfo.remark != ''"> <block v-if="gameInfo.remark != ''">
<view class="tit">活动说明</view> <view class="tit">活动说明</view>
@ -107,7 +107,7 @@
<script> <script>
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
import LTime from '@/components/l-time/l-time.vue'; import LTime from '@/pages_promotion/components/l-time/l-time.vue';
export default { export default {
components: { components: {
@ -303,7 +303,7 @@ export default {
} }
if (this.gameInfo.points > 0 && this.point < this.gameInfo.points) { if (this.gameInfo.points > 0 && this.point < this.gameInfo.points) {
this.$util.showToast({ this.$util.showToast({
title: '兑换券不足' title: '积分不足'
}); });
return; return;
} }
@ -332,7 +332,7 @@ export default {
.exec(); .exec();
// #endif // #endif
// //
this.point -= this.gameInfo.points; this.point -= this.gameInfo.points;
this.gameInfo.surplus_num -= 1; this.gameInfo.surplus_num -= 1;
} else { } else {

View File

@ -11,7 +11,7 @@
</view> </view>
<view class="content"> <view class="content">
<view class="name">{{ item.award_name }}</view> <view class="name">{{ item.award_name }}</view>
<view class="cont font-size-goods-tag" v-if="item.award_type == 1">奖励详情{{ item.point }}兑换券</view> <view class="cont font-size-goods-tag" v-if="item.award_type == 1">奖励详情{{ item.point }}积分</view>
<view class="cont font-size-goods-tag" v-if="item.award_type == 2">奖励详情{{ item.balance }}元红包</view> <view class="cont font-size-goods-tag" v-if="item.award_type == 2">奖励详情{{ item.balance }}元红包</view>
<view class="cont font-size-goods-tag" v-if="item.award_type == 3">奖励详情优惠券{{ item.relate_name }}</view> <view class="cont font-size-goods-tag" v-if="item.award_type == 3">奖励详情优惠券{{ item.relate_name }}</view>
<view class="time font-size-goods-tag">中奖时间{{ $util.timeStampTurnTime(item.create_time) }}</view> <view class="time font-size-goods-tag">中奖时间{{ $util.timeStampTurnTime(item.create_time) }}</view>

View File

@ -28,7 +28,7 @@
<!-- 操作 --> <!-- 操作 -->
<view class="action-text"> <view class="action-text">
<view class="point">我的兑换券{{ point }}</view> <view class="point">我的积分{{ point }}</view>
<view class="record" @click="$util.redirectTo('/pages_promotion/game/record', { id: id })">我的中奖记录</view> <view class="record" @click="$util.redirectTo('/pages_promotion/game/record', { id: id })">我的中奖记录</view>
</view> </view>
@ -70,7 +70,7 @@
<image :src="$util.img('public/uniapp/game/coupon.png')" mode="widthFix" v-if="result.award_type == 3" class="look"></image> <image :src="$util.img('public/uniapp/game/coupon.png')" mode="widthFix" v-if="result.award_type == 3" class="look"></image>
<image :src="$util.img('public/uniapp/game/gift.png')" mode="widthFix" v-if="result.award_type == 4" class="look"></image> <image :src="$util.img('public/uniapp/game/gift.png')" mode="widthFix" v-if="result.award_type == 4" class="look"></image>
<view class="msg" v-if="result.award_type == 1">恭喜您抽中{{ result.point }}兑换券</view> <view class="msg" v-if="result.award_type == 1">恭喜您抽中{{ result.point }}积分</view>
<view class="msg" v-if="result.award_type == 2">恭喜您抽中{{ result.balance }}元红包</view> <view class="msg" v-if="result.award_type == 2">恭喜您抽中{{ result.balance }}元红包</view>
<view class="msg" v-if="result.award_type == 3">恭喜您抽中优惠券{{ result.relate_name }}</view> <view class="msg" v-if="result.award_type == 3">恭喜您抽中优惠券{{ result.relate_name }}</view>
@ -103,7 +103,7 @@
<view class="tit">参与规则</view> <view class="tit">参与规则</view>
<view class="text" v-if="gameInfo.join_type == 0">每个用户活动期间共有{{ gameInfo.join_frequency }}次抽奖机会</view> <view class="text" v-if="gameInfo.join_type == 0">每个用户活动期间共有{{ gameInfo.join_frequency }}次抽奖机会</view>
<view class="text" v-else>每个用户活动期间每天都有{{ gameInfo.join_frequency }}次抽奖机会每天0点更新</view> <view class="text" v-else>每个用户活动期间每天都有{{ gameInfo.join_frequency }}次抽奖机会每天0点更新</view>
<view class="text">每次抽奖需消耗 {{ gameInfo.points }} 兑换券</view> <view class="text">每次抽奖需消耗 {{ gameInfo.points }} 积分</view>
<view class="text" v-if="gameInfo.level_id != 0">该活动只有{{ gameInfo.level_name }}等级的会员可参与</view> <view class="text" v-if="gameInfo.level_id != 0">该活动只有{{ gameInfo.level_name }}等级的会员可参与</view>
<block v-if="gameInfo.remark != ''"> <block v-if="gameInfo.remark != ''">
<view class="tit">活动说明</view> <view class="tit">活动说明</view>
@ -124,7 +124,7 @@
<script> <script>
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
import LTime from '@/components/l-time/l-time.vue'; import LTime from '@/pages_promotion/components/l-time/l-time.vue';
export default { export default {
components: { components: {
@ -284,7 +284,7 @@ export default {
if (this.gameInfo.points > 0 && this.point < this.gameInfo.points) { if (this.gameInfo.points > 0 && this.point < this.gameInfo.points) {
this.$util.showToast({ this.$util.showToast({
title: '兑换券不足' title: '积分不足'
}); });
return; return;
} }
@ -301,7 +301,7 @@ export default {
this.result = res.data; this.result = res.data;
this.start(); this.start();
// //
this.point -= this.gameInfo.points; this.point -= this.gameInfo.points;
this.gameInfo.surplus_num -= 1; this.gameInfo.surplus_num -= 1;
} else { } else {

View File

@ -37,7 +37,7 @@
</view> </view>
</view> </view>
<view class="action-text"> <view class="action-text">
<view class="point">我的兑换券{{ point }}</view> <view class="point">我的积分{{ point }}</view>
<view class="record" @click="$util.redirectTo('/pages_promotion/game/record', { id: id })">我的中奖记录</view> <view class="record" @click="$util.redirectTo('/pages_promotion/game/record', { id: id })">我的中奖记录</view>
</view> </view>
<!-- 中奖名单 --> <!-- 中奖名单 -->
@ -94,7 +94,7 @@
<view class="tit">参与规则</view> <view class="tit">参与规则</view>
<view class="text" v-if="gameInfo.join_type == 0">每个用户活动期间共有{{ gameInfo.join_frequency }}次抽奖机会</view> <view class="text" v-if="gameInfo.join_type == 0">每个用户活动期间共有{{ gameInfo.join_frequency }}次抽奖机会</view>
<view class="text" v-else>每个用户活动期间每天都有{{ gameInfo.join_frequency }}次抽奖机会每天0点更新</view> <view class="text" v-else>每个用户活动期间每天都有{{ gameInfo.join_frequency }}次抽奖机会每天0点更新</view>
<view class="text">每次抽奖需消耗 {{ gameInfo.points }} 兑换券</view> <view class="text">每次抽奖需消耗 {{ gameInfo.points }} 积分</view>
<view class="text" v-if="gameInfo.level_id != 0">该活动只有{{ gameInfo.level_name }}等级的会员可参与</view> <view class="text" v-if="gameInfo.level_id != 0">该活动只有{{ gameInfo.level_name }}等级的会员可参与</view>
<block v-if="gameInfo.remark != ''"> <block v-if="gameInfo.remark != ''">
<view class="tit">活动说明</view> <view class="tit">活动说明</view>
@ -114,7 +114,7 @@
<script> <script>
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
import LTime from '@/components/l-time/l-time.vue'; import LTime from '@/pages_promotion/components/l-time/l-time.vue';
export default { export default {
components: { components: {
@ -284,7 +284,7 @@ export default {
} }
if (this.gameInfo.points > 0 && this.point < this.gameInfo.points) { if (this.gameInfo.points > 0 && this.point < this.gameInfo.points) {
this.$util.showToast({ this.$util.showToast({
title: '兑换券不足' title: '积分不足'
}); });
return; return;
} }
@ -312,7 +312,7 @@ export default {
this.resultIndex = this.$util.inArray(-1, this.award); this.resultIndex = this.$util.inArray(-1, this.award);
} }
// //
this.point -= this.gameInfo.points; this.point -= this.gameInfo.points;
this.gameInfo.surplus_num -= 1; this.gameInfo.surplus_num -= 1;
} else { } else {

View File

@ -189,7 +189,7 @@ export default {
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
if(this.cardInfo.card_right_type == 'goods'){ if(this.cardInfo.card_right_type == 'goods'){
this.$util.redirectTo('/pages/order/detail',{'order_id':this.cardInfo.use_order_id}); this.$util.redirectTo('/pages_rush/order/detail',{'order_id':this.cardInfo.use_order_id});
return false; return false;
} }
if(this.cardInfo.card_right_type == 'balance'){ if(this.cardInfo.card_right_type == 'balance'){

View File

@ -395,7 +395,7 @@ export default {
calculateGoodsData() { calculateGoodsData() {
if (this.calculateData) return this.calculateData.shop_goods_list; if (this.calculateData) return this.calculateData.shop_goods_list;
}, },
// //
balanceDeduct() { balanceDeduct() {
if (this.calculateData) { if (this.calculateData) {
if (this.calculateData.member_account.balance_total <= parseFloat(this.calculateData.order_money).toFixed(2)) { if (this.calculateData.member_account.balance_total <= parseFloat(this.calculateData.order_money).toFixed(2)) {
@ -649,18 +649,18 @@ export default {
success: res => { success: res => {
if (res.code >= 0 && res.data && res.data.order_id > 0) { if (res.code >= 0 && res.data && res.data.order_id > 0) {
this.$util.redirectTo( this.$util.redirectTo(
'/pages/order/detail', '/pages_rush/order/detail',
{ {
order_id: res.data.order_id order_id: res.data.order_id
}, },
'redirectTo' 'redirectTo'
); );
} else { } else {
this.$util.redirectTo('/pages/order/list', {}, 'redirectTo'); this.$util.redirectTo('/pages_rush/order/list', {}, 'redirectTo');
} }
}, },
fail: res => { fail: res => {
this.$util.redirectTo('/pages/order/list', {}, 'redirectTo'); this.$util.redirectTo('/pages_rush/order/list', {}, 'redirectTo');
} }
}); });
} else { } else {
@ -1065,7 +1065,7 @@ export default {
this.calculate(); this.calculate();
}, },
/** /**
* 使用兑换券抵扣 * 使用积分抵扣
*/ */
usePoint() { usePoint() {
this.orderCreateData.is_point = this.orderCreateData.is_point ? 0 : 1; this.orderCreateData.is_point = this.orderCreateData.is_point ? 0 : 1;
@ -1075,7 +1075,7 @@ export default {
* 支付弹窗关闭 * 支付弹窗关闭
*/ */
payClose() { payClose() {
this.$util.redirectTo('/pages/order/detail', { order_id: this.$refs.choosePaymentPopup.payInfo.order_id }, 'redirectTo'); this.$util.redirectTo('/pages_rush/order/detail', { order_id: this.$refs.choosePaymentPopup.payInfo.order_id }, 'redirectTo');
}, },
/** /**
* 选择优惠券 * 选择优惠券

View File

@ -66,7 +66,7 @@
</template> </template>
<script> <script>
import nsAdv from '@/components/ns-adv/ns-adv.vue'; import nsAdv from '@/pages_promotion/components/ns-adv/ns-adv.vue';
// //
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
let menuButtonInfo = {}; let menuButtonInfo = {};

View File

@ -108,7 +108,7 @@
</template> </template>
<script> <script>
import nsAdv from '@/components/ns-adv/ns-adv.vue'; import nsAdv from '@/pages_promotion/components/ns-adv/ns-adv.vue';
export default { export default {
components: { components: {
nsAdv nsAdv

View File

@ -63,7 +63,7 @@
<text class="price-symbol color-base-text">{{ $lang('common.currencySymbol') }}</text> <text class="price-symbol color-base-text">{{ $lang('common.currencySymbol') }}</text>
<text class="price color-base-text">{{ goodsSkuDetail.promotion_price }}</text> --> <text class="price color-base-text">{{ goodsSkuDetail.promotion_price }}</text> -->
拼中得商品未拼中 拼中得商品未拼中
<text class="" v-if="goodsSkuDetail.reward_type == 4">{{ goodsSkuDetail.reward_type_num }}兑换券</text> <text class="" v-if="goodsSkuDetail.reward_type == 4">{{ goodsSkuDetail.reward_type_num }}积分</text>
<text class="" v-if="goodsSkuDetail.reward_type == 1 || goodsSkuDetail.reward_type == 2">{{ goodsSkuDetail.reward_type_num }}</text> <text class="" v-if="goodsSkuDetail.reward_type == 1 || goodsSkuDetail.reward_type == 2">{{ goodsSkuDetail.reward_type_num }}</text>
<text class="" v-if="goodsSkuDetail.reward_type == 3">返优惠券</text> <text class="" v-if="goodsSkuDetail.reward_type == 3">返优惠券</text>
</view> </view>
@ -108,7 +108,7 @@
<view> <view>
未拼中获得奖励 未拼中获得奖励
<view class="color-base-text"> <view class="color-base-text">
<text class="font-size-activity-tag" v-if="goodsSkuDetail.reward_type == 4">{{ goodsSkuDetail.reward_type_num }}兑换券</text> <text class="font-size-activity-tag" v-if="goodsSkuDetail.reward_type == 4">{{ goodsSkuDetail.reward_type_num }}积分</text>
<text class="font-size-activity-tag" v-if="goodsSkuDetail.reward_type == 1 || goodsSkuDetail.reward_type == 2"> <text class="font-size-activity-tag" v-if="goodsSkuDetail.reward_type == 1 || goodsSkuDetail.reward_type == 2">
{{ goodsSkuDetail.reward_type_num }} {{ goodsSkuDetail.reward_type_num }}
</text> </text>

View File

@ -68,7 +68,7 @@
人拼团 人拼团
<text class="color-base-text">{{ item.chengtuan_num }}</text> <text class="color-base-text">{{ item.chengtuan_num }}</text>
人拼中未拼中返 人拼中未拼中返
<text class="color-base-text" v-if="item.reward_type == 4">{{ item.reward_type_num }}兑换券</text> <text class="color-base-text" v-if="item.reward_type == 4">{{ item.reward_type_num }}积分</text>
<text class="color-base-text" v-if="item.reward_type == 1 || item.reward_type == 2">{{ item.reward_type_num }}</text> <text class="color-base-text" v-if="item.reward_type == 1 || item.reward_type == 2">{{ item.reward_type_num }}</text>
<text class="color-base-text" v-if="item.reward_type == 3">优惠券</text> <text class="color-base-text" v-if="item.reward_type == 3">优惠券</text>
</view> </view>
@ -83,7 +83,7 @@
<script> <script>
import uniTag from '@/components/uni-tag/uni-tag.vue'; import uniTag from '@/components/uni-tag/uni-tag.vue';
import nsAdv from '@/components/ns-adv/ns-adv.vue'; import nsAdv from '@/pages_promotion/components/ns-adv/ns-adv.vue';
export default { export default {
components: { components: {
uniTag, uniTag,

View File

@ -203,11 +203,11 @@
if(delivery_type==''){ if(delivery_type==''){
this.$util.redirectTo('/pages_tool/order/detail_virtual', { order_id: id }); this.$util.redirectTo('/pages_tool/order/detail_virtual', { order_id: id });
}else if(delivery_type=='store'){ }else if(delivery_type=='store'){
this.$util.redirectTo('/pages/order/detail_pickup', {order_id: id}); this.$util.redirectTo('/pages_rush/order/detail_pickup', {order_id: id});
}else if(delivery_type=='local'){ }else if(delivery_type=='local'){
this.$util.redirectTo('/pages/order/detail_local_delivery', {order_id: id}); this.$util.redirectTo('/pages_rush/order/detail_local_delivery', {order_id: id});
}else if(delivery_type=='express'){ }else if(delivery_type=='express'){
this.$util.redirectTo('/pages/order/detail', {order_id: id}); this.$util.redirectTo('/pages_rush/order/detail', {order_id: id});
} }
}, },
// //

View File

@ -243,13 +243,13 @@ export default {
switch (parseInt(data.order_type)) { switch (parseInt(data.order_type)) {
case 2: case 2:
// //
this.$util.redirectTo('/pages/order/detail_pickup', { this.$util.redirectTo('/pages_rush/order/detail_pickup', {
order_id: data.order_id order_id: data.order_id
}); });
break; break;
case 3: case 3:
// //
this.$util.redirectTo('/pages/order/detail_local_delivery', { this.$util.redirectTo('/pages_rush/order/detail_local_delivery', {
order_id: data.order_id order_id: data.order_id
}); });
break; break;
@ -260,7 +260,7 @@ export default {
}); });
break; break;
default: default:
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_rush/order/detail', {
order_id: data.order_id order_id: data.order_id
}); });
break; break;

View File

@ -59,7 +59,7 @@
</template> </template>
<script> <script>
import nsAdv from '@/components/ns-adv/ns-adv.vue'; import nsAdv from '@/pages_promotion/components/ns-adv/ns-adv.vue';
export default { export default {
components: { components: {
nsAdv nsAdv

View File

@ -192,7 +192,7 @@
}); });
}, },
toOrderDetail(id) { toOrderDetail(id) {
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_rush/order/detail', {
order_id: id order_id: id
}); });
}, },

View File

@ -160,7 +160,7 @@ export default {
content: '您有一个拼团订单待付款,是否现在跳转支付?', content: '您有一个拼团订单待付款,是否现在跳转支付?',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
that.$util.redirectTo('/pages/order/detail', {'order_id':that.groupDetail.order_id}); that.$util.redirectTo('/pages_rush/order/detail', {'order_id':that.groupDetail.order_id});
} else if (res.cancel) { } else if (res.cancel) {
} }

View File

@ -353,13 +353,13 @@ export default {
switch (parseInt(data.order_type)) { switch (parseInt(data.order_type)) {
case 2: case 2:
// //
this.$util.redirectTo('/pages/order/detail_pickup', { this.$util.redirectTo('/pages_rush/order/detail_pickup', {
order_id: data.order_id order_id: data.order_id
}); });
break; break;
case 3: case 3:
// //
this.$util.redirectTo('/pages/order/detail_local_delivery', { this.$util.redirectTo('/pages_rush/order/detail_local_delivery', {
order_id: data.order_id order_id: data.order_id
}); });
break; break;
@ -370,7 +370,7 @@ export default {
}); });
break; break;
default: default:
this.$util.redirectTo('/pages/order/detail', { this.$util.redirectTo('/pages_rush/order/detail', {
order_id: data.order_id order_id: data.order_id
}); });
break; break;

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