Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
267fb33d72
20 changed files with 588 additions and 53 deletions
  1. +15
    -1
      api/api.js
  2. +7
    -0
      api/model/order.js
  3. +64
    -17
      components/user/sharePopup.vue
  4. +18
    -0
      mixins/product.js
  5. +9
    -0
      pages.json
  6. +4
    -2
      pages/index/center.vue
  7. +9
    -6
      pages/index/index.vue
  8. +45
    -1
      pages/index/product.vue
  9. +305
    -0
      pages_order/car/addCar.vue
  10. +10
    -3
      pages_order/components/product/submit.vue
  11. +6
    -0
      pages_order/components/product/submitUnitSelect.vue
  12. +15
    -14
      pages_order/mine/runningWater.vue
  13. +5
    -3
      pages_order/product/productDetail.vue
  14. +44
    -1
      pages_order/work/addWork.vue
  15. +1
    -1
      uni_modules/uv-notice-bar/components/uv-column-notice/props.js
  16. +1
    -1
      uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue
  17. +1
    -1
      uni_modules/uv-notice-bar/components/uv-notice-bar/props.js
  18. +1
    -1
      uni_modules/uv-notice-bar/components/uv-row-notice/props.js
  19. +1
    -1
      uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue
  20. +27
    -0
      utils/index.js

+ 15
- 1
api/api.js View File

@ -314,13 +314,27 @@ const config = {
auth : true, auth : true,
showLoading : true, showLoading : true,
}, },
// 获取今日是否签到
// 签到
sign : { sign : {
url: '/token/sign', url: '/token/sign',
method: 'POST', method: 'POST',
auth : true, auth : true,
showLoading : 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'] const models = ['order']


+ 7
- 0
api/model/order.js View File

@ -35,6 +35,13 @@ const api = {
method: 'GET', method: 'GET',
auth : true, auth : true,
}, },
// 开通会员
openMember : {
url: '/order/openMember',
method: 'POST',
auth : true,
showLoading : true,
},
} }
export default api export default api

+ 64
- 17
components/user/sharePopup.vue View File

@ -17,19 +17,25 @@
</view> </view>
</view> </view>
<view class="vip">
<view class="title">
{{ headInfo.vip.keyName }}
<view class="vipList">
<view
@click="vipKeyName = item"
:class="{vip : true, act : item == vipKeyName}"
:key="index"
v-for="(item, index) in vipList">
<view class="title">
{{ headInfo[item].keyName }}
</view>
<view class="price">
{{ headInfo[item].keyValue }}
</view>
<uv-parse :content="headInfo[item].keyDetails"></uv-parse>
</view> </view>
<uv-parse :content="headInfo.vip.keyDetails"></uv-parse>
<view class="uni-color-btn"
@click="submit">
开通{{ headInfo.vip.keyValue }}
</view>
</view>
<view class="uni-color-btn"
@click="submit">
开通{{ headInfo[vipKeyName].keyValue }}/每月
</view> </view>
</view> </view>
@ -40,7 +46,10 @@
import { mapState } from 'vuex' import { mapState } from 'vuex'
export default { export default {
data() { data() {
return {}
return {
vipKeyName : 'vip',
vipList : ['vip', 'vipBig'],
}
}, },
computed : { computed : {
...mapState(['headInfo']), ...mapState(['headInfo']),
@ -49,18 +58,56 @@
open() { open() {
this.$refs.popup.open('bottom') 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'
})
})
}
})
},
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page { .page {
border-radius: 15rpx;
padding: 20rpx; padding: 20rpx;
.vip{
.uni-color-btn{
width: 80%;
.vipList{
display: flex;
.vip{
flex: 1;
border-radius: 10rpx;
border: 4rpx solid #00000033;
padding: 16rpx;
box-sizing: border-box;
margin: 5rpx;
line-height: 40rpx;
font-size: 24rpx;
.title{
font-weight: 900;
}
.price{
font-weight: 900;
color: #fa0;
font-size: 32rpx;
line-height: 50rpx;
}
} }
.act{
border: 4rpx solid #fa0;
}
}
.uni-color-btn{
width: 80%;
} }
.UniversalWall { .UniversalWall {


+ 18
- 0
mixins/product.js View File

@ -0,0 +1,18 @@
export default {
data() {
return {
}
},
methods : {
isProductPoint(detail){
console.log(detail);
return [2].includes(detail.className)
},
isProductPrice(detail){
return [0, 1].includes(detail.className)
},
}
}

+ 9
- 0
pages.json View File

@ -46,6 +46,12 @@
"enablePullDownRefresh" : true "enablePullDownRefresh" : true
} }
}, },
{
"path": "mine/runningWater",
"style": {
"enablePullDownRefresh" : true
}
},
{ {
"path": "mine/address", "path": "mine/address",
"style": { "style": {
@ -163,6 +169,9 @@
"style": { "style": {
"enablePullDownRefresh" : true "enablePullDownRefresh" : true
} }
},
{
"path": "car/addCar"
} }
] ]
}], }],


