Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄媛媛
ElectricitySheep
Commits
0100f99f
Commit
0100f99f
authored
Apr 28, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改微信页面
parent
01861514
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
215 additions
and
103 deletions
+215
-103
wexinappconfig.vue
src/components/StoreDesign/wexinappconfig.vue
+79
-31
wexinappmsg.vue
src/components/StoreDesign/wexinappmsg.vue
+109
-59
mall.vue
src/components/mall.vue
+9
-1
index.js
src/router/index.js
+18
-12
No files found.
src/components/StoreDesign/wexinappconfig.vue
View file @
0100f99f
...
...
@@ -27,44 +27,60 @@
<div
class=
"wexinappconfig"
>
<div
class=
"CommonHeader"
>
微信小程序配置
</div>
<div
class=
"mimitBody"
>
<el-form
:model=
"appConfig"
ref=
"appConfig"
label-width=
"150px"
>
<el-form-item
label=
"小程序AppId"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appConfig.MiniAppId"
>
</el-input>
</el-form-item>
<el-form-item
label=
"小程序appSecret"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appConfig.MiniAppSecret"
>
</el-input>
</el-form-item>
<el-form-item
label=
"微信支付商户号"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appConfig.WeChatPayMerchants"
>
</el-input>
</el-form-item>
<el-form-item
label=
"微信支付Api密钥"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appConfig.WeChatApiSecret"
>
</el-input>
</el-form-item>
<el-form-item
label=
"微信支付apiclient_cert.pem"
>
<el-input
type=
"textarea"
:rows=
"2"
style=
"width:250px"
size=
"small"
maxlength=
"1000"
v-model=
"appConfig.WeChatPayCertificate"
>
</el-input>
</el-form-item>
<el-form-item
label=
"微信支付apiclient_key.pem"
>
<el-input
type=
"textarea"
:rows=
"2"
style=
"width:250px"
size=
"small"
maxlength=
"1000"
v-model=
"appConfig.WeChatPayPrivateKey"
>
</el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"UpdateAppConfig()"
>
确 定
</el-button>
</span>
<div
class=
"el-col el-col-12"
>
<el-form
:model=
"appConfig"
:rules=
"rules"
ref=
"appConfig"
label-width=
"150px"
>
<el-form-item
label=
"小程序AppId"
prop=
"MiniAppId"
size=
"small"
>
<el-input
type=
"text"
size=
"small"
maxlength=
"200"
v-model=
"appConfig.MiniAppId"
>
</el-input>
</el-form-item>
<el-form-item
label=
"小程序appSecret"
prop=
"MiniAppSecret"
size=
"small"
>
<el-input
v-if=
"isShowAppSecret"
type=
"text"
@
focus=
"isShowAppSecret=false"
size=
"small"
placeholder=
"已隐藏内容,点击查看或编辑"
>
</el-input>
<el-input
v-else
type=
"text"
size=
"small"
maxlength=
"200"
v-model=
"appConfig.MiniAppSecret"
>
</el-input>
</el-form-item>
<el-form-item
label=
"微信支付商户号"
prop=
"WeChatPayMerchants"
size=
"small"
>
<el-input
type=
"text"
size=
"small"
maxlength=
"200"
v-model=
"appConfig.WeChatPayMerchants"
>
</el-input>
</el-form-item>
<el-form-item
label=
"微信支付Api密钥"
prop=
"WeChatApiSecret"
size=
"small"
>
<el-input
v-if=
"isShowApi"
type=
"text"
@
focus=
"isShowApi=false"
size=
"small"
placeholder=
"已隐藏内容,点击查看或编辑"
>
</el-input>
<el-input
v-else
type=
"text"
size=
"small"
maxlength=
"200"
v-model=
"appConfig.WeChatApiSecret"
>
</el-input>
</el-form-item>
<el-form-item
label=
"微信支付apiclient_cert.pem"
size=
"small"
>
<el-input
v-if=
"isShowClientOne"
type=
"textarea"
@
focus=
"isShowClientOne=false"
:rows=
"5"
size=
"small"
placeholder=
"已隐藏内容,点击查看或编辑"
>
</el-input>
<el-input
v-else
type=
"textarea"
:rows=
"5"
size=
"small"
maxlength=
"1000"
v-model=
"appConfig.WeChatPayCertificate"
>
</el-input>
</el-form-item>
<el-form-item
label=
"微信支付apiclient_key.pem"
size=
"small"
>
<el-input
v-if=
"isShowClientTwo"
type=
"textarea"
@
focus=
"isShowClientTwo=false"
:rows=
"5"
size=
"small"
placeholder=
"已隐藏内容,点击查看或编辑"
>
</el-input>
<el-input
v-else
type=
"textarea"
:rows=
"5"
size=
"small"
maxlength=
"1000"
v-model=
"appConfig.WeChatPayPrivateKey"
>
</el-input>
</el-form-item>
</el-form>
</div>
</div>
<el-button
size=
"small"
type=
"primary"
@
click=
"submitForm('appConfig')"
>
保存
</el-button>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
//是否显示小程序appSecret
isShowAppSecret
:
true
,
//是否显示微信支付Api密钥
isShowApi
:
true
,
//是否显示微信支付
isShowClientOne
:
true
,
isShowClientTwo
:
true
,
//修改配置MSG
appConfig
:
{
MallBaseId
:
0
,
//小程序Id
...
...
@@ -75,6 +91,28 @@
WeChatPayCertificate
:
""
,
//微信支付证书
WeChatPayPrivateKey
:
""
,
//微信支付私钥
},
rules
:
{
MiniAppId
:
[{
required
:
true
,
message
:
"请输入appid"
,
trigger
:
"blur"
}],
MiniAppSecret
:
[{
required
:
true
,
message
:
"请输入appsecret"
,
trigger
:
"blur"
}],
WeChatPayMerchants
:
[{
required
:
true
,
message
:
"请输入mchid"
,
trigger
:
"blur"
}],
WeChatApiSecret
:
[{
required
:
true
,
message
:
"请输入key"
,
trigger
:
"blur"
}]
}
};
},
created
()
{
...
...
@@ -100,6 +138,16 @@
}
})
},
submitForm
(
msg
)
{
//提交创建、修改表单
this
.
$refs
[
msg
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
UpdateAppConfig
();
}
else
{
return
false
;
}
});
},
//修改版权
UpdateAppConfig
()
{
this
.
apipost
(
"/api/Tenant/SetMiniProgramAppConfig"
,
this
.
appConfig
,
res
=>
{
...
...
src/components/StoreDesign/wexinappmsg.vue
View file @
0100f99f
<
style
>
.wexinappconfig
.mimitBody
{
.weixinappmsg
{
position
:
relative
;
}
.weixinappmsg
.mimitBody
{
padding
:
20px
;
background-color
:
#fff
;
margin
:
10px
0
20px
0
;
...
...
@@ -7,77 +10,118 @@
width
:
100%
;
}
.we
xinappconfi
g
.mimitList
{
.we
ixinappms
g
.mimitList
{
margin-bottom
:
15px
;
display
:
flex
;
flex-direction
:
row
;
}
.we
xinappconfi
g
.mimitBody
.el-tag
{
.we
ixinappms
g
.mimitBody
.el-tag
{
min-width
:
120px
;
padding-right
:
50px
;
}
.wexinappconfig
.el-button--small
{
padding
:
9px
25px
;
.weixinappmsg
.el-button--small
{
padding
:
9px
15px
;
}
.wexin_Header
{
padding
:
0
20px
;
height
:
56px
;
line-height
:
56px
;
background-color
:
#fff
;
margin-bottom
:
10px
;
}
.weixinTopBtn
{
position
:
absolute
;
top
:
10px
;
right
:
10px
;
z-index
:
2
;
}
.weixin_warmTips
{
margin
:
0px
20px
20px
;
background-color
:
rgb
(
244
,
244
,
245
);
padding
:
10px
15px
;
color
:
rgb
(
144
,
147
,
153
);
display
:
inline-block
;
font-size
:
15px
;
}
</
style
>
<
template
>
<div
class=
"wexinappconfig"
>
<div
class=
"CommonHeader"
>
商城订阅消息
</div>
<div
class=
"mimitBody"
>
<el-form
:model=
"appMallSubscribeMsg"
ref=
"appMallSubscribeMsg"
label-width=
"150px"
>
<el-form-item
label=
"下单成功提醒(类目: 服装/鞋/箱包 )"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.OrderSuccessTpl"
>
</el-input>
</el-form-item>
<el-form-item
label=
"订单取消通知(类目: 服装/鞋/箱包 )"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.OrderCancelTpl"
>
</el-input>
</el-form-item>
<el-form-item
label=
"订单发货通知(类目: 服装/鞋/箱包 )"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.OrderDeliverGoodsTpl"
>
</el-input>
</el-form-item>
<el-form-item
label=
"退款通知(类目: 服装/鞋/箱包 )"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.RefundTpl"
>
</el-input>
</el-form-item>
<el-form-item
label=
"活动状态通知(类目: 服装/鞋/箱包 )"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.ActiveStateTpl"
>
</el-input>
</el-form-item>
<el-form-item
label=
"审核结果通知(类目: 服装/鞋/箱包 )"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.AuditResultTpl"
>
</el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"UpdateMallSubscribeMsg()"
>
确 定
</el-button>
</span>
</div>
<div
class=
"CommonHeader"
>
分销订阅消息
</div>
<div
class=
"mimitBody"
>
<el-form
:model=
"appMallDistributionMsg"
ref=
"appMallDistributionMsg"
label-width=
"150px"
>
<el-form-item
label=
"提现成功通知(类目: 服装/鞋/箱包 )"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appMallDistributionMsg.ReflectSuccessTpl"
>
</el-input>
</el-form-item>
<el-form-item
label=
"提现失败通知(类目: 服装/鞋/箱包 )"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appMallDistributionMsg.ReflectFailTpl"
>
</el-input>
</el-form-item>
<el-form-item
label=
"会员等级变更通知(类目: 服装/鞋/箱包 )"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"appMallDistributionMsg.MembersLevelChangeTpl"
>
</el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"UpdateMallDistributionMsg()"
>
确 定
</el-button>
</span>
<div
class=
"weixinappmsg"
>
<el-button
class=
"weixinTopBtn"
type=
"primary"
size=
"small"
>
一键添加订阅信息
</el-button>
<div
class=
"wexin_Header"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"商城订阅信息"
name=
"1"
></el-tab-pane>
<el-tab-pane
label=
"分销订阅信息"
name=
"2"
></el-tab-pane>
</el-tabs>
</div>
<template
v-if=
"checkIndex==1"
>
<div
class=
"mimitBody"
>
<div
class=
"el-col el-col-24"
>
<div
class=
"weixin_warmTips"
>
温馨提示:获取前请先确认您已获得订阅消息的使用权限,并且订阅消息中没有任何数据。获取后请不要到小程序后台 删除相应的订阅消息,否则会影响订阅消息正常使用。
</div>
<el-form
:model=
"appMallSubscribeMsg"
ref=
"appMallSubscribeMsg"
label-width=
"300px"
>
<el-form-item
label=
"下单成功提醒(类目: 服装/鞋/箱包)"
>
<el-input
type=
"text"
style=
"width:30%"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.OrderSuccessTpl"
>
</el-input>
<el-button
plain
size=
"small"
>
查看订阅消息示例
</el-button>
</el-form-item>
<el-form-item
label=
"订单取消通知(类目: 服装/鞋/箱包)"
>
<el-input
type=
"text"
style=
"width:30%"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.OrderCancelTpl"
>
</el-input>
<el-button
plain
size=
"small"
>
查看订阅消息示例
</el-button>
</el-form-item>
<el-form-item
label=
"订单发货通知(类目: 服装/鞋/箱包)"
>
<el-input
type=
"text"
style=
"width:30%"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.OrderDeliverGoodsTpl"
>
</el-input>
<el-button
plain
size=
"small"
>
查看订阅消息示例
</el-button>
</el-form-item>
<el-form-item
label=
"退款通知(类目: 服装/鞋/箱包)"
>
<el-input
type=
"text"
style=
"width:30%"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.RefundTpl"
>
</el-input>
<el-button
plain
size=
"small"
>
查看订阅消息示例
</el-button>
</el-form-item>
<el-form-item
label=
"活动状态通知(类目: 服装/鞋/箱包)"
>
<el-input
type=
"text"
style=
"width:30%"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.ActiveStateTpl"
>
</el-input>
<el-button
plain
size=
"small"
>
查看订阅消息示例
</el-button>
</el-form-item>
<el-form-item
label=
"审核结果通知(类目: 服装/鞋/箱包)"
>
<el-input
type=
"text"
style=
"width:30%"
size=
"small"
maxlength=
"200"
v-model=
"appMallSubscribeMsg.AuditResultTpl"
>
</el-input>
<el-button
plain
size=
"small"
>
查看订阅消息示例
</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-button
size=
"small"
type=
"primary"
@
click=
"UpdateMallSubscribeMsg()"
>
保 存
</el-button>
<el-button
size=
"small"
type=
"primary"
>
生成测试二维码
</el-button>
</
template
>
<
template
v-else
>
<div
class=
"mimitBody"
>
<div
class=
"el-col el-col-24"
>
<div
class=
"weixin_warmTips"
>
温馨提示:获取前请先确认您已获得订阅消息的使用权限,并且订阅消息中没有任何数据。获取后请不要到小程序后台 删除相应的订阅消息,否则会影响订阅消息正常使用。
</div>
<el-form
:model=
"appMallDistributionMsg"
ref=
"appMallDistributionMsg"
label-width=
"300px"
>
<el-form-item
label=
"提现成功通知(类目: 服装/鞋/箱包)"
>
<el-input
type=
"text"
style=
"width:30%"
size=
"small"
maxlength=
"200"
v-model=
"appMallDistributionMsg.ReflectSuccessTpl"
>
</el-input>
<el-button
plain
size=
"small"
>
查看订阅消息示例
</el-button>
</el-form-item>
<el-form-item
label=
"提现失败通知(类目: 服装/鞋/箱包)"
>
<el-input
type=
"text"
style=
"width:30%"
size=
"small"
maxlength=
"200"
v-model=
"appMallDistributionMsg.ReflectFailTpl"
>
</el-input>
<el-button
plain
size=
"small"
>
查看订阅消息示例
</el-button>
</el-form-item>
<el-form-item
label=
"会员等级变更通知(类目: 服装/鞋/箱包)"
>
<el-input
type=
"text"
style=
"width:30%"
size=
"small"
maxlength=
"200"
v-model=
"appMallDistributionMsg.MembersLevelChangeTpl"
>
</el-input>
<el-button
plain
size=
"small"
>
查看订阅消息示例
</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-button
size=
"small"
type=
"primary"
@
click=
"UpdateMallDistributionMsg()"
>
保 存
</el-button>
<el-button
size=
"small"
type=
"primary"
>
生成测试二维码
</el-button>
</
template
>
</div>
</template>
<
script
>
...
...
@@ -101,6 +145,8 @@
ReflectFailTpl
:
""
,
//提现失败通知(类目: 服装/鞋/箱包 )
MembersLevelChangeTpl
:
""
,
//会员等级变更通知(类目: 服装/鞋/箱包 )
},
activeName
:
'1'
,
checkIndex
:
1
,
};
},
created
()
{
...
...
@@ -154,6 +200,10 @@
}
})
},
//切换
handleClick
(
tab
){
this
.
checkIndex
=
tab
.
name
;
}
},
mounted
()
{
this
.
GetWeiXinAppConfig
();
...
...
src/components/mall.vue
View file @
0100f99f
...
...
@@ -330,7 +330,7 @@
</div>
<div
class=
"mainRightContent"
>
<div
class=
"mainRightTop"
>
<div
class=
"mainRightLeft"
>
微信小程序
</div>
<div
class=
"mainRightLeft"
@
click=
"goLittlePrograme"
>
微信小程序
</div>
<div
class=
"marinRightList"
>
<ul>
<li>
缓存
</li>
...
...
@@ -456,6 +456,14 @@
});
}
},
//跳转微信小程序
goLittlePrograme
(){
let
routeData
=
this
.
$router
.
resolve
({
name
:
'Fsetting'
,
query
:
{}
});
window
.
open
(
routeData
.
href
,
"_blank"
);
}
},
mounted
()
{
this
.
getMenuList
();
...
...
src/router/index.js
View file @
0100f99f
...
...
@@ -44,6 +44,24 @@ export default new Router({
name
:
'setminipage'
,
component
:
resolve
=>
require
([
'@/components/system/setminipage'
],
resolve
),
},
{
path
:
'/Fsetting'
,
//微信小程序设置
name
:
'Fsetting'
,
component
:
resolve
=>
require
([
'@/components/Fsetting'
],
resolve
),
children
:
[
//店铺管理 微信基础设置
{
path
:
'/wexinappconfig'
,
name
:
'wexinappconfig'
,
component
:
resolve
=>
require
([
'@/components/StoreDesign/wexinappconfig'
],
resolve
),
},
//店铺管理 微信基础设置
{
path
:
'/wexinappmsg'
,
name
:
'wexinappmsg'
,
component
:
resolve
=>
require
([
'@/components/StoreDesign/wexinappmsg'
],
resolve
),
}
]
},
{
path
:
'/mall'
,
name
:
'mall'
,
...
...
@@ -186,18 +204,6 @@ export default new Router({
path
:
'/copyrightset'
,
name
:
'copyrightset'
,
component
:
resolve
=>
require
([
'@/components/StoreDesign/copyrightset'
],
resolve
),
}
,
//店铺管理 微信基础设置
{
path
:
'/wexinappconfig'
,
name
:
'wexinappconfig'
,
component
:
resolve
=>
require
([
'@/components/StoreDesign/wexinappconfig'
],
resolve
),
}
,
//店铺管理 微信基础设置
{
path
:
'/wexinappmsg'
,
name
:
'wexinappmsg'
,
component
:
resolve
=>
require
([
'@/components/StoreDesign/wexinappmsg'
],
resolve
),
},
//店铺管理 用户中心
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment