Compare commits

...

79 Commits

Author SHA1 Message Date
e748fddd5c ... 2022-12-30 11:27:25 +08:00
3da1772433 ... 2022-11-24 09:18:33 +08:00
2695f8ea9e merge 2022-10-13 14:37:43 +08:00
d9d9516984 多规格选择购买页面数量赋值问题处理 2022-10-13 14:36:32 +08:00
唐明明
52f37adbde merge 2022-10-12 17:15:59 +08:00
唐明明
7f3b00e1db 删除 'uni_modules/.DS_Store' 2022-10-12 16:52:27 +08:00
唐明明
587defc1b5 删除 'pages/.DS_Store' 2022-10-12 16:52:09 +08:00
唐明明
466c4e707a merge 2022-10-12 16:51:17 +08:00
60c2738592 修改弹窗提示问题 2022-10-12 15:13:43 +08:00
510a6e15a9 ... 2022-10-12 10:08:17 +08:00
c8159718c4 登录新增图文验证 2022-10-12 10:01:32 +08:00
1619e53ad1 merge 2022-10-11 16:51:51 +08:00
83fe74d948 登录页面图片验证处理 2022-10-11 16:48:16 +08:00
唐明明
867ed59737 merge 2022-09-23 17:10:22 +08:00
唐明明
7ac84c1c66 删除 'uni_modules/.DS_Store' 2022-09-23 17:05:03 +08:00
唐明明
7d82e4a03c 删除 'pages/.DS_Store' 2022-09-23 17:04:47 +08:00
唐明明
812d0f0298 删除 'components/.DS_Store' 2022-09-23 17:04:33 +08:00
唐明明
1191e30f21 调整会员开通,DT充值流程 2022-09-23 17:03:17 +08:00
唐明明
9002c868c4 河马支付 2022-09-23 17:02:55 +08:00
c20f6cd005 视频广告顶部关闭声音页面处理,处理拼别人团再看看跳转等细节 2022-09-23 12:45:36 +08:00
6c21c2193c 隐藏拼团和任务入口正式环境 2022-09-23 09:24:21 +08:00
a740c90582 忽略冲突的unpackage打包文件 2022-09-22 14:32:15 +08:00
8bf4442eed 同步数据 2022-09-22 14:29:39 +08:00
唐明明
872a125fc1 merge 2022-09-21 15:05:24 +08:00
唐明明
30881978bd merge 2022-09-21 15:05:04 +08:00
唐明明
bdcc6c3614 merge 2022-09-21 15:03:23 +08:00
dbe1bb26a4 Merge branch 'master' of https://git.yuzhankeji.cn/TmOct5/dtx_store 2022-08-31 17:07:30 +08:00
d34745adc2 已领商品及已领dt积分同步 2022-08-31 17:07:26 +08:00
唐明明
4266eaad98 新增分公司带票记录 2022-08-31 15:19:35 +08:00
a6ec9a8d45 ... 2022-08-31 10:55:46 +08:00
07e6a5d5bb 动态兼容个人中心我的拼单列表 2022-08-31 10:54:32 +08:00
d5f5b596ea 任务关闭入口 2022-08-31 10:42:00 +08:00
68df0a014f 排行榜新增本月排行及上月排行筛选 2022-08-31 10:33:36 +08:00
347e9a05e0 颜色调整已领商品及已领dt积分 2022-08-31 09:38:19 +08:00
94f10ce4af 已领dt积分列表页面搭建 2022-08-31 09:36:06 +08:00
7f240feac7 merge 2022-08-31 09:07:18 +08:00
3410132c97 任务首页搭建 2022-08-31 09:07:00 +08:00
唐明明
315a034aed 修复多规格显示错误 2022-08-30 14:15:51 +08:00
唐明明
d5cba55ee9 merge 2022-08-30 11:31:44 +08:00
唐明明
1b28b58214 版本更新 2022-08-30 11:31:30 +08:00
5d72deb94f 处理merge 2022-08-30 08:38:06 +08:00
695587c1a2 同步最新数据 2022-08-30 08:36:37 +08:00
唐明明
d401416db2 暂时屏蔽个人中心我的拼单入口 2022-08-29 13:38:54 +08:00
唐明明
907a127a7d 删除冗余代码 2022-08-29 11:08:37 +08:00
唐明明
8c72ce32fd 删除 'pages/.DS_Store' 2022-08-29 11:03:12 +08:00
唐明明
067d601d32 删除 '.DS_Store' 2022-08-29 11:03:02 +08:00
唐明明
608fb452b3 优化店铺开通会员 2022-08-29 11:02:26 +08:00
1ed81d4edc merge 2022-08-24 16:50:27 +08:00
bb04fd3439 拼团模块新增完善对接接口等 2022-08-24 16:47:25 +08:00
唐明明
4b2f08c5bd merge 2022-08-18 10:23:49 +08:00
唐明明
6827224b45 删除 'static/.DS_Store' 2022-08-18 10:23:30 +08:00
唐明明
3a4b0a2f72 ... 2022-08-18 10:22:18 +08:00
aa5c4a2c61 切换环境 2022-08-18 10:21:33 +08:00
61f3dd8755 vip换购列表更改及部分拼团功能融合 2022-08-18 10:00:28 +08:00
96ae56192c 优化处理出具 2022-08-15 13:16:05 +08:00
056be42456 修复展示问题等问题 2022-08-12 14:49:06 +08:00
f2cb612887 「我的卡券加会员卡类型」 2022-08-12 09:47:56 +08:00
c0fc64054d vip列表原价展示 2022-08-11 17:22:58 +08:00
d6e3ebef1a merge 2022-08-11 16:27:13 +08:00
4b3d83007b 店铺会员制Vip功能增加 2022-08-11 15:48:33 +08:00
唐明明
e56aa382a9 调整商品详情 2022-08-05 16:54:42 +08:00
唐明明
2d93d2c1e2 调整排行榜,增加banner图链接,增加公告信息分享功能 2022-08-05 14:41:35 +08:00
唐明明
afa7361e2c 改造排行榜 2022-08-05 12:04:11 +08:00
唐明明
09c8217309 merge 2022-08-05 10:48:52 +08:00
7e8ed7115d 商品详情页面+可参与拼单列表 2022-08-04 16:26:59 +08:00
454ccb91c8 拼团列表接口 2022-08-04 13:52:46 +08:00
574994dafd 推荐换成邀请 2022-08-01 15:17:44 +08:00
5618d4e2d7 用户推荐帮 2022-08-01 13:12:06 +08:00
263c896ff9 去掉文版通相关 2022-08-01 11:49:53 +08:00
946e9e44ff 隐藏个人中心文版通 2022-08-01 11:09:40 +08:00
992e4639fc 会员推荐榜 2022-08-01 10:01:33 +08:00
66ebcc6e7a 规格处理== 2022-08-01 09:00:17 +08:00
b84af1859e 同步数据 2022-08-01 08:50:13 +08:00
唐明明
d95db14088 新增平台公告,新增平台人数统计,新增退货状态与商家联系电话 2022-07-26 15:16:17 +08:00
唐明明
a49995f20b 分享二维码 2022-07-19 23:52:12 +08:00
唐明明
1afb7b1f8e 调整客服二维码 2022-07-19 12:04:34 +08:00
唐明明
04376d0e8c 个人中心新增绑定关系 2022-07-19 11:57:20 +08:00
唐明明
ebcfea2855 merge 2022-07-19 10:13:41 +08:00
唐明明
8b5d275fa5 移出激励视频广告 2022-07-08 14:10:12 +08:00
135 changed files with 69311 additions and 40063 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

1
.gitignore vendored
View File

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

View File

@@ -10,6 +10,10 @@
{ {
"launchtype" : "local" "launchtype" : "local"
}, },
"h5" :
{
"launchtype" : "remote"
},
"type" : "uniCloud" "type" : "uniCloud"
} }
] ]

41
App.vue
View File

@@ -1,13 +1,46 @@
<script> <script>
import { getVersions } from './apis/interfaces/versions' import {
getVersions
} from './apis/interfaces/versions'
export default { export default {
onShow() {
// 已经登录过且携带了参数 有弹窗且
setTimeout(() => {
if (uni.getStorageSync('token')) {
if (plus.runtime.arguments.split('?')[1]) {
let shareId = plus.runtime.arguments.split('?')[1].split('invitation')[0]
if (shareId != '' && shareId != undefined) {
uni.showModal({
title: ' 温馨提示',
content: '有人邀请您一起拼团',
cancelColor: '#999',
cancelText: '再想想',
confirmColor: '#34ce98',
confirmText: '立即拼团',
success: (res) => {
uni.hideLoading()
if (res.confirm) {
plus.runtime.arguments = null;
plus.runtime.arguments = '';
uni.navigateTo({
url: '/pages/group-book/success/success?access=1&id=' +
shareId
})
}
}
})
}
}
}
}, 100);
},
onLaunch: function() { onLaunch: function() {
//#ifdef APP-PLUS //#ifdef APP-PLUS
// 获取系统版本号 // 获取系统版本号
getVersions({ getVersions({
platform: plus.os.name, platform: plus.os.name,
version : plus.runtime.version version: plus.runtime.version
}).then(res => { }).then(res => {
if (res.update) { if (res.update) {
uni.showModal({ uni.showModal({
@@ -15,7 +48,7 @@
content : res.note || '版本更新信息', content : res.note || '版本更新信息',
confirmText : "更新", confirmText : "更新",
showCancel : !res.info.must, showCancel : !res.info.must,
success : modalRes => { success: modalRes => {
if (modalRes.confirm) { if (modalRes.confirm) {
if (plus.os.name == "Android") { if (plus.os.name == "Android") {
uni.showToast({ uni.showToast({
@@ -60,7 +93,7 @@
}) })
}) })
//#endif //#endif
} },
} }
</script> </script>

View File

@@ -1,4 +1,3 @@
/** /**
* Web唐明明 * Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。 * 匆匆数载恍如梦,岁月迢迢华发增。
@@ -10,9 +9,9 @@ import router from '../router'
// 基础配置 // 基础配置
const config = { const config = {
// apiUrl : 'https://api.gongli.vip/api/', // 正式环境 apiUrl : 'https://api.gongli.vip/api/', // 正式环境
apiUrl : 'http://api.gl.shangkelian.cn/api/', // 测试 // apiUrl: 'http://api.gl.shangkelian.cn/api/', // 测试
timeout : 60000 timeout: 60000
} }
let loginHintState = false let loginHintState = false
@@ -20,10 +19,10 @@ let loginHintState = false
// 网络请求 // 网络请求
const request = (parameter, hideLoding = true) => { const request = (parameter, hideLoding = true) => {
// 检查url配置 // 检查url配置
if(parameter.url === 'undefined' || parameter.url === ''){ if (parameter.url === 'undefined' || parameter.url === '') {
uni.showToast({ uni.showToast({
title: '请求地址不能为空', title: '请求地址不能为空',
icon : 'none' icon: 'none'
}) })
return return
} }
@@ -33,31 +32,31 @@ const request = (parameter, hideLoding = true) => {
'Authorization': store.getters.getToken || uni.getStorageSync('token') 'Authorization': store.getters.getToken || uni.getStorageSync('token')
} }
// 加载提示 // 加载提示
if(!hideLoding) uni.showLoading({ if (!hideLoding) uni.showLoading({
title: '加载中', title: '加载中',
mask : true mask: true
}); });
// 请求实例 // 请求实例
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.request({ uni.request({
url : config.apiUrl + parameter.url, url: config.apiUrl + parameter.url,
timeout : config.timeout, timeout: config.timeout,
header : config.header || {}, header: config.header || {},
data : parameter.data || {}, data: parameter.data || {},
method : parameter.method || 'GET', method: parameter.method || 'GET',
success : res => { success: res => {
if (res.header.Authorization){ if (res.header.Authorization) {
updateToken('token', res.header.Authorization) updateToken('token', res.header.Authorization)
} }
if(res.statusCode === 200){ if (res.statusCode === 200) {
uni.hideLoading() uni.hideLoading()
const resolveData = res.data const resolveData = res.data
if(resolveData.status_code === 200) { if (resolveData.status_code === 200) {
resolve(resolveData.data) resolve(resolveData.data)
return return
} }
if(resolveData.status_code === 401) { if (resolveData.status_code === 401) {
loginHint() loginHint()
return return
} }
@@ -69,7 +68,7 @@ const request = (parameter, hideLoding = true) => {
fail(err) { fail(err) {
uni.showToast({ uni.showToast({
title: '网络错误,请检查您设备网络状态', title: '网络错误,请检查您设备网络状态',
icon : 'none' icon: 'none'
}) })
} }
}) })
@@ -80,7 +79,7 @@ const request = (parameter, hideLoding = true) => {
const uploading = (paths) => { const uploading = (paths) => {
uni.showLoading({ uni.showLoading({
title: '上传中', title: '上传中',
mask : true mask: true
}); });
// 注入header // 注入header
config.header = { config.header = {
@@ -90,14 +89,14 @@ const uploading = (paths) => {
// 上传图片 // 上传图片
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.uploadFile({ uni.uploadFile({
url : config.apiUrl + 'storage/uploads', url: config.apiUrl + 'storage/uploads',
files : paths, files: paths,
header : config.header || {}, header: config.header || {},
success : res=>{ success: res => {
if(res.statusCode === 200){ if (res.statusCode === 200) {
uni.hideLoading() uni.hideLoading()
let updData = JSON.parse(res.data) let updData = JSON.parse(res.data)
if(updData.status_code === 200){ if (updData.status_code === 200) {
resolve(updData.data) resolve(updData.data)
return return
} }
@@ -112,23 +111,23 @@ const uploading = (paths) => {
// 处理一些http请求错误提示 // 处理一些http请求错误提示
const errToast = (code) => { const errToast = (code) => {
switch (code){ switch (code) {
case 404: case 404:
uni.showToast({ uni.showToast({
title: code + '接口不存在,请联系系统管理员', title: code + '接口不存在,请联系系统管理员',
icon : 'none' icon: 'none'
}) })
break; break;
case 405: case 405:
uni.showToast({ uni.showToast({
title: code + '请检查接口请求方式错误', title: code + '请检查接口请求方式错误',
icon : 'none' icon: 'none'
}) })
break; break;
case 500: case 500:
uni.showToast({ uni.showToast({
title: code + '服务端错误,请检查服务器信息', title: code + '服务端错误,请检查服务器信息',
icon : 'none' icon: 'none'
}) })
break; break;
} }
@@ -143,19 +142,19 @@ const updateToken = (token) => {
// 处理登录提示 // 处理登录提示
const loginHint = () => { const loginHint = () => {
if( loginHintState ) return if (loginHintState) return
if(!loginHintState) loginHintState = true if (!loginHintState) loginHintState = true
updateToken('') updateToken('')
uni.showModal({ uni.showModal({
title: '登录提示', title: '登录提示',
content: '您的登录信息已过期,请重新登录', content: '您的登录信息已过期,请重新登录',
confirmColor: '#8b64fd', confirmColor: '#8b64fd',
showCancel:false, showCancel: false,
success: res=> { success: res => {
loginHintState = false loginHintState = false
if (res.confirm) { if (res.confirm) {
uni.reLaunch({ uni.reLaunch({
url:'/pages/auth/auth' url: '/pages/auth/auth'
}) })
} }
} }

View File

@@ -1,4 +1,3 @@
/** /**
* Web唐明明 * Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。 * 匆匆数载恍如梦,岁月迢迢华发增。
@@ -6,10 +5,12 @@
* moduleName: 鉴权 * moduleName: 鉴权
*/ */
import { request } from '../index' import {
request
} from '../index'
// 验证码登录 // 验证码登录
const smsAuth = (data) =>{ const smsAuth = (data) => {
return request({ return request({
url: "user/auth/sms", url: "user/auth/sms",
method: 'POST', method: 'POST',
@@ -17,8 +18,18 @@ const smsAuth = (data) =>{
}) })
} }
// 获取图形验证码
const captcha = () => {
return request({
url: "user/auth/captcha",
method: 'POST',
data:{}
})
}
// 获取带有邀请码可填写的邀请码接口 // 获取带有邀请码可填写的邀请码接口
const getInvitationSms = (data) =>{ const getInvitationSms = (data) => {
return request({ return request({
url: "user/auth/new_verify", url: "user/auth/new_verify",
method: 'POST', method: 'POST',
@@ -27,7 +38,7 @@ const getInvitationSms = (data) =>{
} }
// 获取验证码 // 获取验证码
const getSms = (data) =>{ const getSms = (data) => {
return request({ return request({
url: "user/auth/verify", url: "user/auth/verify",
method: 'POST', method: 'POST',
@@ -52,9 +63,9 @@ const createUser = (data) => {
} }
// 用户隐私,用户服务协议 // 用户隐私,用户服务协议
const secretService = (name) =>{ const secretService = (name) => {
return request({ return request({
url: "articles/agreement/"+name url: "articles/agreement/" + name
}) })
} }
@@ -74,5 +85,6 @@ export {
userFigure, userFigure,
createUser, createUser,
secretService, secretService,
keyAuth keyAuth,
captcha
} }

View File

@@ -34,3 +34,4 @@ export {
glz, glz,
sign sign
} }

View File

@@ -0,0 +1,49 @@
/**
* Web-zdx
* moduleName: 任务模块接口
*/
import {
request
} from '../index'
// 获取当前 token 用户的任务领取情况
const user = () => {
return request({
url: 'mall/shops/tasks/user',
})
}
// 意见反馈通知列表
const list = (data) => {
return request({
url: 'mall/shops/tasks',
data:data,
})
}
// 根据活动 id 获取视频的链接
const getVideoUrl = (id) => {
return request({
url: 'mall/shops/tasks/'+id+'/url',
})
}
// 完成任务
const execute = (id) => {
return request({
url: 'mall/shops/tasks/'+id+'/execute',
method:'POST',
})
}
export {
user,
list,
getVideoUrl,
execute,
}

27
apis/interfaces/notice.js Normal file
View File

@@ -0,0 +1,27 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 通知公告
*/
import { request } from '../index'
// 列表
const list = () =>{
return request({
url: "cms/articles/notice"
})
}
// 详情
const info = (id) =>{
return request({
url: "cms/articles/" + id
})
}
export {
list,
info
}

View File

@@ -44,9 +44,46 @@ const dtPAY = (orderNo,password) => {
} }
const collagePAY = (orderNo,password) => {
return request({
url: 'mall/pay/' + orderNo + '/collage/account',
method:'post',
data: {
type: 'app',
transfer_password:password
}
})
}
// 河马支付
const hmPay = (orderID) => {
return request({
url : 'user/transaction/recharge/payment/hema',
data : {
order_id: orderID
},
method : 'POST'
})
}
// 河马付支付结果查询
const hmState = (type, id) => {
return request({
url : 'hema/affirm',
method : 'POST',
data : {
type,
id
}
})
}
export { export {
wxPAY, wxPAY,
alPAY, alPAY,
dtPAY, dtPAY,
payIndex, payIndex,
collagePAY,
hmPay,
hmState
} }

40
apis/interfaces/pin.js Normal file
View File

@@ -0,0 +1,40 @@
/**
* Web-zdx
* moduleName: 拼团相关接口
*/
import {
request
} from '../index'
// 拼团列表
const pinList = (data) => {
return request({
url: 'mall/goods/collages',
data:data
})
}
// 我的拼团列表
const myPinList = (data) => {
return request({
url: 'mall/collages',
data:data
})
}
// 根据拼团 id 获取拼团详情
const myPinDetail = (id) => {
return request({
url: 'mall/collages/'+id,
})
}
export {
pinList,
myPinList,
myPinDetail
}

View File

@@ -24,8 +24,40 @@ const week = () => {
}) })
} }
// 会员推荐帮
const total = () => {
return request({
url: 'user/rank/total'
})
}
// 用户推荐榜
const totaluser = () => {
return request({
url: 'user/rank/totaluser'
})
}
// 月度推荐会员排行榜
const monthVip = () => {
return request({
url: 'user/rank/month_vip'
})
}
// 月度推荐用户排行榜
const monthUser = () => {
return request({
url: 'user/rank/month_user'
})
}
export { export {
week_mul, week_mul,
week, week,
total,
totaluser,
monthVip,
monthUser
} }

View File

@@ -40,14 +40,10 @@ const shopsDetail = (shopId) => {
} }
// 店铺商品 // 店铺商品
const shopsGoods = (shopId, categoryId,page) => { const shopsGoods = (data) => {
return request({ return request({
url: 'mall/goods', url: 'mall/goods',
data: { data: data
shop_id:shopId,
category_id:categoryId,
page:page,
}
}) })
} }
@@ -66,6 +62,21 @@ const buy = data => {
data data
}) })
} }
// 拼团商品确认页面
const buyPin = data => {
return request({
url: 'mall/buy/collages',
data
})
}
// 拼团商品确认下单
const collages = data => {
return request({
url: 'mall/buy/collages',
method: 'POST',
data
})
}
// 商品下单 // 商品下单
const verify = data => { const verify = data => {
@@ -83,6 +94,21 @@ const classify = id => {
}) })
} }
// 拼团成功后展示页面
const repages = id => {
return request({
url: 'mall/collages/' + id + '/repages'
})
}
// 商城所有分类
const categories = id => {
return request({
url: 'mall/categories/lists'
})
}
export { export {
mall, mall,
goods, goods,
@@ -91,6 +117,10 @@ export {
shopsGoods, shopsGoods,
lists, lists,
buy, buy,
buyPin,
verify, verify,
classify collages,
repages,
classify,
categories
} }

View File

@@ -30,8 +30,42 @@ const invitationCode = () => {
}) })
} }
// 绑定分享关系
const relationsBind = (invite) => {
return request({
url: 'user/relations/bind',
data: {
invite
},
method: 'POST'
})
}
// 确认绑定关系
const relationsVerify = (invite) => {
return request({
url: 'user/relations/verify',
data: {
invite
}
})
}
// 我的卡券
const myCard = (data) => {
data.receive = 'desc'
return request({
url: 'mall/shops/users',
data:data
})
}
export { export {
info, info,
chainSeed, chainSeed,
invitationCode invitationCode,
relationsBind,
relationsVerify,
myCard
} }

View File

@@ -36,11 +36,43 @@ const agreement = (id) => {
}) })
} }
// 店铺会员
const shopVipInfo = (id) => {
return request({
url: 'mall/shops/'+id+'/identities'
})
}
//开通店铺会员
const shopVipCreate = (id,identity) => {
return request({
url: 'mall/shops/'+id+'/identities/'+identity,
method:'POST'
})
}
// 开通店铺会员微信支付
const shopVipWeChat = (id) => {
return request({
url: 'mall/shops/identities/wechat/'+id,
method:'POST'
})
}
// 河马付
const vipHmPay = (orderId) => {
return request({
url: 'user/identities/pay/' + orderId + '/hema'
})
}
export { export {
vip, vip,
vipPay, vipPay,
payInfo, payInfo,
agreement, agreement,
shopVipInfo,
shopVipCreate,
shopVipWeChat,
vipHmPay
} }

View File

@@ -0,0 +1,146 @@
<template>
<view class="goods-item">
<image src="/static/background/supplier_back.png" mode="aspectFill" class="goods-cover" />
<view class="goods-info">
<view class="_title">京东直营电脑类商品 mac 笔记本 鼠标键盘</view>
<view class="_des">店铺名称 </view>
<view class="_pin">
<view class="_has" > <image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已免费领取 12 </view>
<!-- <view class="tuan">11人参与活动</view> -->
</view>
<view class="price">
<view class="money">110 <span>DT积分</span> </view>
<view class="now-pin" @click="goPin('11')">查看详情</view>
</view>
<view class="pin"> 奖励 </view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
props: {
item: {
type: Object,
default: {},
}
},
methods: {
goPin(id) {
this.$emit('goPin',id)
}
},
};
</script>
<style lang="scss" scoped>
.goods-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
background-color: white;
border-radius: 10rpx;
padding: $padding;
margin-bottom: 20rpx;
position: relative;
.pin{
position: absolute;
background-color: #e74a45;
border-radius:0 0 30rpx 0 ;
padding: 2rpx 30rpx 2rpx 30rpx;
color: #fff;
left: 0;
top: 0;
font-size: 28rpx;
font-weight: bold;
}
.goods-cover {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
}
.goods-info {
width: calc(100% - 160rpx - 30rpx);
padding-left: $padding;
._title {
overflow: hidden;
font-size: 30rpx;
font-weight: 600;
white-space: nowrap;
text-overflow: ellipsis;
}
._des {
font-size: 28rpx;
padding: 6rpx 0;
color: #4f300a;
}
._pin {
font-size: 26rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: $text-gray;
._has {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: #e74a45;
background-color: rgba($color: $text-price, $alpha: 0.1);
padding: 4rpx 10rpx;
border-radius: 30rpx;
margin-right: $margin;
image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
}
}
.price {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-top: 20rpx;
.money {
font-size: 34rpx;
font-weight: 600;
color: #e74a45;
span{
font-size: 24rpx;
margin-left: 10rpx;
font-weight: normal;
}
}
.now-pin {
border: solid #cacaca 1rpx;
font-size: 26rpx;
font-weight: bold;
padding: 6rpx 20rpx;
border-radius: 20rpx;
color: #999;
}
}
}
}
</style>

View File

@@ -0,0 +1,327 @@
<template>
<view>
<view class="order--content" :class="[pattern ? 'chunk': 'broad']">
<view class="order--group--header" @click="$emit('onBtn', {type: 'shopsDetail', order: orderInfo})">
<image class="logo" v-if="orderInfo.shop.cover != ''" :src="orderInfo.shop.cover" mode="aspectFill">
</image>
<view class="store">
{{orderInfo.shop.name}}
<uni-icons type="right" size="16" color="#666" />
</view>
<view class="stateText" :style="{color: stateColor}">
{{orderInfo.collage.status_text}}
</view>
</view>
<view class="order--header">
<view class="order--no">
订单号{{orderInfo.no}}
</view>
</view>
<view class="order--flex" @click="$emit('onBtn', {type: 'goodsDetail', order: orderInfo})">
<image class="order--cover" :src="orderInfo.cover" mode="aspectFill"></image>
<view class="order--title">
{{orderInfo.name}}
<view class="unit"> {{orderInfo.unit}} </view>
</view>
<view class="order--count">
<view class="order--price">{{orderInfo.price}}<text>DT积分</text></view>
<view class="order--sum">{{orderInfo.sum}} </view>
</view>
</view>
<slot name="btns">
<view class="flexrow">
<view class="">
<u-avatar-group :random-bg-color="true" :urls="orderInfo.users" size="26" gap="0.4"
class="avatar-group" />
</view>
<view class="order--btns">
<view v-if="orderInfo.collage.status =='3'" class="item item--sign"
@click="$emit('onBtn', {type: 'share', order: orderInfo})">
分享拼团
</view>
<view class="item item--cancel" @click="$emit('onBtn', {type: 'goInfo', order: orderInfo})">
查看详情
</view>
</view>
</view>
</slot>
</view>
</view>
</template>
<script>
export default {
props: {
// 订单样式否为块
pattern: {
type: Boolean,
default: true
},
// 店铺模式
stores: {
type: Boolean,
default: false
},
// 订单信息
orderInfo: {
type: Object,
default: () => {
return {
cover: "",
name: "",
price: "",
sum: 1,
collage: {},
users: [],
invite: '',
order: {},
}
}
},
// 状态标签颜色
stateColor: {
type: String,
default: "#FF6160"
},
// 可操作按钮组
orderBtns: {
type: Array,
default: () => {
return [{
text: "订单详情",
type: "info"
}, {
text: "删除订单",
type: "delete",
style: {
color: "#FF6160"
}
}]
}
}
}
}
</script>
<style scoped lang="scss">
$margin: 30rpx;
$radius: 10rpx;
.text-nowrap {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.text-ellipsis {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.order--content {
background: white;
&.chunk {
margin: $margin $margin;
border-radius: $radius;
padding: $margin;
}
&.broad {
padding: $margin;
border-bottom: solid 1rpx #ddd;
}
.order--header {
display: flex;
justify-content: space-between;
padding-bottom: $margin;
border-top: solid 1rpx #f9f9f9;
align-items: center;
&>.order--no {
flex: 1;
margin-right: $margin;
font-size: 26rpx;
line-height: 40rpx;
color: #555;
@extend .text-nowrap;
padding-top: 10rpx;
}
&>.stateText {
font-size: 26rpx;
color: $text-price;
}
}
.order--flex {
display: flex;
align-items: center;
.order--cover {
vertical-align: top;
width: 128rpx;
height: 128rpx;
}
.order--title {
@extend .text-ellipsis;
text-align: left;
flex: 1;
padding-left: $margin;
font-size: 28rpx;
line-height: 40rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
.unit {
color: #999;
font-size: 26rpx;
padding-top: 10rpx;
}
}
.order--count {
text-align: right;
padding-left: $margin;
line-height: 40rpx;
// color: $text-price;
.order--price {
font-size: 30rpx;
font-weight: bold;
&>text {
font-size: 24rpx;
font-weight: normal;
padding-left: 10rpx;
}
}
.order--sum {
font-size: 26rpx;
color: #777;
}
}
}
.order--group {
.order--group--header {
padding-bottom: $margin;
display: flex;
justify-content: space-between;
align-items: center;
&>.logo {
width: 38rpx;
height: 38rpx;
vertical-align: middle;
margin-right: $margin/2;
}
&>.store {
@extend .text-nowrap;
flex: 1;
margin-right: $margin;
font-size: 28rpx;
line-height: 40rpx;
color: #555;
}
&>.stateText {
font-size: 26rpx;
}
}
.order--group--flex {
@extend .order--flex;
margin-bottom: $margin - 10;
&:last-child {
margin: 0;
}
}
}
.order--group--header {
padding-bottom: $margin;
display: flex;
justify-content: space-between;
align-items: center;
&>.logo {
width: 38rpx;
height: 38rpx;
vertical-align: middle;
margin-right: $margin/2;
}
&>.store {
@extend .text-nowrap;
flex: 1;
margin-right: $margin;
font-size: 28rpx;
line-height: 40rpx;
color: #555;
}
&>.stateText {
font-size: 26rpx;
}
}
.order--group--flex {
@extend .order--flex;
margin-bottom: $margin - 10;
&:last-child {
margin: 0;
}
}
.flexrow {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-top: $margin - 10;
border-top: solid 1rpx #f9f9f9;
margin-top: $margin - 10;
}
.order--btns {
display: flex;
justify-content: flex-end;
// padding-top: $margin - 10;
&>.item {
font-size: 26rpx;
margin-left: $margin/2;
color: #333;
line-height: 56rpx;
border: solid 1rpx #ddd;
padding: 0 ($margin - 10);
border-radius: 28rpx;
&--cancel,
&--delete,
&--logistic {
color: #666;
}
&--pay,
&--sign {
color: #34CE98;
border-color: #34CE98;
}
}
}
}
</style>

View File

@@ -0,0 +1,148 @@
<template>
<view class="goods-item">
<image :src="item.cover" mode="aspectFill" class="goods-cover" />
<view class="goods-info">
<view class="_title">{{item.name}}</view>
<view class="_des">{{item.shop.name}} </view>
<view class="_pin">
<view class="_has" v-if="item.sales>0"> <image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已拼 {{item.sales}} </view>
<view class="tuan">{{item.active.number}}人团</view>
</view>
<view class="price">
<view class="money">{{item.active.price}} <span>DT积分</span> </view>
<view class="now-pin" @click="goPin(item.goods_id)">马上拼团</view>
</view>
<view class="pin">
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
props: {
item: {
type: Object,
default: {},
}
},
methods: {
goPin(id) {
this.$emit('goPin',id)
}
},
};
</script>
<style lang="scss" scoped>
.goods-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
background-color: white;
border-radius: 10rpx;
padding: $padding;
margin-bottom: 20rpx;
position: relative;
.pin{
position: absolute;
background-color: #22aa98;
border-radius:0 0 30rpx 0;
padding: 2rpx 30rpx 2rpx 30rpx;
color: #fff;
left: 0;
top: 0;
font-size: 28rpx;
font-weight: bold;
}
.goods-cover {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
}
.goods-info {
width: calc(100% - 160rpx - 30rpx);
padding-left: $padding;
._title {
overflow: hidden;
font-size: 30rpx;
font-weight: 600;
white-space: nowrap;
text-overflow: ellipsis;
}
._des {
font-size: 28rpx;
padding: 6rpx 0;
color: #4f300a;
}
._pin {
font-size: 26rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: $text-gray;
._has {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: #d81e06;
background-color: rgba($color: $text-price, $alpha: 0.1);
padding: 4rpx 10rpx;
border-radius: 30rpx;
margin-right: $margin;
image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
}
}
.price {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-top: 20rpx;
.money {
font-size: 34rpx;
font-weight: 600;
color: #d81e06;
span{
font-size: 24rpx;
margin-left: 10rpx;
font-weight: normal;
}
}
.now-pin {
background-color: $main-color;
font-size: 28rpx;
font-weight: bold;
padding: 6rpx 20rpx;
border-radius: 20rpx;
color: #fff;
}
}
}
}
</style>

