Browse Source

to test

tid1509
赵明涛 9 months ago
parent
commit
ade4d9ef06
  1. 291
      src/subpackage/party/components/popup-content/miniapp-change-name-certify.vue
  2. BIN
      src/subpackage/party/components/popup-content/miniapp-change-name-certify.zip
  3. 10
      src/subpackage/party/pages/index/index.vue
  4. 44
      src/subpackage/party/pages/miniapp/certify.vue

291
src/subpackage/party/components/popup-content/miniapp-change-name-certify.vue

@ -0,0 +1,291 @@
<template>
<!-- 弹窗 -->
<view class="m-popup b-popup " v-if="true" :class="[directionClass,{'b-popup-round':round},{'b-popup-animation':animation}]">
<view class="b-popup-shade" @click=""></view>
<view class="b-popup-content">
<view class="b-content-view b-flex-y b-flex-c">
<!-- 右上角关闭按钮 -->
<view class="b-flex-x b-flex-e b-mb-20 b-flex-as-e">
<text class="b-icon icon-close b-t-gray b-t-44" @click="closeChange"></text>
</view>
<view class="b-t-B b-t-36 b-mb-40">小程序认证账号名称设置</view>
<input class="bc-input b-mb-50" v-model="inputValue" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
<!-- 账号类型 -->
<!-- <view class="rb-radio b-flex-x b-mb-40">
<radio-group @change="idTimeChange">
<radio value="1" checked style="transform:scale(0.9)" color="#009876">组织号</radio>
<radio value="2" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">个人号</radio>
</radio-group>
</view> -->
<block v-if="hit_txt">
<view class="rb-line"></view>
<view class="rb-text b-t-24 b-t-red b-p-40">
<text>{{hit_txt}}</text>
<!-- <text>你申请的名称涉及特定地域范围或地理名称需要经过平台审核后才可使用你可以直接提交审核或提供商标注册证等材料以证明你可使用该地域范围或地理名称作为账号名称否则可能审核不通过</text> -->
</view>
</block>
<!-- 补充材料上传 -->
<!-- <view class="rb-upload-list b-flex-x b-flex-a b-mt-50">
<view class="b-flex-y b-flex-c">
<view class="b-mb-30">拍照上传</view>
<view class="rb-upload-item b-flex-y b-flex-c">
<image class="rb-upload-bg" src="../../static/regist/upload_bg.png"></image>
<image class="rb-upload-cam" src="../../static/regist/camera.png"></image>
<text class="rb-input-img-text">点击上传</text>
</view>
</view>
<view class="b-flex-y b-flex-c">
<view class="b-mb-30">关键词补充材料</view>
<view class="rb-upload-item b-flex-y b-flex-c">
<image class="rb-upload-bg" src="../../static/regist/upload_bg.png"></image>
<image class="rb-upload-cam" src="../../static/regist/camera.png"></image>
<text class="rb-input-img-text">点击上传</text>
</view>
</view>
<view class="b-flex-as-e b-ml-40 b-t-24 b-t-green b-t-B b-t-U">重新上传</view>
</view> -->
<view class="rb-btns b-flex-x b-mt-40 b-mb-50">
<block v-if="!checkNameRes">
<button class="b-btn b-btn-green b-mr-40" @click="checkName">下一步</button>
</block>
<block v-else>
<button class="b-btn b-btn-green b-mr-40" @click="closeChange">取消</button>
<button v-if="checkNameRes&&checkNameRes.code==0" class="b-btn b-btn-green " @click="sureChange">确定填入</button>
</block>
</view>
</view>
</view>
</view>
</template>
<script>
import util from '@/utils/util';
import { servers } from '@/js/server';
import party_api from '../../js/api.js';
import { mapState } from 'vuex';
export default {
props: {
nameInfo: {
type: Object,
default: ()=>({})
},
appid: {
type: String,
default: ''
},
// hit_txt: {
// type: String,
// default: ''
// },
},
computed: {
...mapState(['brandInfo']),
hit_txt(){
// if(this.checkNameRes.data && this.checkNameRes.data.hit_condition){
// return this.checkNameRes.data.hit_condition
// }
if(this.checkNameRes.message){
return this.checkNameRes.message
}
if(this.checkNameRes.data && this.checkNameRes.data.hit_condition){
return this.checkNameRes.data.wording
}
return ''
}
},
onmounted(){
console.log("onmounted123",this.nameInfo)
},
data() {
return {
showPopup:true,
inputValue: '',
checkNameRes: "",
}
},
methods: {
moveHandle(){},
async checkName(){
let check_res= await this.checkwxverifynickname()
console.log("check_res:",check_res)
// this.$emit('sure',this.inputValue);
},
sureChange(){
this.$emit('sure',{
name: this.inputValue,
checkNameRes: this.checkNameRes,
});
},
closeChange(){
this.$emit('close');
},
checkwxverifynickname(){
this.checkNameRes = {}
let _data = this.getGateWayJson('checkwxverifynickname')
_data.form.nick_name = this.inputValue
console.log("getaccountbasicinfo:",_data)
return servers.post({
url: party_api.gatewayDo,
data: _data,
isDefaultGet: false,
})
.then(res=>{
console.log("checkwxverifynickname:", res.data)
this.checkNameRes = res.data
if(res.data.code!=0){
util.showNone("名称不可用")
console.log("checkwxverifynickname-err", res.data)
}else{
util.showNone('名称可用')
if(!res.data.data.hit_condition){
res.data.message = '名称可用(注意:改名次数将在自然年 1 月 1 日和微信认证审核通过后重置为 2 次.请慎重修改.)'
}
}
this.checkNameRes = res.data
console.log("checkwxverifynickname123123:", this.checkNameRes)
})
.catch(err=>{
console.log("checkwxverifynickname-err", err)
})
},
getGateWayJson(jname){
let appid = this.appid
let _data = party_api["gatewayDoJson"][jname]
if(!appid){
console.error("当前page中: this.appid不存在")
return util.showNone("appid不存在")
}
if(!_data){
console.error("先去api.js定义透传数据:",jname)
return util.showNone("接口不存在")
}
_data.appid = appid;
return _data
},
selectBtn(type){
this.selectType = type
},
},
}
</script>
<style lang="scss" >
@import '~style/public.scss';
@import '../../ui/maincss.scss';
.m-popup{
.b-popup-shade{
background: rgba(0,0,0,0.5);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}
.b-popup-content{
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
background: #fff;
border-radius: 5rpx;
z-index: 101;
.b-content-view{
width: 620rpx;
padding: 20rpx;
.b-content-title{
}
.bc-input{
width: 538rpx;
height: 88rpx;
background: #FFFFFF;
border: 2rpx solid #D8D8D8;
border-radius: 10rpx;
padding-left: 30rpx;
}
.input-hold-class{
font-size: 28rpx;
}
.rb-line{
border-bottom: 1rpx solid #E5E5E5;
width: 100%;
}
.rb-btns{
>button{
width: 240rpx;
height: 88rpx;
}
>button:first-child{
background: #fff;
color: $b-color-green;
// border: 1rpx solid $b-color-green;
}
}
.rb-text{
>text{
line-height: 40rpx;
}
}
.rb-upload-list{
width: 100%;
.rb-upload-item{
width: 168rpx;
height: 168rpx;
// position: relative;
.rb-upload-bg{
width: 168rpx;
height: 168rpx;
position: absolute;
}
.rb-upload-cam{
width: 48rpx;
height: 40rpx;
}
.rb-input-img-text{
font-size: 24rpx;
margin-top: 24rpx;
color: #1A1A1A;
z-index: 2;
}
}
.idcard-width-170{
width: 280rpx;
height: 170rpx;
.rb-upload-bg{
width: 280rpx;
height: 170rpx;
position: absolute;
}
}
}
}
}
.popup-demo{
font-size: 32rpx;
color: #333333;
}
}
</style>

