diff --git a/api/api.js b/api/api.js index c578284..05cbbdf 100644 --- a/api/api.js +++ b/api/api.js @@ -314,13 +314,27 @@ const config = { auth : true, showLoading : true, }, - // 获取今日是否签到 + // 签到 sign : { url: '/token/sign', method: 'POST', auth : true, showLoading : true, }, + // 查看积分流水 + getPointsFlow : { + url: '/token/getPointsFlow', + method: 'GET', + auth : true, + showLoading : true, + }, + // 查看钱包流水 + getWalletFlow : { + url: '/token/getWalletFlow', + method: 'GET', + auth : true, + showLoading : true, + }, } const models = ['order'] diff --git a/api/model/order.js b/api/model/order.js index acce31e..c86c09b 100644 --- a/api/model/order.js +++ b/api/model/order.js @@ -35,6 +35,13 @@ const api = { method: 'GET', auth : true, }, + // 开通会员 + openMember : { + url: '/order/openMember', + method: 'POST', + auth : true, + showLoading : true, + }, } export default api \ No newline at end of file diff --git a/components/user/sharePopup.vue b/components/user/sharePopup.vue index 4705cfb..95a5d9e 100644 --- a/components/user/sharePopup.vue +++ b/components/user/sharePopup.vue @@ -17,19 +17,25 @@ - - - - {{ headInfo.vip.keyName }} + + + + {{ headInfo[item].keyName }} + + + ¥{{ headInfo[item].keyValue }} + + - - - - - 开通¥{{ headInfo.vip.keyValue }} - - + + + + 开通¥{{ headInfo[vipKeyName].keyValue }}/每月 @@ -40,7 +46,10 @@ import { mapState } from 'vuex' export default { data() { - return {} + return { + vipKeyName : 'vip', + vipList : ['vip', 'vipBig'], + } }, computed : { ...mapState(['headInfo']), @@ -49,18 +58,56 @@ open() { this.$refs.popup.open('bottom') }, + submit(){ + this.$api('openMember', { + type : this.vipList.indexOf(this.vipKeyName), + }, res => { + if(res.code == 200){ + uni.requestPaymentWxPay(res) + .then(res => { + this.$refs.popup.close() + uni.showToast({ + title: '会员开通成功', + icon: 'none' + }) + }) + } + }) + }, } } diff --git a/pages_order/components/product/submit.vue b/pages_order/components/product/submit.vue index 896f7bb..0e71b0c 100644 --- a/pages_order/components/product/submit.vue +++ b/pages_order/components/product/submit.vue @@ -29,10 +29,12 @@ - + 立即兑换 - + 立即购买 @@ -41,13 +43,18 @@ diff --git a/pages_order/product/productDetail.vue b/pages_order/product/productDetail.vue index f6f1da8..eabafbc 100644 --- a/pages_order/product/productDetail.vue +++ b/pages_order/product/productDetail.vue @@ -50,13 +50,14 @@ --> - - --> + @@ -74,6 +75,7 @@ diff --git a/pages_order/work/addWork.vue b/pages_order/work/addWork.vue index 37d3694..717c161 100644 --- a/pages_order/work/addWork.vue +++ b/pages_order/work/addWork.vue @@ -50,6 +50,13 @@ --> + + + 招聘公司 + + + + 薪资范围 @@ -111,6 +118,15 @@ --> + + + + + 联系人 + + + + 联系电话 @@ -134,6 +150,15 @@ + + + @@ -155,6 +180,17 @@ placeholder="请输入岗位详细介绍"> + + + + + 发布 @@ -181,6 +217,9 @@ maxPrice : '', address : '', addId : '', + company : '', + gsContext : '', + jobContext : '', }, radiovalue : '', priceList : [ @@ -262,11 +301,15 @@ title: '请输入招工标题', address : '请选择工作地点', workYear : '请选择工龄要求', + company : '请输入招聘公司', minPrice : '请输入薪资范围', iconText: '请输入标签', + userName: '请输入联系人', userPhone: '请输入联系电话', - school : '请选择岗位要求', + jobContext : '请输入职位描述', + school : '请输入岗位要求', jobDetails: '请输入岗位详细介绍', + gsContext : '请输入公司介绍', })) { return } diff --git a/uni_modules/uv-notice-bar/components/uv-column-notice/props.js b/uni_modules/uv-notice-bar/components/uv-column-notice/props.js index d93917c..b614e4f 100644 --- a/uni_modules/uv-notice-bar/components/uv-column-notice/props.js +++ b/uni_modules/uv-notice-bar/components/uv-column-notice/props.js @@ -28,7 +28,7 @@ export default { // 字体大小,单位px fontSize: { type: [String, Number], - default: 14 + default: 28 }, // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度 speed: { diff --git a/uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue b/uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue index 73c6bfc..579bc36 100644 --- a/uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue +++ b/uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue @@ -11,7 +11,7 @@ diff --git a/uni_modules/uv-notice-bar/components/uv-notice-bar/props.js b/uni_modules/uv-notice-bar/components/uv-notice-bar/props.js index 3fe0b44..121f7c4 100644 --- a/uni_modules/uv-notice-bar/components/uv-notice-bar/props.js +++ b/uni_modules/uv-notice-bar/components/uv-notice-bar/props.js @@ -43,7 +43,7 @@ export default { // 字体大小 fontSize: { type: [String, Number], - default: 14 + default: 28 }, // 滚动一个周期的时间长,单位ms duration: { diff --git a/uni_modules/uv-notice-bar/components/uv-row-notice/props.js b/uni_modules/uv-notice-bar/components/uv-row-notice/props.js index cba1823..c0dd758 100644 --- a/uni_modules/uv-notice-bar/components/uv-row-notice/props.js +++ b/uni_modules/uv-notice-bar/components/uv-row-notice/props.js @@ -28,7 +28,7 @@ export default { // 字体大小,单位px fontSize: { type: [String, Number], - default: 14 + default: 28 }, // 水平滚动时的滚动速度,即每秒滚动多少px(rpx),这有利于控制文字无论多少时,都能有一个恒定的速度 speed: { diff --git a/uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue b/uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue index 16117dd..25a3886 100644 --- a/uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue +++ b/uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue @@ -11,7 +11,7 @@ diff --git a/utils/index.js b/utils/index.js index d98758d..b3d8414 100644 --- a/utils/index.js +++ b/utils/index.js @@ -44,4 +44,31 @@ Vue.prototype.openLocation = (latitude, longitude) => { latitude : Number(latitude), longitude : Number(longitude), }) +} + + +// 封装微信支付 +uni.requestPaymentWxPay = function(res){ + return new Promise((success, error) => { + uni.requestPayment({ + provider: 'wxpay', // 服务提提供商 + timeStamp: res.result.timeStamp, // 时间戳 + nonceStr: res.result.nonceStr, // 随机字符串 + package: res.result.packageValue, + signType: res.result.signType, // 签名算法 + paySign: res.result.paySign, // 签名 + success: function (res) { + console.log('支付成功',res); + success(res) + }, + fail: function (err) { + console.log('支付失败',err); + error(err) + uni.showToast({ + icon:'none', + title:"支付失败" + }) + } + }); + }) } \ No newline at end of file