bug修复

This commit is contained in:
zmj 2024-04-30 18:56:28 +08:00
parent a0592d25ca
commit d7900f8eb1
11 changed files with 357 additions and 374 deletions

View File

@ -132,7 +132,6 @@
let title = result.title let title = result.title
let content = result.content let content = result.content
let extras = result.extras.type let extras = result.extras.type
if (result.extras.type == 'ORDER_CREATE' && result.extras.mp3.length > 0) { if (result.extras.type == 'ORDER_CREATE' && result.extras.mp3.length > 0) {
if (result.extras.mp3[0] == '微信') this.audioTeam.push('/static/audio/wechat.MP3') if (result.extras.mp3[0] == '微信') this.audioTeam.push('/static/audio/wechat.MP3')
if (result.extras.mp3[0] == '支付宝') this.audioTeam.push('/static/audio/pay.MP3') if (result.extras.mp3[0] == '支付宝') this.audioTeam.push('/static/audio/pay.MP3')
@ -167,17 +166,14 @@
if (notificationEventType == 'notificationOpened') { if (notificationEventType == 'notificationOpened') {
if (result.extras.type == 2) { if (result.extras.type == 2) {
let data = result.extras.group_data let data = result.extras.group_data
data.route = result.extras.route
data.type = 2 data.type = 2
uniMP.loadAppletMP(data) uniMP.loadAppletMP(data)
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: result.extras.route url: result.extras.route
}) })
} }
} }
}) })

View File

@ -28,6 +28,11 @@ export function getProductParmas(id, data) {
noAuth: true noAuth: true
}); });
} }
export function getUnimpInfo() {
return request.get('intention/publish');
}
/** /**
* 获取店铺推荐商品 * 获取店铺推荐商品
* @param int id * @param int id

View File

@ -2,7 +2,7 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "2.0.60", "versionName" : "2.0.44",
"versionCode" : 2037, "versionCode" : 2037,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */

View File