+ 4
- 2
pages/index/center.vue View File

@ -69,7 +69,8 @@
| |
</view> </view>
<view class="fenst">
<view class="fenst"
@click="$utils.navigateTo('/pages_order/mine/runningWater?status=0')">
<view class="digit"> <view class="digit">
{{ userInfo.price }} {{ userInfo.price }}
</view> </view>
@ -82,7 +83,8 @@
| |
</view> </view>
<view class="fenst">
<view class="fenst"
@click="$utils.navigateTo('/pages_order/mine/runningWater?status=1')">
<view class="digit"> <view class="digit">
{{ userInfo.integerPrice }} {{ userInfo.integerPrice }}
</view> </view>


+ 9
- 6
pages/index/index.vue View File

@ -2,12 +2,15 @@
<view class="page"> <view class="page">
<view> <view>
<uv-swiper
<!-- <uv-swiper
:list="bannerList" :list="bannerList"
indicator indicator
height="490rpx" height="490rpx"
indicatorStyle="bottom: 100rpx;" indicatorStyle="bottom: 100rpx;"
keyName="image"></uv-swiper>
keyName="image"></uv-swiper> -->
<image :src="headInfo.bg"
style="width: 100%;height: 490rpx;"
mode="aspectFill"></image>
</view> </view>
<!-- 瑶都万能墙 --> <!-- 瑶都万能墙 -->
@ -103,10 +106,10 @@
<!-- 分类 --> <!-- 分类 -->
<view class="LabelOptions"> <view class="LabelOptions">
<uv-tabs :list="category" <uv-tabs :list="category"
:activeStyle="{color : '#000', fontWeight : 900}"
:activeStyle="{color : '#000', fontWeight : 900, fontSize : '36rpx'}"
lineColor="#5baaff" lineColor="#5baaff"
lineHeight="8rpx" lineHeight="8rpx"
lineWidth="50rpx"
lineWidth="60rpx"
keyName="title" keyName="title"
@click="tabsClick"></uv-tabs> @click="tabsClick"></uv-tabs>
</view> </view>
@ -201,7 +204,7 @@
// this.getIndexHeaderInfo() // this.getIndexHeaderInfo()
this.$store.commit('getIndexHeaderInfo') this.$store.commit('getIndexHeaderInfo')
this.getClassifyList() this.getClassifyList()
this.getBannerList()
// this.getBannerList()
this.$store.commit('getCategory') this.$store.commit('getCategory')
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
@ -216,7 +219,7 @@
onPullDownRefresh() { onPullDownRefresh() {
// this.getIndexHeaderInfo() // this.getIndexHeaderInfo()
this.getClassifyList() this.getClassifyList()
this.getBannerList()
// this.getBannerList()
this.$store.commit('getCategory') this.$store.commit('getCategory')
this.getUserInfo() this.getUserInfo()
}, },


+ 45
- 1
pages/index/product.vue View File

