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 content = result.content
let extras = result.extras.type
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/pay.MP3')
@ -167,17 +166,14 @@
if (notificationEventType == 'notificationOpened') {
if (result.extras.type == 2) {
let data = result.extras.group_data
data.route = result.extras.route
data.type = 2
uniMP.loadAppletMP(data)
} else {
uni.navigateTo({
url: result.extras.route
})
}
}
})

View File

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

View File

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

View File

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

View File

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

View File

@ -641,46 +641,14 @@
},
onShow() {
console.log(Boolean(this.$store.state.app.userInfo.service?.mer_id))
let that = this;
// #ifdef APP-PLUS
if (Boolean(uni.getStorageSync('is_new_user'))) {
this.subNvue = uni.getSubNVueById('newUser')
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
// 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')
// #ifdef APP-PLUS
if (that.appUpdate.openUpgrade == '1') {
@ -727,8 +695,15 @@
methods: {
openDiver() {
this.subNVue.show('slide-in-left', 300)
// uni.$emit('diverIndexEmit', this.userInfo);
if (Boolean(this.userInfo.service?.mer_id)) {
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() {
if (!this.showCoupon && !uni.getStorageSync('show_coupon') && uni.getStorageSync('is_new_user')) {
@ -1067,6 +1042,7 @@
showTab(res.data);
that.userInfo = res.data;
this.$store.commit('SET_USERINFO', res.data);
this.openDiver()
});
},
// 访

View File

@ -12,12 +12,19 @@
</view>
<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);">
<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>
<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>
<u-line style="margin: 28rpx 0;"></u-line>
<view class="" style="margin-bottom: 20rpx;">
@ -30,12 +37,8 @@
备注:{{item.fail_msg}}
</view>
</view>
</view>
<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-top">
@ -121,6 +124,12 @@
this.loading = false
})
},
navgo() {
// uni.navigateBack()
uni.navigateTo({
url: '/pages/store/settled/index?type=1'
})
},
//
jump(item) {
console.log(item)

View File

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

View File

@ -48,9 +48,9 @@
</view>
<view class="item">
<view class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="password" placeholder="填写登录密码" placeholder-class="placeholder"
v-model="password" required />
<image @click="type1=!type1" src="/static/images/eye.png"></image>
<input :type="type1?'password':'input'" placeholder="填写登录密码"
placeholder-class="placeholder" v-model="password" required />
<button class="code" @click="formItem=2">
忘记密码
</button>
@ -123,16 +123,16 @@
</view>
<view class="item">
<view class="acea-row row-middle">
<image src="/static/images/code_1.png"></image>
<input type="password" placeholder="请输入新密码" placeholder-class="placeholder"
v-model="password" />
<image @click="type2=!type2" src="/static/images/eye.png"></image>
<input :type="type2?'password':'input'" placeholder="请输入新密码"
placeholder-class="placeholder" v-model="password" />
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<image src="/static/images/code_1.png"></image>
<input type="password" placeholder="请再次输入密码" placeholder-class="placeholder"
v-model="confirm_pwd" />
<image @click="type3=!type3" src="/static/images/eye.png"></image>
<input :type="type3?'password':'input'" placeholder="请再次输入密码"
placeholder-class="placeholder" v-model="confirm_pwd" />
</view>
</view>
@ -268,11 +268,6 @@
<u-button color="#46BF6F" text="确定" @tap="showTips=false"></u-button>
</view>
</block>
</view>
</u-overlay>
<!-- tips结束 -->
@ -358,6 +353,9 @@
},
data: function() {
return {
type1: true,
type2: true,
type3: true,
tipsErr: "",
tispTile: '密码错误',
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) {
console.log("yaofasong1", appid)
setTimeout(() => {
console.log("发送给小程序的", id)
mp.sendUniMPEvent(appid, 'tocustomlist', {
path: 'sdsd'
path: id
}, (ret) => {
console.log("开始发送消息")
});
}, 3000)
}
console.log('openUniMP: ' + JSON.stringify(ret));
});
}