2 Commits

Author SHA1 Message Date
赵明涛 99e043a73f change 1 year ago
赵明涛 a491802e34 change 1 year ago
  1. 12
      src/js/api.js
  2. 10
      src/manifest.json
  3. 28
      src/pages.json
  4. 117
      src/pages/index/index.vue
  5. 20
      src/pages/login/login.vue
  6. 434
      src/subpackage/party/components/popup-content/miniapp-change-jian-jie.vue
  7. 226
      src/subpackage/party/components/popup-content/miniapp-change-name-0.vue
  8. 231
      src/subpackage/party/components/popup-content/miniapp-change-name-1.vue
  9. 286
      src/subpackage/party/components/popup-content/miniapp-change-name-2.vue
  10. 491
      src/subpackage/party/components/popup-content/miniapp-change-name.vue
  11. 129
      src/subpackage/party/js/api.js
  12. 4637
      src/subpackage/party/js/china-area.js
  13. 194
      src/subpackage/party/pages/index/index.vue
  14. 21
      src/subpackage/party/pages/index/web_view.vue
  15. 219
      src/subpackage/party/pages/login/login.vue
  16. 1058
      src/subpackage/party/pages/login/regist.vue
  17. 54
      src/subpackage/party/pages/login/reviewing.vue
  18. 439
      src/subpackage/party/pages/miniapp/auth.vue
  19. 495
      src/subpackage/party/pages/miniapp/certify.vue
  20. 168
      src/subpackage/party/pages/miniapp/certify_res.vue
  21. 1489
      src/subpackage/party/pages/miniapp/record.vue
  22. 140
      src/subpackage/party/pages/miniapp/record_pre.vue
  23. 118
      src/subpackage/party/pages/miniapp/record_res.vue
  24. 739
      src/subpackage/party/pages/miniapp/regist.vue
  25. 218
      src/subpackage/party/pages/miniapp/regular.vue
  26. 22
      src/subpackage/party/pages/miniapp/unauth.vue
  27. 50
      src/subpackage/party/pages/miniapp/wx_auth_select.vue
  28. 10
      src/uni_modules/cc-defineQRCode/changelog.md
  29. 128
      src/uni_modules/cc-defineQRCode/components/cc-defineQRCode/cc-defineQRCode.vue
  30. 1380
      src/uni_modules/cc-defineQRCode/components/cc-defineQRCode/common/uqrcode.js
  31. 85
      src/uni_modules/cc-defineQRCode/package.json
  32. 162
      src/uni_modules/cc-defineQRCode/readme.md

12
src/js/api.js

@ -154,6 +154,18 @@ API['order'] = {
sessionVerify:`${ORIGIN}/admin/person/number/rule/orderinfo/sessionVerify`, // 次票核销,输入二维码数量核销
}
// 20240325 后台功能迁移到小程序端
API['party'] = {
webBrandUser:`${ORIGIN}/web/webBrandUser/GetOpenId`, //检测用户openid是否与账户绑定,
captchaSms:`${ORIGIN}/captchaSms/send`, // 发送验证码
webLogin:`${ORIGIN}/web/webBrandUser/login`, // 登录
webUserGet:`${ORIGIN}/web/webBrandUser/get`, // 获取用户信息
webUpload:`${ORIGIN}/upload/file/businessLicense`, // 上传图片
webOcr:`${ORIGIN}/ouxuanac/ocr`, // 营业执照识别
// bindingOpenId: `${ORIGIN}/admin/assistant/bindingOpenId`, //改为小程序端绑定openid
bindingOpenId: `${ORIGIN}/assistant/bindingOpenId`, //改为小程序端绑定openid
}
export default { ORIGIN, API };

10
src/manifest.json

@ -60,8 +60,18 @@
"version": "0.3.13",
"provider": "wxb8b928431b8c56d8",
"export": ""
},
"captcha": {
"version": "2.1.0", //
"provider": "wx1fe8d9a3cb067a75"
}
},
// "plugins": {
// "captcha": {
// "version": "2.0.0", //
// "provider": "wx1fe8d9a3cb067a75"
// }
// },
/* wxf1294b279ad1b845 */
"appid" : "wx7106e84614cf0060",
"setting" : {

28
src/pages.json

@ -9,11 +9,7 @@
{
"path": "pages/login/login",
"style": {
"mp-weixin": {
"usingComponents": {
"miniprogram-thirdparty-plugin": "plugin://myPlugin/miniprogram-thirdparty-plugin"
}
}
"navigationBarTitleText": "登录"
}
},
{
@ -727,9 +723,15 @@
}
},
{
"path": "pages/index/web_view",
"style" : {
"navigationBarTitleText": ""
}
},
{
"path": "pages/miniapp/regist",
"style" : {
"navigationBarTitleText": "注册"
"navigationBarTitleText": "完成小程序资料"
}
},
{
@ -757,12 +759,6 @@
}
},
{
"path": "pages/miniapp/regist",
"style" : {
"navigationBarTitleText": "注册留资"
}
},
{
"path": "pages/miniapp/certify",
"style" : {
"navigationBarTitleText": "认证"
@ -795,7 +791,13 @@
{
"path": "pages/login/login",
"style" : {
"navigationBarTitleText": "登录注册"
"navigationBarTitleText": "登录注册" ,
"mp-weixin": {
"usingComponents": {
"t-captcha": "plugin://captcha/t-captcha"
}
}
}
},
{

117
src/pages/index/index.vue

@ -44,10 +44,10 @@
</view>
</view>
</block>
<view class="hold-place-blank">
<!-- <view class="hold-place-blank">
<navigator url="/subpackage/party/pages/index/index">party/pages/index/index</navigator>
<navigator url="/subpackage/party/pages/login/login">party/pages/login/login</navigator>
</view>
</view> -->
</view>
<view class="ox-dark-mask" v-if="isShowAuthorModal">
<view class="ic-author-modal">
@ -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>
@ -147,7 +147,7 @@
{//ICON
id: 11,
name: '系统工具',
path: '/subpackage/party/pages/abnormal_list/abnormal_list',
path: '/subpackage/party/pages/index/index',
serverKey: 1015 // 1015
},
{
@ -196,10 +196,12 @@
}
},
async onLoad(options) {
try{
util.showLoad();
// 20230829
if(options.role !== 'ADMIN-PLATFORM')await this.checkUserAuthor();
util.hideLoad();
this.loginStatus = app.isLogin();
if(!!app.isLogin())this.getIndexInfo();
@ -243,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');
},
@ -286,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;
@ -387,12 +399,103 @@
}).catch(util.hideLoad)
},
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,
failMsg: '加载数据失败!'
})
.then(res=>{
console.log('webBrandUserCheck',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',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)
util.routeTo(`/pages/login/login`,'rL');
})
},
toStoreList(){
if(!app.isLogin())return this.showAuthor();
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>

20
src/pages/login/login.vue

@ -26,7 +26,8 @@
>登录</button>
<view class="lf-tip">提示请联系管理员添加您为员工账号</view>
<view class="lf-bot-btn" @click="toWebView">成为商家</view>
<!-- <view class="lf-bot-btn" @click="toWebView">成为商家</view> -->
<view class="lf-bot-btn" @click="toPartyLogin">商家注册</view>
<!-- <view class="lf-bot-btn" @click="thirdPartyAuthor">test请求商家授权authorize</view> -->
<!-- <view class="lf-bot-btn" @click="thirdPartyOpenTrial">test打开试用小程序</view> -->
@ -71,6 +72,10 @@ export default {
},
methods: {
//
toPartyLogin(){
util.routeTo(`/subpackage/party/pages/login/login`,'nT');
},
thirdPartyAuthor(){
//
// let token = "iQhrBPQszUtqc-W59-gnfLTSL-OpZRCKoe89VKGBKvOTQ9BXeLc5q3F4a_Nl7Vpm"
@ -92,6 +97,19 @@ export default {
}
})
},
requestFastRequest(){
},
getCreateToken(json){
// jsondataauthorize_url
const authorizeUrl = json.data.authorize_url;
// 使URLSearchParamsURL
const params = new URLSearchParams(authorizeUrl.split('?')[1]);
// create_token
const createToken = params.get('create_token');
// create_token
return createToken;
},
thirdPartyOpenTrial(){
//
MiniprogramThirdpartyPlugin.openTrial({

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

@ -0,0 +1,434 @@
<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="showPopup = false"></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>
<!-- 可修改次数,已修改次数 -->
<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>
<view class=" b-flex-x b-mt-10 b-mb-30" >
<button class="b-btn b-btn-green " @click="clickChangeName">确认修改</button>
</view>
<view class="rb-line"></view>
<view class="rb-text b-t-24 b-t-red b-p-40">
<text >{{checkNameRes.message||checkNameRes.data.wording}}</text>
<!-- <text v-else>你申请的名称涉及特定地域范围或地理名称需要经过平台审核后才可使用你可以直接提交审核或提供商标注册证等材料以证明你可使用该地域范围或地理名称作为账号名称否则可能审核不通过</text> -->
</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: {
appInfo: {
type: Object,
default: ()=>({
})
},
appid: {
type: String,
default: ''
}
},
computed: {
...mapState(['brandInfo']),
},
data() {
return {
showPopup:true,
userInputName: '',//
checkNameRes: "",//
// input_amount: "",
// selectType: 1, //1() 2()
}
},
methods: {
moveHandle(){},
clickChangeName(){
if(this.userInputName == '')return util.showNone('请输入名称!');
this.$emit('sure',this.userInputName);
},
closeChange(){
console.log("closeChange")
this.$emit('close');
},
async clickSure(){
await this.setnickname().then(res=>{
console.log("setnickname-res", res)
this.showPopup = false;
this.$emit('sure',this.nameInfo);
})
},
clickCheckName(){
if(this.userInputName == '')return util.showNone('请输入名称!');
this.checkwxverifynickname();
},
async clickUploadImg(which){
if(this.selectType=="")return util.showNone('请选择类型!');
//whick id_card: mediaid
//license mediaid
this.localImg[which].url = await this.getLocalImg();
console.log("clickUploadImg-111", this.localImg[which])
this.localImg[which].mediaid = await this.getUploadImgMediaId(this.localImg[which].url);
console.log("clickUploadImg-222", this.localImg[which])
//,
// this.localImg[which].url = await this.getUploadImgURL(this.localImg[which].url);
},
resetLocalImg(){
this.localImg = {
id_card: {
mediaid: '',
url: '',
txt:"身份证照片"
},
license: {
mediaid: '',
url: '',
txt:"组织机构代码证或营业执照"
},
naming_other_stuff_1: {
mediaid: '',
url: '',
txt:"关键词补充材料"
}
}
},
getUploadImgURL(tempFilePath){
return servers.uploadFile({
url: party_api.webUpload,
filePath: tempFilePath,
name: 'file',
formData: {}
})
.then(res=>{
console.log("uploadFile-res", res)
if(res.statusCode == 200){
// console.log("uploadFile-url 1", res.data.data.url)
let _data = JSON.parse(JSON.stringify(res.data))
console.log("uploadFile-url return type", typeof(_data))
// console.log("uploadFile-url ", JSON.parse(_data))
_data = JSON.parse(_data).data
return _data.url
}
})
.catch(err=>{
console.log("uploadFile-err", err)
})
},
//
getLocalImg() {
console.log("clickUploadImg");
return new Promise((resolve, reject) => {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
console.log("chooseImage", res)
let tempFilePaths = res.tempFilePaths[0];
resolve(tempFilePaths)
},
fail: (err) => {
console.log("chooseImage-err", err)
reject(err)
}
});
})
},
getUploadImgMediaId(tempFilePath){
let appid = this.appid
let _param_str = `module=/cgi-bin/media/upload&appid=${appid}`
let _url = party_api.gatewayDoDuplicate+"?"+_param_str
return servers.uploadFile({
url: _url,
filePath: tempFilePath,
name: 'image',
formData: {
'form.type':"image"
}
})
.then(res=>{
console.log("uploadFile-gatewayDoDuplicate-res", res)
if(res.statusCode == 200){
let _data = JSON.parse(JSON.stringify(res.data))
console.log("uploadFile-url return type", typeof(_data))
_data = JSON.parse(_data).data
console.log("uploadFile-gatewayDoDuplicate-上传成功 接口真正数据", _data)
return _data.media_id
}
})
.catch(err=>{
console.log("uploadFile-err", err)
})
},
getUploadImgURL(tempFilePath){
return servers.uploadFile({
url: party_api.webUpload,
filePath: tempFilePath,
name: 'file',
formData: {}
})
.then(res=>{
console.log("uploadFile-res", res)
if(res.statusCode == 200){
// console.log("uploadFile-url 1", res.data.data.url)
let _data = JSON.parse(JSON.stringify(res.data))
console.log("uploadFile-url return type", typeof(_data))
// console.log("uploadFile-url ", JSON.parse(_data))
_data = JSON.parse(_data).data
return _data.url
}
})
.catch(err=>{
console.log("uploadFile-err", err)
})
},
setnickname(){
let _data = this.getGateWayJson('setnickname')
_data.form.nick_name = this.userInputName
_data.form.id_card = this.localImg.id_card.mediaid
_data.form.license = this.localImg.license.mediaid
console.log("setnickname:",_data)
return servers.post({
url: party_api.gatewayDo,
data: _data,
isDefaultGet: false,
})
.then(res=>{
console.log("setnickname:", res.data)
if(res.data.code!=0){
util.showNone("设置失败")
console.log("setnickname-err", res.data)
}else{
util.showNone('设置成功')
}
})
.catch(err=>{
console.log("setnickname-err", err)
})
},
checkwxverifynickname(){
this.checkNameRes = {}
let _data = this.getGateWayJson('checkwxverifynickname')
_data.form.nick_name = this.userInputName
console.log("getaccountbasicinfo:",_data)
servers.post({
url: party_api.gatewayDo,
data: _data,
isDefaultGet: false,
})
.then(res=>{
console.log("checkwxverifynickname:", 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
},
confirmChange(){
let { brandInfo, orderInfo, input_amount, selectType } = this
if(input_amount == '')return util.showNone('请输入金额!');
util.showLoad();
deviceServer.get({
url: deviceApi.timeOrderEnd,
data: {
brand_id: brandInfo.brand.id,
order_no: orderInfo.order_no,
pay_amount: parseFloat(input_amount),
end_type: selectType==1?'end_timing':selectType==2?'end_order':'',
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
util.showNone('操作成功!');
this.$emit('close');
// setTimeout(()=>uni.navigateBack(),1200);
this.$emit('timeEndBtn');
})
},
selectBtn(type){
this.selectType = type
},
selectChange(e){
console.log(e.detail)
this.selectType = e.detail.value
},
},
}
</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>

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

@ -0,0 +1,226 @@
<template>
<!-- 弹窗 -->
<view class="m-popup b-popup " v-if="showPopup" :class="[directionClass,{'b-popup-round':round},{'b-popup-animation':animation}]">
<view class="b-popup-shade" @click="showPopup = false"></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="showPopup = false"></text>
</view>
<view class="b-t-B b-t-36 b-mb-40">小程序名称设置</view>
<input class="bc-input b-mb-50" 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>
<view class="rb-line"></view>
<view class="rb-text b-t-24 b-t-red b-p-40">
<text>你申请的名称涉及特定地域范围或地理名称需要经过平台审核后才可使用你可以直接提交审核或提供商标注册证等材料以证明你可使用该地域范围或地理名称作为账号名称否则可能审核不通过</text>
</view>
<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">
<button class="b-btn b-btn-green b-mr-40" @click="showPopup = false">取消</button>
<button class="b-btn b-btn-green " @click="showPopup = false">确定</button>
</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: ()=>({})
}
},
computed: {
...mapState(['brandInfo']),
},
onmounted(){
console.log("onmounted123",this.nameInfo)
},
data() {
return {
showPopup:true,
input_amount: "",
selectType: 1, //1() 2()
}
},
methods: {
moveHandle(){},
closeChange(){
this.$emit('close');
},
confirmChange(){
let { brandInfo, orderInfo, input_amount, selectType } = this
if(input_amount == '')return util.showNone('请输入金额!');
util.showLoad();
deviceServer.get({
url: deviceApi.timeOrderEnd,
data: {
brand_id: brandInfo.brand.id,
order_no: orderInfo.order_no,
pay_amount: parseFloat(input_amount),
end_type: selectType==1?'end_timing':selectType==2?'end_order':'',
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
util.showNone('操作成功!');
this.$emit('close');
// setTimeout(()=>uni.navigateBack(),1200);
this.$emit('timeEndBtn');
})
},
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>

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

@ -0,0 +1,231 @@
<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="showPopup = false"></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="showPopup = false"></text>
</view>
<view class="b-t-B b-t-36 b-mb-40">小程序名称设置</view>
<input class="bc-input b-mb-50" 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>
<view class="rb-line"></view>
<view class="rb-text b-t-24 b-t-red b-p-40">
<text>你申请的名称涉及特定地域范围或地理名称需要经过平台审核后才可使用你可以直接提交审核或提供商标注册证等材料以证明你可使用该地域范围或地理名称作为账号名称否则可能审核不通过</text>
</view>
<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">
<button class="b-btn b-btn-green b-mr-40" @click="closeChange">取消</button>
<button class="b-btn b-btn-green " @click="clickSure">确定</button>
</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: ()=>({
showPopup:true,
})
}
},
computed: {
...mapState(['brandInfo']),
},
data() {
return {
showPopup:true,
input_amount: "",
selectType: 1, //1() 2()
}
},
methods: {
moveHandle(){},
closeChange(){
this.$emit('close');
},
clickSure(){
this.showPopup = false;
this.$emit('sure',this.nameInfo);
},
confirmChange(){
let { brandInfo, orderInfo, input_amount, selectType } = this
if(input_amount == '')return util.showNone('请输入金额!');
util.showLoad();
deviceServer.get({
url: deviceApi.timeOrderEnd,
data: {
brand_id: brandInfo.brand.id,
order_no: orderInfo.order_no,
pay_amount: parseFloat(input_amount),
end_type: selectType==1?'end_timing':selectType==2?'end_order':'',
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
util.showNone('操作成功!');
this.$emit('close');
// setTimeout(()=>uni.navigateBack(),1200);
this.$emit('timeEndBtn');
})
},
selectBtn(type){
this.selectType = type
},
idTimeChange(e){
console.log(e.detail)
},
},
}
</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>

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

@ -0,0 +1,286 @@
<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="showPopup = false"></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="userInputName" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
<view class=" b-flex-x b-mt-10 b-mb-30">
<button class="b-btn b-btn-green " @click="clickCheckName">下一步</button>
</view>
<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>
<view class="rb-line"></view>
<view class="rb-text b-t-24 b-t-red b-p-40">
<text>你申请的名称涉及特定地域范围或地理名称需要经过平台审核后才可使用你可以直接提交审核或提供商标注册证等材料以证明你可使用该地域范围或地理名称作为账号名称否则可能审核不通过</text>
</view>
<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">
<button class="b-btn b-btn-green b-mr-40" @click="closeChange">取消</button>
<button class="b-btn b-btn-green " @click="clickSure">确定{{appid}}</button>
</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: ()=>({
showPopup:true,
})
},
appid: {
type: String,
default: ''
}
},
computed: {
...mapState(['brandInfo']),
},
data() {
return {
showPopup:true,
userInputName: '',//
checkNameRes: {},//
input_amount: "",
selectType: 1, //1() 2()
}
},
methods: {
moveHandle(){},
closeChange(){
this.$emit('close');
},
clickSure(){
this.showPopup = false;
this.$emit('sure',this.nameInfo);
},
clickCheckName(){
if(this.userInputName == '')return util.showNone('请输入名称!');
this.checkwxverifynickname();
},
checkwxverifynickname(){
// let appid = this.appid;
let _data = party_api["gatewayDoJson"]['checkwxverifynickname']
_data.form.nick_name = this.userInputName
console.log("getaccountbasicinfo:",_data)
servers.post({
url: party_api.gatewayDo,
data: _data,
isDefaultGet: false,
})
.then(res=>{
console.log("checkwxverifynickname:", res.data)
if(res.data.code!=0){
util.showNone(res.data.message)
console.log("checkwxverifynickname-err", res.data)
}else{
util.showNone('名称可用')
this.checkNameRes = res.data.data
}
})
.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
},
confirmChange(){
let { brandInfo, orderInfo, input_amount, selectType } = this
if(input_amount == '')return util.showNone('请输入金额!');
util.showLoad();
deviceServer.get({
url: deviceApi.timeOrderEnd,
data: {
brand_id: brandInfo.brand.id,
order_no: orderInfo.order_no,
pay_amount: parseFloat(input_amount),
end_type: selectType==1?'end_timing':selectType==2?'end_order':'',
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
util.showNone('操作成功!');
this.$emit('close');
// setTimeout(()=>uni.navigateBack(),1200);
this.$emit('timeEndBtn');
})
},
selectBtn(type){
this.selectType = type
},
idTimeChange(e){
console.log(e.detail)
},
},
}
</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>

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