BIN
src/subpackage/party/components/popup-content/miniapp-change-name-certify.zip

10
src/subpackage/party/pages/index/index.vue

@ -23,6 +23,7 @@
<view class="b-t-32 b-pb-20 b-ml-40 ">收银系统</view>
</view>
</view>
<view class="p-box b-flex-x b-flex-b">
<view class="b-flex-y b-flex-c" @click="toMiniApp">
<text class="b-t-white b-t-24 p-index-2">访问手机端</text>
@ -37,7 +38,7 @@
</view>
<view class="p-tip">可在后台设置教练账户</view>
<view class="p-box-title b-flex-as-s b-t-B b-t-32 b-pb-20 b-ml-40 b-mt-60 b-mb-20">小程序管理</view>
<view class="p-box b-flex-x b-flex-b">
<view class="b-flex-y b-flex-c p-guanli" style="width: 176rpx;" @click="toMiniAppRegist(0)">
@ -169,7 +170,7 @@
},
toMiniAppRegist(index){
let {miniapp_app_id,appid} = this
let {is_try_out} = this.brandInfo.brand.mini_wechat
let is_try_out = this.brandInfo.brand?.mini_wechat?.is_try_out;
console.log('toMiniAppRegist',index,appid,is_try_out)
console.log('miniapp_app信息:',this.brandInfo.brand.mini_wechat)
if(!appid){
@ -272,6 +273,8 @@
}
.party-index-page{
width: 750rpx;
// background-color: $b-color-gray-ddd;
.p-main-view{
.p-box-title{
// width: 100%;
@ -289,7 +292,7 @@
font-size: 24rpx;
color: #9A9A9D;
margin-top: 25rpx;
margin-left: 60rpx;
padding-left: 60rpx;
width: 100%;
}
.p-box-title-2{
@ -300,6 +303,7 @@
}
.p-box{
width: 670rpx;
overflow: hidden;
>view{
width: 320rpx;
height: 176rpx;

44
src/subpackage/party/pages/miniapp/certify.vue

@ -5,9 +5,9 @@
<view class="r-box">
<!-- <text class="rb-title">品牌信息</text> -->
<view class="rb-input-box rb-line b-flex-x b-flex-b">
<view class="rb-input-box rb-line b-flex-x b-flex-b" @click="showChangeNameModule=true">
<view class="rb-input-title b-flex-x">账号名称<text>*</text></view>
<input class="rb-input" v-model="form.account_name" type="text" placeholder="请输入小程序名称"
<input class="rb-input" disabled="true" v-model="form.account_name" type="text" placeholder="请输入小程序名称"
placeholder-class="input-hold-class"></input>
</view>
<view class="rb-input-box rb-line b-flex-x b-flex-b">
@ -40,8 +40,8 @@
<!-- <view class="b-flex-as-e b-ml-40 b-t-24 b-t-green b-t-B b-t-U">重新上传</view> -->
</view>
</view>
<view class="rb-upload-box rb-line b-flex-y b-flex-s b-mt-0 b-pb-50">
<view class="rb-upload-title b-flex-x">名称涉及关键词(补充材料)<text>*</text></view>
<view v-if="show_hit_upload" class="rb-upload-box rb-line b-flex-y b-flex-s b-mt-0 b-pb-50">
<view class="rb-upload-title b-flex-x">名称涉及关键词(补充材料)<text></text></view>
<view class="rb-upload-list b-flex-x" @click="clickUploadImg(2)">
<view class="rb-upload-item b-flex-y b-flex-c">
<image class="rb-upload-bg" src="../../static/regist/upload_bg.png"
@ -52,7 +52,7 @@
</view>
</view>
<view class="rb-upload-box b-flex-y b-flex-s b-mt-0 b-pb-20">
<view class="rb-upload-title b-flex-x">主体资质其他证明材料<text>*</text></view>
<view class="rb-upload-title b-flex-x">主体资质其他证明材料<text></text></view>
<view class="rb-upload-list b-flex-x" @click="clickUploadImg(3)">
<view class="rb-upload-item b-flex-y b-flex-c">
<image class="rb-upload-bg" src="../../static/regist/upload_bg.png"
@ -185,6 +185,11 @@
</view>
<app-change-name-certify v-if="showChangeNameModule"
:appInfo="brandInfo" :appid="appid"
@sure="nameChange"
@close="showChangeNameModule = false"
></app-change-name-certify>
</view>
</template>
@ -193,16 +198,19 @@ import util from '@/utils/util.js';
import { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import miniappChangeNameCertify from '../../components/popup-content/miniapp-change-name-certify.vue';
import {
mapState
} from 'vuex'
export default {
components: {
// 'hoverCartList': hoverCartList ,
"app-change-name-certify": miniappChangeNameCertify,
},
data() {
return {
showChangeNameModule:false, //
brandInfo: {},
appid: "",
localImg: {
@ -259,7 +267,8 @@ export default {
"service_appid": "",
"third_party_phone": ""
}
},
checkNameRes: "", //
}
},
@ -282,6 +291,12 @@ export default {
},
computed: {
// ...mapState(['brandInfo',])
show_hit_upload(){
if(this.checkNameRes.data && this.checkNameRes.data.hit_condition){
return true
}
return false
}
},
watch: {
cartList() {
@ -289,10 +304,19 @@ export default {
},
},
methods: {
nameChange(e){
console.log("nameChange",e)
this.form.account_name = e.name
this.checkNameRes = e.checkNameRes
this.showChangeNameModule = false
},
clickNameInput(){
},
setInfo(){
if(!this.form.account_name){
this.form.account_name = this.brandInfo.brand.mini_wechat_app_name
}
// if(!this.form.account_name){
// this.form.account_name = this.brandInfo.brand.mini_wechat_app_name
// }
},
radioSelect(e){
console.log(e.detail)

Loading…
Cancel
Save