Browse Source

change

gongyingshang
赵明涛 9 months ago
parent
commit
99e043a73f
  1. 2
      src/js/api.js
  2. 2
      src/manifest.json
  3. 6
      src/pages.json
  4. 98
      src/pages/index/index.vue
  5. 13
      src/subpackage/party/components/popup-content/miniapp-change-jian-jie.vue
  6. 17
      src/subpackage/party/components/popup-content/miniapp-change-name.vue
  7. 3
      src/subpackage/party/js/api.js
  8. 30
      src/subpackage/party/pages/index/index.vue
  9. 116
      src/subpackage/party/pages/login/login.vue
  10. 44
      src/subpackage/party/pages/login/regist.vue
  11. 25
      src/subpackage/party/pages/login/reviewing.vue
  12. 24
      src/subpackage/party/pages/miniapp/auth.vue
  13. 33
      src/subpackage/party/pages/miniapp/certify.vue
  14. 33
      src/subpackage/party/pages/miniapp/certify_res.vue
  15. 8
      src/subpackage/party/pages/miniapp/record.vue
  16. 2
      src/subpackage/party/pages/miniapp/record_pre.vue
  17. 101
      src/subpackage/party/pages/miniapp/record_res.vue
  18. 97
      src/subpackage/party/pages/miniapp/regist.vue
  19. 157
      src/subpackage/party/pages/miniapp/regular.vue
  20. 1
      src/subpackage/party/pages/miniapp/unauth.vue
  21. 3
      src/subpackage/party/pages/miniapp/wx_auth_select.vue

2
src/js/api.js

@ -163,6 +163,8 @@ API['party'] = {
webUpload:`${ORIGIN}/upload/file/businessLicense`, // 上传图片
webOcr:`${ORIGIN}/ouxuanac/ocr`, // 营业执照识别
// bindingOpenId: `${ORIGIN}/admin/assistant/bindingOpenId`, //改为小程序端绑定openid
bindingOpenId: `${ORIGIN}/assistant/bindingOpenId`, //改为小程序端绑定openid
}
export default { ORIGIN, API };

2
src/manifest.json

@ -62,7 +62,7 @@
"export": ""
},
"captcha": {
"version": "2.0.0", //
"version": "2.1.0", //
"provider": "wx1fe8d9a3cb067a75"
}
},

6
src/pages.json

