Browse Source

🐛 页面

zh
Loki 3 years ago
parent
commit
137adad680
  1. 1
      .gitignore
  2. 55
      common/notifyMsg.js
  3. 2
      pages/activity/index.vue
  4. 52
      pages/index/addShop.vue
  5. 46
      pages/index/addTask.vue
  6. 55
      pages/index/shopIndex.vue
  7. 2
      pages/member/chongzhi.vue
  8. 2
      pages/my/index.vue
  9. 2
      pages/my/ranking.vue
  10. 2
      pages/my/toExamine.vue
  11. 53
      pages/my/withdrawal.vue
  12. 4
      pages/public/login.vue
  13. 2
      pages/public/mobile.vue

1
.gitignore vendored

@ -1,2 +1,3 @@
.idea
unpackage
node_modules

55
common/notifyMsg.js

@ -0,0 +1,55 @@
export default {
openMsg(){
var that = this
return console.log("test...");
wx.getSetting({
withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
success(ret) {
// console.log(ret,'------------------')
// console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
// if (JSON.stringify(ret.subscriptionsSetting.itemSettings).indexOf('accept')!=-1) {
if (ret.subscriptionsSetting.itemSettings) {
uni.setStorageSync('sendtaskMsg', true)
uni.openSetting({ // 打开设置页
success(rea) {
console.log(rea.authSetting)
}
});
} else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
uni.setStorageSync('sendtaskMsg', false)
uni.showModal({
title: '提示',
content: '为了更好的体验,请绑定消息推送',
confirmText: '确定',
cancelText: '取消',
success: function(res) {
if (res.confirm) {
uni.requestSubscribeMessage({
tmplIds: that.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
that.showModal = false
} else if (res.cancel) {
that.showModal = true
}
}
})
}
}
})
}
}

2
pages/activity/index.vue

@ -50,7 +50,7 @@
},
data() {
return {
merchantLogo: '../../static/img/logo.jpg',
merchantLogo: 'https://download.cyjyyjy.com/fq-logo.jpg',
colors: '#FF4701',
title: '暂无店铺',
merchantId: 0,

52
pages/index/addShop.vue

@ -65,6 +65,7 @@
<script>
import shmilyDragImage from '@/components/shmily-drag-image/shmily-drag-image.vue'
import notifyMsg from "@/common/notifyMsg.js"
var QQMapWX = require('@/js_sdk/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js');
var qqmapsdk;
export default {
@ -167,65 +168,18 @@
this.getUserInfo(userId);
//
if (this.showModal) {
this.openMsg()
notifyMsg.openMsg();
}
}
},
methods: {
//
openMsg() {
var that = this
wx.getSetting({
withSubscriptions: true, //false
success(ret) {
// console.log(ret,'------------------')
// console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
// if (JSON.stringify(ret.subscriptionsSetting.itemSettings).indexOf('accept')!=-1) {
if (ret.subscriptionsSetting.itemSettings) {
uni.setStorageSync('sendshopMsg', true)
uni.openSetting({ //
success(rea) {
console.log(rea.authSetting)
}
});
} else { //
uni.setStorageSync('sendshopMsg', false)
uni.showModal({
title: '提示',
content: '为了更好的体验,请绑定消息推送',
confirmText: '确定',
cancelText: '取消',
success: function(res) {
if (res.confirm) {
uni.requestSubscribeMessage({
tmplIds: that.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
that.showModal = false
} else if (res.cancel) {
that.showModal = true
}
}
})
}
}
})
},
getUserInfo(userId) {
this.$Request.postT("/app/selectUserById?userId=" + userId).then(res => {
if (res.code === 0) {
this.myphone = res.data.phone;
this.$queue.setData("avatar", res.data.imageUrl ? res.data.imageUrl :
'/static/img/logo.jpg');
'https://download.cyjyyjy.com/fq-logo.jpg');
this.$queue.setData("nickName", res.data.nickName ? res.data.nickName : res.data.phone);
this.$queue.setData("mobile", res.data.phone);
this.$queue.setData("invitationCode", res.data.invitationCode);

46
pages/index/addTask.vue

@ -243,51 +243,7 @@
methods: {
//
openMsg() {
var that = this
wx.getSetting({
withSubscriptions: true, //false
success(ret) {
// console.log(ret,'------------------')
// console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
// if (JSON.stringify(ret.subscriptionsSetting.itemSettings).indexOf('accept')!=-1) {
if (ret.subscriptionsSetting.itemSettings) {
uni.setStorageSync('sendtaskMsg', true)
uni.openSetting({ //
success(rea) {
console.log(rea.authSetting)
}
});
} else { //
uni.setStorageSync('sendtaskMsg', false)
uni.showModal({
title: '提示',
content: '为了更好的体验,请绑定消息推送',
confirmText: '确定',
cancelText: '取消',
success: function(res) {
if (res.confirm) {
uni.requestSubscribeMessage({
tmplIds: that.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
that.showModal = false
} else if (res.cancel) {
that.showModal = true
}
}
})
}
}
})
},
checkMerchant() {
let userId = this.$queue.getData('userId');

55
pages/index/shopIndex.vue

@ -118,6 +118,7 @@
<script>
import RenDropdownFilter from '@/components/ren-dropdown-filter/ren-dropdown-filter.vue'
import wPicker from "@/components/w-picker/w-picker.vue";
import notifyMsg from "@/common/notifyMsg.js"
export default {
components: {
wPicker,
@ -251,61 +252,13 @@
if (userId) {
this.getShopList(userId);
//
// if (this.showModal) {
// this.openMsg()
// }
if (this.showModal) {
notifyMsg.openMsg();
}
}
this.getBannerList();
},
methods: {
//
openMsg() {
var that = this
wx.getSetting({
withSubscriptions: true, //false
success(ret) {
// console.log(ret,'------------------')
// console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
// if (JSON.stringify(ret.subscriptionsSetting.itemSettings).indexOf('accept')!=-1) {
if (ret.subscriptionsSetting.itemSettings) {
uni.setStorageSync('sendindexMsg', true)
uni.openSetting({ //
success(rea) {
console.log(rea.authSetting)
}
});
} else { //
uni.setStorageSync('sendindexMsg', false)
uni.showModal({
title: '提示',
content: '为了更好的体验,请绑定消息推送',
confirmText: '确定',
cancelText: '取消',
success: function(res) {
if (res.confirm) {
uni.requestSubscribeMessage({
tmplIds: that.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
that.showModal = false
} else if (res.cancel) {
that.showModal = true
}
}
})
}
}
})
},
getBannerList() {
this.$Request.getT('/banner/selectBannerList?state=-1&classify=7').then(res => {
if (res.code === 0) {

2
pages/member/chongzhi.vue

@ -81,7 +81,7 @@
if (avatar && avatar !== 'undefined') {
this.avatar = avatar;
} else {
this.avatar = '/static/img/logo.jpg';
this.avatar = 'https://download.cyjyyjy.com/fq-logo.jpg';
}
let nickName = this.$queue.getData('nickName');
if (nickName && nickName !== 'undefined') {

2
pages/my/index.vue

@ -314,7 +314,7 @@
this.sex = res.data.sex;
this.phone = res.data.phone;
this.$queue.setData("avatar", res.data.imageUrl ? res.data.imageUrl :
'/static/img/logo.jpg');
'https://download.cyjyyjy.com/fq-logo.jpg');
this.$queue.setData("nickName", res.data.nickName ? res.data.nickName : res.data.phone);
this.$queue.setData("mobile", res.data.phone);
this.$queue.setData("invitationCode", res.data.invitationCode);

2
pages/my/ranking.vue

@ -43,7 +43,7 @@
data() {
return {
rankingList: [],
imageUrl: '/static/img/logo.jpg',
imageUrl: 'https://download.cyjyyjy.com/fq-logo.jpg',
money: 0,
page: 1,
limit: 20,

2
pages/my/toExamine.vue

@ -57,7 +57,7 @@
data() {
return {
colors: '#FF4701',
merchantLogo: '../../static/img/logo.jpg',
merchantLogo: 'https://download.cyjyyjy.com/fq-logo.jpg',
merchantId: 0,
startDate: 0,
endDate: 0,

53
pages/my/withdrawal.vue

@ -44,6 +44,7 @@
</template>
<script>
import notifyMsg from "@/common/notifyMsg.js"
export default {
data() {
return {
@ -92,60 +93,12 @@
this.zhifubaoName = this.$queue.getData("zhifubaoName");
//
if (this.showModal) {
this.openMsg()
notifyMsg.openMsg();
}
}
this.getasdas();
},
methods: {
//
openMsg() {
var that = this
wx.getSetting({
withSubscriptions: true, //false
success(ret) {
// console.log(ret,'------------------')
// console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
// if (JSON.stringify(ret.subscriptionsSetting.itemSettings).indexOf('accept')!=-1) {
if (ret.subscriptionsSetting.itemSettings) {
uni.setStorageSync('sendjifenMsg', true)
uni.openSetting({ //
success(rea) {
console.log(rea.authSetting)
}
});
} else { //
uni.setStorageSync('sendjifenMsg', false)
uni.showModal({
title: '提示',
content: '为了更好的体验,请绑定消息推送',
confirmText: '确定',
cancelText: '取消',
success: function(res) {
if (res.confirm) {
uni.requestSubscribeMessage({
tmplIds: that.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
that.showModal = false
} else if (res.cancel) {
that.showModal = true
}
}
})
}
}
})
},
typeSelect(type) {
if (uni.getStorageSync('sendjifenMsg')) {
uni.requestSubscribeMessage({
@ -173,7 +126,7 @@
this.$Request.postT("/app/selectUserById?userId=" + userId).then(res => {
if (res.code === 0) {
this.$queue.setData("avatar", res.data.imageUrl ? res.data.imageUrl :
'/static/img/logo.jpg');
'https://download.cyjyyjy.com/fq-logo.jpg');
this.$queue.setData("nickName", res.data.nickName ? res.data.nickName : res.data.phone);
this.$queue.setData("mobile", res.data.phone);
this.$queue.setData("invitationCode", res.data.invitationCode);

4
pages/public/login.vue

@ -140,7 +140,7 @@
that.$queue.setData('userId', res.user.userId);
that.$queue.setData("avatar", res.user.imageUrl ? res.user.imageUrl :
'/static/img/logo.jpg');
'https://download.cyjyyjy.com/fq-logo.jpg');
that.$queue.setData("nickName", res.user.nickName ? res.user.nickName : res.user.phone);
that.$queue.setData("mobile", res.user.phone);
that.$queue.setData("invitationCode", res.user.invitationCode);
@ -266,7 +266,7 @@
this.$Request.postT('/app/selectUserById?userId=' + userId).then(res => {
if (res.code === 0) {
this.$queue.setData('avatar', res.data.imageUrl ? res.data.imageUrl :
'/static/img/logo.jpg');
'https://download.cyjyyjy.com/fq-logo.jpg');
this.$queue.setData('nickName', res.data.nickName ? res.data.nickName : res.data.phone);
this.$queue.setData('mobile', res.data.phone);
this.$queue.setData('invitationCode', res.data.invitationCode);

2
pages/public/mobile.vue

@ -1,7 +1,7 @@
<template>
<view class="container">
<view style="display: flex;margin: 40upx;">
<image src="../../static/img/logo.jpg" mode="aspectFit" style="width: 140upx;height: 140upx;border-radius: 16upx;"></image>
<image src="https://download.cyjyyjy.com/fq-logo.jpg" mode="aspectFit" style="width: 140upx;height: 140upx;border-radius: 16upx;"></image>
<view style="margin-left: 32upx;">
<view style="color: #e10a07;font-size: 32upx;">实名提醒</view>
<view style="margin-right: 120upx;font-size: 28upx;color: #999999;margin-top: 16upx;">应国家法律要求全面实行实名制须绑定手机完成认证</view>

Loading…
Cancel
Save