@ -18,6 +18,24 @@
keyName="image"></uv-swiper> keyName="image"></uv-swiper>
</view> </view>
<!-- 公告 -->
<view class="notice">
<uv-notice-bar
fontSize="28rpx"
:text="headInfo.notice"></uv-notice-bar>
</view>
<!-- 分类 -->
<view class="LabelOptions">
<uv-tabs :list="category"
:activeStyle="{color : '#000', fontWeight : 900}"
lineColor="#5baaff"
lineHeight="8rpx"
lineWidth="50rpx"
:scrollable="false"
@click="tabsClick"></uv-tabs>
</view>
<view class="productList"> <view class="productList">
<productList :productList="list"/> <productList :productList="list"/>
</view> </view>
@ -80,6 +98,7 @@
import mixinsList from '@/mixins/list.js' import mixinsList from '@/mixins/list.js'
import tabber from '@/components/base/tabbar.vue' import tabber from '@/components/base/tabbar.vue'
import productList from '@/components/user/productList.vue' import productList from '@/components/user/productList.vue'
import { mapState } from 'vuex'
export default { export default {
mixins: [mixinsList], mixins: [mixinsList],
components : { components : {
@ -87,6 +106,7 @@
productList, productList,
}, },
computed: { computed: {
...mapState(['city', 'userInfo', 'headInfo']),
// imageStyle(item) { // imageStyle(item) {
// return item => { // return item => {
// const v = uni.upx2px(750) - this.leftGap - this.rightGap - this.columnGap; // const v = uni.upx2px(750) - this.leftGap - this.rightGap - this.columnGap;
@ -109,11 +129,28 @@
// rightGap: 10, // rightGap: 10,
// columnGap: 10, // columnGap: 10,
bannerList : [], bannerList : [],
category : [
{
name : '美食商城',
value : 0,
},
{
name : '家乡特产',
value : 1,
},
{
name : '积分商城',
value : 2,
},
],
} }
}, },
onShow() { onShow() {
this.getBannerList() this.getBannerList()
}, },
onLoad() {
this.queryParams.className = 0
},
methods: { methods: {
// e.namelist1list2 // e.namelist1list2
// changeList(e) { // changeList(e) {
@ -121,12 +158,16 @@
// }, // },
// banner // banner
getBannerList(){ getBannerList(){
this.$api('getBannerList', res =>{
this.$api('getBannerList', res => {
if(res.code == 200){ if(res.code == 200){
this.bannerList = res.result this.bannerList = res.result
} }
}) })
}, },
tabsClick(item) {
this.queryParams.className = item.value
this.getData()
},
} }
} }
@ -140,6 +181,9 @@
border-radius: 20rpx; border-radius: 20rpx;
margin: 20rpx; margin: 20rpx;
} }
.notice{
padding: 20rpx;
}
.productList{ .productList{
padding: 0 20rpx; padding: 0 20rpx;
} }


+ 305
- 0
pages_order/car/addCar.vue View File