View File

@@ -1,75 +0,0 @@
# 使用方法
```
<x-pay-pwd
ref="xPayPwd"
:type="1"
:maskClick="true"
top="unset"
bottom="0rpx"
:showClose="false"
@change="change"
:showHead="true"
headText="请输入支付密码"
>
<template #center>
<button @click="clear">插槽</button>
</template>
</x-pay-pwd>
```
```
export default {
methods: {
// 监听输入框内容变化
change({password}){
console.log(password)
},
// 清空输入框内容,一般用于密码输错手动清空
clear(){
this.$refs.xPayPwd._clearKey();
}
}
}
```
# 属性
| 字段 | 类型 | 默认 | 描述 |
| --------- | ------- | -------------- | ---------------------------------------- |
| type | Number | 1 | 0原生键盘 1自定义键盘 |
| maskClick | Boolean | true | 是否允许点击蒙版 |
| top | String | 20vh | 中间内容的top值为absolute的top值 |
| bottom | String | 0rpx | 中间内容的bottom值为absolute的bottom值 |
| showClose | Boolean | true | 是否显示关闭按钮 |
| showHead | Boolean | true | 是否显示标题 |
| headText | String | 请输入支付密码 | 标题文本 |
# 事件
| 事件名 | 默认参数 | 描述 |
| ------ | ---------- | -------------------------------- |
| change | {password} | 监听内容输入,参数返回输入的内容 |
# 组件方法
| 方法名 | 描述 |
| ------ | -------------------------------- |
| _open | 打开弹窗 |
| _close | 关闭弹窗 |
| _clearnKey | 请空输入内容 |
# 注意
```
ios下输入框不会自动获取焦点需要手动点击输入区域
```
# 参与贡献
+ xueshuai(xueshuai_12@163.com)
+ Emailxueshuai_12@163.com
+ GitHubGitHub地址
+ QQ交流群1063233592
+ 个人博客:(薛小帅)[http://blog.xueshuai.top]
+ 个人公众号叮当Ding
![叮当Ding](https://img-blog.csdnimg.cn/20210202143040150.png)

View File

@@ -0,0 +1,184 @@
<template>
<view class="goods-item">
<view class="bg"> {{item.shop_vip.message}} </view>
<image :src="item.cover" mode="aspectFill" class="goods-cover" />
<view class="tags"> VIP </view>
<view class="goods-info">
<view class="_title">{{item.name}}</view>
<view class="_des"> {{item.shop.name}} </view>
<view class="_pin" v-if="item.sales>0">
<view class="_has">
<image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已换购 {{item.sales}}
</view>
</view>
<view class="price">
<view class="money">
{{item.price.price_min}} <span>DT积分</span>
<span class='del'>{{item.original_price}} DT积分</span>
</view>
<view class="now-pin" @click="goPin(item.goods_id)">立即领取</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
props: {
item: {
type: Object,
default: {},
}
},
methods: {
goPin(id) {
this.$emit('goPin', id)
}
},
};
</script>
<style lang="scss" scoped>
.goods-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
background-color: white;
border-radius: 10rpx;
padding: $padding;
margin-bottom: 20rpx;
position: relative;
z-index: 0;
overflow: hidden;
.bg {
position: absolute;
top: -40rpx;
right: -10rpx;
opacity: 0.05;
font-size: 130rpx;
color: #999;
z-index: 1;
font-weight: bold;
}
.tags {
position: absolute;
top: 6rpx;
left: -54rpx;
background: #d81e06;
color: #fff;
width: 150rpx;
font-size: 24rpx;
padding: 4rpx 0;
text-align: center;
transform: rotate(-45deg);
font-weight: bold;
letter-spacing: 2rpx;
}
.goods-cover {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
}
.goods-info {
width: calc(100% - 160rpx - 30rpx);
padding-left: $padding;
._title {
overflow: hidden;
font-size: 30rpx;
font-weight: 600;
white-space: nowrap;
text-overflow: ellipsis;
}
._des {
font-size: 26rpx;
padding: 10rpx 0;
margin-bottom: 4rpx;
color: #4f300a;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
}
._pin {
font-size: 26rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: $text-gray;
._has {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: #d81e06;
background-color: rgba($color: $text-price, $alpha: 0.1);
padding: 4rpx 10rpx;
border-radius: 30rpx;
image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
}
.tuan {
margin-left: $margin;
}
}
.price {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-top: 20rpx;
.money {
font-size: 34rpx;
font-weight: 600;
color: #d81e06;
span {
font-size: 24rpx;
margin-left: 10rpx;
font-weight: normal;
}
.del {
text-decoration: line-through;
margin-left: 10rpx;
font-size: 24rpx;
color: #999;
font-weight: normal;
}
}
.now-pin {
background-color: #d81e06;
font-size: 28rpx;
font-weight: bold;
padding: 6rpx 20rpx;
border-radius: 20rpx;
color: #fff;
}
}
}
}
</style>

View File

@@ -2,7 +2,7 @@
"name" : "共力生态", "name" : "共力生态",
"appid" : "__UNI__DE7B0E6", "appid" : "__UNI__DE7B0E6",
"description" : "共力生态", "description" : "共力生态",
"versionName" : "1.0.35", "versionName" : "1.0.51",
"versionCode" : 100, "versionCode" : 100,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
@@ -47,6 +47,9 @@
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
@@ -64,7 +67,8 @@
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"autoSdkPermissions" : true "autoSdkPermissions" : true,
"schemes" : "glst,gonglishengtai,gldao"
}, },
/* ios */ /* ios */
"ios" : { "ios" : {
@@ -74,7 +78,8 @@
"NSPhotoLibraryUsageDescription" : "发送图文消息", "NSPhotoLibraryUsageDescription" : "发送图文消息",
"NSPhotoLibraryAddUsageDescription" : "保存图片消息", "NSPhotoLibraryAddUsageDescription" : "保存图片消息",
"NSLocationWhenInUseUsageDescription" : "发送当前位置信息" "NSLocationWhenInUseUsageDescription" : "发送当前位置信息"
} },
"dSYMs" : false
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs" : {
@@ -84,7 +89,7 @@
"payment" : { "payment" : {
"weixin" : { "weixin" : {
"__platform__" : [ "android" ], "__platform__" : [ "android" ],
"appid" : "wx466a4663da346e09", "appid" : "wx10517aabd260b79e",
"UniversalLinks" : "" "UniversalLinks" : ""
}, },
"alipay" : { "alipay" : {
@@ -93,13 +98,11 @@
}, },
"share" : { "share" : {
"weixin" : { "weixin" : {
"appid" : "wx466a4663da346e09", "appid" : "wx10517aabd260b79e",
"UniversalLinks" : "" "UniversalLinks" : ""
} }
}, },
"ad" : { "ad" : {},
"sigmob" : {}
},
"push" : {}, "push" : {},
"geolocation" : { "geolocation" : {
"system" : { "system" : {
@@ -149,7 +152,25 @@
"androidStyle" : "common" "androidStyle" : "common"
} }
}, },
"nativePlugins" : {} "nativePlugins" : {
"TestModule" : {
"__plugin_info__" : {
"name" : "河马支付",
"description" : "河马支付",
"platforms" : "Android",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
}
},
"uniStatistics" : {
"enable" : true
}
}, },
/* */ /* */
"quickapp" : {}, "quickapp" : {},
@@ -159,19 +180,53 @@
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },
"usingComponents" : true "usingComponents" : true,
"uniStatistics" : {
"enable" : true
}
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true,
"uniStatistics" : {
"enable" : true
}
}, },
"mp-baidu" : { "mp-baidu" : {
"usingComponents" : true "usingComponents" : true,
"uniStatistics" : {
"enable" : true
}
}, },
"mp-toutiao" : { "mp-toutiao" : {
"usingComponents" : true "usingComponents" : true,
"uniStatistics" : {
"enable" : true
}
}, },
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : true
}, },
"vueVersion" : "2" "vueVersion" : "2",
"h5" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-kuaishou" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-lark" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-qq" : {
"uniStatistics" : {
"enable" : true
}
},
"fallbackLocale" : "zh-Hans",
"locale" : "auto"
} }

View File

@@ -0,0 +1,20 @@
{
"name": "河马支付",
"id": "TestModule",
"version": "1.0.0",
"description": "河马支付",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
"android": {
"plugins": [
{
"type": "module",
"name": "TestModule",
"class": "io.dcloud.uniplugin.AppModule"
}
],
"integrateType": "aar"
}
}
}

View File

