123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <template>
- <view>
- <form @submit="formSubmit" @reset="formReset">
- <input type="hidden" style="width: 0;height: 0;display: none;" class="" name="id" :value=id />
- <view class="tr">
- <view class="td-left">
- 用户名称:
- </view>
- <view class="td-right">
- <input type="text" class="input" name="workName" :value=workName />
- </view>
- </view>
- <view class="bomtom" >
- <button type="primary" formType="submit" >
- <p class="p1">提交</p>
- </button>
- </view>
- </form>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- id: null,
- workName: null
- }
- },
- onLoad: function(option) {
- this.id = option.id;
- this.workName = option.workName;
- console.log(this.workName);
- },
- methods: {
- formSubmit(event) {
- var that = this;
- var weixin = event.detail.value;
- var serverUrl = that.serverurl;
- var token = uni.getStorageSync("token");
- var id = weixin.id;
- var workName = weixin.workName;
- if(workName==null||workName==''){
- return ;
- }
- uni.request({
- url: serverUrl + "/TWeixin/updateWeixin?id=" + id + "&workName=" + workName,
- method: "POST",
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- uni.showModal({
- title: '提示',
- content: res.data.message,
- });
- }
- });
- }
- }
- }
- </script>
- <style>
- .tr {
- padding-top: 15upx;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- font-size: 26upx;
- font-family: "PingFang-SC-Bold";
- }
- .td-left {
- font-family: "PingFang-SC-Bold";
- /* font-weight: bold; */
- margin: auto;
- font-size: 40upx;
- width: 30%;
- text-align: right;
- }
- .td-right {
- font-family: "PingFang-SC-Bold";
- /* font-weight: bold; */
- margin: auto;
- font-size: 40upx;
- width: 65%;
- text-align: left;
- }
- .button {
- margin: auto;
- width: 60%;
- height: 100upx;
- }
- .input {
- /* padding: 10upx 20upx 10upx 0upx; */
- padding-left: 20upx;
- padding-top: 10upx;
- background-color: #FFFFFF;
- width: 450upx;
- height: 50upx;
- box-shadow: 0upx 0upx 20upx #D3D3D3;
- border-radius: 5upx;
- }
- .p1 {
- height: 80upx;
- font-family: "PingFang-SC-Bold";
- font-weight: bold;
- margin: auto;
- font-size: 40upx;
- color: #363D44;
- }
- .bomtom {
- position: absolute;
- bottom: 0;
- left: 50%;
- transform: translate(-50%, 0%);
- padding-bottom: 40upx;
- }
- </style>
|