@ -0,0 +1,305 @@
<template>
<view class="page">
<navbar title="发布优质出行" leftClick @leftClick="$utils.navigateBack" />
<view class="form">
<view class="help-issue">
<text>出行标题</text>
<text style="color: #BD3624;">*</text>
</view>
<view class="form-sheet-cell">
<input type="text"
v-model="form.title"
class="title-input"/>
</view>
<uv-cell
title="工作地点"
rightIconStyle="fontSize: 30rpx;"
:value="form.address || '请选择招工地点'"
@click="selectAddr"
isLink
></uv-cell>
<uv-cell
title="工龄要求"
rightIconStyle="fontSize: 30rpx;"
:value="form.workYear || '请选择工龄要求'"
@click="openPicker('workYear')"
isLink
></uv-cell>
<view class="form-sheet-cell">
<view class="label">
招聘公司
</view>
<input placeholder="请输入招聘公司" v-model="form.company" />
</view>
<view class="form-sheet-cell">
<view class="label">
薪资范围
</view>
<input placeholder="请输入薪资范围" v-model="form.minPrice" />
</view>
<view class="form-sheet-cell">
<view class="label">
标签
</view>
<input placeholder="请输入标签(多个用,号分割)" v-model="form.iconText" />
</view>
<view class="form-sheet-cell">
<view class="label">
联系人
</view>
<input placeholder="请输入联系人" v-model="form.userName" />
</view>
<view class="form-sheet-cell">
<view class="label">
联系电话
</view>
<input placeholder="请输入联系电话" v-model="form.userPhone" />
</view>
<view class="category">
<view class="title">
选择地区
</view>
<view class="tagList">
<view
:class="{act : t.id == form.addId}"
@click="form.addId = t.id"
v-for="(t, i) in cityList"
:key="i">
{{ t.name }}
</view>
</view>
</view>
<view class=""
style="margin-top: 20rpx;">
<uv-textarea
v-model="form.jobDetails"
count
:maxlength="300"
autoHeight
placeholder="请输入岗位详细介绍"></uv-textarea>
</view>
<view class="uni-color-btn"
@click="submit">
发布
</view>
</view>
<uv-picker ref="picker"
:columns="columns"
@confirm="pickerConfirm"></uv-picker>
</view>
</template>
<script>
import Position from '@/utils/position.js'
import { mapState } from 'vuex'
export default {
data() {
return {
form : {
school : '',
workYear : '',
minPrice : '',
maxPrice : '',
address : '',
addId : '',
company : '',
gsContext : '',
jobContext : '',
},
radiovalue : '',
priceList : [
{
name : '日结',
},
{
name : '月结',
},
],
jopList : [
{
name : '正式工',
},
{
name : '临时工',
},
],
picker : {
workYear : [
'不限',
],
school : [
'不限',
'初中',
'高中',
'专科',
'本科',
'研究生',
'博士',
],
},
pickerKey : 'workYear',
}
},
onLoad() {
for (var i = 0; i < 30; i++) {
this.picker.workYear.push((i + 1) + '年')
}
this.form.addId = this.cityList[0].id
},
computed : {
columns(){
return [this.picker[this.pickerKey]]
},
...mapState(['cityList', 'category']),
},
methods: {
openPicker(key){
this.pickerKey = key
this.$refs.picker.open()
},
pickerConfirm(e){
this.form[this.pickerKey] = e.value[0]
},
//
selectAddr() {
Position.selectAddress(res => {
//
this.form.latitude = res.latitude
this.form.longitude = res.longitude
if (res.name) {
return this.form.address = res.name
}
this.form.address = ''
})
},
//
submit(){
// if(this.fileList.length == 0){
// return uni.showToast({
// title: '',
// icon : 'none'
// })
// }
if (this.$utils.verificationAll(this.form, {
title: '请输入招工标题',
address : '请选择工作地点',
workYear : '请选择工龄要求',
company : '请输入招聘公司',
minPrice : '请输入薪资范围',
iconText: '请输入标签',
userName: '请输入联系人',
userPhone: '请输入联系电话',
jobDetails: '请输入岗位详细介绍',
})) {
return
}
this.$api('publishJob', this.form, res => {
if(res.code == 200){
uni.showToast({
title: '发布成功!',
icon: 'none'
})
setTimeout(uni.navigateBack, 1000, -1)
}
})
},
}
}
</script>
<style scoped lang="scss">
.page{
background-color: #fff;
min-height: 100vh;
box-sizing: border-box;
color: #333333;
font-size: 28rpx;
/deep/ text{
font-size: 28rpx !important;
}
input{
width: 450rpx;
}
.form{
padding: 30rpx;
.help-issue {
margin: 20rpx;
}
.title-input{
border: 1px solid $uni-color;
width: 100%;
border-radius: 10rpx;
padding: 10rpx 20rpx;
box-sizing: border-box;
height: 65rpx;
}
.form-sheet-cell{
display: flex;
background-color: #fff;
padding: 20rpx 30rpx;
align-items: center;
.label{
width: 160rpx;
}
.price{
display: flex;
text-align: center;
input{
width: 150rpx;
border: 1px solid $uni-color;
margin: 0 10rpx;
}
}
.right-icon{
margin-left: auto;
}
}
}
.category{
padding: 20rpx;
.title{
// font-weight: 900;
// font-size: 30rpx;
}
.tagList{
display: flex;
flex-wrap: wrap;
padding: 10rpx 0;
view{
background: rgba($uni-color, 0.1);
padding: 10rpx 20rpx;
margin: 10rpx;
border-radius: 10rpx;
font-size: 26rpx;
}
.act{
color: #fff;
background: $uni-color;
}
}
}
}
</style>

+ 10
- 3
pages_order/components/product/submit.vue View File