@ -302,15 +302,24 @@
}, },
onShow() { onShow() {
let that = this
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (Boolean(this.$store.state.app.userInfo.service?.mer_id)) { if (Boolean(this.userInfo.service?.mer_id)) {
isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id).then(res => { isNewMer(this.userInfo.uid, this.userInfo.service?.mer_id).then(
console.log('resdata', res.data) res => {
if (res.data == 'true' && this.elInfo) { if (res.data == 'true') {
this.initMenu(true)
this.subNvue = uni.getSubNVueById('concat') setTimeout(() => {
this.subNvue.show('slide-in-left', 300) const query = uni.createSelectorQuery().in(this);
// this.openDiver() query
.select(".gatherDiver")
.boundingClientRect((data) => {
let info = JSON.stringify(data)
that.elInfo = data
that.openDiver()
})
.exec();
}, 500)
} }
}) })
} }
@ -335,43 +344,7 @@
beforeDestroy() {}, beforeDestroy() {},
onReady() { onReady() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
let that = this
if (Boolean(this.$store.state.app.userInfo.service?.mer_id)) {
this.initMenu(true)
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query
.select(".gatherDiver")
.boundingClientRect((data) => {
let info = JSON.stringify(data)
that.elInfo = data
that.openDiver()
})
.exec();
}, 1000)
}
// #endif // #endif
// if (uni.getStorageSync('is_new_user')) {
// let that = this
// setTimeout(() => {
// const query = uni.createSelectorQuery().in(this);
// query
// .select(".gatherDiver")
// .boundingClientRect((data) => {
// let info = JSON.stringify(data)
// that.elInfo = data
// // #ifdef APP-PLUS
// that.openDiver()
// // #endif
// })
// .exec();
// }, 1000)
// }
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll(e) { onPageScroll(e) {
@ -393,6 +366,7 @@
}, },
methods: { methods: {
openDiver() { openDiver() {
console.log("open")
this.subNVue.show('zoom-out', 300) this.subNVue.show('zoom-out', 300)
uni.$emit('diverGatherEmit', this.elInfo); uni.$emit('diverGatherEmit', this.elInfo);
}, },
@ -500,12 +474,14 @@
if (list.find(t => t.name == item.name)?.name != item.name) all.push(item); if (list.find(t => t.name == item.name)?.name != item.name) all.push(item);
else now.push(item) else now.push(item)
}) })
// if() console.log(flag)
if (flag && !now.length) now[0] = all[0]; console.log(now.length)
// console.log(all, now)
this.AllMenuList = all; this.AllMenuList = all;
this.nowMenuList = now; this.nowMenuList = now;
if (flag && !now.length) {
this.nowMenuList[0] = this.AllMenuList[0]
}
} catch (e) { } catch (e) {
this.nowMenuList = []; this.nowMenuList = [];
} }
@ -553,14 +529,6 @@
return; return;
// #endif // #endif
// #ifdef H5 // #ifdef H5
// if (type == 2) {
// this.navigator(`/pages/moreProject/moreProject`);
// } else {
// uni.showToast({
// icon: 'none',
// title: 'H5'
// })
// }
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: 'H5不支持打开小程序' title: 'H5不支持打开小程序'
@ -569,7 +537,6 @@
}, },
navigator(url, t) { navigator(url, t) {
// if (this.userInfoData.is_wsxx === 0 && t != '') return Toast("");
uni.navigateTo({ uni.navigateTo({
url: url url: url
}) })

View File

@ -24,6 +24,9 @@
</template> </template>
<script> <script>
import {
isNewMer
} from '@/api/user.js';
export default { export default {
data() { data() {
return { return {
@ -45,8 +48,13 @@
}, },
jump() { jump() {
uni.setStorageSync('is_new_user', false) isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id, {
uni.$emit('diverGatherSubEmit'); done: 1
}).then(res => {
console.log(res, 'res')
// uni.$emit('diverGatherSubEmit');
})
// uni.setStorageSync('is_new_user', false)
} }
}, },
onLoad() { onLoad() {

View File

@ -641,46 +641,14 @@
}, },
onShow() { onShow() {
console.log(Boolean(this.$store.state.app.userInfo.service?.mer_id))
let that = this; let that = this;
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (Boolean(uni.getStorageSync('is_new_user'))) { if (Boolean(uni.getStorageSync('is_new_user'))) {
this.subNvue = uni.getSubNVueById('newUser') this.subNvue = uni.getSubNVueById('newUser')
this.subNvue.show('slide-in-left', 300) this.subNvue.show('slide-in-left', 300)
} }
if (Boolean(this.$store.state.app.userInfo.service?.mer_id)) {
isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id).then(res => {
console.log('resdata', res.data)
if (res.data == 'true') {
this.subNvue = uni.getSubNVueById('concatIndex')
this.subNvue.show('slide-in-left', 300)
// this.openDiver()
}
})
}
// #endif // #endif
// console.log()
// if (this.$store.state.app.userInfo.service?.mer_id) {
// isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id).then(res => {
// if (res.data == 'true') {
// this.openDiver()
// }
// })
// }
// if (this.$store.state.app.userInfo) {
// console.log(this.$store.state.app.userInfo.service?.mer_id, 'sdsd')
// }
// isNewMer(this.$store)
// if (this.diverFlag && uni.getStorageSync('is_new_user')) {
// setTimeout(() => {
// that.openDiver()
// that.diverFlag = false
// }, 500)
// }
that.isIntegral = uni.getStorageSync('isIntegral') that.isIntegral = uni.getStorageSync('isIntegral')
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (that.appUpdate.openUpgrade == '1') { if (that.appUpdate.openUpgrade == '1') {
@ -727,8 +695,15 @@
methods: { methods: {
openDiver() { openDiver() {
this.subNVue.show('slide-in-left', 300) if (Boolean(this.userInfo.service?.mer_id)) {
// uni.$emit('diverIndexEmit', this.userInfo); isNewMer(this.userInfo.uid, this.userInfo.service?.mer_id).then(
res => {
if (res.data == 'true') {
this.subNvue = uni.getSubNVueById('concatIndex')
this.subNvue.show('slide-in-left', 300)
}
})
}
}, },
loadCoupon() { loadCoupon() {
if (!this.showCoupon && !uni.getStorageSync('show_coupon') && uni.getStorageSync('is_new_user')) { if (!this.showCoupon && !uni.getStorageSync('show_coupon') && uni.getStorageSync('is_new_user')) {
@ -1067,6 +1042,7 @@
showTab(res.data); showTab(res.data);
that.userInfo = res.data; that.userInfo = res.data;
this.$store.commit('SET_USERINFO', res.data); this.$store.commit('SET_USERINFO', res.data);
this.openDiver()
}); });
}, },
// 访 // 访

View File

@ -12,12 +12,19 @@
</view> </view>
<view class="" <view class=""
style="padding:40rpx;margin: 30rpx 0; width: 606rpx;margin-left: 30rpx;border-radius: 16rpx;box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0,0,0,0.16);"> style="padding:40rpx;margin: 30rpx 0; width: 606rpx;margin-left: 30rpx;border-radius: 16rpx;box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0,0,0,0.16);">
<view class="" v-if="item.status==0" style="color: #20B128;font-size: 32rpx;">
待审核
</view>
<view class="" v-if="item.status==1" style="color: #20B128;font-size: 32rpx;"> <view class="" v-if="item.status==1" style="color: #20B128;font-size: 32rpx;">
审核通过 审核通过
</view> </view>
<view class="" v-if="item.status==2" style="color: #FC452F;font-size: 32rpx;"> <view class="" v-if="item.status==2"
style="color: #FC452F;font-size: 32rpx;display: flex;justify-content: space-between;">
审核失败 审核失败
<view style="color: #20B128;" @click="navgo">
重新申请
</view>
</view> </view>
<u-line style="margin: 28rpx 0;"></u-line> <u-line style="margin: 28rpx 0;"></u-line>
<view class="" style="margin-bottom: 20rpx;"> <view class="" style="margin-bottom: 20rpx;">
@ -30,12 +37,8 @@
备注:{{item.fail_msg}} 备注:{{item.fail_msg}}
</view> </view>
</view> </view>
</view> </view>
<view class="application-record" v-if="listData.length"> <view class="application-record" v-if="listData.length">
<!-- <view class="card-list" v-for="item in listData" :key="item.mer_intention_id"> <!-- <view class="card-list" v-for="item in listData" :key="item.mer_intention_id">
<view class="card-top"> <view class="card-top">
@ -121,6 +124,12 @@
this.loading = false this.loading = false
}) })
}, },
navgo() {
// uni.navigateBack()
uni.navigateTo({
url: '/pages/store/settled/index?type=1'
})
},
// //
jump(item) { jump(item) {
console.log(item) console.log(item)

View File

@ -1,18 +1,24 @@
<template> <template>
<view class="content" style="padding-top: var(--status-bar-height);">
<view style="height: 88rpx;">
</view>
<view class="bar" style="padding-top: var(--status-bar-height);">
<i class="iconfont icon-xiangzuo" style="color: black;"></i>
<view class=""> <view class="">
<!-- <view class="bar" style="padding-top: var(--status-bar-height);"> -->
<view class="bar" style="padding-top:var(--status-bar-height) ;">
<view class="" style="height: 30rpx;">
</view>
<view class="" style="display: flex;justify-content: space-between;padding: 0 20rpx;">
<i class="iconfont icon-xiangzuo" style="color: black;" @click="back"></i>
<view class="" style="transform: translateX(50rpx);">
商户入住 商户入住
</view> </view>
<view class="" @click="jumpToList"> <view class="" @click="jumpToList">
申请记录 申请记录
</view> </view>
</view> </view>
</view>
<view class="content" style="padding-top: var(--status-bar-height);">
<view class="" style="height: 80rpx;">
</view>
<view class="heder-tips"> <view class="heder-tips">
简单3步 享开店好礼 {{step}} 简单3步 享开店好礼
</view> </view>
<view class="steps"> <view class="steps">
<view class="steps-li" @click="step=1"> <view class="steps-li" @click="step=1">
@ -55,9 +61,6 @@
</view> </view>
<u--input placeholder="店铺名称" :maxlength='20' style="height: 100rpx;" border="surround" <u--input placeholder="店铺名称" :maxlength='20' style="height: 100rpx;" border="surround"
v-model="formData.mer_name"> v-model="formData.mer_name">
<!-- <template slot="suffix">
{{12}}/20
</template> -->
</u--input> </u--input>
</view> </view>
<view class="card"> <view class="card">
@ -203,10 +206,10 @@
<view class="" style="color: #777;font-size: 24rpx;margin-top: 28rpx;"> <view class="" style="color: #777;font-size: 24rpx;margin-top: 28rpx;">
提交时间{{formData.create_time}} 提交时间{{formData.create_time}}
</view> </view>
<u-line color="#ECECEC" style="margin: 36rpx 0;"></u-line> <u-line color="#ECECEC" style="margin: 36rpx 0;" v-if='formData.status !=0'></u-line>
<view v-if='formData.status==2' class="" <view v-if='formData.status==2' class=""
style="color: #777;font-size: 24rpx;margin-top: 28rpx;margin-bottom: 36rpx;"> style="color: #777;font-size: 24rpx;margin-top: 28rpx;margin-bottom: 36rpx;">
备注阿斯顿撒 备注{{formData.fail_msg}}
</view> </view>
<u-button v-if='formData.status==2' @click="step=1" style="color: #FC452F;" color="#F8E9E7" <u-button v-if='formData.status==2' @click="step=1" style="color: #FC452F;" color="#F8E9E7"
shape="circle" type='error' text="重新申请"></u-button> shape="circle" type='error' text="重新申请"></u-button>
@ -237,8 +240,8 @@
<u-picker cancelColor='#3ABE40' confirmColor='#3ABE40' @cancel='showStoreType=false' @confirm='confirmType' <u-picker cancelColor='#3ABE40' confirmColor='#3ABE40' @cancel='showStoreType=false' @confirm='confirmType'
:show="showStoreType" keyName="type_name" :columns="StoreTypeColumn"> :show="showStoreType" keyName="type_name" :columns="StoreTypeColumn">
</u-picker> </u-picker>
<u-picker cancelColor='#3ABE40' confirmColor='#3ABE40' @cancel='showCompanyType=false' @confirm='confirmCompany' <u-picker cancelColor='#3ABE40' confirmColor='#3ABE40' @cancel='showCompanyType=false'
:show="showCompanyType" :columns="companyColumn" keyName='label'> @confirm='confirmCompany' :show="showCompanyType" :columns="companyColumn" keyName='label'>
</u-picker> </u-picker>
<view class="settlementAgreement" v-if="showProtocol"> <view class="settlementAgreement" v-if="showProtocol">
@ -256,10 +259,18 @@
ref="verify"> ref="verify">
</Verify> </Verify>
</view> </view>
</view>
</template> </template>
<script> <script>
// #ifdef APP
import uniMP from '@/utils/uniMP.js'; import uniMP from '@/utils/uniMP.js';
// #endif
import { import {
configMap configMap
} from "@/utils"; } from "@/utils";
@ -276,7 +287,8 @@
merClassifly, merClassifly,
getStoreTypeApi, getStoreTypeApi,
getIntention, getIntention,
getGoodsDetails getGoodsDetails,
getUnimpInfo
} from '@/api/store.js'; } from '@/api/store.js';
import Verify from '@/components/verify/verify.vue'; import Verify from '@/components/verify/verify.vue';
export default { export default {
@ -316,13 +328,14 @@
}] }]
], ],
text: '获取验证码', text: '获取验证码',
uniMpInfo: "",
formData: { formData: {
"phone": "", "phone": "",
"mer_name": "", "mer_name": "",
"name": "", "name": "",
"code": "1212", "code": "",
"company_name": "", "company_name": "",
"address": "123号", "address": "",
"invitation_code": "", "invitation_code": "",
"social_credit_code": "", "social_credit_code": "",
"merchant_category_id": 0, "merchant_category_id": 0,
@ -349,14 +362,18 @@
}, },
mapGetters(['isLogin', 'viewColor', 'keyColor'])), mapGetters(['isLogin', 'viewColor', 'keyColor'])),
methods: { methods: {
back() {
uni.navigateBack()
},
openApplet() { openApplet() {
// uniMP.loadAppletMP(data) uniMP.loadAppletMP(this.uniMpInfo)
}, },
splitAddress(str) { splitAddress(str) {
var reg = /.+?(省|市|自治区|自治州|县|区|镇|社区|街道|街|村)/g; // if (!str.includes('省')) str = "四川省" + str;
var reg = /.+?(省|市|自治区|自治州|县|区|镇|社区|街道|村)/g; //
let list = str.match(reg) let list = str.match(reg)
console.log(list) console.log(list, 'xiugiahou1de1address')
this.formData.province_name = list[0] this.formData.province_name = list[0]
this.formData.city_name = list[1] this.formData.city_name = list[1]
this.formData.area_name = list[2] this.formData.area_name = list[2]
@ -419,7 +436,6 @@
// that.formData.social_credit_code = res.data.register_number; // that.formData.social_credit_code = res.data.register_number;
that.formData.social_credit_code = this.generateRandomNumbers(1, 10000, 99999)[0]; that.formData.social_credit_code = this.generateRandomNumbers(1, 10000, 99999)[0];
that.formData.company_name = res.data.name; that.formData.company_name = res.data.name;
console.log(that.splitAddress(res.data.address))
} else { } else {
that.$util.Tips({ that.$util.Tips({
title: "识别失败!" title: "识别失败!"
@ -478,10 +494,20 @@
if (!this.checkboxValue1[0]) { if (!this.checkboxValue1[0]) {
return Toast("请勾选用户协议") return Toast("请勾选用户协议")
} }
this.splitAddress(this.formData.address)
this.formData.step = this.step this.formData.step = this.step
create(this.formData).then(res => { create(this.formData).then(res => {
console.log(res.data.mer_intention_id, 'res') console.log(res.data.mer_intention_id, 'res')
this.formData.mer_intention_id = res.data.mer_intention_id this.formData.mer_intention_id = res.data.mer_intention_id
this.formData.status = 0
if (this.step == 2) {
getIntention(this.$store.state.app.userInfo.uid).then(res => {
if (Object.keys(res.data).length == 0) return
this.formData = res.data
this.step = this.formData.step
this.formData.phone = this.$store.state.app.userInfo.account
})
}
this.step++ this.step++
}).catch(err => { }).catch(err => {
console.log(err, 'err') console.log(err, 'err')
@ -494,9 +520,9 @@
}) })
}, },
}, },
onLoad() { onLoad(option) {
this.formData.phone = this.$store.state.app.userInfo.account this.formData.phone = this.$store.state.app.userInfo.account
console.log(this.$store.state.app.userInfo) console.log(option, 'oprionsf')
merClassifly().then(res => { merClassifly().then(res => {
this.MerchantCategoryColumn = [res.data] this.MerchantCategoryColumn = [res.data]
}) })
@ -508,10 +534,14 @@
this.formData = res.data this.formData = res.data
this.step = this.formData.step this.step = this.formData.step
this.formData.phone = this.$store.state.app.userInfo.account this.formData.phone = this.$store.state.app.userInfo.account
// if (this.formData.step == 3) { if (option.type == 1) {
// getGoodsDetails(this.$store.state.app.userInfo.uid) this.step = 1
// } }
if (this.formData.status == 1) {
getUnimpInfo().then(res => {
this.uniMpInfo = res.data
})
}
}) })
} }
} }
@ -567,7 +597,7 @@
border: 1px solid #F3F3F3; border: 1px solid #F3F3F3;
border-radius: 16rpx; border-radius: 16rpx;
font-family: PFR; font-family: PFR;
color: #777777; // color: #777777;
.card-cont-li { .card-cont-li {
display: flex; display: flex;
@ -722,22 +752,15 @@
background-color: #bbb; background-color: #bbb;
color: #fff; color: #fff;
border-color: #bbb; border-color: #bbb;
height: 50rpx;
} }
.bar { .bar {
position: fixed; position: fixed;
// height: 88rpx;
background-color: #fff;
display: flex;
z-index: 99;
justify-content: space-between;
width: 750rpx; width: 750rpx;
box-sizing: border-box; box-sizing: border-box;
top: 0; background-color: white;
padding-right: 50rpx; z-index: 999;
padding-left: 10rpx;
padding-bottom: 30rpx;
// padding
} }
</style> </style>

