#2 feat: bug修复;

Merged
Fox merged 1 commits from fox into master 2 weeks ago
  1. +4
    -0
      api/model/sharing.js
  2. +6
    -1
      pages_order/auth/wxUserInfo.vue
  3. +2
    -2
      pages_order/components/formNumberBox.vue
  4. +0
    -1
      pages_order/mine/service.vue
  5. +12
    -2
      pages_order/record/articleSharing.vue
  6. +15
    -5
      pages_order/record/groupSharing.vue
  7. +12
    -4
      pages_order/record/personalSharing.vue
  8. +21
    -4
      pages_order/record/videoSharing.vue
  9. +18
    -7
      pages_order/sharing/article.vue
  10. +19
    -8
      pages_order/sharing/group.vue
  11. +19
    -13
      pages_order/sharing/personal.vue
  12. +14
    -5
      pages_order/sharing/video.vue
  13. +8
    -1
      store/store.js

+ 4
- 0
api/model/sharing.js View File

@ -6,6 +6,7 @@ const api = {
url: '/fen/getShareInfo',
method: 'GET',
auth: true,
debounce: 500,
},
/**
* 删除分享记录
@ -34,6 +35,7 @@ const api = {
url: '/fen/getVideoShareInfo',
method: 'GET',
auth: true,
debounce: 500,
},
/**
* 增加或者修改视频分享
@ -52,6 +54,7 @@ const api = {
url: '/fen/getGroupShareInfo',
method: 'GET',
auth: true,
debounce: 500,
},
/**
* 增加或者修改群分享
@ -70,6 +73,7 @@ const api = {
url: '/fen/getArticleShareInfo',
method: 'GET',
auth: true,
debounce: 500,
},
/**
* 增加或者修改文章分享


+ 6
- 1
pages_order/auth/wxUserInfo.vue View File

@ -157,10 +157,15 @@
wxCode : self.userInfoForm.wxCode,
}, res => {
if (res.code == 200) {
uni.navigateBack({
delta: 2,
fail: () => {
uni.reLaunch({
url:'/pages/index/index'
url: '/pages/index/index'
})
}
});
}
})
})


+ 2
- 2
pages_order/components/formNumberBox.vue View File

@ -3,7 +3,7 @@
<uv-number-box
:value="value"
@input="$emit('input', $event)"
:min="1"
:min="min"
integer
:inputWidth="inputWidth"
button-size="60rpx"
@ -22,7 +22,7 @@
},
min: {
type: Number,
default: 1,
default: 0,
},
inputWidth: {
default: '50rpx'


+ 0
- 1
pages_order/mine/service.vue View File

@ -2,7 +2,6 @@
<view class="page" :style="bgStyle">
<navbar title="客服" leftClick @leftClick="$utils.navigateBack" />
<!-- todo -->
<image class="qr" :src="configList.index_huodong" :show-menu-by-longpress="true"></image>
</view>


+ 12
- 2
pages_order/record/articleSharing.vue View File

@ -138,7 +138,7 @@
userId: null,
headImage: null,
headTitle: null,
num: 10,
num: 0,
wxCodeImage: null,
textDetails: null,
},
@ -164,6 +164,9 @@
this.fetchDetails(id)
},
onReady() {
this.$refs.form.setRules(this.getRules());
},
onShareAppMessage(res) {
const {
headTitle,
@ -262,7 +265,14 @@
'num': {
type: 'number',
required: true,
message: '请设置转发次数',
message: '请设置转发次数(大于1)',
validator: (rule, value, callback) => {
if (value > 1) {
return true
}
return false;
},
},
'wxCodeImage': {
type: 'string',


+ 15
- 5
pages_order/record/groupSharing.vue View File

@ -76,14 +76,14 @@
<view class="form-item">
<uv-form-item label="群人数(人)" prop="memberNum">
<view class="form-item-content">
<formNumberBox v-model="form.memberNum" :min="3"></formNumberBox>
<formNumberBox v-model="form.memberNum" :min="3" inputWidth="80rpx"></formNumberBox>
</view>
</uv-form-item>
</view>
<view class="form-item">
<uv-form-item label="设置转发次数(次)" prop="num">
<view class="form-item-content">
<formNumberBox v-model="form.num"></formNumberBox>
<formNumberBox v-model="form.num" inputWidth="80rpx"></formNumberBox>
</view>
</uv-form-item>
</view>
@ -144,8 +144,8 @@
headImage: null,
headTitle: null,
indexImage: null,
memberNum: 200,
num: 10,
memberNum: 50,
num: 0,
wxCodeImage: null,
},
rules: {
@ -172,7 +172,14 @@
'num': {
type: 'number',
required: true,
message: '请设置转发次数',
message: '请设置转发次数(大于1)',
validator: (rule, value, callback) => {
if (value > 1) {
return true
}
return false;
},
},
'wxCodeImage': {
type: 'string',
@ -200,6 +207,9 @@
this.fetchDetails(id)
},
onReady() {
this.$refs.form.setRules(this.rules);
},
onShareAppMessage(res) {
const {
headTitle,


+ 12
- 4
pages_order/record/personalSharing.vue View File

@ -147,7 +147,7 @@
headImage: null,
headTitle: null,
indexImage: null,
num: 10,
num: 0,
wxCodeImage: null,
textDetails: null,
},
@ -170,7 +170,14 @@
'num': {
type: 'number',
required: true,
message: '请设置转发次数',
message: '请设置转发次数(大于1)',
validator: (rule, value, callback) => {
if (value > 1) {
return true
}
return false;
},
},
'wxCodeImage': {
type: 'string',
@ -206,6 +213,9 @@
this.fetchDetails(id)
},
onReady() {
this.$refs.form.setRules(this.rules);
},
onShareAppMessage(res) {
const {
headTitle,
@ -218,8 +228,6 @@
path: `/pages_order/sharing/personal?id=${this.id}&state=0&shareId=${this.userInfo.id}`
}
// todo: get times and check is unlocked
this.isLocked = false
return o


+ 21
- 4
pages_order/record/videoSharing.vue View File

@ -141,8 +141,8 @@
headTitle: null,
indexImage: null,
vio: null,
timeNum: 10,
num: 10,
timeNum: 0,
num: 0,
wxCodeImage: null,
textDetails: null,
},
@ -165,12 +165,26 @@
'timeNum': {
type: 'number',
required: true,
message: '请设置广告弹出时间',
message: '请设置广告弹出时间(大于1)',
validator: (rule, value, callback) => {
if (value > 1) {
return true
}
return false;
},
},
'num': {
type: 'number',
required: true,
message: '请设置转发次数',
message: '请设置转发次数(大于1)',
validator: (rule, value, callback) => {
if (value > 1) {
return true
}
return false;
},
},
'wxCodeImage': {
type: 'string',
@ -199,6 +213,9 @@
this.fetchDetails(id)
},
onReady() {
this.$refs.form.setRules(this.rules);
},
onShareAppMessage(res) {
const {
headTitle,


+ 18
- 7
pages_order/sharing/article.vue View File

@ -47,7 +47,7 @@
userId: null,
headImage: null,
headTitle: null,
num: 10,
num: 0,
wxCodeImage: null,
textDetails: null,
},
@ -57,6 +57,11 @@
computed: {
...mapState(['userInfo']),
},
onShow() {
if (this.id && uni.getStorageSync('token')) {
this.initData()
}
},
async onLoad(option) {
const { id, state, shareId } = option
@ -74,10 +79,12 @@
this.id = id
if(uni.getStorageSync('token')){
if (uni.getStorageSync('token')) {
this.initData()
}else{
this.$refs.loginPopup.open()
} else {
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
}
},
@ -126,9 +133,9 @@
await this.fetchDetails(this.id)
this.initEditor(this.detail.textDetails)
},
async fetchCheckShare(id) {
async fetchCheckShare() {
try {
return await this.$fetch('checkArticleShare', { id })
return await this.$fetch('checkArticleShare', { id: this.id })
} catch (err) {
return {}
}
@ -157,12 +164,16 @@
}
const result = await this.fetchCheckShare()
const { open } = result
const { open, need_num, num } = result
if (open) { //
this.isLocked = false
this.$refs.popupQrCode.open()
} else {
uni.showToast({
title: `还需转发${need_num - num}`,
icon: 'none',
})
this.$refs.popupUnlock.open();
}
},


+ 19
- 8
pages_order/sharing/group.vue View File

@ -41,7 +41,7 @@
avatarUrl: null,
nickName: null,
imageUrl: null,
times: 10,
times: 0,
qrCode: null,
description: null,
},
@ -51,6 +51,11 @@
computed: {
...mapState(['userInfo']),
},
onShow() {
if (this.id && uni.getStorageSync('token')) {
this.fetchDetails()
}
},
onLoad(option) {
const { id, state, shareId } = option
@ -68,10 +73,12 @@
this.id = id
if(uni.getStorageSync('token')){
if (uni.getStorageSync('token')) {
this.fetchDetails()
}else{
this.$refs.loginPopup.open()
} else {
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
}
},
onShareAppMessage(res) {
@ -99,9 +106,9 @@
}
},
async fetchCheckShare(id) {
async fetchCheckShare() {
try {
return await this.$fetch('checkGroupShare', { id })
return await this.$fetch('checkGroupShare', { id: this.id })
} catch (err) {
return {}
}
@ -128,14 +135,18 @@
async onAdd() {
const result = await this.fetchCheckShare()
const { open } = result
const { open, need_num, num } = result
// todo: check
if (open) { //
this.isLocked = false
return
}
uni.showToast({
title: `还需转发${need_num - num}`,
icon: 'none',
})
this.openPopup()
}
},


+ 19
- 13
pages_order/sharing/personal.vue View File

@ -14,8 +14,6 @@
</template>
</view>
<loginPopup ref="loginPopup" @login="fetchDetails"/>
<popupUnlock ref="popupUnlock" src="../static/sharing/unlock-user.png"></popupUnlock>
</view>
@ -23,12 +21,10 @@
<script>
import { mapState } from 'vuex'
import loginPopup from '@/components/config/loginPopup.vue'
import popupUnlock from '../components/popupUnlock.vue'
export default {
components: {
loginPopup,
popupUnlock,
},
data() {
@ -40,7 +36,7 @@
headImage: null,
headTitle: null,
indexImage: null,
num: 10,
num: 0,
wxCodeImage: null,
textDetails: null,
},
@ -50,6 +46,11 @@
computed: {
...mapState(['userInfo']),
},
onShow() {
if (this.id && uni.getStorageSync('token')) {
this.fetchDetails()
}
},
onLoad(option) {
const { id, state, shareId } = option
@ -67,12 +68,13 @@
this.id = id
if(uni.getStorageSync('token')){
if (uni.getStorageSync('token')) {
this.fetchDetails()
}else{
this.$refs.loginPopup.open()
} else {
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
}
},
onShareAppMessage(res) {
const {
@ -98,9 +100,9 @@
}
},
async fetchCheckShare(id) {
async fetchCheckShare() {
try {
return await this.$fetch('checkShare', { id })
return await this.$fetch('checkShare', { id: this.id })
} catch (err) {
return {}
}
@ -126,14 +128,18 @@
},
async onAdd() {
const result = await this.fetchCheckShare()
const { open } = result
const { open, need_num, num } = result
// todo: check
if (open) { //
this.isLocked = false
return
}
uni.showToast({
title: `还需转发${need_num - num}`,
icon: 'none',
})
this.openPopup()
}
},


+ 14
- 5
pages_order/sharing/video.vue View File

@ -48,8 +48,8 @@
headTitle: null,
indexImage: null,
vio: null,
timeNum: 10,
num: 10,
timeNum: 0,
num: 0,
wxCodeImage: null,
textDetails: null,
},
@ -61,6 +61,11 @@
computed: {
...mapState(['userInfo']),
},
onShow() {
if (this.id && uni.getStorageSync('token')) {
this.initData()
}
},
async onLoad(option) {
const { id, state, shareId } = option
@ -115,9 +120,9 @@
this.videoContext = uni.createVideoContext('video');
},
async fetchCheckShare(id) {
async fetchCheckShare() {
try {
return await this.$fetch('checkVideoShare', { id })
return await this.$fetch('checkVideoShare', { id: this.id })
} catch (err) {
return {}
}
@ -145,12 +150,16 @@
}
const result = await this.fetchCheckShare()
const { open } = result
const { open, need_num, num } = result
if (open) { //
this.isLocked = false
this.$refs.popupQrCode.open()
} else {
uni.showToast({
title: `还需转发${need_num - num}`,
icon: 'none',
})
this.$refs.popupUnlock.open();
}
},


+ 8
- 1
store/store.js View File

@ -88,7 +88,14 @@ const store = new Vuex.Store({
url: '/pages_order/auth/wxUserInfo'
})
}else{
uni.navigateBack(-1)
uni.navigateBack({
delta: 1,
fail: () => {
uni.reLaunch({
url: '/pages/index/index'
})
}
});
}
})
}


Loading…
Cancel
Save