@ -29,10 +29,12 @@
<view class="submit-btn" <view class="submit-btn"
@click="$emit('submit')"> @click="$emit('submit')">
<view class="l">
<view class="l"
v-if="isProductPoint(detail)">
立即兑换 立即兑换
</view> </view>
<view class="r">
<view class="r"
v-if="isProductPrice(detail)">
立即购买 立即购买
</view> </view>
</view> </view>
@ -41,13 +43,18 @@
</template> </template>
<script> <script>
import productMixins from '@/mixins/product.js'
export default { export default {
name:"submit", name:"submit",
mixins : [productMixins],
props : { props : {
submiitTitle : { submiitTitle : {
default : '立即兑换', default : '立即兑换',
type : String, type : String,
}
},
detail : {
default : {}
},
}, },
data() { data() {
return { return {


+ 6
- 0
pages_order/components/product/submitUnitSelect.vue View File

@ -81,13 +81,17 @@
</view> </view>
</view> </view>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<view class="submit-btn"> <view class="submit-btn">
<view class="l" <view class="l"
v-if="isProductPoint(detail)"
@click="exchange"> @click="exchange">
立即兑换 立即兑换
</view> </view>
<view class="r" <view class="r"
v-if="isProductPrice(detail)"
@click="orderPay"> @click="orderPay">
立即购买 立即购买
</view> </view>
@ -107,7 +111,9 @@
<script> <script>
import addressList from '../address/addressList.vue' import addressList from '../address/addressList.vue'
import productMixins from '@/mixins/product.js'
export default { export default {
mixins : [productMixins],
components : { components : {
addressList, addressList,
}, },


+ 15
- 14
pages_order/mine/runningWater.vue View File

@ -3,14 +3,19 @@
<navbar :title="title[status]" leftClick @leftClick="leftClick" /> <navbar :title="title[status]" leftClick @leftClick="leftClick" />
<view class="tab-box"> <view class="tab-box">
<view class="tab-box1" v-if="agentFlow && agentFlow.total">
<uv-cell center border :title="item.title"
v-for="(item, index) in agentFlow.records"
:value="x[item.type] + item.money" :label="item.createTime" />
<view class="tab-box1">
<uv-cell
center
border
:title="item.title"
v-for="(item, index) in list"
:value="x[item.type] + item.intger"
:label="item.createTime" />
</view> </view>
<view <view
style="padding: 100rpx 0;" style="padding: 100rpx 0;"
v-else>
v-if="list.length == 0">
<uv-empty <uv-empty
mode="history" mode="history"
textSize="28rpx" textSize="28rpx"
@ -22,10 +27,13 @@
</template> </template>
<script> <script>
import mixinsList from '@/mixins/list.js'
export default { export default {
mixins: [mixinsList],
data() { data() {
return { return {
title : ['余额记录','提现记录','佣金记录'],
mixinsListApi : 'getWalletFlow',
title : ['余额记录','积分记录'],
agentFlow : { agentFlow : {
total : 0, total : 0,
records : [ records : [
@ -55,19 +63,12 @@
}, },
onLoad(e) { onLoad(e) {
this.status = e.status this.status = e.status
this.mixinsListApi = ['getWalletFlow', 'getPointsFlow'][e.status]
}, },
methods: { methods: {
leftClick() { // leftClick() { //
uni.navigateBack(-1) uni.navigateBack(-1)
}, },
getAgentFlow(){ //
let type = this.status;
this.$api('getAgentFlow', { type }, res => {
if(res.code == 200){
this.agentFlow = res.result
}
})
},
} }
} }
</script> </script>


+ 5
- 3
pages_order/product/productDetail.vue View File

@ -50,13 +50,14 @@
</view> --> </view> -->
</view> </view>
<!-- <view class="info-unit">
<view class="info-unit">
<uv-cell> <uv-cell>
<template #icon> <template #icon>
<text>上门取件·送货上门</text>
<text>{{ detail.nameSub }}</text>
<!-- <text>上门取件·送货上门</text> -->
</template> </template>
</uv-cell> </uv-cell>
</view> -->
</view>
<view class="content"> <view class="content">
<view class="title"> <view class="title">
@ -74,6 +75,7 @@
<!-- 分享和租赁按钮 --> <!-- 分享和租赁按钮 -->
<submit <submit
:detail="detail"
@submit="handleSubmit" @submit="handleSubmit"
@share="share"/> @share="share"/>


+ 44
- 1
pages_order/work/addWork.vue View File

@ -50,6 +50,13 @@
</view> </view>
</view> --> </view> -->
<view class="form-sheet-cell">
<view class="label">
招聘公司
</view>
<input placeholder="请输入招聘公司" v-model="form.company" />
</view>
<view class="form-sheet-cell"> <view class="form-sheet-cell">
<view class="label"> <view class="label">
薪资范围 薪资范围
@ -111,6 +118,15 @@
<input placeholder="请输入联系人" v-model="form.userName" /> <input placeholder="请输入联系人" v-model="form.userName" />
</view> --> </view> -->
<view class="form-sheet-cell">
<view class="label">
联系人
</view>
<input placeholder="请输入联系人" v-model="form.userName" />
</view>
<view class="form-sheet-cell"> <view class="form-sheet-cell">
<view class="label"> <view class="label">
联系电话 联系电话
@ -134,6 +150,15 @@
</view> </view>
</view> </view>
<view class=""
style="margin-top: 20rpx;">
<uv-textarea
v-model="form.jobContext"
count
:maxlength="300"
autoHeight
placeholder="请输入职位描述"></uv-textarea>
</view>
<view class="" <view class=""
style="margin-top: 20rpx;"> style="margin-top: 20rpx;">
@ -155,6 +180,17 @@
placeholder="请输入岗位详细介绍"></uv-textarea> placeholder="请输入岗位详细介绍"></uv-textarea>
</view> </view>
<view class=""
style="margin-top: 20rpx;">
<uv-textarea
v-model="form.gsContext"
count
:maxlength="300"
autoHeight
placeholder="请输入公司介绍"></uv-textarea>
</view>
<view class="uni-color-btn" <view class="uni-color-btn"
@click="submit"> @click="submit">
发布 发布
@ -181,6 +217,9 @@
maxPrice : '', maxPrice : '',
address : '', address : '',
addId : '', addId : '',
company : '',
gsContext : '',
jobContext : '',
}, },
radiovalue : '', radiovalue : '',
priceList : [ priceList : [
@ -262,11 +301,15 @@
title: '请输入招工标题', title: '请输入招工标题',
address : '请选择工作地点', address : '请选择工作地点',
workYear : '请选择工龄要求', workYear : '请选择工龄要求',
company : '请输入招聘公司',
minPrice : '请输入薪资范围', minPrice : '请输入薪资范围',
iconText: '请输入标签', iconText: '请输入标签',
userName: '请输入联系人',
userPhone: '请输入联系电话', userPhone: '请输入联系电话',
school : '请选择岗位要求',
jobContext : '请输入职位描述',
school : '请输入岗位要求',
jobDetails: '请输入岗位详细介绍', jobDetails: '请输入岗位详细介绍',
gsContext : '请输入公司介绍',
})) { })) {
return return
} }


+ 1
- 1
uni_modules/uv-notice-bar/components/uv-column-notice/props.js View File

@ -28,7 +28,7 @@ export default {
// 字体大小,单位px // 字体大小,单位px
fontSize: { fontSize: {
type: [String, Number], type: [String, Number],
default: 14
default: 28
}, },
// 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度 // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
speed: { speed: {


+ 1
- 1
uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue View File

@ -11,7 +11,7 @@
<uv-icon <uv-icon
:name="icon" :name="icon"
:color="color" :color="color"
size="19"
size="40rpx"
></uv-icon> ></uv-icon>
</view> </view>
</slot> </slot>


+ 1
- 1
uni_modules/uv-notice-bar/components/uv-notice-bar/props.js View File

@ -43,7 +43,7 @@ export default {
// 字体大小 // 字体大小
fontSize: { fontSize: {
type: [String, Number], type: [String, Number],
default: 14
default: 28
}, },
// 滚动一个周期的时间长,单位ms // 滚动一个周期的时间长,单位ms
duration: { duration: {


+ 1
- 1
uni_modules/uv-notice-bar/components/uv-row-notice/props.js View File

@ -28,7 +28,7 @@ export default {
// 字体大小,单位px // 字体大小,单位px
fontSize: { fontSize: {
type: [String, Number], type: [String, Number],
default: 14
default: 28
}, },
// 水平滚动时的滚动速度,即每秒滚动多少px(rpx),这有利于控制文字无论多少时,都能有一个恒定的速度 // 水平滚动时的滚动速度,即每秒滚动多少px(rpx),这有利于控制文字无论多少时,都能有一个恒定的速度
speed: { speed: {


+ 1
- 1
uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue View File

@ -11,7 +11,7 @@
<uv-icon <uv-icon
:name="icon" :name="icon"
:color="color" :color="color"
size="19"
size="40rpx"
></uv-icon> ></uv-icon>
</view> </view>
</slot> </slot>


+ 27
- 0
utils/index.js View File

@ -44,4 +44,31 @@ Vue.prototype.openLocation = (latitude, longitude) => {
latitude : Number(latitude), latitude : Number(latitude),
longitude : Number(longitude), 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:"支付失败"
})
}
});
})
} }

Loading…
Cancel
Save