@@ -3,7 +3,7 @@ const version = '2.0.31'
// 开发环境才提示,生产环境不会提示 // 开发环境才提示,生产环境不会提示
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
console.log(`\n %c uView V${version} %c https://www.uviewui.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #ffffff; padding:5px 0;'); // console.log(`\n %c uView V${version} %c https://www.uviewui.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #ffffff; padding:5px 0;');
} }
export default { export default {

View File

@@ -154,9 +154,21 @@
"path": "pages/store/list", "path": "pages/store/list",
"name": "StoreList", "name": "StoreList",
"style": { "style": {
"navigationBarTitleText": "商品", "navigationBarTitleText": "更多商品",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true,
"app-plus": {
"titleNView": {
"backgroundColor": "#fff",
"buttons": [{
"float": "right",
"text": "\ue603",
"fontSrc": "/static/iconfont.ttf",
"color": "#000",
"fontSize": "20px"
}]
}
}
} }
}, },
{ {
@@ -191,7 +203,6 @@
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
}, },
{ {
"path": "pages/refund/detail", "path": "pages/refund/detail",
"name": "OrderRefundDetail", "name": "OrderRefundDetail",
@@ -248,7 +259,7 @@
"navigationBarBackgroundColor": "#34CE98", "navigationBarBackgroundColor": "#34CE98",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
},{ }, {
"path": "pages/account/wbtBind", "path": "pages/account/wbtBind",
"name": "WbtBind", "name": "WbtBind",
"style": { "style": {
@@ -447,7 +458,7 @@
"color": "#696969", "color": "#696969",
"type": "none", "type": "none",
"fontSrc": "/static/fonts/iconfont1.ttf", "fontSrc": "/static/fonts/iconfont1.ttf",
"text": "\ue608" //小相机 "text": "\ue608"
}] }]
} }
} }
@@ -461,7 +472,7 @@
}, { }, {
"path": "pages/rank/index", "path": "pages/rank/index",
"style": { "style": {
"navigationBarTitleText": "会员推荐", "navigationBarTitleText": "排行榜",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#34CE98" "navigationBarBackgroundColor": "#34CE98"
@@ -506,6 +517,141 @@
} }
} }
}, {
"path": "pages/life/notice",
"name": "Notice",
"style": {
"navigationBarTitleText": "系统公告",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/life/noticeDetails",
"name": "noticeDetails",
"style": {
"navigationBarTitleText": "公告详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "分享",
"fontSize": "14",
"width": "60px",
"color": "#333"
}]
}
}
}
}, {
"path": "pages/group-book/index",
"name": "GroupBook",
"style": {
"navigationBarTitleText": " 一起拼",
"enablePullDownRefresh": false
}
}, {
"path": "pages/store/vip/index/index",
"style": {
"navigationBarTitleText": "***店铺会员",
"enablePullDownRefresh": false
}
}, {
"path": "pages/user/my-card/my-card",
"name": "MyCard",
"style": {
"navigationBarTitleText": "我的卡券",
"enablePullDownRefresh": false
}
}, {
"path": "pages/group-book/success/success",
"style": {
"navigationBarTitleText": "拼单更多",
"enablePullDownRefresh": false
}
}, {
"path": "pages/store/vip-list/vip-list",
"name": "VipList",
"style": {
"navigationBarTitleText": "VIP换购中心",
"enablePullDownRefresh": false
}
}, {
"path": "pages/group-book/list/list",
"name": "PinList",
"style": {
"navigationBarTitleText": "拼团列表 ",
"enablePullDownRefresh": false
}
}, {
"path": "pages/group-book/detail/detail",
"style": {
"navigationBarTitleText": "拼团详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/mission/mission",
"name": "Mission",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "任务中心",
"app-plus": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"type": "transparent"
}
}
}
}, {
"path": "pages/mission/get-dt/get-dt",
"name": "GetDt",
"style": {
"navigationBarTitleText": "已领DT积分",
"navigationBarBackgroundColor": "#e74a45",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
}, {
"path": "pages/mission/get-goods/get-goods",
"name": "GetGoods",
"style": {
"navigationBarTitleText": "已领商品",
"navigationBarBackgroundColor": "#e74a45",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
}, {
"path": "pages/account/hmState",
"name": "hmState",
"style": {
"navigationBarTitleText": "支付结果",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/mission/videoPlay/videoPlay",
"name": "VideoPlay",
"style": {
"navigationStyle": "custom"
}
}, {
"path": "pages/mission/videoPlay/videoPlay",
"name": "VideoPlay",
"style": {
"navigationStyle": "custom"
}
}, {
"path": "pages/mission/webview/webview",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
} }
], ],
"tabBar": { "tabBar": {
@@ -526,7 +672,7 @@
"iconPath": "static/tabBar/tabBar_05.png", "iconPath": "static/tabBar/tabBar_05.png",
"selectedIconPath": "static/tabBar/tabBar_show_05.png", "selectedIconPath": "static/tabBar/tabBar_show_05.png",
"pagePath": "pages/rank/index", "pagePath": "pages/rank/index",
"text": "排行榜" "text": "排行榜"
}, },
{ {
"iconPath": "static/tabBar/tabBar_03.png", "iconPath": "static/tabBar/tabBar_03.png",

View File

@@ -15,7 +15,7 @@
</view> </view>
<view class="num">{{frozenScore || '0.0000'}}</view> <view class="num">{{frozenScore || '0.0000'}}</view>
</view> </view>
<button class="transfer" size="mini" @click="dtShow = true">充值</button> <button class="transfer" size="mini" @click="dtSelect">充值</button>
<button class="transfer" size="mini" @click="onTransfer('AccountTransfer')">转账</button> <button class="transfer" size="mini" @click="onTransfer('AccountTransfer')">转账</button>
</view> </view>
<block v-if="logs.length > 0"> <block v-if="logs.length > 0">
@@ -41,10 +41,10 @@
<u-popup :show="dtShow" mode="bottom" @close="dtShow = false " :round="10"> <u-popup :show="dtShow" mode="bottom" @close="dtShow = false " :round="10">
<view class="dt-type"> <view class="dt-type">
<view class="dt-item" @click="dtSelect('wbt')"> <!-- <view class="dt-item" @click="dtSelect('wbt')">
<image src="/static/icon/pay_wbt.png" mode="widthFix" /> <image src="/static/icon/pay_wbt.png" mode="widthFix" />
文版通充值 文版通充值
</view> </view> -->
<view class="dt-item" @click="dtSelect('wchat')"> <view class="dt-item" @click="dtSelect('wchat')">
<image src="/static/icon/pay_wechat.png" mode="widthFix" /> <image src="/static/icon/pay_wechat.png" mode="widthFix" />
微信充值 微信充值
@@ -85,9 +85,13 @@
}, },
methods: { methods: {
dtSelect(type){ dtSelect(type){
this.onTransfer('AccountRecharge');
return
// 充值选项
switch(type){ switch(type){
case 'wchat': case 'wchat':
this.onTransfer('AccountRecharge'); this.onTransfer('AccountRecharge');
this.dtShow = false;
break; break;
case 'wbt': case 'wbt':
wbtCheck().then(res=>{ wbtCheck().then(res=>{

145
pages/account/hmState.vue Normal file
View File

@@ -0,0 +1,145 @@
<template>
<view>
<view class="vertical results">
<block v-if="loding">
<u-loading-icon mode="circle" size="58" color="#34CE98"></u-loading-icon>
<view class="circle-toast">
<view class="sub-title">已等待{{time}}</view>
<view class="sub-title">查询支付结果中请耐心等待...</view>
</view>
</block>
<block v-else>
<view v-if="success">
<uni-icons type="checkbox-filled" size="88" color="#34CE98"></uni-icons>
<view class="title">支付成功</view>
<view class="sub-title">{{remove}}</view>
<button class="results-button" type="default" size="default" @click="navBack">返回</button>
</view>
<view v-else>
<uni-icons type="info-circle-fill" size="88" color="#34CE98"></uni-icons>
<view class="title">{{code === 0 ? '查询失败' : '订单不存在'}}</view>
<view class="sub-title">{{code === 0 ? '暂未查询到您的支付信息,如支付成功未到账请联系管理员': '暂未查询到您的订单信息'}}</view>
<button class="results-button" type="default" size="default" @click="navBack">返回</button>
</view>
</block>
</view>
</view>
</template>
<script>
import { hmState } from '@/apis/interfaces/pay.js'
var outTime;
export default {
data() {
return {
type : 'recharge',
hash : '',
time : 0,
loding : false,
success : false,
code : 0,
remove : '充值成功预计10秒内到账可在账户交易记录中查询以实际到账时间为准如充值失败金额将原路退还'
};
},
created() {
this.type = this.$Route.query.type
if(this.type === 'vip') this.remove = '恭喜您成功开通共力生态会员'
if(this.type === 'buy') this.remove = '订单支出成功,可在个人中心中订单中查询您购物的订单'
this.queryState()
},
methods:{
queryState(){
this.loding = true
let outTimeN = 0
outTime = setInterval(() => {
hmState(this.type, this.$Route.query.orderId).then(res => {
outTimeN += 1
this.time = outTimeN
if(res.code === 1){
clearInterval(outTime)
this.success = true
this.loding = false
}
if(res.code === 0 && outTimeN >= 10){
clearInterval(outTime)
this.code = 0
this.loding = false
}
if(res.code === 2){
clearInterval(outTime)
this.code = 2
this.loding = false
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}, 1000)
},
navBack(){
uni.navigateBack()
}
},
onUnload() {
clearInterval(outTime)
}
}
</script>
<style lang="scss" scoped>
.results{
height: 100vh;
box-sizing: border-box;
text-align: center;
padding-left: $padding * 3;
padding-right: $padding * 3;
padding-bottom: 20vh;
.title{
font-size: $title-size + 8;
color: $text-color;
font-weight: bold;
line-height: 80rpx;
padding: $padding 0;
}
.sub-title{
color: $text-gray;
line-height: 40rpx;
}
.hash{
background-color: white;
padding: $padding * 2;
border-radius: $radius-lg;
margin-top: $margin * 2;
font-size: $title-size;
color: $text-color;
.hash-title{
padding-bottom: $padding;
}
.hash-text{
word-break:break-all;
}
}
.results-button{
width: 100%;
margin-top: $margin * 3;
height: 90rpx;
line-height: 90rpx;
border-radius: 45rpx;
background-color: $main-color;
color: white;
font-size: $title-size;
font-weight: bold;
&::after{
display: none;
}
}
.circle-toast{
padding-top: 60rpx;
.sub-title{
line-height: 60rpx;
}
}
}
</style>

View File

@@ -24,20 +24,36 @@
</view> </view>
<view class="recharge-btn"> <view class="recharge-btn">
<button :disabled="this.priceValue === ''" @click="onRecharge">充值</button> <button :disabled="this.priceValue === ''" @click="onRecharge">充值</button>
<view class="recharge-text">提示暂时仅支持使用微信支付充值</view> <view class="recharge-text">提示暂时仅支持使用支付宝支付充值</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
var hmAppPay = uni.requireNativePlugin('TestModule');
import { hmPay } from '@/apis/interfaces/pay.js';
import { recharge, payment, paymentpre } from "@/apis/interfaces/account" import { recharge, payment, paymentpre } from "@/apis/interfaces/account"
export default { export default {
data() { data() {
return { return {
priceValue: '', priceValue: '',
paymentpre: [] orderId : '',
paymentpre: [],
hmPayState: false
}; };
}, },
onShow() {
if(this.hmPayState){
this.$Router.replace({
name : 'hmState',
params : {
type : 'recharge',
orderId : this.orderId
}
})
return
}
},
created() { created() {
paymentpre().then(res => { paymentpre().then(res => {
this.paymentpre = res this.paymentpre = res
@@ -81,6 +97,21 @@
}, },
// 获取充值信息 // 获取充值信息
getPayInfo(order_id){ getPayInfo(order_id){
if(plus.runtime.isApplicationExist({
pname : 'com.eg.android.AlipayGphone',
action : 'alipay://'
})){
uni.showLoading({
title: '获取支付信息'
})
this.getHmPayInfo(order_id)
}else{
uni.showToast({
title: '支付失败,请安装支付宝',
icon : 'none'
})
}
return
payment({order_id}).then(res => { payment({order_id}).then(res => {
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
@@ -107,8 +138,28 @@
icon : 'none' icon : 'none'
}) })
}) })
},
// 河马支付
getHmPayInfo(order_id){
this.orderId = order_id
hmPay(order_id).then(res => {
try{
hmAppPay.gotoNativePage(JSON.stringify(res.params))
this.hmPayState = true
}catch(e){
uni.showToast({
title: e
})
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
} }
}, },
// 充值记录
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
this.$Router.push({name: 'AccountLog'}) this.$Router.push({name: 'AccountLog'})
} }

View File

@@ -1,44 +1,62 @@
<template> <template>
<view class="content"> <view class="content">
<oct-address <oct-address :lists="addressList" :pattern="true" :isEdit="edit" editColor="#34CE98"
:lists="addressList" :btnStyle="{'backgroundColor': '#34CE98'}" @onAddress="onInfo"
:pattern="true" @onAdd="$Router.push({name: 'AddressEdit'})" />
:isEdit="edit"
editColor="#34CE98"
:btnStyle="{'backgroundColor': '#34CE98'}"
@onAddress="onInfo"
@onAdd="$Router.push({name: 'AddressEdit'})"
/>
<!-- --> <!-- -->
</view> </view>
</template> </template>
<script> <script>
import { list } from '@/apis/interfaces/address' import {
list
} from '@/apis/interfaces/address'
export default { export default {
data() { data() {
return { return {
edit : true, edit: true,
addressList: [] addressList: [],
task_id: '',
}; };
}, },
onShow(){ onShow() {
this.edit = this.$Route.query.type === 'edit' this.edit = this.$Route.query.type === 'edit'
this.task_id = this.$Route.query.task_id
list().then(res => { list().then(res => {
this.addressList = res this.addressList = res
}) })
}, },
methods: { methods: {
onInfo(val){ onInfo(val) {
if(this.edit){ if (this.edit) {
this.$Router.push({ this.$Router.push({
name : 'AddressEdit', name: 'AddressEdit',
params : { params: {
id : val.address_id id: val.address_id
} }
}) })
}else{ } else {
console.log('back........', this.task_id)
if (this.task_id && this.task_id != '') {
uni.showModal({
title: '温馨提示',
content: '是否确认将该商品发货到这个位置',
confirmColor: '#34ce98',
confirmText: '我确定',
cancelColor: '#999',
cancelText: '再想想',
success: (res) => {
if (res.confirm) {
uni.navigateBack();
}
if (res.cancel) {
uni.navigateBack();
}
}
})
return;
}
this.$store.commit('setAddress', val) this.$store.commit('setAddress', val)
this.$Router.back() this.$Router.back()
} }
@@ -48,7 +66,7 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.content{ .content {
background: #F3F6FB; background: #F3F6FB;
overflow: hidden; overflow: hidden;
min-height: 100vh; min-height: 100vh;

View File

@@ -6,27 +6,27 @@
<view>共力生态</view> <view>共力生态</view>
<view>即可开始共力人生</view> <view>即可开始共力人生</view>
</view> </view>
<view class="auth-input"> <view class="auth-input"> <input v-model="phone" type="number" maxlength="11" placeholder="输入手机号码"> </view>
<input v-model="phone" type="number" maxlength="11" placeholder="输入手机号码">
</view>
<view class="auth-input auth-code"> <view class="auth-input auth-code">
<input v-model="code" type="number" maxlength="4" placeholder="输入验证码"> <input v-model="code" type="number" maxlength="4" placeholder="输入验证码">
<button :disabled="getSms" size="mini" @click="getPhoneCode()">{{sendCode}}</button> <button :disabled="getSms" size="mini" @click="getCaptcha">{{sendCode}}</button>
</view>
<view class="auth-input" v-if="isShowParent">
<input v-model="parentId" placeholder="输入邀请码,选填">
</view>
<view class="auth-button">
<button @click="login('code')">登录</button>
</view> </view>
<view class="auth-input" v-if="isShowParent"> <input v-model="parentId" placeholder="输入邀请码"> </view>
<view class="auth-button"> <button @click="login('code')">登录</button> </view>
<view class="auth-agreement"> <view class="auth-agreement">
登录即表示同意<navigator hover-class="none" url="/pages/vip/agreement?id=3">用户协议</navigator><navigator 登录即表示同意<navigator hover-class="none" url="/pages/vip/agreement?id=3">用户协议</navigator><navigator
hover-class="none" url="/pages/vip/agreement?id=4">隐私政策</navigator> hover-class="none" url="/pages/vip/agreement?id=4">隐私政策</navigator>
</view> </view>
<view class="auth-other" v-if="isKeyAuth"> <view class="auth-other" v-if="isKeyAuth"> <button @click="login('Akey')">使用本机号码一键登录</button> </view>
<button @click="login('Akey')">使用本机号码一键登录</button>
</view> </view>
<u-popup :show="showCaptchaCode" :round='10' mode='center' @close='close' @open="open">
<view class="showImgCode">
<view class="title"> 图片验证码 </view>
<image class="cover" @click="getCaptcha()" :src="captchaImg" mode="widthFix" />
<input class="input" v-model="captchaCode" maxlength="6" placeholder="请输入验证码" />
<view class="btn" @click="sureImgCode"> 确认验证码 </view>
</view> </view>
</u-popup>
</view> </view>
</template> </template>
@@ -34,24 +34,37 @@
import { import {
smsAuth, smsAuth,
getInvitationSms, getInvitationSms,
keyAuth keyAuth,
captcha,
} from '@/apis/interfaces/auth.js' } from '@/apis/interfaces/auth.js'
export default { export default {
data() { data() {
return { return {
phone : '', phone: '',
code : '', code: '',
parentId : '', parentId: '', // 父类邀请码
getSms : false, getSms: false,
sendCode : '获取验证码', sendCode: '获取验证码',
isShowParent: false, isShowParent: false,
isKeyAuth : false isKeyAuth: false,
shareId: '',
captchaImg: '',
captchaKey: '',
captchaCode: '',
showCaptchaCode: false, // 是否显示图片验证弹窗
}; };
}, },
onShow () { onShow() {
setTimeout(() => {
if (plus.runtime.arguments.split('?')[1]) {
let args = plus.runtime.arguments.split('?')[1]
this.shareId = args.split('invitation')[0]
this.parentId = args.split('invitation')[1]
}
}, 100);
uni.showLoading({ uni.showLoading({
title: '加载中...', title: '加载中...',
mask : true mask: true
}) })
// 预登录 // 预登录
uni.preLogin({ uni.preLogin({
@@ -65,16 +78,77 @@
}) })
}, },
methods: { methods: {
open() {
},
close() {
this.showCaptchaCode = false
},
// 弹窗确认验证码
sureImgCode() {
if (this.captchaCode != '' && this.captchaCode.length == 4) {
this.showCaptchaCode = false;
this.getPhoneCode();
return;
}
uni.showToast({
title: '请核对图片验证码',
icon: 'none',
mask: true,
duration: 2000
})
},
// 获取图片验证码
getCaptcha() {
if (this.phone.length != 11) {
uni.showToast({
title: '请核对手机号码',
icon: 'none',
mask: true,
duration: 2000,
})
return;
}
this.captchaCode = ''
this.captchaKey = ''
this.captchaImg = ''
this.showCaptchaCode = true;
captcha().then(res => {
this.captchaKey = res.key;
this.captchaImg = res.img;
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
mask: true,
duration: 2000,
})
})
},
// 获取验证码 // 获取验证码
getPhoneCode() { getPhoneCode() {
if (this.phone.length != 11) {
uni.showToast({
title: '请核对手机号码',
icon: 'none',
mask: true,
duration: 2000,
})
return;
}
uni.showLoading({ uni.showLoading({
title : '加载中...', title: '加载中...',
mask :true mask: true
}) })
let outTime; let outTime;
let smsTime = 60; let smsTime = 60;
getInvitationSms({ getInvitationSms({
mobileNo: this.phone, mobileNo: this.phone,
captcha_key: this.captchaKey,
captcha: this.captchaCode,
}).then(res => { }).then(res => {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
@@ -83,6 +157,8 @@
this.isShowParent = res.is_show_parent this.isShowParent = res.is_show_parent
this.getSms = true; this.getSms = true;
this.sendCode = smsTime + 's后重新获取'; this.sendCode = smsTime + 's后重新获取';
this.captchaKey = ''
this.captchaCode = ''
outTime = setInterval(() => { outTime = setInterval(() => {
if (smsTime <= 1) { if (smsTime <= 1) {
this.getSms = false; this.getSms = false;
@@ -93,7 +169,11 @@
this.sendCode = smsTime + 's后重新获取'; this.sendCode = smsTime + 's后重新获取';
smsTime -= 1; smsTime -= 1;
}, 1000); }, 1000);
this.captchaKey = ''
this.captchaCode = ''
}).catch((err) => { }).catch((err) => {
this.captchaCode = ''
this.captchaKey = ''
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: "none", icon: "none",
@@ -106,11 +186,12 @@
uni.showLoading({ uni.showLoading({
title: '登录中' title: '登录中'
}) })
smsAuth({ let data = {
mobileNo : this.phone, mobileNo: this.phone,
code : this.code, code: this.code,
parent_id : this.parentId parent_id: this.parentId
}).then((res) => { }
smsAuth(data).then((res) => {
this.setAuthToken(res.token_type + ' ' + res.access_token, res.is_new) this.setAuthToken(res.token_type + ' ' + res.access_token, res.is_new)
uni.hideLoading() uni.hideLoading()
}).catch((err) => { }).catch((err) => {
@@ -119,17 +200,17 @@
icon: "none", icon: "none",
}); });
}); });
return return;
} }
if (type === 'Akey') { if (type === 'Akey') {
this.onKeyLogin() this.onKeyLogin()
} }
}, },
// 一键登录 // 一键登录
onKeyLogin(){ onKeyLogin() {
uni.login({ uni.login({
provider:'univerify', provider: 'univerify',
univerifyStyle:{ univerifyStyle: {
icon: { icon: {
path: require('@/static/logo.png') path: require('@/static/logo.png')
}, },
@@ -148,38 +229,65 @@
} }
}, },
success: Result => { success: Result => {
if(Result.errMsg === 'login:ok'){ if (Result.errMsg === 'login:ok') {
let {access_token, openid} = Result.authResult let {
access_token,
openid
} = Result.authResult
keyAuth({ keyAuth({
access_token, access_token,
openid openid
}).then(res => { }).then(res => {
this.setAuthToken(res.token_type + ' ' + res.access_token, res.is_new) this.setAuthToken(res.token_type + ' ' + res.access_token, res
.is_new)
uni.closeAuthView() uni.closeAuthView()
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: '登录失败:' + err.message, title: '登录失败:' + err.message,
icon : 'none' icon: 'none'
}) })
uni.closeAuthView() uni.closeAuthView()
}) })
} }
}, },
fail: err => { fail: err => {
console.log(err) uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
} }
}) })
}, },
// setToken // setToken
setAuthToken(token, isNew){ setAuthToken(token, isNew) {
this.$store.commit('setToken', token); this.$store.commit('setToken', token);
if(isNew){ if (isNew) {
uni.setStorageSync('isnew', 0) uni.setStorageSync('isnew', 0)
this.$Router.replace({name: 'AuthRole'}) this.$Router.replace({
name: 'AuthRole',
params: {
shareId: this.shareId
}
})
return return
} }
uni.setStorageSync('isnew', 1) uni.setStorageSync('isnew', 1)
this.$Router.pushTab({name: 'Life'}) if (this.shareId != '' && this.shareId != undefined) {
setTimeout(() => {
uni.hideLoading()
plus.runtime.arguments = null;
plus.runtime.arguments = '';
uni.reLaunch({
url: '/pages/group-book/success/success?access=1&id=' + this.shareId
})
}, 1000)
} else {
this.$Router.pushTab({
name: 'Life'
})
}
} }
} }
} }
@@ -214,6 +322,28 @@
color: white; color: white;
} }
.auth-img-code {
display: flex;
flex-direction: row;
align-items: center;
border-radius: 50rpx;
margin-top: 40rpx;
background: white;
height: 100rpx;
input {
height: 100rpx;
font-size: 32rpx;
padding: 0 50rpx;
flex: 1;
}
image {
width: 180rpx;
margin-right: 50rpx;
}
}
.auth-input { .auth-input {
background: white; background: white;
height: 100rpx; height: 100rpx;
@@ -299,5 +429,43 @@
} }
} }
} }
.showImgCode {
width: 600rpx;
padding: 50rpx 30rpx;
display: flex;
flex-direction: column;
.title {
text-align: center;
font-size: 40rpx;
font-weight: bold;
}
.cover {
width: 100%;
padding: 50rpx 0;
height: 150rpx;
}
.input {
border-radius: 6rpx;
border: solid 1rpx #cacaca;
padding: 30rpx 0;
text-align: center;
font-size: 34rpx;
}
.btn {
background-color: #34ce98;
color: #fff;
font-weight: bold;
border-radius: 10rpx;
margin-top: 30rpx;
text-align: center;
padding: 30rpx 0;
font-size: 36rpx;
}
}
} }
</style> </style>

View File

@@ -71,7 +71,19 @@
storage_id : this.storageId storage_id : this.storageId
}).then(res => { }).then(res => {
uni.setStorageSync('isnew', 1) uni.setStorageSync('isnew', 1)
if(this.$Route.query.shareId!='' && this.$Route.query.shareId != undefined){
setTimeout(() => {
uni.hideLoading()
plus.runtime.arguments = null;
plus.runtime.arguments = '';
uni.reLaunch({
url: '/pages/group-book/success/success?access=1&id=' + this.$Route.query.shareId
})
}, 1000)
}else{
this.$Router.pushTab({name: 'Life'}) this.$Router.pushTab({name: 'Life'})
}
uni.setStorageSync('isnew', 1)
}).catch(err => { }).catch(err => {
this.disabled = false this.disabled = false
uni.showToast({ uni.showToast({

View File

@@ -52,7 +52,7 @@
> >
<slot> <slot>
<view class="wechat-content"> <view class="wechat-content">
<image class="wechat-qrcode" :src="require('@/static/user/qrCode.jpeg')" mode="widthFix"></image> <image class="wechat-qrcode" :src="require('@/static/user/qrCode.png')" mode="widthFix"></image>
<view class="wechat-text">扫描企业微信二维码添加微信客服</view> <view class="wechat-text">扫描企业微信二维码添加微信客服</view>
</view> </view>
</slot> </slot>
@@ -97,7 +97,7 @@
methods: { methods: {
dowQrCode(){ dowQrCode(){
uni.saveImageToPhotosAlbum({ uni.saveImageToPhotosAlbum({
filePath: require('@/static/user/qrCode.jpeg'), filePath: require('@/static/user/qrCode.png'),
success(res) { success(res) {
uni.showToast({ uni.showToast({
title: '二维码已保存到系统相册', title: '二维码已保存到系统相册',

BIN
pages/group-book/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,417 @@
<template>
<view class="pin-detail">
<view class="goods">
<image class="cover" :src="goods.cover" mode="aspectFill" />
<view class="info">
<view class="title">{{goods.name}} </view>
<view class="subtitle">
<view class="hasPined" v-if="collage.sale>0">
<image src="/static/store/fire.png" mode="widthFix" />已拼{{collage.sale}}
</view>
<view class="tuan">{{collage.number}}人团</view>
</view>
<view class="price">
<view class="now">{{goods.price}}<span>DT积分</span></view>
<view class="old"> {{goods.cost}}积分 </view>
</view>
</view>
</view>
<view class="pin">
<view class="title">
<block v-if="collage.down>0 && collage.status == 3">
<u-count-down :time="collage.down* 1000" format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
&nbsp; </u-count-down>
距离结束<span>{{ timeData.days }}</span>&nbsp;
<span>{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}&nbsp;</span>小时<span>{{ timeData.minutes }}&nbsp;</span>分钟<span>{{ timeData.seconds }}&nbsp;</span>
</block>
<block v-if="collage.status != 3">
<span>{{collage.status_text}}</span>
</block>
</view>
<view class="avatars">
<block>
<image v-for="(item,index) in users" :key='"avatar"+index+1' :class="['avatar',item.master?'pin':''] " :src="item" mode="aspectFill" />
</block>
<block v-if="collage.surplus>0">
<image v-for="(item,index) in collage.surplus" :key='"surplus"+index+2' class="wen" src="/static/book/wen.png" mode="aspectFill" />
</block>
</view>
<view class="title" v-if="collage.sale>0">已拼<span>{{collage.sale}}</span></view>
<view class="progress">
{{collage.number - collage.surplus}}
<u-line-progress activeColor="#34ce98" class="line" :percentage="collage.score" :showText="false" />
{{collage.number}}
</view>
</view>
<view class="warn" v-if="collage.status == 3 || collage.status == 2">完成支付后需在24小时内邀请好友参加拼团否则拼团失败自动退款</view>
<view class="order" v-if="orderDetail.order_no != ''">
<view class="title">订单详情</view>
<view class="order-item">
<view class="order-item-title">订单编号</view>
<view class="order-item-detail">{{orderDetail.order_no}}</view>
</view>
<view class="order-item">
<view class="order-item-title">下单时间</view>
<view class="order-item-detail">{{orderDetail.created_at}}</view>
</view>
<view class="order-item">
<view class="order-item-title">支付时间</view>
<view class="order-item-detail">{{orderDetail.paid_at}}</view>
</view>
<view class="order-item" v-if="collage.status == 1&& express.deliver_at">
<view class="order-item-title">发货时间</view>
<view class="order-item-detail">{{ express.deliver_at || '--'}}</view>
</view>
<view class="order-item" v-if="collage.status == 1 && express.receive_at">
<view class="order-item-title">签收时间</view>
<view class="order-item-detail">{{ express.receive_at || '--'}}</view>
</view>
<view class="order-item">
<view class="order-item-title">支付方式</view>
<view class="order-item-detail">DT支付</view>
</view>
<view class="order-item">
<view class="order-item-title">备注信息</view>
<view class="order-item-detail">{{orderDetail.remark || '--'}}</view>
</view>
</view>
<view class="btn" v-if="collage.status == 1 && can">
<view v-if="can.logistic_show" @click="onBtn('logistic')" class="btn-item"> 查看物流 </view>
<view v-if="can.sign" @click="onBtn('sign')" class="btn-item success"> 确认签收 </view>
</view>
</view>
</template>
<script>
import {
myPinDetail
} from '@/apis/interfaces/pin.js'
import { sign } from '@/apis/interfaces/order'
export default {
data() {
return {
orderDetail: {},
goods: {},
collage: {},
users: [],
timeData: {},
express: {},
can: {}
};
},
onLoad() {
this.getInfo()
},
methods: {
getInfo(){
myPinDetail(this.$Route.query.id).then(res => {
console.log(res)
this.orderDetail = res.order_detail;
this.goods = res.item;
let collage = res.collage;
collage.score = (res.collage.number - res.collage.surplus)/res.collage.number * 100
this.collage = collage;
this.users = res.users;
this.express = res.order_detail.express;
this.can = res.order_detail.can;
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none",
mask: true,
duration: 3000
})
})
},
onChange(e) {
this.timeData = e
},
onBtn(type) {
switch (type) {
case 'logistic':
this.$Router.push({
name: 'OrderLogistics',
params: {
orderNo: this.orderDetail.order_no,
},
});
break;
case 'sign':
uni.showModal({
title: '温馨提示',
content: '是否确认收到货物并签收该订单',
confirmText: '确认签收',
confirmColor: "#34CE98",
cancelText: '再想想',
cancelColor: "#666666",
success: (res) => {
if (res.confirm) {
sign(this.orderDetail.order_no).then(res => {
this.getInfo();
return;
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
}
}
});
break;
}
}
}
}
</script>
<style lang="scss">
.pin-detail {
background-color: $window-color;
min-height: 100vh;
position: relative;
.goods {
padding: $padding;
border-top: solid 20rpx #f9f9f9;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
background-color: #fff;
.cover {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
.info {
flex: 1;
margin-left: 20rpx;
font-size: 32rpx;
.title {
font-size: 32rpx;
color: #454545;
}
.subtitle {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: #999;
font-size: 26rpx;
margin-top: 20rpx;
.hasPined {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: #d81e06;
background-color: rgba(255, 0, 0, .1);
padding: 4rpx 24rpx;
border-radius: 30rpx;
image {
width: 34rpx;
height: 34rpx;
margin: 6rpx;
}
}
.tuan {
margin-left: 20rpx;
}
}
.price {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
margin-top: 20rpx;
margin-left: 10rpx;
.now {
font-size: 38rpx;
font-weight: bold;
color: #d81e06;
span {
font-weight: normal;
font-size: 24rpx;
padding-left: 4rpx;
}
}
.old {
font-weight: normal;
font-size: 26rpx;
color: #999;
margin-left: 30rpx;
text-decoration: line-through;
padding-top: 16rpx;
}
}
}
}
.pin {
margin-top: $margin - 10;
background-color: #fff;
padding: $padding;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
.title {
font-size: 30rpx;
color: #454545;
span {
color: #d81e06;
font-size: 36rpx;
font-weight: bold;
padding: 0 6rpx;
}
}
.progress {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
color: #454545;
font-size: 28rpx;
margin-top: $margin*2 - 20;
.line {
flex: 1;
margin: 0 $margin - 10;
}
}
.avatars {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
position: relative;
margin-top: $margin;
image {
width: 100rpx;
height: 100rpx;
// padding: 20rpx;
border-radius: 50%;
margin: 10rpx 20rpx;
border: solid 2rpx #f9f9f9;
}
.pin {
position: relative;
&::after {
position: absolute;
top: 0;
left: 0;
content: '拼主';
background: orange;
padding: 4rpx 0;
font-size: 20rpx;
width: 100%;
text-align: center;
color: #fff;
}
}
}
}
.warn {
text-align: center;
padding: $padding - 10 $padding + 20;
color: grey;
font-size: 26rpx;
}
.order {
background-color: #fff;
padding: $padding;
margin-top: 20rpx;
padding-bottom: 150rpx;
.title {
font-size: 32rpx;
color: #454545;
font-weight: bold;
border-bottom: solid 1rpx #f9f9f9;
padding-bottom: 20rpx;
}
.order-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
;
box-sizing: border-box;
color: #454545;
padding: $padding 0;
border-bottom: solid 1rpx #f9f9f9;
.order-item-title {
font-size: 30rpx;
}
.order-item-detail {
font-size: 30rpx;
}
}
}
.btn {
position: fixed;
bottom: 0;
background-color: #fff;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
padding: 0 $padding + 20 $padding $padding + 20;
.btn-item {
font-size: 26rpx;
margin-left: $margin/2;
color: #333;
line-height: 56rpx;
border: solid 1rpx #ddd;
padding: 0 ($margin - 10);
border-radius: 28rpx;
display: inline-block;
margin-top: $margin;
}
.success {
color: #34CE98;
border-color: #34CE98;
}
}
}
</style>

125
pages/group-book/index.vue Normal file
View File

@@ -0,0 +1,125 @@
<template>
<view class="groupBook">
<view class="top">
<view class="title">爆款推荐</view>
<view>省钱省心限时拼</view>
</view>
<!-- 有数据 -->
<scroll-view scroll-y="true" class="scroll" @scrolltolower='scrolltolower' v-if="lists.length>0">
<block v-for="(item,index) in lists" :key="index">
<pinGoodsItem :item="item" @goPin="goPin" />
</block>
</scroll-view>
<!-- 没数据 -->
<scroll-view scroll-y="true" class="scroll" v-else>
<view class="vertical pages-empty" style="padding-top: 200rpx;">
<u-empty
icon="http://cdn.uviewui.com/uview/empty/list.png"
textColor="#999"
text="暂无拼单商品~"
/>
</view>
</scroll-view>
</view>
</template>
<script>
import pinGoodsItem from '@/components/pin-goods-item/index.vue'
import {
pinList
} from '@/apis/interfaces/pin.js'
export default {
components: {
pinGoodsItem
},
data() {
return {
lists: [],
page: 1,
has_more: true,
};
},
onLoad() {
this.getList()
},
methods: {
getList() {
pinList({
page: this.page
}).then(res => {
this.lists = this.lists.concat(res.data)
this.has_more = res.page.has_more
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none",
mask: true
})
})
},
// 触底获取更多~
scrolltolower() {
if (this.has_more) {
this.page = this.page + 1
this.getList()
}else{
uni.showToast({
title:'没有更多~',
icon:'none'
})
}
},
// 马上拼团
goPin(id) {
console.log('fule gopin....')
uni.navigateTo({
url:'/pages/store/goods?id='+id
})
}
}
}
</script>
<style lang="scss">
.groupBook {
width: 100%;
min-height: 100vh;
position: relative;
background: $window-color;
box-sizing: border-box;
position: relative;
.top {
position: absolute;
top: 0;
left: 0;
font-size: $title-size - 2;
color: #fff;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding;
box-sizing: border-box;
background: linear-gradient(to bottom, #22aa98, rgba(255, 255, 255, 0));
padding-bottom: 40vh;
z-index: 1;
.title {
font-size: 40rpx;
font-weight: bold;
}
}
.scroll {
height: 100vh;
position: relative;
padding: $padding * 4 $padding $padding $padding;
box-sizing: border-box;
z-index: 2;
}
}
</style>

View File

@@ -0,0 +1,215 @@
<template>
<view class="content">
<!-- tabs -->
<u-sticky>
<u-tabs class="tabs" :list="tabs" :scrollable="false" :current="index" lineColor="#34CE98" @click="onTabs"
sticky />
</u-sticky>
<block v-if="array.length >= 1">
<!-- 订单列表 -->
<orderPin v-for="(item, arrayIndex) in array" :key="arrayIndex" :order-info="item" @onBtn="onType" />
<!-- 加载更多 -->
<view class="pages-load">
<u-loadmore :status="status" />
</view>
</block>
<block v-else>
<view class="vertical order-null">
<u-empty mode="order" icon="http://cdn.uviewui.com/uview/empty/order.png" text="暂无相关订单"
textColor="#999" />
</view>
</block>
<!-- 分享 -->
<uni-popup ref="popupShare" type="share" background-color="#fff">
<uni-popup-share title="立即分享到" @select="select" />
</uni-popup>
</view>
</template>
<script>
import {
orders,
del,
cancel,
sign
} from '@/apis/interfaces/order'
import {
myPinList
} from '@/apis/interfaces/pin'
import eventBus from '../../../utils/eventBus.js';
import orderPin from '@/components/oct-order-pin/index.vue'
export default {
components: {
orderPin
},
data() {
return {
status: "loading",
tabs: [{
name: "全部",
type: "",
},
{
name: "拼团中",
type: "3",
},
{
name: "拼团成功",
type: "1",
},
{
name: "拼团失败",
type: "2",
}
],
index: '0',
array: [],
page: 1,
shareInfo: {},
};
},
onLoad() {
this.getOrder()
},
onShow() {
if (this.$store.getters.getRefresh == 1) {
this.$store.commit('setRefresh', 0)
this.array = []
this.page = 1
this.getOrder()
}
},
methods: {
getOrder() {
myPinList({
state: this.tabs[this.index].type,
page: this.page
}).then(res => {
console.log(res)
if (res.page.current === 1) {
this.array = []
}
let ordersArr = res.data.map(val => {
return {
no: val.order_no,
cover: val.item.cover,
name: val.item.name,
price: val.item.price,
sum: 1,
collage: val.collage,
shop: val.shop,
goods_id: val.item.goods_id,
unit: val.item.unit,
users: val.users,
invite: val.invite,
order: val.order,
url: val.url
}
})
this.array = this.array.concat(ordersArr)
this.status = res.page.has_more ? 'loadmore' : 'nomore'
})
},
onTabs(e) {
this.page = 1
this.index = e.index
this.getOrder()
},
onType(e) {
let orderNo = e.order.no;
let shopId = e.order.shop.shop_id;
let goodsId = e.order.goods_id;
switch (e.type) {
case 'share':
this.shareInfo = e.order
this.$refs.popupShare.open();
console.log('触发分享', this.shareInfo)
break;
case 'goInfo':
uni.navigateTo({
url:'/pages/group-book/detail/detail?id='+e.order.no
})
break;
}
},
// 分享选项
select(e) {
console.log(this.shareInfo.url + this.shareInfo.collage.collage_id + 'invitation' + this
.shareInfo.invite, this.shareInfo.collage.surplus, this.shareInfo.cover, this.shareInfo.name)
switch (e.item.name) {
case 'wxchum':
uni.share({
provider: 'weixin',
scene: 'WXSceneSession',
type: 0,
href: this.shareInfo.url + this.shareInfo.collage.collage_id + 'invitation' + this
.shareInfo.invite,
title: '【仅剩' + this.shareInfo.collage.surplus + '个名额】邀请您一起拼团',
summary: '好货不用一分钱,点点就能带回家【 ' + this.shareInfo.name + '】',
imageUrl: this.shareInfo.cover,
fail: (err) => {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
},
success: (res) => {
this.shareInfo = {}
}
})
break;
case 'wxcircle':
uni.share({
provider: 'weixin',
scene: 'WXSceneTimeline',
type: 0,
href: this.shareInfo.url + this.shareInfo.collage.collage_id + 'invitation' + this
.shareInfo.invite,
summary: '好货不用一分钱,点点就能带回家【 ' + this.shareInfo.name + '】',
imageUrl: this.shareInfo.cover,
fail: (err) => {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
},
success: (res) => {
this.shareInfo = {}
}
})
break;
}
},
},
onReachBottom() {
if (this.status === 'loadmore') {
this.page += 1
this.status = 'loading'
this.getOrder()
}
}
}
</script>
<style lang="scss">
.content {
background: $window-color;
min-height: 100vh;
}
.tabs {
background: white;
}
// 数据列表空
.order-null {
height: 80vh;
}
// 加载分页
.pages-load {
padding-bottom: $padding;
}
</style>

View File

@@ -0,0 +1,299 @@
<template>
<view class="pinSuccess">
<view class="count-down" v-if="downTime>0">
<u-count-down ref="countDown" :time="downTime" format="HH:mm:ss" :autoStart="true" millisecond />
</view>
<view class="title" v-if="surplus>0"> 还差 <span>{{surplus}}</span> 赶紧邀请好友来拼单吧 </view>
<block v-if="share.status == 3">
<view class="btn invite" v-if="!share.can_share " @click="onTake"> 参与该拼单 </view>
<view class="btn invite" v-if="share.can_share" @click="onShare"> 邀请好友拼单 </view>
</block>
<view class="btn index" @click="goIndex"> 去首页逛逛</view>
<view class="goodInfo">
<view class="avatars">
<block >
<image v-for="(item,index) in details" :key='index+1' :class="['avatar',item.master?'pin':''] " :src="item.cover" mode="aspectFill" />
</block>
<block v-if="surplus>0">
<image v-for="(item,index) in surplus" :key='index+2' class="wen" src="/static/book/wen.png" mode="aspectFill" />
</block>
</view>
<block>
<view class="orderInfo">
<view class="left"> 订单详情 </view>
<view class="right" @click="goDetail">
<view class="right-title"> {{goodName}} </view>
<u-icon name="arrow-right" />
</view>
</view>
<view class="orderInfo">
<view class="left">拼单规则</view>
<view class="right">
<view class="right-title">人满发货 · 人不满退款 · 只能拼一次 </view>
</view>
</view>
</block>
</view>
<!-- 分享 -->
<uni-popup ref="popupShare" type="share" background-color="#fff">
<uni-popup-share title="立即分享到" @select="select" />
</uni-popup>
</view>
</template>
<script>
import {
repages
} from '@/apis/interfaces/store.js'
export default {
data() {
return {
goodName: '',
details: [],
downTime: 0,
surplus: 0,
goods: {}, // order 是{} 标识不是我的订单,否则就是我的订单可以跳转订单详情
share:{},
access: '0', // 参与别人的1 自己的分享的0 后来想想这个接口作用不大了 ~ 闹挺 ~ 所以这个字段暂时不用,用后端返回的新字段来区分是自己的拼单还是别人的拼单;
};
},
onLoad() {
this.access = this.$Route.query.access
repages(this.$Route.query.id,{invite:this.invite}).then(res => {
this.share = res.share
this.goods = res.goods
this.goodName = res.goods.name
this.surplus = res.share.surplus
this.details = res.share.details
this.downTime = res.share.down * 1000
uni.setNavigationBarTitle({
title:res.share.status_text
})
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none",
mask: true,
duration: 3000
})
})
},
onHide() {
try {
if (this.$refs.countDown) {
this.$refs.countDown.pause()
}
} catch (err) {
uni.showToast({
title: err,
icon: 'none'
})
}
},
methods: {
// 参与拼单
onTake(){
console.log()
uni.navigateTo({
url: '/pages/store/goods?id=' + this.goods.goods_id+'&shareId='+this.share.collage_id ,// shareId 代表当前商品详情下面拼单有带 id
})
},
// 分享
onShare() {
this.$refs.popupShare.open();
},
// 分享选项
select(e) {
switch (e.item.name) {
case 'wxchum':
uni.share({
provider: 'weixin',
scene: 'WXSceneSession',
type: 0,
href: this.share.url + this.share.collage_id+'invitation'+this.share.invite.invite,
title: '【仅剩' + this.surplus +'个名额】邀请您一起拼团',
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
imageUrl: this.goods.cover,
fail(err) {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
}
})
break;
case 'wxcircle':
uni.share({
provider: 'weixin',
scene: 'WXSceneTimeline',
type: 0,
href: this.share.url + this.share.collage_id+'invitation'+this.share.invite.invite,
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
imageUrl: this.goods.cover,
fail(err) {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
}
})
break;
}
},
// 返回首页
goIndex() {
uni.reLaunch({
url: '/pages/store/index'
})
},
// 商品详情
goDetail() {
uni.navigateTo({
url: '/pages/store/goods?id=' + this.goods.goods_id
})
}
}
}
</script>
<style lang="scss">
.pinSuccess {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
.count-down {
background-color: #f9f9f9;
border-radius: 4rpx;
padding: 10rpx $padding;
margin-top: $margin;
}
.title {
font-size: 38rpx;
font-weight: bold;
margin-top: $margin * 2;
span {
color: $main-color;
font-size: 42rpx;
padding: 0 10rpx;
}
}
.btn {
width: 80%;
background-color: $main-color;
color: #fff;
text-align: center;
padding: $padding - 4;
font-size: 34rpx;
border-radius: 10rpx;
margin-top: $margin;
border: solid $main-color 3rpx;
}
.invite {
margin-top: $margin + 20;
}
.index {
background-color: rgba($color: #fff, $alpha: 1.0);
color: $main-color;
}
.goodInfo {
border-top: solid 20rpx #f9f9f9;
width: 100%;
margin-top: $margin + 20;
padding: $padding + 10;
box-sizing: border-box;
.avatars {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
position: relative;
border-bottom: solid 1rpx #f9f9f9;
padding-bottom: $padding;
image {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
margin: 10rpx 20rpx;
border: solid 2rpx #f9f9f9;
}
.me {
position: relative;
&::after {
position: absolute;
top: 0;
left: 0;
content: '我';
border-radius: 20rpx;
background: $main-color;
padding: 4rpx 34rpx;
text-align: center;
font-size: 24rpx;
color: #fff;
}
}
.pin {
position: relative;
&::after {
position: absolute;
top: 0;
left: 0;
content: '拼主';
// border-radius: 20rpx;
background: orange;
padding: 4rpx 0;
font-size: 20rpx;
width: 100%;
text-align: center;
color: #fff;
}
}
}
.orderInfo {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
font-size: 28rpx;
color: #666;
border-bottom: solid 1rpx #f9f9f9;
.right {
flex: 1;
margin-left: $margin;
text-align: right;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
.right-title {
margin-right: 10rpx;
color: #999;
}
}
}
}
}
</style>

View File

@@ -19,7 +19,7 @@
</view> </view>
<!-- 分享 --> <!-- 分享 -->
<uni-popup ref="popupShare" type="share" background-color="#fff"> <uni-popup ref="popupShare" type="share" background-color="#fff">
<uni-popup-share title="分享到" @select="select"></uni-popup-share> <uni-popup-share title="分享到" @select="select" :isDowImg="true"></uni-popup-share>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>

View File

@@ -2,6 +2,12 @@
<view class="capacity"> <view class="capacity">
<view class="capacity-title">共力分总产率/小时<text>{{baseHour}}GLF/h</text></view> <view class="capacity-title">共力分总产率/小时<text>{{baseHour}}GLF/h</text></view>
<view class="capacity-sbutitle">总产率=角色产率+团队产率+共建产率+共力值产率</view> <view class="capacity-sbutitle">总产率=角色产率+团队产率+共建产率+共力值产率</view>
<view class="capacity-block">
<view class="capacity-block-title">
<view class="title">平台数据</view>
</view>
<view class="capacity-block-text">平台注册人数<text>{{userData.login}}</text>活跃人数<text>{{userData.online}}</text></view>
</view>
<view class="capacity-block"> <view class="capacity-block">
<view class="capacity-block-title"> <view class="capacity-block-title">
<view class="title">我的角色</view> <view class="title">我的角色</view>
@@ -11,12 +17,11 @@
</view> </view>
<view class="capacity-block"> <view class="capacity-block">
<view class="capacity-block-title"> <view class="capacity-block-title">
<view class="title">成员产率({{group.effect}}/{{group.count}})<text< /text> <view class="title">成员产率({{group.effect}}/{{group.count}})</view>
</view>
<view class="capacity-block-glf">{{group.capacity}}GLF/h</view> <view class="capacity-block-glf">{{group.capacity}}GLF/h</view>
<!-- <view class="more" @click="onInvitation">邀请更多好友</view> --> <!-- <view class="more" @click="onInvitation">邀请更多好友</view> -->
</view> </view>
<view class="capacity-block-table pt30"> <view class="capacity-block-table">
<view class="header"> <view class="header">
<view class="flex-item">家族成员产率</view> <view class="flex-item">家族成员产率</view>
</view> </view>
@@ -104,7 +109,11 @@
build: {}, build: {},
together: {}, together: {},
other: {}, other: {},
can_repeat_sign: false can_repeat_sign: false,
userData: {
login : '-',
online : '-'
}
}; };
}, },
created() { created() {
@@ -129,6 +138,8 @@
cancelColor: '#999', cancelColor: '#999',
cancelText: '再想想', cancelText: '再想想',
success: (res1) => { success: (res1) => {
this.Sign()
return
if (res1.confirm) { if (res1.confirm) {
this.checkIMEI().then(res => { this.checkIMEI().then(res => {
switch (res) { switch (res) {
@@ -172,6 +183,7 @@
methods: { methods: {
glz(){ glz(){
glz().then(res => { glz().then(res => {
this.userData = res.userData
this.nickname = res.nickname this.nickname = res.nickname
this.identityText = res.identity_text this.identityText = res.identity_text
this.baseHour = res.base_hour this.baseHour = res.base_hour
@@ -338,23 +350,21 @@
font-size: 30rpx; font-size: 30rpx;
} }
} }
&-text { &-text {
font-size: 28rpx; font-size: 28rpx;
color: gray; color: gray;
line-height: 40rpx; line-height: 40rpx;
padding-top: 30rpx; padding-top: 10rpx;
text{
color: $main-color;
font-weight: bold;
padding: 0 10rpx;
}
} }
&-table { &-table {
border: solid 1px $border-color; border: solid 1px $border-color;
margin-bottom: 20rpx; margin-top: 20rpx;
padding-top: 30rpx;
&:last-child {
margin-top: 0;
}
.header { .header {
background: $border-color; background: $border-color;
line-height: 50rpx; line-height: 50rpx;
@@ -362,7 +372,6 @@
font-size: 26rpx; font-size: 26rpx;
color: gray; color: gray;
} }
.flex { .flex {
display: flex; display: flex;
border-top: solid 1rpx $border-color; border-top: solid 1rpx $border-color;

View File

@@ -33,12 +33,12 @@
</view> </view>
</view> </view>
<!-- 微信阅读 --> <!-- 微信阅读 -->
<view class="reading" v-if="!isOver"> <!-- <view class="reading" v-if="!isOver">
<view class="reading-icon number-float" @click="onReading"> <view class="reading-icon number-float" @click="onReading">
<image class="reading-icon-image" :src="require('@/static/icon/reading_btn.png')" alt="签到"></image> <image class="reading-icon-image" :src="require('@/static/icon/reading_btn.png')" alt="签到"></image>
</view> </view>
<view class="reading-title">共力分加成</view> <view class="reading-title">共力分加成</view>
</view> </view> -->
<image class="life-cover-back" :src="require('@/static/life/back.png')"></image> <image class="life-cover-back" :src="require('@/static/life/back.png')"></image>
<view class="life-role"> <view class="life-role">
<image class="life-role-src" :src="figurePath" mode="widthFix" /> <image class="life-role-src" :src="figurePath" mode="widthFix" />
@@ -52,6 +52,25 @@
</view> </view>
<!-- 功能入口 --> <!-- 功能入口 -->
<view class="life-flex"> <view class="life-flex">
<!-- 公告 -->
<view class="life-notice" v-if="notices.length > 0">
<view class="life-notice-bar">
<uni-icons class="life-notice-icon" size="18" type="notification-filled" color="#34CE98"></uni-icons>
<swiper
class="life-notice-swiper"
:autoplay="true"
circular
vertical
>
<swiper-item v-for="(item, index) in notices" :key="index">
<view class="life-notice-item">
<navigator :url="'./noticeDetails?id=' + item.article_id" hover-class="none">{{item.title}}</navigator>
</view>
</swiper-item>
</swiper>
<navigator class="life-notice-more" hover-class="none" url="./notice">更多</navigator>
</view>
</view>
<view class="life-flex-item house" @click="onNav({name: 'Store'}, 'tab')"> <view class="life-flex-item house" @click="onNav({name: 'Store'}, 'tab')">
<view class="house-content"> <view class="house-content">
<view class="house-title">DT商城</view> <view class="house-title">DT商城</view>
@@ -60,10 +79,11 @@
<image src="../../static/img/house_back.jpg" mode="aspectFill"></image> <image src="../../static/img/house_back.jpg" mode="aspectFill"></image>
</view> </view>
<view class="life-flex-item both"> <view class="life-flex-item both">
<view class="both-item team" @click="onToast('共力文娱暂未开放尽情期待')"> <!-- <view class="both-item team" @click="onNav({name: 'Mission'}, '')"> -->
<view class="both-item team" @click="onToast('正在努力开发中,耐心等待~')">
<view class="team-content"> <view class="team-content">
<view class="team-title">共力文娱</view> <view class="team-title">奖励任务</view>
<view class="team-subtitle">文娱短视频近期开放</view> <view class="team-subtitle">完成任务可获DT积分/商品</view>
</view> </view>
<image src="../../static/img/text_back.jpg" mode="aspectFill"></image> <image src="../../static/img/text_back.jpg" mode="aspectFill"></image>
</view> </view>
@@ -151,6 +171,7 @@
isSign: false, isSign: false,
isAccount: false, isAccount: false,
isOver : false, isOver : false,
notices : []
}; };
}, },
onShow() { onShow() {
@@ -172,6 +193,7 @@
// 共力人生 // 共力人生
getLife() { getLife() {
life().then(res => { life().then(res => {
this.notices = res.notices
this.glz = res.account.glz this.glz = res.account.glz
this.base_hour = res.account.base_hour this.base_hour = res.account.base_hour
this.base_seconds = res.account.base_seconds this.base_seconds = res.account.base_seconds
@@ -222,6 +244,9 @@
this.$Router.push({name: 'Capacity'}) this.$Router.push({name: 'Capacity'})
return return
} }
// 签到
this.Sign()
return
this.checkIMEI().then(res => { this.checkIMEI().then(res => {
switch (res) { switch (res) {
case 'Permanent': case 'Permanent':
@@ -363,7 +388,6 @@
icon: 'none' icon: 'none'
}) })
} }
} }
} }
</script> </script>
@@ -405,7 +429,39 @@
flex-wrap: wrap; flex-wrap: wrap;
position: relative; position: relative;
z-index: 1; z-index: 1;
.life-notice{
width: calc(100% - 20rpx);
margin: 10rpx;
&-bar{
position: relative;
background-color: white;
border-radius: 20rpx;
padding: 0 150rpx 0 80rpx;
height: 90rpx;
}
&-icon{
position: absolute;
left: 30rpx;
top: 26rpx;
}
&-more{
position: absolute;
right: 30rpx;
top: 0;
line-height: 90rpx;
font-size: 28rpx;
color: $main-color;
}
&-swiper{
height: 90rpx;
}
&-item{
line-height: 90rpx;
font-size: 28rpx;
color: #333;
@extend .nowrap;
}
}
.life-flex-item { .life-flex-item {
background: white; background: white;
border-radius: 20rpx; border-radius: 20rpx;

85
pages/life/notice.vue Normal file
View File

@@ -0,0 +1,85 @@
<template>
<view class="conten">
<block v-if="list.length > 0">
<navigator class="list-item" v-for="(item, index) in list" :key="index" :url="'./noticeDetails?id=' + item.article_id">
<view class="item-title">{{item.title}}</view>
<view class="item-time"><text>{{item.categories[0].title}}</text>{{item.created_at}}</view>
<uni-icons class="item-icon" type="forward" color="#ddd" size="20"></uni-icons>
</navigator>
</block>
<block v-else>
<view class="list-empty">
<u-empty
mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png"
text="暂无公告信息"
>
</u-empty>
</view>
</block>
</view>
</template>
<script>
import { list } from '@/apis/interfaces/notice.js'
export default {
data() {
return {
list: [],
page: {}
};
},
created() {
list().then(res => {
this.list = res.data
this.page = res.page
}).catch(err => {
uni.showToast({
title: res.message,
icon : 'none'
})
})
}
}
</script>
<style lang="scss">
.list-empty{
height: 80vh;
@extend .vertical;
}
.conten{
min-height: 100vh;
background: #F3F6FB;
padding-top: 30rpx;
box-sizing: border-box;
.list-item{
position: relative;
margin: 0 30rpx 30rpx 30rpx;
background: white;
border-radius: 20rpx;
padding: 30rpx 60rpx 30rpx 30rpx;
.item-icon{
position: absolute;
right: 30rpx;
top: 50%;
margin-top: -10px;
}
.item-title{
padding-bottom: 10rpx;
font-size: 34rpx;
font-weight: bold;
color: #333;
@extend .nowrap;
}
.item-time{
font-size: 26rpx;
color: gray;
text{
color: $main-color;
margin-right: 20rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,110 @@
<template>
<view class="content">
<view class="title">{{title}}</view>
<view class="time"><text>{{categorie}}</text>{{time}}</view>
<view class="text">
<rich-text :nodes="content"></rich-text>
</view>
<!-- 分享 -->
<uni-popup ref="popupShare" type="share" background-color="#fff">
<uni-popup-share title="分享到" @select="select"></uni-popup-share>
</uni-popup>
</view>
</template>
<script>
import { info } from '@/apis/interfaces/notice.js'
export default {
data() {
return {
title : '',
content : '',
time : '',
categorie : '',
id : '',
description : ''
};
},
onLoad(e){
info(e.id).then(res => {
this.id = e.id
this.title = res.title
this.description= res.description
this.time = res.created_at
this.content = res.content.replace(/\<img/gi, '<img style="max-width:100%; height:auto; display:block;"');
this.categorie = res.categories[0].title
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: {
select(e){
switch (e.item.name) {
case 'wxchum':
uni.share({
provider: 'weixin',
scene: 'WXSceneSession',
type: 0,
href: 'https://invite.gongli.vip/articles/' + this.id,
title: '共力生态-' + this.title,
summary: this.description,
imageUrl: 'https://gl-ecological.oss-cn-zhangjiakou.aliyuncs.com/images/2022/06/11/3b7e6e330f465ecbf136d15def1039fd.jpg',
fail(err) {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
}
})
break;
case 'wxcircle':
uni.share({
provider: 'weixin',
scene: 'WXSceneTimeline',
type: 0,
href: 'https://invite.gongli.vip/articles/' + this.id,
summary: '共力生态-' + this.title,
imageUrl: 'https://gl-ecological.oss-cn-zhangjiakou.aliyuncs.com/images/2022/06/11/3b7e6e330f465ecbf136d15def1039fd.jpg',
fail(err) {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
}
})
break;
}
}
},
onNavigationBarButtonTap() {
this.$refs.popupShare.open();
}
}
</script>
<style lang="scss">
.content{
background: white;
min-height: 100vh;
padding: 30rpx;
box-sizing: border-box;
.title{
font-size: 40rpx;
font-weight: bold;
padding: 20rpx 0;
}
.time{
color: gray;
font-size: 28rpx;
padding-bottom: 70rpx;
text{
color: $main-color;
margin-right: 20rpx;
text-align: justify;
}
}
}
</style>

BIN
pages/mission/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,111 @@
<template>
<view class="content">
<view class="dt-header">
<view class="title">已领取DT积分</view>
<view class="num">{{glz}}</view>
</view>
<view class="logs-title">账户记录</view>
<block v-if="log.length > 0">
<view class="logs-item" v-for="(item, index) in log" :key="index">
<view class="logs-item-title">{{item.remark}}</view>
<view class="logs-item-time">{{item.created_at}}</view>
<view class="logs-item-price" :class="item.amount > 0 ? 'add': 'remove'">{{item.amount}}</view>
</view>
</block>
<block v-else>
<view class="vertical pages-empty">
<u-empty icon="http://cdn.uviewui.com/uview/empty/list.png" textColor="#999" text="暂无领取记录~" />
</view>
</block>
</view>
</template>
<script>
import { integral } from '@/apis/interfaces/account.js'
export default {
data() {
return {
glz: '0.00',
log: []
};
},
created() {
integral().then(res => {
this.glz = res.glz
this.log = res.lists.data
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
</script>
<style lang="scss">
.pages-empty {
height: 50vh;
}
.content{
background: $window-color;
min-height: 100vh;
.dt-header{
background: #e74a45;
padding: $padding*2 $padding $padding*2;
.title{
color: rgba(255, 255, 255, .9);
font-size: 28rpx;
}
.num{
font-weight: bold;
font-size: 60rpx;
padding-top: 10rpx;
color: white;
}
}
// 账户记录
.logs-title{
padding: 0 $padding;
font-weight: bold;
line-height: 90rpx;
color: #333;
font-size: 30rpx;
}
.logs-item{
position: relative;
background: white;
border-radius: $radius;
padding: $padding - 10 $padding;
padding-right: 240rpx;
box-sizing: border-box;
margin: 0 $margin ($margin - 10);
.logs-item-title{
font-weight: bold;
font-size: 30rpx;
line-height: 50rpx;
}
.logs-item-time{
font-size: 28rpx;
line-height: 40rpx;
color: gray;
}
.logs-item-price{
position: absolute;
right: $padding;
top: $padding - 10;
line-height: 90rpx;
width: 180rpx;
text-align: right;
font-weight: bold;
@extend .nowrap;
&.add{
color: #e74a45;
}
&.remove{
color: $text-price;
}
}
}
}
</style>

View File

@@ -0,0 +1,160 @@
<template>
<view class="content">
<view class="dt-header">
<view class="title">已领取商品数量</view>
<view class="num">{{glz}}<span></span></view>
</view>
<view class="logs-title">领取记录</view>
<block v-if="array.length >= 1">
<view style="padding: 0 30rpx;">
<!-- 订单列表 -->
<missionsGoodsItem v-for="(item, arrayIndex) in array" :order-info="item" :key="arrayIndex"
@onBtn="onType" />
<!-- 加载更多 -->
<view class="pages-load">
<u-loadmore :status="status" />
</view>
</view>
</block>
<block v-else>
<view class="vertical order-null">
<u-empty mode="order" icon="http://cdn.uviewui.com/uview/empty/order.png" text="暂无领取记录"
textColor="#999" />
</view>
</block>
</view>
</template>
<script>
import missionsGoodsItem from '@/components/missions-goods-item/index.vue'
import {myPinList} from '@/apis/interfaces/pin'
export default {
components:{
missionsGoodsItem
},
data() {
return {
status: "loading",
glz: '0.00',
array: []
};
},
onLoad() {
this.getOrder()
},
onReachBottom() {
if (this.status === 'loadmore') {
this.page += 1
this.status = 'loading'
this.getOrder()
}
},
methods:{
getOrder() {
myPinList({
page: this.page
}).then(res => {
console.log(res)
if (res.page.current === 1) {
this.array = []
}
let ordersArr = res.data.map(val => {
return {
no: val.order_no,
cover: val.item.cover,
name: val.item.name,
price: val.item.price,
sum: 1,
collage: val.collage,
shop: val.shop,
goods_id: val.item.goods_id,
unit: val.item.unit,
users: val.users,
invite: val.invite,
order: val.order,
url: val.url
}
})
this.array = this.array.concat(ordersArr)
this.status = res.page.has_more ? 'loadmore' : 'nomore'
})
},
onType(item){
console.log(item);
}
}
}
</script>
<style lang="scss">
.pages-empty {
height: 50vh;
}
.content{
background: $window-color;
min-height: 100vh;
.dt-header{
background: #e74a45;
padding: $padding*2 $padding $padding*2;
.title{
color: rgba(255, 255, 255, .9);
font-size: 28rpx;
}
.num{
font-weight: bold;
font-size: 60rpx;
padding-top: 10rpx;
color: white;
span{
font-size:26rpx;
padding-left: 20rpx;
padding-bottom: 10rpx;
font-weight: normal;
}
}
}
// 账户记录
.logs-title{
padding: 0 $padding;
font-weight: bold;
line-height: 90rpx;
color: #333;
font-size: 30rpx;
}
.logs-item{
position: relative;
background: white;
border-radius: $radius;
padding: $padding - 10 $padding;
padding-right: 240rpx;
box-sizing: border-box;
margin: 0 $margin ($margin - 10);
.logs-item-title{
font-weight: bold;
font-size: 30rpx;
line-height: 50rpx;
}
.logs-item-time{
font-size: 28rpx;
line-height: 40rpx;
color: gray;
}
.logs-item-price{
position: absolute;
right: $padding;
top: $padding - 10;
line-height: 90rpx;
width: 180rpx;
text-align: right;
font-weight: bold;
@extend .nowrap;
&.add{
color: #e74a45;
}
&.remove{
color: $text-price;
}
}
}
}
</style>

450
pages/mission/mission.vue Normal file
View File

@@ -0,0 +1,450 @@
<template>
<view class="mission">
<!-- 姓名 头像 已领DT积分 已领商品 -->
<view class="top">
<image class="bg" src="/static/mission/diwen.png" mode="widthFix" />
<view class="userinfo">
<view class="nickname" >{{user.nickname}}</view>
</view>
<view class="avatar" > <image :src="user.avatar" mode="aspectFill" /> </view>
<view class="count">
<view class="count-item" @click="onTab('GetDt')">
<view class="number">{{user.DtScore}} </view>
<view class="des"> 已领DT积分 </view>
</view>
<view class="line"></view>
<view class="count-item" @click="onTab('GetGoods')">
<view class="number">{{user.goodsNum}} </view>
<view class="des"> 已领商品 </view>
</view>
</view>
</view>
<!-- 看视频 得积分 -->
<!--
giftCode:item.me.code, // 任务是否完成 1 已完成 2 未完成
is_gift :item.me.is_gift, // 1已领取 0 未领取
gift_type:item.gift_type.code, //1商品 2 dt 积分
-->
<view class="list-content" v-if="videos.length>0">
<view class="title">
<image class="bind" src="/static/mission/icon-right.png" mode="widthFix" />
<view class="name">看视频得奖励</view>
<image class="bind" src="/static/mission/icon-left.png" mode="widthFix" />
<view class="right-title" @click="change('1')" >
<block v-if="videoHasMore"> <image :class="['change',canRotate0?'rotateChange':'']" src="/static/mission/change.png" mode="widthFix" /> 换一换 </block>
</view>
</view>
<block>
<view class="list" v-for="item in videos" :key="item.task_id">
<image class='icon' src="/static/mission/video.png" mode="widthFix" />
<view class="list-item">
<view class="list-item-left">
<view class="item-title">{{item.title}}<span v-if="item.gift_type && item.gift_type.code == 2">+{{item.attach_gift.price}}</span> </view>
<view class="item-des"> {{item.description}}</view>
</view>
<view class="list-item-right">
<view class="btn" v-if="item.me.code == 0 || item.me.code == 2" @click="goPlay(item.task_id)">去完成</view>
<block v-if="item.me && item.me.code == 1">
<block v-if="item.gift_type && item.gift_type.code == 1">
<view class="btn" v-if="item.me && item.me.is_gift == 0" @click="goAdr(item.task_id)">完善收货</view>
<view class="btn" v-if="item.me && item.me.is_gift == 1" >已完成</view>
</block>
<block v-if="item.gift_type && item.gift_type.code == 2">
<view class="btn">已完成</view>
</block>
</block>
<view class="count" v-if="item.type && item.type.code == 1 "> ({{item.me.number}}/{{item.attach_type.num}}</view>
</view>
</view>
</view>
</block>
</view>
<!-- 做任务 得积分 -->
<!--
giftCode:item.me.code, // 任务是否完成 1 已完成 2完成一半 0未开始
is_gift :item.me.is_gift, // 1已领取 0 未领取
gift_type:item.gift_type.code, //1商品 2 dt 积分
-->
<view class="list-content">
<view class="title" style="margin-top:30rpx;">
<image class="bind" src="/static/mission/icon-right.png" mode="widthFix" />
<view class="name">做任务得积分</view>
<image class="bind" src="/static/mission/icon-left.png" mode="widthFix" />
<view class="right-title" @click="change('2')" >
<block v-if="missionsHasMore">
<image :class="['change',canRotate1?'rotateChange':'']" src="/static/mission/change.png" mode="widthFix" /> 换一换
</block>
</view>
</view>
<block v-if="missions.length>0">
<view class="list" v-for="item in missions" :key="item.task_id">
<image class='icon' src="/static/mission/mission.png" mode="widthFix" />
<view class="list-item">
<view class="list-item-left">
<view class="item-title">{{item.title}}<span v-if="item.gift_type && item.gift_type.code == 2">+{{item.attach_gift.price}}</span> </view>
<view class="item-des"> {{item.description}}</view>
</view>
<view class="list-item-right">
<view class="btn" @click="goWebView(item.task_id)">去完成</view>
<!-- <view class="count">({{item.me.number}}/{{item.attach_type.num}}</view> -->
</view>
</view>
</view>
</block>
</view>
</view>
</template>
<script>
import {list,user} from '@/apis/interfaces/mission.js'
import eventBus from '@/utils/eventBus.js'
export default {
data() {
return {
videos: [],
videoPage: 1,
videoHasMore: true,
missions: [],
missionsPage: 1,
missionsHasMore: true,
canRotate0: false,
canRotate1: false,
user:{},
};
},
onLoad() {
this.getUser();
this.getList(1);
// this.getList(2);
eventBus.$on('played', (data)=> {
let index = this.videos.findIndex((item) => item.task_id == data.task_id);
this.videos[index].me.number = data.number
this.videos[index].me.is_gift = data.is_gift
this.videos[index].me.code = data.code
});
},
destroyed() {
eventBus.$off('played')
},
methods: {
getUser(){
user().then(res=>{
res.base.DtScore = res.DtScore
res.base.goodsNum = res.goodsNum
this.user = res.base
}).catch(err=>{
uni.showToast({
title: err.message,
icon: 'none',
mask: true,
duration: 2000,
})
})
},
goPlay(id) {
uni.navigateTo({
url: '/pages/mission/videoPlay/videoPlay?id=' + id,
})
},
goAdr(id){
uni.navigateTo({
url:'/pages/address/index?task_id='+id
})
},
goWebView(id){
uni.navigateTo({
url: '/pages/mission/webview/webview?id=' + id,
})
},
getList(type) {
let data = {
page: type == 1 ? this.videoPage : this.missionsPage,
type: type,
}
list(data).then(res => {
if (type == 1) {
if (this.videoPage == 1) {
this.videos = [];
}
this.videoHasMore = res.page.has_more;
this.videos = res.data
return;
}
if (type == 2) {
if (this.missionsPage == 1) {
this.missions = [];
}
this.missionsHasMore = res.page.has_more;
this.missions = res.data
return;
}
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
mask: true,
duration: 2000,
})
})
},
change(num) {
switch (num) {
case '1':
this.canRotate0 = true;
if (this.videoHasMore) {
this.videoPage = this.videoPage + 1;
} else {
this.videoPage = 1;
}
this.getList(1);
break;
case '2':
// if(this.videoHasMore){
// this.videoPage = this.videoPage + 1;
// }else{
// this.videoPage = 1;
// }
break;
}
this.close();
},
close() {
setTimeout(() => {
this.canRotate0 = false;
this.canRotate1 = false;
}, 3000)
},
// 跳转已领取的 dt 积分和商品
onTab(it) {
this.$Router.push({
name: it
})
}
}
}
</script>
<style lang="scss">
.top {
width: 100%;
height: 300rpx;
background-color: #e74a45;
position: relative;
padding-top: 140rpx;
margin-bottom: $padding * 5;
// 背景图片
.bg {
position: absolute;
width: 100%;
height: 100%;
bottom: 0;
}
// 用户信息
.userinfo {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-size: 40rpx;
font-weight: bold;
.nickname {
padding-bottom: 30rpx;
padding-left: 14rpx;
}
}
// 头像
.avatar {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
position: relative;
top: 10rpx;
z-index: 2;
image {
width: 160rpx;
height: 160rpx;
border-radius: 50%;
box-shadow: 0 2rpx 20rpx 2rpx rgba(255, 0, 0, 0.3);
border: solid 10rpx rgba(255, 255, 255, 0.8);
background-color: #fff;
}
}
// 积分数量
.count {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
box-sizing: border-box;
background-color: #fff;
margin: 0 $margin;
padding: $padding*3 $padding $padding $padding;
border-radius: 20rpx;
box-shadow: 0 0 20rpx 4rpx rgba(255, 0, 0, 0.1);
position: relative;
top: -$padding * 2;
.line {
width: 2rpx;
height: 60rpx;
background-color: #cacaca;
}
.count-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-size: 26rpx;
.number {
font-size: 40rpx;
font-weight: bold;
color: #333;
}
.des {
color: #626675;
padding-top: 10rpx;
}
}
}
}
.list-content {
.title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
position: relative;
padding: 0 $padding;
.bind {
width: 100rpx;
}
.right-title {
margin-left: $margin * 2;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
font-size: 26rpx;
color: #626675;
.change {
width: 30rpx;
height: 0;
margin-right: 10rpx;
}
.rotateChange {
animation: fadenum1;
animation-duration: 1s;
}
@keyframes fadenum1 {
100% {
transform: rotate(180deg);
}
}
}
.name {
padding: $padding $padding - 10;
font-size: 34rpx;
font-weight: bold;
color: #454545;
}
}
.list {
padding: 0 $padding;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.icon {
width: 60rpx;
height: 0;
}
.list-item {
border-bottom: solid 1rpx #f9f9f9;
flex: 1;
margin-left: $margin;
padding: $padding 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
.list-item-left {
flex: 1;
}
.list-item-right {
display: flex;
flex-direction: column;
justify-content: center;
box-sizing: border-box;
align-items: center;
margin-left: $margin;
.btn {
background-color: #e74a45;
color: #fff;
border-radius: 40rpx;
padding: 12rpx $padding;
font-size: 26rpx;
}
.count {
color: #626675;
font-size: 24rpx;
padding-top: 10rpx;
}
}
.item-title {
font-size: 30rpx;
span {
padding-left: $padding - 10;
color: #e74a45;
font-size: 30rpx;
}
}
.item-des {
padding-top: 10rpx;
color: #999;
font-size: 26rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,162 @@
<template>
<view class="videoContainer">
<view class="currentDownFixed">
<view class="currentDown">
<view class="currentDownItem">
<view>视频</view>
<block>
<view class="line"> </view>
<view> {{duration>0?duration+' 秒后可':'已'}}获得奖励</view>
</block>
</view>
<view class="currentDownItem">
<block v-if="duration>0">
<u-icon :name="muted?'volume-off':'volume'" color='#fff' @click='muted =! muted' />
<view class="line"> </view>
</block>
<view @click="close"> 关闭</view>
</view>
</view>
</view>
<video v-if="src!=''" @timeupdate='timeupdate' class="video" :src="src" :controls='false' autoplay direction='0'
:muted='muted' />
</view>
</template>
<script>
import {
getVideoUrl,
execute,
} from '@/apis/interfaces/mission.js'
import eventBus from '@/utils/eventBus.js'
export default {
data() {
return {
// url: this.$route.query.url,
src: '',
muted: false, // 静音播放
duration: 0,
id: '',
canClose: false,
};
},
onLoad(e) {
this.id = e.id;
getVideoUrl(e.id).then(res => {
this.src = res
}).catch(res => {
uni.showModal({
title: '视频播放出错',
confirmText: '立即返回',
showCancel: false,
success: (res) => {
uni.navigateBack()
}
})
})
},
methods: {
close() {
if (!this.canClose) {
uni.navigateBack()
return;
}
if (this.duration > 0) {
uni.showModal({
title: '暂未获得奖励',
content: ' 是否继续观看视频',
cancelText: '放弃',
confirmText: '继续',
confirmColor: '#34ce98',
cancelColor: '#999',
success: (res) => {
if (res.confirm) {
return;
}
if (res.cancel) {
uni.navigateBack();
return;
}
}
})
} else {
this.executeBtn()
}
},
executeBtn() {
execute(this.id).then(res => {
res.task_id= this.id
eventBus.$emit('played', res);
uni.navigateBack();
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon: 'none',
duration: 2000,
mask: true,
})
})
},
timeupdate(e) {
this.duration = parseInt(parseInt(e.detail.duration) - parseInt(e.detail.currentTime));
this.canClose = true;
}
},
}
</script>
<style lang="scss">
.videoContainer {
width: 100vw;
height: 100vh;
background-color: #000;
position: relative;
.video {
width: 100%;
height: calc(100% - 200rpx);
}
.currentDownFixed {
width: 100%;
background-color: #000;
color: #fff;
font-size: 28rpx;
height: 160rpx;
padding: var(--status-bar-height) $padding $padding - 10 $padding;
box-sizing: border-box;
.currentDown {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-top: 20rpx;
.currentDownItem {
position: relative;
z-index: 3;
border: solid 1rpx rgba(255, 255, 255, 0.2);
border-radius: 50rpx;
padding: 14rpx $padding+4;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
.line {
width: 2rpx;
height: 30rpx;
background-color: rgba(255, 255, 255, 0.3);
margin: 0 20rpx;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,39 @@
<template>
<view>
<web-view :src="src" />
</view>
</template>
<script>
import {
getVideoUrl
} from '@/apis/interfaces/mission.js'
import eventBus from '@/utils/eventBus.js'
export default {
data() {
return {
id: '',
src:''
};
},
onLoad(e) {
this.id = e.id;
getVideoUrl(e.id).then(res => {
this.src = res
}).catch(res => {
uni.showModal({
title: '视频播放出错',
confirmText: '立即返回',
showCancel: false,
success: (res) => {
uni.navigateBack()
}
})
})
},
}
</script>
<style lang="scss">
</style>

View File

@@ -11,7 +11,6 @@
<view class="answer show"> A : {{notificationInfo.content}}</view> <view class="answer show"> A : {{notificationInfo.content}}</view>
</view> </view>
</view> </view>
<view class="notification-block"> <view class="notification-block">
<view class="notification-title"> <view class="notification-title">
我的意见与建议 我的意见与建议
@@ -26,8 +25,6 @@
<view class="notification-radiobox-item" :class="{'show': radioValue === '其他问题'}">其他问题</view> <view class="notification-radiobox-item" :class="{'show': radioValue === '其他问题'}">其他问题</view>
</view> </view>
</view> </view>
<view class="notification-block" v-if="notificationImg.length>0"> <view class="notification-block" v-if="notificationImg.length>0">
<view class="notification-title">上传应用截图({{notificationImg.length}}/8)</view> <view class="notification-title">上传应用截图({{notificationImg.length}}/8)</view>
<view class="notification-sbutitle">上传出现问题的应用图片</view> <view class="notification-sbutitle">上传出现问题的应用图片</view>
@@ -51,15 +48,12 @@
<input class="notification-input" type="number" :disabled="true" v-model="mobile" maxlength="11" <input class="notification-input" type="number" :disabled="true" v-model="mobile" maxlength="11"
placeholder="输入手机号码" /> placeholder="输入手机号码" />
</view> </view>
<!-- 微信客服 --> <!-- 微信客服 -->
<u-modal :show="wechatCode" title="微信客服" confirmColor="#34CE98" :showCancelButton="true" cancelText="关闭" <u-modal :show="wechatCode" title="微信客服" confirmColor="#34CE98" :showCancelButton="true" cancelText="关闭"
confirmText="保存二维码" @cancel="wechatCode = false" @confirm="dowQrCode"> confirmText="保存二维码" @cancel="wechatCode = false" @confirm="dowQrCode">
<slot> <slot>
<view class="wechat-content"> <view class="wechat-content">
<image class="wechat-qrcode" :src="require('@/static/user/qrCode.jpeg')" mode="widthFix"></image> <image class="wechat-qrcode" :src="require('@/static/user/qrCode.png')" mode="widthFix"></image>
<view class="wechat-text">扫描企业微信二维码添加微信客服</view> <view class="wechat-text">扫描企业微信二维码添加微信客服</view>
</view> </view>
</slot> </slot>
@@ -123,7 +117,7 @@
methods: { methods: {
dowQrCode() { dowQrCode() {
uni.saveImageToPhotosAlbum({ uni.saveImageToPhotosAlbum({
filePath: require('@/static/user/qrCode.jpeg'), filePath: require('@/static/user/qrCode.png'),
success(res) { success(res) {
uni.showToast({ uni.showToast({
title: '二维码已保存到系统相册', title: '二维码已保存到系统相册',

View File

@@ -13,10 +13,13 @@
wxPAY, wxPAY,
alPAY, alPAY,
dtPAY, dtPAY,
collagePAY,
payIndex payIndex
} from '@/apis/interfaces/pay' } from '@/apis/interfaces/pay'
export default { export default {
components: { payKeyboard }, components: {
payKeyboard
},
data() { data() {
return { return {
payNo: "", payNo: "",
@@ -28,6 +31,7 @@
has_transfer_password: true, has_transfer_password: true,
password: '', password: '',
showKeyBoard: false, showKeyBoard: false,
type: '',
} }
}, },
mounted() { mounted() {
@@ -36,7 +40,9 @@
if (this.$Route.query.oepnType === 'order') { if (this.$Route.query.oepnType === 'order') {
this.oepnType = this.$Route.query.oepnType this.oepnType = this.$Route.query.oepnType
} }
if (this.$Route.query.type) {
this.type = this.$Route.query.type
}
}, },
onShow() { onShow() {
this.payIndex(); this.payIndex();
@@ -116,7 +122,7 @@
this.getDTPAY(); this.getDTPAY();
}, },
// 点击[取消] 关闭输入框 的回调 // 点击[取消] 关闭输入框 的回调
close(){ close() {
this.showKeyBoard = false; this.showKeyBoard = false;
this.canpay = true; this.canpay = true;
}, },
@@ -125,7 +131,11 @@
getDTPAY() { getDTPAY() {
if (this.canpay) { if (this.canpay) {
this.canpay = false this.canpay = false
dtPAY(this.payNo, this.password).then(res => { let requestUrl = dtPAY
if (this.type === 'pin') {
requestUrl = collagePAY
}
requestUrl(this.payNo, this.password).then(res => {
if (res.state === 'warning') { if (res.state === 'warning') {
uni.showModal({ uni.showModal({
title: '当前DT积分不足', title: '当前DT积分不足',
@@ -161,6 +171,44 @@
this.canpay = true this.canpay = true
} }
}) })
} else {
if (this.type === 'pin') {
console.log('pin........', res)
this.canpay = true
if (res.detailId) {
uni.showLoading({
title:'跳转中',
mask:true,
})
setTimeout(() => {
uni.hideLoading()
uni.navigateTo({
url: '/pages/group-book/success/success?id=' + res.detailId
})
}, 2000)
} else {
uni.showModal({
title: '温馨提示',
content: '该订单拼团成功',
confirmText: '查看订单',
confirmColor: "#34CE98",
cancelText: '再逛逛',
cancelColor: "#666666",
success: (res) => {
if(res.confirm){
uni.navigateTo({
url:'/pages/group-book/list/list'
})
} if(res.cancel){
uni.navigateBack({
delta:2
});
}
}
})
}
} else { } else {
uni.showModal({ uni.showModal({
title: '支付成功', title: '支付成功',
@@ -184,6 +232,7 @@
} }
}) })
} }
}
} }
}).catch(err => { }).catch(err => {

View File

@@ -1,50 +1,47 @@
<template> <template>
<view class="rank"> <view class="rank">
<view class="rank_top"> <view class="rank_top">
<view class="rank_top_left"> <view class="rank_top_left">
<image class="rank_title" src="../../static/rank/rank_txt.png" mode="widthFix" /> <image class="rank_title" src="../../static/rank/rank_txt.png" mode="widthFix" />
<view class="rank_sub_title" @click="toHelp"> <view class="rank_sub_title" @click="toHelp"> 共力家族 周会员邀请 <image src="/static/rank/help.png" mode="widthFix" /> </view>
共力家族 周会员推荐
<image src="/static/rank/help.png" mode="widthFix" />
</view>
</view> </view>
<image class="rank_top_right" src="../../static/rank/rank.png" mode="widthFix" /> <image class="rank_top_right" src="../../static/rank/rank.png" mode="widthFix" />
</view> </view>
<u-sticky bgColor="#34CE98">
<u-tabs :list="tabs" lineColor="white" :activeStyle="{color: 'white', fontWeight: 'bold', fontSize: '15px'}" :inactiveStyle="{color: 'rgba(255,255,255,.6)', fontSize: '15px'}" :itemStyle="{'height': '50px'}" @click="onTabs" />
</u-sticky>
<view class="rank_type"> <view class="rank_update_time" v-if="type != '3' && type != '4' && end_timestamp">
<view :class="['rank_type_item',type === '1'?'rank_type_item_active':'']" @click="changeType('1')"> 上周加成榜</view> <view class="title"> 加成{{type === '1'?'结束':'生效'}}倒计时:</view>
<view :class="['rank_type_item',type === '2'?'rank_type_item_active':'']" @click="changeType('2')">本周推荐榜</view> <u-count-down ref="countDown" format="DD:HH:mm:ss" :time="end_timestamp" :autoStart="false"
</view> @change="downTime">
<view class="rank_update_time" v-if="lists.length > 0">
<view class="title"> 加成{{type === '1'?'结束':'生效'}}倒计时 : </view>
<u-count-down :time="end_timestamp" format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
<view class="time"> <view class="time">
<view class="time__item"> <view class="time__item"> <text class="time__item_no">{{ timeData.days > 9 ? timeData.days: '0' + timeData.days }} </text> </view>
<view class="time__item_no">{{ timeData.days }} </view> <view class="time__item"> <text class="time__item_no">{{ timeData.hours > 9 ? timeData.hours : '0' + timeData.hours}}</text> </view>
</view> <view class="time__item"> <text class="time__item_no">{{ timeData.minutes > 9 ? timeData.minutes : '0' + timeData.minutes}}</text> </view>
<view class="time__item"> <view class="time__item"> <text class="time__item_no">{{ timeData.seconds > 9 ? timeData.seconds : '0' + timeData.seconds}}</text> </view>
<view class="time__item_no">{{ timeData.hours>9?timeData.hours:'0'+timeData.hours}}</view>
</view>
<view class="time__item">
<view class="time__item_no">{{ timeData.minutes>9?timeData.minutes:'0'+timeData.minutes}}</view>
</view>
<view class="time__item">
<view class="time__item_no">{{ timeData.seconds>9?timeData.seconds:'0'+timeData.seconds}}</view>
</view>
</view> </view>
</u-count-down> </u-count-down>
</view> </view>
<block v-if="type =='3' || type == '4'">
<view class="rank_update_time">
<view :class="['title', 'sub-title',current?'actived':'']" @click="getCurrent('1')">
<image v-if="current" src="/static/rank/mo.png" mode="widthFix" />
<image v-else src="/static/rank/mo-null.png" mode="widthFix" /> 本月排行
</view>
<view :class="['title', 'sub-title',!current?'actived':'']" @click="getCurrent('2')">
<image v-if="!current" src="/static/rank/mo.png" mode="widthFix" />
<image v-else src="/static/rank/mo-null.png" mode="widthFix" />上月排行
</view>
</view>
</block>
<view class="list"> <view class="list">
<block v-if="lists.length>0"> <block v-if="lists.length>0">
<view class="list_item" v-for="(item,index) in lists" :keys='index'> <view class="list_item" v-for="(item,index) in lists" :keys='index'>
<view class="no"> <view class="no">
<image v-if="index < 3" class="image" :src="'/static/rank/rank-'+(index+1)+'.png'" <image v-if="index < 3" class="image" :src="'/static/rank/rank-'+(index+1)+'.png'" mode="widthFix" />
mode="widthFix" />
<view v-else class="txt"> {{index + 1}} </view> <view v-else class="txt"> {{index + 1}} </view>
</view> </view>
<view class="user_info"> <view class="user_info">
@@ -55,7 +52,7 @@
</view> </view>
<view class="tuijian"> <view class="tuijian">
<view class="num"> {{item.number}}</view> <view class="num"> {{item.number}}</view>
<view class="title">推荐会员</view> <view class="title">{{type === '4'?'邀请用户':'邀请会员'}}</view>
</view> </view>
</view> </view>
</view> </view>
@@ -63,45 +60,76 @@
<block v-else> <block v-else>
<view class="vertical pages-empty"> <view class="vertical pages-empty">
<u-empty icon="http://cdn.uviewui.com/uview/empty/list.png" textColor="#999" <u-empty icon="http://cdn.uviewui.com/uview/empty/list.png" textColor="#999"
:text="type === '1'?'上周无加成数据':'当前暂无推荐数据'"> :text="type === '1'?'上周无加成数据':'当前暂无邀请数据'">
</u-empty> </u-empty>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
week, week,
week_mul week_mul,
total,
totaluser,
monthVip,
monthUser
} from '@/apis/interfaces/rank.js' } from '@/apis/interfaces/rank.js'
export default { export default {
data() { data() {
return { return {
end_timestamp: 0, end_timestamp: 0,
lists: [], lists: [],
timeData: {}, timeData: {
type: "1", // 1 加成榜 2推荐榜 days: 0,
hours: 0,
minutes: 0,
seconds: 0
},
type: '1', // 1加成榜 2邀请榜 3会员邀请 4用户邀请
page_id: '', page_id: '',
tabs: [{
name: '上周加成榜',
type: '1'
},
{
name: '本周邀请榜',
type: '2'
},
{
name: '会员邀请榜',
type: '3'
},
{
name: '用户邀请榜',
type: '4'
},
],
current: true,
listsInfo:{},// current last
} }
}, },
onShow() { onShow() {
this.getList(); this.getList();
}, },
methods: { methods: {
onChange(e) { onTabs(e) {
this.timeData = e if (this.type == e.type) {
}, return
changeType(type) {
if (this.type !== type) {
this.lists = [];
this.type = type;
uni.showLoading({})
this.getList();
} }
if (this.$refs.countDown) {
this.$refs.countDown.pause()
}
uni.showLoading({
title: '加载中...'
})
this.type = e.type
this.lists = []
this.getList()
},
downTime(e) {
this.timeData = e
}, },
toHelp() { toHelp() {
uni.navigateTo({ uni.navigateTo({
@@ -109,17 +137,31 @@
}) })
}, },
getList() { getList() {
let urlRequest = '' let urlRequest = ''
if (this.type === '1') { if (this.type === '1') {
urlRequest = week_mul urlRequest = week_mul
} else { } else if (this.type === '2') {
urlRequest = week urlRequest = week
} else if (this.type === '4') {
urlRequest = monthUser
} else {
urlRequest = monthVip
} }
urlRequest().then(res => { urlRequest().then(res => {
if (this.type === '1' || this.type === '2') {
this.lists = res.rand; this.lists = res.rand;
this.page_id = res.page_id;
this.end_timestamp = res.end_timestamp * 1000; this.end_timestamp = res.end_timestamp * 1000;
this.$nextTick(() => {
if (this.$refs.countDown) {
this.$refs.countDown.start()
}
})
} else if (this.type === '3' || this.type === '4') {
this.current = true;
this.listsInfo = res.rank;
this.lists = res.rank.current;
}
this.page_id = res.page_id;
uni.hideLoading() uni.hideLoading()
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
@@ -128,11 +170,34 @@
mask: true mask: true
}) })
}) })
},
getCurrent(id){
if(id === '1'){
this.current = true;
}else{
this.current = false;
}
if(this.current){
this.lists = this.listsInfo.current
}else{
this.lists = this.listsInfo.last
}
}
},
onHide() {
try {
if (this.$refs.countDown) {
this.$refs.countDown.pause()
}
} catch (err) {
uni.showToast({
title: err,
icon: 'none'
})
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.rank { .rank {
.rank_top { .rank_top {
@@ -143,6 +208,7 @@
box-sizing: border-box; box-sizing: border-box;
background-color: #34CE98; background-color: #34CE98;
padding: 50rpx 30rpx 40rpx 30rpx; padding: 50rpx 30rpx 40rpx 30rpx;
border-bottom: solid 1rpx rgba($color: #fff, $alpha: 0.6);
.rank_top_left { .rank_top_left {
display: flex; display: flex;
@@ -179,42 +245,6 @@
} }
} }
.rank_type {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
background-color: #26b398;
.rank_type_item {
flex: 1;
text-align: center;
padding: 40rpx;
font-size: 32rpx;
font-weight: 400;
color: rgba($color: #fff, $alpha: 0.6);
}
.rank_type_item_active {
position: relative;
color: white;
&::after {
content: '';
border-bottom: 20rpx solid white;
border-right: 16rpx solid transparent;
border-left: 16rpx solid transparent;
position: absolute;
bottom: 0;
left: 50%;
margin-left: -20rpx;
}
}
}
.rank_update_time { .rank_update_time {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@@ -223,54 +253,54 @@
box-sizing: border-box; box-sizing: border-box;
padding: 50rpx 30rpx; padding: 50rpx 30rpx;
width: 100%; width: 100%;
border-bottom: 20rpx solid $window-color;
.sub-title {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
image {
width: 36rpx !important;
margin-right: 20rpx;
}
}
.title { .title {
font-size: 28rpx; font-size: 28rpx;
font-weight: normal; font-weight: normal;
color: #999;
padding-right: 10rpx;
}
.actived {
color: #34CE98; color: #34CE98;
} }
.time { .time {
padding-left: 20rpx;
flex: 1;
font-size: 28rpx;
display: flex; display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
color: #333;
.time__item { .time__item {
display: flex; font-size: 28rpx;
flex-direction: row; color: #34CE98;
align-items: center; }
justify-content: center;
box-sizing: border-box;
.time__item_no { .time__item_no {
display: flex; background: #34CE98;
flex-direction: row; border-radius: 5rpx;
align-items: center;
justify-content: center;
box-sizing: border-box;
background-color: #34CE98;
color: white; color: white;
min-width: 50rpx; width: 50rpx;
min-height: 50rpx; display: inline-block;
border-radius: 4rpx; text-align: center;
margin: 0 16rpx; margin: 0 10rpx;
font-size: 36rpx;
font-weight: bold;
padding: 2rpx 10rpx;
}
} }
} }
} }
.list { .list {
border-top: 30rpx solid #f9f9f9;
padding: 30rpx; padding: 30rpx;
.list_item { .list_item {

View File

@@ -3,7 +3,6 @@
<view class="service-content"> <view class="service-content">
<view class="service"> 本次售后服务将由<span>DT生态平台</span>为您提供服务 </view> <view class="service"> 本次售后服务将由<span>DT生态平台</span>为您提供服务 </view>
</view> </view>
<view class="plane"> <view class="plane">
<view class="plane-state"> <view class="plane-state">
<uni-steps class="steps" active-color='#fff' :active="process.index" deactive-color='#fff' <uni-steps class="steps" active-color='#fff' :active="process.index" deactive-color='#fff'
@@ -11,7 +10,6 @@
<view class="title" v-if="refundInfo.state"> {{refundInfo.state.remark}}</view> <view class="title" v-if="refundInfo.state"> {{refundInfo.state.remark}}</view>
</view> </view>
</view> </view>
<view class="goods-item"> <view class="goods-item">
<image :src="goodsInfo.cover" mode="aspectFill" class="good-img" /> <image :src="goodsInfo.cover" mode="aspectFill" class="good-img" />
<view class="item--content"> <view class="item--content">
@@ -25,8 +23,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="total"> <view class="total">
<view class="total-item grey"> <view class="total-item grey">
申请金额<text>{{refundInfo.refund_total || '0.00'}} DT</text> 申请金额<text>{{refundInfo.refund_total || '0.00'}} DT</text>
@@ -90,8 +86,18 @@
<view class="label">申请时间</view> <view class="label">申请时间</view>
<view class="content">{{refundInfo.created_at}}</view> <view class="content">{{refundInfo.created_at}}</view>
</view> </view>
<view class="info-item">
<view class="label">店铺名称</view>
<view class="content" v-if="refundInfo.shop">{{refundInfo.shop.name || '-'}}</view>
</view>
<view class="info-item">
<view class="label">联系电话</view>
<view class="content" v-if="refundInfo.shop">{{refundInfo.shop.mobile || '-'}}</view>
</view>
</view>
<view class="call-phone">
<view class="call-phone-btn" @click="onCallPhone">联系商家</view>
</view> </view>
</view> </view>
</template> </template>
@@ -163,6 +169,15 @@
}) })
} }
}) })
},
onCallPhone(){
uni.makePhoneCall({
phoneNumber: this.refundInfo.shop.mobile,
complete(err) {
console.log(err)
}
})
} }
} }
} }
@@ -171,6 +186,21 @@
<style lang="scss"> <style lang="scss">
.history {} .history {}
.call-phone{
position: fixed;
bottom: 0;
left: 0;
right: 0;
@extend .ios-bottom;
background: white;
&-btn{
text-align: center;
line-height: 100rpx;
font-size: 30rpx;
color: $main-color;
}
}
.applyBtn { .applyBtn {
width: 70%; width: 70%;
background-color: $main-color; background-color: $main-color;
@@ -188,7 +218,8 @@
.afterSales { .afterSales {
background-color: #f9f9f9; background-color: #f9f9f9;
min-height: 100vh; min-height: 100vh;
padding-bottom: calc(env(safe-area-inset-bottom) + 130rpx);
padding-bottom: calc(env(safe-area-inset-bottom) + 130rpx);
.plane { .plane {
width: 100%; width: 100%;
@@ -202,10 +233,11 @@
padding: 60rpx $padding 40rpx $padding; padding: 60rpx $padding 40rpx $padding;
.title { .title {
font-size: 40rpx; width: 100%;
font-size: 26rpx;
color: #FFFFFF; color: #FFFFFF;
font-weight: bold;
margin-top: 20rpx; margin-top: 20rpx;
text-align: center;
} }
} }

BIN
pages/store/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -21,7 +21,8 @@
<image class="order-cover" :src="item.items[0].cover" mode="aspectFill"></image> <image class="order-cover" :src="item.items[0].cover" mode="aspectFill"></image>
<view class="order-title"> <view class="order-title">
<view class="title"> {{item.items[0].title}}</view> <view class="title"> {{item.items[0].title}}</view>
<view class="subtitle" v-if="item.items[0] && item.items[0].value"> {{item.items[0].value}} </view> <view class="subtitle" v-if="item.items[0] && item.items[0].value"> {{item.items[0].value}}
</view>
</view> </view>
<view class="order-count"> <view class="order-count">
<view class="order-price">{{item.items[0].price}}<text class="type">DT积分</text></view> <view class="order-price">{{item.items[0].price}}<text class="type">DT积分</text></view>
@@ -33,7 +34,7 @@
<view class="block info-box"> <view class="block info-box">
<view class="info-item"> <view class="info-item">
<view class="label">购买数量</view> <view class="label">购买数量</view>
<uni-number-box class="info-number" :value="qty" :min="1" :max="999" @change="numberChange" /> <uni-number-box class="info-number" :value="qty" :min="1" :max="limit" @change="numberChange" />
</view> </view>
<view class="info-item"> <view class="info-item">
<view class="label">配送方式</view> <view class="label">配送方式</view>
@@ -59,85 +60,192 @@
</template> </template>
<script> <script>
import { buy, verify } from '@/apis/interfaces/store' import {
buy,
buyPin,
verify,
collages,
} from '@/apis/interfaces/store'
export default { export default {
data() { data() {
return { return {
qty : 0, qty: 0,
goodsInfo : [], goodsInfo: [],
total : 0, total: 0,
freight : 0, freight: 0,
address : "", address: "",
remark : "", remark: "",
canApply :true canApply: true,
limit:0,
type: '', // 是否为空
}; };
}, },
onShow(){ onShow() {
if(JSON.stringify(this.$store.getters.getAddress) !== '{}') this.address = this.$store.getters.getAddress if (JSON.stringify(this.$store.getters.getAddress) !== '{}') this.address = this.$store.getters.getAddress
this.qty= this.$Route.query.qty;
}, },
mounted() { onLoad() {
this.qty = this.$Route.query.qty;
if (this.$Route.query.type === 'pin') {
this.type = 'pin'
}
this.getBuy() this.getBuy()
}, },
methods:{ methods: {
getBuy(){ getBuy() {
buy({ console.log(this.type === 'pin')
if (this.type == 'pin') {
let data = {
goods_sku_id: this.$Route.query.skuId, goods_sku_id: this.$Route.query.skuId,
qty: this.qty collage_id:this.$Route.query.collageid || '',
}).then(res => { }
buyPin(data).then(res => {
this.address = res.address this.address = res.address
this.freight = res.freight this.freight = res.freight
this.total = res.total this.total = res.total
this.goodsInfo = res.detail this.goodsInfo = res.detail
this.limit = res.limit
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showModal({
title: err.message, title: '温馨提示',
icon : 'none' content: err.message,
showCancel: false,
confirmColor: '#34CE98',
cancelText: '知道了',
success: (res) => {
uni.navigateBack({})
}
}) })
}) })
} else {
buy({
goods_sku_id: this.$Route.query.skuId,
qty: this.qty
}).then(res => {
console.log(res)
this.address = res.address
this.freight = res.freight
this.total = res.total
this.goodsInfo = res.detail
this.limit = res.limit
}).catch(err => {
uni.showModal({
title: '温馨提示',
content: err.message,
showCancel: false,
confirmColor: '#34CE98',
cancelText: '知道了',
success: (res) => {
uni.navigateBack({})
}
})
})
}
}, },
numberChange(e){ numberChange(e) {
this.qty = e this.qty = e
this.getBuy() this.getBuy()
}, },
// 确认订单 // 确认订单
subOrder(){ subOrder() {
if(this.address === ""){ if (this.address === "") {
uni.showModal({ uni.showModal({
title : '提示', title: '提示',
content : '暂未添加收货地址,无法下单', content: '暂未添加收货地址,无法下单',
showCancel : true, showCancel: true,
confirmText : '添加', confirmText: '添加',
success : res => { success: res => {
if(res.confirm){ if (res.confirm) {
this.$Router.push({name: 'Address'}) this.$Router.push({
name: 'Address'
})
} }
} }
}) })
return return
} }
if(this.canApply){ if (this.canApply) {
this.canApply = false; this.canApply = false;
verify({ if (this.type == 'pin'){
collages({
goods_sku_id: this.$Route.query.skuId, goods_sku_id: this.$Route.query.skuId,
qty : this.qty, collage_id:this.$Route.query.collageid || '',
address_id : this.address.address_id, address_id: this.address.address_id,
remark : this.remark || '' remark: this.remark || ''
}).then(res => { }).then(res => {
console.log(res)
this.$store.commit('setAddress', {}) this.$store.commit('setAddress', {})
this.$Router.replace({ this.$Router.replace({
name: 'Pay', name: 'Pay',
params: { params: {
orderNo: res.order_no, orderNo: res.order_no,
price : res.total, price: res.total,
coins : res.coins, coins: res.coins,
type:'pin'
} }
}) })
this.canApply = true this.canApply = true
}).catch(err=>{ }).catch(err => {
this.canApply = true this.canApply = true
uni.showToast({
title: err.message,
icon: "none",
mask: true,
duration: 2000
})
}) })
}else{ }else{
verify({
goods_sku_id: this.$Route.query.skuId,
qty: this.qty,
address_id: this.address.address_id,
remark: this.remark || ''
}).then(res => {
console.log(res)
if (res.order_no === '') {
uni.showModal({
title: ' 温馨提示',
content: '领取商品成功',
confirmColor: '#34CE98',
confirmText: ' 查看订单',
cancelColor: '#999',
cancelText: '返回首页',
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url: '/pages/order/index?index=0'
})
}
if (res.cancel) {
uni.reLaunch({
url: '/pages/store/index'
})
}
}
})
} else {
this.$store.commit('setAddress', {})
this.$Router.replace({
name: 'Pay',
params: {
orderNo: res.order_no,
price: res.total,
coins: res.coins,
}
})
}
this.canApply = true
}).catch(err => {
this.canApply = true
uni.showToast({
title: err.message,
icon: "none",
mask: true,
duration: 2000
})
})
}
} else {
this.canApply = true this.canApply = true
} }
@@ -148,133 +256,157 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content{ .content {
background: $window-color; background: $window-color;
min-height: 100vh; min-height: 100vh;
overflow: hidden; overflow: hidden;
padding-bottom: $padding + 80; padding-bottom: $padding + 80;
box-sizing: border-box; box-sizing: border-box;
} }
.block{
.block {
background: white; background: white;
margin: $margin; margin: $margin;
border-radius: $radius; border-radius: $radius;
} }
// 地址管理 // 地址管理
.address{ .address {
position: relative; position: relative;
padding: $padding 80rpx $padding 90rpx; padding: $padding 80rpx $padding 90rpx;
font-size: $title-size-lg; font-size: $title-size-lg;
.user{
.user {
font-size: $title-size; font-size: $title-size;
line-height: 40rpx; line-height: 40rpx;
color: $text-gray; color: $text-gray;
text{
text {
color: black; color: black;
max-width: 200rpx; max-width: 200rpx;
display: inline-block; display: inline-block;
margin-right: $margin/2; margin-right: $margin/2;
} }
} }
.city{
.city {
padding-top: $padding/2; padding-top: $padding/2;
font-size: $title-size-sm; font-size: $title-size-sm;
color: $text-gray; color: $text-gray;
line-height: 36rpx; line-height: 36rpx;
} }
.address-icon{
.address-icon {
position: absolute; position: absolute;
top: 50%; top: 50%;
&.location{
&.location {
margin-top: -26rpx; margin-top: -26rpx;
left: $margin - 10; left: $margin - 10;
} }
&.arrows{
&.arrows {
margin-top: -20rpx; margin-top: -20rpx;
right: $margin - 10; right: $margin - 10;
} }
} }
} }
.address-new{
.address-new {
padding: $padding; padding: $padding;
text-align: center; text-align: center;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
color: $main-color; color: $main-color;
.icon{
.icon {
vertical-align: middle; vertical-align: middle;
margin-bottom: 8rpx; margin-bottom: 8rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
// 订单列表 // 订单列表
.goods-item{ .goods-item {
display: flex; display: flex;
align-items: center; align-items: center;
padding: $padding; padding: $padding;
.order-cover{
.order-cover {
vertical-align: top; vertical-align: top;
width: 128rpx; width: 128rpx;
height: 128rpx; height: 128rpx;
} }
.order-title{
.order-title {
flex: 1; flex: 1;
padding-left: $margin; padding-left: $margin;
// line-height: 40rpx; // line-height: 40rpx;
.title{ .title {
font-size: 28rpx; font-size: 28rpx;
@extend .ellipsis; @extend .ellipsis;
text-align: left; text-align: left;
} }
.subtitle{
.subtitle {
font-size: 26rpx; font-size: 26rpx;
color: #666; color: #666;
padding-top: 10rpx; padding-top: 10rpx;
} }
} }
.order-count{
.order-count {
text-align: right; text-align: right;
padding-left: $margin; padding-left: $margin;
line-height: 40rpx; line-height: 40rpx;
.order-price{
.order-price {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: $text-price; color: $text-price;
&>text{
&>text {
font-size: 24rpx; font-size: 24rpx;
} }
} }
.type{
.type {
font-size: 22rpx; font-size: 22rpx;
padding-left: 6rpx; padding-left: 6rpx;
} }
.order-sum{
.order-sum {
font-size: $title-size-sm; font-size: $title-size-sm;
color: $text-gray; color: $text-gray;
} }
} }
} }
// 订单信息 // 订单信息
.info-box{ .info-box {
.info-item{ .info-item {
position: relative; position: relative;
padding: $padding $padding $padding 200rpx; padding: $padding $padding $padding 200rpx;
font-size: $title-size-m; font-size: $title-size-m;
min-height: 40rpx; min-height: 40rpx;
text-align: right; text-align: right;
.label{
.label {
position: absolute; position: absolute;
left: $margin; left: $margin;
top: $margin; top: $margin;
color: $text-gray; color: $text-gray;
} }
.info-textarea{
.info-textarea {
height: 120rpx; height: 120rpx;
width: 100%; width: 100%;
text-align: left; text-align: left;
font-size: $title-size-m; font-size: $title-size-m;
} }
&::after{
&::after {
position: absolute; position: absolute;
left: $margin; left: $margin;
right: $margin; right: $margin;
@@ -283,14 +415,15 @@
bottom: 0; bottom: 0;
background: $border-color; background: $border-color;
} }
&:last-child::after{
&:last-child::after {
display: none; display: none;
} }
} }
} }
// footer // footer
.order-footer{ .order-footer {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
@@ -301,7 +434,8 @@
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02); box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
z-index: 99; z-index: 99;
display: flex; display: flex;
.total{
.total {
line-height: 80rpx; line-height: 80rpx;
font-size: $title-size-lg; font-size: $title-size-lg;
font-weight: bold; font-weight: bold;
@@ -309,17 +443,20 @@
color: $text-gray; color: $text-gray;
font-weight: normal; font-weight: normal;
@extend .nowrap; @extend .nowrap;
text{
text {
color: $text-price; color: $text-price;
font-size: $title-size-lg; font-size: $title-size-lg;
font-weight: bold; font-weight: bold;
} }
.type{
.type {
font-size: 22rpx; font-size: 22rpx;
padding-left: 6rpx; padding-left: 6rpx;
} }
} }
.btn{
.btn {
margin-left: $margin; margin-left: $margin;
width: 300rpx; width: 300rpx;
height: 80rpx; height: 80rpx;
@@ -330,7 +467,8 @@
background: $main-color; background: $main-color;
color: white; color: white;
font-weight: bold; font-weight: bold;
&::after{
&::after {
display: none; display: none;
} }
} }

848
pages/store/goods(pt).vue Normal file
View File

@@ -0,0 +1,848 @@
<template>
<view>
<!-- 产品封面 -->
<view class="goods-swiper">
<swiper :indicator-dots="false" @change="current = $event.detail.current + 1">
<swiper-item v-for="(item, index) in goods.pictures" :key="index">
<view class="swiper-cover">
<image :src="item" mode="aspectFill" />
</view>
</swiper-item>
</swiper>
<view class="swiper-pages">
{{current}}/{{goods.pictures.length}}
</view>
</view>
<!-- 详情 -->
<view class="main">
<view class="title"> {{goods.name}} </view>
<view class="sub-title">{{goods.description}}</view>
<view class="box-flex">
<view class="price">
{{goods.price.show}}<text>DT积分</text>
</view>
<view class="sales" v-if="goods.skus">库存量{{goods.skus[0].stock}}</view>
<!-- <view class="sales" v-if="goods.skus && !goods.is_active">库存量{{goods.skus[0].stock}}</view> -->
<!-- <view class="_pin" v-if="goods.is_active">
<view class="_has" v-if="goods.active.count>0">
<image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已拼{{goods.active.count}}
</view>
<view class="tuan">{{goods.active.number}}人团</view>
</view> -->
</view>
<view class="unit" v-if="goods.skus && goods.skus[0].unit !== ''" @click="open()">
<span> 规格 : {{selectSkusValues.unit_text}}</span>
<uni-icons type="right" color="#cacaca" />
</view>
<!-- <view class="unit" v-if="goods.skus && goods.skus[0].unit !== '' && !goods.is_active" @click="open()">
<span>规格:{{selectSkusValues.unit_text}}</span>
<uni-icons type="right" color="#cacaca" />
</view> -->
<!-- <view class="is_active" v-if="goods.is_active && actives.length>0">
<view class="title" v-if="actives.length > 2">
这些人刚刚拼单成功可参与拼单
<span @click="getMorePin = true">查看更多
<uni-icons type="right" color="#cacaca" />
</span>
</view>
<view class="title" v-if="actives.length <= 2">
{{actives.length}}人正在拼单可参与拼单
</view>
<view class="content">
<block v-for="(item,index) in actives" :key="index">
<view class="content-item" v-if="index < 2">
<view class="info">
<u-avatar-group :urls="item.urls" size="34" gap="0.6" class="avatar-group" />
<view class="nickname"> {{item.name}}</view>
</view>
<view class="btn">去拼单</view>
</view>
</block>
</view>
</view> -->
<!-- 店铺信息 -->
<view class="shopInfo" @click="toShop(goods.shop.shop_id)" v-if="goods.shop">
<view class="shopInfo-title-left">
<image class="shop-logo" :src="goods.shop.cover" mode="aspectFill" />
<view class="shop-title">
<view class="shop-titl">{{goods.shop.name}}</view>
<view> 店铺评分:
<span class='no'>5.0</span>
<text style="padding-left: 20rpx;">
服务态度:
<span class='no'>5.0</span>
</text>
</view>
</view>
</view>
<view class="shopInfo-title-right">全部商品 {{goods.shop.goods_count || 0}}
<uni-icons type="right" color="grey" />
</view>
</view>
<view class="imgs">
<block v-for="(item, index) in goods.content" :key="index">
<image :src="item" mode="widthFix" />
</block>
</view>
</view>
<!-- 立即购买 -->
<view class="footer">
<view @click="toShop(goods.shop.shop_id)" class=" shop">
<uni-icons type="shop" size="26" color="grey" />店铺
</view>
<button type="default" hover-class="none" @click="buy">立即购买</button>
</view>
<!-- 更多拼单弹窗 -->
<!-- <u-popup :show="getMorePin" :round="10" mode="center" @close="close" :closeable='true' zIndex="1229930">
<view class="getPinTitle"> 可参与拼单 </view>
<scroll-view scroll-y="true" class="getPinList">
<view class="content">
<block v-for="(item,index) in actives" :key="index">
<view class="content-item">
<view class="info">
<u-avatar-group :urls="item.urls" size="34" gap="0.6" class="avatar-group" />
<view class="nickname"> {{item.name}}</view>
</view>
<view class="btn">去拼单</view>
</view>
</block>
</view>
</scroll-view>
</u-popup> -->
<!-- 多规格弹窗 -->
<u-popup :show="skuShow" :round="10" mode="bottom" @close="close" @open="open">
<scroll-view class="skuView" scroll-y="true">
<view class="goods-info">
<image class="goods-cover" :src="selectSkusValues.cover" mode="aspectFill" />
<view class="baseInfo">
<view class="money"> {{selectSkusValues.price}}<span>DT积分</span> </view>
<view class="shop-name" v-if="goods.shop"> {{goods.shop.name}} </view>
<view class="sku-text"> 商品规格{{selectSkusValues.unit_text}} </view>
<view class="stock" v-if="selectSkusValues.stock>0"> 剩余库存{{selectSkusValues.stock}} </view>
<view class="stock" v-else> 当前商品库存不足</view>
</view>
</view>
<view class="sku" v-for="(item,index) in specs" :key="item.spec_id">
<view class="sku-title">{{item.name}}</view>
<view class="sku-list">
<block v-for="it in item.values" :keys='it.value_id'>
<view :class="['sku-item',specselect[index] == it.value_id ? 'sku-active':'']"
@click="clickSkus(index,it.value_id)">
{{it.value}}
</view>
</block>
</view>
</view>
<view class="buy-number">
<view class="buy-title">数量</view>
<uni-number-box :min="1" :max="selectSkusValues.stock" :disabled="selectSkusValues.stock == 0"
@change="qty = $event" />
</view>
<button class="now-buy" type="default" hover-class="none" @click="buy2(selectSkusValues)">立即购买</button>
</scroll-view>
</u-popup>
</view>
</template>
<script>
import {
goods
} from '@/apis/interfaces/store'
import userAuth from '@/public/userAuth'
export default {
data() {
return {
current: 1,
goods: {
pictures: [],
name: "",
description: "",
content: [],
price: {
show: 0
}
},
skus: [],
skuid: '',
skuShow: false,
specs: [],
unitText: '',
specselect: [],
selectSkusValues: {},
qty: 1,
// actives: [{
// urls: [
// 'https://cdn.uviewui.com/uview/album/1.jpg',
// 'https://cdn.uviewui.com/uview/album/2.jpg'
// ],
// name: "洛基洛基、张三张三张三张三张三张三"
// }
// ],
// getMorePin: false,
};
},
mounted() {
this.getGoods()
},
methods: {
getGoods() {
let id = this.$Route.query.id
goods(id).then(res => {
this.goods = res
this.specs = res.specs
this.skus = res.skus
this.skuid = res.skus[0].sku_id
this.unitText = res.skus[0].unit_text
this.specselect = res.skus[0].unit.split('|')
this.selectSkusValues = res.skus[0]
})
},
open() {
this.skuShow = true
this.qty = 1;
},
close() {
this.skuShow = false
this.getMorePin = false
this.qty = 1;
// this.specselect = this.skus[0].unit.split('|')
// this.selectSkusValues = this.skus[0]
},
clickSkus(index, id) {
this.skuid = ''
this.specselect[index] = id;
let newlist = []
let str = ''
for (var i in this.specselect) {
if (i == index) {
newlist.push(id);
if (i == 0) {
str = id
} else {
str = str + '|' + id
}
} else {
newlist.push(this.specselect[i])
if (i == 0) {
str = this.specselect[i]
} else {
str = str + '|' + this.specselect[i]
}
}
}
for (var i in this.skus) {
if (this.skus[i].unit == str) {
this.selectSkusValues = this.skus[i];
break;
}
}
this.specselect = newlist
},
buy() {
if (this.$store.state.token === '') {
const Auth = new userAuth()
Auth.Login()
return
}
if (this.goods.type === 2) {
this.open();
return
}
this.goUrl();
},
buy2(value) {
let {
sku_id,
stock
} = value;
if (stock > 0) {
this.skuid = sku_id;
this.goUrl()
} else {
uni.showToast({
title: '当前商品库存不足',
icon: 'none',
mask: true,
duration: 2000
})
}
},
goUrl() {
this.$Router.push({
name: 'StoreBuy',
params: {
skuId: this.skuid,
qty: this.qty
}
})
this.close()
},
toShop(id) {
this.$Router.push({
name: 'ShopDetail',
params: {
ShopId: id
}
})
},
}
}
</script>
<style lang="scss">
.goods-swiper {
position: relative;
width: 100%;
padding-top: 110%;
background: $window-color;
&>swiper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
.swiper-cover {
width: 100%;
height: 100%;
image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
}
.swiper-pages {
position: absolute;
bottom: 20rpx;
left: 0;
right: 0;
z-index: 9;
line-height: 90rpx;
text-align: center;
color: white;
font-size: $title-size-m;
text-shadow: 0 5rpx 5rpx rgba($color: #000000, $alpha: .02);
}
}
// 详情
.main {
position: relative;
z-index: 9;
margin-top: -20rpx;
background: white;
border-radius: $radius $radius 0 0;
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
padding-bottom: ($padding*2) + 90;
.hr {
position: relative;
min-height: 1rpx;
margin: 0 $margin;
text-align: center;
text {
position: relative;
z-index: 1;
color: $text-gray;
font-size: $title-size-m;
background: white;
padding: 0 $padding;
}
&::after {
content: " ";
background: $border-color;
width: 100%;
height: 1rpx;
position: absolute;
left: 0;
top: 50%;
}
}
.title {
padding: $padding;
font-weight: bold;
font-size: $title-size + 14;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
box-sizing: border-box;
}
.sub-title {
padding: 0 $padding;
font-size: $title-size-m;
color: $text-gray;
}
.box-flex {
padding: $padding;
display: flex;
justify-content: space-between;
align-items: center;
.price {
font-weight: bold;
color: $text-price;
font-size: $title-size + 10;
text {
font-size: 60%;
margin-left: 10rpx;
}
}
.sales {
font-size: $title-size-m;
color: $text-gray;
}
._pin {
font-size: 26rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: $text-gray;
._has {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: #d81e06;
background-color: rgba($color: $text-price, $alpha: 0.1);
padding: 4rpx 10rpx;
border-radius: 30rpx;
image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
}
.tuan {
margin-left: $margin;
}
}
}
.unit {
padding: 30rpx;
font-size: $title-size;
color: #333;
border-top: solid 20rpx #f9f9f9;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}
.is_active {
border-top: solid 20rpx #f9f9f9;
.title {
font-size: 30rpx;
color: #333;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: solid 1rpx #f9f9f9;
span {
font-size: 26rpx;
color: #666;
font-weight: normal;
}
}
.content {
padding: 0 $padding;
.content-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
font-size: 28rpx;
padding-bottom: $padding - 10;
padding-top: $padding - 10;
border-bottom: solid 1rpx #f9f9f9;
.info {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
overflow: hidden;
.avatar-group {
margin-right: 30rpx;
}
.nickname {
width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.btn {
background-color: $main-color;
color: white;
padding: 6rpx 20rpx;
border-radius: 10rpx;
}
}
}
}
.imgs {
image {
vertical-align: top;
width: 100%;
}
}
.shopInfo {
border-top: solid $padding #f9f9f9;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
padding: $padding $padding - 10;
border-bottom: solid 10rpx #f9f9f9;
.shopInfo-title-left {
width: 500rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.shop-logo {
width: 100rpx;
height: 100rpx;
border-radius: 10rpx;
border: solid 1rpx #f9f9f9;
}
.shop-title {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
font-size: 26rpx;
margin-left: $margin;
color: #999;
width: 370rpx;
.no {
color: $text-price;
padding-left: 4rpx;
}
.shop-titl {
font-size: 34rpx;
color: #333;
font-weight: bold;
margin-bottom: 6rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 100%;
}
}
}
.shopInfo-title-right {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-size: 26rpx;
color: #222;
}
}
}
// 购买
.footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: $padding;
z-index: 98;
background: white;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
// linear-gradient(to top, white 86%, rgba(255,255,255,.0))
.shop {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-size: 24rpx;
color: $text-gray;
}
button {
background: $main-color;
margin-left: 60rpx;
flex: 1;
color: white;
border-radius: $radius-lg;
height: 90rpx;
line-height: 90rpx;
font-weight: bold;
font-size: $title-size;
&::after {
display: none;
}
}
}
.getPinTitle {
text-align: center;
font-size: 30rpx;
color: #333333;
font-weight: bold;
padding: $padding - 10 0;
border-bottom: solid 1rpx #f9f9f9;
position: absolute;
top: 0;
width: 100%;
background-color: #fff !important;
border-radius: 20rpx 20rpx 0 0;
z-index: 1000000000000000;
}
.getPinList {
width: 80vw;
max-height: 60vh;
color: $text-color;
position: relative;
.content {
padding: 0 $padding;
padding-top: $padding * 3;
.content-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
font-size: 28rpx;
padding-bottom: $padding - 10;
padding-top: $padding - 10;
border-bottom: solid 1rpx #f9f9f9;
.info {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
overflow: hidden;
.avatar-group {
margin-right: 30rpx;
}
.nickname {
width: 240rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.btn {
background-color: $main-color;
color: white;
padding: 6rpx 20rpx;
border-radius: 10rpx;
}
}
}
}
// 规格弹窗
.skuView {
min-height: 30vh;
max-height: 60vh;
padding: $padding + 10 $padding;
color: $text-color;
box-sizing: border-box;
// 商品信息
.goods-info {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
border-bottom: solid 1rpx #f9f9f9;
padding-bottom: 20rpx;
.goods-cover {
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
}
.baseInfo {
flex: 1;
padding-left: $padding;
box-sizing: border-box;
.money {
font-size: $title-size + 14;
font-weight: bold;
color: $text-price;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
span {
font-weight: normal;
font-size: $title-size-m - 4;
padding-left: 10rpx;
padding-top: 12rpx;
display: inline-block;
}
}
.shop-name {
background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba($color: $text-price, $alpha: 0.5));
display: inline-block;
padding: 4rpx 20rpx 4rpx 0;
color: #71440b;
font-size: $title-size-m - 2;
}
.sku-text {
font-size: $title-size-m - 2;
padding-top: 10rpx;
color: $text-gray;
}
.stock {
font-size: $title-size-m - 2;
padding-top: 6rpx;
color: $text-gray;
}
}
}
.buy-number {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: $padding + 20 0 $padding 0;
.buy-title {
font-size: 32rpx;
font-weight: bold;
}
}
// 规格
.sku {
.sku-title {
font-size: 32rpx;
font-weight: bold;
padding-top: 30rpx;
}
.sku-list {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
flex-wrap: wrap;
.sku-item {
padding: 10rpx 30rpx;
border: solid 1rpx #f9f9f9;
margin-right: 20rpx;
margin-top: 20rpx;
border-radius: 40rpx;
background-color: #f9f9f9;
font-size: 30rpx;
min-width: 70rpx;
text-align: center;
}
.sku-active {
background-color: rgba($color: $main-color, $alpha: 0.2);
color: $main-color;
font-weight: bold;
}
}
}
.now-buy {
background-color: #34ce98;
color: #fff;
border: none;
margin-top: $margin;
}
}
</style>

View File

@@ -3,31 +3,87 @@
<!-- 产品封面 --> <!-- 产品封面 -->
<view class="goods-swiper"> <view class="goods-swiper">
<swiper :indicator-dots="false" @change="current = $event.detail.current + 1"> <swiper :indicator-dots="false" @change="current = $event.detail.current + 1">
<swiper-item v-for="(item, index) in goods.pictures" :key="index"> <swiper-item v-for="(item, index) in goods.pictures" :key="index+1">
<view class="swiper-cover"> <view class="swiper-cover">
<image :src="item" mode="aspectFill" /> <image :src="item" mode="aspectFill" />
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="swiper-pages"> <view class="swiper-pages"> {{current}}/{{goods.pictures.length}}</view>
{{current}}/{{goods.pictures.length}} <!-- vip 商品提示 -->
</view> <view class="vipGoodsInfo" v-if="shop_vip.status">{{shop_vip.message}} </view>
<!-- 拼团 商品标题上面提示 -->
<view class="vipGoodsInfo" v-if="goods.is_active ">拼团商品</view>
</view> </view>
<!-- 详情 --> <!-- 详情 -->
<view class="main"> <view class="main">
<view class="title">{{goods.name}}</view> <view class="title"> {{goods.name}} </view>
<view class="sub-title">{{goods.description}}</view> <view class="sub-title">
<!-- vip 商品前边 tags -->
<span class='vipType'
v-if="shop_vip.messageTitle != ''">{{shop_vip.messageTitle}}</span>{{goods.description}}
</view>
<view class="box-flex"> <view class="box-flex">
<!-- vip 商品展示原价 -->
<view class="price"> <view class="price">
{{goods.price.show}}<text>DT积分</text> {{goods.price.show}}<text>DT积分</text>
<span class='del' v-if="shop_vip.status">{{goods.original_price}} DT积分</span>
</view> </view>
<view class="sales" v-if="goods.skus">库存量{{goods.skus[0].stock}}</view> <!-- vip 商品及普通商品展示库存量 -->
<view class="sales" v-if="goods.skus && !goods.is_active">库存量{{goods.skus[0].stock}}</view>
<!-- 拼团商品展示已拼数量及参团数 -->
<view class="_pin" v-if="goods.is_active">
<view class="_has" v-if="goods.active.count>0">
<image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已拼{{goods.active.count}}
</view> </view>
<view class="unit" v-if="goods.skus && goods.skus[0].unit !== ''" @click="open()"> <view class="tuan">{{goods.active.number}}人团</view>
<span> 规格 : {{selectSkusValues.unit_text}}</span> </view>
</view>
<!-- vip 商品规格 -->
<view class="vipInfo" v-if="shop_vip.card">
<image src="/static/store/vip-line-bg.png" mode="widthFix" />
<view class="title">
{{shop_vip.card.name}}
<view class=" des"> {{shop_vip.card.description}} </view>
</view>
<view class="btn" @click="toVip">
<!-- 1 开通 2续费 3升级 number 类型 -->
查看详情
<!-- {{shop_vip.card.state === 1 ?'立即开通':shop_vip.card.state === 2 ?'立即续费':'立即升级'}} -->
</view>
</view>
<!-- 普通商品及 VIP 商品规格 -->
<view class="unit" v-if="goods.skus && goods.skus[0].unit !== '' && !goods.is_active" @click="open()">
<span>规格:{{selectSkusValues.unit_text}}</span>
<uni-icons type="right" color="#cacaca" /> <uni-icons type="right" color="#cacaca" />
</view> </view>
<!-- 可拼团列表 -->
<view class="is_active" v-if="goods.is_active && collages.length>0 && shareId == ''">
<view class="title" v-if="collages.length > 2">
这些人刚刚拼单成功可参与拼单
<span @click="getMorePin = true">查看更多
<uni-icons type="right" color="#cacaca" />
</span>
</view>
<view class="title" v-if="collages.length <= 2"> {{collages.length}}人正在拼单可参与拼单 </view>
<view class="content">
<block v-for="(item,index) in collages" :key="index">
<view class="content-item" v-if="index < 2">
<view class="info">
<u-avatar-group :urls="item.covers" size="34" gap="0.6" class="avatar-group" />
<view class="nickname"> {{item.names}}</view>
</view>
<view class="btn" v-if="goods.active.can_join || item.can_share" @click="toPin(item)">
{{ item.can_share?'去分享':'去拼单'}}
</view>
<view class="noneBtn" v-else @click="showPinToast">去拼单</view>
</view>
</block>
</view>
</view>
<!-- 店铺信息 --> <!-- 店铺信息 -->
<view class="shopInfo" @click="toShop(goods.shop.shop_id)" v-if="goods.shop"> <view class="shopInfo" @click="toShop(goods.shop.shop_id)" v-if="goods.shop">
<view class="shopInfo-title-left"> <view class="shopInfo-title-left">
@@ -36,10 +92,7 @@
<view class="shop-titl">{{goods.shop.name}}</view> <view class="shop-titl">{{goods.shop.name}}</view>
<view> 店铺评分: <view> 店铺评分:
<span class='no'>5.0</span> <span class='no'>5.0</span>
<text style="padding-left: 20rpx;"> <text style="padding-left: 20rpx;"> 服务态度: <span class='no'>5.0</span> </text>
服务态度:
<span class='no'>5.0</span>
</text>
</view> </view>
</view> </view>
</view> </view>
@@ -48,19 +101,68 @@
</view> </view>
</view> </view>
<!-- 商品详情 -->
<view class="imgs"> <view class="imgs">
<u-notice-bar v-if="shop_vip.status" text="戒指尺寸有大小,请在购买戒指时参照详情介绍备注所选尺寸" fontSize='14' />
<block v-for="(item, index) in goods.content" :key="index"> <block v-for="(item, index) in goods.content" :key="index">
<image :src="item" mode="widthFix"></image> <image :src="item" mode="widthFix" />
</block> </block>
</view> </view>
</view> </view>
<!-- 立即购买 -->
<!-- 立即购买 shop_vip.status 区分是否是 vip 商品 否则的就却分是拼团商品还是普通商品 -->
<view class="footer"> <view class="footer">
<view @click="toShop(goods.shop.shop_id)" class=" shop"> <view @click="toShop(goods.shop.shop_id)" class="shop">
<uni-icons type="shop" size="26" color="grey" />店铺 <uni-icons type="shop" size="26" color="grey" />店铺
</view> </view>
<button type="default" hover-class="none" @click="buy">立即购买</button> <!-- vip 规格弹窗立即领取 -->
<button type="default" v-if="shop_vip.status" hover-class="none" @click="vipBuy">立即领取</button>
<!-- 非vip 规格弹窗 普通商品立即购买拼单商品立即拼单 -->
<block v-else>
<block v-if="goods.is_active">
<button type="default" v-if="goods.active.can_join" hover-class="none" @click="buy"> 立即拼单 </button>
<button type="default" v-else hover-class="none" @click="share"> 立即分享 </button>
</block>
<button v-else type="default" hover-class="none" @click="buy">立即购买</button>
</block>
</view> </view>
<!-- 更多拼单弹窗 -->
<u-popup :show="getMorePin" :round="10" mode="center" @close="close" :closeable='true' zIndex="1229930">
<view class="getPinTitle"> 可参与拼单 </view>
<scroll-view scroll-y="true" class="getPinList">
<view class="content">
<block v-for="(item,index) in collages" :key="index">
<view class="content-item">
<view class="info">
<u-avatar-group :urls="item.covers" size="34" gap="0.6" class="avatar-group" />
<view class="nickname"> {{item.names}}</view>
</view>
<view class="btn" v-if="goods.active.can_join || item.can_share" @click="toPin(item)">
{{ item.can_share?'去分享':'去拼单'}}
</view>
<view class="noneBtn" v-else @click="showPinToast">去拼单</view>
</view>
</block>
</view>
</scroll-view>
</u-popup>
<!-- 与谁谁的拼团 -->
<u-popup :show="pinShow" :round="10" mode="center" @close="close" :closeable='true' zIndex="1229930">
<view scroll-y="true" class="content-2">
<view class="title"> 参与{{collageitem.names}}的拼单 </view>
<view class="number">仅剩<span>{{collageitem.surplus}}</span>个名额</view>
<view class="avatars">
<block v-for="(item,index) in collageitem.details" :key='item.id'>
<image :class="['avatar',item.master?'pin':'']" :src="item.cover" mode="aspectFill" />
</block>
<block v-for="(item,index) in collageitem.surplus" :key='index'>
<image class="wen" src="/static/book/wen.png" mode="aspectFill" />
</block>
</view>
<view class="applyPin" @click="applyPin"> 参与拼单 </view>
</view>
</u-popup>
<!-- 多规格弹窗 --> <!-- 多规格弹窗 -->
<u-popup :show="skuShow" :round="10" mode="bottom" @close="close" @open="open"> <u-popup :show="skuShow" :round="10" mode="bottom" @close="close" @open="open">
@@ -79,7 +181,7 @@
<view class="sku" v-for="(item,index) in specs" :key="item.spec_id"> <view class="sku" v-for="(item,index) in specs" :key="item.spec_id">
<view class="sku-title">{{item.name}}</view> <view class="sku-title">{{item.name}}</view>
<view class="sku-list"> <view class="sku-list">
<block v-for="it in item.values" :keys='it.value_id'> <block v-for="it in item.values" :key='it.value_id'>
<view :class="['sku-item',specselect[index] == it.value_id ? 'sku-active':'']" <view :class="['sku-item',specselect[index] == it.value_id ? 'sku-active':'']"
@click="clickSkus(index,it.value_id)"> @click="clickSkus(index,it.value_id)">
{{it.value}} {{it.value}}
@@ -94,9 +196,22 @@
@change="qty = $event" /> @change="qty = $event" />
</view> </view>
<button class="now-buy" type="default" hover-class="none" @click="buy2(selectSkusValues)">立即购买</button> <!-- 立即购买 shop_vip.status 区分是否是 vip 商品 只支持单规格php 规定不支持多规格 否则的就却分是拼团商品还是普通商品 -->
<!-- vip 规格弹窗立即领取 -->
<button class="now-buy" type="default" v-if="shop_vip.status" hover-class="none"
@click="vipBuy">立即领取</button>
<!-- 非vip 规格弹窗 普通商品立即购买拼单商品立即拼单 -->
<block v-else>
<button class="now-buy" type="default" hover-class="none"
@click="buy2(selectSkusValues)">立即购买</button>
</block>
</scroll-view> </scroll-view>
</u-popup> </u-popup>
<!-- 分享 -->
<uni-popup ref="popupShare" type="share" background-color="#fff">
<uni-popup-share title="立即分享到" @select="select" />
</uni-popup>
</view> </view>
</template> </template>
@@ -126,15 +241,31 @@
specselect: [], specselect: [],
selectSkusValues: {}, selectSkusValues: {},
qty: 1, qty: 1,
collages: [], // 可拼单列表
getMorePin: false, // 更多可拼团列表是否显示
pinShow: false, // 与谁谁谁的拼团是否显示
shop_vip: {
// "status": true, // 当前店铺是否是会员制店铺 true 是 false 否
// "is_vip": true, // 当前会员是否是 vip true 是会员 false 非会员
// "is_receive": false // 当前会员是否已领取过 false 未领取 true 已领取
},
// collageid:'' ,// 拼团 id
collageitem: '', // 已选择的拼团的 item
shareId: '', // 从分享页带过来的 id 区分是否能展示可拼团列表及底部按钮直接拼!
}; };
}, },
mounted() { onShow() {
this.getGoods() this.getGoods()
if (this.$Route.query.shareId) {
this.shareId = this.$Route.query.shareId;
console.log(this.shareId)
}
}, },
methods: { methods: {
getGoods() { getGoods() {
let id = this.$Route.query.id let id = this.$Route.query.id;
// let id = 61; // let id = 61; // 普通商品
// let id = 95; // 拼团商品
goods(id).then(res => { goods(id).then(res => {
this.goods = res this.goods = res
this.specs = res.specs this.specs = res.specs
@@ -143,6 +274,8 @@
this.unitText = res.skus[0].unit_text this.unitText = res.skus[0].unit_text
this.specselect = res.skus[0].unit.split('|') this.specselect = res.skus[0].unit.split('|')
this.selectSkusValues = res.skus[0] this.selectSkusValues = res.skus[0]
this.shop_vip = res.shop_vip
this.collages = res.active.collages
}) })
}, },
open() { open() {
@@ -151,10 +284,85 @@
}, },
close() { close() {
this.skuShow = false this.skuShow = false
this.getMorePin = false
this.pinShow = false
this.qty = 1; this.qty = 1;
// this.specselect = this.skus[0].unit.split('|') // this.specselect = this.skus[0].unit.split('|')
// this.selectSkusValues = this.skus[0] // this.selectSkusValues = this.skus[0]
}, },
// 去拼单
toPin(item) {
this.close();
this.collageitem = item
if (item.can_share) {
this.share(item)
} else {
this.pinShow = true;
}
},
// 分享
share() {
this.$refs.popupShare.open();
},
// 分享
onShare() {},
// 分享选项
select(e) {
console.log(this.collageitem)
switch (e.item.name) {
case 'wxchum':
uni.share({
provider: 'weixin',
scene: 'WXSceneSession',
type: 0,
href: this.collageitem.url + this.collageitem.collage_id + 'invitation' + this
.collageitem.invite,
title: '【仅剩' + this.collageitem.surplus + '个名额】邀请您一起拼团',
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
imageUrl: this.goods.cover,
fail: (err) => {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
},
success: (res) => {
this.collageitem = {}
}
})
break;
case 'wxcircle':
uni.share({
provider: 'weixin',
scene: 'WXSceneTimeline',
type: 0,
href: this.collageitem.url + this.collageitem.collage_id + 'invitation' + this
.collageitem.invite,
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
imageUrl: this.goods.cover,
fail: (err) => {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
},
success: (res) => {
this.collageitem = {}
}
})
break;
}
},
// 弹出 拼团不可点
showPinToast() {
uni.showToast({
title: this.goods.active.message,
icon: 'none',
mask: true,
})
},
clickSkus(index, id) { clickSkus(index, id) {
this.skuid = '' this.skuid = ''
this.specselect[index] = id; this.specselect[index] = id;
@@ -179,14 +387,68 @@
} }
for (var i in this.skus) { for (var i in this.skus) {
if (this.skus[i].unit === str) { if (this.skus[i].unit == str) {
this.selectSkusValues = this.skus[i]; this.selectSkusValues = this.skus[i];
break; break;
} }
} }
this.specselect = newlist this.specselect = newlist
}, },
toVip() {
uni.navigateTo({
url: '/pages/store/vip/index/index?id=' + this.goods.shop.shop_id + '&identityId=' + this
.goods.shop_vip.card.identity_id,
})
},
// 会员商品领取
vipBuy() {
if (this.shop_vip.is_vip) {
if (this.shop_vip.is_receive) {
uni.showModal({
title: '温馨提示',
content: this.shop_vip.alert_text + '请联系线下商家:' + this.goods.shop.mobile,
cancelText: '再看看',
cancelColor: '#999',
showCancel: false,
confirmColor: '#34ce98',
confirmText: ' 知道了',
success: (res) => {
// if (res.confirm) {
// //#ifdef MP-WEIXIN
// uni.makePhoneCall({
// phoneNumber: '18354789632'
// });
// //#endif
// //#ifdef APP-PLUS
// plus.device.dial('18354789632', true);
// //#endif
// }
}
})
} else {
console.log('已经是会员,且未领取领取了商品,')
this.goUrl();
}
} else {
uni.showModal({
title: '温馨提示',
content: '您还不是该店铺的会员',
cancelColor: '#999',
cancelText: '再想想',
confirmColor: "#34ce98",
confirmText: '立即开通',
success: (res) => {
if (res.confirm) {
this.close();
uni.navigateTo({
url: '/pages/store/vip/index/index?id=' + this.goods.shop
.shop_id
})
}
}
})
}
},
buy() { buy() {
if (this.$store.state.token === '') { if (this.$store.state.token === '') {
const Auth = new userAuth() const Auth = new userAuth()
@@ -198,7 +460,6 @@
return return
} }
this.goUrl(); this.goUrl();
}, },
buy2(value) { buy2(value) {
let { let {
@@ -218,12 +479,21 @@
} }
}, },
goUrl() { goUrl() {
this.$Router.push({ let params = {
name: 'StoreBuy',
params: {
skuId: this.skuid, skuId: this.skuid,
qty: this.qty qty: this.qty
} }
if (this.goods.is_active) {
params.type = 'pin';
params.collageid = this.collageitem.collage_id || '';
}
if (this.shareId != '') {
params.collageid = this.shareId || '';
}
console.log(params)
this.$Router.push({
name: 'StoreBuy',
params: params
}) })
this.close() this.close()
}, },
@@ -235,6 +505,15 @@
} }
}) })
}, },
// 参与别人的拼团
applyPin() {
if (this.$store.state.token === '') {
const Auth = new userAuth()
Auth.Login()
return
}
this.goUrl();
}
} }
} }
</script> </script>
@@ -279,6 +558,18 @@
font-size: $title-size-m; font-size: $title-size-m;
text-shadow: 0 5rpx 5rpx rgba($color: #000000, $alpha: .02); text-shadow: 0 5rpx 5rpx rgba($color: #000000, $alpha: .02);
} }
.vipGoodsInfo {
position: absolute;
bottom: 0;
left: 0;
z-index: 10;
background-color: #d81e06;
color: #fff;
font-size: 30rpx;
padding: 4rpx 30rpx;
border-radius: 0 0 40rpx 0;
}
} }
// 详情 // 详情
@@ -291,6 +582,15 @@
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02); box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
padding-bottom: ($padding*2) + 90; padding-bottom: ($padding*2) + 90;
.vipType {
color: #fff;
font-size: 28rpx;
margin-right: 10rpx;
padding: 2rpx 20rpx;
background-color: #e5c175;
border-radius: 20rpx 0 20rpx 0;
}
.hr { .hr {
position: relative; position: relative;
min-height: 1rpx; min-height: 1rpx;
@@ -321,6 +621,12 @@
padding: $padding; padding: $padding;
font-weight: bold; font-weight: bold;
font-size: $title-size + 14; font-size: $title-size + 14;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
box-sizing: border-box;
} }
.sub-title { .sub-title {
@@ -344,12 +650,52 @@
font-size: 60%; font-size: 60%;
margin-left: 10rpx; margin-left: 10rpx;
} }
.del {
text-decoration: line-through;
margin-left: 20rpx;
font-size: 26rpx;
color: #999;
font-weight: normal;
}
} }
.sales { .sales {
font-size: $title-size-m; font-size: $title-size-m;
color: $text-gray; color: $text-gray;
} }
._pin {
font-size: 26rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: $text-gray;
._has {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: #d81e06;
background-color: rgba($color: $text-price, $alpha: 0.1);
padding: 4rpx 10rpx;
border-radius: 30rpx;
image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
}
.tuan {
margin-left: $margin;
}
}
} }
.unit { .unit {
@@ -365,6 +711,126 @@
} }
.vipInfo {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
background-image: linear-gradient(to right, #38353c, #5f585f);
padding: 0 $padding;
margin: 0 $margin;
border-radius: 20rpx 20rpx 0 0;
position: relative;
height: 140rpx;
overflow: hidden;
.title {
color: rgba($color: #fff, $alpha: 0.8);
font-size: 40rpx;
font-weight: bold;
flex: 1;
.des {
font-size: 24rpx;
color: rgba($color: #fff, $alpha: 0.7);
font-weight: normal;
}
}
image {
width: 500rpx;
height: 400rpx;
position: absolute;
left: 100rpx;
z-index: 0;
}
.btn {
color: rgba($color: #fff, $alpha: 0.8);
background-color: #38353c;
opacity: 1 !important;
padding: 10rpx 30rpx;
border-radius: 20rpx;
position: relative;
z-index: 10;
font-size: 26rpx;
}
}
.is_active {
border-top: solid 20rpx #f9f9f9;
.title {
font-size: 30rpx;
color: #333;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: solid 1rpx #f9f9f9;
span {
font-size: 26rpx;
color: #666;
font-weight: normal;
}
}
.content {
padding: 0 $padding;
.content-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
font-size: 28rpx;
padding-bottom: $padding - 10;
padding-top: $padding - 10;
border-bottom: solid 1rpx #f9f9f9;
.info {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
overflow: hidden;
.avatar-group {
margin-right: 30rpx;
}
.nickname {
width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.btn {
background-color: $main-color;
color: white;
padding: 6rpx 20rpx;
border-radius: 10rpx;
}
.noneBtn {
border: #999 1rpx solid;
color: #999;
padding: 6rpx 20rpx;
border-radius: 10rpx;
}
}
}
}
.imgs { .imgs {
image { image {
vertical-align: top; vertical-align: top;
@@ -484,6 +950,164 @@
} }
} }
.getPinTitle {
text-align: center;
font-size: 34rpx;
color: #333333;
font-weight: bold;
padding: $padding - 10 0;
border-bottom: solid 1rpx #f9f9f9;
position: absolute;
top: 0;
width: 100%;
background-color: #fff !important;
border-radius: 20rpx 20rpx 0 0;
z-index: 1000000000000000;
}
.content-2 {
width: 70vw;
.title {
font-size: 34rpx;
color: #333333;
font-weight: bold;
padding-top: 50rpx;
text-align: center;
}
.number {
color: #333333;
font-size: 28rpx;
text-align: center;
color: #999;
padding-top: 20rpx;
}
.avatars {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding-top: $padding * 2;
position: relative;
image {
width: 90rpx;
height: 90rpx;
margin: 10rpx 20rpx;
border-radius: 50%;
border: solid 2rpx #f9f9f9;
}
.me {
position: relative;
&::after {
position: absolute;
top: 0;
left: 0;
content: '我';
border-radius: 20rpx;
background: $main-color;
padding: 4rpx 34rpx;
text-align: center;
font-size: 24rpx;
color: #fff;
}
}
.pin {
position: relative;
&::after {
position: absolute;
top: 0;
left: 0;
content: '拼主';
background: orange;
padding: 4rpx 0;
width: 100%;
text-align: center;
font-size: 20rpx;
color: #fff;
}
}
}
.applyPin {
margin: $margin;
background-color: $main-color;
color: #fff;
padding: $padding - 10;
text-align: center;
margin-top: 50rpx;
border-radius: 10rpx;
}
}
.getPinList {
width: 80vw;
max-height: 60vh;
color: $text-color;
position: relative;
.content {
padding: 0 $padding;
padding-top: $padding * 3;
.content-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
font-size: 28rpx;
padding-bottom: $padding - 10;
padding-top: $padding - 10;
border-bottom: solid 1rpx #f9f9f9;
.info {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
overflow: hidden;
.avatar-group {
margin-right: 30rpx;
}
.nickname {
width: 240rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.btn {
background-color: $main-color;
color: white;
padding: 6rpx 20rpx;
border-radius: 10rpx;
}
.noneBtn {
border: #999 1rpx solid;
color: #999;
padding: 6rpx 20rpx;
border-radius: 10rpx;
}
}
}
}
// 规格弹窗 // 规格弹窗
.skuView { .skuView {
min-height: 30vh; min-height: 30vh;

View File

@@ -4,7 +4,7 @@
<view class="swiper"> <view class="swiper">
<view class="swiper-box"> <view class="swiper-box">
<swiper autoplay @change="swiperCount = $event.detail.current"> <swiper autoplay @change="swiperCount = $event.detail.current">
<swiper-item v-for="(item, index) in banners" :key="index"> <swiper-item v-for="(item, index) in banners" :key="index" @click="goBook(item)">
<image :src="item.cover" mode="aspectFill"></image> <image :src="item.cover" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
@@ -18,7 +18,8 @@
<!-- 健康产品分类 --> <!-- 健康产品分类 -->
<u-scroll-list class="classify-box" indicatorColor="#ddd" indicatorActiveColor="#34CE98"> <u-scroll-list class="classify-box" indicatorColor="#ddd" indicatorActiveColor="#34CE98">
<view v-for="(item, index) in goodTabs" :key="index" class="classify-item" @click="$Router.push({name: 'StoreList', params: {id: item.category_id, title: item.name}})"> <view v-for="(item, index) in goodTabs" :key="index" class="classify-item"
@click="$Router.push({name: 'StoreList', params: {id: item.category_id, title: item.name}})">
<view class="classify-item-nav"> <view class="classify-item-nav">
<image class="classify-item-cover" :src="item.cover"></image> <image class="classify-item-cover" :src="item.cover"></image>
<view class="classify-item-title">{{item.name}}</view> <view class="classify-item-title">{{item.name}}</view>
@@ -26,11 +27,17 @@
</view> </view>
</u-scroll-list> </u-scroll-list>
<!-- 拼团广告图 -->
<!-- <view class="collage" v-if="collage_banner!=''">
<image @click="goCollage" :src="collage_banner" mode="widthFix" />
</view> -->
<!-- 每日上新 --> <!-- 每日上新 -->
<view class="new-box"> <view class="new-box">
<view class="title">上新精选<text class="title-des"> | 精品上新新品推荐</text></view> <view class="title">上新精选<text class="title-des"> | 精品上新新品推荐</text></view>
<view class="news"> <view class="news">
<view class="news-item" v-for="(item, index) in newGood" :key="index" @click="$Router.push({ name: 'StoreGoods', params: {id: item.goods_id}})"> <view class="news-item" v-for="(item, index) in newGood" :key="index"
@click="$Router.push({ name: 'StoreGoods', params: {id: item.goods_id}})">
<view class="news-cover"> <view class="news-cover">
<image :src="item.cover" mode="aspectFill"></image> <image :src="item.cover" mode="aspectFill"></image>
</view> </view>
@@ -40,14 +47,36 @@
</view> </view>
</view> </view>
<!-- VIP换购 -->
<view class="new-box" style="margin-top: 30rpx;" v-if="vips.length>0">
<view class="title">VIP换购 <view class="more"><text class="title-des"> | 百款商品任意换购</text> <text
class="more-txt" @click="$Router.push({name: 'VipList'})">更多 ></text></view>
</view>
<view class="news">
<view class="news-item" v-for="(item, index) in vips" :key="index"
@click="$Router.push({ name: 'StoreGoods', params: {id: item.goods_id}})">
<view class="news-cover">
<image :src="item.cover" mode="aspectFill"></image>
<view class="tags"> VIP </view>
</view>
<view class="news-title nowrap">{{item.name}}</view>
<view class="news-price nowrap">{{item.price.price_min}} <text>DT积分</text></view>
<!-- <view class="news-price nowrap through">{{item.original_price}} <text>DT积分</text></view> -->
</view>
</view>
</view>
<!-- 线下商家 --> <!-- 线下商家 -->
<view class="offline-box"> <view class="offline-box">
<view class="title">推荐店铺 <view class="more"><text class="title-des"> | 您身边的优质体验店</text> <text class="more-txt" @click="$Router.push({name: 'ShopList'})">更多></text></view></view> <view class="title">推荐店铺 <view class="more"><text class="title-des"> | 您身边的优质体验店</text> <text
class="more-txt" @click="$Router.push({name: 'ShopList'})">更多 ></text></view>
</view>
<view class="card-box"> <view class="card-box">
<block v-for="(item, index) in shops" :key="index"> <block v-for="(item, index) in shops" :key="index">
<view class="card-box-item" style="{'backgrond': #FFF}" v-if="index < 4" @click="$Router.push({name: 'ShopDetail', params: {ShopId: item.shop_id}})"> <view class="card-box-item" style="{'backgrond': #FFF}" v-if="index < 4"
@click="$Router.push({name: 'ShopDetail', params: {ShopId: item.shop_id}})">
<view class="card-title">{{item.name}}</view> <view class="card-title">{{item.name}}</view>
<view class="card-subtitle"> 优质店铺 </view> <view class="card-subtitle"> {{item.type.code == 2 ? 'VIP优质店铺' : '优质店铺'}} </view>
<view class="card-btn">前往体验</view> <view class="card-btn">前往体验</view>
<image class="card-cover" :src="item.cover" mode="aspectFill" /> <image class="card-cover" :src="item.cover" mode="aspectFill" />
</view> </view>
@@ -68,36 +97,39 @@
<!-- goods --> <!-- goods -->
<view class="goods-box"> <view class="goods-box">
<oct-goods <view class="title2">
:lists="goodsArr" 猜你喜欢 <view class="more"><text class="title-des"> | 您身边的快捷推荐</text> <text class="more-txt" @click="$Router.push({name: 'StoreList'})">更多 ></text></view>
priceType="DT" </view>
color="#e6576b" <oct-goods :lists="goodsArr" priceType="DT" color="#e6576b"
@onGoods="$Router.push({ name: 'StoreGoods', params: {id: $event.goods_id}})" @onGoods="$Router.push({ name: 'StoreGoods', params: {id: $event.goods_id}})" />
/>
<!-- <u-loadmore status="loading" /> --> <!-- <u-loadmore status="loading" /> -->
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { mall } from "@/apis/interfaces/store" import {
mall
} from "@/apis/interfaces/store"
export default { export default {
data() { data() {
return { return {
swiperCount : 0, swiperCount: 0,
banners : [], banners: [],
goodTabs : [], goodTabs: [],
newGood : [], newGood: [],
goodsArr : [], goodsArr: [],
meals : [], meals: [],
shops : [], shops: [],
vips:[],
collage_banner:''
}; };
}, },
mounted(){ mounted() {
this.getMall() this.getMall()
}, },
methods:{ methods: {
getMall(){ getMall() {
mall().then(res => { mall().then(res => {
this.banners = res.banners this.banners = res.banners
this.goodsArr = res.goods this.goodsArr = res.goods
@@ -105,77 +137,147 @@
this.goodTabs = res.categories this.goodTabs = res.categories
this.meals = res.meals this.meals = res.meals
this.shops = res.shops this.shops = res.shops
this.vips = res.vips
this.collage_banner = res.collage_banner
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}) })
},
goCollage(){
uni.navigateTo({
url:'/pages/group-book/index'
})
},
goBook(item) {
if (item.url) {
if (item.url.openType === 'navigateTo') {
if (item.url.params != '') {
uni.navigateTo({
url: item.url.path + '?' + item.url.params,
})
} else {
uni.navigateTo({
url: item.url.path,
})
}
}
}
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getMall() this.getMall()
}, },
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
this.$Router.push({name: 'StoreSearch'}) this.$Router.push({
name: 'StoreSearch'
})
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.content{ .content {
background: $window-color; background: $window-color;
} }
// 商城列表 // 商城列表
.goods-box{ .goods-box {
padding-bottom: $padding; padding: $padding 0;
&>.title{
&>.title {
padding: $padding $padding 0; padding: $padding $padding 0;
font-size: $title-size-lg; font-size: $title-size-lg;
color: $text-color; color: $text-color;
font-weight: bold; font-weight: bold;
margin-bottom: -$margin/2; margin-bottom: -$margin/2;
}
.title2 {
font-size: $title-size-lg;
color: $text-color;
font-weight: bold;
padding: 0 30rpx 10rpx 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.title-des {
font-size: 24rpx !important;
padding-left: 10rpx;
color: $text-gray-m;
font-weight: normal;
}
.more {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-right: $padding;
.more-txt {
font-size: 24rpx;
color: $text-gray;
font-weight: normal;
}
}
}
} }
}
// 商城分类 // 商城分类
.classify-box{ .classify-box {
.classify-item{ .classify-item {
padding: 0 10rpx; padding: 0 10rpx;
&:last-child{
&:last-child {
padding-right: $padding; padding-right: $padding;
} }
&:first-child{
&:first-child {
padding-left: $padding; padding-left: $padding;
} }
&-nav{
&-nav {
text-align: center; text-align: center;
width: 138rpx; width: 138rpx;
} }
&-cover{
&-cover {
width: 86rpx; width: 86rpx;
height: 86rpx; height: 86rpx;
border-radius: 50%; border-radius: 50%;
vertical-align: top; vertical-align: top;
margin-bottom: $margin/2; margin-bottom: $margin/2;
} }
&-title{
&-title {
line-height: 40rpx; line-height: 40rpx;
font-size: $title-size-sm; font-size: $title-size-sm;
color: $text-color; color: $text-color;
} }
} }
} }
// 卡片推荐 // 卡片推荐
.card-box{ .card-box {
padding: $padding $padding - 10; padding: $padding $padding - 10;
padding-bottom: 0; padding-bottom: 0;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
&-item{
&-item {
margin: 0 10rpx; margin: 0 10rpx;
width: calc(50% - 20rpx); width: calc(50% - 20rpx);
padding: $padding; padding: $padding;
border-radius: $radius; border-radius: $radius;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.card-title{
.card-title {
font-size: $title-size-lg; font-size: $title-size-lg;
font-weight: bold; font-weight: bold;
color: $text-color; color: $text-color;
@@ -185,14 +287,16 @@
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.card-subtitle{
.card-subtitle {
font-size: 22rpx; font-size: 22rpx;
color: $text-gray; color: $text-gray;
// line-height: 40rpx; // line-height: 40rpx;
min-height: 20rpx; min-height: 20rpx;
@extend .nowrap; @extend .nowrap;
} }
.card-cover{
.card-cover {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
position: absolute; position: absolute;
@@ -201,74 +305,137 @@
top: $margin; top: $margin;
} }
} }
&-item:nth-child(1){
&-item:nth-child(1) {
background: #fef2ae; background: #fef2ae;
} }
&-item:nth-child(2){
&-item:nth-child(2) {
background: #c9ead9; background: #c9ead9;
} }
} }
// 全民拼团
.collage{
box-sizing: border-box;
image{
width: 100%;
height: 0;
}
}
// 上新精选 // 上新精选
.new-box{ .new-box {
padding: 0 $margin; padding: 0 $margin;
border-radius: $radius; border-radius: $radius;
// padding: $padding - 10; // padding: $padding - 10;
.title{ .title {
font-size: $title-size-lg; font-size: $title-size-lg;
color: $text-color; color: $text-color;
font-weight: bold; font-weight: bold;
padding-bottom: 10rpx; padding-bottom: 10rpx;
.title-des{ display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.title-des {
font-size: 24rpx !important; font-size: 24rpx !important;
padding-left: 10rpx; padding-left: 10rpx;
color: $text-gray-m; color: $text-gray-m;
font-weight: normal; font-weight: normal;
} }
.more {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-right: $padding;
.more-txt {
font-size: 24rpx;
color: $text-gray;
font-weight: normal;
} }
.news{ }
}
.news {
margin: $margin/2 -10rpx 0; margin: $margin/2 -10rpx 0;
display: flex; display: flex;
.news-item{
.news-item {
margin: 0 10rpx; margin: 0 10rpx;
width: calc(25% - 20rpx); width: calc(25% - 20rpx);
.news-cover{
.news-cover {
position: relative; position: relative;
width: 100%; width: 100%;
padding-top: 100%; padding-top: 100%;
background-color: white; background-color: white;
border-radius: $radius-lg; border-radius: $radius-lg;
overflow: hidden; overflow: hidden;
image{
image {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.tags {
position: absolute;
top: 6rpx;
left: -54rpx;
background: #d81e06;
color: #fff;
width: 100%;
font-size: 24rpx;
padding: 4rpx 0;
text-align: center;
transform: rotate(-45deg);
font-weight: bold;
letter-spacing:2rpx;
} }
.news-title{ }
.news-title {
margin-top: $margin/2; margin-top: $margin/2;
font-size: $title-size-sm; font-size: $title-size-sm;
text-align: center; text-align: center;
color: $text-color; color: $text-color;
line-height: 40rpx; line-height: 40rpx;
} }
.news-price{
.news-price {
text-align: center; text-align: center;
font-size: $title-size-sm; font-size: $title-size-sm;
font-weight: bold; font-weight: bold;
color: $text-price; color: $text-price;
line-height: 40rpx; line-height: 40rpx;
text{
text {
margin-left: 6rpx; margin-left: 6rpx;
font-size: 70%; font-size: 70%;
} }
} }
.through{
text-decoration: line-through !important;
}
} }
} }
} }
.offline-box{
.title{ .offline-box {
.title {
font-size: $title-size-lg; font-size: $title-size-lg;
color: $text-color; color: $text-color;
font-weight: bold; font-weight: bold;
@@ -279,7 +446,8 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
.more{
.more {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@@ -287,14 +455,16 @@
justify-content: space-between; justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
padding-right: $padding; padding-right: $padding;
.more-txt{
.more-txt {
font-size: 24rpx; font-size: 24rpx;
color: $text-gray; color: $text-gray;
font-weight: normal; font-weight: normal;
} }
} }
} }
.card-btn{
.card-btn {
font-size: 22rpx; font-size: 22rpx;
color: #fff; color: #fff;
padding: 4rpx 20rpx; padding: 4rpx 20rpx;
@@ -304,61 +474,72 @@
} }
.card-box { .card-box {
// &-item{ // &-item{
// background: #fff !important; // background: #fff !important;
// } // }
&-item:nth-child(1){ &-item:nth-child(1) {
background: #fef2ae; background: #fef2ae;
background: rgba($color: #fef2ae, $alpha:.5); background: rgba($color: #fef2ae, $alpha:.5);
} }
&-item:nth-child(2){
&-item:nth-child(2) {
background: #c9ead9; background: #c9ead9;
background: rgba($color: #c9ead9, $alpha:.5); background: rgba($color: #c9ead9, $alpha:.5);
} }
&-item:nth-child(3){
&-item:nth-child(3) {
margin-top: $padding - 8; margin-top: $padding - 8;
background: #bde0ff; background: #bde0ff;
background: rgba($color: #bde0ff, $alpha:.5); background: rgba($color: #bde0ff, $alpha:.5);
} }
&-item:nth-child(4){
&-item:nth-child(4) {
margin-top: $padding - 8; margin-top: $padding - 8;
background: rgba($color: #ffd9e1, $alpha:.5); background: rgba($color: #ffd9e1, $alpha:.5);
} }
} }
.card-cover{
.card-cover {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
position: absolute; position: absolute;
right: $margin; right: $margin;
top: $margin; top: $margin;
} }
.title-des{
.title-des {
font-size: 24rpx; font-size: 24rpx;
padding-left: 10rpx; padding-left: 10rpx;
color: $text-gray-m; color: $text-gray-m;
font-weight: normal; font-weight: normal;
} }
} }
// swiper // swiper
.swiper{ .swiper {
background: linear-gradient(#FFF, #F3F6FB); background: linear-gradient(#FFF, #F3F6FB);
padding: $padding; padding: $padding;
.swiper-box{
.swiper-box {
position: relative; position: relative;
padding-top: 40%; padding-top: 40%;
swiper, swiper,
image{ image {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
image{
image {
border-radius: $radius; border-radius: $radius;
} }
} }
.swiper-pages{
.swiper-pages {
position: absolute; position: absolute;
z-index: 9; z-index: 9;
left: 0; left: 0;
@@ -366,17 +547,20 @@
bottom: $margin - 10; bottom: $margin - 10;
height: 7rpx; height: 7rpx;
text-align: center; text-align: center;
.pages-item{
.pages-item {
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
height: 7rpx; height: 7rpx;
width: 25rpx; width: 25rpx;
margin: 0 5rpx; margin: 0 5rpx;
background: rgba($color: #fff, $alpha: .5); background: rgba($color: #fff, $alpha: .5);
&.show{
&.show {
background: white; background: white;
} }
} }
} }
} }
</style> </style>

View File

@@ -30,7 +30,7 @@
</template> </template>
<script> <script>
import { lists, classify } from "@/apis/interfaces/store" import { lists, categories } from "@/apis/interfaces/store"
export default { export default {
data() { data() {
return { return {
@@ -46,17 +46,21 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.$Route.query.title title: this.$Route.query.title
}) })
if (this.$Route.query.id) {
this.cid = this.$Route.query.id
} else {
this.getClassify();
}
this.getLists() this.getLists()
this.getClassify()
}, },
methods:{ methods:{
// 商品列表 // 商品列表
getLists() { getLists() {
lists({ let data = {
category_id : this.$Route.query.id, category_id : this.cid,
category_cid: this.cid,
page : this.page page : this.page
}).then(res => { };
lists(data).then(res => {
if(res.page.current === 1){ if(res.page.current === 1){
this.goodsArr = [] this.goodsArr = []
} }
@@ -67,14 +71,15 @@
}, },
// 获取二级分类 // 获取二级分类
getClassify(){ getClassify(){
classify(this.$Route.query.id).then(res => { categories().then(res => {
this.classify = this.classify.concat(res) this.classify = this.classify.concat(res)
}) })
}, },
// 二级分类筛选 // 二级分类筛选
onTabs(e){ onTabs(e){
this.goodsArr = [] this.page = 1;
this.cid = e.category_id this.goodsArr = [];
this.cid = e.category_id;
this.getLists() this.getLists()
}, },

View File

@@ -15,7 +15,8 @@
<view>店铺评分:<span class='no'>5.0</span> 服务态度 :<span class='no'>5.0</span></view> <view>店铺评分:<span class='no'>5.0</span> 服务态度 :<span class='no'>5.0</span></view>
</view> </view>
</view> </view>
<!-- <view class="shopInfo-title-right"> +关注 </view> --> <view class="shopInfo-title-right" v-if="shopType === 2" @click="goVip"> {{!vip.status?'开通会员':vip.name}}
</view>
</view> </view>
</view> </view>
<view class="content"> <view class="content">
@@ -65,25 +66,38 @@
export default { export default {
data() { data() {
return { return {
name : '', name: '',
logo : '', logo: '',
category_id : '', category_id: '',
classify : [], classify: [],
goods : [], goods: [],
has_more:true, has_more: true,
page:1, page: 1,
ShopId:'', ShopId: '',
shopType: '', // 1。普通商品 2.会员制商品
vip: {},
} }
}, },
onLoad(e) { onLoad(e) {
this.ShopId = this.$Route.query.ShopId this.ShopId = this.$Route.query.ShopId
shopsDetail(this.ShopId).then(res => { shopsDetail(this.ShopId).then(res => {
// vip 制 商品
if (res.type.code == 2) {
this.classify = [{
category_id: '',
name: '全部活动',
}, ...res.identities]
} else {
// 普通商品
this.classify = [{ this.classify = [{
category_id: '', category_id: '',
name: '全部商品', name: '全部商品',
}, ...res.categories] }, ...res.categories]
}
this.name = res.name this.name = res.name
this.logo = res.cover this.logo = res.cover
this.vip = res.vip
this.shopType = res.type.code
this.getGoods() this.getGoods()
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
@@ -101,10 +115,20 @@
methods: { methods: {
getGoods() { getGoods() {
uni.showLoading({ uni.showLoading({
title:'请求中~', title: '请求中~',
mask:true, mask: true,
}) })
shopsGoods(this.ShopId, this.category_id,this.page).then(res => { let data = {
shop_id: this.ShopId,
page: this.page,
}
if (this.shopType == 2) {
data.identity_id = this.category_id
data.is_user = 1
} else {
data.category_id = this.category_id
}
shopsGoods(data).then(res => {
this.goods = this.goods.concat(res.data); this.goods = this.goods.concat(res.data);
this.has_more = res.page.has_more; this.has_more = res.page.has_more;
uni.hideLoading(); uni.hideLoading();
@@ -115,15 +139,15 @@
}) })
}) })
}, },
lower(){ lower() {
if(this.has_more){ if (this.has_more) {
this.page = this.page + 1 this.page = this.page + 1
this.getGoods(); this.getGoods();
}else{ } else {
uni.showToast({ uni.showToast({
title:'没有更多~', title: '没有更多~',
icon:"none", icon: "none",
mask:true, mask: true,
}) })
} }
}, },
@@ -131,7 +155,7 @@
if (id === this.category_id) return; if (id === this.category_id) return;
this.category_id = id; this.category_id = id;
this.page = 1; this.page = 1;
this.goods =[]; this.goods = [];
this.has_more = true; this.has_more = true;
this.getGoods() this.getGoods()
}, },
@@ -140,6 +164,11 @@
name: 'StoreSearch' name: 'StoreSearch'
}); });
}, },
goVip() {
uni.navigateTo({
url: '/pages/store/vip/index/index?id=' + this.ShopId
})
},
onGoods(id) { onGoods(id) {
this.$Router.push({ this.$Router.push({
name: 'StoreGoods', name: 'StoreGoods',
@@ -255,7 +284,7 @@
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
width: 100%; max-width: 100%;
} }
} }
} }
@@ -378,6 +407,8 @@
justify-content: space-between; justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
flex: 1; flex: 1;
position: relative;
top: 5rpx;
text { text {
margin-right: $margin/2; margin-right: $margin/2;

View File

@@ -0,0 +1,126 @@
<template>
<view class="groupBook">
<view class="top">
<view class="title">VIP换购</view>
<view>百款商品任意换购</view>
</view>
<!-- 有数据 -->
<scroll-view scroll-y="true" class="scroll" @scrolltolower='scrolltolower' v-if="lists.length>0">
<block v-for="(item,index) in lists" :key="index">
<vipGoodsItem :item="item" @goPin="goPin" />
</block>
</scroll-view>
<!-- 没数据 -->
<scroll-view scroll-y="true" class="scroll" v-else>
<view class="vertical pages-empty" style="padding-top: 200rpx;">
<u-empty
icon="http://cdn.uviewui.com/uview/empty/list.png"
textColor="#999"
text="暂无VIP商品~"
/>
</view>
</scroll-view>
</view>
</template>
<script>
import vipGoodsItem from '@/components/vip-goods-item/index.vue'
import {
lists
} from '@/apis/interfaces/store.js'
export default {
components: {
vipGoodsItem
},
data() {
return {
lists: [],
page: 1,
has_more: true,
};
},
onLoad() {
this.getList()
},
methods: {
getList() {
lists({
is_user:'1',
page: this.page
}).then(res => {
this.lists = this.lists.concat(res.data)
this.has_more = res.page.has_more
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none",
mask: true
})
})
},
// 触底获取更多~
scrolltolower() {
if (this.has_more) {
this.page = this.page + 1
this.getList()
}else{
uni.showToast({
title:'没有更多~',
icon:'none'
})
}
},
// 马上拼团
goPin(id) {
console.log('fule gopin....')
uni.navigateTo({
url:'/pages/store/goods?id='+id
})
}
}
}
</script>
<style lang="scss">
.groupBook {
width: 100%;
min-height: 100vh;
position: relative;
background: $window-color;
box-sizing: border-box;
position: relative;
.top {
position: absolute;
top: 0;
left: 0;
font-size: $title-size - 2;
color: #fff;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding;
box-sizing: border-box;
background: linear-gradient(to bottom, #d81e06, rgba(255, 255, 255, 0));
padding-bottom: 40vh;
z-index: 1;
.title {
font-size: 40rpx;
font-weight: bold;
}
}
.scroll {
height: 100vh;
position: relative;
padding: $padding * 4 $padding $padding $padding;
box-sizing: border-box;
z-index: 2;
}
}
</style>

View File

@@ -0,0 +1,349 @@
<template>
<view class="store-vip">
<image class="vip-bg" src="/static/store/store-vip-bg.png" mode="widthFix"/>
<swiper class="swiper" circular :current="swiperCurrent">
<swiper-item class="swiper-item" v-for="(item, index) in vip" :key="index">
<view class="top">
<view class="left" v-if="vip.length > 1">
<image class="left-img" src="/static/store/get-more.gif" mode="widthFix" /> 滑动获取更多
</view>
<view class="content">
<!-- 四个角标 -->
<block> <image class="jiao" src="/static/store/vip-left-top.png" mode="widthFix" /> <image class="jiao" src="/static/store/vip-right-top.png" mode="widthFix" /> <image class="jiao" src="/static/store/vip-left-bottom.png" mode="widthFix" /> <image class="jiao" src="/static/store/vip-right-bottom.png" mode="widthFix" /> </block>
<view class="title1"> {{item.shop.name}} </view>
<image class="title2" :src="item.title_cover" mode="widthFix" />
<view class="title3"> {{item.description}} </view> <!-- 分类 -->
<view class="type">
<view class="type-item" v-for="(it, itIndex) in item.rules" :key="itIndex">
<image :src="it.cover" mode="aspectFill" />
<view class="title">{{it.name}}</view>
</view>
</view>
<view class="title4">详情咨询可添加产品页下方客服二维码</view>
</view>
<view class="right" v-if="vip.length > 1"> 滑动获取更多 <image class="right-img" src="/static/store/get-more.gif" mode="widthFix" /> </view>
</view>
<view class="bottom">
<view class="left">
<view class="title-1">立享尊贵特权 >> </view>
<view class="title-2" v-if="item.vip_info.ended_at"> 到期时间{{item.vip_info.ended_at}} </view>
<view class="title-2" v-if="item.margins.days>0"> 距离{{item.margins.days}}天只需要补{{item.margins.price}}元升级 </view>
</view>
<view class="right" @click="onOpenVip(item.identity_id)">
{{item.is_vip ?'立即续费':item.margins.days>0 ? '立即升级':'立即开通'}}
</view>
</view>
</swiper-item>
</swiper>
</view>
</template>
<script>
import {
shopVipInfo,
shopVipCreate,
shopVipWeChat
} from '@/apis/interfaces/vip.js'
export default {
data() {
return {
id : '',
identityId : '',
vip : [],
swiperCurrent : 0
};
},
onLoad(e) {
this.id = e.id;
this.identityId = e.identityId
this.getInfo()
},
methods: {
getInfo() {
shopVipInfo(this.id).then(res => {
uni.setNavigationBarTitle({
title: res[0].shop.name + '会员'
});
this.vip = res;
this.swiperCurrent = res.findIndex(val => val.identity_id == this.identityId)
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
mask: true,
})
})
},
// 创建店铺vip会员
onOpenVip(identity) {
// 获取订单
uni.showLoading({
title: 'VIP会员开通中'
})
shopVipCreate(this.id,identity).then(res => {
// 支付参数
if (res.id) {
uni.showLoading({
title: '获取支付信息'
})
this.wxPay(res.id)
}
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
// 微信支付
wxPay(orderId) {
shopVipWeChat(orderId).then(orderInfo => {
uni.requestPayment({
provider: "wxpay",
orderInfo: JSON.parse(orderInfo),
success: res => {
uni.showModal({
title: '提示',
content: '开通成功',
showCancel: false,
success: () => {
uni.navigateBack({})
}
})
},
fail(err) {
let showToast = err.message
if (err.errMsg === 'requestPayment:fail [payment微信:-2]User canceled') {
showToast = '支付被取消'
}
uni.showToast({
title: showToast,
icon: 'none'
})
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
mask:true,
})
})
}
}
}
</script>
<style lang="scss">
.store-vip {
height: 100vh;
width: 100vw;
background-color: #f6f1eb;
position: relative;
z-index: 0;
overflow: hidden;
.vip-bg {
width: 100%;
// height: 100%;
position: absolute;
z-index: 1;
top: -50rpx;
left: -50rpx;
}
.swiper {
width: 100%;
height: 100%;
position: relative;
z-index: 2;
.swiper-item {
.top {
height: calc(100vh - 160rpx);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
box-sizing: border-box;
.right {
font-size: 30rpx;
color: #999;
text-align: right;
width: 100%;
padding-bottom: 6%;
display: flex;
flex-direction: row;
align-items: center;
box-sizing: border-box;
justify-content: flex-end;
margin-right: 20%;
box-sizing: border-box;
.right-img{
width: 50rpx;
margin-left: 10rpx;
opacity: 0.6;
}
}
.left {
font-size: 30rpx;
color: #999;
text-align: left;
width: 100%;
padding-top: 6%;
display: flex;
flex-direction: row;
align-items: center;
box-sizing: border-box;
justify-content: flex-start;
margin-left: 20%;
box-sizing: border-box;
.left-img{
width: 50rpx;
transform: rotate(180deg);
margin-right: 10rpx;
opacity: 0.6;
}
}
.content {
padding: $padding * 2;
background-color: #fff;
border-radius: 10rpx;
width: 80%;
min-height: 70%;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
.title1 {
font-size: 34rpx;
color: #e5c175;
font-weight: bold;
}
.title2 {
padding-top: $padding - 0;
width: 100%;
height: 0;
padding-bottom: $padding - 10;
}
.title3 {
font-size: 28rpx;
color: #2f3245;
}
.title4 {
font-size: 28rpx;
color: #e5c175;
padding-top: 30rpx;
}
.type {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
flex-wrap: wrap;
margin-top: $padding * 2;
width: 100%;
.type-item {
width: 33.33%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-size: 28rpx;
color: #2f3245;
margin-bottom: 30rpx;
image {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
margin-bottom: 20rpx;
}
}
}
.jiao {
width: 50rpx;
position: absolute;
}
.jiao:nth-child(1) {
left: 0;
top: 0;
}
.jiao:nth-child(2) {
right: 0;
top: 0;
}
.jiao:nth-child(3) {
left: 0;
bottom: 0;
}
.jiao:nth-child(4) {
right: 0;
bottom: 0;
}
}
}
.bottom {
height: 160rpx;
background-color: #2f3245;
color: #e5c175;
width: 100%;
display: flex;
flex-direction: row;
.left {
color: #e5c175;
width: 70%;
height: 100%;
font-weight: bold;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
.title-1 {
font-size: 36rpx;
}
.title-2{
font-size: 28rpx;
font-weight: normal;
}
}
.right {
background-color: #e5c175;
width: 30%;
height: 100%;
color: #2f3245;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-size: 36rpx;
font-weight: bold;
}
}
}
}
}
</style>

View File

@@ -18,8 +18,7 @@
</view> </view>
</view> </view>
<view class="chainAddress" v-if="userInfo.addr"> <view class="chainAddress" v-if="userInfo.addr">
<text <text @click="copy(userInfo.addr)">区块地址:{{userInfo.addr.substring(0,5) + '****' + userInfo.addr.substring(userInfo.addr.length - 5)}}</text>
@click="copy(userInfo.addr)">区块地址:{{userInfo.addr.substring(0,5) + '****' + userInfo.addr.substring(userInfo.addr.length - 5)}}</text>
</view> </view>
</view> </view>
</view> </view>
@@ -42,7 +41,7 @@
<view class="title">共力分</view> <view class="title">共力分</view>
<view class="num">{{account.glz}}</view> <view class="num">{{account.glz}}</view>
</view> </view>
<view class="health-flex-item"> <view class="health-flex-item" @click="onBtn('AccountDt', {})">
<view class="title">DT积分</view> <view class="title">DT积分</view>
<view class="num">{{account.dt}}</view> <view class="num">{{account.dt}}</view>
</view> </view>
@@ -95,12 +94,11 @@
导出助记词 导出助记词
<uni-icons class="forward" type="forward" color="#999" /> <uni-icons class="forward" type="forward" color="#999" />
</view> </view>
<view class="btns-box-item" @click="onWbt"> <!-- <view class="btns-box-item" @click="onWbt">
<image class="icon" src="@/static/user/userIcon_02.png" mode="widthFix" /> <image class="icon" src="@/static/user/userIcon_02.png" mode="widthFix" />
文版通账号 文版通账号
<uni-icons class="forward" type="forward" color="#999" /> <uni-icons class="forward" type="forward" color="#999" />
</view> </view> -->
<view class="btns-box-item" @click="resetPassword"> <view class="btns-box-item" @click="resetPassword">
<image class="icon" src="@/static/user/userIcon_13.png" mode="widthFix" /> <image class="icon" src="@/static/user/userIcon_13.png" mode="widthFix" />
{{hasPassword ? '修改' : '设置'}}支付密码 {{hasPassword ? '修改' : '设置'}}支付密码
@@ -115,26 +113,37 @@
</block> </block>
</view> </view>
<view class="btns-box"> <view class="btns-box">
<!-- <view class="btns-box-item" @click="onBtn('PinList', {})" v-if="collage_switch">
<image class="icon" src="@/static/user/userIcon_15.png" mode="widthFix" />
我的拼单 <uni-icons class="forward" type="forward" color="#999" />
</view> -->
<view class="btns-box-item" @click="onBtn('MyCard', {})">
<image class="icon" src="@/static/user/userIcon_00.png" mode="widthFix" />
我的卡券 <uni-icons class="forward" type="forward" color="#999" />
</view>
<view class="btns-box-item" @click="onBtn('Address', { type: 'edit' })"> <view class="btns-box-item" @click="onBtn('Address', { type: 'edit' })">
<image class="icon" src="@/static/user/userIcon_03.png" mode="widthFix" /> <image class="icon" src="@/static/user/userIcon_03.png" mode="widthFix" />
地址管理 地址管理 <uni-icons class="forward" type="forward" color="#999" />
<uni-icons class="forward" type="forward" color="#999" />
</view> </view>
<view class="btns-box-item" @click="onBtn('Invitation', {})"> <view class="btns-box-item" @click="onBtn('Invitation', {})">
<image class="icon" src="@/static/user/userIcon_07.png" mode="widthFix" /> <image class="icon" src="@/static/user/userIcon_07.png" mode="widthFix" />
分享邀请 分享邀请 <uni-icons class="forward" type="forward" color="#999" />
<uni-icons class="forward" type="forward" color="#999" />
</view> </view>
<view class="btns-box-item" @click="onBtn('Supplier', {})"> <view class="btns-box-item" @click="onBtn('Supplier', {})">
<image class="icon" src="@/static/user/userIcon_09.png" mode="widthFix" /> <image class="icon" src="@/static/user/userIcon_09.png" mode="widthFix" />
供应商入驻 供应商入驻 <uni-icons class="forward" type="forward" color="#999" />
<uni-icons class="forward" type="forward" color="#999" /> </view>
</view>
<view class="btns-box">
<view class="btns-box-item" @click="onShare">
<image class="icon" src="@/static/user/userIcon_14.png" mode="widthFix" />绑定分享关系
<block v-if="share == null"> <uni-icons class="forward" type="forward" color="#999" /> </block>
<block v-else> <text class="forward" style="color: gray;">{{share.nickname}}</text> </block>
</view> </view>
</view> </view>
<view class="btns-box"> <view class="btns-box">
<view class="btns-box-item" @click="onBtn('Feedback', {})"> <view class="btns-box-item" @click="onBtn('Feedback', {})">
<image class="icon" src="@/static/user/userIcon_06.png" mode="widthFix" /> <image class="icon" src="@/static/user/userIcon_06.png" mode="widthFix" />意见反馈
意见反馈
<uni-icons class="forward" type="forward" color="#999" /> <uni-icons class="forward" type="forward" color="#999" />
</view> </view>
<view class="btns-box-item" @click="updateApp"> <view class="btns-box-item" @click="updateApp">
@@ -191,20 +200,45 @@
</view> </view>
</slot> </slot>
</u-modal> </u-modal>
<!-- 绑定分享关系 -->
<u-modal
:show="showBind"
confirmColor="#34CE98"
:showCancelButton="true"
:confirmText="isInvitation ? '校验邀请码': '绑定关系'"
@cancel="()=> {
this.showBind = false
this.isInvitation = true
this.invitation = ''
}"
@confirm="onBind"
>
<slot>
<view class="bind-view" v-if="isInvitation">
<view class="bind-title">邀请码</view>
<view class="bind-subtitle">请输入好友的邀请码</view>
<view class="bind-input">
<input type="text" v-model="invitation" placeholder="输入邀请码">
</view>
</view>
<view class="bind-user" v-else>
<view class="bind-title">邀请用户</view>
<view class="bind-subtitle">请确认绑定关系用户信息</view>
<view class="bind-acitve">
<image :src="invitationUser.avatar" mode="aspectFill"></image>
</view>
<view class="bind-nickname">{{invitationUser.nickname}}</view>
<view class="bind-username">{{invitationUser.username}}</view>
</view>
</slot>
</u-modal>
</view> </view>
</template> </template>
<script> <script>
import { import { info, chainSeed, relationsBind, relationsVerify } from '@/apis/interfaces/user';
info, import { payPassword } from '@/apis/interfaces/account.js'
chainSeed import { getVersions } from '@/apis/interfaces/versions.js'
} from '@/apis/interfaces/user';
import {
payPassword
} from '@/apis/interfaces/account.js'
import {
getVersions
} from '@/apis/interfaces/versions.js'
export default { export default {
data() { data() {
return { return {
@@ -244,6 +278,13 @@
messages:0, messages:0,
wbtAccount:'', wbtAccount:'',
wbtShow:false, wbtShow:false,
// 绑定关系
share : null,
showBind : false,
invitation : '',
isInvitation : true,
invitationUser : {},
collage_switch : false,
}; };
}, },
onShow() { onShow() {
@@ -252,7 +293,6 @@
}, },
methods: { methods: {
onWbt(){ onWbt(){
console.log(this.wbtAccount);
if(this.wbtAccount === ''){ if(this.wbtAccount === ''){
uni.showModal({ uni.showModal({
title:'温馨提示', title:'温馨提示',
@@ -266,10 +306,56 @@
} }
}) })
}else{ }else{
console.log('....')
this.wbtShow = true; this.wbtShow = true;
} }
}, },
// 绑定分享关系
onShare(){
if(this.share != null){
return
}
this.showBind = true
},
// 绑定邀请码
onBind(){
// 检验邀请码
if(this.isInvitation){
if(this.invitation === ''){
uni.showToast({
title: '请输入邀请码',
icon : 'none'
})
return
}
relationsVerify(this.invitation).then(res => {
this.invitationUser = res
this.isInvitation = false
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
return
}
// 绑定关系
relationsBind(this.invitation).then(res => {
this.showBind = false
uni.showModal({
title : '提示',
content : '关系绑定成功',
showCancel : false,
success : res => {
this.getInfo()
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 用户信息 // 用户信息
getInfo() { getInfo() {
if (this.$store.state.token === '') return; if (this.$store.state.token === '') return;
@@ -277,6 +363,7 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: res.nickname title: res.nickname
}); });
this.share = String(res.share) == '' ? null : res.share
this.canSeeData = res.can_see_data this.canSeeData = res.can_see_data
this.order = res.order this.order = res.order
this.cardText = res.identity_array this.cardText = res.identity_array
@@ -293,8 +380,8 @@
this.hasPassword = res.has_transfer_password; this.hasPassword = res.has_transfer_password;
this.messages = Number(res.messages); this.messages = Number(res.messages);
this.wbtAccount = res.wbt_account; this.wbtAccount = res.wbt_account;
}) this.collage_switch = res.collage_switch;
.catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: 'none' icon: 'none'
@@ -501,6 +588,80 @@
min-height: 100vh; min-height: 100vh;
} }
// 邀请码
.bind-view{
padding: 15rpx 30rpx;
width: 100%;
box-sizing: border-box;
.bind-title{
text-align: center;
font-size: 36rpx;
font-weight: bold;
}
.bind-subtitle{
line-height: 40rpx;
font-size: 28rpx;
color: gray;
padding-top: 15rpx;
text-align: center;
}
.bind-input{
padding-top: 30rpx;
input{
background: #f8f8f8;
width: 100%;
height: 80rpx;
padding: 0 30rpx;
border-radius: 40rpx;
text-align: center;
box-sizing: border-box;
font-size: 32rpx;
font-weight: bold;
}
}
}
// 确认绑定用户关系
.bind-user{
padding: 15rpx 30rpx;
width: 100%;
box-sizing: border-box;
.bind-title{
text-align: center;
font-size: 36rpx;
font-weight: bold;
}
.bind-subtitle{
line-height: 40rpx;
font-size: 28rpx;
color: gray;
padding-top: 15rpx;
text-align: center;
}
.bind-acitve{
text-align: center;
padding-top: 30rpx;
image{
width: 108rpx;
height: 108rpx;
background: #f8f8f8;
border-radius: 50%;
}
}
.bind-nickname{
text-align: center;
font-size: 32rpx;
color: #333;
font-weight: bold;
line-height: 40rpx;
padding-top: 20rpx;
}
.bind-username{
text-align: center;
font-weight: bold;
font-size: 28rpx;
color: gray;
}
}
// 版权信息 // 版权信息
.footer-text { .footer-text {
text-align: center; text-align: center;

View File

@@ -0,0 +1,179 @@
<template>
<view class="my-card">
<view class="select">
{{listShowText}} <u-icon class='down' name="arrow-down-fill" size='11' color="#666" />
</view>
<block v-if="lists.length > 0">
<view class="card-item" v-for="item in lists" :key='item.card_id' @click="goShop(item.shop.shop_id)">
<image class="card-item-bg" :src="item.message.card_cover" mode="aspectFill" />
<view class="card-item-top">
<image class="avatar" :src="item.message.cover" mode="aspectFill" />
<view class="info">
<view class="title"> {{item.shop.name}}</view>
<view class="des"> NO.{{item.number}} | {{item.ended_at}} 到期</view>
</view>
</view>
<view class="tags">{{item.message.title}}</view>
</view>
</block>
<block v-else>
<view class="vertical pages-empty" style="padding-top: 180rpx;">
<u-empty icon="http://cdn.uviewui.com/uview/empty/list.png" textColor="#999" text="暂无卡包信息~" />
</view>
</block>
<!-- 筛选 -->
<!-- <u-action-sheet :actions="typeList" @select="selectClick" :show="show" cancelText='取消' @close='show = false' /> -->
</view>
</template>
<script>
import {
myCard
} from '@/apis/interfaces/user.js'
export default {
data() {
return {
page: 1,
has_more: true,
lists: [],
typeList: [{
name: '按照会员到期时间排序'
}],
show: false,
listShowText: '按照会员到期时间排序',
};
},
onLoad() {
this.getList();
},
onReachBottom() {
if (this.has_more) {
this.page = this.page + 1;
this.getList();
}else{
uni.showToast({
title:'没有更多~',
icon: "none",
mask: true
})
}
},
methods: {
goShop(id) {
uni.navigateTo({
url:'/pages/store/shop/shopDetail?ShopId=' + id
})
},
getList() {
if(this.page === 1){
this.lists = []
}
myCard({
page: this.page
}).then(res => {
this.lists = this.lists.concat(res.data);
this.has_more = res.page.has_more;
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none",
mask: true
})
})
}
}
}
</script>
<style lang="scss">
.my-card{
padding-bottom: $padding;
}
.select {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-size: 28rpx;
color: #666;
padding: $padding;
.down {
padding-left: 10rpx;
}
}
.card-item {
height: 180rpx;
background-color: pink;
border-radius: 10rpx;
position: relative;
overflow: hidden;
box-sizing: border-box;
margin: 0 $margin;
margin-bottom: $margin - 10;
.tags {
position: absolute;
top: 22rpx;
color: #fff;
right: -46rpx;
background: rgba($color: #ffaa00, $alpha: 0.9);
font-size: 30rpx;
padding: 2rpx 50rpx;
text-align: center;
transform: rotate(45deg);
font-weight: bold;
letter-spacing:4rpx;
z-index: 10;
}
.card-item-bg {
position: absolute;
top: 1;
width: 100%;
z-index: 1;
}
.card-item-top {
background-color: rgba($color: #000000, $alpha:0.6);
width: 100%;
height: 180rpx;
position: absolute;
top: 0;
left: 0;
z-index: 2;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding: 0 $padding;
.avatar {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
border: solid 4rpx rgba($color: #fff, $alpha: 0.8);
}
.info {
flex: 1;
padding-left: $padding;
.title {
font-size: 34rpx;
font-weight: bold;
color: rgba($color: #fff, $alpha: 0.9);
}
.des {
padding-top: 6rpx;
font-size: 28rpx;
color: rgba($color: #fff, $alpha: 0.8);
}
}
}
}
</style>

View File

@@ -12,12 +12,8 @@
<view> <view>
<view class="vip-lv">{{identity.identity_text}}</view> <view class="vip-lv">{{identity.identity_text}}</view>
<block> <block>
<view class="vip-progress"> <view class="vip-progress"> <view class="vip-progress-loding" :style="'width:' + firstRule.rate + '%'"></view> </view>
<view class="vip-progress-loding" :style="'width:' + firstRule.rate + '%'"></view> <view class="vip-loding"> <view>{{firstRule.current}}/{{firstRule.need}}{{firstRule.title}}</view> </view>
</view>
<view class="vip-loding">
<view>{{firstRule.current}}/{{firstRule.need}}{{firstRule.title}}</view>
</view>
</block> </block>
</view> </view>
<navigator class="vip-more" url="/pages/vip/agreement?id=2" hover-class="none">成长体系<uni-icons size="14" type="forward" color="#9f5529"></uni-icons></navigator> <navigator class="vip-more" url="/pages/vip/agreement?id=2" hover-class="none">成长体系<uni-icons size="14" type="forward" color="#9f5529"></uni-icons></navigator>
@@ -28,7 +24,7 @@
<view class="vip-content-title">距离<text>{{nextIdentity.identity_text}}</text>还需条件</view> <view class="vip-content-title">距离<text>{{nextIdentity.identity_text}}</text>还需条件</view>
<view class="vip-up-conditions"> <view class="vip-up-conditions">
<view class="vip-up-conditions-item"><text>10/10</text>家庭会员</view> <view class="vip-up-conditions-item"><text>10/10</text>家庭会员</view>
<view class="vip-up-conditions-item"><text>9/100</text>邀请家族会员</view> <view class="vip-up-conditions-item"><text>9/100</text>邀请家族会员</view>
<view class="vip-up-conditions-item"><text>10/10000</text>伙伴</view> <view class="vip-up-conditions-item"><text>10/10000</text>伙伴</view>
</view> </view>
</block> </block>
@@ -67,6 +63,8 @@
</template> </template>
<script> <script>
var hmAppPay = uni.requireNativePlugin('TestModule');
import { vipHmPay } from '@/apis/interfaces/vip.js';
import { vip, vipPay, payInfo } from '@/apis/interfaces/vip.js' import { vip, vipPay, payInfo } from '@/apis/interfaces/vip.js'
export default { export default {
data() { data() {
@@ -102,11 +100,24 @@
need : '-', need : '-',
current: '-', current: '-',
rate: 0 rate: 0
} },
// 河马付
orderId : '',
hmPayState: false
}; };
}, },
onShow() { onShow() {
this.getVipInfo() this.getVipInfo()
if(this.hmPayState){
this.$Router.replace({
name : 'hmState',
params : {
type : 'vip',
orderId : this.orderId
}
})
return
}
}, },
methods: { methods: {
// 获取会员信息 // 获取会员信息
@@ -140,6 +151,18 @@
uni.showLoading({ uni.showLoading({
title: '获取支付信息' title: '获取支付信息'
}) })
if(plus.runtime.isApplicationExist({
pname : 'com.eg.android.AlipayGphone',
action : 'alipay://'
})){
this.getHmPayInfo(res.id)
}else{
uni.showToast({
title: '支付失败,请安装支付宝',
icon : 'none'
})
}
return
this.wxPay(res.id) this.wxPay(res.id)
} }
}).catch(err => { }).catch(err => {
@@ -149,6 +172,26 @@
}) })
}) })
}, },
// 河马支付
getHmPayInfo(order_id){
this.orderId = order_id
vipHmPay(order_id).then(res => {
try{
hmAppPay.gotoNativePage(JSON.stringify(res))
this.hmPayState = true
}catch(e){
uni.showToast({
title: e
})
}
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 微信支付 // 微信支付
wxPay(orderId){ wxPay(orderId){
payInfo(orderId).then(orderInfo => { payInfo(orderId).then(orderInfo => {

BIN
static/.DS_Store vendored Normal file

Binary file not shown.

BIN
static/book/333.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

BIN
static/book/fire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
static/book/pin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

BIN
static/book/wen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
static/chat/.DS_Store vendored Normal file

Binary file not shown.

BIN
static/mission/change.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
static/mission/diwen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/mission/mission.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
static/mission/video.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
static/rank/mo-null.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
static/rank/mo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/store/.DS_Store vendored Normal file

Binary file not shown.

BIN
static/store/fire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
static/store/get-more.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

BIN
static/user/qrCode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
static/user/userIcon_14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
static/user/userIcon_15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -1,37 +0,0 @@
'use strict';
const crypto = require('crypto')
exports.main = async (event) => {
const secret = 'AhChain2021.'
const hmac = crypto.createHmac('sha256', secret);
let params = event.queryStringParameters
const sign = params.sign
delete params.sign
const signStr = Object.keys(params).sort().map(key => {
return `${key}=${params[key]}`
}).join('&')
hmac.update(signStr);
if (sign !== hmac.digest('hex')) {
throw new Error('非法访问')
}
const {
access_token,
openid
} = params
return await uniCloud.getPhoneNumber({
appid: '__UNI__1F65101',
provider: 'univerify',
apiKey: '16fa20236696596869759d3a81541901',
apiSecret: 'fca97287360c2e8f8259d8877a601887',
access_token: access_token,
openid: openid,
})
};

View File

@@ -1,8 +0,0 @@
{
"cloudfunction-config": {
"memorySize": 128,
"timeout": 5,
"triggers": [],
"path": "/ah-chain/phone-login"
}
}

View File

@@ -1,37 +0,0 @@
'use strict';
const crypto = require('crypto')
exports.main = async (event) => {
const secret = 'zhhealth2022.'
const hmac = crypto.createHmac('sha256', secret);
let params = event.queryStringParameters
const sign = params.sign
delete params.sign
const signStr = Object.keys(params).sort().map(key => {
return `${key}=${params[key]}`
}).join('&')
hmac.update(signStr);
if (sign !== hmac.digest('hex')) {
throw new Error('非法访问')
}
const {
access_token,
openid
} = params
return await uniCloud.getPhoneNumber({
appid: '__UNI__C29473D',
provider: 'univerify',
apiKey: '16fa20236696596869759d3a81541901',
apiSecret: 'fca97287360c2e8f8259d8877a601887',
access_token: access_token,
openid: openid,
})
};

View File

@@ -1,11 +0,0 @@
// 本文件中的json内容将在云函数【运行】时作为参数传给云函数。
// 配置教程参考https://uniapp.dcloud.net.cn/uniCloud/quickstart?id=runparam
{
adpid: '1428308887',
platform: 'android',
provider: 'sigmob',
trans_id: '892aed71-f840-11ec-adc8-00163e349e98',
user_id: '',
extra: '',
sign: '51658e78da481dfd38aa0bd16b6d09863df8808facd22f7bbc7392afafe2391f'
}

View File

@@ -1,31 +0,0 @@
'use strict';
const crypto = require('crypto');
exports.main = async (event, context) => {
const {
path,
queryStringParameters
} = event;
const data = {
adpid: event.adpid,
platform: event.platform,
provider: event.provider,
trans_id: event.trans_id,
sign: event.sign,
user_id: event.user_id,
extra: event.extra,
}
const secret = 'a7b111748f195a68b95b8e1a1560d8de1f79d33210a6b96101c3ced15b5b2121';// uniad 后台开通激励视频回调后生成的 Security key
const trans_id = event.trans_id;
const sign2 = crypto.createHash('sha256').update(`${secret}:${trans_id}`).digest('hex');
if (event.sign !== sign2) {
return null;
}
//返回数据给客户端
return event
};

View File

@@ -1,7 +0,0 @@
{
"name": "gl-ad",
"dependencies": {},
"extensions": {
"uni-cloud-jql": {}
}
}

View File

@@ -1,37 +0,0 @@
'use strict';
const crypto = require('crypto')
exports.main = async (event) => {
const secret = 'glDao2022.'
const hmac = crypto.createHmac('sha256', secret);
let params = event.queryStringParameters
const sign = params.sign
delete params.sign
const signStr = Object.keys(params).sort().map(key => {
return `${key}=${params[key]}`
}).join('&')
hmac.update(signStr);
if (sign !== hmac.digest('hex')) {
throw new Error('非法访问')
}
const {
access_token,
openid
} = params
return await uniCloud.getPhoneNumber({
appid: '__UNI__DE7B0E6',
provider: 'univerify',
apiKey: '16fa20236696596869759d3a81541901',
apiSecret: 'fca97287360c2e8f8259d8877a601887',
access_token: access_token,
openid: openid,
})
};

View File

@@ -1,7 +0,0 @@
{
"name": "gl-key-login",
"dependencies": {},
"extensions": {
"uni-cloud-jql": {}
}
}

View File

@@ -1,37 +0,0 @@
'use strict';
const crypto = require('crypto')
exports.main = async (event) => {
const secret = 'Yuzhankeji2021.'
const hmac = crypto.createHmac('sha256', secret);
let params = event.queryStringParameters
const sign = params.sign
delete params.sign
const signStr = Object.keys(params).sort().map(key => {
return `${key}=${params[key]}`
}).join('&')
hmac.update(signStr);
if (sign !== hmac.digest('hex')) {
throw new Error('非法访问')
}
const {
access_token,
openid
} = params
return await uniCloud.getPhoneNumber({
appid: '__UNI__CD19AAD',
provider: 'univerify',
apiKey: '16fa20236696596869759d3a81541901',
apiSecret: 'fca97287360c2e8f8259d8877a601887',
access_token: access_token,
openid: openid,
})
};

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