@ -0,0 +1,491 @@
<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="showPopup = false"></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>
<!-- 可修改次数,已修改次数 -->
<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>
<view class=" b-flex-x b-mt-10 b-mb-30" v-if="!checkNameRes">
<button class="b-btn b-btn-green " @click="clickCheckName">下一步</button>
</view>
<view class="rb-line"></view>
<view class="rb-text b-t-24 b-t-red b-p-40">
<text >{{checkNameRes.message||checkNameRes.data.wording}}</text>
<!-- <text v-else>你申请的名称涉及特定地域范围或地理名称需要经过平台审核后才可使用你可以直接提交审核或提供商标注册证等材料以证明你可使用该地域范围或地理名称作为账号名称否则可能审核不通过</text> -->
</view>
<block v-if="checkNameRes.code==0">
<view class="rb-radio b-flex-x b-mb-40">
<radio-group @change="selectChange">
<!-- checked -->
<radio value="id_card" style="transform:scale(0.9)" color="#009876">个人号</radio>
<radio value="license" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">组织号</radio>
</radio-group>
</view>
<view class="rb-upload-list b-flex-x b-flex-a b-mt-50">
<view v-if="(selectType=='id_card')" class="b-flex-y b-flex-c" @click="clickUploadImg('id_card')">
<view class="b-mb-30 b-t-26">身份证照片</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 v-if="(selectType=='license')" class="b-flex-y b-flex-c" @click="clickUploadImg('license')">
<view class="b-mb-30 b-t-26">营业执照</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 v-if="checkNameRes.data.hit_condition" class="b-flex-y b-flex-c" @click="clickUploadImg('naming_other_stuff_1')">
<view class="b-mb-30 b-t-26">关键词补充材料</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">
<button class="b-btn b-btn-green b-mr-40" @click="closeChange">取消</button>
<button class="b-btn b-btn-green " @click="clickSure">确定</button>
</view>
</block>
</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: {
appInfo: {
type: Object,
default: ()=>({
// showPopup:true,
})
},
appid: {
type: String,
default: ''
}
},
computed: {
...mapState(['brandInfo']),
},
data() {
return {
showPopup:true,
userInputName: '',//
checkNameRes: "",//
selectType:"",//
localImg :{
id_card: {
mediaid: '',
url: '',
txt:"身份证照片"
},
license: {
mediaid: '',
url: '',
txt:"组织机构代码证或营业执照"
},
naming_other_stuff_1: {
mediaid: '',
url: '',
txt:"关键词补充材料"
}
},
// input_amount: "",
// selectType: 1, //1() 2()
}
},
methods: {
moveHandle(){},
closeChange(){
this.$emit('close');
},
async clickSure(){
await this.setnickname().then(res=>{
console.log("setnickname-res", res)
this.showPopup = false;
this.$emit('sure',this.appInfo);
})
},
clickCheckName(){
if(this.userInputName == '')return util.showNone('请输入名称!');
this.checkwxverifynickname();
},
async clickUploadImg(which){
if(this.selectType=="")return util.showNone('请选择类型!');
//whick id_card: mediaid
//license mediaid
this.localImg[which].url = await this.getLocalImg();
console.log("clickUploadImg-111", this.localImg[which])
this.localImg[which].mediaid = await this.getUploadImgMediaId(this.localImg[which].url);
console.log("clickUploadImg-222", this.localImg[which])
//,
// this.localImg[which].url = await this.getUploadImgURL(this.localImg[which].url);
},
resetLocalImg(){
this.localImg = {
id_card: {
mediaid: '',
url: '',
txt:"身份证照片"
},
license: {
mediaid: '',
url: '',
txt:"组织机构代码证或营业执照"
},
naming_other_stuff_1: {
mediaid: '',
url: '',
txt:"关键词补充材料"
}
}
},
getUploadImgURL(tempFilePath){
return servers.uploadFile({
url: party_api.webUpload,
filePath: tempFilePath,
name: 'file',
formData: {}
})
.then(res=>{
console.log("uploadFile-res", res)
if(res.statusCode == 200){
// console.log("uploadFile-url 1", res.data.data.url)
let _data = JSON.parse(JSON.stringify(res.data))
console.log("uploadFile-url return type", typeof(_data))
// console.log("uploadFile-url ", JSON.parse(_data))
_data = JSON.parse(_data).data
return _data.url
}
})
.catch(err=>{
console.log("uploadFile-err", err)
})
},
//
getLocalImg() {
console.log("clickUploadImg");
return new Promise((resolve, reject) => {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
console.log("chooseImage", res)
let tempFilePaths = res.tempFilePaths[0];
resolve(tempFilePaths)
},
fail: (err) => {
console.log("chooseImage-err", err)
reject(err)
}
});
})
},
getUploadImgMediaId(tempFilePath){
let appid = this.appid
let _param_str = `module=/cgi-bin/media/upload&appid=${appid}`
let _url = party_api.gatewayDoDuplicate+"?"+_param_str
return servers.uploadFile({
url: _url,
filePath: tempFilePath,
name: 'image',
formData: {
'form.type':"image"
}
})
.then(res=>{
console.log("uploadFile-gatewayDoDuplicate-res", res)
if(res.statusCode == 200){
let _data = JSON.parse(JSON.stringify(res.data))
console.log("uploadFile-url return type", typeof(_data))
_data = JSON.parse(_data).data
console.log("uploadFile-gatewayDoDuplicate-上传成功 接口真正数据", _data)
return _data.media_id
}
})
.catch(err=>{
console.log("uploadFile-err", err)
})
},
getUploadImgURL(tempFilePath){
return servers.uploadFile({
url: party_api.webUpload,
filePath: tempFilePath,
name: 'file',
formData: {}
})
.then(res=>{
console.log("uploadFile-res", res)
if(res.statusCode == 200){
// console.log("uploadFile-url 1", res.data.data.url)
let _data = JSON.parse(JSON.stringify(res.data))
console.log("uploadFile-url return type", typeof(_data))
// console.log("uploadFile-url ", JSON.parse(_data))
_data = JSON.parse(_data).data
return _data.url
}
})
.catch(err=>{
console.log("uploadFile-err", err)
})
},
setnickname(){
let _data = this.getGateWayJson('setnickname')
_data.form.nick_name = this.userInputName
_data.form.id_card = this.localImg.id_card.mediaid
_data.form.license = this.localImg.license.mediaid
console.log("setnickname:",_data)
return servers.post({
url: party_api.gatewayDo,
data: _data,
isDefaultGet: false,
})
.then(res=>{
console.log("setnickname:", res.data)
if(res.data.code!=0){
util.showNone("设置失败")
console.log("setnickname-err", res.data)
}else{
util.showNone('设置成功')
}
})
.catch(err=>{
console.log("setnickname-err", err)
})
},
checkwxverifynickname(){
this.checkNameRes = {}
let _data = this.getGateWayJson('checkwxverifynickname')
_data.form.nick_name = this.userInputName
console.log("getaccountbasicinfo:",_data)
servers.post({
url: party_api.gatewayDo,
data: _data,
isDefaultGet: false,
})
.then(res=>{
console.log("checkwxverifynickname:", 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
},
confirmChange(){
let { brandInfo, orderInfo, input_amount, selectType } = this
if(input_amount == '')return util.showNone('请输入金额!');
util.showLoad();
deviceServer.get({
url: deviceApi.timeOrderEnd,
data: {
brand_id: brandInfo.brand.id,
order_no: orderInfo.order_no,
pay_amount: parseFloat(input_amount),
end_type: selectType==1?'end_timing':selectType==2?'end_order':'',
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
util.showNone('操作成功!');
this.$emit('close');
// setTimeout(()=>uni.navigateBack(),1200);
this.$emit('timeEndBtn');
})
},
selectBtn(type){
this.selectType = type
},
selectChange(e){
console.log(e.detail)
this.selectType = e.detail.value
},
},
}
</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>

129
src/subpackage/party/js/api.js

@ -1,40 +1,97 @@
import { ORIGIN } from '../../../js/api';
export const ORDER_API = {
venueCourse_orderInfo:`${ORIGIN}/admin/venueCourse/orderInfo`, // 课程订单 - 详情
userValueCardInfo:`${ORIGIN}/admin/userValueCard/get`, // 用户储值卡详情_copy
userValueCardConsumes:`${ORIGIN}/admin/userValueCard/consumes`, // 用户储值卡消费记录_copy
consumeTypeList:`${ORIGIN}/valueCard/consumeType/list`, // 用户储值卡消费场景列表
userValueCardDeduct:`${ORIGIN}/admin/userValueCard/deduct`, // 用户储值卡-扣费_copy
userValueCardRecharge:`${ORIGIN}/admin/userValueCard/recharge`, // 用户储值卡-充值_copy
momentOrderInfo:`${ORIGIN}/admin/perfect/moment/order/get`, // 后台-高光时刻订单详情_copy
hardwareOrderInfo:`${ORIGIN}/admin/assistant/hardware/order/get`, // 硬件管理-订单详情_copy
rentballRefundDeposit:`${ORIGIN}/admin/assistant/rentball/refundDeposit`, // 退押金-后台
hardwareOrderGet:`${ORIGIN}/admin/assistant/hardware/order/get`, // 硬件订单详情 储物柜/售货柜/水阀/咖啡机/租售柜
lockEndBill:`${ORIGIN}/admin/stadium/locker/endBill`, // 储物柜-结束计费
currentUser:`${ORIGIN}/admin/assistant/currentUser`, // 获取当前用户信息
appointmentOrderInfo:`${ORIGIN}/admin/gameAppointment/orderInfo`, // 赛事订单详情
matchOrderSonList:`${ORIGIN}/gameAppointment/match/orderSonList`, // 赛事订单-参赛成员列表
matchGetOrderSon:`${ORIGIN}/gameAppointment/match/getOrderSon`, // 赛事订单_参赛成员详情
shop2OrderInfo:`${ORIGIN}/admin/shop2/orderInfo`, // 商城订单 - 详情
erpshList:`${ORIGIN}/stadium/erpsh/newList`, // 商城订单管理-统一的仓库列表
shop2OrderLogistics:`${ORIGIN}/admin/shop2/orderLogistics`, // 商城订单管理 - 发货_
logisticsCompanyLs:`${ORIGIN}/shop2/logisticsCompany/List`, // 商城订单管理 - 快递公司列表
orderGoodsRefund:`${ORIGIN}/admin/shop2/orderGoodsRefund`, // 商城-商品退款_copy
rentballOrderEnd:`${ORIGIN}/admin/assistant/rentball/order/end`, // 租球机-结束计费
leaseOrderEnd:`${ORIGIN}/admin/stadium/leaseOrder/endBill`, // 租售柜-结束计费
retailOrderInfo:`${ORIGIN}/admin/erp/retailOrder/info`, // 订单管理-零售订单详情
retailOrderInfoRefundList: `${ORIGIN}/admin/stadium/order/refundList`, // 订单管理-零售订单详情退款列表
userMonthlyCardInfo:`${ORIGIN}/admin/userMonthlyCard/get`, // 详情用户年月卡-后台
ymCardInfoFace:`${ORIGIN}/upload/file/ym_card_face`, // 年月卡用户头像上传
ymCardInfoFaceSave:`${ORIGIN}/admin/userMonthlyCard/updateFace`, // 年月卡用户头像保存
ymCardUsage:`${ORIGIN}/admin/userMonthlyCard/usages`, // 用户年月卡使用记录-后台
// 20220725
userValueOrderGet:`${ORIGIN}/admin/userValueOrder/get`, // 储值卡订单详情
// 20220726
rentballEndBilling:`${ORIGIN}/admin/stadium/rentball/order/end`, // 结束订单-后台
// 20220727
rentBallOrderDetails:`${ORIGIN}/admin/stadium/hardware/order/rentBallOrderDetails`, // 硬件管理-订单详情_copy
export const PARTY_API = {
webBrandUser: `${ORIGIN}/web/webBrandUser/GetOpenId`, //检测用户openid是否与账户绑定,
captchaSms: `${ORIGIN}/captchaSms/send`, // 发送验证码
webLogin: `${ORIGIN}/web/webBrandUser/login`, // 登录
webUserGet:`${ORIGIN}/web/webBrandUser/get`, // 获取官网用户信息,审核状态
webUpload: `${ORIGIN}/upload/file/businessLicense`, // 上传图片
webOcr: `${ORIGIN}/ouxuanac/ocr`, // 营业执照识别
webBrandUserSave: `${ORIGIN}/web/webBrandUser/save`, // 官网PC端用户品牌数据提交
webBrandUserGet: `${ORIGIN}/web/webBrandUser/get`, // 官网PC端用户品牌数据提交
webGenerateBrand: `${ORIGIN}/web/webBrandUser/generateBrand`, // 审核成功 获取账户
getUserCurrent: `${ORIGIN}/user/current`, // 审核成功 获取账户
fastregisterbetaweapp: `${ORIGIN}/admin/wechatTpp/mini/tryout/fastregisterbetaweapp`, // 审核成功 获取账户
getOpenIdByMobile: `${ORIGIN}/web/webBrandUser/getOpenId`, //获取openid
getOpenIdByToken: `${ORIGIN}/web/webBrandUser/getUserOpenId`, //获取openid
bindBrand: `${ORIGIN}/admin/tryout/bindBrand`, //绑定品牌
getVerifyMiniAppInfo: `${ORIGIN}/admin/tryout/verifyMiniAppInfo/get`, //获取转正数据
verifybetaweapp: `${ORIGIN}/admin/wechatTpp/mini/tryout/verifybetaweapp`, //转正
bindingOpenId: `${ORIGIN}/assistant/bindingOpenId`, //改为小程序端绑定openid
getCertifyInfo: `${ORIGIN}/admin/tryout/verifyMiniAppInfo/get`, //获取小程序认证信息
gatewayDo: `${ORIGIN}/tpp/miniapp/gatewayDo`, //透传接口
gatewayDoDuplicate: `${ORIGIN}/tpp/miniapp/gatewayDoDuplicate`, //透传上传接口
editTempDraft0: `${ORIGIN}/web/webBrandUser/temp/edit`, //保存草稿
getTempDraft0: `${ORIGIN}/web/webBrandUser/temp/get`, //获取草稿
editTempDraft: `${ORIGIN}/web/webBrandAuthenticationTemp/edit`, //保存草稿
getTempDraft: `${ORIGIN}/web/webBrandAuthenticationTemp/get`, //获取草稿
}
PARTY_API['gatewayDoJson'] = {
getaccountbasicinfo: { "appid": "wxeb7efb9a1cbdd554", "module": "/cgi-bin/account/getaccountbasicinfo", "method": "POST", "form": {} }, // 获取账户基本信息
// checkwxverifynickname: { "appid": "wxeb7efb9a1cbdd554", "module": "/cgi-bin/wxverify/checkwxverifynickname", "method": "POST", "form": { "nick_name": "修改小程序名称" } },
// modifywxverifynickname: {"appid":"wxeb7efb9a1cbdd554","module":"/wxa/setnickname","method":"POST","form":{"nick_name":"欧轩企业管理2","id_card":"BQGH4DpbizOg3wGtGhE_uWudXRoRhnbr7K5KkJYgHQfaK1to2O-u-CkZEN5Faeak","license":""}},
getcategory: { "appid": "wx27f426fb3b167390", "module": "/cgi-bin/wxopen/getcategory", "method": "GET", "form": {} },
get_icp_entrance_info: { "appid": "wx27f426fb3b167390", "module": "/wxa/icp/get_icp_entrance_info", "method": "GET", "form": {} },
// 小程序改名
checkwxverifynickname: { "appid": "wx27f426fb3b167390", "module": "/cgi-bin/wxverify/checkwxverifynickname", "method": "POST", "form": { "nick_name": "修改小程序名称" } },
modifywxverifynickname: { "appid": "wxeb7efb9a1cbdd554", "module": "/wxa/setnickname", "method": "POST", "form": { "nick_name": "欧轩企业管理2", "id_card": "BQGH4DpbizOg3wGtGhE_uWudXRoRhnbr7K5KkJYgHQfaK1to2O-u-CkZEN5Faeak", "license": "" } },
setnickname: {
"appid": "wxeb7efb9a1cbdd554",
"module": "/wxa/setnickname",
"method": "POST",
"form": {
"nick_name": "12312312312",
"id_card": "",
"license": "5Ib6JCPFTru8dllhg1iFQzxQ6JoVpt2O5JdWuN5tQrWz7T6p2I3jQ5znJ-Bf5voV"
}
},
getwxauthinfo: { "module": "/wxa/sec/wxaauth", "appid": "wxeb7efb9a1cbdd554" },
wxauth: {//提交认证信息
"appid": "wxeb7efb9a1cbdd554",
"module": "/wxa/sec/wxaauth",
"method": "POST",
"form": {}
},
getwxauth: {//获取认证信息
"appid": "wxeb7efb9a1cbdd554",
"module": "/wxa/sec/wxaauth",
"method": "GET",
"form": {}
},
create_icp_verifytask: {//发起人身核身
"appid": "wxeb7efb9a1cbdd554",
"module": "/wxa/icp/create_icp_verifytask",
"method": "POST", "form": {}
},
apply_icp_filing: { //提交ICP备案信息
"appid": "wxeb7efb9a1cbdd554",
"module": "/wxa/icp/apply_icp_filing",
"method": "POST", "form": {}
},
query_icp_certificate_types: { "appid": "wxeb7efb9a1cbdd554", "module": "/wxa/icp/query_icp_certificate_types", "method": "GET", "form": {} },
query_icp_subject_types: { "appid": "wxeb7efb9a1cbdd554", "module": "/wxa/icp/query_icp_subject_types", "method": "GET", "form": {} },
query_icp_district_code: { "appid": "wxeb7efb9a1cbdd554", "module": "/wxa/icp/query_icp_district_code", "method": "GET", "form": {} },
query_icp_service_content_types: { "appid": "wxeb7efb9a1cbdd554", "module": "/wxa/icp/query_icp_service_content_types", "method": "GET", "form": {} },
// apply_icp_filing: { "appid": "wxeb7efb9a1cbdd554", "module": "/wxa/icp/apply_icp_filing", "method": "POST", "form": {} },
addcategory:{"appid":"wxeb7efb9a1cbdd554","module":"/cgi-bin/wxopen/addcategory","method":"POST","form":{"categories":[{"certicates":[],"first":0,"second":0}]}},
getcategory:{"appid":"wxeb7efb9a1cbdd554","module":"/cgi-bin/wxopen/getcategory","method":"GET","form":{}},
//查询认证信息
queryauth: {"appid":"wxeb7efb9a1cbdd554","module":"/wxa/sec/queryauth","method":"POST","form":{"taskid":"$LAST_RESULT./wxa/sec/wxaauth.taskid"}},
}
export default ORDER_API;
export default PARTY_API;

4637
src/subpackage/party/js/china-area.js
File diff suppressed because it is too large
View File

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

@ -5,14 +5,14 @@
<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">
<view class="b-flex-y b-flex-c" @click="toWebPage">
<text class="b-t-white b-t-24 p-index-2">访问手机端</text>
<image class="pb-img-arrow-white b-mt-20 p-index-2" src="../../static/index/p-arrow-white.png"></image>
<image class="pb-bg" src="../../static/index/p-bg-1.png"></image>
</view>
<view class="b-flex-y b-flex-c">
<view class="b-flex-y b-flex-c" @click="clickSaveManagerUrl">
<text class="b-t-white b-t-24 p-index-2">复制到电脑端打开</text>
<text class="b-t-white b-t-24 p-index-2">admin.ouxuanzhineng.cn</text>
<text class="b-t-white b-t-24 p-index-2 b-ellipsis-1">{{getManagerUrl.show}}</text>
<image class="pb-bg" src="../../static/index/p-bg-1.png"></image>
</view>
</view>
@ -24,14 +24,14 @@
</view>
</view>
<view class="p-box b-flex-x b-flex-b">
<view class="b-flex-y b-flex-c">
<view class="b-flex-y b-flex-c" @click="toMiniApp">
<text class="b-t-white b-t-24 p-index-2">访问手机端</text>
<image class="pb-img-arrow-white b-mt-20 p-index-2" src="../../static/index/p-arrow-white.png"></image>
<image class="pb-bg" src="../../static/index/p-bg-1.png"></image>
</view>
<view class="b-flex-y b-flex-c">
<view class="b-flex-y b-flex-c" @click="clickSaveShouyingUrl">
<text class="b-t-white b-t-24 p-index-2">复制到电脑端打开</text>
<text class="b-t-white b-t-24 p-index-2">admin.ouxuanzhineng.cn</text>
<text class="b-t-white b-t-24 p-index-2">{{getShouyingUrl.show}}</text>
<image class="pb-bg" src="../../static/index/p-bg-1.png"></image>
</view>
</view>
@ -40,7 +40,7 @@
<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;" >
<view class="b-flex-y b-flex-c p-guanli" style="width: 176rpx;" @click="toMiniAppRegist(0)">
<text class="b-t-white b-t-24 p-index-2">小程序信息\n去填写</text>
<image class="pb-img-arrow-white b-mt-10 b-mr-50 p-index-2" src="../../static/index/p-arrow-white.png"></image>
<image class="pb-bg" style="width: 176rpx;" src="../../static/index/p-bg-s-1.png"></image>
@ -49,7 +49,7 @@
src="../../static/index/p-arrow.png"
mode="scaleToFill"
/>
<view class="b-flex-y b-flex-c p-guanli" style="width: 176rpx;">
<view class="b-flex-y b-flex-c p-guanli" style="width: 176rpx;" @click="toMiniAppRegist(1)">
<text class="b-t-white b-t-24 p-index-2">小程序认证\n去填写</text>
<image class="pb-img-arrow-white b-mt-10 b-mr-50 p-index-2" src="../../static/index/p-arrow-white.png"></image>
<image class="pb-bg" style="width: 176rpx;" src="../../static/index/p-bg-s-2.png"></image>
@ -58,15 +58,24 @@
src="../../static/index/p-arrow.png"
mode="scaleToFill"
/>
<view class="b-flex-y b-flex-c p-guanli" style="width: 176rpx;">
<view class="b-flex-y b-flex-c p-guanli" style="width: 176rpx;" @click="toMiniAppRegist(2)">
<text class="b-t-white b-t-24 p-index-2">小程序备案\n去填写</text>
<image class="pb-img-arrow-white b-mt-10 b-mr-50 p-index-2" src="../../static/index/p-arrow-white.png"></image>
<image class="pb-bg" style="width: 176rpx;" src="../../static/index/p-bg-s-3.png"></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-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;">
<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;">
<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>
@ -81,42 +90,63 @@
<script>
import util from '@/utils/util.js';
// 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 { API,ORIGIN } from '@/js/api';
import { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import {
mapState
} from 'vuex'
export default {
components: {
// 'hoverCartList': hoverCartList ,
},
data() {
return {
// categoryBtnStyle: { //
// default: { fontWeight:"normal", color:"#9A9A9D", backgroundColor:"rgba(0,0,0,0)" },
// click: { fontWeight:"600", color:"#009874", backgroundColor:"rgba(0,152,116,0.2)" },
// },
// categoryScrollTop: 0, //
appid: "",
url_manager: [{
"url":"https://testadmin.ouxuanzhineng.cn",
"show":"testadmin.ouxuanzhineng.cn"
},{
"url":"https://admin.ouxuanzhineng.cn",
"show":"admin.ouxuanzhineng.cn"
}],//
url_shouying: [{
"url":"https://testkb.ouxuanzhineng.cn",
"show":"testkb.ouxuanzhineng.cn"
},{
"url":"https://kb.ouxuanzhineng.cn",
"show":"kb.ouxuanzhineng.cn"
}],//
miniapp_info:['wx7873af4ffca558fd','wxd71043ec955dfecf'],
miniapp_app_id:"",//appid
// AppIDwxd71043ec955dfecf
// AppID wx7873af4ffca558fd test
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
// this.params.brand_id = this.brandInfo.brand.id;
// this.deleteSearchLocal(); //
// this.getStoreList(); //
// this.fixMainHeight(); //
onLoad(opts) {
console.log("onload-", opts)
this.appid = opts.appid;
// if(!opts.appid){
// opts.appid = "wxc141a743225e7885"
// }
},
onShow() {
// this.getSearchLocal(); //
// this.getRetailStatus(); //
this.checkMiniAppRegist()
},
computed: {
...mapState(['brandInfo', ])
...mapState(['brandInfo', ]),
getManagerUrl(){
return this.url_manager[this.getUrlIndex()];
},
getShouyingUrl(){
return this.url_shouying[this.getUrlIndex()];
},
getMiniAppID(){
return this.miniapp_info[this.getUrlIndex()];
}
},
watch: {
cartList() {
@ -124,33 +154,93 @@
},
},
methods: {
//
getRetailStatus() {
let _this = this;
uni.getStorage({
key: 'retailStatus',
success: (res) => {
_this.searchText = '';
_this.params.page = 1;
_this.params.type_key = '';
_this.params.key = '';
_this.getCategoryInfo(); //
_this.deleteRetailLocal(); //
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,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=${appid}`,'nT');
}
},
checkMiniAppRegist(){
servers.post({
url: party_api.getUserCurrent,
data: {},
isDefaultGet: false,
})
.then(res=>{
console.log("checkMiniAppRegist:", res)
let data = res.data.data
if(data?.extension?.mini_wechat_app_id){
this.miniapp_app_id = data.extension.mini_wechat_app_id
return data.extension.mini_wechat_app_id
}
})
.catch(err=>{
console.log("checkMiniAppRegist-err", err)
})
},
toWebPage(){
console.log('toWebPage')
let url = this.getManagerUrl.url;
util.routeTo(`/subpackage/party/pages/index/web_view?url=${url}`,'nT');
},
toMiniApp(){
console.log('toMiniApp')
let appid = this.getMiniAppID;
uni.navigateToMiniProgram({
appId: appid,
path: '',
extraData: {
from: 'party'
},
fail: (err) => {
_this.deleteRetailLocal();
envVersion: 'release',
success(res) {
//
console.log('toMiniApp success',res)
},
});
fail(err){
console.log('toMiniApp fail',err)
}
})
},
//
deleteRetailLocal() {
this.searchData = null;
uni.removeStorage({
key: 'retailStatus',
success: (res) => {}
clickSaveManagerUrl(){
console.log('clickSaveManagerUrl')
this.saveToColip(this.getManagerUrl.url);
},
clickSaveShouyingUrl(){
console.log('clickSaveShouyingUrl')
this.saveToColip(this.getShouyingUrl.url);
},
saveToColip(url){
uni.setClipboardData({
data: url,
success: function () {
util.showNone('复制成功')
}
});
},
getUrlIndex(){
let index = 0;
if(ORIGIN=="https://testmanager.ouxuanzhineng.cn"){
index = 0;
}else{
index = 1;
}
return index;
},
}

21
src/subpackage/party/pages/index/web_view.vue

@ -0,0 +1,21 @@
<template>
<web-view src="" :src="url"></web-view>
</template>
<script>
import { API,ORIGIN } from '@/js/api';
export default {
data() {
return {
url: 'https://testadmin.ouxuanzhineng.cn/'
}
},
onLoad(opt){
console.log('web_view',opt,ORIGIN)
this.url = opt.url
}
}
</script>

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

@ -3,35 +3,50 @@
<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" 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" 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">获取验证码</view>
<view class="p-get-code" @click="captchaLogin">{{codeText}}</view>
</view>
</view>
<!-- 2051114470
wx1fe8d9a3cb067a75 -->
<t-captcha
id="captcha"
app-id="2051114470"
themeColor="#009876"
size="normal"
@verify="handlerVerify"
@ready="handlerReady"
@close="handlerClose"
@error="handlerError" />
<!-- app-id验证码CaptchaAppId, 从腾讯云的验证码控制台中获取, 在验证码控制台页面内图形验证>验证列表进行查看 -->
<!-- <button @click="captchaLogin">登录</button> -->
<!-- 同意隐私协议 -->
<view class="b-flex-x b-flex-s b-flex-as-s b-ml-40 b-mt-60">
<checkbox-group>
<view class="b-flex-x b-flex-s b-flex-as-s b-ml-40 b-mt-60" @click="">
<checkbox-group @change="groupChange">
<checkbox value="agree" activeBackgroundColor="#009876"
style="transform:scale(0.8)"
checked="true" color="#009876" iconColor="#ffffff"></checkbox>
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>
<!-- 登录按钮 -->
<button class="p-login-btn b-btn b-btn-green b-mt-60 b-mb-60" style="height: 112rpx;">登录</button>
<button @click="clickSubmitbtn" class="p-login-btn b-btn b-btn-green b-mt-60 b-mb-60" style="height: 112rpx;">登录</button>
</view>
@ -40,26 +55,37 @@
<script>
import util from '@/utils/util.js';
// 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 { API } from '@/js/api';
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 {
mapState
} from 'vuex'
export default {
components: {
// 'hoverCartList': hoverCartList ,
},
data() {
return {
agree:false,
mobile:"",
code:"",
ticket:"",
count:60,
codeText:"获取验证码",
// mobile: '18502079603',
// code:"697961",
// ticket:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2YWxpZF9wZXJpb2QiOiJcIjIwMjQtMDMtMjZUMTQ6Mzc6NTEuOTYzNTA1NDM2KzA4OjAwXCJcbiIsInZhbHVlIjoiMTg1MDIwNzk2MDM2OTc5NjEifQ.8-jjMrKufC_cpfQoNOtY5JSyvyNDoyUe2b00EfdYR48",
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
// util.showNone("onLoad ")
},
onShow() {
@ -73,6 +99,155 @@
},
},
methods: {
//
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)
},
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('请阅读并同意服务协议和隐私政策!')
let loginRes =""
// #ifndef H5
loginRes = await uniLogin();
// #endif
// #ifdef H5
loginRes = {errMsg: "login:ok", code: "0c3xEi0w3kr1t23zcU3w3ZQR3w3xEi0h"} //TODO H5
// #endif
console.log(loginRes)
const appid = uni.getAccountInfoSync().miniProgram.appId;
const app_code = loginRes.code
//
servers.get({
url: party_api.webLogin,
data: {
app_code,
code,
mobile,
ticket,
appid
},
failMsg: '加载数据失败!'
})
.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');
},
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
if(ev.detail.ret === 0) {
//
console.log('ticket:', ev.detail.ticket)
console.log('randstr:', ev.detail.randstr)
let ticket = ev.detail.ticket;
let randstr = ev.detail.randstr;
this.captchaSmsSend(ticket,randstr)
} else {
//
// refresh
}
},
//
handlerReady: function () {
console.log('验证码准备就绪')
},
//
handlerClose: function (ev) {
// 使 mpvueev.detail ev.mp.detail,ret0ret2
if(ev && ev.detail.ret && ev.detail.ret === 2){
console.log('点击了关闭按钮,验证码弹框准备关闭');
} else {
console.log('验证完成,验证码弹框准备关闭');
}
},
//
handlerError: function (ev) {
console.log(ev.detail.errMsg)
},
captchaSmsSend: function (ticket,rand_str) {
console.log('captchaSmsSend: ',ticket,rand_str,this.mobile)
let {mobile} = this
return servers.get({
url: party_api.captchaSms,
data: {
ticket,
rand_str,
mobile: mobile,
},
failMsg: '加载数据失败!'
})
.then(res=>{
console.log('captchaSms',res)
this.ticket = res
}).catch(err=>{
console.warn('err:',err)
// util.routeTo(`/pages/login/login`,'rL');
})
},
}
}
@ -116,7 +291,7 @@
.input-hold-class{
font-size: 28rpx;
color: $b-color-gray;
padding-left: 30rpx;
padding-left: 0rpx;
}
> input{
width: 668rpx;
@ -124,6 +299,7 @@
opacity: 0.5;
background: #DDE7E5;
border-radius: 10rpx;
padding-left: 30rpx;
}
> view{
margin-top: 20rpx;
@ -133,6 +309,7 @@
opacity: 0.5;
background: #DDE7E5;
border-radius: 10rpx;
padding-left: 30rpx;
}
.p-get-code{
width: 218rpx;

1058
src/subpackage/party/pages/login/regist.vue
File diff suppressed because it is too large
View File

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

@ -6,7 +6,7 @@
src="../../static/regist/daojishi.png"
mode="scaleToFill"/>
<view class="txt1">提交完成后台审核中</view>
<view class="txt1">资料提交完成后台审核中</view>
<view class="txt2">审核通过后获得管理账户</view>
@ -24,39 +24,32 @@
<script>
import util from '@/utils/util.js';
// 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 { servers } from '@/js/server';
import { API } from '@/js/api';
import {
mapState
} from 'vuex'
export default {
components: {
// 'hoverCartList': hoverCartList ,
},
data() {
return {
// categoryBtnStyle: { //
// default: { fontWeight:"normal", color:"#9A9A9D", backgroundColor:"rgba(0,0,0,0)" },
// click: { fontWeight:"600", color:"#009874", backgroundColor:"rgba(0,152,116,0.2)" },
// },
// categoryScrollTop: 0, //
info: {
status: 0, //1 2 3 4 5 6???
had_binding:false //
}
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
// this.params.brand_id = this.brandInfo.brand.id;
// this.deleteSearchLocal(); //
// this.getStoreList(); //
// this.fixMainHeight(); //
// util.showNone("onLoad")
this.webBrandUserCheck()
},
onShow() {
// this.getSearchLocal(); //
// this.getRetailStatus(); //
},
computed: {
...mapState(['brandInfo', ])
@ -67,6 +60,29 @@
},
},
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,
failMsg: '加载数据失败!'
})
.then(res=>{
console.log('webBrandUserCheck',res)
this.info = res
this.status = res.status
}).catch(err=>{
console.warn('webBrandUserCheck err',err)
util.routeTo(`/pages/login/login`,'rL');
})
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/regist","nT")
}

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

@ -1,169 +1,172 @@
<template>
<view class="regist-page b-flex-y b-flex-c">
<block v-if="auth_step==1">
<view class="a-main-view b-flex-y">
<text class="am-title">小程序名称</text>
<input class="am-input am-line" v-model="mini_name" type="text" placeholder="请输入" placeholder-class="input-hold-class"></input>
<view class="a-main-view b-flex-y">
<text class="am-title">小程序名称</text>
<input class="am-input am-line" type="text" placeholder="请输入" placeholder-class="input-hold-class"></input>
<button @click="SubmitEvent"class="am-auth-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 100%;height: 112rpx;">开始申请</button>
</view>
<view class="auth-result-view b-flex-y b-flex-c ">
<view class="txt1">体验小程序创建成功</view>
<button @click="beginCreateMiniapp" class="am-auth-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 100%;height: 112rpx;">开始申请</button>
</view>
</block>
<text class="txt2">请将点击下方按钮将小程序进行授权</text>
<text class="txt2" >请勾选全部权限</text>
<block v-else-if="auth_step==2">
<view class="auth-result-view b-flex-y b-flex-c ">
<button
class="b-btn b-btn-green b-mt-60 b-mb-60"
hover-class="button-hover"
@click="SubmitEvent"
>
修改审核资料
</button>
</view>
<view class="txt1">体验小程序创建成功</view>
<text class="txt2">请将点击下方按钮将小程序进行授权</text>
<text class="txt2" >请勾选全部权限</text>
<button
class="b-btn b-btn-green b-mt-60 b-mb-60"
hover-class="button-hover"
@click="beginAuth"
>
授权小程序
</button>
</view>
</block>
<view class="r-main-view b-flex-y b-flex-c">
<!-- 注册资料填写 -->
<view class="r-box">
<text class="rb-title">小程序名称</text>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">品牌名称<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入品牌名称"
placeholder-class="input-hold-class"></input>
<block v-else-if="auth_step==3">
<view class="r-main-view b-flex-y b-flex-c">
<!-- 注册资料填写 -->
<view class="r-box">
<text class="rb-title">小程序名称</text>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">品牌名称<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入品牌名称"
placeholder-class="input-hold-class"></input>
</view>
</view>
</view>
<!-- 注册资料填写 -->
<view class="r-box">
<text class="rb-title">小程序名称</text>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">品牌名称<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入品牌名称"
placeholder-class="input-hold-class"></input>
<!-- 注册资料填写 -->
<view class="r-box">
<text class="rb-title">小程序名称</text>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">品牌名称<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入品牌名称"
placeholder-class="input-hold-class"></input>
</view>
</view>
</view>
<!-- 企业名称,企业类型,主体类型,信用代码,证件有效期,注册地址,注册资本,法人姓名 -->
<view class="r-box">
<text class="rb-title">企业信息</text>
<view class="rb-upload-box b-flex-y b-flex-s">
<view class="rb-upload-title b-flex-x">营业执照<text>*</text></view>
<view class="rb-upload-list b-flex-x">
<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 class="r-box">
<text class="rb-title">企业信息</text>
<view class="rb-upload-box b-flex-y b-flex-s">
<view class="rb-upload-title b-flex-x">营业执照<text>*</text></view>
<view class="rb-upload-list b-flex-x">
<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>
</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" type="text" placeholder="请输入企业名称"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入企业类型"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入主体类型"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入信用代码"
placeholder-class="input-hold-class"></input>
</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>
<view class="rb-radio b-flex-x">
<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 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" type="text" placeholder="请输入企业名称"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入企业类型"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入主体类型"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入信用代码"
placeholder-class="input-hold-class"></input>
</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>
<view class="rb-radio b-flex-x">
<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>
</view>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">注册地址<text>*</text></view>
<input 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">
<view class="rb-input-title b-flex-x">注册资本<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入注册资本"
placeholder-class="input-hold-class"></input>
</view>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">法人姓名<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入法人姓名"
placeholder-class="input-hold-class"></input>
</view>
</view>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">注册地址<text>*</text></view>
<input 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">
<view class="rb-input-title b-flex-x">注册资本<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入注册资本"
placeholder-class="input-hold-class"></input>
</view>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">法人姓名<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入法人姓名"
placeholder-class="input-hold-class"></input>
</view>
</view>
<!-- 运营人员信息:姓名,身份证号,手机号 -->
<view class="r-box">
<text class="rb-title">运营人员信息</text>
<view class="rb-upload-box b-flex-y b-flex-s">
<view class="rb-upload-title b-flex-x">运营人员身份证正反面<text>*</text></view>
<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"></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"></image>
<image class="rb-upload-cam" src="../../static/regist/camera.png"></image>
<text class="rb-input-img-text">上传身份证国徽面</text>
<!-- 运营人员信息:姓名,身份证号,手机号 -->
<view class="r-box">
<text class="rb-title">运营人员信息</text>
<view class="rb-upload-box b-flex-y b-flex-s">
<view class="rb-upload-title b-flex-x">运营人员身份证正反面<text>*</text></view>
<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"></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"></image>
<image class="rb-upload-cam" src="../../static/regist/camera.png"></image>
<text class="rb-input-img-text">上传身份证国徽面</text>
</view>
</view>
</view>
</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" type="text" placeholder="请输入姓名" placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入身份证号"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入手机号" placeholder-class="input-hold-class"></input>
<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" type="text" placeholder="请输入姓名" placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入身份证号"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入手机号" placeholder-class="input-hold-class"></input>
</view>
</view>
</view>
<button @click="SubmitEvent"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 100%;height: 112rpx;">开始申请</button>
<button @click="thirdPartyAuthor" class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 100%;height: 112rpx;">开始申请</button>
</view>
</view>
</block>
</view>
</template>
<script>
import util from '@/utils/util.js';
// 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 { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import {
mapState
} from 'vuex'
const APPID = uni.getAccountInfoSync().miniProgram.appId;
const MiniprogramThirdpartyPlugin = requirePlugin('miniprogram-thirdparty-plugin')
export default {
components: {
@ -171,18 +174,26 @@ export default {
},
data() {
return {
mini_name: "",//
auth_step:1,
brandInfo:{},//
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
async onLoad() {
// console.log("onload-", this.brandInfo.brand.id)
let _brandInfo = await this.$store.dispatch('getBrandInfo');
console.log("_brandInfo:",_brandInfo)
this.brandInfo = _brandInfo
// util.showNone("onLoad")
},
onReady() {
MiniprogramThirdpartyPlugin.init(wx)
},
onShow() {
},
computed: {
...mapState(['brandInfo',])
// ...mapState(['brandInfo'])
},
watch: {
cartList() {
@ -190,12 +201,160 @@ export default {
},
},
methods: {
async beginCreateMiniapp(){
util.showNone("开始申请")
if(!this.mini_name)return util.showNone("请输入小程序名称")
let openid = await this.getOpenID()
let create_json = await this.getFastcreateToken(openid)
let party_token = create_json.unique_id
console.log('unique_id:',party_token)
if(!party_token)return util.showNone("创建失败")
this.party_token = party_token
this.auth_step = 2
},
async beginAuth(){
let {party_token} = this
// let openid = await this.getOpenID()
// let create_json = await this.getFastcreateToken(openid)
// let party_token = create_json.unique_id
// console.log('unique_id:',party_token)
// if(!party_token)return util.showNone("")
await this.thirdPartyAuthor(party_token).then(res=>{
console.log('thirdPartyAuthor授权成功',res)
// 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({
url: party_api.bindBrand,
data: {
unique_id,
brand_id: this.brandInfo.brand.id
},
failMsg: '加载数据失败!'
})
.then(res=>{
console.log('bindBrand',res)
util.routeTo("/subpackage/party/pages/miniapp/regular","nT")
return res
}).catch(err=>{
console.warn('bindBrand err',err)
})
},
//
toPartyLogin(){
util.routeTo(`/subpackage/party/pages/login/login`,'nT');
},
getOpenID(){
return servers.get({
url: party_api.getOpenIdByToken,
data: {
},
failMsg: '加载数据失败!'
})
.then(res=>{
console.log('getOpenID',res)
return res.open_id
}).catch(err=>{
console.warn('getOpenID err',err)
})
},
getFastcreateToken(openid){//token
//TODO ,,
// return {
// token: "d56e4149-8cd1-11ee-b5fb-5254005df464",
// unique_id: "r2dCHjL3HqO3_i6_A7m0NT-qZg3UI290JTn0D5oOw8C3UDwuZJJ6kmKG41BOrqMb"
// }
return servers.get({
url: party_api.fastregisterbetaweapp,
data: {
name: this.mini_name,
openid
},
failMsg: '加载数据失败!'
})
.then(res=>{
console.log('fastregisterbetaweapp:',res)
return res
}).catch(err=>{
console.warn('webLogin err',err)
})
},
getCreateTokenFromJson(json){
// jsondataauthorize_url
console.log('getCreateTokenFromJson123',json)
const authorizeUrl = json.authorize_url;
// 使URLSearchParamsURL
const params = new URLSearchParams(authorizeUrl.split('?')[1]);
// create_token
const createToken = params.get('create_token');
// create_token
return createToken;
},
urlParse(json){
const authorizeUrl = json.authorize_url;
let url = new URL(authorizeUrl);
console.log(url,url.searchParams.get('create_token'));
},
thirdPartyAuthor(token){
//
// let token = "iQhrBPQszUtqc-W59-gnfLTSL-OpZRCKoe89VKGBKvOTQ9BXeLc5q3F4a_Nl7Vpm"
// let token = "4sfXTSZZA-WXWx-cnC3MTDDn6PMc2v2xO6HtWOAYv5bjWQmuGo5DGHBoe1gZpTSZ"
return new Promise((rs,rj)=>{
MiniprogramThirdpartyPlugin.authorize({
token: token, // create_tokenfastregisterbetaweappauthorize_urlurlcreate_token
success(res) {
//
console.log('授权成功',res)
// {expireTime: 1712720638}
rs(res)
},
fail(err) {
console.error(err)
rj(err)
//
}
})
})
},
thirdPartyOpenTrial(){
//
MiniprogramThirdpartyPlugin.openTrial({
appid: 'appid', // appid
platformAppID: 'platform_appid', // appid
fail() {
//
}
})
},
}
}
</script>

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

@ -7,32 +7,33 @@
<!-- <text class="rb-title">品牌信息</text> -->
<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" type="text" placeholder="请输入品牌名称"
<input class="rb-input" 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">
<view class="rb-input-title b-flex-x">命名类型<text></text></view>
<view class="rb-radio b-flex-x">
<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 @change="wordSelect">
<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>
<view class="rb-input-box rb-line b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">认证类型<text></text></view>
<view class="rb-radio b-flex-x">
<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 @change="companySelect">
<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>
<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 class="rb-upload-list b-flex-x">
<view class="rb-upload-list b-flex-x" @click="clickUploadImg(1)">
<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-bg" src="../../static/regist/upload_bg.png"
:src="localImg[1].url||'../../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>
@ -41,9 +42,10 @@
</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 class="rb-upload-list b-flex-x">
<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"></image>
<image class="rb-upload-bg" src="../../static/regist/upload_bg.png"
:src="localImg[2].url||'../../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>
@ -51,9 +53,10 @@
</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-list b-flex-x">
<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"></image>
<image class="rb-upload-bg" src="../../static/regist/upload_bg.png"
:src="localImg[3].url||'../../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>
@ -66,12 +69,12 @@
<text class="rb-title b-t-B">认证联系人</text>
<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" type="text" placeholder="请输入联系人姓名"
<input class="rb-input" v-model="form.contact_info.name" type="text" placeholder="请输入联系人姓名"
placeholder-class="input-hold-class"></input>
</view>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">邮箱<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入联系人邮箱"
<input class="rb-input" v-model="form.contact_info.email" type="text" placeholder="请输入联系人邮箱"
placeholder-class="input-hold-class"></input>
</view>
</view>
@ -80,85 +83,101 @@
<text class="rb-title b-t-B">发票信息</text>
<view class="rb-radio b-flex-x b-mt-50 b-mb-10">
<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 value="3" style="transform:scale(0.9);margin-left: 40rpx;" color="#009876">增值税发票</radio>
<!-- checked -->
<radio-group @change="radioSelect">
<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">
<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="form.invoice_info.electronic.id" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</view>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">发票备注<text>*</text></view>
<input class="rb-input" v-model="form.invoice_info.electronic.desc" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</view>
</block>
<block v-if="form.invoice_info.invoice_type==3">
<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="form.invoice_info.vat.enterprise_phone" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</view>
<view class="rb-input-box rb-line b-flex-x b-flex-b" v-if="form.invoice_info.invoice_type>1">
<view class="rb-input-title b-flex-x">纳税识别号<text>*</text></view>
<input class="rb-input" v-model="form.invoice_info.vat.id" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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="form.invoice_info.vat.enterprise_address" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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="form.invoice_info.vat.bank_name" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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="form.invoice_info.vat.bank_account" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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="form.invoice_info.vat.mailing_address" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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="form.invoice_info.vat.address" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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="form.invoice_info.vat.name" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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="form.invoice_info.vat.phone" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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="form.invoice_info.vat.province" type="text" placeholder="请选择"
placeholder-class="input-hold-class"></input>
<!-- <text class="b-icon icon-right b-text-black-dd"></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>
<!-- disabled -->
<input class="rb-input" v-model="form.invoice_info.vat.city" type="text" placeholder="请选择"
placeholder-class="input-hold-class"></input>
<!-- <text class="b-icon icon-right b-text-black-dd"></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>
<input class="rb-input" v-model="form.invoice_info.vat.district" type="text" placeholder="请选择"
placeholder-class="input-hold-class"></input>
<!-- <text class="b-icon icon-right b-text-black-dd"></text> -->
</view>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">发票备注<text>*</text></view>
<input class="rb-input" v-model="form.invoice_info.vat.desc" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</view>
</block>
<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" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</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" disabled type="text" placeholder="请选择"
placeholder-class="input-hold-class"></input>
<text class="b-icon icon-right b-text-black-dd"></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>
<input class="rb-input" disabled type="text" placeholder="请选择"
placeholder-class="input-hold-class"></input>
<text class="b-icon icon-right b-text-black-dd"></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>
<input class="rb-input" disabled type="text" placeholder="请选择"
placeholder-class="input-hold-class"></input>
<text class="b-icon icon-right b-text-black-dd"></text>
</view>
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">发票备注<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入"
placeholder-class="input-hold-class"></input>
</view>
</view>
<view class="b-mt-40 b-mb-60">
<button @click="SubmitEvent"class="rb-regist-btn b-btn b-btn-green b-mr-10" style="width: 340rpx;height: 112rpx;">保存草稿</button>
<button @click="SubmitDraft"class="rb-regist-btn b-btn b-btn-green b-mr-10" style="width: 340rpx;height: 112rpx;">保存草稿</button>
<button @click="SubmitEvent"class="rb-regist-btn b-btn b-btn-green b-ml-10" style="width: 340rpx;height: 112rpx;">下一步</button>
</view>
@ -171,10 +190,9 @@
<script>
import util from '@/utils/util.js';
// 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 { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import {
mapState
} from 'vuex'
@ -185,12 +203,73 @@ export default {
},
data() {
return {
appid: "",
localImg: {
1: {
url: "",
mediaid: ""
},
2: {
url: "",
mediaid: ""
},
3: {
url: "",
mediaid: ""
}
},
form: {//auth_data
"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
"qualification_other": [], // array<string> media_id jpg,jpeg .bmp.gif .png10
"auth_ident_material": [],
"auth_identification": "",
"contact_info": {
"email": "",
"name": ""
},
"customer_type": 1, //number 1 1215
"invoice_info": {
"electronic": {
"desc": "",
"id": "",
},
"invoice_title": "",
"invoice_type": 1,//1 2 3
"vat": {
"address": "",
"bank_account": "",
"bank_name": "",
"city": "",
"desc": "",
"district": "",
"enterprise_address": "",
"enterprise_phone": "",
"id": "",
"mailing_address": "",
"name": "",
"phone": "",
"province": ""
}
},
"pay_type": 2,
"service_appid": "",
"third_party_phone": ""
}
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
onLoad(opts) {
// console.log("onload-", this.brandInfo.brand.id)
console.log("onload-", opts)
this.appid = opts.appid;
// util.showNone("onLoad")
// this.getAuthInfo()
this.getTempDraft()
},
onShow() {
@ -204,12 +283,230 @@ export default {
},
},
methods: {
idTimeChange(e){
radioSelect(e){
console.log(e.detail)
this.form.invoice_info.invoice_type = e.detail.value
},
wordSelect(e){
console.log(e.detail)
this.form.account_name_type = e.detail.value
},
companySelect(e){
console.log(e.detail)
this.form.customer_type = e.detail.value
},
setCallbackInfoToPage(){
//
},
SubmitDraft(){
this.setLocalImgMediaidToForm()
console.log("form", this.form)
this.editTempDraft()
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
}
this.setLocalImgMediaidToForm()
console.log("form", this.form)
this.editTempDraft()
this.wxauth()
// util.routeTo("/subpackage/party/pages/miniapp/certify_res","nT")
},
toCertifyRes(){
util.routeTo(`/subpackage/party/pages/miniapp/certify_res?appid=${this.appid}`,"nT")
},
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,
isDefaultGet: false,
})
.then(res=>{
console.log("wxauth:", res.data)
let _res = res.data.data
if(res.data.code!=0){
util.showNone(res.data.message)
// return util.showNone("wxauth")
}else{
util.showNone("提交认证成功")
this.toCertifyRes()
return
}
})
.catch(err=>{
console.log("get_icp_entrance_info-err", err)
})
},
editTempDraft(){
let _data = this.getGateWayJson('wxauth')
_data.form['auth_data'] = this.form
_data.localImg = this.localImg
_data.temp_type = 0 //
servers.post({
url: party_api.editTempDraft,
data: _data,
isDefaultGet: false,
})
.then(res=>{
console.log("get_icp_entrance_info:", res.data)
let _res = res.data.data
if(res.data.code!=0){
return util.showNone("保存失败")
}else{
// this.icpInfo = _res.info
return util.showNone("保存成功")
}
})
.catch(err=>{
console.log("get_icp_entrance_info-err", err)
})
},
getTempDraft(){
let _data = this.getGateWayJson('getwxauth')
_data.temp_type = 0 //
servers.post({
url: party_api.getTempDraft,
data: _data,
isDefaultGet: false,
})
.then(res=>{
console.log("get_icp_entrance_info:", res.data)
let _res = res.data.data
if(res.data.code!=0){
return util.showNone("errcode:"+_res.errcode+"-"+_res.errmsg)
}else{
this.form = _res.form.auth_data
if(_res.localImg)this.localImg = _res.localImg
}
})
.catch(err=>{
console.log("get_icp_entrance_info-err", err)
})
},
getAuthInfo(){
util.showLoad()
servers.get({
url: party_api.getAuthInfo,
data: {
brand_id: this.brandInfo.brand.id
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
console.log(res)
this.form = res.data
})
},
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("接口不存在")
}
console.log(555566666,_data)
_data.appid = appid;
return _data
},
async clickUploadImg(which){
// which 1: 2: 3:
//which,imgurl, mediaid
this.localImg[which].url = await this.getLocalImg();
this.localImg[which].mediaid = await this.getUploadImgMediaId(this.localImg[which].url);
if(!this.localImg[which].mediaid)this.localImg[which].url=""
},
setLocalImgMediaidToForm(){
// "qualification": "dgd_3lNcp4NOfg9J2--l5e60x8mpGfFOStb3qeKxco0xSQQJxK6KYxlYkE9qZVF9",// string media_id jpg,jpeg .bmp.gif .png
// "account_supplemental": [], // array<string> - media_id jpg,jpeg .bmp.gif .png
// "qualification_other": [], // array<string> media_id jpg,jpeg .bmp.gif .png10
this.form.qualification = this.localImg[1].mediaid
this.form.account_supplemental = [this.localImg[2].mediaid]
this.form.qualification_other = [this.localImg[3].mediaid]
},
getUploadImgURL(tempFilePath){
return servers.uploadFile({
url: party_api.webUpload,
filePath: tempFilePath,
name: 'file',
formData: {}
})
.then(res=>{
console.log("uploadFile-res", res)
if(res.statusCode == 200){
// console.log("uploadFile-url 1", res.data.data.url)
let _data = JSON.parse(JSON.stringify(res.data))
console.log("uploadFile-url return type", typeof(_data))
// console.log("uploadFile-url ", JSON.parse(_data))
_data = JSON.parse(_data).data
return _data.url
}
})
.catch(err=>{
console.log("uploadFile-err", err)
})
},
//
getLocalImg() {
console.log("clickUploadImg");
return new Promise((resolve, reject) => {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
console.log("chooseImage", res)
let tempFilePaths = res.tempFilePaths[0];
resolve(tempFilePaths)
},
fail: (err) => {
console.log("chooseImage-err", err)
reject(err)
}
});
})
},
getUploadImgMediaId(tempFilePath){
let appid = this.appid
let _param_str = `module=/cgi-bin/media/upload&appid=${appid}`
let _url = party_api.gatewayDoDuplicate+"?"+_param_str
return servers.uploadFile({
url: _url,
filePath: tempFilePath,
name: 'image',
formData: {
'form.type':"image"
}
})
.then(res=>{
console.log("uploadFile-gatewayDoDuplicate-res", res)
if(res.statusCode == 200){
let _data = JSON.parse(JSON.stringify(res.data))
console.log("uploadFile-url return type", typeof(_data))
_data = JSON.parse(_data).data
console.log("uploadFile-gatewayDoDuplicate-上传成功 接口真正数据", _data)
return _data.media_id
}
})
.catch(err=>{
console.log("uploadFile-err", err)
})
},
}
}
</script>

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

@ -5,39 +5,43 @@
<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 ">创建小程序认证</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-red">审核中</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 ">16976943080589765000</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">
<text class="b-t-28">打回重填原因:</text>
<text class="b-t-28 "></text>
<view class="cr-box-top-item b-flex-x b-flex-s" v-if="result.apply_status ==3">
<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">
<text class="b-t-28">认证失败原因:</text>
<text class="b-t-28 "></text>
<view class="cr-box-top-item b-flex-x b-flex-s" v-if="result.apply_status ==5">
<text class="b-t-28 b-t-B">认证失败原因</text>
<text class="b-t-28 ">{{result.fail_reason}}</text>
</view>
</view>
</view>
<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 class="cr-box-bottom-img" src="../../static/index/qr-img.png"></image>
<!-- <image v-if="result.auth_url" class="cr-box-bottom-img" :src="result.auth_url"></image> -->
<view class="canvas">
<!-- 二维码插件 width height设置宽高 -->
<canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" />
</view>
<view class="b-t-28 b-t-gray">可截图扫码</view>
</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>
@ -46,32 +50,78 @@
<script>
import util from '@/utils/util.js';
// 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 { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import uQRCode from '@/uni_modules/cc-defineQRCode/components/cc-defineQRCode/common/uqrcode.js'
import {
mapState
} from 'vuex'
export default {
components: {
// 'hoverCartList': hoverCartList ,
},
data() {
return {
qrcodeText:"",
qrcodeSrc:"",
qrcodeSize: 200,
appid: "",
result: {
"appid": "",
"apply_status": "",
"auth_url": "",
"errcode": 0,
"errmsg": "",
"orderid": "",
"task_status": ""
},
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
onLoad(opts) {
if( opts.appid)this.appid = opts.appid;
this.getAuthInfo();
},
onShow() {
},
computed: {
...mapState(['brandInfo',])
...mapState(['brandInfo',]),
getTaskTxt(){
return (status)=>{
let map_task_status = {
0: '初始状态',
1: '任务超时, 24小时内有效',
2: '用户授权拒绝',
3: '用户授权同意',
4: '发起人脸流程',
5: '人脸认证失败',
6: '人脸认证ok',
7: '人脸认证后,已经提交手机号码下发验证码',
8: '手机验证失败',
9: '手机验证成功',
11: '创建认证审核单失败',
12: '创建认证审核审核单成功',
14: '验证失败',
15: '等待支付'
}
return map_task_status[status]||"未认证"
}
},
getApplyTxt(){
return (status)=>{
let map_apply_status= {
0: '审核单不存在',
1: '待支付',
2: '审核中',
3: '打回重填',
4: '认证通过',
5: '认证最终失败(不能再修改)'
}
return map_apply_status[status]||"未认证"
}
},
},
watch: {
cartList() {
@ -79,13 +129,75 @@ export default {
},
},
methods: {
getAuthInfo(){
let _data = this.getGateWayJson("queryauth")
servers.post({
url: party_api.gatewayDo,
data:_data,
isDefaultGet: false,
})
.then(res=>{
console.log("queryauth:", res.data)
// let _res = res.data.data
if(res.data.code!=0){
util.showNone("查询失败")
}else{
this.result = res.data.data
this.qrcodeText = this.result.auth_url
this.makeQR();
console.log("this.result", JSON.stringify(this.result))
}
})
.catch(err=>{
console.log("get_icp_entrance_info-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
},
idTimeChange(e){
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
}
}
},
makeQR() {
uni.showLoading({
title: '二维码生成中',
mask: true
})
uQRCode.make({
canvasId: 'qrcode',
text: this.qrcodeText,
size: this.qrcodeSize,
margin: 10,
success: res => {
this.qrcodeSrc = res
console.log('qrcodeSrc = ' + this.qrcodeSrc);
},
complete: () => {
uni.hideLoading()
}
})
},
},
}
</script>

1489
src/subpackage/party/pages/miniapp/record.vue
File diff suppressed because it is too large
View File

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

@ -11,18 +11,19 @@
<!-- <view class="u-url">http://www.ouxuanzhineng.cn<text class="b-t-U "></text></view> -->
<view style="height: 200rpx;"></view>
<button @click="SubmitEvent"class="rb-regist-btn b-btn b-btn-orange b-mt-60 b-mb-60" style="width: 340rpx;height: 112rpx;">发起人身核验</button>
<button @click="createIcpVerifyTask"class="rb-regist-btn b-btn b-btn-orange b-mt-60 b-mb-60" style="width: 340rpx;height: 112rpx;">发起人身核验</button>
<button @click="SubmitEvent"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 340rpx;height: 112rpx;">下一步</button>
<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> -->
</view>
</template>
<script>
import util from '@/utils/util.js';
// 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 { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import {
mapState
} from 'vuex'
@ -33,12 +34,16 @@ export default {
},
data() {
return {
appid:"wxc141a743225e7885",
}
},
onLoad() {
onLoad(opts) {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
// util.showNone("onLoad")
if(!opts.appid){
opts.appid = "wxc141a743225e7885"
}
this.appid = opts.appid;
},
onShow() {
@ -52,12 +57,119 @@ export default {
},
},
methods: {
idTimeChange(e){
console.log(e.detail)
toRecordResult(){
util.routeTo(`/subpackage/party/pages/miniapp/record_res?appid=${this.appid}`,"nT")
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
}
sendIcpCreateTask(){
},
async goNext(){
let apply_icp_msg = `注意1、申请小程序备案之前,请确保前置条件已经完成:小程序名称、图标、描述等小程序基本信息已填写完成;小程序至少存在一个审核通过的类目;非个人类型小程序必须完成微信认证;2、申请备案前需要先完成小程序负责人人脸核身,以及上传所有需要用到的媒体材料。`;
await this.showModuleMsg(apply_icp_msg)
util.routeTo(`/subpackage/party/pages/miniapp/record?appid=${this.appid}`,"nT")
},
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
},
async searchIcpVerifyTask() {
try {
const res = await this.gatewayDo({
// appid: row.mini_wechat_appid,
appid: this.appid,
module: '/wxa/icp/query_icp_verifytask',
method: 'POST',
form: {
task_id: '$LAST_RESULT./wxa/icp/create_icp_verifytask.task_id'
}
});
if (res.data.errcode === 0) {
// 0. 1. 2. 3. is_finish true face_status
if (res.data.is_finish && res.data.face_status === 3) {
util.showNone('人脸核身成功');
this.goNext();//
} else {
this.showModuleMsg('人脸核身:' + ['未开始', '等待中', '失败', '成功'][res.data.face_status] + ',请处理后再试');
}
} else {
util.showNone(res.data.errmsg)
}
console.log(res);
} catch (err) {
console.log(err);
}
},
async createIcpVerifyTask() {
try {
let msg = '1、已向所指定的小程序的管理员微信发送一条备案人脸核身通知,请及时通知小程序管理员点击该通知进行人脸核身。2、人脸核身通知有效期为 1 小时,过期后需重新发起。3、如果在通知有效期内核身未能通过,可以再次点击通知进行重试,无需重新发起。'
await this.showModuleMsg(msg);
const res = await this.gatewayDo({
// appid: row.mini_wechat_appid,
appid: this.appid,
module: '/wxa/icp/create_icp_verifytask',
method: 'POST',
form: {}
});
console.log("createIcpVerifyTask 结果:",res);
} catch (err) {
console.log(err);
}
},
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()
}
}
});
})
},
gatewayDo(postJson) {
// postJson.token = "2187a643-4d4a-11ee-a364-5254005df464"
let url = party_api.gatewayDo
// #ifdef H5
url+= "?token=" + "2187a643-4d4a-11ee-a364-5254005df464"
// #endif
return servers.post({
url: url,
data: postJson,
isDefaultGet: false,
})
.then(res => {
// console.log("gatewayDo:", res.data)
if (res.statusCode == 200) {
return res.data
} else {
console.error("gatewayDo-err", postJson, res)
}
})
.catch(err => {
console.log("gatewayDo-err", err)
})
},
}
}
</script>

118
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="options" :active="2" 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>
@ -26,44 +26,74 @@
<script>
import util from '@/utils/util.js';
// 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 { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import {
mapState
} from 'vuex'
export default {
components: {
// 'hoverCartList': hoverCartList ,
},
data() {
return {
appid: "",
options:[{
title:"平台初审",
desc:"微信平台进行初审"
desc:"平台审核中"
},{
title:"审核结果",
desc:"等待审核通过"
title:"平台审核结果",
desc:"平台审核是否驳回"
},{
title:"接收验证码",
desc:"收到工信部发送的验证码"
title:"管局审核",
desc:"管局审核中"
},{
title:"自主验证",
desc:"24小时内点击进入验证"
}]
title:"管局审核结果",
desc:"管局审核是否驳回"
},{
title:"已备案",
desc:"备案成功"
}],
appData:{
audit_data: [],
available: 1,
is_canceling: false,
status: 0,
},
statusMap: {
2: '平台审核中',
3: '平台审核驳回',
4: '管局审核中',
5: '管局审核驳回',
6: '已备案',
1024: '未备案',
1025: '未备案 && 小程序信息未填',
1026: '未备案 && 小程序类目未填',
1027: '未备案 && 小程序信息未填 && 小程序类目未填',
1028: '未备案 && 小程序未认证',
1029: '未备案 && 小程序信息未填 && 小程序未认证',
1030: '未备案 && 小程序类目未填 && 小程序未认证',
1031: '未备案 && 小程序信息未填 && 小程序类目未填 && 小程序未认证'
},
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
onLoad(opts) {
// console.log("onload-", this.brandInfo.brand.id)
// if(!opts.appid){
// opts.appid = "wxc141a743225e7885"
// }
this.appid = opts.appid;
this.getData();
},
onShow() {
},
computed: {
...mapState(['brandInfo',])
...mapState(['brandInfo',]),
step_options(){
}
},
watch: {
cartList() {
@ -71,11 +101,61 @@ export default {
},
},
methods: {
async getData() {
// util.showLoad("")
try {
const res = await this.gatewayDo({
appid: this.appid,
module: '/wxa/icp/get_icp_entrance_info',
method: 'GET',
form: {}
});
// const res1 = await gatewayDo({
// appid: this.appid,
// module: '/wxa/icp/query_icp_subject_types',
// method: 'GET',
// form: {}
// });
console.log(123,res);
if (res.code == 0) {
console.log(res.data);
this.appData = res.data.info;
} else {
util.showNone(res.data.errmsg);
}
util.hideLoad();
} catch (error) {
util.hideLoad();
}
},
gatewayDo(postJson) {
// postJson.token = "2187a643-4d4a-11ee-a364-5254005df464"
let url = party_api.gatewayDo
// #ifdef H5
url+= "?token=" + "2187a643-4d4a-11ee-a364-5254005df464"
// #endif
return servers.get({
url: url,
data: postJson,
isDefaultGet: false,
})
.then(res => {
// console.log("gatewayDo:", res.data)
if (res.statusCode == 200) {
return res.data
} else {
console.error("gatewayDo-err", postJson, res)
}
})
.catch(err => {
console.log("gatewayDo-err", err)
})
},
idTimeChange(e){
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
}
}
}

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

@ -6,12 +6,18 @@
<view class="r-box">
<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="certify-yes">已认证</view>
<text class="b-t-32">认证状态</text><text>*</text>
<view class="certify-yes">{{['实名验证成功', '实名验证中', '实名验证失败'][appInfo.realname_status]}}</view>
</view>
<view class="rb-box-right b-flex-x b-flex-c">
<!-- <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,10 +27,10 @@
<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="certify-no">未备案</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">
<view class="rb-box-right b-flex-x b-flex-c" @click="toIcp">
<view>去备案</view>
<text class="b-icon icon-right b-text-black-dd"></text>
</view>
@ -38,13 +44,15 @@
<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 b-t-B">小程序头像<text>*</text></view>
<view class="rb-upload-list b-flex-x">
<view class="rb-upload-item b-flex-y b-flex-c">
<image class="rb-upload-bg" src="../../static/regist/upload_bg.png"></image>
<view class="rb-upload-item b-flex-y b-flex-c" @click="setMiniappHeadImg">
<image class="rb-upload-bg" src="../../static/regist/upload_bg.png"
:src="appInfo.head_image_info.head_image_url"
></image>
<image class="rb-upload-cam" src="../../static/regist/camera.png"></image>
<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>
@ -53,32 +61,48 @@
<view class="rb-regist-box ">
<view class="b-flex-x">
<view class="b-t-B">小程序名称</view>
<button class="b-btn b-btn-green b-btn-sm b-mr-40" @click="setDirection('')">设置</button>
<button class="b-btn b-btn-green b-btn-sm b-mr-40" @click="clickSet(1)">设置</button>
</view>
<view class="rr-text rb-line">MJ智能天空篮球公馆</view>
<view class="rr-text rb-line">{{appInfo.nickname}}</view>
</view>
<!-- 小程序简介 -->
<view class="rb-regist-box ">
<view class="b-flex-x">
<view class="b-t-B">小程序简介<text class="rr-status">审核中</text></view>
<button class="b-btn b-btn-green b-btn-sm b-mr-40">设置</button>
<view class="b-t-B">小程序简介
<!-- <text class="rr-status">审核中</text> -->
</view>
<button class="b-btn b-btn-green b-btn-sm b-mr-40" @click="clickSet(2)">设置</button>
</view>
<view class="rr-text rb-line">智能设备的篮球馆线上订场线上买票线下扫码进场智能设备的篮球馆线上订场线上买票线下扫码进场智能设备的篮球馆线上订场线上买票线下扫码进场智能设备的篮球馆线上订场线上买票线下扫码进场</view>
<view class="rr-text rb-line">{{appInfo.signature_info.signature||"-"}}</view>
</view>
<!-- 小程序类目 -->
<view class="rb-regist-box ">
<view class="b-flex-x">
<view class="b-t-B">小程序类目<text class="rr-status">审核中</text></view>
<button class="b-btn b-btn-green b-btn-sm b-mr-40">设置</button>
</view>
<view class="rb-class">
<view class="b-flex-x">类目名称: <text>体育场馆</text></view>
<view class="b-flex-x">类目状态: <text class="b-t-green">审核通过</text></view>
<view class="b-flex-x b-flex-b">
<view class="b-t-B">小程序类目
<!-- <text class="rr-status">审核中</text> -->
</view>
<view class="rb-add-view b-mr-40">
<picker mode="multiSelector"
@change="bindPickerChange_queryCategories"
@columnchange="bindPickerChange_queryCategories_column"
:value="queryCategories_index"
range-key="name"
:range="queryCategories">
<button class="b-btn b-btn-green b-btn-sm " @click="clickSet(3)">添加</button>
<!-- <input class="rb-input" style="width:300rpx" disabled="true" v-model="queryIcpServiceContentTypes_show" type="text" placeholder="请选择"
placeholder-class="input-hold-class"></input> -->
</picker>
</view>
<!-- <button class="b-btn b-btn-green b-btn-sm b-mr-40" @click="clickSet(3)">设置</button> -->
</view>
<view class="rb-class">
<view class="b-flex-x">类目名称: <text>体育场馆</text></view>
<view class="b-flex-x">类目状态: <text class="b-t-red">审核中</text></view>
<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>
</view>
</view>
</view>
@ -90,12 +114,14 @@
<view class="rb-upload-title b-flex-x">运营人员身份证正反面<text>*</text></view>
<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"></image>
<image class="rb-upload-bg " src="../../static/regist/id_people.png"
: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"></image>
<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:'../../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>
@ -104,30 +130,29 @@
<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" type="text" placeholder="请输入姓名" placeholder-class="input-hold-class"></input>
<input class="rb-input" v-model="submitData.contact_person" type="text" placeholder="请输入姓名" placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入身份证号"
<input class="rb-input" v-model="submitData.extension.business_id_card" type="text" placeholder="请输入身份证号"
placeholder-class="input-hold-class"></input>
</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" type="text" placeholder="请输入手机号" placeholder-class="input-hold-class"></input>
<input class="rb-input" v-model="submitData.contact_number" type="text" placeholder="请输入手机号" placeholder-class="input-hold-class"></input>
</view>
</view>
<button @click="SubmitEvent"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 100%;height: 112rpx;">提交审核</button>
<!-- <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>
<!-- 弹窗 -->
<view class="m-popup b-popup " v-if="showPopup" :class="[directionClass,{'b-popup-round':round},{'b-popup-animation':animation}]">
<!-- <view class="m-popup b-popup " v-if="showPopup" :class="[directionClass,{'b-popup-round':round},{'b-popup-animation':animation}]">
<view class="b-popup-shade" @click="showPopup = false"></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="showPopup = false"></text>
</view>
@ -162,7 +187,7 @@
<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 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">
@ -173,49 +198,651 @@
</view>
</view>
</view>
</view> -->
<miniappChangeName v-if="showChangeNameModule"
:appInfo="appInfo" :appid="appid"
@sure="nameChange"
@close="showChangeNameModule = false"
></miniappChangeName>
<miniappChangeJianJie v-if="showChangeJianJieModule"
:appInfo="appInfo" :appid="appid"
@sure="jianjieChange"
@close="showChangeJianJieModule = false"
></miniappChangeJianJie>
</view>
</template>
<script>
import util from '@/utils/util.js';
// 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 { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import miniappChangeName from '../../components/popup-content/miniapp-change-name.vue';
import miniappChangeJianJie from '../../components/popup-content/miniapp-change-jian-jie.vue';
import {
mapState
} from 'vuex'
export default {
components: {
// 'hoverCartList': hoverCartList ,
"miniapp-change-name": miniappChangeName,
"miniapp-change-jian-jie": miniappChangeJianJie,
},
data() {
return {
showPopup:true,
showChangeNameModule:false,
showChangeJianJieModule:false,
brandInfo:"",
appid: "",//appid
showPopup:false,
directionClass:"",
round:false,
animation:true
animation:true,
appInfo:{
"account_type": 3,
"appid": "",
"credential": "",
"customer_type": 0,
"errcode": 0,
"errmsg": "ok",
"head_image_info": {
"head_image_url": "",
"modify_quota": 5,
"modify_used_count": 1
},
"nickname": "",
"nickname_info": {
"modify_quota": 0,
"modify_used_count": 0,
"nickname": ""
},
"principal_name": "",
"principal_type": 1,
"realname_status": 1,
"registered_country": 1017,
"signature_info": {
"modify_quota": 5,
"modify_used_count": 1,
"signature": ""
},
"wx_verify_info": {
"naming_verify": false,
"qualification_verify": false
}
},
submitData:{//
"extension": {
"qualification_type": 1,//
"credit_end_date": "0", //2006-01-02 0
"company_type": 1,//
"legal_person_name": "",//
"registered_province_code": "",// 110000
"registered_city_code": "",// 110100
"registered_capital": "",// 100000
"business_id_card_url": "",
"business_id_card": "",//--
"business_id_card_back_url":"",//
},
},
statusMap_icp: {
2: '平台审核中',
3: '平台审核驳回',
4: '管局审核中',
5: '管局审核驳回',
6: '已备案',
1024: '未备案',
// 1025: ' && ',
// 1026: ' && ',
// 1027: ' && && ',
// 1028: ' && ',
// 1029: ' && && ',
// 1030: ' && && ',
// 1031: ' && && && '
},
icpInfo:{},
nameInfo:{
name: "小程序名称name",
},
auditList:[,"审核中","审核不通过","审核通过"],
categoryInfo:{
categories: [{
"audit_status": 1, //1 2 3
"first": 150,
"first_name": "",
"second": 666,
"second_name": "",
}],
},
queryCategories: [[],[]],//
queryCategories_child: [],//
queryCategories_index:[[0],[0]],//index
queryCategories_show:"请选择",
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
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;
this.getCurrentAppInfo() //
this.getWebBrandUser() //-
this.get_icp_entrance_info()//
this.getcategory()
this.getAllCategoriesByType()
},
onShow() {
},
computed: {
...mapState(['brandInfo',])
// ...mapState(['brandInfo',])
icp_btn_style(){
return this.icpInfo.status == 6 ? "certify-yes" : "certify-no"
},
category_style(){
return function(status){
return [,'b-t-gray','b-t-red','b-t-green'][status]
}
},
audit_list_txt(){
return function(status){
return [,"审核中","审核不通过","审核通过"][status]
}
},
},
watch: {
cartList() {
this.setCartConfirmStyle();
},
// cartList() {
// this.setCartConfirmStyle();
// },
},
methods: {
addcategory(arr){
let _data = this.getGateWayJson("addcategory")
let _add_cacategorie = [{
certicates:[],
first:arr[0],
second:arr[1],
}]
_data.form.categories = _add_cacategorie
// data.appid = this.appid
this.gatewayDo(_data).then(res => {
console.log("addcategory:",res)
if(res.code == 0){
util.showNone("添加成功")
this.getcategory()
}
})
},
bindPickerChange_queryCategories(e) {
console.log('picker发送选择改变,携带值为', e.target.value)
let value = e.target.value;
this.queryIcpServiceContentTypes_index = value;
if (this.queryCategories[0].length != 0) {
this.queryCategories_show = this.queryCategories[0][this.queryCategories_index[0]].name
};
if (this.queryCategories[1].length != 0) {
this.queryCategories_show += '/' + this.queryCategories[1][this.queryCategories_index[1]].name
}
//type
let select_type = []
select_type.push(this.queryCategories[0][value[0]].id)
select_type.push(this.queryCategories[1][value[1]].id)
console.log('select_type:', select_type)
let that = this
let msg = "注意: 最多可以设置的类目数量: 5 个;是否添加?"
uni.showModal({
title: '提示',
content: msg,
showCancel: true,
confirmText: '添加',
confirmColor: '#009874',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
that.addcategory(select_type);
}
}
});
// this.form.icp_applets.base_info.service_content_types = select_type
},
bindPickerChange_queryCategories_column(e){
//
if (e.detail.column == 0) {
// #ifdef H5
// H5
this.queryCategories[1] = this.queryCategories_child[e.detail.value]
// #endif
// #ifdef MP-WEIXIN
// H5 $set
this.$set(this.queryCategories, 1, this.queryCategories_child[e.detail.value])
// #endif
}
},
bindPickerChange_queryCategories1(e){
console.log('picker发送选择改变,携带值为', e.detail.value)
this.queryCategories_index = e.detail.value
this.queryCategories_show = this.queryCategories[0][e.detail.value[0]].name + "/" + this.queryCategories[1][e.detail.value[1]].name
},
bindPickerChange_queryCategories_column1(e){
console.log('修改的列为', e.detail.column, ',值为', e.detail.value);
let data = {
"column": e.detail.column,
"value": e.detail.value,
"queryCategories": this.queryCategories,
"queryCategories_child": this.queryCategories_child,
"queryCategories_index": this.queryCategories_index,
}
this.queryCategories = this.changeQueryCategories(data)
},
clickSet(value){
console.log("clickSet",value)
//value: 1() 2() 3()
if(value == 1) this.showChangeNameModule = true;
if(value == 2) this.showChangeJianJieModule = true;
// this.showChangeNameModule = true;
// this.showChangeNameModule = true;
},
async getAllCategoriesByType() {
try {
const res = await this.gatewayDo({
// appid: row.mini_wechat_appid,
appid: this.appid,
module: '/cgi-bin/wxopen/getcategoriesbytype',
method: 'POST',
form: {
verify_type: 1
}
});
console.log("getAllCategoriesByType:", res.data.errcode,res)
if (res.data.errcode === 0) {
let allCategories = ""
let categories = res.data.categories_list.categories
// console.log("11111",res.data.categories_list.categories)
let obj = this.getTwoArrFromWX(res)
console.log("obj:",obj)
this.queryCategories = obj.array_obj;
this.queryCategories_child = obj.child_arr;
/**/
// console.log(res.data.categories_list.categories);
/**
id number 类目 ID
name bufffer 类目名称
level number 类目层级
father number 类目父级 ID
children array<number> 子级类目 ID
sensitive_type number 是否为敏感类目1 为敏感类目需要提供相应资质审核0 为非敏感类目无需审核
qualify
*/
} else {
util.showNone(res.data.errmsg);
}
// getAllCategoriesByType
} catch (error) {
}
},
getTwoArrFromWX(res) {
let categories = res.data.categories_list.categories
let firstLevel = []
firstLevel = categories.filter((item) => item.level === 1).map((item) => {
return {
...item,
sub_list: categories.filter(
(item2) => item2.father === item.id
)
};
});
//uni: [[],[]]
let array = [[],[]]
let array_type = [[],[]]
let array_obj = [[],[]] //type,name
let child_arr = []
firstLevel.forEach((item) => {
// array[0].push(item.name)
// array_type[0].push(item.type)
array_obj[0].push(item)
// let children_name = item.children.map((item1) => {
// return item1.name
// })
// array[1].push(children_name)
// let children_type = item.children.map((item1) => {
// return item1.type
// })
// array_type[1].push(children_type)
})
child_arr = firstLevel.map((item) => item.sub_list)// push childArr
array_obj[1].push(...child_arr[0]) ////
return {
firstLevel, //picker: [{name,type,children:[]},...]
// array, //uni picker: [[name],[name]]
// array_type,//uni picker type: [[type],[type]]
array_obj,//uni picker obj: [[obj],[obj]]
child_arr,//
}
// this.queryIcpServiceContentTypes = firstLevel;
},
getcategory(){
let data = {
"appid":"wxeb7efb9a1cbdd554",
"module":"/cgi-bin/wxopen/getcategory",
"method":"GET",
"form":{}
}
data.appid = this.appid
return servers.post({
url: party_api.gatewayDo,
data: data,
isDefaultGet: false,
})
.then(res=>{
console.log("getcategory:", res.data)
if(res.data.code!=0){
return util.showNone("errcode:"+res.data.errcode+"-"+res.data.errmsg)
}else{
this.categoryInfo = res.data.data
return res.data
}
})
.catch(err=>{
console.log("getcategory-err", err)
})
},
get_icp_entrance_info(){
servers.post({
url: party_api.gatewayDo,
data: this.getGateWayJson("get_icp_entrance_info"),
isDefaultGet: false,
})
.then(res=>{
console.log("get_icp_entrance_info:", res.data)
let _res = res.data.data
if(res.data.code!=0){
return util.showNone("errcode:"+_res.errcode+"-"+_res.errmsg)
}else{
this.icpInfo = _res.info
}
})
.catch(err=>{
console.log("get_icp_entrance_info-err", err)
})
},
async setMiniappHeadImg(){
// util.showNone("")
let that = this
let msg = "注意: 小程序头像每个月固定的修改次数上限;一年内可申请修改5次"
uni.showModal({
title: '提示',
content: msg,
showCancel: true,
confirmText: '知道了',
confirmColor: '#009874',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
that.doUploadAndChange();
}
}
});
},
async doUploadAndChange(){
let url = await this.getLocalImg();
let mediaid = await this.getUploadImgMediaId(url);
this.setHeadImage(mediaid)
},
//
async setJianJie(txt) {
let data = {
"appid":"wxeb7efb9a1cbdd554","module":"/cgi-bin/account/modifysignature",
"method":"POST",
"form":{"signature":""}
}
data.form.signature = txt
try {
let res = await this.gatewayDo(data);
// const { info } = res.data;
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) {
let form = {
"head_img_media_id": mediaid,
"x1": "0",
"y1": "0",
"x2": "1",
"y2": "1"
}
try {
const res = await this.gatewayDo({
appid: this.appid,
module: '/cgi-bin/account/modifyheadimage',
method: 'POST',
form: form
});
// const { info } = res.data;
if (res.data.errcode === 0) {
console.log(res);
util.showNone("修改成功")
this.getCurrentAppInfo()
} else {
util.showNone(res.data.errmsg)
}
} catch (error) {
}
},
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()
}
}
});
})
},
toIcp(){
// util.routeTo(`/subpackage/party/pages/miniapp/record?appid=${this.appid}`,"nT")
util.routeTo(`/subpackage/party/pages/miniapp/record_pre?appid=${this.appid}`,"nT")
},
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)
},
jianjieChange(e){
console.log("jianjieChange",e)
this.setJianJie(e)
this.showChangeJianJieModule = false
},
async clickUploadImg(place,where,which){
let {localImg} = this
let _where = ""
let place_arr = ['icp_subject','icp_applets'] //3
if(place_arr.indexOf(place) >= 0){
_where = localImg[place][where]
}else{
_where = localImg[where]
}
let _which = _where[which]
_which.url = await this.getLocalImg();
_which.mediaid = await this.getUploadImgMediaId(_which.url);
_which.url = await this.getUploadImgURL(_which.url)
console.log("clickUploadImg:", _which)
},
//
getLocalImg() {
console.log("clickUploadImg");
return new Promise((resolve, reject) => {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
console.log("chooseImage", res)
let tempFilePaths = res.tempFilePaths[0];
resolve(tempFilePaths)
},
fail: (err) => {
console.log("chooseImage-err", err)
reject(err)
}
});
})
},
getUploadImgMediaId(tempFilePath){
let appid = this.appid
let _param_str = `module=/cgi-bin/media/upload&appid=${appid}`
let _url = party_api.gatewayDoDuplicate+"?"+_param_str
return servers.uploadFile({
url: _url,
filePath: tempFilePath,
name: 'image',
formData: {
'form.type':"image"
}
})
.then(res=>{
console.log("uploadFile-gatewayDoDuplicate-res", res)
if(res.statusCode == 200){
let _data = JSON.parse(JSON.stringify(res.data))
console.log("uploadFile-url return type", typeof(_data))
_data = JSON.parse(_data).data
console.log("uploadFile-gatewayDoDuplicate-上传成功 接口真正数据", _data)
return _data.media_id
}
})
.catch(err=>{
console.log("uploadFile-err", err)
})
},
gatewayDo(postJson) {
// postJson.token = "2187a643-4d4a-11ee-a364-5254005df464"
let url = party_api.gatewayDo
// #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 0 :", res.data)
if(res.data.code!=0){
return util.showNone(res.data.message)
}else{
return res.data
}
})
.catch(err => {
console.log("gatewayDo-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
},
getCurrentAppInfo(){
// let appid = this.appid;
let _data = party_api["gatewayDoJson"].getaccountbasicinfo
console.log("getaccountbasicinfo:",_data)
servers.post({
url: party_api.gatewayDo,
data: _data,
isDefaultGet: false,
})
.then(res=>{
console.log("getCurrentAppInfo:", res.data)
this.appInfo = res.data.data
})
.catch(err=>{
console.log("getCurrentAppInfo-err", err)
})
},
getWebBrandUser(){
console.log("getWebBrandUser")
servers.post({
url: party_api.webBrandUserGet,
data: {
brand_id: this.brandInfo.brand.id
},
isDefaultGet: false,
})
.then(res=>{
console.log("webBrandUserGet-res", res)
if(res.statusCode == 200){
console.log("webBrandUserGet-res.data", res.data)
this.submitData = res.data.data
}
})
.catch(err=>{
console.log("webBrandUserGet-err", err)
})
},
show(status = true){
this.showPopup = status;
},
@ -233,7 +860,6 @@ export default {
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
}
}
}
@ -455,6 +1081,12 @@ page {
}
}
.rb-add-view{
// width:200rpx;
// background: gray;
// position: relative;
// right: 0;
}
}
.rb-input-box {
padding: 8rpx 0;
@ -484,12 +1116,15 @@ page {
color: #333333;
// width: 168rpx;
// position: absolute;
>text:first-child {
// width: 188rpx;
}
>text:last-child {
color: $b-color-red;
}
width: 280rpx;
// width: 280rpx;
width: 330rpx;
.certify-yes {
padding: 10rpx;
margin-left: 10rpx;

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

@ -11,22 +11,33 @@
<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" type="text" placeholder="请输入企业名称"
<input v-model="verify_info.enterprise_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">
<view class="rb-input-title b-flex-x">证件类型<text>*</text></view>
<input 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>
<input class="rb-input" type="text" placeholder="请输入证件号"
<input v-model="verify_info.code" 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">
<view class="rb-input-title b-flex-x">法人姓名<text>*</text></view>
<input 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">
@ -40,12 +51,12 @@
</view> -->
<view class="rb-input-box b-flex-x b-flex-b">
<view class="rb-input-title b-flex-x">法人微信号<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入法人微信号"
<input v-model="verify_info.legal_persona_wechat" 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">
<view class="rb-input-title b-flex-x">法人身份证<text>*</text></view>
<input class="rb-input" type="text" placeholder="请输入法人身份证"
<input v-model="verify_info.legal_persona_idcard" class="rb-input" type="text" placeholder="请输入法人身份证"
placeholder-class="input-hold-class"></input>
</view>
@ -86,7 +97,7 @@
</view>
</view> -->
<button @click="SubmitEvent"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 100%;height: 112rpx;">提交转正</button>
<button @click="verifybetaweapp"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 100%;height: 112rpx;">提交转正</button>
</view>
@ -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>
@ -107,10 +118,9 @@
<script>
import util from '@/utils/util.js';
// 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 { servers } from '@/js/server';
import party_api from '../../../party/js/api';
import {
mapState
} from 'vuex'
@ -121,18 +131,39 @@ export default {
},
data() {
return {
showRegular:false
showRegular:true,
brandInfo:"",
verify_info: {
"code": "",//
"code_type": 1,//
"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,
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
async onLoad() {
// util.showNone("onLoad")
let _brandInfo = await this.$store.dispatch('getBrandInfo');
console.log("_brandInfo:",_brandInfo)
this.brandInfo = _brandInfo
this.getVerifyMiniAppInfo()
},
onShow() {
},
computed: {
...mapState(['brandInfo',])
// ...mapState(['brandInfo',])
},
watch: {
cartList() {
@ -140,11 +171,156 @@ 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,
data: {
brand_id: this.brandInfo.brand.id
},
failMsg: '加载数据失败!'
})
.then(res=>{
console.log('getVerifyMiniAppInfo',res)
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)
})
},
idTimeChange(e){
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
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
}
return servers.get({
url: party_api.verifybetaweapp,
data: _data,
failMsg: '转正失败!'
})
.then(res=>{
console.log('verifybetaweapp',res)
this.SubmitEvent()
return res
}).catch(err=>{
console.warn('verifybetaweapp err',err)
// this.SubmitEvent()
})
},
async SubmitEvent(){
await this.showModuleMsg('请等待法人完成转正操作后, 再去进行小程序的认证与备案操作!')
// util.routeTo("/subpackage/party/pages/miniapp/regular_res","nT")
this.showRegular = false
}
}
}

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

@ -6,7 +6,7 @@
<text class="b-t-B b-t-I">验证公户信息</text>
<text>请复制下方网址打开查看教程</text>
</view>
<view class="u-url">http://www.ouxuanzhineng.cn<text class="b-t-U "></text></view>
<view class="u-url" @click="clickSaveUrl">http://www.ouxuanzhineng.cn<text class="b-t-U ">复制</text></view>
<!-- <button @click="SubmitEvent"class="rb-regist-btn b-btn b-btn-green b-mt-60 b-mb-60" style="width: 100%;height: 112rpx;">开始申请</button> -->
@ -15,17 +15,13 @@
<script>
import util from '@/utils/util.js';
// 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 {
@ -34,7 +30,6 @@ export default {
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
},
onShow() {
@ -48,11 +43,22 @@ export default {
},
},
methods: {
clickSaveUrl(){
console.log('clickSaveUrl')
this.saveToColip("http://www.ouxuanzhineng.cn");
},
saveToColip(url){
uni.setClipboardData({
data: url,
success: function () {
util.showNone('复制成功')
}
});
},
idTimeChange(e){
console.log(e.detail)
},
SubmitEvent(){
util.routeTo("/subpackage/party/pages/login/reviewing","nT")
}
}
}

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

@ -9,7 +9,7 @@
<view class="b-t-32 b-t-B b-pb-20 b-ml-40 b-mb-40">请按照实际情况选择并填写</view>
</view>
</view>
<view class="p-box b-flex-x b-flex-b b-mb-30" style="width: 670rpx;">
<view class="p-box b-flex-x b-flex-b b-mb-30" style="width: 670rpx;" @click="toPage(0)">
<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>
@ -17,7 +17,7 @@
</view>
</view>
<view class="p-box b-flex-x b-flex-b b-mb-40" style="width: 670rpx;">
<view class="p-box b-flex-x b-flex-b b-mb-40" style="width: 670rpx;" @click="toPage(1)">
<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>
@ -30,50 +30,39 @@
</view>
<view class="fly_btn" @click="toPageInfo(tabList[4])">
<!-- <image class="f_icon" src="/static/images/icon/index/scan_icon_white.png" mode="scaleToFill"/> -->
<!-- <view class="fly_btn" @click="toMyRegist">
<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>
</view>
</view> -->
</view>
</template>
<script>
import util from '@/utils/util.js';
// 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'
// const MiniprogramThirdpartyPlugin = requirePlugin('miniprogram-thirdparty-plugin')
export default {
components: {
// 'hoverCartList': hoverCartList ,
},
data() {
return {
// categoryBtnStyle: { //
// default: { fontWeight:"normal", color:"#9A9A9D", backgroundColor:"rgba(0,0,0,0)" },
// click: { fontWeight:"600", color:"#009874", backgroundColor:"rgba(0,152,116,0.2)" },
// },
// categoryScrollTop: 0, //
}
},
onLoad() {
console.log("onload-", this.brandInfo.brand.id)
util.showNone("onLoad")
// this.params.brand_id = this.brandInfo.brand.id;
// this.deleteSearchLocal(); //
// this.getStoreList(); //
// this.fixMainHeight(); //
},
onShow() {
// this.getSearchLocal(); //
// this.getRetailStatus(); //
},
onReady() {
// MiniprogramThirdpartyPlugin.init(wx)
},
computed: {
...mapState(['brandInfo', ])
@ -84,7 +73,20 @@
},
},
methods: {
toPage(index){
console.log('toPage',index)
if(index == 0){
util.showNone("法人可配合人脸识别")
util.routeTo('/subpackage/party/pages/miniapp/auth','nT')
}else{
util.showNone("法人无法配合人脸识别")
util.routeTo('/subpackage/party/pages/miniapp/unauth','nT')
}
},
toMyRegist(){
util.routeTo('/subpackage/party/pages/miniapp/certify_res','nT')
},
}
}

10
src/uni_modules/cc-defineQRCode/changelog.md

@ -0,0 +1,10 @@
## 2.1(2024-03-29)
优化使用说明
## 2.0.3(2024-01-07)
组件优化
## 2.0.2(2023-07-03)
组件优化
## 2.0.1(2023-07-03)
组件优化
## 2.0.0(2023-07-03)
组件优化

128
src/uni_modules/cc-defineQRCode/components/cc-defineQRCode/cc-defineQRCode.vue

@ -0,0 +1,128 @@
<template>
<view class="content">
<view class="canvas">
<!-- 二维码插件 width height设置宽高 -->
<canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" />
</view>
<text class="list-text">{{ '预约号码:' + ' ' + myFormatData.yyh}}
</text>
<text class="list-text"> {{ '预约窗口:' + ' ' + myFormatData.bsdmc}}
</text>
<text class="list-text"> {{ '业务类型:' + ' ' + myFormatData.Yylxmc}}
</text>
<text class="list-text"> {{ '预约日期:' + ' ' + myFormatData.yyrq}}
</text>
</view>
</template>
<script>
import Vue from 'vue';
import uQRCode from './common/uqrcode.js'
export default {
data() {
return {
//
qrcodeText: 'eoruw20230528',
//
qrcodeSize: 136,
//
qrcodeSrc: '',
myFormatData: {
'yyh': 'eoruw20230528',
'bsdmc': '窗口1',
'Yylxmc': '租金缴纳',
'yyrq': '预约日期'
},
}
},
onLoad(e) {
this.make();
},
methods: {
make() {
uni.showLoading({
title: '二维码生成中',
mask: true
})
uQRCode.make({
canvasId: 'qrcode',
text: this.qrcodeText,
size: this.qrcodeSize,
margin: 10,
success: res => {
this.qrcodeSrc = res
console.log('qrcodeSrc = ' + this.qrcodeSrc);
},
complete: () => {
uni.hideLoading()
}
})
},
}
}
</script>
<style>
page {
background-color: #FFFFFF;
}
.content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: var(--status-bar-height);
}
.text {
display: flex;
justify-content: center;
margin-top: 46rpx;
margin-bottom: 6rpx;
font-size: 36rpx;
height: 44rpx;
color: #333333;
}
.canvas {
margin-top: 50rpx;
margin-bottom: 36rpx;
text-align: center;
}
.list-text {
display: flex;
justify-content: center;
width: 100%;
line-height: 60rpx;
font-size: 28rpx;
color: #666666;
}
.button {
width: 88%;
margin-top: 52rpx;
}
</style>

1380
src/uni_modules/cc-defineQRCode/components/cc-defineQRCode/common/uqrcode.js
File diff suppressed because it is too large
View File

85
src/uni_modules/cc-defineQRCode/package.json

@ -0,0 +1,85 @@
{
"id": "cc-defineQRCode",
"displayName": "基于uQRCode封装的跨平台二维码生成插件 生成二维码并返回二维码图片地址 ",
"version": "2.1",
"description": "基于uQRCode封装的二维码生成插件 生成二维码并返回图片地址 ,适用所有Javascript运行环境, 支持微信小程序",
"keywords": [
"二维码",
"生成二维码",
"QR",
"qrcode",
"二维码生成"
],
"repository": "",
"engines": {
"HBuilderX": "^3.8.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "y",
"快手": "y",
"飞书": "y",
"京东": "y"
},
"快应用": {
"华为": "y",
"联盟": "y"
}
}
}
}
}

162
src/uni_modules/cc-defineQRCode/readme.md

@ -0,0 +1,162 @@
# cc-defineQRCode
### 二维码小程序已上线,小程序扫码体验地址
![图片](https://i.postimg.cc/R01yVHSG/Wechat-IMG172.jpg)
### 我的技术微信公众号
查看更多前端组件和框架信息,请关注我的技术微信公众号【前端组件开发】
![图片](https://i.postimg.cc/RZ0sjnYP/front-End-Component.jpg)
#### 使用方法
```使用方法
#引入js文件
import uQRCode from './common/uqrcode.js'
<view class="canvas">
<!-- 二维码插件 width height设置宽高 -->
<canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" />
</view>
```
#### HTML代码实现部分
```html
<template>
<view class="content">
<view class="canvas">
<!-- 二维码插件 width height设置宽高 -->
<canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" />
</view>
<text class="list-text">{{ '预约号码:' + ' ' + myFormatData.yyh}}
</text>
<text class="list-text"> {{ '预约窗口:' + ' ' + myFormatData.bsdmc}}
</text>
<text class="list-text"> {{ '业务类型:' + ' ' + myFormatData.Yylxmc}}
</text>
<text class="list-text"> {{ '预约日期:' + ' ' + myFormatData.yyrq}}
</text>
</view>
</template>
<script>
import Vue from 'vue';
import uQRCode from './common/uqrcode.js'
export default {
data() {
return {
// 二维码标识串
qrcodeText: 'eoruw20230528',
// 二维码尺寸
qrcodeSize: 136,
// 最终生成的二维码图片
qrcodeSrc: '',
myFormatData: {
'yyh': 'eoruw20230528',
'bsdmc': '窗口1',
'Yylxmc': '租金缴纳',
'yyrq': '预约日期'
},
}
},
onLoad(e) {
this.make();
},
methods: {
make() {
uni.showLoading({
title: '二维码生成中',
mask: true
})
uQRCode.make({
canvasId: 'qrcode',
text: this.qrcodeText,
size: this.qrcodeSize,
margin: 10,
success: res => {
this.qrcodeSrc = res
console.log('qrcodeSrc = ' + this.qrcodeSrc);
},
complete: () => {
uni.hideLoading()
}
})
},
}
}
</script>
<style>
page {
background-color: #FFFFFF;
}
.content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: var(--status-bar-height);
}
.text {
display: flex;
justify-content: center;
margin-top: 46rpx;
margin-bottom: 6rpx;
font-size: 36rpx;
height: 44rpx;
color: #333333;
}
.canvas {
margin-top: 50rpx;
margin-bottom: 36rpx;
text-align: center;
}
.list-text {
display: flex;
justify-content: center;
width: 100%;
line-height: 60rpx;
font-size: 28rpx;
color: #666666;
}
.button {
width: 88%;
margin-top: 52rpx;
}
</style>
```
Loading…
Cancel
Save