@ -9,11 +9,7 @@
{
"path": "pages/login/login",
"style": {
"mp-weixin": {
"usingComponents": {
"miniprogram-thirdparty-plugin": "plugin://myPlugin/miniprogram-thirdparty-plugin"
}
}
"navigationBarTitleText": "登录"
}
},
{

98
src/pages/index/index.vue

@ -75,7 +75,7 @@
</view>
</view>
<view class="fly_btn" @click="toPageInfo(tabList[4])">
<view class="fly_btn" @click="toPageInfo(tabList[4])" v-if="loginStatus">
<image class="f_bg" src="/static/images/icon/index/green_bg_circle.png" mode="scaleToFill"/>
<image class="f_icon" src="/static/images/icon/index/scan_icon_white.png" mode="scaleToFill"/>
<text>核销</text>
@ -196,12 +196,12 @@
}
},
async onLoad(options) {
try{
util.showLoad();
// 20230829
if(options.role !== 'ADMIN-PLATFORM')await this.checkUserAuthor();
// 20240325 openid
await this.webBrandUserCheck();
util.hideLoad();
this.loginStatus = app.isLogin();
if(!!app.isLogin())this.getIndexInfo();
@ -245,7 +245,13 @@
});
}
if(tabInfo.id === 10)return util.routeTo(tabInfo.path + `?brand_id=${indexData.brand.id}`,'nT');
if(tabInfo.id === 11){
// if(!indexData.brand.mini_wechat_appid)return util.showNone('appid')
let url = tabInfo.path + `?appid=${indexData.brand.mini_wechat_appid}`
console.log(222,url)
return util.routeTo(url,'nT');
}
util.routeTo(tabInfo.path,'nT');
},
@ -288,10 +294,14 @@
let _data = res.data;
if(_data.code == 0){
// let _data = res.data.data;
if(_data.data == ''){
uni.removeStorageSync('token');
this.loginStatus = app.isLogin();
return util.routeTo(`/pages/login/login`,'rL');
// 20240325 openid
this.webBrandUserCheck();
// return util.routeTo(`/pages/login/login`,'rL');
}
uni.setStorageSync('token',_data.data);
return _data;
@ -390,31 +400,42 @@
},
webBrandUserCheck(){
// return this.webUserGet();
console.warn('webBrandUserCheck')
let token = uni.getStorageSync('token');
let token_web = uni.getStorageSync('token_web');
let _data = {
token: token||"",
token_web: token_web||"",
}
return servers.get({
url: API['party'].webBrandUser,
data: {},
data: _data,
failMsg: '加载数据失败!'
})
.then(res=>{
console.log('webBrandUserCheck',res)
if(!res.had_binding){
console.warn('webBrandUser 验证绑定账号失败!');
return util.routeTo(`/pages/login/login`,'rL');
}else{
// if(!res.had_binding){
// console.warn('webBrandUser ');
// return util.routeTo(`/pages/login/login`,'rL');
// }else{
//status: 1 2 3 4 5 6???
console.warn(res,'webBrandUserCheck success');
if(res.status==0){
console.warn(res,'webBrandUserCheck success',res.status);
if(res.status==0&&token_web){
return util.routeTo(`/subpackage/party/pages/login/regist`,'rL');
}else if(res.status==1){
return util.routeTo(`/subpackage/party/pages/login/reviewing`,'rL');
}else if(res.status==2){
return util.routeTo(`/subpackage/party/pages/login/reviewing`,'rL');
}else if(res.status==5){
//
this.bindUserOpenid();
}
// return res;
}
// }
}).catch(err=>{
console.warn('webBrandUserCheck err',err)
@ -426,6 +447,55 @@
let { indexData } = this;
util.routeTo(`/pages/store_list/store_list?brand_id=${indexData.brand.id}`,'nT');
},
bindUserOpenid(){
let token_web = uni.getStorageSync('token_web');
let _data = {
token_web: token_web||"",
}
return servers.post({
url: API['party'].bindingOpenId,
data: _data,
failMsg: '绑定失败!'
})
.then(res=>{
console.log('小程序端绑定bindUserOpenid',res)
if(res.msg=="success"){
util.showNone('绑定成功!');
util.routeTo(`/pages/index/index`,'rL');
}else{
util.showNone(res.message || '绑定失败!');
}
}).catch(err=>{
console.warn('bindUserOpenid err',err)
util.showNone(err.message || '绑定失败!');
// util.routeTo(`/subpackage/party/pages/login/reviewing`,'rL');
util.routeTo(`/pages/login/login`,'rL');
})
},
webUserGet(){
let token_web = uni.getStorageSync('token_web');
let _data = {
token_web: token_web||"",
}
return servers.post({
url: API['party'].webUserGet,
data: _data,
failMsg: '获取信息失败!'
})
.then(res=>{
console.log('webUserGet:',res)
if(res.code==0){
}else{
util.showNone(res.message || '失败!');
}
}).catch(err=>{
console.warn('bindUserOpenid err',err)
util.showNone(err.message || '获取信息失败!');
})
},
}
}
</script>

13
src/subpackage/party/components/popup-content/miniapp-change-jian-jie.vue

@ -10,6 +10,16 @@
<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>
<!-- 可修改次数,已修改次数 -->
<view class="b-flex-x b-mb-20">
<text class="b-t-28 b-t-gray">可修改次数:</text>
<text class="b-t-28 b-t-green">{{appInfo.signature_info.modify_quota}}</text>
<text class="b-t-28 b-t-gray"></text>
<text class="b-t-28 b-t-gray b-ml-40">已修改次数:</text>
<text class="b-t-28 b-t-red">{{appInfo.signature_info.modify_used_count}}</text>
<text class="b-t-28 b-t-gray"></text>
</view>
<input class="bc-input b-mb-50" v-model="userInputName" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
@ -41,10 +51,9 @@ import { mapState } from 'vuex';
export default {
props: {
nameInfo: {
appInfo: {
type: Object,
default: ()=>({
showPopup:true,
})
},
appid: {

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

@ -10,6 +10,17 @@
<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>
<!-- 可修改次数,已修改次数 -->
<view class="b-flex-x b-mb-20">
<text class="b-t-28 b-t-gray">可修改次数:</text>
<text class="b-t-28 b-t-green">{{appInfo.nickname_info.modify_quota}}</text>
<text class="b-t-28 b-t-gray"></text>
<text class="b-t-28 b-t-gray b-ml-40">已修改次数:</text>
<text class="b-t-28 b-t-red">{{appInfo.nickname_info.modify_used_count}}</text>
<text class="b-t-28 b-t-gray"></text>
</view>
<input class="bc-input b-mb-50" v-model="userInputName" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
@ -84,10 +95,10 @@ import { mapState } from 'vuex';
export default {
props: {
nameInfo: {
appInfo: {
type: Object,
default: ()=>({
showPopup:true,
// showPopup:true,
})
},
appid: {
@ -137,7 +148,7 @@ export default {
await this.setnickname().then(res=>{
console.log("setnickname-res", res)
this.showPopup = false;
this.$emit('sure',this.nameInfo);
this.$emit('sure',this.appInfo);
})
},

3
src/subpackage/party/js/api.js

@ -4,7 +4,7 @@ export const PARTY_API = {
webBrandUser: `${ORIGIN}/web/webBrandUser/GetOpenId`, //检测用户openid是否与账户绑定,
captchaSms: `${ORIGIN}/captchaSms/send`, // 发送验证码
webLogin: `${ORIGIN}/web/webBrandUser/login`, // 登录
// webUserGet:`${ORIGIN}/web/webBrandUser/get`, // 获取用户信息
webUserGet:`${ORIGIN}/web/webBrandUser/get`, // 获取官网用户信息,审核状态
webUpload: `${ORIGIN}/upload/file/businessLicense`, // 上传图片
webOcr: `${ORIGIN}/ouxuanac/ocr`, // 营业执照识别
webBrandUserSave: `${ORIGIN}/web/webBrandUser/save`, // 官网PC端用户品牌数据提交
@ -19,6 +19,7 @@ export const PARTY_API = {
getVerifyMiniAppInfo: `${ORIGIN}/admin/tryout/verifyMiniAppInfo/get`, //获取转正数据
verifybetaweapp: `${ORIGIN}/admin/wechatTpp/mini/tryout/verifybetaweapp`, //转正
bindingOpenId: `${ORIGIN}/assistant/bindingOpenId`, //改为小程序端绑定openid
getCertifyInfo: `${ORIGIN}/admin/tryout/verifyMiniAppInfo/get`, //获取小程序认证信息

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

@ -65,6 +65,15 @@
</view>
</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 b-mb-10" style="width: 670rpx;" @click="toRegular">
<view class="b-flex-y b-flex-c " style="width: 670rpx;">
<text class="b-t-white b-t-24 p-index-2 b-flex-as-s b-ml-60">去转正</text>
<image class="pb-img-arrow-white b-mt-20 p-index-2 b-flex-as-s b-ml-60" src="../../static/index/p-arrow-white.png"></image>
<image class="pb-bg" src="../../static/index/p-bg-3.png" style="width: 670rpx;"></image>
</view>
</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 b-mb-60" style="width: 670rpx;" @click="toShouKuan">
<view class="b-flex-y b-flex-c " style="width: 670rpx;">
@ -117,10 +126,11 @@
}
},
onLoad(opts) {
console.log("onload-", this.brandInfo.brand.id)
if(!opts.appid){
opts.appid = "wxc141a743225e7885"
}
console.log("onload-", opts)
this.appid = opts.appid;
// if(!opts.appid){
// opts.appid = "wxc141a743225e7885"
// }
},
onShow() {
this.checkMiniAppRegist()
@ -144,18 +154,22 @@
},
},
methods: {
toRegular(){
console.log('toRegular')
util.routeTo(`/subpackage/party/pages/miniapp/regular`,'nT');
},
toShouKuan(){
console.log('toShouKuan')
return util.showNone('暂未开放')
util.routeTo(`/subpackage/party/pages/index/shoukuan`,'nT');
},
toMiniAppRegist(index){
let {miniapp_app_id} = this
console.log('toMiniAppRegist',index)
if(!this.miniapp_app_id){
let {miniapp_app_id,appid} = this
console.log('toMiniAppRegist',index,appid)
if(!appid){
util.routeTo(`/subpackage/party/pages/miniapp/wx_auth_select?index=${index}`,'nT');
}else{
util.routeTo(`/subpackage/party/pages/miniapp/regist?appid=${miniapp_app_id}`,'nT');
util.routeTo(`/subpackage/party/pages/miniapp/regist?appid=${appid}`,'nT');
}
},
checkMiniAppRegist(){

116
src/subpackage/party/pages/login/login.vue

@ -3,17 +3,19 @@
<view class="p-main-view b-flex-y b-flex-c">
<view class="p-header b-flex-y b-flex-c">
<text class="b-t-U">返回首页</text>
<text class="b-t-U" @click="toIndex">返回首页</text>
<image class="p-slogn" src="../../static/login/slogn.png"></image>
<image class="p-logo" src="../../static/login/logo.png"></image>
</view>
<!-- 输入手机号码, 验证码, 获取验证码 -->
<view class="p-input-box">
<input class="p-input" type="number" v-model="mobile" placeholder="请输入手机号码" placeholder-class="input-hold-class"></input>
<input class="p-input" type="tel" maxlength="11" v-model="mobile"
placeholder="请输入手机号码" placeholder-class="input-hold-class"></input>
<view class="p-input-code b-flex-x b-flex-b">
<input class="p-input" type="number" v-model="code" placeholder="请输入验证码" placeholder-class="input-hold-class"></input>
<input class="p-input" maxlength="6" type="number" v-model="code"
placeholder="请输入验证码" placeholder-class="input-hold-class"></input>
<view class="p-get-code" @click="captchaLogin">获取验证码</view>
<view class="p-get-code" @click="captchaLogin">{{codeText}}</view>
</view>
</view>
@ -22,6 +24,8 @@
<t-captcha
id="captcha"
app-id="2051114470"
themeColor="#009876"
size="normal"
@verify="handlerVerify"
@ready="handlerReady"
@close="handlerClose"
@ -37,8 +41,8 @@
style="transform:scale(0.8)"
color="#009876" iconColor="#ffffff"></checkbox>
</checkbox-group>
同意<text class="b-t-28 b-color-green">用户协议</text>
<text class="b-t-28 b-color-green">隐私协议</text>
同意<text class="b-t-28 b-t-green" @click="toWeb(1)">用户协议</text>
<text class="b-t-28 b-t-green" @click="toWeb(2)">隐私协议</text>
</view>
<!-- 登录按钮 -->
@ -55,34 +59,32 @@
import { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import{phoneReg} from '@/utils/util.js'
const app = getApp();
const uniLogin = util.promisify(uni.login);
// import tools from '../../js/tools';
// import retailServer from '../../js/retail_server';
// import retailApi from '../../js/retail_api';
// import hoverCartList from '../../components/hover_cart_list/hover_cart_list';
import {
mapState
} from 'vuex'
export default {
components: {
// 'hoverCartList': hoverCartList ,
},
data() {
return {
agree:false,
mobile:"",
code:"",
ticket:"",
agree:false,
count:60,
codeText:"获取验证码",
// mobile: '18502079603',
// code:"697961",
// ticket:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2YWxpZF9wZXJpb2QiOiJcIjIwMjQtMDMtMjZUMTQ6Mzc6NTEuOTYzNTA1NDM2KzA4OjAwXCJcbiIsInZhbHVlIjoiMTg1MDIwNzk2MDM2OTc5NjEifQ.8-jjMrKufC_cpfQoNOtY5JSyvyNDoyUe2b00EfdYR48",
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id,party_api.captchaSms)
// util.showNone("onLoad ")
},
onShow() {
@ -97,22 +99,42 @@
},
},
methods: {
testis(){
const appid = uni.getAccountInfoSync().miniProgram.appId;
console.log('appid',appid)
util.routeTo(`/subpackage/party/pages/login/regist`,'rL');
},
groupChange(e){
console.log('groupChange',e)
this.agree = e.detail.value.indexOf('agree') > -1
//
countDown(){
let {count} = this
console.log('countDown',count)
if(count != 60)return
let timer = setInterval(()=>{
count--
this.count = count
if(count <= 0){
clearInterval(timer)
this.codeText = '获取验证码'
this.count = 60
}else{
this.codeText = count + 's'
}
},1000)
},
async clickSubmitbtn(){
let {mobile,code,ticket} = this
captchaLogin:util.debounce(function(){
let {mobile,count} = this
if(!mobile || !phoneReg.test(mobile))return util.showNone('请输入正确手机号码!');
if(count != 60)return util.showNone('请稍后再试!');
this.countDown()
this.selectComponent('#captcha').show()
//
// if (error) {
// this.selectComponent('#captcha').refresh()
// }
},1000,false),
clickSubmitbtn:util.debounce(async function(){
let {mobile,code,ticket,agree} = this
console.log('clickSubmitbtn',this.mobile, this.code, this.ticket)
if(!mobile || !phoneReg.test(mobile))return util.showNone('请输入正确手机号码!');
if(!code)return util.showNone('请输入手机验证码!');
if(!agree)return util.showNone('请阅读并同意服务协议和隐私政策!')
if(this.agree == false){
return util.showNone('请同意用户协议和隐私协议!')
}
let loginRes =""
// #ifndef H5
@ -139,19 +161,39 @@
})
.then(res=>{
console.log('webLogin',res)
//, token_web. , token_web
let token = res.token
uni.setStorageSync('token_web',token);
return util.routeTo(`/subpackage/party/pages/login/regist`,'rL');
}).catch(err=>{
console.warn('webLogin err',err)
util.showNone('登录失败!')
})
},500,false),
toIndex(){//
util.routeTo(`/pages/login/login`,'rL');
},
captchaLogin: function () {
this.selectComponent('#captcha').show()
//
// if (error) {
// this.selectComponent('#captcha').refresh()
// }
toWeb(index){
let url = ''
if(index == 1){
url = 'https://help.ouxuanzhineng.cn/web/#/7/23'
}else if(index == 2){
url = 'https://help.ouxuanzhineng.cn/web/#/7/24'
}
util.routeTo(`/subpackage/party/pages/index/web_view?url=${url}`,'nT');
},
testis(){
const appid = uni.getAccountInfoSync().miniProgram.appId;
console.log('appid',appid)
util.routeTo(`/subpackage/party/pages/login/regist`,'rL');
},
groupChange(e){
console.log('groupChange',e)
this.agree = e.detail.value.indexOf('agree') > -1
},
//
handlerVerify: function (ev) {
// 使 mpvueev.detail ev.mp.detail
@ -185,7 +227,7 @@
console.log(ev.detail.errMsg)
},
captchaSmsSend: function (ticket,rand_str) {
console.log('captchaSms123: ',ticket,rand_str,this.mobile)
console.log('captchaSmsSend: ',ticket,rand_str,this.mobile)
let {mobile} = this
return servers.get({
url: party_api.captchaSms,
@ -199,13 +241,9 @@
.then(res=>{
console.log('captchaSms',res)
this.ticket = res
if(!res.had_binding){
console.warn('webBrandUser 验证绑定账号失败!');
// return util.routeTo(`/pages/login/login`,'rL');
}
}).catch(err=>{
console.warn('webBrandUserCheck err',err)
console.warn('err:',err)
// util.routeTo(`/pages/login/login`,'rL');
})
@ -253,7 +291,7 @@
.input-hold-class{
font-size: 28rpx;
color: $b-color-gray;
padding-left: 30rpx;
padding-left: 0rpx;
}
> input{
width: 668rpx;

44
src/subpackage/party/pages/login/regist.vue

@ -67,8 +67,8 @@
<view class="rb-input-title b-flex-x">证件有效期<text>*</text></view>
<view class="rb-radio b-flex-x">
<radio-group @change="idTimeChange">
<radio value="0" checked style="transform:scale(0.9)" color="#009876">长期</radio>
<radio value="1" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">短期
<radio value="0" :checked="submitData.extension.credit_end_date==0" style="transform:scale(0.9)" color="#009876">长期</radio>
<radio value="1" :checked="submitData.extension.credit_end_date==1" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">短期
</radio>
</radio-group>
</view>
@ -149,7 +149,7 @@
</view>
<view class="rb-input-box rb-line b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">手机号<text>*</text></view>
<input class="rb-input" v-model="submitData.contact_number" type="text" placeholder="请输入手机号"
<input class="rb-input" v-model="submitData.contact_number" type="tel" placeholder="请输入手机号"
placeholder-class="input-hold-class"></input>
</view>
</view>
@ -379,12 +379,16 @@
webBrandUserGet(){
// util.showNone("")
console.log("webBrandUserGet")
let _data = {
brand_id: this.brandInfo.brand.id
}
if(uni.getStorageSync('token_web')){//:token_web
_data.token_web = uni.getStorageSync('token_web')
}
console.log("webBrandUserGet-1",uni.getStorageSync('token_web'))
servers.post({
url: party_api.webBrandUserGet,
data: {
brand_id: this.brandInfo.brand.id
},
data: _data,
isDefaultGet: false,
})
.then(res=>{
@ -428,7 +432,10 @@
console.log("getLocalImg:", img)
let img_url = await this.getUploadImgURL(img);
console.log("getUploadImgURL:", img_url)
let ocr_res = await this.getOcrFromImg(ocr_type,img_url);
let ocr_res = await this.getOcrFromImg(ocr_type,img_url).catch(err=>{
console.log("getOcrFromImg-err", err)
util.showNone("识别失败,请重新上传")
})
this.setOcrResult(ocr_type,ocr_res)
this.submitData.business_license = img_url
},
@ -440,7 +447,10 @@
console.log("getLocalImg:", img)
let img_url = await this.getUploadImgURL(img);
console.log("getUploadImgURL:", img_url)
let ocr_res = await this.getOcrFromImg(ocr_type,img_url);
let ocr_res = await this.getOcrFromImg(ocr_type,img_url).catch(err=>{
console.log("getOcrFromImg-err", err)
util.showNone("识别失败,请重新上传")
})
this.setOcrResult(ocr_type,ocr_res)
this.submitData.extension.business_id_card_url = img_url
},
@ -466,7 +476,9 @@
console.log("getOcrFromImg-res", res)
if(res.statusCode == 200){
console.log("getOcrFromImg-ocr", res.data.data)
return res.data.data
if(res.data.data)return res.data.data
return util.showNone("识别失败,请重新上传")
}
})
.catch(err=>{
@ -598,6 +610,7 @@
},
bindPickerChange_qualification(e) {
console.log('bindPickerChange_qualification:', e.detail.value)
if(e.detail.value>1)return util.showNone("仅支持:企业或个体工商户")
this.qualification_type_index = e.detail.value
this.qualification_type_show = this.qualification_types_arr[e.detail.value]
},
@ -648,6 +661,9 @@
let _data = JSON.parse(JSON.stringify(this.submitData))
if(_token)_data['token'] = _token;
_data['status']= 2;//: 1,2,3,4 5 6?
if(uni.getStorageSync('token_web')){//: token_web
_data.token_web = uni.getStorageSync('token_web')
}
servers.post({
url: party_api.webBrandUserSave,
data: _data,
@ -689,7 +705,6 @@
return true
},
SubmitEvent() {
util.routeTo("/subpackage/party/pages/login/reviewing", "nT")
},
formSubmit(e) {
console.log('form发生了submit事件,携带数据为:', e.detail.value)
@ -697,9 +712,16 @@
//webBrandUserGet
resetSubmitData(){
const _token = uni.getStorageSync('token') || '';
let token_web = uni.getStorageSync('token_web')
let _data = JSON.parse(JSON.stringify(this.submitData))
if(_token)_data['token'] = _token;
if(uni.getStorageSync('token_web')){//: token_web
_data.token_web = uni.getStorageSync('token_web')
}
console.log(123,token_web,uni.getStorageSync('token_web'))
servers.post({
url: party_api.webBrandUserGet,
data: _data,

25
src/subpackage/party/pages/login/reviewing.vue

@ -62,32 +62,21 @@
methods: {
webBrandUserCheck(){
console.warn('webBrandUserCheck')
let _data = {}
if(uni.getStorageSync('token_web')){//: tokentokentoken
_data.token_web = uni.getStorageSync('token_web')
}
return servers.get({
url: API['party'].webBrandUser,
data: {},
data: _data,
failMsg: '加载数据失败!'
})
.then(res=>{
console.log('webBrandUserCheck',res)
this.info = res
if(!res.had_binding){
console.warn('webBrandUser 验证绑定账号失败!');
// return util.routeTo(`/pages/login/login`,'rL');
}else{
//status: 1 2 3 4 5 6???
console.warn(res,'webBrandUserCheck success');
this.status = res.status
// if(res.status==0){
// return util.routeTo(`/subpackage/party/pages/login/regist`,'rL');
// }else if(res.status==1){
// return util.routeTo(`/subpackage/party/pages/login/reviewing`,'rL');
// }else if(res.status==2){
// return util.routeTo(`/subpackage/party/pages/login/reviewing`,'rL');
// }
// return res;
}
this.status = res.status
}).catch(err=>{
console.warn('webBrandUserCheck err',err)

24
src/subpackage/party/pages/miniapp/auth.vue

@ -225,25 +225,31 @@ export default {
await this.thirdPartyAuthor(party_token).then(res=>{
console.log('thirdPartyAuthor授权成功',res)
this.authSuccess(party_token)
this.auth_step = 2
// this.authSuccess(party_token) //20240403 bindBrand,
this.SubmitEvent()
}).catch(err=>{
console.error('授权失败',err)
})
},
async authSuccess(party_token){
util.showNone("授权成功")
util.showLoad()
await this.bindBrand(party_token).then(res=>{
util.hideLoad()
console.log(' authSuccess bindBrand',res)
util.showNone("绑定结果:"+res.msg||"绑定成功")
this.SubmitEvent()
}).catch(err=>{
console.error('authSuccess bindBrand err',err)
util.showNone("绑定失败")
util.hideLoad()
})
},
idTimeChange(e){
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
util.routeTo("/subpackage/party/pages/miniapp/regular","nT")
},
bindBrand(unique_id){
return servers.post({
@ -282,10 +288,10 @@ export default {
},
getFastcreateToken(openid){//token
//TODO ,,
return {
token: "d56e4149-8cd1-11ee-b5fb-5254005df464",
unique_id: "r2dCHjL3HqO3_i6_A7m0NT-qZg3UI290JTn0D5oOw8C3UDwuZJJ6kmKG41BOrqMb"
}
// return {
// token: "d56e4149-8cd1-11ee-b5fb-5254005df464",
// unique_id: "r2dCHjL3HqO3_i6_A7m0NT-qZg3UI290JTn0D5oOw8C3UDwuZJJ6kmKG41BOrqMb"
// }
return servers.get({
url: party_api.fastregisterbetaweapp,
data: {

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

@ -14,8 +14,8 @@
<view class="rb-input-title b-flex-x">命名类型<text></text></view>
<view class="rb-radio b-flex-x">
<radio-group @change="wordSelect">
<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 value="1" :checked="form.account_name_type==1" style="transform:scale(0.9)" color="#009876">自选词汇</radio>
<radio value="2" :checked="form.account_name_type==2" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">商标命名</radio>
</radio-group>
</view>
</view>
@ -23,8 +23,8 @@
<view class="rb-input-title b-flex-x">认证类型<text></text></view>
<view class="rb-radio b-flex-x">
<radio-group @change="companySelect">
<radio value="1" style="transform:scale(0.9)" color="#009876">企业</radio>
<radio value="12" checked style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">个体户</radio>
<radio value="1" :checked="form.customer_type==1" style="transform:scale(0.9)" color="#009876">企业</radio>
<radio value="12" :checked="form.customer_type==12" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">个体户</radio>
</radio-group>
</view>
</view>
@ -83,10 +83,11 @@
<text class="rb-title b-t-B">发票信息</text>
<view class="rb-radio b-flex-x b-mt-50 b-mb-10">
<!-- checked -->
<radio-group @change="radioSelect">
<radio value="1" style="transform:scale(0.9)" color="#009876">不开发票</radio>
<radio value="2" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">电子普票</radio>
<radio value="3" checked style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">增值税发票</radio>
<radio value="1" :checked="form.invoice_info.invoice_type==1" style="transform:scale(0.9)" color="#009876">不开发票</radio>
<radio value="2" :checked="form.invoice_info.invoice_type==2" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">电子普票</radio>
<radio value="3" :checked="form.invoice_info.invoice_type==3" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">增值税发票</radio>
</radio-group>
</view>
<block v-if="form.invoice_info.invoice_type==2">
@ -218,7 +219,7 @@ export default {
}
},
form: {//auth_data
"account_name": "广州欧轩test",
"account_name": "",
"account_name_type": 1,
"qualification": "",// string media_id jpg,jpeg .bmp.gif .png
"account_supplemental": [], // array<string> - media_id jpg,jpeg .bmp.gif .png
@ -256,7 +257,7 @@ export default {
"pay_type": 2,
"service_appid": "",
"third_party_phone": "02022102214"
"third_party_phone": ""
}
}
@ -312,9 +313,18 @@ export default {
toCertifyRes(){
util.routeTo(`/subpackage/party/pages/miniapp/certify_res?appid=${this.appid}`,"nT")
},
wxauth(){
let _data = this.getGateWayJson('wxauth')
wxauth(){//
// let _data = this.getGateWayJson('wxauth')
let _data = {//
"appid": this.appid,
"module": "/wxa/sec/wxaauth",
"method": "POST",
"form": {}
}
// console.log(33333,_data)
// delete _data['localImg']
_data.form['auth_data'] = this.form
console.log("wxautht提交:",_data)
servers.post({
url: party_api.gatewayDo,
data: _data,
@ -409,6 +419,7 @@ export default {
console.error("先去api.js定义透传数据:",jname)
return util.showNone("接口不存在")
}
console.log(555566666,_data)
_data.appid = appid;
return _data
},

33
src/subpackage/party/pages/miniapp/certify_res.vue

@ -5,23 +5,23 @@
<view class="cr-box-top-title b-t-B">查询结果</view>
<view class="cr-box-top-content">
<view class="cr-box-top-item b-flex-x b-flex-s">
<text class="b-t-28">任务状态:</text>
<text class="b-t-28 b-t-B">任务状态</text>
<text class="b-t-28 ">{{getTaskTxt(result.task_status)}}</text>
</view>
<view class="cr-box-top-item b-flex-x b-flex-s">
<text class="b-t-28">审核单状态:</text>
<text class="b-t-28 b-t-B">审核单状态</text>
<text class="b-t-28 b-t-red">{{ getApplyTxt(result.apply_status) }}</text>
</view>
<view class="cr-box-top-item b-flex-x b-flex-s">
<text class="b-t-28">认证订单号:</text>
<text class="b-t-28 b-t-B">认证订单号</text>
<text class="b-t-28 ">{{result.orderid}}</text>
</view>
<view class="cr-box-top-item b-flex-x b-flex-s" v-if="result.apply_status ==3">
<text class="b-t-28">打回重填原因:</text>
<text class="b-t-28 b-t-B">打回重填原因</text>
<text class="b-t-28 ">{{result.refill_reason}}</text>
</view>
<view class="cr-box-top-item b-flex-x b-flex-s" v-if="result.apply_status ==5">
<text class="b-t-28">认证失败原因:</text>
<text class="b-t-28 b-t-B">认证失败原因</text>
<text class="b-t-28 ">{{result.fail_reason}}</text>
</view>
</view>
@ -29,7 +29,7 @@
<view class="hold-place"></view>
<view class="cr-box-bottom ">
<view class="cr-box-bottom " v-if="qrcodeText">
<!-- qr-code -->
<view class="cr-box-bottom-item b-flex-y b-flex-c">
<!-- <image v-if="result.auth_url" class="cr-box-bottom-img" :src="result.auth_url"></image> -->
@ -41,7 +41,7 @@
</view>
<view class="cr-box-bottom-item b-flex-y b-flex-c">
<text class="b-t-32 b-mt-60">查询请用与创建信息致的微信扫验证,完成授权确认</text>
<text class="b-t-32 b-mt-60">查询请用与创建信息致的微信扫验证,完成授权确认</text>
</view>
</view>
@ -67,15 +67,15 @@ export default {
qrcodeText:"",
qrcodeSrc:"",
qrcodeSize: 200,
appid: "wxc141a743225e7885",
appid: "",
result: {
"appid": "wxeb7efb9a1cbdd554",
"apply_status": 1,
"auth_url": "https://mp.weixin.qq.com/publicpoc/fastregisterwxaauth?action=scan&tid=4959e9ad8ec74ec4a4136be6b340e340#wechat_redirect",
"appid": "",
"apply_status": "",
"auth_url": "",
"errcode": 0,
"errmsg": "ok: ok",
"orderid": 16988765364484129000,
"task_status": 1
"errmsg": "",
"orderid": "",
"task_status": ""
},
}
},
@ -106,7 +106,7 @@ export default {
14: '验证失败',
15: '等待支付'
}
return map_task_status[status]||"未知状态"
return map_task_status[status]||"未认证"
}
},
getApplyTxt(){
@ -119,7 +119,7 @@ export default {
4: '认证通过',
5: '认证最终失败(不能再修改)'
}
return map_apply_status[status]||"未知状态"
return map_apply_status[status]||"未认证"
}
},
},
@ -171,7 +171,6 @@ export default {
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
},
makeQR() {
uni.showLoading({

8
src/subpackage/party/pages/miniapp/record.vue

@ -735,9 +735,9 @@ export default {
},
onLoad(opts) {
console.log("onload-", opts)
if(!opts.appid){
opts.appid = "wxc141a743225e7885"
}
// if(!opts.appid){
// opts.appid = "wxc141a743225e7885"
// }
this.appid = opts.appid;
this.getData();
// this.getTempDraft();
@ -932,6 +932,7 @@ export default {
let _res = res.data.data
if(res.data.code==0){
util.showNone("提交成功")
util.routeTo(`/subpackage/party/pages/miniapp/record_res?appid=${this.appid}`,"nT")
return
}else{
util.showNone(res.data.message)
@ -942,7 +943,6 @@ export default {
})
// this.applyIcpFiling()
// util.routeTo("/subpackage/party/pages/login/reviewing", "nT")
},
editTempDraft(){
// return util.showNone("")

2
src/subpackage/party/pages/miniapp/record_pre.vue

@ -15,7 +15,7 @@
<button @click="searchIcpVerifyTask"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 340rpx;height: 112rpx;">下一步</button>
<button @click="toRecordResult"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 340rpx;height: 112rpx;">查询备案状态</button>
<!-- <button @click="toRecordResult"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 340rpx;height: 112rpx;">查询备案状态</button> -->
</view>
</template>

101
src/subpackage/party/pages/miniapp/record_res.vue

@ -17,7 +17,7 @@
<!-- <button @click="SubmitEvent"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 100%;height: 112rpx;">开始申请</button> -->
<view class="u-steps">
<uni-steps :options="step_options" :active="step_options.length-1" direction="column" activeColor="#009874" activeIcon="circle-filled"></uni-steps>
<uni-steps :options="options" :active="0" direction="column" activeColor="#009874" activeIcon="circle-filled"></uni-steps>
</view>
<view class="b-t-red">验证超时则需要重新走备案流程</view>
@ -39,6 +39,7 @@ export default {
},
data() {
return {
appid: "",
options:[{
title:"平台初审",
desc:"平台审核中"
@ -56,9 +57,10 @@ export default {
desc:"备案成功"
}],
appData:{
info:{
status:4
},
audit_data: [],
available: 1,
is_canceling: false,
status: 0,
},
statusMap: {
2: '平台审核中',
@ -78,12 +80,12 @@ export default {
}
},
onLoad(opts) {
console.log("onload-", this.brandInfo.brand.id)
if(!opts.appid){
opts.appid = "wxc141a743225e7885"
}
// console.log("onload-", this.brandInfo.brand.id)
// if(!opts.appid){
// opts.appid = "wxc141a743225e7885"
// }
this.appid = opts.appid;
// this.getData();
this.getData();
},
onShow() {
@ -91,80 +93,6 @@ export default {
computed: {
...mapState(['brandInfo',]),
step_options(){
let arr = []
let status = this.appData.info.status
if(this.appData.info.status==2){
arr.push({
title:"平台初审",
desc:"平台审核中"
})
}else if(this.appData.info.status==3){
arr.push({
title:"平台初审",
desc:"平台审核中"
})
arr.push({
title:"平台审核结果",
desc:"平台审核驳回"
})
}else if(this.appData.info.status==4){
arr.push({
title:"平台初审",
desc:"平台审核中"
})
arr.push({
title:"平台审核结果",
desc:"平台审核通过"
})
arr.push({
title:"管局审核",
desc:"管局审核中"
})
}else if(this.appData.info.status==5){
arr.push({
title:"平台初审",
desc:"平台审核中"
})
arr.push({
title:"平台审核结果",
desc:"平台审核通过"
})
arr.push({
title:"管局审核",
desc:"管局审核中"
})
arr.push({
title:"管局审核结果",
desc:"管局审核通过"
})
}else if(this.appData.info.status==6){
arr.push({
title:"平台初审",
desc:"平台审核中"
})
arr.push({
title:"平台审核结果",
desc:"平台审核通过"
})
arr.push({
title:"管局审核",
desc:"管局审核中"
})
arr.push({
title:"管局审核结果",
desc:"管局审核通过"
})
arr.push({
title:"已备案",
desc:"备案成功"
})
}else{
arr.push({
title:"未审核",
desc:this.statusMap[status]
})
}
return arr
}
},
watch: {
@ -174,7 +102,7 @@ export default {
},
methods: {
async getData() {
util.showLoad("加载中")
// util.showLoad("")
try {
const res = await this.gatewayDo({
appid: this.appid,
@ -189,8 +117,8 @@ export default {
// form: {}
// });
// console.log(res1);
if (res.data.errcode === 0) {
console.log(123,res);
if (res.code == 0) {
console.log(res.data);
this.appData = res.data.info;
} else {
@ -228,7 +156,6 @@ export default {
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
}
}
}

97
src/subpackage/party/pages/miniapp/regist.vue

@ -10,8 +10,14 @@
<view class="certify-yes">{{['实名验证成功', '实名验证中', '实名验证失败'][appInfo.realname_status]}}</view>
</view>
<view class="rb-box-right b-flex-x b-flex-c" @click="toCertify">
<view>去认证</view>
<!-- <view class="rb-box-right b-flex-x b-flex-c" @click="toCertifyRes">
<view>查询</view>
<text class="b-icon icon-right b-text-black-dd"></text>
</view> -->
<view class="rb-box-right b-flex-x b-flex-c" >
<view @click="toCertifyRes">查询认证</view>
<view @click="toCertify">去认证</view>
<text class="b-icon icon-right b-text-black-dd"></text>
</view>
</view>
@ -21,7 +27,7 @@
<view class="rb-input-box b-flex-x b-flex-b">
<view class="input-width-more b-flex-x b-t-B">
<text class="b-t-32">备案状态</text><text>*</text>
<view class="" :class="[icp_btn_style]" >{{statusMap_icp[icpInfo.status]||icpInfo.status}}</view>
<view v-if="icpInfo.status" class="" :class="[icp_btn_style]" >{{statusMap_icp[icpInfo.status]||"未备案"}}</view>
</view>
<view class="rb-box-right b-flex-x b-flex-c" @click="toIcp">
@ -46,7 +52,7 @@
<text class="rb-input-img-text">点击上传</text>
</view>
<view class="b-flex-as-e b-ml-40 b-t-24 b-t-green b-t-B b-t-U">重新上传</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>
@ -91,7 +97,7 @@
<!-- <button class="b-btn b-btn-green b-btn-sm b-mr-40" @click="clickSet(3)">设置</button> -->
</view>
<view class="rb-class" v-for="(e,i) in categoryInfo.categories">
<view class="rb-class" v-for="(e,i) in categoryInfo.categories" :key="i">
<view class="b-flex-x">类目名称: <text>{{e.first_name}}/{{e.second_name}}</text></view>
<!-- <view class="b-flex-x">类目状态: <text class="b-t-green" :class="">{{auditList[e.audit_status]}}</text></view> -->
<view class="b-flex-x">类目状态: <text class="b-t-green" :class="[category_style(e.audit_status)]">{{audit_list_txt(e.audit_status)}}</text></view>
@ -109,13 +115,13 @@
<view class="rb-upload-list b-flex-x b-flex-a">
<view class="rb-upload-item idcard-width-170 b-flex-y b-flex-c">
<image class="rb-upload-bg " src="../../static/regist/id_people.png"
:src="submitData.extension.business_id_card_url?submitData.extension.business_id_card_url:localImg.idCardFront"></image>
:src="submitData.extension.business_id_card_url?submitData.extension.business_id_card_url:'../../static/regist/id_people.png'"></image>
<image class="rb-upload-cam" src="../../static/regist/camera.png"></image>
<text class="rb-input-img-text">上传身份证头像面</text>
</view>
<view class="rb-upload-item idcard-width-170 b-flex-y b-flex-c">
<image class="rb-upload-bg " src="../../static/regist/id_guohui.png"
:src="submitData.extension.business_id_card_back_url?submitData.extension.business_id_card_back_url:localImg.idCardBack"></image>
:src="submitData.extension.business_id_card_back_url?submitData.extension.business_id_card_back_url:'../../static/regist/id_guohui.png'"></image>
<image class="rb-upload-cam" src="../../static/regist/camera.png"></image>
<text class="rb-input-img-text">上传身份证国徽面</text>
</view>
@ -195,13 +201,13 @@
</view> -->
<miniappChangeName v-if="showChangeNameModule"
:nameInfo="nameInfo" :appid="appid"
:appInfo="appInfo" :appid="appid"
@sure="nameChange"
@close="showChangeNameModule = false"
></miniappChangeName>
<miniappChangeJianJie v-if="showChangeJianJieModule"
:appid="appid"
:appInfo="appInfo" :appid="appid"
@sure="jianjieChange"
@close="showChangeJianJieModule = false"
></miniappChangeJianJie>
@ -239,30 +245,30 @@ export default {
animation:true,
appInfo:{
"account_type": 3,
"appid": "wxeb7efb9a1cbdd554",
"credential": "91440101MA9XP4D2XW",
"appid": "",
"credential": "",
"customer_type": 0,
"errcode": 0,
"errmsg": "ok",
"head_image_info": {
"head_image_url": "http://wx.qlogo.cn/mmhead/mOW261WJzibug0Qe1lZiaHGicjibdNzI2Qz0pjBeoqlIzZxwlJwGsj78c8MuhiaWtxBlTfe42qvTVXI4/0",
"head_image_url": "",
"modify_quota": 5,
"modify_used_count": 1
},
"nickname": "欧轩企业管理2",
"nickname": "",
"nickname_info": {
"modify_quota": 2,
"modify_used_count": 1,
"nickname": "欧轩企业管理2"
"modify_quota": 0,
"modify_used_count": 0,
"nickname": ""
},
"principal_name": "广州欧轩企业管理有限公司",
"principal_name": "",
"principal_type": 1,
"realname_status": 1,
"registered_country": 1017,
"signature_info": {
"modify_quota": 5,
"modify_used_count": 1,
"signature": "提供企业管理服务简介"
"signature": ""
},
"wx_verify_info": {
"naming_verify": false,
@ -276,11 +282,11 @@ export default {
"credit_end_date": "0", //2006-01-02 0
"company_type": 1,//
"legal_person_name": "",//
"registered_province_code": 440000,// 110000
"registered_city_code": 440100,// 110100
"registered_capital": 1010000,// 100000
"business_id_card_url": "https://imgcdn.ouxuanzhineng.cn/upload/business_id_card_url/79a41229df038e0e10583d2db0d4f49f.png",
"business_id_card": "123456789",//--
"registered_province_code": "",// 110000
"registered_city_code": "",// 110100
"registered_capital": "",// 100000
"business_id_card_url": "",
"business_id_card": "",//--
"business_id_card_back_url":"",//
},
},
@ -291,13 +297,13 @@ export default {
5: '管局审核驳回',
6: '已备案',
1024: '未备案',
1025: '未备案 && 小程序信息未填',
1026: '未备案 && 小程序类目未填',
1027: '未备案 && 小程序信息未填 && 小程序类目未填',
1028: '未备案 && 小程序未认证',
1029: '未备案 && 小程序信息未填 && 小程序未认证',
1030: '未备案 && 小程序类目未填 && 小程序未认证',
1031: '未备案 && 小程序信息未填 && 小程序类目未填 && 小程序未认证'
// 1025: ' && ',
// 1026: ' && ',
// 1027: ' && && ',
// 1028: ' && ',
// 1029: ' && && ',
// 1030: ' && && ',
// 1031: ' && && && '
},
icpInfo:{},
nameInfo:{
@ -325,15 +331,13 @@ export default {
},
async onLoad(opts) {
console.log("onload-", opts)
let _brandInfo = await this.$store.dispatch('getBrandInfo');
console.log("_brandInfo:",_brandInfo)
this.brandInfo = _brandInfo
this.appid = opts.appid;
// util.showNone("onLoad")
this.getCurrentAppInfo()
this.getWebBrandUser()
this.getCurrentAppInfo() //
this.getWebBrandUser() //-
this.get_icp_entrance_info()//
this.getcategory()
this.getAllCategoriesByType()
@ -344,7 +348,7 @@ export default {
computed: {
// ...mapState(['brandInfo',])
icp_btn_style(){
return this.icpInfo.status == 6 ? "certify-yes" : "certify-yes"
return this.icpInfo.status == 6 ? "certify-yes" : "certify-no"
},
category_style(){
return function(status){
@ -623,14 +627,16 @@ export default {
try {
let res = await this.gatewayDo(data);
// const { info } = res.data;
consoe.log("setJianJie:",res)
console.log("setJianJie888:",res)
if (res.data.errcode === 0) {
console.log(res);
util.showNone("修改成功")
this.getCurrentAppInfo()
} else {
util.showNone(res.data.errmsg)
}
} catch (error) {
console.log("setJianJie-err", error)
}
},
async setHeadImage(mediaid) {
@ -652,6 +658,7 @@ export default {
if (res.data.errcode === 0) {
console.log(res);
util.showNone("修改成功")
this.getCurrentAppInfo()
} else {
util.showNone(res.data.errmsg)
}
@ -682,6 +689,9 @@ export default {
toCertify(){
util.routeTo(`/subpackage/party/pages/miniapp/certify?appid=${this.appid}`,"nT")
},
toCertifyRes(){
util.routeTo(`/subpackage/party/pages/miniapp/certify_res?appid=${this.appid}`,"nT")
},
nameChange(e){
console.log("nameChange",e)
},
@ -759,23 +769,19 @@ export default {
// #ifdef H5
url+= "?token=" + "2187a643-4d4a-11ee-a364-5254005df464"
// #endif
if(this.appid) postJson.appid = this.appid
return servers.post({
url: url,
data: postJson,
isDefaultGet: false,
})
.then(res => {
console.log("gatewayDo:", res.data)
console.log("gatewayDo 0 :", res.data)
if(res.data.code!=0){
return util.showNone(res.data.message)
}else{
return res.data
}
// if (res.statusCode == 200) {
// return res.data
// } else {
// console.warn("gatewayDo-err", res.data)
// }
})
.catch(err => {
console.log("gatewayDo-err", err)
@ -854,7 +860,6 @@ export default {
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
}
}
}
@ -1111,7 +1116,9 @@ page {
color: #333333;
// width: 168rpx;
// position: absolute;
>text:first-child {
// width: 188rpx;
}
>text:last-child {
color: $b-color-red;
}

157
src/subpackage/party/pages/miniapp/regular.vue

@ -16,8 +16,19 @@
</view>
<view class="rb-input-box rb-line b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">证件类型<text>*</text></view>
<input v-model="verify_info.code_type" class="rb-input" type="text" placeholder="请输入证件类型"
<!-- <input v-model="verify_info.code_type" class="rb-input" type="text" placeholder="请输入证件类型"
placeholder-class="input-hold-class"></input> -->
<picker mode="selector" @change="bindPickerChange_code_types"
:value="code_type_arr[code_type_index]" :range="code_type_arr">
<!-- <input @click="" class="rb-input" disabled=true v-model="company_type_show" type="text"
name="qiye_type" placeholder="请选择" placeholder-class="input-hold-class">
</input> -->
<!-- v-model="verify_info.code_type" -->
<input v-model="code_type_show" disabled=true class="rb-input" type="text" placeholder="请选择证件类型"
placeholder-class="input-hold-class"></input>
</picker>
<text class="b-icon icon-right b-t-gray b-t-28"></text>
</view>
<view class="rb-input-box rb-line b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">证件号<text>*</text></view>
@ -26,7 +37,7 @@
</view>
<view class="rb-input-box rb-line b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">法人姓名<text>*</text></view>
<input v-model="verify_info.legal_persona_wechat" class="rb-input" type="text" placeholder="请输入法人姓名"
<input v-model="verify_info.legal_persona_name" class="rb-input" type="text" placeholder="请输入法人姓名"
placeholder-class="input-hold-class"></input>
</view>
<!-- <view class="rb-input-box rb-line b-flex-x b-flex-b">
@ -96,9 +107,9 @@
<text class="txt1">转正成功</text>
<text class="txt2">您的微信将收到微信消息请进行小程序法人确认</text>
<button class="b-btn b-btn-white c-green" style="width: 500rpx;height: 112rpx;">重新填写资料</button>
<!-- <button class="b-btn b-btn-white c-green" @click="toCertify" style="width: 500rpx;height: 112rpx;">重新填写资料</button> -->
<button class="b-btn b-btn-green b-mt-60" style="width: 500rpx;height: 112rpx;">确认完成前往认证</button>
<button class="b-btn b-btn-green b-mt-60" @click="toCertify" style="width: 500rpx;height: 112rpx;">确认完成前往认证</button>
</view>
</view>
@ -123,19 +134,25 @@ export default {
showRegular:true,
brandInfo:"",
verify_info: {
"code": "23123123123",//
"code": "",//
"code_type": 1,//
"component_phone": "020-22102214",//
"enterprise_name": "test-试用转正名称",//
"legal_persona_idcard": "413876199929937272",//
"legal_persona_name": "test_fa_ren_name",//
"legal_persona_wechat": "wx_999",//
"component_phone": "",//
"enterprise_name": "",//
"legal_persona_idcard": "",//
"legal_persona_name": "",//
"legal_persona_wechat": "",//
},
code_type_show: "请选择证件类型",
// 118 29 xxxxxxxx-x 3(15 )
code_type_arr: ["统一社会信用代码18 位)", "组织机构代码(9 位)", "营业执照注册号"],
code_type_index: 0,
}
},
async onLoad() {
util.showNone("onLoad")
// util.showNone("onLoad")
let _brandInfo = await this.$store.dispatch('getBrandInfo');
console.log("_brandInfo:",_brandInfo)
this.brandInfo = _brandInfo
@ -143,7 +160,7 @@ export default {
this.getVerifyMiniAppInfo()
},
onShow() {
},
computed: {
// ...mapState(['brandInfo',])
@ -154,6 +171,86 @@ export default {
},
},
methods: {
showModuleMsg(msg){
return new Promise((resolve, reject) => {
uni.showModal({
title: '提示',
content: msg,
showCancel: false,
confirmText: '知道了',
confirmColor: '#009874',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
resolve()
}
}
});
})
},
//TODO
webUserGet(){
let token_web = uni.getStorageSync('token_web');
let token = uni.getStorageSync('token');
let _data = {
token_web: token_web||"",
token:token||""
}
return servers.post({
url: party_api.webUserGet,
data: _data,
failMsg: '获取信息失败!'
})
.then(res=>{
console.log('webUserGet:',res)
this.setWebUserInfoToData(res)
return res
}).catch(err=>{
console.warn('bindUserOpenid err',err)
util.showNone(err.message || '获取信息失败!');
})
},
setCompanyCode(code){
if(code.length == 18){
this.code_type_index = 0
this.code_type_show = this.code_type_arr[0]
this.verify_info.code_type = 1
}else if(code.length == 9){
this.code_type_index = 1
this.code_type_show = this.code_type_arr[1]
this.verify_info.code_type = 2
}else if(code.length == 15){
this.code_type_index = 2
this.code_type_show = this.code_type_arr[2]
this.verify_info.code_type = 3
}
},
setWebUserInfoToData(info){
let {verify_info} = this
verify_info.code_type = info.code_type||""
verify_info.component_phone = info.mobile||""
verify_info.enterprise_name = info.company_name||""
verify_info.legal_persona_idcard = info.extension.business_id_card||""
verify_info.code = info.agency_code||"" //
verify_info.legal_persona_name = info.extension.legal_person_name||""
this.setCompanyCode(info.agency_code)
},
bindPickerChange_code_types(e) {
console.log('bindPickerChange_code_types:', e.detail.value)
this.code_type_index = e.detail.value
this.code_type_show = this.code_type_arr[e.detail.value]
this.verify_info.code_type = Number(e.detail.value) + 1
//
this.verify_info.code = ""
},
toCertify(){
let appid = this.appid
util.routeTo(`/subpackage/party/pages/miniapp/regist`,"nT")
},
getVerifyMiniAppInfo(){
return servers.get({
url: party_api.getVerifyMiniAppInfo,
@ -164,7 +261,14 @@ export default {
})
.then(res=>{
console.log('getVerifyMiniAppInfo',res)
this.verify_info = res.verify_info
if(res.verify_info){
this.webUserGet()
// this.verify_info = res.verify_info
}else{
util.showNone('获取已填写信息')
this.webUserGet()
}
return res
}).catch(err=>{
console.warn('getVerifyMiniAppInfo err',err)
@ -173,7 +277,28 @@ export default {
idTimeChange(e){
console.log(e.detail)
},
verifybetaweapp(){
async verifybetaweapp(){
if(!this.verify_info.enterprise_name){
return this.showModuleMsg('请输入公司名称')
}
if(!this.verify_info.code){
return this.showModuleMsg('请输入证件号')
}
if(!this.verify_info.code_type){
return this.showModuleMsg('请选择证件类型')
}
if(!this.verify_info.legal_persona_name){
return this.showModuleMsg('请输入法人姓名')
}
if(!this.verify_info.legal_persona_wechat){
return this.showModuleMsg('请输入法人微信号')
}
if(!this.verify_info.legal_persona_idcard){
return this.showModuleMsg('请输入法人身份证')
}
await this.showModuleMsg('请确认微信号为法人微信号!否则无法完成转正操作!')
let _data = {
brand_id: this.brandInfo.brand.id,
...this.verify_info
@ -189,9 +314,11 @@ export default {
return res
}).catch(err=>{
console.warn('verifybetaweapp err',err)
// this.SubmitEvent()
})
},
SubmitEvent(){
async SubmitEvent(){
await this.showModuleMsg('请等待法人完成转正操作后, 再去进行小程序的认证与备案操作!')
// util.routeTo("/subpackage/party/pages/miniapp/regular_res","nT")
this.showRegular = false
}

1
src/subpackage/party/pages/miniapp/unauth.vue

@ -59,7 +59,6 @@ export default {
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
}
}
}

3
src/subpackage/party/pages/miniapp/wx_auth_select.vue

@ -43,6 +43,7 @@
import {
mapState
} from 'vuex'
// const MiniprogramThirdpartyPlugin = requirePlugin('miniprogram-thirdparty-plugin')
export default {
components: {
@ -61,7 +62,7 @@
},
onReady() {
MiniprogramThirdpartyPlugin.init(wx)
// MiniprogramThirdpartyPlugin.init(wx)
},
computed: {
...mapState(['brandInfo', ])

Loading…
Cancel
Save