View File

@ -48,9 +48,9 @@
</view> </view>
<view class="item"> <view class="item">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<image src="/static/images/code_2.png"></image> <image @click="type1=!type1" src="/static/images/eye.png"></image>
<input type="password" placeholder="填写登录密码" placeholder-class="placeholder" <input :type="type1?'password':'input'" placeholder="填写登录密码"
v-model="password" required /> placeholder-class="placeholder" v-model="password" required />
<button class="code" @click="formItem=2"> <button class="code" @click="formItem=2">
忘记密码 忘记密码
</button> </button>
@ -123,16 +123,16 @@
</view> </view>
<view class="item"> <view class="item">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<image src="/static/images/code_1.png"></image> <image @click="type2=!type2" src="/static/images/eye.png"></image>
<input type="password" placeholder="请输入新密码" placeholder-class="placeholder" <input :type="type2?'password':'input'" placeholder="请输入新密码"
v-model="password" /> placeholder-class="placeholder" v-model="password" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<image src="/static/images/code_1.png"></image> <image @click="type3=!type3" src="/static/images/eye.png"></image>
<input type="password" placeholder="请再次输入密码" placeholder-class="placeholder" <input :type="type3?'password':'input'" placeholder="请再次输入密码"
v-model="confirm_pwd" /> placeholder-class="placeholder" v-model="confirm_pwd" />
</view> </view>
</view> </view>
@ -268,11 +268,6 @@
<u-button color="#46BF6F" text="确定" @tap="showTips=false"></u-button> <u-button color="#46BF6F" text="确定" @tap="showTips=false"></u-button>
</view> </view>
</block> </block>
</view> </view>
</u-overlay> </u-overlay>
<!-- tips结束 --> <!-- tips结束 -->
@ -358,6 +353,9 @@
}, },
data: function() { data: function() {
return { return {
type1: true,
type2: true,
type3: true,
tipsErr: "", tipsErr: "",
tispTile: '密码错误', tispTile: '密码错误',
showTips: false, showTips: false,

BIN
static/images/eye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

View File

@ -350,15 +350,16 @@ const open = (id = null) => {
} }
if (id.type == 2) { if (id.type == 2) {
console.log("yaofasong1", appid) setTimeout(() => {
console.log("发送给小程序的", id)
mp.sendUniMPEvent(appid, 'tocustomlist', { mp.sendUniMPEvent(appid, 'tocustomlist', {
path: 'sdsd' path: id
}, (ret) => { }, (ret) => {
console.log("开始发送消息") console.log("开始发送消息")
}); });
}, 3000)
} }
console.log('openUniMP: ' + JSON.stringify(ret));
}); });
} }